@ritualai/cli 0.36.28 → 0.36.35
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/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +3 -3
- package/skills/claude-code/ritual/SKILL.md +1 -1
- package/skills/claude-code/ritual/references/build-flow.md +91 -57
- package/skills/claude-code/ritual/references/cli-output-contract.md +4 -4
- package/skills/claude-code/ritual/references/lite-flow.md +92 -58
- package/skills/codex/ritual/.ritual-bundle.json +3 -3
- package/skills/codex/ritual/SKILL.md +1 -1
- package/skills/codex/ritual/references/build-flow.md +91 -57
- package/skills/codex/ritual/references/cli-output-contract.md +4 -4
- package/skills/codex/ritual/references/lite-flow.md +92 -58
- package/skills/cursor/ritual/.ritual-bundle.json +3 -3
- package/skills/cursor/ritual/SKILL.md +1 -1
- package/skills/cursor/ritual/references/build-flow.md +91 -57
- package/skills/cursor/ritual/references/cli-output-contract.md +4 -4
- package/skills/cursor/ritual/references/lite-flow.md +92 -58
- package/skills/gemini/ritual/.ritual-bundle.json +3 -3
- package/skills/gemini/ritual/SKILL.md +1 -1
- package/skills/gemini/ritual/references/build-flow.md +91 -57
- package/skills/gemini/ritual/references/cli-output-contract.md +4 -4
- package/skills/gemini/ritual/references/lite-flow.md +92 -58
- package/skills/kiro/ritual/.ritual-bundle.json +3 -3
- package/skills/kiro/ritual/SKILL.md +1 -1
- package/skills/kiro/ritual/references/build-flow.md +91 -57
- package/skills/kiro/ritual/references/cli-output-contract.md +4 -4
- package/skills/kiro/ritual/references/lite-flow.md +92 -58
- package/skills/vscode/ritual/.ritual-bundle.json +3 -3
- package/skills/vscode/ritual/SKILL.md +1 -1
- package/skills/vscode/ritual/references/build-flow.md +91 -57
- package/skills/vscode/ritual/references/cli-output-contract.md +4 -4
- package/skills/vscode/ritual/references/lite-flow.md +92 -58
|
@@ -73,6 +73,41 @@ Pausing discipline is still load-bearing — every `[USER PAUSE]` later in the f
|
|
|
73
73
|
|
|
74
74
|
Every message should be the prescribed gate copy (rail + content + CTA) — terse, plain, no preamble, no sign-off commentary.
|
|
75
75
|
|
|
76
|
+
<!-- skill-options:no-gate-change: 2026-06-16 voice/copy polish — adds the Copy rules block, plainer overlap/workspace/verification/discovery render copy, and a causal pulse gloss. No tracked pause gate, option token, or Step header is added, removed, or renamed (structural baseline unchanged: 22 pauses / 26 steps). -->
|
|
77
|
+
|
|
78
|
+
**Copy rules (the calm-CLI-wizard contract — every gate obeys these):**
|
|
79
|
+
1. **Never print process/eval labels.** No `GATE N`, no `Step N`, no `Auto-decision: …`, no `LLM confidence`, no async-polling-contract talk. The rail already shows where we are — use the rail or a compact header (`Ritual build · 2/6 Scope`), never both, and never a `GATE N` banner.
|
|
80
|
+
2. **One decision per message.** Never bundle two gates (e.g. workspace-bind + overlap check) into one visible block. Render one gate, take the reply, then the next.
|
|
81
|
+
3. **End every decision gate with one clear CTA line.** A single `Reply …` / `Next: …` line, not a paragraph of options.
|
|
82
|
+
4. **Lead with "Recommended: …"** instead of multi-line justification. State the recommendation; don't explain why across several lines.
|
|
83
|
+
5. **Status updates are one sentence, no rail** (unless the stage changed). "Still preparing the brief — retrying safely." — never "Timeout on generate call — polling status (per async-polling contract)."
|
|
84
|
+
6. **Use user nouns, not internal shorthand:** workspace history (not KG), build requirements (not RB list), follow-ups (not deferrals), recommendations (not recs), signed-in user (not principal), "saves this selection" (not "commits the set"), strong/likely/possible match (not a confidence %).
|
|
85
|
+
7. **Hide mechanism unless it changes what the user should do.** Names of engine internals, scoring tiers, citation ids, and contracts stay out of gate copy.
|
|
86
|
+
8. **Only three kinds of message may be user-visible — nothing else (allowlist, load-bearing).** Between gates you output EITHER nothing, OR exactly one approved status line, OR the next gate (which OPENS with its rail — no preamble before it). Never narrate machinery: no "I'll read the reference files…", no "Classifying the job…", no "Running silent recon…", no "Polling / Fetching / Computing / Committing / Submitting / Triggering …", no "skipping … silently", no step numbers, no tool / schema / phase names. The **only** status lines that may appear between gates — render one of these verbatim, or stay silent:
|
|
87
|
+
- `Generating discovery questions…`
|
|
88
|
+
- `Saving selected questions…`
|
|
89
|
+
- `Answering {N} questions from the codebase…`
|
|
90
|
+
- `{N} answers saved. Generating recommendations…`
|
|
91
|
+
- `Generating recommendations…`
|
|
92
|
+
- `Recommendations ready.`
|
|
93
|
+
- `Requirements ready.`
|
|
94
|
+
- `Still generating…` / `Still preparing…` (while a slow step runs)
|
|
95
|
+
- `No related prior runs in this workspace — starting a new run.` (empty-overlap case only)
|
|
96
|
+
|
|
97
|
+
A gate must OPEN with its rail. Do **not** print "Computing the suggested 12…", "Rendering the landing", or any "here's what I'm about to show you" line before the rail. And never advance the rail to a stage that hasn't started — mark a stage active (●) only once its work is actually running. (Anything outside these three shapes is caught by the behavioral eval's `no_render_leaks` allowlist.)
|
|
98
|
+
|
|
99
|
+
**Render-allowlist precedence (load-bearing — this rule outranks every example below).** This allowlist overrides every local example in the rest of this file. If a later section says to "tell the user", "emit one line", "print", "surface", or "render" a status that is **not** in the list above, treat that instruction as **stale** and do not render it — unless it is a full gate template that begins with the rail. **Never render transition narration after a user reply.** After any reply, the next visible message is exactly one of: the next gate, one approved status line, or nothing. A line that announces what you just did or are about to do ("Workspace selected. Now checking…", "Moving to scope", "Job confirmed. Now…") is forbidden even though no example prescribes it — the rail already shows where we are.
|
|
100
|
+
|
|
101
|
+
(These are enforced on authored copy by `scripts/check-skill-voice.mjs`; agent-invented violations — like the ones above — are caught by the behavioral eval's `no_render_leaks` linter reading the rendered snapshots.)
|
|
102
|
+
|
|
103
|
+
<!-- skill-options:no-gate-change: 2026-06-16 round-2 leak polish — adds voice rule #8 (no machinery narration between gates), plainer job-gate CTA + brief-handoff copy, tightened ordering-barrier wording. No tracked pause gate, option token, or Step header is added, removed, or renamed (structural baseline unchanged: 22 pauses / 26 steps). -->
|
|
104
|
+
|
|
105
|
+
<!-- skill-options:no-gate-change: 2026-06-16 round-3 leak polish — turns voice rule #8 into a render allowlist (gate | approved status | nothing) with the verbatim status list; compacts the Job gate to one validation sentence; plainer workspace/overlap/rec-CTA copy; accept-recs screen keeps the next stage ○ not ●. Copy + behavioral rules only — no tracked pause gate, option token, or Step header is added, removed, or renamed (structural baseline unchanged: 22 pauses / 26 steps). -->
|
|
106
|
+
|
|
107
|
+
<!-- skill-options:no-gate-change: 2026-06-16 vocab cleanup — de-jargons internal labels the agent was parroting ("ordering barrier" → "before the Job gate is confirmed"; "silent recon" / "codebase recon" → "reading the codebase"). Wording only — no tracked pause gate, option token, or Step header is added, removed, or renamed (structural baseline unchanged: 22 pauses / 26 steps). -->
|
|
108
|
+
|
|
109
|
+
<!-- skill-options:no-gate-change: 2026-06-16 allowlist-precedence pass — adds the render-allowlist precedence clause + no-transition-narration rule to voice rule #8, expands the approved-status list (Saving selected questions / Requirements ready / empty-overlap line), and normalizes conflicting local examples (Step 4 prior-work callout, Step 5.7 internal-only heading, discovery-landing copy, sub-problem parenthetical removed, categoryName grouping key, "skip silently" → "no user-visible output", resume picker "explorations" → "prior runs"). Copy + behavioral only — no tracked pause gate, option token, or Step header is added, removed, or renamed (structural baseline unchanged: 22 pauses / 26 steps). -->
|
|
110
|
+
|
|
76
111
|
**Per-agent indicators** (informational, for the SKILL's own awareness — NOT to gate behavior):
|
|
77
112
|
|
|
78
113
|
| Agent | Where the mode shows up |
|
|
@@ -120,6 +155,10 @@ When this gate runs:
|
|
|
120
155
|
(the user describes what they want to build), run this gate before continuing.
|
|
121
156
|
- Resume paths (Step 1.5 → resume) → skip this gate entirely; the exploration's job is already set.
|
|
122
157
|
|
|
158
|
+
<!-- skill-options:no-gate-change: ordering barrier + overlap-render copy cleanup — adds a behavioral rule and rewrites prescribed render copy; adds/removes no tracked pause gate, option token, or Step header -->
|
|
159
|
+
|
|
160
|
+
**Before the Job gate is confirmed (load-bearing, forbidden behavior — this rule is internal; never name it to the user).** For `/ritual build <ask>`, `classify_work_item` is the FIRST tool call, and **until the Job gate is confirmed you must NOT**: read `.ritual/config.json`, call `list_workspaces`, or mention workspace/config state. Workspace selection (Step 1) begins ONLY after the Job gate is confirmed. Narrating the upcoming step — e.g. *"Now I have the classification. No `.ritual/config.json` found, so I'll list workspaces next…"* — is a forbidden process-leak: render the Job gate's prescribed copy and nothing else (no plan narration, no "I'll … next"). (The classifier needs no workspace context; passing one is unnecessary.) This rule only constrains what you may inspect and say *before* confirmation — the normal gate rules govern pausing/turn-handling, unchanged.
|
|
161
|
+
|
|
123
162
|
1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
|
|
124
163
|
classify yourself, do NOT pre-filter to development jobs. It returns
|
|
125
164
|
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
|
|
@@ -137,13 +176,9 @@ When this gate runs:
|
|
|
137
176
|
Ritual build
|
|
138
177
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
139
178
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Once you run the exploration and review recommendations, a {deliverableTemplate} will be
|
|
143
|
-
created as context for your coding agent.
|
|
179
|
+
Ritual will produce a {deliverableTemplate} for {restate the ask in one short clause}.
|
|
144
180
|
|
|
145
|
-
Reply `proceed`
|
|
146
|
-
job actually is.
|
|
181
|
+
Reply `proceed` if that's right, or tell me what to adjust.
|
|
147
182
|
```
|
|
148
183
|
|
|
149
184
|
**2b — No specific job matched, FIRST time** (`isGenericFallback` is `true` — the result is the
|
|
@@ -245,10 +280,10 @@ Resolution order:
|
|
|
245
280
|
|
|
246
281
|
<!-- skill-options:no-gate-change: adds explainer prose to the existing workspace-pick gate; options and pause unchanged -->
|
|
247
282
|
|
|
248
|
-
>
|
|
249
|
-
> A workspace
|
|
283
|
+
> This repo isn't connected to a workspace yet.
|
|
284
|
+
> A workspace keeps the context and reasoning Ritual needs for future runs.
|
|
250
285
|
>
|
|
251
|
-
>
|
|
286
|
+
> Where should Ritual save this run?
|
|
252
287
|
> {numbered list}
|
|
253
288
|
|
|
254
289
|
**[USER PAUSE]** for selection.
|
|
@@ -348,7 +383,7 @@ Steps:
|
|
|
348
383
|
|
|
349
384
|
If `raw_input` is present, frame this as an overlap/continuation check before starting fresh:
|
|
350
385
|
|
|
351
|
-
> I see {N}
|
|
386
|
+
> I see {N} prior run{s} in this workspace:
|
|
352
387
|
>
|
|
353
388
|
> **{state_glyph} {state_label}** ({count})
|
|
354
389
|
>
|
|
@@ -605,25 +640,27 @@ Steps:
|
|
|
605
640
|
|
|
606
641
|
- **If `candidates.length === 0`**: silently proceed to Step 2. Don't mention the overlap check happened. The whole point of the two-tier filter is silence in the common case.
|
|
607
642
|
|
|
608
|
-
|
|
643
|
+
<!-- skill-options:no-gate-change: 2026-06-16 overlap-gate copy — disambiguates it from the workspace picker (anchors "Using workspace:", drops "exploration"/"overlap" headline, names continue/inspect/new). Displayed start-fresh verb changes proceed→`new` but `proceed` stays an accepted silent alias; the pause, the three semantic options (resume/details/start-fresh), and the structural baseline (22 pauses / 26 steps) are unchanged. -->
|
|
644
|
+
|
|
645
|
+
- **If `candidates.length > 0`**: surface a COMPACT callout BEFORE moving to Step 2 — a match list + one recommendation + one CTA. No URLs, no per-candidate "why it overlaps" essay, no future field names:
|
|
609
646
|
|
|
610
|
-
>
|
|
647
|
+
> Using workspace: {workspace.name}.
|
|
611
648
|
>
|
|
612
|
-
>
|
|
613
|
-
>
|
|
614
|
-
>
|
|
615
|
-
>
|
|
616
|
-
>
|
|
649
|
+
> I found related prior runs in this workspace. You can continue one, inspect one, or start a new run.
|
|
650
|
+
>
|
|
651
|
+
> {for each candidate (in order, strongest first), numbered from 1:}
|
|
652
|
+
> {N}. **{candidate.name}** — {candidate.matchLabel}
|
|
653
|
+
> {candidate.problemStatement, first ~100 chars, one line}
|
|
617
654
|
> {endfor}
|
|
618
655
|
>
|
|
619
|
-
>
|
|
620
|
-
>
|
|
621
|
-
|
|
622
|
-
|
|
656
|
+
> Recommended: continue one if it's the work you meant.
|
|
657
|
+
> Reply `resume 1`, `details 1`, or `new` to start a new run.
|
|
658
|
+
|
|
659
|
+
This gate looks like the workspace picker but isn't — the workspace is already chosen (anchor it with the `Using workspace:` line), and this screen is only about reusing related prior work vs. starting fresh. Do NOT headline it with "exploration" or "overlap". `check_exploration_overlap` returns `matchLabel` as plain language (`strong match` / `likely match` / `possible match`) — render it verbatim; the raw model confidence is projected out, so there is no number to surface. The model's `whyOverlaps` rationale and the exploration URL are NOT rendered at the gate — they live behind `details {N}`.
|
|
623
660
|
|
|
624
|
-
-
|
|
625
|
-
-
|
|
626
|
-
-
|
|
661
|
+
- `resume {N}`: treat the chosen one as the resumed exploration (same as Step 1.5 step 5 — jump to the right downstream step based on its state badge).
|
|
662
|
+
- `new` (display this verb; accept `proceed` as a silent alias): continue to Step 2 (a new exploration; the relationship to the candidates is captured automatically server-side — do not narrate that).
|
|
663
|
+
- `details {N}`: show the chosen exploration's full state via `mcp__ritual__get_exploration` (+ `get_recommendations` if any), including `whyOverlaps` and the URL, then re-render the compact callout above.
|
|
627
664
|
|
|
628
665
|
**Calibration:** the threshold for surfacing is conservative — the agent is biased toward "miss not false-flag" (you'd rather silently skip a real overlap than noisily prompt the user when there isn't one). If you DO see this prompt, take it seriously — it's likely there's real overlap.
|
|
629
666
|
|
|
@@ -782,12 +819,12 @@ LLM call, ~5–10s. Returns 5–6 sub-problems — different framing axes the sy
|
|
|
782
819
|
|
|
783
820
|
**If the response includes `kg_context_used` with `implementationCount > 0`:** surface this to the user BEFORE presenting the considerations. It's the visible signal that prior shipped work shaped this draft.
|
|
784
821
|
|
|
785
|
-
>
|
|
822
|
+
> Prior Ritual work on these files may shape this draft:
|
|
786
823
|
> - **"Anonymous checkout opt-in"** (shipped 2026-04-12) · 1 open deferral
|
|
787
824
|
> - **"Payment-method routing"** (shipped 2026-03-22)
|
|
788
825
|
> - **"Session-data persistence"** (shipped 2026-02-08)
|
|
789
826
|
>
|
|
790
|
-
>
|
|
827
|
+
> The sub-problems below account for them.
|
|
791
828
|
|
|
792
829
|
(Drop the per-exploration decision count from this listing — recommendations + ship status are the user-facing signals, not decision counts. Keep `· N open deferral{s}` when `deferrals > 0` since open deferrals are scope-warning notes the user cares about. If `deferrals === 0`, just show `(shipped {date})` with no trailing segment.)
|
|
793
830
|
|
|
@@ -806,9 +843,6 @@ Solving for these sub-problems
|
|
|
806
843
|
|
|
807
844
|
2. {Title}
|
|
808
845
|
{Short explanation, wrapped for terminal width.}
|
|
809
|
-
|
|
810
|
-
(Refine scope at the problem-frame step — say "drop {N}", "add {angle}",
|
|
811
|
-
or "focus on {N},{M}" when you see the problem statement.)
|
|
812
846
|
```
|
|
813
847
|
|
|
814
848
|
Only the title line gets the number. Put a blank line between candidates. Do not show version labels like `(v1)` in CLI output. Do NOT include a "Reply with…" prompt or a `[USER PAUSE]` here — the next user-facing gate is the problem statement (Step 5).
|
|
@@ -910,7 +944,9 @@ When the user locks the frame, store the final text as `problem_statement` for S
|
|
|
910
944
|
|
|
911
945
|
**No pulse here.** The context pulse appears only from the curate-questions step onward (cli-output-contract § Inline pulses) — early on the score is low/noisy and the line clutters the gate. The first pulse is at Step 7.4.
|
|
912
946
|
|
|
913
|
-
#### Step 5.7 —
|
|
947
|
+
#### Step 5.7 — Context grounding (internal only — runs AFTER the frame locks)
|
|
948
|
+
|
|
949
|
+
**Never render this section's title, its step number, or the word "recon" to the user.** This step produces ZERO user-visible output — no "running…", no "grounding…", no "reading the codebase…". It happens between the problem-frame gate and the first product output; the user sees nothing until the next gate or an approved status line.
|
|
914
950
|
|
|
915
951
|
**Skip only if the user explicitly asks ("just generate, don't read the code") OR if you're operating outside a codebase context.**
|
|
916
952
|
|
|
@@ -1140,7 +1176,7 @@ Keep the list focused. 5–10 is the sweet spot; >20 dilutes the KG signal.
|
|
|
1140
1176
|
|
|
1141
1177
|
Generate a short name (≤60 chars) from the scope — typically the noun phrase, not the full HMW. E.g. "Reduce T2 customer churn in Q3" → name `T2 churn reduction (Q3)`.
|
|
1142
1178
|
|
|
1143
|
-
|
|
1179
|
+
Read the codebase silently (Step 5.7) first, then create the exploration — the job was already confirmed at the Step 0.7 Job gate, so do not add a *further* confirmation here. If a name is ambiguous, **choose the shortest clear noun phrase and continue without pausing** — the name is editable later and shouldn't become a decision gate. Do NOT rely on "proceed on Enter" or empty input in agent chat (see `references/cli-output-contract.md` § Surface-aware continuation prompts).
|
|
1144
1180
|
|
|
1145
1181
|
User-visible before the call, if needed:
|
|
1146
1182
|
|
|
@@ -1277,9 +1313,9 @@ Call `mcp__ritual__suggest_discovery_questions(exploration_id)`. Returns immedia
|
|
|
1277
1313
|
|
|
1278
1314
|
```text
|
|
1279
1315
|
Ritual build
|
|
1280
|
-
✓ Job ✓ Scope ● Discovery ○ Recommendations ○
|
|
1316
|
+
✓ Job ✓ Scope ● Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
1281
1317
|
|
|
1282
|
-
Generating discovery questions
|
|
1318
|
+
Generating discovery questions…
|
|
1283
1319
|
```
|
|
1284
1320
|
|
|
1285
1321
|
##### 7.2 — Poll until ready
|
|
@@ -1314,7 +1350,7 @@ The user always confirms; nothing is committed without their reply.
|
|
|
1314
1350
|
|
|
1315
1351
|
**Per-Area recommended set** (the ★ set, for the Area currently shown):
|
|
1316
1352
|
|
|
1317
|
-
- Pick the top 3–4 questions per Area most likely to shape the recommendations, based on the problem statement, locked sub-problems from Step 4, and the codebase
|
|
1353
|
+
- Pick the top 3–4 questions per Area most likely to shape the recommendations, based on the problem statement, locked sub-problems from Step 4, and the codebase context read at Step 3. Bias toward questions whose absence would force later stages to invent consequential facts.
|
|
1318
1354
|
- Area has **< 4 questions**: all are recommended.
|
|
1319
1355
|
- Area has **4–7 questions**: top 3 are recommended.
|
|
1320
1356
|
- Area has **8+ questions**: top 4 are recommended.
|
|
@@ -1331,9 +1367,7 @@ Ritual build
|
|
|
1331
1367
|
|
|
1332
1368
|
Discovery questions ready — {M} generated across {N} areas.
|
|
1333
1369
|
|
|
1334
|
-
These 12 questions target
|
|
1335
|
-
constraints, and unknowns that decide the design. Next, agents will develop
|
|
1336
|
-
answers and generate recommendations.
|
|
1370
|
+
These 12 questions target the tradeoffs and unknowns most likely to change the plan.
|
|
1337
1371
|
|
|
1338
1372
|
{Area name 1}
|
|
1339
1373
|
✓ 1. {question, full text, wrapped readably}
|
|
@@ -1345,9 +1379,7 @@ answers and generate recommendations.
|
|
|
1345
1379
|
|
|
1346
1380
|
{…every suggested question, grouped by Area, all 12 visible…}
|
|
1347
1381
|
|
|
1348
|
-
|
|
1349
|
-
the run confirmation follows) · `expert` to review all {M} questions and
|
|
1350
|
-
adjust the selection · `pause` to stop here.
|
|
1382
|
+
Reply `proceed` to use these 12, `expert` to adjust, or `pause`.
|
|
1351
1383
|
```
|
|
1352
1384
|
|
|
1353
1385
|
Branch on reply:
|
|
@@ -1461,7 +1493,7 @@ Question picking · Summary {T} picked
|
|
|
1461
1493
|
|
|
1462
1494
|
###### 7.3.5 — What NOT to say
|
|
1463
1495
|
|
|
1464
|
-
- DO NOT add machinery copy like *"The answer engine will then investigate them
|
|
1496
|
+
- DO NOT add machinery copy like *"The answer engine will then investigate them by reading the codebase and surface clarifying questions for you to review."* The user only needs to know that picking them triggers investigation.
|
|
1465
1497
|
- DO NOT use `Press Enter` anywhere in this picker (see § Surface-aware continuation prompts).
|
|
1466
1498
|
- DO NOT say `lock` for the picking confirmation; use `done` (to the Summary) then `commit`.
|
|
1467
1499
|
- DO NOT number Areas and questions in the same view — one numbering stream (the current Area's questions). The breadcrumb `Area i of N` carries position; it is not a pickable number.
|
|
@@ -1503,10 +1535,10 @@ exactly one Area. If for some reason you must use it across several Areas
|
|
|
1503
1535
|
(e.g. the batch tool is unavailable), call it **sequentially** (`await` each
|
|
1504
1536
|
in turn) — never in parallel.
|
|
1505
1537
|
|
|
1506
|
-
User-facing: emit ONE status line for the whole
|
|
1538
|
+
User-facing: emit the ONE approved status line for the whole save, not one per Area (verbatim — it's in the rule #8 allowlist):
|
|
1507
1539
|
|
|
1508
1540
|
```text
|
|
1509
|
-
Saving
|
|
1541
|
+
Saving selected questions…
|
|
1510
1542
|
```
|
|
1511
1543
|
|
|
1512
1544
|
The batch call is all-or-nothing — validation fails the whole request if any
|
|
@@ -1549,7 +1581,7 @@ If the user mentioned things they DON'T want investigated ("don't touch enterpri
|
|
|
1549
1581
|
|
|
1550
1582
|
Call `mcp__ritual__set_anti_goals(exploration_id, [{ text, reason? }, ...])`.
|
|
1551
1583
|
|
|
1552
|
-
|
|
1584
|
+
If no anti-goals were mentioned, skip this with NO user-visible output. (No mention = nothing to confirm; the pre-flight only runs when the user actually states out-of-scope items.)
|
|
1553
1585
|
|
|
1554
1586
|
**Pulse (Step 7.4 done — and again after 7.5 if anti-goals were set):** Emit a pulse — decision resolution and (if 7.5 ran) assumption safety just moved. Compact format unless this crosses Under-specified → Exploration-safe.
|
|
1555
1587
|
|
|
@@ -1592,7 +1624,7 @@ Visible CTA is `run`. Accept `r`, `go`, `continue`, or `next` as aliases. Per `r
|
|
|
1592
1624
|
|
|
1593
1625
|
On `run`, **if you're genuinely repo-linked (per the check above), answer the questions yourself** (BYO-answerer; do NOT call `start_agentic_run`):
|
|
1594
1626
|
1. The Step 7.4 accept (`accept_discovery_questions_batch`) returned `materialized[]` — the committed questions with their row `id`s. (If you didn't keep them, the same ids are what you passed to accept.)
|
|
1595
|
-
2. For each
|
|
1627
|
+
2. For each saved question, call `mcp__ritual__write_answer_context(question_id, content)` with an answer grounded in your reading of the codebase — the files you read at Step 5.7, the actual code, real constraints. Answer in PARALLEL where your agent supports it (e.g. one subagent per Area). The content is provisional + provenance-tagged agentic until saved; only the final saved set drives recommendations.
|
|
1596
1628
|
- **Length:** keep each answer to **~300–600 words by default** — tight and grounded, not an essay. Go longer only when the question genuinely needs it.
|
|
1597
1629
|
- **Code:** the answer itself is **prose** — keep it that way. Code is **optional reference, not part of the answer**: attach a snippet only when it would help a future reader or agent reason about your answer (a key type, contract, or call site worth pointing back to), never to complete the answer. When you do, `content` is **markdown** — add it as a **fenced code block with a language tag** (e.g. ` ```ts `) with the `file/path` and the minimal illustrative lines, never a whole-file paste. Spark lifts these fences out of the prose into a collapsed "View details" reference beside the answer, and markdown keeps them portable to the `.ritual/` projection.
|
|
1598
1630
|
- **Never leak secrets or sensitive data.** A snippet is **illustrative, not a verbatim copy** — it only has to convey the shape/idea, so simplify and elide freely. **NEVER** include API keys, tokens, passwords, connection strings, credentials, `.env` values, real customer data, or PII — even if they're literally in the file you read. Replace them with obvious placeholders (`process.env.X`, `"<api-key>"`, `"user@example.com"`). The same goes for the prose: describe constraints without pasting secret values.
|
|
@@ -1809,7 +1841,7 @@ This is the most-read screen in the build flow, and — as of 2026-06-08 — a *
|
|
|
1809
1841
|
**Data source.** Use `mcp__ritual__get_recommendations(exploration_id)` (the raw array) — the walk shows full per-rec content, so you need the fields a titles-only preview omits:
|
|
1810
1842
|
|
|
1811
1843
|
- top-level: `id`, `title`, `content` (the description / summary), `status`, `priority`, `points`, `confidence`
|
|
1812
|
-
- `
|
|
1844
|
+
- `categoryName` — **the load-bearing grouping key** (one rec → one category; `get_recommendations` exposes it top-level so you never reach into raw metadata for it)
|
|
1813
1845
|
- `metadata.explainability` — `rationale` (chained `→` arrow string), `faq_references[]`, `problem_alignment`, `inferred_elements`
|
|
1814
1846
|
- `metadata.acceptance_criteria[]` — concrete pass conditions (optional to surface; see § 9.1)
|
|
1815
1847
|
|
|
@@ -1817,7 +1849,7 @@ Assign stable `R1..RN` IDs **globally across all categories** in page order (NOT
|
|
|
1817
1849
|
|
|
1818
1850
|
**Vocabulary — load-bearing:**
|
|
1819
1851
|
|
|
1820
|
-
- Recommendations are grouped by **category** (`
|
|
1852
|
+
- Recommendations are grouped by **category** (the `categoryName` field). They are **NEVER** grouped by `matter` or by `Area` — those are discovery-phase concepts. `matter_id` must never appear in user-facing copy. Anti-pattern observed in agent output: *"44 recs grouped by matter"* — the right framing is *"44 recs across K categories."*
|
|
1821
1853
|
- Do NOT use "Reasoning chain" / "reasoning_chain" in user-facing copy. The user-visible label is **"Why this"** — a short Problem / Discovery / Tradeoff distillation derived from the `rationale` field, NOT the literal `→` arrow chain (that's the model's internal scratchpad shape).
|
|
1822
1854
|
|
|
1823
1855
|
**Action set — load-bearing (exactly three, no freelancing):**
|
|
@@ -1854,10 +1886,10 @@ or proceed to your {Deliverable}.
|
|
|
1854
1886
|
|
|
1855
1887
|
{…every category, every rec, one line each…}
|
|
1856
1888
|
|
|
1857
|
-
Pulse: Reasoning Readiness
|
|
1889
|
+
Pulse: Reasoning Readiness 88% · Context Debt 12% ↓16% (answering discovery dropped it 16%)
|
|
1858
1890
|
|
|
1859
|
-
A few assumptions are still unverified — the
|
|
1860
|
-
Reply
|
|
1891
|
+
A few assumptions are still unverified — the {Deliverable} is what locks them down.
|
|
1892
|
+
Reply `drill R1`, `edit R1 <change>`, or `proceed` to generate the {Deliverable}.
|
|
1861
1893
|
```
|
|
1862
1894
|
|
|
1863
1895
|
Notes:
|
|
@@ -1925,15 +1957,17 @@ Editing is non-destructive and does not advance the flow — the user can `edit`
|
|
|
1925
1957
|
|
|
1926
1958
|
```text
|
|
1927
1959
|
Ritual build
|
|
1928
|
-
✓ Job ✓ Scope ✓ Discovery ✓ Recommendations
|
|
1960
|
+
✓ Job ✓ Scope ✓ Discovery ✓ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
1929
1961
|
|
|
1930
1962
|
Reviewed {N} recommendations.
|
|
1931
1963
|
|
|
1932
1964
|
View: https://app.ritualapp.cloud/e/{exploration_id}
|
|
1933
1965
|
|
|
1934
|
-
Next:
|
|
1966
|
+
Next: generate the {Deliverable}.
|
|
1935
1967
|
```
|
|
1936
1968
|
|
|
1969
|
+
(The `{Deliverable}` stage stays `○`, not `●` — this screen records the review and names what's next; the stage flips to `●` only when brief generation actually starts. Render `{Deliverable}` as the job's `deliverableTemplate`, e.g. `Frontend Feature Brief`, never the literal "Build brief".)
|
|
1970
|
+
|
|
1937
1971
|
**Pulse (recommendations reviewed):** emit a pulse — this is almost always a state-tier crossing into **Recommendation-ready**. Render full.
|
|
1938
1972
|
|
|
1939
1973
|
Continue to Step 9.5 (`Wait for requirements`).
|
|
@@ -1976,7 +2010,7 @@ Steps:
|
|
|
1976
2010
|
|
|
1977
2011
|
4. **Special case — `proceed` not yet called (accept_recommendations hasn't run):** if the user jumped ahead without the rec-review `proceed`, there's no fire-and-forget auto-trigger from that path. Skip the polling entirely and let Step 10's auto-trigger handle requirement generation inline. The brief call will take ~30s longer than it otherwise would. (Note: auto-finalize at rec-gen completion usually already queued requirements, so this case is rare.)
|
|
1978
2012
|
|
|
1979
|
-
5. When `status === 'READY'`,
|
|
2013
|
+
5. When `status === 'READY'`, render the approved status line `Requirements ready.` and continue to Step 9.6 (if anti-goals exist) OR directly to Step 10 (if no anti-goals, the audit step runs with NO user-visible output).
|
|
1980
2014
|
|
|
1981
2015
|
#### Step 9.6 — Audit the recommendations + requirements against declared anti-goals (load-bearing — audit-repair loop)
|
|
1982
2016
|
|
|
@@ -1984,7 +2018,7 @@ Run a constraint-survival audit on the typed Recommendation + Requirement substr
|
|
|
1984
2018
|
|
|
1985
2019
|
**Why this is load-bearing**: an inert anti-goal — declared but not actually constraining anything in the recs+reqs — propagates downstream as an unconstrained brief. By Step 11 (implementation) it's too late; the agent codes against a substrate whose forbidden states were never enforced. The audit catches inert directives at the upstream typed substrate where the fix is cheap (rec content edit), not at the brief markdown where the fix is expensive (full regen).
|
|
1986
2020
|
|
|
1987
|
-
**Skip condition**: if the exploration has zero anti-goals (`set_anti_goals` was never called OR all anti-goals are `confidence < 0.4`) OR no APPROVED recommendations exist OR the latest RequirementSet isn't READY, skip this step
|
|
2021
|
+
**Skip condition**: if the exploration has zero anti-goals (`set_anti_goals` was never called OR all anti-goals are `confidence < 0.4`) OR no APPROVED recommendations exist OR the latest RequirementSet isn't READY, skip this step with NO user-visible output and continue to Step 10. The audit tool returns 404 in any of those cases; check the substrate state first if unsure.
|
|
1988
2022
|
|
|
1989
2023
|
**Build modes** (per `documents/architecture/audit-suite.md` § 7a) — the gate prompt below renders differently depending on which mode flag the user invoked:
|
|
1990
2024
|
|
|
@@ -2235,7 +2269,7 @@ Steps:
|
|
|
2235
2269
|
7. **Print a compact CLI summary** (≤ 8 lines, CLI Tenet #1, #6):
|
|
2236
2270
|
|
|
2237
2271
|
```text
|
|
2238
|
-
✓ Verification complete — `BUILD-BRIEF-VERIFICATION.md
|
|
2272
|
+
✓ Verification complete — saved `BUILD-BRIEF-VERIFICATION.md`.
|
|
2239
2273
|
|
|
2240
2274
|
Verified: {N} · Contradicted: {M} · Not found: {K}
|
|
2241
2275
|
|
|
@@ -2468,7 +2502,7 @@ Ritual build
|
|
|
2468
2502
|
Implementation (Your agent)
|
|
2469
2503
|
|
|
2470
2504
|
The build brief is on disk. From here, your agent codes against the
|
|
2471
|
-
|
|
2505
|
+
build requirements. Ritual will track commits via the `Ritual-Exploration:` trailer
|
|
2472
2506
|
so they link back to this exploration when you sync.
|
|
2473
2507
|
|
|
2474
2508
|
Next: I'll do a quick branch / dirty-worktree safety check, then hand
|
|
@@ -2800,7 +2834,7 @@ I'm about to log this implementation into the workspace's knowledge graph. After
|
|
|
2800
2834
|
· The implementation gets linked back to the recommendations it
|
|
2801
2835
|
implements — so future `/ritual build` calls touching
|
|
2802
2836
|
`{first 2 of filesChanged}` will see this implementation as priorContext.
|
|
2803
|
-
· The {M}
|
|
2837
|
+
· The {M} follow-ups you intentionally punted get logged with
|
|
2804
2838
|
their reasons — peers can see them in `/ritual lineage` on these
|
|
2805
2839
|
files later.
|
|
2806
2840
|
|
|
@@ -71,10 +71,10 @@ Default dense-list shape:
|
|
|
71
71
|
{1-3 sentence description, wrapped for terminal width.}
|
|
72
72
|
|
|
73
73
|
Why high-leverage:
|
|
74
|
-
{specific signal:
|
|
74
|
+
{specific signal: build-requirement id, prior decision, open follow-up, shipped PR, or file-level pattern.}
|
|
75
75
|
|
|
76
76
|
Touches:
|
|
77
|
-
{exploration / PR /
|
|
77
|
+
{exploration / PR / follow-up references, comma-separated only if short; otherwise wrap.}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
Use this format for high-leverage problem candidates, recommendation lists with rationale, lineage summaries with multiple events, and any other CLI section where each item has more than one sentence of explanation.
|
|
@@ -320,11 +320,11 @@ The pulse rule and visual specs live in the [§ /ritual context-pulse](#ritual-c
|
|
|
320
320
|
```text
|
|
321
321
|
{…the step's content…}
|
|
322
322
|
|
|
323
|
-
Pulse: Reasoning Readiness 58% · Context Debt 42% ↓3% (scope
|
|
323
|
+
Pulse: Reasoning Readiness 58% · Context Debt 42% ↓3% (locking scope cut it 3%)
|
|
324
324
|
Reply proceed (run discovery → recommendations) · expert · pause
|
|
325
325
|
```
|
|
326
326
|
|
|
327
|
-
- **Score line** (top of the message). Full capitalized labels — `Reasoning Readiness` and `Context Debt`, NOT lowercase. The progress delta attaches to **Context Debt as a directional drop** — `Context Debt 42% ↓3%` — so the movement reads unambiguously as debt going DOWN. (A bare `· +3%` sitting next to the debt figure reads like debt went UP by 3, the opposite of progress — that's the confusion this avoids.) The delta is **MANDATORY** on every pulse after the first (the first pulse has no prior → just the baseline + reason). Use `↓N%` when debt drops (the normal, good case), `↑N%` on a regression (rare; render full then), and `±0%` when a step didn't move the score. Never drop it — it's the visible-progress signal. (Readiness climbing and debt dropping are the same move — `Reasoning Readiness + Context Debt = 100%` — so the debt-drop arrow IS the readiness-gain signal, just framed the way users read it.)
|
|
327
|
+
- **Score line** (top of the message). Full capitalized labels — `Reasoning Readiness` and `Context Debt`, NOT lowercase. The progress delta attaches to **Context Debt as a directional drop** — `Context Debt 42% ↓3%` — so the movement reads unambiguously as debt going DOWN. (A bare `· +3%` sitting next to the debt figure reads like debt went UP by 3, the opposite of progress — that's the confusion this avoids.) The delta is **MANDATORY** on every pulse after the first (the first pulse has no prior → just the baseline + reason). Use `↓N%` when debt drops (the normal, good case), `↑N%` on a regression (rare; render full then), and `±0%` when a step didn't move the score. Never drop it — it's the visible-progress signal. (Readiness climbing and debt dropping are the same move — `Reasoning Readiness + Context Debt = 100%` — so the debt-drop arrow IS the readiness-gain signal, just framed the way users read it.) **The trailing parenthetical is a plain CAUSAL gloss — it attributes the drop to the step the user just took, in everyday words: `(locking scope cut it 3%)`, `(answering discovery dropped it 16%)`, `(grounding in your code cut it 9%)`. Not a bare state label like `(scope locked)` — the user should read what they DID and how much debt it removed. Keep the branded `Context Debt` term; the gloss makes the number mean something.** (The first pulse has no prior, so its parenthetical names the open gap instead — e.g. `(repo boundary unresolved)`.)
|
|
328
328
|
- **Lift bridge** (ONE sentence, immediately ABOVE the action/CTA line — NOT under the score). This is the load-bearing piece: it turns the score into a reason to proceed. Three requirements:
|
|
329
329
|
1. **Plain language for the gap — NEVER the internal dimension name.** The lowest dimension from `score_context_pulse`'s breakdown picks the message, but the user sees what it MEANS, not the label:
|
|
330
330
|
| lowest dimension (internal) | what the user reads (plain) |
|