@ritualai/cli 0.36.14 → 0.36.22

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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/skills/claude-code/ritual/.ritual-bundle.json +3 -3
  3. package/skills/claude-code/ritual/SKILL.md +1 -1
  4. package/skills/claude-code/ritual/references/build-flow.md +58 -42
  5. package/skills/claude-code/ritual/references/cli-output-contract.md +3 -6
  6. package/skills/claude-code/ritual/references/lite-flow.md +82 -43
  7. package/skills/codex/ritual/.ritual-bundle.json +3 -3
  8. package/skills/codex/ritual/SKILL.md +1 -1
  9. package/skills/codex/ritual/references/build-flow.md +58 -42
  10. package/skills/codex/ritual/references/cli-output-contract.md +3 -6
  11. package/skills/codex/ritual/references/lite-flow.md +82 -43
  12. package/skills/cursor/ritual/.ritual-bundle.json +3 -3
  13. package/skills/cursor/ritual/SKILL.md +1 -1
  14. package/skills/cursor/ritual/references/build-flow.md +58 -42
  15. package/skills/cursor/ritual/references/cli-output-contract.md +3 -6
  16. package/skills/cursor/ritual/references/lite-flow.md +82 -43
  17. package/skills/gemini/ritual/.ritual-bundle.json +3 -3
  18. package/skills/gemini/ritual/SKILL.md +1 -1
  19. package/skills/gemini/ritual/references/build-flow.md +58 -42
  20. package/skills/gemini/ritual/references/cli-output-contract.md +3 -6
  21. package/skills/gemini/ritual/references/lite-flow.md +82 -43
  22. package/skills/kiro/ritual/.ritual-bundle.json +3 -3
  23. package/skills/kiro/ritual/SKILL.md +1 -1
  24. package/skills/kiro/ritual/references/build-flow.md +58 -42
  25. package/skills/kiro/ritual/references/cli-output-contract.md +3 -6
  26. package/skills/kiro/ritual/references/lite-flow.md +82 -43
  27. package/skills/vscode/ritual/.ritual-bundle.json +3 -3
  28. package/skills/vscode/ritual/SKILL.md +1 -1
  29. package/skills/vscode/ritual/references/build-flow.md +58 -42
  30. package/skills/vscode/ritual/references/cli-output-contract.md +3 -6
  31. package/skills/vscode/ritual/references/lite-flow.md +82 -43
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ritualai/cli",
3
- "version": "0.36.14",
3
+ "version": "0.36.22",
4
4
  "description": "Ritual CLI — scaffold AI coding agent skills + register MCP servers. Connects Claude Code, Cursor, Windsurf, Kiro, Gemini CLI, VS Code/Copilot, and Codex to Ritual Cloud.",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "0.36.14",
3
- "builtAt": "2026-06-14T21:33:31.224Z",
4
- "skillsHash": "ee9a77046c96"
2
+ "cliVersion": "0.36.22",
3
+ "builtAt": "2026-06-15T13:28:31.790Z",
4
+ "skillsHash": "8a8905aae549"
5
5
  }
@@ -3,7 +3,7 @@ name: ritual
3
3
  description: "Use when an engineer wants a coding agent to plan or build a feature, refactor, or implementation-heavy change that depends on context the agent can't infer on its own — strategic intent, constraints, prior decisions, and trade-offs that live in the user's head. Ritual runs a structured exploration to surface that context through targeted discovery questions, combines it with codebase signals and prior explorations, and delivers a validated build brief (sub-problems, recommendations, dependencies) — additional context to fold into plan mode before the agent writes code. Prefer this over jumping straight to implementation or plan mode when the problem is ambiguous, cross-cutting, or has non-obvious constraints. Subcommands: build (full planning-to-sync cycle — default for new features), resume (continue an in-flight exploration), lineage (file-path KG history — what decisions shaped this code), context-pulse (readiness and context-debt scoring — is this safe to build yet?)."
4
4
  argument-hint: "[subcommand] <args> (e.g. 'build Reduce T2 churn in Q3', 'resume', 'lineage src/checkout/views.py', 'context-pulse Add billing export')"
5
5
  user-invocable: true
6
- stamp: ee9a77046c96
6
+ stamp: 8a8905aae549
7
7
  ---
8
8
 
9
9
  # /ritual
@@ -46,7 +46,7 @@ When **not** to use:
46
46
 
47
47
  Use explicit **[USER PAUSE]** only at decision gates. Pause when the user must choose among options, approve creation or acceptance, resolve ambiguity, authorize implementation, accept cost/time, or provide missing non-code context. Do **not** pause for status-only steps, safe defaults, internal recon, or silent checks.
48
48
 
49
- **Pauses are not optional even in auto-mode** (load-bearing). When the host agent has auto-accept / bypass-permissions enabled, the SKILL must still honor every `[USER PAUSE]` as a hard stop. Inferring an answer from context, choosing a default, or pressing on without an actual user reply defeats the build flow's value: Ritual is producing aligned recommendations because the human shaped the inputs, not because the agent guessed plausibly. The auto-mode reminder in Step 0 below is informational only it does not relax this rule; it's a heads-up to the user, not permission to bypass pauses.
49
+ **Pauses are not optional even in auto-mode** (load-bearing). When the host agent has auto-accept / bypass-permissions enabled, the SKILL must still honor every `[USER PAUSE]` as a hard stop. Inferring an answer from context, choosing a default, or pressing on without an actual user reply defeats the build flow's value: Ritual is producing aligned recommendations because the human shaped the inputs, not because the agent guessed plausibly. We do not surface a heads-up about this to the user (Step 0) we simply enforce the gates regardless of the host's auto-accept mode.
50
50
 
51
51
  ---
52
52
 
