@ritualai/cli 0.36.8 → 0.36.11

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.
@@ -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: d91bf82d5264e811 -->
2
+ <!-- source-sha: bc6ea52efd75e1c7 -->
3
3
 
4
4
  # /ritual lite — fast build (generated; do not edit)
5
5
 
@@ -151,6 +151,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
151
151
  Persist `auditMode` to `Exploration.metadata.auditMode` at `create_exploration` time (additive JSONB key — no schema migration) so `/ritual resume <exploration-id>` picks up the same mode the original build started with, and `/ritual lineage <exploration-id>` can render which gates ran + their outcomes.
152
152
 
153
153
 
154
+ <!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic terminal) are loud-fallback COPY variants of the same gate; options are unchanged (proceed | name-the-job) -->
154
155
  #### Step 0.7 — The Job gate: classify the job to be done
155
156
 
156
157
  **The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
@@ -166,9 +167,16 @@ When this gate runs:
166
167
 
167
168
  1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
168
169
  classify yourself, do NOT pre-filter to development jobs. It returns
169
- `{ jtbd, workItemLabel, deliverableTemplate, why, personaCoverage }`.
170
+ `{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
171
+ `isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
172
+ result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
173
+ it is NOT a confident match, and which render variant you use in step 2 depends on it.
170
174
 
171
- 2. **Render the validation prompt** (rail stage `Job`):
175
+ 2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
176
+ what you're about to build: restate the ask + the matched job in the user's words, then let them
177
+ confirm or correct. Which variant you render depends on `isGenericFallback`.
178
+
179
+ **2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
172
180
 
173
181
  ```text
174
182
  Ritual build
@@ -182,21 +190,68 @@ When this gate runs:
182
190
  job actually is.
183
191
  ```
184
192
 
193
+ **2b — No specific job matched, FIRST time** (`isGenericFallback` is `true` — the result is the
194
+ catch-all `build-feature` / `produce-deliverable`, or `confidence` is `low` — AND you have not yet
195
+ asked the clarifying question this gate): do NOT present the catch-all as a verdict. This case
196
+ should be RARE. Instead ask ONE clarifying question that elicits the missing signal — what KIND of
197
+ work this is — grounded in their ask, with concrete examples that lead the reply. The examples
198
+ span the catalog's functions so the user can self-identify; tailor the wording to their ask. This
199
+ is the fallback step that lets us classify properly instead of defaulting blind (see
200
+ `loud-fallback-escalation.md`).
201
+
202
+ ```text
203
+ Ritual build
204
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
205
+
206
+ You're looking to: {restate the ask in one short clause}
207
+
208
+ I couldn't pin this to a specific job — your ask reads as an outcome, and the flow scopes much
209
+ better when I know what KIND of work it is. Which is closest (or say it in your own words)?
210
+ • A coding-agent / MCP / skill capability — tooling the agent itself uses
211
+ • A backend service or API
212
+ • A frontend / UI feature
213
+ • A refactor, migration, or infra / platform change
214
+ • Something else — tell me in a sentence
215
+
216
+ Reply with the closest fit (or your own words) and I'll lock the job.
217
+ ```
218
+
219
+ When the user answers, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
220
+ `correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a
221
+ specific job, otherwise **2c**.
222
+
223
+ **2c — Still generic after the clarifying question** (`isGenericFallback` is STILL `true` after the
224
+ user answered 2b): do NOT ask again. Proceed as a generic build with the function-agnostic
225
+ `Feature Brief` deliverable, and note the job can be renamed later. The job name stays generic —
226
+ never show a function-specific deliverable (e.g. "Frontend Web") for an unclassified build.
227
+
228
+ ```text
229
+ Ritual build
230
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
231
+
232
+ You're looking to: {restate the ask in one short clause}
233
+ I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
234
+
235
+ Reply `proceed` to frame the problem.
236
+ ```
237
+
185
238
  Do not render `personaCoverage` — persona representation is handled server-side now; only surface
186
239
  it if the user explicitly asks who's involved.
187
240
 
188
241
  Rail naming (deliverable-named rail, 2026-06-11): render `{Deliverable}` as the PROPOSED job's
189
- `deliverableTemplate` (e.g. `Launch Brief`, `PRD`, `Service Build Brief`; `Build brief` for the
190
- generic `build-feature`), and OMIT the `Implementation (Your agent)` stage entirely when the
191
- proposed job is not a development job — non-dev rails have FIVE stages ending at the deliverable.
192
- A correction that changes the job updates the rail on the next render. Spec:
242
+ `deliverableTemplate` from the classify result (e.g. `Launch Brief`, `PRD`, `Service Build Brief`;
243
+ `Feature Brief` for the generic `build-feature`), and OMIT the `Implementation (Your agent)` stage
244
+ entirely when the proposed job is not a development job — non-dev rails have FIVE stages ending at
245
+ the deliverable. A correction that changes the job updates the rail on the next render. Spec:
193
246
  `references/cli-output-contract.md` § Canonical stage table.
194
247
 
195
248
  3. **[USER PAUSE]** — wait for the user's actual reply. Never infer confirmation from the original
196
249
  ask, auto-mode, or silence. `proceed` / `yes` / `ok` confirms. ANY other substantive reply is a
197
250
  correction: call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input`, plus
