@ritualai/cli 0.36.28 → 0.36.36
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 +7 -3
- package/skills/claude-code/ritual/references/build-flow.md +130 -88
- package/skills/claude-code/ritual/references/cli-output-contract.md +4 -4
- package/skills/claude-code/ritual/references/lite-flow.md +131 -89
- package/skills/codex/ritual/.ritual-bundle.json +3 -3
- package/skills/codex/ritual/SKILL.md +7 -3
- package/skills/codex/ritual/references/build-flow.md +130 -88
- package/skills/codex/ritual/references/cli-output-contract.md +4 -4
- package/skills/codex/ritual/references/lite-flow.md +131 -89
- package/skills/cursor/ritual/.ritual-bundle.json +3 -3
- package/skills/cursor/ritual/SKILL.md +7 -3
- package/skills/cursor/ritual/references/build-flow.md +130 -88
- package/skills/cursor/ritual/references/cli-output-contract.md +4 -4
- package/skills/cursor/ritual/references/lite-flow.md +131 -89
- package/skills/gemini/ritual/.ritual-bundle.json +3 -3
- package/skills/gemini/ritual/SKILL.md +7 -3
- package/skills/gemini/ritual/references/build-flow.md +130 -88
- package/skills/gemini/ritual/references/cli-output-contract.md +4 -4
- package/skills/gemini/ritual/references/lite-flow.md +131 -89
- package/skills/kiro/ritual/.ritual-bundle.json +3 -3
- package/skills/kiro/ritual/SKILL.md +7 -3
- package/skills/kiro/ritual/references/build-flow.md +130 -88
- package/skills/kiro/ritual/references/cli-output-contract.md +4 -4
- package/skills/kiro/ritual/references/lite-flow.md +131 -89
- package/skills/vscode/ritual/.ritual-bundle.json +3 -3
- package/skills/vscode/ritual/SKILL.md +7 -3
- package/skills/vscode/ritual/references/build-flow.md +130 -88
- package/skills/vscode/ritual/references/cli-output-contract.md +4 -4
- package/skills/vscode/ritual/references/lite-flow.md +131 -89
|
@@ -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: d34e2df8a4177dbe -->
|
|
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 |
|
|
@@ -198,7 +233,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
|
|
|
198
233
|
Persist `auditMode` to `Exploration.metadata.auditMode` at `create_exploration` time (additive JSONB key — no schema migration) so `/ritual resume <exploration-id>` picks up the same mode the original build started with, and `/ritual lineage <exploration-id>` can render which gates ran + their outcomes.
|
|
199
234
|
|
|
200
235
|
|
|
201
|
-
<!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic
|
|
236
|
+
<!-- skill-options:no-gate-change: 2b (low-confidence clarifying question — server sets clarifyingQuestion only when confidence <20% or it defaulted) + 2c (confident generic — accept and proceed) are COPY variants of the same gate; options are unchanged (proceed | name-the-job; 2b adds answer-the-question, which is a name-the-job correction) -->
|
|
202
237
|
#### Step 0.7 — The Job gate: classify the job to be done
|
|
203
238
|
|
|
204
239
|
**The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
|
|
@@ -212,16 +247,24 @@ 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
|
-
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
|
|
256
|
+
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, clarifyingQuestion?, personaCoverage }`.
|
|
218
257
|
`isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
|
|
219
258
|
result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
|
|
220
|
-
it is NOT a confident match, and which render variant you use in step 2 depends on it.
|
|
259
|
+
it is NOT a confident match, and which render variant you use in step 2 depends on it. On that
|
|
260
|
+
generic path the response also carries `clarifyingQuestion` — a plain-language question generated
|
|
261
|
+
from the user's ask, which step 2b renders verbatim to disambiguate toward a specific job.
|
|
221
262
|
|
|
222
263
|
2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
|
|
223
264
|
what you're about to build: restate the ask + the matched job in the user's words, then let them
|
|
224
|
-
confirm or correct.
|
|
265
|
+
confirm or correct. Route to a variant by the response: a **`clarifyingQuestion`** present → **2b**
|
|
266
|
+
(we're genuinely unsure — ask, but let them proceed); else `isGenericFallback` true → **2c** (a
|
|
267
|
+
confident generic build — accept and proceed); else → **2a** (a confident specific match).
|
|
225
268
|
|
|
226
269
|
**2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
|
|
227
270
|
|
|
@@ -229,23 +272,22 @@ When this gate runs:
|
|
|
229
272
|
Ritual build
|
|
230
273
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
231
274
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
Once you run the exploration and review recommendations, a {deliverableTemplate} will be
|
|
235
|
-
created as context for your coding agent.
|
|
275
|
+
Ritual will produce a {deliverableTemplate} for {restate the ask in one short clause}.
|
|
236
276
|
|
|
237
|
-
Reply `proceed`
|
|
238
|
-
job actually is.
|
|
277
|
+
Reply `proceed` if that's right, or tell me what to adjust.
|
|
239
278
|
```
|
|
240
279
|
|
|
241
|
-
**2b —
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
280
|
+
**2b — Genuinely unsure: ask, but let them proceed** (the response carries a **`clarifyingQuestion`**
|
|
281
|
+
— the server sets it ONLY when it was essentially guessing: numeric confidence below 20, or it
|
|
282
|
+
failed to classify and defaulted). A generic result alone does NOT land here — only a *low-confidence*
|
|
283
|
+
one does; a confident generic build goes to **2c**. The clarifying question is a single plain-language
|
|
284
|
+
question the server generated FROM the user's specific ask. **Render it verbatim** — it is grounded in
|
|
285
|
+
their words and leak-free. Do not rephrase it, do not append a menu, do not mention classification /
|
|
286
|
+
jobs / categories / confidence. The user has TWO ways out: answer to focus it, OR reply `proceed` to
|
|
287
|
+
continue with the deliverable. **Leak rule (load-bearing):** the rendered copy must NEVER say
|
|
288
|
+
"generic", "I couldn't classify", "fallback", "catch-all", or otherwise reveal that classification was
|
|
289
|
+
uncertain — that is internal state. Present it as a normal question about their ask. (See
|
|
290
|
+
`loud-fallback-escalation.md`.)
|
|
249
291
|
|
|
250
292
|
```text
|
|
251
293
|
Ritual build
|
|
@@ -253,34 +295,35 @@ When this gate runs:
|
|
|
253
295
|
|
|
254
296
|
You're looking to: {restate the ask in one short clause}
|
|
255
297
|
|
|
256
|
-
|
|
257
|
-
better when I know what KIND of work it is. Which is closest (or say it in your own words)?
|
|
258
|
-
• A coding-agent / MCP / skill capability — tooling the agent itself uses
|
|
259
|
-
• A backend service or API
|
|
260
|
-
• A frontend / UI feature
|
|
261
|
-
• A refactor, migration, or infra / platform change
|
|
262
|
-
• Something else — tell me in a sentence
|
|
298
|
+
{clarifyingQuestion — verbatim}
|
|
263
299
|
|
|
264
|
-
|
|
300
|
+
Answer in a sentence — or reply `proceed` and I'll continue with a {Deliverable}.
|
|
265
301
|
```
|
|
266
302
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
303
|
+
(Rare degraded case — you reached 2b but `clarifyingQuestion` is missing: ask which KIND of work it
|
|
304
|
+
is, with the same `proceed` option — • a coding-agent / MCP / skill capability • a backend service
|
|
305
|
+
or API • a frontend / UI feature • a refactor, migration, or infra change • something else, in your
|
|
306
|
+
own words.)
|
|
307
|
+
|
|
308
|
+
If the user ANSWERS, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
|
|
309
|
+
`correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a specific
|
|
310
|
+
job, otherwise **2c**. If the user replies `proceed`, go straight to **2c** (accept the generic).
|
|
270
311
|
|
|
271
|
-
**2c —
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
312
|
+
**2c — Accept and proceed** (`isGenericFallback` is `true` with NO `clarifyingQuestion` — a
|
|
313
|
+
confident-enough generic build — OR the user chose to proceed from 2b, OR a re-classification is still
|
|
314
|
+
generic): do NOT interrogate. Present the deliverable as a normal accept-and-proceed — **same clean
|
|
315
|
+
shape as 2a**. Internally the job stays generic and is renamable later, but **the rendered copy must
|
|
316
|
+
NEVER say "generic", "couldn't classify", "fallback", or otherwise reveal that** — that is internal
|
|
317
|
+
state. Just name what Ritual will produce for their ask. (Never show a function-specific deliverable
|
|
318
|
+
like "Frontend Web" for an unclassified build — only the function-agnostic `Feature Brief`.)
|
|
275
319
|
|
|
276
320
|
```text
|
|
277
321
|
Ritual build
|
|
278
322
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
|
|
279
323
|
|
|
280
|
-
|
|
281
|
-
I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
|
|
324
|
+
Ritual will produce a {Deliverable} for {restate the ask in one short clause}.
|
|
282
325
|
|
|
283
|
-
Reply `proceed` to
|
|
326
|
+
Reply `proceed` if that's right, or tell me what to focus on.
|
|
284
327
|
```
|
|
285
328
|
|
|
286
329
|
Do not render `personaCoverage` — persona representation is handled server-side now; only surface
|
|
@@ -337,10 +380,10 @@ Resolution order:
|
|
|
337
380
|
|
|
338
381
|
<!-- skill-options:no-gate-change: adds explainer prose to the existing workspace-pick gate; options and pause unchanged -->
|
|
339
382
|
|
|
340
|
-
>
|
|
341
|
-
> A workspace
|
|
383
|
+
> This repo isn't connected to a workspace yet.
|
|
384
|
+
> A workspace keeps the context and reasoning Ritual needs for future runs.
|
|
342
385
|
>
|
|
343
|
-
>
|
|
386
|
+
> Where should Ritual save this run?
|
|
344
387
|
> {numbered list}
|
|
345
388
|
|
|
346
389
|
**[LITE AUTO — no pause; auto-pick the recommended default]** for selection.
|
|
@@ -440,7 +483,7 @@ Steps:
|
|
|
440
483
|
|
|
441
484
|
If `raw_input` is present, frame this as an overlap/continuation check before starting fresh:
|
|
442
485
|
|
|
443
|
-
> I see {N}
|
|
486
|
+
> I see {N} prior run{s} in this workspace:
|
|
444
487
|
>
|
|
445
488
|
> **{state_glyph} {state_label}** ({count})
|
|
446
489
|
>
|
|
@@ -697,25 +740,27 @@ Steps:
|
|
|
697
740
|
|
|
698
741
|
- **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
742
|
|
|
700
|
-
|
|
743
|
+
<!-- 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. -->
|
|
701
744
|
|
|
702
|
-
|
|
745
|
+
- **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:
|
|
746
|
+
|
|
747
|
+
> Using workspace: {workspace.name}.
|
|
748
|
+
>
|
|
749
|
+
> I found related prior runs in this workspace. You can continue one, inspect one, or start a new run.
|
|
703
750
|
>
|
|
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}`
|
|
751
|
+
> {for each candidate (in order, strongest first), numbered from 1:}
|
|
752
|
+
> {N}. **{candidate.name}** — {candidate.matchLabel}
|
|
753
|
+
> {candidate.problemStatement, first ~100 chars, one line}
|
|
709
754
|
> {endfor}
|
|
710
755
|
>
|
|
711
|
-
>
|
|
712
|
-
>
|
|
713
|
-
|
|
714
|
-
|
|
756
|
+
> Recommended: continue one if it's the work you meant.
|
|
757
|
+
> Reply `resume 1`, `details 1`, or `new` to start a new run.
|
|
758
|
+
|
|
759
|
+
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}`.
|
|
715
760
|
|
|
716
|
-
-
|
|
717
|
-
-
|
|
718
|
-
-
|
|
761
|
+
- `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).
|
|
762
|
+
- `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).
|
|
763
|
+
- `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
764
|
|
|
720
765
|
**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
766
|
|
|
@@ -874,12 +919,12 @@ LLM call, ~5–10s. Returns 5–6 sub-problems — different framing axes the sy
|
|
|
874
919
|
|
|
875
920
|
**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
921
|
|
|
877
|
-
>
|
|
922
|
+
> Prior Ritual work on these files may shape this draft:
|
|
878
923
|
> - **"Anonymous checkout opt-in"** (shipped 2026-04-12) · 1 open deferral
|
|
879
924
|
> - **"Payment-method routing"** (shipped 2026-03-22)
|
|
880
925
|
> - **"Session-data persistence"** (shipped 2026-02-08)
|
|
881
926
|
>
|
|
882
|
-
>
|
|
927
|
+
> The sub-problems below account for them.
|
|
883
928
|
|
|
884
929
|
(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
930
|
|
|
@@ -898,9 +943,6 @@ Solving for these sub-problems
|
|
|
898
943
|
|
|
899
944
|
2. {Title}
|
|
900
945
|
{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
946
|
```
|
|
905
947
|
|
|
906
948
|
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 +1044,9 @@ When the user locks the frame, store the final text as `problem_statement` for S
|
|
|
1002
1044
|
|
|
1003
1045
|
**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
1046
|
|
|
1005
|
-
#### Step 5.7 —
|
|
1047
|
+
#### Step 5.7 — Context grounding (internal only — runs AFTER the frame locks)
|
|
1048
|
+
|
|
1049
|
+
**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
1050
|
|
|
1007
1051
|
**Skip only if the user explicitly asks ("just generate, don't read the code") OR if you're operating outside a codebase context.**
|
|
1008
1052
|
|
|
@@ -1232,7 +1276,7 @@ Keep the list focused. 5–10 is the sweet spot; >20 dilutes the KG signal.
|
|
|
1232
1276
|
|
|
1233
1277
|
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
1278
|
|
|
1235
|
-
|
|
1279
|
+
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
1280
|
|
|
1237
1281
|
User-visible before the call, if needed:
|
|
1238
1282
|
|
|
@@ -1341,9 +1385,9 @@ Call `mcp__ritual__suggest_discovery_questions(exploration_id)`. Returns immedia
|
|
|
1341
1385
|
|
|
1342
1386
|
```text
|
|
1343
1387
|
Ritual build
|
|
1344
|
-
✓ Job ✓ Scope ● Discovery ○ Recommendations ○
|
|
1388
|
+
✓ Job ✓ Scope ● Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
1345
1389
|
|
|
1346
|
-
Generating discovery questions
|
|
1390
|
+
Generating discovery questions…
|
|
1347
1391
|
```
|
|
1348
1392
|
|
|
1349
1393
|
##### 7.2 — Poll until ready
|
|
@@ -1378,7 +1422,7 @@ The user always confirms; nothing is committed without their reply.
|
|
|
1378
1422
|
|
|
1379
1423
|
**Per-Area recommended set** (the ★ set, for the Area currently shown):
|
|
1380
1424
|
|
|
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
|
|
1425
|
+
- 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
1426
|
- Area has **< 4 questions**: all are recommended.
|
|
1383
1427
|
- Area has **4–7 questions**: top 3 are recommended.
|
|
1384
1428
|
- Area has **8+ questions**: top 4 are recommended.
|
|
@@ -1395,9 +1439,7 @@ Ritual build
|
|
|
1395
1439
|
|
|
1396
1440
|
Discovery questions ready — {M} generated across {N} areas.
|
|
1397
1441
|
|
|
1398
|
-
These 12 questions target
|
|
1399
|
-
constraints, and unknowns that decide the design. Next, agents will develop
|
|
1400
|
-
answers and generate recommendations.
|
|
1442
|
+
These 12 questions target the tradeoffs and unknowns most likely to change the plan.
|
|
1401
1443
|
|
|
1402
1444
|
{Area name 1}
|
|
1403
1445
|
✓ 1. {question, full text, wrapped readably}
|
|
@@ -1409,9 +1451,7 @@ answers and generate recommendations.
|
|
|
1409
1451
|
|
|
1410
1452
|
{…every suggested question, grouped by Area, all 12 visible…}
|
|
1411
1453
|
|
|
1412
|
-
|
|
1413
|
-
the run confirmation follows) · `expert` to review all {M} questions and
|
|
1414
|
-
adjust the selection · `pause` to stop here.
|
|
1454
|
+
Reply `proceed` to use these 12, `expert` to adjust, or `pause`.
|
|
1415
1455
|
```
|
|
1416
1456
|
|
|
1417
1457
|
Branch on reply:
|
|
@@ -1525,7 +1565,7 @@ Question picking · Summary {T} picked
|
|
|
1525
1565
|
|
|
1526
1566
|
###### 7.3.5 — What NOT to say
|
|
1527
1567
|
|
|
1528
|
-
- DO NOT add machinery copy like *"The answer engine will then investigate them
|
|
1568
|
+
- 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
1569
|
- DO NOT use `Press Enter` anywhere in this picker (see § Surface-aware continuation prompts).
|
|
1530
1570
|
- DO NOT say `lock` for the picking confirmation; use `done` (to the Summary) then `commit`.
|
|
1531
1571
|
- 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 +1607,10 @@ exactly one Area. If for some reason you must use it across several Areas
|
|
|
1567
1607
|
(e.g. the batch tool is unavailable), call it **sequentially** (`await` each
|
|
1568
1608
|
in turn) — never in parallel.
|
|
1569
1609
|
|
|
1570
|
-
User-facing: emit ONE status line for the whole
|
|
1610
|
+
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
1611
|
|
|
1572
1612
|
```text
|
|
1573
|
-
Saving
|
|
1613
|
+
Saving selected questions…
|
|
1574
1614
|
```
|
|
1575
1615
|
|
|
1576
1616
|
The batch call is all-or-nothing — validation fails the whole request if any
|
|
@@ -1613,7 +1653,7 @@ If the user mentioned things they DON'T want investigated ("don't touch enterpri
|
|
|
1613
1653
|
|
|
1614
1654
|
Call `mcp__ritual__set_anti_goals(exploration_id, [{ text, reason? }, ...])`.
|
|
1615
1655
|
|
|
1616
|
-
|
|
1656
|
+
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
1657
|
|
|
1618
1658
|
**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
1659
|
|
|
@@ -1656,7 +1696,7 @@ Visible CTA is `run`. Accept `r`, `go`, `continue`, or `next` as aliases. Per `r
|
|
|
1656
1696
|
|
|
1657
1697
|
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
1698
|
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
|
|
1699
|
+
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
1700
|
- **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
1701
|
- **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
1702
|
- **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.
|
|
@@ -1873,7 +1913,7 @@ This is the most-read screen in the build flow, and — as of 2026-06-08 — a *
|
|
|
1873
1913
|
**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:
|
|
1874
1914
|
|
|
1875
1915
|
- top-level: `id`, `title`, `content` (the description / summary), `status`, `priority`, `points`, `confidence`
|
|
1876
|
-
- `
|
|
1916
|
+
- `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)
|
|
1877
1917
|
- `metadata.explainability` — `rationale` (chained `→` arrow string), `faq_references[]`, `problem_alignment`, `inferred_elements`
|
|
1878
1918
|
- `metadata.acceptance_criteria[]` — concrete pass conditions (optional to surface; see § 9.1)
|
|
1879
1919
|
|
|
@@ -1881,7 +1921,7 @@ Assign stable `R1..RN` IDs **globally across all categories** in page order (NOT
|
|
|
1881
1921
|
|
|
1882
1922
|
**Vocabulary — load-bearing:**
|
|
1883
1923
|
|
|
1884
|
-
- Recommendations are grouped by **category** (`
|
|
1924
|
+
- 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."*
|
|
1885
1925
|
- 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).
|
|
1886
1926
|
|
|
1887
1927
|
**Action set — load-bearing (exactly three, no freelancing):**
|
|
@@ -1918,10 +1958,10 @@ or proceed to your {Deliverable}.
|
|
|
1918
1958
|
|
|
1919
1959
|
{…every category, every rec, one line each…}
|
|
1920
1960
|
|
|
1921
|
-
Pulse: Reasoning Readiness
|
|
1961
|
+
Pulse: Reasoning Readiness 88% · Context Debt 12% ↓16% (answering discovery dropped it 16%)
|
|
1922
1962
|
|
|
1923
|
-
A few assumptions are still unverified — the
|
|
1924
|
-
Reply
|
|
1963
|
+
A few assumptions are still unverified — the {Deliverable} is what locks them down.
|
|
1964
|
+
Reply `drill R1`, `edit R1 <change>`, or `proceed` to generate the {Deliverable}.
|
|
1925
1965
|
```
|
|
1926
1966
|
|
|
1927
1967
|
Notes:
|
|
@@ -1989,15 +2029,17 @@ Editing is non-destructive and does not advance the flow — the user can `edit`
|
|
|
1989
2029
|
|
|
1990
2030
|
```text
|
|
1991
2031
|
Ritual build
|
|
1992
|
-
✓ Job ✓ Scope ✓ Discovery ✓ Recommendations
|
|
2032
|
+
✓ Job ✓ Scope ✓ Discovery ✓ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
|
|
1993
2033
|
|
|
1994
2034
|
Reviewed {N} recommendations.
|
|
1995
2035
|
|
|
1996
2036
|
View: https://app.ritualapp.cloud/e/{exploration_id}
|
|
1997
2037
|
|
|
1998
|
-
Next:
|
|
2038
|
+
Next: generate the {Deliverable}.
|
|
1999
2039
|
```
|
|
2000
2040
|
|
|
2041
|
+
(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".)
|
|
2042
|
+
|
|
2001
2043
|
**Pulse (recommendations reviewed):** emit a pulse — this is almost always a state-tier crossing into **Recommendation-ready**. Render full.
|
|
2002
2044
|
|
|
2003
2045
|
Continue to Step 9.5 (`Wait for requirements`).
|
|
@@ -2040,7 +2082,7 @@ Steps:
|
|
|
2040
2082
|
|
|
2041
2083
|
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.)
|
|
2042
2084
|
|
|
2043
|
-
5. When `status === 'READY'`,
|
|
2085
|
+
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).
|
|
2044
2086
|
|
|
2045
2087
|
#### Step 9.6 — Audit the recommendations + requirements against declared anti-goals (load-bearing — audit-repair loop)
|
|
2046
2088
|
|
|
@@ -2048,7 +2090,7 @@ Run a constraint-survival audit on the typed Recommendation + Requirement substr
|
|
|
2048
2090
|
|
|
2049
2091
|
**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).
|
|
2050
2092
|
|
|
2051
|
-
**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
|
|
2093
|
+
**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.
|
|
2052
2094
|
|
|
2053
2095
|
**Build modes** (per `documents/architecture/audit-suite.md` § 7a) — the gate prompt below renders differently depending on which mode flag the user invoked:
|
|
2054
2096
|
|
|
@@ -2228,7 +2270,7 @@ The Build Brief is the markdown document the engineer reads RIGHT BEFORE writing
|
|
|
2228
2270
|
Call `mcp__ritual__generate_build_brief` with:
|
|
2229
2271
|
|
|
2230
2272
|
- `exploration_id`
|
|
2231
|
-
- `icp` (
|
|
2273
|
+
- `icp` — **omit this.** The brief sources from the requirement set the flow already generated (on accept), whose ICP the server resolves from the exploration's persona/template. Passing a different ICP here forces a redundant requirement regeneration and a slow cold start. The engineering flavor is already baked into the server-resolved template — you do not need to (and should not) pass `TECH_PM` or any other ICP.
|
|
2232
2274
|
- `recon_context` — the Step 3 `codebase_context_packet` plus any explicit phase/later candidates from discovery. Do not pass raw recon notes. This grounds "Codebase Anchors" in real file paths while keeping agent hypotheses auditable and non-authoritative.
|
|
2233
2275
|
- `sources` — the **same** file-path array passed to `generate_considerations` and `generate_problem_statement` in Steps 4–5. Critical for KG consistency: the brief's "Previously Deferred" section only populates when overlapping prior implementations exist on these files.
|
|
2234
2276
|
|
|
@@ -2299,7 +2341,7 @@ Steps:
|
|
|
2299
2341
|
7. **Print a compact CLI summary** (≤ 8 lines, CLI Tenet #1, #6):
|
|
2300
2342
|
|
|
2301
2343
|
```text
|
|
2302
|
-
✓ Verification complete — `BUILD-BRIEF-VERIFICATION.md
|
|
2344
|
+
✓ Verification complete — saved `BUILD-BRIEF-VERIFICATION.md`.
|
|
2303
2345
|
|
|
2304
2346
|
Verified: {N} · Contradicted: {M} · Not found: {K}
|
|
2305
2347
|
|
|
@@ -2437,7 +2479,7 @@ Ritual build
|
|
|
2437
2479
|
Implementation (Your agent)
|
|
2438
2480
|
|
|
2439
2481
|
The build brief is on disk. From here, your agent codes against the
|
|
2440
|
-
|
|
2482
|
+
build requirements. Ritual will track commits via the `Ritual-Exploration:` trailer
|
|
2441
2483
|
so they link back to this exploration when you sync.
|
|
2442
2484
|
|
|
2443
2485
|
Next: I'll do a quick branch / dirty-worktree safety check, then hand
|
|
@@ -2688,7 +2730,7 @@ I'm about to log this implementation into the workspace's knowledge graph. After
|
|
|
2688
2730
|
· The implementation gets linked back to the recommendations it
|
|
2689
2731
|
implements — so future `/ritual build` calls touching
|
|
2690
2732
|
`{first 2 of filesChanged}` will see this implementation as priorContext.
|
|
2691
|
-
· The {M}
|
|
2733
|
+
· The {M} follow-ups you intentionally punted get logged with
|
|
2692
2734
|
their reasons — peers can see them in `/ritual lineage` on these
|
|
2693
2735
|
files later.
|
|
2694
2736
|
|