@ritualai/cli 0.7.13 โ†’ 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.
Files changed (62) hide show
  1. package/README.md +44 -0
  2. package/dist/commands/status.js +190 -0
  3. package/dist/commands/status.js.map +1 -0
  4. package/dist/index.js +15 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/status-formatter.js +162 -0
  7. package/dist/lib/status-formatter.js.map +1 -0
  8. package/package.json +1 -1
  9. package/skills/claude-code/ritual/.ritual-bundle.json +2 -2
  10. package/skills/claude-code/ritual/DESIGN.md +1 -1
  11. package/skills/claude-code/ritual/SKILL.md +59 -2
  12. package/skills/claude-code/ritual/manifest.json +23 -8
  13. package/skills/claude-code/ritual/references/brief-verification-checklist.md +169 -0
  14. package/skills/claude-code/ritual/references/build-flow.md +329 -17
  15. package/skills/claude-code/ritual/references/resume-flow.md +35 -13
  16. package/skills/claude-code/ritual/references/status-flow.md +94 -0
  17. package/skills/claude-code/ritual/references/ui-ux-checklist.md +198 -0
  18. package/skills/codex/ritual/.ritual-bundle.json +2 -2
  19. package/skills/codex/ritual/DESIGN.md +1 -1
  20. package/skills/codex/ritual/SKILL.md +59 -2
  21. package/skills/codex/ritual/manifest.json +23 -8
  22. package/skills/codex/ritual/references/brief-verification-checklist.md +169 -0
  23. package/skills/codex/ritual/references/build-flow.md +329 -17
  24. package/skills/codex/ritual/references/resume-flow.md +35 -13
  25. package/skills/codex/ritual/references/status-flow.md +94 -0
  26. package/skills/codex/ritual/references/ui-ux-checklist.md +198 -0
  27. package/skills/cursor/ritual/.ritual-bundle.json +2 -2
  28. package/skills/cursor/ritual/DESIGN.md +1 -1
  29. package/skills/cursor/ritual/SKILL.md +59 -2
  30. package/skills/cursor/ritual/manifest.json +23 -8
  31. package/skills/cursor/ritual/references/brief-verification-checklist.md +169 -0
  32. package/skills/cursor/ritual/references/build-flow.md +329 -17
  33. package/skills/cursor/ritual/references/resume-flow.md +35 -13
  34. package/skills/cursor/ritual/references/status-flow.md +94 -0
  35. package/skills/cursor/ritual/references/ui-ux-checklist.md +198 -0
  36. package/skills/gemini/ritual/.ritual-bundle.json +2 -2
  37. package/skills/gemini/ritual/DESIGN.md +1 -1
  38. package/skills/gemini/ritual/SKILL.md +59 -2
  39. package/skills/gemini/ritual/manifest.json +23 -8
  40. package/skills/gemini/ritual/references/brief-verification-checklist.md +169 -0
  41. package/skills/gemini/ritual/references/build-flow.md +329 -17
  42. package/skills/gemini/ritual/references/resume-flow.md +35 -13
  43. package/skills/gemini/ritual/references/status-flow.md +94 -0
  44. package/skills/gemini/ritual/references/ui-ux-checklist.md +198 -0
  45. package/skills/kiro/ritual/.ritual-bundle.json +2 -2
  46. package/skills/kiro/ritual/DESIGN.md +1 -1
  47. package/skills/kiro/ritual/SKILL.md +59 -2
  48. package/skills/kiro/ritual/manifest.json +23 -8
  49. package/skills/kiro/ritual/references/brief-verification-checklist.md +169 -0
  50. package/skills/kiro/ritual/references/build-flow.md +329 -17
  51. package/skills/kiro/ritual/references/resume-flow.md +35 -13
  52. package/skills/kiro/ritual/references/status-flow.md +94 -0
  53. package/skills/kiro/ritual/references/ui-ux-checklist.md +198 -0
  54. package/skills/vscode/ritual/.ritual-bundle.json +2 -2
  55. package/skills/vscode/ritual/DESIGN.md +1 -1
  56. package/skills/vscode/ritual/SKILL.md +59 -2
  57. package/skills/vscode/ritual/manifest.json +23 -8
  58. package/skills/vscode/ritual/references/brief-verification-checklist.md +169 -0
  59. package/skills/vscode/ritual/references/build-flow.md +329 -17
  60. package/skills/vscode/ritual/references/resume-flow.md +35 -13
  61. package/skills/vscode/ritual/references/status-flow.md +94 -0
  62. package/skills/vscode/ritual/references/ui-ux-checklist.md +198 -0
@@ -85,25 +85,47 @@ If exactly one in-flight exploration is recent and clearly the likely target, le
85
85
  >
86
86
  > Resume this? (Y/n, or `list`)
87
87
 
88
- If there are multiple plausible targets, group by state badge and show:
88
+ If there are multiple plausible targets, group by state badge and show. **One picker number per exploration; continuation prose is plain text under it, never its own list item.** Use the exact shape below:
89
89
 
