@ritualai/cli 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/doctor.js +33 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/graph.js +102 -0
- package/dist/commands/graph.js.map +1 -0
- package/dist/commands/init.js +188 -20
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -3
- package/skills/claude-code/ritual/SKILL.md +27 -1
- package/skills/codex/ritual/SKILL.md +27 -1
- package/skills/cursor/ritual/SKILL.md +27 -1
- package/skills/gemini/ritual/SKILL.md +27 -1
- package/skills/kiro/ritual/SKILL.md +27 -1
- package/skills/vscode/ritual/SKILL.md +27 -1
package/dist/commands/doctor.js
CHANGED
|
@@ -6,6 +6,7 @@ const node_os_1 = require("node:os");
|
|
|
6
6
|
const config_1 = require("../lib/config");
|
|
7
7
|
const detector_1 = require("../lib/agents/detector");
|
|
8
8
|
const api_client_1 = require("../lib/api-client");
|
|
9
|
+
const project_config_1 = require("../lib/project-config");
|
|
9
10
|
/**
|
|
10
11
|
* `ritual doctor` — sanity check the CLI's environment.
|
|
11
12
|
*
|
|
@@ -80,6 +81,38 @@ async function doctorCommand() {
|
|
|
80
81
|
}
|
|
81
82
|
console.log('');
|
|
82
83
|
}
|
|
84
|
+
// --- Knowledge-graph reachability (PR 107c) ------------------
|
|
85
|
+
// Lightweight verify: if a workspace is bound to this project,
|
|
86
|
+
// fetch its KG summary. Proves auth → API → DB round-trip works
|
|
87
|
+
// AND shows the user where the workspace's KG currently stands.
|
|
88
|
+
// Skip silently when not signed in (covered above) or when no
|
|
89
|
+
// project workspace is bound (not a misconfiguration; the user
|
|
90
|
+
// just hasn't run `ritual init` in this repo yet).
|
|
91
|
+
if (tokenStatus.kind === 'signed-in') {
|
|
92
|
+
const project = (0, project_config_1.loadProjectConfig)(process.cwd());
|
|
93
|
+
if (project) {
|
|
94
|
+
console.log(' Knowledge graph (this project\'s workspace):');
|
|
95
|
+
console.log(` workspace ${project.workspaceName} (${project.workspaceId})`);
|
|
96
|
+
try {
|
|
97
|
+
const api = new api_client_1.ApiClient({
|
|
98
|
+
issuer: tokenStatus.creds.issuer,
|
|
99
|
+
accessToken: tokenStatus.accessToken,
|
|
100
|
+
});
|
|
101
|
+
const summary = await api.get(`/workspaces/${encodeURIComponent(project.workspaceId)}/knowledge-graph/summary`);
|
|
102
|
+
console.log(` counts ${summary.counts.implementations} implementation(s), ${summary.counts.decisions} decision(s), ${summary.counts.deferrals} deferral(s)`);
|
|
103
|
+
if (summary.counts.implementations === 0) {
|
|
104
|
+
console.log(' note cold-start KG — fills as agents call `mcp__ritual__sync_implementation`');
|
|
105
|
+
}
|
|
106
|
+
console.log('');
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
console.log(` reachable ✗ (${err.message})`);
|
|
110
|
+
console.log(' note cluster/API reachability issue — `ritual graph status` will fail too');
|
|
111
|
+
problems++;
|
|
112
|
+
console.log('');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
83
116
|
if (problems > 0) {
|
|
84
117
|
process.exitCode = 1;
|
|
85
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":";;AAqBA,sCAyGC;AA9HD,qCAAqC;AACrC,qCAA6C;AAC7C,0CAAwE;AACxE,qDAAsD;AACtD,kDAAmF;AACnF,0DAA0D;AAG1D;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,aAAa;IAClC,IAAI,QAAQ,GAAG,CAAC,CAAC;IAEjB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,mCAAmC,C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,GAAG,CAAC,GAAG,CAC5B,eAAe,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,0BAA0B,CAChF,CAAC;gBACF,OAAO,CAAC,GAAG,CACV,mBAAmB,OAAO,CAAC,MAAM,CAAC,eAAe,uBAAuB,OAAO,CAAC,MAAM,CAAC,SAAS,iBAAiB,OAAO,CAAC,MAAM,CAAC,SAAS,cAAc,CACvJ,CAAC;gBACF,IAAI,OAAO,CAAC,MAAM,CAAC,eAAe,KAAK,CAAC,EAAE,CAAC;oBAC1C,OAAO,CAAC,GAAG,CAAC,yFAAyF,CAAC,CAAC;gBACxG,CAAC;gBACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,CAAC,sBAAuB,GAAa,CAAC,OAAO,GAAG,CAAC,CAAC;gBAC7D,OAAO,CAAC,GAAG,CAAC,sFAAsF,CAAC,CAAC;gBACpG,QAAQ,EAAE,CAAC;gBACX,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.graphStatusCommand = graphStatusCommand;
|
|
4
|
+
const config_1 = require("../lib/config");
|
|
5
|
+
const api_client_1 = require("../lib/api-client");
|
|
6
|
+
const project_config_1 = require("../lib/project-config");
|
|
7
|
+
async function graphStatusCommand(opts = {}) {
|
|
8
|
+
console.log('');
|
|
9
|
+
console.log(' Ritual — knowledge-graph status');
|
|
10
|
+
console.log('');
|
|
11
|
+
// 1. Auth check (uses the same lazy-OAuth flow as the rest of the CLI).
|
|
12
|
+
const tokenStatus = await (0, config_1.getValidAccessToken)();
|
|
13
|
+
if (tokenStatus.kind !== 'signed-in') {
|
|
14
|
+
console.error(' ✗ Not signed in. Run `ritual login` first, then `ritual graph status`.');
|
|
15
|
+
console.error('');
|
|
16
|
+
process.exitCode = 1;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// 2. Resolve workspace id.
|
|
20
|
+
let workspaceId = opts.workspace;
|
|
21
|
+
let workspaceSource = '--workspace flag';
|
|
22
|
+
if (!workspaceId) {
|
|
23
|
+
const project = (0, project_config_1.loadProjectConfig)(opts.cwd ?? process.cwd());
|
|
24
|
+
if (project) {
|
|
25
|
+
workspaceId = project.workspaceId;
|
|
26
|
+
workspaceSource = `.ritual/config.json (${project.workspaceName})`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (!workspaceId) {
|
|
30
|
+
console.error(' ✗ No workspace specified.');
|
|
31
|
+
console.error(' Run `ritual init` in your repo to bind one, OR pass `--workspace <id>` explicitly.');
|
|
32
|
+
console.error('');
|
|
33
|
+
process.exitCode = 1;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
console.log(` Workspace: ${workspaceId} (from ${workspaceSource})`);
|
|
37
|
+
console.log('');
|
|
38
|
+
// 3. Hit the API.
|
|
39
|
+
const issuer = tokenStatus.creds.issuer;
|
|
40
|
+
const api = new api_client_1.ApiClient({
|
|
41
|
+
issuer,
|
|
42
|
+
accessToken: tokenStatus.accessToken,
|
|
43
|
+
});
|
|
44
|
+
const limit = opts.limit ? parseInt(opts.limit, 10) : undefined;
|
|
45
|
+
const queryString = limit ? `?recentLimit=${limit}` : '';
|
|
46
|
+
let summary;
|
|
47
|
+
try {
|
|
48
|
+
summary = await api.get(`/workspaces/${encodeURIComponent(workspaceId)}/knowledge-graph/summary${queryString}`);
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
console.error(` ✗ Could not fetch graph summary: ${err.message}`);
|
|
52
|
+
console.error('');
|
|
53
|
+
process.exitCode = 1;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
// 4. Render.
|
|
57
|
+
console.log(` Workspace name: ${summary.workspaceName}`);
|
|
58
|
+
console.log('');
|
|
59
|
+
console.log(' Counts:');
|
|
60
|
+
console.log(` Implementations: ${pad(summary.counts.implementations)}`);
|
|
61
|
+
console.log(` Decisions: ${pad(summary.counts.decisions)}`);
|
|
62
|
+
console.log(` Deferrals: ${pad(summary.counts.deferrals)}`);
|
|
63
|
+
console.log('');
|
|
64
|
+
if (summary.recent.length === 0) {
|
|
65
|
+
// Cold-start KG — no implementations synced yet. Tell the user
|
|
66
|
+
// what to do about it, not just "0 records found."
|
|
67
|
+
console.log(' No implementations have been synced for this workspace yet.');
|
|
68
|
+
console.log('');
|
|
69
|
+
console.log(' The KG fills in when you complete an exploration and your');
|
|
70
|
+
console.log(' AI coding agent calls `mcp__ritual__sync_implementation`');
|
|
71
|
+
console.log(' after landing the work. Until then, /ritual build calls won\'t');
|
|
72
|
+
console.log(' have any prior-implementation context to draw from.');
|
|
73
|
+
console.log('');
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
console.log(` Recent implementations (${summary.recent.length} shown):`);
|
|
77
|
+
console.log('');
|
|
78
|
+
for (const r of summary.recent) {
|
|
79
|
+
const name = r.explorationName ?? '(unnamed)';
|
|
80
|
+
const subtitle = `${r.repo}@${r.branch} · ${r.commitsCount} commit${r.commitsCount === 1 ? '' : 's'} · ${r.decisions} decision${r.decisions === 1 ? '' : 's'} · ${r.deferrals} deferral${r.deferrals === 1 ? '' : 's'}`;
|
|
81
|
+
console.log(` ${shortDate(r.implementedAt)} ${name}`);
|
|
82
|
+
console.log(` ${subtitle}`);
|
|
83
|
+
if (r.prUrl) {
|
|
84
|
+
console.log(` ${r.prUrl}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
console.log('');
|
|
88
|
+
}
|
|
89
|
+
/** Right-pad a count for visual alignment in the summary block. */
|
|
90
|
+
function pad(n) {
|
|
91
|
+
return String(n).padStart(3, ' ');
|
|
92
|
+
}
|
|
93
|
+
/** Render an ISO timestamp as YYYY-MM-DD for the recent-list. */
|
|
94
|
+
function shortDate(iso) {
|
|
95
|
+
try {
|
|
96
|
+
return iso.slice(0, 10);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return iso;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../src/commands/graph.ts"],"names":[],"mappings":";;AAiCA,gDA2FC;AA5HD,0CAAoD;AACpD,kDAA8C;AAC9C,0DAA0D;AA+BnD,KAAK,UAAU,kBAAkB,CAAC,OAA2B,EAAE;IACrE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,wEAAwE;IACxE,MAAM,WAAW,GAAG,MAAM,IAAA,4BAAmB,GAAE,CAAC;IAChD,IAAI,WAAW,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACtC,OAAO,CAAC,KAAK,CAAC,0EAA0E,CAAC,CAAC;QAC1F,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACR,CAAC;IAED,2BAA2B;IAC3B,IAAI,WAAW,GAAuB,IAAI,CAAC,SAAS,CAAC;IACrD,IAAI,eAAe,GAAG,kBAAkB,CAAC;IACzC,IAAI,CAAC,WAAW,EAAE,CAAC;QAClB,MAAM,OAAO,GAAG,IAAA,kCAAiB,EAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAC7D,IAAI,OAAO,EAAE,CAAC;YACb,WAAW,GAAG,OAAO,C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GED
|
@@ -172,8 +172,7 @@ async function initCommand(opts = {}) {
|
|
|
172
172
|
process.exitCode = 1;
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
console.log(` Manage tokens at: ${webAppUrlFromIssuer(issuer)}/settings/tokens`);
|
|
175
|
+
printKeyCreatedBlock(pat, webAppUrlFromIssuer(issuer));
|
|
177
176
|
console.log('');
|
|
178
177
|
// --- 3.5 Bind a project workspace --------------------------------
|
|
179
178
|
// Project-scoped state — see ./../lib/workspace-flow.ts for the
|
|
@@ -201,24 +200,26 @@ async function initCommand(opts = {}) {
|
|
|
201
200
|
registrationResults.push((0, configure_mcp_1.configureMcpForAgent)(t.provider, { url: mcpUrl, token: pat.plaintextToken }));
|
|
202
201
|
}
|
|
203
202
|
// --- 5. Summary --------------------------------------------------
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
203
|
+
//
|
|
204
|
+
// Two pieces of feedback the user gets here:
|
|
205
|
+
//
|
|
206
|
+
// (a) `Detected coding agents:` — dotted-aligned table of all
|
|
207
|
+
// known agents with `configured` / `not detected` / `failed`
|
|
208
|
+
// status. Mirrors the legacy CLI's `printSummary` output so
|
|
209
|
+
// any user who used the legacy CLI sees a familiar shape.
|
|
210
|
+
//
|
|
211
|
+
// (b) `Next steps:` — verify-then-restart pattern. Crucially,
|
|
212
|
+
// if the user ran `ritual init` from inside a Claude Code
|
|
213
|
+
// session (detected via env vars), we surface a prominent
|
|
214
|
+
// yellow warning that the CURRENT session won't see the
|
|
215
|
+
// new MCP server until restart. This was the single biggest
|
|
216
|
+
// footgun the legacy CLI surfaced and we want feature parity.
|
|
217
|
+
printDetectedAgentsBlock(targets, copyResults, registrationResults);
|
|
218
|
+
printNextStepsBlock({
|
|
219
|
+
targets,
|
|
220
|
+
registrationResults,
|
|
221
|
+
mcpUrl,
|
|
222
|
+
});
|
|
222
223
|
}
|
|
223
224
|
/** Tiny helper for the lazy-auth message ("you are not signed in" → "You are..."). */
|
|
224
225
|
function capitalize(s) {
|
|
@@ -246,4 +247,171 @@ function webAppUrlFromIssuer(issuer) {
|
|
|
246
247
|
return 'https://app.ritualapp.cloud';
|
|
247
248
|
}
|
|
248
249
|
}
|
|
250
|
+
// =============================================================================
|
|
251
|
+
// Output helpers — feature-parity with legacy CLI's polished init summary.
|
|
252
|
+
// =============================================================================
|
|
253
|
+
//
|
|
254
|
+
// Ported 2026-05-11. Legacy lives at
|
|
255
|
+
// ~/Development/ritual-mcp-server/src/cli/commands/login.ts but its
|
|
256
|
+
// URLs / config locations are legacy-specific; the vNext versions
|
|
257
|
+
// below adapt to vNext's pattern (PAT stored in agent MCP config, not
|
|
258
|
+
// in a home-global file).
|
|
259
|
+
/**
|
|
260
|
+
* Concise summary of what `mintAgentPat` just created. Surfaces enough
|
|
261
|
+
* for the user to find + revoke the token later, without echoing the
|
|
262
|
+
* plaintext to stdout (which would leak via screenshots / clipboard /
|
|
263
|
+
* terminal history).
|
|
264
|
+
*/
|
|
265
|
+
function printKeyCreatedBlock(pat, webAppUrl) {
|
|
266
|
+
const expiry = pat.expiresAt
|
|
267
|
+
? new Date(pat.expiresAt).toISOString().slice(0, 10) // YYYY-MM-DD
|
|
268
|
+
: 'never';
|
|
269
|
+
console.log(` ✓ Created MCP key`);
|
|
270
|
+
console.log(` Name: ${pat.name}`);
|
|
271
|
+
console.log(` Scope: admin`);
|
|
272
|
+
console.log(` Expires: ${expiry}`);
|
|
273
|
+
console.log(` Stored: in your agent's MCP config (e.g. ~/.claude.json)`);
|
|
274
|
+
console.log(` Manage: ${webAppUrl}/settings/tokens`);
|
|
275
|
+
console.log(` (Token not displayed for security. Use the manage URL to copy or revoke.)`);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Dotted-aligned table of every known agent with its status.
|
|
279
|
+
* Mirrors the legacy CLI's output so users who have used the
|
|
280
|
+
* legacy CLI find a familiar shape.
|
|
281
|
+
*
|
|
282
|
+
* Claude Code ........... configured
|
|
283
|
+
* Cursor ................ not detected
|
|
284
|
+
* Windsurf .............. not detected
|
|
285
|
+
* VS Code (Copilot) ..... configured
|
|
286
|
+
* ...
|
|
287
|
+
*
|
|
288
|
+
* Lists detected-and-configured FIRST, then detected-but-failed,
|
|
289
|
+
* then not-detected (dimmed). Failed entries get a manual-fix hint.
|
|
290
|
+
*/
|
|
291
|
+
function printDetectedAgentsBlock(targets, copyResults, registrationResults) {
|
|
292
|
+
console.log(' Detected coding agents:');
|
|
293
|
+
// Build a status string per known agent.
|
|
294
|
+
const targetIds = new Set(targets.map((t) => t.provider.id));
|
|
295
|
+
const detections = (0, detector_1.detectAgents)();
|
|
296
|
+
const longestName = Math.max(...providers_1.PROVIDERS.map((p) => p.name.length), 18);
|
|
297
|
+
for (const d of detections) {
|
|
298
|
+
const dots = '.'.repeat(Math.max(1, longestName - d.name.length + 4));
|
|
299
|
+
if (!d.detected) {
|
|
300
|
+
console.log(` ${d.name} ${dots} not detected`);
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
// Detected, but did we target this agent in this run?
|
|
304
|
+
// (User can scope via --agent <id>.)
|
|
305
|
+
if (!targetIds.has(d.id)) {
|
|
306
|
+
console.log(` ${d.name} ${dots} detected (skipped — not selected)`);
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
const reg = registrationResults.find((r) => r.provider.id === d.id);
|
|
310
|
+
if (reg?.success) {
|
|
311
|
+
console.log(` ${d.name} ${dots} configured`);
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
console.log(` ${d.name} ${dots} failed: ${reg?.reason ?? 'unknown'}`);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
// Per-agent skill copy summary — kept here because users sometimes
|
|
318
|
+
// scan the dotted table and miss the more detailed counts.
|
|
319
|
+
console.log('');
|
|
320
|
+
console.log(' Skills copied:');
|
|
321
|
+
for (const t of targets) {
|
|
322
|
+
const copy = copyResults.find((r) => r.provider.id === t.provider.id);
|
|
323
|
+
const status = copy.copied > 0
|
|
324
|
+
? `${copy.copied} → ${t.provider.projectSkillDir}/`
|
|
325
|
+
: `skipped (${copy.reason ?? 'unknown'})`;
|
|
326
|
+
console.log(` ${t.provider.name}: ${status}`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Verify-then-restart Next-steps block. Replaces the previous 2-line
|
|
331
|
+
* "Next: restart your AI coding agent" with the structured pattern
|
|
332
|
+
* the legacy CLI shipped, tuned for vNext:
|
|
333
|
+
*
|
|
334
|
+
* ⚠ Warning if running INSIDE Claude Code (current session won't
|
|
335
|
+
* see the new MCP server until you restart it).
|
|
336
|
+
* 1. Verify connection — `claude mcp list` + expected output.
|
|
337
|
+
* Diagnostic fallback: `ritual doctor`.
|
|
338
|
+
* 2. Restart Claude Code (3 bullet sub-steps).
|
|
339
|
+
* Per-agent restart hints (Cursor / Windsurf / VS Code).
|
|
340
|
+
* "Once connected, you can use:" — quick-reference of the main
|
|
341
|
+
* ritual commands.
|
|
342
|
+
*/
|
|
343
|
+
function printNextStepsBlock(args) {
|
|
344
|
+
const { targets, registrationResults, mcpUrl } = args;
|
|
345
|
+
const configuredIds = new Set(registrationResults
|
|
346
|
+
.filter((r) => r.success)
|
|
347
|
+
.map((r) => r.provider.id));
|
|
348
|
+
const hasClaudeCode = configuredIds.has('claude-code') &&
|
|
349
|
+
targets.some((t) => t.provider.id === 'claude-code');
|
|
350
|
+
const hasCursor = configuredIds.has('cursor');
|
|
351
|
+
const hasWindsurf = configuredIds.has('windsurf');
|
|
352
|
+
const hasVsCode = configuredIds.has('vscode') || configuredIds.has('vs-code');
|
|
353
|
+
console.log('');
|
|
354
|
+
console.log(' Next steps:');
|
|
355
|
+
// ⚠ Inside-Claude warning — important enough to lead with.
|
|
356
|
+
if (hasClaudeCode && isInsideClaudeCode()) {
|
|
357
|
+
console.log('');
|
|
358
|
+
console.log(' ⚠ You\'re running this from inside a Claude Code session.');
|
|
359
|
+
console.log(' The CURRENT session will NOT see ritual tools until you restart it.');
|
|
360
|
+
}
|
|
361
|
+
if (hasClaudeCode) {
|
|
362
|
+
console.log('');
|
|
363
|
+
console.log(' 1. Verify the connection — run this in a regular terminal');
|
|
364
|
+
console.log(' (not inside Claude):');
|
|
365
|
+
console.log('');
|
|
366
|
+
console.log(' claude mcp list');
|
|
367
|
+
console.log('');
|
|
368
|
+
console.log(' You should see:');
|
|
369
|
+
console.log(` ritual: ${mcpUrl} (HTTP) - ✓ Connected`);
|
|
370
|
+
console.log('');
|
|
371
|
+
console.log(' If it shows ✗ Failed to connect, run: ritual doctor');
|
|
372
|
+
console.log('');
|
|
373
|
+
console.log(' 2. Restart Claude Code so the new MCP server loads:');
|
|
374
|
+
console.log(' • Exit any running Claude sessions (Ctrl-C or /exit)');
|
|
375
|
+
console.log(' • Run `claude` again');
|
|
376
|
+
console.log(' • Inside Claude, type /mcp — `ritual` should be listed');
|
|
377
|
+
}
|
|
378
|
+
// Per-agent restart hints — only emit for agents we actually wired.
|
|
379
|
+
if (hasCursor) {
|
|
380
|
+
console.log('');
|
|
381
|
+
console.log(' Cursor: restart Cursor (Cmd-Q then reopen) to load the MCP server.');
|
|
382
|
+
}
|
|
383
|
+
if (hasWindsurf) {
|
|
384
|
+
console.log('');
|
|
385
|
+
console.log(' Windsurf: restart Windsurf to load the MCP server.');
|
|
386
|
+
}
|
|
387
|
+
if (hasVsCode) {
|
|
388
|
+
console.log('');
|
|
389
|
+
console.log(' VS Code: reload the window (Cmd+Shift+P → "Developer: Reload Window")');
|
|
390
|
+
console.log(' to load the MCP server.');
|
|
391
|
+
}
|
|
392
|
+
console.log('');
|
|
393
|
+
console.log(' Once connected, you can use:');
|
|
394
|
+
console.log(' /ritual build <feature> — full pipeline (from your coding agent)');
|
|
395
|
+
console.log(' ritual graph status — see the workspace knowledge graph');
|
|
396
|
+
console.log(' ritual doctor — diagnose MCP / auth setup');
|
|
397
|
+
console.log('');
|
|
398
|
+
console.log(' Setup complete.');
|
|
399
|
+
console.log('');
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Heuristic: are we running inside an active Claude Code session?
|
|
403
|
+
*
|
|
404
|
+
* Claude Code sets one or more of these env vars when spawning a child
|
|
405
|
+
* process from within a session. Any one of them being present is a
|
|
406
|
+
* strong signal — we don't need all three. (Names are stable across
|
|
407
|
+
* Claude Code releases since Sept 2025.)
|
|
408
|
+
*
|
|
409
|
+
* Used to surface a prominent warning that the CURRENT Claude session
|
|
410
|
+
* won't see the new MCP server until restart.
|
|
411
|
+
*/
|
|
412
|
+
function isInsideClaudeCode() {
|
|
413
|
+
return (!!process.env.CLAUDECODE ||
|
|
414
|
+
!!process.env.CLAUDE_CODE_ENTRYPOINT ||
|
|
415
|
+
!!process.env.CLAUDE_CODE_SESSION_ID);
|
|
416
|
+
}
|
|
249
417
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;AAiGA,kCAqMC;AAtSD,0CAAoD;AACpD,kDAAgE;AAChE,gDAAgD;AAChD,qDAGgC;AAChC,uDAAsE;AACtE,+DAGqC;AACrC,kDAA2E;AAC3E,gDAA0D;AAC1D,0CAAuC;AACvC,0DAAgE;AA0DhE;;;;GAIG;AACU,QAAA,UAAU,GAAG,gDAAgD,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,SAAS,oBAAoB,CAAC,IAAiB;IAC9C,IAAI,IAAI,CAAC,GAAG;QAAE,OAAO,kBAAU,CAAC;IAChC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC,MAAM,CAAC;IACpC,OAAO,SAAS,CAAC,CAAC,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CACN,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU;QACxB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB;QACpC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CACpC,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,12 +8,13 @@ const whoami_1 = require("./commands/whoami");
|
|
|
8
8
|
const refresh_1 = require("./commands/refresh");
|
|
9
9
|
const init_1 = require("./commands/init");
|
|
10
10
|
const doctor_1 = require("./commands/doctor");
|
|
11
|
+
const graph_1 = require("./commands/graph");
|
|
11
12
|
const program = new commander_1.Command();
|
|
12
13
|
program
|
|
13
14
|
.name('ritual')
|
|
14
15
|
.description('Ritual CLI — connect AI coding agents to Ritual Cloud. ' +
|
|
15
16
|
'Scaffold skills, register MCP servers, manage sessions.')
|
|
16
|
-
.version('0.
|
|
17
|
+
.version('0.5.0');
|
|
17
18
|
// `init` is the headline command: scaffold + register against every
|
|
18
19
|
// detected agent. Listed first so `ritual --help` surfaces it.
|
|
19
20
|
program
|
|
@@ -49,6 +50,18 @@ program
|
|
|
49
50
|
.command('doctor')
|
|
50
51
|
.description('Sanity check the CLI environment: credentials, endpoints, detected agents')
|
|
51
52
|
.action(doctor_1.doctorCommand);
|
|
53
|
+
// `graph` is the workspace-KG visibility surface. Today only one
|
|
54
|
+
// subcommand (`status`) but reserved as a noun so future verbs
|
|
55
|
+
// (`verify`, `seed`, `export`) compose naturally.
|
|
56
|
+
const graph = program
|
|
57
|
+
.command('graph')
|
|
58
|
+
.description('Inspect the workspace knowledge graph (PR 107c — visibility layer)');
|
|
59
|
+
graph
|
|
60
|
+
.command('status')
|
|
61
|
+
.description('Show counts + recent implementations for the project\'s workspace')
|
|
62
|
+
.option('--workspace <id>', 'Override the workspaceId. Default reads from .ritual/config.json (set by `ritual init`).')
|
|
63
|
+
.option('--limit <n>', 'Number of recent implementations to show (default 5, max 25)')
|
|
64
|
+
.action(graph_1.graphStatusCommand);
|
|
52
65
|
program.parseAsync(process.argv).catch((err) => {
|
|
53
66
|
console.error(`\n ✗ ${err.message}\n`);
|
|
54
67
|
process.exit(1);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,4CAAgD;AAChD,8CAAkD;AAClD,8CAAkD;AAClD,gDAAoD;AACpD,0CAA8C;AAC9C,8CAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,4CAAgD;AAChD,8CAAkD;AAClD,8CAAkD;AAClD,gDAAoD;AACpD,0CAA8C;AAC9C,8CAAkD;AAClD,4CAAsD;AAEtD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACL,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CACX,yDAAyD;IACxD,yDAAyD,CAC1D;KACA,OAAO,CAAC,OAAO,CAAC,CAAC;AAEnB,oEAAoE;AACpE,+DAA+D;AAC/D,OAAO;KACL,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,kFAAkF,CAAC;KAC/F,MAAM,CAAC,cAAc,EAAE,wDAAwD,CAAC;KAChF,MAAM,CAAC,QAAQ,EAAE,4BAA4B,CAAC;KAC9C,MAAM,CACN,gBAAgB,EAChB,kFAAkF,CAClF;KACA,MAAM,CAAC,kBAAkB,EAAE,2CAA2C,CAAC;KACvE,MAAM,CAAC,OAAO,EAAE,iFAAiF,CAAC;KAClG,MAAM,CACN,gBAAgB,EAChB,wHAAwH,CACxH;KACA,MAAM,CAAC,kBAAW,CAAC,CAAC;AAEtB,OAAO;KACL,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CACN,gBAAgB,EAChB,iGAAiG,CACjG;KACA,MAAM,CACN,k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li",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"prepublishOnly": "pnpm run clean && pnpm run build"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@ritual/shared-types": "workspace:^",
|
|
27
28
|
"commander": "^14.0.3",
|
|
28
29
|
"open": "^10.1.0"
|
|
29
30
|
},
|
|
@@ -53,7 +54,12 @@
|
|
|
53
54
|
"jest": {
|
|
54
55
|
"preset": "ts-jest",
|
|
55
56
|
"testEnvironment": "node",
|
|
56
|
-
"roots": [
|
|
57
|
-
|
|
57
|
+
"roots": [
|
|
58
|
+
"<rootDir>/src",
|
|
59
|
+
"<rootDir>/test"
|
|
60
|
+
],
|
|
61
|
+
"testMatch": [
|
|
62
|
+
"**/?(*.)+(spec|test).ts"
|
|
63
|
+
]
|
|
58
64
|
}
|
|
59
65
|
}
|
|
@@ -51,7 +51,7 @@ When **not** to use:
|
|
|
51
51
|
- An exploration already exists with recommendations — fetch directly via `get_exploration` + `get_recommendations`
|
|
52
52
|
- The user wants to *implement* a feature from existing recommendations — use `/ritual-builder-spec` (from `@ritual-ai/cli`)
|
|
53
53
|
|
|
54
|
-
### Workflow — 8
|
|
54
|
+
### Workflow — 9 phases (Phase 8 happens after the engineer ships the work)
|
|
55
55
|
|
|
56
56
|
Each phase has explicit **[USER PAUSE]** points — never skip them.
|
|
57
57
|
|
|
@@ -319,6 +319,32 @@ Show the final state:
|
|
|
319
319
|
>
|
|
320
320
|
> View at: https://dev.ritualapp.cloud/e/{exploration_id}
|
|
321
321
|
|
|
322
|
+
#### Phase 8 — After shipping: close the loop with `sync_implementation`
|
|
323
|
+
|
|
324
|
+
This phase happens *outside* the `/ritual build` chat — after the engineer has taken the accepted recommendations into their coding work and the implementation has actually landed (PR merged, etc.). The agent in that follow-up session should call `mcp__ritual__sync_implementation` to register what shipped, which decisions were made, and what was deliberately deferred.
|
|
325
|
+
|
|
326
|
+
When sync_implementation succeeds, the response now includes:
|
|
327
|
+
|
|
328
|
+
- `decisions: [{ decisionId, area, choice }, ...]` — IDs of every architectural decision logged
|
|
329
|
+
- `deferrals: [{ deferralId, rbId, severity }, ...]` — IDs of every deferral
|
|
330
|
+
- `decisionsCount`, `deferralsCount` — totals for the summary line
|
|
331
|
+
- `webUrl` — clickable link to the exploration's implementation record in the web UI
|
|
332
|
+
|
|
333
|
+
**Surface ALL of this to the user**, not just "ok logged." This is the visible signal that the loop closed. Format:
|
|
334
|
+
|
|
335
|
+
> ✓ Logged implementation for **{exploration name}**
|
|
336
|
+
> - {decisionsCount} decision{s} registered: {first 2 decisions, e.g. "auth: OAuth not SAML; data-model: tenant-scoped indexes"}
|
|
337
|
+
> - {deferralsCount} deferral{s} registered: {first 1, e.g. "[major] Rate-limit per-tenant — out of scope for v1"}
|
|
338
|
+
> - View: {webUrl}
|
|
339
|
+
>
|
|
340
|
+
> Future `/ritual build` calls touching `{first 2 of filesChanged}` will now see this implementation in their priorContext block.
|
|
341
|
+
|
|
342
|
+
The closing sentence is the most important one: it tells the user **what just happened in the system** in product-level terms. Without it, sync_implementation feels like a write-only black hole. With it, the user understands they just contributed to the workspace's memory.
|
|
343
|
+
|
|
344
|
+
If they want to check the state at any time, point them at:
|
|
345
|
+
|
|
346
|
+
> `ritual graph status` (in their CLI) — shows the workspace's current KG counts + recent implementations.
|
|
347
|
+
|
|
322
348
|
### Failure modes & recovery
|
|
323
349
|
|
|
324
350
|
**Discovery generation hangs (>5 min polling without `ready: true`)**: ask the user — wait longer? retry (`suggest_discovery_questions` again, new task)? or skip discovery entirely (proceed to Phase 6 without picked questions)?
|
|
@@ -51,7 +51,7 @@ When **not** to use:
|
|
|
51
51
|
- An exploration already exists with recommendations — fetch directly via `get_exploration` + `get_recommendations`
|
|
52
52
|
- The user wants to *implement* a feature from existing recommendations — use `/ritual-builder-spec` (from `@ritual-ai/cli`)
|
|
53
53
|
|
|
54
|
-
### Workflow — 8
|
|
54
|
+
### Workflow — 9 phases (Phase 8 happens after the engineer ships the work)
|
|
55
55
|
|
|
56
56
|
Each phase has explicit **[USER PAUSE]** points — never skip them.
|
|
57
57
|
|
|
@@ -319,6 +319,32 @@ Show the final state:
|
|
|
319
319
|
>
|
|
320
320
|
> View at: https://dev.ritualapp.cloud/e/{exploration_id}
|
|
321
321
|
|
|
322
|
+
#### Phase 8 — After shipping: close the loop with `sync_implementation`
|
|
323
|
+
|
|
324
|
+
This phase happens *outside* the `/ritual build` chat — after the engineer has taken the accepted recommendations into their coding work and the implementation has actually landed (PR merged, etc.). The agent in that follow-up session should call `mcp__ritual__sync_implementation` to register what shipped, which decisions were made, and what was deliberately deferred.
|
|
325
|
+
|
|
326
|
+
When sync_implementation succeeds, the response now includes:
|
|
327
|
+
|
|
328
|
+
- `decisions: [{ decisionId, area, choice }, ...]` — IDs of every architectural decision logged
|
|
329
|
+
- `deferrals: [{ deferralId, rbId, severity }, ...]` — IDs of every deferral
|
|
330
|
+
- `decisionsCount`, `deferralsCount` — totals for the summary line
|
|
331
|
+
- `webUrl` — clickable link to the exploration's implementation record in the web UI
|
|
332
|
+
|
|
333
|
+
**Surface ALL of this to the user**, not just "ok logged." This is the visible signal that the loop closed. Format:
|
|
334
|
+
|
|
335
|
+
> ✓ Logged implementation for **{exploration name}**
|
|
336
|
+
> - {decisionsCount} decision{s} registered: {first 2 decisions, e.g. "auth: OAuth not SAML; data-model: tenant-scoped indexes"}
|
|
337
|
+
> - {deferralsCount} deferral{s} registered: {first 1, e.g. "[major] Rate-limit per-tenant — out of scope for v1"}
|
|
338
|
+
> - View: {webUrl}
|
|
339
|
+
>
|
|
340
|
+
> Future `/ritual build` calls touching `{first 2 of filesChanged}` will now see this implementation in their priorContext block.
|
|
341
|
+
|
|
342
|
+
The closing sentence is the most important one: it tells the user **what just happened in the system** in product-level terms. Without it, sync_implementation feels like a write-only black hole. With it, the user understands they just contributed to the workspace's memory.
|
|
343
|
+
|
|
344
|
+
If they want to check the state at any time, point them at:
|
|
345
|
+
|
|
346
|
+
> `ritual graph status` (in their CLI) — shows the workspace's current KG counts + recent implementations.
|
|
347
|
+
|
|
322
348
|
### Failure modes & recovery
|
|
323
349
|
|
|
324
350
|
**Discovery generation hangs (>5 min polling without `ready: true`)**: ask the user — wait longer? retry (`suggest_discovery_questions` again, new task)? or skip discovery entirely (proceed to Phase 6 without picked questions)?
|
|
@@ -51,7 +51,7 @@ When **not** to use:
|
|
|
51
51
|
- An exploration already exists with recommendations — fetch directly via `get_exploration` + `get_recommendations`
|
|
52
52
|
- The user wants to *implement* a feature from existing recommendations — use `/ritual-builder-spec` (from `@ritual-ai/cli`)
|
|
53
53
|
|
|
54
|
-
### Workflow — 8
|
|
54
|
+
### Workflow — 9 phases (Phase 8 happens after the engineer ships the work)
|
|
55
55
|
|
|
56
56
|
Each phase has explicit **[USER PAUSE]** points — never skip them.
|
|
57
57
|
|
|
@@ -319,6 +319,32 @@ Show the final state:
|
|
|
319
319
|
>
|
|
320
320
|
> View at: https://dev.ritualapp.cloud/e/{exploration_id}
|
|
321
321
|
|
|
322
|
+
#### Phase 8 — After shipping: close the loop with `sync_implementation`
|
|
323
|
+
|
|
324
|
+
This phase happens *outside* the `/ritual build` chat — after the engineer has taken the accepted recommendations into their coding work and the implementation has actually landed (PR merged, etc.). The agent in that follow-up session should call `mcp__ritual__sync_implementation` to register what shipped, which decisions were made, and what was deliberately deferred.
|
|
325
|
+
|
|
326
|
+
When sync_implementation succeeds, the response now includes:
|
|
327
|
+
|
|
328
|
+
- `decisions: [{ decisionId, area, choice }, ...]` — IDs of every architectural decision logged
|
|
329
|
+
- `deferrals: [{ deferralId, rbId, severity }, ...]` — IDs of every deferral
|
|
330
|
+
- `decisionsCount`, `deferralsCount` — totals for the summary line
|
|
331
|
+
- `webUrl` — clickable link to the exploration's implementation record in the web UI
|
|
332
|
+
|
|
333
|
+
**Surface ALL of this to the user**, not just "ok logged." This is the visible signal that the loop closed. Format:
|
|
334
|
+
|
|
335
|
+
> ✓ Logged implementation for **{exploration name}**
|
|
336
|
+
> - {decisionsCount} decision{s} registered: {first 2 decisions, e.g. "auth: OAuth not SAML; data-model: tenant-scoped indexes"}
|
|
337
|
+
> - {deferralsCount} deferral{s} registered: {first 1, e.g. "[major] Rate-limit per-tenant — out of scope for v1"}
|
|
338
|
+
> - View: {webUrl}
|
|
339
|
+
>
|
|
340
|
+
> Future `/ritual build` calls touching `{first 2 of filesChanged}` will now see this implementation in their priorContext block.
|
|
341
|
+
|
|
342
|
+
The closing sentence is the most important one: it tells the user **what just happened in the system** in product-level terms. Without it, sync_implementation feels like a write-only black hole. With it, the user understands they just contributed to the workspace's memory.
|
|
343
|
+
|
|
344
|
+
If they want to check the state at any time, point them at:
|
|
345
|
+
|
|
346
|
+
> `ritual graph status` (in their CLI) — shows the workspace's current KG counts + recent implementations.
|
|
347
|
+
|
|
322
348
|
### Failure modes & recovery
|
|
323
349
|
|
|
324
350
|
**Discovery generation hangs (>5 min polling without `ready: true`)**: ask the user — wait longer? retry (`suggest_discovery_questions` again, new task)? or skip discovery entirely (proceed to Phase 6 without picked questions)?
|
|
@@ -51,7 +51,7 @@ When **not** to use:
|
|
|
51
51
|
- An exploration already exists with recommendations — fetch directly via `get_exploration` + `get_recommendations`
|
|
52
52
|
- The user wants to *implement* a feature from existing recommendations — use `/ritual-builder-spec` (from `@ritual-ai/cli`)
|
|
53
53
|
|
|
54
|
-
### Workflow — 8
|
|
54
|
+
### Workflow — 9 phases (Phase 8 happens after the engineer ships the work)
|
|
55
55
|
|
|
56
56
|
Each phase has explicit **[USER PAUSE]** points — never skip them.
|
|
57
57
|
|
|
@@ -319,6 +319,32 @@ Show the final state:
|
|
|
319
319
|
>
|
|
320
320
|
> View at: https://dev.ritualapp.cloud/e/{exploration_id}
|
|
321
321
|
|
|
322
|
+
#### Phase 8 — After shipping: close the loop with `sync_implementation`
|
|
323
|
+
|
|
324
|
+
This phase happens *outside* the `/ritual build` chat — after the engineer has taken the accepted recommendations into their coding work and the implementation has actually landed (PR merged, etc.). The agent in that follow-up session should call `mcp__ritual__sync_implementation` to register what shipped, which decisions were made, and what was deliberately deferred.
|
|
325
|
+
|
|
326
|
+
When sync_implementation succeeds, the response now includes:
|
|
327
|
+
|
|
328
|
+
- `decisions: [{ decisionId, area, choice }, ...]` — IDs of every architectural decision logged
|
|
329
|
+
- `deferrals: [{ deferralId, rbId, severity }, ...]` — IDs of every deferral
|
|
330
|
+
- `decisionsCount`, `deferralsCount` — totals for the summary line
|
|
331
|
+
- `webUrl` — clickable link to the exploration's implementation record in the web UI
|
|
332
|
+
|
|
333
|
+
**Surface ALL of this to the user**, not just "ok logged." This is the visible signal that the loop closed. Format:
|
|
334
|
+
|
|
335
|
+
> ✓ Logged implementation for **{exploration name}**
|
|
336
|
+
> - {decisionsCount} decision{s} registered: {first 2 decisions, e.g. "auth: OAuth not SAML; data-model: tenant-scoped indexes"}
|
|
337
|
+
> - {deferralsCount} deferral{s} registered: {first 1, e.g. "[major] Rate-limit per-tenant — out of scope for v1"}
|
|
338
|
+
> - View: {webUrl}
|
|
339
|
+
>
|
|
340
|
+
> Future `/ritual build` calls touching `{first 2 of filesChanged}` will now see this implementation in their priorContext block.
|
|
341
|
+
|
|
342
|
+
The closing sentence is the most important one: it tells the user **what just happened in the system** in product-level terms. Without it, sync_implementation feels like a write-only black hole. With it, the user understands they just contributed to the workspace's memory.
|
|
343
|
+
|
|
344
|
+
If they want to check the state at any time, point them at:
|
|
345
|
+
|
|
346
|
+
> `ritual graph status` (in their CLI) — shows the workspace's current KG counts + recent implementations.
|
|
347
|
+
|
|
322
348
|
### Failure modes & recovery
|
|
323
349
|
|
|
324
350
|
**Discovery generation hangs (>5 min polling without `ready: true`)**: ask the user — wait longer? retry (`suggest_discovery_questions` again, new task)? or skip discovery entirely (proceed to Phase 6 without picked questions)?
|
|
@@ -51,7 +51,7 @@ When **not** to use:
|
|
|
51
51
|
- An exploration already exists with recommendations — fetch directly via `get_exploration` + `get_recommendations`
|
|
52
52
|
- The user wants to *implement* a feature from existing recommendations — use `/ritual-builder-spec` (from `@ritual-ai/cli`)
|
|
53
53
|
|
|
54
|
-
### Workflow — 8
|
|
54
|
+
### Workflow — 9 phases (Phase 8 happens after the engineer ships the work)
|
|
55
55
|
|
|
56
56
|
Each phase has explicit **[USER PAUSE]** points — never skip them.
|
|
57
57
|
|
|
@@ -319,6 +319,32 @@ Show the final state:
|
|
|
319
319
|
>
|
|
320
320
|
> View at: https://dev.ritualapp.cloud/e/{exploration_id}
|
|
321
321
|
|
|
322
|
+
#### Phase 8 — After shipping: close the loop with `sync_implementation`
|
|
323
|
+
|
|
324
|
+
This phase happens *outside* the `/ritual build` chat — after the engineer has taken the accepted recommendations into their coding work and the implementation has actually landed (PR merged, etc.). The agent in that follow-up session should call `mcp__ritual__sync_implementation` to register what shipped, which decisions were made, and what was deliberately deferred.
|
|
325
|
+
|
|
326
|
+
When sync_implementation succeeds, the response now includes:
|
|
327
|
+
|
|
328
|
+
- `decisions: [{ decisionId, area, choice }, ...]` — IDs of every architectural decision logged
|
|
329
|
+
- `deferrals: [{ deferralId, rbId, severity }, ...]` — IDs of every deferral
|
|
330
|
+
- `decisionsCount`, `deferralsCount` — totals for the summary line
|
|
331
|
+
- `webUrl` — clickable link to the exploration's implementation record in the web UI
|
|
332
|
+
|
|
333
|
+
**Surface ALL of this to the user**, not just "ok logged." This is the visible signal that the loop closed. Format:
|
|
334
|
+
|
|
335
|
+
> ✓ Logged implementation for **{exploration name}**
|
|
336
|
+
> - {decisionsCount} decision{s} registered: {first 2 decisions, e.g. "auth: OAuth not SAML; data-model: tenant-scoped indexes"}
|
|
337
|
+
> - {deferralsCount} deferral{s} registered: {first 1, e.g. "[major] Rate-limit per-tenant — out of scope for v1"}
|
|
338
|
+
> - View: {webUrl}
|
|
339
|
+
>
|
|
340
|
+
> Future `/ritual build` calls touching `{first 2 of filesChanged}` will now see this implementation in their priorContext block.
|
|
341
|
+
|
|
342
|
+
The closing sentence is the most important one: it tells the user **what just happened in the system** in product-level terms. Without it, sync_implementation feels like a write-only black hole. With it, the user understands they just contributed to the workspace's memory.
|
|
343
|
+
|
|
344
|
+
If they want to check the state at any time, point them at:
|
|
345
|
+
|
|
346
|
+
> `ritual graph status` (in their CLI) — shows the workspace's current KG counts + recent implementations.
|
|
347
|
+
|
|
322
348
|
### Failure modes & recovery
|
|
323
349
|
|
|
324
350
|
**Discovery generation hangs (>5 min polling without `ready: true`)**: ask the user — wait longer? retry (`suggest_discovery_questions` again, new task)? or skip discovery entirely (proceed to Phase 6 without picked questions)?
|
|
@@ -51,7 +51,7 @@ When **not** to use:
|
|
|
51
51
|
- An exploration already exists with recommendations — fetch directly via `get_exploration` + `get_recommendations`
|
|
52
52
|
- The user wants to *implement* a feature from existing recommendations — use `/ritual-builder-spec` (from `@ritual-ai/cli`)
|
|
53
53
|
|
|
54
|
-
### Workflow — 8
|
|
54
|
+
### Workflow — 9 phases (Phase 8 happens after the engineer ships the work)
|
|
55
55
|
|
|
56
56
|
Each phase has explicit **[USER PAUSE]** points — never skip them.
|
|
57
57
|
|
|
@@ -319,6 +319,32 @@ Show the final state:
|
|
|
319
319
|
>
|
|
320
320
|
> View at: https://dev.ritualapp.cloud/e/{exploration_id}
|
|
321
321
|
|
|
322
|
+
#### Phase 8 — After shipping: close the loop with `sync_implementation`
|
|
323
|
+
|
|
324
|
+
This phase happens *outside* the `/ritual build` chat — after the engineer has taken the accepted recommendations into their coding work and the implementation has actually landed (PR merged, etc.). The agent in that follow-up session should call `mcp__ritual__sync_implementation` to register what shipped, which decisions were made, and what was deliberately deferred.
|
|
325
|
+
|
|
326
|
+
When sync_implementation succeeds, the response now includes:
|
|
327
|
+
|
|
328
|
+
- `decisions: [{ decisionId, area, choice }, ...]` — IDs of every architectural decision logged
|
|
329
|
+
- `deferrals: [{ deferralId, rbId, severity }, ...]` — IDs of every deferral
|
|
330
|
+
- `decisionsCount`, `deferralsCount` — totals for the summary line
|
|
331
|
+
- `webUrl` — clickable link to the exploration's implementation record in the web UI
|
|
332
|
+
|
|
333
|
+
**Surface ALL of this to the user**, not just "ok logged." This is the visible signal that the loop closed. Format:
|
|
334
|
+
|
|
335
|
+
> ✓ Logged implementation for **{exploration name}**
|
|
336
|
+
> - {decisionsCount} decision{s} registered: {first 2 decisions, e.g. "auth: OAuth not SAML; data-model: tenant-scoped indexes"}
|
|
337
|
+
> - {deferralsCount} deferral{s} registered: {first 1, e.g. "[major] Rate-limit per-tenant — out of scope for v1"}
|
|
338
|
+
> - View: {webUrl}
|
|
339
|
+
>
|
|
340
|
+
> Future `/ritual build` calls touching `{first 2 of filesChanged}` will now see this implementation in their priorContext block.
|
|
341
|
+
|
|
342
|
+
The closing sentence is the most important one: it tells the user **what just happened in the system** in product-level terms. Without it, sync_implementation feels like a write-only black hole. With it, the user understands they just contributed to the workspace's memory.
|
|
343
|
+
|
|
344
|
+
If they want to check the state at any time, point them at:
|
|
345
|
+
|
|
346
|
+
> `ritual graph status` (in their CLI) — shows the workspace's current KG counts + recent implementations.
|
|
347
|
+
|
|
322
348
|
### Failure modes & recovery
|
|
323
349
|
|
|
324
350
|
**Discovery generation hangs (>5 min polling without `ready: true`)**: ask the user — wait longer? retry (`suggest_discovery_questions` again, new task)? or skip discovery entirely (proceed to Phase 6 without picked questions)?
|