Scaffold Cargo workspace with ADR enforcement#1
Merged
Brad-Edwards merged 2 commits intomainfrom Apr 12, 2026
Merged
Conversation
Cargo workspace with two crates (library + binary), pinned Rust stable toolchain with rustfmt and clippy, real CI pipeline (adr-conformance, lint, test), pre-commit hooks for formatting and ADR checks, and grep-based scripts enforcing the aphelion ADRs that apply to the capcom kernel (ADR-001 no banned engines, ADR-003/005/009 no distributed primitives). Work order: - crates/capcom (library): placeholder kernel API with version() - crates/capcom-engine (binary): placeholder entry point for the co-located out-of-process engine node (ADR-012) - scripts/check-adr-conformance.sh: banned engine + distributed primitive detection over Rust source and Cargo.toml - .claude/hooks/adr-boundary-check.sh: same checks as PreToolUse hook - .github/workflows/ci.yml: three real jobs replacing TODO placeholders - .pre-commit-config.yaml: cargo fmt check + ADR conformance - README.md: build/test/run/layout/constraints documentation Also carries the Ground Control workflow config migration (earlier uncommitted work): .ground-control.yaml populated with real cargo workflow commands, AGENTS.md / CLAUDE.md / .mcp.json pointers updated, and the stale project-level skill copies removed since the workflow skills now live at user level. Verified locally: - cargo fmt --all --check - cargo clippy --workspace --all-targets -- -D warnings - cargo build --workspace --all-targets - cargo test --workspace --all-targets (1 test passing) - scripts/check-adr-conformance.sh First capcom work order step — kernel features (storage, data model, transactions, query execution) land in subsequent steps per aphelion notes/work-order.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First capcom work order step (project scaffolding). Sets up the Cargo workspace, Rust toolchain, ADR enforcement, CI, and pre-commit hooks so subsequent work order steps have a building/testing/linting project to add code to. Mirrors aphelion's scaffolding pattern adapted for Rust.
What's in the PR
Cargo workspace (new):
Cargo.toml— workspace manifest (resolver 2, edition 2024, Rust 1.85+, MIT, workspace lints)crates/capcom/— library crate with placeholderversion()and one passing unit testcrates/capcom-engine/— binary crate, entry point for the future co-located out-of-process engine node (ADR-012)rust-toolchain.toml— stable channel, rustfmt + clippy components, minimal profilerustfmt.toml— edition 2024ADR enforcement (new):
scripts/check-adr-conformance.sh— grep-based check for banned engines (ADR-001: MillenniumDB, Graphflow) and distributed primitives (ADR-003/005/009) over Rust source and Cargo.toml. Works in both pre-commit and CI modes with line-level// adr-override: ADR-NNNescapes..claude/hooks/adr-boundary-check.sh— same checks as a Claude Code PreToolUse hook on Edit/Write..claude/settings.jsonupdated to register the new hook alongsideprotect_files.sh.CI pipeline (replacing TODO placeholders in
.github/workflows/ci.yml):adr-conformancejob — runs the conformance scriptlintjob —cargo fmt --all --check+cargo clippy --workspace --all-targets -- -D warningstestjob —cargo build --workspace --all-targets+cargo test --workspace --all-targetsPre-commit additions to
.pre-commit-config.yaml:cargo fmt --all --checkscripts/check-adr-conformance.shDocs / config:
README.md— replaces "Project Name" placeholder with build/test/run commands, layout, and architectural constraints summary.gitignore— adds Rust entries (target/,*.pdb).editorconfig— adds[*.rs]and[*.toml]sectionsCHANGELOG.md— new 0.2.0 entryAlso carried along (uncommitted working-tree state from the earlier Ground Control workflow migration):
.ground-control.yaml— now populated with real cargo workflow commands (was commented-out placeholders)AGENTS.md,CLAUDE.md,.mcp.json— Ground Control Context pointers updated.claude/skills/{implement,ship,stage,review-tests,gh-workflow-monitor}/— workflow skills now live at user level (~/.claude/skills/) per the skill centralization work tracked in Ground Control as GC-O008 / ADR-023What's NOT in the PR
lib.rshas onlyversion().main.rsprints a placeholder.docs/adrs/copies. Can be added later if wanted.Verification (all pass locally)
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo build --workspace --all-targetscargo test --workspace --all-targets(1 test:capcom::tests::version_is_non_empty)scripts/check-adr-conformance.shgc_get_repo_ground_control_contextreturnsstatus: okwith full workflow block populatedTest plan
adr-conformancejob passeslintjob passes (fmt + clippy on the workspace)testjob passes (build + test)