@ritualai/cli 0.36.22 → 0.36.28
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/build.js +5 -0
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/init.js +10 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/lib/pat-store.js +106 -35
- package/dist/lib/pat-store.js.map +1 -1
- package/dist/lib/update-notice.js +26 -0
- package/dist/lib/update-notice.js.map +1 -0
- package/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +3 -3
- package/skills/claude-code/ritual/SKILL.md +1 -1
- package/skills/claude-code/ritual/references/build-flow.md +24 -11
- package/skills/claude-code/ritual/references/cli-output-contract.md +4 -3
- package/skills/claude-code/ritual/references/lite-flow.md +25 -12
- package/skills/codex/ritual/.ritual-bundle.json +3 -3
- package/skills/codex/ritual/SKILL.md +1 -1
- package/skills/codex/ritual/references/build-flow.md +24 -11
- package/skills/codex/ritual/references/cli-output-contract.md +4 -3
- package/skills/codex/ritual/references/lite-flow.md +25 -12
- package/skills/cursor/ritual/.ritual-bundle.json +3 -3
- package/skills/cursor/ritual/SKILL.md +1 -1
- package/skills/cursor/ritual/references/build-flow.md +24 -11
- package/skills/cursor/ritual/references/cli-output-contract.md +4 -3
- package/skills/cursor/ritual/references/lite-flow.md +25 -12
- package/skills/gemini/ritual/.ritual-bundle.json +3 -3
- package/skills/gemini/ritual/SKILL.md +1 -1
- package/skills/gemini/ritual/references/build-flow.md +24 -11
- package/skills/gemini/ritual/references/cli-output-contract.md +4 -3
- package/skills/gemini/ritual/references/lite-flow.md +25 -12
- package/skills/kiro/ritual/.ritual-bundle.json +3 -3
- package/skills/kiro/ritual/SKILL.md +1 -1
- package/skills/kiro/ritual/references/build-flow.md +24 -11
- package/skills/kiro/ritual/references/cli-output-contract.md +4 -3
- package/skills/kiro/ritual/references/lite-flow.md +25 -12
- package/skills/vscode/ritual/.ritual-bundle.json +3 -3
- package/skills/vscode/ritual/SKILL.md +1 -1
- package/skills/vscode/ritual/references/build-flow.md +24 -11
- package/skills/vscode/ritual/references/cli-output-contract.md +4 -3
- package/skills/vscode/ritual/references/lite-flow.md +25 -12
|
@@ -307,6 +307,7 @@ When you need to wait for async server work (requirements generation, build brie
|
|
|
307
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.
|
|
308
308
|
|
|
309
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
|
+
<!-- skill-options:no-gate-change: pulse delta now renders as a Context Debt directional drop (Context Debt N% ↓M%) instead of a bare · +N%, so the movement reads as debt going down; render-only, no gate/option/pause change -->
|
|
310
311
|
|
|
311
312
|
#### Inline pulses — surface reasoning readiness climbing as context debt drops
|
|
312
313
|
|
|
@@ -319,11 +320,11 @@ The pulse rule and visual specs live in the [§ /ritual context-pulse](#ritual-c
|
|
|
319
320
|
```text
|
|
320
321
|
{…the step's content…}
|
|
321
322
|
|
|
322
|
-
Pulse: Reasoning Readiness 58% · Context Debt 42%
|
|
323
|
+
Pulse: Reasoning Readiness 58% · Context Debt 42% ↓3% (scope locked)
|
|
323
324
|
Reply proceed (run discovery → recommendations) · expert · pause
|
|
324
325
|
```
|
|
325
326
|
|
|
326
|
-
- **Score line** (top of the message). Full capitalized labels — `Reasoning Readiness` and `Context Debt`, NOT lowercase. The
|
|
327
|
+
- **Score line** (top of the message). Full capitalized labels — `Reasoning Readiness` and `Context Debt`, NOT lowercase. The progress delta attaches to **Context Debt as a directional drop** — `Context Debt 42% ↓3%` — so the movement reads unambiguously as debt going DOWN. (A bare `· +3%` sitting next to the debt figure reads like debt went UP by 3, the opposite of progress — that's the confusion this avoids.) The delta is **MANDATORY** on every pulse after the first (the first pulse has no prior → just the baseline + reason). Use `↓N%` when debt drops (the normal, good case), `↑N%` on a regression (rare; render full then), and `±0%` when a step didn't move the score. Never drop it — it's the visible-progress signal. (Readiness climbing and debt dropping are the same move — `Reasoning Readiness + Context Debt = 100%` — so the debt-drop arrow IS the readiness-gain signal, just framed the way users read it.)
|
|
327
328
|
- **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:
|
|
328
329
|
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:
|
|
329
330
|
| lowest dimension (internal) | what the user reads (plain) |
|
|
@@ -335,7 +336,7 @@ The pulse rule and visual specs live in the [§ /ritual context-pulse](#ritual-c
|
|
|
335
336
|
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.
|
|
336
337
|
3. **Terse + declarative** — no `now let me help you improve this` assistant/affect register (`cli-experience-tenets.md`).
|
|
337
338
|
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.`
|
|
338
|
-
- **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
|
|
339
|
+
- **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 `Context Debt N% ↓M%` delta on the score line and the same lift bridge above the CTA.
|
|
339
340
|
- 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.
|
|
340
341
|
- 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.
|
|
341
342
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED from references/build-flow.md by apps/cli/scripts/generate-lite-flow.js — DO NOT EDIT. -->
|
|
2
|
-
<!-- source-sha:
|
|
2
|
+
<!-- source-sha: 890b590159dbb59d -->
|
|
3
3
|
|
|
4
4
|
# /ritual lite — fast build (generated; do not edit)
|
|
5
5
|
|
|
@@ -929,6 +929,8 @@ Store the final sub-problems for Step 5 — they go into `considerations[]`.
|
|
|
929
929
|
|
|
930
930
|
#### Step 5 — Generate problem frame
|
|
931
931
|
|
|
932
|
+
<!-- skill-options:no-gate-change: Step 5 adds a render-only rule (do not surface follow_up_questions / an "open questions" preview / fuzzy-meta at the frame gate); the frame's pause + options + Reply line are unchanged. -->
|
|
933
|
+
|
|
932
934
|
##### 5.1 First draft
|
|
933
935
|
|
|
934
936
|
Call `mcp__ritual__generate_problem_statement` with:
|
|
@@ -971,6 +973,7 @@ Or reply with edits, e.g. `tighten`, `broaden`, `focus on outbox`, `drop dashboa
|
|
|
971
973
|
```
|
|
972
974
|
|
|
973
975
|
Rules:
|
|
976
|
+
- **Render ONLY the four blocks above** — Problem frame, Optimize for, References, and the Reply line. Nothing else. The `generate_problem_statement` response may include `follow_up_questions` and quality scores: those are for YOUR internal awareness, never for display. Do NOT add an "Open questions" / "what discovery will resolve" section, do NOT preview or list discovery questions here, and do NOT editorialize about what's "still fuzzy" or "what the next step pins down." Discovery is the next step and owns open questions; the frame is a lock-point, not a discovery preview. Surfacing them here both pre-empts Step 7 and clutters the gate.
|
|
974
977
|
- Do not show the old versioned scope heading.
|
|
975
978
|
- Do not show `Engineering problem:` as the heading; use `Problem frame`.
|
|
976
979
|
- Do not say `ship it` unless the user used that language first.
|
|
@@ -1736,9 +1739,16 @@ Pick whichever fits the user's flow — they're equivalent in content. Do not in
|
|
|
1736
1739
|
|
|
1737
1740
|
<!-- skill-options:no-gate-change: adds a convergence note at the top of the rec-wait — both answerers (local coding agent vs Ritual server) poll get_recommendations_preview until ≥1 rec; the only difference is who produced the answers. No new pause gate or Step header; the run/pause gate + its options are unchanged. -->
|
|
1738
1741
|
|
|
1739
|
-
|
|
1742
|
+
<!-- skill-options:no-gate-change: Step 8.1 rec-wait polls get_exploration_status.recommendationsStatus (not_started|generating|ready|empty|failed); on `failed` it offers retry_recommendations (re-enqueues rec-gen only). Render-only signal + an offered action, no pause/option/Step-header change. -->
|
|
1743
|
+
**Both answerers converge here — once the run is underway, poll until recommendations are READY.** The job from this point on is the SAME regardless of who produced the answers. **Poll the authoritative signal: `mcp__ritual__get_exploration_status(exploration_id).recommendationsStatus`.** It removes the guesswork that bit us before — it is unambiguous:
|
|
1744
|
+
- `not_started` / `generating` → **keep polling.** A zero `recommendationCount` here is NORMAL — generation is enqueued/in flight, NEVER a "miss." (Older servers may omit the field; if `recommendationsStatus` is absent, fall back to polling `get_recommendations_preview` until ≥1.)
|
|
1745
|
+
- `ready` → recommendations exist. Fetch them (`get_recommendations_preview`) and continue to Step 9.
|
|
1746
|
+
- `empty` → generation FINISHED with genuinely zero recs (rare, real terminal state). Surface it plainly — do NOT render a fake Step 9 landing, do NOT re-run.
|
|
1747
|
+
- `failed` → generation exhausted its auto-retries (terminal). Surface it with the one-line `recommendationsError` if present, and **offer to retry** — on a `yes`, call `mcp__ritual__retry_recommendations(exploration_id)` (re-enqueues ONLY rec-gen on the existing answers; status returns to `generating`, resume polling). Do NOT call `start_agentic_run` (that re-answers the whole exploration) and do NOT auto-retry without asking.
|
|
1748
|
+
|
|
1749
|
+
The *only* difference between the two answerer paths — **local coding agent** (you, repo-linked) vs **Ritual's server agentic run** — is how you reach this wait (agent-answered → straight to the status poll; server → poll the run to `COMPLETED` first, then the status). Never render the Step 9 landing, and never call `accept_recommendations`, from anything but `ready`.
|
|
1740
1750
|
|
|
1741
|
-
**Agent-answered path (default):** you already wrote + `submit_all_answers`'d, so there's no agentic run to poll — go straight to the recommendation wait: poll `
|
|
1751
|
+
**Agent-answered path (default):** you already wrote + `submit_all_answers`'d, so there's no agentic run to poll — go straight to the recommendation wait: poll `mcp__ritual__get_exploration_status(exploration_id).recommendationsStatus` (`Bash sleep 20` per iteration, a "still generating recommendations…" line every ~3 polls) until it reads `ready`, then fetch + continue to Step 9. `generating` → keep polling; `empty` → genuine zero-rec terminal; NEVER render the Step 9 landing or call `accept_recommendations` from anything but `ready`; if 10+ min pass still `generating`, surface it as an anomaly. (Skip the `get_agentic_run` polling below — that's the server-fallback path.)
|
|
1742
1752
|
|
|
1743
1753
|
**Server fallback path** (you called `start_agentic_run`): poll `mcp__ritual__get_agentic_run(run_id)` using `references/async-polling.md`: **`Bash sleep 20` (constant 20 — matches Spark's 20s agentic cadence; never escalate)** per iteration, then a fresh status call. Even if the run takes 2+ minutes, the sleep value stays a constant 20; the harness blocks chained-shorter-sleeps-at-increasing-N just like it blocks `sleep ≥ 30`, but a fixed `20` is non-escalating and under 30 → guard-safe. Agentic runs CAN exceed 5 min for large explorations — if you see status still running past ~5 min of polling, switch to the `Monitor` + `until <check>; do sleep 2; done` pattern from `references/async-polling.md` § Long waits.
|
|
1744
1754
|
|
|
@@ -1750,15 +1760,18 @@ Then print progress only when `progress_pct` or `current_step` changes, or every
|
|
|
1750
1760
|
|
|
1751
1761
|
> Agentic run: {progress_pct}% — {current_step}
|
|
1752
1762
|
|
|
1753
|
-
When `status` is `COMPLETED`: **wait for
|
|
1763
|
+
When `status` is `COMPLETED`: **wait for `recommendationsStatus: ready` before Step 9.** The run reporting
|
|
1754
1764
|
`completed` does NOT mean recommendations exist yet — rec generation is a separate queued job that
|
|
1755
|
-
lands MINUTES later (the 2026-06-05 premature-accept incident class; observed again live 2026-06-12
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1765
|
+
lands MINUTES later (the 2026-06-05 premature-accept incident class; observed again live 2026-06-12
|
|
1766
|
+
and 2026-06-15). Poll `mcp__ritual__get_exploration_status(exploration_id).recommendationsStatus` on
|
|
1767
|
+
the standard cadence (`Bash sleep 20` per iteration, "still generating recommendations…" line every
|
|
1768
|
+
~3 polls): `generating` → keep polling; `ready` → continue to Step 9; `empty` → genuine zero-rec
|
|
1769
|
+
terminal, surface it. NEVER render the Step 9 landing — and never call `accept_recommendations` —
|
|
1770
|
+
from anything but `ready`. If 10+ minutes pass still `generating`, surface that as an anomaly
|
|
1771
|
+
instead of proceeding.
|
|
1772
|
+
|
|
1773
|
+
<!-- skill-options:no-gate-change: Step 8.1 adds a load-bearing clause closing the "zero-rec = generation miss → re-run / reroute" loophole; tightens the existing wait-for-rows rule only — no pause, option, or Step header added or changed. -->
|
|
1774
|
+
**A zero-rec read is NEVER a "generation miss," and re-running is NOT a recovery (load-bearing).** The run reporting `completed` only means *answering* finished — recommendation synthesis is a SEPARATE async job that may still be in flight, so zero rows means **not yet**, never **failed**. Do NOT relabel it a "generation miss" / "the synthesizer came back empty" / "0 recommendations" and act on that: do NOT call `start_agentic_run` again to "regenerate" (the answers are already committed — a re-run re-answers the whole exploration from scratch, burns a full pipeline, and can double-generate), and do NOT propose "routing around" synthesis by building a plan from the raw discovery answers. Just keep polling `get_exploration_status.recommendationsStatus` until `ready` (or `empty` — the rare genuine terminal). The synthesizer is almost never the problem — being early in the async window (`generating`) is. The ONLY escalation, and only after the 10-min ceiling still `generating`, is to surface it as an anomaly and offer `/ritual status` or the web app — never an automatic re-run, never a reroute.
|
|
1762
1775
|
When `status` is `COMPLETED_WITH_ERRORS`: tell the user, then apply the same wait-for-rows rule — partial recommendations may still be useful.
|
|
1763
1776
|
When `status` is `FAILED`: surface the error message, ask if they want to retry (`start_agentic_run` again with same exploration_id) or stop.
|
|
1764
1777
|
When `status` is `PAUSED_FOR_REVIEW` (product/design answer-review mode only): continue to Step 8.5.
|
|
@@ -1905,7 +1918,7 @@ or proceed to your {Deliverable}.
|
|
|
1905
1918
|
|
|
1906
1919
|
{…every category, every rec, one line each…}
|
|
1907
1920
|
|
|
1908
|
-
Pulse: Reasoning Readiness ~88% · Context Debt 12%
|
|
1921
|
+
Pulse: Reasoning Readiness ~88% · Context Debt 12% ↓16% (recommendations ready)
|
|
1909
1922
|
|
|
1910
1923
|
A few assumptions are still unverified — the build brief is what locks them down.
|
|
1911
1924
|
Reply drill R{N} (read one in full) · edit R{N} <your change> · proceed (generate the {Deliverable})
|