198
251
  `correction` (the user's words) and `previous_jtbd` (the rejected slug), then re-render step 2.
199
- Loop until the user proceeds.
252
+ The clarifying QUESTION (2b) is asked AT MOST ONCE per gate — if the re-classification after the
253
+ user's answer is still generic, render **2c** (proceed as a generic `Feature Brief`); do not ask
254
+ the clarifying question again. Loop until the user proceeds.
200
255
 
201
256
  4. **Remember the confirmed `jtbd`** — you pass it to `create_exploration` at Step 6. Only after the
202
257
  user proceeds does the flow enter the `Scope` stage (workspace pick onward).
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "0.36.8",
3
- "builtAt": "2026-06-12T04:36:24.525Z",
4
- "skillsHash": "49c0dd37dafd"
2
+ "cliVersion": "0.36.11",
3
+ "builtAt": "2026-06-14T18:50:01.090Z",
4
+ "skillsHash": "39dbaf6dbdf9"
5
5
  }
@@ -3,7 +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
+ stamp: 39dbaf6dbdf9
7
7
  ---
8
8
 
9
9
  # /ritual
@@ -20,6 +20,9 @@ Before executing any subcommand, read and follow:
20
20
 
21
21
  Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
22
22
 
23
+ **Ground before you claim (load-bearing).** An exploration's current state — its recommendation count/status, step, requirement/brief status — is **live truth you read, never recall**. Before stating any of it: if unsure *which* exploration, call `list_explorations` (the compact roster) to fix identity by seeing them side by side; before asserting *what's in* one, call `get_exploration_status` (the cheap status card). Memory and prior turns are authoritative only for identity (which exploration, its title); the graph is authoritative for state. Never assert a recommendation count or status from memory, a session summary, or a stale read — that's how sibling explorations get conflated and "0 recs" gets claimed on an exploration that has many. See `documents/architecture/okf-grounding-policy.md`.
24
+ <!-- skill-options:no-gate-change: grounding rule adds no [USER PAUSE] gate or options; read-before-claim discipline only -->
25
+
23
26
  **Skill freshness (once per session, silent unless stale):** this file's frontmatter may carry a
24
27
  `stamp:` value (injected when the bundle was built — absent on dev/source copies). On the FIRST
25
28
  `mcp__ritual__ping` of a session, pass it as `skill_stamp`. If the response says
@@ -107,6 +107,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
107
107
  Persist `auditMode` to `Exploration.metadata.auditMode` at `create_exploration` time (additive JSONB key — no schema migration) so `/ritual resume <exploration-id>` picks up the same mode the original build started with, and `/ritual lineage <exploration-id>` can render which gates ran + their outcomes.
108
108
 
109
109
  <!-- lite:keep-start -->
110
+ <!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic terminal) are loud-fallback COPY variants of the same gate; options are unchanged (proceed | name-the-job) -->
110
111
  #### Step 0.7 — The Job gate: classify the job to be done
111
112
 
112
113
  **The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
@@ -122,9 +123,16 @@ When this gate runs:
122
123
 
123
124
  1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
124
125
  classify yourself, do NOT pre-filter to development jobs. It returns
