@ritualai/cli 0.24.0 → 0.25.0
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/init.js +2 -0
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +2 -2
- package/skills/claude-code/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/claude-code/ritual/references/build-flow.md +57 -88
- package/skills/claude-code/ritual/references/cli-output-contract.md +42 -26
- package/skills/claude-code/ritual/references/lite-flow.md +57 -88
- package/skills/claude-code/ritual/references/resume-flow.md +1 -1
- package/skills/codex/ritual/.ritual-bundle.json +2 -2
- package/skills/codex/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/codex/ritual/references/build-flow.md +57 -88
- package/skills/codex/ritual/references/cli-output-contract.md +42 -26
- package/skills/codex/ritual/references/lite-flow.md +57 -88
- package/skills/codex/ritual/references/resume-flow.md +1 -1
- package/skills/cursor/ritual/.ritual-bundle.json +2 -2
- package/skills/cursor/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/cursor/ritual/references/build-flow.md +57 -88
- package/skills/cursor/ritual/references/cli-output-contract.md +42 -26
- package/skills/cursor/ritual/references/lite-flow.md +57 -88
- package/skills/cursor/ritual/references/resume-flow.md +1 -1
- package/skills/gemini/ritual/.ritual-bundle.json +2 -2
- package/skills/gemini/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/gemini/ritual/references/build-flow.md +57 -88
- package/skills/gemini/ritual/references/cli-output-contract.md +42 -26
- package/skills/gemini/ritual/references/lite-flow.md +57 -88
- package/skills/gemini/ritual/references/resume-flow.md +1 -1
- package/skills/kiro/ritual/.ritual-bundle.json +2 -2
- package/skills/kiro/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/kiro/ritual/references/build-flow.md +57 -88
- package/skills/kiro/ritual/references/cli-output-contract.md +42 -26
- package/skills/kiro/ritual/references/lite-flow.md +57 -88
- package/skills/kiro/ritual/references/resume-flow.md +1 -1
- package/skills/vscode/ritual/.ritual-bundle.json +2 -2
- package/skills/vscode/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/vscode/ritual/references/build-flow.md +57 -88
- package/skills/vscode/ritual/references/cli-output-contract.md +42 -26
- package/skills/vscode/ritual/references/lite-flow.md +57 -88
- package/skills/vscode/ritual/references/resume-flow.md +1 -1
|
@@ -24,6 +24,28 @@ Default user-visible messages should be:
|
|
|
24
24
|
- free of raw file-by-file recon dumps unless requested
|
|
25
25
|
- formatted for terminal readability: short paragraphs, blank lines between major items, and label/value blocks instead of dense wrapped prose
|
|
26
26
|
|
|
27
|
+
**Output discipline — never leak internal reasoning or mechanics (load-bearing, worked examples):**
|
|
28
|
+
|
|
29
|
+
The two failure modes below are the most common leaks. They are forbidden, not discouraged.
|
|
30
|
+
|
|
31
|
+
1. **Don't editorialize — just ask.** When you ask the user to choose, render the question + the options. Do NOT justify *why* you're asking or how costly getting it wrong is — that's your reasoning, not the user's decision input.
|
|
32
|
+
- ❌ `"New social commerce experience" maps to several distinct features — picking the wrong one wastes significant scope.`
|
|
33
|
+
- ❌ `Because this spans three cross-functional tracks, attribution rules have real product decisions baked in.`
|
|
34
|
+
- ✅ `What would you like to explore?` (then the options + a recommended one)
|
|
35
|
+
|
|
36
|
+
2. **Silent checks stay silent — never name a tool or narrate plumbing.** Connection/freshness pings, config reads, workspace lookups, and code recon are invisible. Do NOT print "let me ping Ritual", "checking the workspace config", or any `mcp__ritual__*` tool name.
|
|
37
|
+
- ❌ `Now I'll start the build flow. Let me check the workspace config and ping Ritual simultaneously.`
|
|
38
|
+
- ❌ `Pinging Ritual to verify the connection…`
|
|
39
|
+
- ✅ (nothing — run the check silently; the next user-visible line is the actual gate or status)
|
|
40
|
+
|
|
41
|
+
3. **Don't narrate your process or restate your own instructions.** Loading a spec, fetching a preview, "before presenting", "must print it verbatim", and naming an internal **Step N** are all scratchpad — do them silently and just present the result. The user never sees the machinery between "I have the data" and "here it is."
|
|
42
|
+
- ❌ `6 recommendations ready. Let me load Step 9's exact rendering spec before presenting.`
|
|
43
|
+
- ❌ `Now I'll fetch the server-rendered preview — must print it verbatim.`
|
|
44
|
+
- ❌ `Let me check what the skill says here, then render it.`
|
|
45
|
+
- ✅ (just present it — the recommendations / the picker / the rail, with no preamble about how you produced it)
|
|
46
|
+
|
|
47
|
+
Rule of thumb: if a line describes what *you* are doing internally (a tool call, loading a spec, a check, why a question matters, what you're about to render), cut it. The user wants the work and the decision, not your scratchpad. Internal **Step N** labels and artifact names ("rendering spec", "server-rendered preview", "the contract") never appear in user-facing copy.
|
|
48
|
+
|
|
27
49
|
Use this compact status shape whenever possible:
|
|
28
50
|
|
|
29
51
|
```text
|
|
@@ -112,19 +134,19 @@ When in doubt, prefer one blank line over none. The cost of a tiny gap is unnoti
|
|
|
112
134
|
|
|
113
135
|
**Build progress anchor — load-bearing (never omit, render per surface):** Every TOP-LEVEL user-facing message in `/ritual build` and `/ritual resume` MUST begin with a progress anchor before any other content. The anchor is the user's only "where am I in the flow" signal; dropping it silently is worse than printing it redundantly. The agent was historically inferring the rail from examples and squeezing it out under any pressure — this rule makes it explicit, with the exact rendering chosen per surface so the anchor doesn't wrap badly on narrow chat or duplicate a persistent UI stepper.
|
|
114
136
|
|
|
115
|
-
**Surface-aware rendering** — the canonical
|
|
137
|
+
**Surface-aware rendering** — the canonical five stages stay constant; only the visual changes:
|
|
116
138
|
|
|
117
139
|
| Surface | Rendering | When to use |
|
|
118
140
|
|---|---|---|
|
|
119
|
-
| **CLI / terminal** (current default) | Full two-line rail. `Ritual build` on line 1,
|
|
120
|
-
| **Mobile chat / narrow chat** | Compact one-line chip. `Ritual build ·
|
|
141
|
+
| **CLI / terminal** (current default) | Full two-line rail. `Ritual build` on line 1, `● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)` on line 2. | Terminal scrollback has no persistent UI — the rail IS the anchor. |
|
|
142
|
+
| **Mobile chat / narrow chat** | Compact one-line chip. `Ritual build · 1/5 Scope`. Optionally add a second line: `Done: Scope · Next: Recommendations`. | Five-stage rail wraps and looks noisy inside chat bubbles. |
|
|
121
143
|
| **Rich app with persistent stepper** | Single-line stage label. `Scope` (or `Phase: Scope`). The app's pinned stepper above the conversation is the primary anchor; messages just need the current label. At phase transitions, resume points, and major decision gates, include the compact mobile-style chip even in rich-app surface for transcript portability. | The persistent UI carries the anchor; redundant chrome in every bubble is noise. |
|
|
122
144
|
|
|
123
145
|
**How the agent picks the surface:**
|
|
124
146
|
|
|
125
147
|
- Default to **CLI / terminal** rendering. This SKILL exists primarily to drive CLI surfaces (Claude Code, Cursor, Codex, etc. in their built-in terminals).
|
|
126
148
|
- If the host signals a non-terminal surface via context (mobile-app chat embedding, web-app chat UI, etc.), drop to the compact chip.
|
|
127
|
-
- The rule is: **progress anchor is mandatory; exact visual rendering is surface-specific.** Do NOT force the full
|
|
149
|
+
- The rule is: **progress anchor is mandatory; exact visual rendering is surface-specific.** Do NOT force the full five-stage rail when it will wrap.
|
|
128
150
|
|
|
129
151
|
**Applies to:**
|
|
130
152
|
|
|
@@ -163,19 +185,18 @@ The chip's job is "you're still in this phase, this is which item of the series"
|
|
|
163
185
|
|
|
164
186
|
| Stage | Active during… |
|
|
165
187
|
|--------------------|--------------------------------------------------------------------------------|
|
|
166
|
-
| `
|
|
167
|
-
| `Scope` | Problem frame + sub-problem generation/selection, until scope is locked |
|
|
188
|
+
| `Scope` | Silent code recon, problem frame + sub-problem generation/selection, until scope is locked |
|
|
168
189
|
| `Discovery` | Exploration creation, discovery questions, answers, question picking, answer review |
|
|
169
|
-
| `Recommendations` | Recommendation generation
|
|
190
|
+
| `Recommendations` | Recommendation generation + review |
|
|
170
191
|
| `Build brief` | Requirements + build brief generation/review |
|
|
171
192
|
| `Implementation (Your agent)` | Coding, branch/PR work, `sync_implementation` |
|
|
172
193
|
|
|
173
|
-
|
|
194
|
+
The FIRST rail stage is `Scope`. **There is no `Context` stage** — workspace pick, resume/start check, template resolution, and **code recon** all happen as **silent plumbing inside Scope**, never as a visible rail stage. Recon runs but is not surfaced to the user by default (see `references/build-flow.md` § Step 3); only narrate repo inspection if the user explicitly asks. Naming hazard: `/ritual recon` was retired as a command surface, so don't reuse `Recon`/`Context` at the rail level.
|
|
174
195
|
|
|
175
196
|
**Canonical ordering (only the active marker moves):**
|
|
176
197
|
|
|
177
198
|
```
|
|
178
|
-
|
|
199
|
+
Scope → Discovery → Recommendations → Build brief → Implementation (Your agent)
|
|
179
200
|
```
|
|
180
201
|
|
|
181
202
|
- Completed stages: `✓`
|
|
@@ -185,46 +206,41 @@ Context → Scope → Discovery → Recommendations → Build brief → Implemen
|
|
|
185
206
|
**Build rail spec (`progressHeader(stage)`) — CLI / terminal rendering:**
|
|
186
207
|
|
|
187
208
|
```text
|
|
188
|
-
progressHeader("context") =>
|
|
189
|
-
Ritual build
|
|
190
|
-
● Context ○ Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
191
|
-
|
|
192
209
|
progressHeader("scope") =>
|
|
193
210
|
Ritual build
|
|
194
|
-
|
|
211
|
+
● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
195
212
|
|
|
196
213
|
progressHeader("discovery") =>
|
|
197
214
|
Ritual build
|
|
198
|
-
✓
|
|
215
|
+
✓ Scope ● Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
199
216
|
|
|
200
217
|
progressHeader("recommendations") =>
|
|
201
218
|
Ritual build
|
|
202
|
-
✓
|
|
219
|
+
✓ Scope ✓ Discovery ● Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
203
220
|
|
|
204
221
|
progressHeader("build-brief") =>
|
|
205
222
|
Ritual build
|
|
206
|
-
✓
|
|
223
|
+
✓ Scope ✓ Discovery ✓ Recommendations ● Build brief ○ Implementation (Your agent)
|
|
207
224
|
|
|
208
225
|
progressHeader("implementation") =>
|
|
209
226
|
Ritual build
|
|
210
|
-
✓
|
|
227
|
+
✓ Scope ✓ Discovery ✓ Recommendations ✓ Build brief ● Implementation (Your agent)
|
|
211
228
|
```
|
|
212
229
|
|
|
213
230
|
**Compact chip spec — mobile chat / narrow chat:**
|
|
214
231
|
|
|
215
232
|
```text
|
|
216
|
-
compactChip("
|
|
217
|
-
compactChip("
|
|
218
|
-
compactChip("
|
|
219
|
-
compactChip("
|
|
220
|
-
compactChip("
|
|
221
|
-
compactChip("implementation")=> Ritual build · 6/6 Implementation (Your agent)
|
|
233
|
+
compactChip("scope") => Ritual build · 1/5 Scope
|
|
234
|
+
compactChip("discovery") => Ritual build · 2/5 Discovery
|
|
235
|
+
compactChip("recommendations")=> Ritual build · 3/5 Recommendations
|
|
236
|
+
compactChip("build-brief") => Ritual build · 4/5 Build brief
|
|
237
|
+
compactChip("implementation")=> Ritual build · 5/5 Implementation (Your agent)
|
|
222
238
|
```
|
|
223
239
|
|
|
224
240
|
Optional second line at phase transitions, resumes, and decision gates:
|
|
225
241
|
|
|
226
242
|
```text
|
|
227
|
-
Done:
|
|
243
|
+
Done: Scope · Next: Recommendations
|
|
228
244
|
```
|
|
229
245
|
|
|
230
246
|
**Rich-app spec — persistent stepper:**
|
|
@@ -319,7 +335,7 @@ For no-arg `/ritual build` with zero explorations, do not frame `/ritual context
|
|
|
319
335
|
|
|
320
336
|
```text
|
|
321
337
|
Ritual build
|
|
322
|
-
●
|
|
338
|
+
● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
323
339
|
|
|
324
340
|
Using workspace: {workspaceName}.
|
|
325
341
|
|
|
@@ -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: f920ab690a90c84e -->
|
|
3
3
|
|
|
4
4
|
# /ritual lite — fast build (generated; do not edit)
|
|
5
5
|
|
|
@@ -68,7 +68,7 @@ Before running this flow, apply `references/cli-output-contract.md` and `referen
|
|
|
68
68
|
|
|
69
69
|
**Build rail is load-bearing.** Every top-level user-facing message below MUST begin with the 6-stage build rail per `references/cli-output-contract.md` § Build progress anchor. Examples in this file show the rail in context; the canonical stage table + `progressHeader(stage)` spec lives in the output contract. Do not drop the rail to save space.
|
|
70
70
|
|
|
71
|
-
For narrow/mobile chat surfaces, use the **compact progress anchor** defined in `references/cli-output-contract.md` § Build progress anchor (the `Ritual build ·
|
|
71
|
+
For narrow/mobile chat surfaces, use the **compact progress anchor** defined in `references/cli-output-contract.md` § Build progress anchor (the `Ritual build · 1/5 Scope` chip) instead of forcing the full five-stage rail to wrap. Same contract, different rendering.
|
|
72
72
|
|
|
73
73
|
### When to use
|
|
74
74
|
|
|
@@ -220,7 +220,7 @@ If there are **zero existing explorations** and `raw_input = null`, do not say "
|
|
|
220
220
|
|
|
221
221
|
```text
|
|
222
222
|
Ritual build
|
|
223
|
-
●
|
|
223
|
+
● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
224
224
|
|
|
225
225
|
Heads-up: Ritual's build flow needs ~5 real decisions from you (workspace,
|
|
226
226
|
scope, discovery picks, rec acceptance, implementation approval). If your
|
|
@@ -616,11 +616,15 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
616
616
|
- use neutral labels like `agent_observed_scope_pressure` or `candidate_scope_pressure`, not `priority_considerations`
|
|
617
617
|
- never present the packet as authoritative; MCP/tooling decides final sub-problems, recommendations, and scope
|
|
618
618
|
|
|
619
|
-
C. `recon_digest` —
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
619
|
+
C. `recon_digest` — **internal-only by default; NOT surfaced to the user.** Recon
|
|
620
|
+
is silent plumbing inside Scope: we do NOT dump repo signals / constraints /
|
|
621
|
+
a recon summary back to the user. Keep a compact digest in working memory for
|
|
622
|
+
your own use (and to render ONLY if the user explicitly asks "what did you
|
|
623
|
+
find?"), but by default show nothing — the user's first gate is the explore
|
|
624
|
+
picker (§ 3.2, only when recon is genuinely ambiguous) or the problem frame
|
|
625
|
+
(Step 5). The `codebase_context_packet` still feeds Step 4 silently.
|
|
626
|
+
- keep it tight if ever shown: key surfaces, hard constraints, scope corrections
|
|
627
|
+
- never list every file read; never quote non-load-bearing comments
|
|
624
628
|
|
|
625
629
|
`codebase_context_packet` structure:
|
|
626
630
|
|
|
@@ -694,32 +698,15 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
694
698
|
Next: attach PRDs/tickets if they should shape scope, or `proceed` to continue.
|
|
695
699
|
```
|
|
696
700
|
|
|
697
|
-
|
|
701
|
+
**Explore-directions picker — the ONLY user-visible recon output, and only when recon is genuinely ambiguous.**
|
|
698
702
|
|
|
699
|
-
When recon surfaces two materially different
|
|
703
|
+
When (and ONLY when) recon surfaces two+ materially different directions for the same ask, present them as a **pick-one** headed **"What would you like to explore?"** — mark one recommended with a one-line reason, and pause with a concrete reply syntax. Do NOT preface it with a "Repo signals / Constraint" dump (recon is silent), and do NOT justify why the choice matters (no "picking the wrong one wastes scope" — just ask). Do not expose raw tier labels (use the translations from `references/cli-output-contract.md`).
|
|
700
704
|
|
|
701
705
|
```text
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
Repo signals:
|
|
705
|
-
- `GatewayForm` already supports "create account before checkout," but
|
|
706
|
-
redirects away from checkout to `customer:register`. There is no inline
|
|
707
|
-
or post-order account path today.
|
|
708
|
-
- Guest checkout is already wired through order placement:
|
|
709
|
-
`CheckoutSessionData.set_guest_email()`, `AbstractOrder.guest_email`, and
|
|
710
|
-
`build_submission()` preserve guest identity.
|
|
711
|
-
- `RegisterUserMixin` is the reusable account-creation surface:
|
|
712
|
-
user creation, `user_registered`, login, and registration email.
|
|
713
|
-
- `OrderPlacementMixin` and `post_checkout` are the clean hooks for
|
|
714
|
-
creating or claiming an account at order placement.
|
|
715
|
-
|
|
716
|
-
Constraint:
|
|
717
|
-
- Oscar's dynamic class loading via `get_class()` is the extension
|
|
718
|
-
pattern here. Implement with subclass-overridable views/mixins, not
|
|
719
|
-
monkey-patches.
|
|
706
|
+
Ritual build
|
|
707
|
+
● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
720
708
|
|
|
721
|
-
|
|
722
|
-
"Join while booking" maps to two plausible features.
|
|
709
|
+
What would you like to explore?
|
|
723
710
|
|
|
724
711
|
1. Inline registration at checkout
|
|
725
712
|
Let new customers register on the checkout page itself instead of
|
|
@@ -736,15 +723,17 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
736
723
|
registration, or describe a different intent. Reply `pause` to stop here.
|
|
737
724
|
```
|
|
738
725
|
|
|
739
|
-
Notes on the
|
|
740
|
-
- **"
|
|
741
|
-
- **
|
|
726
|
+
Notes on the explore-directions shape:
|
|
727
|
+
- **Header is "What would you like to explore?"** — an invitation to pick a direction, NOT "Ambiguity to resolve." No preamble dump of repo signals/constraints; recon stays silent.
|
|
728
|
+
- **No editorializing** about why the choice matters (no "wastes scope" / "picking wrong is costly"). The options + the recommendation carry the signal; just ask.
|
|
729
|
+
- **Recommendation goes after the option name on the SAME line**, with a single concise reason on the line below. Keeps the options scannable.
|
|
742
730
|
- **`Next:` is a single line** ending in a concrete reply syntax (`reply N`), not an open-ended question. Lead with the recommended default; the escape hatch comes last.
|
|
743
731
|
- **The pulse line uses the user-facing label**, never the raw tier identifier.
|
|
732
|
+
- On pick, feed the chosen direction + the `codebase_context_packet` into Step 4's `generate_considerations`.
|
|
744
733
|
|
|
745
|
-
|
|
734
|
+
Capability Boundary Check (feature spans systems not in this repo) — **internal/packet-only; NOT displayed:**
|
|
746
735
|
|
|
747
|
-
When the user's ask requires capabilities that aren't present in this repo (frontend-only repo asked for full-stack feature, mobile repo with no API contract, etc.),
|
|
736
|
+
When the user's ask requires capabilities that aren't present in this repo (frontend-only repo asked for full-stack feature, mobile repo with no API contract, etc.), capture the boundary + the inferred default scope **into the `codebase_context_packet` only** — do **NOT** render it to the user (recon is silent). **Do not pause on this.** The packet drives `generate_considerations` to produce boundary-aware sub-problems against the repo's actual capability surface; the user's first real gate is the problem statement in Step 5, where they reshape scope if the default narrowing was wrong. NEVER continue as if the repo can implement the missing half; NEVER invent the missing systems. The block below is a **reference for what to capture in the packet**, not something to print.
|
|
748
737
|
|
|
749
738
|
```text
|
|
750
739
|
Code recon
|
|
@@ -795,19 +784,17 @@ If no seed file is found, OR the seed's `## The ask` doesn't match the current `
|
|
|
795
784
|
- **The pulse line stays parenthetical** with a user-facing reason (`repo boundary unresolved`), per the Pulse tier labels rule in `references/cli-output-contract.md`.
|
|
796
785
|
- **Internal classification (not user-facing):** track each candidate piece against the boundary as `in_repo_buildable`, `external_dependency_known`, `external_dependency_unknown`, `needs_additional_repo`, or `contract_first_candidate`. These shape how downstream scoring + build-brief generation handle the missing half. Stamp the inferred default scope as `inferred_scope` in the packet so `generate_considerations` / `generate_problem_statement` see it. None of these labels should appear in user-facing copy.
|
|
797
786
|
|
|
798
|
-
##### 3.2 —
|
|
787
|
+
##### 3.2 — Recon is silent; surface nothing unless ambiguous
|
|
799
788
|
|
|
800
|
-
|
|
789
|
+
**Recon runs silently.** Do NOT surface the recon digest, repo signals, constraints, or the `codebase_context_packet` to the user by default — recon is plumbing inside Scope. The packet feeds Step 4; the user sees nothing here.
|
|
801
790
|
|
|
802
|
-
|
|
803
|
-
- recon contradicts the user's stated scope,
|
|
804
|
-
- there are multiple plausible implementation areas and choosing wrong would waste work (use the ambiguity-case `recon_digest` shape above),
|
|
805
|
-
- a legal/product/business constraint is required before generation,
|
|
806
|
-
- the user explicitly asked to review recon before continuing.
|
|
791
|
+
**The ONLY user-visible recon output is the explore-directions picker (§ 3.1), and ONLY when recon is genuinely ambiguous** — two+ materially different directions for the same ask. Then render **"What would you like to explore?"** and pause for the pick. Do NOT justify why the pick matters (no "wastes scope").
|
|
807
792
|
|
|
808
|
-
|
|
793
|
+
For a crisp, single-direction ask: **render nothing** — go straight to sub-problem generation (Step 4) with the packet. The user's first gate is the problem frame (Step 5), where they reshape scope in plain English if the default was wrong.
|
|
809
794
|
|
|
810
|
-
|
|
795
|
+
**Capability boundary detection does NOT pause and is NOT displayed.** When recon shows the feature spans systems not in this repo, fold the boundary + the inferred default scope into the `codebase_context_packet` (silent — see § 3.1 internal classification), pick the default scope per the "Default narrowing logic" rule, and proceed. The user reshapes scope at Step 5 if needed.
|
|
796
|
+
|
|
797
|
+
If the user explicitly asks "what did you find?", you may show a tight digest then — otherwise stay silent.
|
|
811
798
|
|
|
812
799
|
**Pulse (Step 3 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.
|
|
813
800
|
|
|
@@ -830,36 +817,11 @@ Keep the list focused. 5–10 is the sweet spot; >20 dilutes the KG signal.
|
|
|
830
817
|
|
|
831
818
|
The codebase recon you just did handles the *code* grounding. Most real features ALSO have non-code context — PRDs, Jira/Linear tickets, design specs, meeting transcripts, Slack threads, customer-research notes — that get paraphrased into the problem statement and lose detail. Step 3.5 ingests those as first-class **knowledge sources** attached to the exploration BEFORE generating sub-problems, so the priorContext you'll see in Step 4 (`generate_considerations`) and downstream is grounded in what the user actually brought, not the paraphrase.
|
|
832
819
|
|
|
833
|
-
##### 3.5.1 —
|
|
834
|
-
|
|
835
|
-
Knowledge sources are a feature multiplier, not a mandatory gate. Ask for PRDs/tickets/designs/transcripts only when at least one of these is true:
|
|
836
|
-
|
|
837
|
-
- the ask is ambiguous or cross-functional,
|
|
838
|
-
- context-pulse / Reference Grounding is low,
|
|
839
|
-
- the user mentioned a PRD, ticket, design, chat, customer request, or meeting,
|
|
840
|
-
- the feature has legal, privacy, billing, permissions, enterprise, analytics, migration, or compliance constraints,
|
|
841
|
-
- code recon found implementation surfaces but not product intent.
|
|
842
|
-
|
|
843
|
-
When triggered, frame references as an optional booster, not a mandatory phase. The happy path is to continue. Keep the prompt tight — the user's decision here is simply "attach context or continue":
|
|
844
|
-
|
|
845
|
-
```text
|
|
846
|
-
Optional: add non-code context before scope generation.
|
|
847
|
-
|
|
848
|
-
Because this touches {constraint}, PRDs, tickets, designs, incidents, or
|
|
849
|
-
customer requests may change what we prioritize.
|
|
850
|
-
|
|
851
|
-
Reply `go` to continue with code context only.
|
|
852
|
-
Or paste files/text/URLs to attach context first.
|
|
853
|
-
Reply `pause` to stop here.
|
|
854
|
-
```
|
|
820
|
+
##### 3.5.1 — Reactive only — do NOT prompt for non-code context
|
|
855
821
|
|
|
856
|
-
|
|
822
|
+
**Do NOT proactively ask the user to attach PRDs/tickets/designs/transcripts.** This is a pure capability, not a gate — surfacing an "Optional: add non-code context" prompt before the user has even framed the problem is front-of-flow friction we deliberately removed (it also tends to over-justify *why* it matters, which is internal reasoning the user doesn't need). There is **no pause here.**
|
|
857
823
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
If none of the triggers apply, do **not** block. Print a non-blocking line and proceed:
|
|
861
|
-
|
|
862
|
-
> Proceeding with codebase context only. Paste a PRD/ticket anytime before discovery if it should shape the scope.
|
|
824
|
+
Handle knowledge sources **only reactively**: if the user *spontaneously* pastes a file/URL/text or says "use this PRD/ticket," ingest it via 3.5.2–3.5.4 below. Otherwise say nothing and proceed silently to Step 4 with code context only. The user can always attach context later via `/ritual context-pulse <exploration>` or by dragging refs in mid-flow.
|
|
863
825
|
|
|
864
826
|
##### 3.5.2 — Read the content
|
|
865
827
|
|
|
@@ -1017,7 +979,7 @@ If `implementationCount === 0`: don't mention the KG check (silent — would jus
|
|
|
1017
979
|
|
|
1018
980
|
```text
|
|
1019
981
|
Ritual build
|
|
1020
|
-
|
|
982
|
+
● Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1021
983
|
|
|
1022
984
|
Solving for these sub-problems
|
|
1023
985
|
|
|
@@ -1152,9 +1114,9 @@ Store `exploration_id`. Move the progress header from Scope to Discovery:
|
|
|
1152
1114
|
|
|
1153
1115
|
```text
|
|
1154
1116
|
Ritual build
|
|
1155
|
-
✓
|
|
1117
|
+
✓ Scope ● Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1156
1118
|
|
|
1157
|
-
Exploration created.
|
|
1119
|
+
Exploration created.
|
|
1158
1120
|
|
|
1159
1121
|
Next: generate discovery questions to resolve the implementation trade-offs.
|
|
1160
1122
|
```
|
|
@@ -1238,7 +1200,7 @@ Call `mcp__ritual__suggest_discovery_questions(exploration_id)`. Returns immedia
|
|
|
1238
1200
|
|
|
1239
1201
|
```text
|
|
1240
1202
|
Ritual build
|
|
1241
|
-
✓
|
|
1203
|
+
✓ Scope ● Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1242
1204
|
|
|
1243
1205
|
Generating discovery questions for each area…
|
|
1244
1206
|
```
|
|
@@ -1295,7 +1257,7 @@ Open ON Area 1 with the **rail above and Area 1's questions below it** — never
|
|
|
1295
1257
|
|
|
1296
1258
|
```text
|
|
1297
1259
|
Ritual build
|
|
1298
|
-
✓
|
|
1260
|
+
✓ Scope ● Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1299
1261
|
|
|
1300
1262
|
Question picking · Area 1 of {N} · {Area name} picked so far: 0
|
|
1301
1263
|
|
|
@@ -1491,7 +1453,7 @@ For `engineering`, `delivery`, and `operations` roles, show:
|
|
|
1491
1453
|
|
|
1492
1454
|
```text
|
|
1493
1455
|
Ritual build
|
|
1494
|
-
✓
|
|
1456
|
+
✓ Scope ● Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1495
1457
|
|
|
1496
1458
|
Run discovery
|
|
1497
1459
|
|
|
@@ -1512,7 +1474,7 @@ For `product`, `design`, or explicitly PRD-style flows, answer review may be use
|
|
|
1512
1474
|
|
|
1513
1475
|
```text
|
|
1514
1476
|
Ritual build
|
|
1515
|
-
✓
|
|
1477
|
+
✓ Scope ● Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1516
1478
|
|
|
1517
1479
|
Run discovery
|
|
1518
1480
|
|
|
@@ -1608,7 +1570,7 @@ Landing (first question, full rail + intro):
|
|
|
1608
1570
|
|
|
1609
1571
|
```text
|
|
1610
1572
|
Ritual build
|
|
1611
|
-
✓
|
|
1573
|
+
✓ Scope ● Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1612
1574
|
|
|
1613
1575
|
Run Agentic Exploration
|
|
1614
1576
|
|
|
@@ -1718,7 +1680,7 @@ First category (rail shown):
|
|
|
1718
1680
|
|
|
1719
1681
|
```text
|
|
1720
1682
|
Ritual build
|
|
1721
|
-
✓
|
|
1683
|
+
✓ Scope ✓ Discovery ● Recommendations ○ Build brief ○ Implementation (Your agent)
|
|
1722
1684
|
|
|
1723
1685
|
Scope:
|
|
1724
1686
|
{one-line compressed scope — ~80-120 chars; truncate at a clause boundary, no ellipsis}
|
|
@@ -1806,7 +1768,7 @@ Editing is non-destructive and does not advance the flow — the user can `edit`
|
|
|
1806
1768
|
|
|
1807
1769
|
```text
|
|
1808
1770
|
Ritual build
|
|
1809
|
-
✓
|
|
1771
|
+
✓ Scope ✓ Discovery ✓ Recommendations ● Build brief ○ Implementation (Your agent)
|
|
1810
1772
|
|
|
1811
1773
|
Reviewed {N} recommendations.
|
|
1812
1774
|
|
|
@@ -2091,6 +2053,13 @@ Steps:
|
|
|
2091
2053
|
- `contradicted` — brief claim is wrong; the code does something different.
|
|
2092
2054
|
- `not_found` — symbol couldn't be located.
|
|
2093
2055
|
|
|
2056
|
+
**Narrating a finding (if you surface one before the summary): frame it as resolving drift, not as an error report.** Lead with *resolving drift between the brief and the codebase*, then ONE plain sentence describing the drift and where the real pattern lives. Do **not** lead with "X doesn't exist" / "references a function that doesn't exist" — a `not_found` / `contradicted` verdict is the verification working as intended (it caught a brief-vs-code gap before you shipped), not a failure to alarm the user about.
|
|
2057
|
+
|
|
2058
|
+
❌ `get_core_apps is not in the codebase — the brief's RB-1 references a function that doesn't exist. The actual pattern is direct INSTALLED_APPS manipulation (index + replace), as seen in tests/settings.py.`
|
|
2059
|
+
✅ `Resolving drift between the brief and the codebase: RB-1 cites get_core_apps, but the repo edits INSTALLED_APPS directly (index + replace — see tests/settings.py). Noting it in the verification.`
|
|
2060
|
+
|
|
2061
|
+
This is a progress line, not a gate — keep it to one sentence and continue; the structured findings land in `BUILD-BRIEF-VERIFICATION.md` and the Step 10d gate.
|
|
2062
|
+
|
|
2094
2063
|
5. **Write `BUILD-BRIEF-VERIFICATION.md`** to disk alongside `BUILD-BRIEF.md` using the schema in `references/brief-verification-checklist.md`. Cite file + line range + actual code snippet on every contradiction. Do not fabricate evidence.
|
|
2095
2064
|
|
|
2096
2065
|
6. **Sync the verification to Ritual's KG** — call `mcp__ritual__sync_brief_review` with:
|
|
@@ -2207,7 +2176,7 @@ End Step 10 with a single recommended action plus a cheap escape hatch — never
|
|
|
2207
2176
|
|
|
2208
2177
|
```text
|
|
2209
2178
|
Ritual build
|
|
2210
|
-
✓
|
|
2179
|
+
✓ Scope ✓ Discovery ✓ Recommendations ● Build brief ○ Implementation (Your agent)
|
|
2211
2180
|
|
|
2212
2181
|
Build brief ready
|
|
2213
2182
|
|
|
@@ -2242,7 +2211,7 @@ The Implementation phase landing — full rail (the rail moves to Implementation
|
|
|
2242
2211
|
|
|
2243
2212
|
```text
|
|
2244
2213
|
Ritual build
|
|
2245
|
-
✓
|
|
2214
|
+
✓ Scope ✓ Discovery ✓ Recommendations ✓ Build brief ● Implementation (Your agent)
|
|
2246
2215
|
|
|
2247
2216
|
Implementation (Your agent)
|
|
2248
2217
|
|
|
@@ -2487,7 +2456,7 @@ Before asking for permission, frame the call in language the user can act on. `s
|
|
|
2487
2456
|
|
|
2488
2457
|
```text
|
|
2489
2458
|
Ritual build
|
|
2490
|
-
✓
|
|
2459
|
+
✓ Scope ✓ Discovery ✓ Recommendations ✓ Build brief ● Implementation (Your agent)
|
|
2491
2460
|
|
|
2492
2461
|
Log implementation
|
|
2493
2462
|
|
|
@@ -2530,7 +2499,7 @@ When sync_implementation succeeds, the response includes:
|
|
|
2530
2499
|
|
|
2531
2500
|
```text
|
|
2532
2501
|
Ritual build
|
|
2533
|
-
✓
|
|
2502
|
+
✓ Scope ✓ Discovery ✓ Recommendations ✓ Build brief ✓ Implementation (Your agent)
|
|
2534
2503
|
|
|
2535
2504
|
✓ Logged implementation for {exploration name}
|
|
2536
2505
|
|
|
@@ -2565,7 +2534,7 @@ User-visible (full rail — sync failure is a top-level state):
|
|
|
2565
2534
|
|
|
2566
2535
|
```text
|
|
2567
2536
|
Ritual build
|
|
2568
|
-
✓
|
|
2537
|
+
✓ Scope ✓ Discovery ✓ Recommendations ✓ Build brief ● Implementation (Your agent)
|
|
2569
2538
|
|
|
2570
2539
|
Sync failed (recoverable)
|
|
2571
2540
|
|
|
@@ -2603,7 +2572,7 @@ If stale, surface to the user with the full rail (top-level decision gate):
|
|
|
2603
2572
|
|
|
2604
2573
|
```text
|
|
2605
2574
|
Ritual build
|
|
2606
|
-
✓
|
|
2575
|
+
✓ Scope ✓ Discovery ✓ Recommendations ✓ Build brief ● Implementation (Your agent)
|
|
2607
2576
|
|
|
2608
2577
|
Pending sync is stale
|
|
2609
2578
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Output: the user lands on the right step of an existing exploration's `/ritual build` flow — no new exploration created, no fresh-start path offered.
|
|
6
6
|
|
|
7
|
-
**Build rail is load-bearing here too.** Every top-level user-facing message in `/ritual resume` MUST begin with the
|
|
7
|
+
**Build rail is load-bearing here too.** Every top-level user-facing message in `/ritual resume` MUST begin with the 5-stage build rail per `references/cli-output-contract.md` § Build rail — both during the picker (rail at `● Scope`) and once you teleport into the chosen exploration (rail at whatever stage that exploration is in).
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
### When to use
|
|
@@ -4,7 +4,7 @@ Reference for `/ritual build` Step 10b.5 (the auto-fire verify-brief pass that r
|
|
|
4
4
|
|
|
5
5
|
The brief generator runs server-side and **does not have repo access**. It writes assertions about cited files / functions / classes based on the agent's earlier recon summary — which is a text summary, not the actual code. When the brief says *"`is_allowed_to_see` is insufficient — needs token-based access"* but the code actually ships email-allowlist semantics, the contradiction is invisible to the brief generator and to the user reading the brief.
|
|
6
6
|
|
|
7
|
-
Step 10b.5 closes this gap: **the agent (with repo access) reads the bodies of the specific symbols the brief cites and produces a structured list of findings before the user sees the brief.** Findings
|
|
7
|
+
Step 10b.5 closes this gap: **the agent (with repo access) reads the bodies of the specific symbols the brief cites and produces a structured list of findings before the user sees the brief.** Findings are written to a **separate** file (`BUILD-BRIEF-VERIFICATION.md`) and synced to Ritual's KG via `sync_brief_review` — they are **never** written back into `BUILD-BRIEF.md`. The brief stays the read-only historical artifact Ritual generated; the corrections reach the implementation through plan mode's KG `priorContext`, not through a brief rewrite. (There is **no** `refine_build_brief` tool — it was removed 2026-05-15 and replaced by `sync_brief_review`.)
|
|
8
8
|
|
|
9
9
|
This is the **non-UI sibling of `references/ui-ux-checklist.md`** (Step 10.5 UX review). Same methodology shape (read brief → identify citations → find in repo → compare → fill schema → surface findings), different targets (functions / data shapes / model fields instead of UI components).
|
|
10
10
|
|
|
@@ -61,13 +61,18 @@ Three verdicts:
|
|
|
61
61
|
- **`contradicted`** — the brief's claim is **wrong**. The code does something different. This is the verdict that drives a refinement.
|
|
62
62
|
- **`not_found`** — the brief cited a symbol the agent could not locate in the repo. Either the symbol was renamed, deleted, or never existed. Either way: the brief is asserting against a phantom; surface to user.
|
|
63
63
|
|
|
64
|
+
**Narrating a finding mid-verification — frame it as resolving drift, not as an error.** If you surface a `contradicted` / `not_found` finding in a progress line before the summary, lead with *resolving drift between the brief and the codebase*, then one plain sentence on the drift + where the real pattern lives. A caught gap is the verification doing its job, not a failure to alarm about — don't lead with "X doesn't exist" / "references a function that doesn't exist."
|
|
65
|
+
|
|
66
|
+
- ❌ `get_core_apps is not in the codebase — the brief's RB-1 references a function that doesn't exist. The actual pattern is direct INSTALLED_APPS manipulation (index + replace), as seen in tests/settings.py.`
|
|
67
|
+
- ✅ `Resolving drift between the brief and the codebase: RB-1 cites get_core_apps, but the repo edits INSTALLED_APPS directly (index + replace — see tests/settings.py). Noting it in the verification.`
|
|
68
|
+
|
|
64
69
|
**5. Fill the output schema with evidence.**
|
|
65
70
|
|
|
66
71
|
Write `BUILD-BRIEF-VERIFICATION.md` to disk alongside `BUILD-BRIEF.md`. Use the schema below. **Each finding cites the file + line range + the actual code snippet that justified the verdict.** The user reading this must be able to verify your verification — no hand-waving, no claims without evidence.
|
|
67
72
|
|
|
68
73
|
**6. If any findings are `contradicted`, surface to the user inline at Step 10d.**
|
|
69
74
|
|
|
70
|
-
The Step 10d gate
|
|
75
|
+
The Step 10d gate is `go` / `drill {N}` / `pause` (plus `ux-review`) — there is **no `refine` action**; the brief is read-only after generation. When `contradicted` findings exist, the gate prepends a summary so the user sees what the agent learned about the brief before deciding:
|
|
71
76
|
|
|
72
77
|
```text
|
|
73
78
|
⚠ Verification found {N} contradiction(s) between the brief and the actual code:
|
|
@@ -76,11 +81,12 @@ The Step 10d gate normally reads *"Reply `go` to implement, `refine` for edits,
|
|
|
76
81
|
"{code_reality}" (see {cited_file}:{cited_lines}).
|
|
77
82
|
· ...
|
|
78
83
|
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
These are synced to Ritual; plan mode reads them when you `go`.
|
|
85
|
+
Reply `go` to implement (corrections flow in via KG), `drill {N}` to
|
|
86
|
+
inspect, or `pause` to stop.
|
|
81
87
|
```
|
|
82
88
|
|
|
83
|
-
The
|
|
89
|
+
The findings do **not** rewrite the brief. They were already persisted via `sync_brief_review` (a durable `BriefReview` row) at step 5; when the user replies `go`, **plan mode reads the brief + that review via KG `priorContext`** and the implementation incorporates the corrections — without the brief text changing. If the user has context the agent doesn't ("yes the brief is wrong but ship as-is"), `go` proceeds the same way; the corrections are recorded regardless. The only path to *new brief content* is `generate_build_brief` with `force: true` (full regen from changed source data) — used when the underlying recs/requirements actually changed, never to patch a verification finding.
|
|
84
90
|
|
|
85
91
|
---
|
|
86
92
|
|
|
@@ -146,7 +152,7 @@ checked out, state that clearly.}
|
|
|
146
152
|
|
|
147
153
|
- **Verify everything in the brief.** Only the symbol-citation slice. Pose-level claims, framing, and general direction are out of scope.
|
|
148
154
|
- **Read the full file.** Read enough surrounding context to verify the symbol (~10 lines); not the whole file. Capped at ~15 citations total to keep this fast.
|
|
149
|
-
- **Edit the brief directly.** Step 10b.5 only writes `BUILD-BRIEF-VERIFICATION.md
|
|
155
|
+
- **Edit the brief directly.** Step 10b.5 only writes the **separate** `BUILD-BRIEF-VERIFICATION.md` and syncs it via `sync_brief_review`. `BUILD-BRIEF.md` is never touched — it stays the read-only historical artifact. Findings reach the implementation through plan mode's KG `priorContext` at Step 11, not through a brief rewrite. (Regenerating from changed source data is a different operation — `generate_build_brief` with `force: true` — not part of this step.)
|
|
150
156
|
- **Persist findings to the KG.** Phase 1 is local-only. Phase 2 (filed at `memory/backlog_brief_verification_findings_kg_promotion.md`) adds the `BriefVerificationFinding` Prisma model + endpoint + priorContext injection so future briefs on overlapping files inherit verified facts.
|
|
151
157
|
|
|
152
158
|
---
|