@kaddo/cli 3.55.0 → 3.56.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 +32 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9026,12 +9026,23 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
9026
9026
|
if (oq.summary.blocking_open > 0) {
|
|
9027
9027
|
return { id: "questions", phase: "Knowledge Refinement", label: "Run `kaddo questions` to see source locations and resolution guidance, then resolve, assume or defer the blocking open questions.", command: "kaddo questions", reason: `${oq.summary.blocking_open} blocking open question(s) remain.` };
|
|
9028
9028
|
}
|
|
9029
|
+
const st = buildDeliveryState(dir);
|
|
9030
|
+
const secondary = buildSecondaryRecommendations(st);
|
|
9029
9031
|
const roadmap = roadmapSignal(dir);
|
|
9032
|
+
if (roadmap !== "has-candidates" && st.draft_work_items > 0) {
|
|
9033
|
+
return {
|
|
9034
|
+
id: "refine-work-item",
|
|
9035
|
+
phase: "Active Delivery",
|
|
9036
|
+
label: "Refine the existing draft Work Item with the work-item-agent.",
|
|
9037
|
+
agent: "work-item-agent",
|
|
9038
|
+
skill: "work-item-refinement",
|
|
9039
|
+
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.`,
|
|
9040
|
+
...secondary.length ? { secondary } : {}
|
|
9041
|
+
};
|
|
9042
|
+
}
|
|
9030
9043
|
if (roadmap !== "has-candidates") {
|
|
9031
9044
|
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." };
|
|
9032
9045
|
}
|
|
9033
|
-
const st = buildDeliveryState(dir);
|
|
9034
|
-
const secondary = buildSecondaryRecommendations(st);
|
|
9035
9046
|
if (st.total_work_items === 0) {
|
|
9036
9047
|
return {
|
|
9037
9048
|
id: "create-work-item",
|
|
@@ -9400,7 +9411,25 @@ function isValidSource(s) {
|
|
|
9400
9411
|
return VALID_SOURCES.includes(s);
|
|
9401
9412
|
}
|
|
9402
9413
|
function parseWorkItemSource(frontmatter) {
|
|
9403
|
-
const
|
|
9414
|
+
const rawSource = frontmatter.source;
|
|
9415
|
+
if (rawSource != null && typeof rawSource === "object" && !Array.isArray(rawSource)) {
|
|
9416
|
+
const obj = rawSource;
|
|
9417
|
+
const t = optStr(obj.type);
|
|
9418
|
+
const type = t && isValidSource(t) ? t : "unknown";
|
|
9419
|
+
return {
|
|
9420
|
+
type,
|
|
9421
|
+
id: optStr(obj.id) ?? optStr(frontmatter.source_id),
|
|
9422
|
+
title: optStr(obj.title) ?? optStr(frontmatter.source_title),
|
|
9423
|
+
context: optStr(obj.context) ?? optStr(frontmatter.source_context),
|
|
9424
|
+
provider: optStr(obj.provider) ?? optStr(frontmatter.source_provider),
|
|
9425
|
+
url: optStr(obj.url) ?? optStr(frontmatter.source_url),
|
|
9426
|
+
imported_at: optStr(obj.imported_at) ?? optStr(frontmatter.source_imported_at),
|
|
9427
|
+
synced_at: optStr(obj.synced_at) ?? optStr(frontmatter.source_synced_at),
|
|
9428
|
+
inferred: obj.inferred === true || obj.inferred === "true",
|
|
9429
|
+
reason: t && !isValidSource(t) ? `Invalid source type in object: "${t}".` : void 0
|
|
9430
|
+
};
|
|
9431
|
+
}
|
|
9432
|
+
const raw = rawSource ? String(rawSource) : "";
|
|
9404
9433
|
if (raw && isValidSource(raw)) {
|
|
9405
9434
|
return {
|
|
9406
9435
|
type: raw,
|