125
- `{ jtbd, workItemLabel, deliverableTemplate, why, personaCoverage }`.
126
+ `{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
127
+ `isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
128
+ result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
129
+ it is NOT a confident match, and which render variant you use in step 2 depends on it.
126
130
 
127
- 2. **Render the validation prompt** (rail stage `Job`):
131
+ 2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
132
+ what you're about to build: restate the ask + the matched job in the user's words, then let them
133
+ confirm or correct. Which variant you render depends on `isGenericFallback`.
134
+
135
+ **2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
128
136
 
129
137
  ```text
130
138
  Ritual build
@@ -138,21 +146,68 @@ When this gate runs:
138
146
  job actually is.
139
147
  ```
140
148
 
149
+ **2b — No specific job matched, FIRST time** (`isGenericFallback` is `true` — the result is the
150
+ catch-all `build-feature` / `produce-deliverable`, or `confidence` is `low` — AND you have not yet
151
+ asked the clarifying question this gate): do NOT present the catch-all as a verdict. This case
152
+ should be RARE. Instead ask ONE clarifying question that elicits the missing signal — what KIND of
153
+ work this is — grounded in their ask, with concrete examples that lead the reply. The examples
154
+ span the catalog's functions so the user can self-identify; tailor the wording to their ask. This
155
+ is the fallback step that lets us classify properly instead of defaulting blind (see
156
+ `loud-fallback-escalation.md`).
157
+
158
+ ```text
159
+ Ritual build
160
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
161
+
162
+ You're looking to: {restate the ask in one short clause}
163
+
164
+ I couldn't pin this to a specific job — your ask reads as an outcome, and the flow scopes much
165
+ better when I know what KIND of work it is. Which is closest (or say it in your own words)?
166
+ • A coding-agent / MCP / skill capability — tooling the agent itself uses
167
+ • A backend service or API
168
+ • A frontend / UI feature
169
+ • A refactor, migration, or infra / platform change
170
+ • Something else — tell me in a sentence
171
+
172
+ Reply with the closest fit (or your own words) and I'll lock the job.
173
+ ```
174
+
175
+ When the user answers, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
176
+ `correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a
177
+ specific job, otherwise **2c**.
178
+
179
+ **2c — Still generic after the clarifying question** (`isGenericFallback` is STILL `true` after the
180
+ user answered 2b): do NOT ask again. Proceed as a generic build with the function-agnostic
181
+ `Feature Brief` deliverable, and note the job can be renamed later. The job name stays generic —
182
+ never show a function-specific deliverable (e.g. "Frontend Web") for an unclassified build.
183
+
184
+ ```text
185
+ Ritual build
186
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
187
+
188
+ You're looking to: {restate the ask in one short clause}
189
+ I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
190
+
191
+ Reply `proceed` to frame the problem.
192
+ ```
193
+
141
194
  Do not render `personaCoverage` — persona representation is handled server-side now; only surface
142
195
  it if the user explicitly asks who's involved.
143
196
 
144
197
  Rail naming (deliverable-named rail, 2026-06-11): render `{Deliverable}` as the PROPOSED job's
145
- `deliverableTemplate` (e.g. `Launch Brief`, `PRD`, `Service Build Brief`; `Build brief` for the
146
- generic `build-feature`), and OMIT the `Implementation (Your agent)` stage entirely when the
147
- proposed job is not a development job — non-dev rails have FIVE stages ending at the deliverable.
148
- A correction that changes the job updates the rail on the next render. Spec:
198
+ `deliverableTemplate` from the classify result (e.g. `Launch Brief`, `PRD`, `Service Build Brief`;
199
+ `Feature Brief` for the generic `build-feature`), and OMIT the `Implementation (Your agent)` stage
200
+ entirely when the proposed job is not a development job — non-dev rails have FIVE stages ending at
201
+ the deliverable. A correction that changes the job updates the rail on the next render. Spec:
149
202
  `references/cli-output-contract.md` § Canonical stage table.
150
203
 
151
204
  3. **[USER PAUSE]** — wait for the user's actual reply. Never infer confirmation from the original
152
205
  ask, auto-mode, or silence. `proceed` / `yes` / `ok` confirms. ANY other substantive reply is a
153
206
  correction: call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input`, plus
