DSAMind adoption: engine format fixes + version-axis amendment (F-II)#3
Merged
Conversation
…titution DSAMind is the first consumer with a constitution shaped independently of this repo's own dogfood format. Pointing `constitution audit` at it surfaced four real parser/audit gaps, not hypothetical ones: - P-line parser required bare `**P1.**`; DSAMind titles its P-lines (`**P1 — Title.**`) — now accepted, title folded into the statement text. - Article parser required exactly `### Article <id>`; DSAMind groups Articles under `### §<section>` domain headings, one level deeper (`#### Article`) — now both levels accepted, and the bullet-block boundary widened to match. - Serves-list parsing choked on inline parenthetical commentary per P-id, fragmenting on commas inside the parens and reading real Articles as serving nothing — parens are now stripped before splitting. - ART-STATUS rejected `SUPERSEDED — <date>`, the exact shape `ratify-amendment` itself produces. - LEDGER-SYNC fired unconditionally, comparing the framework pin against the ledger's own version axis — only valid for `selfHosted` instances. Wired the already-parsed but never-read `selfHosted` field into this one check. Verified: self-audit on this repo stays 0 findings (no regression); DSAMind's audit output went from 1 real error + 12 false-positive warnings to 16 real errors + 6 real warnings — including 5 ART-MECH-DEBT findings that independently match DSAMind's own hand-audited mechanization backlog list. 21/21 tests pass (2 new, covering the format variance + LEDGER-SYNC scoping). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nsumer
Found trying to upgrade DSAMind (scaffolded before this overhaul, compiled
skills stuck at pre-engine versions). setupAgents already unconditionally
refreshes every compiled SKILL.md, so re-running `init` looked like the
right update mechanism — but two bugs made it unsafe:
- The "does AGENTS.md already have a governance map" check was
case-sensitive (`includes('Governance Map')`), while the engine's own
detection (engine/parse.ts) is case-insensitive. A consumer's real heading
("## Governance map (entry point)") would read as absent, and init would
append a duplicate generic block on top of an already-customized map.
- scaffold.ts wrote a blanket `.constitution/` line to the root .gitignore.
events.ts's ensureOps writes its own nested .constitution/.gitignore
specifically so events.jsonl/proposals stay committed while
tone/compiles/board.html regenerate — a parent-directory ignore rule
makes git never even look for that narrower exception (verified
empirically), silently swallowing the delivery record and ratification
queue the ops-plane design explicitly means to keep. Scoped the ignore to
just the regenerable vendored copies (templates/, process/).
Verified: dry-run init against a full copy of DSAMind leaves CONSTITUTION.md/
AGENTS.md byte-identical and only rewrites the two skills that actually
changed upstream; a fresh-consumer dry run confirms events.jsonl is
stageable post-init. 25/25 tests (2 new).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Operator asked where the installed framework tooling version should be
tracked for a consumer (vs. the adopted-spec header pin vs. the product's
own ledger version), and invoked /propose-amendment on the idea. Drafted,
not ratified.
decisions/0002-version-axis-separation.md proposes extending Article F-II
("one home per rule") to name three distinct version facts and assign each
exactly one home: an instance's own Amendments Ledger version; the framework
spec version it has deliberately adopted (the CONSTITUTION.md header pin —
a ratified conformance claim, never auto-bumped past what's adopted); and
the framework tooling actually installed (the consumer's own package
manifest, e.g. package.json's @chinmaygit/constitution-cli entry — no new
field needed, confirming the operator's instinct). Evidenced by this
session's actual LEDGER-SYNC bug (fixed in code, not yet in law). Agreement-
only, with the reason on record — no catch-rate/friction hypothesis to
measure.
Explicitly did not rule on the operator's second idea (skills self-check
tooling currency and auto-run migrations): no concrete mechanism exists yet
to evaluate, and "auto-update tooling unattended" is a supply-chain-trust
question separate from version-tracking. Recorded as deferred follow-up
engineering work in the ADR's Consequences, not folded into this amendment.
CONSTITUTION.md itself is untouched — the drafted F-II text lives only in
the ADR; only ratify-amendment may write it into ratified law. decisions/
INDEX.md updated in the same change per decisions/AGENTS.md's own statute.
constitution audit + firewall both stay clean.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Operator feedback: the first draft was too dense to follow. Cut nested parentheticals and legal-brief phrasing; kept the same three-axis ruling, the same evidence, the same deferred item. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ratified by Chinmay, 2026-07-05: "makes sense lets ratify this." Extends Article F-II's Principle and Fitness (status: RATIFIED, unchanged) to name three version facts and give each exactly one home: an instance's own Amendments Ledger version, the framework spec version it has adopted (the header pin -- a ratified claim, never bumped ahead of what's adopted), and the framework tooling installed (the instance's own package manifest). Purely additive -- nothing existing changed or was superseded. Agreement-only, no pre-registered experiment -- there was no catch-rate or friction hypothesis to measure. The operator's second idea (skills auto-checking tooling currency and auto-migrating) is explicitly NOT part of this amendment -- no mechanism exists yet to rule on it. ADR-0002 flipped proposed -> accepted; decisions/INDEX.md updated. Version bumped 0.17.2 -> 0.17.3 (header + cli/package.json via constitution doctor's versionSync). Dogfood test's ADR count updated 1 -> 2. constitution.lock.json re-accepted by the ratifier to close the F-IV drift this change opened. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
cli/src/engine/{parse,audit}.ts): titled P-lines, section-grouped#### Articleheadings,Servesparenthetical commentary,SUPERSEDED — <date>status, andLEDGER-SYNCincorrectly firing for non-self-hosted consumers. DSAMind's audit went from 1 real error buried in 12 false positives to 16 real errors + 6 real warnings — 5 of which independently match DSAMind's own hand-audited mechanization backlog.constitution initis now safe to re-run on an existing consumer (cli/src/scaffold.ts): fixed a case-sensitive governance-map detection that would have duplicated DSAMind's custom map, and a blanket.gitignore .constitution/rule that silently shadowed the ops-plane's own nested ignore rules (events.jsonl/proposals were meant to stay committed).LEDGER-SYNCshipped. Ratified by Chinmay 2026-07-05;constitution.lock.jsonre-accepted to close the F-IV drift the amendment opened.cli/package.json, self-hostedversionSync).Test plan
cd cli && npm run build— clean stricttsccd cli && npm test— 23/23 passingconstitution auditon this repo — 0 findingsconstitution firewall— clean, lock accepted by Chinmay 2026-07-05initagainst a full copy of DSAMind — CONSTITUTION.md/AGENTS.md byte-identical before/after, only the two skills that actually changed upstream refreshedevents.jsonlstageable post-init, vendored templates/process still ignored🤖 Generated with Claude Code