@ritualai/cli 0.36.14 → 0.36.25
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/dist/commands/build.js +5 -0
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/init.js +10 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/lib/pat-store.js +106 -35
- package/dist/lib/pat-store.js.map +1 -1
- package/dist/lib/update-notice.js +26 -0
- package/dist/lib/update-notice.js.map +1 -0
- package/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +3 -3
- package/skills/claude-code/ritual/SKILL.md +1 -1
- package/skills/claude-code/ritual/references/build-flow.md +62 -43
- package/skills/claude-code/ritual/references/cli-output-contract.md +6 -8
- package/skills/claude-code/ritual/references/lite-flow.md +86 -44
- package/skills/codex/ritual/.ritual-bundle.json +3 -3
- package/skills/codex/ritual/SKILL.md +1 -1
- package/skills/codex/ritual/references/build-flow.md +62 -43
- package/skills/codex/ritual/references/cli-output-contract.md +6 -8
- package/skills/codex/ritual/references/lite-flow.md +86 -44
- package/skills/cursor/ritual/.ritual-bundle.json +3 -3
- package/skills/cursor/ritual/SKILL.md +1 -1
- package/skills/cursor/ritual/references/build-flow.md +62 -43
- package/skills/cursor/ritual/references/cli-output-contract.md +6 -8
- package/skills/cursor/ritual/references/lite-flow.md +86 -44
- package/skills/gemini/ritual/.ritual-bundle.json +3 -3
- package/skills/gemini/ritual/SKILL.md +1 -1
- package/skills/gemini/ritual/references/build-flow.md +62 -43
- package/skills/gemini/ritual/references/cli-output-contract.md +6 -8
- package/skills/gemini/ritual/references/lite-flow.md +86 -44
- package/skills/kiro/ritual/.ritual-bundle.json +3 -3
- package/skills/kiro/ritual/SKILL.md +1 -1
- package/skills/kiro/ritual/references/build-flow.md +62 -43
- package/skills/kiro/ritual/references/cli-output-contract.md +6 -8
- package/skills/kiro/ritual/references/lite-flow.md +86 -44
- package/skills/vscode/ritual/.ritual-bundle.json +3 -3
- package/skills/vscode/ritual/SKILL.md +1 -1
- package/skills/vscode/ritual/references/build-flow.md +62 -43
- package/skills/vscode/ritual/references/cli-output-contract.md +6 -8
- package/skills/vscode/ritual/references/lite-flow.md +86 -44
|
@@ -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.
|
|
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
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
143
|
-
|
|
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
|
|
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.
|
|
@@ -845,6 +837,8 @@ Store the final sub-problems for Step 5 — they go into `considerations[]`.
|
|
|
845
837
|
|
|
846
838
|
#### Step 5 — Generate problem frame
|
|
847
839
|
|
|
840
|
+
<!-- skill-options:no-gate-change: Step 5 adds a render-only rule (do not surface follow_up_questions / an "open questions" preview / fuzzy-meta at the frame gate); the frame's pause + options + Reply line are unchanged. -->
|
|
841
|
+
|
|
848
842
|
##### 5.1 First draft
|
|
849
843
|
|
|
850
844
|
Call `mcp__ritual__generate_problem_statement` with:
|
|
@@ -887,6 +881,7 @@ Or reply with edits, e.g. `tighten`, `broaden`, `focus on outbox`, `drop dashboa
|
|
|
887
881
|
```
|
|
888
882
|
|
|
889
883
|
Rules:
|
|
884
|
+
- **Render ONLY the four blocks above** — Problem frame, Optimize for, References, and the Reply line. Nothing else. The `generate_problem_statement` response may include `follow_up_questions` and quality scores: those are for YOUR internal awareness, never for display. Do NOT add an "Open questions" / "what discovery will resolve" section, do NOT preview or list discovery questions here, and do NOT editorialize about what's "still fuzzy" or "what the next step pins down." Discovery is the next step and owns open questions; the frame is a lock-point, not a discovery preview. Surfacing them here both pre-empts Step 7 and clutters the gate.
|
|
890
885
|
- Do not show the old versioned scope heading.
|
|
891
886
|
- Do not show `Engineering problem:` as the heading; use `Problem frame`.
|
|
892
887
|
- Do not say `ship it` unless the user used that language first.
|
|
@@ -913,7 +908,7 @@ The returned text becomes the new current draft. Show it using the same `Problem
|
|
|
913
908
|
|
|
914
909
|
When the user locks the frame, store the final text as `problem_statement` for Step 6.
|
|
915
910
|
|
|
916
|
-
**
|
|
911
|
+
**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
912
|
|
|
918
913
|
#### Step 5.7 — Ground the exploration (silent recon — runs AFTER the frame locks)
|
|
919
914
|
|
|
@@ -1056,11 +1051,6 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
1056
1051
|
Scope correction:
|
|
1057
1052
|
- I did not find `guest_session_id` in the inspected models.
|
|
1058
1053
|
|
|
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
1054
|
Next: attach PRDs/tickets if they should shape scope, or `proceed` to continue.
|
|
1065
1055
|
```
|
|
1066
1056
|
|
|
@@ -1137,7 +1127,7 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
1137
1127
|
|
|
1138
1128
|
If the user explicitly asks "what did you find?", you may show a tight digest then — otherwise stay silent.
|
|
1139
1129
|
|
|
1140
|
-
**
|
|
1130
|
+
**No pulse here** (pre-curate — see cli-output-contract § Inline pulses; the first pulse is at Step 7.4).
|
|
1141
1131
|
|
|
1142
1132
|
##### 5.7.3 — Collect the `sources` array
|
|
1143
1133
|
|
|
@@ -1342,9 +1332,8 @@ Ritual build
|
|
|
1342
1332
|
Discovery questions ready — {M} generated across {N} areas.
|
|
1343
1333
|
|
|
1344
1334
|
These 12 questions target where this problem is hardest — the tradeoffs,
|
|
1345
|
-
constraints, and unknowns that decide the design.
|
|
1346
|
-
|
|
1347
|
-
sources; those answers become the spine of the {Deliverable}.
|
|
1335
|
+
constraints, and unknowns that decide the design. Next, agents will develop
|
|
1336
|
+
answers and generate recommendations.
|
|
1348
1337
|
|
|
1349
1338
|
{Area name 1}
|
|
1350
1339
|
✓ 1. {question, full text, wrapped readably}
|
|
@@ -1566,7 +1555,21 @@ Skip silently if no anti-goals were mentioned. (No mention = nothing to confirm;
|
|
|
1566
1555
|
|
|
1567
1556
|
#### Step 8 — Run discovery through recommendations
|
|
1568
1557
|
|
|
1569
|
-
The
|
|
1558
|
+
The pipeline runs answers → recommendations. **Choose the answerer by whether you
|
|
1559
|
+
actually have the code to ground answers in — this is NOT decided by the fact
|
|
1560
|
+
it's `/ritual build`.**
|
|
1561
|
+
|
|
1562
|
+
- **You're genuinely repo-linked** — Step 5.7 recon ran and you read real files
|
|
1563
|
+
(you have a `sources` list / codebase context packet, and filesystem access to
|
|
1564
|
+
the repo): **YOU answer the picked questions** yourself. You're closest to the
|
|
1565
|
+
code, so the answers are grounded in what you actually read.
|
|
1566
|
+
- **You're not** — recon was skipped (Step 5.7.6), no repo is open, or the ask
|
|
1567
|
+
isn't a codebase task: use the **server agentic run** (`start_agentic_run`),
|
|
1568
|
+
which sources answers from the knowledge graph + registered sources instead.
|
|
1569
|
+
|
|
1570
|
+
Pick the path honestly; don't claim to answer from code you didn't read.
|
|
1571
|
+
|
|
1572
|
+
<!-- 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
1573
|
|
|
1571
1574
|
For `engineering`, `delivery`, and `operations` roles, show:
|
|
1572
1575
|
|
|
@@ -1576,20 +1579,28 @@ Ritual build
|
|
|
1576
1579
|
|
|
1577
1580
|
Run discovery
|
|
1578
1581
|
|
|
1579
|
-
|
|
1582
|
+
I'll answer the picked questions from the codebase, then generate
|
|
1580
1583
|
recommendations. This usually takes a few minutes.
|
|
1581
1584
|
|
|
1582
|
-
Reply `run` to
|
|
1585
|
+
Reply `run` to answer → generate recommendations.
|
|
1583
1586
|
Reply `pause` to stop here.
|
|
1584
1587
|
```
|
|
1585
1588
|
|
|
1589
|
+
(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.)
|
|
1590
|
+
|
|
1586
1591
|
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
1592
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1593
|
+
On `run`, **if you're genuinely repo-linked (per the check above), answer the questions yourself** (BYO-answerer; do NOT call `start_agentic_run`):
|
|
1594
|
+
1. The Step 7.4 accept (`accept_discovery_questions_batch`) returned `materialized[]` — the committed questions with their row `id`s. (If you didn't keep them, the same ids are what you passed to accept.)
|
|
1595
|
+
2. For each 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.
|
|
1596
|
+
- **Length:** keep each answer to **~300–600 words by default** — tight and grounded, not an essay. Go longer only when the question genuinely needs it.
|
|
1597
|
+
- **Code:** the answer itself is **prose** — keep it that way. Code is **optional reference, not part of the answer**: attach a snippet only when it would help a future reader or agent reason about your answer (a key type, contract, or call site worth pointing back to), never to complete the answer. When you do, `content` is **markdown** — add it as a **fenced code block with a language tag** (e.g. ` ```ts `) with the `file/path` and the minimal illustrative lines, never a whole-file paste. Spark lifts these fences out of the prose into a collapsed "View details" reference beside the answer, and markdown keeps them portable to the `.ritual/` projection.
|
|
1598
|
+
- **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.
|
|
1599
|
+
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).
|
|
1591
1600
|
|
|
1592
|
-
|
|
1601
|
+
**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).
|
|
1602
|
+
|
|
1603
|
+
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
1604
|
|
|
1594
1605
|
```text
|
|
1595
1606
|
Ritual build
|
|
@@ -1608,9 +1619,11 @@ Reply `1` or `2`. Reply `pause` to stop here.
|
|
|
1608
1619
|
|
|
1609
1620
|
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
1621
|
|
|
1611
|
-
##### 8.0 — "You're unblocked" pre-roll (
|
|
1622
|
+
##### 8.0 — "You're unblocked" pre-roll (once server-side work is running)
|
|
1623
|
+
|
|
1624
|
+
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.)
|
|
1612
1625
|
|
|
1613
|
-
**Lock the product promise BEFORE you enter the polling loop.**
|
|
1626
|
+
**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
1627
|
|
|
1615
1628
|
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
1629
|
|
|
@@ -1660,7 +1673,13 @@ Pick whichever fits the user's flow — they're equivalent in content. Do not in
|
|
|
1660
1673
|
|
|
1661
1674
|
##### 8.1 — Polling loop
|
|
1662
1675
|
|
|
1663
|
-
|
|
1676
|
+
<!-- skill-options:no-gate-change: adds a convergence note at the top of the rec-wait — both answerers (local coding agent vs Ritual server) poll get_recommendations_preview until ≥1 rec; the only difference is who produced the answers. No new pause gate or Step header; the run/pause gate + its options are unchanged. -->
|
|
1677
|
+
|
|
1678
|
+
**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.
|
|
1679
|
+
|
|
1680
|
+
**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.)
|
|
1681
|
+
|
|
1682
|
+
**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
1683
|
|
|
1665
1684
|
**On the FIRST poll only** (not every poll), prepend one line that locks the "background execution is default" mental model:
|
|
1666
1685
|
|
|
@@ -1825,7 +1844,7 @@ or proceed to your {Deliverable}.
|
|
|
1825
1844
|
|
|
1826
1845
|
{…every category, every rec, one line each…}
|
|
1827
1846
|
|
|
1828
|
-
Pulse: Reasoning Readiness ~88% · Context Debt 12%
|
|
1847
|
+
Pulse: Reasoning Readiness ~88% · Context Debt 12% ↓16% (recommendations ready)
|
|
1829
1848
|
|
|
1830
1849
|
A few assumptions are still unverified — the build brief is what locks them down.
|
|
1831
1850
|
Reply drill R{N} (read one in full) · edit R{N} <your change> · proceed (generate the {Deliverable})
|
|
@@ -307,26 +307,24 @@ When you need to wait for async server work (requirements generation, build brie
|
|
|
307
307
|
This rule applies to: Step 9.5 (`get_requirement_set_status`), Step 10b (`get_build_brief_status` on timeout), and any future status-poll surface.
|
|
308
308
|
|
|
309
309
|
<!-- skill-options:no-gate-change: pulse render gains a delta + next-lift line; no decision gate, option, or pause is added or changed -->
|
|
310
|
+
<!-- skill-options:no-gate-change: pulse delta now renders as a Context Debt directional drop (Context Debt N% ↓M%) instead of a bare · +N%, so the movement reads as debt going down; render-only, no gate/option/pause change -->
|
|
310
311
|
|
|
311
312
|
#### Inline pulses — surface reasoning readiness climbing as context debt drops
|
|
312
313
|
|
|
313
|
-
|
|
314
|
+
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
315
|
|
|
315
316
|
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
317
|
|
|
317
|
-
|
|
318
|
+
**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
319
|
|
|
319
320
|
```text
|
|
320
|
-
Pulse: Reasoning Readiness 58% · Context Debt 42% · +3% (scope locked)
|
|
321
|
-
|
|
322
321
|
{…the step's content…}
|
|
323
322
|
|
|
324
|
-
|
|
325
|
-
the next step, discovery, resolves.
|
|
323
|
+
Pulse: Reasoning Readiness 58% · Context Debt 42% ↓3% (scope locked)
|
|
326
324
|
Reply proceed (run discovery → recommendations) · expert · pause
|
|
327
325
|
```
|
|
328
326
|
|
|
329
|
-
- **Score line** (top of the message). Full capitalized labels — `Reasoning Readiness` and `Context Debt`, NOT lowercase. The
|
|
327
|
+
- **Score line** (top of the message). Full capitalized labels — `Reasoning Readiness` and `Context Debt`, NOT lowercase. The progress delta attaches to **Context Debt as a directional drop** — `Context Debt 42% ↓3%` — so the movement reads unambiguously as debt going DOWN. (A bare `· +3%` sitting next to the debt figure reads like debt went UP by 3, the opposite of progress — that's the confusion this avoids.) The delta is **MANDATORY** on every pulse after the first (the first pulse has no prior → just the baseline + reason). Use `↓N%` when debt drops (the normal, good case), `↑N%` on a regression (rare; render full then), and `±0%` when a step didn't move the score. Never drop it — it's the visible-progress signal. (Readiness climbing and debt dropping are the same move — `Reasoning Readiness + Context Debt = 100%` — so the debt-drop arrow IS the readiness-gain signal, just framed the way users read it.)
|
|
330
328
|
- **Lift bridge** (ONE sentence, immediately ABOVE the action/CTA line — NOT under the score). This is the load-bearing piece: it turns the score into a reason to proceed. Three requirements:
|
|
331
329
|
1. **Plain language for the gap — NEVER the internal dimension name.** The lowest dimension from `score_context_pulse`'s breakdown picks the message, but the user sees what it MEANS, not the label:
|
|
332
330
|
| lowest dimension (internal) | what the user reads (plain) |
|
|
@@ -338,7 +336,7 @@ The pulse has TWO parts, and they sit in DIFFERENT places — the score at the t
|
|
|
338
336
|
2. **Name the NEXT STEP as the resolver, explicitly.** The bridge must make clear that the action the user is about to take is what closes the gap — `that's exactly what the next step, discovery, resolves` / `code recon next grounds it` / `the build brief locks those down`. The bridge and the forward-CTA below it name the SAME move — one story.
|
|
339
337
|
3. **Terse + declarative** — no `now let me help you improve this` assistant/affect register (`cli-experience-tenets.md`).
|
|
340
338
|
On the LAST scoreable step (Step 10, implementation-ready), there's no further lift — the bridge becomes the readiness statement: `The brief is your build path — implement when ready.`
|
|
341
|
-
- **Full (with bars + Reasoning Readiness / Context Debt / Context Surface labels)** when crossing a state-tier boundary, jumping ≥15%, or regressing. Full mode keeps the same
|
|
339
|
+
- **Full (with bars + Reasoning Readiness / Context Debt / Context Surface labels)** when crossing a state-tier boundary, jumping ≥15%, or regressing. Full mode keeps the same `Context Debt N% ↓M%` delta on the score line and the same lift bridge above the CTA.
|
|
342
340
|
- The score line goes near the top of the step's message; the lift bridge goes right before the action line. Both are additive, not replacements.
|
|
343
341
|
- Prefer `mcp__ritual__score_context_pulse` (one canonical server-side call, persisted for trend reporting); fall back to deterministic agent-side counts only if the tool errors. No LLM call in the hot path either way.
|
|
344
342
|
|
|
@@ -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: 8175b963af80b591 -->
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
212
|
-
|
|
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
|
|
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.
|
|
@@ -914,6 +929,8 @@ Store the final sub-problems for Step 5 — they go into `considerations[]`.
|
|
|
914
929
|
|
|
915
930
|
#### Step 5 — Generate problem frame
|
|
916
931
|
|
|
932
|
+
<!-- skill-options:no-gate-change: Step 5 adds a render-only rule (do not surface follow_up_questions / an "open questions" preview / fuzzy-meta at the frame gate); the frame's pause + options + Reply line are unchanged. -->
|
|
933
|
+
|
|
917
934
|
##### 5.1 First draft
|
|
918
935
|
|
|
919
936
|
Call `mcp__ritual__generate_problem_statement` with:
|
|
@@ -956,6 +973,7 @@ Or reply with edits, e.g. `tighten`, `broaden`, `focus on outbox`, `drop dashboa
|
|
|
956
973
|
```
|
|
957
974
|
|
|
958
975
|
Rules:
|
|
976
|
+
- **Render ONLY the four blocks above** — Problem frame, Optimize for, References, and the Reply line. Nothing else. The `generate_problem_statement` response may include `follow_up_questions` and quality scores: those are for YOUR internal awareness, never for display. Do NOT add an "Open questions" / "what discovery will resolve" section, do NOT preview or list discovery questions here, and do NOT editorialize about what's "still fuzzy" or "what the next step pins down." Discovery is the next step and owns open questions; the frame is a lock-point, not a discovery preview. Surfacing them here both pre-empts Step 7 and clutters the gate.
|
|
959
977
|
- Do not show the old versioned scope heading.
|
|
960
978
|
- Do not show `Engineering problem:` as the heading; use `Problem frame`.
|
|
961
979
|
- Do not say `ship it` unless the user used that language first.
|
|
@@ -982,7 +1000,7 @@ The returned text becomes the new current draft. Show it using the same `Problem
|
|
|
982
1000
|
|
|
983
1001
|
When the user locks the frame, store the final text as `problem_statement` for Step 6.
|
|
984
1002
|
|
|
985
|
-
**
|
|
1003
|
+
**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
1004
|
|
|
987
1005
|
#### Step 5.7 — Ground the exploration (silent recon — runs AFTER the frame locks)
|
|
988
1006
|
|
|
@@ -1125,11 +1143,6 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
1125
1143
|
Scope correction:
|
|
1126
1144
|
- I did not find `guest_session_id` in the inspected models.
|
|
1127
1145
|
|
|
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
1146
|
Next: attach PRDs/tickets if they should shape scope, or `proceed` to continue.
|
|
1134
1147
|
```
|
|
1135
1148
|
|
|
@@ -1206,7 +1219,7 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
1206
1219
|
|
|
1207
1220
|
If the user explicitly asks "what did you find?", you may show a tight digest then — otherwise stay silent.
|
|
1208
1221
|
|
|
1209
|
-
**
|
|
1222
|
+
**No pulse here** (pre-curate — see cli-output-contract § Inline pulses; the first pulse is at Step 7.4).
|
|
1210
1223
|
|
|
1211
1224
|
##### 5.7.3 — Collect the `sources` array
|
|
1212
1225
|
|
|
@@ -1383,9 +1396,8 @@ Ritual build
|
|
|
1383
1396
|
Discovery questions ready — {M} generated across {N} areas.
|
|
1384
1397
|
|
|
1385
1398
|
These 12 questions target where this problem is hardest — the tradeoffs,
|
|
1386
|
-
constraints, and unknowns that decide the design.
|
|
1387
|
-
|
|
1388
|
-
sources; those answers become the spine of the {Deliverable}.
|
|
1399
|
+
constraints, and unknowns that decide the design. Next, agents will develop
|
|
1400
|
+
answers and generate recommendations.
|
|
1389
1401
|
|
|
1390
1402
|
{Area name 1}
|
|
1391
1403
|
✓ 1. {question, full text, wrapped readably}
|
|
@@ -1607,7 +1619,21 @@ Skip silently if no anti-goals were mentioned. (No mention = nothing to confirm;
|
|
|
1607
1619
|
|
|
1608
1620
|
#### Step 8 — Run discovery through recommendations
|
|
1609
1621
|
|
|
1610
|
-
The
|
|
1622
|
+
The pipeline runs answers → recommendations. **Choose the answerer by whether you
|
|
1623
|
+
actually have the code to ground answers in — this is NOT decided by the fact
|
|
1624
|
+
it's `/ritual build`.**
|
|
1625
|
+
|
|
1626
|
+
- **You're genuinely repo-linked** — Step 5.7 recon ran and you read real files
|
|
1627
|
+
(you have a `sources` list / codebase context packet, and filesystem access to
|
|
1628
|
+
the repo): **YOU answer the picked questions** yourself. You're closest to the
|
|
1629
|
+
code, so the answers are grounded in what you actually read.
|
|
1630
|
+
- **You're not** — recon was skipped (Step 5.7.6), no repo is open, or the ask
|
|
1631
|
+
isn't a codebase task: use the **server agentic run** (`start_agentic_run`),
|
|
1632
|
+
which sources answers from the knowledge graph + registered sources instead.
|
|
1633
|
+
|
|
1634
|
+
Pick the path honestly; don't claim to answer from code you didn't read.
|
|
1635
|
+
|
|
1636
|
+
<!-- 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
1637
|
|
|
1612
1638
|
For `engineering`, `delivery`, and `operations` roles, show:
|
|
1613
1639
|
|
|
@@ -1617,20 +1643,28 @@ Ritual build
|
|
|
1617
1643
|
|
|
1618
1644
|
Run discovery
|
|
1619
1645
|
|
|
1620
|
-
|
|
1646
|
+
I'll answer the picked questions from the codebase, then generate
|
|
1621
1647
|
recommendations. This usually takes a few minutes.
|
|
1622
1648
|
|
|
1623
|
-
Reply `run` to
|
|
1649
|
+
Reply `run` to answer → generate recommendations.
|
|
1624
1650
|
Reply `pause` to stop here.
|
|
1625
1651
|
```
|
|
1626
1652
|
|
|
1653
|
+
(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.)
|
|
1654
|
+
|
|
1627
1655
|
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
1656
|
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1657
|
+
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
|
+
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 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.
|
|
1660
|
+
- **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
|
+
- **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
|
+
- **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.
|
|
1663
|
+
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).
|
|
1632
1664
|
|
|
1633
|
-
|
|
1665
|
+
**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).
|
|
1666
|
+
|
|
1667
|
+
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
1668
|
|
|
1635
1669
|
```text
|
|
1636
1670
|
Ritual build
|
|
@@ -1649,9 +1683,11 @@ Reply `1` or `2`. Reply `pause` to stop here.
|
|
|
1649
1683
|
|
|
1650
1684
|
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
1685
|
|
|
1652
|
-
##### 8.0 — "You're unblocked" pre-roll (
|
|
1686
|
+
##### 8.0 — "You're unblocked" pre-roll (once server-side work is running)
|
|
1687
|
+
|
|
1688
|
+
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.)
|
|
1653
1689
|
|
|
1654
|
-
**Lock the product promise BEFORE you enter the polling loop.**
|
|
1690
|
+
**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
1691
|
|
|
1656
1692
|
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
1693
|
|
|
@@ -1701,7 +1737,13 @@ Pick whichever fits the user's flow — they're equivalent in content. Do not in
|
|
|
1701
1737
|
|
|
1702
1738
|
##### 8.1 — Polling loop
|
|
1703
1739
|
|
|
1704
|
-
|
|
1740
|
+
<!-- skill-options:no-gate-change: adds a convergence note at the top of the rec-wait — both answerers (local coding agent vs Ritual server) poll get_recommendations_preview until ≥1 rec; the only difference is who produced the answers. No new pause gate or Step header; the run/pause gate + its options are unchanged. -->
|
|
1741
|
+
|
|
1742
|
+
**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.
|
|
1743
|
+
|
|
1744
|
+
**Agent-answered path (default):** you already wrote + `submit_all_answers`'d, so there's no agentic run to poll — go straight to the recommendation wait: poll `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.)
|
|
1745
|
+
|
|
1746
|
+
**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
1747
|
|
|
1706
1748
|
**On the FIRST poll only** (not every poll), prepend one line that locks the "background execution is default" mental model:
|
|
1707
1749
|
|
|
@@ -1866,7 +1908,7 @@ or proceed to your {Deliverable}.
|
|
|
1866
1908
|
|
|
1867
1909
|
{…every category, every rec, one line each…}
|
|
1868
1910
|
|
|
1869
|
-
Pulse: Reasoning Readiness ~88% · Context Debt 12%
|
|
1911
|
+
Pulse: Reasoning Readiness ~88% · Context Debt 12% ↓16% (recommendations ready)
|
|
1870
1912
|
|
|
1871
1913
|
A few assumptions are still unverified — the build brief is what locks them down.
|
|
1872
1914
|
Reply drill R{N} (read one in full) · edit R{N} <your change> · proceed (generate the {Deliverable})
|
|
@@ -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:
|
|
6
|
+
stamp: 5c3ae1fc185a
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# /ritual
|