154
207
  `correction` (the user's words) and `previous_jtbd` (the rejected slug), then re-render step 2.
155
- Loop until the user proceeds.
208
+ The clarifying QUESTION (2b) is asked AT MOST ONCE per gate — if the re-classification after the
209
+ user's answer is still generic, render **2c** (proceed as a generic `Feature Brief`); do not ask
210
+ the clarifying question again. Loop until the user proceeds.
156
211
 
157
212
  4. **Remember the confirmed `jtbd`** — you pass it to `create_exploration` at Step 6. Only after the
158
213
  user proceeds does the flow enter the `Scope` stage (workspace pick onward).
@@ -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: d91bf82d5264e811 -->
2
+ <!-- source-sha: bc6ea52efd75e1c7 -->
3
3
 
4
4
  # /ritual lite — fast build (generated; do not edit)
5
5
 
@@ -151,6 +151,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
151
151
  Persist `auditMode` to `Exploration.metadata.auditMode` at `create_exploration` time (additive JSONB key — no schema migration) so `/ritual resume <exploration-id>` picks up the same mode the original build started with, and `/ritual lineage <exploration-id>` can render which gates ran + their outcomes.
152
152
 
153
153
 
154
+ <!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic terminal) are loud-fallback COPY variants of the same gate; options are unchanged (proceed | name-the-job) -->
154
155
  #### Step 0.7 — The Job gate: classify the job to be done
155
156
 
156
157
  **The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
@@ -166,9 +167,16 @@ When this gate runs:
166
167
 
167
168
  1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
168
169
  classify yourself, do NOT pre-filter to development jobs. It returns
169
- `{ jtbd, workItemLabel, deliverableTemplate, why, personaCoverage }`.
170
+ `{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
171
+ `isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
172
+ result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
173
+ it is NOT a confident match, and which render variant you use in step 2 depends on it.
170
174
 
171
- 2. **Render the validation prompt** (rail stage `Job`):
175
+ 2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
176
+ what you're about to build: restate the ask + the matched job in the user's words, then let them
177
+ confirm or correct. Which variant you render depends on `isGenericFallback`.
178
+
179
+ **2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
172
180
 
173
181
  ```text
174
182
  Ritual build
@@ -182,21 +190,68 @@ When this gate runs:
182
190
  job actually is.
183
191
  ```
184
192
 
193
+ **2b — No specific job matched, FIRST time** (`isGenericFallback` is `true` — the result is the
194
+ catch-all `build-feature` / `produce-deliverable`, or `confidence` is `low` — AND you have not yet
195
+ asked the clarifying question this gate): do NOT present the catch-all as a verdict. This case
196
+ should be RARE. Instead ask ONE clarifying question that elicits the missing signal — what KIND of
197
+ work this is — grounded in their ask, with concrete examples that lead the reply. The examples
198
+ span the catalog's functions so the user can self-identify; tailor the wording to their ask. This
199
+ is the fallback step that lets us classify properly instead of defaulting blind (see
200
+ `loud-fallback-escalation.md`).
201
+
202
+ ```text
203
+ Ritual build
204
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
205
+
206
+ You're looking to: {restate the ask in one short clause}
207
+
208
+ I couldn't pin this to a specific job — your ask reads as an outcome, and the flow scopes much
209
+ better when I know what KIND of work it is. Which is closest (or say it in your own words)?
210
+ • A coding-agent / MCP / skill capability — tooling the agent itself uses
211
+ • A backend service or API
212
+ • A frontend / UI feature
213
+ • A refactor, migration, or infra / platform change
214
+ • Something else — tell me in a sentence
215
+
216
+ Reply with the closest fit (or your own words) and I'll lock the job.
217
+ ```
218
+
219
+ When the user answers, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
220
+ `correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a
221
+ specific job, otherwise **2c**.
222
+
223
+ **2c — Still generic after the clarifying question** (`isGenericFallback` is STILL `true` after the
224
+ user answered 2b): do NOT ask again. Proceed as a generic build with the function-agnostic
225
+ `Feature Brief` deliverable, and note the job can be renamed later. The job name stays generic —
226
+ never show a function-specific deliverable (e.g. "Frontend Web") for an unclassified build.
227
+
228
+ ```text
229
+ Ritual build
230
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
231
+
232
+ You're looking to: {restate the ask in one short clause}
233
+ I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
234
+
235
+ Reply `proceed` to frame the problem.
236
+ ```
237
+
185
238
  Do not render `personaCoverage` — persona representation is handled server-side now; only surface
186
239
  it if the user explicitly asks who's involved.
187
240
 
188
241
  Rail naming (deliverable-named rail, 2026-06-11): render `{Deliverable}` as the PROPOSED job's
189
- `deliverableTemplate` (e.g. `Launch Brief`, `PRD`, `Service Build Brief`; `Build brief` for the
190
- generic `build-feature`), and OMIT the `Implementation (Your agent)` stage entirely when the
191
- proposed job is not a development job — non-dev rails have FIVE stages ending at the deliverable.
192
- A correction that changes the job updates the rail on the next render. Spec:
242
+ `deliverableTemplate` from the classify result (e.g. `Launch Brief`, `PRD`, `Service Build Brief`;
243
+ `Feature Brief` for the generic `build-feature`), and OMIT the `Implementation (Your agent)` stage
244
+ entirely when the proposed job is not a development job — non-dev rails have FIVE stages ending at
245
+ the deliverable. A correction that changes the job updates the rail on the next render. Spec:
193
246
  `references/cli-output-contract.md` § Canonical stage table.
194
247
 
195
248
  3. **[USER PAUSE]** — wait for the user's actual reply. Never infer confirmation from the original
196
249
  ask, auto-mode, or silence. `proceed` / `yes` / `ok` confirms. ANY other substantive reply is a
197
250
  correction: call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input`, plus
