adopt the prompt-render pipeline: swarm-policy.sh + prompt-enrichments/ so worker prompts derive from declared policy (judgement-call-prompts-test red since pin 343d26f) #857
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#857
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found at the #715 pin bump (FACTORY_REF 343d26f, 2026-08-25)
The factory's prompt-render pipeline (dev-factory #1/#14:
prompts/*.mdskeletons +{{ENRICH:<slot>}}splices +{{HANDOFF_RULES}}generated fromswarm-policy.sh'sHUMAN_LABELS) is now vendored in, but this repo has never adopted it: there is no.sandcastle/swarm-policy.shand no.sandcastle/prompt-enrichments/, soonboard.sh render-promptsrefuses (heal-prompt.md needs {{ENRICH:ops-context}}) and the live worker prompts (.sandcastle/prompt.md,heal-prompt.md,session-runner-prompt.md,rehearsal-*-prompt.md) stay hand-maintained.The vendored
tests/judgement-call-prompts-test.shnames the cost: the hand-maintained prompts' blocked-path routing has drifted from the policy-derived contract ("the blocked path must route its human label by an explicit one-way-door trigger"). This is exactly the drift the pipeline exists to retire — Ben's 2026-08-22 ruling (recorded in prompt-render-lib.sh): the human labels are declared ONCE inswarm-policy.shand the routing prose is derived, never hand-maintained beside it.What to do
.sandcastle/swarm-policy.shdeclaring this repo's actual policy (LANDING=push, SESSION_RUNNER=on, and the realHUMAN_LABELSset:ready-for-human,ready-for-session, … with their triggers — readpolicy-lib.shfor the schema; note the defaults'agent-blocked/needs-infoare NOT this repo's labels).prompt-enrichments/<slot>.mdfor every{{ENRICH:…}}slot the skeletons reference, carrying the idss-specific prose the current hand-maintained prompts hold.onboard.sh render-prompts .sandcastleand diff the rendered output against the current prompts — the diff IS the review; no behavioural drift beyond the derived hand-off section without a named reason.tests/judgement-call-prompts-test.shgreen is the door-stays-shut proof.Routing:
ready-for-session, notready-for-agent— every file here is under.sandcastle/(protected path; workers must not edit the machinery that runs them), and the rendered prompts are live text handed to every future worker.Ruled by agent under ADR 0174 — veto anytime
Three rulings this ticket needed, all two-way doors (each is one line in a committed file, revertible by a later commit, and provable by
tests/judgement-call-prompts-test.sh+tests/policy-lib-test.sh).1. The ticket's premise about the label set is wrong, and the defaults are right. The ticket says "note the defaults'
agent-blocked/needs-infoare NOT this repo's labels". They are:agent-blockedid 48,needs-infoid 35 (GET $FORGEJO_API/labels);docs/agents/triage-labels.md's canonical table;session-runner.shescalates two unadvanced attempts toagent-blocked,landing-lib.shparks a red PR there,close-report.shnames it after two refused closes, andrun-triage.sh's/triageprompt namesneeds-infofor a reporter-supplies-info block.So
HUMAN_LABELS="ready-for-human:one-way-door agent-blocked:cannot-proceed needs-info:missing-context"— declared explicitly rather than inherited, which is the point of the file.2.
ready-for-sessionis deliberately NOT inHUMAN_LABELS, despite the ticket asking for it.HUMAN_LABELSis the human loop-in state machine, and the trigger vocabulary is fixed and closed (one-way-door,cannot-proceed,missing-context,product-decision—policy-lib.shfails loud on anything else).ready-for-sessionis not a hand-off to a human at all, and there is no key in that vocabulary that separates it fromagent-blocked: giving itcannot-proceedwould render two bullets with byte-identical guidance under an instruction that says "add the ONE hand-off label below whose trigger matches why you stopped" — ambiguity manufactured in the exact place the pipeline exists to remove it. Widening the vocabulary means editingpolicy-lib.sh, a vendored factory file, which is a fork, not an adoption.Its routing is already precise where it lives: rule 9 of
prompt-enrichments/rules.mdtells a worker to FILE aready-for-sessionissue for a machinery change rather than park its own ticket there. Cost of being wrong: one line inswarm-policy.shand a re-render.3.
TWO_WAY_DOOR_DOC=docs/adr/0174-two-way-door-rulings-default-to-the-agent.mdis declared, not left empty.run-triage.shsplices this into its headless/triageprompt; with it empty the triage agent was being told "this repo declares no local record of it" whiledocs/adr/0174-*.mdsat right there. The test's check (d) proves the declared path resolves in this repo.Close report — #857 done
Commit
67b7a5ece9bebd1fe87a8974c4b259628e180da1, reachable fromorigin/main.What landed
.sandcastle/swarm-policy.sh.sandcastle/prompt-enrichments/*.md{{ENRICH:<slot>}}files.sandcastle/prompt.md,session-runner-prompt.md,rehearsal-heal-prompt.md,rehearsal-report-prompt.md.sandcastle/heal-prompt.mdSTATUS.mdPolicy declared:
LANDING=push,MERGE_AUTHORITY=human,SESSION_RUNNER=on,PROTECTED_PATHS=".sandcastle .forgejo",HUMAN_LABELS="ready-for-human:one-way-door agent-blocked:cannot-proceed needs-info:missing-context",TWO_WAY_DOOR_DOC=docs/adr/0174-two-way-door-rulings-default-to-the-agent.md. Reasoning for each is in the ruling comment above.The render, and the diff that IS the review
bash onboarding/onboard.sh render-prompts .sandcastle(run from aMatou/dev-factorycheckout at this repo's exact pin29c2c946—onboard.shis factory-only and not vendored;check-harness-drift.shcalls the sameprompt_render_one):Three behavioural deltas, each with its reason:
prompt.md"When you are blocked" is now GENERATED fromHUMAN_LABELS. The hand-maintained prose hardcoded THIS repo's numeric label ids (ready-for-agent=36,agent-blocked=48) — wrong in every repo that copied the file, and precisely what the test bans. The derived text resolves every id by NAME at run time and lists a third destination the hand-maintained text never offered:needs-info, with its trigger and its one sentence of guidance. The old parenthetical ("a two-way-door call should already have been ruled under rule 6, not parked here") survives as the derived block's own line.rehearsal-report-prompt.md/rehearsal-heal-prompt.mdtake the pinned skeletons' restructure. The evidence ANCHOR now names only records the harness itself reads (artifacts/legs.json,artifacts/verdict.json);artifacts/journey.json— which no harness script has ever read or written — moves into this repo's ownrehearsal-drive-intro.md, where per-repo evidence belongs (factory #56). The live box is described by role rather than as a droplet, and the reporter no longer asserts "once #414 lands" as a fact in the skeleton (factory #51).session-runner-prompt.mddrops the literal(#538)and generalises the SSH-door clause — a skeleton may not name a tracker number.Nothing else moved:
heal-prompt.mdrendered byte-identical to the file it replaced, which is the cleanest possible evidence that the ten enrichments carry the hand-maintained prose faithfully.Proof
bash .sandcastle/tests/judgement-call-prompts-test.shbash .sandcastle/tests/policy-lib-test.shbash .sandcastle/tests/prompt-render-lib-test.shpolicy_validateagainst the live trackerHUMAN_LABELSname is minted hereonboarding/tests/fixtures/idss-prompts/Matou/idssat this pincheck-harness-drift.shstale-render advisory.sandcastle/tests/*.shsuite (70 files)box-vocabulary-test.shandrehearsal-droplet-test.shred BEFORE this change too (verified by stashing)One regression, filed not hidden
tests/run-swarm-stages-test.shwent green → red. It runs the realrun-swarm.shagainst the real.sandcastle/and asserts the absent-policy log branch (policy: defaults (LANDING=push MERGE_AUTHORITY=human)); with aswarm-policy.shpresent the gate correctly logs the other branch. That is a vendored factory test asserting a consumer-owned identity-layer fact — it reds in ANY consumer that completes onboarding step 4 — so the fix belongs upstream, not as a fork here:Matou/dev-factory#101. Not a CI gate in this repo (scripts/seam-smoke.shrunscheck-harness-drift.shonly); idss picks the fix up at its nextFACTORY_REFbump.Also filed
#867 — pre-existing and unrelated to this ticket, found while running the suite: #865's sticky-account change edited vendored
limit-lib.sh+tests/limit-lib-test.shhere without landing them inMatou/dev-factory, socheck-harness-drift.shis RED. Reproduced on2bda2096with this ticket's changes stashed. It also blocks the pin bump that would pick updev-factory#101, so the two want doing together.Two-way doors only
No one-way door was touched: no credential, no security-posture change, no member-facing accept, no data destroyed, no spend. Every file here is committed text, revertible by
git revert 67b7a5ec.