@ritualai/cli 0.7.14 → 0.7.15
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/README.md +44 -0
- package/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +2 -2
- package/skills/claude-code/ritual/DESIGN.md +1 -1
- package/skills/claude-code/ritual/SKILL.md +59 -2
- package/skills/claude-code/ritual/manifest.json +18 -8
- package/skills/claude-code/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/claude-code/ritual/references/build-flow.md +206 -20
- package/skills/claude-code/ritual/references/resume-flow.md +35 -13
- package/skills/claude-code/ritual/references/status-flow.md +94 -0
- package/skills/codex/ritual/.ritual-bundle.json +2 -2
- package/skills/codex/ritual/DESIGN.md +1 -1
- package/skills/codex/ritual/SKILL.md +59 -2
- package/skills/codex/ritual/manifest.json +18 -8
- package/skills/codex/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/codex/ritual/references/build-flow.md +206 -20
- package/skills/codex/ritual/references/resume-flow.md +35 -13
- package/skills/codex/ritual/references/status-flow.md +94 -0
- package/skills/cursor/ritual/.ritual-bundle.json +2 -2
- package/skills/cursor/ritual/DESIGN.md +1 -1
- package/skills/cursor/ritual/SKILL.md +59 -2
- package/skills/cursor/ritual/manifest.json +18 -8
- package/skills/cursor/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/cursor/ritual/references/build-flow.md +206 -20
- package/skills/cursor/ritual/references/resume-flow.md +35 -13
- package/skills/cursor/ritual/references/status-flow.md +94 -0
- package/skills/gemini/ritual/.ritual-bundle.json +2 -2
- package/skills/gemini/ritual/DESIGN.md +1 -1
- package/skills/gemini/ritual/SKILL.md +59 -2
- package/skills/gemini/ritual/manifest.json +18 -8
- package/skills/gemini/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/gemini/ritual/references/build-flow.md +206 -20
- package/skills/gemini/ritual/references/resume-flow.md +35 -13
- package/skills/gemini/ritual/references/status-flow.md +94 -0
- package/skills/kiro/ritual/.ritual-bundle.json +2 -2
- package/skills/kiro/ritual/DESIGN.md +1 -1
- package/skills/kiro/ritual/SKILL.md +59 -2
- package/skills/kiro/ritual/manifest.json +18 -8
- package/skills/kiro/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/kiro/ritual/references/build-flow.md +206 -20
- package/skills/kiro/ritual/references/resume-flow.md +35 -13
- package/skills/kiro/ritual/references/status-flow.md +94 -0
- package/skills/vscode/ritual/.ritual-bundle.json +2 -2
- package/skills/vscode/ritual/DESIGN.md +1 -1
- package/skills/vscode/ritual/SKILL.md +59 -2
- package/skills/vscode/ritual/manifest.json +18 -8
- package/skills/vscode/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/vscode/ritual/references/build-flow.md +206 -20
- package/skills/vscode/ritual/references/resume-flow.md +35 -13
- package/skills/vscode/ritual/references/status-flow.md +94 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"path": "DESIGN.md",
|
|
4
|
-
"lines":
|
|
5
|
-
"bytes":
|
|
4
|
+
"lines": 35,
|
|
5
|
+
"bytes": 2227
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"path": "SKILL.md",
|
|
9
|
-
"lines":
|
|
10
|
-
"bytes":
|
|
9
|
+
"lines": 102,
|
|
10
|
+
"bytes": 9156
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"path": "agents/openai.yaml",
|
|
@@ -21,8 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"path": "references/build-flow.md",
|
|
24
|
-
"lines":
|
|
25
|
-
"bytes":
|
|
24
|
+
"lines": 2652,
|
|
25
|
+
"bytes": 165455
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "references/brief-verification-checklist.md",
|
|
29
|
+
"lines": 169,
|
|
30
|
+
"bytes": 10820
|
|
26
31
|
},
|
|
27
32
|
{
|
|
28
33
|
"path": "references/cli-output-contract.md",
|
|
@@ -46,14 +51,19 @@
|
|
|
46
51
|
},
|
|
47
52
|
{
|
|
48
53
|
"path": "references/resume-flow.md",
|
|
49
|
-
"lines":
|
|
50
|
-
"bytes":
|
|
54
|
+
"lines": 225,
|
|
55
|
+
"bytes": 14048
|
|
51
56
|
},
|
|
52
57
|
{
|
|
53
58
|
"path": "references/scoring-fallback.md",
|
|
54
59
|
"lines": 126,
|
|
55
60
|
"bytes": 6494
|
|
56
61
|
},
|
|
62
|
+
{
|
|
63
|
+
"path": "references/status-flow.md",
|
|
64
|
+
"lines": 94,
|
|
65
|
+
"bytes": 6096
|
|
66
|
+
},
|
|
57
67
|
{
|
|
58
68
|
"path": "references/ui-ux-checklist.md",
|
|
59
69
|
"lines": 198,
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
## Brief verification — methodology + output schema
|
|
2
|
+
|
|
3
|
+
Reference for `/ritual build` Step 10b.5 (the auto-fire verify-brief pass that runs after the build brief is generated, before the user reviews it at the Step 10d gate).
|
|
4
|
+
|
|
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
|
+
|
|
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 flow back into the brief via `refine_build_brief` if any contradictions are detected.
|
|
8
|
+
|
|
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
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
### Core principle
|
|
14
|
+
|
|
15
|
+
**The brief's assertions about cited code must be verified against the actual code before the user is asked to approve them.**
|
|
16
|
+
|
|
17
|
+
The brief generator hedges this risk passively with phrases like *"these recommendations may deviate if the codebase has a stronger existing pattern."* That hedge is honest but not actionable — it tells the reader to maybe check, without telling anyone to actually do the checking. Step 10b.5 makes the checking happen.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Methodology (chain of thought — execute in this order)
|
|
22
|
+
|
|
23
|
+
Do NOT skip to the output schema. The schema only gets filled correctly when the analysis upstream is done.
|
|
24
|
+
|
|
25
|
+
**1. Read the brief end-to-end first.**
|
|
26
|
+
|
|
27
|
+
Open `BUILD-BRIEF.md`. The sections most likely to contain verifiable assertions:
|
|
28
|
+
|
|
29
|
+
- **Codebase Anchors** — explicit file/function citations the brief expects you to extend or replace.
|
|
30
|
+
- **RB-N rationale** — review-blocking claims often cite specific primitives ("the existing `X` is insufficient because Y").
|
|
31
|
+
- **Suggested Implementation** — sequencing claims about what's "already present" vs "needs to be added."
|
|
32
|
+
- **Previously Deferred** — references to prior decisions on overlapping files (sourced from KG).
|
|
33
|
+
|
|
34
|
+
Output of this step: a flat list of every specific code citation the brief makes. **Symbol + file + assertion**. If a section says *"the recommendations may deviate if the codebase has a stronger existing pattern,"* that's exactly the kind of hedge this step exists to resolve — treat it as a high-priority verification target.
|
|
35
|
+
|
|
36
|
+
**2. Extract the explicit citations.**
|
|
37
|
+
|
|
38
|
+
For each cited symbol, capture:
|
|
39
|
+
|
|
40
|
+
- `cited_symbol` — function / class / model field / endpoint name.
|
|
41
|
+
- `cited_file` — file path if mentioned; if not, infer from context (Codebase Anchors usually pairs them).
|
|
42
|
+
- `brief_assertion` — the brief's exact claim about this symbol. One sentence.
|
|
43
|
+
|
|
44
|
+
Cap the list at **15 citations** (highest-leverage ones first — primitives the RBs depend on, symbols cited in multiple sections). 15 is enough to cover the load-bearing risks; more bloats the verification time without proportional signal.
|
|
45
|
+
|
|
46
|
+
**3. For each citation, read the actual code.**
|
|
47
|
+
|
|
48
|
+
Use Grep / Glob / Read. For each cited symbol:
|
|
49
|
+
|
|
50
|
+
- Find the file (Grep `def {symbol}` / `class {symbol}` / `const {symbol}` / `function {symbol}`).
|
|
51
|
+
- Read the function body / class definition / data shape. Include surrounding context (~10 lines) so callers and conventions are visible.
|
|
52
|
+
- Note line numbers (`cited_lines.start` / `cited_lines.end`) so the finding pins to a stable location.
|
|
53
|
+
|
|
54
|
+
**Do not fabricate citations.** If `Grep` returns nothing, the verdict is `not_found`, not "I'll infer what it probably does."
|
|
55
|
+
|
|
56
|
+
**4. Compare brief assertion vs code reality. Assign a verdict per citation.**
|
|
57
|
+
|
|
58
|
+
Three verdicts:
|
|
59
|
+
|
|
60
|
+
- **`verified`** — the brief's claim matches what the code actually does. Most common verdict on a well-anchored brief; the agent's recon summary was accurate; the brief generator got it right.
|
|
61
|
+
- **`contradicted`** — the brief's claim is **wrong**. The code does something different. This is the verdict that drives a refinement.
|
|
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
|
+
|
|
64
|
+
**5. Fill the output schema with evidence.**
|
|
65
|
+
|
|
66
|
+
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
|
+
|
|
68
|
+
**6. If any findings are `contradicted`, surface to the user inline at Step 10d.**
|
|
69
|
+
|
|
70
|
+
The Step 10d gate normally reads *"Reply `go` to implement, `refine` for edits, `drill {N}` to inspect, `pause` to stop."* When `contradicted` findings exist, the gate's CTA shifts to highlight the contradictions:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
⚠ Verification found {N} contradiction(s) between the brief and the actual code:
|
|
74
|
+
|
|
75
|
+
· "{cited_symbol}" — brief says "{brief_assertion}". Code reality:
|
|
76
|
+
"{code_reality}" (see {cited_file}:{cited_lines}).
|
|
77
|
+
· ...
|
|
78
|
+
|
|
79
|
+
Reply `refine` to apply these corrections, `go` to proceed anyway,
|
|
80
|
+
or `drill {N}` to inspect one rec.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The user can `refine` (recommended) — at which point the SKILL calls `refine_build_brief` with the structured findings array, and the LLM produces an updated brief that incorporates the corrections authoritatively. Or `go` if the user has context the agent doesn't (e.g. "yes the brief is wrong but I want to ship it as-is for now"). The decision stays with the user; the agent surfaces the evidence.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### Output schema — `BUILD-BRIEF-VERIFICATION.md`
|
|
88
|
+
|
|
89
|
+
Render exactly the sections below. Every section MUST exist (use `(none)` / `(no contradictions)` for empty cases — do not skip).
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
<!--
|
|
93
|
+
Generated by Ritual — brief verification pass
|
|
94
|
+
Exploration: https://app.ritualapp.cloud/e/{exploration_id}
|
|
95
|
+
Source brief: BUILD-BRIEF.md
|
|
96
|
+
Do not remove this header.
|
|
97
|
+
-->
|
|
98
|
+
|
|
99
|
+
# Brief Verification — {exploration name}
|
|
100
|
+
|
|
101
|
+
## Summary
|
|
102
|
+
|
|
103
|
+
Verified: {N} · Contradicted: {M} · Not found: {K}
|
|
104
|
+
|
|
105
|
+
{One-paragraph natural-language summary of the verification result. If
|
|
106
|
+
contradictions exist, lead with the most load-bearing one. If everything
|
|
107
|
+
checked out, state that clearly.}
|
|
108
|
+
|
|
109
|
+
## ⚠ Contradicted ({M})
|
|
110
|
+
|
|
111
|
+
(one block per contradicted citation, omit section entirely if M=0)
|
|
112
|
+
|
|
113
|
+
### `{cited_symbol}` — {cited_file}:{lines.start}-{lines.end}
|
|
114
|
+
|
|
115
|
+
- **Brief asserts:** "{brief_assertion}"
|
|
116
|
+
- **Code reality:** "{code_reality}"
|
|
117
|
+
- **Evidence (from the file):**
|
|
118
|
+
|
|
119
|
+
```{language}
|
|
120
|
+
{actual code snippet, ~10 lines}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
- **Recommendation:** {what should change in the brief — concrete next step}
|
|
124
|
+
|
|
125
|
+
## ❓ Not found ({K})
|
|
126
|
+
|
|
127
|
+
(one block per missing citation, omit section entirely if K=0)
|
|
128
|
+
|
|
129
|
+
### `{cited_symbol}` — cited in {section}
|
|
130
|
+
|
|
131
|
+
- **Brief asserts:** "{brief_assertion}"
|
|
132
|
+
- **Searched:** {file paths / grep queries the agent tried}
|
|
133
|
+
- **Action:** ask the user whether the cited symbol exists under a different name, or whether the brief is referencing something that was renamed / removed.
|
|
134
|
+
|
|
135
|
+
## ✅ Verified ({N})
|
|
136
|
+
|
|
137
|
+
(compact list; one bullet per verified citation; no body required)
|
|
138
|
+
|
|
139
|
+
- `{cited_symbol}` — {cited_file}:{lines.start}-{lines.end} — brief assertion matches code.
|
|
140
|
+
- ...
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### What this verification step does NOT do
|
|
146
|
+
|
|
147
|
+
- **Verify everything in the brief.** Only the symbol-citation slice. Pose-level claims, framing, and general direction are out of scope.
|
|
148
|
+
- **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`. The user decides whether to call `refine_build_brief` with the findings at Step 10d (recommended) or proceed with the brief as-is.
|
|
150
|
+
- **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
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### Anti-patterns
|
|
155
|
+
|
|
156
|
+
- **❌ Fabricating evidence.** Every claim in the output file must trace to a real file + line range that the agent actually Read. If Grep returned nothing, the verdict is `not_found`, NOT "I'll just describe what the function probably does."
|
|
157
|
+
- **❌ Re-deriving the brief.** This step is verification, not authoring. Findings exist on a per-citation basis; the agent does not re-write the brief's framing or add new RBs.
|
|
158
|
+
- **❌ Skipping the step on backend-only features.** Step 10b.5 fires automatically regardless of UI / non-UI shape. UI-shaped features use `references/ui-ux-checklist.md` (Step 10.5) on top of this step for the additional UI-pattern review — but every brief runs through the citation-level verification.
|
|
159
|
+
- **❌ Treating the brief's hedge as authorization to skip.** *"may deviate if codebase has a stronger pattern"* is exactly the case Step 10b.5 exists to resolve. The hedge means "go verify"; don't read it as "no need to verify."
|
|
160
|
+
- **❌ Padding the verified list.** Don't enumerate citations the brief didn't actually make just to inflate the "Verified" count. Only cite what the brief cited.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### Failure modes to watch for
|
|
165
|
+
|
|
166
|
+
- **Brief makes ZERO citations.** Some brief generations are framing-only and don't reference specific symbols. The verification pass should write a summary noting *"the brief makes no specific code citations; no verification possible"* and the gate proceeds normally. Phase 2 will treat this as a brief-quality signal (briefs without citations are harder to verify).
|
|
167
|
+
- **Symbol exists in multiple places.** When Grep finds the symbol in N>1 files, capture the file the brief most likely meant (use Codebase Anchors context as the disambiguator). If still ambiguous, render one finding per match with verdict `not_found` and surface the ambiguity to the user.
|
|
168
|
+
- **Code semantics ≠ visible signature.** A function might be named one thing but documented to do another. Read the docstring + the body; trust the body. If the docstring contradicts the body, that's its own finding (`contradicted` with verdict notes).
|
|
169
|
+
- **Brief assertion is too vague to verify.** *"The auth flow needs hardening"* doesn't cite a specific symbol; not verifiable. Skip; verify only the assertions specific enough to check.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## /ritual build
|
|
2
2
|
|
|
3
|
-
Walks the engineer from a free-form problem statement to vetted, accepted Ritual recommendations using the
|
|
3
|
+
Walks the engineer from a free-form problem statement to vetted, accepted Ritual recommendations using the Ritual MCP tool surface.
|
|
4
4
|
|
|
5
5
|
Output: a fully-closed loop — **exploration in COMPLETE state, recommendations accepted (or explicitly handed off to an admin), build brief generated, code implemented, and `sync_implementation` called to register the result in the knowledge graph**. The engineer stays in the driver's seat through concise status updates and explicit pauses only at real decision gates.
|
|
6
6
|
|
|
@@ -191,10 +191,11 @@ Steps:
|
|
|
191
191
|
|
|
192
192
|
> I see {N} exploration{s} already in this workspace:
|
|
193
193
|
>
|
|
194
|
-
> **{state_glyph} {state_label}**
|
|
195
|
-
>
|
|
196
|
-
>
|
|
197
|
-
>
|
|
194
|
+
> **{state_glyph} {state_label}** ({count})
|
|
195
|
+
>
|
|
196
|
+
> 1. **{name}** — {short scope summary, first 80 chars of problemStatement}
|
|
197
|
+
> {recommendationCount} rec{s} ({accepted}/{total} approved{implementationSegment}), {openDeferralsCount} open deferral{s}.
|
|
198
|
+
> Next: {state-specific call-to-action — see table below}.
|
|
198
199
|
>
|
|
199
200
|
> Recommended: resume one if it matches this work.
|
|
200
201
|
> Reply with a number/name to resume, `suggest` to find high-leverage candidates from repo + workspace history, `delete N` to remove a duplicate/misfire, or `proceed` to start fresh.
|
|
@@ -203,10 +204,11 @@ Steps:
|
|
|
203
204
|
|
|
204
205
|
> I can help you continue existing work or find the next high-leverage thing.
|
|
205
206
|
>
|
|
206
|
-
> **{state_glyph} {state_label}**
|
|
207
|
-
>
|
|
208
|
-
>
|
|
209
|
-
>
|
|
207
|
+
> **{state_glyph} {state_label}** ({count})
|
|
208
|
+
>
|
|
209
|
+
> 1. **{name}** — {short scope summary, first 80 chars of problemStatement}
|
|
210
|
+
> {recommendationCount} rec{s} ({accepted}/{total} approved{implementationSegment}), {openDeferralsCount} open deferral{s}.
|
|
211
|
+
> Next: {state-specific call-to-action — see table below}.
|
|
210
212
|
>
|
|
211
213
|
> Reply with:
|
|
212
214
|
> - a number/name to resume
|
|
@@ -215,6 +217,8 @@ Steps:
|
|
|
215
217
|
> - a feature/problem description to start fresh
|
|
216
218
|
> - `none` to exit
|
|
217
219
|
|
|
220
|
+
**Picker rendering anti-pattern (load-bearing) — observed 2026-05-15 in `/ritual resume`, same shape applies here:** each exploration gets ONE picker number `{N}.` on its title line. The summary, recommendation count, and Next-line are indented continuation prose under that number, NEVER their own numbered or bulleted list items. Picker numbering is **flat across all state buckets** (1, 2, 3, … regardless of which `{state_glyph}` header they sit under), so a single number unambiguously picks one exploration. The `({count})` in parens after each state-bucket header is informational and is NEVER a picker number. See `references/resume-flow.md` § R2 for the full anti-pattern with a worked example.
|
|
221
|
+
|
|
218
222
|
**`{implementationSegment}` resolution rule** — derive from `implementationStatus.implementationRecord` on the listing response:
|
|
219
223
|
|
|
220
224
|
| Condition | Render |
|
|
@@ -1118,6 +1122,24 @@ Then summarize the created siblings in the dense-list format. Do not pause after
|
|
|
1118
1122
|
|
|
1119
1123
|
Longest phase because generation is async + the user picks per-Area. (Internally the API field is `matter_id`; user-facing copy always says Area.)
|
|
1120
1124
|
|
|
1125
|
+
**Step 6 → Step 7 transition anti-pattern (load-bearing):** after `create_exploration` succeeds in Step 6, you MUST NOT render Step 8's *"Reply `run` to continue"* CTA. Required next actions, in order, before Step 8 is allowed:
|
|
1126
|
+
|
|
1127
|
+
1. Call `mcp__ritual__suggest_discovery_questions(exploration_id)` (Step 7.1) — no user input needed; just kick it off.
|
|
1128
|
+
2. Poll `mcp__ritual__get_discovery_state(exploration_id)` until `ready: true` (Step 7.2).
|
|
1129
|
+
3. Render the Areas index per § 7.3.1 (NOT a free-form list — see § 7.3.1 rendering anti-pattern below).
|
|
1130
|
+
4. `[USER PAUSE]` — the user picks Areas + questions, or types `accept shortlist` / `skip discovery`.
|
|
1131
|
+
5. Call `mcp__ritual__accept_discovery_questions` for each picked Area (Step 7.4).
|
|
1132
|
+
6. Evaluate Step 7.4.5 triggers; render the scope-classification gate if any fire.
|
|
1133
|
+
7. ONLY THEN proceed to Step 8 and render the *"Reply `run` to continue"* CTA.
|
|
1134
|
+
|
|
1135
|
+
**Forbidden behaviors:**
|
|
1136
|
+
|
|
1137
|
+
- Calling `start_agentic_run` before `accept_discovery_questions` has been called at least once for this exploration. (`skip discovery` is the explicit exception — it intentionally takes the no-picks path through 7.4.5.)
|
|
1138
|
+
- Silently auto-picking all generated questions and proceeding to Step 8 — observed in agent output 2026-05-15 as "the engineering-mode default is to run, which skips the per-question picker." There is no such default; the picker is mandatory.
|
|
1139
|
+
- Rendering "Next: run discovery through recommendations / Reply `run` to continue" anywhere in the chat before Step 7.4 has completed.
|
|
1140
|
+
|
|
1141
|
+
The picker is **not** a UI suggestion — it's the load-bearing decision gate where the user expresses what to investigate. Skipping it converts the agentic run into an automated "answer everything" pass and erases the user's judgment.
|
|
1142
|
+
|
|
1121
1143
|
##### 7.1 — Kick off
|
|
1122
1144
|
|
|
1123
1145
|
Call `mcp__ritual__suggest_discovery_questions(exploration_id)`. Returns immediately with `task_id`. Tell the user with the full rail (we just entered the Discovery phase):
|
|
@@ -1193,6 +1215,35 @@ Inside an Area, use `show more` to see the rest.
|
|
|
1193
1215
|
|
|
1194
1216
|
Number alignment: right-pad the Area name to a consistent column so the counts line up vertically. Drop the `accept shortlist` token when no Area has recommendations (rare; just show the area-number + `skip discovery` CTAs).
|
|
1195
1217
|
|
|
1218
|
+
**Rendering anti-pattern (load-bearing) — the Areas index renders ONLY area names + counts. Observed violations 2026-05-15:**
|
|
1219
|
+
|
|
1220
|
+
- ❌ Question previews under each area:
|
|
1221
|
+
```text
|
|
1222
|
+
1. Wishlist Visibility Contract (10 qs)
|
|
1223
|
+
|
|
1224
|
+
1. How PUBLIC/SHARED behave across owner controls...
|
|
1225
|
+
2. Shared Wishlist Surfaces (8 qs)
|
|
1226
|
+
|
|
1227
|
+
2. Which entry points light up first...
|
|
1228
|
+
```
|
|
1229
|
+
No. This invents question previews the SKILL never asked for, AND uses overlapping numbering (`1. {area}` and `1. {question preview}`) that creates ambiguity — when the user replies `5`, neither side can tell what they meant. Single numbering stream: areas only.
|
|
1230
|
+
|
|
1231
|
+
- ❌ Free-form bullet lists, "for your convenience" question summaries, or any text under the area line beyond `{N} recommended · {N} total`.
|
|
1232
|
+
|
|
1233
|
+
- ❌ Adding a "TL;DR" / "highlights" section above or below the Areas list.
|
|
1234
|
+
|
|
1235
|
+
**The correct shape is exactly** (no exceptions):
|
|
1236
|
+
|
|
1237
|
+
```
|
|
1238
|
+
Areas:
|
|
1239
|
+
|
|
1240
|
+
1. {Area name} {N} recommended · {N} total
|
|
1241
|
+
2. {Area name} {N} recommended · {N} total
|
|
1242
|
+
...
|
|
1243
|
+
```
|
|
1244
|
+
|
|
1245
|
+
If the user wants to see questions, they pick an Area number — that's what § 7.3.2 (Area detail) is for. **Do not pre-empt their drill choice with question previews.** Same rule as Step 9.1's "use server preview verbatim, do not free-form-summarize on top."
|
|
1246
|
+
|
|
1196
1247
|
**Why `accept shortlist`, not `accept recommended`:**
|
|
1197
1248
|
|
|
1198
1249
|
- "Recommended" is ambiguous (recommended per Area? globally? by category? recommended *recs* later in the flow?). The discovery picker uses **shortlist** explicitly because the shortlist is global (6–10 questions across all Areas, computed in § 7.3.0) — distinct from per-Area recommended counts shown alongside each Area, and distinct from the later `accept recommended` action that accepts implementation themes in Step 9.
|
|
@@ -1327,6 +1378,12 @@ After question picking, check for scope mismatch only when one of these triggers
|
|
|
1327
1378
|
|
|
1328
1379
|
If no trigger fires, proceed silently to anti-goals.
|
|
1329
1380
|
|
|
1381
|
+
**Fire-on-trigger anti-pattern (load-bearing):** after `accept_discovery_questions` returns, you MUST evaluate the four trigger conditions before proceeding to Step 8. If ANY trigger matches, you MUST render the scope-classification gate. Skipping the gate when a trigger fires — including the "the picks look reasonable to me" / "the user seems decisive" / "they probably know what they're doing" judgment call — is a SKILL violation. The decision signal is the user's **actual pick distribution**, not the agent's confidence in it.
|
|
1382
|
+
|
|
1383
|
+
Concretely: at 5 picks out of 70 total questions = 7.1% pick-rate, the < 40% trigger fires. The gate MUST be rendered. Observed violation 2026-05-15: agent proceeded directly to Step 8 after a 5/70 acceptance, never showed the scope-classification gate — silently locking the user into a broad scope while their actual investigation was tightly focused on 5 questions.
|
|
1384
|
+
|
|
1385
|
+
This is the same gap as the Step 9 "freelance dedupe action" anti-pattern: the SKILL specifies the behavior; the agent must not override based on its own assessment of whether the gate "feels needed."
|
|
1386
|
+
|
|
1330
1387
|
If a trigger fires, summarize the pattern in plain language and ask the user to classify unpicked areas. This is a top-level decision gate that closes the picker sub-views, so the full rail returns:
|
|
1331
1388
|
|
|
1332
1389
|
```text
|
|
@@ -1432,8 +1489,11 @@ Deep reasoning run started — this may take ~{minutes} minutes.
|
|
|
1432
1489
|
You're unblocked: the run continues server-side while you do other work.
|
|
1433
1490
|
Grab coffee, switch tasks, or close the terminal safely.
|
|
1434
1491
|
|
|
1435
|
-
|
|
1436
|
-
ritual status --watch
|
|
1492
|
+
For live progress, open a NEW terminal and run:
|
|
1493
|
+
ritual status --watch # terminal command, not a slash-command
|
|
1494
|
+
|
|
1495
|
+
Or check inside this session:
|
|
1496
|
+
/ritual status # SKILL subcommand (in-chat)
|
|
1437
1497
|
|
|
1438
1498
|
Come back later:
|
|
1439
1499
|
/ritual resume
|
|
@@ -1447,13 +1507,21 @@ Long reasoning run started — this one may take 20+ minutes.
|
|
|
1447
1507
|
You can safely step away; the run continues server-side even if this terminal
|
|
1448
1508
|
closes. For live progress:
|
|
1449
1509
|
|
|
1450
|
-
ritual status --watch
|
|
1510
|
+
ritual status --watch # in a separate terminal (not /ritual status)
|
|
1511
|
+
|
|
1512
|
+
Or check inside this session:
|
|
1513
|
+
/ritual status # SKILL subcommand for in-chat status
|
|
1451
1514
|
|
|
1452
1515
|
To come back later:
|
|
1453
1516
|
/ritual resume
|
|
1454
1517
|
```
|
|
1455
1518
|
|
|
1456
|
-
|
|
1519
|
+
**Two surfaces, two contexts:**
|
|
1520
|
+
|
|
1521
|
+
- `ritual status [--watch]` — **terminal command** (CLI 0.7.14+). Run from a separate shell. Survives this session closing; supports `--watch` for live tail.
|
|
1522
|
+
- `/ritual status` — **SKILL subcommand** inside Claude Code / Cursor / your agent. Read-only mirror; useful when the user wants a quick check without context-switching to a terminal. Defined in `references/status-flow.md`.
|
|
1523
|
+
|
|
1524
|
+
Pick whichever fits the user's flow — they're equivalent in content. Do not introduce a `reply watch` mode in this SKILL; the CLI command IS the live-tail affordance.
|
|
1457
1525
|
|
|
1458
1526
|
##### 8.1 — Polling loop
|
|
1459
1527
|
|
|
@@ -1461,7 +1529,7 @@ Poll `mcp__ritual__get_agentic_run(run_id)` using `references/async-polling.md`:
|
|
|
1461
1529
|
|
|
1462
1530
|
**On the FIRST poll only** (not every poll), prepend one line that locks the "background execution is default" mental model:
|
|
1463
1531
|
|
|
1464
|
-
> I'll keep working in the background.
|
|
1532
|
+
> I'll keep working in the background. For a live tail, run `ritual status --watch` in a separate terminal — or type `/ritual status` here for an in-chat snapshot.
|
|
1465
1533
|
|
|
1466
1534
|
Then print progress only when `progress_pct` or `current_step` changes, or every ~3 polls if unchanged:
|
|
1467
1535
|
|
|
@@ -1578,6 +1646,28 @@ If you don't already know the user's role on this workspace, prefer the workspac
|
|
|
1578
1646
|
|
|
1579
1647
|
**Vocabulary**: do NOT use "Reasoning chain" or "reasoning_chain" in user-facing copy. The user-visible label is **"Why this"** — a 4-line Problem / Discovery / Tradeoff / Recommendation breakdown derived from the rationale field. "Reasoning chain" sounds like internal model chain-of-thought; "Why this" is product-native.
|
|
1580
1648
|
|
|
1649
|
+
**Vocabulary anti-pattern — load-bearing**: recommendations are grouped by **category** (`metadata.category.name`). They are **NEVER** grouped by `matter` or by `Area`. Those are **discovery-phase concepts** — the matter / Area is where DISCOVERY QUESTIONS live; recommendations are synthesized across all matters and grouped by the category the LLM assigns (themes like "Token security & replay", "Atomicity & architecture", etc.). The internal DB field `matter_id` does not appear in the recommendation surface and **must never appear in user-facing copy** at this step. Anti-pattern observed in agent output: *"44 recs grouped by matter"* — the right framing is *"44 recs grouped by category"* (with categoryGroups returned by the preview API doing the work). If you find yourself referring to recommendation groups as "Areas" or "matters," stop and re-read this paragraph.
|
|
1650
|
+
|
|
1651
|
+
**Action-menu anti-pattern — load-bearing**: the **blessed action set at the Step 9 acceptance gate** is exactly:
|
|
1652
|
+
|
|
1653
|
+
- `accept recommended` — admin path, accepts all on-screen recs
|
|
1654
|
+
- `request admin review` — collaborator path, notifies workspace admin
|
|
1655
|
+
- `drop R{N}` — remove one rec from the set before accepting
|
|
1656
|
+
- `drill R{N}` — show one rec's full detail card
|
|
1657
|
+
- `comment R{N}` — leave feedback on a specific rec
|
|
1658
|
+
- `pause` — stop here; user can resume via `/ritual resume`
|
|
1659
|
+
|
|
1660
|
+
Plus the `continue` (implement-ahead) escape hatch for collaborators with explicit authorization.
|
|
1661
|
+
|
|
1662
|
+
**Do NOT freelance other actions.** Anti-patterns observed in agent output:
|
|
1663
|
+
|
|
1664
|
+
- ❌ `dedupe` — there is no de-dupe action. The system produces a non-duplicated rec set by design (single-flight rec-generation, V5 cap-enforcer, Stage A.2 quality audit). If duplicates appear, that's a system regression — file a bug, don't offer a workaround.
|
|
1665
|
+
- ❌ `open the admin` / "open the admin UI to reject one pass" — there is no admin UI surface invoked from `/ritual build`. The CLI is the surface; the action set above is the contract.
|
|
1666
|
+
- ❌ `reject one pass` / `accept the survivors` — assumes a duplicate-pass shape that should not exist post-PR #345.
|
|
1667
|
+
- ❌ Any invented compound action (`accept and dedupe`, `merge similar`, etc.) — drives the user into a workflow the system doesn't support.
|
|
1668
|
+
|
|
1669
|
+
If the rec set looks wrong, the right responses are: surface the anomaly explicitly, ask the user how to proceed, and consult `mcp__ritual__get_recommendation_attestation` for the quality audit's `duplicateTitlePrefixes` signal. Don't paper over with an invented action.
|
|
1670
|
+
|
|
1581
1671
|
##### 9.1 — Landing screen: server-rendered preview (primary path)
|
|
1582
1672
|
|
|
1583
1673
|
The recommendations review is the most-read screen in the whole build flow.
|
|
@@ -1616,6 +1706,16 @@ The recommendations review is the most-read screen in the whole build flow.
|
|
|
1616
1706
|
|
|
1617
1707
|
The server controls the rendering shape (category numbering, R-IDs, titles-only, 78-col wrap, role-aware action hint). Your job is to print and look up — not to invent labels, re-group, or add commentary.
|
|
1618
1708
|
|
|
1709
|
+
**Rendering anti-pattern — DO NOT DO THIS:** the most-seen Step 9 regression is the agent printing the preview AND THEN free-form-listing the recs themselves as a bulleted summary "for the user's convenience." This is wrong on three axes:
|
|
1710
|
+
|
|
1711
|
+
1. **Doubles the content** — preview already has titles + R-IDs + action hint at 78-col wrap. A second free-form list is redundant and pushes the action hint off-screen on small terminals.
|
|
1712
|
+
2. **Drops the R-IDs** — a free-form bullet list erases the stable `R{N}` references the user needs to reply with `accept R3` / `drill R7` / `comment R12`. The user then types `view 10` (positional) thinking that's stable; it's not.
|
|
1713
|
+
3. **Invents grouping labels** — free-form rendering tempts the agent to label groups as "Areas" or "matters" (already covered by the vocabulary anti-pattern above).
|
|
1714
|
+
|
|
1715
|
+
If the user wants more detail than the preview shows, they use `drill R{N}` — that's what the action menu is for. Do not pre-empt their drill choice with a wall of free-form bullets.
|
|
1716
|
+
|
|
1717
|
+
**"Many recs" rule — load-bearing for high-count sets**: when `response.uiPreview.stats.totalCount > 20`, the preview is **especially** the right surface to use; do NOT compensate by dumping the rec content inline. The server preview keeps high-count sets navigable (R-IDs + titles + compact category groups). If a 40+ rec set ever lands, the right reaction is to investigate WHY (single-flight regression? cap-enforcer bypass?) — see Stage A.2 audit signals via `get_recommendation_attestation` — not to add helpful free-form rendering on top.
|
|
1718
|
+
|
|
1619
1719
|
**Fallback path — if the preview tool is unavailable or returns a non-200**: render per the contract block below. The contract is the same shape the server uses, so a mismatch between server-rendered and agent-rendered output is unlikely. The fallback exists for older MCP servers that haven't deployed the preview endpoint yet.
|
|
1620
1720
|
|
|
1621
1721
|
```text
|
|
@@ -1954,6 +2054,73 @@ Returns the brief markdown + an `id` + `kgContextUsed` block. The brief is **ide
|
|
|
1954
2054
|
|
|
1955
2055
|
You can ALSO call `get_build_brief_status` **proactively** before `generate_build_brief` — if `exists === true && status === 'READY'` and the hashes haven't changed, you've saved a write-tool roundtrip. Tradeoff: tiny read cost for skipping a maybe-slow write.
|
|
1956
2056
|
|
|
2057
|
+
##### 10b.5 — Verify brief assertions against the actual code
|
|
2058
|
+
|
|
2059
|
+
**This step is mandatory, not opt-in.** 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 text, not code). Brief assertions that contradict the actual code are invisible to the brief generator AND to the user reading the brief. Step 10b.5 closes that gap before the user is asked to approve the brief at Step 10d.
|
|
2060
|
+
|
|
2061
|
+
This step is **SKILL-only — no MCP tool, no LLM cost on Ritual's API.** The verification happens locally in the calling agent because the agent is the one with repo access. The canonical instruction set is at `references/brief-verification-checklist.md` (methodology + output schema + worked example). This Step 10b.5 prose is the thin orchestration layer.
|
|
2062
|
+
|
|
2063
|
+
Steps:
|
|
2064
|
+
|
|
2065
|
+
1. **Tell the user what's about to happen** (one line, not a multi-line pre-roll):
|
|
2066
|
+
|
|
2067
|
+
> Verifying brief assertions against the actual codebase. Reading cited functions / classes / files, comparing against the brief's claims — about 20–60 seconds.
|
|
2068
|
+
|
|
2069
|
+
2. **Read `references/brief-verification-checklist.md`** for the methodology, output schema, and verdict definitions. **Walk the methodology in order — do NOT skip to the output schema.**
|
|
2070
|
+
|
|
2071
|
+
3. **Read `BUILD-BRIEF.md`** (the version just generated in Step 10a/10b but NOT YET written to disk — keep it in-memory; you'll write to disk AFTER verification at Step 10c). Extract every specific code citation: symbol + file + assertion. Cap at 15 citations (highest-leverage first).
|
|
2072
|
+
|
|
2073
|
+
4. **For each citation, read the actual code** via Grep / Glob / Read. Assign a verdict per citation:
|
|
2074
|
+
- `verified` — brief claim matches the code.
|
|
2075
|
+
- `contradicted` — brief claim is wrong; the code does something different.
|
|
2076
|
+
- `not_found` — symbol couldn't be located.
|
|
2077
|
+
|
|
2078
|
+
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.
|
|
2079
|
+
|
|
2080
|
+
6. **Sync the verification to Ritual's KG** — call `mcp__ritual__sync_brief_review` with:
|
|
2081
|
+
|
|
2082
|
+
```
|
|
2083
|
+
{
|
|
2084
|
+
exploration_id,
|
|
2085
|
+
review_type: 'BRIEF_VERIFICATION',
|
|
2086
|
+
content: <full BUILD-BRIEF-VERIFICATION.md markdown>,
|
|
2087
|
+
cited_files: <union of every file path cited across the verification>,
|
|
2088
|
+
}
|
|
2089
|
+
```
|
|
2090
|
+
|
|
2091
|
+
This persists the verification as a durable `BriefReview` row attached to the exploration. Future briefs on overlapping files will inherit the verified facts via `priorContext`; `/ritual lineage` on any cited file will surface this verification.
|
|
2092
|
+
|
|
2093
|
+
7. **Print a compact CLI summary** (≤ 8 lines, CLI Tenet #1, #6):
|
|
2094
|
+
|
|
2095
|
+
```text
|
|
2096
|
+
✓ Verification complete — `BUILD-BRIEF-VERIFICATION.md` on disk; synced to KG.
|
|
2097
|
+
|
|
2098
|
+
Verified: {N} · Contradicted: {M} · Not found: {K}
|
|
2099
|
+
|
|
2100
|
+
{If M > 0:}
|
|
2101
|
+
Top contradictions:
|
|
2102
|
+
⚠ {cited_symbol} — brief says "{brief_assertion[0:60]}…"
|
|
2103
|
+
actual: "{code_reality[0:60]}…"
|
|
2104
|
+
⚠ {next contradiction, if M > 1}
|
|
2105
|
+
```
|
|
2106
|
+
|
|
2107
|
+
Rules:
|
|
2108
|
+
- **If M = 0 AND K = 0:** print one line, *"✓ Verification complete — N citations checked, all verified. `BUILD-BRIEF-VERIFICATION.md` synced."*
|
|
2109
|
+
- **If M > 0:** print up to 3 top contradictions inline; rest are in the file. At the Step 10d gate, surface the contradictions count + note that plan mode will read them via KG priorContext.
|
|
2110
|
+
- **If brief made zero citations:** print *"✓ Verification skipped — the brief makes no specific code citations to verify."* Skip the sync call (nothing to persist). Proceed to Step 10c.
|
|
2111
|
+
|
|
2112
|
+
8. **Continue to Step 10c** with `BUILD-BRIEF.md` + `BUILD-BRIEF-VERIFICATION.md` both ready to write to disk and the verification synced to KG.
|
|
2113
|
+
|
|
2114
|
+
**Step 10d integration:** when contradictions exist, Step 10d's gate prepends an inline summary so the user sees *what the agent learned about the brief* before they decide whether to proceed. The brief itself is NOT rewritten — it stays the historical artifact Ritual generated. The KG carries the truth via the synced `BriefReview` row, and **plan mode (Step 11.1) reads the brief + KG-persisted reviews via `priorContext`** so the implementation incorporates the corrections without the brief content needing to change.
|
|
2115
|
+
|
|
2116
|
+
**Anti-patterns:**
|
|
2117
|
+
|
|
2118
|
+
- ❌ Skipping Step 10b.5 because "the brief looks fine." Brief-quality is invisible from reading the brief alone — the verification compares against the code.
|
|
2119
|
+
- ❌ Treating the brief's hedge ("*may deviate if codebase has a stronger pattern*") as license to skip. The hedge means *"go verify"* — exactly what this step does.
|
|
2120
|
+
- ❌ Padding the `verified` list. Only enumerate citations the brief actually made.
|
|
2121
|
+
- ❌ Re-writing the brief at Step 10b.5. The verification produces findings; the brief stays as-is. Plan mode reconciles via KG priorContext.
|
|
2122
|
+
- ❌ Skipping the `sync_brief_review` call. The local `BUILD-BRIEF-VERIFICATION.md` alone benefits this session only; the KG sync is what lets future briefs on overlapping files inherit the verified facts.
|
|
2123
|
+
|
|
1957
2124
|
##### 10c — Write to `BUILD-BRIEF.md` + CLI summary (CLI Tenet #1, #5)
|
|
1958
2125
|
|
|
1959
2126
|
When the brief content is in hand (from generate OR polling), **don't dump 300 lines of markdown into the terminal**. The brief belongs in a file the user can open, search, share, and revisit; the CLI surface is for the decision.
|
|
@@ -2027,7 +2194,6 @@ Build brief ready
|
|
|
2027
2194
|
`BUILD-BRIEF.md` is on disk. Skim the RBs + anchors, then decide:
|
|
2028
2195
|
|
|
2029
2196
|
· `go` — ready to implement; move to coding
|
|
2030
|
-
· `refine` — something's off; tell me what and I'll regenerate
|
|
2031
2197
|
· `drill {N}` — drill into RB-{N} before deciding
|
|
2032
2198
|
|
|
2033
2199
|
Before `go`, you can run `ux-review` for a design-quality pass on the brief (recommended for UI/UX features — produces `UX-REVIEW.md` and a tailored plan-mode prompt so plan mode stops asking you the same UX questions it always does). Reply `pause` to stop here.
|
|
@@ -2035,12 +2201,16 @@ Before `go`, you can run `ux-review` for a design-quality pass on the brief (rec
|
|
|
2035
2201
|
|
|
2036
2202
|
Branch by user response. Accept `go`, `y`, `yes`, `proceed`, `continue`, `next` as the visible-CTA path (do not display all aliases):
|
|
2037
2203
|
|
|
2038
|
-
- **`go` / proceed / yes / y**: continue to Step 11.
|
|
2039
|
-
- **`ux-review` / review / `ux`**: continue to Step 10.5 (writes `UX-REVIEW.md`, then continues to Step 11 with the tailored plan-mode prompt). Opt-in; absence is the existing path.
|
|
2040
|
-
- **`refine`**: ask what's off, then call `generate_build_brief` with `force: true` after applying their feedback to the exploration (typically a recommendation re-accept or a requirement adjustment via the web UI).
|
|
2204
|
+
- **`go` / proceed / yes / y**: continue to Step 11. Plan mode will read `BUILD-BRIEF.md` + any synced reviews (verify-brief from Step 10b.5; UX review from Step 10.5 if it ran) via KG `priorContext`. If verify-brief produced contradictions, plan mode picks them up there — the brief content itself stays as Ritual's historical artifact.
|
|
2205
|
+
- **`ux-review` / review / `ux`**: continue to Step 10.5 (writes `UX-REVIEW.md`, syncs it to KG via `sync_brief_review`, then continues to Step 11 with the tailored plan-mode prompt). Opt-in; absence is the existing path.
|
|
2041
2206
|
- **`drill {N}`**: open RB-{N} in the markdown, discuss inline, then loop back to the gate above.
|
|
2042
2207
|
- **`pause`**: stop here. The brief is on disk; the user can resume with `/ritual resume`.
|
|
2043
2208
|
|
|
2209
|
+
**No `refine` action at Step 10d.** The brief is read-only after generation. Two reasons:
|
|
2210
|
+
|
|
2211
|
+
1. **Verification findings reach plan mode via KG, not via brief rewrites.** Step 10b.5 syncs `BriefReview` rows via `sync_brief_review`; plan mode reads them via `priorContext`. Re-rewriting the brief content adds LLM cost for zero implementation-correctness gain — the implementation is governed by plan mode + KG, not by the brief text itself.
|
|
2212
|
+
2. **The brief stays as the historical record** of what Ritual generated. If the user wants new content (because underlying recs / requirements actually changed), call `generate_build_brief` with `force: true` — that's full regen with new source data. Don't conflate that with editing existing brief content.
|
|
2213
|
+
|
|
2044
2214
|
**Pulse (Step 10 done):** Emit a pulse — this often crosses into **Implementation-ready** (90%+). Render full when that crossing happens. Use the build-brief celebration line: `✓ Build brief ready — discovery has become an implementation path.` If still below 90% (e.g. brief flagged residual debt), surface that in the pulse line itself and propose addressing it before coding.
|
|
2045
2215
|
|
|
2046
2216
|
#### Step 10.5 — Optional UX brief review (entered ONLY when the user picks `ux-review` at Step 10d)
|
|
@@ -2078,6 +2248,21 @@ Steps:
|
|
|
2078
2248
|
- **Same exploration**: silent overwrite + one-line note in the summary.
|
|
2079
2249
|
- **Different exploration**: confirm before overwriting (same convention as `BUILD-BRIEF.md` in Step 10c — *"A `UX-REVIEW.md` already exists from `{previous}`. Overwrite, or save-to-`UX-REVIEW-{slug}.md`?"*).
|
|
2080
2250
|
|
|
2251
|
+
5a. **Sync the UX review to Ritual's KG** — call `mcp__ritual__sync_brief_review` with:
|
|
2252
|
+
|
|
2253
|
+
```
|
|
2254
|
+
{
|
|
2255
|
+
exploration_id,
|
|
2256
|
+
review_type: 'UX_REVIEW',
|
|
2257
|
+
content: <full UX-REVIEW.md markdown>,
|
|
2258
|
+
cited_files: <union of every file path cited across the review's Screen/Component, Design System Fit, and other sections>,
|
|
2259
|
+
}
|
|
2260
|
+
```
|
|
2261
|
+
|
|
2262
|
+
Persists the UX review as a durable `BriefReview` row attached to the exploration. Plan mode reads it via `priorContext` so the plan-mode prompt's mismatches / gaps / new-work items are KG-grounded, not just session-local. `/ritual lineage` on any cited UI file surfaces this review.
|
|
2263
|
+
|
|
2264
|
+
**Anti-pattern:** skipping the sync because *"UX-REVIEW.md is right here on disk."* The local file benefits this session only; the KG sync is what lets future briefs / explorations on overlapping files inherit the findings.
|
|
2265
|
+
|
|
2081
2266
|
6. **Print a compact CLI summary** — the file path + the load-bearing findings only, capped at ≤ 10 lines (CLI Tenet #1, #6):
|
|
2082
2267
|
|
|
2083
2268
|
```
|
|
@@ -2417,7 +2602,7 @@ Or: re-run `/ritual build` in this workspace later — the existing-work check w
|
|
|
2417
2602
|
|
|
2418
2603
|
### Tools used
|
|
2419
2604
|
|
|
2420
|
-
This subcommand exclusively uses
|
|
2605
|
+
This subcommand exclusively uses Ritual MCP tools, in the order they appear:
|
|
2421
2606
|
|
|
2422
2607
|
1. `mcp__ritual__list_workspaces` (Step 1)
|
|
2423
2608
|
2. `mcp__ritual__create_workspace` (Step 1, only if no workspace exists)
|
|
@@ -2448,11 +2633,12 @@ This subcommand exclusively uses vNext MCP tools, in the order they appear:
|
|
|
2448
2633
|
23. `mcp__ritual__get_requirement_set_status` (Step 9.5 polling)
|
|
2449
2634
|
24. `mcp__ritual__generate_build_brief` (Step 10a)
|
|
2450
2635
|
24a. `mcp__ritual__get_build_brief_status` (Step 10b — timeout-recovery polling, OR proactive cache-hit check before 10a)
|
|
2636
|
+
24d. `mcp__ritual__sync_brief_review` (Step 10b.5 — sync `BUILD-BRIEF-VERIFICATION.md` to KG; AND Step 10.5 — sync `UX-REVIEW.md` to KG)
|
|
2451
2637
|
24b. `mcp__ritual__add_knowledge_source` (Step 3.5 — register PRDs / tickets / transcripts / etc. provided by the user)
|
|
2452
2638
|
24c. `mcp__ritual__list_knowledge_sources` (used inline by Step 3.5 to show already-attached refs on resume; also called by `/ritual context-pulse` CP2 for Reference Grounding count)
|
|
2453
2639
|
25. `mcp__ritual__sync_implementation` (Step 12)
|
|
2454
2640
|
|
|
2455
|
-
|
|
2641
|
+
33 of the 44 Ritual MCP tools. The other 11 (`ping`, `get_exploration`, `list_agentic_runs`, `add_collaborator`, `check_anti_goals`, `query_knowledge_graph`, `get_workspace_overview`, `get_knowledge_source`, `remove_knowledge_source`, `get_recommendation_attestation`, `score_context_pulse`) are situational, not part of the linear build flow.
|
|
2456
2642
|
|
|
2457
2643
|
### After this subcommand
|
|
2458
2644
|
|