198
251
  `correction` (the user's words) and `previous_jtbd` (the rejected slug), then re-render step 2.
199
- Loop until the user proceeds.
252
+ The clarifying QUESTION (2b) is asked AT MOST ONCE per gate — if the re-classification after the
253
+ user's answer is still generic, render **2c** (proceed as a generic `Feature Brief`); do not ask
254
+ the clarifying question again. Loop until the user proceeds.
200
255
 
201
256
  4. **Remember the confirmed `jtbd`** — you pass it to `create_exploration` at Step 6. Only after the
202
257
  user proceeds does the flow enter the `Scope` stage (workspace pick onward).
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "0.36.8",
3
- "builtAt": "2026-06-12T04:36:24.525Z",
4
- "skillsHash": "49c0dd37dafd"
2
+ "cliVersion": "0.36.11",
3
+ "builtAt": "2026-06-14T18:50:01.090Z",
4
+ "skillsHash": "39dbaf6dbdf9"
5
5
  }
@@ -3,7 +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
+ stamp: 39dbaf6dbdf9
7
7
  ---
8
8
 
9
9
  # /ritual
@@ -20,6 +20,9 @@ Before executing any subcommand, read and follow:
20
20
 
21
21
  Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
22
22
 
23
+ **Ground before you claim (load-bearing).** An exploration's current state — its recommendation count/status, step, requirement/brief status — is **live truth you read, never recall**. Before stating any of it: if unsure *which* exploration, call `list_explorations` (the compact roster) to fix identity by seeing them side by side; before asserting *what's in* one, call `get_exploration_status` (the cheap status card). Memory and prior turns are authoritative only for identity (which exploration, its title); the graph is authoritative for state. Never assert a recommendation count or status from memory, a session summary, or a stale read — that's how sibling explorations get conflated and "0 recs" gets claimed on an exploration that has many. See `documents/architecture/okf-grounding-policy.md`.
24
+ <!-- skill-options:no-gate-change: grounding rule adds no [USER PAUSE] gate or options; read-before-claim discipline only -->
25
+
23
26
  **Skill freshness (once per session, silent unless stale):** this file's frontmatter may carry a
24
27
  `stamp:` value (injected when the bundle was built — absent on dev/source copies). On the FIRST
25
28
  `mcp__ritual__ping` of a session, pass it as `skill_stamp`. If the response says
@@ -107,6 +107,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
107
107
  Persist `auditMode` to `Exploration.metadata.auditMode` at `create_exploration` time (additive JSONB key — no schema migration) so `/ritual resume <exploration-id>` picks up the same mode the original build started with, and `/ritual lineage <exploration-id>` can render which gates ran + their outcomes.
108
108
 
109
109
  <!-- lite:keep-start -->