@@ -60,19 +60,18 @@ Follow `references/cli-output-contract.md` for terminal output, dense-list forma
60
60
  >
61
61
  > The new shape: one informational line in the FIRST user-visible message of the flow. No pause. No `[USER PAUSE]` here. If the user IS in auto-mode, the next genuine decision pause (workspace pick, scope pick, etc.) is the natural place they'll notice it racing past. The line below gives them the right cue + remediation.
62
62
 
63
- The SKILL MUST include the following one-line heads-up at the top of the **first** user-visible message in a `/ritual build` flow (typically the workspace summary in Step 1, or the no-args prompt in Step 1.1). Include it once per flow only:
63
+ Do NOT show an auto-mode / "~N decisions" / Shift+Tab heads-up. It reads as meta-instruction clutter at the start of the flow just begin the flow plainly. (The pausing discipline below is enforced regardless of the host's auto-accept mode; we simply don't preface it with a lecture.)
64
64
 
65
- ```text
66
- Heads-up: Ritual's build flow needs ~5 real decisions from you (workspace,
67
- scope, discovery picks, rec acceptance, implementation approval). If your
68
- agent is in auto-accept / bypass-permissions mode, those pauses won't
69
- actually pause for you — toggle off first (Claude Code: Shift+Tab to cycle
70
- back to "default").
71
- ```
65
+ Pausing discipline is still load-bearing — every `[USER PAUSE]` later in the flow is a hard stop regardless of whether the user reads it. The agent's contract is unchanged from the preamble: never infer an answer, never pick a default, never press on without an actual user reply. Auto-mode collapsing those pauses is the user's risk to accept; the SKILL enforces the gates regardless.
66
+
67
+ <!-- skill-options:no-gate-change: voice/copy cleanup — removes the auto-mode "~5 decisions" heads-up, adds a no-preamble/no-editorializing/render-verbatim voice rule, replaces job-gate + run-gate copy with plainer wording, and moves the context pulse to the bottom (above the CTA) starting only at the curate-questions step. No tracked pause gate, option, or Step header is added, removed, or changed. -->
72
68
 
73
- That's it. No menu. No required reply. Just inform.
69
+ **Voice render gates plainly, add NOTHING (load-bearing, applies to EVERY message in the flow).** Output the gate copy this skill prescribes and nothing else. In particular, NEVER:
70
+ - **Preface a tool call with narration.** Don't say "I'll start by classifying the job…", "Let me kick off an exploration…", "I'll create the exploration and pull questions…". Just make the tool call; report the result plainly after.
71
+ - **Editorialize about the work.** Don't add commentary like "this is exactly the kind of ambiguous, cross-cutting work where it pays to surface context before writing code", "the design decisions still aren't settled", or any "here's why this step matters" justification. The user knows why they ran `/ritual build`.
72
+ - **Narrate internal mechanics or paraphrase the gate copy into process-talk.** Don't say "You're framed. Grounding in the codebase, then I'll…" or describe what Ritual's research agents do under the hood. Lead with the plain meaning for the user; surface mechanism only if they ask.
74
73
 
75
- Pausing discipline is still load-bearing — every `[USER PAUSE]` later in the flow is a hard stop regardless of whether the user reads or ignores this heads-up. The agent's contract is unchanged from the preamble: never infer an answer, never pick a default, never press on without an actual user reply. Auto-mode collapsing those pauses is the user's risk to accept; the SKILL's job is just to surface that risk visibly once, then enforce the gates regardless.
74
+ Every message should be the prescribed gate copy (rail + content + CTA) terse, plain, no preamble, no sign-off commentary.
76
75
 
77
76
  **Per-agent indicators** (informational, for the SKILL's own awareness — NOT to gate behavior):
78
77
 
@@ -139,8 +138,9 @@ When this gate runs:
139
138
  ● Job ○ Scope ○ Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
140
139
 
141
140
  You're looking to: {restate the ask in one short clause}
142
- The job to be done: {workItemLabel} — {why}
143
- Deliverable: {deliverableTemplate}
141
+
142
+ Once you run the exploration and review recommendations, a {deliverableTemplate} will be
143
+ created as context for your coding agent.
144
144
 
145
145
  Reply `proceed` to frame the problem (sub-problems + problem statement), or tell me what the
146
146
  job actually is.
@@ -235,10 +235,8 @@ Resolution order:
235
235
  - **Not found** (deleted, access revoked, wrong id in config): pause with a clear error and offer `workspace: list` to re-bind. Don't fall through to `list_explorations` later — it errors with a less actionable message.
236
236
  - **Found:** store `workspace.explorationCount` for Step 1.5. The SKILL never maintains a local "empty workspace" cache because that goes stale against anything that mutates the workspace outside this CLI's view.
237
237
 
238
- User-visible (per Step 0, prepend the one-line auto-mode heads-up — once per flow):
238
+ User-visible:
239
239
 
240
- > Heads-up: Ritual's build flow needs ~5 real decisions from you (workspace, scope, discovery picks, rec acceptance, implementation approval). If your agent is in auto-accept / bypass-permissions mode, those pauses won't actually pause for you — toggle off first (Claude Code: Shift+Tab to cycle back to "default").
241
- >
242
240
  > Using workspace: **{workspaceName}** from `.ritual/config.json`.
243
241
  > Override with `workspace: list`.
244
242
 
@@ -303,12 +301,6 @@ If there are **zero existing explorations** and `raw_input = null`, do not say "
303
301
  Ritual build
304
302
  ✓ Job ● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
305
303
 
306
- Heads-up: Ritual's build flow needs ~5 real decisions from you (workspace,
307
- scope, discovery picks, rec acceptance, implementation approval). If your
308
- agent is in auto-accept / bypass-permissions mode, those pauses won't
309
- actually pause for you — toggle off first (Claude Code: Shift+Tab to cycle
310
- back to "default").
311
-
312
304
  Using workspace: {workspaceName}.
