@kaddo/mcp 3.37.1 → 3.39.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.
Files changed (2) hide show
  1. package/dist/index.js +30 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1502,6 +1502,9 @@ function isPlaceholderLine(line) {
1502
1502
  if (/^[-*]\s+(\[[^\]]+\]\s*)?_.+_$/.test(t)) return true;
1503
1503
  if (/^[-*]\s+\[[^\]]+\]\s*$/.test(t)) return true;
1504
1504
  if (/^_(?:Describe|List|Document|What|Which|Who|Use|To be defined|No production code)\b/i.test(t)) return true;
1505
+ if (/<[^>]+>/.test(t)) return true;
1506
+ if (/^[-*]\s+[^:]+:\s*$/.test(t)) return true;
1507
+ if (/^[-*]\s+[^:]+:\s*\S.*\s\|\s/.test(t)) return true;
1505
1508
  return false;
1506
1509
  }
1507
1510
  function isStructuralLine(line, inFrontMatter) {
@@ -1916,10 +1919,10 @@ function extractFromMarkdown(md) {
1916
1919
  }
1917
1920
  const m = line.match(/^\s*(?:[-*]|\d+\.)\s+(.+?)\s*$/);
1918
1921
  if (m) {
1919
- const raw = m[1].trim();
1920
- if (!raw || /^_.*_$/.test(raw)) continue;
1921
- const { text: text2, resolution_status } = parseResolution(raw);
1922
- if (text2) out.push({ text: text2, resolution_status });
1922
+ const bullet = m[1].trim();
1923
+ if (!bullet || /^_.*_$/.test(bullet)) continue;
1924
+ const { text: text2, resolution_status } = parseResolution(bullet);
1925
+ if (text2) out.push({ text: text2, resolution_status, line: i + 1, raw: line.trim() });
1923
1926
  }
1924
1927
  }
1925
1928
  return out;
@@ -1959,12 +1962,15 @@ function buildOpenQuestionsReport(dir, now = /* @__PURE__ */ new Date()) {
1959
1962
  questions.push({
1960
1963
  id: `OQ-${String(seq).padStart(3, "0")}`,
1961
1964
  source,
1965
+ sourcePath: source,
1966
+ line: eq.line,
1967
+ raw: eq.raw,
1962
1968
  section: "Open Questions",
1963
1969
  question: eq.text,
1964
1970
  classification,
1965
1971
  resolution_status: eq.resolution_status,
1966
1972
  reason,
1967
- ...eq.resolution_note ? { resolution_note: eq.resolution_note } : {},
1973
+ ...eq.resolution_note ? { resolution_note: eq.resolution_note, note: eq.resolution_note } : {},
1968
1974
  ...classification === "blocking" && eq.resolution_status === "open" ? { suggested_assumption: suggestedAssumption(eq.text) } : {}
1969
1975
  });
1970
1976
  }
@@ -2034,17 +2040,23 @@ function renderOpenQuestionsMarkdown(r) {
2034
2040
  L.push("## Blocking Open Questions", "");
2035
2041
  if (blockingOpen.length === 0) L.push("_None \u2014 nothing blocks readiness._", "");
2036
2042
  for (const q of blockingOpen) {
2037
- L.push(`### ${q.id}`, "");
2038
- L.push(`- Source: \`${q.source}\``);
2039
- L.push(`- Question: ${q.question}`);
2043
+ L.push(`### ${q.question}`, "");
2044
+ L.push(`- Status: ${q.resolution_status}`);
2045
+ L.push(`- Severity: ${q.classification}`);
2046
+ L.push(`- Source: \`${q.sourcePath}:${q.line}\``);
2040
2047
  L.push(`- Reason: ${q.reason}`);
2041
- if (q.suggested_assumption) L.push(`- Suggested assumption: ${q.suggested_assumption}`);
2048
+ L.push("");
2049
+ L.push("Suggested action:", "");
2050
+ L.push("```md");
2051
+ L.push(`- [assumed] ${q.question}`);
2052
+ L.push(` - note: ${q.suggested_assumption ?? "<editable assumption for the MVP>"}`);
2053
+ L.push("```");
2042
2054
  L.push("");
2043
2055
  }
2044
2056
  const renderStatusList = (title, items) => {
2045
2057
  L.push(`## ${title}`, "");
2046
2058
  if (items.length === 0) L.push("_None._");
2047
- for (const q of items) L.push(`- ${q.question}${q.resolution_note ? ` \u2014 _${q.resolution_note}_` : ""}`);
2059
+ for (const q of items) L.push(`- ${q.question} \u2014 \`${q.sourcePath}:${q.line}\`${q.note ? ` \u2014 _${q.note}_` : ""}`);
2048
2060
  L.push("");
2049
2061
  };
2050
2062
  renderStatusList("Resolved", r.resolved_questions);
@@ -2281,10 +2293,11 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
2281
2293
  if (!exists(join(dir, ".kaddo", "understand.md"))) {
2282
2294
  return { id: "understand", phase: "Discovery", label: "Run `kaddo understand` to summarize the project context.", command: "kaddo understand", reason: "No understand handoff has been generated yet." };
2283
2295
  }
2284
- const refine = (id, agent, target, quality) => ({
2296
+ const discovery = state === "pre-ai" || state === "legacy";
2297
+ const refine = (id, agent, target, quality, verb = "complete") => ({
2285
2298
  id,
2286
2299
  phase: "Knowledge Refinement",
2287
- label: `Use ${agent} to complete \`${target}\`.`,
2300
+ label: `Use ${agent} to ${verb} \`${target}\`.`,
2288
2301
  agent,
2289
2302
  target,
2290
2303
  reason: `${target} is ${quality === "missing" ? "missing" : "still a bootstrap placeholder or too thin"}.`,
@@ -2296,8 +2309,10 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
2296
2309
  });
2297
2310
  if (qBusiness !== "useful") return refine("refine-business", "business-agent", B, qBusiness);
2298
2311
  if (qProduct !== "useful" || qCap !== "useful") {
2299
- const target = qCap !== "useful" ? CAP : P;
2300
- return refine("refine-product", "capability-agent", target, qCap !== "useful" ? qCap : qProduct);
2312
+ if (qCap !== "useful") {
2313
+ return refine("refine-product", "capability-agent", CAP, qCap, discovery ? "discover and document existing system capabilities in" : "complete");
2314
+ }
2315
+ return refine("refine-product", "capability-agent", P, qProduct);
2301
2316
  }
2302
2317
  if (qCurrentState !== "useful") return refine("refine-current-state", "architecture-agent", CS, qCurrentState);
2303
2318
  if (qCodebase !== "useful") {
@@ -2306,7 +2321,7 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
2306
2321
  }
2307
2322
  const oq = buildOpenQuestionsReport(dir, now);
2308
2323
  if (oq.summary.blocking_open > 0) {
2309
- return { id: "questions", phase: "Knowledge Refinement", label: "Resolve, assume or defer the blocking open questions (`kaddo questions`).", command: "kaddo questions", reason: `${oq.summary.blocking_open} blocking open question(s) remain.` };
2324
+ 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.` };
2310
2325
  }
2311
2326
  const roadmap = roadmapSignal(dir);
2312
2327
  if (roadmap !== "has-candidates") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/mcp",
3
- "version": "3.37.1",
3
+ "version": "3.39.0",
4
4
  "description": "MCP server for Kaddo project knowledge: read-only resources/tools/prompts plus safe derived generation under .kaddo/.",
5
5
  "license": "MIT",
6
6
  "repository": {