@kaddo/mcp 3.49.0 → 3.50.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 +91 -39
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2656,7 +2656,7 @@ function buildReadinessReport(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
2656
2656
|
const ctx = buildCodexAdapterContext(dir);
|
|
2657
2657
|
const agents = ctx.hasAgents ? "present" : "missing";
|
|
2658
2658
|
const skills = ctx.hasSkills ? "present" : "missing";
|
|
2659
|
-
const
|
|
2659
|
+
const bootstrapBaseline2 = presence.business !== "missing" && presence.product !== "missing" ? "complete" : "incomplete";
|
|
2660
2660
|
const roadmap = roadmapSignal(dir);
|
|
2661
2661
|
const work_items = workItemsSignal(dir);
|
|
2662
2662
|
const adapters = installedAdapters(dir);
|
|
@@ -2664,7 +2664,7 @@ function buildReadinessReport(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
2664
2664
|
const signals = {
|
|
2665
2665
|
scan,
|
|
2666
2666
|
understand,
|
|
2667
|
-
bootstrap_baseline:
|
|
2667
|
+
bootstrap_baseline: bootstrapBaseline2,
|
|
2668
2668
|
agents,
|
|
2669
2669
|
skills,
|
|
2670
2670
|
current_state: presence.current_state,
|
|
@@ -2683,7 +2683,7 @@ function buildReadinessReport(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
2683
2683
|
const firstWeak = KNOWLEDGE_FILES.find((f) => presence[f.key] !== "useful");
|
|
2684
2684
|
let overall;
|
|
2685
2685
|
if (scan === "missing") overall = "initialized";
|
|
2686
|
-
else if (
|
|
2686
|
+
else if (bootstrapBaseline2 === "incomplete") overall = "bootstrap-incomplete";
|
|
2687
2687
|
else if (agents === "missing") overall = "agents-missing";
|
|
2688
2688
|
else if (skills === "missing") overall = "skills-missing";
|
|
2689
2689
|
else if (understand === "missing") overall = "scanned";
|
|
@@ -5654,6 +5654,14 @@ var scanRepository = {
|
|
|
5654
5654
|
return { status: "done", evidence: [".kaddo/scan.json"] };
|
|
5655
5655
|
}
|
|
5656
5656
|
};
|
|
5657
|
+
var bootstrapBaseline = {
|
|
5658
|
+
id: "bootstrap",
|
|
5659
|
+
label: "Bootstrap knowledge baseline",
|
|
5660
|
+
evaluate: (ctx) => {
|
|
5661
|
+
if (ctx.qBusiness !== "missing" && ctx.qProduct !== "missing") return { status: "done", evidence: ["knowledge/business/business.md", "knowledge/product/product.md"] };
|
|
5662
|
+
return { status: "pending", command: "kaddo bootstrap", reason: "The knowledge baseline is incomplete." };
|
|
5663
|
+
}
|
|
5664
|
+
};
|
|
5657
5665
|
var defineBusiness = {
|
|
5658
5666
|
id: "define-business",
|
|
5659
5667
|
label: "Define business context",
|
|
@@ -5850,6 +5858,7 @@ var NEW_STEPS = [
|
|
|
5850
5858
|
var PRE_AI_STEPS = [
|
|
5851
5859
|
enableKaddo,
|
|
5852
5860
|
scanRepository,
|
|
5861
|
+
bootstrapBaseline,
|
|
5853
5862
|
defineBusiness,
|
|
5854
5863
|
defineProduct,
|
|
5855
5864
|
discoverCapabilities,
|
|
@@ -5867,6 +5876,7 @@ var PRE_AI_STEPS = [
|
|
|
5867
5876
|
var LEGACY_STEPS = [
|
|
5868
5877
|
enableKaddo,
|
|
5869
5878
|
scanRepository,
|
|
5879
|
+
bootstrapBaseline,
|
|
5870
5880
|
identifyLegacyModules,
|
|
5871
5881
|
{ ...discoverCapabilities, label: "Discover critical capabilities" },
|
|
5872
5882
|
describeArchitecture,
|
|
@@ -5958,7 +5968,7 @@ function loadScanWarnings(dir) {
|
|
|
5958
5968
|
function mapNextStepId(id) {
|
|
5959
5969
|
const MAP = {
|
|
5960
5970
|
init: "enable-kaddo",
|
|
5961
|
-
bootstrap: "
|
|
5971
|
+
bootstrap: "bootstrap",
|
|
5962
5972
|
"add-agents": "enable-kaddo",
|
|
5963
5973
|
"add-skills": "enable-kaddo",
|
|
5964
5974
|
scan: "scan-repository",
|
|
@@ -6127,6 +6137,15 @@ function hasAgents(dir) {
|
|
|
6127
6137
|
}
|
|
6128
6138
|
return hasAgentMd(agentsDir);
|
|
6129
6139
|
}
|
|
6140
|
+
function hasSkills(dir) {
|
|
6141
|
+
const skillsDir = join(dir, ARCH_DIR2, "skills");
|
|
6142
|
+
if (!exists(skillsDir)) return false;
|
|
6143
|
+
try {
|
|
6144
|
+
return readDir(skillsDir).some((e) => e.endsWith(".md") && isFile(join(skillsDir, e)));
|
|
6145
|
+
} catch {
|
|
6146
|
+
return false;
|
|
6147
|
+
}
|
|
6148
|
+
}
|
|
6130
6149
|
function buildProjectExplanation(dir) {
|
|
6131
6150
|
const config = loadConfig(dir);
|
|
6132
6151
|
const project = {
|
|
@@ -6153,10 +6172,13 @@ function buildProjectExplanation(dir) {
|
|
|
6153
6172
|
hasInventory: exists(join(dir, ARCH_DIR2, "inventory.md")),
|
|
6154
6173
|
hasContextPack: exists(join(dir, ".kaddo", "context-pack.md")),
|
|
6155
6174
|
hasUnderstand: exists(join(dir, ".kaddo", "understand.md")),
|
|
6175
|
+
hasBusiness: exists(join(dir, "knowledge/business/business.md")),
|
|
6176
|
+
hasProduct: exists(join(dir, "knowledge/product/product.md")),
|
|
6156
6177
|
hasCapabilities: layerStatus("Product") !== "Missing",
|
|
6157
6178
|
hasArchitecture: layerStatus("Tech") !== "Missing",
|
|
6158
6179
|
hasRoadmap: layerStatus("Delivery") !== "Missing",
|
|
6159
|
-
hasAgents: hasAgents(dir)
|
|
6180
|
+
hasAgents: hasAgents(dir),
|
|
6181
|
+
hasSkills: hasSkills(dir)
|
|
6160
6182
|
};
|
|
6161
6183
|
const workItemArtifacts = discoverWorkItems(dir);
|
|
6162
6184
|
const items = workItemArtifacts.map((a) => {
|
|
@@ -6221,33 +6243,42 @@ function buildProjectExplanation(dir) {
|
|
|
6221
6243
|
if (!knowledge.hasAgents) missingKnowledge.push("Agents (knowledge/agents/)");
|
|
6222
6244
|
if (items.length === 0) missingKnowledge.push("Work items (knowledge/delivery/work-items/)");
|
|
6223
6245
|
const suggestedNextSteps = [];
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
suggestedNextSteps.push("
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
suggestedNextSteps.push("
|
|
6231
|
-
}
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
)
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6246
|
+
const baselineIncomplete = !knowledge.hasBusiness || !knowledge.hasProduct;
|
|
6247
|
+
if (baselineIncomplete) {
|
|
6248
|
+
suggestedNextSteps.push("Run `kaddo bootstrap` to create the project knowledge baseline.");
|
|
6249
|
+
if (!knowledge.hasAgents) suggestedNextSteps.push("Then run `kaddo add agents`.");
|
|
6250
|
+
if (!knowledge.hasSkills) suggestedNextSteps.push("Then run `kaddo add skills`.");
|
|
6251
|
+
suggestedNextSteps.push("Then run `kaddo context`.");
|
|
6252
|
+
suggestedNextSteps.push("Then run `kaddo understand`.");
|
|
6253
|
+
} else {
|
|
6254
|
+
if (!knowledge.hasScan) {
|
|
6255
|
+
suggestedNextSteps.push("Run `kaddo scan` to detect the technical stack.");
|
|
6256
|
+
} else if (!knowledge.hasContextPack) {
|
|
6257
|
+
suggestedNextSteps.push("Run `kaddo context` to prepare an LLM context pack.");
|
|
6258
|
+
}
|
|
6259
|
+
if (!knowledge.hasAgents) {
|
|
6260
|
+
suggestedNextSteps.push("Run `kaddo add agents` to install knowledge agents.");
|
|
6261
|
+
}
|
|
6262
|
+
if (!knowledge.hasCapabilities) {
|
|
6263
|
+
suggestedNextSteps.push("Use capability-agent to generate knowledge/product/capabilities.md.");
|
|
6264
|
+
}
|
|
6265
|
+
if (!knowledge.hasArchitecture) {
|
|
6266
|
+
suggestedNextSteps.push("Use architecture-agent to generate knowledge/tech/current-state.md.");
|
|
6267
|
+
}
|
|
6268
|
+
if (!knowledge.hasRoadmap) {
|
|
6269
|
+
suggestedNextSteps.push("Use roadmap-agent to generate knowledge/delivery/roadmap.md.");
|
|
6270
|
+
} else if (roadmap.remaining > 0) {
|
|
6271
|
+
suggestedNextSteps.push(
|
|
6272
|
+
`Materialize ${roadmap.remaining} roadmap candidate(s) with \`kaddo create --from roadmap\`.`
|
|
6273
|
+
);
|
|
6274
|
+
}
|
|
6275
|
+
if (items.length === 0 && !roadmap.present) {
|
|
6276
|
+
suggestedNextSteps.push("Create your first Work Item with `kaddo create`.");
|
|
6277
|
+
} else if (ownership.workItemsMissingOwnership > 0) {
|
|
6278
|
+
suggestedNextSteps.push(
|
|
6279
|
+
"Run `kaddo owners suggest` for Work Items without code ownership."
|
|
6280
|
+
);
|
|
6281
|
+
}
|
|
6251
6282
|
}
|
|
6252
6283
|
const readiness = buildReadinessReport(dir);
|
|
6253
6284
|
return {
|
|
@@ -8507,19 +8538,35 @@ function renderContextPack(pack) {
|
|
|
8507
8538
|
parts.push(pack.skills.map((s) => `- ${s}`).join("\n") + "\n");
|
|
8508
8539
|
parts.push("Read full skill definitions in `knowledge/skills/` or via the Kaddo MCP server (`kaddo://skills`).\n");
|
|
8509
8540
|
}
|
|
8541
|
+
const isBootstrapIncomplete = rec.id === "bootstrap";
|
|
8510
8542
|
parts.push("## Missing Context\n");
|
|
8511
|
-
if (
|
|
8543
|
+
if (isBootstrapIncomplete) {
|
|
8544
|
+
const baselineMissing = [
|
|
8545
|
+
"- Bootstrap baseline is incomplete.",
|
|
8546
|
+
...!pack.knowledgeQuality.business || pack.knowledgeQuality.business.status === "Missing" ? ["- Missing business knowledge."] : [],
|
|
8547
|
+
...!pack.knowledgeQuality.product || pack.knowledgeQuality.product.status === "Missing" ? ["- Missing product knowledge."] : []
|
|
8548
|
+
];
|
|
8549
|
+
if (missing.length > 0) {
|
|
8550
|
+
baselineMissing.push(...missing.filter((m) => !baselineMissing.some((b) => b.includes(m))));
|
|
8551
|
+
}
|
|
8552
|
+
parts.push(baselineMissing.join("\n") + "\n");
|
|
8553
|
+
} else if (missing.length > 0) {
|
|
8512
8554
|
parts.push(missing.map((m) => `- ${m}`).join("\n") + "\n");
|
|
8513
8555
|
} else {
|
|
8514
8556
|
parts.push("_None \u2014 all expected context is present._\n");
|
|
8515
8557
|
}
|
|
8516
8558
|
parts.push("## Recommended Agent Handoff\n");
|
|
8517
|
-
|
|
8559
|
+
if (isBootstrapIncomplete) {
|
|
8560
|
+
parts.push("No agent handoff yet.\n");
|
|
8561
|
+
parts.push("Run `kaddo bootstrap` first to create the baseline files.\n");
|
|
8562
|
+
} else {
|
|
8563
|
+
parts.push(`Recommended next for the **${pack.phase.phase}** phase:
|
|
8518
8564
|
`);
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8565
|
+
parts.push(handoff.recommendedAgents.map((a, i) => `${i + 1}. ${a}`).join("\n") + "\n");
|
|
8566
|
+
if (handoff.nextSteps.length > 0) {
|
|
8567
|
+
parts.push("Next step:\n");
|
|
8568
|
+
parts.push(handoff.nextSteps.map((s) => `- ${s}`).join("\n") + "\n");
|
|
8569
|
+
}
|
|
8523
8570
|
}
|
|
8524
8571
|
parts.push("## Instructions for the LLM\n");
|
|
8525
8572
|
parts.push(handoff.instructions.map((i) => `- ${i}`).join("\n") + "\n");
|
|
@@ -8632,7 +8679,12 @@ function renderUnderstand(plan) {
|
|
|
8632
8679
|
parts.push("## Project Route\n");
|
|
8633
8680
|
parts.push(renderRouteCompact(plan.projectRoute));
|
|
8634
8681
|
}
|
|
8635
|
-
|
|
8682
|
+
const isBootstrap = rec && rec.id === "bootstrap";
|
|
8683
|
+
if (isBootstrap) {
|
|
8684
|
+
parts.push("## Agent Handoff\n");
|
|
8685
|
+
parts.push("Agent handoff is not ready yet.\n");
|
|
8686
|
+
parts.push("Run `kaddo bootstrap` first.\n");
|
|
8687
|
+
} else if (steps.length > 0) {
|
|
8636
8688
|
parts.push("## Recommended Agent Flow\n");
|
|
8637
8689
|
parts.push(`Recommended order for a ${stateLabel2(project.state)} project:
|
|
8638
8690
|
`);
|
package/package.json
CHANGED