110
+ <!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic terminal) are loud-fallback COPY variants of the same gate; options are unchanged (proceed | name-the-job) -->
110
111
  #### Step 0.7 — The Job gate: classify the job to be done
111
112
 
112
113
  **The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
@@ -122,9 +123,16 @@ When this gate runs:
122
123
 
123
124
  1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
124
125
  classify yourself, do NOT pre-filter to development jobs. It returns
125
- `{ jtbd, workItemLabel, deliverableTemplate, why, personaCoverage }`.
126
+ `{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
127
+ `isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
128
+ result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
129
+ it is NOT a confident match, and which render variant you use in step 2 depends on it.
126
130
 
127
- 2. **Render the validation prompt** (rail stage `Job`):
131
+ 2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
132
+ what you're about to build: restate the ask + the matched job in the user's words, then let them
133
+ confirm or correct. Which variant you render depends on `isGenericFallback`.
134
+
135
+ **2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
128
136
 
129
137
  ```text
130
138
  Ritual build
@@ -138,21 +146,68 @@ When this gate runs:
138
146
  job actually is.
139
147
  ```
140
148
 
149
+ **2b — No specific job matched, FIRST time** (`isGenericFallback` is `true` — the result is the
150
+ catch-all `build-feature` / `produce-deliverable`, or `confidence` is `low` — AND you have not yet
151
+ asked the clarifying question this gate): do NOT present the catch-all as a verdict. This case
152
+ should be RARE. Instead ask ONE clarifying question that elicits the missing signal — what KIND of
153
+ work this is — grounded in their ask, with concrete examples that lead the reply. The examples
154
+ span the catalog's functions so the user can self-identify; tailor the wording to their ask. This
155
+ is the fallback step that lets us classify properly instead of defaulting blind (see
156
+ `loud-fallback-escalation.md`).
157
+
158
+ ```text
159
+ Ritual build
160
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
161
+
162
+ You're looking to: {restate the ask in one short clause}
163
+
164
+ I couldn't pin this to a specific job — your ask reads as an outcome, and the flow scopes much
165
+ better when I know what KIND of work it is. Which is closest (or say it in your own words)?
166
+ • A coding-agent / MCP / skill capability — tooling the agent itself uses
167
+ • A backend service or API
168
+ • A frontend / UI feature
169
+ • A refactor, migration, or infra / platform change
170
+ • Something else — tell me in a sentence
171
+
172
+ Reply with the closest fit (or your own words) and I'll lock the job.
173
+ ```
174
+
175
+ When the user answers, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
176
+ `correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a
177
+ specific job, otherwise **2c**.
178
+
179
+ **2c — Still generic after the clarifying question** (`isGenericFallback` is STILL `true` after the
180
+ user answered 2b): do NOT ask again. Proceed as a generic build with the function-agnostic
181
+ `Feature Brief` deliverable, and note the job can be renamed later. The job name stays generic —
182
+ never show a function-specific deliverable (e.g. "Frontend Web") for an unclassified build.
183
+
184
+ ```text
185
+ Ritual build
186
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
187
+
188
+ You're looking to: {restate the ask in one short clause}
189
+ I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
190
+
191
+ Reply `proceed` to frame the problem.
192
+ ```
193
+
141
194
  Do not render `personaCoverage` — persona representation is handled server-side now; only surface
142
195
  it if the user explicitly asks who's involved.
143
196
 
144
197
  Rail naming (deliverable-named rail, 2026-06-11): render `{Deliverable}` as the PROPOSED job's
145
- `deliverableTemplate` (e.g. `Launch Brief`, `PRD`, `Service Build Brief`; `Build brief` for the
146
- generic `build-feature`), and OMIT the `Implementation (Your agent)` stage entirely when the
147
- proposed job is not a development job — non-dev rails have FIVE stages ending at the deliverable.
148
- A correction that changes the job updates the rail on the next render. Spec:
198
+ `deliverableTemplate` from the classify result (e.g. `Launch Brief`, `PRD`, `Service Build Brief`;
199
+ `Feature Brief` for the generic `build-feature`), and OMIT the `Implementation (Your agent)` stage
200
+ entirely when the proposed job is not a development job — non-dev rails have FIVE stages ending at
201
+ the deliverable. A correction that changes the job updates the rail on the next render. Spec:
149
202
  `references/cli-output-contract.md` § Canonical stage table.
150
203
 
151
204
  3. **[USER PAUSE]** — wait for the user's actual reply. Never infer confirmation from the original
152
205
  ask, auto-mode, or silence. `proceed` / `yes` / `ok` confirms. ANY other substantive reply is a
153
206
  correction: call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input`, plus
