codecartographer-pi 0.12.2 → 0.12.3
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
CHANGED
|
@@ -86,7 +86,7 @@ Add to your host config (`~/.config/claude-code/config.json`, `claude_desktop_co
|
|
|
86
86
|
}
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
Official MCP Registry
|
|
89
|
+
[Official MCP Registry listing](https://registry.modelcontextprotocol.io/?search=CodeCartographer): `io.github.HuginnIndustries/codecartographer`.
|
|
90
90
|
|
|
91
91
|
### Drop-in template (one-off / evaluation)
|
|
92
92
|
|
|
@@ -288,7 +288,7 @@ Beyond the slash commands, the Pi extension layers on:
|
|
|
288
288
|
| `/codecarto-init [variant]` | Copy `.codecarto/` into the current repository, select pipeline variant |
|
|
289
289
|
| `/codecarto-open` | Activate an existing `.codecarto/` workspace in a new Pi session without resetting durable state |
|
|
290
290
|
| `/codecarto-status` | Current phase, progress, open questions |
|
|
291
|
-
| `/codecarto-next [--auto [--strict]] [--llm-steer \| --no-llm-steer]` | Spawn the next eligible phase as a sub-agent. `--auto` walks the full pipeline end-to-end (
|
|
291
|
+
| `/codecarto-next [--auto [--strict]] [--llm-steer \| --no-llm-steer]` | Spawn the next eligible phase as a sub-agent. After the sub-agent finishes, auto-validates and auto-completes the phase so `status.yaml` advances without manual steps. `--auto` walks the full pipeline end-to-end (same validate + complete + advance loop, repeated); `--strict` flips the `PASS WITH GAPS` rule from "advance" to "pause". |
|
|
292
292
|
| `/codecarto-phase <id>` | Force a specific phase, even out of pipeline order |
|
|
293
293
|
| `/codecarto-validate [phase]` | Validate a phase output against completion criteria |
|
|
294
294
|
| `/codecarto-complete [phase]` | Validate and atomically apply the phase handoff, canonical status, closeout, and log entry |
|
|
@@ -66,7 +66,7 @@ function formatTrailer(input) {
|
|
|
66
66
|
lines.push(`Phase transcript: \`${input.sessionFile}\` (open via \`/resume\`).`);
|
|
67
67
|
}
|
|
68
68
|
if (input.status === "completed") {
|
|
69
|
-
lines.push("
|
|
69
|
+
lines.push("Auto-validating and completing the phase — check the status widget for the result.");
|
|
70
70
|
}
|
|
71
71
|
return lines.join("\n");
|
|
72
72
|
}
|
|
@@ -344,7 +344,59 @@ export default function codeCartographerExtension(pi) {
|
|
|
344
344
|
// Fire-and-forget: keep the TUI responsive while the sub-agent works.
|
|
345
345
|
// runSinglePhase handles all side effects (steering message, notify,
|
|
346
346
|
// phase summary, recordUsage, dashboard regen, clearPhase linger).
|
|
347
|
+
// After the sub-agent finishes, auto-validate and auto-complete the
|
|
348
|
+
// phase so status.yaml advances without requiring the user to manually
|
|
349
|
+
// run /codecarto-validate then /codecarto-complete. This mirrors what
|
|
350
|
+
// the auto loop (runAuto) does after each phase.
|
|
347
351
|
void runSinglePhase(ctx, pi, state, phase, { llmSteerEnabled, signal: ctx.signal, preflight })
|
|
352
|
+
.then(async (result) => {
|
|
353
|
+
if (result.status !== "completed")
|
|
354
|
+
return;
|
|
355
|
+
// Refresh state from disk — the sub-agent may have written
|
|
356
|
+
// findings that the validator needs to read.
|
|
357
|
+
const stateForValidation = (await getWorkspaceState(ctx.cwd)) ?? state;
|
|
358
|
+
const validation = await validatePhaseOutput(stateForValidation, phase.id).catch((error) => (error instanceof Error ? error : new Error(String(error))));
|
|
359
|
+
if (validation instanceof Error) {
|
|
360
|
+
if (ctx.hasUI)
|
|
361
|
+
ctx.ui.notify(`Auto-validation error for ${phase.id}: ${validation.message}`, "warning");
|
|
362
|
+
lastFeedbackLines = [`Validation error: ${validation.message}`, "Run `/codecarto-validate` then `/codecarto-complete` manually."];
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
if (validation.overall === "FAIL" || validation.overall === "MISSING") {
|
|
366
|
+
if (ctx.hasUI)
|
|
367
|
+
ctx.ui.notify(`Phase ${phase.id} validation: ${validation.overall}. Fix the output, then re-run /codecarto-next.`, "warning");
|
|
368
|
+
lastFeedbackLines = buildValidationSummary(validation);
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
// PASS or PASS WITH GAPS — auto-complete the phase.
|
|
372
|
+
try {
|
|
373
|
+
const { updatedState, closeoutNotice } = await autoCompletePhase(ctx, validation);
|
|
374
|
+
if (ctx.hasUI) {
|
|
375
|
+
ctx.ui.notify(`Phase ${phase.id} auto-completed (validation: ${validation.overall}).`, validation.overall === "PASS WITH GAPS" ? "warning" : "info");
|
|
376
|
+
if (closeoutNotice)
|
|
377
|
+
ctx.ui.notify(closeoutNotice, "info");
|
|
378
|
+
}
|
|
379
|
+
lastFeedbackLines = [
|
|
380
|
+
`Completed phase: ${validation.phaseId}`,
|
|
381
|
+
`Validation: ${validation.overall}`,
|
|
382
|
+
`Next phase: ${updatedState.status.current_phase}`,
|
|
383
|
+
];
|
|
384
|
+
if (closeoutNotice)
|
|
385
|
+
lastFeedbackLines.push(closeoutNotice);
|
|
386
|
+
}
|
|
387
|
+
catch (error) {
|
|
388
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
389
|
+
if (ctx.hasUI)
|
|
390
|
+
ctx.ui.notify(`Auto-completion failed for ${phase.id}: ${message}. Run /codecarto-complete manually.`, "warning");
|
|
391
|
+
lastFeedbackLines = [`Auto-completion failed: ${message}`, "Run `/codecarto-complete` manually."];
|
|
392
|
+
}
|
|
393
|
+
})
|
|
394
|
+
.catch((error) => {
|
|
395
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
396
|
+
if (ctx.hasUI)
|
|
397
|
+
ctx.ui.notify(`Post-phase processing error for ${phase.id}: ${message}`, "warning");
|
|
398
|
+
lastFeedbackLines = [`Post-phase error: ${message}`];
|
|
399
|
+
})
|
|
348
400
|
.finally(() => {
|
|
349
401
|
// Refresh the status widget after the phase resolves so the
|
|
350
402
|
// "Open questions / Carry-forward / Next" lines reflect any
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codecartographer-pi",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"mcpName": "io.github.HuginnIndustries/codecartographer",
|
|
5
5
|
"description": "Evidence-backed reverse engineering and human-gated software planning for Pi and MCP coding agents.",
|
|
6
6
|
"type": "module",
|