90
90
  > Here's what you have in flight in **{workspace.name}**:
91
91
  >
92
- > **๐Ÿ“ still in discovery** (1)
93
- > - **{name}** โ€” {first 80 chars of problemStatement}
94
- > *Last touched {N} {days/hours} ago. Next: continue sub-problem generation.*
92
+ > **๐Ÿ“ still in discovery** ({count})
95
93
  >
96
- > **๐Ÿ’ฌ waiting on admin to accept recommendations** (2)
97
- > - **{name}** โ€” {โ€ฆ}
98
- > *Last touched {N} days ago. Next: admin reviews + accepts in Step 9.*
99
- > - **{name}** โ€” {โ€ฆ}
100
- > *โ€ฆ*
94
+ > 1. **{name}** โ€” {first 80 chars of problemStatement}
95
+ > Last touched {N} {days/hours} ago. Next: continue sub-problem generation.
101
96
  >
102
- > **โœ… ready for build brief** (1)
103
- > - **{name}** โ€” {โ€ฆ}
104
- > *Last touched {N} days ago. Next: generate the build brief.*
97
+ > **๐Ÿ’ฌ waiting on admin to accept recommendations** ({count})
105
98
  >
106
- > **Which one do you want to resume? (give me the number/name, or "none" to exit)**
99
+ > 2. **{name}** โ€” {โ€ฆ}
100
+ > Last touched {N} days ago. Next: admin reviews + accepts in Step 9.
101
+ > 3. **{name}** โ€” {โ€ฆ}
102
+ > Last touched {N} days ago. Next: โ€ฆ
103
+ >
104
+ > **โœ… ready for build brief** ({count})
105
+ >
106
+ > 4. **{name}** โ€” {โ€ฆ}
107
+ > Last touched {N} days ago. Next: generate the build brief.
108
+ >
109
+ > **Which one do you want to resume? Reply with the number, the name, or `none` to exit.**
110
+
111
+ **Rendering anti-pattern (load-bearing) โ€” observed 2026-05-15:**
112
+
113
+ - โŒ Numbering the SAME exploration's continuation lines (summary, "Last touched", "Next") as separate numbered items:
114
+ ```text
115
+ 1. Social shopping โ€” activate wishlist sharing
116
+ 1. Activate dormant wishlist sharing primitives...
117
+ 1. Last touched ~10 min ago. Next: generate the build brief.
118
+ 2. Join while booking โ€” post-order account claim
119
+ 2. Post-checkout account creation flow...
120
+ 2. Last touched ~2 hours ago. Next: admin reviews + accepts.
121
+ ```
122
+ Three `1.` lines + three `2.` lines is wrong. **Each exploration gets ONE picker number on its title line. The summary, last-touched, and next-action lines belong to that exploration as indented continuation prose โ€” never their own numbered or bulleted entries.**
123
+
124
+ - โŒ Using `-` bullets for explorations when the picker tells the user "reply with the number." Bullets have no numbers; the user can't say "I pick `-`."
125
+
126
+ - โŒ Restarting the picker count at each state bucket (`1.` under "still in discovery", then `1.` again under "waiting on admin"). Numbering is **flat across all buckets** so a single number unambiguously identifies one exploration.
127
+
128
+ **The correct shape is exactly:** state-bucket header โ†’ blank line โ†’ `{N}. **{name}** โ€” {summary}` โ†’ indented continuation prose (2-space indent, no leading marker) โ†’ blank line before next exploration. State-bucket count in parens `({count})` is informational and is NEVER a picker number.
107
129
 
108
130
  State badge โ†’ user-facing label + suggested next step (same table as `/ritual build` Step 1.5):
109
131
 
