@ritualai/cli 0.36.25 → 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 +111 -67
- package/skills/claude-code/ritual/references/cli-output-contract.md +4 -4
- package/skills/claude-code/ritual/references/lite-flow.md +112 -68
- 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 +111 -67
- package/skills/codex/ritual/references/cli-output-contract.md +4 -4
- package/skills/codex/ritual/references/lite-flow.md +112 -68
- 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 +111 -67
- package/skills/cursor/ritual/references/cli-output-contract.md +4 -4
- package/skills/cursor/ritual/references/lite-flow.md +112 -68
- 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 +111 -67
- package/skills/gemini/ritual/references/cli-output-contract.md +4 -4
- package/skills/gemini/ritual/references/lite-flow.md +112 -68
- 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 +111 -67
- package/skills/kiro/ritual/references/cli-output-contract.md +4 -4
- package/skills/kiro/ritual/references/lite-flow.md +112 -68
- 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 +111 -67
- package/skills/vscode/ritual/references/cli-output-contract.md +4 -4
- package/skills/vscode/ritual/references/lite-flow.md +112 -68
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED from references/build-flow.md by apps/cli/scripts/generate-lite-flow.js — DO NOT EDIT. -->
|
|
2
|
-
<!-- source-sha:
|
|
2
|
+
<!-- source-sha: 3cfb8c30115f21ac -->
|
|
3
3
|
|
|
4
4
|
# /ritual lite — fast build (generated; do not edit)
|
|
5
5
|
|
|
@@ -165,6 +165,41 @@ Pausing discipline is still load-bearing — every `**[LITE AUTO — no pause; a
|
|
|
165
165
|
|
|
166
166
|
Every message should be the prescribed gate copy (rail + content + CTA) — terse, plain, no preamble, no sign-off commentary.
|
|
167
167
|
|
|
168
|
+
<!-- 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). -->
|
|
169
|
+
|
|
170
|
+
**Copy rules (the calm-CLI-wizard contract — every gate obeys these):**
|
|
171
|
+
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.
|
|
172
|
+
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.
|
|
173
|
+
3. **End every decision gate with one clear CTA line.** A single `Reply …` / `Next: …` line, not a paragraph of options.
|
|
174
|
+
4. **Lead with "Recommended: …"** instead of multi-line justification. State the recommendation; don't explain why across several lines.
|
|
175
|
+
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)."
|
|
176
|
+
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 %).
|
|
177
|
+
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.
|
|
178
|
+
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:
|
|
179
|
+
- `Generating discovery questions…`
|
|
180
|
+
- `Saving selected questions…`
|
|
181
|
+
- `Answering {N} questions from the codebase…`
|
|
182
|
+
- `{N} answers saved. Generating recommendations…`
|
|
183
|
+
- `Generating recommendations…`
|
|
184
|
+
- `Recommendations ready.`
|
|
185
|
+
- `Requirements ready.`
|
|
186
|
+
- `Still generating…` / `Still preparing…` (while a slow step runs)
|
|
187
|
+
- `No related prior runs in this workspace — starting a new run.` (empty-overlap case only)
|
|
188
|
+
|
|
189
|
+
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.)
|
|
190
|
+
|
|
191
|
+
**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.
|
|
192
|
+
|
|
193
|
+
(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.)
|
|
194
|
+
|
|
195
|
+
<!-- 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). -->
|
|
196
|
+
|
|
197
|
+
<!-- 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). -->
|
|
198
|
+
|
|
199
|
+
<!-- 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). -->
|
|
200
|
+
|
|
201
|
+
<!-- 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). -->
|
|
202
|
+
|
|
168
203
|
**Per-agent indicators** (informational, for the SKILL's own awareness — NOT to gate behavior):
|
|
169
204
|
|
|
170
205
|
| Agent | Where the mode shows up |
|
|
@@ -212,6 +247,10 @@ When this gate runs:
|
|
|
212
247
|
(the user describes what they want to build), run this gate before continuing.
|
|
213
248
|
- Resume paths (Step 1.5 → resume) → skip this gate entirely; the exploration's job is already set.
|
|
214
249
|
|
|
250
|
+
<!-- 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 -->
|
|
251
|
+
|
|
252
|
+
**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.
|
|
253
|
+
|
|
215
254
|
1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
|
|
216
255
|
classify yourself, do NOT pre-filter to development jobs. It returns
|
|
217
256
|
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
|
|
@@ -229,13 +268,9 @@ When this gate runs:
|
|
|
229
268
|
Ritual build
|
|
230
269
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
231
270
|
|
|
232
|
-
|
|
271
|
+
Ritual will produce a {deliverableTemplate} for {restate the ask in one short clause}.
|
|
233
272
|
|
|
234
|
-
|
|
235
|
-
created as context for your coding agent.
|
|
236
|
-
|
|
237
|
-
Reply `proceed` to frame the problem (sub-problems + problem statement), or tell me what the
|
|
238
|
-
job actually is.
|
|
273
|
+
Reply `proceed` if that's right, or tell me what to adjust.
|
|
239
274
|
```
|
|
240
275
|
|
|
241
276
|
**2b — No specific job matched, FIRST time** (`isGenericFallback` is `true` — the result is the
|
|
@@ -337,10 +372,10 @@ Resolution order:
|
|
|
337
372
|
|
|
338
373
|
<!-- skill-options:no-gate-change: adds explainer prose to the existing workspace-pick gate; options and pause unchanged -->
|
|
339
374
|
|
|
340
|
-
>
|
|
341
|
-
> A workspace
|
|
375
|
+
> This repo isn't connected to a workspace yet.
|
|
376
|
+
> A workspace keeps the context and reasoning Ritual needs for future runs.
|
|
342
377
|
>
|
|
343
|
-
>
|
|
378
|
+
> Where should Ritual save this run?
|
|
344
379
|
> {numbered list}
|
|
345
380
|
|
|
346
381
|
**[LITE AUTO — no pause; auto-pick the recommended default]** for selection.
|
|
@@ -440,7 +475,7 @@ Steps:
|
|
|
440
475
|
|
|
441
476
|
If `raw_input` is present, frame this as an overlap/continuation check before starting fresh:
|
|
442
477
|
|
|
443
|
-
> I see {N}
|
|
478
|
+
> I see {N} prior run{s} in this workspace:
|
|
444
479
|
>
|
|
445
480
|
> **{state_glyph} {state_label}** ({count})
|
|
446
481
|
>
|
|
@@ -697,25 +732,27 @@ Steps:
|
|
|
697
732
|
|
|
698
733
|
- **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.
|
|
699
734
|
|
|
700
|
-
|
|
735
|
+
<!-- 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. -->
|
|
736
|
+
|
|
737
|
+
- **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:
|
|
701
738
|
|
|
702
|
-
>
|
|
739
|
+
> Using workspace: {workspace.name}.
|
|
740
|
+
>
|
|
741
|
+
> I found related prior runs in this workspace. You can continue one, inspect one, or start a new run.
|
|
703
742
|
>
|
|
704
|
-
> {for each candidate (in order, strongest first):}
|
|
705
|
-
> **{candidate.name}**
|
|
706
|
-
>
|
|
707
|
-
> - Why I think it overlaps: {candidate.llmRationale}
|
|
708
|
-
> - URL: `https://app.ritualapp.cloud/e/{candidate.explorationId}`
|
|
743
|
+
> {for each candidate (in order, strongest first), numbered from 1:}
|
|
744
|
+
> {N}. **{candidate.name}** — {candidate.matchLabel}
|
|
745
|
+
> {candidate.problemStatement, first ~100 chars, one line}
|
|
709
746
|
> {endfor}
|
|
710
747
|
>
|
|
711
|
-
>
|
|
712
|
-
>
|
|
713
|
-
> 2. **Proceed anyway** — I'll create a new exploration. The relationship to these {N} won't be lost — when `related_exploration_ids` is supported it'll be captured automatically.
|
|
714
|
-
> 3. **Show me one in detail first** — give me the number, I'll fetch its full state before you decide.
|
|
748
|
+
> Recommended: continue one if it's the work you meant.
|
|
749
|
+
> Reply `resume 1`, `details 1`, or `new` to start a new run.
|
|
715
750
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
-
|
|
751
|
+
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}`.
|
|
752
|
+
|
|
753
|
+
- `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).
|
|
754
|
+
- `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).
|
|
755
|
+
- `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.
|
|
719
756
|
|
|
720
757
|
**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.
|
|
721
758
|
|
|
@@ -874,12 +911,12 @@ LLM call, ~5–10s. Returns 5–6 sub-problems — different framing axes the sy
|
|
|
874
911
|
|
|
875
912
|
**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.
|
|
876
913
|
|
|
877
|
-
>
|
|
914
|
+
> Prior Ritual work on these files may shape this draft:
|
|
878
915
|
> - **"Anonymous checkout opt-in"** (shipped 2026-04-12) · 1 open deferral
|
|
879
916
|
> - **"Payment-method routing"** (shipped 2026-03-22)
|
|
880
917
|
> - **"Session-data persistence"** (shipped 2026-02-08)
|
|
881
918
|
>
|
|
882
|
-
>
|
|
919
|
+
> The sub-problems below account for them.
|
|
883
920
|
|
|
884
921
|
(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.)
|
|
885
922
|
|
|
@@ -898,9 +935,6 @@ Solving for these sub-problems
|
|
|
898
935
|
|
|
899
936
|
2. {Title}
|
|
900
937
|
{Short explanation, wrapped for terminal width.}
|
|
901
|
-
|
|
902
|
-
(Refine scope at the problem-frame step — say "drop {N}", "add {angle}",
|
|
903
|
-
or "focus on {N},{M}" when you see the problem statement.)
|
|
904
938
|
```
|
|
905
939
|
|
|
906
940
|
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 `**[LITE AUTO — no pause; auto-pick the recommended default]**` here — the next user-facing gate is the problem statement (Step 5).
|
|
@@ -1002,7 +1036,9 @@ When the user locks the frame, store the final text as `problem_statement` for S
|
|
|
1002
1036
|
|
|
1003
1037
|
**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.
|
|
1004
1038
|
|
|
1005
|
-
#### Step 5.7 —
|
|
1039
|
+
#### Step 5.7 — Context grounding (internal only — runs AFTER the frame locks)
|
|
1040
|
+
|
|
1041
|
+
**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.
|
|
1006
1042
|
|
|
1007
1043
|
**Skip only if the user explicitly asks ("just generate, don't read the code") OR if you're operating outside a codebase context.**
|
|
1008
1044
|
|
|
@@ -1232,7 +1268,7 @@ Keep the list focused. 5–10 is the sweet spot; >20 dilutes the KG signal.
|
|
|
1232
1268
|
|
|
1233
1269
|
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)`.
|
|
1234
1270
|
|
|
1235
|
-
|
|
1271
|
+
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).
|
|
1236
1272
|
|
|
1237
1273
|
User-visible before the call, if needed:
|
|
1238
1274
|
|
|
@@ -1341,9 +1377,9 @@ Call `mcp__ritual__suggest_discovery_questions(exploration_id)`. Returns immedia
|
|
|
1341
1377
|
|
|
1342
1378
|
```text
|
|
1343
1379
|
Ritual build
|
|
1344
|
-
✓ Job ✓ Scope ● Discovery ○ Recommendations ○
|
|
1380
|
+
✓ Job ✓ Scope ● Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
1345
1381
|
|
|
1346
|
-
Generating discovery questions
|
|
1382
|
+
Generating discovery questions…
|
|
1347
1383
|
```
|
|
1348
1384
|
|
|
1349
1385
|
##### 7.2 — Poll until ready
|
|
@@ -1378,7 +1414,7 @@ The user always confirms; nothing is committed without their reply.
|
|
|
1378
1414
|
|
|
1379
1415
|
**Per-Area recommended set** (the ★ set, for the Area currently shown):
|
|
1380
1416
|
|
|
1381
|
-
- 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
|
|
1417
|
+
- 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.
|
|
1382
1418
|
- Area has **< 4 questions**: all are recommended.
|
|
1383
1419
|
- Area has **4–7 questions**: top 3 are recommended.
|
|
1384
1420
|
- Area has **8+ questions**: top 4 are recommended.
|
|
@@ -1395,9 +1431,7 @@ Ritual build
|
|
|
1395
1431
|
|
|
1396
1432
|
Discovery questions ready — {M} generated across {N} areas.
|
|
1397
1433
|
|
|
1398
|
-
These 12 questions target
|
|
1399
|
-
constraints, and unknowns that decide the design. Next, agents will develop
|
|
1400
|
-
answers and generate recommendations.
|
|
1434
|
+
These 12 questions target the tradeoffs and unknowns most likely to change the plan.
|
|
1401
1435
|
|
|
1402
1436
|
{Area name 1}
|
|
1403
1437
|
✓ 1. {question, full text, wrapped readably}
|
|
@@ -1409,9 +1443,7 @@ answers and generate recommendations.
|
|
|
1409
1443
|
|
|
1410
1444
|
{…every suggested question, grouped by Area, all 12 visible…}
|
|
1411
1445
|
|
|
1412
|
-
|
|
1413
|
-
the run confirmation follows) · `expert` to review all {M} questions and
|
|
1414
|
-
adjust the selection · `pause` to stop here.
|
|
1446
|
+
Reply `proceed` to use these 12, `expert` to adjust, or `pause`.
|
|
1415
1447
|
```
|
|
1416
1448
|
|
|
1417
1449
|
Branch on reply:
|
|
@@ -1525,7 +1557,7 @@ Question picking · Summary {T} picked
|
|
|
1525
1557
|
|
|
1526
1558
|
###### 7.3.5 — What NOT to say
|
|
1527
1559
|
|
|
1528
|
-
- DO NOT add machinery copy like *"The answer engine will then investigate them
|
|
1560
|
+
- 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.
|
|
1529
1561
|
- DO NOT use `Press Enter` anywhere in this picker (see § Surface-aware continuation prompts).
|
|
1530
1562
|
- DO NOT say `lock` for the picking confirmation; use `done` (to the Summary) then `commit`.
|
|
1531
1563
|
- 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.
|
|
@@ -1567,10 +1599,10 @@ exactly one Area. If for some reason you must use it across several Areas
|
|
|
1567
1599
|
(e.g. the batch tool is unavailable), call it **sequentially** (`await` each
|
|
1568
1600
|
in turn) — never in parallel.
|
|
1569
1601
|
|
|
1570
|
-
User-facing: emit ONE status line for the whole
|
|
1602
|
+
User-facing: emit the ONE approved status line for the whole save, not one per Area (verbatim — it's in the rule #8 allowlist):
|
|
1571
1603
|
|
|
1572
1604
|
```text
|
|
1573
|
-
Saving
|
|
1605
|
+
Saving selected questions…
|
|
1574
1606
|
```
|
|
1575
1607
|
|
|
1576
1608
|
The batch call is all-or-nothing — validation fails the whole request if any
|
|
@@ -1613,7 +1645,7 @@ If the user mentioned things they DON'T want investigated ("don't touch enterpri
|
|
|
1613
1645
|
|
|
1614
1646
|
Call `mcp__ritual__set_anti_goals(exploration_id, [{ text, reason? }, ...])`.
|
|
1615
1647
|
|
|
1616
|
-
|
|
1648
|
+
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.)
|
|
1617
1649
|
|
|
1618
1650
|
**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.
|
|
1619
1651
|
|
|
@@ -1656,7 +1688,7 @@ Visible CTA is `run`. Accept `r`, `go`, `continue`, or `next` as aliases. Per `r
|
|
|
1656
1688
|
|
|
1657
1689
|
On `run`, **if you're genuinely repo-linked (per the check above), answer the questions yourself** (BYO-answerer; do NOT call `start_agentic_run`):
|
|
1658
1690
|
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.)
|
|
1659
|
-
2. For each
|
|
1691
|
+
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.
|
|
1660
1692
|
- **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.
|
|
1661
1693
|
- **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.
|
|
1662
1694
|
- **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.
|
|
@@ -1739,9 +1771,16 @@ Pick whichever fits the user's flow — they're equivalent in content. Do not in
|
|
|
1739
1771
|
|
|
1740
1772
|
<!-- skill-options:no-gate-change: adds a convergence note at the top of the rec-wait — both answerers (local coding agent vs Ritual server) poll get_recommendations_preview until ≥1 rec; the only difference is who produced the answers. No new pause gate or Step header; the run/pause gate + its options are unchanged. -->
|
|
1741
1773
|
|
|
1742
|
-
|
|
1774
|
+
<!-- skill-options:no-gate-change: Step 8.1 rec-wait polls get_exploration_status.recommendationsStatus (not_started|generating|ready|empty|failed); on `failed` it offers retry_recommendations (re-enqueues rec-gen only). Render-only signal + an offered action, no pause/option/Step-header change. -->
|
|
1775
|
+
**Both answerers converge here — once the run is underway, poll until recommendations are READY.** The job from this point on is the SAME regardless of who produced the answers. **Poll the authoritative signal: `mcp__ritual__get_exploration_status(exploration_id).recommendationsStatus`.** It removes the guesswork that bit us before — it is unambiguous:
|
|
1776
|
+
- `not_started` / `generating` → **keep polling.** A zero `recommendationCount` here is NORMAL — generation is enqueued/in flight, NEVER a "miss." (Older servers may omit the field; if `recommendationsStatus` is absent, fall back to polling `get_recommendations_preview` until ≥1.)
|
|
1777
|
+
- `ready` → recommendations exist. Fetch them (`get_recommendations_preview`) and continue to Step 9.
|
|
1778
|
+
- `empty` → generation FINISHED with genuinely zero recs (rare, real terminal state). Surface it plainly — do NOT render a fake Step 9 landing, do NOT re-run.
|
|
1779
|
+
- `failed` → generation exhausted its auto-retries (terminal). Surface it with the one-line `recommendationsError` if present, and **offer to retry** — on a `yes`, call `mcp__ritual__retry_recommendations(exploration_id)` (re-enqueues ONLY rec-gen on the existing answers; status returns to `generating`, resume polling). Do NOT call `start_agentic_run` (that re-answers the whole exploration) and do NOT auto-retry without asking.
|
|
1780
|
+
|
|
1781
|
+
The *only* difference between the two answerer paths — **local coding agent** (you, repo-linked) vs **Ritual's server agentic run** — is how you reach this wait (agent-answered → straight to the status poll; server → poll the run to `COMPLETED` first, then the status). Never render the Step 9 landing, and never call `accept_recommendations`, from anything but `ready`.
|
|
1743
1782
|
|
|
1744
|
-
**Agent-answered path (default):** you already wrote + `submit_all_answers`'d, so there's no agentic run to poll — go straight to the recommendation wait: poll `
|
|
1783
|
+
**Agent-answered path (default):** you already wrote + `submit_all_answers`'d, so there's no agentic run to poll — go straight to the recommendation wait: poll `mcp__ritual__get_exploration_status(exploration_id).recommendationsStatus` (`Bash sleep 20` per iteration, a "still generating recommendations…" line every ~3 polls) until it reads `ready`, then fetch + continue to Step 9. `generating` → keep polling; `empty` → genuine zero-rec terminal; NEVER render the Step 9 landing or call `accept_recommendations` from anything but `ready`; if 10+ min pass still `generating`, surface it as an anomaly. (Skip the `get_agentic_run` polling below — that's the server-fallback path.)
|
|
1745
1784
|
|
|
1746
1785
|
**Server fallback path** (you called `start_agentic_run`): poll `mcp__ritual__get_agentic_run(run_id)` using `references/async-polling.md`: **`Bash sleep 20` (constant 20 — matches Spark's 20s agentic cadence; never escalate)** per iteration, then a fresh status call. Even if the run takes 2+ minutes, the sleep value stays a constant 20; the harness blocks chained-shorter-sleeps-at-increasing-N just like it blocks `sleep ≥ 30`, but a fixed `20` is non-escalating and under 30 → guard-safe. Agentic runs CAN exceed 5 min for large explorations — if you see status still running past ~5 min of polling, switch to the `Monitor` + `until <check>; do sleep 2; done` pattern from `references/async-polling.md` § Long waits.
|
|
1747
1786
|
|
|
@@ -1753,15 +1792,18 @@ Then print progress only when `progress_pct` or `current_step` changes, or every
|
|
|
1753
1792
|
|
|
1754
1793
|
> Agentic run: {progress_pct}% — {current_step}
|
|
1755
1794
|
|
|
1756
|
-
When `status` is `COMPLETED`: **wait for
|
|
1795
|
+
When `status` is `COMPLETED`: **wait for `recommendationsStatus: ready` before Step 9.** The run reporting
|
|
1757
1796
|
`completed` does NOT mean recommendations exist yet — rec generation is a separate queued job that
|
|
1758
|
-
lands MINUTES later (the 2026-06-05 premature-accept incident class; observed again live 2026-06-12
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1797
|
+
lands MINUTES later (the 2026-06-05 premature-accept incident class; observed again live 2026-06-12
|
|
1798
|
+
and 2026-06-15). Poll `mcp__ritual__get_exploration_status(exploration_id).recommendationsStatus` on
|
|
1799
|
+
the standard cadence (`Bash sleep 20` per iteration, "still generating recommendations…" line every
|
|
1800
|
+
~3 polls): `generating` → keep polling; `ready` → continue to Step 9; `empty` → genuine zero-rec
|
|
1801
|
+
terminal, surface it. NEVER render the Step 9 landing — and never call `accept_recommendations` —
|
|
1802
|
+
from anything but `ready`. If 10+ minutes pass still `generating`, surface that as an anomaly
|
|
1803
|
+
instead of proceeding.
|
|
1804
|
+
|
|
1805
|
+
<!-- skill-options:no-gate-change: Step 8.1 adds a load-bearing clause closing the "zero-rec = generation miss → re-run / reroute" loophole; tightens the existing wait-for-rows rule only — no pause, option, or Step header added or changed. -->
|
|
1806
|
+
**A zero-rec read is NEVER a "generation miss," and re-running is NOT a recovery (load-bearing).** The run reporting `completed` only means *answering* finished — recommendation synthesis is a SEPARATE async job that may still be in flight, so zero rows means **not yet**, never **failed**. Do NOT relabel it a "generation miss" / "the synthesizer came back empty" / "0 recommendations" and act on that: do NOT call `start_agentic_run` again to "regenerate" (the answers are already committed — a re-run re-answers the whole exploration from scratch, burns a full pipeline, and can double-generate), and do NOT propose "routing around" synthesis by building a plan from the raw discovery answers. Just keep polling `get_exploration_status.recommendationsStatus` until `ready` (or `empty` — the rare genuine terminal). The synthesizer is almost never the problem — being early in the async window (`generating`) is. The ONLY escalation, and only after the 10-min ceiling still `generating`, is to surface it as an anomaly and offer `/ritual status` or the web app — never an automatic re-run, never a reroute.
|
|
1765
1807
|
When `status` is `COMPLETED_WITH_ERRORS`: tell the user, then apply the same wait-for-rows rule — partial recommendations may still be useful.
|
|
1766
1808
|
When `status` is `FAILED`: surface the error message, ask if they want to retry (`start_agentic_run` again with same exploration_id) or stop.
|
|
1767
1809
|
When `status` is `PAUSED_FOR_REVIEW` (product/design answer-review mode only): continue to Step 8.5.
|
|
@@ -1863,7 +1905,7 @@ This is the most-read screen in the build flow, and — as of 2026-06-08 — a *
|
|
|
1863
1905
|
**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:
|
|
1864
1906
|
|
|
1865
1907
|
- top-level: `id`, `title`, `content` (the description / summary), `status`, `priority`, `points`, `confidence`
|
|
1866
|
-
- `
|
|
1908
|
+
- `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)
|
|
1867
1909
|
- `metadata.explainability` — `rationale` (chained `→` arrow string), `faq_references[]`, `problem_alignment`, `inferred_elements`
|
|
1868
1910
|
- `metadata.acceptance_criteria[]` — concrete pass conditions (optional to surface; see § 9.1)
|
|
1869
1911
|
|
|
@@ -1871,7 +1913,7 @@ Assign stable `R1..RN` IDs **globally across all categories** in page order (NOT
|
|
|
1871
1913
|
|
|
1872
1914
|
**Vocabulary — load-bearing:**
|
|
1873
1915
|
|
|
1874
|
-
- Recommendations are grouped by **category** (`
|
|
1916
|
+
- 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."*
|
|
1875
1917
|
- 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).
|
|
1876
1918
|
|
|
1877
1919
|
**Action set — load-bearing (exactly three, no freelancing):**
|
|
@@ -1908,10 +1950,10 @@ or proceed to your {Deliverable}.
|
|
|
1908
1950
|
|
|
1909
1951
|
{…every category, every rec, one line each…}
|
|
1910
1952
|
|
|
1911
|
-
Pulse: Reasoning Readiness
|
|
1953
|
+
Pulse: Reasoning Readiness 88% · Context Debt 12% ↓16% (answering discovery dropped it 16%)
|
|
1912
1954
|
|
|
1913
|
-
A few assumptions are still unverified — the
|
|
1914
|
-
Reply
|
|
1955
|
+
A few assumptions are still unverified — the {Deliverable} is what locks them down.
|
|
1956
|
+
Reply `drill R1`, `edit R1 <change>`, or `proceed` to generate the {Deliverable}.
|
|
1915
1957
|
```
|
|
1916
1958
|
|
|
1917
1959
|
Notes:
|
|
@@ -1979,15 +2021,17 @@ Editing is non-destructive and does not advance the flow — the user can `edit`
|
|
|
1979
2021
|
|
|
1980
2022
|
```text
|
|
1981
2023
|
Ritual build
|
|
1982
|
-
✓ Job ✓ Scope ✓ Discovery ✓ Recommendations
|
|
2024
|
+
✓ Job ✓ Scope ✓ Discovery ✓ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
1983
2025
|
|
|
1984
2026
|
Reviewed {N} recommendations.
|
|
1985
2027
|
|
|
1986
2028
|
View: https://app.ritualapp.cloud/e/{exploration_id}
|
|
1987
2029
|
|
|
1988
|
-
Next:
|
|
2030
|
+
Next: generate the {Deliverable}.
|
|
1989
2031
|
```
|
|
1990
2032
|
|
|
2033
|
+
(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".)
|
|
2034
|
+
|
|
1991
2035
|
**Pulse (recommendations reviewed):** emit a pulse — this is almost always a state-tier crossing into **Recommendation-ready**. Render full.
|
|
1992
2036
|
|
|
1993
2037
|
Continue to Step 9.5 (`Wait for requirements`).
|
|
@@ -2030,7 +2074,7 @@ Steps:
|
|
|
2030
2074
|
|
|
2031
2075
|
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.)
|
|
2032
2076
|
|
|
2033
|
-
5. When `status === 'READY'`,
|
|
2077
|
+
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).
|
|
2034
2078
|
|
|
2035
2079
|
#### Step 9.6 — Audit the recommendations + requirements against declared anti-goals (load-bearing — audit-repair loop)
|
|
2036
2080
|
|
|
@@ -2038,7 +2082,7 @@ Run a constraint-survival audit on the typed Recommendation + Requirement substr
|
|
|
2038
2082
|
|
|
2039
2083
|
**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).
|
|
2040
2084
|
|
|
2041
|
-
**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
|
|
2085
|
+
**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.
|
|
2042
2086
|
|
|
2043
2087
|
**Build modes** (per `documents/architecture/audit-suite.md` § 7a) — the gate prompt below renders differently depending on which mode flag the user invoked:
|
|
2044
2088
|
|
|
@@ -2289,7 +2333,7 @@ Steps:
|
|
|
2289
2333
|
7. **Print a compact CLI summary** (≤ 8 lines, CLI Tenet #1, #6):
|
|
2290
2334
|
|
|
2291
2335
|
```text
|
|
2292
|
-
✓ Verification complete — `BUILD-BRIEF-VERIFICATION.md
|
|
2336
|
+
✓ Verification complete — saved `BUILD-BRIEF-VERIFICATION.md`.
|
|
2293
2337
|
|
|
2294
2338
|
Verified: {N} · Contradicted: {M} · Not found: {K}
|
|
2295
2339
|
|
|
@@ -2427,7 +2471,7 @@ Ritual build
|
|
|
2427
2471
|
Implementation (Your agent)
|
|
2428
2472
|
|
|
2429
2473
|
The build brief is on disk. From here, your agent codes against the
|
|
2430
|
-
|
|
2474
|
+
build requirements. Ritual will track commits via the `Ritual-Exploration:` trailer
|
|
2431
2475
|
so they link back to this exploration when you sync.
|
|
2432
2476
|
|
|
2433
2477
|
Next: I'll do a quick branch / dirty-worktree safety check, then hand
|
|
@@ -2678,7 +2722,7 @@ I'm about to log this implementation into the workspace's knowledge graph. After
|
|
|
2678
2722
|
· The implementation gets linked back to the recommendations it
|
|
2679
2723
|
implements — so future `/ritual build` calls touching
|
|
2680
2724
|
`{first 2 of filesChanged}` will see this implementation as priorContext.
|
|
2681
|
-
· The {M}
|
|
2725
|
+
· The {M} follow-ups you intentionally punted get logged with
|
|
2682
2726
|
their reasons — peers can see them in `/ritual lineage` on these
|
|
2683
2727
|
files later.
|
|
2684
2728
|
|