313
305
 
314
306
  No Ritual history here yet.
@@ -913,7 +905,7 @@ The returned text becomes the new current draft. Show it using the same `Problem
913
905
 
914
906
  When the user locks the frame, store the final text as `problem_statement` for Step 6.
915
907
 
916
- **Pulse (Step 5 done):** Emit a pulse feature clarity just jumped. Compute per `/ritual context-pulse` § Step CP3. Render full if this crosses Raw ask Under-specified, else compact. Translate raw tier labels into user-facing copy per `references/cli-output-contract.md` § Pulse tier labels never expose `RAW_ASK` / `UNDER_SPECIFIED` / etc. directly.
908
+ **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.
917
909
 
918
910
  #### Step 5.7 — Ground the exploration (silent recon — runs AFTER the frame locks)
919
911
 
@@ -1056,11 +1048,6 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
1056
1048
  Scope correction:
1057
1049
  - I did not find `guest_session_id` in the inspected models.
1058
1050
 
1059
- Pulse: Reasoning Readiness ~55% · Context Debt 45% · +12% (initial ask + code recon)
1060
-
1061
- (lift bridge — renders right above the next action) Most of the gap left is
1062
- unsettled design decisions — that's exactly what the next step, discovery, resolves.
1063
-
1064
1051
  Next: attach PRDs/tickets if they should shape scope, or `proceed` to continue.
1065
1052
  ```
1066
1053
 
@@ -1137,7 +1124,7 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
1137
1124
 
1138
1125
  If the user explicitly asks "what did you find?", you may show a tight digest then — otherwise stay silent.
1139
1126
 
1140
- **Pulse (recon done):** Emit a pulse line — repo grounding just moved meaningfully (sources collected, agent inspected files, possibly KG hits). Compute per `/ritual context-pulse` § Step CP3 and render compact unless this is the FIRST pulse of the build flow, in which case use full.
1127
+ **No pulse here** (pre-curate see cli-output-contract § Inline pulses; the first pulse is at Step 7.4).
1141
1128
 
1142
1129
  ##### 5.7.3 — Collect the `sources` array
1143
1130
 
@@ -1342,9 +1329,8 @@ Ritual build
1342
1329
  Discovery questions ready — {M} generated across {N} areas.
1343
1330
 
1344
1331
  These 12 questions target where this problem is hardest — the tradeoffs,
1345
- constraints, and unknowns that decide the design. When you proceed, Ritual
1346
- dispatches its research agents to answer them against this codebase and your
1347
- sources; those answers become the spine of the {Deliverable}.
1332
+ constraints, and unknowns that decide the design. Next, agents will develop
1333
+ answers and generate recommendations.
1348
1334
 
1349
1335
  {Area name 1}
1350
1336
  ✓ 1. {question, full text, wrapped readably}
