@kaddo/mcp 3.64.0 → 3.65.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 +154 -55
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -698,7 +698,7 @@ function assessPhase(input) {
|
|
|
698
698
|
const techReady = !NOT_READY_LAYER.includes(techStatus);
|
|
699
699
|
if (techReady) {
|
|
700
700
|
return {
|
|
701
|
-
phase: "
|
|
701
|
+
phase: "Ready for Core Orchestration",
|
|
702
702
|
reasons: ["Module repo \u2014 Tech layer ready", "Business/Product managed by core"],
|
|
703
703
|
recommendedAgents: [],
|
|
704
704
|
nextStep: "Module knowledge is ready for core orchestration.",
|
|
@@ -4290,6 +4290,47 @@ function buildReadinessReport(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
4290
4290
|
if (!config) return stub("not-initialized", rec.label, rec.command);
|
|
4291
4291
|
if (config.project.state === "new") return stub("not-applicable", "This project uses the standard new-project Kaddo flow.");
|
|
4292
4292
|
if (config.project.state === "legacy") return stub("legacy-project", "Use the legacy project flow.");
|
|
4293
|
+
if (isModule(config)) {
|
|
4294
|
+
const scan2 = exists(join(dir, ".kaddo", "scan.json")) ? "available" : "missing";
|
|
4295
|
+
const understand2 = exists(join(dir, ".kaddo", "understand.md")) ? "available" : "missing";
|
|
4296
|
+
const mcNew = "knowledge/tech/module/module-context.md";
|
|
4297
|
+
const mcLegacy = "knowledge/module/module-context.md";
|
|
4298
|
+
const mcPath = exists(join(dir, mcNew)) ? mcNew : mcLegacy;
|
|
4299
|
+
const qMC = analyzeKnowledgeArtifact(dir, mcPath);
|
|
4300
|
+
const qCS = analyzeKnowledgeArtifact(dir, "knowledge/tech/current-state.md");
|
|
4301
|
+
const qCB = analyzeKnowledgeArtifact(dir, "knowledge/tech/codebase.md");
|
|
4302
|
+
const moduleBaseline = qMC !== "missing" && qCS !== "missing" && qCB !== "missing" ? "complete" : "incomplete";
|
|
4303
|
+
const moduleReady = qMC === "useful" && qCS === "useful" && qCB === "useful";
|
|
4304
|
+
const overall2 = moduleReady ? "ready-for-core-orchestration" : moduleBaseline === "incomplete" ? "bootstrap-incomplete" : "knowledge-incomplete";
|
|
4305
|
+
return {
|
|
4306
|
+
project_name: config.project.name,
|
|
4307
|
+
project_type: config.project.state,
|
|
4308
|
+
project_role: "module",
|
|
4309
|
+
overall: overall2,
|
|
4310
|
+
signals: {
|
|
4311
|
+
scan: scan2,
|
|
4312
|
+
understand: understand2,
|
|
4313
|
+
bootstrap_baseline: moduleBaseline,
|
|
4314
|
+
agents: "managed-by-core",
|
|
4315
|
+
skills: "managed-by-core",
|
|
4316
|
+
current_state: qCS,
|
|
4317
|
+
codebase: qCB,
|
|
4318
|
+
module_context: qMC,
|
|
4319
|
+
capabilities: "managed-by-core",
|
|
4320
|
+
product: "not-applicable",
|
|
4321
|
+
business: "not-applicable",
|
|
4322
|
+
roadmap: "managed-by-core",
|
|
4323
|
+
work_items: "managed-by-core",
|
|
4324
|
+
adapters: [],
|
|
4325
|
+
blocking_open_questions: 0,
|
|
4326
|
+
assumed_questions: 0,
|
|
4327
|
+
resolved_questions: 0,
|
|
4328
|
+
deferred_questions: 0
|
|
4329
|
+
},
|
|
4330
|
+
recommended_next_step: { label: rec.label, ...rec.command ? { command: rec.command } : {} },
|
|
4331
|
+
nextStepRecommendation: rec
|
|
4332
|
+
};
|
|
4333
|
+
}
|
|
4293
4334
|
const scan = exists(join(dir, ".kaddo", "scan.json")) ? "available" : "missing";
|
|
4294
4335
|
const understand = exists(join(dir, ".kaddo", "understand.md")) ? "available" : "missing";
|
|
4295
4336
|
const presence = Object.fromEntries(KNOWLEDGE_FILES.map((f3) => [f3.key, analyzeKnowledgeArtifact(dir, f3.path)]));
|
|
@@ -8169,51 +8210,73 @@ function buildProjectExplanation(dir) {
|
|
|
8169
8210
|
const roadmapMd = exists(roadmapPath) ? readFile(roadmapPath) : null;
|
|
8170
8211
|
const roadmap = roadmapStats(roadmapMd, items.length);
|
|
8171
8212
|
const mappedModules = loadMappedModules(dir);
|
|
8213
|
+
const moduleRepo = config != null && isModule(config);
|
|
8172
8214
|
const missingKnowledge = [];
|
|
8173
|
-
if (
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
if (!knowledge.hasArchitecture) missingKnowledge.push("Tech knowledge (knowledge/tech/)");
|
|
8178
|
-
if (!knowledge.hasRoadmap) missingKnowledge.push("Roadmap (knowledge/delivery/roadmap.md)");
|
|
8179
|
-
if (!knowledge.hasAgents) missingKnowledge.push("Agents (knowledge/agents/)");
|
|
8180
|
-
if (items.length === 0) missingKnowledge.push("Work items (knowledge/delivery/work-items/)");
|
|
8181
|
-
const suggestedNextSteps = [];
|
|
8182
|
-
const baselineIncomplete = !knowledge.hasBusiness || !knowledge.hasProduct;
|
|
8183
|
-
if (baselineIncomplete) {
|
|
8184
|
-
suggestedNextSteps.push("Run `kaddo bootstrap` to create the project knowledge baseline.");
|
|
8185
|
-
if (!knowledge.hasAgents) suggestedNextSteps.push("Then run `kaddo add agents`.");
|
|
8186
|
-
if (!knowledge.hasSkills) suggestedNextSteps.push("Then run `kaddo add skills`.");
|
|
8187
|
-
suggestedNextSteps.push("Then run `kaddo context`.");
|
|
8188
|
-
suggestedNextSteps.push("Then run `kaddo understand`.");
|
|
8215
|
+
if (moduleRepo) {
|
|
8216
|
+
if (!knowledge.hasScan) missingKnowledge.push("Scan baseline (.kaddo/scan.json)");
|
|
8217
|
+
if (!knowledge.hasContextPack) missingKnowledge.push("Context pack (.kaddo/context-pack.md)");
|
|
8218
|
+
if (!knowledge.hasArchitecture) missingKnowledge.push("Tech knowledge (knowledge/tech/)");
|
|
8189
8219
|
} else {
|
|
8220
|
+
if (!knowledge.hasScan) missingKnowledge.push("Scan baseline (.kaddo/scan.json)");
|
|
8221
|
+
if (!knowledge.hasContextPack) missingKnowledge.push("Context pack (.kaddo/context-pack.md)");
|
|
8222
|
+
if (!knowledge.hasInventory) missingKnowledge.push("Inventory (knowledge/inventory.md)");
|
|
8223
|
+
if (!knowledge.hasCapabilities) missingKnowledge.push("Product knowledge (knowledge/product/)");
|
|
8224
|
+
if (!knowledge.hasArchitecture) missingKnowledge.push("Tech knowledge (knowledge/tech/)");
|
|
8225
|
+
if (!knowledge.hasRoadmap) missingKnowledge.push("Roadmap (knowledge/delivery/roadmap.md)");
|
|
8226
|
+
if (!knowledge.hasAgents) missingKnowledge.push("Agents (knowledge/agents/)");
|
|
8227
|
+
if (items.length === 0) missingKnowledge.push("Work items (knowledge/delivery/work-items/)");
|
|
8228
|
+
}
|
|
8229
|
+
const suggestedNextSteps = [];
|
|
8230
|
+
if (moduleRepo) {
|
|
8190
8231
|
if (!knowledge.hasScan) {
|
|
8191
8232
|
suggestedNextSteps.push("Run `kaddo scan` to detect the technical stack.");
|
|
8192
8233
|
} else if (!knowledge.hasContextPack) {
|
|
8193
8234
|
suggestedNextSteps.push("Run `kaddo context` to prepare an LLM context pack.");
|
|
8235
|
+
} else if (!knowledge.hasArchitecture) {
|
|
8236
|
+
suggestedNextSteps.push("Use module-context-agent to refine knowledge/tech/module/module-context.md.");
|
|
8237
|
+
} else {
|
|
8238
|
+
suggestedNextSteps.push("Return to the core repository.");
|
|
8239
|
+
suggestedNextSteps.push("Create or continue the Work Item from the core.");
|
|
8240
|
+
suggestedNextSteps.push("Add this module to `affected_modules` when the change touches it.");
|
|
8241
|
+
suggestedNextSteps.push("Re-run `kaddo context` and `kaddo understand` from the core.");
|
|
8194
8242
|
}
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
suggestedNextSteps.push("
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
suggestedNextSteps.push("
|
|
8203
|
-
}
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
)
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8243
|
+
} else {
|
|
8244
|
+
const baselineIncomplete = !knowledge.hasBusiness || !knowledge.hasProduct;
|
|
8245
|
+
if (baselineIncomplete) {
|
|
8246
|
+
suggestedNextSteps.push("Run `kaddo bootstrap` to create the project knowledge baseline.");
|
|
8247
|
+
if (!knowledge.hasAgents) suggestedNextSteps.push("Then run `kaddo add agents`.");
|
|
8248
|
+
if (!knowledge.hasSkills) suggestedNextSteps.push("Then run `kaddo add skills`.");
|
|
8249
|
+
suggestedNextSteps.push("Then run `kaddo context`.");
|
|
8250
|
+
suggestedNextSteps.push("Then run `kaddo understand`.");
|
|
8251
|
+
} else {
|
|
8252
|
+
if (!knowledge.hasScan) {
|
|
8253
|
+
suggestedNextSteps.push("Run `kaddo scan` to detect the technical stack.");
|
|
8254
|
+
} else if (!knowledge.hasContextPack) {
|
|
8255
|
+
suggestedNextSteps.push("Run `kaddo context` to prepare an LLM context pack.");
|
|
8256
|
+
}
|
|
8257
|
+
if (!knowledge.hasAgents) {
|
|
8258
|
+
suggestedNextSteps.push("Run `kaddo add agents` to install knowledge agents.");
|
|
8259
|
+
}
|
|
8260
|
+
if (!knowledge.hasCapabilities) {
|
|
8261
|
+
suggestedNextSteps.push("Use capability-agent to generate knowledge/product/capabilities.md.");
|
|
8262
|
+
}
|
|
8263
|
+
if (!knowledge.hasArchitecture) {
|
|
8264
|
+
suggestedNextSteps.push("Use architecture-agent to generate knowledge/tech/current-state.md.");
|
|
8265
|
+
}
|
|
8266
|
+
if (!knowledge.hasRoadmap) {
|
|
8267
|
+
suggestedNextSteps.push("Use roadmap-agent to generate knowledge/delivery/roadmap.md.");
|
|
8268
|
+
} else if (roadmap.remaining > 0) {
|
|
8269
|
+
suggestedNextSteps.push(
|
|
8270
|
+
`Materialize ${roadmap.remaining} roadmap candidate(s) with \`kaddo create --from roadmap\`.`
|
|
8271
|
+
);
|
|
8272
|
+
}
|
|
8273
|
+
if (items.length === 0 && !roadmap.present) {
|
|
8274
|
+
suggestedNextSteps.push("Create your first Work Item with `kaddo create`.");
|
|
8275
|
+
} else if (ownership.workItemsMissingOwnership > 0) {
|
|
8276
|
+
suggestedNextSteps.push(
|
|
8277
|
+
"Run `kaddo owners suggest` for Work Items without code ownership."
|
|
8278
|
+
);
|
|
8279
|
+
}
|
|
8217
8280
|
}
|
|
8218
8281
|
}
|
|
8219
8282
|
const readiness = buildReadinessReport(dir);
|
|
@@ -8309,11 +8372,19 @@ function renderExplanationHuman(exp) {
|
|
|
8309
8372
|
lines.push("## Knowledge Status");
|
|
8310
8373
|
lines.push(`- Inventory: ${exp.knowledge.hasInventory ? "available" : "missing"}`);
|
|
8311
8374
|
lines.push(`- Context pack: ${exp.knowledge.hasContextPack ? "available" : "missing"}`);
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8375
|
+
if (exp.isModuleRepo) {
|
|
8376
|
+
lines.push("- Business: Not applicable");
|
|
8377
|
+
lines.push("- Product: Not applicable");
|
|
8378
|
+
lines.push(`- Tech: ${ls("Tech")}`);
|
|
8379
|
+
lines.push("- Delivery: Managed by core");
|
|
8380
|
+
lines.push("- Agents: Managed by core");
|
|
8381
|
+
} else {
|
|
8382
|
+
lines.push(`- Business: ${ls("Business")}`);
|
|
8383
|
+
lines.push(`- Product: ${ls("Product")}`);
|
|
8384
|
+
lines.push(`- Tech: ${ls("Tech")}`);
|
|
8385
|
+
lines.push(`- Delivery: ${ls("Delivery")}`);
|
|
8386
|
+
lines.push(`- Agents: ${exp.knowledge.hasAgents ? "available" : "missing"}`);
|
|
8387
|
+
}
|
|
8317
8388
|
if (exp.roadmap.present) {
|
|
8318
8389
|
lines.push(`- Roadmap initiatives: ${exp.roadmap.initiatives}`);
|
|
8319
8390
|
lines.push(`- Work Item candidates: ${exp.roadmap.work_item_candidates}`);
|
|
@@ -8474,14 +8545,27 @@ function renderExplanationHuman(exp) {
|
|
|
8474
8545
|
lines.push(`- understand: ${s.understand}`);
|
|
8475
8546
|
lines.push(`- agents: ${s.agents}`);
|
|
8476
8547
|
lines.push(`- skills: ${s.skills}`);
|
|
8477
|
-
|
|
8478
|
-
|
|
8548
|
+
if (exp.isModuleRepo) {
|
|
8549
|
+
lines.push("- business: not-applicable");
|
|
8550
|
+
lines.push("- product: not-applicable");
|
|
8551
|
+
} else {
|
|
8552
|
+
lines.push(`- business: ${s.business}`);
|
|
8553
|
+
lines.push(`- product: ${s.product}`);
|
|
8554
|
+
}
|
|
8479
8555
|
lines.push(`- capabilities: ${s.capabilities}`);
|
|
8480
8556
|
lines.push(`- current-state: ${s.current_state}`);
|
|
8481
8557
|
lines.push(`- codebase: ${s.codebase}`);
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8558
|
+
if (s.module_context != null) {
|
|
8559
|
+
lines.push(`- module-context: ${s.module_context}`);
|
|
8560
|
+
}
|
|
8561
|
+
if (!exp.isModuleRepo) {
|
|
8562
|
+
lines.push(`- roadmap: ${s.roadmap}`);
|
|
8563
|
+
lines.push(`- work-items: ${s.work_items}`);
|
|
8564
|
+
lines.push(`- adapters: ${s.adapters.length > 0 ? s.adapters.join(", ") + " installed" : "none installed"}`);
|
|
8565
|
+
} else {
|
|
8566
|
+
lines.push("- roadmap: managed-by-core");
|
|
8567
|
+
lines.push("- work-items: managed-by-core");
|
|
8568
|
+
}
|
|
8485
8569
|
lines.push(`- blocking open questions: ${s.blocking_open_questions}`);
|
|
8486
8570
|
lines.push(`- assumptions: ${s.assumed_questions}`);
|
|
8487
8571
|
lines.push(`- deferred: ${s.deferred_questions}`);
|
|
@@ -9950,7 +10034,7 @@ function projectStatus(root) {
|
|
|
9950
10034
|
return fail("Project status needs `.kaddo/explain.json`. Run `kaddo explain` first.");
|
|
9951
10035
|
}
|
|
9952
10036
|
const maturity = (explain.layers ?? []).map((l2) => `${l2.layer}: ${l2.status}`);
|
|
9953
|
-
|
|
10037
|
+
const result = {
|
|
9954
10038
|
project: explain.project?.name ?? "unknown",
|
|
9955
10039
|
state: explain.project?.state ?? "unknown",
|
|
9956
10040
|
knowledgeMaturity: maturity,
|
|
@@ -9970,7 +10054,17 @@ function projectStatus(root) {
|
|
|
9970
10054
|
hints: hints?.summary?.hints ?? 0
|
|
9971
10055
|
},
|
|
9972
10056
|
capsules: capsules.length
|
|
9973
|
-
}
|
|
10057
|
+
};
|
|
10058
|
+
if (explain.isModuleRepo) {
|
|
10059
|
+
result.isModuleRepo = true;
|
|
10060
|
+
result.readiness = {
|
|
10061
|
+
overall: explain.readiness?.overall ?? "unknown",
|
|
10062
|
+
project_role: explain.readiness?.project_role ?? "module",
|
|
10063
|
+
agents: "managed-by-core",
|
|
10064
|
+
skills: "managed-by-core"
|
|
10065
|
+
};
|
|
10066
|
+
}
|
|
10067
|
+
return ok(result);
|
|
9974
10068
|
}
|
|
9975
10069
|
function listWorkItemsTool(root, filter = {}) {
|
|
9976
10070
|
let items = listWorkItems(root);
|
|
@@ -10700,11 +10794,11 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
10700
10794
|
if (!inventoryAvailable) {
|
|
10701
10795
|
missing.push("No technical inventory found. Run `kaddo scan` to generate it.");
|
|
10702
10796
|
}
|
|
10797
|
+
const moduleRepo = config != null && isModule(config);
|
|
10703
10798
|
const knowledgeSummary = readMarkdownSummary(dir, "knowledge.md") ?? "";
|
|
10704
|
-
if (!knowledgeSummary) {
|
|
10799
|
+
if (!knowledgeSummary && !moduleRepo) {
|
|
10705
10800
|
missing.push("No project knowledge summary found yet.");
|
|
10706
10801
|
}
|
|
10707
|
-
const moduleRepo = config != null && isModule(config);
|
|
10708
10802
|
const roadmapSummary = readMarkdownSummary(dir, "delivery/roadmap.md") ?? "";
|
|
10709
10803
|
if (!roadmapSummary && !moduleRepo) {
|
|
10710
10804
|
missing.push("No roadmap baseline found.");
|
|
@@ -10878,11 +10972,12 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
10878
10972
|
}
|
|
10879
10973
|
return contexts;
|
|
10880
10974
|
})(),
|
|
10975
|
+
isModuleRepo: moduleRepo,
|
|
10881
10976
|
missing,
|
|
10882
10977
|
// VS-052/VS-073.2: the handoff is driven by the unified next step, so the pack never contradicts
|
|
10883
10978
|
// the Current Phase block above it.
|
|
10884
10979
|
handoff: {
|
|
10885
|
-
recommendedAgents: isBootstrap ? [] : unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : recommendedAgentsForState(state),
|
|
10980
|
+
recommendedAgents: isBootstrap ? [] : unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : moduleRepo ? [] : recommendedAgentsForState(state),
|
|
10886
10981
|
nextSteps: [nextStepRecommendation.label],
|
|
10887
10982
|
instructions: isBootstrap ? ["No agent handoff yet.", "Run `kaddo bootstrap` first to create the baseline files."] : unifiedPhase.llmInstructions.length > 0 ? unifiedPhase.llmInstructions : LLM_INSTRUCTIONS,
|
|
10888
10983
|
operatingRules: OPERATING_RULES
|
|
@@ -11193,7 +11288,11 @@ function renderContextPack(pack) {
|
|
|
11193
11288
|
}
|
|
11194
11289
|
}
|
|
11195
11290
|
parts.push("## Recommended Agent Handoff\n");
|
|
11196
|
-
if (
|
|
11291
|
+
if (pack.isModuleRepo && handoff.recommendedAgents.length === 0) {
|
|
11292
|
+
parts.push("No local agent action is required.\n");
|
|
11293
|
+
parts.push("This module is ready for core orchestration.\n");
|
|
11294
|
+
parts.push("Business, Product, Delivery, Agents and Skills are managed by the core repository.\n");
|
|
11295
|
+
} else if (isBootstrapIncomplete) {
|
|
11197
11296
|
parts.push("No agent handoff yet.\n");
|
|
11198
11297
|
parts.push("Run `kaddo bootstrap` first to create the baseline files.\n");
|
|
11199
11298
|
} else if (rec.agent && rec.agentInstalled === false) {
|
package/package.json
CHANGED