154
207
  `correction` (the user's words) and `previous_jtbd` (the rejected slug), then re-render step 2.
155
- Loop until the user proceeds.
208
+ The clarifying QUESTION (2b) is asked AT MOST ONCE per gate — if the re-classification after the
209
+ user's answer is still generic, render **2c** (proceed as a generic `Feature Brief`); do not ask
210
+ the clarifying question again. Loop until the user proceeds.
156
211
 
157
212
  4. **Remember the confirmed `jtbd`** — you pass it to `create_exploration` at Step 6. Only after the
158
213
  user proceeds does the flow enter the `Scope` stage (workspace pick onward).
@@ -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: d91bf82d5264e811 -->
2
+ <!-- source-sha: bc6ea52efd75e1c7 -->
3
3
 
4
4
  # /ritual lite — fast build (generated; do not edit)
5
5
 
@@ -151,6 +151,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
151
151
  Persist `auditMode` to `Exploration.metadata.auditMode` at `create_exploration` time (additive JSONB key — no schema migration) so `/ritual resume <exploration-id>` picks up the same mode the original build started with, and `/ritual lineage <exploration-id>` can render which gates ran + their outcomes.
152
152
 
153
153
 
154
+ <!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic terminal) are loud-fallback COPY variants of the same gate; options are unchanged (proceed | name-the-job) -->
154
155
  #### Step 0.7 — The Job gate: classify the job to be done
155
156
 
156
157
  **The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
@@ -166,9 +167,16 @@ When this gate runs:
166
167
 
167
168
  1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
168
169
  classify yourself, do NOT pre-filter to development jobs. It returns
169
- `{ jtbd, workItemLabel, deliverableTemplate, why, personaCoverage }`.
170
+ `{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
171
+ `isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
172
+ result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
173
+ it is NOT a confident match, and which render variant you use in step 2 depends on it.
170
174
 
171
- 2. **Render the validation prompt** (rail stage `Job`):
175
+ 2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
176
+ what you're about to build: restate the ask + the matched job in the user's words, then let them
177
+ confirm or correct. Which variant you render depends on `isGenericFallback`.
178
+
179
+ **2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
172
180
 
173
181
  ```text
174
182
  Ritual build
@@ -182,21 +190,68 @@ When this gate runs:
182
190
  job actually is.
183
191
  ```
184
192
 
