@ritualai/cli 0.11.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/doctor.js +59 -23
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.js +33 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.js +114 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/agents/providers.js +44 -4
- package/dist/lib/agents/providers.js.map +1 -1
- package/dist/lib/memory-update.js +158 -0
- package/dist/lib/memory-update.js.map +1 -0
- package/dist/lib/uninstall-plan.js +102 -0
- package/dist/lib/uninstall-plan.js.map +1 -0
- package/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +2 -2
- package/skills/claude-code/ritual/SKILL.md +14 -11
- package/skills/claude-code/ritual/manifest.json +0 -5
- package/skills/claude-code/ritual/references/async-polling.md +5 -5
- package/skills/claude-code/ritual/references/build-flow.md +513 -494
- package/skills/claude-code/ritual/references/change-preflight.md +81 -0
- package/skills/claude-code/ritual/references/cli-output-contract.md +2 -2
- package/skills/claude-code/ritual/references/context-pulse-flow.md +0 -1
- package/skills/claude-code/ritual/references/lite-flow.md +2781 -0
- package/skills/claude-code/ritual/references/scoring-fallback.md +1 -1
- package/skills/codex/ritual/.ritual-bundle.json +2 -2
- package/skills/codex/ritual/SKILL.md +14 -11
- package/skills/codex/ritual/manifest.json +0 -5
- package/skills/codex/ritual/references/async-polling.md +5 -5
- package/skills/codex/ritual/references/build-flow.md +513 -494
- package/skills/codex/ritual/references/change-preflight.md +81 -0
- package/skills/codex/ritual/references/cli-output-contract.md +2 -2
- package/skills/codex/ritual/references/context-pulse-flow.md +0 -1
- package/skills/codex/ritual/references/lite-flow.md +2781 -0
- package/skills/codex/ritual/references/scoring-fallback.md +1 -1
- package/skills/cursor/ritual/.ritual-bundle.json +2 -2
- package/skills/cursor/ritual/SKILL.md +14 -11
- package/skills/cursor/ritual/manifest.json +0 -5
- package/skills/cursor/ritual/references/async-polling.md +5 -5
- package/skills/cursor/ritual/references/build-flow.md +513 -494
- package/skills/cursor/ritual/references/change-preflight.md +81 -0
- package/skills/cursor/ritual/references/cli-output-contract.md +2 -2
- package/skills/cursor/ritual/references/context-pulse-flow.md +0 -1
- package/skills/cursor/ritual/references/lite-flow.md +2781 -0
- package/skills/cursor/ritual/references/scoring-fallback.md +1 -1
- package/skills/gemini/ritual/.ritual-bundle.json +2 -2
- package/skills/gemini/ritual/SKILL.md +14 -11
- package/skills/gemini/ritual/manifest.json +0 -5
- package/skills/gemini/ritual/references/async-polling.md +5 -5
- package/skills/gemini/ritual/references/build-flow.md +513 -494
- package/skills/gemini/ritual/references/change-preflight.md +81 -0
- package/skills/gemini/ritual/references/cli-output-contract.md +2 -2
- package/skills/gemini/ritual/references/context-pulse-flow.md +0 -1
- package/skills/gemini/ritual/references/lite-flow.md +2781 -0
- package/skills/gemini/ritual/references/scoring-fallback.md +1 -1
- package/skills/kiro/ritual/.ritual-bundle.json +2 -2
- package/skills/kiro/ritual/SKILL.md +14 -11
- package/skills/kiro/ritual/manifest.json +0 -5
- package/skills/kiro/ritual/references/async-polling.md +5 -5
- package/skills/kiro/ritual/references/build-flow.md +513 -494
- package/skills/kiro/ritual/references/change-preflight.md +81 -0
- package/skills/kiro/ritual/references/cli-output-contract.md +2 -2
- package/skills/kiro/ritual/references/context-pulse-flow.md +0 -1
- package/skills/kiro/ritual/references/lite-flow.md +2781 -0
- package/skills/kiro/ritual/references/scoring-fallback.md +1 -1
- package/skills/vscode/ritual/.ritual-bundle.json +2 -2
- package/skills/vscode/ritual/SKILL.md +14 -11
- package/skills/vscode/ritual/manifest.json +0 -5
- package/skills/vscode/ritual/references/async-polling.md +5 -5
- package/skills/vscode/ritual/references/build-flow.md +513 -494
- package/skills/vscode/ritual/references/change-preflight.md +81 -0
- package/skills/vscode/ritual/references/cli-output-contract.md +2 -2
- package/skills/vscode/ritual/references/context-pulse-flow.md +0 -1
- package/skills/vscode/ritual/references/lite-flow.md +2781 -0
- package/skills/vscode/ritual/references/scoring-fallback.md +1 -1
- package/skills/claude-code/ritual/references/discovery-classification.md +0 -175
- package/skills/codex/ritual/references/discovery-classification.md +0 -175
- package/skills/cursor/ritual/references/discovery-classification.md +0 -175
- package/skills/gemini/ritual/references/discovery-classification.md +0 -175
- package/skills/kiro/ritual/references/discovery-classification.md +0 -175
- package/skills/vscode/ritual/references/discovery-classification.md +0 -175
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Change pre-flight — restate-before-mutate
|
|
2
|
+
|
|
3
|
+
When the user asks to **change or add** something via a free-text instruction, the agent has to
|
|
4
|
+
*translate* that instruction into a tool call (a `change_prompt`, an anti-goal text, etc.). That
|
|
5
|
+
translation is where intent gets lost: a misread re-rolls the artifact in the wrong direction, and
|
|
6
|
+
the user only finds out *after* the regeneration. This protocol puts a confirmation **before** the
|
|
7
|
+
mutating call: the agent restates what it heard and shows the exact request it's about to send, and
|
|
8
|
+
waits for a `yes`.
|
|
9
|
+
|
|
10
|
+
This is **not** the forward-flow confirmation theatre the SKILL deliberately removed (template-pick,
|
|
11
|
+
sub-problem auto-accept, etc.). Those gated the *default happy path*. This gate fires **only** on an
|
|
12
|
+
explicit, free-text *change/add* request — where the input is ambiguous by nature and a read-back is
|
|
13
|
+
genuinely protective.
|
|
14
|
+
|
|
15
|
+
## When it fires
|
|
16
|
+
|
|
17
|
+
Before **every** call to a tool that mutates an artifact from a free-text user request:
|
|
18
|
+
|
|
19
|
+
| User asks (free text) | Tool the agent is about to call |
|
|
20
|
+
|---|---|
|
|
21
|
+
| "rethink / change the sub-problems", "show me other angles" | `mcp__ritual__refine_considerations` |
|
|
22
|
+
| "tighten / broaden / reframe / drop X from the scope" | `mcp__ritual__refine_problem_statement` |
|
|
23
|
+
| "add an anti-goal", "don't touch X", "keep Y out of scope" | `mcp__ritual__set_anti_goals` |
|
|
24
|
+
|
|
25
|
+
**Always fire — no exceptions for "obvious" requests.** Even a one-word `tighten` or `broaden` gets
|
|
26
|
+
the restate. The user chose maximum safety here: a one-word instruction is exactly where the agent is
|
|
27
|
+
most tempted to guess a direction, so it's still confirmed.
|
|
28
|
+
|
|
29
|
+
**Does NOT fire on the forward CTAs** — `use` / `run` / `accept shortlist` / `proceed` and their
|
|
30
|
+
aliases already have their own gates. Double-gating those is the theatre we removed. This protocol is
|
|
31
|
+
*only* for the mutate-from-free-text tools above.
|
|
32
|
+
|
|
33
|
+
## Hard pause — even in auto-mode
|
|
34
|
+
|
|
35
|
+
This is a real `[USER PAUSE]`. In auto-accept / bypass-permissions mode it **still stops and waits**
|
|
36
|
+
for an actual `yes`. Mutations are where a misread is most costly, so the agent never auto-applies a
|
|
37
|
+
change on the user's behalf — auto-mode collapses *forward* pauses, not this one. Per the SKILL
|
|
38
|
+
preamble: never infer, never default, never press on without a real reply.
|
|
39
|
+
|
|
40
|
+
## The template
|
|
41
|
+
|
|
42
|
+
Render this block, then **stop and wait**:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Got it — you want to {specific restatement of the change, in the user's own terms}.
|
|
46
|
+
|
|
47
|
+
Here's what I'll do: {plain-English effect on the artifact}. I'll ask Ritual to
|
|
48
|
+
{refine the sub-problems / refine the problem frame / add this anti-goal} with this instruction:
|
|
49
|
+
|
|
50
|
+
→ "{the EXACT change_prompt / anti-goal text the agent will send the tool}"
|
|
51
|
+
|
|
52
|
+
Apply this? Reply `yes`, or tell me what to adjust.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Rules for the block:
|
|
56
|
+
- **Restate specifically.** "drop the observability sub-problem and add a rollout-safety one" — never
|
|
57
|
+
a generic "you want to make a change." If the agent can't restate the request specifically, it
|
|
58
|
+
doesn't understand it yet: ask a clarifying question instead of guessing a `change_prompt`.
|
|
59
|
+
- **Show the literal request.** The `→ "..."` line is the *exact* string going into the tool
|
|
60
|
+
(`change_prompt` verbatim, or the anti-goal `text`). This is the whole point — the user is
|
|
61
|
+
validating the instruction the model will actually send, not a paraphrase of it.
|
|
62
|
+
- **One confirm token.** `yes` applies. Treat `y`, `apply`, `go`, `do it` as aliases; do not display
|
|
63
|
+
them.
|
|
64
|
+
|
|
65
|
+
## On the user's reply
|
|
66
|
+
|
|
67
|
+
- **`yes`** → make the tool call exactly as shown. Do not silently alter the `change_prompt` after
|
|
68
|
+
confirmation.
|
|
69
|
+
- **An adjustment** ("no, keep observability, just add rollout-safety") → fold it into the
|
|
70
|
+
`change_prompt`, re-render the block **once** with the revised instruction, and wait again. This is
|
|
71
|
+
a single re-confirm, **not** an open loop — after the second render, a `yes` applies and any further
|
|
72
|
+
change is treated as a fresh request (new restate).
|
|
73
|
+
- **`pause` / `stop`** → honor it; do not call the tool.
|
|
74
|
+
|
|
75
|
+
## Note — "add a question or matter that wasn't there"
|
|
76
|
+
|
|
77
|
+
There is currently **no MCP tool** to add a *net-new* discovery question or matter that the
|
|
78
|
+
`suggest_discovery_questions` set didn't produce — the user can only accept from the suggested set or
|
|
79
|
+
re-run suggestion with guidance. When that capability ships (a tool to author a custom
|
|
80
|
+
question/matter), it is a mutate-from-free-text action and MUST route through this same pre-flight.
|
|
81
|
+
Until then, this protocol covers the three tools listed above.
|
|
@@ -61,7 +61,7 @@ Do not ask for confirmation after safe defaults. State the default and give a li
|
|
|
61
61
|
|
|
62
62
|
**[USER PAUSE] policy:** Pause only when the next step would create, approve, delete, implement, accept meaningful cost/time, choose between materially different paths, or resolve ambiguity that code cannot answer. Do not pause for status-only steps, safe defaults, internal recon, silent checks, or no-data outcomes.
|
|
63
63
|
|
|
64
|
-
**Internal step labels:** Do not expose decimal workflow labels like `Step 1.5`, `Step 7.
|
|
64
|
+
**Internal step labels:** Do not expose decimal workflow labels like `Step 1.5`, `Step 7.3.1`, or MCP/tool-step names in user-facing prompts. They are for the skill, not the CLI. Use natural phase language instead: `checking existing explorations`, `choosing a template`, `code recon`, `question picking`, `build brief`, `admin review`, `implementation`, or `sync`. Step numbers are acceptable only in compact progress headings when they help orient the user; avoid them in choice prompts, error messages, and user-facing examples inside this skill.
|
|
65
65
|
|
|
66
66
|
**Pulse tier labels:** Do not expose raw context-pulse tier identifiers (`RAW_ASK`, `UNDER_SPECIFIED`, `EXPLORED`, `READY`, etc.) in user-facing copy. They are scoring-engine internals, not CLI vocabulary. Translate every appearance into natural-language framing keyed to the phase:
|
|
67
67
|
|
|
@@ -283,7 +283,7 @@ Use engineer-facing language in CLI output:
|
|
|
283
283
|
|---|---|
|
|
284
284
|
| `problemStatement` | scope |
|
|
285
285
|
| `consideration` | sub-problem |
|
|
286
|
-
| `Step 1.5`, `Step 7.
|
|
286
|
+
| `Step 1.5`, `Step 7.3.1`, `Step CP3` | natural labels such as "existing work check", "question picking", "build brief" |
|
|
287
287
|
| raw recon dump | recon digest |
|
|
288
288
|
| "I inferred…" | direct default + override path |
|
|
289
289
|
| **`decisions` / `decision` as a label or count** (e.g. "5 decisions logged", "decision list", "the N decisions you made") | Frame as **the implementation itself**. Recommendations get *implemented*; the artifacts of that implementation are surfaced inline (specific choices, deferrals, files touched) rather than as a labeled count. The underlying API parameter is still `decisions[]`, but the user sees "your implementation" / "what you implemented" / inline content. |
|
|
@@ -278,7 +278,6 @@ You're past the recommendation-ready threshold. Generate the brief? (y/N)
|
|
|
278
278
|
|
|
279
279
|
Render rules:
|
|
280
280
|
- **Always show reasoning readiness + context debt at the top** (dual framing — the product pitch is about debt going down, but the primary score is the readiness one).
|
|
281
|
-
- **`Context deferred` line is conditional** — only shown when deferred > 0 (CLI Tenet #6 — silence on no-data). Reflects deliberate phase-2 classification from Step 7.4.5; NOT counted as a liability.
|
|
282
281
|
- **State-tier (Context surface) is a separate explicit line** in the full pulse, not folded into the readiness number — so the user can see both the percentage AND its qualitative meaning at a glance.
|
|
283
282
|
- **Bars are 10-cell `▓` / `░`**, rounded to the nearest 10%.
|
|
284
283
|
- **Dimensions printed in fixed weight order.** For `dimensionsVersion=2` (current canonical): Feature clarity → Decision resolution → Code grounding → Reference grounding → Assumption load → Validation readiness. For `dimensionsVersion=1` (legacy back-compat): Feature clarity → Decision resolution → Repo grounding → Assumption safety.
|