Repository navigation
docs(harness): single-source policy out of the harness configs - #361
Conversation
Harness config lives only at the umbrella root (rule 8), but the surfaces injected into every session restated policy AGENTS.md and the skills already own — a second implementation, which drifts (R3). Measured drift: the opencode validator def ran `charly task verify` on every PR head, and the pi system prompt told the agent to `gh pr merge --auto --squash`, which AGENTS.md forbids. - .opencode/agent/pr-validator.md: bind, do not restate — point at AGENTS.md and the owning skills; keep the sandbox/approval binding and PASS/BLOCK. - .opencode/instructions.md: drop the R0 restatement, the agent-monitor rotate rules, the rule-11 ledger cadence and the duplicated verb/footer grammar. - .pi/APPEND_SYSTEM.md: drop the delegation-discipline, unfinished-work and goal-completion restatements (with the forbidden gh pr merge) and the per-PR validator mandate; keep every tool binding. - AGENTS.md R7 + the attribution table: the gate is the change class's gate — `charly task verify` where the diff touches a submodule, gitlink or pin. Claude-Session: https://claude.ai/code/session_01JkG5NBEhesW5NrJ4nvEmvT
|
STATUS — operator directive recorded (the T4 sign-off surface) This PR edits a validator definition ( The directive is the operator's own, verbatim from the umbrella session:
Scope of the narrowing — nothing is weakened to nothing: Head Agent: |
Review — PASSHead SHA: Security screen: PASS — T4 applies (edits a validator definition + Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
docs(harness): single-source policy out of the harness configs
Summary
Harness config lives only at the umbrella root (rule 8, #317). Three of those surfaces are injected into every session, and they restated policy that
AGENTS.mdand the skills already own — a second implementation, which drifts silently (R3). This PR removes the restatements and keeps the harness mechanics.Measured drift (why this is a defect, not tidiness):
.opencode/agent/pr-validator.mdtold the validator to run./charly/bin/charly task verifyon every PR head — docs-only diffs included — plus its own copy of the body checklist and the attribution rule. The canonical validator rulebook carries no such mandate, so the copy kept firing on its own schedule..pi/APPEND_SYSTEM.mdtold the agent to arm auto-merge withgh pr merge --auto --squash.AGENTS.mdsays the opposite: thecharly/pr-validatorgate arms native auto-merge inline on its own PASS, and "No agent runsgh pr merge".The governing doctrine is already written — the
agentsskill, "The harness-adapter CONFIG mechanism": harness adaptation lives in the per-harness config; "The project rulebook isAGENTS.md, the single harness-neutral rulebook carrying R0–R10; this skill never restates it, only points to it."What (4 files,
+50 −109).opencode/agent/pr-validator.mdAGENTS.md,/charly-internals:git-workflowand/charly-check:check.opencode/instructions.md## You are charlysection, the R0 restatement, the agent-monitor rotate/take-over rules, the rule-11 ledger cadence, the duplicated verb-set/footer grammar.pi/APPEND_SYSTEM.md# Delegation discipline,# Don't pile up unfinished work,# Goal completion discipline(with the forbiddengh pr mergeline), the per-PR validator mandateplan/discipline, context economy, tool primacy, thegh_pr_statusandcharly_statustool contractsAGENTS.mdtask verify, and the attribution row that encoded itcharly task verifystays the gate wherever the diff touches a submodule, a gitlink or a pinWhere each removed rule lives now
AGENTS.mdR0AGENTS.md, "Monitor — artifact and cadence, never a counter"AGENTS.mdrule 11 + theagentsskill's ledger how-toAGENTS.md, "Agent identity & comment coordination"marketplace/check/skills/check/references/beds-and-r10.md), row "Harness project configuration"AGENTS.md, "Subagent lifecycle" + "Responsibilities — main session vs subagent" + rule 11AGENTS.mdline 11 — "is written inSOUL.md: read it first" — which every harness reads; the opencode copy was a duplicate, not the mechanism (per-session injection is #359)Pointers stay; restated rules go. A pointer to the rulebook is not a restatement — pi's
.pi/extensions/charly-gates.ts:61keeps its one-line identity pointer for exactly that reason.Operator directive — T4 class (this edits a validator definition and an attributed gate rule)
The pre-validator self-audit classes a validator-prompt or gate edit as T4 self-modifying-security, requiring maintainer-account sign-off. The directive here is the operator's own, verbatim from the umbrella session:
The rule is narrowed, not deleted:
charly task verifyremains R7's gate for every submodule / gitlink / pin diff (5 mentions survive inAGENTS.md, proven below). Recorded here in the body and as aSTATUScoordination comment on this PR.How tested
Head
40e1c33660b026d57e70109aee14fa1497eab256— the committed tree (R10), never an edited state. Session worktree.worktrees/harness-config-single-source/opencharly, branchfeat/harness-config-single-sourceoff freshorigin/main.1. The change class — the pin audit's inputs are untouched
Four Markdown files: no submodule path, no gitlink, no
.gitmodules, no script. By R7 (as amended here) that makesscripts/check-*.mjsthis class's gate, and the pin audit — whose inputs (charly.ymlsubmodule steps 1–3) this diff does not touch — adds nothing for it.2. The class's gate: all seven
check-*.mjsstepscharly task verifyruns, plus one morecharly.yml'sverifytask is the pin audit followed by exactly sevennode scripts/check-*.mjssteps (charly.ymllines 230–248). Running them directly is the same proof for this class, without the pin audit:check-opencode-coordis the eighth —verifydoes not run it, so the run above is a superset of the class's gate.3. The harness-config gate proves its own checks live
4. The removed text is gone, and the retained rule is retained
Both config surfaces drop to zero
task verifymentions;AGENTS.mddrops 6 to 5 (the attribution row's mention goes, R7's stays). The forbiddengh pr mergeline is gone.5. No committed check reads the three edited surfaces' content
Every hit is a comment or a doc row pointing at the measured opencode contract; none parses the file. No gate or plugin depends on the removed text.
6. The pointers that stay resolve
Rulebook compliance
The umbrella's own rulebook (rules 1–11), then R0–R10:
git diff --name-onlynames no submodule path, and no submodule's tracked checkout was touched.git -C) — N/A: no submodule git command was run.go.work) — N/A: no Go file changed and none added.feat/harness-config-single-sourcein.worktrees/harness-config-single-source/opencharly, branched off freshorigin/main; the umbrella root stayed read-only.distro-*and no charlybox/*gitlink touched.check-harness-config) passes.feat/harness-config-single-sourceto head40e1c33to verdict PENDING to the single next action (fix every finding in ONE commit); the operator's mid-turn correction that produced this change was reconciled as an ADDITION to that item, not a reset./charly-internals:git-workflow,/charly-internals:agents,/charly-internals:skills,/charly-internals:strict-policy) were loaded before the first edit; the branch and worktree predate the edits.charlyverb was bypassed or replaced; the proof uses the repo's committed gates. The pre-commit gate blocked an unparseable commit form untilgit commit -F <file>was used — the gate was complied with, not circumvented.task verifymandate survives intact in R7.git statusread before committing; PR-only landing, no direct push tomain, no force-push, no hook bypass.scripts/check-*.mjs; all eight pass on the final committed tree, and the harness-config gate's--self-testproves each of its checks live (sections 1–3 above).node, and their live layers SKIP visibly (LIVE_OPENCODEunset) rather than pass silently.40e1c33, never an edited state.Change classification
*.md(AGENTS.md; two opencode config-layer documents; one pi system-prompt document). No code, no script, no pin, no gitlink. The.pi/extensions/charly-gates.tsidentity pointer is deliberately not touched, so no TypeScript source changes.scripts/check-*.mjs— the seven stepscharly task verifyruns for this class, pluscheck-opencode-coord, pluscheck-harness-config.mjs --self-test, all on the committed tree40e1c33.charly task verify's pin audit is not this class's gate: the diff does not touch its inputs.documentation reviewed— the docs-only class, with no pin and no script changed. The gate evidence pasted above exceeds what the tier requires.Owning skills:
/charly-internals:agents(the harness-adapter CONFIG mechanism),/charly-internals:skills(where guidance belongs vs skill detail),/charly-internals:git-workflow.Related: #317 (the rule-8 reversal — config location), #360 (this content defect), #359 (inject
SOUL.mdper harness — filed, not worked here). Closes #360.Agent:
harness-config-single-source· sessionses_01JkG5NBEhesW5NrJ4nvEmvTAssisted-by: Claude Code DeepSeek V4.1 Flash (documentation reviewed)