Skip to content

Commit 4775846

Browse files
UnbreakableMJclaude
andcommitted
chore: scaffold M0 — workspace, posture files, CI
Stand up the Vault workspace per PRD §9.1 and §12: - Cargo workspace with 8 member crates (vault-core, vault-api, vault-store, vault-agent, vault-ipc, vault-cli, vault-tui, vault-theme), edition 2024, resolver 3, MSRV 1.95. - vault CLI binary: `--version` emits the Spacecraft Software Standard §13.2 attribution block (M0 gate). - Posture files at repo root: README, NOTICE, CONTRIBUTING, LICENSE (GPL-3.0-or-later), CREDITS, CHANGELOG. PRD.md authored separately. - CI: rustfmt, clippy -D warnings, multi-OS build+test, dedicated version-gate job that greps for the §13.2 attribution lines, cargo audit, and cargo deny. - Tooling: rust-toolchain.toml (stable), rustfmt.toml, deny.toml. - .gitignore excludes nested reference repos (cruxpass/, rbw/), build artefacts, and AI-assistant artefacts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 parents  commit 4775846

30 files changed

Lines changed: 2314 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
RUSTFLAGS: "-D warnings"
13+
14+
jobs:
15+
fmt:
16+
name: rustfmt
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v5
20+
- uses: dtolnay/rust-toolchain@stable
21+
with:
22+
components: rustfmt
23+
- run: cargo fmt --all -- --check
24+
25+
clippy:
26+
name: clippy
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v5
30+
- uses: dtolnay/rust-toolchain@stable
31+
with:
32+
components: clippy
33+
- uses: Swatinem/rust-cache@v2
34+
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
35+
36+
test:
37+
name: test (${{ matrix.os }})
38+
runs-on: ${{ matrix.os }}
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
os: [ubuntu-latest, macos-latest]
43+
steps:
44+
- uses: actions/checkout@v5
45+
- uses: dtolnay/rust-toolchain@stable
46+
- uses: Swatinem/rust-cache@v2
47+
- run: cargo build --workspace --all-targets
48+
- run: cargo test --workspace --all-targets
49+
50+
version-gate:
51+
name: vault --version emits §13.2 attribution
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v5
55+
- uses: dtolnay/rust-toolchain@stable
56+
- uses: Swatinem/rust-cache@v2
57+
- run: cargo build --bin vault --release
58+
- name: Verify attribution block
59+
run: |
60+
out=$(./target/release/vault --version)
61+
echo "$out"
62+
echo "$out" | grep -q "Mohamed Hammad <Mohamed.Hammad@SpacecraftSoftware.org>" \
63+
&& echo "$out" | grep -q "GPL-3.0-or-later" \
64+
&& echo "$out" | grep -q "https://Vault.SpacecraftSoftware.org/"
65+
66+
audit:
67+
name: cargo-audit
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v5
71+
- uses: dtolnay/rust-toolchain@stable
72+
- uses: rustsec/audit-check@v2
73+
with:
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
76+
deny:
77+
name: cargo-deny
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v5
81+
- uses: EmbarkStudios/cargo-deny-action@v2

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
# Rust build artifacts
4+
/target/
5+
**/*.rs.bk
6+
*.pdb
7+
8+
# Editor / IDE
9+
.idea/
10+
.vscode/
11+
*.swp
12+
*.swo
13+
.DS_Store
14+
15+
# AI assistant artifacts — kept local, not published
16+
Chat.txt
17+
CLAUDE.md
18+
AGENTS.md
19+
GEMINI.md
20+
.claude/
21+
.cursor/
22+
.cursorrules
23+
.aider*
24+
25+
# Nested reference repositories (out-of-tree third-party projects)
26+
# Kept on disk for offline reference during development.
27+
/cruxpass/
28+
/rbw/
29+
30+
# Local environment overrides
31+
.env
32+
.env.*
33+
!.env.example

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
2+
3+
# Changelog
4+
5+
All notable changes to Vault are documented here. Dates are ISO 8601 UTC per
6+
the Spacecraft Software Standard §12. Vault is pre-1.0; versions in the `0.x`
7+
range may break in any release.
8+
9+
## [Unreleased]
10+
11+
### Added
12+
13+
- M0 scaffolding: Cargo workspace, eight member crates (`vault-core`,
14+
`vault-api`, `vault-store`, `vault-agent`, `vault-ipc`, `vault-cli`,
15+
`vault-tui`, `vault-theme`).
16+
- `vault --version` emits the Standard §13.2 attribution block.
17+
- Posture files at repo root: `README.md`, `NOTICE.md`, `CONTRIBUTING.md`,
18+
`LICENSE`, `CREDITS.md`, `CHANGELOG.md`.
19+
- `PRD.md` — full product requirements document.
20+
- CI configuration: `fmt`, `clippy -D warnings`, `cargo audit`, `cargo deny`.

CONTRIBUTING.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
2+
3+
# Contributing to Vault
4+
5+
Thank you for your interest. Please read this document before opening an
6+
issue or pull request — it sets honest expectations for both sides so no
7+
one's time is wasted.
8+
9+
## Project Stance
10+
11+
Vault is a subproject of **Spacecraft Software**, a personal hobby project. It
12+
is shaped around the maintainer's own use case and developed at hobby pace.
13+
14+
This is **not** a community-driven project, but external input is welcome
15+
and appreciated within the bounds set out below.
16+
17+
## What Is Welcome
18+
19+
- **Bug reports** — clear, reproducible, with environment details (OS, kernel,
20+
Rust toolchain version, shell, server type — bitwarden.com vs Vaultwarden,
21+
relevant config). For security-sensitive bugs see *Reporting Security Issues*
22+
below.
23+
- **Suggestions** — features, refactors, naming proposals (must conform to
24+
Spacecraft Software Standard §2 — aerospace / sci-fi / AI naming), design
25+
feedback.
26+
- **Pull requests** — small, focused, and aligned with the Spacecraft Software
27+
Standard and Vault's PRD.
28+
- **Documentation fixes** — typos, inaccuracies, broken links, clarifications,
29+
translations.
30+
- **Test coverage improvements** — almost always merge-worthy.
31+
32+
## What Is Not Guaranteed
33+
34+
- **PR acceptance.** Direction, scope, and quality bar are set by the
35+
maintainer alone. A submitted contribution is not a guaranteed merge, even
36+
if it is correct, well-written, and passes CI. If a PR is not accepted, that
37+
is a judgment of fit, not of the work.
38+
- **Response time.** This is a hobby project. Expect responses on the order of
39+
days to weeks, not hours.
40+
- **Roadmap influence.** Suggestions may inform direction but do not override
41+
the maintainer's plans documented in [`PRD.md`](./PRD.md).
42+
- **API stability for in-progress work.** Pre-1.0 versions may break in any
43+
release.
44+
45+
## Before Opening a PR
46+
47+
1. **Open an issue first** for non-trivial changes. Discuss the design before
48+
writing code.
49+
2. **Read the Spacecraft Software Standard** and the Vault [`PRD.md`](./PRD.md).
50+
Memory safety → performance → hardened security, in that order. Rust where
51+
viable. POSIX-compliant CLI. GPL-3.0-or-later with SPDX headers on every
52+
source file.
53+
3. **Match the CLI Standard** (SFRS v1.0.0) for anything touching `vault-cli`.
54+
4. **Run the full test suite locally.** PRs that don't pass CI will not be
55+
reviewed.
56+
5. **Use the project's preferred toolchain.** Format with `rustfmt`, lint with
57+
`clippy -- -D warnings`, and run `cargo audit` for any added dependency.
58+
6. **Sign-off your commits** (`git commit -s`) under the
59+
[Developer Certificate of Origin](https://developercertificate.org/).
60+
7. **Cryptographically sign your commits** — Spacecraft Software Standard §6.3
61+
requires every commit to a Spacecraft Software remote to be signed and show
62+
"Verified" on GitHub. Ed25519 SSH signing is the current default.
63+
64+
## Security-Sensitive Areas
65+
66+
Vault handles credential material. Extra care is expected in:
67+
68+
- Anything touching the master key, KDF, or EncString parsing (`vault-core`).
69+
- The agent's IPC boundary (`vault-ipc`, `vault-agent`).
70+
- Clipboard handling.
71+
- Network code (`vault-api`).
72+
73+
Changes in these areas should include unit tests; non-trivial changes should
74+
include integration tests and, where applicable, fuzz harness updates.
75+
76+
## Commit Style
77+
78+
- Conventional Commits prefix (`feat:`, `fix:`, `docs:`, `refactor:`,
79+
`test:`, `chore:`, `perf:`, `build:`, `ci:`).
80+
- Subject ≤ 72 characters, imperative mood ("add" not "added").
81+
- Body wrapped at 72 columns; explain *why*, not just *what*.
82+
- Reference issues by number (`Closes #42`).
83+
84+
## Forking
85+
86+
If your needs diverge from the maintainer's, or you want to take Vault in a
87+
different direction, **fork it**. That is exactly what GPL-3.0-or-later is
88+
for. The only constraints are those imposed by the license itself: keep the
89+
source open and under a compatible license, preserve copyright notices, and
90+
pass the same freedoms downstream.
91+
92+
## Reporting Security Issues
93+
94+
For security-sensitive bugs, do **not** open a public issue. Email
95+
&lt;Mohamed.Hammad@SpacecraftSoftware.org&gt; with details. PGP key available on
96+
request.
97+
98+
A coordinated-disclosure window of 90 days from acknowledgment is the default;
99+
this can be shortened or lengthened by mutual agreement.
100+
101+
## License of Contributions
102+
103+
By submitting a contribution, you agree that it will be licensed under
104+
**GPL-3.0-or-later**, the same terms as the project. Contributions that cannot
105+
be licensed under GPL-3.0-or-later cannot be accepted.
106+
107+
You retain copyright in your contributions; no CLA is required.
108+
109+
---
110+
111+
**Maintainer:** Mohamed Hammad &lt;Mohamed.Hammad@SpacecraftSoftware.org&gt;
112+
**License:** GPL-3.0-or-later
113+
**Website:** <https://Vault.SpacecraftSoftware.org/>
114+
115+
*--- Forged in Spacecraft Software ---*

CREDITS.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
2+
3+
# CREDITS
4+
5+
Vault stands on substantial third-party work. This file is the inbound
6+
counterpart to the Spacecraft Software Standard §13.2 outbound attribution
7+
block: §13.2 tells consumers who maintains Vault; this document tells
8+
consumers whose work Vault stands on. See Standard §13.3.
9+
10+
Routine package-manager dependencies whose `LICENSE` files are surfaced
11+
mechanically via Cargo are **not** listed here; their license metadata travels
12+
with the binary. Only works whose ideas or implementation form a substantial
13+
conceptual basis for Vault appear below.
14+
15+
## Bitwarden — protocol and specification
16+
17+
| Field | Value |
18+
| ---------- | ---------------------------------------------------------------------- |
19+
| Name | Bitwarden |
20+
| Author(s) | Bitwarden, Inc. |
21+
| License | Bitwarden's clients are mostly GPL-3.0; the official Rust SDK includes AGPL-3.0 and Business Source License components. Vault does **not** link or vendor the official SDK. |
22+
| Source URL | <https://bitwarden.com/help/bitwarden-security-white-paper/> |
23+
| Scope | The Bitwarden protocol — REST endpoints, identity flow, EncString format, KDF parameters — that Vault speaks. Re-implemented from the public security whitepaper and protocol documentation. |
24+
25+
## rbw — CLI shape and reference behaviour
26+
27+
| Field | Value |
28+
| ---------- | ---------------------------------------------------------------------- |
29+
| Name | rbw |
30+
| Author(s) | Daniel Frank and contributors |
31+
| License | MIT |
32+
| Source URL | <https://github.com/doy/rbw> |
33+
| Scope | Vault's CLI verb set, agent-process design, and several integration choices were studied from rbw. rbw's MIT license permits reading and re-implementing; no rbw source code is vendored or linked. |
34+
35+
## cruxpass — TUI layout and flow
36+
37+
| Field | Value |
38+
| ---------- | ---------------------------------------------------------------------- |
39+
| Name | cruxpass |
40+
| Author(s) | AryanpurTech |
41+
| License | Reference repository — see upstream |
42+
| Source URL | <https://github.com/AryanpurTech/cruxpass> |
43+
| Scope | Vault's TUI three-pane layout, modal flows, and keyboard ergonomics are modelled on cruxpass's interaction design. No source is vendored. |
44+
45+
## ratatui — terminal UI framework
46+
47+
| Field | Value |
48+
| ---------- | ---------------------------------------------------------------------- |
49+
| Name | ratatui |
50+
| Author(s) | The Ratatui Developers |
51+
| License | MIT |
52+
| Source URL | <https://github.com/ratatui-org/ratatui> |
53+
| Scope | Used as the rendering substrate for `vault-tui`. Listed here because the TUI's structure is shaped by ratatui's widget and layout primitives, beyond routine dependency use. |
54+
55+
## The Spacecraft Software Standard
56+
57+
| Field | Value |
58+
| ---------- | ---------------------------------------------------------------------- |
59+
| Name | The Spacecraft Software Standard |
60+
| Author(s) | Mohamed Hammad & Spacecraft Software |
61+
| License | GPL-3.0-or-later |
62+
| Source URL | <https://Standard.SpacecraftSoftware.org/> |
63+
| Scope | Vault conforms to v1.12 of the Standard for naming, licensing, posture, attribution, signed commits, and dates/times. |
64+
65+
---
66+
67+
*--- Forged in Spacecraft Software ---*

0 commit comments

Comments
 (0)