@kaddo/mcp 3.50.0 → 3.51.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 +80 -64
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8213,10 +8213,14 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
8213
8213
  if (techKnowledge.discovery.legacyLocation) {
8214
8214
  missing.push("Tech discovery files are in the legacy `knowledge/tech/` root. Run `kaddo tech organize` to move them to `knowledge/tech/discovery/`.");
8215
8215
  }
8216
+ const isBootstrap = nextStepRecommendation.id === "bootstrap";
8216
8217
  const unifiedPhase = {
8217
8218
  ...phase,
8219
+ phase: isBootstrap ? "Setup" : phase.phase,
8220
+ reasons: isBootstrap ? ["The knowledge baseline is incomplete."] : phase.reasons,
8218
8221
  nextStep: nextStepRecommendation.label,
8219
- recommendedAgents: nextStepRecommendation.agent ? [nextStepRecommendation.agent] : phase.recommendedAgents
8222
+ recommendedAgents: isBootstrap ? [] : nextStepRecommendation.agent ? [nextStepRecommendation.agent] : phase.recommendedAgents,
8223
+ llmInstructions: isBootstrap ? ["Run `kaddo bootstrap` before using agent handoff.", "Do not ask an LLM to generate baseline knowledge until bootstrap files exist."] : phase.llmInstructions
8220
8224
  };
8221
8225
  const deliveryState = { ...buildDeliveryState(dir), phase: nextStepRecommendation.phase };
8222
8226
  return {
@@ -8272,9 +8276,9 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
8272
8276
  // VS-052/VS-073.2: the handoff is driven by the unified next step, so the pack never contradicts
8273
8277
  // the Current Phase block above it.
8274
8278
  handoff: {
8275
- recommendedAgents: unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : recommendedAgentsForState(state),
8279
+ recommendedAgents: isBootstrap ? [] : unifiedPhase.recommendedAgents.length > 0 ? unifiedPhase.recommendedAgents : recommendedAgentsForState(state),
8276
8280
  nextSteps: [nextStepRecommendation.label],
8277
- instructions: unifiedPhase.llmInstructions.length > 0 ? unifiedPhase.llmInstructions : LLM_INSTRUCTIONS,
8281
+ instructions: isBootstrap ? ["No agent handoff yet.", "Run `kaddo bootstrap` first to create the baseline files."] : unifiedPhase.llmInstructions.length > 0 ? unifiedPhase.llmInstructions : LLM_INSTRUCTIONS,
8278
8282
  operatingRules: OPERATING_RULES
8279
8283
  }
8280
8284
  };
