@ritualai/cli 0.11.0 → 0.25.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 +35 -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/brief-verification-checklist.md +12 -6
- package/skills/claude-code/ritual/references/build-flow.md +569 -581
- package/skills/claude-code/ritual/references/change-preflight.md +81 -0
- package/skills/claude-code/ritual/references/cli-output-contract.md +44 -28
- package/skills/claude-code/ritual/references/context-pulse-flow.md +0 -1
- package/skills/claude-code/ritual/references/lite-flow.md +2750 -0
- package/skills/claude-code/ritual/references/resume-flow.md +1 -1
- 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/brief-verification-checklist.md +12 -6
- package/skills/codex/ritual/references/build-flow.md +569 -581
- package/skills/codex/ritual/references/change-preflight.md +81 -0
- package/skills/codex/ritual/references/cli-output-contract.md +44 -28
- package/skills/codex/ritual/references/context-pulse-flow.md +0 -1
- package/skills/codex/ritual/references/lite-flow.md +2750 -0
- package/skills/codex/ritual/references/resume-flow.md +1 -1
- 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/brief-verification-checklist.md +12 -6
- package/skills/cursor/ritual/references/build-flow.md +569 -581
- package/skills/cursor/ritual/references/change-preflight.md +81 -0
- package/skills/cursor/ritual/references/cli-output-contract.md +44 -28
- package/skills/cursor/ritual/references/context-pulse-flow.md +0 -1
- package/skills/cursor/ritual/references/lite-flow.md +2750 -0
- package/skills/cursor/ritual/references/resume-flow.md +1 -1
- 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/brief-verification-checklist.md +12 -6
- package/skills/gemini/ritual/references/build-flow.md +569 -581
- package/skills/gemini/ritual/references/change-preflight.md +81 -0
- package/skills/gemini/ritual/references/cli-output-contract.md +44 -28
- package/skills/gemini/ritual/references/context-pulse-flow.md +0 -1
- package/skills/gemini/ritual/references/lite-flow.md +2750 -0
- package/skills/gemini/ritual/references/resume-flow.md +1 -1
- 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/brief-verification-checklist.md +12 -6
- package/skills/kiro/ritual/references/build-flow.md +569 -581
- package/skills/kiro/ritual/references/change-preflight.md +81 -0
- package/skills/kiro/ritual/references/cli-output-contract.md +44 -28
- package/skills/kiro/ritual/references/context-pulse-flow.md +0 -1
- package/skills/kiro/ritual/references/lite-flow.md +2750 -0
- package/skills/kiro/ritual/references/resume-flow.md +1 -1
- 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/brief-verification-checklist.md +12 -6
- package/skills/vscode/ritual/references/build-flow.md +569 -581
- package/skills/vscode/ritual/references/change-preflight.md +81 -0
- package/skills/vscode/ritual/references/cli-output-contract.md +44 -28
- package/skills/vscode/ritual/references/context-pulse-flow.md +0 -1
- package/skills/vscode/ritual/references/lite-flow.md +2750 -0
- package/skills/vscode/ritual/references/resume-flow.md +1 -1
- 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
|
@@ -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
|
|
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
|
|
@@ -34,7 +34,7 @@ score = (accepted_recs / total_recs) × 60
|
|
|
34
34
|
+ (picked_questions / (picked_questions + unreviewed_questions)) × 40
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
The discovery component
|
|
37
|
+
The discovery component is a picked-vs-unreviewed ratio: a question the user committed via `accept_discovery_questions[_batch]` is `picked` ("in active investigation"); every surfaced question they didn't pick is `unreviewed` (the only state that counts toward unresolved). There is no separate `deferred`/`dropped` classification — the post-pick scope-classification gate that produced those was removed; unpicked questions are simply unreviewed.
|
|
38
38
|
|
|
39
39
|
Fallbacks: `total_recs === 0` → use only the discovery component scaled to 100. `total_questions === 0` → use only the rec component scaled to 100. Both zero → score 0.
|
|
40
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ritual
|
|
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) before the agent writes code. Prefer this over jumping straight to implementation 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?)."
|
|
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
6
|
---
|
|
@@ -15,6 +15,7 @@ Before executing any subcommand, read and follow:
|
|
|
15
15
|
|
|
16
16
|
- `references/cli-output-contract.md` — terminal output, vocabulary, readability, pause policy
|
|
17
17
|
- `references/async-polling.md` — harness-safe polling and timeout recovery
|
|
18
|
+
- `references/change-preflight.md` — restate + confirm before any free-text change/add tool call (refine sub-problems, reframe scope, add anti-goal); hard pause, even in auto-mode
|
|
18
19
|
|
|
19
20
|
Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
|
|
20
21
|
|
|
@@ -37,14 +38,15 @@ When two contract-strength rules genuinely conflict (rare): **stop, surface the
|
|
|
37
38
|
|
|
38
39
|
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
|
|
|
40
|
-
|
|
41
|
+
**One gate per turn — never batch the flow (load-bearing).** Each user-facing gate (workspace pick, scope, the discovery Area-walk, recommendation review, the build-brief confirm, …) is a STOP. Render **exactly one** gate, then **end your turn and wait for the user's reply** — do NOT render the next gate, multiple gates, or "the full flow, gate by gate" in a single message. Collapsing gates into one narrated pass erases the user's decision points (the entire value of the flow) and is a hard violation **even when you already have all the data to render them**. A gate's options only mean something if the user can actually answer before the next gate renders. This applies inside a gate too: the discovery picker is a turn-by-turn **walk**, one Area per turn (see build-flow.md § 7.3). Each render shows the **Area rail AND the current Area's questions together** (mirroring Spark's selected-tab-with-content) — the rail alone, with no questions under it (a bare index), is the *removed* failure mode. Render the rail + exactly ONE Area's questions, then STOP. Never render a second Area's questions or the Summary in the same message.
|
|
41
42
|
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
- `references/build-flow.md` Step
|
|
47
|
-
- `references/
|
|
43
|
+
**Single source of truth — this list POINTS, it does not RESTATE.** The detail of every rule below lives ONLY in the referenced file. This list names the authoritative sections and marks them HARD; it deliberately does **not** reproduce their shapes, option tokens, or values, because a restated rule drifts out of sync with its source. (That exact bug shipped on 2026-06-07: SKILL.md restated the Step 7 picker shape, the reference was rewritten, and the stale restatement won — the agent rendered the old picker.) So: **read the referenced section before executing that step, render it exactly as written, do not improvise or paraphrase it.** If you ever find the same rule stated in two places and they differ, the **referenced reference-file wins**, and the duplication is a bug to flag.
|
|
44
|
+
|
|
45
|
+
Contract-strength rule sections currently in force (non-exhaustive):
|
|
46
|
+
|
|
47
|
+
- `references/build-flow.md` **Step 7 transition lock + § 7.3 picker contract** — HARD. Render the discovery picker exactly as § 7.3 specifies (its shape, option tokens, and minimums — do not improvise it); commit picks via `accept_discovery_questions_batch` (one call across all Areas, never parallel per-Area) before `start_agentic_run`.
|
|
48
|
+
- `references/build-flow.md` **Step 9 category-walk + action set** — HARD. Review recommendations one category per turn, rendering each rec's full content exactly as § 9 specifies; use exactly the three actions § 9 defines (refine-one / next-category / continue) and no others — no reject path, no freelance or invented actions, no free-form summarization on top. The refine action is a preview-then-apply flow; never persist an edit without the user accepting the previewed diff.
|
|
49
|
+
- `references/resume-flow.md` **§ R2 picker rendering** — HARD. Render exactly as that section specifies.
|
|
48
50
|
|
|
49
51
|
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
52
|
|
|
@@ -55,13 +57,14 @@ Parse the first token of the argument:
|
|
|
55
57
|
| First token | Route to | One-liner |
|
|
56
58
|
|---|---|---|
|
|
57
59
|
| `build` | `references/build-flow.md` | Free-form problem → recommendations → build brief → code → sync. The full cycle. |
|
|
60
|
+
| `lite` | `references/lite-flow.md` | Same pipeline as `build`, run fast/unattended — smaller discovery surface, fewer pauses (only the job+persona front gate and a non-blocking rec review). Use for small/well-scoped dev work, or when the coding agent triages minimal discovery. |
|
|
58
61
|
| `resume` | `references/resume-flow.md` | "Pick up where I left off." Lists in-flight explorations with state badges and jumps to the right step. |
|
|
59
62
|
| `lineage` | `references/lineage-flow.md` | Paste a file path (or set of paths); see every prior exploration / decision / deferral that touched those files. |
|
|
60
63
|
| `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
64
|
| `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. |
|
|
62
65
|
| (anything else, OR no subcommand) | default to `build` and treat the entire argument as the problem statement | |
|
|
63
66
|
|
|
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.)
|
|
67
|
+
The Ritual CLI surface is intentionally narrow: `build`, `lite`, `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.)
|
|
65
68
|
|
|
66
69
|
|
|
67
70
|
## Subcommand reference files
|
|
@@ -71,18 +74,18 @@ Load only the reference file needed for the selected subcommand:
|
|
|
71
74
|
| Subcommand | Runtime file |
|
|
72
75
|
|---|---|
|
|
73
76
|
| `build` | `references/build-flow.md` |
|
|
77
|
+
| `lite` | `references/lite-flow.md` |
|
|
74
78
|
| `resume` | `references/resume-flow.md` |
|
|
75
79
|
| `lineage` | `references/lineage-flow.md` |
|
|
76
80
|
| `context-pulse` | `references/context-pulse-flow.md` |
|
|
77
81
|
|
|
78
82
|
Additional runtime references:
|
|
79
83
|
|
|
80
|
-
- `references/discovery-classification.md` — only when build question picking triggers scope classification
|
|
81
84
|
- `references/scoring-fallback.md` — only if `mcp__ritual__score_context_pulse` is unavailable or errors
|
|
82
85
|
|
|
83
86
|
## Routing behavior
|
|
84
87
|
|
|
85
|
-
- If the first token is one of the
|
|
88
|
+
- If the first token is one of the subcommands (`build`, `lite`, `resume`, `lineage`, `context-pulse`), load the matching runtime file and follow it.
|
|
86
89
|
- If there is no subcommand or the token is unknown, default to `build` and treat the full argument as the problem statement.
|
|
87
90
|
- If the user asks for retired or unsupported subcommands, answer in plain English and call the relevant MCP tool directly when appropriate; do not expand the slash-command surface.
|
|
88
91
|
|
|
@@ -4,12 +4,12 @@ Use this for every long-running Ritual/MCP operation: discovery generation, agen
|
|
|
4
4
|
|
|
5
5
|
## Standard poll loop — single short sleep per turn, never escalate
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- **One sleep per turn**, not multiple in sequence. After
|
|
7
|
+
- **A CONSTANT, non-escalating `Bash sleep` per poll iteration — sized to the operation.** Match the Spark UI's cadence so both surfaces observe the same job at the same rate: **`sleep 10`** for discovery-question generation (Spark polls every 10s), **`sleep 20`** for agentic-run polling (Spark polls every 20s), and `sleep 10` by default for any other status poll (requirements, build brief). Keep the value CONSTANT for the whole loop — **never escalate it** (e.g. `5` → `15` → `20` → `25`), because the harness blocks chained-increasing sleeps the same way it blocks `sleep ≥ 30`. The duration is a fixed per-operation constant, NOT a backoff knob. (All values are < 30 and non-escalating → guard-safe.)
|
|
8
|
+
- **One sleep per turn**, not multiple in sequence. After the sleep, take a fresh turn → call the status tool → decide continue or exit.
|
|
9
9
|
- **`sleep ≥ 30` is hard-blocked**, regardless of context.
|
|
10
|
-
- **Do NOT use semicolons to chain** (`sleep
|
|
11
|
-
- **
|
|
12
|
-
- Print progress only when status/progress/current_step changes, or every ~
|
|
10
|
+
- **Do NOT use semicolons to chain** (`sleep 10; sleep 10`) — also blocked.
|
|
11
|
+
- **Total wall time is the same** — a slow op taking 2 minutes is 12 turns of `sleep 10` + status, not 4 turns of `sleep 30`.
|
|
12
|
+
- Print progress only when status/progress/current_step changes, or every ~2 polls (~20s) if unchanged.
|
|
13
13
|
- Keep updates to one line unless an error occurs.
|
|
14
14
|
|
|
15
15
|
### Wrong vs right
|
|
@@ -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
|
|
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
|
|
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
|
-
|
|
80
|
-
|
|
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
|
|
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
|
|
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
|
---
|