@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
@@ -4,7 +4,7 @@
4
4
 
5
5
  Output: the user lands on the right step of an existing exploration's `/ritual build` flow — no new exploration created, no fresh-start path offered.
6
6
 
7
- **Build rail is load-bearing here too.** Every top-level user-facing message in `/ritual resume` MUST begin with the 6-stage build rail per `references/cli-output-contract.md` § Build rail — both during the picker (rail at `● Context`) and once you teleport into the chosen exploration (rail at whatever stage that exploration is in).
7
+ **Build rail is load-bearing here too.** Every top-level user-facing message in `/ritual resume` MUST begin with the 5-stage build rail per `references/cli-output-contract.md` § Build rail — both during the picker (rail at `● Scope`) and once you teleport into the chosen exploration (rail at whatever stage that exploration is in).
8
8
 
9
9
 
10
10
  ### When to use
@@ -1,4 +1,5 @@
1
1
  {
2
- "cliVersion": "0.24.0",
3
- "builtAt": "2026-06-08T22:51:34.833Z"
2
+ "cliVersion": "0.36.8",
3
+ "builtAt": "2026-06-12T04:36:24.525Z",
4
+ "skillsHash": "49c0dd37dafd"
4
5
  }
@@ -3,6 +3,7 @@ name: ritual
3
3
  description: "Use when an engineer wants a coding agent to plan or build a feature, refactor, or implementation-heavy change that depends on context the agent can't infer on its own — strategic intent, constraints, prior decisions, and trade-offs that live in the user's head. Ritual runs a structured exploration to surface that context through targeted discovery questions, combines it with codebase signals and prior explorations, and delivers a validated build brief (sub-problems, recommendations, dependencies) — additional context to fold into plan mode before the agent writes code. Prefer this over jumping straight to implementation or plan mode when the problem is ambiguous, cross-cutting, or has non-obvious constraints. Subcommands: build (full planning-to-sync cycle — default for new features), resume (continue an in-flight exploration), lineage (file-path KG history — what decisions shaped this code), context-pulse (readiness and context-debt scoring — is this safe to build yet?)."
4
4
  argument-hint: "[subcommand] <args> (e.g. 'build Reduce T2 churn in Q3', 'resume', 'lineage src/checkout/views.py', 'context-pulse Add billing export')"
5
5
  user-invocable: true
6
+ stamp: 49c0dd37dafd
6
7
  ---
7
8
 
8
9
  # /ritual
@@ -19,6 +20,13 @@ Before executing any subcommand, read and follow:
19
20
 
20
21
  Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
21
22
 