@@ -8736,75 +8740,87 @@ function renderUnderstand(plan) {
8736
8740
  const scanNote = plan.scanAvailable ? "" : " (incomplete \u2014 run `kaddo scan` first for a richer baseline)";
8737
8741
  parts.push(`Use \`${plan.contextPackPath}\` as the primary input${scanNote}.
8738
8742
  `);
8739
- const agentPaths = [];
8740
- if (plan.recommendedPaths && plan.recommendedPaths.length > 0) {
8741
- agentPaths.push(...plan.recommendedPaths);
8742
- } else if (steps.length > 0) {
8743
- agentPaths.push(...steps.map((s) => agentInstallPath(s.agent)));
8744
- }
8745
- if (plan.recommendedSkillPaths && plan.recommendedSkillPaths.length > 0) {
8746
- agentPaths.push(...plan.recommendedSkillPaths);
8747
- }
8748
- agentPaths.push(plan.contextPackPath);
8749
- parts.push("## Agent Prompts\n");
8750
- if (agentPaths.length > 1) {
8751
- parts.push("Use:\n");
8752
- parts.push(agentPaths.map((p) => `- \`${p}\``).join("\n") + "\n");
8753
- } else {
8754
- parts.push(`- \`${plan.contextPackPath}\`
8743
+ if (!isBootstrap) {
8744
+ const agentPaths = [];
8745
+ if (plan.recommendedPaths && plan.recommendedPaths.length > 0) {
8746
+ agentPaths.push(...plan.recommendedPaths);
8747
+ } else if (steps.length > 0) {
8748
+ agentPaths.push(...steps.map((s) => agentInstallPath(s.agent)));
8749
+ }
8750
+ if (plan.recommendedSkillPaths && plan.recommendedSkillPaths.length > 0) {
8751
+ agentPaths.push(...plan.recommendedSkillPaths);
8752
+ }
8753
+ agentPaths.push(plan.contextPackPath);
8754
+ parts.push("## Agent Prompts\n");
8755
+ if (agentPaths.length > 1) {
8756
+ parts.push("Use:\n");
8757
+ parts.push(agentPaths.map((p) => `- \`${p}\``).join("\n") + "\n");
8758
+ } else {
8759
+ parts.push(`- \`${plan.contextPackPath}\`
8755
8760
  `);
8756
- }
8757
- if (steps.length > 0) {
8758
- parts.push("## Expected Outputs\n");
8759
- parts.push(steps.map((s) => `- \`${s.output}\``).join("\n") + "\n");
8760
- } else if (rec) {
8761
- parts.push("## Expected Outputs\n");
8762
- const outputs = [];
8763
- if (rec.target) outputs.push(`- \`${rec.target}\``);
8764
- if (rec.id === "refine-work-item" || rec.id === "resolve-blocker")
8765
- outputs.push("- Refined Work Item content.");
8766
- if (rec.id === "create-work-item")
8767
- outputs.push("- A new Work Item under `knowledge/delivery/work-items/`.");
8768
- if (rec.id === "implement")
8769
- outputs.push("- Implementation plan or code changes guided by the Work Item.");
8770
- if (rec.id === "guard")
8771
- outputs.push("- Updated knowledge artifacts reflecting recent code changes.");
8772
- if (rec.id === "install-adapter")
8773
- outputs.push("- An adapter configured and injected (`kaddo adapters list`).");
8774
- if (outputs.length > 0) {
8775
- parts.push("The LLM should produce:\n");
8776
- parts.push(outputs.join("\n") + "\n");
8761
+ }
8762
+ if (steps.length > 0) {
8763
+ parts.push("## Expected Outputs\n");
8764
+ parts.push(steps.map((s) => `- \`${s.output}\``).join("\n") + "\n");
8765
+ } else if (rec) {
8766
+ parts.push("## Expected Outputs\n");
8767
+ const outputs = [];
8768
+ if (rec.target) outputs.push(`- \`${rec.target}\``);
8769
+ if (rec.id === "refine-work-item" || rec.id === "resolve-blocker")
8770
+ outputs.push("- Refined Work Item content.");
8771
+ if (rec.id === "create-work-item")
8772
+ outputs.push("- A new Work Item under `knowledge/delivery/work-items/`.");
8773
+ if (rec.id === "implement")
8774
+ outputs.push("- Implementation plan or code changes guided by the Work Item.");
8775
+ if (rec.id === "guard")
8776
+ outputs.push("- Updated knowledge artifacts reflecting recent code changes.");
8777
+ if (rec.id === "install-adapter")
8778
+ outputs.push("- An adapter configured and injected (`kaddo adapters list`).");
8779
+ if (outputs.length > 0) {
8780
+ parts.push("The LLM should produce:\n");
8781
+ parts.push(outputs.join("\n") + "\n");
8782
+ } else {
8783
+ parts.push("_See the primary recommendation above._\n");
8784
+ }
8785
+ }
8786
+ parts.push("## Copy/Paste Instructions\n");
8787
+ if (steps.length > 0) {
8788
+ const first2 = steps[0];
8789
+ parts.push(
8790
+ [
8791
+ `Start with **${agentName(first2.agent)}**:`,
8792
+ "",
8793
+ "1. Open your preferred LLM chat (Claude, ChatGPT, Cursor, Copilot, Windsurf\u2026).",
8794
+ `2. Paste the context pack: \`${plan.contextPackPath}\``,
8795
+ `3. Paste the agent prompt: \`${agentInstallPath(first2.agent)}\``,
8796
+ `4. Ask the LLM to produce: \`${first2.output}\``,
8797
+ `5. Save the result in: \`${first2.output}\``
8798
+ ].join("\n") + "\n"
8799
+ );
8800
+ } else if (agentPaths.length > 1) {
8801
+ parts.push("Paste the following into your LLM chat:\n");
8802
+ parts.push(agentPaths.map((p, i) => `${i + 1}. \`${p}\``).join("\n") + "\n");
8803
+ if (rec?.agent) {
8804
+ parts.push(`Ask the LLM to follow the ${agentName(rec.agent)} instructions.
8805
+ `);
8806
+ }
8777
8807
  } else {
8778
- parts.push("_See the primary recommendation above._\n");
8808
+ parts.push(`Paste \`${plan.contextPackPath}\` into your LLM chat.
8809
+ `);
8779
8810
  }
8780
8811
  }
8781
- parts.push("## Copy/Paste Instructions\n");
8782
- if (steps.length > 0) {
8783
- const first2 = steps[0];
8812
+ parts.push("## Next Steps\n");
8813
+ if (isBootstrap) {
8784
8814
  parts.push(
8785
8815
  [
8786
- `Start with **${agentName(first2.agent)}**:`,
8787
- "",
8788
- "1. Open your preferred LLM chat (Claude, ChatGPT, Cursor, Copilot, Windsurf\u2026).",
8789
- `2. Paste the context pack: \`${plan.contextPackPath}\``,
8790
- `3. Paste the agent prompt: \`${agentInstallPath(first2.agent)}\``,
8791
- `4. Ask the LLM to produce: \`${first2.output}\``,
8792
- `5. Save the result in: \`${first2.output}\``
8816
+ "1. Run `kaddo bootstrap`.",
8817
+ "2. Run `kaddo add agents`.",
8818
+ "3. Run `kaddo add skills`.",
8819
+ "4. Run `kaddo context`.",
8820
+ "5. Run `kaddo understand`."
8793
8821
  ].join("\n") + "\n"
8794
8822
  );
8795
- } else if (agentPaths.length > 1) {
8796
- parts.push("Paste the following into your LLM chat:\n");
8797
- parts.push(agentPaths.map((p, i) => `${i + 1}. \`${p}\``).join("\n") + "\n");
8798
- if (rec?.agent) {
8799
- parts.push(`Ask the LLM to follow the ${agentName(rec.agent)} instructions.
8800
- `);
8801
- }
8802
- } else {
8803
- parts.push(`Paste \`${plan.contextPackPath}\` into your LLM chat.
8804
- `);
8805
- }
8806
- parts.push("## Next Steps\n");
8807
- if (rec) {
8823
+ } else if (rec) {
8808
8824
  const nextLines = [];
8809
8825
  nextLines.push(`1. ${rec.label}`);
8810
8826
  let n = 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/mcp",
3
- "version": "3.50.0",
3
+ "version": "3.51.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": {