ralphctl 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -29
- package/dist/{cli-LJZZGXAY.mjs → cli-FHPDHGP5.mjs} +2185 -1275
- package/dist/cli.mjs +1 -1
- package/dist/manifest.json +4 -3
- package/dist/prompts/_partials/approval-gate.md +19 -0
- package/dist/prompts/_partials/evaluator-grading-rules.md +25 -0
- package/dist/prompts/_partials/harness-context.md +2 -9
- package/dist/prompts/_partials/task-fields.md +4 -4
- package/dist/prompts/_partials/validation-checklist.md +3 -4
- package/dist/prompts/apply-feedback/template.md +8 -12
- package/dist/prompts/create-pr/template.md +0 -5
- package/dist/prompts/detect-scripts/template.md +38 -71
- package/dist/prompts/detect-skills/template.md +14 -19
- package/dist/prompts/distill-learnings/template.md +18 -16
- package/dist/prompts/evaluate/template.md +23 -50
- package/dist/prompts/evaluate-continuation/template.md +18 -38
- package/dist/prompts/ideate/template.md +13 -12
- package/dist/prompts/implement/template.md +29 -9
- package/dist/prompts/implement-continuation/template.md +5 -5
- package/dist/prompts/plan/template.md +21 -30
- package/dist/prompts/readiness/template.md +19 -16
- package/dist/prompts/refine/template.md +11 -14
- package/dist/prompts/reproduce/template.md +20 -9
- package/dist/prompts/select-candidate/template.md +7 -7
- package/package.json +8 -7
- package/dist/prompts/_partials/evaluation-checkpoint.md +0 -23
package/dist/cli.mjs
CHANGED
package/dist/manifest.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "0.
|
|
4
|
-
"generatedAt": "2026-09-
|
|
3
|
+
"packageVersion": "0.24.0",
|
|
4
|
+
"generatedAt": "2026-09-30T06:53:55.509Z",
|
|
5
5
|
"assets": [
|
|
6
6
|
"agent-definitions/ralphctl-evaluator.md",
|
|
7
7
|
"agent-definitions/ralphctl-generator.md",
|
|
8
|
+
"prompts/_partials/approval-gate.md",
|
|
8
9
|
"prompts/_partials/autonomous-operation.md",
|
|
9
10
|
"prompts/_partials/conventions-agents-md.md",
|
|
10
11
|
"prompts/_partials/conventions-claude-md.md",
|
|
11
12
|
"prompts/_partials/conventions-copilot-instructions.md",
|
|
12
13
|
"prompts/_partials/decisions.md",
|
|
13
|
-
"prompts/_partials/evaluation-checkpoint.md",
|
|
14
14
|
"prompts/_partials/evaluator-failure-modes.md",
|
|
15
|
+
"prompts/_partials/evaluator-grading-rules.md",
|
|
15
16
|
"prompts/_partials/evidence-bound.md",
|
|
16
17
|
"prompts/_partials/harness-context.md",
|
|
17
18
|
"prompts/_partials/parallel-tool-calls.md",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<approval-gate>
|
|
2
|
+
Approval works on exactly what the operator sees: what you show them is what goes into `signals.json`,
|
|
3
|
+
so the operator can only approve what is fully on screen.
|
|
4
|
+
|
|
5
|
+
1. Run this prompt's pre-output checklist before you present anything, so the document you show already
|
|
6
|
+
passes it. The checklist may appear later in these instructions, and for requirements the interview's
|
|
7
|
+
stop criteria are the applicable checks; either way, check first and present second.
|
|
8
|
+
2. Show the complete document you will write, verbatim — for requirements, every section; for a task
|
|
9
|
+
plan, every task with all its fields (name, repository, ticket, description, `blockedBy`, every step,
|
|
10
|
+
and every verification criterion with its check type and command), followed by the dependency order.
|
|
11
|
+
Print it as its own message, not as a lead-in to the question.
|
|
12
|
+
3. Do this on every approval round, including after each revision. Never substitute a summary, a diff,
|
|
13
|
+
"unchanged sections omitted", or a pointer to an earlier message — an operator who has to scroll back
|
|
14
|
+
and reassemble the document is approving something they have not read.
|
|
15
|
+
4. Ask the approval question last, as one line. When the runtime has no structured question tool, ask
|
|
16
|
+
the same question as a numbered list and wait for the answer.
|
|
17
|
+
5. If anything changes after approval — including a change made to satisfy the checklist — present the
|
|
18
|
+
full document again and ask again. An approval covers only the version that was shown.
|
|
19
|
+
</approval-gate>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<grading_rules>
|
|
2
|
+
These rules apply every round, identically on a first evaluation and on a re-evaluation.
|
|
3
|
+
|
|
4
|
+
- **Verify script scope.** The verify script is the harness's post-task commit gate — do NOT run it as your
|
|
5
|
+
primary evidence source. Run each `auto` criterion's command directly instead. Exception: when the task
|
|
6
|
+
defines no `auto` criteria, run the verify script once as the fallback evidence source and record its
|
|
7
|
+
output. A passing verify script confirms the project's existing checks pass; it does not confirm this
|
|
8
|
+
task's verification criteria are met. Grade criteria independently of whether the verify script exits 0.
|
|
9
|
+
- **UNVERIFIED criteria.** A criterion whose behaviour IS runnable but which you were blocked from executing
|
|
10
|
+
here (missing credentials, no network, an environment gap) is graded `passed: false` with evidence
|
|
11
|
+
beginning "UNVERIFIED:" plus what blocked you, as opposed to observing a violation, so downstream
|
|
12
|
+
consumers can tell unverifiable apart from broken. A criterion that is not runnable by nature is never
|
|
13
|
+
UNVERIFIED — grade it on cited `path:line` or equivalent behavioural evidence.
|
|
14
|
+
- **Verification-tampering audit.** Check whether the changes touch test files, fixtures, or verification
|
|
15
|
+
tooling themselves. A criterion satisfied by weakening or deleting a test, adding a skip, or hardcoding an
|
|
16
|
+
expected value is a Correctness FAIL, not a PASS — cite the specific diff hunk, even if you flagged the
|
|
17
|
+
same file in an earlier round. When `<reproduction>` is non-empty, this check extends to it: re-run its
|
|
18
|
+
command yourself — the task cannot pass Correctness while that command still fails — and treat an
|
|
19
|
+
unexplained edit to the reproduction test the same as any other tampering.
|
|
20
|
+
- **Critique format.** Each bullet in the `critique` field MUST name: (a) dimension name, (b) concrete
|
|
21
|
+
observed behaviour, (c) desired behaviour, (d) where in the code or tests to look. A bullet missing (d) is
|
|
22
|
+
invalid and is itself a Completeness failure on re-evaluation.
|
|
23
|
+
- **Evidence over suspicion.** A FAIL needs a concrete observation, just as a PASS does. When you cannot
|
|
24
|
+
verify a criterion, grade it UNVERIFIED as above — do not fail on speculation, and do not pass on hope.
|
|
25
|
+
</grading_rules>
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
<harness-context>
|
|
2
|
-
Your context window is managed by the harness — as it
|
|
3
|
-
|
|
4
|
-
through the harness — your signals and the files your role produces, and (where present) the
|
|
5
|
-
progress journal and git history — not the conversation in your context window, which may be
|
|
6
|
-
compacted away. Keep that external state current and accurate as you go, so a fresh session can
|
|
7
|
-
resume from it cleanly.
|
|
8
|
-
|
|
9
|
-
Do not wrap up early, cut scope, or rush a verdict because you sense the context filling — the
|
|
10
|
-
harness handles compaction; carry the work through to completion within your designated role.
|
|
2
|
+
Your context window is managed by the harness — it is compacted or reset automatically as it fills, so keep the durable record of your work in the state you write through the harness (your signals, the files your role produces, and where present the progress journal and git history), not in the conversation.
|
|
3
|
+
Do not wrap up early, cut scope, or rush a verdict because you sense the context filling — carry the work through to completion within your designated role.
|
|
11
4
|
</harness-context>
|
|
@@ -7,7 +7,7 @@ Each task entry uses these fields:
|
|
|
7
7
|
ambiguity.
|
|
8
8
|
- **`projectPath`** — absolute path matching exactly one of the repositories listed under
|
|
9
9
|
`<repositories>`.
|
|
10
|
-
- **`steps`** — concrete, ordered implementation steps.
|
|
10
|
+
- **`steps`** — concrete, ordered implementation steps. Don't end steps with "run the
|
|
11
11
|
verification commands" or "run all the checks" — verification belongs in `verificationCriteria`;
|
|
12
12
|
the harness and the evaluator execute it. A final step that re-runs the full suite only
|
|
13
13
|
duplicates the post-task gate and inflates generator cost. Exception: a step MAY run a specific
|
|
@@ -18,7 +18,7 @@ Each task entry uses these fields:
|
|
|
18
18
|
- `assertion` — human-readable check.
|
|
19
19
|
- `check` — `"auto"` (evaluator runs `command`) or `"manual"` (evaluator inspects code or
|
|
20
20
|
behaviour and cites a specific location).
|
|
21
|
-
- `command` —
|
|
21
|
+
- `command` — required when `check === "auto"`; omit it when `check === "manual"`. Use
|
|
22
22
|
the project's own commands — never hardcode a package-manager binary; read the project's
|
|
23
23
|
manifest or context file for the actual command.
|
|
24
24
|
- Include at least one `auto` criterion when the repository exposes a check command (test,
|
|
@@ -27,9 +27,9 @@ Each task entry uses these fields:
|
|
|
27
27
|
on `manual` criteria alone.
|
|
28
28
|
- **`blockedBy`** — array of `id` strings that must complete before this task starts.
|
|
29
29
|
- **`extraDimensions`** — optional kebab-case evaluator dimensions beyond the five floor dimensions
|
|
30
|
-
(correctness, completeness, safety, consistency, robustness). Attach an extra dimension
|
|
30
|
+
(correctness, completeness, safety, consistency, robustness). Attach an extra dimension only when
|
|
31
31
|
an acceptance criterion explicitly demands a measurable property that no floor dimension covers
|
|
32
|
-
|
|
32
|
+
and no manual criterion already encodes it. When in doubt, omit — the floor dimensions are almost
|
|
33
33
|
always sufficient. Example of a justified attachment: `migration-safety` when the task requires a
|
|
34
34
|
zero-downtime schema change that the five floor dimensions cannot score on their own. Cap: 2–3 per
|
|
35
35
|
task; hard max 6.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Pre-Output Validation
|
|
4
4
|
|
|
5
|
-
Before writing the JSON output, verify
|
|
5
|
+
Before writing the JSON output, verify every item:
|
|
6
6
|
|
|
7
7
|
1. **Requirements understood** — every requirement in scope is reflected in at least one task; nothing in scope is dropped.
|
|
8
8
|
2. **Exclusive file ownership** — each file is owned by exactly one task. When two tasks must edit the same file,
|
|
@@ -16,9 +16,8 @@ Before writing the JSON output, verify EVERY item:
|
|
|
16
16
|
6. **Verification criteria** — each task has 2–4 `verificationCriteria` that are testable and unambiguous.
|
|
17
17
|
"Tests pass" alone is too vague — name the behaviour or invariant that proves the task is done.
|
|
18
18
|
7. **Repository assignment** — every task's `projectPath` matches one of the repository paths provided above.
|
|
19
|
-
8. **Signal output only** — the task array goes into the output signal named in your output contract below.
|
|
20
|
-
|
|
21
|
-
harness.
|
|
19
|
+
8. **Signal output only** — the task array goes into the output signal named in your output contract below as JSON.
|
|
20
|
+
In chat you present it as the readable plan; only the signal file is read by the harness.
|
|
22
21
|
9. **Unique placeholder ids** — each task's `id` is a unique string within this array (used only for
|
|
23
22
|
`blockedBy` resolution; the harness assigns persistent ids on save).
|
|
24
23
|
10. **Deterministic checks preferred** — each task includes at least one `auto` criterion when the
|
|
@@ -9,8 +9,6 @@ to commit or run verify yourself will conflict with the harness's commit, produc
|
|
|
9
9
|
or a false verify result.
|
|
10
10
|
</role>
|
|
11
11
|
|
|
12
|
-
{{HARNESS_CONTEXT}}
|
|
13
|
-
|
|
14
12
|
<goal>
|
|
15
13
|
Apply every change requested in `<latest_round>` by writing the affected files. Emit `task-complete` when
|
|
16
14
|
done, or `task-blocked` when the request is ambiguous — see Phase 3 below for the WHAT-vs-WHERE distinction.
|
|
@@ -39,12 +37,6 @@ round that has already been applied; use it to avoid contradicting prior decisio
|
|
|
39
37
|
{{FEEDBACK_LOG}}
|
|
40
38
|
</feedback_log>
|
|
41
39
|
|
|
42
|
-
<latest_round>
|
|
43
|
-
This is the round to act on NOW. Read it carefully. Apply only what it asks.
|
|
44
|
-
|
|
45
|
-
{{LATEST_ROUND}}
|
|
46
|
-
</latest_round>
|
|
47
|
-
|
|
48
40
|
<repositories>
|
|
49
41
|
The sprint targets the repositories below. Each line is `- \`<absolute-path>\` (<name>)`. The harness
|
|
50
42
|
mounts every repository as a workspace root — read and write files via the absolute paths shown. Decide which
|
|
@@ -58,11 +50,16 @@ Snapshot of the sprint's `progress.md` — pinned learnings, decisions, and per-
|
|
|
58
50
|
orientation so you do not re-discover context the prior tasks already established.
|
|
59
51
|
|
|
60
52
|
Note: the review flow does not mine signals back into `progress.md`. Do not emit `learning`, `decision`, or
|
|
61
|
-
`note` signals — they are unused tokens in this flow.
|
|
62
|
-
docstrings, or the targeted edit.
|
|
53
|
+
`note` signals — they are unused tokens in this flow.
|
|
63
54
|
|
|
64
55
|
{{PROGRESS}}
|
|
65
56
|
</progress>
|
|
57
|
+
|
|
58
|
+
<latest_round>
|
|
59
|
+
This is the round to act on NOW. Read it carefully. Apply only what it asks.
|
|
60
|
+
|
|
61
|
+
{{LATEST_ROUND}}
|
|
62
|
+
</latest_round>
|
|
66
63
|
</inputs>
|
|
67
64
|
|
|
68
65
|
<constraints>
|
|
@@ -84,8 +81,7 @@ underlying invariant or constraint instead (e.g. "exactly one confirmation per d
|
|
|
84
81
|
Removing a test to avoid a failure counts as task failure.
|
|
85
82
|
|
|
86
83
|
**Respect prior rounds.** The user has the latest round in front of them as they write it — trust their
|
|
87
|
-
direction even when it reverses an earlier decision.
|
|
88
|
-
referencing the change), not in a signal.
|
|
84
|
+
direction even when it reverses an earlier decision.
|
|
89
85
|
</constraints>
|
|
90
86
|
|
|
91
87
|
<capabilities>
|
|
@@ -11,8 +11,6 @@ Inspect the commit history and diff of `{{HEAD_BRANCH}}` against `{{BASE_BRANCH}
|
|
|
11
11
|
`pr-content` signal to `signals.json` as described in the Output contract section below.
|
|
12
12
|
</goal>
|
|
13
13
|
|
|
14
|
-
{{HARNESS_CONTEXT}}
|
|
15
|
-
|
|
16
14
|
<success_criteria>
|
|
17
15
|
|
|
18
16
|
- The `title` and `body` follow the format and length rules in the Constraints section below.
|
|
@@ -80,9 +78,6 @@ Hard constraints:
|
|
|
80
78
|
|
|
81
79
|
- Stay implementation-agnostic in the summary — name behaviour, not call sites.
|
|
82
80
|
- Do not invent acceptance criteria, ticket numbers, or roadmap items not visible in the diff or `<ticket_summary>`.
|
|
83
|
-
- Do not reference this tooling, any harness, sprint ids, internal flow names, or the AI itself.
|
|
84
|
-
- Emit ONLY the `pr-content` signal. Do not emit narrative signals (`note`, `learning`, `decision`, `change`) — they are
|
|
85
|
-
not consumed by this flow and represent wasted tokens.
|
|
86
81
|
- If you cannot produce a meaningful title and body (e.g. the repository is inaccessible, the diff is empty, or there is
|
|
87
82
|
nothing to summarise), write `signals.json` as `{"schemaVersion": 1, "signals": []}` and stop. Do not invent PR
|
|
88
83
|
content. The harness falls back to a template-derived description in that case.
|
|
@@ -4,12 +4,10 @@ commands at sprint start (setup) and after every task (verification). This is a
|
|
|
4
4
|
read-only extraction — no code changes, no file writes except `signals.json`.
|
|
5
5
|
</role>
|
|
6
6
|
|
|
7
|
-
{{HARNESS_CONTEXT}}
|
|
8
|
-
|
|
9
7
|
<goal>
|
|
10
8
|
Inspect the repository at `{{REPOSITORY_PATH}}` and propose a single-line setup script and a
|
|
11
9
|
single-line verify script by writing `signals.json` to the output directory. For a monorepo with
|
|
12
|
-
clearly separable module roots,
|
|
10
|
+
clearly separable module roots, also propose structured per-module verify gates — one gate per
|
|
13
11
|
module — so the harness can scope verification to the part of the tree a task actually touched.
|
|
14
12
|
</goal>
|
|
15
13
|
|
|
@@ -22,7 +20,7 @@ module — so the harness can scope verification to the part of the tree a task
|
|
|
22
20
|
- Per-module verify gates appear only when the repository has distinct module roots — a
|
|
23
21
|
single-module repository proposes the verify script alone and no gates.
|
|
24
22
|
- When the project's documented contract names a run command, a `note` signal describes it — see
|
|
25
|
-
|
|
23
|
+
`<run_command_note>` below for what counts and what the note must contain.
|
|
26
24
|
|
|
27
25
|
</success_criteria>
|
|
28
26
|
|
|
@@ -32,8 +30,10 @@ module — so the harness can scope verification to the part of the tree a task
|
|
|
32
30
|
|
|
33
31
|
<constraints>
|
|
34
32
|
|
|
35
|
-
**This invocation is read-only
|
|
36
|
-
|
|
33
|
+
**This invocation is read-only — except for writing `signals.json`.** Do not modify the working tree,
|
|
34
|
+
create other files, or run commands; read documentation instead of running a tool's `--help`. The
|
|
35
|
+
harness owns execution; the user reviews your proposal before anything runs. Read only configuration
|
|
36
|
+
and metadata files — not source trees, tests, vendored directories, or generated output.
|
|
37
37
|
|
|
38
38
|
**Coding-agent context files are the strongest evidence.** Before any manifest, look for
|
|
39
39
|
`CLAUDE.md`, `AGENTS.md`, `.cursor/rules/*.md`, `.github/copilot-instructions.md`, and human
|
|
@@ -49,7 +49,7 @@ confirm the stack, then propose root-level commands that build/verify the whole
|
|
|
49
49
|
**Non-interactive flags for tools that colourise by default.** The harness captures the script's
|
|
50
50
|
combined stdout/stderr to a plain-text log file. When the ecosystem's own build or test tool emits
|
|
51
51
|
ANSI colour codes or interactive prompts by default, append that tool's own non-interactive /
|
|
52
|
-
plain-console flag (
|
|
52
|
+
plain-console flag (read its docs or config for the exact name) unless the project's own docs
|
|
53
53
|
prescribe a different invocation. Modern Node / Python / Rust tooling respects `NO_COLOR` which the
|
|
54
54
|
harness sets automatically, so no per-tool flag is needed there.
|
|
55
55
|
|
|
@@ -65,7 +65,8 @@ what the project documented. Omit a signal only when the project's own files are
|
|
|
65
65
|
class entirely.
|
|
66
66
|
|
|
67
67
|
**Script safety.** Reject pipe-to-shell shapes (`curl … | sh`, `wget -O- … | bash`), `eval`, and
|
|
68
|
-
`rm -rf
|
|
68
|
+
`rm -rf` — the harness runs these scripts unattended, so a remote-fetched or destructive command
|
|
69
|
+
cannot be reviewed before it executes. One shell line per script — multi-line bodies and heredocs are out of contract, and so
|
|
69
70
|
are sub-shells except the single `(cd <path> && …)` fallback named above; the harness collapses
|
|
70
71
|
whitespace before execution.
|
|
71
72
|
|
|
@@ -78,7 +79,7 @@ across a sprint.
|
|
|
78
79
|
experienced contributor would run them locally. Use `&&` not `;`. Include test commands when the
|
|
79
80
|
project's docs name them as part of the verification gate.
|
|
80
81
|
|
|
81
|
-
**Per-module verify gates — monorepos only.** Emit the `verify-gates` signal
|
|
82
|
+
**Per-module verify gates — monorepos only.** Emit the `verify-gates` signal only when the
|
|
82
83
|
repository has clearly separable module roots: distinct build manifests living in their own
|
|
83
84
|
subdirectories, each verifiable on its own. A single-module repository — one manifest at the root,
|
|
84
85
|
or a workspace whose members are never checked independently — gets the verify script alone; never
|
|
@@ -92,11 +93,11 @@ emit gates for it. When gates apply:
|
|
|
92
93
|
entry point as discovered from its manifest or the project's docs, never a command invented for
|
|
93
94
|
it. Prefer the quiet / batch / non-interactive flag the ecosystem provides so the captured log
|
|
94
95
|
stays clean, exactly as the verify script does.
|
|
95
|
-
- The `verify-gates` signal is
|
|
96
|
+
- The `verify-gates` signal is additive — emit it alongside the `verify-script` signal, never
|
|
96
97
|
instead of it. The script remains the whole-tree fallback the operator sees and the harness runs
|
|
97
98
|
when a change touches no gated module; the gates scope verification when a change is confined to
|
|
98
99
|
one module.
|
|
99
|
-
- Add a catch-all gate with an empty-string `pathPrefix`
|
|
100
|
+
- Add a catch-all gate with an empty-string `pathPrefix` only when the repository defines a
|
|
100
101
|
genuine cross-module integration check (e.g. a root-level end-to-end suite that exercises the
|
|
101
102
|
modules together). Omit the catch-all when no such whole-tree check exists — the verify script
|
|
102
103
|
already covers the unscoped case.
|
|
@@ -128,18 +129,15 @@ test`" and the manifest declares those scripts:
|
|
|
128
129
|
"signals": [
|
|
129
130
|
{
|
|
130
131
|
"type": "setup-script",
|
|
131
|
-
"command": "<tool> install"
|
|
132
|
-
"timestamp": "..."
|
|
132
|
+
"command": "<tool> install"
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"type": "verify-script",
|
|
136
|
-
"command": "<tool> typecheck && <tool> lint && <tool> test"
|
|
137
|
-
"timestamp": "..."
|
|
136
|
+
"command": "<tool> typecheck && <tool> lint && <tool> test"
|
|
138
137
|
},
|
|
139
138
|
{
|
|
140
139
|
"type": "note",
|
|
141
|
-
"text": "Commands lifted verbatim from the project's coding-agent context file."
|
|
142
|
-
"timestamp": "..."
|
|
140
|
+
"text": "Commands lifted verbatim from the project's coding-agent context file."
|
|
143
141
|
}
|
|
144
142
|
]
|
|
145
143
|
}
|
|
@@ -153,18 +151,15 @@ When only a manifest exists with install + test scripts and no context file:
|
|
|
153
151
|
"signals": [
|
|
154
152
|
{
|
|
155
153
|
"type": "setup-script",
|
|
156
|
-
"command": "<tool> install"
|
|
157
|
-
"timestamp": "..."
|
|
154
|
+
"command": "<tool> install"
|
|
158
155
|
},
|
|
159
156
|
{
|
|
160
157
|
"type": "verify-script",
|
|
161
|
-
"command": "<tool> test"
|
|
162
|
-
"timestamp": "..."
|
|
158
|
+
"command": "<tool> test"
|
|
163
159
|
},
|
|
164
160
|
{
|
|
165
161
|
"type": "note",
|
|
166
|
-
"text": "No context file found; commands inferred from manifest scripts."
|
|
167
|
-
"timestamp": "..."
|
|
162
|
+
"text": "No context file found; commands inferred from manifest scripts."
|
|
168
163
|
}
|
|
169
164
|
]
|
|
170
165
|
}
|
|
@@ -179,18 +174,15 @@ names install + verify steps:
|
|
|
179
174
|
"signals": [
|
|
180
175
|
{
|
|
181
176
|
"type": "setup-script",
|
|
182
|
-
"command": "<tool> install <tool's non-interactive flag>"
|
|
183
|
-
"timestamp": "..."
|
|
177
|
+
"command": "<tool> install <tool's non-interactive flag>"
|
|
184
178
|
},
|
|
185
179
|
{
|
|
186
180
|
"type": "verify-script",
|
|
187
|
-
"command": "<tool> verify <tool's non-interactive flag>"
|
|
188
|
-
"timestamp": "..."
|
|
181
|
+
"command": "<tool> verify <tool's non-interactive flag>"
|
|
189
182
|
},
|
|
190
183
|
{
|
|
191
184
|
"type": "note",
|
|
192
|
-
"text": "Commands lifted from the project's coding-agent context file; <tool's non-interactive flag> disables interactive prompts and ANSI colour for clean persisted logs."
|
|
193
|
-
"timestamp": "..."
|
|
185
|
+
"text": "Commands lifted from the project's coding-agent context file; <tool's non-interactive flag> disables interactive prompts and ANSI colour for clean persisted logs."
|
|
194
186
|
}
|
|
195
187
|
]
|
|
196
188
|
}
|
|
@@ -207,13 +199,11 @@ point:
|
|
|
207
199
|
"signals": [
|
|
208
200
|
{
|
|
209
201
|
"type": "setup-script",
|
|
210
|
-
"command": "<tool> install"
|
|
211
|
-
"timestamp": "..."
|
|
202
|
+
"command": "<tool> install"
|
|
212
203
|
},
|
|
213
204
|
{
|
|
214
205
|
"type": "verify-script",
|
|
215
|
-
"command": "<tool> verify"
|
|
216
|
-
"timestamp": "..."
|
|
206
|
+
"command": "<tool> verify"
|
|
217
207
|
},
|
|
218
208
|
{
|
|
219
209
|
"type": "verify-gates",
|
|
@@ -226,13 +216,11 @@ point:
|
|
|
226
216
|
"pathPrefix": "services/web/",
|
|
227
217
|
"command": "<tool> --filter web verify"
|
|
228
218
|
}
|
|
229
|
-
]
|
|
230
|
-
"timestamp": "..."
|
|
219
|
+
]
|
|
231
220
|
},
|
|
232
221
|
{
|
|
233
222
|
"type": "note",
|
|
234
|
-
"text": "Two independently-verifiable modules under services/; each gate runs that module's own check, the verify script remains the whole-tree fallback."
|
|
235
|
-
"timestamp": "..."
|
|
223
|
+
"text": "Two independently-verifiable modules under services/; each gate runs that module's own check, the verify script remains the whole-tree fallback."
|
|
236
224
|
}
|
|
237
225
|
]
|
|
238
226
|
}
|
|
@@ -240,41 +228,20 @@ point:
|
|
|
240
228
|
|
|
241
229
|
</example>
|
|
242
230
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
### Phase 1 — Inspection
|
|
246
|
-
|
|
247
|
-
Before writing any output, cover, in order:
|
|
248
|
-
|
|
249
|
-
1. The coding-agent context files you found and the commands they explicitly name. These are your
|
|
250
|
-
primary evidence source — list them before anything else.
|
|
251
|
-
2. The manifest(s) you read, the package manager / language toolchain each implies, and the
|
|
252
|
-
`scripts` / task aliases it exposes.
|
|
253
|
-
3. The shape of the repo: single-stack, single-language monorepo, or polyglot monorepo. For
|
|
254
|
-
polyglot layouts, name each sub-tree's path and toolchain.
|
|
255
|
-
4. The candidate setup / verify commands, each with the file that documents it.
|
|
256
|
-
5. The candidate run command — the command that starts the product in a running state for
|
|
257
|
-
interactive or end-to-end use (for example, a dev-server start script, an application
|
|
258
|
-
entry point, or an integration / smoke test runner). A run command is distinct from the
|
|
259
|
-
verify script: the verify script confirms correctness after a change; a run command starts
|
|
260
|
-
the live product so it can be exercised as a real user would. List the command and the file
|
|
261
|
-
that documents it.
|
|
262
|
-
|
|
263
|
-
Then read only the configuration and metadata files in scope above. Do NOT read source trees,
|
|
264
|
-
tests, vendored directories, or generated output.
|
|
265
|
-
|
|
266
|
-
### Phase 2 — Drafting
|
|
231
|
+
<run_command_note>
|
|
267
232
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
233
|
+
A run command starts the product in a running state for interactive or end-to-end use (for example,
|
|
234
|
+
a dev-server start script, an application entry point, or an integration / smoke test runner). It is
|
|
235
|
+
distinct from the verify script: the verify script confirms correctness after a change; a run
|
|
236
|
+
command starts the live product so it can be exercised as a real user would.
|
|
272
237
|
|
|
273
|
-
When
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
238
|
+
When the project's files name one, document it in a `note` signal: include the exact invocation,
|
|
239
|
+
what it starts (dev server at which port, CLI binary, or e2e suite), and any environment
|
|
240
|
+
prerequisite the project's own files declare. Omit the note when the project's files name no run
|
|
241
|
+
command — do not fabricate one from inference.
|
|
277
242
|
|
|
278
|
-
|
|
243
|
+
When a context file and a manifest name the same command, the context file wins (it's deliberate
|
|
244
|
+
author intent). For the verify script, prefer chaining the project's own task scripts over
|
|
245
|
+
re-spelling the underlying tools — the project's scripts are the documented contract.
|
|
279
246
|
|
|
280
|
-
|
|
247
|
+
</run_command_note>
|
|
@@ -7,9 +7,9 @@ precision; every sentence must be grounded in something you read in the repo.
|
|
|
7
7
|
|
|
8
8
|
<goal>
|
|
9
9
|
Produce one `setup-skill-proposal` signal and one `verify-skill-proposal` signal for the repository
|
|
10
|
-
at `{{REPOSITORY_PATH}}`, each containing a
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
at `{{REPOSITORY_PATH}}`, each containing a short markdown body, and write them to `signals.json` in the harness output
|
|
11
|
+
directory. Emit each signal unless an existing skill already covers that responsibility for this
|
|
12
|
+
repo — if covered, emit a `note` instead.
|
|
13
13
|
</goal>
|
|
14
14
|
|
|
15
15
|
<success_criteria>
|
|
@@ -18,18 +18,15 @@ covers that responsibility for this repo.
|
|
|
18
18
|
already cover both responsibilities (in which case emit a `note` explaining what was found).
|
|
19
19
|
- Every concrete claim in a skill body — a tool name, a command flag, a directory path — is backed by
|
|
20
20
|
a file you read in this repo or its context files. No training-data generics.
|
|
21
|
-
- Skill bodies are written in second-person, present tense,
|
|
21
|
+
- Skill bodies are written in second-person, present tense, 1–3 short paragraphs each.
|
|
22
22
|
- `signals.json` is valid JSON that parses against the output contract schema.
|
|
23
23
|
|
|
24
24
|
</success_criteria>
|
|
25
25
|
|
|
26
26
|
<inputs>
|
|
27
27
|
<repository_path>{{REPOSITORY_PATH}}</repository_path>
|
|
28
|
-
<skills_convention_pointer>See the full skills convention in the constraints section below.</skills_convention_pointer>
|
|
29
28
|
</inputs>
|
|
30
29
|
|
|
31
|
-
{{HARNESS_CONTEXT}}
|
|
32
|
-
|
|
33
30
|
<capabilities>
|
|
34
31
|
You can read files anywhere in the repository at `{{REPOSITORY_PATH}}`. You cannot run shell commands,
|
|
35
32
|
modify files, or create files — this invocation is read-only — except the single `signals.json` write
|
|
@@ -44,13 +41,13 @@ before anything lands.
|
|
|
44
41
|
(`Makefile`, `justfile`, `Taskfile.yml`). These are the authoritative source. Beyond them, read only
|
|
45
42
|
configuration and metadata files: manifests, lockfiles, build descriptors, tool-version pins, CI
|
|
46
43
|
workflows, top-level `scripts/` entries. For monorepos, inspect the root and one or two representative
|
|
47
|
-
sub-modules. Do
|
|
44
|
+
sub-modules. Do not read source trees, tests, or vendored directories.
|
|
48
45
|
|
|
49
46
|
**Check existing skills before drafting.** Use the convention below to list and inspect existing
|
|
50
47
|
per-repo skills. If a skill already covers the sprint-setup or post-task-verification responsibility
|
|
51
|
-
for this repo
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
for this repo, omit the relevant signal and note it in a `note` signal so the operator can decide.
|
|
49
|
+
Otherwise emit — partial or tangential coverage does not count, and most repos have no existing
|
|
50
|
+
skills.
|
|
54
51
|
|
|
55
52
|
<skills_convention>{{SKILLS_CONVENTION}}</skills_convention>
|
|
56
53
|
|
|
@@ -58,15 +55,15 @@ not a reason to omit.
|
|
|
58
55
|
backed by something you read in the repo or a context file. Drop any claim you cannot tie to a file.
|
|
59
56
|
|
|
60
57
|
**Voice and length.** Write in clean second-person, present tense — these bodies are AI-to-AI
|
|
61
|
-
instructions. Aim for
|
|
58
|
+
instructions. Aim for 1–3 short paragraphs per skill. No headings inside the body (the harness wraps
|
|
62
59
|
each in its own section). Code fences inside the body are fine.
|
|
63
60
|
|
|
64
61
|
**Skill content must be useful, not aspirational.** "Run the project's install command" is useful. "Be
|
|
65
62
|
careful with edge cases" is noise. Delete any paragraph that would apply to any project.
|
|
66
63
|
|
|
67
|
-
**
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
**Document stack-specific quirks.** A non-default toolchain, tool-version pin, lockfile policy,
|
|
65
|
+
monorepo sub-tree ordering dependency, or anything else that would trip up a generic AI session
|
|
66
|
+
belongs in the skill body.
|
|
70
67
|
|
|
71
68
|
</constraints>
|
|
72
69
|
|
|
@@ -101,8 +98,7 @@ Before drafting, cover, in order:
|
|
|
101
98
|
5. A one-line outline of each skill's content before drafting, or an explicit "skip — already covered
|
|
102
99
|
by `<existing skill id>`" when an existing skill makes the new one redundant.
|
|
103
100
|
|
|
104
|
-
Then read only the configuration and metadata files in scope above.
|
|
105
|
-
vendored directories, or generated output.
|
|
101
|
+
Then read only the configuration and metadata files in scope above.
|
|
106
102
|
|
|
107
103
|
For polyglot monorepos, give the AI the relationship between sub-trees (e.g. "the frontend depends
|
|
108
104
|
on a build artifact produced by the backend"). Generic boilerplate adds no value — every sentence
|
|
@@ -113,8 +109,7 @@ should earn its place by being specific to this repo.
|
|
|
113
109
|
<example>
|
|
114
110
|
When the repository's context file documents the verify command and a tool-version pin file is present:
|
|
115
111
|
|
|
116
|
-
```
|
|
117
|
-
signals.json
|
|
112
|
+
```json
|
|
118
113
|
{
|
|
119
114
|
"schemaVersion": 1,
|
|
120
115
|
"signals": [
|
|
@@ -7,8 +7,9 @@ Your job is to integrate them cleanly, not to invent new ones.
|
|
|
7
7
|
</role>
|
|
8
8
|
|
|
9
9
|
<goal>
|
|
10
|
-
|
|
11
|
-
the candidate learnings below — folded in idempotently
|
|
10
|
+
Produce the up-to-date body of the `## {{LEARNINGS_SECTION_HEADING}}` section of `{{TARGET_FILENAME}}`, containing
|
|
11
|
+
the candidate learnings below — folded in idempotently. You write only that section's body; the harness splices
|
|
12
|
+
it into the file and preserves everything else verbatim.
|
|
12
13
|
</goal>
|
|
13
14
|
|
|
14
15
|
<inputs>
|
|
@@ -17,26 +18,25 @@ the candidate learnings below — folded in idempotently, preserving everything
|
|
|
17
18
|
<existing_context_file>
|
|
18
19
|
{{EXISTING_CONTEXT_FILE}}
|
|
19
20
|
</existing_context_file>
|
|
21
|
+
An empty `<existing_context_file>` means the file does not exist yet — the harness will create it from your
|
|
22
|
+
section body.
|
|
20
23
|
|
|
21
24
|
<candidate_learnings>
|
|
22
25
|
{{CANDIDATE_LEARNINGS}}
|
|
23
26
|
</candidate_learnings>
|
|
24
27
|
</inputs>
|
|
25
28
|
|
|
26
|
-
{{HARNESS_CONTEXT}}
|
|
27
|
-
|
|
28
29
|
<owned_section>
|
|
29
30
|
You own exactly one section of `{{TARGET_FILENAME}}` — the one headed `## {{LEARNINGS_SECTION_HEADING}}`. This is
|
|
30
|
-
the only part of the file you
|
|
31
|
-
|
|
31
|
+
the only part of the file you produce. Everything outside that section is hand-authored or owned by another
|
|
32
|
+
tool; the harness keeps it byte-for-byte, so do not reproduce it.
|
|
32
33
|
|
|
33
34
|
- When the file already contains a `## {{LEARNINGS_SECTION_HEADING}}` section, treat its current bullets as the
|
|
34
|
-
prior state and reconcile the candidates against them (see the idempotency rule below)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
- Never create a second `## {{LEARNINGS_SECTION_HEADING}}` section — there must be exactly one.
|
|
35
|
+
prior state and reconcile the candidates against them (see the idempotency rule below); your output replaces
|
|
36
|
+
that section's body.
|
|
37
|
+
- When the file has no such section yet, your output becomes a new section appended at the end by the harness.
|
|
38
|
+
- Output only the section body — no `## {{LEARNINGS_SECTION_HEADING}}` heading line, and no other headings of
|
|
39
|
+
level 1 or 2 (the harness rejects the proposal otherwise).
|
|
40
40
|
|
|
41
41
|
</owned_section>
|
|
42
42
|
|
|
@@ -93,10 +93,12 @@ as "when present"; many repositories do not have one, and a learning must not as
|
|
|
93
93
|
|
|
94
94
|
1. Read the existing context file body above and locate the `## {{LEARNINGS_SECTION_HEADING}}` section, if any.
|
|
95
95
|
2. Reconcile the candidate learnings against the owned section per the idempotency rule.
|
|
96
|
-
3. Write the
|
|
97
|
-
|
|
96
|
+
3. Write ONLY the reconciled section body (the bullets, without the section heading line) to `{{OUTPUT_FILE}}` —
|
|
97
|
+
not the whole file and not a diff. The harness splices it into `{{TARGET_FILENAME}}` and shows the operator
|
|
98
|
+
the full resulting diff for confirmation.
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
Write to that output path only; do not modify `{{TARGET_FILENAME}}` in the repository — the harness writes the
|
|
101
|
+
file itself after confirmation. Make no other edits to the repository. Emit no prose commentary outside the
|
|
102
|
+
file you write — the harness reads that file, not your message.
|
|
101
103
|
|
|
102
104
|
</output_contract>
|