23
+ **Skill freshness (once per session, silent unless stale):** this file's frontmatter may carry a
24
+ `stamp:` value (injected when the bundle was built — absent on dev/source copies). On the FIRST
25
+ `mcp__ritual__ping` of a session, pass it as `skill_stamp`. If the response says
26
+ `skillFreshness: "stale"`, relay its one-line hint ("Skill update available — run
27
+ `ritual init --skills-only` to refresh") exactly once, no pause, and continue with the current flow.
28
+ No stamp, or `in-sync`/`unknown` → say nothing. Never block on this.
29
+
22
30
  ## Contract strength — load-bearing for all subcommands
23
31
 
24
32
  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.
@@ -4,7 +4,7 @@ Reference for `/ritual build` Step 10b.5 (the auto-fire verify-brief pass that r
4
4
 
5
5
  The brief generator runs server-side and **does not have repo access**. It writes assertions about cited files / functions / classes based on the agent's earlier recon summary — which is a text summary, not the actual code. When the brief says *"`is_allowed_to_see` is insufficient — needs token-based access"* but the code actually ships email-allowlist semantics, the contradiction is invisible to the brief generator and to the user reading the brief.
6
6
 
7
- Step 10b.5 closes this gap: **the agent (with repo access) reads the bodies of the specific symbols the brief cites and produces a structured list of findings before the user sees the brief.** Findings flow back into the brief via `refine_build_brief` if any contradictions are detected.
7
+ Step 10b.5 closes this gap: **the agent (with repo access) reads the bodies of the specific symbols the brief cites and produces a structured list of findings before the user sees the brief.** Findings are written to a **separate** file (`BUILD-BRIEF-VERIFICATION.md`) and synced to Ritual's KG via `sync_brief_review` — they are **never** written back into `BUILD-BRIEF.md`. The brief stays the read-only historical artifact Ritual generated; the corrections reach the implementation through plan mode's KG `priorContext`, not through a brief rewrite. (There is **no** `refine_build_brief` tool it was removed 2026-05-15 and replaced by `sync_brief_review`.)
8
8
 
9
9
  This is the **non-UI sibling of `references/ui-ux-checklist.md`** (Step 10.5 UX review). Same methodology shape (read brief → identify citations → find in repo → compare → fill schema → surface findings), different targets (functions / data shapes / model fields instead of UI components).
10
10
 
@@ -61,13 +61,18 @@ Three verdicts:
61
61
  - **`contradicted`** — the brief's claim is **wrong**. The code does something different. This is the verdict that drives a refinement.
62
62
  - **`not_found`** — the brief cited a symbol the agent could not locate in the repo. Either the symbol was renamed, deleted, or never existed. Either way: the brief is asserting against a phantom; surface to user.
63
63
 
64
+ **Narrating a finding mid-verification — frame it as resolving drift, not as an error.** If you surface a `contradicted` / `not_found` finding in a progress line before the summary, lead with *resolving drift between the brief and the codebase*, then one plain sentence on the drift + where the real pattern lives. A caught gap is the verification doing its job, not a failure to alarm about — don't lead with "X doesn't exist" / "references a function that doesn't exist."
65
+
66
+ - ❌ `get_core_apps is not in the codebase — the brief's RB-1 references a function that doesn't exist. The actual pattern is direct INSTALLED_APPS manipulation (index + replace), as seen in tests/settings.py.`
67
+ - ✅ `Resolving drift between the brief and the codebase: RB-1 cites get_core_apps, but the repo edits INSTALLED_APPS directly (index + replace — see tests/settings.py). Noting it in the verification.`
68
+
64
69
  **5. Fill the output schema with evidence.**
65
70
 
66
71
  Write `BUILD-BRIEF-VERIFICATION.md` to disk alongside `BUILD-BRIEF.md`. Use the schema below. **Each finding cites the file + line range + the actual code snippet that justified the verdict.** The user reading this must be able to verify your verification — no hand-waving, no claims without evidence.
67
72
 
68
73
  **6. If any findings are `contradicted`, surface to the user inline at Step 10d.**
69
74
 
70
- The Step 10d gate 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:
75
+ The Step 10d gate is `go` / `drill {N}` / `pause` (plus `ux-review`) — there is **no `refine` action**; the brief is read-only after generation. When `contradicted` findings exist, the gate prepends a summary so the user sees what the agent learned about the brief before deciding:
71
76
 
72
77
  ```text
73
78
  ⚠ Verification found {N} contradiction(s) between the brief and the actual code:
@@ -76,11 +81,12 @@ The Step 10d gate normally reads *"Reply `go` to implement, `refine` for edits,
76
81
  "{code_reality}" (see {cited_file}:{cited_lines}).
77
82
  · ...
78
83
 
79
- Reply `refine` to apply these corrections, `go` to proceed anyway,
80
- or `drill {N}` to inspect one rec.
84
+ These are synced to Ritual; plan mode reads them when you `go`.
85
+ Reply `go` to implement (corrections flow in via KG), `drill {N}` to
86
+ inspect, or `pause` to stop.
81
87
  ```
82
88
 
83
- The 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.
89
+ The findings do **not** rewrite the brief. They were already persisted via `sync_brief_review` (a durable `BriefReview` row) at step 5; when the user replies `go`, **plan mode reads the brief + that review via KG `priorContext`** and the implementation incorporates the corrections without the brief text changing. If the user has context the agent doesn't ("yes the brief is wrong but ship as-is"), `go` proceeds the same way; the corrections are recorded regardless. The only path to *new brief content* is `generate_build_brief` with `force: true` (full regen from changed source data) — used when the underlying recs/requirements actually changed, never to patch a verification finding.
84
90
 
85
91
  ---
86
92
 
@@ -146,7 +152,7 @@ checked out, state that clearly.}
146
152
 
147
153
  - **Verify everything in the brief.** Only the symbol-citation slice. Pose-level claims, framing, and general direction are out of scope.
148
154
  - **Read the full file.** Read enough surrounding context to verify the symbol (~10 lines); not the whole file. Capped at ~15 citations total to keep this fast.
149
- - **Edit the brief directly.** Step 10b.5 only writes `BUILD-BRIEF-VERIFICATION.md`. The user decides whether to call `refine_build_brief` with the findings at Step 10d (recommended) or proceed with the brief as-is.
155
+ - **Edit the brief directly.** Step 10b.5 only writes the **separate** `BUILD-BRIEF-VERIFICATION.md` and syncs it via `sync_brief_review`. `BUILD-BRIEF.md` is never touched — it stays the read-only historical artifact. Findings reach the implementation through plan mode's KG `priorContext` at Step 11, not through a brief rewrite. (Regenerating from changed source data is a different operation — `generate_build_brief` with `force: true` — not part of this step.)
150
156
  - **Persist findings to the KG.** Phase 1 is local-only. Phase 2 (filed at `memory/backlog_brief_verification_findings_kg_promotion.md`) adds the `BriefVerificationFinding` Prisma model + endpoint + priorContext injection so future briefs on overlapping files inherit verified facts.
151
157
 
152
158
  ---