@ritualai/cli 0.24.0 → 0.36.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/build.js +89 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/init.js +95 -109
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.js +6 -1
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/agents/configure-mcp.js +63 -0
- package/dist/lib/agents/configure-mcp.js.map +1 -1
- package/dist/lib/agents/launch.js +70 -0
- package/dist/lib/agents/launch.js.map +1 -0
- package/dist/lib/agents/providers.js +8 -2
- package/dist/lib/agents/providers.js.map +1 -1
- package/dist/lib/final-cta-box.js +22 -10
- package/dist/lib/final-cta-box.js.map +1 -1
- package/dist/lib/help-style.js +65 -0
- package/dist/lib/help-style.js.map +1 -0
- package/dist/lib/onboarding-state.js +9 -8
- package/dist/lib/onboarding-state.js.map +1 -1
- package/dist/lib/uninstall-plan.js +18 -1
- package/dist/lib/uninstall-plan.js.map +1 -1
- package/dist/lib/workspace-explainer.js +42 -111
- package/dist/lib/workspace-explainer.js.map +1 -1
- package/dist/lib/workspace-flow.js +4 -1
- package/dist/lib/workspace-flow.js.map +1 -1
- package/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +3 -2
- package/skills/claude-code/ritual/SKILL.md +8 -0
- package/skills/claude-code/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/claude-code/ritual/references/build-flow.md +485 -456
- package/skills/claude-code/ritual/references/cli-output-contract.md +111 -39
- package/skills/claude-code/ritual/references/lite-flow.md +494 -462
- package/skills/claude-code/ritual/references/resume-flow.md +1 -1
- package/skills/codex/ritual/.ritual-bundle.json +3 -2
- package/skills/codex/ritual/SKILL.md +8 -0
- package/skills/codex/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/codex/ritual/references/build-flow.md +485 -456
- package/skills/codex/ritual/references/cli-output-contract.md +111 -39
- package/skills/codex/ritual/references/lite-flow.md +494 -462
- package/skills/codex/ritual/references/resume-flow.md +1 -1
- package/skills/cursor/ritual/.ritual-bundle.json +3 -2
- package/skills/cursor/ritual/SKILL.md +8 -0
- package/skills/cursor/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/cursor/ritual/references/build-flow.md +485 -456
- package/skills/cursor/ritual/references/cli-output-contract.md +111 -39
- package/skills/cursor/ritual/references/lite-flow.md +494 -462
- package/skills/cursor/ritual/references/resume-flow.md +1 -1
- package/skills/gemini/ritual/.ritual-bundle.json +3 -2
- package/skills/gemini/ritual/SKILL.md +8 -0
- package/skills/gemini/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/gemini/ritual/references/build-flow.md +485 -456
- package/skills/gemini/ritual/references/cli-output-contract.md +111 -39
- package/skills/gemini/ritual/references/lite-flow.md +494 -462
- package/skills/gemini/ritual/references/resume-flow.md +1 -1
- package/skills/kiro/ritual/.ritual-bundle.json +3 -2
- package/skills/kiro/ritual/SKILL.md +8 -0
- package/skills/kiro/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/kiro/ritual/references/build-flow.md +485 -456
- package/skills/kiro/ritual/references/cli-output-contract.md +111 -39
- package/skills/kiro/ritual/references/lite-flow.md +494 -462
- package/skills/kiro/ritual/references/resume-flow.md +1 -1
- package/skills/vscode/ritual/.ritual-bundle.json +3 -2
- package/skills/vscode/ritual/SKILL.md +8 -0
- package/skills/vscode/ritual/references/brief-verification-checklist.md +12 -6
- package/skills/vscode/ritual/references/build-flow.md +485 -456
- package/skills/vscode/ritual/references/cli-output-contract.md +111 -39
- package/skills/vscode/ritual/references/lite-flow.md +494 -462
- package/skills/vscode/ritual/references/resume-flow.md +1 -1
- package/dist/lib/build-flow-explainer.js +0 -226
- package/dist/lib/build-flow-explainer.js.map +0 -1
- package/dist/lib/persona-picker.js +0 -171
- package/dist/lib/persona-picker.js.map +0 -1
|
@@ -3,17 +3,23 @@
|
|
|
3
3
|
* Workspace explainer — onboarding screen #2 of 3.
|
|
4
4
|
*
|
|
5
5
|
* Shown once per machine on first `ritual init` (gated by
|
|
6
|
-
* onboarding-state.ts). Teaches the user the
|
|
6
|
+
* onboarding-state.ts). Teaches the user ONE idea — the memory loop:
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* you build a feature → the workspace remembers what it settled
|
|
9
|
+
* (decisions, constraints, what shipped) → your next build starts
|
|
10
|
+
* from there instead of from zero.
|
|
11
|
+
*
|
|
12
|
+
* 2026-06-11 rewrite: the previous version rendered a topology diagram
|
|
13
|
+
* (three exploration cards fanning into a "shared context · knowledge
|
|
14
|
+
* graph" strip) plus the landing-page value-prop line. True, but it
|
|
15
|
+
* explained our architecture when the user needs the BENEFIT. The loop
|
|
16
|
+
* diagram is the whole product in one arrow that bends back; the three
|
|
17
|
+
* memory bullets map to real mechanisms (KG decisions, anti-goals,
|
|
18
|
+
* sync_implementation lineage) spoken in the user's words.
|
|
12
19
|
*
|
|
13
20
|
* Personalized via:
|
|
14
21
|
* - Workspace name (git-remote-detected, falls back to cwd basename)
|
|
15
|
-
* - Persona
|
|
16
|
-
* exploration names from persona-samples.ts
|
|
22
|
+
* - Persona accent color (when a stored/--persona pick exists)
|
|
17
23
|
*
|
|
18
24
|
* Non-TTY fallback: terse 3-line summary printed via printTerse().
|
|
19
25
|
* Caller is expected to check tty + onboarding state before calling
|
|
@@ -39,55 +45,34 @@ function printWorkspaceExplainer(opts) {
|
|
|
39
45
|
const persona = (0, persona_samples_1.findPersona)(opts.personaSlug) ?? persona_samples_1.GENERIC_PERSONA;
|
|
40
46
|
const accent = persona.accent;
|
|
41
47
|
const lines = [];
|
|
42
|
-
// Title bar carries the workspace name + brand-teal accent. The
|
|
43
|
-
// body BELOW it actually teaches what a workspace IS (replaces an
|
|
44
|
-
// earlier draft that just labeled "workspace: foo / you build: bar"
|
|
45
|
-
// without explaining the concept — the visual cards alone weren't
|
|
46
|
-
// enough to land it).
|
|
47
48
|
lines.push(box.top(BOX_WIDTH, (0, colors_1.color)(accent, `─ workspace: "${opts.workspaceName}" `)));
|
|
48
49
|
lines.push(box.padded(BOX_WIDTH, ''));
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// you'd actually merge"). One bold opener + two dim continuation
|
|
53
|
-
// lines so the eye lands on the verb-noun phrases without the
|
|
54
|
-
// outcome clause getting lost in the wrap.
|
|
55
|
-
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'where structured discovery, living specs, and plans with')}`));
|
|
56
|
-
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'less guesswork come together —')}`));
|
|
57
|
-
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.dim)('so AI agents land changes you\'d actually merge.')}`));
|
|
50
|
+
// The framing sentence — what I'm about to do, and what it buys.
|
|
51
|
+
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, "Next, I'll link this repo to a workspace — Ritual's memory")}`));
|
|
52
|
+
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'for the context and reasoning behind every build.')}`));
|
|
58
53
|
lines.push(box.padded(BOX_WIDTH, ''));
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
lines.push(box.padded(BOX_WIDTH, '
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
' └' + '─'.repeat(65) + '┘',
|
|
77
|
-
];
|
|
78
|
-
for (const cl of contextLines) {
|
|
79
|
-
lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('│ ') + (0, colors_1.color)(accent, cl) + (0, colors_1.dim)(' │')));
|
|
80
|
-
}
|
|
81
|
-
lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('│') + ' '.repeat(BOX_WIDTH - 8) + (0, colors_1.dim)('│')));
|
|
82
|
-
lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('└' + '─'.repeat(BOX_WIDTH - 8) + '┘')));
|
|
54
|
+
// The memory loop. Hardcoded layout — every line ≤ 62 visible chars,
|
|
55
|
+
// well inside the BOX_WIDTH - 4 inner budget. The accent colors the
|
|
56
|
+
// memory box (the thing the workspace IS); the loop chrome stays dim.
|
|
57
|
+
const A = (s) => (0, colors_1.color)(accent, s);
|
|
58
|
+
const D = (s) => (0, colors_1.dim)(s);
|
|
59
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('┌──────────────────┐') + ' ' + A('┌────────────────────────────┐')));
|
|
60
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('│') + ' you build a ' + D('│') + D(' ───▶ ') + A('│') + ' the workspace remembers ' + A('│')));
|
|
61
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('│') + ' feature ' + D('│') + ' ' + A('│') + ' · decisions you made ' + A('│')));
|
|
62
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('└──────────────────┘') + ' ' + A('│') + ' · constraints you set ' + A('│')));
|
|
63
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('▲') + ' ' + A('│') + ' · what actually shipped ' + A('│')));
|
|
64
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('│') + ' ' + A('└──────────────┬─────────────┘')));
|
|
65
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('│') + ' ' + D('│')));
|
|
66
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + D('└──── ') + 'your next build' + D(' ◀─────────┘')));
|
|
67
|
+
lines.push(box.padded(BOX_WIDTH, ' ' + (0, colors_1.dim)('starts from here')));
|
|
68
|
+
lines.push(box.padded(BOX_WIDTH, ''));
|
|
69
|
+
// The payoff, concrete.
|
|
70
|
+
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'so build #5 never re-asks what build #1 already settled.')}`));
|
|
83
71
|
lines.push(box.padded(BOX_WIDTH, ''));
|
|
84
72
|
// What you'll do here. Kept short: only commands that exist + are
|
|
85
|
-
// expected to be the first thing the user reaches for.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
// don't want to teach a command that doesn't work yet.
|
|
89
|
-
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, 'what you\'ll do here:')}`));
|
|
90
|
-
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.dim)('›')} /ritual build <feature> ${(0, colors_1.dim)('create an exploration')}`));
|
|
73
|
+
// expected to be the first thing the user reaches for.
|
|
74
|
+
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.boldColor)(accent, "what you'll do here:")}`));
|
|
75
|
+
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.dim)('›')} /ritual build <feature> ${(0, colors_1.dim)('start a build')}`));
|
|
91
76
|
lines.push(box.padded(BOX_WIDTH, ` ${(0, colors_1.dim)('›')} /ritual resume ${(0, colors_1.dim)('pick up where you left off')}`));
|
|
92
77
|
lines.push(box.padded(BOX_WIDTH, ''));
|
|
93
78
|
lines.push(box.bottom(BOX_WIDTH));
|
|
@@ -97,73 +82,19 @@ function printWorkspaceExplainer(opts) {
|
|
|
97
82
|
}
|
|
98
83
|
/**
|
|
99
84
|
* Terse single-line-per-concept fallback for non-TTY or narrow
|
|
100
|
-
* terminals. No colors, no boxes — just the teaching.
|
|
85
|
+
* terminals. No colors, no boxes — just the teaching, same loop.
|
|
101
86
|
*/
|
|
102
87
|
function printWorkspaceExplainerTerse(opts) {
|
|
103
|
-
|
|
104
|
-
// the framing line was pulled in favor of an actual definition.
|
|
105
|
-
// Persona-specific examples still surface in the rich version.
|
|
106
|
-
void (0, persona_samples_1.findPersona)(opts.personaSlug);
|
|
107
|
-
process.stdout.write(`\n workspace: "${opts.workspaceName}"\n`);
|
|
88
|
+
process.stdout.write(`\n workspace "${opts.workspaceName}" — Ritual's memory for the context and reasoning behind every build.\n`);
|
|
108
89
|
process.stdout.write('\n');
|
|
109
|
-
process.stdout.write('
|
|
110
|
-
process.stdout.write('
|
|
111
|
-
process.stdout.write(' actually merge.\n');
|
|
90
|
+
process.stdout.write(' build a feature -> it remembers (decisions · constraints · what shipped)\n');
|
|
91
|
+
process.stdout.write(' -> your next build starts from there, not from zero.\n');
|
|
112
92
|
process.stdout.write('\n');
|
|
113
|
-
process.stdout.write(' Use /ritual build <feature> to
|
|
114
|
-
process.stdout.write('
|
|
93
|
+
process.stdout.write(' Use /ritual build <feature> to start a build. /ritual resume to pick up\n');
|
|
94
|
+
process.stdout.write(' where you left off.\n');
|
|
115
95
|
process.stdout.write('\n');
|
|
116
96
|
}
|
|
117
97
|
// ─── helpers ────────────────────────────────────────────────────────────────
|
|
118
|
-
/**
|
|
119
|
-
* Render the 3 exploration cards as a single 4-line column-block:
|
|
120
|
-
* top border with the "exploration" label, two title lines (most
|
|
121
|
-
* titles wrap to 2; short ones get a blank second line), bottom
|
|
122
|
-
* border. Lifecycle bullets used to live here; they were dropped
|
|
123
|
-
* because they teach the SAME thing as the build-flow explainer's
|
|
124
|
-
* phase chain (which is the right place for that detail). The
|
|
125
|
-
* workspace explainer should only convey the unit + that multiple
|
|
126
|
-
* units coexist in a workspace.
|
|
127
|
-
*
|
|
128
|
-
* Each card is 18 visible chars wide (`┌─ exploration ──┐`); 3 cards
|
|
129
|
-
* + 2 separators (2 spaces each) = 18*3 + 4 = 58 chars, well within
|
|
130
|
-
* the BOX_WIDTH - 8 = 70 inner budget.
|
|
131
|
-
*/
|
|
132
|
-
function renderExplorationCardsRow(persona) {
|
|
133
|
-
const titles = persona.sampleExplorations;
|
|
134
|
-
// Card body width (inside the side `│ … │` chars). Matches the
|
|
135
|
-
// width of the top/bottom borders so all three rows align cleanly.
|
|
136
|
-
const bodyW = 14;
|
|
137
|
-
// Wrap each title to 2 lines; pad the second line with empty so
|
|
138
|
-
// short titles still occupy the full card height.
|
|
139
|
-
const wrap = (s) => {
|
|
140
|
-
if (s.length <= bodyW)
|
|
141
|
-
return [s, ''];
|
|
142
|
-
const cut = s.slice(0, bodyW).lastIndexOf(' ');
|
|
143
|
-
if (cut <= 0)
|
|
144
|
-
return [s.slice(0, bodyW), s.slice(bodyW, 2 * bodyW)];
|
|
145
|
-
return [s.slice(0, cut), s.slice(cut + 1, cut + 1 + bodyW)];
|
|
146
|
-
};
|
|
147
|
-
const wrapped = titles.map(wrap);
|
|
148
|
-
const pad = (s) => s.padEnd(bodyW, ' ');
|
|
149
|
-
const top = '┌─ exploration ──┐';
|
|
150
|
-
const mid = '│';
|
|
151
|
-
const bot = '└────────────────┘';
|
|
152
|
-
const lines = [];
|
|
153
|
-
// Top border × 3
|
|
154
|
-
lines.push([top, top, top].join(' '));
|
|
155
|
-
// Title line 1 × 3
|
|
156
|
-
lines.push([wrapped[0][0], wrapped[1][0], wrapped[2][0]]
|
|
157
|
-
.map((t) => `${mid} ${pad(t)} ${mid}`)
|
|
158
|
-
.join(' '));
|
|
159
|
-
// Title line 2 × 3 (blank for short titles)
|
|
160
|
-
lines.push([wrapped[0][1], wrapped[1][1], wrapped[2][1]]
|
|
161
|
-
.map((t) => `${mid} ${pad(t)} ${mid}`)
|
|
162
|
-
.join(' '));
|
|
163
|
-
// Bottom border × 3
|
|
164
|
-
lines.push([bot, bot, bot].join(' '));
|
|
165
|
-
return lines;
|
|
166
|
-
}
|
|
167
98
|
/**
|
|
168
99
|
* Minimal box-drawing helpers. Local to this module to keep the
|
|
169
100
|
* file self-contained; if the workspace + build-flow explainers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-explainer.js","sourceRoot":"","sources":["../../src/lib/workspace-explainer.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"workspace-explainer.js","sourceRoot":"","sources":["../../src/lib/worksp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AC,KAAK,CAAC,CAAC;QAClC,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9C,OAAO,KAAK,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC;IAC5D,CAAC;IACD,MAAM,CAAC,KAAa;QACnB,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;IAC1C,CAAC;IACD,MAAM,CAAC,KAAa,EAAE,OAAe;QACpC,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QACjE,OAAO,IAAI,OAAO,GAAG,GAAG,GAAG,CAAC;IAC7B,CAAC;CACD,CAAC;AAEF,8DAA8D;AAC9D,SAAS,SAAS,CAAC,CAAS;IAC3B,4CAA4C;IAC5C,OAAO,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -32,7 +32,10 @@ async function resolveProjectWorkspace(opts) {
|
|
|
32
32
|
console.log('');
|
|
33
33
|
let answer;
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
// Phrased as the workspace explainer's confirm button — the box
|
|
36
|
+
// above just said "Next, I'll link this repo to a workspace", so
|
|
37
|
+
// this reads as ONE continuous beat, not a new question.
|
|
38
|
+
answer = await (0, prompt_1.prompt)(` › press Enter to create "${detection.name}" — or type a different name (n to skip): `);
|
|
36
39
|
}
|
|
37
40
|
catch {
|
|
38
41
|
// stdin closed / Ctrl-D — treat as skip.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-flow.js","sourceRoot":"","sources":["../../src/lib/workspace-flow.ts"],"names":[],"mappings":";;AAsEA,
|
|
1
|
+
{"version":3,"file":"workspace-flow.js","sourceRoot":"","sources":["../../src/lib/workspace-flow.ts"],"names":[],"mappings":";;AAsEA,0DAgGC;AArKD,qDAI0B;AAC1B,2CAA6C;AAC7C,qCAAkC;AA+D3B,KAAK,UAAU,uBAAuB,CAC5C,IAA6B;IAE7B,kEAAkE;IAClE,MAAM,QAAQ,GAAG,IAAA,kCAAiB,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpD,IAAI,QAAQ,EAAE,CAAC;QACd,OAAO;YACN,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,aAAa,EAAE,QAAQ,CAAC,aAAa;YACrC,OAAO,EAAE,KAAK;SACd,CAAC;IACH,CAAC;IAED,kEAAkE;IAClE,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;IAEhE,IAAI,CAAC,WAAW,EAAE,CAAC;QAClB,uDAAuD;QACvD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,SAAS,GAAG,IAAA,0BAAc,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAElD,6DAA6D;IAC7D,iEAAiE;IACjE,8DAA8D;IAC9D,gEAAgE;IAChE,gEAAgE;IAChE,8DAA8D;IAC9D,4DAA4D;IAC5D,gDAAgD;IAChD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,IAAI,MAAc,CAAC;IACnB,IAAI,CAAC;QACJ,gEAAgE;QAChE,iEAAiE;QACjE,yDAAyD;QACzD,MAAM,GAAG,MAAM,IAAA,eAAM,EACpB,8BAA8B,SAAS,CAAC,IAAI,4CAA4C,CACxF,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACR,yCAAyC;QACzC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,IAAI,CAAC;IACb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OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;IAC1E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,OAAO;QACN,WAAW,EAAE,OAAO,CAAC,EAAE;QACvB,aAAa,EAAE,OAAO,CAAC,IAAI;QAC3B,OAAO,EAAE,IAAI;KACb,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ritualai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.8",
|
|
4
4
|
"description": "Ritual CLI — scaffold AI coding agent skills + register MCP servers. Connects Claude Code, Cursor, Windsurf, Kiro, Gemini CLI, VS Code/Copilot, and Codex to Ritual Cloud.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -3,6 +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
7
|
---
|
|
7
8
|
|
|
8
9
|
# /ritual
|
|
@@ -19,6 +20,13 @@ Before executing any subcommand, read and follow:
|
|
|
19
20
|
|
|
20
21
|
Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
|
|
21
22
|
|
|
23
|
+
**Skill freshness (once per session, silent unless stale):** this file's frontmatter may carry a
|
|
24
|
+
`stamp:` value (injected when the bundle was built — absent on dev/source copies). On the FIRST
|
|
25
|
+
`mcp__ritual__ping` of a session, pass it as `skill_stamp`. If the response says
|
|
26
|
+
`skillFreshness: "stale"`, relay its one-line hint ("Skill update available — run
|
|
27
|
+
`ritual init --skills-only` to refresh") exactly once, no pause, and continue with the current flow.
|
|
28
|
+
No stamp, or `in-sync`/`unknown` → say nothing. Never block on this.
|
|
29
|
+
|
|
22
30
|
## Contract strength — load-bearing for all subcommands
|
|
23
31
|
|
|
24
32
|
Every section in this SKILL or its reference files labeled **load-bearing**, **forbidden behavior**, **anti-pattern**, **rendering contract**, or **fire-on-trigger** is **contract-strength**, not guidance.
|
|
@@ -4,7 +4,7 @@ Reference for `/ritual build` Step 10b.5 (the auto-fire verify-brief pass that r
|
|
|
4
4
|
|
|
5
5
|
The brief generator runs server-side and **does not have repo access**. It writes assertions about cited files / functions / classes based on the agent's earlier recon summary — which is a text summary, not the actual code. When the brief says *"`is_allowed_to_see` is insufficient — needs token-based access"* but the code actually ships email-allowlist semantics, the contradiction is invisible to the brief generator and to the user reading the brief.
|
|
6
6
|
|
|
7
|
-
Step 10b.5 closes this gap: **the agent (with repo access) reads the bodies of the specific symbols the brief cites and produces a structured list of findings before the user sees the brief.** Findings
|
|
7
|
+
Step 10b.5 closes this gap: **the agent (with repo access) reads the bodies of the specific symbols the brief cites and produces a structured list of findings before the user sees the brief.** Findings are written to a **separate** file (`BUILD-BRIEF-VERIFICATION.md`) and synced to Ritual's KG via `sync_brief_review` — they are **never** written back into `BUILD-BRIEF.md`. The brief stays the read-only historical artifact Ritual generated; the corrections reach the implementation through plan mode's KG `priorContext`, not through a brief rewrite. (There is **no** `refine_build_brief` tool — it was removed 2026-05-15 and replaced by `sync_brief_review`.)
|
|
8
8
|
|
|
9
9
|
This is the **non-UI sibling of `references/ui-ux-checklist.md`** (Step 10.5 UX review). Same methodology shape (read brief → identify citations → find in repo → compare → fill schema → surface findings), different targets (functions / data shapes / model fields instead of UI components).
|
|
10
10
|
|
|
@@ -61,13 +61,18 @@ Three verdicts:
|
|
|
61
61
|
- **`contradicted`** — the brief's claim is **wrong**. The code does something different. This is the verdict that drives a refinement.
|
|
62
62
|
- **`not_found`** — the brief cited a symbol the agent could not locate in the repo. Either the symbol was renamed, deleted, or never existed. Either way: the brief is asserting against a phantom; surface to user.
|
|
63
63
|
|
|
64
|
+
**Narrating a finding mid-verification — frame it as resolving drift, not as an error.** If you surface a `contradicted` / `not_found` finding in a progress line before the summary, lead with *resolving drift between the brief and the codebase*, then one plain sentence on the drift + where the real pattern lives. A caught gap is the verification doing its job, not a failure to alarm about — don't lead with "X doesn't exist" / "references a function that doesn't exist."
|
|
65
|
+
|
|
66
|
+
- ❌ `get_core_apps is not in the codebase — the brief's RB-1 references a function that doesn't exist. The actual pattern is direct INSTALLED_APPS manipulation (index + replace), as seen in tests/settings.py.`
|
|
67
|
+
- ✅ `Resolving drift between the brief and the codebase: RB-1 cites get_core_apps, but the repo edits INSTALLED_APPS directly (index + replace — see tests/settings.py). Noting it in the verification.`
|
|
68
|
+
|
|
64
69
|
**5. Fill the output schema with evidence.**
|
|
65
70
|
|
|
66
71
|
Write `BUILD-BRIEF-VERIFICATION.md` to disk alongside `BUILD-BRIEF.md`. Use the schema below. **Each finding cites the file + line range + the actual code snippet that justified the verdict.** The user reading this must be able to verify your verification — no hand-waving, no claims without evidence.
|
|
67
72
|
|
|
68
73
|
**6. If any findings are `contradicted`, surface to the user inline at Step 10d.**
|
|
69
74
|
|
|
70
|
-
The Step 10d gate
|
|
75
|
+
The Step 10d gate is `go` / `drill {N}` / `pause` (plus `ux-review`) — there is **no `refine` action**; the brief is read-only after generation. When `contradicted` findings exist, the gate prepends a summary so the user sees what the agent learned about the brief before deciding:
|
|
71
76
|
|
|
72
77
|
```text
|
|
73
78
|
⚠ Verification found {N} contradiction(s) between the brief and the actual code:
|
|
@@ -76,11 +81,12 @@ The Step 10d gate normally reads *"Reply `go` to implement, `refine` for edits,
|
|
|
76
81
|
"{code_reality}" (see {cited_file}:{cited_lines}).
|
|
77
82
|
· ...
|
|
78
83
|
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
These are synced to Ritual; plan mode reads them when you `go`.
|
|
85
|
+
Reply `go` to implement (corrections flow in via KG), `drill {N}` to
|
|
86
|
+
inspect, or `pause` to stop.
|
|
81
87
|
```
|
|
82
88
|
|
|
83
|
-
The
|
|
89
|
+
The findings do **not** rewrite the brief. They were already persisted via `sync_brief_review` (a durable `BriefReview` row) at step 5; when the user replies `go`, **plan mode reads the brief + that review via KG `priorContext`** and the implementation incorporates the corrections — without the brief text changing. If the user has context the agent doesn't ("yes the brief is wrong but ship as-is"), `go` proceeds the same way; the corrections are recorded regardless. The only path to *new brief content* is `generate_build_brief` with `force: true` (full regen from changed source data) — used when the underlying recs/requirements actually changed, never to patch a verification finding.
|
|
84
90
|
|
|
85
91
|
---
|
|
86
92
|
|
|
@@ -146,7 +152,7 @@ checked out, state that clearly.}
|
|
|
146
152
|
|
|
147
153
|
- **Verify everything in the brief.** Only the symbol-citation slice. Pose-level claims, framing, and general direction are out of scope.
|
|
148
154
|
- **Read the full file.** Read enough surrounding context to verify the symbol (~10 lines); not the whole file. Capped at ~15 citations total to keep this fast.
|
|
149
|
-
- **Edit the brief directly.** Step 10b.5 only writes `BUILD-BRIEF-VERIFICATION.md
|
|
155
|
+
- **Edit the brief directly.** Step 10b.5 only writes the **separate** `BUILD-BRIEF-VERIFICATION.md` and syncs it via `sync_brief_review`. `BUILD-BRIEF.md` is never touched — it stays the read-only historical artifact. Findings reach the implementation through plan mode's KG `priorContext` at Step 11, not through a brief rewrite. (Regenerating from changed source data is a different operation — `generate_build_brief` with `force: true` — not part of this step.)
|
|
150
156
|
- **Persist findings to the KG.** Phase 1 is local-only. Phase 2 (filed at `memory/backlog_brief_verification_findings_kg_promotion.md`) adds the `BriefVerificationFinding` Prisma model + endpoint + priorContext injection so future briefs on overlapping files inherit verified facts.
|
|
151
157
|
|
|
152
158
|
---
|