@@ -1566,7 +1552,21 @@ Skip silently if no anti-goals were mentioned. (No mention = nothing to confirm;
1566
1552
 
1567
1553
  #### Step 8 — Run discovery through recommendations
1568
1554
 
1569
- The agentic pipeline runs sourcing → answers → recommendations. For engineering / agentic-coding flows, do **not** offer an answers-only mode; the happy path is to run through recommendations.
1555
+ The pipeline runs answers → recommendations. **Choose the answerer by whether you
1556
+ actually have the code to ground answers in — this is NOT decided by the fact
1557
+ it's `/ritual build`.**
1558
+
1559
+ - **You're genuinely repo-linked** — Step 5.7 recon ran and you read real files
1560
+ (you have a `sources` list / codebase context packet, and filesystem access to
1561
+ the repo): **YOU answer the picked questions** yourself. You're closest to the
1562
+ code, so the answers are grounded in what you actually read.
1563
+ - **You're not** — recon was skipped (Step 5.7.6), no repo is open, or the ask
1564
+ isn't a codebase task: use the **server agentic run** (`start_agentic_run`),
1565
+ which sources answers from the knowledge graph + registered sources instead.
1566
+
1567
+ Pick the path honestly; don't claim to answer from code you didn't read.
1568
+
1569
+ <!-- skill-options:no-gate-change: Step 8 answerer is chosen by real repo-linkage (recon ran / code open), not by the /ritual build invocation; agent-answers when repo-linked, server-run fallback. Includes prose guidance on answer length (~300-600 words), that attached code is OPTIONAL illustrative reference (not part of the answer, not a verbatim copy), and a hard no-secrets/no-PII redaction rule for the BYO answerer. The run/pause gate + its options are unchanged — no new pause gate or Step header. -->
1570
1570
 
1571
1571
  For `engineering`, `delivery`, and `operations` roles, show:
1572
1572
 
@@ -1576,20 +1576,28 @@ Ritual build
1576
1576
 
1577
1577
  Run discovery
1578
1578
 
1579
- Ritual will source answers for the picked questions, then generate
1579
+ I'll answer the picked questions from the codebase, then generate
1580
1580
  recommendations. This usually takes a few minutes.
1581
1581
 
1582
- Reply `run` to source answers → generate recommendations.
1582
+ Reply `run` to answer → generate recommendations.
1583
1583
  Reply `pause` to stop here.
1584
1584
  ```
1585
1585
 
1586
+ (Match the first line to the path you'll actually take: repo-linked → "I'll answer the picked questions from the codebase…"; fallback → "Ritual will source answers for the picked questions…". Don't claim to answer from code if you're taking the server path.)
1587
+
1586
1588
  Visible CTA is `run`. Accept `r`, `go`, `continue`, or `next` as aliases. Per `references/cli-output-contract.md` § Surface-aware continuation prompts, do NOT treat empty input as proceed inside agent chat.
1587
1589
 
1588
- Call `mcp__ritual__start_agentic_run` with:
1589
- - `scope_type: 'exploration'`
1590
- - `exploration_id`
1590
+ On `run`, **if you're genuinely repo-linked (per the check above), answer the questions yourself** (BYO-answerer; do NOT call `start_agentic_run`):
1591
+ 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.)
1592
+ 2. For each committed question, call `mcp__ritual__write_answer_context(question_id, content)` with an answer grounded in your codebase recon — 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 committed; only the final committed set drives recommendations.
1593
+ - **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.
1594
+ - **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.
1595
+ - **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.
1596
+ 3. When every committed question has answer context, call `mcp__ritual__submit_all_answers(exploration_id)` — it commits the set and triggers recommendation generation. Then go to the recommendation wait (Step 8.1, agent-answered path).
1597
+
1598
+ **Fallback — server answers (no repo / nothing to ground in):** call `mcp__ritual__start_agentic_run` with `scope_type: 'exploration'` + `exploration_id`, then follow the server polling path (8.0 → 8.1).
1591
1599
 
1592
- For `product`, `design`, or explicitly PRD-style flows, answer review may be useful. Offer two choices without time estimates:
1600
+ For `product`, `design`, or explicitly PRD-style flows where answer review is useful, offer two choices without time estimates (this path uses the SERVER answer engine so the user can review each generated answer — Step 8.5):
1593
1601
 
1594
1602
  ```text
1595
1603
  Ritual build
@@ -1608,9 +1616,11 @@ Reply `1` or `2`. Reply `pause` to stop here.
1608
1616
 
1609
1617
  If they pick 1, call `start_agentic_run` with `stop_after: 'answers'` and continue to Step 8.5 when it pauses. If they pick 2, call without `stop_after` and continue to Step 9 when complete.
1610
1618
 
1611
- ##### 8.0 — "You're unblocked" pre-roll (right after `start_agentic_run` returns the run_id)
1619
+ ##### 8.0 — "You're unblocked" pre-roll (once server-side work is running)
1612
1620
 
1613
- **Lock the product promise BEFORE you enter the polling loop.** The run continues server-side; the user is free to step away. The polling loop becomes the agent's job, not the user's obligation.
1621
+ This pre-roll is for the **rec-generation wait** fire it once server-side work is running: on the agent-answered path, right after `submit_all_answers` returns (recommendation generation is now queued); on the server fallback, right after `start_agentic_run` returns the run_id. (On the agent-answered path the *answering itself* is your active work — don't show the pre-roll until you've submitted.)
1622
+
1623
+ **Lock the product promise BEFORE you enter the polling loop.** Recommendation generation continues server-side; the user is free to step away. The polling loop becomes the agent's job, not the user's obligation.
1614
1624
 
1615
1625
  Tier the pre-roll by projected duration. Latency baseline: ~15s/question (V5.2 + KG injection, calibrate quarterly against `recs-pipeline.ts` eval results). Multiply the picked-question count by 15s, divide by 60 to get minutes.
1616
1626
 
@@ -1660,7 +1670,13 @@ Pick whichever fits the user's flow — they're equivalent in content. Do not in
1660
1670
 
1661
1671
  ##### 8.1 — Polling loop
1662
1672
 
1663
- 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.
1673
+ <!-- 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 until1 rec; the only difference is who produced the answers. No new pause gate or Step header; the run/pause gate + its options are unchanged. -->
1674
+
1675
+ **Both answerers converge here — once the run is underway, poll until recommendations exist.** The job from this point on is the SAME regardless of who produced the answers: poll `mcp__ritual__get_recommendations_preview(exploration_id)` until it returns **at least one recommendation**, then continue to Step 9. The *only* difference between the two paths is the **answerer** — the **local coding agent** (you, when repo-linked) vs **Ritual's server agentic run** — and that only changes how you reach this wait (agent-answered → straight to the rec poll; server → poll the run to `COMPLETED` first, then the recs). Never render the Step 9 landing, and never call `accept_recommendations`, from a zero-rec read.
1676
+
1677
+ **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_recommendations_preview(exploration_id)` (`Bash sleep 20` per iteration, a "still generating recommendations…" line every ~3 polls) until it returns **at least one recommendation**, then continue to Step 9. NEVER render the Step 9 landing — and never call `accept_recommendations` — from a zero-rec read; if 10+ min pass with zero rows, surface it as an anomaly. (Skip the `get_agentic_run` polling below — that's the server-fallback path.)
1678
+
1679
+ **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.
1664
1680
 
1665
1681
  **On the FIRST poll only** (not every poll), prepend one line that locks the "background execution is default" mental model:
1666
1682
 
@@ -310,19 +310,16 @@ This rule applies to: Step 9.5 (`get_requirement_set_status`), Step 10b (`get_bu
310
310
 
311
311
  #### Inline pulses — surface reasoning readiness climbing as context debt drops
312
312
 
313
- After **Steps 3, 5, 7.4, 8, 9, and 10**, emit a one-line **context pulse** showing how the score moved. This is the visible encouragement loop — the user watches **reasoning readiness** climb (or equivalently, **context debt** drop) with each step instead of just feeling like the agent is asking for more inputs.
313
+ The context pulse appears **only from the curate-questions step onward** — emit it after **Steps 7.4, 8, 9, and 10**, the FIRST one being when the user proceeds from curating discovery questions. Do NOT emit a pulse at the Job gate, the Scope gate, or after recon (Steps 3/5) — early on the score is low and noisy and the line just clutters the gate. This is the visible encouragement loop once the build is genuinely moving — the user watches **reasoning readiness** climb (context debt drop) as discovery recommendations brief land.
314
314
 
315
315
  The pulse rule and visual specs live in the [§ /ritual context-pulse](#ritual-context-pulse) section below — see *Step CP5 — visual modes*. TL;DR:
316
316
 
317
- The pulse has TWO parts, and they sit in DIFFERENT places the score at the top of the message (status: where you are), and the **lift bridge** immediately above the action line (motivation: why your next move matters).
317
+ **Placement always at the BOTTOM of the message, never the first line.** The pulse score line sits **immediately above the action/CTA line** (with the one-sentence lift bridge), so the message leads with the step's actual content and ends with the progress signal + the next move. Never open a message with the pulse.
318
318
 
319
319
  ```text
320
- Pulse: Reasoning Readiness 58% · Context Debt 42% · +3% (scope locked)
321
-
322
320
  {…the step's content…}
323
321
 
324
- Most of the gap left is unsettled design decisions that's exactly what
325
- the next step, discovery, resolves.
322
+ Pulse: Reasoning Readiness 58% · Context Debt 42% · +3% (scope locked)
326
323
  Reply proceed (run discovery → recommendations) · expert · pause
327
324
  ```
328
325
 
@@ -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: 3d973c8d7e6a514b -->
2
+ <!-- source-sha: 49db57c7a618c67e -->
3
3
 
4
4
  # /ritual lite — fast build (generated; do not edit)
5
5
 
@@ -54,6 +54,29 @@ for background discovery (unchosen-options → discovery worktrees). When you se
54
54
  - **Create the exploration with `spawn_origin: 'discovery_worktree'`** (Step 6,
55
55
  `create_exploration`) so `get_exploration_status` reports
56
56
  `autonomousDiscovery: true`.
57
+ - **Answer the discovery questions YOURSELF (Step 8 override) — do NOT call
58
+ `start_agentic_run`.** You have the repo open; you are the best answerer. The
59
+ accept call (Step 7.4, `accept_discovery_questions_batch`) returns
60
+ `materialized[]` — the committed questions with their row `id`s. For each, call
61
+ `mcp__ritual__write_answer_context(question_id, content)` with an answer
62
+ grounded in your codebase recon — answer in PARALLEL where your agent supports
63
+ it (e.g. one subagent per Area). Keep each answer to **~300–600 words by
64
+ default**. The answer is **prose**; code is **optional reference, not part of
65
+ the answer** — attach a snippet only when it would help a future reader/agent
66
+ reason about your answer (a key type/contract/call site), never to complete it.
67
+ When you do, `content` is **markdown**: add it as a **fenced code block with a
68
+ language tag** (minimal lines + a `file/path`, never a whole-file paste — Spark
69
+ lifts these into a collapsed "View details" reference and markdown stays
70
+ portable to the `.ritual/` projection). A snippet is **illustrative, not a
71
+ verbatim copy** — simplify/elide freely, and **NEVER** include secrets, API
72
+ keys, tokens, credentials, `.env` values, real customer data, or PII (use
73
+ placeholders like `process.env.X` / `"<api-key>"`); the same goes for the prose.
74
+ The content is provisional + provenance-tagged agentic until committed. When
75
+ every committed question has answer context, call
76
+ `mcp__ritual__submit_all_answers(exploration_id)` — it commits the set and
77
+ triggers recommendation generation (the BYO-answerer flow; `start_agentic_run`
78
+ is unnecessary). Then poll `get_recommendations_preview` until ≥1 recommendation
79
+ and continue to the brief.
57
80
  - **Materialize the reasoning as files (OKF projection).** Once the brief is
58
81
  written, run `ritual project <exploration-id>` — it projects the exploration
59
82
  (index + build-brief + scope-contract + recommendations) into `.ritual/` in
@@ -115,7 +138,7 @@ When **not** to use:
115
138
 
116
139
  Use explicit **[LITE AUTO — no pause; auto-pick the recommended default]** only at decision gates. Pause when the user must choose among options, approve creation or acceptance, resolve ambiguity, authorize implementation, accept cost/time, or provide missing non-code context. Do **not** pause for status-only steps, safe defaults, internal recon, or silent checks.
117
140
 
118
- **Pauses are not optional even in auto-mode** (load-bearing). When the host agent has auto-accept / bypass-permissions enabled, the SKILL must still honor every `**[LITE AUTO — no pause; auto-pick the recommended default]**` as a hard stop. Inferring an answer from context, choosing a default, or pressing on without an actual user reply defeats the build flow's value: Ritual is producing aligned recommendations because the human shaped the inputs, not because the agent guessed plausibly. The auto-mode reminder in Step 0 below is informational only it does not relax this rule; it's a heads-up to the user, not permission to bypass pauses.
141
+ **Pauses are not optional even in auto-mode** (load-bearing). When the host agent has auto-accept / bypass-permissions enabled, the SKILL must still honor every `**[LITE AUTO — no pause; auto-pick the recommended default]**` as a hard stop. Inferring an answer from context, choosing a default, or pressing on without an actual user reply defeats the build flow's value: Ritual is producing aligned recommendations because the human shaped the inputs, not because the agent guessed plausibly. We do not surface a heads-up about this to the user (Step 0) we simply enforce the gates regardless of the host's auto-accept mode.
119
142
 
120
143
  ---
121
144
 
@@ -129,19 +152,18 @@ Follow `references/cli-output-contract.md` for terminal output, dense-list forma
129
152
  >
130
153
  > The new shape: one informational line in the FIRST user-visible message of the flow. No pause. No `**[LITE AUTO — no pause; auto-pick the recommended default]**` here. If the user IS in auto-mode, the next genuine decision pause (workspace pick, scope pick, etc.) is the natural place they'll notice it racing past. The line below gives them the right cue + remediation.
131
154
 
132
- The SKILL MUST include the following one-line heads-up at the top of the **first** user-visible message in a `/ritual build` flow (typically the workspace summary in Step 1, or the no-args prompt in Step 1.1). Include it once per flow only:
155
+ Do NOT show an auto-mode / "~N decisions" / Shift+Tab heads-up. It reads as meta-instruction clutter at the start of the flow just begin the flow plainly. (The pausing discipline below is enforced regardless of the host's auto-accept mode; we simply don't preface it with a lecture.)
133
156
 
134
- ```text
135
- Heads-up: Ritual's build flow needs ~5 real decisions from you (workspace,
136
- scope, discovery picks, rec acceptance, implementation approval). If your
137
- agent is in auto-accept / bypass-permissions mode, those pauses won't
138
- actually pause for you — toggle off first (Claude Code: Shift+Tab to cycle
139
- back to "default").
140
- ```
157
+ Pausing discipline is still load-bearing — every `**[LITE AUTO — no pause; auto-pick the recommended default]**` later in the flow is a hard stop regardless of whether the user reads it. The agent's contract is unchanged from the preamble: never infer an answer, never pick a default, never press on without an actual user reply. Auto-mode collapsing those pauses is the user's risk to accept; the SKILL enforces the gates regardless.
158
+
159
+ <!-- skill-options:no-gate-change: voice/copy cleanup — removes the auto-mode "~5 decisions" heads-up, adds a no-preamble/no-editorializing/render-verbatim voice rule, replaces job-gate + run-gate copy with plainer wording, and moves the context pulse to the bottom (above the CTA) starting only at the curate-questions step. No tracked pause gate, option, or Step header is added, removed, or changed. -->
141
160
 
142
- That's it. No menu. No required reply. Just inform.
161
+ **Voice render gates plainly, add NOTHING (load-bearing, applies to EVERY message in the flow).** Output the gate copy this skill prescribes and nothing else. In particular, NEVER:
162
+ - **Preface a tool call with narration.** Don't say "I'll start by classifying the job…", "Let me kick off an exploration…", "I'll create the exploration and pull questions…". Just make the tool call; report the result plainly after.
163
+ - **Editorialize about the work.** Don't add commentary like "this is exactly the kind of ambiguous, cross-cutting work where it pays to surface context before writing code", "the design decisions still aren't settled", or any "here's why this step matters" justification. The user knows why they ran `/ritual build`.
164
+ - **Narrate internal mechanics or paraphrase the gate copy into process-talk.** Don't say "You're framed. Grounding in the codebase, then I'll…" or describe what Ritual's research agents do under the hood. Lead with the plain meaning for the user; surface mechanism only if they ask.
143
165
 
144
- Pausing discipline is still load-bearing — every `**[LITE AUTO — no pause; auto-pick the recommended default]**` later in the flow is a hard stop regardless of whether the user reads or ignores this heads-up. The agent's contract is unchanged from the preamble: never infer an answer, never pick a default, never press on without an actual user reply. Auto-mode collapsing those pauses is the user's risk to accept; the SKILL's job is just to surface that risk visibly once, then enforce the gates regardless.
166
+ Every message should be the prescribed gate copy (rail + content + CTA) terse, plain, no preamble, no sign-off commentary.
145
167
 
146
168
  **Per-agent indicators** (informational, for the SKILL's own awareness — NOT to gate behavior):
147
169
 
@@ -208,8 +230,9 @@ When this gate runs:
208
230
  ● Job ○ Scope ○ Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
209
231
 
210
232
  You're looking to: {restate the ask in one short clause}
211
- The job to be done: {workItemLabel} — {why}
212
- Deliverable: {deliverableTemplate}
233
+
234
+ Once you run the exploration and review recommendations, a {deliverableTemplate} will be
235
+ created as context for your coding agent.
213
236
 
214
237
  Reply `proceed` to frame the problem (sub-problems + problem statement), or tell me what the
215
238
  job actually is.
@@ -304,10 +327,8 @@ Resolution order:
304
327
  - **Not found** (deleted, access revoked, wrong id in config): pause with a clear error and offer `workspace: list` to re-bind. Don't fall through to `list_explorations` later — it errors with a less actionable message.
305
328
  - **Found:** store `workspace.explorationCount` for Step 1.5. The SKILL never maintains a local "empty workspace" cache because that goes stale against anything that mutates the workspace outside this CLI's view.
306
329
 
307
- User-visible (per Step 0, prepend the one-line auto-mode heads-up — once per flow):
330
+ User-visible:
308
331
 
309
- > Heads-up: Ritual's build flow needs ~5 real decisions from you (workspace, scope, discovery picks, rec acceptance, implementation approval). If your agent is in auto-accept / bypass-permissions mode, those pauses won't actually pause for you — toggle off first (Claude Code: Shift+Tab to cycle back to "default").
310
- >
311
332
  > Using workspace: **{workspaceName}** from `.ritual/config.json`.
312
333
  > Override with `workspace: list`.
313
334
 
@@ -372,12 +393,6 @@ If there are **zero existing explorations** and `raw_input = null`, do not say "
372
393
  Ritual build
373
394
  ✓ Job ● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
374
395
 
375
- Heads-up: Ritual's build flow needs ~5 real decisions from you (workspace,
376
- scope, discovery picks, rec acceptance, implementation approval). If your
377
- agent is in auto-accept / bypass-permissions mode, those pauses won't
378
- actually pause for you — toggle off first (Claude Code: Shift+Tab to cycle
379
- back to "default").
380
-
381
396
  Using workspace: {workspaceName}.
382
397
 
383
398
  No Ritual history here yet.
@@ -982,7 +997,7 @@ The returned text becomes the new current draft. Show it using the same `Problem
982
997
 
983
998
  When the user locks the frame, store the final text as `problem_statement` for Step 6.
984
999
 
985
- **Pulse (Step 5 done):** Emit a pulse feature clarity just jumped. Compute per `/ritual context-pulse` § Step CP3. Render full if this crosses Raw ask Under-specified, else compact. Translate raw tier labels into user-facing copy per `references/cli-output-contract.md` § Pulse tier labels never expose `RAW_ASK` / `UNDER_SPECIFIED` / etc. directly.
1000
+ **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.
986
1001
 
987
1002
  #### Step 5.7 — Ground the exploration (silent recon — runs AFTER the frame locks)
988
1003
 
@@ -1125,11 +1140,6 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
1125
1140
  Scope correction:
1126
1141
  - I did not find `guest_session_id` in the inspected models.
1127
1142
 
1128
- Pulse: Reasoning Readiness ~55% · Context Debt 45% · +12% (initial ask + code recon)
1129
-
1130
- (lift bridge — renders right above the next action) Most of the gap left is
1131
- unsettled design decisions — that's exactly what the next step, discovery, resolves.
1132
-
1133
1143
  Next: attach PRDs/tickets if they should shape scope, or `proceed` to continue.
1134
1144
  ```
1135
1145
 
@@ -1206,7 +1216,7 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
1206
1216
 
1207
1217
  If the user explicitly asks "what did you find?", you may show a tight digest then — otherwise stay silent.
1208
1218
 
1209
- **Pulse (recon done):** Emit a pulse line — repo grounding just moved meaningfully (sources collected, agent inspected files, possibly KG hits). Compute per `/ritual context-pulse` § Step CP3 and render compact unless this is the FIRST pulse of the build flow, in which case use full.
1219
+ **No pulse here** (pre-curate see cli-output-contract § Inline pulses; the first pulse is at Step 7.4).
1210
1220
 
1211
1221
  ##### 5.7.3 — Collect the `sources` array
1212
1222
 
@@ -1383,9 +1393,8 @@ Ritual build
1383
1393
  Discovery questions ready — {M} generated across {N} areas.
1384
1394
 
1385
1395
  These 12 questions target where this problem is hardest — the tradeoffs,
1386
- constraints, and unknowns that decide the design. When you proceed, Ritual
1387
- dispatches its research agents to answer them against this codebase and your
1388
- sources; those answers become the spine of the {Deliverable}.
1396
+ constraints, and unknowns that decide the design. Next, agents will develop
1397
+ answers and generate recommendations.
1389
1398
 
1390
1399
  {Area name 1}
1391
1400
  ✓ 1. {question, full text, wrapped readably}
@@ -1607,7 +1616,21 @@ Skip silently if no anti-goals were mentioned. (No mention = nothing to confirm;
1607
1616
 
1608
1617
  #### Step 8 — Run discovery through recommendations
1609
1618
 
1610
- The agentic pipeline runs sourcing → answers → recommendations. For engineering / agentic-coding flows, do **not** offer an answers-only mode; the happy path is to run through recommendations.
1619
+ The pipeline runs answers → recommendations. **Choose the answerer by whether you
1620
+ actually have the code to ground answers in — this is NOT decided by the fact
1621
+ it's `/ritual build`.**
1622
+
1623
+ - **You're genuinely repo-linked** — Step 5.7 recon ran and you read real files
1624
+ (you have a `sources` list / codebase context packet, and filesystem access to
1625
+ the repo): **YOU answer the picked questions** yourself. You're closest to the
1626
+ code, so the answers are grounded in what you actually read.
1627
+ - **You're not** — recon was skipped (Step 5.7.6), no repo is open, or the ask
1628
+ isn't a codebase task: use the **server agentic run** (`start_agentic_run`),
1629
+ which sources answers from the knowledge graph + registered sources instead.
1630
+
1631
+ Pick the path honestly; don't claim to answer from code you didn't read.
1632
+
1633
+ <!-- skill-options:no-gate-change: Step 8 answerer is chosen by real repo-linkage (recon ran / code open), not by the /ritual build invocation; agent-answers when repo-linked, server-run fallback. Includes prose guidance on answer length (~300-600 words), that attached code is OPTIONAL illustrative reference (not part of the answer, not a verbatim copy), and a hard no-secrets/no-PII redaction rule for the BYO answerer. The run/pause gate + its options are unchanged — no new pause gate or Step header. -->
1611
1634
 
1612
1635
  For `engineering`, `delivery`, and `operations` roles, show:
1613
1636
 
@@ -1617,20 +1640,28 @@ Ritual build
1617
1640
 
1618
1641
  Run discovery
1619
1642
 
1620
- Ritual will source answers for the picked questions, then generate
1643
+ I'll answer the picked questions from the codebase, then generate
1621
1644
  recommendations. This usually takes a few minutes.
1622
1645
 
1623
- Reply `run` to source answers → generate recommendations.
1646
+ Reply `run` to answer → generate recommendations.
1624
1647
  Reply `pause` to stop here.
1625
1648
  ```
1626
1649
 
1650
+ (Match the first line to the path you'll actually take: repo-linked → "I'll answer the picked questions from the codebase…"; fallback → "Ritual will source answers for the picked questions…". Don't claim to answer from code if you're taking the server path.)
1651
+
1627
1652
  Visible CTA is `run`. Accept `r`, `go`, `continue`, or `next` as aliases. Per `references/cli-output-contract.md` § Surface-aware continuation prompts, do NOT treat empty input as proceed inside agent chat.
1628
1653
 
1629
- Call `mcp__ritual__start_agentic_run` with:
1630
- - `scope_type: 'exploration'`
1631
- - `exploration_id`
1654
+ On `run`, **if you're genuinely repo-linked (per the check above), answer the questions yourself** (BYO-answerer; do NOT call `start_agentic_run`):
1655
+ 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.)
1656
+ 2. For each committed question, call `mcp__ritual__write_answer_context(question_id, content)` with an answer grounded in your codebase recon — 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 committed; only the final committed set drives recommendations.
1657
+ - **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.
1658
+ - **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.
1659
+ - **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.
1660
+ 3. When every committed question has answer context, call `mcp__ritual__submit_all_answers(exploration_id)` — it commits the set and triggers recommendation generation. Then go to the recommendation wait (Step 8.1, agent-answered path).
1661
+
1662
+ **Fallback — server answers (no repo / nothing to ground in):** call `mcp__ritual__start_agentic_run` with `scope_type: 'exploration'` + `exploration_id`, then follow the server polling path (8.0 → 8.1).
1632
1663
 
1633
- For `product`, `design`, or explicitly PRD-style flows, answer review may be useful. Offer two choices without time estimates:
1664
+ For `product`, `design`, or explicitly PRD-style flows where answer review is useful, offer two choices without time estimates (this path uses the SERVER answer engine so the user can review each generated answer — Step 8.5):
1634
1665
 
1635
1666
  ```text
1636
1667
  Ritual build
@@ -1649,9 +1680,11 @@ Reply `1` or `2`. Reply `pause` to stop here.
1649
1680
 
1650
1681
  If they pick 1, call `start_agentic_run` with `stop_after: 'answers'` and continue to Step 8.5 when it pauses. If they pick 2, call without `stop_after` and continue to Step 9 when complete.
1651
1682
 
1652
- ##### 8.0 — "You're unblocked" pre-roll (right after `start_agentic_run` returns the run_id)
1683
+ ##### 8.0 — "You're unblocked" pre-roll (once server-side work is running)
1653
1684
 
1654
- **Lock the product promise BEFORE you enter the polling loop.** The run continues server-side; the user is free to step away. The polling loop becomes the agent's job, not the user's obligation.
1685
+ This pre-roll is for the **rec-generation wait** fire it once server-side work is running: on the agent-answered path, right after `submit_all_answers` returns (recommendation generation is now queued); on the server fallback, right after `start_agentic_run` returns the run_id. (On the agent-answered path the *answering itself* is your active work — don't show the pre-roll until you've submitted.)
1686
+
1687
+ **Lock the product promise BEFORE you enter the polling loop.** Recommendation generation continues server-side; the user is free to step away. The polling loop becomes the agent's job, not the user's obligation.
1655
1688
 
1656
1689
  Tier the pre-roll by projected duration. Latency baseline: ~15s/question (V5.2 + KG injection, calibrate quarterly against `recs-pipeline.ts` eval results). Multiply the picked-question count by 15s, divide by 60 to get minutes.
1657
1690
 
@@ -1701,7 +1734,13 @@ Pick whichever fits the user's flow — they're equivalent in content. Do not in
1701
1734
 
1702
1735
  ##### 8.1 — Polling loop
1703
1736
 
1704
- 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.
1737
+ <!-- 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 until1 rec; the only difference is who produced the answers. No new pause gate or Step header; the run/pause gate + its options are unchanged. -->
1738
+
1739
+ **Both answerers converge here — once the run is underway, poll until recommendations exist.** The job from this point on is the SAME regardless of who produced the answers: poll `mcp__ritual__get_recommendations_preview(exploration_id)` until it returns **at least one recommendation**, then continue to Step 9. The *only* difference between the two paths is the **answerer** — the **local coding agent** (you, when repo-linked) vs **Ritual's server agentic run** — and that only changes how you reach this wait (agent-answered → straight to the rec poll; server → poll the run to `COMPLETED` first, then the recs). Never render the Step 9 landing, and never call `accept_recommendations`, from a zero-rec read.
1740
+
1741
+ **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_recommendations_preview(exploration_id)` (`Bash sleep 20` per iteration, a "still generating recommendations…" line every ~3 polls) until it returns **at least one recommendation**, then continue to Step 9. NEVER render the Step 9 landing — and never call `accept_recommendations` — from a zero-rec read; if 10+ min pass with zero rows, surface it as an anomaly. (Skip the `get_agentic_run` polling below — that's the server-fallback path.)
1742
+
1743
+ **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.
1705
1744
 
1706
1745
  **On the FIRST poll only** (not every poll), prepend one line that locks the "background execution is default" mental model:
1707
1746
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "0.36.14",
3
- "builtAt": "2026-06-14T21:33:31.224Z",
4
- "skillsHash": "ee9a77046c96"
2
+ "cliVersion": "0.36.22",
3
+ "builtAt": "2026-06-15T13:28:31.790Z",
4
+ "skillsHash": "8a8905aae549"
5
5
  }
@@ -3,7 +3,7 @@ name: ritual
3
3
  description: "Use when an engineer wants a coding agent to plan or build a feature, refactor, or implementation-heavy change that depends on context the agent can't infer on its own — strategic intent, constraints, prior decisions, and trade-offs that live in the user's head. Ritual runs a structured exploration to surface that context through targeted discovery questions, combines it with codebase signals and prior explorations, and delivers a validated build brief (sub-problems, recommendations, dependencies) — additional context to fold into plan mode before the agent writes code. Prefer this over jumping straight to implementation or plan mode when the problem is ambiguous, cross-cutting, or has non-obvious constraints. Subcommands: build (full planning-to-sync cycle — default for new features), resume (continue an in-flight exploration), lineage (file-path KG history — what decisions shaped this code), context-pulse (readiness and context-debt scoring — is this safe to build yet?)."
4
4
  argument-hint: "[subcommand] <args> (e.g. 'build Reduce T2 churn in Q3', 'resume', 'lineage src/checkout/views.py', 'context-pulse Add billing export')"
5
5
  user-invocable: true
6
- stamp: ee9a77046c96
6
+ stamp: 8a8905aae549
7
7
  ---
8
8
 
9
9
  # /ritual