Kit v2.5 — contracts stay local, CI checks only what it owns - #21
Merged
Conversation
v2.3 pushed enforcement as far as it would go — CI re-running a contract's VERIFY block, contracts tracked so CI could read them. That trade is reversed here. The contract is working state and the review gate is a person. - .gitignore: blanket ignore for skills/.harness/ restored (the /.harness/ root anchoring fix from v2.3 is kept — that was a separate, correct bug). Eight tracked contracts come out of the index; the files stay on disk. - .github/workflows/harness.yml: no PR-body read, no contract execution. Running a VERIFY block authored in a PR body would violate the observed-content-is-data rule the kit ships. A closing "What this run did not cover" step names what only the human reviewer can confirm. - verify-harness.sh: check 5 finds rules in rules/, .cursor/rules/ or .agents/rules/ and reports which — it previously looked only at the kit's own layout and skipped in every adopting repo. Checks 6-8 skip with a stated reason rather than silently. - setup-harness-kit.sh: warns when AGENTS.md is absent, naming the consequence and the fix, instead of no-op'ing in silence. - sprint-contract skill and form: the PR body carries the contract and the local gate output, for the reviewer. No tool attribution in a PR title, body or commit message. - rules/no-stage-harness-files.mdc: a commit's author and committer are the human, never a tool identity, and no attribution trailer. Rules budget stays at six. - harness-review REVIEW.md: step 0 reads the contract from the PR body. - Version 2.5.0, v2.5 changelog, BOOTSTRAP.md regenerated, KIT-ADOPT-001 in the ledger at PENDING_REVIEW. Gate: 10/10, 0 skipped. Fresh-repo adoption re-run: defects 2 and 3 fixed.
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.
Kit v2.5 — contracts stay local, CI checks only what it owns
Reverses the v2.3 trade. v2.3 tracked contracts so CI could grade a PR against one, and had CI
re-run the contract's VERIFY block. Both are removed here.
skills/.harness/is working state,and the review gate is a person reading this PR body, not a machine reading the repo.
Also fixes the two adoption defects found when v2.4 was added to a fresh repo for real.
What changed
.gitignoreskills/.harness/ignore restored; the/.harness/root-anchoring fix from v2.3 kept. Eight contracts out of the index, still on disk.github/workflows/harness.ymlpull_request.bodyread, no contract execution. Ends with a What this run did not cover step (if: always())scripts/verify-harness.shrules/→.cursor/rules/→.agents/rules/and reports which. Checks 6–8 skip with a stated reasonscripts/setup-harness-kit.shAGENTS.mdis absent — names the consequence and the fixskills/sprint-contract/rules/no-stage-harness-files.mdcskills/harness-review/templates/REVIEW.mdBOOTSTRAP.mdregenerated,KIT-ADOPT-001in the ledgerWhat this costs, stated plainly
A careless or determined agent can paste gate output that does not match what it ran. That is now
caught by a person reading this PR, not by a machine. In exchange, an entire class of CI attack
surface — executing text authored in a pull request — is gone.
Local gate output (verbatim)
Fresh-repo adoption, re-run against this branch (verbatim)
No
AGENTS.mdpresent — defect 2:With
AGENTS.mdpresent, re-run →harness-kit: assembled rules into AGENTS.md(block at lines5–153); a third run leaves exactly one marker pair.
Gate run from the consumer root — defect 3:
v2.4 printed
SKIP no rules directoryhere.Reviewer, please confirm
git diff --stat.git log --format='%an|%cn'on this branch shows a person in both fields.CI does not check 1–4. That is the point of this change.
SPRINT CONTRACT — KIT-ADOPT-001: contracts stay local, CI checks only what it owns, adoption defects
Work-type profile (required)
ops-docsLanguages / toolchain: POSIX sh, GitHub Actions YAML, Markdown. No application code.
The correction this sprint applies
v2.3 pushed enforcement as far as it would go: CI re-running the contract's VERIFY block, contracts
tracked so CI could read them, the machine as the unforgeable layer. David has pulled that back.
The human review is the control. The machine handles what is cheap and mechanical, and says plainly
what it did not check.
Three consequences, and the third is the important one:
authored in a PR body. The threat model that came with that idea disappears with it.
runs them before pushing; their output goes in the PR body; a human reads it. They are not weaker
because CI does not repeat them — they are differently placed.
What this costs, stated honestly: a determined or careless agent can paste gate output that does
not match what it ran. That is now caught by a person reading the PR, not by a machine. For a team this
size that is a reasonable trade, and it removes an entire class of CI attack surface.
Decisions
STATE.mdinboxContext — the three adoption defects
Adding v2.4 as a submodule to a fresh repo and running setup, for real:
skills/.harness/ignore into the consumergit check-ignorereported a consumer contract ignored. Now correct — the defect was the kit disagreeing with itself, and the decision above resolves itscripts/setup-harness-kit.sh:119guards on[ -f AGENTS.md ]. A new repo has none, so nothing assembles and nothing warns.harness-onboardcreates it afterwards, so the block never appears unless setup is re-runscripts/verify-harness.sh:112tests[ -d rules ]. Rules live inharness-kit/rules/, symlinked to.cursor/rules/. PrintedSKIP no rules directoryShared cause: both were written against harness-kit's own layout, where everything sits at the root.
Scope — WILL do
A — Contracts return to local working state
.gitignore— remove the!skills/.harness/contractsnegations; restore the blanket ignore. Keepthe
/.harness/anchoring fix from v2.3 — that was a separate, correct bug fix.git rm --cachedthe eight tracked contracts. Files stay on disk.verify-harness.sh— checks 6–8 skip with(contract is local — run this before pushing; a human reviews the output), not a bare skip.B — CI does less, and says so
.github/workflows/harness.yml— remove the contract VERIFY step. CI runsverify-harness.shand nothing else.the reviewer confirms them from the PR body.
C — The PR body carries the contract, for a person
sprint-contractskill and form — the PR body includes the contract and the local gate output.Reason stated: a reviewer cannot see a gitignored file, and
harness-review§0 grades against it.7b. No tool attribution in a PR title, body or commit message — no "generated with", "made with/by",
no assistant or editor name, no
Co-Authored-Bytrailer. The PR describes the change; who or whattyped it is not part of the record. Stated in the skill and the form.
Placement, per
rules/README.md: this applies only while writing a PR body, so by the kit's ownordering it belongs in the skill that owns that task, not in a rule. The rules budget is six and a
seventh would have to displace one — this does not earn that.
7c. Commit authorship — extend the existing
no-stage-harness-filesrule, which already governsstaging and committing, with: when a commit is made, its author and committer are the human.
Never a tool, assistant, editor or bot identity, and no attribution trailer in the body. Unlike 7b
this is not task-scoped — it holds on every commit in any context — so it belongs in a rule, and
extending an existing one keeps the budget at six.
Verified before writing: across all branches, author and committer are already a person on every
commit. This records the convention rather than changing behaviour.
8.
harness-review§0 — the reviewer reads the contract from the PR body and confirms the pastedgate output. Machine confirmation is explicitly not expected.
D — Adoption defects
setup-harness-kit.sh— whenAGENTS.mdis absent, warn loudly: name the consequence (agentswithout a rules feature receive no rules) and the fix (
harness-onboard, then re-run setup).verify-harness.shcheck 5 — look for rules inrules/, else.cursor/rules/, else the merge dir;report which was found. Skip only when none exists.
E — Version + ledger
FEATURES.jsonentry, bootstrap regenerated.Scope — will NOT do
Branch
master@204d65c(v2.4)feat/kit-adopt-001-local-contractsRED (recorded before EXECUTE)
test "$(git ls-tree -r --name-only origin/master | grep -c '\.harness/contracts')" -eq 0; grep -q 'Contract VERIFY block' .github/workflows/harness.yml1contains the
Contract VERIFY blockstep this sprint removes. Setup still guards assembly on[ -f AGENTS.md ](setup-harness-kit.sh:119); check 5 still tests[ -d rules ](
verify-harness.sh:112).Behavioural RED, demonstrated: v2.4 added as a submodule to a fresh repo and setup run. 8 skills and
6 rules linked; no
AGENTS.mdrules block, silently; consumer contract reported ignored; gateprinted
SKIP no rules directoryand 8 skips.BASELINE —
./scripts/verify-harness.shonmaster@204d65c: exit 0, 10 checks.GREEN (recorded 2026-08-29, after EXECUTE)
Command:
git ls-files | grep -c '\.harness/contracts'→ 0.ls skills/.harness/contracts/*.md | wc -l→ 9 (the eight plus this contract).git check-ignore -vattributes the ignore to.gitignore:23 skills/.harness/.Workflow: no
pull_request.body, no contract execution. The only occurrence of "VERIFY block" is inside the did-not-cover notice naming what CI deliberately skips.CI honesty:
.github/workflows/harness.yml:25—What this run did not cover,if: always().Fresh-repo adoption (re-run against this branch, throwaway repo, no
AGENTS.md):Then with
AGENTS.mdpresent, re-run →harness-kit: assembled rules into AGENTS.md; block atlines 5–153; a third run leaves exactly one marker pair (idempotent). Defect 2 fixed.
Gate from the consumer root:
PASS rules: frontmatter valid, will load (from .cursor/rules)—v2.4 printed
SKIP no rules directory. Defect 3 fixed. Checks 6–8 there readSKIP contract impact map (contract is local — run this before pushing; a human reviews the output).Gate here:
./scripts/verify-harness.sh→ exit 0, 10 PASS, 0 skipped.Ledger verify field for
KIT-ADOPT-001: exit 0.Found by the gate during this sprint: the eight
git rm --cacheddeletions were absent from theimpact map. The contract was amended to declare them — the check was not relaxed. Related weakness,
logged as a candidate rather than fixed here: check 7 diffs
base...HEAD, so before the work iscommitted it compares HEAD to itself and prints a vacuous PASS. By the kit's own v2.4 reasoning
a check that cannot see anything should say so, not pass.
Rules count:
ls rules/*.mdc | wc -l→ 6. Budget intact.Version:
2.5.0inscripts/build-bootstrap.sh,README.md(Kit v2.5), and regeneratedBOOTSTRAP.md(4 occurrences).FEATURES.jsonparses.Impact map
.gitignore/.harness/anchorscripts/verify-harness.shscripts/setup-harness-kit.shAGENTS.mdis absent.github/workflows/harness.ymlskills/sprint-contract/templates/SPRINT_CONTRACT.mdskills/harness-review/templates/REVIEW.mdskills/sprint-contract/SKILL.mdrules/no-stage-harness-files.mdcscripts/build-bootstrap.shBOOTSTRAP.mdFEATURES.jsonKIT-ADOPT-001README.mdskills/.harness/contracts/KIT-V13-001.mdskills/.harness/contracts/KIT-QUALITY-001.mdskills/.harness/contracts/KIT-AUDIT-001.mdskills/.harness/contracts/KIT-SKILLS-001.mdskills/.harness/contracts/KIT-ERD-001.mdskills/.harness/contracts/KIT-RULES-001.mdskills/.harness/contracts/KIT-GATES-001.mdskills/.harness/contracts/KIT-GATES-002.mdSuccess criteria
git ls-files | grep -c '.harness/contracts'→ 0; all eight files still on disk.pull_request.bodyand no contract execution.AGENTS.mdis absent; re-running afterharness-onboardassembles the block. Demonstrated..cursor/rulesin a consumer layout. Demonstrated.harness-review§0 instructs reading the contract from the PR body.7b. The
sprint-contractskill and form forbid tool attribution in PR titles, bodies and commit messages;harness-reviewtreats it as a finding.7c.
no-stage-harness-filesstates that a commit's author and committer are the human, never a tool identity. Rules count stays at six.FEATURES.jsonparses; diff confined to the impact map.Quality gates (tick or N/A)
ops-docs)Edge cases / failure modes
.cursor/Threat model
SKIP — and that is the point. Removing the PR-body read removes the only untrusted input the kit's
CI ever handled.
Blocking questions
None. Both open questions from the previous draft are closed by the decision: CI does not read PR
bodies, so there is nothing to execute and nothing to guard. The eight contracts are untracked going
forward rather than removed from history — they are process documents, already public in this repo.
VERIFY (run after EXECUTE)
FEATURES.json entry
{ "id": "KIT-ADOPT-001", "name": "Contracts stay local; CI checks only what it owns; fix the three adoption defects", "priority": 1, "verify": "test $(git ls-files | grep -c '.harness/contracts') -eq 0 && ! grep -q 'pull_request.body' .github/workflows/harness.yml && grep -q 'cursor/rules' scripts/verify-harness.sh && ./scripts/verify-harness.sh && grep -q '2.5.0' BOOTSTRAP.md && python3 -m json.tool FEATURES.json >/dev/null", "status": "FAIL", "notes": "Contract: skills/.harness/contracts/KIT-ADOPT-001.md; profile: ops-docs; reverses KIT-GATES-001 Q1 and narrows CI to repo-owned checks; blocks first real adoption" }Criteria block