193
+ **2b — No specific job matched, FIRST time** (`isGenericFallback` is `true` — the result is the
194
+ catch-all `build-feature` / `produce-deliverable`, or `confidence` is `low` — AND you have not yet
195
+ asked the clarifying question this gate): do NOT present the catch-all as a verdict. This case
196
+ should be RARE. Instead ask ONE clarifying question that elicits the missing signal — what KIND of
197
+ work this is — grounded in their ask, with concrete examples that lead the reply. The examples
198
+ span the catalog's functions so the user can self-identify; tailor the wording to their ask. This
199
+ is the fallback step that lets us classify properly instead of defaulting blind (see
200
+ `loud-fallback-escalation.md`).
201
+
202
+ ```text
203
+ Ritual build
204
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
205
+
206
+ You're looking to: {restate the ask in one short clause}
207
+
208
+ I couldn't pin this to a specific job — your ask reads as an outcome, and the flow scopes much
209
+ better when I know what KIND of work it is. Which is closest (or say it in your own words)?
210
+ • A coding-agent / MCP / skill capability — tooling the agent itself uses
211
+ • A backend service or API
212
+ • A frontend / UI feature
213
+ • A refactor, migration, or infra / platform change
214
+ • Something else — tell me in a sentence
215
+
216
+ Reply with the closest fit (or your own words) and I'll lock the job.
217
+ ```
218
+
219
+ When the user answers, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
220
+ `correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a
221
+ specific job, otherwise **2c**.
222
+
223
+ **2c — Still generic after the clarifying question** (`isGenericFallback` is STILL `true` after the
224
+ user answered 2b): do NOT ask again. Proceed as a generic build with the function-agnostic
225
+ `Feature Brief` deliverable, and note the job can be renamed later. The job name stays generic —
226
+ never show a function-specific deliverable (e.g. "Frontend Web") for an unclassified build.
227
+
228
+ ```text
229
+ Ritual build
230
+ ● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
231
+
232
+ You're looking to: {restate the ask in one short clause}
233
+ I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
234
+
235
+ Reply `proceed` to frame the problem.
236
+ ```
237
+
185
238
  Do not render `personaCoverage` — persona representation is handled server-side now; only surface
186
239
  it if the user explicitly asks who's involved.
187
240
 
188
241
  Rail naming (deliverable-named rail, 2026-06-11): render `{Deliverable}` as the PROPOSED job's
189
- `deliverableTemplate` (e.g. `Launch Brief`, `PRD`, `Service Build Brief`; `Build brief` for the
190
- generic `build-feature`), and OMIT the `Implementation (Your agent)` stage entirely when the
191
- proposed job is not a development job — non-dev rails have FIVE stages ending at the deliverable.
192
- A correction that changes the job updates the rail on the next render. Spec:
242
+ `deliverableTemplate` from the classify result (e.g. `Launch Brief`, `PRD`, `Service Build Brief`;
243
+ `Feature Brief` for the generic `build-feature`), and OMIT the `Implementation (Your agent)` stage
244
+ entirely when the proposed job is not a development job — non-dev rails have FIVE stages ending at
245
+ the deliverable. A correction that changes the job updates the rail on the next render. Spec:
193
246
  `references/cli-output-contract.md` § Canonical stage table.
194
247
 
195
248
  3. **[USER PAUSE]** — wait for the user's actual reply. Never infer confirmation from the original
196
249
  ask, auto-mode, or silence. `proceed` / `yes` / `ok` confirms. ANY other substantive reply is a
197
250
  correction: call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input`, plus
198
251
  `correction` (the user's words) and `previous_jtbd` (the rejected slug), then re-render step 2.
199
- Loop until the user proceeds.
252
+ The clarifying QUESTION (2b) is asked AT MOST ONCE per gate — if the re-classification after the
253
+ user's answer is still generic, render **2c** (proceed as a generic `Feature Brief`); do not ask
254
+ the clarifying question again. Loop until the user proceeds.
200
255
 
201
256
  4. **Remember the confirmed `jtbd`** — you pass it to `create_exploration` at Step 6. Only after the
202
257
  user proceeds does the flow enter the `Scope` stage (workspace pick onward).
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "0.36.8",
3
- "builtAt": "2026-06-12T04:36:24.525Z",
4
- "skillsHash": "49c0dd37dafd"
2
+ "cliVersion": "0.36.11",
3
+ "builtAt": "2026-06-14T18:50:01.090Z",
4
+ "skillsHash": "39dbaf6dbdf9"
5
5
  }
@@ -3,7 +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
+ stamp: 39dbaf6dbdf9
7
7
  ---
8
8
 
9
9
  # /ritual
@@ -20,6 +20,9 @@ Before executing any subcommand, read and follow:
20
20
 
21
21
  Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
22
22
 
23
+ **Ground before you claim (load-bearing).** An exploration's current state — its recommendation count/status, step, requirement/brief status — is **live truth you read, never recall**. Before stating any of it: if unsure *which* exploration, call `list_explorations` (the compact roster) to fix identity by seeing them side by side; before asserting *what's in* one, call `get_exploration_status` (the cheap status card). Memory and prior turns are authoritative only for identity (which exploration, its title); the graph is authoritative for state. Never assert a recommendation count or status from memory, a session summary, or a stale read — that's how sibling explorations get conflated and "0 recs" gets claimed on an exploration that has many. See `documents/architecture/okf-grounding-policy.md`.
24
+ <!-- skill-options:no-gate-change: grounding rule adds no [USER PAUSE] gate or options; read-before-claim discipline only -->
25
+
23
26
  **Skill freshness (once per session, silent unless stale):** this file's frontmatter may carry a
24
27
  `stamp:` value (injected when the bundle was built — absent on dev/source copies). On the FIRST
25
28
  `mcp__ritual__ping` of a session, pass it as `skill_stamp`. If the response says