ralphctl 0.14.1 → 0.15.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 +74 -66
- package/THIRD-PARTY-NOTICES.md +92 -0
- package/dist/cli-CKPJ5SY4.mjs +43941 -0
- package/dist/cli.mjs +3 -42323
- package/dist/manifest.json +6 -1
- package/dist/prompts/_partials/conventions-claude-md.md +2 -1
- package/dist/prompts/_partials/validation-checklist.md +4 -0
- package/dist/prompts/detect-scripts/template.md +2 -2
- package/dist/prompts/evaluate/template.md +56 -22
- package/dist/prompts/evaluate-continuation/template.md +110 -8
- package/dist/prompts/ideate/template.md +16 -0
- package/dist/prompts/implement/template.md +13 -6
- package/dist/prompts/plan/template.md +21 -6
- package/dist/prompts/readiness/template.md +5 -3
- package/dist/skills/ralphctl-alignment/SKILL.md +1 -1
- package/dist/skills/ralphctl-cherny-workflow/SKILL.md +61 -0
- package/dist/skills/ralphctl-debugging-and-error-recovery/SKILL.md +1 -1
- package/dist/skills/ralphctl-domain-driven-design/SKILL.md +113 -0
- package/dist/skills/ralphctl-idea-refinement/SKILL.md +107 -0
- package/dist/skills/ralphctl-iterative-review/SKILL.md +1 -1
- package/dist/skills/ralphctl-karpathy-guidelines/SKILL.md +76 -0
- package/dist/skills/ralphctl-minimal-scaffolding/SKILL.md +1 -1
- package/dist/skills/ralphctl-ponytail/SKILL.md +86 -0
- package/dist/skills/ralphctl-surgical-simplicity/SKILL.md +1 -1
- package/dist/skills/ralphctl-test-driven-development/SKILL.md +1 -1
- package/package.json +5 -4
package/dist/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generatedAt": "2026-07-
|
|
3
|
+
"generatedAt": "2026-07-03T20:19:33.217Z",
|
|
4
4
|
"assets": [
|
|
5
5
|
"prompts/_partials/conventions-agents-md.md",
|
|
6
6
|
"prompts/_partials/conventions-claude-md.md",
|
|
@@ -23,10 +23,15 @@
|
|
|
23
23
|
"prompts/refine/template.md",
|
|
24
24
|
"skills/ralphctl-abstraction-first/SKILL.md",
|
|
25
25
|
"skills/ralphctl-alignment/SKILL.md",
|
|
26
|
+
"skills/ralphctl-cherny-workflow/SKILL.md",
|
|
26
27
|
"skills/ralphctl-code-review-and-quality/SKILL.md",
|
|
27
28
|
"skills/ralphctl-debugging-and-error-recovery/SKILL.md",
|
|
29
|
+
"skills/ralphctl-domain-driven-design/SKILL.md",
|
|
30
|
+
"skills/ralphctl-idea-refinement/SKILL.md",
|
|
28
31
|
"skills/ralphctl-iterative-review/SKILL.md",
|
|
32
|
+
"skills/ralphctl-karpathy-guidelines/SKILL.md",
|
|
29
33
|
"skills/ralphctl-minimal-scaffolding/SKILL.md",
|
|
34
|
+
"skills/ralphctl-ponytail/SKILL.md",
|
|
30
35
|
"skills/ralphctl-surgical-simplicity/SKILL.md",
|
|
31
36
|
"skills/ralphctl-test-driven-development/SKILL.md"
|
|
32
37
|
]
|
|
@@ -10,7 +10,8 @@ invocation, not as a tutorial or README.
|
|
|
10
10
|
- At most seven H2 sections (`## Build & Run`, `## Testing`, `## Architecture`, …). Fewer is better.
|
|
11
11
|
- No H4 headings or deeper — three heading levels (`#`, `##`, `###`) is the practical maximum.
|
|
12
12
|
- Prefer tight bullet lists over prose paragraphs; each bullet should be one verifiable claim.
|
|
13
|
-
- Hard line cap: 200 lines.
|
|
13
|
+
- Hard line cap: 200 lines. Instruction adherence measurably degrades on longer context files, so
|
|
14
|
+
brevity is load-bearing.
|
|
14
15
|
|
|
15
16
|
**"Read on demand" pattern** — for sections that an agent rarely needs mid-task, list them under a
|
|
16
17
|
`## References` heading with paths rather than embedding the content inline:
|
|
@@ -22,5 +22,9 @@ Before writing the JSON output, verify EVERY item:
|
|
|
22
22
|
is read by the harness.
|
|
23
23
|
9. **Unique placeholder ids** — each task's `id` is a unique string within this array (used only for
|
|
24
24
|
`blockedBy` resolution; the harness assigns persistent ids on save).
|
|
25
|
+
10. **Deterministic checks preferred** — each task includes at least one `auto` criterion when the
|
|
26
|
+
repository exposes a check command (test, typecheck, lint, or build). A task that relies solely on
|
|
27
|
+
`manual` criteria is acceptable only when it is pure documentation or investigation work with no
|
|
28
|
+
code change to check.
|
|
25
29
|
|
|
26
30
|
</validation-checklist>
|
|
@@ -118,8 +118,8 @@ single `note` signal with a brief explanation and stop — do not invent command
|
|
|
118
118
|
</output_contract>
|
|
119
119
|
|
|
120
120
|
<example>
|
|
121
|
-
When `CLAUDE.md` (or equivalent) contains "Verification: `<tool> typecheck && <tool> lint &&
|
|
122
|
-
|
|
121
|
+
When `CLAUDE.md` (or equivalent) contains "Verification: `<tool> typecheck && <tool> lint && <tool>
|
|
122
|
+
test`" and the manifest declares those scripts:
|
|
123
123
|
|
|
124
124
|
```json
|
|
125
125
|
{
|
|
@@ -8,15 +8,7 @@ render a verdict.
|
|
|
8
8
|
|
|
9
9
|
**Grading rubric (pinned here — applies every round regardless of context):**
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
`status: "failed"` on the signal regardless of how other dimensions score.
|
|
13
|
-
|
|
14
|
-
| Dimension | PASS when | FAIL when |
|
|
15
|
-
| ------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
|
|
16
|
-
| Correctness | Every verification criterion in `<task_specification>` is met, with evidence | Any criterion unmet, or evidence is missing for a PASS claim |
|
|
17
|
-
| Completeness | All declared steps present; all criteria addressed; no criterion silently skipped | A step or criterion has no evidence in the findings |
|
|
18
|
-
| Safety | No error paths that crash, swallow, or silently corrupt; no unvalidated inputs at trust boundaries; no leaked resources | A concrete safety defect is observable in the diff |
|
|
19
|
-
| Consistency | Change follows the project's existing patterns — naming, file organisation, error handling, test structure, import style | A sibling file or function shows a materially different pattern the generator ignored |
|
|
11
|
+
{{FLOOR_RUBRIC_SECTION}}
|
|
20
12
|
|
|
21
13
|
Additional dimensions appended by the planner (when present) are evaluated with the same binary pass/fail
|
|
22
14
|
logic. The rubric from `<task_specification>` is the authority — grade against it, not against your own
|
|
@@ -51,9 +43,9 @@ forcing a `passed` you cannot support — a false `passed` ships a bug; a `malfo
|
|
|
51
43
|
Conversely, do not reach for `malformed` to dodge a clear `failed`: if you can name a concrete failing
|
|
52
44
|
criterion, the verdict is `failed` with a critique, never `malformed`.
|
|
53
45
|
|
|
54
|
-
A terminal `passed` or `failed` verdict MUST grade all
|
|
55
|
-
safety, consistency), each with a finding — a verdict missing a floor dimension is rejected by the
|
|
56
|
-
re-requested. `malformed` is exempt from that coverage requirement.
|
|
46
|
+
A terminal `passed` or `failed` verdict MUST grade all five floor dimensions (correctness, completeness,
|
|
47
|
+
safety, consistency, robustness), each with a finding — a verdict missing a floor dimension is rejected by the
|
|
48
|
+
harness and re-requested. `malformed` is exempt from that coverage requirement.
|
|
57
49
|
</role>
|
|
58
50
|
|
|
59
51
|
{{HARNESS_CONTEXT}}
|
|
@@ -94,6 +86,12 @@ The block below mirrors that file for in-context reference.
|
|
|
94
86
|
{{TASK_STEPS_SECTION}}
|
|
95
87
|
{{VERIFICATION_CRITERIA_SECTION}}
|
|
96
88
|
|
|
89
|
+
<prior_criteria_verdicts>{{PRIOR_CRITERIA_VERDICTS}}</prior_criteria_verdicts>
|
|
90
|
+
|
|
91
|
+
The `<prior_criteria_verdicts>` block above — when non-empty — records the verdicts earlier rounds
|
|
92
|
+
reached on this checklist. Treat it as context, not evidence: re-verify every criterion yourself this
|
|
93
|
+
round and never carry a prior PASS forward without your own observation.
|
|
94
|
+
|
|
97
95
|
</task_specification>
|
|
98
96
|
|
|
99
97
|
<evaluation_discipline>
|
|
@@ -143,7 +141,7 @@ may write is `signals.json` under the harness output directory.
|
|
|
143
141
|
|
|
144
142
|
### Phase 0 — Checkpoint write (do this first, before any verification)
|
|
145
143
|
|
|
146
|
-
Write `signals.json` now with placeholder verdicts — `status: "failed"`, all
|
|
144
|
+
Write `signals.json` now with placeholder verdicts — `status: "failed"`, all five floor dimensions
|
|
147
145
|
present, each set to `passed: false` with `finding: "assessment in progress"`. Use the schema and
|
|
148
146
|
path shown in the output contract section at the bottom of this prompt.
|
|
149
147
|
|
|
@@ -164,7 +162,8 @@ rather than restarting from scratch.
|
|
|
164
162
|
{ "dimension": "correctness", "passed": false, "finding": "assessment in progress" },
|
|
165
163
|
{ "dimension": "completeness", "passed": false, "finding": "assessment in progress" },
|
|
166
164
|
{ "dimension": "safety", "passed": false, "finding": "assessment in progress" },
|
|
167
|
-
{ "dimension": "consistency", "passed": false, "finding": "assessment in progress" }
|
|
165
|
+
{ "dimension": "consistency", "passed": false, "finding": "assessment in progress" },
|
|
166
|
+
{ "dimension": "robustness", "passed": false, "applicable": false, "finding": "assessment in progress" }
|
|
168
167
|
],
|
|
169
168
|
"timestamp": "<ISO-8601 timestamp>"
|
|
170
169
|
}
|
|
@@ -172,6 +171,10 @@ rather than restarting from scratch.
|
|
|
172
171
|
}
|
|
173
172
|
```
|
|
174
173
|
|
|
174
|
+
Robustness carries the optional `applicable` field shown above — leave it as a placeholder here and
|
|
175
|
+
set it to `false` only if Phase 4 determines the change touches no error/failure path (with the real
|
|
176
|
+
reason in `finding`), or omit it (default `true`) once you grade an actual pass/fail.
|
|
177
|
+
|
|
175
178
|
Write this file, then proceed to Phase 1.
|
|
176
179
|
|
|
177
180
|
### Phase 1 — Computational verification
|
|
@@ -246,8 +249,10 @@ observation — file path, line number, function name, tool output, or quoted sn
|
|
|
246
249
|
|
|
247
250
|
### Phase 4 — Dimension assessment
|
|
248
251
|
|
|
249
|
-
Evaluate across the
|
|
250
|
-
|
|
252
|
+
Evaluate across the five floor dimensions rendered in the grading rubric pinned at the top of this
|
|
253
|
+
prompt. Write per-dimension
|
|
254
|
+
findings as one PASS/FAIL verdict (or `applicable: false` for robustness, when justified) and 1–3 specific
|
|
255
|
+
observations each, anchored to the acceptance criteria and check/verify output you gathered in Phases 1–3.
|
|
251
256
|
|
|
252
257
|
1. **Correctness** — does the implementation do what the specification says, across every verification
|
|
253
258
|
criterion? Cite the criterion and the code that satisfies (or fails to satisfy) it.
|
|
@@ -258,6 +263,10 @@ specific observations each.
|
|
|
258
263
|
4. **Consistency** — does the change follow the project's existing patterns and conventions (naming, file
|
|
259
264
|
organisation, error handling, test structure, import style)? Cite a specific sibling file or function
|
|
260
265
|
when the comparison matters.
|
|
266
|
+
5. **Robustness** — does the change handle error and failure paths gracefully — unhandled exceptions,
|
|
267
|
+
missing error propagation, ungraceful degradation, recovery from transient faults? When the change
|
|
268
|
+
touches no error/failure path, grade this dimension `applicable: false` and state the concrete reason in
|
|
269
|
+
`finding` rather than fabricating a pass or fail.
|
|
261
270
|
|
|
262
271
|
{{EXTRA_DIMENSIONS_SECTION}}
|
|
263
272
|
|
|
@@ -285,7 +294,8 @@ Criteria:
|
|
|
285
294
|
- [C1] (auto) run the project's test suite filtered to the export module — all tests pass.
|
|
286
295
|
- [C2] (manual) — invalid `startDate` value returns 400 with the project's standard error body.
|
|
287
296
|
|
|
288
|
-
Phase 1:
|
|
297
|
+
Phase 1: ran C1's test command directly — exit 0, 12 tests green, recorded verbatim in
|
|
298
|
+
`executionEvidence` for the Correctness dimension.
|
|
289
299
|
|
|
290
300
|
Phase 2:
|
|
291
301
|
|
|
@@ -303,6 +313,8 @@ Phase 4 dimensions:
|
|
|
303
313
|
to this task's criteria.
|
|
304
314
|
- Safety — PASS — input validated via shared Zod schema at `src/routes/exports.ts:12` before DB access.
|
|
305
315
|
- Consistency — PASS — follows existing endpoint patterns in `src/routes/`; uses the shared error format.
|
|
316
|
+
- Robustness — N/A — the change only adds input validation with a standard 400 response; it introduces no
|
|
317
|
+
error/failure-recovery path (retries, rollback, degradation) beyond what Correctness already covers.
|
|
306
318
|
|
|
307
319
|
Verdict: `status: "passed"`, no critique.
|
|
308
320
|
|
|
@@ -336,6 +348,12 @@ Signals:
|
|
|
336
348
|
"dimension": "consistency",
|
|
337
349
|
"passed": true,
|
|
338
350
|
"finding": "follows existing endpoint patterns in src/routes/; uses the shared error format from src/lib/errors.ts"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"dimension": "robustness",
|
|
354
|
+
"passed": false,
|
|
355
|
+
"applicable": false,
|
|
356
|
+
"finding": "input-validation change only; no error/failure-recovery path beyond the 400 response Correctness already covers"
|
|
339
357
|
}
|
|
340
358
|
],
|
|
341
359
|
"criteria": [
|
|
@@ -359,7 +377,8 @@ Criteria:
|
|
|
359
377
|
- [C1] (auto) run the project's test suite filtered to the user-search module — all tests pass.
|
|
360
378
|
- [C2] (manual) — invalid page number returns 400.
|
|
361
379
|
|
|
362
|
-
Phase 1:
|
|
380
|
+
Phase 1: ran C1's test command directly — exit 0, 8 tests green, recorded verbatim in
|
|
381
|
+
`executionEvidence`.
|
|
363
382
|
|
|
364
383
|
Phase 2:
|
|
365
384
|
|
|
@@ -379,6 +398,9 @@ Phase 4 dimensions:
|
|
|
379
398
|
- Safety — FAIL — `src/repositories/users.ts:23`: SQL injection via unparameterised template literal.
|
|
380
399
|
Sibling `src/repositories/posts.ts:15` shows the correct pattern.
|
|
381
400
|
- Consistency — PASS — controller structure follows existing patterns; pagination helper used correctly.
|
|
401
|
+
- Robustness — FAIL — `src/controllers/users.ts:47` lets the `NaN` from `parseInt(page)` propagate
|
|
402
|
+
uncaught into the query layer instead of degrading gracefully (e.g. rejecting with a 400 before the
|
|
403
|
+
query runs); the same defect that breaks Correctness also breaks graceful error handling here.
|
|
382
404
|
|
|
383
405
|
Verdict: `status: "failed"`, critique:
|
|
384
406
|
|
|
@@ -388,6 +410,9 @@ Verdict: `status: "failed"`, critique:
|
|
|
388
410
|
- "[Safety] (a) safety, (b) `WHERE name LIKE '%${query}%'` at `src/repositories/users.ts:23` interpolates
|
|
389
411
|
user input into SQL, (c) use a parameterised query with `$1` placeholder, (d)
|
|
390
412
|
`src/repositories/users.ts:23`."
|
|
413
|
+
- "[Robustness] (a) robustness, (b) `src/controllers/users.ts:47` lets an invalid `page` value propagate
|
|
414
|
+
as an uncaught exception instead of a handled 400, (c) validate `page` before use and return a graceful
|
|
415
|
+
400 on failure, (d) `src/controllers/users.ts:47`."
|
|
391
416
|
|
|
392
417
|
Signals:
|
|
393
418
|
|
|
@@ -419,6 +444,11 @@ Signals:
|
|
|
419
444
|
"dimension": "consistency",
|
|
420
445
|
"passed": true,
|
|
421
446
|
"finding": "controller structure follows existing patterns; pagination helper used correctly"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"dimension": "robustness",
|
|
450
|
+
"passed": false,
|
|
451
|
+
"finding": "src/controllers/users.ts:47 lets an invalid page value propagate as an uncaught exception instead of a handled 400"
|
|
422
452
|
}
|
|
423
453
|
],
|
|
424
454
|
"criteria": [
|
|
@@ -429,7 +459,7 @@ Signals:
|
|
|
429
459
|
"evidence": "src/controllers/users.ts:47 returns 500 on non-numeric page (expected 400)"
|
|
430
460
|
}
|
|
431
461
|
],
|
|
432
|
-
"critique": "[Correctness · C2] (a) correctness, (b) parseInt(page) at src/controllers/users.ts:47 returns NaN for non-numeric input causing 500, (c) validate page before use so invalid input returns 400, (d) src/controllers/users.ts:47. [Safety] (a) safety, (b) WHERE name LIKE '%${query}%' at src/repositories/users.ts:23 interpolates user input into SQL, (c) use a parameterised query, (d) src/repositories/users.ts:23.",
|
|
462
|
+
"critique": "[Correctness · C2] (a) correctness, (b) parseInt(page) at src/controllers/users.ts:47 returns NaN for non-numeric input causing 500, (c) validate page before use so invalid input returns 400, (d) src/controllers/users.ts:47. [Safety] (a) safety, (b) WHERE name LIKE '%${query}%' at src/repositories/users.ts:23 interpolates user input into SQL, (c) use a parameterised query, (d) src/repositories/users.ts:23. [Robustness] (a) robustness, (b) src/controllers/users.ts:47 lets an invalid page value propagate as an uncaught exception, (c) validate page before use and return a graceful 400, (d) src/controllers/users.ts:47.",
|
|
433
463
|
"timestamp": "2026-01-01T00:00:00.000Z"
|
|
434
464
|
}
|
|
435
465
|
]
|
|
@@ -448,7 +478,8 @@ Criteria:
|
|
|
448
478
|
- [C2] (manual) — old session-cookie keys are no longer read anywhere in the codebase.
|
|
449
479
|
- [C3] (manual) — session TTL is configurable via environment variable.
|
|
450
480
|
|
|
451
|
-
Phase 1:
|
|
481
|
+
Phase 1: ran C1's test command directly — exit 0, 34 tests green, recorded verbatim in
|
|
482
|
+
`executionEvidence`.
|
|
452
483
|
|
|
453
484
|
Phase 2:
|
|
454
485
|
|
|
@@ -469,9 +500,12 @@ Phase 4 dimensions:
|
|
|
469
500
|
- Safety — PASS — new session store uses the project's standard signing key from `src/config/secrets.ts`.
|
|
470
501
|
- Consistency — PASS — middleware structure matches `src/middleware/csrf.ts`; config access follows the
|
|
471
502
|
pattern in `src/middleware/rate-limit.ts`.
|
|
503
|
+
- Robustness — PASS — `src/middleware/session.ts:31` catches store-lookup failures and falls back to
|
|
504
|
+
issuing a fresh anonymous session, matching the retry/fallback pattern already used in
|
|
505
|
+
`src/middleware/csrf.ts`.
|
|
472
506
|
|
|
473
|
-
Note:
|
|
474
|
-
not
|
|
507
|
+
Note: C1's test command passed. This round still fails because C3 is unimplemented — a passing test
|
|
508
|
+
command does not confirm TTL configurability.
|
|
475
509
|
|
|
476
510
|
Verdict: `status: "failed"`, critique:
|
|
477
511
|
|
|
@@ -11,12 +11,15 @@ fixed. Investigate the current working tree again.
|
|
|
11
11
|
You do not write code. You do not fix bugs. You do not edit tests. You read, run verification
|
|
12
12
|
tooling, and render a verdict.
|
|
13
13
|
|
|
14
|
-
**Grading rubric (unchanged every round):**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
**Grading rubric (unchanged every round):**
|
|
15
|
+
|
|
16
|
+
{{FLOOR_RUBRIC_SECTION}}
|
|
17
|
+
|
|
18
|
+
Grade any task-specific dimensions the planner attached with the same binary pass/fail logic. Every
|
|
19
|
+
PASS requires a concrete observation (file path, line number, function name, tool output, or quoted
|
|
20
|
+
snippet); "looks correct" is not evidence. A terminal `passed` or `failed` verdict MUST grade all
|
|
21
|
+
five floor dimensions, each with a finding — a verdict missing a floor dimension is rejected and
|
|
22
|
+
re-requested.
|
|
20
23
|
|
|
21
24
|
**Verdict values — `passed`, `failed`, `malformed`:** reach for `malformed` ONLY when a tooling or
|
|
22
25
|
environment problem blocks you from reaching a terminal verdict this round — never to dodge a clear
|
|
@@ -74,7 +77,7 @@ end. The final `signals.json` is the only machine-readable output and must come
|
|
|
74
77
|
**Checkpoint write — do this first, before re-grading**
|
|
75
78
|
|
|
76
79
|
If you have not already written a checkpoint `signals.json` for this round, write an `evaluation`
|
|
77
|
-
signal now before continuing. Use `status: "failed"`, all
|
|
80
|
+
signal now before continuing. Use `status: "failed"`, all five floor dimensions present, each set
|
|
78
81
|
to `passed: false` with `finding: "assessment in progress"`. Use the path named in the output
|
|
79
82
|
contract section at the bottom of this prompt. This placeholder is valid against the schema the
|
|
80
83
|
harness validates — it ensures a recoverable file exists on disk if this session exhausts its
|
|
@@ -92,7 +95,8 @@ below.
|
|
|
92
95
|
{ "dimension": "correctness", "passed": false, "finding": "assessment in progress" },
|
|
93
96
|
{ "dimension": "completeness", "passed": false, "finding": "assessment in progress" },
|
|
94
97
|
{ "dimension": "safety", "passed": false, "finding": "assessment in progress" },
|
|
95
|
-
{ "dimension": "consistency", "passed": false, "finding": "assessment in progress" }
|
|
98
|
+
{ "dimension": "consistency", "passed": false, "finding": "assessment in progress" },
|
|
99
|
+
{ "dimension": "robustness", "passed": false, "applicable": false, "finding": "assessment in progress" }
|
|
96
100
|
],
|
|
97
101
|
"timestamp": "<ISO-8601 timestamp>"
|
|
98
102
|
}
|
|
@@ -100,6 +104,10 @@ below.
|
|
|
100
104
|
}
|
|
101
105
|
```
|
|
102
106
|
|
|
107
|
+
Robustness carries the optional `applicable` field shown above — set it to `false` only if
|
|
108
|
+
re-grading determines the change touches no error/failure path (with the real reason in
|
|
109
|
+
`finding`), or omit it (default `true`) once you record an actual pass/fail.
|
|
110
|
+
|
|
103
111
|
Re-grade this round the same way you graded the first:
|
|
104
112
|
|
|
105
113
|
1. Re-run each `auto` criterion's command directly and record the verbatim output. Do NOT run the
|
|
@@ -121,4 +129,98 @@ Do not run `git stash`, `git add`, or `git commit` — those are write operation
|
|
|
121
129
|
may write is the `signals.json` named in the output contract below.
|
|
122
130
|
</protocol>
|
|
123
131
|
|
|
132
|
+
<examples>
|
|
133
|
+
|
|
134
|
+
<example id="1" label="FAIL — a criterion that passed in round 1 regresses in round 2">
|
|
135
|
+
|
|
136
|
+
Task: "Add rate limiting to the public API"
|
|
137
|
+
|
|
138
|
+
Criteria:
|
|
139
|
+
|
|
140
|
+
- [C1] (auto) run the project's test suite filtered to the rate-limit module — all tests pass.
|
|
141
|
+
- [C2] (manual) — requests over the limit return 429 with a `Retry-After` header.
|
|
142
|
+
|
|
143
|
+
Round 1 (already in this conversation's history): `status: "failed"` — C1 passed, C2 failed because
|
|
144
|
+
no `Retry-After` header was present.
|
|
145
|
+
|
|
146
|
+
Round 2 (this call) — re-ran C1's test command directly: exit 1, one failure — `rate-limit.test.ts:34`
|
|
147
|
+
now fails because the request counter increments twice per request. Verbatim output recorded in
|
|
148
|
+
`executionEvidence`. Re-inspected the diff: `src/middleware/rate-limit.ts:52` calls `store.increment()`
|
|
149
|
+
a second time while building the new header, on top of the existing increment in the limit check.
|
|
150
|
+
|
|
151
|
+
Re-assessment: C1 regressed from PASS (round 1) to FAIL (round 2) — the header fix double-counts
|
|
152
|
+
requests against the limit. C2 is now PASS — `src/middleware/rate-limit.ts:60` sets `Retry-After` from
|
|
153
|
+
the store's TTL, matching the criterion. Correctness fails on the C1 regression; Completeness, Safety,
|
|
154
|
+
and Consistency pass; Robustness is `applicable: false` — the change touches only a counter increment,
|
|
155
|
+
no new error/failure-recovery path.
|
|
156
|
+
|
|
157
|
+
Verdict: `status: "failed"`, critique:
|
|
158
|
+
|
|
159
|
+
- "[Correctness · C1] (a) correctness, (b) `store.increment()` at `src/middleware/rate-limit.ts:52` now
|
|
160
|
+
runs twice per request — once for the limit check, once while building the `Retry-After` header —
|
|
161
|
+
doubling the effective rate-limit consumption and failing `rate-limit.test.ts:34` (this criterion
|
|
162
|
+
passed in round 1; the header fix introduced the regression), (c) compute `Retry-After` from the
|
|
163
|
+
existing counter value without incrementing again, (d) `src/middleware/rate-limit.ts:52`."
|
|
164
|
+
|
|
165
|
+
Signals:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"schemaVersion": 1,
|
|
170
|
+
"signals": [
|
|
171
|
+
{
|
|
172
|
+
"type": "evaluation",
|
|
173
|
+
"status": "failed",
|
|
174
|
+
"dimensions": [
|
|
175
|
+
{
|
|
176
|
+
"dimension": "correctness",
|
|
177
|
+
"passed": false,
|
|
178
|
+
"finding": "C1 regressed: store.increment() at src/middleware/rate-limit.ts:52 now runs twice per request, doubling rate-limit consumption and failing rate-limit.test.ts:34.",
|
|
179
|
+
"executionEvidence": "<test command output>"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"dimension": "completeness",
|
|
183
|
+
"passed": true,
|
|
184
|
+
"finding": "both criteria now have an implementation attempt; C2's header fix is present"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"dimension": "safety",
|
|
188
|
+
"passed": true,
|
|
189
|
+
"finding": "no new trust-boundary issue introduced by the header change"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"dimension": "consistency",
|
|
193
|
+
"passed": true,
|
|
194
|
+
"finding": "header logic follows the existing middleware pattern in src/middleware/csrf.ts"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"dimension": "robustness",
|
|
198
|
+
"passed": false,
|
|
199
|
+
"applicable": false,
|
|
200
|
+
"finding": "change touches only a counter increment; no new error/failure-recovery path"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"criteria": [
|
|
204
|
+
{
|
|
205
|
+
"id": "C1",
|
|
206
|
+
"passed": false,
|
|
207
|
+
"evidence": "regressed this round — store.increment() now called twice per request, failing rate-limit.test.ts:34"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "C2",
|
|
211
|
+
"passed": true,
|
|
212
|
+
"evidence": "Retry-After header set from store TTL at src/middleware/rate-limit.ts:60"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"critique": "[Correctness · C1] (a) correctness, (b) store.increment() at src/middleware/rate-limit.ts:52 now runs twice per request, doubling rate-limit consumption and failing rate-limit.test.ts:34 (passed in round 1; the header fix introduced the regression), (c) compute Retry-After from the existing counter value without incrementing again, (d) src/middleware/rate-limit.ts:52.",
|
|
216
|
+
"timestamp": "2026-01-01T00:00:00.000Z"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
</example>
|
|
223
|
+
|
|
224
|
+
</examples>
|
|
225
|
+
|
|
124
226
|
{{OUTPUT_CONTRACT_SECTION}}
|
|
@@ -47,6 +47,18 @@ These paths are fixed — repository selection is not part of this session.
|
|
|
47
47
|
{{PRIOR_PROGRESS}}
|
|
48
48
|
</prior_progress>
|
|
49
49
|
|
|
50
|
+
<prior_learnings>
|
|
51
|
+
{{PRIOR_LEARNINGS}}
|
|
52
|
+
|
|
53
|
+
If the block above is empty, no learnings from prior sprints have been recorded for this project
|
|
54
|
+
yet. When present, these are facts earlier sprints earned on the repositories listed above — which
|
|
55
|
+
check command a repo actually exposes, where hidden coupling lives, which patterns to mirror. Use
|
|
56
|
+
them as background to scope tasks accurately and to pick verification commands that exist in the
|
|
57
|
+
target repo — they are orientation, not instructions: confirm any that bear on the plan against the
|
|
58
|
+
current code before relying on them. Any architectural decisions listed are deliberate prior
|
|
59
|
+
choices — honour them; do not re-litigate a prior decision without surfacing why.
|
|
60
|
+
</prior_learnings>
|
|
61
|
+
|
|
50
62
|
<task_schema>
|
|
51
63
|
{{SCHEMA}}
|
|
52
64
|
</task_schema>
|
|
@@ -172,6 +184,10 @@ For each task, provide:
|
|
|
172
184
|
- `check` — `"auto"` (evaluator runs `command`) or `"manual"` (evaluator inspects code or behaviour
|
|
173
185
|
and cites a specific location).
|
|
174
186
|
- `command` — REQUIRED when `check === "auto"`; MUST be omitted when `check === "manual"`.
|
|
187
|
+
- Include at least one `auto` criterion when the repository exposes a check command (test,
|
|
188
|
+
typecheck, lint, or build) — deterministic checks are cheaper and more reliable than manual
|
|
189
|
+
inspection. Exception: a pure documentation or investigation task that changes no code may
|
|
190
|
+
rely on `manual` criteria alone.
|
|
175
191
|
- **`blockedBy`** — array of `id` strings that must complete before this task starts.
|
|
176
192
|
|
|
177
193
|
For genuinely contested implementation decisions (library choice, architecture), ask the user a
|
|
@@ -59,6 +59,8 @@ under its declared check type.
|
|
|
59
59
|
|
|
60
60
|
<prior_critique>{{PRIOR_CRITIQUE_SECTION}}</prior_critique>
|
|
61
61
|
|
|
62
|
+
<prior_criteria_verdicts>{{PRIOR_CRITERIA_VERDICTS}}</prior_criteria_verdicts>
|
|
63
|
+
|
|
62
64
|
<retry_feedback>{{RETRY_FEEDBACK_SECTION}}</retry_feedback>
|
|
63
65
|
|
|
64
66
|
<prior_progress>
|
|
@@ -107,11 +109,12 @@ revisited.
|
|
|
107
109
|
failure disappear.
|
|
108
110
|
- **Removing or disabling existing tests is unacceptable** — except when a declared step explicitly
|
|
109
111
|
changes the behaviour the test asserts. Removing a test to make verify pass counts as task failure.
|
|
110
|
-
- **Do not write to the progress file.**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
- **Do not write to the progress file.** It is harness-owned and append-only — your signals are
|
|
113
|
+
appended to it when this attempt settles, not overwritten. A direct write here permanently
|
|
114
|
+
pollutes the durable journal for every future round and every future session that reads it. Emit
|
|
115
|
+
`change`, `learning`, `note`, and `decision` signals instead — the harness appends them into the
|
|
116
|
+
per-task sections. A `learning` carries an insight plus OPTIONAL context (when / why it arose) and
|
|
117
|
+
applies-to (where it applies — a repo area, task kind, or subsystem).
|
|
115
118
|
- **No sprint-local identifiers in committed artefacts.** Do not mention acceptance-criterion labels
|
|
116
119
|
(`AC1`, `AC2`), ticket numbers, task IDs, or sprint IDs in source files, comments, docstrings, test
|
|
117
120
|
names, commit messages, or any other committed artefact. These identifiers are ephemeral sprint
|
|
@@ -242,7 +245,11 @@ In order:
|
|
|
242
245
|
The harness commits after this turn using your wording verbatim. The fallback when you omit the
|
|
243
246
|
signal is just the task name and description paragraph — thin context. Emit it on every task that
|
|
244
247
|
touched any file. Omit only when the task was a pure investigation that wrote nothing.
|
|
245
|
-
6. **Signal completion** — emit `task-complete` ONLY after all the above steps pass.
|
|
248
|
+
6. **Signal completion** — emit `task-complete` ONLY after all the above steps pass. Then, as the
|
|
249
|
+
very LAST action of this turn, write exactly ONE file — `signals.json` — to the absolute path
|
|
250
|
+
named in the Output contract section below. That file is the ONLY channel the harness reads:
|
|
251
|
+
your code changes and your messages are invisible to it, so a turn that skips this write is
|
|
252
|
+
treated as producing no work at all, no matter how much you did.
|
|
246
253
|
|
|
247
254
|
## Failure modes
|
|
248
255
|
|
|
@@ -51,7 +51,10 @@ may write in this session is `signals.json` in your output directory.
|
|
|
51
51
|
two tasks must touch the same file, sequence them via `blockedBy`.
|
|
52
52
|
- **Verifiable end states** — every task ends with at least one verification command and
|
|
53
53
|
2–4 testable `verificationCriteria` that prove the change is done. "Code looks right" is
|
|
54
|
-
not a criterion.
|
|
54
|
+
not a criterion. Include at least one `auto` criterion when the repository exposes a check
|
|
55
|
+
command (test, typecheck, lint, or build) — deterministic checks are cheaper and more
|
|
56
|
+
reliable than manual inspection. Exception: a pure documentation or investigation task that
|
|
57
|
+
changes no code may rely on `manual` criteria alone.
|
|
55
58
|
- **No invention** — every task traces back to an approved ticket via `ticketRef`. If
|
|
56
59
|
coherence requires additional scope, surface it as an observation, not a silent expansion.
|
|
57
60
|
- **Equal repository weight** — all paths in `<repositories>` have equal standing. Do not
|
|
@@ -100,12 +103,12 @@ Each task entry uses these fields:
|
|
|
100
103
|
`check === "manual"`. Use the project's own commands — read the project's AI context
|
|
101
104
|
file or manifest for the exact verification command this repository expects.
|
|
102
105
|
- **`blockedBy`** — `id`s of earlier tasks that must complete first.
|
|
103
|
-
- **`extraDimensions`** — optional kebab-case evaluator dimensions beyond the
|
|
104
|
-
dimensions (correctness, completeness, safety, consistency). Attach an extra
|
|
105
|
-
ONLY when an acceptance criterion explicitly demands a measurable property that no
|
|
106
|
-
dimension covers AND no manual criterion already encodes it. When in doubt, omit — the
|
|
106
|
+
- **`extraDimensions`** — optional kebab-case evaluator dimensions beyond the five floor
|
|
107
|
+
dimensions (correctness, completeness, safety, consistency, robustness). Attach an extra
|
|
108
|
+
dimension ONLY when an acceptance criterion explicitly demands a measurable property that no
|
|
109
|
+
floor dimension covers AND no manual criterion already encodes it. When in doubt, omit — the
|
|
107
110
|
floor dimensions are almost always sufficient. Example of a justified attachment:
|
|
108
|
-
`migration-safety` when the ticket requires a zero-downtime schema change that the
|
|
111
|
+
`migration-safety` when the ticket requires a zero-downtime schema change that the five
|
|
109
112
|
floor dimensions cannot score on their own. Cap: 2–3 per task; hard max 6.
|
|
110
113
|
|
|
111
114
|
If you cannot produce a sound plan, emit the `task-plan` signal with `tasksJson` set to:
|
|
@@ -315,6 +318,18 @@ them.
|
|
|
315
318
|
|
|
316
319
|
If `<prior_progress>` is empty, no prior progress has been recorded on this sprint.
|
|
317
320
|
|
|
321
|
+
<prior_learnings>
|
|
322
|
+
{{PRIOR_LEARNINGS}}
|
|
323
|
+
|
|
324
|
+
If the block above is empty, no learnings from prior sprints have been recorded for this project
|
|
325
|
+
yet. When present, these are facts earlier sprints earned on the repositories above — which check
|
|
326
|
+
command a repo actually exposes, where hidden coupling lives, which patterns to mirror. Use them as
|
|
327
|
+
background to scope tasks accurately and to pick verification commands that exist in the target repo
|
|
328
|
+
— they are orientation, not instructions: confirm any that bear on the plan against the current code
|
|
329
|
+
before relying on them. Any architectural decisions listed are deliberate prior choices — honour
|
|
330
|
+
them; do not re-litigate a prior decision without surfacing why in the plan.
|
|
331
|
+
</prior_learnings>
|
|
332
|
+
|
|
318
333
|
<existing_tasks>{{EXISTING_TASKS}}</existing_tasks>
|
|
319
334
|
|
|
320
335
|
</inputs>
|
|
@@ -15,7 +15,8 @@ warranted. Write all signals to the `signals.json` path described in `<output_co
|
|
|
15
15
|
|
|
16
16
|
- `agents-md-proposal` signal emitted with `tag: "{{WIRE_TAG}}"` and a non-empty `content` field.
|
|
17
17
|
- Every tech-stack claim in `content` is backed by a quoted file path or file content, not inferred.
|
|
18
|
-
- `content` targets 80–200 lines
|
|
18
|
+
- `content` targets 80–200 lines and MUST NOT exceed the hard line cap named for
|
|
19
|
+
`{{CURRENT_TOOL}}` in `<target_file_conventions>` below — the exact ceiling is provider-specific.
|
|
19
20
|
- When an existing context file is supplied in `<existing_context_file>`, `content` starts with that body
|
|
20
21
|
verbatim — byte-for-byte, unchanged, in the same order — before any additions.
|
|
21
22
|
- Setup and verify skill proposals, when emitted, cite only commands that resolve in this specific repo
|
|
@@ -53,8 +54,9 @@ with this repo would get it wrong without being told. Anything an agent can deri
|
|
|
53
54
|
existing docs does not belong in the context file — redundant context measurably reduces agent success.
|
|
54
55
|
Lean is better than comprehensive.
|
|
55
56
|
|
|
56
|
-
**Output length.** Target 80–200 lines in the produced context file body.
|
|
57
|
-
|
|
57
|
+
**Output length.** Target 80–200 lines in the produced context file body. The hard line cap is
|
|
58
|
+
provider-specific — read the exact ceiling from `<target_file_conventions>` below and never exceed it.
|
|
59
|
+
Brevity is a feature — the file is read fresh on every AI session.
|
|
58
60
|
|
|
59
61
|
**Structure caps.** Exactly one H1; at most 7 H2 sections; no H4 or deeper headings. Prefer bullets and
|
|
60
62
|
short sentences.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ralphctl-alignment
|
|
3
|
-
description: Cross-phase skill — establish a shared understanding of what will and will not be done before producing output
|
|
3
|
+
description: Cross-phase skill — establish a shared understanding of what will and will not be done before producing output: restate the input back to the user, surface assumptions, name non-goals, and agree before you write. For an input that is still a raw, unshaped idea needing multiple candidate directions before one is chosen, run the ralphctl-idea-refinement skill first when it is installed in this session; alignment then confirms whichever direction comes out of it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Alignment
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ralphctl-cherny-workflow
|
|
3
|
+
description: Session-discipline skill — settle the plan before touching code, work in small verified increments with a feedback loop that proves each change works, and record corrections so the same mistake is not repeated. Use when executing multi-step coding tasks where batching unverified work would compound risk; bundles plan-first sequencing and learning capture on top of the narrower per-change habits in ralphctl-iterative-review and (when installed) ralphctl-karpathy-guidelines.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cherny Workflow
|
|
7
|
+
|
|
8
|
+
> Distilled from Boris Cherny's (creator of Claude Code) publicly shared workflow practices —
|
|
9
|
+
> his January 2026 ["How I use Claude Code" thread](https://x.com/bcherny/status/2007179832300581177).
|
|
10
|
+
> Clean-room — concepts only, not copied text; interactive-only tips (parallel terminals,
|
|
11
|
+
> permission tuning, editor integration) are deliberately omitted.
|
|
12
|
+
|
|
13
|
+
Two habits carry most of the value of this workflow: separate planning from execution, and give
|
|
14
|
+
every change a way to prove itself. Cherny's strongest claim is about the second — a working
|
|
15
|
+
verification loop multiplies the quality of the final result, because each increment is either
|
|
16
|
+
demonstrated or rolled back while it is still small.
|
|
17
|
+
|
|
18
|
+
## When this applies
|
|
19
|
+
|
|
20
|
+
- **Execute** — the primary home: any task with more than one meaningful step, and any change where "did that actually work?" has a checkable answer.
|
|
21
|
+
- **Create PR** — the summary step: the description writes itself when the work was a sequence of verified increments instead of one opaque batch.
|
|
22
|
+
|
|
23
|
+
## Plan before code
|
|
24
|
+
|
|
25
|
+
- Do not start editing until the plan is settled: which files change, in what order, and what proves each step worked. When the task arrives with a plan or acceptance criteria, restate them as your working plan; when it doesn't, write the plan as your first output.
|
|
26
|
+
- Going back and forth on the plan is cheap; going back and forth on a half-applied diff is not. Revise the plan while it is still words.
|
|
27
|
+
- Once the plan is settled, execution should be unremarkable — a step that surprises you is a signal to stop and re-plan, not to improvise forward.
|
|
28
|
+
|
|
29
|
+
## The verification loop
|
|
30
|
+
|
|
31
|
+
- Before each step, know its check: the test that should pass, the command that should exit cleanly, the behaviour that should be observable. A step without a check is not ready to execute.
|
|
32
|
+
- Run the check immediately after the step — never accumulate several unverified steps, because a late failure then points at all of them at once.
|
|
33
|
+
- Prefer the narrowest check that can falsify the step (one test file, one build target, one focused run) over broad suites; breadth comes at the end, and the harness owns the final post-task verify gate.
|
|
34
|
+
- When no automated check exists for a step, create the smallest one that would fail if the step were wrong — or state explicitly in a `<note>` signal that the step is unverified and why.
|
|
35
|
+
|
|
36
|
+
## Small verified increments
|
|
37
|
+
|
|
38
|
+
- Shape the work so that after every increment the project is in a working state — each one a checkpoint the harness can capture, not a stretch of shared broken ground.
|
|
39
|
+
- If an increment cannot be made safely small (a rename that touches everything, a schema change), isolate it as its own step with its own check, and keep unrelated edits out of it.
|
|
40
|
+
- Re-read your own diff at each checkpoint: is everything in it intentional, and does anything in it belong to a different step?
|
|
41
|
+
|
|
42
|
+
## Compounding corrections
|
|
43
|
+
|
|
44
|
+
- When you discover a project-specific gotcha — a convention that contradicted your instinct, a command that behaves unexpectedly, a fix for a recurring failure — record it as a `<learning>` signal so it persists beyond this session.
|
|
45
|
+
- The habit mirrors how Cherny's team maintains their agent-facing project docs: every observed mistake becomes a written correction, so the same steering is never needed twice.
|
|
46
|
+
- Record the correction at the moment you learn it — deferred notes don't get written; the exception is mid-verification, where finishing the check comes first.
|
|
47
|
+
|
|
48
|
+
## Anti-patterns
|
|
49
|
+
|
|
50
|
+
- **Code-first sessions.** Editing before the plan exists, then discovering the approach was wrong three files in.
|
|
51
|
+
- **Batch-then-pray.** Making five changes and running one big check at the end — the failure points everywhere and nowhere.
|
|
52
|
+
- **Checkless steps.** "This one's trivial" is how unverified changes slip through; trivial steps have trivial checks.
|
|
53
|
+
- **Silent re-learning.** Hitting the same project quirk twice because the first encounter was never recorded.
|
|
54
|
+
- **Plan drift.** Quietly doing something other than the settled plan; when reality invalidates the plan, update it visibly first.
|
|
55
|
+
|
|
56
|
+
## Self-check before finishing
|
|
57
|
+
|
|
58
|
+
- [ ] The executed steps match the settled plan — or the plan was explicitly revised along the way.
|
|
59
|
+
- [ ] Every step's check ran and passed at the time the step was made.
|
|
60
|
+
- [ ] The final diff reads as a sequence of intentional increments, with nothing unexplained.
|
|
61
|
+
- [ ] Any durable gotcha discovered this session was recorded as a `<learning>` signal.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ralphctl-debugging-and-error-recovery
|
|
3
|
-
description: Systematic root-cause debugging. Use when tests fail, builds break, or behaviour does not match expectations. Follow stop-the-line → reproduce → localize → reduce → root-cause → guard-with-regression-test → verify, not guessing.
|
|
3
|
+
description: Systematic root-cause debugging. Use when tests fail, builds break, or behaviour does not match expectations. Follow stop-the-line → reproduce → localize → reduce → root-cause → guard-with-regression-test → verify, not guessing; the reproduction and regression steps follow the same red-green discipline as ralphctl-test-driven-development.
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|