@kaddo/cli 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 +142 -53
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7594,7 +7594,7 @@ function assessPhase(input) {
|
|
|
7594
7594
|
const techReady = !NOT_READY_LAYER.includes(techStatus);
|
|
7595
7595
|
if (techReady) {
|
|
7596
7596
|
return {
|
|
7597
|
-
phase: "
|
|
7597
|
+
phase: "Ready for Core Orchestration",
|
|
7598
7598
|
reasons: ["Module repo \u2014 Tech layer ready", "Business/Product managed by core"],
|
|
7599
7599
|
recommendedAgents: [],
|
|
7600
7600
|
nextStep: "Module knowledge is ready for core orchestration.",
|
|
@@ -11921,6 +11921,47 @@ function buildReadinessReport(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
11921
11921
|
if (!config) return stub("not-initialized", rec.label, rec.command);
|
|
11922
11922
|
if (config.project.state === "new") return stub("not-applicable", "This project uses the standard new-project Kaddo flow.");
|
|
11923
11923
|
if (config.project.state === "legacy") return stub("legacy-project", "Use the legacy project flow.");
|
|
11924
|
+
if (isModule(config)) {
|
|
11925
|
+
const scan3 = exists(join(dir, ".kaddo", "scan.json")) ? "available" : "missing";
|
|
11926
|
+
const understand2 = exists(join(dir, ".kaddo", "understand.md")) ? "available" : "missing";
|
|
11927
|
+
const mcNew = "knowledge/tech/module/module-context.md";
|
|
11928
|
+
const mcLegacy = "knowledge/module/module-context.md";
|
|
11929
|
+
const mcPath = exists(join(dir, mcNew)) ? mcNew : mcLegacy;
|
|
11930
|
+
const qMC = analyzeKnowledgeArtifact(dir, mcPath);
|
|
11931
|
+
const qCS = analyzeKnowledgeArtifact(dir, "knowledge/tech/current-state.md");
|
|
11932
|
+
const qCB = analyzeKnowledgeArtifact(dir, "knowledge/tech/codebase.md");
|
|
11933
|
+
const moduleBaseline = qMC !== "missing" && qCS !== "missing" && qCB !== "missing" ? "complete" : "incomplete";
|
|
11934
|
+
const moduleReady = qMC === "useful" && qCS === "useful" && qCB === "useful";
|
|
11935
|
+
const overall2 = moduleReady ? "ready-for-core-orchestration" : moduleBaseline === "incomplete" ? "bootstrap-incomplete" : "knowledge-incomplete";
|
|
11936
|
+
return {
|
|
11937
|
+
project_name: config.project.name,
|
|
11938
|
+
project_type: config.project.state,
|
|
11939
|
+
project_role: "module",
|
|
11940
|
+
overall: overall2,
|
|
11941
|
+
signals: {
|
|
11942
|
+
scan: scan3,
|
|
11943
|
+
understand: understand2,
|
|
11944
|
+
bootstrap_baseline: moduleBaseline,
|
|
11945
|
+
agents: "managed-by-core",
|
|
11946
|
+
skills: "managed-by-core",
|
|
11947
|
+
current_state: qCS,
|
|
11948
|
+
codebase: qCB,
|
|
11949
|
+
module_context: qMC,
|
|
11950
|
+
capabilities: "managed-by-core",
|
|
11951
|
+
product: "not-applicable",
|
|
11952
|
+
business: "not-applicable",
|
|
11953
|
+
roadmap: "managed-by-core",
|
|
11954
|
+
work_items: "managed-by-core",
|
|
11955
|
+
adapters: [],
|
|
11956
|
+
blocking_open_questions: 0,
|
|
11957
|
+
assumed_questions: 0,
|
|
11958
|
+
resolved_questions: 0,
|
|
11959
|
+
deferred_questions: 0
|
|
11960
|
+
},
|
|
11961
|
+
recommended_next_step: { label: rec.label, ...rec.command ? { command: rec.command } : {} },
|
|
11962
|
+
nextStepRecommendation: rec
|
|
11963
|
+
};
|
|
11964
|
+
}
|
|
11924
11965
|
const scan2 = exists(join(dir, ".kaddo", "scan.json")) ? "available" : "missing";
|
|
11925
11966
|
const understand = exists(join(dir, ".kaddo", "understand.md")) ? "available" : "missing";
|
|
11926
11967
|
const presence = Object.fromEntries(KNOWLEDGE_FILES2.map((f) => [f.key, analyzeKnowledgeArtifact(dir, f.path)]));
|
|
@@ -12891,51 +12932,73 @@ function buildProjectExplanation(dir) {
|
|
|
12891
12932
|
const roadmapMd = exists(roadmapPath) ? readFile(roadmapPath) : null;
|
|
12892
12933
|
const roadmap = roadmapStats(roadmapMd, items.length);
|
|
12893
12934
|
const mappedModules = loadMappedModules(dir);
|
|
12935
|
+
const moduleRepo = config != null && isModule(config);
|
|
12894
12936
|
const missingKnowledge = [];
|
|
12895
|
-
if (
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
if (!knowledge.hasArchitecture) missingKnowledge.push("Tech knowledge (knowledge/tech/)");
|
|
12900
|
-
if (!knowledge.hasRoadmap) missingKnowledge.push("Roadmap (knowledge/delivery/roadmap.md)");
|
|
12901
|
-
if (!knowledge.hasAgents) missingKnowledge.push("Agents (knowledge/agents/)");
|
|
12902
|
-
if (items.length === 0) missingKnowledge.push("Work items (knowledge/delivery/work-items/)");
|
|
12903
|
-
const suggestedNextSteps = [];
|
|
12904
|
-
const baselineIncomplete = !knowledge.hasBusiness || !knowledge.hasProduct;
|
|
12905
|
-
if (baselineIncomplete) {
|
|
12906
|
-
suggestedNextSteps.push("Run `kaddo bootstrap` to create the project knowledge baseline.");
|
|
12907
|
-
if (!knowledge.hasAgents) suggestedNextSteps.push("Then run `kaddo add agents`.");
|
|
12908
|
-
if (!knowledge.hasSkills) suggestedNextSteps.push("Then run `kaddo add skills`.");
|
|
12909
|
-
suggestedNextSteps.push("Then run `kaddo context`.");
|
|
12910
|
-
suggestedNextSteps.push("Then run `kaddo understand`.");
|
|
12937
|
+
if (moduleRepo) {
|
|
12938
|
+
if (!knowledge.hasScan) missingKnowledge.push("Scan baseline (.kaddo/scan.json)");
|
|
12939
|
+
if (!knowledge.hasContextPack) missingKnowledge.push("Context pack (.kaddo/context-pack.md)");
|
|
12940
|
+
if (!knowledge.hasArchitecture) missingKnowledge.push("Tech knowledge (knowledge/tech/)");
|
|
12911
12941
|
} else {
|
|
12942
|
+
if (!knowledge.hasScan) missingKnowledge.push("Scan baseline (.kaddo/scan.json)");
|
|
12943
|
+
if (!knowledge.hasContextPack) missingKnowledge.push("Context pack (.kaddo/context-pack.md)");
|
|
12944
|
+
if (!knowledge.hasInventory) missingKnowledge.push("Inventory (knowledge/inventory.md)");
|
|
12945
|
+
if (!knowledge.hasCapabilities) missingKnowledge.push("Product knowledge (knowledge/product/)");
|
|
12946
|
+
if (!knowledge.hasArchitecture) missingKnowledge.push("Tech knowledge (knowledge/tech/)");
|
|
12947
|
+
if (!knowledge.hasRoadmap) missingKnowledge.push("Roadmap (knowledge/delivery/roadmap.md)");
|
|
12948
|
+
if (!knowledge.hasAgents) missingKnowledge.push("Agents (knowledge/agents/)");
|
|
12949
|
+
if (items.length === 0) missingKnowledge.push("Work items (knowledge/delivery/work-items/)");
|
|
12950
|
+
}
|
|
12951
|
+
const suggestedNextSteps = [];
|
|
12952
|
+
if (moduleRepo) {
|
|
12912
12953
|
if (!knowledge.hasScan) {
|
|
12913
12954
|
suggestedNextSteps.push("Run `kaddo scan` to detect the technical stack.");
|
|
12914
12955
|
} else if (!knowledge.hasContextPack) {
|
|
12915
12956
|
suggestedNextSteps.push("Run `kaddo context` to prepare an LLM context pack.");
|
|
12957
|
+
} else if (!knowledge.hasArchitecture) {
|
|
12958
|
+
suggestedNextSteps.push("Use module-context-agent to refine knowledge/tech/module/module-context.md.");
|
|
12959
|
+
} else {
|
|
12960
|
+
suggestedNextSteps.push("Return to the core repository.");
|
|
12961
|
+
suggestedNextSteps.push("Create or continue the Work Item from the core.");
|
|
12962
|
+
suggestedNextSteps.push("Add this module to `affected_modules` when the change touches it.");
|
|
12963
|
+
suggestedNextSteps.push("Re-run `kaddo context` and `kaddo understand` from the core.");
|
|
12916
12964
|
}
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
12921
|
-
suggestedNextSteps.push("
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
suggestedNextSteps.push("
|
|
12925
|
-
}
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
)
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12965
|
+
} else {
|
|
12966
|
+
const baselineIncomplete = !knowledge.hasBusiness || !knowledge.hasProduct;
|
|
12967
|
+
if (baselineIncomplete) {
|
|
12968
|
+
suggestedNextSteps.push("Run `kaddo bootstrap` to create the project knowledge baseline.");
|
|
12969
|
+
if (!knowledge.hasAgents) suggestedNextSteps.push("Then run `kaddo add agents`.");
|
|
12970
|
+
if (!knowledge.hasSkills) suggestedNextSteps.push("Then run `kaddo add skills`.");
|
|
12971
|
+
suggestedNextSteps.push("Then run `kaddo context`.");
|
|
12972
|
+
suggestedNextSteps.push("Then run `kaddo understand`.");
|
|
12973
|
+
} else {
|
|
12974
|
+
if (!knowledge.hasScan) {
|
|
12975
|
+
suggestedNextSteps.push("Run `kaddo scan` to detect the technical stack.");
|
|
12976
|
+
} else if (!knowledge.hasContextPack) {
|
|
12977
|
+
suggestedNextSteps.push("Run `kaddo context` to prepare an LLM context pack.");
|
|
12978
|
+
}
|
|
12979
|
+
if (!knowledge.hasAgents) {
|
|
12980
|
+
suggestedNextSteps.push("Run `kaddo add agents` to install knowledge agents.");
|
|
12981
|
+
}
|
|
12982
|
+
if (!knowledge.hasCapabilities) {
|
|
12983
|
+
suggestedNextSteps.push("Use capability-agent to generate knowledge/product/capabilities.md.");
|
|
12984
|
+
}
|
|
12985
|
+
if (!knowledge.hasArchitecture) {
|
|
12986
|
+
suggestedNextSteps.push("Use architecture-agent to generate knowledge/tech/current-state.md.");
|
|
12987
|
+
}
|
|
12988
|
+
if (!knowledge.hasRoadmap) {
|
|
12989
|
+
suggestedNextSteps.push("Use roadmap-agent to generate knowledge/delivery/roadmap.md.");
|
|
12990
|
+
} else if (roadmap.remaining > 0) {
|
|
12991
|
+
suggestedNextSteps.push(
|
|
12992
|
+
`Materialize ${roadmap.remaining} roadmap candidate(s) with \`kaddo create --from roadmap\`.`
|
|
12993
|
+
);
|
|
12994
|
+
}
|
|
12995
|
+
if (items.length === 0 && !roadmap.present) {
|
|
12996
|
+
suggestedNextSteps.push("Create your first Work Item with `kaddo create`.");
|
|
12997
|
+
} else if (ownership.workItemsMissingOwnership > 0) {
|
|
12998
|
+
suggestedNextSteps.push(
|
|
12999
|
+
"Run `kaddo owners suggest` for Work Items without code ownership."
|
|
13000
|
+
);
|
|
13001
|
+
}
|
|
12939
13002
|
}
|
|
12940
13003
|
}
|
|
12941
13004
|
const readiness = buildReadinessReport(dir);
|
|
@@ -13031,11 +13094,19 @@ function renderExplanationHuman(exp) {
|
|
|
13031
13094
|
lines.push("## Knowledge Status");
|
|
13032
13095
|
lines.push(`- Inventory: ${exp.knowledge.hasInventory ? "available" : "missing"}`);
|
|
13033
13096
|
lines.push(`- Context pack: ${exp.knowledge.hasContextPack ? "available" : "missing"}`);
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13097
|
+
if (exp.isModuleRepo) {
|
|
13098
|
+
lines.push("- Business: Not applicable");
|
|
13099
|
+
lines.push("- Product: Not applicable");
|
|
13100
|
+
lines.push(`- Tech: ${ls("Tech")}`);
|
|
13101
|
+
lines.push("- Delivery: Managed by core");
|
|
13102
|
+
lines.push("- Agents: Managed by core");
|
|
13103
|
+
} else {
|
|
13104
|
+
lines.push(`- Business: ${ls("Business")}`);
|
|
13105
|
+
lines.push(`- Product: ${ls("Product")}`);
|
|
13106
|
+
lines.push(`- Tech: ${ls("Tech")}`);
|
|
13107
|
+
lines.push(`- Delivery: ${ls("Delivery")}`);
|
|
13108
|
+
lines.push(`- Agents: ${exp.knowledge.hasAgents ? "available" : "missing"}`);
|
|
13109
|
+
}
|
|
13039
13110
|
if (exp.roadmap.present) {
|
|
13040
13111
|
lines.push(`- Roadmap initiatives: ${exp.roadmap.initiatives}`);
|
|
13041
13112
|
lines.push(`- Work Item candidates: ${exp.roadmap.work_item_candidates}`);
|
|
@@ -13196,14 +13267,27 @@ function renderExplanationHuman(exp) {
|
|
|
13196
13267
|
lines.push(`- understand: ${s.understand}`);
|
|
13197
13268
|
lines.push(`- agents: ${s.agents}`);
|
|
13198
13269
|
lines.push(`- skills: ${s.skills}`);
|
|
13199
|
-
|
|
13200
|
-
|
|
13270
|
+
if (exp.isModuleRepo) {
|
|
13271
|
+
lines.push("- business: not-applicable");
|
|
13272
|
+
lines.push("- product: not-applicable");
|
|
13273
|
+
} else {
|
|
13274
|
+
lines.push(`- business: ${s.business}`);
|
|
13275
|
+
lines.push(`- product: ${s.product}`);
|
|
13276
|
+
}
|
|
13201
13277
|
lines.push(`- capabilities: ${s.capabilities}`);
|
|
13202
13278
|
lines.push(`- current-state: ${s.current_state}`);
|
|
13203
13279
|
lines.push(`- codebase: ${s.codebase}`);
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13280
|
+
if (s.module_context != null) {
|
|
13281
|
+
lines.push(`- module-context: ${s.module_context}`);
|
|
13282
|
+
}
|
|
13283
|
+
if (!exp.isModuleRepo) {
|
|
13284
|
+
lines.push(`- roadmap: ${s.roadmap}`);
|
|
13285
|
+
lines.push(`- work-items: ${s.work_items}`);
|
|
13286
|
+
lines.push(`- adapters: ${s.adapters.length > 0 ? s.adapters.join(", ") + " installed" : "none installed"}`);
|
|
13287
|
+
} else {
|
|
13288
|
+
lines.push("- roadmap: managed-by-core");
|
|
13289
|
+
lines.push("- work-items: managed-by-core");
|
|
13290
|
+
}
|
|
13207
13291
|
lines.push(`- blocking open questions: ${s.blocking_open_questions}`);
|
|
13208
13292
|
lines.push(`- assumptions: ${s.assumed_questions}`);
|
|
13209
13293
|
lines.push(`- deferred: ${s.deferred_questions}`);
|
|
@@ -13568,11 +13652,11 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
13568
13652
|
if (!inventoryAvailable) {
|
|
13569
13653
|
missing.push("No technical inventory found. Run `kaddo scan` to generate it.");
|
|
13570
13654
|
}
|
|
13655
|
+
const moduleRepo = config != null && isModule(config);
|
|
13571
13656
|
const knowledgeSummary = readMarkdownSummary(dir, "knowledge.md") ?? "";
|
|
13572
|
-
if (!knowledgeSummary) {
|
|
13657
|
+
if (!knowledgeSummary && !moduleRepo) {
|
|
13573
13658
|
missing.push("No project knowledge summary found yet.");
|
|
13574
13659
|
}
|
|
13575
|
-
const moduleRepo = config != null && isModule(config);
|
|
13576
13660
|
const roadmapSummary = readMarkdownSummary(dir, "delivery/roadmap.md") ?? "";
|
|
13577
13661
|
if (!roadmapSummary && !moduleRepo) {
|
|
13578
13662
|
missing.push("No roadmap baseline found.");
|
|
@@ -13746,11 +13830,12 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
13746
13830
|
}
|
|
13747
13831
|
return contexts;
|
|
13748
13832
|
})(),
|
|
13833
|
+
isModuleRepo: moduleRepo,
|
|
13749
13834
|
missing,
|
|
13750
13835
|
// VS-052/VS-073.2: the handoff is driven by the unified next step, so the pack never contradicts
|
|
13751
13836
|
// the Current Phase block above it.
|
|
13752
13837
|
handoff: {
|
|
13753
|
-
recommendedAgents: isBootstrap ? [] : unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : recommendedAgentsForState(state),
|
|
13838
|
+
recommendedAgents: isBootstrap ? [] : unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : moduleRepo ? [] : recommendedAgentsForState(state),
|
|
13754
13839
|
nextSteps: [nextStepRecommendation.label],
|
|
13755
13840
|
instructions: isBootstrap ? ["No agent handoff yet.", "Run `kaddo bootstrap` first to create the baseline files."] : unifiedPhase.llmInstructions.length > 0 ? unifiedPhase.llmInstructions : LLM_INSTRUCTIONS,
|
|
13756
13841
|
operatingRules: OPERATING_RULES
|
|
@@ -14061,7 +14146,11 @@ function renderContextPack(pack) {
|
|
|
14061
14146
|
}
|
|
14062
14147
|
}
|
|
14063
14148
|
parts.push("## Recommended Agent Handoff\n");
|
|
14064
|
-
if (
|
|
14149
|
+
if (pack.isModuleRepo && handoff.recommendedAgents.length === 0) {
|
|
14150
|
+
parts.push("No local agent action is required.\n");
|
|
14151
|
+
parts.push("This module is ready for core orchestration.\n");
|
|
14152
|
+
parts.push("Business, Product, Delivery, Agents and Skills are managed by the core repository.\n");
|
|
14153
|
+
} else if (isBootstrapIncomplete) {
|
|
14065
14154
|
parts.push("No agent handoff yet.\n");
|
|
14066
14155
|
parts.push("Run `kaddo bootstrap` first to create the baseline files.\n");
|
|
14067
14156
|
} else if (rec.agent && rec.agentInstalled === false) {
|