@kaddo/mcp 3.59.0 → 3.60.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 +59 -50
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2452,6 +2452,7 @@ function buildDeliveryState(dir) {
|
|
|
2452
2452
|
refined_draft_work_items: wis.filter((w) => w.lifecycle === "draft" && w.rawFrontmatter.refined_by).length,
|
|
2453
2453
|
refined_draft_ids: wis.filter((w) => w.lifecycle === "draft" && w.rawFrontmatter.refined_by).map((w) => w.id),
|
|
2454
2454
|
ready_work_items: byState("ready"),
|
|
2455
|
+
ready_work_item_ids: wis.filter((w) => w.lifecycle === "ready").map((w) => w.id),
|
|
2455
2456
|
in_progress_work_items: byState("in-progress"),
|
|
2456
2457
|
blocked_work_items: byState("blocked"),
|
|
2457
2458
|
total_work_items: total,
|
|
@@ -2577,63 +2578,42 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
2577
2578
|
const st = buildDeliveryState(dir);
|
|
2578
2579
|
const secondary = buildSecondaryRecommendations(st);
|
|
2579
2580
|
const roadmap = roadmapSignal(dir);
|
|
2580
|
-
if (roadmap !== "has-candidates" && st.draft_work_items > 0) {
|
|
2581
|
-
if (st.refined_draft_work_items > 0) {
|
|
2582
|
-
const ids = st.refined_draft_ids;
|
|
2583
|
-
const single = ids.length === 1;
|
|
2584
|
-
return {
|
|
2585
|
-
id: "review-work-item",
|
|
2586
|
-
phase: "Active Delivery",
|
|
2587
|
-
label: single ? `Review ${ids[0]} and mark it ready for implementation.` : "Review refined draft Work Items and mark one ready for implementation.",
|
|
2588
|
-
command: single ? `kaddo ready ${ids[0]}` : "kaddo ready <WI-ID>",
|
|
2589
|
-
mcpAction: "kaddo_mark_work_item_ready",
|
|
2590
|
-
...single ? { target: ids[0], mcpArgs: { id: ids[0] } } : { targets: ids },
|
|
2591
|
-
reason: single ? `${ids[0]} is a refined draft Work Item awaiting human review.` : `There are ${ids.length} refined draft Work Items awaiting human review.`,
|
|
2592
|
-
...secondary.length ? { secondary } : {}
|
|
2593
|
-
};
|
|
2594
|
-
}
|
|
2595
|
-
return {
|
|
2596
|
-
id: "refine-work-item",
|
|
2597
|
-
phase: "Active Delivery",
|
|
2598
|
-
label: "Refine the existing draft Work Item with the work-item-agent.",
|
|
2599
|
-
agent: "work-item-agent",
|
|
2600
|
-
skill: "work-item-refinement",
|
|
2601
|
-
reason: `There ${st.draft_work_items === 1 ? "is" : "are"} ${st.draft_work_items} draft Work Item${st.draft_work_items === 1 ? "" : "s"}. Refine before defining roadmap candidates.`,
|
|
2602
|
-
...secondary.length ? { secondary } : {}
|
|
2603
|
-
};
|
|
2604
|
-
}
|
|
2605
|
-
if (roadmap !== "has-candidates") {
|
|
2606
|
-
return { id: "roadmap", phase: "Planning", label: "Use roadmap-agent to define roadmap candidates (`kaddo roadmap`).", command: "kaddo roadmap", agent: "roadmap-agent", target: "knowledge/delivery/roadmap.md", reason: "The roadmap has no candidates yet." };
|
|
2607
|
-
}
|
|
2608
|
-
if (st.total_work_items === 0) {
|
|
2609
|
-
return {
|
|
2610
|
-
id: "create-work-item",
|
|
2611
|
-
phase: "Delivery Preparation",
|
|
2612
|
-
label: "Run `kaddo create --from roadmap` to materialize the first Work Item.",
|
|
2613
|
-
command: "kaddo create --from roadmap",
|
|
2614
|
-
reason: "The roadmap has candidates but no Work Item exists yet.",
|
|
2615
|
-
...secondary.length ? { secondary } : {}
|
|
2616
|
-
};
|
|
2617
|
-
}
|
|
2618
2581
|
const adapters = st.adapters_installed;
|
|
2619
2582
|
if (st.ready_work_items > 0) {
|
|
2583
|
+
const ids = st.ready_work_item_ids;
|
|
2584
|
+
const single = ids.length === 1;
|
|
2585
|
+
const sec = [...secondary];
|
|
2586
|
+
if (roadmap !== "has-candidates" && st.remaining_work_item_candidates === 0) {
|
|
2587
|
+
sec.push({
|
|
2588
|
+
id: "roadmap",
|
|
2589
|
+
label: "Roadmap has no candidates. Consider running `kaddo roadmap` after handling ready Work Items.",
|
|
2590
|
+
command: "kaddo roadmap",
|
|
2591
|
+
agent: "roadmap-agent",
|
|
2592
|
+
reason: "The roadmap has no candidates yet, but ready Work Items exist."
|
|
2593
|
+
});
|
|
2594
|
+
}
|
|
2620
2595
|
if (adapters === 0) {
|
|
2621
2596
|
return {
|
|
2622
|
-
id: "
|
|
2597
|
+
id: "prepare-implementation",
|
|
2623
2598
|
phase: "Active Delivery",
|
|
2624
|
-
label:
|
|
2599
|
+
label: single ? `Prepare implementation for ${ids[0]}.` : "Prepare implementation for ready Work Items.",
|
|
2625
2600
|
command: "kaddo adapters list",
|
|
2626
|
-
|
|
2627
|
-
|
|
2601
|
+
agent: "implementation-agent",
|
|
2602
|
+
skill: "implementation-planning",
|
|
2603
|
+
...single ? { target: ids[0] } : { targets: ids },
|
|
2604
|
+
reason: single ? `${ids[0]} is ready for implementation but no adapter is installed.` : `There are ${ids.length} ready Work Items awaiting implementation but no adapter is installed.`,
|
|
2605
|
+
...sec.length ? { secondary: sec } : {}
|
|
2628
2606
|
};
|
|
2629
2607
|
}
|
|
2630
2608
|
return {
|
|
2631
|
-
id: "implement",
|
|
2609
|
+
id: "implement-work-item",
|
|
2632
2610
|
phase: "Active Delivery",
|
|
2633
|
-
label:
|
|
2611
|
+
label: single ? `Use implementation-agent to implement ${ids[0]}.` : "Use implementation-agent to implement ready Work Items.",
|
|
2634
2612
|
agent: "implementation-agent",
|
|
2635
|
-
|
|
2636
|
-
...
|
|
2613
|
+
skill: "implementation-planning",
|
|
2614
|
+
...single ? { target: ids[0] } : { targets: ids },
|
|
2615
|
+
reason: single ? `${ids[0]} is ready for implementation.` : `There are ${ids.length} ready Work Items awaiting implementation.`,
|
|
2616
|
+
...sec.length ? { secondary: sec } : {}
|
|
2637
2617
|
};
|
|
2638
2618
|
}
|
|
2639
2619
|
if (st.in_progress_work_items > 0) {
|
|
@@ -2646,6 +2626,20 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
2646
2626
|
...secondary.length ? { secondary } : {}
|
|
2647
2627
|
};
|
|
2648
2628
|
}
|
|
2629
|
+
if (st.refined_draft_work_items > 0) {
|
|
2630
|
+
const ids = st.refined_draft_ids;
|
|
2631
|
+
const single = ids.length === 1;
|
|
2632
|
+
return {
|
|
2633
|
+
id: "review-work-item",
|
|
2634
|
+
phase: "Active Delivery",
|
|
2635
|
+
label: single ? `Review ${ids[0]} and mark it ready for implementation.` : "Review refined draft Work Items and mark one ready for implementation.",
|
|
2636
|
+
command: single ? `kaddo ready ${ids[0]}` : "kaddo ready <WI-ID>",
|
|
2637
|
+
mcpAction: "kaddo_mark_work_item_ready",
|
|
2638
|
+
...single ? { target: ids[0], mcpArgs: { id: ids[0] } } : { targets: ids },
|
|
2639
|
+
reason: single ? `${ids[0]} is a refined draft Work Item awaiting human review.` : `There are ${ids.length} refined draft Work Items awaiting human review.`,
|
|
2640
|
+
...secondary.length ? { secondary } : {}
|
|
2641
|
+
};
|
|
2642
|
+
}
|
|
2649
2643
|
if (st.draft_work_items > 0) {
|
|
2650
2644
|
return {
|
|
2651
2645
|
id: "refine-work-item",
|
|
@@ -2653,7 +2647,7 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
2653
2647
|
label: "Refine the existing draft Work Item with the work-item-agent.",
|
|
2654
2648
|
agent: "work-item-agent",
|
|
2655
2649
|
skill: "work-item-refinement",
|
|
2656
|
-
reason: `There ${st.draft_work_items === 1 ? "is" : "are"} ${st.draft_work_items} draft Work Item${st.draft_work_items === 1 ? "" : "s"}
|
|
2650
|
+
reason: `There ${st.draft_work_items === 1 ? "is" : "are"} ${st.draft_work_items} draft Work Item${st.draft_work_items === 1 ? "" : "s"}. Refine before defining roadmap candidates.`,
|
|
2657
2651
|
...secondary.length ? { secondary } : {}
|
|
2658
2652
|
};
|
|
2659
2653
|
}
|
|
@@ -2667,6 +2661,19 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
2667
2661
|
...secondary.length ? { secondary } : {}
|
|
2668
2662
|
};
|
|
2669
2663
|
}
|
|
2664
|
+
if (roadmap !== "has-candidates") {
|
|
2665
|
+
return { id: "roadmap", phase: "Planning", label: "Use roadmap-agent to define roadmap candidates (`kaddo roadmap`).", command: "kaddo roadmap", agent: "roadmap-agent", target: "knowledge/delivery/roadmap.md", reason: "The roadmap has no candidates yet." };
|
|
2666
|
+
}
|
|
2667
|
+
if (st.total_work_items === 0) {
|
|
2668
|
+
return {
|
|
2669
|
+
id: "create-work-item",
|
|
2670
|
+
phase: "Delivery Preparation",
|
|
2671
|
+
label: "Run `kaddo create --from roadmap` to materialize the first Work Item.",
|
|
2672
|
+
command: "kaddo create --from roadmap",
|
|
2673
|
+
reason: "The roadmap has candidates but no Work Item exists yet.",
|
|
2674
|
+
...secondary.length ? { secondary } : {}
|
|
2675
|
+
};
|
|
2676
|
+
}
|
|
2670
2677
|
if (st.remaining_work_item_candidates > 0) {
|
|
2671
2678
|
return {
|
|
2672
2679
|
id: "materialize-more-work-items",
|
|
@@ -6110,7 +6117,9 @@ function mapNextStepId(id) {
|
|
|
6110
6117
|
"refine-capabilities": "discover-capabilities",
|
|
6111
6118
|
"refine-current-state": "describe-architecture",
|
|
6112
6119
|
"refine-codebase": "describe-architecture",
|
|
6113
|
-
"review-work-item": "refine-work-item"
|
|
6120
|
+
"review-work-item": "refine-work-item",
|
|
6121
|
+
"prepare-implementation": "prepare-implementation",
|
|
6122
|
+
"implement-work-item": "prepare-implementation"
|
|
6114
6123
|
};
|
|
6115
6124
|
return MAP[id] ?? id;
|
|
6116
6125
|
}
|
|
@@ -9090,11 +9099,11 @@ function renderUnderstand(plan) {
|
|
|
9090
9099
|
outputs.push("- Refined Work Item content.");
|
|
9091
9100
|
if (rec.id === "create-work-item")
|
|
9092
9101
|
outputs.push("- A new Work Item under `knowledge/delivery/work-items/`.");
|
|
9093
|
-
if (rec.id === "implement")
|
|
9102
|
+
if (rec.id === "implement" || rec.id === "implement-work-item")
|
|
9094
9103
|
outputs.push("- Implementation plan or code changes guided by the Work Item.");
|
|
9095
9104
|
if (rec.id === "guard")
|
|
9096
9105
|
outputs.push("- Updated knowledge artifacts reflecting recent code changes.");
|
|
9097
|
-
if (rec.id === "install-adapter")
|
|
9106
|
+
if (rec.id === "install-adapter" || rec.id === "prepare-implementation")
|
|
9098
9107
|
outputs.push("- An adapter configured and injected (`kaddo adapters list`).");
|
|
9099
9108
|
if (outputs.length > 0) {
|
|
9100
9109
|
parts.push("The LLM should produce:\n");
|
package/package.json
CHANGED