Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
5.7 KiB
A parallel commit_gates config for artifact preconditions in cmdCommit
Source: #3353 Decision: wontfix — closed as filed; the mechanism already exists in the capability gate system Date: 2026-08-11
Proposal summary
#3353 asked for a declarative pre-commit gate evaluated inside cmdCommit
(src/commands.cts): a commit_gates array in .planning/config.json that matches files in the
commit's scope, runs a shell command against each match, blocks the commit on non-zero (before
staging, so a refusal leaves the index untouched), and is overridable via a CLI flag. The
motivation was concrete and real — a workflow can assert "do not commit while X holds" about an
artifact (e.g. an ungrounded REVIEWS.md), be entirely right, and watch the artifact get
committed anyway because the check lives only in the prompt and a model can report a stale or
skipped verdict as fresh.
This entry denies the commit_gates config as filed. It does not deny the underlying need.
Why MSD does not own this (as filed)
- The exact mechanism already exists in the capability system. Since
#2008 / ADR-2008, a capability can declare a
gatesentry withcheck.predicate.kind: "command-exit-zero"— "run your command, block the loop on non-zero" — at a chosen loop point, withblockingandonErrorsemantics and awhenconfig-key gate. Seedocs/how-to/command-exit-zero-gate.mdanddocs/reference/gate-predicates.md. The proposedcommit_gatesshape (command+block_on: "nonzero"+ match + override) is the same mechanism in a different config. - A second config would fragment the architecture.
commit_gatesin.planning/config.json, fired fromcmdCommit, would coexist with capabilitygatesincapability.json, fired from the loop-resolver — two config locations, two override paths, two evaluators, and ambiguity about which fires when. MSD deliberately owns one gate system; the capability gate is it. - The right route is an extension of the existing system, not a parallel one. There is no
commit:preloop point today. The 12 canonical loop points (src/loop-resolver.ctsCANONICAL_POINTS: the:pre/:postpairs fordiscuss,plan,verify, andship, plus the fourexecutepoints —execute:pre,execute:wave:pre,execute:wave:post,execute:post) do not include commit. The loop-point vocabulary is closed but additive-only (docs/reference/capability-manifest.md), so adding acommit:prepoint — and wiringcmdCommitto invoke the loop-resolver there — lets any capability declare the existingcommand-exit-zerogate at commit time. That extends the system you have rather than building a second one beside it. - EoS (ADR-1239) is unaffected either way.
cmdCommitis engine-internal; a pre-commit gate touches none of the six host-integration interface points (command/dispatch/model/hooks/state/ artifact are about host↔engine, not git internals). This is recorded only to head off the misread that this decision is an EoS constraint — it is a capability-architecture constraint.
What this does NOT cover
This entry denies a commit_gates config separate from the capability gate system. It does
not deny, and must never be cited against:
- Adding a
commit:pre(and/orcommit:post) loop extension point so capabilities can declarecommand-exit-zerogates at commit time. This is the route the filing should take, and it is welcome as a capability-system proposal (new loop point + ADR-level schema note). - The companion defect. #3352 — reviewer
evidence is never verified, raw per-lane output is
rm -rf'd, and an ungroundedREVIEWS.mdfeeds/msd-plan-phase --reviews— is confirmed-bug on its own merits and stays open. That a full fix will likely use a commit-point gate does not make thecommit_gatesconfig the right home for the gate mechanism. - New
check.predicatekinds added to the existing capability gate evaluator — a separate, valid extension path. - Hardening
cmdCommit's existing git-level checks (gitignore, branching strategy, staging failures) — those are unrelated to declarative artifact preconditions.
Re-open criteria
- A need is shown for a commit-time gate that the capability loop-point model genuinely cannot
express — e.g. a precondition that must fire when no capability is installed and that cannot
itself be a loop point. This is narrow: the
commit:prepoint +command-exit-zeropredicate covers the stated case (run a checker on a matched artifact, block on non-zero), so re-opening requires the loop-point route to have been tried and found structurally insufficient.
Related
- #3352 — companion defect (confirmed-bug):
ungrounded
REVIEWS.mdis never verified then deleted - #2008 / ADR-2008 — the
command-exit-zerocapability gate this decision points to docs/how-to/command-exit-zero-gate.md— authoring recipedocs/reference/gate-predicates.md— gate predicate referencedocs/reference/capability-manifest.md— the 12 closed/additive-only loop points- ADR-1239 — EoS (unaffected)