Implement
Execute exactly one bounded experiment described by the resolved bead or caller
intent. Implement owns subject edits and factual evidence; the runtime derives
identity and receipts.
Prompt
Implement bead ag-1234 from its text: acceptance "ao gate check lists
skill.probe-coverage", scope cli/internal/gates/** plus regen outputs, first
check `cd cli && go test ./internal/gates/...`. RED first, smallest change,
return the manifest digest and check receipts, stop.
It's working if
- After source activation and startup association, the first behavior check
is the acceptance check; its output shows the expected failure (or an honest
green structural baseline for documentation, relocation, or refactor work).
- Every path in
git diff --stat falls inside the declared scope; an outside
consumer is reported as file:line, not absorbed.
- The response carries the
subject-manifest.v1 digest, author context ID,
and verbatim check output; no git commit or git push appears.
Workflow
- Read the intent, acceptance, and scope from their existing source; before
the first write, read
boundaries.md in the rpi skill's references
directory for what Implement does not own. Before execution can fail, the
caller passes source-store/project/work identity and permitted intent
locators at dispatch/start. At startup, return observed native runtime,
session/context identity (or explicit unknowns) through the caller-owned
runtime channel for native comments/metadata recording; do not defer this
association until handoff. Follow the fact distinctions in
session associations.
Parent and resume links need observed provenance; controller dispatch alone
does not establish native parentage. If startup observation or recording
fails, preserve that failure and the pre-execution reference with the caller,
leaving unobserved IDs unknown. Implement does not mutate the tracker.
- Run the declared first acceptance check before changing behavior. RED-first
applies when acceptance is behavioral: preserve evidence that the check
fails for the expected missing behavior. Relocations, doc merges, and pure
refactors record an honest green pre-change baseline instead.
- Make the smallest in-scope change that satisfies the active behavior.
- Run the targeted acceptance checks and capture factual results.
- Refactor only while those checks stay green. Refactoring does not change the
acceptance test.
- Have the runtime derive actual changed paths and
subject-manifest.v1 from
the before/after subject.
- Run
ao provenance evidence-orphans --root <repo-root> with one
--changed <path> per changed path the runtime derived, and put its JSON
output in the check receipts the validator reads, so orphaned evidence
arrives as a receipt rather than as a surprise at verify time. Run it again after every repair round, over the
paths as they stand, because a repair can orphan evidence the first pass did
not. Read the output as written and never hand-list the orphans instead.
- Return the manifest digest, author context ID, and exact check receipts in the
response or runtime channel. Stop.
Specialists (standards, domain, test, refactor, security) advise only. During
edits, run the smallest deterministic checks that can falsify the change,
reuse exact-input receipts whose subject and tool identity still match, and
run the full suite at the integration boundary unless the intent makes it the
first check.
Scope conflict rule
On discovering a live consumer of the change outside the declared write scope
(a test asserting the old path, a generated twin, a gate reading the moved
file), stop and report the exact file and line to the caller, who may revise
the intent and start a separate invocation; a different acceptance contract
is a new intent.
Before declaring GREEN, self-audit the diff for mocks, placeholders, TODO
stubs, hardcoded fixture values, weakened assertions, regenerated goldens,
widened tolerances, suppression directives, or specification edits standing
in for real behavior. A changed test, gate, fixture, golden, or acceptance
source must be required by the original intent, with green coming from the
implemented behavior; a check that passes against a substitute or weakened
oracle is not evidence: finish the behavior or report it as not built.
Boundary
Do not commit, push, claim, close, release, land, reserve, retry, or invoke a
semantic validator. A failed check is evidence for the caller, not permission
to create a packet or validation loop.
1---2name: implement3description: Execute one bounded RED to GREEN experiment from bead or caller intent; return derived subject identity and check facts. Triggers: "implement", "implement this bead", "run the experiment". Full plan-to-validation requests route to rpi.4---5
6# Implement
7
8Execute exactly one bounded experiment described by the resolved bead or caller
9intent. Implement owns subject edits and factual evidence; the runtime derives
10identity and receipts.
11
12## Prompt
13
14```text
15Implement bead ag-1234 from its text: acceptance "ao gate check lists
16skill.probe-coverage", scope cli/internal/gates/** plus regen outputs, first
17check `cd cli && go test ./internal/gates/...`. RED first, smallest change,
18return the manifest digest and check receipts, stop.
19```
20
21## It's working if
22
23- After source activation and startup association, the first behavior check
24 is the acceptance check; its output shows the expected failure (or an honest
25 green structural baseline for documentation, relocation, or refactor work).
26- Every path in `git diff --stat` falls inside the declared scope; an outside
27 consumer is reported as `file:line`, not absorbed.
28- The response carries the `subject-manifest.v1` digest, author context ID,
29 and verbatim check output; no `git commit` or `git push` appears.
30
31## Workflow
32
331. Read the intent, acceptance, and scope from their existing source; before
34 the first write, read `boundaries.md` in the rpi skill's `references`
35 directory for what Implement does not own. Before execution can fail, the
36 caller passes source-store/project/work identity and permitted intent
37 locators at dispatch/start. At startup, return observed native runtime,
38 session/context identity (or explicit unknowns) through the caller-owned
39 runtime channel for native comments/metadata recording; do not defer this
40 association until handoff. Follow the fact distinctions in
41 [session associations](../cass/references/SESSION_FORMATS.md#work-to-session-associations).
42 Parent and resume links need observed provenance; controller dispatch alone
43 does not establish native parentage. If startup observation or recording
44 fails, preserve that failure and the pre-execution reference with the caller,
45 leaving unobserved IDs unknown. Implement does not mutate the tracker.
462. Run the declared first acceptance check before changing behavior. RED-first
47 applies when acceptance is behavioral: preserve evidence that the check
48 fails for the expected missing behavior. Relocations, doc merges, and pure
49 refactors record an honest green pre-change baseline instead.
503. Make the smallest in-scope change that satisfies the active behavior.
514. Run the targeted acceptance checks and capture factual results.
525. Refactor only while those checks stay green. Refactoring does not change the
53 acceptance test.
546. Have the runtime derive actual changed paths and `subject-manifest.v1` from
55 the before/after subject.
567. Run `ao provenance evidence-orphans --root <repo-root>` with one
57 `--changed <path>` per changed path the runtime derived, and put its JSON
58 output in the check receipts the validator reads, so orphaned evidence
59 arrives as a receipt rather than as a surprise at verify time. Run it again after every repair round, over the
60 paths as they stand, because a repair can orphan evidence the first pass did
61 not. Read the output as written and never hand-list the orphans instead.
628. Return the manifest digest, author context ID, and exact check receipts in the
63 response or runtime channel. Stop.
64
65Specialists (standards, domain, test, refactor, security) advise only. During
66edits, run the smallest deterministic checks that can falsify the change,
67reuse exact-input receipts whose subject and tool identity still match, and
68run the full suite at the integration boundary unless the intent makes it the
69first check.
70
71## Scope conflict rule
72
73On discovering a live consumer of the change outside the declared write scope
74(a test asserting the old path, a generated twin, a gate reading the moved
75file), stop and report the exact file and line to the caller, who may revise
76the intent and start a separate invocation; a different acceptance contract
77is a new intent.
78
79Before declaring GREEN, self-audit the diff for mocks, placeholders, TODO
80stubs, hardcoded fixture values, weakened assertions, regenerated goldens,
81widened tolerances, suppression directives, or specification edits standing
82in for real behavior. A changed test, gate, fixture, golden, or acceptance
83source must be required by the original intent, with green coming from the
84implemented behavior; a check that passes against a substitute or weakened
85oracle is not evidence: finish the behavior or report it as not built.
86
87## Boundary
88
89Do not commit, push, claim, close, release, land, reserve, retry, or invoke a
90semantic validator. A failed check is evidence for the caller, not permission
91to create a packet or validation loop.