@@ -0,0 +1,94 @@
1
+ ## /ritual status
2
+
3
+ Thin in-chat mirror of the terminal CLI command `ritual status [--watch]` (CLI 0.7.14+).
4
+
5
+ The CLI is the primary affordance for the "I walked away from this run; let me check on it" case โ€” it works from any terminal, survives this agent session closing, and supports `--watch` for live tail. **This SKILL subcommand exists for the orthogonal case:** the user is still in the agent session, wants a quick status snapshot, and doesn't want to context-switch to a separate terminal.
6
+
7
+ Same content, two surfaces. Pick whichever fits the user's flow.
8
+
9
+ ### When to use this vs. the terminal CLI
10
+
11
+ | Context | Use |
12
+ |---|---|
13
+ | User is in chat with you and types `/ritual status` | This SKILL subcommand. |
14
+ | User is mid-run and walks away | Tell them about `ritual status --watch` in a separate terminal. Their session can close; the CLI keeps tailing. |
15
+ | User wants to script status / pipe to other tools | Terminal CLI. The SKILL is render-only; the CLI prints to stdout with proper exit codes. |
16
+ | User asks "what's happening?" without typing the slash | Plain English answer โ€” call `mcp__ritual__get_agentic_run` and respond naturally. Don't gratuitously invoke this subcommand. |
17
+
18
+ ### Steps
19
+
20
+ #### Step S1 โ€” Resolve the run
21
+
22
+ The subcommand can be invoked three ways:
23
+
24
+ 1. **`/ritual status`** (no arg) โ€” auto-resolve the current run from workspace context:
25
+ - If `.ritual/config.json` is bound (i.e. `/ritual init` was run in this repo), load `workspaceId` from there.
26
+ - Call `mcp__ritual__list_explorations(workspace_id)`, sort by `updatedAt` desc.
27
+ - For each of the top 5 most-recently-updated, call `mcp__ritual__list_agentic_runs(exploration_id, status='RUNNING', limit=1)` until one returns a run.
28
+ - If none has a RUNNING run, fall back to the most-recently-updated exploration with step != `COMPLETED`.
29
+ - If no workspace is bound to the project, ask the user for an exploration id or to run `/ritual init` first.
30
+
31
+ 2. **`/ritual status <exploration-id>`** โ€” skip auto-resolve, fetch that exploration directly.
32
+
33
+ 3. **`/ritual status --runs`** โ€” list every RUNNING agentic run across the workspace (multi-run case). Render as a numbered picker.
34
+
35
+ #### Step S2 โ€” Fetch state
36
+
37
+ Call in parallel:
38
+
39
+ - `mcp__ritual__get_exploration(exploration_id)` โ†’ exploration name, step, updatedAt, agenticProgress.
40
+ - `mcp__ritual__get_agentic_run(run_id)` IF a RUNNING run was found โ€” gives live progress + run id + status. Read from the **merged view** the MCP tool returns; never from raw `agentic_jobs.totalQuestions` or `agentic_jobs.progress.steps` directly (those fields have a known unwritten-for-`full_exploration_v1` bug).
41
+
42
+ #### Step S3 โ€” Render the run-first layout
43
+
44
+ Mirror the terminal CLI exactly. Run line first, exploration name as a footer parenthetical:
45
+
46
+ ```text
47
+ Run ba4d2b42-โ€ฆ ยท RUNNING for 17m 41s
48
+ Phase answering (58%)
49
+ Questions 42 / 67 ยท 0 failed
50
+ Activity last DB write 1m 12s ago
51
+ Pace ~14s/question ยท ETA ~5m 50s remaining
52
+ Next Recommendations (auto-advances when questions are done)
53
+
54
+ (Exploration: Join while booking โ€” post-order account claim)
55
+ 51f16182-โ€ฆ ยท step: DEVELOPING_ANSWERS
56
+ ```
57
+
58
+ Rendering rules:
59
+
60
+ - **Run line first.** "RUNNING for 17m 41s" is the headline.
61
+ - **Pace + ETA** computed client-side from `(now - run.startedAt) / progress.completedQuestions ร— (totalQuestions - completedQuestions)`. Only show when `completedQuestions >= 3` โ€” below that, render `Pace warming up โ€” check back in 30s`.
62
+ - **Activity** is the freshness signal โ€” if `last write` has been climbing past ~3 min without `completedQuestions` advancing, that's actionable info. Surface it plainly; do not invent a "stuck" diagnosis (that's `RecStallSweeper`'s job, server-side).
63
+ - **Next line** is heuristic based on `progress.phase`:
64
+ - `answering` โ†’ `Recommendations (auto-advances when questions are done)`
65
+ - `submitting` โ†’ `Recommendations`
66
+ - `recommendations` โ†’ `Build brief (after admin review)`
67
+ - `complete` / `failed` โ†’ `โ€”`
68
+ - any unknown โ†’ omit the line entirely
69
+ - **No run, but progress data exists** (run completed or never started): render `Run (no active run)` + phase + Activity. Useful when the user types `/ritual status` after a run finished.
70
+ - **No run, no progress**: render `Run (no run started yet)` + Step + Activity.
71
+
72
+ #### Step S4 โ€” Wrap up
73
+
74
+ After rendering, the agent's job is done. Do NOT auto-poll, do NOT enter a watch loop inside the chat. The CLI's `--watch` is the live-tail surface; this SKILL is a snapshot.
75
+
76
+ If the user wants to check again, they type `/ritual status` again. The agent re-runs S1โ€“S3 from scratch.
77
+
78
+ ### Tools used
79
+
80
+ Read-tier subset of the build-flow tools:
81
+
82
+ 1. `mcp__ritual__list_explorations` (auto-resolve)
83
+ 2. `mcp__ritual__list_agentic_runs` (find RUNNING)
84
+ 3. `mcp__ritual__get_exploration` (S2 โ€” name + step + progress)
85
+ 4. `mcp__ritual__get_agentic_run` (S2 โ€” merged live view)
86
+
87
+ No new MCP tools required. `/ritual status` is a thin orchestration over what already exists.
88
+
89
+ ### Anti-patterns
90
+
91
+ - **Don't introduce a "watch" mode inside this SKILL.** The terminal CLI's `--watch` is the live-tail surface. Re-implementing it in chat doubles the affordance and creates polling loops that survive past the user's intent.
92
+ - **Don't render raw `agentic_jobs` fields.** `AgenticJob.totalQuestions` and `progress.steps[*].status` are not written for `full_exploration_v1` runs. Reading them directly produces the "all-pending" snapshot lie surfaced 2026-05-15. The merged view returned by `get_agentic_run` is the only correct source.
93
+ - **Don't synthesize ETA from `progress.percent` alone.** Use the question-count math (`completedQuestions / elapsed ร— remaining`) because it's more accurate than the coarse percent rounded up at major step boundaries.
94
+ - **Don't gratuitously invoke this subcommand.** If the user asks "what's happening?" without typing `/ritual status`, just answer in plain English using `get_agentic_run`. The slash-command is for explicit status snapshots, not for every progress question.
@@ -0,0 +1,198 @@
1
+ ## UX brief review โ€” methodology + output schema
2
+
3
+ Reference for `/ritual build` Step 10.5 (the opt-in `ux-review` path) and any standalone caller that needs the same shape.
4
+
5
+ The brief that came out of Step 10 is implementation-ready from a *what* standpoint (RBs, requirements, acceptance criteria). This review is implementation-ready from an *experience* standpoint โ€” the things coding-agent plan mode otherwise interrogates the user for, surfaced and answered with evidence before any code is touched.
6
+
7
+ The output is a single file, `UX-REVIEW.md`, written alongside `BUILD-BRIEF.md`. It is repo-grounded (every claim cites a brief line or a repo analogue), brief-aware (does not re-derive what the brief already nails), and auditable (gaps and mismatches surface explicitly rather than buried in prose).
8
+
9
+ ---
10
+
11
+ ### Core principle
12
+
13
+ **Make the coding agent reason about the experience before it reasons about files.**
14
+
15
+ The plan mode prompt at the end of `UX-REVIEW.md` is the load-bearing artifact. Plan mode reads it on entry instead of inventing its own questions.
16
+
17
+ ---
18
+
19
+ ### Methodology (chain of thought โ€” execute in this order)
20
+
21
+ Do NOT skip to the output schema. Walk these six steps; the schema only gets filled correctly when the analysis upstream is done.
22
+
23
+ **1. Read the brief end-to-end first.**
24
+
25
+ Open `BUILD-BRIEF.md`. Identify what it covers vs what it's silent on. The brief itself is signal:
26
+
27
+ - An exhaustive states table โ†’ most state sections will be "covered in BUILD-BRIEF.md ยงX; no additions needed."
28
+ - A missing copy section โ†’ that's where to focus; copy is high-leverage and almost always under-specified.
29
+ - A "Non-goals" section listing UI surfaces explicitly out of scope โ†’ DO NOT add UX recommendations that contradict the non-goals.
30
+
31
+ Output of this step: a one-line classification of the brief โ€” what's well-covered (skip in the review), what's thin (deep-dive in the review), what's silent (gap-flag in the review).
32
+
33
+ **2. Identify the UI surfaces the brief implies.**
34
+
35
+ Pull a list of every screen, component, modal, drawer, form, list, page, route, view, dashboard, panel, toast, banner, etc. that the brief mentions or implies. Be literal โ€” if the brief says "users see a confirmation," that implies at minimum: a confirmation surface + the action that triggered it + the dismissal path.
36
+
37
+ Output of this step: a flat list of UI surfaces with one-line "purpose" each.
38
+
39
+ **3. For each implied surface, find existing analogues in the repo.**
40
+
41
+ Use Grep / Glob / Read. Search by:
42
+
43
+ - Exact name: `<surface>` (e.g. `ConfirmModal`, `EmptyState`, `DrawerPanel`).
44
+ - Component-library import: imports from the repo's design-system package, `@radix-ui/*`, `shadcn-ui`, `@mui/material`, `@chakra-ui/*`, etc.
45
+ - Route shape: similar `/path/to/feature` routes already in the app.
46
+ - Sibling features: features one directory over that ship the same shape.
47
+
48
+ Output of this step: for each implied surface from step 2, the closest existing analogue (file path + ~5-10 line excerpt of the relevant pattern) OR `"no analogue found โ€” new pattern needed"`.
49
+
50
+ **4. Compare brief requirements vs analogue patterns.**
51
+
52
+ For each (implied surface, analogue) pair, classify:
53
+
54
+ - **Covered** โ€” brief specifies X, analogue already handles X. Skip in the review or note as "use existing pattern, no decisions needed."
55
+ - **Mismatch** โ€” brief asks for X, analogue does Y. Surface for plan mode: is this intentional (the new feature deliberately diverges) or unintentional (the brief was written without knowing the analogue exists)?
56
+ - **Gap** โ€” brief silent on X, but X is standard in this codebase (the analogue always handles X). Surface for plan mode: the brief should specify, or the agent should follow the codebase default.
57
+ - **New work** โ€” brief specifies X, no analogue. Flag: this surface needs to be designed, not extended.
58
+
59
+ Output of this step: three lists โ€” mismatches, gaps, new-work surfaces. With evidence (file path / line / brief reference) on each entry.
60
+
61
+ **5. Fill the 12 sections WITH EVIDENCE.**
62
+
63
+ Now โ€” and only now โ€” fill the output schema below. Rules:
64
+
65
+ - Each claim cites either a `BUILD-BRIEF.md ยงX` line OR a repo file path. Both is better.
66
+ - Sections the brief already covers get one line: *"Covered in BUILD-BRIEF.md ยง<section>; no additions needed."* Do not re-derive.
67
+ - Sections the brief is silent on but the codebase implies a default for: *"Brief silent. Codebase default (`<path>`): <one-line pattern>. Recommend following the default."*
68
+ - Sections that are real gaps: *"Brief silent. No codebase default. Plan mode must address: <one-line question>."*
69
+ - States that the brief does not require: omit. An empty state entry means "the brief does not require this state and the analogue does not either" โ€” that is a valid signal.
70
+
71
+ **6. Generate the plan-mode prompt with the surfaced findings.**
72
+
73
+ The plan-mode prompt is NOT generic. Its first three numbered items are the surfaced mismatches, gaps, and new-work surfaces from step 4. Plan mode then has to address those specifically โ€” not walk a generic 10-step plan.
74
+
75
+ The plan-mode prompt MUST end with the literal sentence:
76
+
77
+ > Do not start coding until the plan is approved.
78
+
79
+ ---
80
+
81
+ ### Output schema โ€” `UX-REVIEW.md`
82
+
83
+ Render exactly the sections below. Every section MUST exist (use the "Covered in BUILD-BRIEF.md" / "Brief silent" patterns rather than skipping). Sub-state entries under "States" are the only optional content.
84
+
85
+ ```markdown
86
+ <!--
87
+ Generated by Ritual โ€” UX brief review
88
+ Exploration: https://app.ritualapp.cloud/e/{exploration_id}
89
+ Source brief: BUILD-BRIEF.md
90
+ Do not remove this header; it preserves implementation lineage.
91
+ -->
92
+
93
+ # UX Brief Review โ€” {exploration name}
94
+
95
+ ## User Goal
96
+
97
+ {What the user is trying to accomplish. Cite the brief's Goal section. One paragraph max.}
98
+
99
+ ## Primary Flow
100
+
101
+ {Step-by-step happy path from the user's perspective. Cite brief lines. If the brief already enumerates this, write "Covered in BUILD-BRIEF.md ยง<section>" + a one-line summary.}
102
+
103
+ ## Screen / Component Requirements
104
+
105
+ {What UI needs to exist, including layout, hierarchy, states, and interactions. For each surface: the implied surface from methodology step 2 + its closest repo analogue from step 3 + whether it's covered / mismatch / gap / new work from step 4.}
106
+
107
+ ## Interaction Details
108
+
109
+ {Clicks, hovers, keyboard behavior, drag/drop, focus, transitions, gestures. Cite the analogue's existing interaction patterns when reusing; specify deliberately when diverging.}
110
+
111
+ ## States
112
+
113
+ (omit any state the brief does not require AND the analogue does not handle)
114
+
115
+ - **Empty**: {description + analogue path or "new"}
116
+ - **Loading**: {description + analogue path or "new"}
117
+ - **Error**: {description + analogue path or "new" โ€” include error message tone if the codebase has a convention}
118
+ - **Success**: {description + analogue path or "new"}
119
+ - **Disabled**: {description + analogue path or "new"}
120
+ - **Permission-restricted**: {description + analogue path or "new"}
121
+ - **Mobile / narrow**: {description + breakpoint convention from analogue or "new"}
122
+
123
+ ## UX Risks
124
+
125
+ {Where the user may get confused, stuck, or surprised. Anchored on the gaps + mismatches from methodology step 4. Each risk one line + one mitigation line.}
126
+
127
+ ## Visual Hierarchy
128
+
129
+ {What should be most prominent, secondary, hidden, grouped, or de-emphasized. Cite analogue patterns when reusing; flag when the brief implies a hierarchy that conflicts with the codebase.}
130
+
131
+ ## Copy Requirements
132
+
133
+ {Button labels, helper text, error messages, confirmation text, tooltips. Brief lines if the brief specifies; codebase-convention examples if not; "needs writing" entries flagged for plan mode otherwise.}
134
+
135
+ ## Accessibility Requirements
136
+
137
+ {Keyboard navigation, focus states, contrast, labels, ARIA expectations, reduced motion. Anchored on the codebase's existing a11y patterns (search for `aria-`, `role=`, `:focus-visible`, `prefers-reduced-motion` in analogues).}
138
+
139
+ ## Responsiveness
140
+
141
+ {Desktop / tablet / mobile behavior. Use the codebase's breakpoint convention (search tailwind.config / theme files / media queries in analogues). Flag if the brief implies breakpoints that diverge from the convention.}
142
+
143
+ ## Design System Fit
144
+
145
+ {Existing components to prefer, patterns to reuse, styling constraints to avoid custom one-offs. For each implied surface from methodology step 2: which existing component or token set is the right base, with file paths. When no design system exists in the repo: state that clearly and instruct plan mode to discover patterns or propose an anchor.}
146
+
147
+ ## Acceptance Criteria
148
+
149
+ {Experiential checks ON TOP OF the brief's RB-level criteria. Per-state, per-viewport, copy correctness, focus order, keyboard nav, reduced-motion, color-contrast. Each criterion concrete enough to verify in QA โ€” no "feels right" entries.}
150
+
151
+ ## Plan Mode Prompt
152
+
153
+ The agent should paste this verbatim into plan mode (or the agent itself should adopt it as the first instruction when entering plan mode).
154
+
155
+ ```
156
+ You are about to enter plan mode for a UI/UX implementation task.
157
+
158
+ First, inspect the existing UI patterns, components, routes, design-system conventions, and nearby implementations. Do not edit files yet.
159
+
160
+ Specifically address before proposing any plan:
161
+ 1. {mismatch from methodology step 4 โ€” concrete one-liner}
162
+ 2. {gap from methodology step 4 โ€” concrete one-liner}
163
+ 3. {new-work surface from methodology step 4 โ€” concrete one-liner}
164
+ (repeat 4โ€“6 for the next most load-bearing surfaced items)
165
+
166
+ Then return a plan that includes:
167
+ - Existing patterns you found (cite file paths)
168
+ - User flow summary
169
+ - Components / screens likely affected
170
+ - UI states to implement (referencing the States section of UX-REVIEW.md)
171
+ - Accessibility considerations (referencing the Accessibility Requirements section)
172
+ - Responsive behavior (referencing the Responsiveness section)
173
+ - Copy or microcopy needed (referencing the Copy Requirements section)
174
+ - Risks or ambiguous UX decisions (referencing the UX Risks section)
175
+ - Test/QA plan (referencing the Acceptance Criteria section)
176
+ - Proposed implementation steps
177
+
178
+ Do not start coding until the plan is approved.
179
+ ```
180
+ ```
181
+
182
+ ---
183
+
184
+ ### What this review is NOT
185
+
186
+ - **Not a re-derivation of the brief.** If the brief already specifies a state, the review says so in one line and moves on. The review's value is on the gaps, mismatches, and codebase-grounding โ€” not on rewriting good content.
187
+ - **Not an excuse to expand scope.** Stay within the brief's Goal and Non-goals. UX coverage gaps that fall OUTSIDE the brief's scope go on the deferrals list, not the acceptance criteria.
188
+ - **Not a design tool.** This produces a planning packet, not visual designs. Where the codebase has no design system, the review surfaces that fact and routes back to the user โ€” it does not propose one unilaterally.
189
+ - **Not a check on existing implementations.** Use `/ritual lineage` for "what decisions shaped this code already." This review is forward-looking only.
190
+
191
+ ---
192
+
193
+ ### Failure modes to watch for
194
+
195
+ - **Generic checklist filling.** Symptom: every section reads the same regardless of the brief / repo. Mitigation: methodology step 1's classification โ€” if the output doesn't reflect what the brief actually covers vs misses, the analysis upstream wasn't done.
196
+ - **Fabricating analogues.** Symptom: review cites file paths that don't exist. Mitigation: every file path claim must come from an actual Grep / Glob / Read result in methodology step 3.
197
+ - **Plan-mode prompt with no surfaced findings.** Symptom: the numbered list at the top of the plan-mode prompt is a generic 10-step plan. Mitigation: methodology steps 4 and 6 โ€” the first 3โ€“6 items must be the actual mismatches, gaps, and new-work surfaces from step 4. If those lists were empty, the brief is unusually complete; the prompt's first three items should reflect that ("Brief is unusually complete; verify each state listed under ยงX exists in the codebase before extending").
198
+ - **Scope drift.** Symptom: review proposes UI work the brief deliberately excluded under Non-goals. Mitigation: re-read Non-goals before drafting the review; deferrals list is the right destination for out-of-scope UX gaps.
@@ -1,4 +1,4 @@
1
1
  {
2
- "cliVersion": "0.7.13",
3
- "builtAt": "2026-05-15T14:17:47.561Z"
2
+ "cliVersion": "0.7.15",
3
+ "builtAt": "2026-05-19T15:51:30.453Z"
4
4
  }
@@ -20,7 +20,7 @@ The split version keeps:
20
20
 
21
21
  ## Retired `/ritual recon`
22
22
 
23
- `/ritual recon` is intentionally not part of the vNext command surface. Its former workspace-history value is covered by `/ritual resume`; its file-decision-history value is covered by `/ritual lineage`; and its repo-reading behavior is normal coding-agent behavior in plain English.
23
+ `/ritual recon` is intentionally not part of the Ritual command surface. Its former workspace-history value is covered by `/ritual resume`; its file-decision-history value is covered by `/ritual lineage`; and its repo-reading behavior is normal coding-agent behavior in plain English.
24
24
 
25
25
  ## Context packet principle
26
26
 
@@ -18,6 +18,36 @@ Before executing any subcommand, read and follow:
18
18
 
19
19
  Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
20
20
 
21
+ ## Contract strength โ€” load-bearing for all subcommands
22
+
23
+ Every section in this SKILL or its reference files labeled **load-bearing**, **forbidden behavior**, **anti-pattern**, **rendering contract**, or **fire-on-trigger** is **contract-strength**, not guidance.
24
+
25
+ If this SKILL says *"DO NOT do X"*, your default action is to not do X. You may not override based on your in-the-moment assessment that X would be:
26
+
27
+ - helpful
28
+ - clearer
29
+ - shorter
30
+ - more convenient
31
+ - *"obviously what the user really wants"*
32
+ - *"a small improvement on top of the SKILL's contract"*
33
+
34
+ When a local example or your own instinct conflicts with a contract-strength rule, **the contract wins.** Re-read the rule. Trust that the prior version of you also thought the override "feels right" โ€” that's exactly the case the contract exists to prevent.
35
+
36
+ When two contract-strength rules genuinely conflict (rare): **stop, surface the conflict to the user, and ask which to honor.** Do not improvise a resolution.
37
+
38
+ This rule is the meta-pattern that closes the failure class we kept hitting before 2026-05-15: the SKILL named the right behavior in each step (Step 7 picker, Step 9 preview-verbatim, Step 9 action menu, picker numbering, etc.), but the agent treated the prose as advisory and freelanced anyway. Anti-patterns are **executable constraints, not taste guidance.** When an anti-pattern says "agent must NOT", read it as a hard error, not a preference.
39
+
40
+ Examples of contract-strength rules currently in force (non-exhaustive):
41
+
42
+ - `references/build-flow.md` Step 7 transition lock โ€” must NOT skip the Areas picker, must call `accept_discovery_questions` before `start_agentic_run`.
43
+ - `references/build-flow.md` Step 7.3.1 rendering contract โ€” Areas index has NO question previews, single numbering stream.
44
+ - `references/build-flow.md` Step 7.4.5 fire-on-trigger โ€” scope-classification gate is the contract, not a suggestion.
45
+ - `references/build-flow.md` Step 9 action menu lock โ€” blessed set is exactly `accept recommended` / `drop R{N}` / `drill R{N}` / `comment R{N}` / `pause` (+ `request admin review` for collaborators). NO freelance `dedupe` / `open the admin` / invented compound actions.
46
+ - `references/build-flow.md` Step 9 rendering โ€” use the server preview verbatim; no free-form summarization on top.
47
+ - `references/resume-flow.md` ยง R2 picker rendering โ€” ONE picker number per exploration; continuation prose indented; flat numbering across state buckets.
48
+
49
+ When you encounter a rule labeled with any of the marker words above, treat it the same way you'd treat a unit-test assertion: violating it is a regression, not a stylistic choice.
50
+
21
51
  ## Routing
22
52
 
23
53
  Parse the first token of the argument:
@@ -28,9 +58,10 @@ Parse the first token of the argument:
28
58
  | `resume` | `references/resume-flow.md` | "Pick up where I left off." Lists in-flight explorations with state badges and jumps to the right step. |
29
59
  | `lineage` | `references/lineage-flow.md` | Paste a file path (or set of paths); see every prior exploration / decision / deferral that touched those files. |
30
60
  | `context-pulse` | `references/context-pulse-flow.md` | Score readiness / context debt for a feature ask or exploration. Can seed a `CONTEXT-<feature>.md` file with relevant codebase + KG context that `/ritual build` picks up automatically. Also surfaces inline during build so the user watches debt drop. |
61
+ | `status` | `references/status-flow.md` | Read-only mirror of the `ritual status` terminal CLI command (CLI 0.7.14+) for users who want a quick run-progress check inside the agent session instead of in a separate terminal. Calls `mcp__ritual__get_agentic_run` + renders the same run-first layout the CLI uses. |
31
62
  | (anything else, OR no subcommand) | default to `build` and treat the entire argument as the problem statement | |
32
63
 
33
- The vNext CLI surface is intentionally **just these four**. Legacy exposed `explore`, `run`, `brief`, `gate`, `spec`, `questions`, `gherkin`, `status`, `recs` โ€” all of which mapped 1:1 to MCP tool calls and provided no agent-CLI value over plain English. We don't replicate them; the agent can call any MCP tool directly when the user asks for "the recs on exp-X" or "status of exp-Y". (`/ritual recon` shipped briefly in PR #174 as a fifth command โ€” retired in this PR because its unique value duplicated `/ritual resume` (workspace history) + `/ritual lineage` (decisions on files), and its non-duplicate parts (map repo, trace flow, explain file) are exactly what the agent does fluently in plain English without needing a SKILL-defined menu.)
64
+ The Ritual CLI surface is intentionally narrow: `build`, `resume`, `lineage`, `context-pulse`, plus the read-only `status` mirror. Legacy exposed `explore`, `run`, `brief`, `gate`, `spec`, `questions`, `gherkin`, `recs` โ€” all of which mapped 1:1 to MCP tool calls and provided no agent-CLI value over plain English. We don't replicate them; the agent can call any MCP tool directly when the user asks for "the recs on exp-X" or "decisions on file Y". (`/ritual recon` shipped briefly in PR #174 as a fifth command โ€” retired because its unique value duplicated `/ritual resume` (workspace history) + `/ritual lineage` (decisions on files), and its non-duplicate parts (map repo, trace flow, explain file) are exactly what the agent does fluently in plain English without needing a SKILL-defined menu.)
34
65
 
35
66
 
36
67
  ## Subcommand reference files
@@ -67,5 +98,31 @@ When the user says things like *"what's the status of exp-X?"*, *"show me the re
67
98
  | Kick off / re-run the agentic pipeline | `mcp__ritual__start_agentic_run(exploration_id, โ€ฆ)` |
68
99
  | Did anyone implement something on these files? | `mcp__ritual__query_knowledge_graph(sources=[โ€ฆ])` โ€” same plumbing as `/ritual lineage` |
69
100
 
70
- This is intentional. Legacy exposed each of these as its own slash-command (`/ritual status`, `/ritual recs`, `/ritual run`) and the surface area ballooned without adding agent value. In vNext we keep the slash-commands narrow (`build`, `resume`, `lineage`, `context-pulse`) and let the agent fluently call MCP tools for everything else. Do not reintroduce `/ritual recon`: its former workspace-history value is covered by `/ritual resume`; its file-decision-history value is covered by `/ritual lineage`; and repo-reading behaviors are normal coding-agent behavior in plain English.
101
+ This is intentional. Legacy exposed each of these as its own slash-command (`/ritual recs`, `/ritual run`, etc.) and the surface area ballooned without adding agent value. We keep the slash-commands narrow (`build`, `resume`, `lineage`, `context-pulse`, plus the read-only `status` mirror) and let the agent fluently call MCP tools for everything else. Note: `/ritual status` is the one deliberate exception โ€” it exists as a thin SKILL mirror of the terminal CLI command so users who want an in-chat status check don't have to context-switch to a separate terminal. Do not reintroduce `/ritual recon`: its former workspace-history value is covered by `/ritual resume`; its file-decision-history value is covered by `/ritual lineage`; and repo-reading behaviors are normal coding-agent behavior in plain English.
102
+
103
+ ---
104
+
105
+ ## Before this skill is installed โ€” bootstrap context
106
+
107
+ This SKILL only governs behavior **after** `ritual init` has run and the
108
+ `/ritual` skill has been copied into the agent's skills directory. Before
109
+ that, the agent has no Ritual-specific instructions in scope.
110
+
111
+ If you are reading this file by browsing the repo, or as part of a
112
+ post-mortem on why a user's "set up Ritual MCP" request went sideways:
113
+ the **pre-install** instruction surface lives in three places, in priority
114
+ order:
115
+
116
+ 1. **`learn.ritual.work/llms.txt`** โ€” canonical machine-readable bootstrap script. Served as plain text. WebFetch-safe.
117
+ 2. **`ritual.work/llms.txt`** โ€” identical bytes to (1). Served from the marketing site so an agent handed any `ritual.work/...` URL can find it without knowing about `learn.ritual.work`.
118
+ 3. **`apps/cli/README.md`** in this repo (ships to npmjs.com via `@ritualai/cli`) โ€” has the same "AI coding agents: start here" block at the top.
119
+
120
+ All three sources must say the same thing. The canonical content is the
121
+ 7-step `npm install -g @ritualai/cli` โ†’ `ritual init` โ†’ `ritual doctor`
122
+ โ†’ restart-agent โ†’ verify-MCP โ†’ `/ritual build` flow, with explicit
123
+ "do not ask the user about their project until init succeeds" rules.
124
+
125
+ When updating one, update all three. The cross-repo sync is intentional
126
+ duplication โ€” agents need the bootstrap visible at whichever URL they
127
+ happen to be handed.
71
128
 
@@ -1,13 +1,13 @@
1
1
  [
2
2
  {
3
3
  "path": "DESIGN.md",
4
- "lines": 36,
5
- "bytes": 2226
4
+ "lines": 35,
5
+ "bytes": 2227
6
6
  },
7
7
  {
8
8
  "path": "SKILL.md",
9
- "lines": 72,
10
- "bytes": 5915
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": 1519,
25
- "bytes": 88142
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,12 +51,22 @@
46
51
  },
47
52
  {
48
53
  "path": "references/resume-flow.md",
49
- "lines": 157,
50
- "bytes": 9950
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
61
+ },
62
+ {
63
+ "path": "references/status-flow.md",
64
+ "lines": 94,
65
+ "bytes": 6096
66
+ },
67
+ {
68
+ "path": "references/ui-ux-checklist.md",
69
+ "lines": 198,
70
+ "bytes": 12167
56
71
  }
57
72
  ]