@ritualai/cli 0.7.16 → 0.8.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/init.js +406 -96
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/build-flow-explainer.js +226 -0
- package/dist/lib/build-flow-explainer.js.map +1 -0
- package/dist/lib/final-cta-box.js +224 -0
- package/dist/lib/final-cta-box.js.map +1 -0
- package/dist/lib/onboarding-state.js +140 -0
- package/dist/lib/onboarding-state.js.map +1 -0
- package/dist/lib/persona-picker.js +171 -0
- package/dist/lib/persona-picker.js.map +1 -0
- package/dist/lib/persona-samples.js +245 -0
- package/dist/lib/persona-samples.js.map +1 -0
- package/dist/lib/project-config.js.map +1 -1
- package/dist/lib/workspace-explainer.js +193 -0
- package/dist/lib/workspace-explainer.js.map +1 -0
- package/dist/lib/workspace-flow.js +8 -7
- package/dist/lib/workspace-flow.js.map +1 -1
- package/package.json +73 -73
- package/skills/claude-code/ritual/.ritual-bundle.json +2 -2
- package/skills/claude-code/ritual/references/build-flow.md +51 -14
- package/skills/codex/ritual/.ritual-bundle.json +2 -2
- package/skills/codex/ritual/references/build-flow.md +51 -14
- package/skills/cursor/ritual/.ritual-bundle.json +2 -2
- package/skills/cursor/ritual/references/build-flow.md +51 -14
- package/skills/gemini/ritual/.ritual-bundle.json +2 -2
- package/skills/gemini/ritual/references/build-flow.md +51 -14
- package/skills/kiro/ritual/.ritual-bundle.json +2 -2
- package/skills/kiro/ritual/references/build-flow.md +51 -14
- package/skills/vscode/ritual/.ritual-bundle.json +2 -2
- package/skills/vscode/ritual/references/build-flow.md +51 -14
|
@@ -121,7 +121,7 @@ Store `workspace_id` for the rest of the flow.
|
|
|
121
121
|
|
|
122
122
|
If you created a new workspace, persist the binding to `.ritual/config.json` so future runs in this repo skip the workspace-selection prompt. Write it yourself if you have filesystem write access; otherwise show the user the JSON and have them save it.
|
|
123
123
|
|
|
124
|
-
**`.ritual/config.json` is committed to the repo — it is shared, not per-user.** Same model as `.eslintrc.json` or `tsconfig.json`: it binds this codebase to a Ritual workspace + pins team-level defaults (workspaceId
|
|
124
|
+
**`.ritual/config.json` is committed to the repo — it is shared, not per-user.** Same model as `.eslintrc.json` or `tsconfig.json`: it binds this codebase to a Ritual workspace + pins team-level defaults (`workspaceId`, `personaSlug` — set by `ritual init`'s FTUE — or the legacy `defaultTemplateId`). Everyone working on this repo wants the same values. Per-user state (PATs, auth tokens) lives in `~/.config/ritual/` and never in this file.
|
|
125
125
|
|
|
126
126
|
When you write the config, also write `.ritual/.gitignore` if it doesn't already exist so any future per-user state files in this directory get ignored while `config.json` itself stays tracked:
|
|
127
127
|
|
|
@@ -446,16 +446,48 @@ Templates shape the structure of considerations, the problem statement, and the
|
|
|
446
446
|
|
|
447
447
|
Resolution order:
|
|
448
448
|
|
|
449
|
-
1. **
|
|
449
|
+
1. **Persona-pinned default (preferred — FTUE-set).** Check `.ritual/config.json` for a `personaSlug` field. If present, that slug **is the template id** (Engineering template families are seeded with `schema.id === <slug>` — see `apps/cli/src/lib/persona-samples.ts`). Use it directly as `template_id` without calling `mcp__ritual__list_templates` and without pausing. This is the common case: the user picked a persona during `ritual init`'s FTUE, the slug was persisted to `.ritual/config.json`, and `/ritual build` should respect that pick.
|
|
450
450
|
|
|
451
|
-
|
|
451
|
+
**Frame this as a persona + scope-of-work confirmation, not a template confirmation.** "Template" is an internal noun the user hasn't seen — they picked a *persona* during FTUE and what they care about now is "is the persona right + what does that mean for this feature?" Use the `PERSONA_DISPLAY` table below to look up the friendly label from the slug.
|
|
452
452
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
>
|
|
456
|
-
>
|
|
453
|
+
User-visible (one short pause that confirms persona + lists the scope sections, NOT a tool-call prompt):
|
|
454
|
+
|
|
455
|
+
> You're set up as **{personaLabel}**.
|
|
456
|
+
>
|
|
457
|
+
> For this feature, we'll work through: scope · non-goals · requirements · acceptance criteria · dependencies · metrics · open questions.
|
|
458
|
+
>
|
|
459
|
+
> Sound right? Reply `go` to continue, or `change role` to pick a different persona.
|
|
460
|
+
|
|
461
|
+
Do **NOT** call `mcp__ritual__list_templates` in this branch. It's wasted ceremony — both for latency (round-trip + LLM context bloat) and for UX (pre-FTUE this step was a real decision; with `personaSlug` already pinned it's a confirmation prompt the user can't meaningfully act on).
|
|
462
|
+
|
|
463
|
+
**`PERSONA_DISPLAY` lookup table** (slug → label, mirrors `apps/cli/src/lib/persona-samples.ts#PERSONA_SAMPLES`). If the slug isn't here (a custom or future persona), fall back to humanizing the slug (e.g. `frontend-web` → `Frontend Web`):
|
|
464
|
+
|
|
465
|
+
| slug | label |
|
|
466
|
+
| --- | --- |
|
|
467
|
+
| backend-services | Backend Services |
|
|
468
|
+
| frontend-web | Frontend Web |
|
|
469
|
+
| data-engineering | Data Engineering |
|
|
470
|
+
| ml-engineering | ML Engineering |
|
|
471
|
+
| platform-engineering | Platform Engineering |
|
|
472
|
+
| security-engineering | Security Engineering |
|
|
473
|
+
| developer-tooling | Developer Tooling |
|
|
474
|
+
| embedded-firmware | Embedded / Firmware |
|
|
475
|
+
| game-development | Game Development |
|
|
476
|
+
| smart-contracts | Smart Contracts |
|
|
477
|
+
| desktop-apps | Desktop Apps |
|
|
478
|
+
| qa-engineering | QA Engineering |
|
|
457
479
|
|
|
458
|
-
|
|
480
|
+
**If user replies `change role`** (or `template: list`, retained as a power-user alias): fall through to Branch 3 (`list_templates`). Otherwise treat any non-empty reply that isn't a recognized override command as `go`.
|
|
481
|
+
|
|
482
|
+
2. **Legacy template pin.** If `personaSlug` is missing but `.ritual/config.json` has the legacy `defaultTemplateId` field (older inits before FTUE), use that as `template_id` without pausing. Same confirmation shape as Branch 1, but the role name comes from the template — call `mcp__ritual__list_templates` ONCE to resolve the display name (the legacy pin gave us an id, not a label), then show:
|
|
483
|
+
|
|
484
|
+
> You're set up with **{templateName}**.
|
|
485
|
+
>
|
|
486
|
+
> For this feature, we'll work through: scope · non-goals · requirements · acceptance criteria · dependencies · metrics · open questions.
|
|
487
|
+
>
|
|
488
|
+
> Sound right? Reply `go` to continue, or `change role` to pick a different persona.
|
|
489
|
+
|
|
490
|
+
3. **No pin — pick a recommended default + offer alternatives.** Only when neither `personaSlug` nor `defaultTemplateId` is set, call `mcp__ritual__list_templates`. From the response, pick the first template matching this fallback chain:
|
|
459
491
|
- Name matches `/Feature Specification.*Agentic Coding/i` — canonical default for code-aware builds
|
|
460
492
|
- Name matches `/Technical Detail PRD/i`
|
|
461
493
|
- Name matches `/Engineering Spec|Technical (Detail|Spec)/i`
|
|
@@ -468,13 +500,13 @@ Resolution order:
|
|
|
468
500
|
>
|
|
469
501
|
> Reply `go`, `list`, or `template: {name}`.
|
|
470
502
|
|
|
471
|
-
|
|
503
|
+
4. **If the user types `list`** (in any branch, override path): call `mcp__ritual__list_templates` if you haven't yet, then present a numbered menu of all SYSTEM-type templates. Skip CUSTOM templates by default to avoid menu sprawl unless the user gives a specific custom id/name. Each line: `{N}. {name} — {short description}`. Wait for a number selection.
|
|
472
504
|
|
|
473
|
-
|
|
505
|
+
5. **If the user types `template: {name}` or picks one by name:** call `mcp__ritual__list_templates` if you haven't yet, then find the case-insensitive partial match. If ambiguous, show only the matching options and ask which one. If no match, show the SYSTEM template menu.
|
|
474
506
|
|
|
475
|
-
|
|
507
|
+
6. **Remember `template_id`.** It passes through every subsequent phase — `generate_considerations`, `refine_considerations`, `generate_problem_statement`, `refine_problem_statement`, and ultimately `create_exploration`. The API uses it to load template-specific anti-patterns + focus keywords into the LLM prompt, so it materially shapes output quality.
|
|
476
508
|
|
|
477
|
-
|
|
509
|
+
7. **Track role silently.** Infer `role` from the selected template and carry it forward for:
|
|
478
510
|
- recommendation tone
|
|
479
511
|
- sibling exploration cap
|
|
480
512
|
- Step 8 run-mode default
|
|
@@ -501,11 +533,15 @@ Resolution order:
|
|
|
501
533
|
|
|
502
534
|
If the user corrects the role (e.g. "actually I'm building a PRD"), update internal role tracking. Do **not** re-pick the template unless the user explicitly asks to change it.
|
|
503
535
|
|
|
504
|
-
|
|
536
|
+
8. **Suggest persistence only when useful.** If you got here via Branch 3 (no pinned default, you picked one from the list), AND the user accepted with `go` rather than picking a different one, suggest:
|
|
505
537
|
|
|
506
538
|
> Want me to pin this template for future `/ritual build` runs in this repo? I can add `"defaultTemplateId": "{id}"` to `.ritual/config.json`.
|
|
507
539
|
|
|
508
|
-
If the user says yes, write the field while preserving existing keys.
|
|
540
|
+
If the user says yes, write the field while preserving existing keys. Use the `defaultTemplateId` field (not `personaSlug`) when the user picked a template directly — `personaSlug` is reserved for the FTUE persona pick (where the slug semantically maps to one of the 12 Engineering personas). The SKILL reads `personaSlug` first, then `defaultTemplateId`, so either field works as a pin; the distinction is provenance.
|
|
541
|
+
|
|
542
|
+
This is a TEAM pin — `.ritual/config.json` is committed to the repo per Step 1, so the whole team picks up the same default.
|
|
543
|
+
|
|
544
|
+
**Do NOT suggest persistence in Branches 1 or 2** (persona-pinned or legacy-pinned). The pin already exists; offering to write it would be confusing.
|
|
509
545
|
|
|
510
546
|
Proceed to Step 3 once a template is selected. No extra confirmation is required after a pinned template or an accepted default.
|
|
511
547
|
|
|
@@ -1061,6 +1097,7 @@ Call `mcp__ritual__create_exploration` with:
|
|
|
1061
1097
|
- `workspace_id`
|
|
1062
1098
|
- `name`
|
|
1063
1099
|
- `problem_statement` (the scope from Step 5)
|
|
1100
|
+
- `template_id` — **REQUIRED.** Pass the same `template_id` used in Steps 4 and 5 (the one established in Step 2 from `personaSlug` / `defaultTemplateId` / picker). The exploration must carry this forward so downstream `start_agentic_run`, `get_recommendations`, and `generate_build_brief` load the right template-specific anti-patterns + focus keywords into the LLM prompts. Skipping `template_id` here silently falls back to the API default, which produces generic recs that don't match the persona's scope contract — the symptom is brief sections that don't align with what the user was promised at Step 2 ("For this feature, we'll work through: scope · non-goals · requirements …"). Always include it; the MCP tool accepts it (see `apps/mcp/src/mcp/tools/create-exploration.tool.ts:78`).
|
|
1064
1101
|
- `agentic: false` — **do NOT** pass `agentic: true`. We want explicit per-step control so the user gets to pick discovery questions in Step 7. Auto-agentic skips that.
|
|
1065
1102
|
|
|
1066
1103
|
Store `exploration_id`. Move the progress header from Scope to Discovery:
|