@ritualai/cli 0.36.35 → 0.36.36
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/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +3 -3
- package/skills/claude-code/ritual/SKILL.md +7 -3
- package/skills/claude-code/ritual/references/build-flow.md +39 -31
- package/skills/claude-code/ritual/references/lite-flow.md +40 -32
- package/skills/codex/ritual/.ritual-bundle.json +3 -3
- package/skills/codex/ritual/SKILL.md +7 -3
- package/skills/codex/ritual/references/build-flow.md +39 -31
- package/skills/codex/ritual/references/lite-flow.md +40 -32
- package/skills/cursor/ritual/.ritual-bundle.json +3 -3
- package/skills/cursor/ritual/SKILL.md +7 -3
- package/skills/cursor/ritual/references/build-flow.md +39 -31
- package/skills/cursor/ritual/references/lite-flow.md +40 -32
- package/skills/gemini/ritual/.ritual-bundle.json +3 -3
- package/skills/gemini/ritual/SKILL.md +7 -3
- package/skills/gemini/ritual/references/build-flow.md +39 -31
- package/skills/gemini/ritual/references/lite-flow.md +40 -32
- package/skills/kiro/ritual/.ritual-bundle.json +3 -3
- package/skills/kiro/ritual/SKILL.md +7 -3
- package/skills/kiro/ritual/references/build-flow.md +39 -31
- package/skills/kiro/ritual/references/lite-flow.md +40 -32
- package/skills/vscode/ritual/.ritual-bundle.json +3 -3
- package/skills/vscode/ritual/SKILL.md +7 -3
- package/skills/vscode/ritual/references/build-flow.md +39 -31
- package/skills/vscode/ritual/references/lite-flow.md +40 -32
|
@@ -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: d34e2df8a4177dbe -->
|
|
3
3
|
|
|
4
4
|
# /ritual lite — fast build (generated; do not edit)
|
|
5
5
|
|
|
@@ -233,7 +233,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
|
|
|
233
233
|
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.
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
<!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic
|
|
236
|
+
<!-- skill-options:no-gate-change: 2b (low-confidence clarifying question — server sets clarifyingQuestion only when confidence <20% or it defaulted) + 2c (confident generic — accept and proceed) are COPY variants of the same gate; options are unchanged (proceed | name-the-job; 2b adds answer-the-question, which is a name-the-job correction) -->
|
|
237
237
|
#### Step 0.7 — The Job gate: classify the job to be done
|
|
238
238
|
|
|
239
239
|
**The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
|
|
@@ -253,14 +253,18 @@ When this gate runs:
|
|
|
253
253
|
|
|
254
254
|
1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
|
|
255
255
|
classify yourself, do NOT pre-filter to development jobs. It returns
|
|
256
|
-
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
|
|
256
|
+
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, clarifyingQuestion?, personaCoverage }`.
|
|
257
257
|
`isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
|
|
258
258
|
result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
|
|
259
|
-
it is NOT a confident match, and which render variant you use in step 2 depends on it.
|
|
259
|
+
it is NOT a confident match, and which render variant you use in step 2 depends on it. On that
|
|
260
|
+
generic path the response also carries `clarifyingQuestion` — a plain-language question generated
|
|
261
|
+
from the user's ask, which step 2b renders verbatim to disambiguate toward a specific job.
|
|
260
262
|
|
|
261
263
|
2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
|
|
262
264
|
what you're about to build: restate the ask + the matched job in the user's words, then let them
|
|
263
|
-
confirm or correct.
|
|
265
|
+
confirm or correct. Route to a variant by the response: a **`clarifyingQuestion`** present → **2b**
|
|
266
|
+
(we're genuinely unsure — ask, but let them proceed); else `isGenericFallback` true → **2c** (a
|
|
267
|
+
confident generic build — accept and proceed); else → **2a** (a confident specific match).
|
|
264
268
|
|
|
265
269
|
**2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
|
|
266
270
|
|
|
@@ -273,14 +277,17 @@ When this gate runs:
|
|
|
273
277
|
Reply `proceed` if that's right, or tell me what to adjust.
|
|
274
278
|
```
|
|
275
279
|
|
|
276
|
-
**2b —
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
**2b — Genuinely unsure: ask, but let them proceed** (the response carries a **`clarifyingQuestion`**
|
|
281
|
+
— the server sets it ONLY when it was essentially guessing: numeric confidence below 20, or it
|
|
282
|
+
failed to classify and defaulted). A generic result alone does NOT land here — only a *low-confidence*
|
|
283
|
+
one does; a confident generic build goes to **2c**. The clarifying question is a single plain-language
|
|
284
|
+
question the server generated FROM the user's specific ask. **Render it verbatim** — it is grounded in
|
|
285
|
+
their words and leak-free. Do not rephrase it, do not append a menu, do not mention classification /
|
|
286
|
+
jobs / categories / confidence. The user has TWO ways out: answer to focus it, OR reply `proceed` to
|
|
287
|
+
continue with the deliverable. **Leak rule (load-bearing):** the rendered copy must NEVER say
|
|
288
|
+
"generic", "I couldn't classify", "fallback", "catch-all", or otherwise reveal that classification was
|
|
289
|
+
uncertain — that is internal state. Present it as a normal question about their ask. (See
|
|
290
|
+
`loud-fallback-escalation.md`.)
|
|
284
291
|
|
|
285
292
|
```text
|
|
286
293
|
Ritual build
|
|
@@ -288,34 +295,35 @@ When this gate runs:
|
|
|
288
295
|
|
|
289
296
|
You're looking to: {restate the ask in one short clause}
|
|
290
297
|
|
|
291
|
-
|
|
292
|
-
better when I know what KIND of work it is. Which is closest (or say it in your own words)?
|
|
293
|
-
• A coding-agent / MCP / skill capability — tooling the agent itself uses
|
|
294
|
-
• A backend service or API
|
|
295
|
-
• A frontend / UI feature
|
|
296
|
-
• A refactor, migration, or infra / platform change
|
|
297
|
-
• Something else — tell me in a sentence
|
|
298
|
+
{clarifyingQuestion — verbatim}
|
|
298
299
|
|
|
299
|
-
|
|
300
|
+
Answer in a sentence — or reply `proceed` and I'll continue with a {Deliverable}.
|
|
300
301
|
```
|
|
301
302
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
(Rare degraded case — you reached 2b but `clarifyingQuestion` is missing: ask which KIND of work it
|
|
304
|
+
is, with the same `proceed` option — • a coding-agent / MCP / skill capability • a backend service
|
|
305
|
+
or API • a frontend / UI feature • a refactor, migration, or infra change • something else, in your
|
|
306
|
+
own words.)
|
|
305
307
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
If the user ANSWERS, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
|
|
309
|
+
`correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a specific
|
|
310
|
+
job, otherwise **2c**. If the user replies `proceed`, go straight to **2c** (accept the generic).
|
|
311
|
+
|
|
312
|
+
**2c — Accept and proceed** (`isGenericFallback` is `true` with NO `clarifyingQuestion` — a
|
|
313
|
+
confident-enough generic build — OR the user chose to proceed from 2b, OR a re-classification is still
|
|
314
|
+
generic): do NOT interrogate. Present the deliverable as a normal accept-and-proceed — **same clean
|
|
315
|
+
shape as 2a**. Internally the job stays generic and is renamable later, but **the rendered copy must
|
|
316
|
+
NEVER say "generic", "couldn't classify", "fallback", or otherwise reveal that** — that is internal
|
|
317
|
+
state. Just name what Ritual will produce for their ask. (Never show a function-specific deliverable
|
|
318
|
+
like "Frontend Web" for an unclassified build — only the function-agnostic `Feature Brief`.)
|
|
310
319
|
|
|
311
320
|
```text
|
|
312
321
|
Ritual build
|
|
313
322
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
|
|
314
323
|
|
|
315
|
-
|
|
316
|
-
I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
|
|
324
|
+
Ritual will produce a {Deliverable} for {restate the ask in one short clause}.
|
|
317
325
|
|
|
318
|
-
Reply `proceed` to
|
|
326
|
+
Reply `proceed` if that's right, or tell me what to focus on.
|
|
319
327
|
```
|
|
320
328
|
|
|
321
329
|
Do not render `personaCoverage` — persona representation is handled server-side now; only surface
|
|
@@ -2262,7 +2270,7 @@ The Build Brief is the markdown document the engineer reads RIGHT BEFORE writing
|
|
|
2262
2270
|
Call `mcp__ritual__generate_build_brief` with:
|
|
2263
2271
|
|
|
2264
2272
|
- `exploration_id`
|
|
2265
|
-
- `icp` (
|
|
2273
|
+
- `icp` — **omit this.** The brief sources from the requirement set the flow already generated (on accept), whose ICP the server resolves from the exploration's persona/template. Passing a different ICP here forces a redundant requirement regeneration and a slow cold start. The engineering flavor is already baked into the server-resolved template — you do not need to (and should not) pass `TECH_PM` or any other ICP.
|
|
2266
2274
|
- `recon_context` — the Step 3 `codebase_context_packet` plus any explicit phase/later candidates from discovery. Do not pass raw recon notes. This grounds "Codebase Anchors" in real file paths while keeping agent hypotheses auditable and non-authoritative.
|
|
2267
2275
|
- `sources` — the **same** file-path array passed to `generate_considerations` and `generate_problem_statement` in Steps 4–5. Critical for KG consistency: the brief's "Previously Deferred" section only populates when overlapping prior implementations exist on these files.
|
|
2268
2276
|
|
|
@@ -3,7 +3,8 @@ 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:
|
|
6
|
+
stamp: c082a0648fbd
|
|
7
|
+
cli_version: 0.36.36
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# /ritual
|
|
@@ -24,8 +25,11 @@ Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual
|
|
|
24
25
|
<!-- skill-options:no-gate-change: grounding rule adds no [USER PAUSE] gate or options; read-before-claim discipline only -->
|
|
25
26
|
|
|
26
27
|
**Skill freshness (once per session, silent unless stale):** this file's frontmatter may carry a
|
|
27
|
-
`stamp:` value (injected when the bundle was built — absent on
|
|
28
|
-
`mcp__ritual__ping` of a session, pass
|
|
28
|
+
`stamp:` value and a `cli_version:` value (both injected when the bundle was built — absent on
|
|
29
|
+
dev/source copies). On the FIRST `mcp__ritual__ping` of a session, pass the stamp as `skill_stamp`
|
|
30
|
+
and, when present, the `cli_version:` value as `cli_version`. This is a silent provenance handshake:
|
|
31
|
+
it lets the server record which skill content + CLI version is driving the session, so support can
|
|
32
|
+
later tell a stale-skill issue from an old-CLI issue from a current-code bug. If the response says
|
|
29
33
|
`skillFreshness: "stale"`, relay its one-line hint ("Skill update available — run
|
|
30
34
|
`ritual init --skills-only` to refresh") exactly once, no pause, and continue with the current flow.
|
|
31
35
|
No stamp, or `in-sync`/`unknown` → say nothing. Never block on this.
|
|
@@ -141,7 +141,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
|
|
|
141
141
|
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.
|
|
142
142
|
|
|
143
143
|
<!-- lite:keep-start -->
|
|
144
|
-
<!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic
|
|
144
|
+
<!-- skill-options:no-gate-change: 2b (low-confidence clarifying question — server sets clarifyingQuestion only when confidence <20% or it defaulted) + 2c (confident generic — accept and proceed) are COPY variants of the same gate; options are unchanged (proceed | name-the-job; 2b adds answer-the-question, which is a name-the-job correction) -->
|
|
145
145
|
#### Step 0.7 — The Job gate: classify the job to be done
|
|
146
146
|
|
|
147
147
|
**The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
|
|
@@ -161,14 +161,18 @@ When this gate runs:
|
|
|
161
161
|
|
|
162
162
|
1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
|
|
163
163
|
classify yourself, do NOT pre-filter to development jobs. It returns
|
|
164
|
-
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
|
|
164
|
+
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, clarifyingQuestion?, personaCoverage }`.
|
|
165
165
|
`isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
|
|
166
166
|
result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
|
|
167
|
-
it is NOT a confident match, and which render variant you use in step 2 depends on it.
|
|
167
|
+
it is NOT a confident match, and which render variant you use in step 2 depends on it. On that
|
|
168
|
+
generic path the response also carries `clarifyingQuestion` — a plain-language question generated
|
|
169
|
+
from the user's ask, which step 2b renders verbatim to disambiguate toward a specific job.
|
|
168
170
|
|
|
169
171
|
2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
|
|
170
172
|
what you're about to build: restate the ask + the matched job in the user's words, then let them
|
|
171
|
-
confirm or correct.
|
|
173
|
+
confirm or correct. Route to a variant by the response: a **`clarifyingQuestion`** present → **2b**
|
|
174
|
+
(we're genuinely unsure — ask, but let them proceed); else `isGenericFallback` true → **2c** (a
|
|
175
|
+
confident generic build — accept and proceed); else → **2a** (a confident specific match).
|
|
172
176
|
|
|
173
177
|
**2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
|
|
174
178
|
|
|
@@ -181,14 +185,17 @@ When this gate runs:
|
|
|
181
185
|
Reply `proceed` if that's right, or tell me what to adjust.
|
|
182
186
|
```
|
|
183
187
|
|
|
184
|
-
**2b —
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
**2b — Genuinely unsure: ask, but let them proceed** (the response carries a **`clarifyingQuestion`**
|
|
189
|
+
— the server sets it ONLY when it was essentially guessing: numeric confidence below 20, or it
|
|
190
|
+
failed to classify and defaulted). A generic result alone does NOT land here — only a *low-confidence*
|
|
191
|
+
one does; a confident generic build goes to **2c**. The clarifying question is a single plain-language
|
|
192
|
+
question the server generated FROM the user's specific ask. **Render it verbatim** — it is grounded in
|
|
193
|
+
their words and leak-free. Do not rephrase it, do not append a menu, do not mention classification /
|
|
194
|
+
jobs / categories / confidence. The user has TWO ways out: answer to focus it, OR reply `proceed` to
|
|
195
|
+
continue with the deliverable. **Leak rule (load-bearing):** the rendered copy must NEVER say
|
|
196
|
+
"generic", "I couldn't classify", "fallback", "catch-all", or otherwise reveal that classification was
|
|
197
|
+
uncertain — that is internal state. Present it as a normal question about their ask. (See
|
|
198
|
+
`loud-fallback-escalation.md`.)
|
|
192
199
|
|
|
193
200
|
```text
|
|
194
201
|
Ritual build
|
|
@@ -196,34 +203,35 @@ When this gate runs:
|
|
|
196
203
|
|
|
197
204
|
You're looking to: {restate the ask in one short clause}
|
|
198
205
|
|
|
199
|
-
|
|
200
|
-
better when I know what KIND of work it is. Which is closest (or say it in your own words)?
|
|
201
|
-
• A coding-agent / MCP / skill capability — tooling the agent itself uses
|
|
202
|
-
• A backend service or API
|
|
203
|
-
• A frontend / UI feature
|
|
204
|
-
• A refactor, migration, or infra / platform change
|
|
205
|
-
• Something else — tell me in a sentence
|
|
206
|
+
{clarifyingQuestion — verbatim}
|
|
206
207
|
|
|
207
|
-
|
|
208
|
+
Answer in a sentence — or reply `proceed` and I'll continue with a {Deliverable}.
|
|
208
209
|
```
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
(Rare degraded case — you reached 2b but `clarifyingQuestion` is missing: ask which KIND of work it
|
|
212
|
+
is, with the same `proceed` option — • a coding-agent / MCP / skill capability • a backend service
|
|
213
|
+
or API • a frontend / UI feature • a refactor, migration, or infra change • something else, in your
|
|
214
|
+
own words.)
|
|
213
215
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
If the user ANSWERS, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
|
|
217
|
+
`correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a specific
|
|
218
|
+
job, otherwise **2c**. If the user replies `proceed`, go straight to **2c** (accept the generic).
|
|
219
|
+
|
|
220
|
+
**2c — Accept and proceed** (`isGenericFallback` is `true` with NO `clarifyingQuestion` — a
|
|
221
|
+
confident-enough generic build — OR the user chose to proceed from 2b, OR a re-classification is still
|
|
222
|
+
generic): do NOT interrogate. Present the deliverable as a normal accept-and-proceed — **same clean
|
|
223
|
+
shape as 2a**. Internally the job stays generic and is renamable later, but **the rendered copy must
|
|
224
|
+
NEVER say "generic", "couldn't classify", "fallback", or otherwise reveal that** — that is internal
|
|
225
|
+
state. Just name what Ritual will produce for their ask. (Never show a function-specific deliverable
|
|
226
|
+
like "Frontend Web" for an unclassified build — only the function-agnostic `Feature Brief`.)
|
|
218
227
|
|
|
219
228
|
```text
|
|
220
229
|
Ritual build
|
|
221
230
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
|
|
222
231
|
|
|
223
|
-
|
|
224
|
-
I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
|
|
232
|
+
Ritual will produce a {Deliverable} for {restate the ask in one short clause}.
|
|
225
233
|
|
|
226
|
-
Reply `proceed` to
|
|
234
|
+
Reply `proceed` if that's right, or tell me what to focus on.
|
|
227
235
|
```
|
|
228
236
|
|
|
229
237
|
Do not render `personaCoverage` — persona representation is handled server-side now; only surface
|
|
@@ -2198,7 +2206,7 @@ The Build Brief is the markdown document the engineer reads RIGHT BEFORE writing
|
|
|
2198
2206
|
Call `mcp__ritual__generate_build_brief` with:
|
|
2199
2207
|
|
|
2200
2208
|
- `exploration_id`
|
|
2201
|
-
- `icp` (
|
|
2209
|
+
- `icp` — **omit this.** The brief sources from the requirement set the flow already generated (on accept), whose ICP the server resolves from the exploration's persona/template. Passing a different ICP here forces a redundant requirement regeneration and a slow cold start. The engineering flavor is already baked into the server-resolved template — you do not need to (and should not) pass `TECH_PM` or any other ICP.
|
|
2202
2210
|
- `recon_context` — the Step 3 `codebase_context_packet` plus any explicit phase/later candidates from discovery. Do not pass raw recon notes. This grounds "Codebase Anchors" in real file paths while keeping agent hypotheses auditable and non-authoritative.
|
|
2203
2211
|
- `sources` — the **same** file-path array passed to `generate_considerations` and `generate_problem_statement` in Steps 4–5. Critical for KG consistency: the brief's "Previously Deferred" section only populates when overlapping prior implementations exist on these files.
|
|
2204
2212
|
|
|
@@ -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: d34e2df8a4177dbe -->
|
|
3
3
|
|
|
4
4
|
# /ritual lite — fast build (generated; do not edit)
|
|
5
5
|
|
|
@@ -233,7 +233,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
|
|
|
233
233
|
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.
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
<!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic
|
|
236
|
+
<!-- skill-options:no-gate-change: 2b (low-confidence clarifying question — server sets clarifyingQuestion only when confidence <20% or it defaulted) + 2c (confident generic — accept and proceed) are COPY variants of the same gate; options are unchanged (proceed | name-the-job; 2b adds answer-the-question, which is a name-the-job correction) -->
|
|
237
237
|
#### Step 0.7 — The Job gate: classify the job to be done
|
|
238
238
|
|
|
239
239
|
**The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
|
|
@@ -253,14 +253,18 @@ When this gate runs:
|
|
|
253
253
|
|
|
254
254
|
1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
|
|
255
255
|
classify yourself, do NOT pre-filter to development jobs. It returns
|
|
256
|
-
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
|
|
256
|
+
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, clarifyingQuestion?, personaCoverage }`.
|
|
257
257
|
`isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
|
|
258
258
|
result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
|
|
259
|
-
it is NOT a confident match, and which render variant you use in step 2 depends on it.
|
|
259
|
+
it is NOT a confident match, and which render variant you use in step 2 depends on it. On that
|
|
260
|
+
generic path the response also carries `clarifyingQuestion` — a plain-language question generated
|
|
261
|
+
from the user's ask, which step 2b renders verbatim to disambiguate toward a specific job.
|
|
260
262
|
|
|
261
263
|
2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
|
|
262
264
|
what you're about to build: restate the ask + the matched job in the user's words, then let them
|
|
263
|
-
confirm or correct.
|
|
265
|
+
confirm or correct. Route to a variant by the response: a **`clarifyingQuestion`** present → **2b**
|
|
266
|
+
(we're genuinely unsure — ask, but let them proceed); else `isGenericFallback` true → **2c** (a
|
|
267
|
+
confident generic build — accept and proceed); else → **2a** (a confident specific match).
|
|
264
268
|
|
|
265
269
|
**2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
|
|
266
270
|
|
|
@@ -273,14 +277,17 @@ When this gate runs:
|
|
|
273
277
|
Reply `proceed` if that's right, or tell me what to adjust.
|
|
274
278
|
```
|
|
275
279
|
|
|
276
|
-
**2b —
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
**2b — Genuinely unsure: ask, but let them proceed** (the response carries a **`clarifyingQuestion`**
|
|
281
|
+
— the server sets it ONLY when it was essentially guessing: numeric confidence below 20, or it
|
|
282
|
+
failed to classify and defaulted). A generic result alone does NOT land here — only a *low-confidence*
|
|
283
|
+
one does; a confident generic build goes to **2c**. The clarifying question is a single plain-language
|
|
284
|
+
question the server generated FROM the user's specific ask. **Render it verbatim** — it is grounded in
|
|
285
|
+
their words and leak-free. Do not rephrase it, do not append a menu, do not mention classification /
|
|
286
|
+
jobs / categories / confidence. The user has TWO ways out: answer to focus it, OR reply `proceed` to
|
|
287
|
+
continue with the deliverable. **Leak rule (load-bearing):** the rendered copy must NEVER say
|
|
288
|
+
"generic", "I couldn't classify", "fallback", "catch-all", or otherwise reveal that classification was
|
|
289
|
+
uncertain — that is internal state. Present it as a normal question about their ask. (See
|
|
290
|
+
`loud-fallback-escalation.md`.)
|
|
284
291
|
|
|
285
292
|
```text
|
|
286
293
|
Ritual build
|
|
@@ -288,34 +295,35 @@ When this gate runs:
|
|
|
288
295
|
|
|
289
296
|
You're looking to: {restate the ask in one short clause}
|
|
290
297
|
|
|
291
|
-
|
|
292
|
-
better when I know what KIND of work it is. Which is closest (or say it in your own words)?
|
|
293
|
-
• A coding-agent / MCP / skill capability — tooling the agent itself uses
|
|
294
|
-
• A backend service or API
|
|
295
|
-
• A frontend / UI feature
|
|
296
|
-
• A refactor, migration, or infra / platform change
|
|
297
|
-
• Something else — tell me in a sentence
|
|
298
|
+
{clarifyingQuestion — verbatim}
|
|
298
299
|
|
|
299
|
-
|
|
300
|
+
Answer in a sentence — or reply `proceed` and I'll continue with a {Deliverable}.
|
|
300
301
|
```
|
|
301
302
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
(Rare degraded case — you reached 2b but `clarifyingQuestion` is missing: ask which KIND of work it
|
|
304
|
+
is, with the same `proceed` option — • a coding-agent / MCP / skill capability • a backend service
|
|
305
|
+
or API • a frontend / UI feature • a refactor, migration, or infra change • something else, in your
|
|
306
|
+
own words.)
|
|
305
307
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
If the user ANSWERS, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
|
|
309
|
+
`correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a specific
|
|
310
|
+
job, otherwise **2c**. If the user replies `proceed`, go straight to **2c** (accept the generic).
|
|
311
|
+
|
|
312
|
+
**2c — Accept and proceed** (`isGenericFallback` is `true` with NO `clarifyingQuestion` — a
|
|
313
|
+
confident-enough generic build — OR the user chose to proceed from 2b, OR a re-classification is still
|
|
314
|
+
generic): do NOT interrogate. Present the deliverable as a normal accept-and-proceed — **same clean
|
|
315
|
+
shape as 2a**. Internally the job stays generic and is renamable later, but **the rendered copy must
|
|
316
|
+
NEVER say "generic", "couldn't classify", "fallback", or otherwise reveal that** — that is internal
|
|
317
|
+
state. Just name what Ritual will produce for their ask. (Never show a function-specific deliverable
|
|
318
|
+
like "Frontend Web" for an unclassified build — only the function-agnostic `Feature Brief`.)
|
|
310
319
|
|
|
311
320
|
```text
|
|
312
321
|
Ritual build
|
|
313
322
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
|
|
314
323
|
|
|
315
|
-
|
|
316
|
-
I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
|
|
324
|
+
Ritual will produce a {Deliverable} for {restate the ask in one short clause}.
|
|
317
325
|
|
|
318
|
-
Reply `proceed` to
|
|
326
|
+
Reply `proceed` if that's right, or tell me what to focus on.
|
|
319
327
|
```
|
|
320
328
|
|
|
321
329
|
Do not render `personaCoverage` — persona representation is handled server-side now; only surface
|
|
@@ -2262,7 +2270,7 @@ The Build Brief is the markdown document the engineer reads RIGHT BEFORE writing
|
|
|
2262
2270
|
Call `mcp__ritual__generate_build_brief` with:
|
|
2263
2271
|
|
|
2264
2272
|
- `exploration_id`
|
|
2265
|
-
- `icp` (
|
|
2273
|
+
- `icp` — **omit this.** The brief sources from the requirement set the flow already generated (on accept), whose ICP the server resolves from the exploration's persona/template. Passing a different ICP here forces a redundant requirement regeneration and a slow cold start. The engineering flavor is already baked into the server-resolved template — you do not need to (and should not) pass `TECH_PM` or any other ICP.
|
|
2266
2274
|
- `recon_context` — the Step 3 `codebase_context_packet` plus any explicit phase/later candidates from discovery. Do not pass raw recon notes. This grounds "Codebase Anchors" in real file paths while keeping agent hypotheses auditable and non-authoritative.
|
|
2267
2275
|
- `sources` — the **same** file-path array passed to `generate_considerations` and `generate_problem_statement` in Steps 4–5. Critical for KG consistency: the brief's "Previously Deferred" section only populates when overlapping prior implementations exist on these files.
|
|
2268
2276
|
|
|
@@ -3,7 +3,8 @@ 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:
|
|
6
|
+
stamp: c082a0648fbd
|
|
7
|
+
cli_version: 0.36.36
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# /ritual
|
|
@@ -24,8 +25,11 @@ Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual
|
|
|
24
25
|
<!-- skill-options:no-gate-change: grounding rule adds no [USER PAUSE] gate or options; read-before-claim discipline only -->
|
|
25
26
|
|
|
26
27
|
**Skill freshness (once per session, silent unless stale):** this file's frontmatter may carry a
|
|
27
|
-
`stamp:` value (injected when the bundle was built — absent on
|
|
28
|
-
`mcp__ritual__ping` of a session, pass
|
|
28
|
+
`stamp:` value and a `cli_version:` value (both injected when the bundle was built — absent on
|
|
29
|
+
dev/source copies). On the FIRST `mcp__ritual__ping` of a session, pass the stamp as `skill_stamp`
|
|
30
|
+
and, when present, the `cli_version:` value as `cli_version`. This is a silent provenance handshake:
|
|
31
|
+
it lets the server record which skill content + CLI version is driving the session, so support can
|
|
32
|
+
later tell a stale-skill issue from an old-CLI issue from a current-code bug. If the response says
|
|
29
33
|
`skillFreshness: "stale"`, relay its one-line hint ("Skill update available — run
|
|
30
34
|
`ritual init --skills-only` to refresh") exactly once, no pause, and continue with the current flow.
|
|
31
35
|
No stamp, or `in-sync`/`unknown` → say nothing. Never block on this.
|
|
@@ -141,7 +141,7 @@ If the user types `always audit for this build` mid-flow at the Step 9.6 prompt,
|
|
|
141
141
|
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.
|
|
142
142
|
|
|
143
143
|
<!-- lite:keep-start -->
|
|
144
|
-
<!-- skill-options:no-gate-change: 2b (clarifying question) + 2c (generic
|
|
144
|
+
<!-- skill-options:no-gate-change: 2b (low-confidence clarifying question — server sets clarifyingQuestion only when confidence <20% or it defaulted) + 2c (confident generic — accept and proceed) are COPY variants of the same gate; options are unchanged (proceed | name-the-job; 2b adds answer-the-question, which is a name-the-job correction) -->
|
|
145
145
|
#### Step 0.7 — The Job gate: classify the job to be done
|
|
146
146
|
|
|
147
147
|
**The FIRST tool call of a fresh build.** The server — not you — classifies the user's raw ask into
|
|
@@ -161,14 +161,18 @@ When this gate runs:
|
|
|
161
161
|
|
|
162
162
|
1. **Call `mcp__ritual__classify_work_item`** with `raw_input` = the user's ask, verbatim. Do NOT
|
|
163
163
|
classify yourself, do NOT pre-filter to development jobs. It returns
|
|
164
|
-
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, personaCoverage }`.
|
|
164
|
+
`{ jtbd, workItemLabel, deliverableTemplate, why, confidence, isGenericFallback, clarifyingQuestion?, personaCoverage }`.
|
|
165
165
|
`isGenericFallback` (and `confidence`) are the typed-uncertainty signal: when it's `true`, the
|
|
166
166
|
result is the catch-all (`build-feature` / `produce-deliverable`) or the classifier wasn't sure —
|
|
167
|
-
it is NOT a confident match, and which render variant you use in step 2 depends on it.
|
|
167
|
+
it is NOT a confident match, and which render variant you use in step 2 depends on it. On that
|
|
168
|
+
generic path the response also carries `clarifyingQuestion` — a plain-language question generated
|
|
169
|
+
from the user's ask, which step 2b renders verbatim to disambiguate toward a specific job.
|
|
168
170
|
|
|
169
171
|
2. **Render the validation prompt** (rail stage `Job`). This gate is a plain-language VALIDATION of
|
|
170
172
|
what you're about to build: restate the ask + the matched job in the user's words, then let them
|
|
171
|
-
confirm or correct.
|
|
173
|
+
confirm or correct. Route to a variant by the response: a **`clarifyingQuestion`** present → **2b**
|
|
174
|
+
(we're genuinely unsure — ask, but let them proceed); else `isGenericFallback` true → **2c** (a
|
|
175
|
+
confident generic build — accept and proceed); else → **2a** (a confident specific match).
|
|
172
176
|
|
|
173
177
|
**2a — Confident match** (`isGenericFallback` is `false`): the classifier matched a specific job.
|
|
174
178
|
|
|
@@ -181,14 +185,17 @@ When this gate runs:
|
|
|
181
185
|
Reply `proceed` if that's right, or tell me what to adjust.
|
|
182
186
|
```
|
|
183
187
|
|
|
184
|
-
**2b —
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
**2b — Genuinely unsure: ask, but let them proceed** (the response carries a **`clarifyingQuestion`**
|
|
189
|
+
— the server sets it ONLY when it was essentially guessing: numeric confidence below 20, or it
|
|
190
|
+
failed to classify and defaulted). A generic result alone does NOT land here — only a *low-confidence*
|
|
191
|
+
one does; a confident generic build goes to **2c**. The clarifying question is a single plain-language
|
|
192
|
+
question the server generated FROM the user's specific ask. **Render it verbatim** — it is grounded in
|
|
193
|
+
their words and leak-free. Do not rephrase it, do not append a menu, do not mention classification /
|
|
194
|
+
jobs / categories / confidence. The user has TWO ways out: answer to focus it, OR reply `proceed` to
|
|
195
|
+
continue with the deliverable. **Leak rule (load-bearing):** the rendered copy must NEVER say
|
|
196
|
+
"generic", "I couldn't classify", "fallback", "catch-all", or otherwise reveal that classification was
|
|
197
|
+
uncertain — that is internal state. Present it as a normal question about their ask. (See
|
|
198
|
+
`loud-fallback-escalation.md`.)
|
|
192
199
|
|
|
193
200
|
```text
|
|
194
201
|
Ritual build
|
|
@@ -196,34 +203,35 @@ When this gate runs:
|
|
|
196
203
|
|
|
197
204
|
You're looking to: {restate the ask in one short clause}
|
|
198
205
|
|
|
199
|
-
|
|
200
|
-
better when I know what KIND of work it is. Which is closest (or say it in your own words)?
|
|
201
|
-
• A coding-agent / MCP / skill capability — tooling the agent itself uses
|
|
202
|
-
• A backend service or API
|
|
203
|
-
• A frontend / UI feature
|
|
204
|
-
• A refactor, migration, or infra / platform change
|
|
205
|
-
• Something else — tell me in a sentence
|
|
206
|
+
{clarifyingQuestion — verbatim}
|
|
206
207
|
|
|
207
|
-
|
|
208
|
+
Answer in a sentence — or reply `proceed` and I'll continue with a {Deliverable}.
|
|
208
209
|
```
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
(Rare degraded case — you reached 2b but `clarifyingQuestion` is missing: ask which KIND of work it
|
|
212
|
+
is, with the same `proceed` option — • a coding-agent / MCP / skill capability • a backend service
|
|
213
|
+
or API • a frontend / UI feature • a refactor, migration, or infra change • something else, in your
|
|
214
|
+
own words.)
|
|
213
215
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
If the user ANSWERS, call `mcp__ritual__classify_work_item` AGAIN with the same `raw_input` plus
|
|
217
|
+
`correction` = their reply (and `previous_jtbd`), then re-render: **2a** if it now matched a specific
|
|
218
|
+
job, otherwise **2c**. If the user replies `proceed`, go straight to **2c** (accept the generic).
|
|
219
|
+
|
|
220
|
+
**2c — Accept and proceed** (`isGenericFallback` is `true` with NO `clarifyingQuestion` — a
|
|
221
|
+
confident-enough generic build — OR the user chose to proceed from 2b, OR a re-classification is still
|
|
222
|
+
generic): do NOT interrogate. Present the deliverable as a normal accept-and-proceed — **same clean
|
|
223
|
+
shape as 2a**. Internally the job stays generic and is renamable later, but **the rendered copy must
|
|
224
|
+
NEVER say "generic", "couldn't classify", "fallback", or otherwise reveal that** — that is internal
|
|
225
|
+
state. Just name what Ritual will produce for their ask. (Never show a function-specific deliverable
|
|
226
|
+
like "Frontend Web" for an unclassified build — only the function-agnostic `Feature Brief`.)
|
|
218
227
|
|
|
219
228
|
```text
|
|
220
229
|
Ritual build
|
|
221
230
|
● Job ○ Scope ○ Discovery ○ Recommendations ○ Feature Brief
|
|
222
231
|
|
|
223
|
-
|
|
224
|
-
I'll treat this as a generic build — deliverable: Feature Brief. You can rename the job later.
|
|
232
|
+
Ritual will produce a {Deliverable} for {restate the ask in one short clause}.
|
|
225
233
|
|
|
226
|
-
Reply `proceed` to
|
|
234
|
+
Reply `proceed` if that's right, or tell me what to focus on.
|
|
227
235
|
```
|
|
228
236
|
|
|
229
237
|
Do not render `personaCoverage` — persona representation is handled server-side now; only surface
|
|
@@ -2198,7 +2206,7 @@ The Build Brief is the markdown document the engineer reads RIGHT BEFORE writing
|
|
|
2198
2206
|
Call `mcp__ritual__generate_build_brief` with:
|
|
2199
2207
|
|
|
2200
2208
|
- `exploration_id`
|
|
2201
|
-
- `icp` (
|
|
2209
|
+
- `icp` — **omit this.** The brief sources from the requirement set the flow already generated (on accept), whose ICP the server resolves from the exploration's persona/template. Passing a different ICP here forces a redundant requirement regeneration and a slow cold start. The engineering flavor is already baked into the server-resolved template — you do not need to (and should not) pass `TECH_PM` or any other ICP.
|
|
2202
2210
|
- `recon_context` — the Step 3 `codebase_context_packet` plus any explicit phase/later candidates from discovery. Do not pass raw recon notes. This grounds "Codebase Anchors" in real file paths while keeping agent hypotheses auditable and non-authoritative.
|
|
2203
2211
|
- `sources` — the **same** file-path array passed to `generate_considerations` and `generate_problem_statement` in Steps 4–5. Critical for KG consistency: the brief's "Previously Deferred" section only populates when overlapping prior implementations exist on these files.
|
|
2204
2212
|
|