@kaddo/cli 3.50.0 → 3.52.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/index.js +238 -152
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4643,6 +4643,7 @@ var RECOMMENDED_BY_STATE = {
|
|
|
4643
4643
|
"adr-agent.md"
|
|
4644
4644
|
],
|
|
4645
4645
|
"pre-ai": [
|
|
4646
|
+
"business-agent.md",
|
|
4646
4647
|
"capability-agent.md",
|
|
4647
4648
|
"architecture-agent.md",
|
|
4648
4649
|
"roadmap-agent.md",
|
|
@@ -8860,19 +8861,32 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
8860
8861
|
return { id: "understand", phase: "Discovery", label: "Run `kaddo understand` to summarize the project context.", command: "kaddo understand", reason: "No understand handoff has been generated yet." };
|
|
8861
8862
|
}
|
|
8862
8863
|
const discovery = state === "pre-ai" || state === "legacy";
|
|
8863
|
-
const
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8864
|
+
const resolveAgent = (agent) => {
|
|
8865
|
+
const file = agent.endsWith(".md") ? agent : `${agent}.md`;
|
|
8866
|
+
const path6 = agentInstallPath(file);
|
|
8867
|
+
const installed = isFile(join(dir, path6));
|
|
8868
|
+
const group = agentGroupOf(file);
|
|
8869
|
+
return { agentPath: path6, agentInstalled: installed, installCommand: installed ? void 0 : `kaddo add agents --group ${group}` };
|
|
8870
|
+
};
|
|
8871
|
+
const refine = (id, agent, target, quality, verb = "complete") => {
|
|
8872
|
+
const ar = resolveAgent(agent);
|
|
8873
|
+
return {
|
|
8874
|
+
id,
|
|
8875
|
+
phase: "Knowledge Refinement",
|
|
8876
|
+
label: `Use ${agent} to ${verb} \`${target}\`.`,
|
|
8877
|
+
agent,
|
|
8878
|
+
target,
|
|
8879
|
+
agentPath: ar.agentPath,
|
|
8880
|
+
agentInstalled: ar.agentInstalled,
|
|
8881
|
+
installCommand: ar.installCommand,
|
|
8882
|
+
reason: `${target} is ${quality === "missing" ? "missing" : "still a bootstrap placeholder or too thin"}.`,
|
|
8883
|
+
instructions: [
|
|
8884
|
+
"The baseline file exists but does not yet hold real, project-specific knowledge.",
|
|
8885
|
+
`Use the ${agent} to replace the placeholders with real knowledge.`,
|
|
8886
|
+
"Do not write code."
|
|
8887
|
+
]
|
|
8888
|
+
};
|
|
8889
|
+
};
|
|
8876
8890
|
if (qBusiness !== "useful") return refine("refine-business", "business-agent", B, qBusiness);
|
|
8877
8891
|
if (qProduct !== "useful" || qCap !== "useful") {
|
|
8878
8892
|
if (qCap !== "useful") {
|
|
@@ -9665,7 +9679,12 @@ function mapNextStepId(id) {
|
|
|
9665
9679
|
"add-skills": "enable-kaddo",
|
|
9666
9680
|
scan: "scan-repository",
|
|
9667
9681
|
context: "scan-repository",
|
|
9668
|
-
understand: "scan-repository"
|
|
9682
|
+
understand: "scan-repository",
|
|
9683
|
+
"refine-business": "define-business",
|
|
9684
|
+
"refine-product": "define-product",
|
|
9685
|
+
"refine-capabilities": "discover-capabilities",
|
|
9686
|
+
"refine-current-state": "describe-architecture",
|
|
9687
|
+
"refine-codebase": "describe-architecture"
|
|
9669
9688
|
};
|
|
9670
9689
|
return MAP[id] ?? id;
|
|
9671
9690
|
}
|
|
@@ -10684,10 +10703,14 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
10684
10703
|
if (techKnowledge.discovery.legacyLocation) {
|
|
10685
10704
|
missing.push("Tech discovery files are in the legacy `knowledge/tech/` root. Run `kaddo tech organize` to move them to `knowledge/tech/discovery/`.");
|
|
10686
10705
|
}
|
|
10706
|
+
const isBootstrap = nextStepRecommendation.id === "bootstrap";
|
|
10687
10707
|
const unifiedPhase = {
|
|
10688
10708
|
...phase,
|
|
10709
|
+
phase: isBootstrap ? "Setup" : phase.phase,
|
|
10710
|
+
reasons: isBootstrap ? ["The knowledge baseline is incomplete."] : phase.reasons,
|
|
10689
10711
|
nextStep: nextStepRecommendation.label,
|
|
10690
|
-
recommendedAgents: nextStepRecommendation.agent ? [nextStepRecommendation.agent] : phase.recommendedAgents
|
|
10712
|
+
recommendedAgents: isBootstrap ? [] : nextStepRecommendation.agent ? [nextStepRecommendation.agent] : phase.recommendedAgents,
|
|
10713
|
+
llmInstructions: isBootstrap ? ["Run `kaddo bootstrap` before using agent handoff.", "Do not ask an LLM to generate baseline knowledge until bootstrap files exist."] : phase.llmInstructions
|
|
10691
10714
|
};
|
|
10692
10715
|
const deliveryState = { ...buildDeliveryState(dir), phase: nextStepRecommendation.phase };
|
|
10693
10716
|
return {
|
|
@@ -10743,9 +10766,9 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
10743
10766
|
// VS-052/VS-073.2: the handoff is driven by the unified next step, so the pack never contradicts
|
|
10744
10767
|
// the Current Phase block above it.
|
|
10745
10768
|
handoff: {
|
|
10746
|
-
recommendedAgents: unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : recommendedAgentsForState(state),
|
|
10769
|
+
recommendedAgents: isBootstrap ? [] : unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : recommendedAgentsForState(state),
|
|
10747
10770
|
nextSteps: [nextStepRecommendation.label],
|
|
10748
|
-
instructions: unifiedPhase.llmInstructions.length > 0 ? unifiedPhase.llmInstructions : LLM_INSTRUCTIONS,
|
|
10771
|
+
instructions: isBootstrap ? ["No agent handoff yet.", "Run `kaddo bootstrap` first to create the baseline files."] : unifiedPhase.llmInstructions.length > 0 ? unifiedPhase.llmInstructions : LLM_INSTRUCTIONS,
|
|
10749
10772
|
operatingRules: OPERATING_RULES
|
|
10750
10773
|
}
|
|
10751
10774
|
};
|
|
@@ -11030,9 +11053,22 @@ function renderContextPack(pack) {
|
|
|
11030
11053
|
if (isBootstrapIncomplete) {
|
|
11031
11054
|
parts.push("No agent handoff yet.\n");
|
|
11032
11055
|
parts.push("Run `kaddo bootstrap` first to create the baseline files.\n");
|
|
11056
|
+
} else if (rec.agent && rec.agentInstalled === false) {
|
|
11057
|
+
parts.push(`Recommended agent: ${rec.agent.replace(/\.md$/, "")}
|
|
11058
|
+
`);
|
|
11059
|
+
parts.push("**Agent is not installed.**\n");
|
|
11060
|
+
if (rec.installCommand) {
|
|
11061
|
+
parts.push(`Run \`${rec.installCommand}\` to install it.
|
|
11062
|
+
`);
|
|
11063
|
+
}
|
|
11064
|
+
parts.push("Then run `kaddo context` and `kaddo understand`.\n");
|
|
11033
11065
|
} else {
|
|
11034
11066
|
parts.push(`Recommended next for the **${pack.phase.phase}** phase:
|
|
11035
11067
|
`);
|
|
11068
|
+
if (rec.agentPath) {
|
|
11069
|
+
parts.push(`Agent prompt: \`${rec.agentPath}\`
|
|
11070
|
+
`);
|
|
11071
|
+
}
|
|
11036
11072
|
parts.push(handoff.recommendedAgents.map((a, i) => `${i + 1}. ${a}`).join("\n") + "\n");
|
|
11037
11073
|
if (handoff.nextSteps.length > 0) {
|
|
11038
11074
|
parts.push("Next step:\n");
|
|
@@ -11259,75 +11295,100 @@ function renderUnderstand(plan) {
|
|
|
11259
11295
|
const scanNote = plan.scanAvailable ? "" : " (incomplete \u2014 run `kaddo scan` first for a richer baseline)";
|
|
11260
11296
|
parts.push(`Use \`${plan.contextPackPath}\` as the primary input${scanNote}.
|
|
11261
11297
|
`);
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
}
|
|
11268
|
-
if (plan.recommendedSkillPaths && plan.recommendedSkillPaths.length > 0) {
|
|
11269
|
-
agentPaths.push(...plan.recommendedSkillPaths);
|
|
11270
|
-
}
|
|
11271
|
-
agentPaths.push(plan.contextPackPath);
|
|
11272
|
-
parts.push("## Agent Prompts\n");
|
|
11273
|
-
if (agentPaths.length > 1) {
|
|
11274
|
-
parts.push("Use:\n");
|
|
11275
|
-
parts.push(agentPaths.map((p2) => `- \`${p2}\``).join("\n") + "\n");
|
|
11276
|
-
} else {
|
|
11277
|
-
parts.push(`- \`${plan.contextPackPath}\`
|
|
11298
|
+
if (!isBootstrap) {
|
|
11299
|
+
const agentMissing = rec && rec.agent && rec.agentInstalled === false;
|
|
11300
|
+
if (agentMissing) {
|
|
11301
|
+
parts.push("## Missing Agent\n");
|
|
11302
|
+
parts.push(`${agentName(rec.agent)} is not installed.
|
|
11278
11303
|
`);
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
const outputs = [];
|
|
11286
|
-
if (rec.target) outputs.push(`- \`${rec.target}\``);
|
|
11287
|
-
if (rec.id === "refine-work-item" || rec.id === "resolve-blocker")
|
|
11288
|
-
outputs.push("- Refined Work Item content.");
|
|
11289
|
-
if (rec.id === "create-work-item")
|
|
11290
|
-
outputs.push("- A new Work Item under `knowledge/delivery/work-items/`.");
|
|
11291
|
-
if (rec.id === "implement")
|
|
11292
|
-
outputs.push("- Implementation plan or code changes guided by the Work Item.");
|
|
11293
|
-
if (rec.id === "guard")
|
|
11294
|
-
outputs.push("- Updated knowledge artifacts reflecting recent code changes.");
|
|
11295
|
-
if (rec.id === "install-adapter")
|
|
11296
|
-
outputs.push("- An adapter configured and injected (`kaddo adapters list`).");
|
|
11297
|
-
if (outputs.length > 0) {
|
|
11298
|
-
parts.push("The LLM should produce:\n");
|
|
11299
|
-
parts.push(outputs.join("\n") + "\n");
|
|
11304
|
+
if (rec.installCommand) {
|
|
11305
|
+
parts.push(`Run \`${rec.installCommand}\` to install it.
|
|
11306
|
+
`);
|
|
11307
|
+
}
|
|
11308
|
+
parts.push("Then run:\n");
|
|
11309
|
+
parts.push("1. `kaddo context`\n2. `kaddo understand`\n");
|
|
11300
11310
|
} else {
|
|
11301
|
-
|
|
11311
|
+
const agentPaths = [];
|
|
11312
|
+
if (plan.recommendedPaths && plan.recommendedPaths.length > 0) {
|
|
11313
|
+
agentPaths.push(...plan.recommendedPaths);
|
|
11314
|
+
} else if (steps.length > 0) {
|
|
11315
|
+
agentPaths.push(...steps.map((s) => agentInstallPath(s.agent)));
|
|
11316
|
+
}
|
|
11317
|
+
if (plan.recommendedSkillPaths && plan.recommendedSkillPaths.length > 0) {
|
|
11318
|
+
agentPaths.push(...plan.recommendedSkillPaths);
|
|
11319
|
+
}
|
|
11320
|
+
agentPaths.push(plan.contextPackPath);
|
|
11321
|
+
parts.push("## Agent Prompts\n");
|
|
11322
|
+
if (agentPaths.length > 1) {
|
|
11323
|
+
parts.push("Use:\n");
|
|
11324
|
+
parts.push(agentPaths.map((p2) => `- \`${p2}\``).join("\n") + "\n");
|
|
11325
|
+
} else {
|
|
11326
|
+
parts.push(`- \`${plan.contextPackPath}\`
|
|
11327
|
+
`);
|
|
11328
|
+
}
|
|
11329
|
+
if (steps.length > 0) {
|
|
11330
|
+
parts.push("## Expected Outputs\n");
|
|
11331
|
+
parts.push(steps.map((s) => `- \`${s.output}\``).join("\n") + "\n");
|
|
11332
|
+
} else if (rec) {
|
|
11333
|
+
parts.push("## Expected Outputs\n");
|
|
11334
|
+
const outputs = [];
|
|
11335
|
+
if (rec.target) outputs.push(`- \`${rec.target}\``);
|
|
11336
|
+
if (rec.id === "refine-work-item" || rec.id === "resolve-blocker")
|
|
11337
|
+
outputs.push("- Refined Work Item content.");
|
|
11338
|
+
if (rec.id === "create-work-item")
|
|
11339
|
+
outputs.push("- A new Work Item under `knowledge/delivery/work-items/`.");
|
|
11340
|
+
if (rec.id === "implement")
|
|
11341
|
+
outputs.push("- Implementation plan or code changes guided by the Work Item.");
|
|
11342
|
+
if (rec.id === "guard")
|
|
11343
|
+
outputs.push("- Updated knowledge artifacts reflecting recent code changes.");
|
|
11344
|
+
if (rec.id === "install-adapter")
|
|
11345
|
+
outputs.push("- An adapter configured and injected (`kaddo adapters list`).");
|
|
11346
|
+
if (outputs.length > 0) {
|
|
11347
|
+
parts.push("The LLM should produce:\n");
|
|
11348
|
+
parts.push(outputs.join("\n") + "\n");
|
|
11349
|
+
} else {
|
|
11350
|
+
parts.push("_See the primary recommendation above._\n");
|
|
11351
|
+
}
|
|
11352
|
+
}
|
|
11353
|
+
parts.push("## Copy/Paste Instructions\n");
|
|
11354
|
+
if (steps.length > 0) {
|
|
11355
|
+
const first2 = steps[0];
|
|
11356
|
+
parts.push(
|
|
11357
|
+
[
|
|
11358
|
+
`Start with **${agentName(first2.agent)}**:`,
|
|
11359
|
+
"",
|
|
11360
|
+
"1. Open your preferred LLM chat (Claude, ChatGPT, Cursor, Copilot, Windsurf\u2026).",
|
|
11361
|
+
`2. Paste the context pack: \`${plan.contextPackPath}\``,
|
|
11362
|
+
`3. Paste the agent prompt: \`${agentInstallPath(first2.agent)}\``,
|
|
11363
|
+
`4. Ask the LLM to produce: \`${first2.output}\``,
|
|
11364
|
+
`5. Save the result in: \`${first2.output}\``
|
|
11365
|
+
].join("\n") + "\n"
|
|
11366
|
+
);
|
|
11367
|
+
} else if (agentPaths.length > 1) {
|
|
11368
|
+
parts.push("Paste the following into your LLM chat:\n");
|
|
11369
|
+
parts.push(agentPaths.map((p2, i) => `${i + 1}. \`${p2}\``).join("\n") + "\n");
|
|
11370
|
+
if (rec?.agent) {
|
|
11371
|
+
parts.push(`Ask the LLM to follow the ${agentName(rec.agent)} instructions.
|
|
11372
|
+
`);
|
|
11373
|
+
}
|
|
11374
|
+
} else {
|
|
11375
|
+
parts.push(`Paste \`${plan.contextPackPath}\` into your LLM chat.
|
|
11376
|
+
`);
|
|
11377
|
+
}
|
|
11302
11378
|
}
|
|
11303
11379
|
}
|
|
11304
|
-
parts.push("##
|
|
11305
|
-
if (
|
|
11306
|
-
const first2 = steps[0];
|
|
11380
|
+
parts.push("## Next Steps\n");
|
|
11381
|
+
if (isBootstrap) {
|
|
11307
11382
|
parts.push(
|
|
11308
11383
|
[
|
|
11309
|
-
`
|
|
11310
|
-
"",
|
|
11311
|
-
"
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
`4. Ask the LLM to produce: \`${first2.output}\``,
|
|
11315
|
-
`5. Save the result in: \`${first2.output}\``
|
|
11384
|
+
"1. Run `kaddo bootstrap`.",
|
|
11385
|
+
"2. Run `kaddo add agents`.",
|
|
11386
|
+
"3. Run `kaddo add skills`.",
|
|
11387
|
+
"4. Run `kaddo context`.",
|
|
11388
|
+
"5. Run `kaddo understand`."
|
|
11316
11389
|
].join("\n") + "\n"
|
|
11317
11390
|
);
|
|
11318
|
-
} else if (
|
|
11319
|
-
parts.push("Paste the following into your LLM chat:\n");
|
|
11320
|
-
parts.push(agentPaths.map((p2, i) => `${i + 1}. \`${p2}\``).join("\n") + "\n");
|
|
11321
|
-
if (rec?.agent) {
|
|
11322
|
-
parts.push(`Ask the LLM to follow the ${agentName(rec.agent)} instructions.
|
|
11323
|
-
`);
|
|
11324
|
-
}
|
|
11325
|
-
} else {
|
|
11326
|
-
parts.push(`Paste \`${plan.contextPackPath}\` into your LLM chat.
|
|
11327
|
-
`);
|
|
11328
|
-
}
|
|
11329
|
-
parts.push("## Next Steps\n");
|
|
11330
|
-
if (rec) {
|
|
11391
|
+
} else if (rec) {
|
|
11331
11392
|
const nextLines = [];
|
|
11332
11393
|
nextLines.push(`1. ${rec.label}`);
|
|
11333
11394
|
let n = 2;
|
|
@@ -11368,27 +11429,43 @@ function renderUnderstandTerminal(plan) {
|
|
|
11368
11429
|
lines.push("Reason: The knowledge baseline is incomplete.");
|
|
11369
11430
|
lines.push("");
|
|
11370
11431
|
lines.push("Agent handoff is not ready yet.");
|
|
11371
|
-
lines.push("
|
|
11432
|
+
lines.push("");
|
|
11433
|
+
lines.push("Run `kaddo bootstrap` first. Then run:");
|
|
11434
|
+
lines.push(" 1. kaddo add agents");
|
|
11435
|
+
lines.push(" 2. kaddo add skills");
|
|
11436
|
+
lines.push(" 3. kaddo context");
|
|
11437
|
+
lines.push(" 4. kaddo understand");
|
|
11372
11438
|
} else {
|
|
11373
|
-
const
|
|
11374
|
-
if (
|
|
11375
|
-
lines.push(
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
lines.push("");
|
|
11381
|
-
lines.push(
|
|
11382
|
-
lines.push("");
|
|
11383
|
-
lines.push(` Context: ${plan.contextPackPath}`);
|
|
11384
|
-
lines.push(` Agent prompt: ${agentInstallPath(first2.agent)}`);
|
|
11385
|
-
lines.push(` Expected output: ${first2.output}`);
|
|
11386
|
-
lines.push("");
|
|
11387
|
-
lines.push("Instructions:");
|
|
11388
|
-
lines.push(" Open your preferred LLM chat, paste the context pack, then paste the agent");
|
|
11389
|
-
lines.push(" prompt. Ask the LLM to generate the expected output and save it in the target file.");
|
|
11439
|
+
const agentMissing = rec && rec.agent && rec.agentInstalled === false;
|
|
11440
|
+
if (agentMissing) {
|
|
11441
|
+
lines.push(`Missing agent: ${agentName(rec.agent)}`);
|
|
11442
|
+
if (rec.installCommand) {
|
|
11443
|
+
lines.push(`Run: ${rec.installCommand}`);
|
|
11444
|
+
}
|
|
11445
|
+
lines.push("Then run:");
|
|
11446
|
+
lines.push(" 1. kaddo context");
|
|
11447
|
+
lines.push(" 2. kaddo understand");
|
|
11390
11448
|
} else {
|
|
11391
|
-
|
|
11449
|
+
const first2 = steps[0];
|
|
11450
|
+
if (first2) {
|
|
11451
|
+
lines.push("Foundational knowledge still needed:");
|
|
11452
|
+
steps.forEach((s, i) => {
|
|
11453
|
+
const flag = s.installed ? "" : " (not installed)";
|
|
11454
|
+
lines.push(` ${i + 1}. ${agentName(s.agent)} \u2192 ${s.output}${flag}`);
|
|
11455
|
+
});
|
|
11456
|
+
lines.push("");
|
|
11457
|
+
lines.push(`First step: use ${agentName(first2.agent)}.`);
|
|
11458
|
+
lines.push("");
|
|
11459
|
+
lines.push(` Context: ${plan.contextPackPath}`);
|
|
11460
|
+
lines.push(` Agent prompt: ${agentInstallPath(first2.agent)}`);
|
|
11461
|
+
lines.push(` Expected output: ${first2.output}`);
|
|
11462
|
+
lines.push("");
|
|
11463
|
+
lines.push("Instructions:");
|
|
11464
|
+
lines.push(" Open your preferred LLM chat, paste the context pack, then paste the agent");
|
|
11465
|
+
lines.push(" prompt. Ask the LLM to generate the expected output and save it in the target file.");
|
|
11466
|
+
} else {
|
|
11467
|
+
lines.push("Foundational knowledge looks complete \u2014 see the phase recommendation below.");
|
|
11468
|
+
}
|
|
11392
11469
|
}
|
|
11393
11470
|
}
|
|
11394
11471
|
lines.push("");
|
|
@@ -11483,73 +11560,82 @@ function runUnderstand() {
|
|
|
11483
11560
|
writeFile(join(dir, ".kaddo", "context-pack.md"), renderContextPack(pack));
|
|
11484
11561
|
log2.success("Refreshed .kaddo/context-pack.md");
|
|
11485
11562
|
const plan = buildUnderstandPlan(dir, config);
|
|
11486
|
-
|
|
11563
|
+
const earlyRec = resolveNextStep(dir);
|
|
11564
|
+
if (earlyRec.id !== "bootstrap" && plan.missingAgents.length > 0) {
|
|
11487
11565
|
log2.warn(
|
|
11488
11566
|
`Agents are not installed (${plan.missingAgents.map((a) => a.replace(/\.md$/, "")).join(", ")}). Run \`kaddo add agents\`.`
|
|
11489
11567
|
);
|
|
11490
11568
|
}
|
|
11569
|
+
plan.nextStepRecommendation = earlyRec;
|
|
11491
11570
|
console.log(renderUnderstandTerminal(plan));
|
|
11492
11571
|
console.log(`Project language: ${pack.project.language} (knowledge artifacts are written in this language)`);
|
|
11493
11572
|
const exp = buildProjectExplanation(dir);
|
|
11494
11573
|
const assessment = assessPhase(exp);
|
|
11495
11574
|
const rec = exp.nextStepRecommendation;
|
|
11496
|
-
|
|
11497
|
-
console.log(`Current phase: ${assessment.phase}`);
|
|
11498
|
-
if (assessment.reasons.length > 0) {
|
|
11499
|
-
console.log("Reason:");
|
|
11500
|
-
for (const r of assessment.reasons) console.log(` - ${r}`);
|
|
11501
|
-
}
|
|
11502
|
-
if (rec.agent) console.log(`Recommended: ${rec.agent}`);
|
|
11503
|
-
if (rec.skill) console.log(`Recommended skill: ${rec.skill}`);
|
|
11504
|
-
console.log(`Next step: ${rec.label}`);
|
|
11505
|
-
if (rec.reason) console.log(`Why: ${rec.reason}`);
|
|
11506
|
-
if (rec.secondary && rec.secondary.length > 0) {
|
|
11507
|
-
console.log("Also:");
|
|
11508
|
-
for (const s of rec.secondary) console.log(` - ${s.label}`);
|
|
11509
|
-
}
|
|
11510
|
-
const installedSkills = discoverInstalledSkills(dir);
|
|
11511
|
-
if (installedSkills.length > 0 && assessment.recommendedAgents.length > 0) {
|
|
11512
|
-
const recSkills = skillsForAgents(installedSkills, assessment.recommendedAgents);
|
|
11513
|
-
if (recSkills.length > 0) {
|
|
11514
|
-
console.log("Recommended skills:");
|
|
11515
|
-
for (const s of recSkills) console.log(` - ${s}`);
|
|
11516
|
-
}
|
|
11517
|
-
}
|
|
11518
|
-
const td = exp.techDecisions;
|
|
11519
|
-
if (td.candidates > 0 && td.adrs === 0) {
|
|
11520
|
-
console.log("");
|
|
11521
|
-
console.log(`Tech decisions: ${td.candidates} decision candidate(s) not yet materialized as ADRs.`);
|
|
11522
|
-
console.log(" \u2192 Use the adr-writing skill to create ADR drafts from `knowledge/tech/decision-candidates.md`");
|
|
11523
|
-
console.log(" into `knowledge/tech/decisions/` before implementing affected technical Work Items (`kaddo adr`).");
|
|
11524
|
-
}
|
|
11525
|
-
const rqi = exp.roadmapQuality.initiatives;
|
|
11526
|
-
if (rqi.needs_refinement) {
|
|
11575
|
+
if (earlyRec.id !== "bootstrap") {
|
|
11527
11576
|
console.log("");
|
|
11528
|
-
console.log(`
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
console.log("");
|
|
11533
|
-
console.log("Roadmap initiatives are grounded. \u2192 Run `kaddo create --from roadmap` to materialize the first Work Item.");
|
|
11534
|
-
}
|
|
11535
|
-
const ia = exp.installedAssets;
|
|
11536
|
-
const outdatedRecommended = ia.agents.items.filter(
|
|
11537
|
-
(a) => (a.state === "outdated" || a.state === "unknown-version") && assessment.recommendedAgents.includes(a.name)
|
|
11538
|
-
);
|
|
11539
|
-
if (outdatedRecommended.length > 0) {
|
|
11540
|
-
console.log("");
|
|
11541
|
-
for (const a of outdatedRecommended) {
|
|
11542
|
-
console.log(`Recommended agent ${a.name} is ${a.state} (installed ${a.installed ?? "unknown"}, available ${a.available}).`);
|
|
11577
|
+
console.log(`Current phase: ${assessment.phase}`);
|
|
11578
|
+
if (assessment.reasons.length > 0) {
|
|
11579
|
+
console.log("Reason:");
|
|
11580
|
+
for (const r of assessment.reasons) console.log(` - ${r}`);
|
|
11543
11581
|
}
|
|
11544
|
-
console.log(
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11582
|
+
if (rec.agent) console.log(`Recommended: ${rec.agent}`);
|
|
11583
|
+
if (rec.agent && rec.agentInstalled === false) {
|
|
11584
|
+
console.log(` \u26A0 Agent not installed. Run: ${rec.installCommand ?? "kaddo add agents"}`);
|
|
11585
|
+
} else if (rec.agentPath) {
|
|
11586
|
+
console.log(` Agent prompt: ${rec.agentPath}`);
|
|
11587
|
+
}
|
|
11588
|
+
if (rec.skill) console.log(`Recommended skill: ${rec.skill}`);
|
|
11589
|
+
console.log(`Next step: ${rec.label}`);
|
|
11590
|
+
if (rec.reason) console.log(`Why: ${rec.reason}`);
|
|
11591
|
+
if (rec.secondary && rec.secondary.length > 0) {
|
|
11592
|
+
console.log("Also:");
|
|
11593
|
+
for (const s of rec.secondary) console.log(` - ${s.label}`);
|
|
11594
|
+
}
|
|
11595
|
+
const installedSkills = discoverInstalledSkills(dir);
|
|
11596
|
+
if (installedSkills.length > 0 && assessment.recommendedAgents.length > 0) {
|
|
11597
|
+
const recSkills = skillsForAgents(installedSkills, assessment.recommendedAgents);
|
|
11598
|
+
if (recSkills.length > 0) {
|
|
11599
|
+
console.log("Recommended skills:");
|
|
11600
|
+
for (const s of recSkills) console.log(` - ${s}`);
|
|
11601
|
+
}
|
|
11602
|
+
}
|
|
11603
|
+
const td = exp.techDecisions;
|
|
11604
|
+
if (td.candidates > 0 && td.adrs === 0) {
|
|
11605
|
+
console.log("");
|
|
11606
|
+
console.log(`Tech decisions: ${td.candidates} decision candidate(s) not yet materialized as ADRs.`);
|
|
11607
|
+
console.log(" \u2192 Use the adr-writing skill to create ADR drafts from `knowledge/tech/decision-candidates.md`");
|
|
11608
|
+
console.log(" into `knowledge/tech/decisions/` before implementing affected technical Work Items (`kaddo adr`).");
|
|
11609
|
+
}
|
|
11610
|
+
const rqi = exp.roadmapQuality.initiatives;
|
|
11611
|
+
if (rqi.needs_refinement) {
|
|
11612
|
+
console.log("");
|
|
11613
|
+
console.log(`Roadmap quality: ${rqi.grounded}/${rqi.total} initiatives grounded.`);
|
|
11614
|
+
console.log(" \u2192 Use roadmap-agent to ground roadmap initiatives in capability domains, gaps and source signals");
|
|
11615
|
+
console.log(" before `kaddo create --from roadmap`.");
|
|
11616
|
+
} else if (rqi.total > 0 && rqi.grounded === rqi.total && exp.roadmap.materialized_work_items === 0) {
|
|
11617
|
+
console.log("");
|
|
11618
|
+
console.log("Roadmap initiatives are grounded. \u2192 Run `kaddo create --from roadmap` to materialize the first Work Item.");
|
|
11619
|
+
}
|
|
11620
|
+
const ia = exp.installedAssets;
|
|
11621
|
+
const outdatedRecommended = ia.agents.items.filter(
|
|
11622
|
+
(a) => (a.state === "outdated" || a.state === "unknown-version") && assessment.recommendedAgents.includes(a.name)
|
|
11623
|
+
);
|
|
11624
|
+
if (outdatedRecommended.length > 0) {
|
|
11625
|
+
console.log("");
|
|
11626
|
+
for (const a of outdatedRecommended) {
|
|
11627
|
+
console.log(`Recommended agent ${a.name} is ${a.state} (installed ${a.installed ?? "unknown"}, available ${a.available}).`);
|
|
11628
|
+
}
|
|
11629
|
+
console.log(" \u2192 Run `kaddo agents update` or review `kaddo agents status`.");
|
|
11630
|
+
}
|
|
11631
|
+
if (exp.externalCapsules.length > 0) {
|
|
11632
|
+
console.log("");
|
|
11633
|
+
console.log("External knowledge:");
|
|
11634
|
+
for (const cap of exp.externalCapsules) {
|
|
11635
|
+
console.log(` - ${cap.system}${cap.owner ? ` (owner: ${cap.owner})` : ""}`);
|
|
11636
|
+
}
|
|
11637
|
+
console.log(" \u2192 Review the relevant capsule before changing integration behavior with it.");
|
|
11551
11638
|
}
|
|
11552
|
-
console.log(" \u2192 Review the relevant capsule before changing integration behavior with it.");
|
|
11553
11639
|
}
|
|
11554
11640
|
const graphHints = loadGraphHints(dir);
|
|
11555
11641
|
if (assessment.phase === "Active Delivery" && graphHints && graphHints.activeWorkItemHints > 0) {
|