@kaddo/cli 3.10.0 → 3.11.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 +56 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -603,6 +603,46 @@ function describeProject(config) {
603
603
  return `${stateLabel4} ${config.project.structure}`;
604
604
  }
605
605
 
606
+ // src/core/command-help.ts
607
+ var COMMAND_HELP = {
608
+ init: { question: "How do I start a Kaddo project?", next: "kaddo bootstrap" },
609
+ bootstrap: {
610
+ question: "What minimum knowledge should exist?",
611
+ next: "kaddo add agents, then kaddo context"
612
+ },
613
+ scan: {
614
+ question: "What technical signals exist in the repository?",
615
+ next: "kaddo explain (inspect) or kaddo context (package for an LLM)"
616
+ },
617
+ context: {
618
+ question: "What should I give to an LLM?",
619
+ next: "Use the recommended agent \u2014 run kaddo understand to pick it"
620
+ },
621
+ understand: {
622
+ question: "What should I do now?",
623
+ next: "Execute the recommended action shown above"
624
+ },
625
+ explain: { question: "What does Kaddo know?", next: "kaddo understand" },
626
+ create: {
627
+ question: "How do roadmap candidates become Work Items?",
628
+ next: "Refine it with the work-item-agent"
629
+ },
630
+ "owners suggest": { question: "Who owns this code?", next: "kaddo guard" },
631
+ guard: {
632
+ question: "Is knowledge drifting from code?",
633
+ next: "Update the affected knowledge, then commit"
634
+ },
635
+ "add agents": { question: "Which agents are available?", next: "kaddo understand" }
636
+ };
637
+ function commandFooterLines(name) {
638
+ const help = COMMAND_HELP[name];
639
+ if (!help) return [];
640
+ return ["", `Question answered: ${help.question}`, `Suggested next: ${help.next}`];
641
+ }
642
+ function printCommandFooter(name) {
643
+ for (const line of commandFooterLines(name)) console.log(line);
644
+ }
645
+
606
646
  // src/commands/scan.ts
607
647
  function printResult(result) {
608
648
  console.log("");
@@ -721,6 +761,7 @@ async function runScan() {
721
761
  log2.warn("No .kaddo/config.yml found. Run `kaddo init` first to record project context.");
722
762
  }
723
763
  printStateAwareNextStep(dir);
764
+ printCommandFooter("scan");
724
765
  outro2("Scan complete.");
725
766
  }
726
767
 
@@ -5554,6 +5595,7 @@ function runExplain(opts) {
5554
5595
  explainForAgent(dir, artifacts, opts);
5555
5596
  } else {
5556
5597
  explainForHuman(dir, artifacts, opts);
5598
+ printCommandFooter("explain");
5557
5599
  }
5558
5600
  }
5559
5601
 
@@ -5944,6 +5986,7 @@ function runContext(opts = {}) {
5944
5986
  log2.warn(`Some context is missing (${pack.missing.length} item(s)) \u2014 see the pack's "Missing Context" section.`);
5945
5987
  }
5946
5988
  log2.info("Paste .kaddo/context-pack.md into your LLM chat alongside a Kaddo agent prompt.");
5989
+ printCommandFooter("context");
5947
5990
  outro2("Context pack ready.");
5948
5991
  }
5949
5992
 
@@ -5976,7 +6019,7 @@ function flowForState(state) {
5976
6019
  }
5977
6020
  function buildUnderstandPlan(dir, config) {
5978
6021
  const state = config.project.state;
5979
- const flow = flowForState(state);
6022
+ const flow = flowForState(state).filter((s) => !exists(join(dir, s.output)));
5980
6023
  const steps = flow.map((s) => {
5981
6024
  const installed = agentIsInstalled(dir, s.agent);
5982
6025
  return { agent: s.agent, output: s.output, installed };
@@ -6077,24 +6120,26 @@ function renderUnderstandTerminal(plan) {
6077
6120
  lines.push(`Team: ${project.teamSize}`);
6078
6121
  lines.push(`Structure: ${project.structure}`);
6079
6122
  lines.push("");
6080
- lines.push("Recommended flow:");
6081
- steps.forEach((s, i) => {
6082
- const flag = s.installed ? "" : " (not installed)";
6083
- lines.push(` ${i + 1}. ${agentName(s.agent)} \u2192 ${s.output}${flag}`);
6084
- });
6085
- lines.push("");
6086
6123
  const first2 = steps[0];
6087
6124
  if (first2) {
6125
+ lines.push("Foundational knowledge still needed:");
6126
+ steps.forEach((s, i) => {
6127
+ const flag = s.installed ? "" : " (not installed)";
6128
+ lines.push(` ${i + 1}. ${agentName(s.agent)} \u2192 ${s.output}${flag}`);
6129
+ });
6130
+ lines.push("");
6088
6131
  lines.push(`First step: use ${agentName(first2.agent)}.`);
6089
6132
  lines.push("");
6090
6133
  lines.push(` Context: ${plan.contextPackPath}`);
6091
6134
  lines.push(` Agent prompt: knowledge/agents/${first2.agent}`);
6092
6135
  lines.push(` Expected output: ${first2.output}`);
6093
6136
  lines.push("");
6137
+ lines.push("Instructions:");
6138
+ lines.push(" Open your preferred LLM chat, paste the context pack, then paste the agent");
6139
+ lines.push(" prompt. Ask the LLM to generate the expected output and save it in the target file.");
6140
+ } else {
6141
+ lines.push("Foundational knowledge looks complete \u2014 see the phase recommendation below.");
6094
6142
  }
6095
- lines.push("Instructions:");
6096
- lines.push(" Open your preferred LLM chat, paste the context pack, then paste the agent");
6097
- lines.push(" prompt. Ask the LLM to generate the expected output and save it in the target file.");
6098
6143
  lines.push("");
6099
6144
  lines.push("Kaddo does not call an LLM. You stay in control of the interpretation.");
6100
6145
  lines.push("");
@@ -6215,6 +6260,7 @@ function runUnderstand() {
6215
6260
  }
6216
6261
  writeFile(join(dir, ".kaddo", "understand.md"), renderUnderstand(plan));
6217
6262
  log2.success("Wrote .kaddo/understand.md");
6263
+ printCommandFooter("understand");
6218
6264
  outro2("Handoff ready. CLI prepares context \u2014 your LLM creates the understanding.");
6219
6265
  }
6220
6266
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/cli",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "description": "Knowledge Driven Development toolkit",
5
5
  "license": "MIT",
6
6
  "repository": {