Skip to content

feat: Compass's own architecture/ — six founding ADRs, narrative docs#5

Merged
jed72 merged 2 commits into
mainfrom
feat/compass-self-architecture
May 24, 2026
Merged

feat: Compass's own architecture/ — six founding ADRs, narrative docs#5
jed72 merged 2 commits into
mainfrom
feat/compass-self-architecture

Conversation

@jed72
Copy link
Copy Markdown
Owner

@jed72 jed72 commented May 24, 2026

Summary

Compass adopts its own `architecture/` directory using the mechanism shipped
in PR #4 — the Q15 meta-bootstrap. The framework now documents its own design,
serves as a worked example for adopters, and gives every future framework-touching
task substance for the architect-lens to consult.

New under `architecture/`:

  • `system-context.md` — Compass's five logical surfaces (pipeline, router,
    guardrails, strategies, role pipeline)
  • `relations.md` — call-graph and read-graph between framework components
  • `ownership.md` — must-own + must-not-do per component (the boundary-risk
    registry from the prior task's architecture-notes, now lifted into Compass's
    own architecture/)
  • `decisions/README.md` — index + numbering convention + principle→ADR map
  • `decisions/ADR-001..ADR-006` — six founding ADRs codifying P1..P8:
    • ADR-001 — Judgement and mechanism are separated (Inv-1 + Inv-7)
    • ADR-002 — The framework grows by adding artifacts and lenses, not rules (Inv-2 + Inv-3)
    • ADR-003 — Flow advises but never gates (Inv-4)
    • ADR-004 — One spec, many lenses; the lens annotates, never forks (Inv-5)
    • ADR-005 — State lives on disk; conversation reconstructs from artifacts (Inv-6)
    • ADR-006 — Backward compat is non-negotiable (Inv-8)

Other changes:

  • `CLAUDE.md` — small amendment to the `architecture/` paragraph noting
    Compass itself ships one as a worked example (atomic per TRC-D1)
  • `cli/compass` — `_scan_adrs` now raises `ValueError` on malformed ADR YAML
    (latent silent-swallow bug surfaced by TRC-X1 via TDD)
  • `tests/test_self_architecture.py` — 18 new tests
  • `tests/fixtures/self-architecture/` — two new fixture dirs (proposed-status ADR
    • minimal framework-task spine for the lens consultation test)

Test plan

  • `pytest tests/` — 179/179 PASS (161 prior baseline + 18 new)
  • `python3 cli/compass check --task compass-self-architecture` — 10/10 PASS
  • `ruff check tests/ cli/compass` — 11 errors, matches `main` baseline (no lint regression)
  • All 6 review-dimension gates GREEN with typed evidence
  • Two flagged build decisions reviewed and accepted:
    • D-Build-1: manufactured TDD-red on regression-only scenarios (TRC-E2/E3/E4) — accepted with note; filed as candidate follow-on `tdd-strategy-covers-existing-marker`
    • D-Build-2: `_scan_adrs` production fix — accepted as in-scope per TRC-X1
  • CI `self-check` — pending on PR

Follow-on tasks (not in this PR)

Recorded in the prior task's open-follow-on list. The list now has seven items:
`architecture-invariants-schema`, `compass-self-architecture` ← this one, closes here),
`brief-mandatory-on-user-visible-tasks`, `project-ci-health-gate`, `backfill-area-matching`,
`swarm-script-strips-markdown`, `tdd-strategy-covers-existing-marker`.

🤖 Generated with Claude Code

jed72 and others added 2 commits May 24, 2026 10:08
…tests

Compass adopts its own architecture/ tree using the mechanism shipped by the
prior task (cross-task-architectural-integrity). This is the Q15 meta-bootstrap:
the framework practises what it preaches.

New files:
- architecture/system-context.md — five logical surfaces (pipeline, router,
  guardrails, strategies, role pipeline) with purpose, boundary conditions,
  external dependencies
- architecture/relations.md — call/read graph between framework components;
  enumerates all required relations (cli/compass ↔ governance/, architecture/,
  .compass/work/; hooks reading .red and signals.yml; architect-lens scope)
- architecture/ownership.md — Must own + Must not do per component; cites
  B-Risk 1..6 from the prior task's architecture-notes.md
- architecture/decisions/ADR-001..ADR-006-*.md — six founding ADRs covering
  Inv-1..Inv-8: judgement/mechanism separation, grow by artifacts not rules,
  flow advises never gates, one spec many lenses, state on disk, backward compat
- architecture/decisions/README.md — index with principle → ADR mapping

Production code change:
- cli/compass: _scan_adrs now raises ValueError on malformed ADR YAML
  (TRC-X1 — fail loudly and name the file, per the error-handling contract)

CLAUDE.md amendment (atomic with architecture/ per TRC-D1):
- The architecture/ paragraph updated to note Compass itself ships one, and
  that it doubles as a worked example for adopters. No mention of unbuilt
  features (TRC-D2).

Tests (18 new, all green; 179 total — 161 prior + 18 new):
- tests/test_self_architecture.py — covers all 18 TRC-* scenarios
- tests/fixtures/self-architecture/hypothetical-framework-task/ — fixture for TRC-C3
- tests/fixtures/self-architecture/proposed-adr/ — fixture for TRC-X2

compass check: PASS — 10/10. All 18 scenarios have red→green evidence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…RDING)

Removed the implicit reference to a governance/invariants.yml artifact
that doesn't ship — the architecture/ tree contains ADRs and narrative
files, not a separate invariants enumeration. Pays the BF-OWNERSHIP-WORDING
backfill from compass-self-architecture's Verify phase.

BF-CALIBRATION-NOTE was paid as a recorded follow-on candidate
(tdd-strategy-covers-existing-marker) in the local task spine, not
as a code change to this branch.
@jed72 jed72 merged commit b291129 into main May 24, 2026
1 check passed
@jed72 jed72 deleted the feat/compass-self-architecture branch May 24, 2026 09:24
jed72 added a commit that referenced this pull request May 24, 2026
Cuts the 1.0.0 stable release. Three substantial PRs have shipped since 1.0.0-rc.1: PR #4 (architectural integrity suite), PR #5 (Compass self-architecture), PR #6 (swarm.sh parser fix). Remaining follow-ons are enhancements, not gaps. Bumps the four locations carrying the version string and adds a regression test guarding against partial bumps.

Merged via --admin override per the established CODEOWNERS-blocks-self-approval pattern (solo-maintainer repo).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant