@ritualai/cli 0.24.0 → 0.36.8

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 (73) hide show
  1. package/dist/commands/build.js +89 -0
  2. package/dist/commands/build.js.map +1 -0
  3. package/dist/commands/init.js +95 -109
  4. package/dist/commands/init.js.map +1 -1
  5. package/dist/commands/uninstall.js +6 -1
  6. package/dist/commands/uninstall.js.map +1 -1
  7. package/dist/index.js +18 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/lib/agents/configure-mcp.js +63 -0
  10. package/dist/lib/agents/configure-mcp.js.map +1 -1
  11. package/dist/lib/agents/launch.js +70 -0
  12. package/dist/lib/agents/launch.js.map +1 -0
  13. package/dist/lib/agents/providers.js +8 -2
  14. package/dist/lib/agents/providers.js.map +1 -1
  15. package/dist/lib/final-cta-box.js +22 -10
  16. package/dist/lib/final-cta-box.js.map +1 -1
  17. package/dist/lib/help-style.js +65 -0
  18. package/dist/lib/help-style.js.map +1 -0
  19. package/dist/lib/onboarding-state.js +9 -8
  20. package/dist/lib/onboarding-state.js.map +1 -1
  21. package/dist/lib/uninstall-plan.js +18 -1
  22. package/dist/lib/uninstall-plan.js.map +1 -1
  23. package/dist/lib/workspace-explainer.js +42 -111
  24. package/dist/lib/workspace-explainer.js.map +1 -1
  25. package/dist/lib/workspace-flow.js +4 -1
  26. package/dist/lib/workspace-flow.js.map +1 -1
  27. package/package.json +1 -1
  28. package/skills/claude-code/ritual/.ritual-bundle.json +3 -2
  29. package/skills/claude-code/ritual/SKILL.md +8 -0
  30. package/skills/claude-code/ritual/references/brief-verification-checklist.md +12 -6
  31. package/skills/claude-code/ritual/references/build-flow.md +485 -456
  32. package/skills/claude-code/ritual/references/cli-output-contract.md +111 -39
  33. package/skills/claude-code/ritual/references/lite-flow.md +494 -462
  34. package/skills/claude-code/ritual/references/resume-flow.md +1 -1
  35. package/skills/codex/ritual/.ritual-bundle.json +3 -2
  36. package/skills/codex/ritual/SKILL.md +8 -0
  37. package/skills/codex/ritual/references/brief-verification-checklist.md +12 -6
  38. package/skills/codex/ritual/references/build-flow.md +485 -456
  39. package/skills/codex/ritual/references/cli-output-contract.md +111 -39
  40. package/skills/codex/ritual/references/lite-flow.md +494 -462
  41. package/skills/codex/ritual/references/resume-flow.md +1 -1
  42. package/skills/cursor/ritual/.ritual-bundle.json +3 -2
  43. package/skills/cursor/ritual/SKILL.md +8 -0
  44. package/skills/cursor/ritual/references/brief-verification-checklist.md +12 -6
  45. package/skills/cursor/ritual/references/build-flow.md +485 -456
  46. package/skills/cursor/ritual/references/cli-output-contract.md +111 -39
  47. package/skills/cursor/ritual/references/lite-flow.md +494 -462
  48. package/skills/cursor/ritual/references/resume-flow.md +1 -1
  49. package/skills/gemini/ritual/.ritual-bundle.json +3 -2
  50. package/skills/gemini/ritual/SKILL.md +8 -0
  51. package/skills/gemini/ritual/references/brief-verification-checklist.md +12 -6
  52. package/skills/gemini/ritual/references/build-flow.md +485 -456
  53. package/skills/gemini/ritual/references/cli-output-contract.md +111 -39
  54. package/skills/gemini/ritual/references/lite-flow.md +494 -462
  55. package/skills/gemini/ritual/references/resume-flow.md +1 -1
  56. package/skills/kiro/ritual/.ritual-bundle.json +3 -2
  57. package/skills/kiro/ritual/SKILL.md +8 -0
  58. package/skills/kiro/ritual/references/brief-verification-checklist.md +12 -6
  59. package/skills/kiro/ritual/references/build-flow.md +485 -456
  60. package/skills/kiro/ritual/references/cli-output-contract.md +111 -39
  61. package/skills/kiro/ritual/references/lite-flow.md +494 -462
  62. package/skills/kiro/ritual/references/resume-flow.md +1 -1
  63. package/skills/vscode/ritual/.ritual-bundle.json +3 -2
  64. package/skills/vscode/ritual/SKILL.md +8 -0
  65. package/skills/vscode/ritual/references/brief-verification-checklist.md +12 -6
  66. package/skills/vscode/ritual/references/build-flow.md +485 -456
  67. package/skills/vscode/ritual/references/cli-output-contract.md +111 -39
  68. package/skills/vscode/ritual/references/lite-flow.md +494 -462
  69. package/skills/vscode/ritual/references/resume-flow.md +1 -1
  70. package/dist/lib/build-flow-explainer.js +0 -226
  71. package/dist/lib/build-flow-explainer.js.map +0 -1
  72. package/dist/lib/persona-picker.js +0 -171
  73. package/dist/lib/persona-picker.js.map +0 -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
@@ -116,8 +138,8 @@ When in doubt, prefer one blank line over none. The cost of a tiny gap is unnoti
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, `✓ Context Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)` on line 2. | Terminal scrollback has no persistent UI — the rail IS the anchor. |
120
- | **Mobile chat / narrow chat** | Compact one-line chip. `Ritual build · 2/6 Scope`. Optionally add a second line: `Done: Context · Next: Discovery`. | Six-stage rail wraps and looks noisy inside chat bubbles. |
141
+ | **CLI / terminal** (current default) | Full two-line rail. `Ritual build` on line 1, `● Job 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 · 2/6 Scope`. Optionally add a second line: `Done: Job, Scope · Next: Recommendations`. | Six-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:**
@@ -151,80 +173,106 @@ Soft rule of thumb: if the message is a top-level "here's where you are + what t
151
173
  Discovery — area 2 of 4: {matter.name}
152
174
  ```
153
175
 
154
- Or for per-recommendation review in Step 9:
176
+ Or for a single-recommendation drill view in Step 9:
155
177
 
156
178
  ```text
157
- Recommendations 3 of 7: {recommendation title}
179
+ Recommendations · R{N} {recommendation title}
158
180
  ```
159
181
 
160
182
  The chip's job is "you're still in this phase, this is which item of the series" — orientation without the full chrome.
161
183
 
184
+ **Forward-pointing CTAs (load-bearing):** every advancing option at a `[USER PAUSE]` gate must name its DESTINATION in user language — never a bare "to continue" / "to proceed". Two accepted shapes:
185
+
186
+ - inline parenthetical on the action line: `proceed (generate the {Deliverable})`
187
+ - spelled-out reply line: ``Reply `proceed` to frame the problem (sub-problems + problem statement), or …``
188
+
189
+ Canonical destinations (use these; don't improvise):
190
+
191
+ | Gate | Advancing token | Destination phrase |
192
+ |---|---|---|
193
+ | Job gate (0.7) | `proceed` | frame the problem (sub-problems + problem statement) |
194
+ | Problem frame (5) | `use` | review discovery questions |
195
+ | Suggested-12 landing (7.3.1) | `proceed` | run discovery with these 12 (commits the set; run confirmation follows) |
196
+ | Expert-walk summary (7.4) | `commit` | run discovery → recommendations (~a few minutes) |
197
+ | Run gate (8) | `run` | source answers → generate recommendations |
198
+ | Recommendations (9/9.1) | `proceed` | generate the {Deliverable} (the job's deliverable name from the rail) |
199
+ | Audit gate (9.6.1) | `proceed` | skip the audit and generate the {Deliverable} |
200
+ | Brief gate (10d) | `go` | implement in your agent |
201
+ | Plan handoff (11.0.5) | `ready` | generate the implementation plan |
202
+
203
+ `{Deliverable}` = the rail's stage-5 name (deliverable-named rail). The destination phrase, the rail's next stage, and what actually happens next must tell ONE story.
204
+
205
+ **Universal advance alias:** `proceed` is silently accepted at EVERY advancing gate, mapped to that gate's primary token (`use`, `run`, `commit`, `go`, `ready`, …) — the user only ever needs one word. It is NOT displayed as an extra option. Exception already specified elsewhere: at the discovery pick gate an ambiguous `proceed` means **accept shortlist**, never accept-all. `next` is NOT a universal alias — it has gate-local meaning in the discovery Area walk (expert mode).
206
+
162
207
  **Canonical stage table (single source of truth):**
163
208
 
164
209
  | Stage | Active during… |
165
210
  |--------------------|--------------------------------------------------------------------------------|
166
- | `Context` | Workspace selection, resume/start check, template, knowledge sources, code recon |
167
- | `Scope` | Problem frame + sub-problem generation/selection, until scope is locked |
211
+ | `Job` | The Step 0.7 Job gate server-side classification of the user's raw ask (`classify_work_item`) + the user's confirmation of the job to be done; active until the user proceeds |
212
+ | `Scope` | Problem frame + sub-problem generation/selection, until scope is locked; the silent grounding recon runs at the lock→create boundary |
168
213
  | `Discovery` | Exploration creation, discovery questions, answers, question picking, answer review |
169
- | `Recommendations` | Recommendation generation, review, admin/collaborator acceptance path |
170
- | `Build brief` | Requirements + build brief generation/review |
171
- | `Implementation (Your agent)` | Coding, branch/PR work, `sync_implementation` |
214
+ | `Recommendations` | Recommendation generation + review |
215
+ | `{Deliverable}` | **Named for the job's deliverable** — the `deliverableTemplate` returned at the Job gate (e.g. `Launch Brief`, `PRD`, `Service Build Brief`; `Build brief` for the generic `build-feature`). Covers requirements + deliverable generation/review. |
216
+ | `Implementation (Your agent)` | **Development-function jobs ONLY.** Coding, branch/PR work, `sync_implementation`. Non-development jobs (e.g. `create-launch-brief`) OMIT this stage — their rail has FIVE stages and ends at the deliverable. |
172
217
 
173
- Note that the FIRST rail stage is `Context`, not `Recon`. `Context` is broader — workspace pick, resume check, template choice, knowledge sources, AND code recon all live there. Use `Code recon` as the SECTION title inside the stage when the active work is repo inspection (see `references/build-flow.md` § Step 3 examples), not as the rail label. There's also a naming hazard: `/ritual recon` was retired as a command surface, so reusing `Recon` at the rail level could imply it's a separate command.
218
+ The FIRST rail stage is `Job` the Step 0.7 Job gate (classification + confirmation of the job to be done; on resume paths the gate is skipped and the rail opens with `Job` already `✓`). **There is no `Context` stage** — workspace pick, resume/start check, and template resolution all happen as **silent plumbing inside Scope**, never as a visible rail stage. The grounding **code recon** runs silently AFTER the frame locks (build-flow § Step 5.7) and is not surfaced by default; 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
219
 
175
220
  **Canonical ordering (only the active marker moves):**
176
221
 
177
222
  ```
178
- Context → Scope → Discovery → Recommendations → Build brief → Implementation (Your agent)
223
+ Job → Scope → Discovery → Recommendations → {Deliverable} → Implementation (Your agent — development jobs only)
179
224
  ```
180
225
 
226
+ The rail is **deliverable-named and function-shaped** (2026-06-11): stage 5 carries the job's own deliverable name, and stage 6 exists only for development-function jobs. The timeline is the promise — a Launch Brief job promises a Launch Brief, not a code handoff. Before the job is confirmed (the Job gate itself), render the PROPOSED classification's deliverable; a correction updates the rail on the next render.
227
+
181
228
  - Completed stages: `✓`
182
229
  - Current stage: `●`
183
230
  - Future stages: `○`
184
231
 
185
- **Build rail spec (`progressHeader(stage)`) — CLI / terminal rendering:**
232
+ **Build rail spec (`progressHeader(stage, jtbd)`) — CLI / terminal rendering.** `{Deliverable}` below = the job's `deliverableTemplate`; the `Implementation` stage renders only for development-function jobs.
186
233
 
187
- ```text
188
- progressHeader("context") =>
189
- Ritual build
190
- ● Context ○ Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
234
+ Development job (e.g. `build-backend-service` → `Service Build Brief`; generic `build-feature` → `Build brief`):
191
235
 
192
- progressHeader("scope") =>
236
+ ```text
237
+ progressHeader("job") =>
193
238
  Ritual build
194
- Context Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
239
+ Job Scope ○ Discovery ○ Recommendations ○ {Deliverable} ○ Implementation (Your agent)
195
240
 
196
- progressHeader("discovery") =>
241
+ progressHeader("deliverable") =>
197
242
  Ritual build
198
- Context ✓ Scope Discovery Recommendations Build brief ○ Implementation (Your agent)
243
+ Job ✓ Scope Discovery Recommendations {Deliverable} ○ Implementation (Your agent)
199
244
 
200
- progressHeader("recommendations") =>
245
+ progressHeader("implementation") =>
201
246
  Ritual build
202
- Context ✓ Scope ✓ Discovery Recommendations Build brief Implementation (Your agent)
247
+ Job ✓ Scope ✓ Discovery Recommendations {Deliverable} Implementation (Your agent)
248
+ ```
203
249
 
204
- progressHeader("build-brief") =>
205
- Ritual build
206
- ✓ Context ✓ Scope ✓ Discovery ✓ Recommendations ● Build brief ○ Implementation (Your agent)
250
+ Non-development job (e.g. `create-launch-brief` → `Launch Brief`) — FIVE stages, no Implementation:
207
251
 
208
- progressHeader("implementation") =>
252
+ ```text
253
+ progressHeader("deliverable") =>
209
254
  Ritual build
210
- Context ✓ Scope ✓ Discovery ✓ Recommendations ✓ Build brief Implementation (Your agent)
255
+ Job ✓ Scope ✓ Discovery ✓ Recommendations ● Launch Brief
211
256
  ```
212
257
 
258
+ Intermediate stages (scope/discovery/recommendations) advance the markers identically in both shapes.
259
+
213
260
  **Compact chip spec — mobile chat / narrow chat:**
214
261
 
215
262
  ```text
216
- compactChip("context") => Ritual build · 1/6 Context
217
- compactChip("scope") => Ritual build · 2/6 Scope
218
- compactChip("discovery") => Ritual build · 3/6 Discovery
219
- compactChip("recommendations")=> Ritual build · 4/6 Recommendations
220
- compactChip("build-brief") => Ritual build · 5/6 Build brief
221
- compactChip("implementation")=> Ritual build · 6/6 Implementation (Your agent)
263
+ development job (N/6): non-development job (N/5):
264
+ compactChip("job") => Ritual build · 1/6 Job | 1/5 Job
265
+ compactChip("scope") => Ritual build · 2/6 Scope | 2/5 Scope
266
+ compactChip("discovery") => Ritual build · 3/6 Discovery | 3/5 Discovery
267
+ compactChip("recommendations")=> Ritual build · 4/6 Recommendations | 4/5 Recommendations
268
+ compactChip("deliverable") => Ritual build · 5/6 {Deliverable} | 5/5 {Deliverable}
269
+ compactChip("implementation") => Ritual build · 6/6 Implementation (Your agent) (dev only)
222
270
  ```
223
271
 
224
272
  Optional second line at phase transitions, resumes, and decision gates:
225
273
 
226
274
  ```text
227
- Done: Context · Next: Discovery
275
+ Done: Job, Scope · Next: Recommendations
228
276
  ```
229
277
 
230
278
  **Rich-app spec — persistent stepper:**
@@ -258,16 +306,40 @@ When you need to wait for async server work (requirements generation, build brie
258
306
 
259
307
  This rule applies to: Step 9.5 (`get_requirement_set_status`), Step 10b (`get_build_brief_status` on timeout), and any future status-poll surface.
260
308
 
309
+ <!-- skill-options:no-gate-change: pulse render gains a delta + next-lift line; no decision gate, option, or pause is added or changed -->
310
+
261
311
  #### Inline pulses — surface reasoning readiness climbing as context debt drops
262
312
 
263
313
  After **Steps 3, 5, 7.4, 8, 9, and 10**, emit a one-line **context pulse** showing how the score moved. This is the visible encouragement loop — the user watches **reasoning readiness** climb (or equivalently, **context debt** drop) with each step instead of just feeling like the agent is asking for more inputs.
264
314
 
265
315
  The pulse rule and visual specs live in the [§ /ritual context-pulse](#ritual-context-pulse) section below — see *Step CP5 — visual modes*. TL;DR:
266
316
 
267
- - **Compact (single line)** is the default. Use the full capitalized labels `Reasoning Readiness` and `Context Debt` NOT lowercase `readiness` / `debt`:
268
- - `Pulse: Reasoning Readiness 72% · Context Debt 28% · +24% (decision resolution)`
269
- - **Full (with bars + Reasoning Readiness / Context Debt / Context Surface labels)** when crossing a state-tier boundary, jumping ≥15%, or regressing
270
- - The pulse line goes BEFORE the existing "next step" prompt for that step — it's an additive line, not a replacement
317
+ The pulse has TWO parts, and they sit in DIFFERENT places — the score at the top of the message (status: where you are), and the **lift bridge** immediately above the action line (motivation: why your next move matters).
318
+
319
+ ```text
320
+ Pulse: Reasoning Readiness 58% · Context Debt 42% · +3% (scope locked)
321
+
322
+ {…the step's content…}
323
+
324
+ Most of the gap left is unsettled design decisions — that's exactly what
325
+ the next step, discovery, resolves.
326
+ Reply proceed (run discovery → recommendations) · expert · pause
327
+ ```
328
+
329
+ - **Score line** (top of the message). Full capitalized labels — `Reasoning Readiness` and `Context Debt`, NOT lowercase. The **`· +N%` delta is MANDATORY** on every pulse after the first (the first pulse has no prior, so it shows just the baseline + reason). The delta is the visible-progress signal — never drop it. Show `+0%` honestly if a step didn't move the score, and `−N%` on a regression (rare; render full then).
330
+ - **Lift bridge** (ONE sentence, immediately ABOVE the action/CTA line — NOT under the score). This is the load-bearing piece: it turns the score into a reason to proceed. Three requirements:
331
+ 1. **Plain language for the gap — NEVER the internal dimension name.** The lowest dimension from `score_context_pulse`'s breakdown picks the message, but the user sees what it MEANS, not the label:
332
+ | lowest dimension (internal) | what the user reads (plain) |
333
+ |---|---|
334
+ | `decisionResolution` | the design decisions aren't settled yet |
335
+ | `repoGrounding` | the plan isn't grounded in your code yet |
336
+ | `assumptionSafety` | some assumptions are still unverified |
337
+ | `featureClarity` | what exactly to build is still fuzzy |
338
+ 2. **Name the NEXT STEP as the resolver, explicitly.** The bridge must make clear that the action the user is about to take is what closes the gap — `that's exactly what the next step, discovery, resolves` / `code recon next grounds it` / `the build brief locks those down`. The bridge and the forward-CTA below it name the SAME move — one story.
339
+ 3. **Terse + declarative** — no `now let me help you improve this` assistant/affect register (`cli-experience-tenets.md`).
340
+ On the LAST scoreable step (Step 10, implementation-ready), there's no further lift — the bridge becomes the readiness statement: `The brief is your build path — implement when ready.`
341
+ - **Full (with bars + Reasoning Readiness / Context Debt / Context Surface labels)** when crossing a state-tier boundary, jumping ≥15%, or regressing. Full mode keeps the same `+N%` delta on the score line and the same lift bridge above the CTA.
342
+ - The score line goes near the top of the step's message; the lift bridge goes right before the action line. Both are additive, not replacements.
271
343
  - Prefer `mcp__ritual__score_context_pulse` (one canonical server-side call, persisted for trend reporting); fall back to deterministic agent-side counts only if the tool errors. No LLM call in the hot path either way.
272
344
 
273
345
  **Why full labels (load-bearing):** Users read `28% debt` as a vague accounting number. They read `Context Debt 28%` as a named concept with weight — the same name they'd see in `/ritual context-pulse`'s full view, in the score breakdown, in the docs. Consistency across compact and full forms means the user doesn't have to translate.
@@ -319,7 +391,7 @@ For no-arg `/ritual build` with zero explorations, do not frame `/ritual context
319
391
 
320
392
  ```text
321
393
  Ritual build
322
- Context Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
394
+ Job Scope ○ Discovery ○ Recommendations ○ Build brief ○ Implementation (Your agent)
323
395
 
324
396
  Using workspace: {workspaceName}.
325
397