@ritualai/cli 0.7.13 → 0.7.15
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/README.md +44 -0
- package/dist/commands/status.js +190 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/status-formatter.js +162 -0
- package/dist/lib/status-formatter.js.map +1 -0
- package/package.json +1 -1
- package/skills/claude-code/ritual/.ritual-bundle.json +2 -2
- package/skills/claude-code/ritual/DESIGN.md +1 -1
- package/skills/claude-code/ritual/SKILL.md +59 -2
- package/skills/claude-code/ritual/manifest.json +23 -8
- package/skills/claude-code/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/claude-code/ritual/references/build-flow.md +329 -17
- package/skills/claude-code/ritual/references/resume-flow.md +35 -13
- package/skills/claude-code/ritual/references/status-flow.md +94 -0
- package/skills/claude-code/ritual/references/ui-ux-checklist.md +198 -0
- package/skills/codex/ritual/.ritual-bundle.json +2 -2
- package/skills/codex/ritual/DESIGN.md +1 -1
- package/skills/codex/ritual/SKILL.md +59 -2
- package/skills/codex/ritual/manifest.json +23 -8
- package/skills/codex/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/codex/ritual/references/build-flow.md +329 -17
- package/skills/codex/ritual/references/resume-flow.md +35 -13
- package/skills/codex/ritual/references/status-flow.md +94 -0
- package/skills/codex/ritual/references/ui-ux-checklist.md +198 -0
- package/skills/cursor/ritual/.ritual-bundle.json +2 -2
- package/skills/cursor/ritual/DESIGN.md +1 -1
- package/skills/cursor/ritual/SKILL.md +59 -2
- package/skills/cursor/ritual/manifest.json +23 -8
- package/skills/cursor/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/cursor/ritual/references/build-flow.md +329 -17
- package/skills/cursor/ritual/references/resume-flow.md +35 -13
- package/skills/cursor/ritual/references/status-flow.md +94 -0
- package/skills/cursor/ritual/references/ui-ux-checklist.md +198 -0
- package/skills/gemini/ritual/.ritual-bundle.json +2 -2
- package/skills/gemini/ritual/DESIGN.md +1 -1
- package/skills/gemini/ritual/SKILL.md +59 -2
- package/skills/gemini/ritual/manifest.json +23 -8
- package/skills/gemini/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/gemini/ritual/references/build-flow.md +329 -17
- package/skills/gemini/ritual/references/resume-flow.md +35 -13
- package/skills/gemini/ritual/references/status-flow.md +94 -0
- package/skills/gemini/ritual/references/ui-ux-checklist.md +198 -0
- package/skills/kiro/ritual/.ritual-bundle.json +2 -2
- package/skills/kiro/ritual/DESIGN.md +1 -1
- package/skills/kiro/ritual/SKILL.md +59 -2
- package/skills/kiro/ritual/manifest.json +23 -8
- package/skills/kiro/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/kiro/ritual/references/build-flow.md +329 -17
- package/skills/kiro/ritual/references/resume-flow.md +35 -13
- package/skills/kiro/ritual/references/status-flow.md +94 -0
- package/skills/kiro/ritual/references/ui-ux-checklist.md +198 -0
- package/skills/vscode/ritual/.ritual-bundle.json +2 -2
- package/skills/vscode/ritual/DESIGN.md +1 -1
- package/skills/vscode/ritual/SKILL.md +59 -2
- package/skills/vscode/ritual/manifest.json +23 -8
- package/skills/vscode/ritual/references/brief-verification-checklist.md +169 -0
- package/skills/vscode/ritual/references/build-flow.md +329 -17
- package/skills/vscode/ritual/references/resume-flow.md +35 -13
- package/skills/vscode/ritual/references/status-flow.md +94 -0
- package/skills/vscode/ritual/references/ui-ux-checklist.md +198 -0
package/README.md
CHANGED
|
@@ -6,6 +6,50 @@ Codex, Kiro, Gemini CLI, Windsurf, etc.) to Ritual Cloud via the
|
|
|
6
6
|
|
|
7
7
|
Docs: [ritual.work/ritual-mcp/docs/](https://ritual.work/ritual-mcp/docs/)
|
|
8
8
|
|
|
9
|
+
## AI coding agents: start here
|
|
10
|
+
|
|
11
|
+
If you are an AI coding agent and a user asked you to "set up Ritual MCP,"
|
|
12
|
+
"install Ritual," or anything similar, follow this script **verbatim**.
|
|
13
|
+
Do not ask the user about their project, their stack, or where to register
|
|
14
|
+
the MCP server — `ritual init` handles all of that.
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
1. Do not scaffold the user's app yet.
|
|
18
|
+
|
|
19
|
+
2. Install or upgrade the CLI:
|
|
20
|
+
npm install -g @ritualai/cli
|
|
21
|
+
|
|
22
|
+
3. From the project root, run:
|
|
23
|
+
ritual init
|
|
24
|
+
|
|
25
|
+
4. If `init` opens a browser for sign-in, tell the user to complete
|
|
26
|
+
it. If they are a brand-new user, they will get a verification email
|
|
27
|
+
— they must click the link. Keep the terminal open while they do.
|
|
28
|
+
If the loopback times out, re-run `ritual init` once.
|
|
29
|
+
|
|
30
|
+
5. After `init` reports success, run:
|
|
31
|
+
ritual doctor
|
|
32
|
+
|
|
33
|
+
6. Tell the user to fully close and reopen their coding agent so the
|
|
34
|
+
newly-registered MCP server comes online. Reload / `/clear` is not
|
|
35
|
+
enough — the agent caches MCP config at startup.
|
|
36
|
+
|
|
37
|
+
7. Once the user is back in the agent, verify the `ritual` MCP server
|
|
38
|
+
is connected (in Claude Code: `/mcp`). Only then offer to start
|
|
39
|
+
product work — typically by running `/ritual build <feature>`.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Hard rules until `ritual init` succeeds:**
|
|
43
|
+
- Do not ask the user what kind of project they're building.
|
|
44
|
+
- Do not ask which stack to scaffold against.
|
|
45
|
+
- Do not ask whether to register MCP project-local vs user-global — `ritual init` picks the right scope per agent automatically.
|
|
46
|
+
- Do not edit `~/.claude.json`, `.mcp.json`, `.cursor/mcp.json`, or any other agent config file by hand.
|
|
47
|
+
- Do not paste docs URLs into a fetch tool and ask the user to read the rendered marketing site — the bootstrap script above is the authoritative source.
|
|
48
|
+
|
|
49
|
+
**Only escape hatch:** if the user explicitly declines Ritual setup, or if
|
|
50
|
+
`ritual init` fails twice in a row with the same error, ask the user how
|
|
51
|
+
they'd like to proceed. Don't surface the escape hatch unsolicited.
|
|
52
|
+
|
|
9
53
|
## Install
|
|
10
54
|
|
|
11
55
|
```bash
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.statusCommand = statusCommand;
|
|
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
|
+
const status_formatter_1 = require("../lib/status-formatter");
|
|
8
|
+
async function statusCommand(explorationIdArg, options) {
|
|
9
|
+
const token = await (0, config_1.getValidAccessToken)();
|
|
10
|
+
if (token.kind === 'not-signed-in') {
|
|
11
|
+
console.error(' ✗ Not signed in. Run `ritual login` first.');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
if (token.kind === 're-auth-required') {
|
|
15
|
+
console.error(` ✗ Session expired (${token.reason}). Run \`ritual login\` to re-auth.`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
const api = new api_client_1.ApiClient({
|
|
19
|
+
issuer: token.creds.issuer,
|
|
20
|
+
accessToken: token.accessToken,
|
|
21
|
+
});
|
|
22
|
+
if (options.watch) {
|
|
23
|
+
await runWatchLoop(api, explorationIdArg);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
await runOnce(api, explorationIdArg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async function runOnce(api, explorationIdArg) {
|
|
30
|
+
const inputs = await fetchStatus(api, explorationIdArg);
|
|
31
|
+
if (!inputs) {
|
|
32
|
+
// Already printed a friendly error in fetchStatus.
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
console.log((0, status_formatter_1.formatStatus)(inputs));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* --watch loop. Renders the status snapshot every 5s, in-place using
|
|
39
|
+
* ANSI cursor controls. Exits on:
|
|
40
|
+
* - terminal run states (`completed` / `failed` / `cancelled`)
|
|
41
|
+
* - the user pressing Ctrl+C
|
|
42
|
+
* - 3 consecutive fetch errors (no point thrashing if the API is down)
|
|
43
|
+
*
|
|
44
|
+
* Cadence locked at 5s — short enough to feel live, polite enough not
|
|
45
|
+
* to hammer the API on a long-running poll.
|
|
46
|
+
*/
|
|
47
|
+
async function runWatchLoop(api, explorationIdArg) {
|
|
48
|
+
let lastRenderedLines = 0;
|
|
49
|
+
let consecutiveErrors = 0;
|
|
50
|
+
const POLL_MS = 5000;
|
|
51
|
+
const stop = (code) => {
|
|
52
|
+
process.stdout.write('\n');
|
|
53
|
+
process.exit(code);
|
|
54
|
+
};
|
|
55
|
+
process.on('SIGINT', () => stop(130));
|
|
56
|
+
// First render: print fresh, no clear.
|
|
57
|
+
while (true) {
|
|
58
|
+
let inputs = null;
|
|
59
|
+
try {
|
|
60
|
+
inputs = await fetchStatus(api, explorationIdArg);
|
|
61
|
+
consecutiveErrors = 0;
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
consecutiveErrors += 1;
|
|
65
|
+
if (consecutiveErrors >= 3) {
|
|
66
|
+
console.error(`\n ✗ Repeated errors fetching status (${err.message}). Exiting watch.`);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (inputs) {
|
|
71
|
+
const rendered = (0, status_formatter_1.formatStatus)(inputs);
|
|
72
|
+
if (lastRenderedLines > 0) {
|
|
73
|
+
// Move cursor up by the previous render's line count + clear from there.
|
|
74
|
+
process.stdout.write(`\x1b[${lastRenderedLines}A\x1b[0J`);
|
|
75
|
+
}
|
|
76
|
+
process.stdout.write(rendered + '\n');
|
|
77
|
+
lastRenderedLines = rendered.split('\n').length + 1;
|
|
78
|
+
// Exit if run reached a terminal state.
|
|
79
|
+
const status = inputs.run?.status?.toLowerCase();
|
|
80
|
+
if (status === 'completed' || status === 'completed_with_errors') {
|
|
81
|
+
process.stdout.write('\n ✓ Run finished. Exiting watch.\n');
|
|
82
|
+
process.exit(0);
|
|
83
|
+
}
|
|
84
|
+
if (status === 'failed') {
|
|
85
|
+
process.stdout.write('\n ✗ Run failed. Exiting watch.\n');
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
if (status === 'cancelled') {
|
|
89
|
+
process.stdout.write('\n · Run cancelled. Exiting watch.\n');
|
|
90
|
+
process.exit(0);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
await sleep(POLL_MS);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async function fetchStatus(api, explorationIdArg) {
|
|
97
|
+
let explorationId;
|
|
98
|
+
if (explorationIdArg) {
|
|
99
|
+
explorationId = explorationIdArg;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
// Auto-resolve from .ritual/config.json.
|
|
103
|
+
const project = (0, project_config_1.loadProjectConfig)(process.cwd());
|
|
104
|
+
if (!project) {
|
|
105
|
+
console.error(' ✗ No `.ritual/config.json` in this directory. Either:\n' +
|
|
106
|
+
' ritual init — bind a workspace to this repo, OR\n' +
|
|
107
|
+
' ritual status <exploration-id> — fetch a specific exploration');
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
const picked = await pickCurrentExploration(api, project.workspaceId);
|
|
111
|
+
if (!picked) {
|
|
112
|
+
console.error(` ✗ No active or recent explorations found in workspace ${project.workspaceName}.`);
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
explorationId = picked;
|
|
116
|
+
}
|
|
117
|
+
// Fetch exploration shell + agentic-status + run in parallel.
|
|
118
|
+
const [exp, agenticStatus, runs] = await Promise.all([
|
|
119
|
+
api
|
|
120
|
+
.get(`/explorations/${encodeURIComponent(explorationId)}`)
|
|
121
|
+
.catch((err) => {
|
|
122
|
+
if (err.status === 404) {
|
|
123
|
+
console.error(` ✗ Exploration ${explorationId} not found.`);
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
throw err;
|
|
127
|
+
}),
|
|
128
|
+
api
|
|
129
|
+
.get(`/explorations/${encodeURIComponent(explorationId)}/agentic-status`)
|
|
130
|
+
.catch(() => null),
|
|
131
|
+
api
|
|
132
|
+
.get(`/agentic-runs?exploration_id=${encodeURIComponent(explorationId)}&status=running`)
|
|
133
|
+
.catch(() => []),
|
|
134
|
+
]);
|
|
135
|
+
if (!exp)
|
|
136
|
+
return null;
|
|
137
|
+
const run = runs && runs.length > 0
|
|
138
|
+
? { id: runs[0].agentic_run_id, status: runs[0].status }
|
|
139
|
+
: null;
|
|
140
|
+
return {
|
|
141
|
+
exploration: {
|
|
142
|
+
id: exp.id,
|
|
143
|
+
name: exp.name,
|
|
144
|
+
step: exp.step,
|
|
145
|
+
updatedAt: exp.updatedAt,
|
|
146
|
+
},
|
|
147
|
+
progress: agenticStatus?.progress ?? null,
|
|
148
|
+
run,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Pick the "current" exploration for `ritual status` with no arg.
|
|
153
|
+
*
|
|
154
|
+
* Ranking:
|
|
155
|
+
* 1. Any exploration with a RUNNING agentic run → return its id.
|
|
156
|
+
* 2. Else most-recently-updated where step != COMPLETED.
|
|
157
|
+
* 3. Else most-recently-updated full stop.
|
|
158
|
+
*
|
|
159
|
+
* Multiple RUNNING runs is uncommon. For v1 we pick whichever the API
|
|
160
|
+
* returns first (most-recently-started in practice); a multi-run picker
|
|
161
|
+
* can land in MVP-2 with `ritual status --runs`.
|
|
162
|
+
*/
|
|
163
|
+
async function pickCurrentExploration(api, workspaceId) {
|
|
164
|
+
const exps = await api.get(`/explorations?workspaceId=${encodeURIComponent(workspaceId)}&withImplementationStatus=true`);
|
|
165
|
+
if (!exps || exps.length === 0)
|
|
166
|
+
return null;
|
|
167
|
+
// Probe for a RUNNING run across explorations. Sorted by updatedAt
|
|
168
|
+
// desc first so the most recently-touched exploration gets the
|
|
169
|
+
// first run-probe — usually the right answer in one call.
|
|
170
|
+
const sorted = [...exps].sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime());
|
|
171
|
+
for (const e of sorted.slice(0, 5)) {
|
|
172
|
+
try {
|
|
173
|
+
const runs = await api.get(`/agentic-runs?exploration_id=${encodeURIComponent(e.id)}&status=running`);
|
|
174
|
+
if (runs && runs.length > 0)
|
|
175
|
+
return e.id;
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// fall through — never block on a probe failure
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// No RUNNING runs — pick most-recently-updated non-completed.
|
|
182
|
+
const nonComplete = sorted.find((e) => e.step !== 'COMPLETED');
|
|
183
|
+
if (nonComplete)
|
|
184
|
+
return nonComplete.id;
|
|
185
|
+
return sorted[0]?.id ?? null;
|
|
186
|
+
}
|
|
187
|
+
function sleep(ms) {
|
|
188
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":";;AAmCA,sCAwBC;AA3DD,0CAAoD;AACpD,kDAA8C;AAC9C,0DAA0D;AAC1D,8DAA0E;AAgCnE,KAAK,UAAU,aAAa,CAClC,gBAAoC,EACpC,OAAsB;IAEtB,MAAM,KAAK,GAAG,MAAM,IAAA,4BAAmB,GAAE,CAAC;IAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QACpC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,wBAAwB,KAAK,CAAC,MAAM,qCAAqC,CAAC,CAAC;QACzF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,GAAG,GAA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AAI,CAAC,CAAC,IAAI,CAC5B,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAC3E,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACpC,IAAI,CAAC;YACJ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,GAAG,CACzB,gCAAgC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,iBAAiB,CACzE,CAAC;YACF,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,CAAC,CAAC,EAAE,CAAC;QAC1C,CAAC;QAAC,MAAM,CAAC;YACR,gDAAgD;QACjD,CAAC;IACF,CAAC;IAED,8DAA8D;IAC9D,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;IAC/D,IAAI,WAAW;QAAE,OAAO,WAAW,CAAC,EAAE,CAAC;IAEvC,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,IAAI,CAAC;AAC9B,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,14 @@ 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
|
+
// 2026-05-15 (PR D) — `ritual status [--watch]` instant snapshot of
|
|
12
|
+
// an in-flight agentic run. Auto-resolves the current exploration
|
|
13
|
+
// from `.ritual/config.json` so the user doesn't have to remember
|
|
14
|
+
// IDs; --watch polls every 5s and redraws in place. Paired with the
|
|
15
|
+
// SKILL Step 8 reframe ("you're unblocked; runs continue server-
|
|
16
|
+
// side") to break the mental model where users feel obligated to
|
|
17
|
+
// stare at the polling loop.
|
|
18
|
+
const status_1 = require("./commands/status");
|
|
11
19
|
const graph_1 = require("./commands/graph");
|
|
12
20
|
const package_info_1 = require("./lib/package-info");
|
|
13
21
|
// 2026-05-15 (PR C) — pre-flight one-line stderr warning when the
|
|
@@ -61,6 +69,13 @@ program
|
|
|
61
69
|
.command('refresh')
|
|
62
70
|
.description('Force-refresh the cached access token using the stored refresh token')
|
|
63
71
|
.action(refresh_1.refreshCommand);
|
|
72
|
+
program
|
|
73
|
+
.command('status')
|
|
74
|
+
.description('Show the current agentic run status. With --watch, polls every 5s and redraws in place. ' +
|
|
75
|
+
'With no exploration ID, auto-resolves the workspace\'s currently-active run.')
|
|
76
|
+
.argument('[exploration-id]', 'Specific exploration to inspect (defaults to the current run)')
|
|
77
|
+
.option('--watch', 'Poll every 5s and redraw in place; exits on terminal state or Ctrl+C')
|
|
78
|
+
.action((explorationId, opts) => (0, status_1.statusCommand)(explorationId, { watch: opts.watch }));
|
|
64
79
|
program
|
|
65
80
|
.command('doctor')
|
|
66
81
|
.description('Sanity check the CLI environment: credentials, endpoints, detected agents')
|
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;AAClD,4CAAsD;AACtD,qDAA4D;AAC5D,kEAAkE;AAClE,oEAAoE;AACpE,+DAA+D;AAC/D,iEAAiE;AACjE,oEAAoE;AAC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F,CAC1F;KACA,MAAM,CAAC,aAAa,EAAE,8DAA8D,CAAC;KACrF,MAAM,CAAC,0BAAkB,CAAC,CAAC;AAE7B,qEAAqE;AACrE,qEAAqE;AACrE,oEAAoE;AACpE,kEAAkE;AAClE,oDAAoD;AACpD,IAAA,8CAAuB,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/C,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;IACrD,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure formatter for `ritual status` output.
|
|
4
|
+
*
|
|
5
|
+
* Kept as a side-effect-free function so it can be unit-tested in
|
|
6
|
+
* isolation without HTTP / filesystem / clock mocks. The command
|
|
7
|
+
* orchestration in `commands/status.ts` does the fetching; this just
|
|
8
|
+
* turns shapes into strings.
|
|
9
|
+
*
|
|
10
|
+
* Design choices (locked in `backlog_ritual_status_and_unblocked_framing.md`):
|
|
11
|
+
*
|
|
12
|
+
* - Run line first. "RUNNING for 17m 41s" is the headline; exploration
|
|
13
|
+
* name is a footer parenthetical, not the lead.
|
|
14
|
+
* - Pace + ETA computed only when `completedQuestions >= 3` so the
|
|
15
|
+
* average doesn't get whiplashed by the first question's latency.
|
|
16
|
+
* - Activity / last-write age is the real "is it actually moving?"
|
|
17
|
+
* signal — climbing past ~3 min without `completedQuestions`
|
|
18
|
+
* advancing is actionable info, not a snapshot lie.
|
|
19
|
+
*
|
|
20
|
+
* The shape this formatter consumes is the merged view (live progress
|
|
21
|
+
* from `Exploration.agenticProgress` + run id from
|
|
22
|
+
* `GET /agentic-runs?explorationId=...&status=RUNNING&limit=1`), never
|
|
23
|
+
* the raw `AgenticJob` row whose `totalQuestions` / `progress.steps`
|
|
24
|
+
* fields can sit unwritten for entire runs (bug filed
|
|
25
|
+
* 2026-05-15 — see `backlog_ritual_status_and_unblocked_framing.md`).
|
|
26
|
+
*/
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.formatStatus = formatStatus;
|
|
29
|
+
exports.humanizeDuration = humanizeDuration;
|
|
30
|
+
function formatStatus(input) {
|
|
31
|
+
const now = (input.now ?? new Date()).getTime();
|
|
32
|
+
const lines = [];
|
|
33
|
+
if (input.run && input.progress) {
|
|
34
|
+
lines.push(...formatRunSection(input.run, input.progress, input.exploration, now));
|
|
35
|
+
}
|
|
36
|
+
else if (input.progress) {
|
|
37
|
+
lines.push(...formatNoRunButProgress(input.progress, input.exploration, now));
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
lines.push(...formatNoProgress(input.exploration));
|
|
41
|
+
}
|
|
42
|
+
lines.push('');
|
|
43
|
+
lines.push(`(Exploration: ${input.exploration.name})`);
|
|
44
|
+
lines.push(` ${input.exploration.id} · step: ${input.exploration.step}`);
|
|
45
|
+
return lines.join('\n');
|
|
46
|
+
}
|
|
47
|
+
function formatRunSection(run, progress, exploration, now) {
|
|
48
|
+
const runShort = truncateId(run.id);
|
|
49
|
+
const ageSec = progress.startedAt
|
|
50
|
+
? Math.round((now - new Date(progress.startedAt).getTime()) / 1000)
|
|
51
|
+
: null;
|
|
52
|
+
const runLine = ageSec != null
|
|
53
|
+
? `Run ${runShort} · ${run.status.toUpperCase()} for ${humanizeDuration(ageSec)}`
|
|
54
|
+
: `Run ${runShort} · ${run.status.toUpperCase()}`;
|
|
55
|
+
const phaseLine = formatPhaseLine(progress);
|
|
56
|
+
const questionsLine = formatQuestionsLine(progress);
|
|
57
|
+
const activityLine = formatActivityLine(exploration.updatedAt, now);
|
|
58
|
+
const paceLine = formatPaceLine(progress, now);
|
|
59
|
+
const nextLine = formatNextLine(progress);
|
|
60
|
+
const out = [runLine, phaseLine];
|
|
61
|
+
if (questionsLine)
|
|
62
|
+
out.push(questionsLine);
|
|
63
|
+
out.push(activityLine);
|
|
64
|
+
if (paceLine)
|
|
65
|
+
out.push(paceLine);
|
|
66
|
+
if (nextLine)
|
|
67
|
+
out.push(nextLine);
|
|
68
|
+
return out;
|
|
69
|
+
}
|
|
70
|
+
function formatNoRunButProgress(progress, exploration, now) {
|
|
71
|
+
// No active run, but agenticProgress on the exploration shows past
|
|
72
|
+
// activity. Either the run completed or it never started. Either
|
|
73
|
+
// way, the last-snapshot view is what's useful.
|
|
74
|
+
const out = [`Run (no active run)`];
|
|
75
|
+
out.push(formatPhaseLine(progress));
|
|
76
|
+
const questionsLine = formatQuestionsLine(progress);
|
|
77
|
+
if (questionsLine)
|
|
78
|
+
out.push(questionsLine);
|
|
79
|
+
out.push(formatActivityLine(exploration.updatedAt, now));
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
function formatNoProgress(exploration) {
|
|
83
|
+
return [
|
|
84
|
+
`Run (no run started yet)`,
|
|
85
|
+
`Phase —`,
|
|
86
|
+
`Step ${exploration.step}`,
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
function formatPhaseLine(progress) {
|
|
90
|
+
const phase = progress.phase ?? '—';
|
|
91
|
+
const pct = typeof progress.percent === 'number' ? ` (${progress.percent}%)` : '';
|
|
92
|
+
return `Phase ${phase}${pct}`;
|
|
93
|
+
}
|
|
94
|
+
function formatQuestionsLine(progress) {
|
|
95
|
+
const total = progress.totalQuestions;
|
|
96
|
+
const done = progress.completedQuestions;
|
|
97
|
+
const failed = progress.failedQuestions ?? 0;
|
|
98
|
+
if (typeof total !== 'number' || typeof done !== 'number')
|
|
99
|
+
return null;
|
|
100
|
+
if (total === 0)
|
|
101
|
+
return null;
|
|
102
|
+
const failedSegment = failed > 0 ? ` · ${failed} failed` : ` · 0 failed`;
|
|
103
|
+
return `Questions ${done} / ${total}${failedSegment}`;
|
|
104
|
+
}
|
|
105
|
+
function formatActivityLine(updatedAt, now) {
|
|
106
|
+
const ageSec = Math.max(0, Math.round((now - new Date(updatedAt).getTime()) / 1000));
|
|
107
|
+
return `Activity last DB write ${humanizeDuration(ageSec)} ago`;
|
|
108
|
+
}
|
|
109
|
+
function formatPaceLine(progress, now) {
|
|
110
|
+
const done = progress.completedQuestions ?? 0;
|
|
111
|
+
const total = progress.totalQuestions ?? 0;
|
|
112
|
+
if (done < 3)
|
|
113
|
+
return `Pace warming up — check back in 30s`;
|
|
114
|
+
if (!progress.startedAt || total <= done)
|
|
115
|
+
return null;
|
|
116
|
+
const elapsedSec = (now - new Date(progress.startedAt).getTime()) / 1000;
|
|
117
|
+
if (elapsedSec <= 0)
|
|
118
|
+
return null;
|
|
119
|
+
const secPerQ = elapsedSec / done;
|
|
120
|
+
const remainingSec = Math.round(secPerQ * (total - done));
|
|
121
|
+
return `Pace ~${Math.round(secPerQ)}s/question · ETA ~${humanizeDuration(remainingSec)} remaining`;
|
|
122
|
+
}
|
|
123
|
+
function formatNextLine(progress) {
|
|
124
|
+
const phase = (progress.phase ?? '').toLowerCase();
|
|
125
|
+
const nextByPhase = {
|
|
126
|
+
discovery: 'Accepting questions',
|
|
127
|
+
accepting: 'Answering',
|
|
128
|
+
answering: 'Recommendations (auto-advances when questions are done)',
|
|
129
|
+
submitting: 'Recommendations',
|
|
130
|
+
recommendations: 'Build brief (after admin review)',
|
|
131
|
+
complete: '—',
|
|
132
|
+
failed: '—',
|
|
133
|
+
};
|
|
134
|
+
const next = nextByPhase[phase];
|
|
135
|
+
return next ? `Next ${next}` : null;
|
|
136
|
+
}
|
|
137
|
+
function humanizeDuration(seconds) {
|
|
138
|
+
if (seconds < 0)
|
|
139
|
+
seconds = 0;
|
|
140
|
+
if (seconds < 60)
|
|
141
|
+
return `${seconds}s`;
|
|
142
|
+
const m = Math.floor(seconds / 60);
|
|
143
|
+
const s = seconds % 60;
|
|
144
|
+
if (m < 60) {
|
|
145
|
+
return s === 0 ? `${m}m` : `${m}m ${s}s`;
|
|
146
|
+
}
|
|
147
|
+
const h = Math.floor(m / 60);
|
|
148
|
+
const remM = m % 60;
|
|
149
|
+
return remM === 0 ? `${h}h` : `${h}h ${remM}m`;
|
|
150
|
+
}
|
|
151
|
+
function truncateId(id) {
|
|
152
|
+
// "ba4d2b42-…" form — first 8 chars + ellipsis. Matches the agent-
|
|
153
|
+
// facing copy in the SKILL so users can pattern-match against IDs
|
|
154
|
+
// they've seen elsewhere. UUIDs slice cleanly at 8 (no trailing
|
|
155
|
+
// hyphen); for non-UUID inputs we strip a trailing dash so we
|
|
156
|
+
// don't render "r1-aaaa--…" with double hyphens.
|
|
157
|
+
if (id.length <= 8)
|
|
158
|
+
return id;
|
|
159
|
+
const head = id.slice(0, 8).replace(/-+$/, '');
|
|
160
|
+
return `${head}-…`;
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=status-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-formatter.js","sourceRoot":"","sources":["../../src/lib/status-formatter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;AA4BH,oCAiBC;AAyGD,4CAWC;AArID,SAAgB,YAAY,CAAC,KAAmB;IAC/C,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAChD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;IACpF,CAAC;SAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC3B,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AG,EAAE;QAAE,OAAO,GAAG,OAAO,GAAG,CAAC;IACvC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACnC,MAAM,CAAC,GAAG,OAAO,GAAG,EAAE,CAAC;IACvB,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC;IAC1C,CAAC;IACD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;IACpB,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC;AAChD,CAAC;AAED,SAAS,UAAU,CAAC,EAAU;IAC7B,mEAAmE;IACnE,kEAAkE;IAClE,gEAAgE;IAChE,8DAA8D;IAC9D,iDAAiD;IACjD,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAC9B,MAAM,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,GAAG,IAAI,IAAI,CAAC;AACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ritualai/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
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",
|
|
@@ -20,7 +20,7 @@ The split version keeps:
|
|
|
20
20
|
|
|
21
21
|
## Retired `/ritual recon`
|
|
22
22
|
|
|
23
|
-
`/ritual recon` is intentionally not part of the
|
|
23
|
+
`/ritual recon` is intentionally not part of the Ritual command surface. Its former workspace-history value is covered by `/ritual resume`; its file-decision-history value is covered by `/ritual lineage`; and its repo-reading behavior is normal coding-agent behavior in plain English.
|
|
24
24
|
|
|
25
25
|
## Context packet principle
|
|
26
26
|
|
|
@@ -18,6 +18,36 @@ Before executing any subcommand, read and follow:
|
|
|
18
18
|
|
|
19
19
|
Do not reintroduce `/ritual recon`. Use plain-language repo inspection, `/ritual resume`, or `/ritual lineage` depending on intent.
|
|
20
20
|
|
|
21
|
+
## Contract strength — load-bearing for all subcommands
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
If this SKILL says *"DO NOT do X"*, your default action is to not do X. You may not override based on your in-the-moment assessment that X would be:
|
|
26
|
+
|
|
27
|
+
- helpful
|
|
28
|
+
- clearer
|
|
29
|
+
- shorter
|
|
30
|
+
- more convenient
|
|
31
|
+
- *"obviously what the user really wants"*
|
|
32
|
+
- *"a small improvement on top of the SKILL's contract"*
|
|
33
|
+
|
|
34
|
+
When a local example or your own instinct conflicts with a contract-strength rule, **the contract wins.** Re-read the rule. Trust that the prior version of you also thought the override "feels right" — that's exactly the case the contract exists to prevent.
|
|
35
|
+
|
|
36
|
+
When two contract-strength rules genuinely conflict (rare): **stop, surface the conflict to the user, and ask which to honor.** Do not improvise a resolution.
|
|
37
|
+
|
|
38
|
+
This rule is the meta-pattern that closes the failure class we kept hitting before 2026-05-15: the SKILL named the right behavior in each step (Step 7 picker, Step 9 preview-verbatim, Step 9 action menu, picker numbering, etc.), but the agent treated the prose as advisory and freelanced anyway. Anti-patterns are **executable constraints, not taste guidance.** When an anti-pattern says "agent must NOT", read it as a hard error, not a preference.
|
|
39
|
+
|
|
40
|
+
Examples of contract-strength rules currently in force (non-exhaustive):
|
|
41
|
+
|
|
42
|
+
- `references/build-flow.md` Step 7 transition lock — must NOT skip the Areas picker, must call `accept_discovery_questions` before `start_agentic_run`.
|
|
43
|
+
- `references/build-flow.md` Step 7.3.1 rendering contract — Areas index has NO question previews, single numbering stream.
|
|
44
|
+
- `references/build-flow.md` Step 7.4.5 fire-on-trigger — scope-classification gate is the contract, not a suggestion.
|
|
45
|
+
- `references/build-flow.md` Step 9 action menu lock — blessed set is exactly `accept recommended` / `drop R{N}` / `drill R{N}` / `comment R{N}` / `pause` (+ `request admin review` for collaborators). NO freelance `dedupe` / `open the admin` / invented compound actions.
|
|
46
|
+
- `references/build-flow.md` Step 9 rendering — use the server preview verbatim; no free-form summarization on top.
|
|
47
|
+
- `references/resume-flow.md` § R2 picker rendering — ONE picker number per exploration; continuation prose indented; flat numbering across state buckets.
|
|
48
|
+
|
|
49
|
+
When you encounter a rule labeled with any of the marker words above, treat it the same way you'd treat a unit-test assertion: violating it is a regression, not a stylistic choice.
|
|
50
|
+
|
|
21
51
|
## Routing
|
|
22
52
|
|
|
23
53
|
Parse the first token of the argument:
|
|
@@ -28,9 +58,10 @@ Parse the first token of the argument:
|
|
|
28
58
|
| `resume` | `references/resume-flow.md` | "Pick up where I left off." Lists in-flight explorations with state badges and jumps to the right step. |
|
|
29
59
|
| `lineage` | `references/lineage-flow.md` | Paste a file path (or set of paths); see every prior exploration / decision / deferral that touched those files. |
|
|
30
60
|
| `context-pulse` | `references/context-pulse-flow.md` | Score readiness / context debt for a feature ask or exploration. Can seed a `CONTEXT-<feature>.md` file with relevant codebase + KG context that `/ritual build` picks up automatically. Also surfaces inline during build so the user watches debt drop. |
|
|
61
|
+
| `status` | `references/status-flow.md` | Read-only mirror of the `ritual status` terminal CLI command (CLI 0.7.14+) for users who want a quick run-progress check inside the agent session instead of in a separate terminal. Calls `mcp__ritual__get_agentic_run` + renders the same run-first layout the CLI uses. |
|
|
31
62
|
| (anything else, OR no subcommand) | default to `build` and treat the entire argument as the problem statement | |
|
|
32
63
|
|
|
33
|
-
The
|
|
64
|
+
The Ritual CLI surface is intentionally narrow: `build`, `resume`, `lineage`, `context-pulse`, plus the read-only `status` mirror. Legacy exposed `explore`, `run`, `brief`, `gate`, `spec`, `questions`, `gherkin`, `recs` — all of which mapped 1:1 to MCP tool calls and provided no agent-CLI value over plain English. We don't replicate them; the agent can call any MCP tool directly when the user asks for "the recs on exp-X" or "decisions on file Y". (`/ritual recon` shipped briefly in PR #174 as a fifth command — retired because its unique value duplicated `/ritual resume` (workspace history) + `/ritual lineage` (decisions on files), and its non-duplicate parts (map repo, trace flow, explain file) are exactly what the agent does fluently in plain English without needing a SKILL-defined menu.)
|
|
34
65
|
|
|
35
66
|
|
|
36
67
|
## Subcommand reference files
|
|
@@ -67,5 +98,31 @@ When the user says things like *"what's the status of exp-X?"*, *"show me the re
|
|
|
67
98
|
| Kick off / re-run the agentic pipeline | `mcp__ritual__start_agentic_run(exploration_id, …)` |
|
|
68
99
|
| Did anyone implement something on these files? | `mcp__ritual__query_knowledge_graph(sources=[…])` — same plumbing as `/ritual lineage` |
|
|
69
100
|
|
|
70
|
-
This is intentional. Legacy exposed each of these as its own slash-command (`/ritual
|
|
101
|
+
This is intentional. Legacy exposed each of these as its own slash-command (`/ritual recs`, `/ritual run`, etc.) and the surface area ballooned without adding agent value. We keep the slash-commands narrow (`build`, `resume`, `lineage`, `context-pulse`, plus the read-only `status` mirror) and let the agent fluently call MCP tools for everything else. Note: `/ritual status` is the one deliberate exception — it exists as a thin SKILL mirror of the terminal CLI command so users who want an in-chat status check don't have to context-switch to a separate terminal. Do not reintroduce `/ritual recon`: its former workspace-history value is covered by `/ritual resume`; its file-decision-history value is covered by `/ritual lineage`; and repo-reading behaviors are normal coding-agent behavior in plain English.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Before this skill is installed — bootstrap context
|
|
106
|
+
|
|
107
|
+
This SKILL only governs behavior **after** `ritual init` has run and the
|
|
108
|
+
`/ritual` skill has been copied into the agent's skills directory. Before
|
|
109
|
+
that, the agent has no Ritual-specific instructions in scope.
|
|
110
|
+
|
|
111
|
+
If you are reading this file by browsing the repo, or as part of a
|
|
112
|
+
post-mortem on why a user's "set up Ritual MCP" request went sideways:
|
|
113
|
+
the **pre-install** instruction surface lives in three places, in priority
|
|
114
|
+
order:
|
|
115
|
+
|
|
116
|
+
1. **`learn.ritual.work/llms.txt`** — canonical machine-readable bootstrap script. Served as plain text. WebFetch-safe.
|
|
117
|
+
2. **`ritual.work/llms.txt`** — identical bytes to (1). Served from the marketing site so an agent handed any `ritual.work/...` URL can find it without knowing about `learn.ritual.work`.
|
|
118
|
+
3. **`apps/cli/README.md`** in this repo (ships to npmjs.com via `@ritualai/cli`) — has the same "AI coding agents: start here" block at the top.
|
|
119
|
+
|
|
120
|
+
All three sources must say the same thing. The canonical content is the
|
|
121
|
+
7-step `npm install -g @ritualai/cli` → `ritual init` → `ritual doctor`
|
|
122
|
+
→ restart-agent → verify-MCP → `/ritual build` flow, with explicit
|
|
123
|
+
"do not ask the user about their project until init succeeds" rules.
|
|
124
|
+
|
|
125
|
+
When updating one, update all three. The cross-repo sync is intentional
|
|
126
|
+
duplication — agents need the bootstrap visible at whichever URL they
|
|
127
|
+
happen to be handed.
|
|
71
128
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"path": "DESIGN.md",
|
|
4
|
-
"lines":
|
|
5
|
-
"bytes":
|
|
4
|
+
"lines": 35,
|
|
5
|
+
"bytes": 2227
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"path": "SKILL.md",
|
|
9
|
-
"lines":
|
|
10
|
-
"bytes":
|
|
9
|
+
"lines": 102,
|
|
10
|
+
"bytes": 9156
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"path": "agents/openai.yaml",
|
|
@@ -21,8 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"path": "references/build-flow.md",
|
|
24
|
-
"lines":
|
|
25
|
-
"bytes":
|
|
24
|
+
"lines": 2652,
|
|
25
|
+
"bytes": 165455
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "references/brief-verification-checklist.md",
|
|
29
|
+
"lines": 169,
|
|
30
|
+
"bytes": 10820
|
|
26
31
|
},
|
|
27
32
|
{
|
|
28
33
|
"path": "references/cli-output-contract.md",
|
|
@@ -46,12 +51,22 @@
|
|
|
46
51
|
},
|
|
47
52
|
{
|
|
48
53
|
"path": "references/resume-flow.md",
|
|
49
|
-
"lines":
|
|
50
|
-
"bytes":
|
|
54
|
+
"lines": 225,
|
|
55
|
+
"bytes": 14048
|
|
51
56
|
},
|
|
52
57
|
{
|
|
53
58
|
"path": "references/scoring-fallback.md",
|
|
54
59
|
"lines": 126,
|
|
55
60
|
"bytes": 6494
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "references/status-flow.md",
|
|
64
|
+
"lines": 94,
|
|
65
|
+
"bytes": 6096
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"path": "references/ui-ux-checklist.md",
|
|
69
|
+
"lines": 198,
|
|
70
|
+
"bytes": 12167
|
|
56
71
|
}
|
|
57
72
|
]
|