@kaddo/cli 3.28.1 → 3.29.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/README.md CHANGED
@@ -523,6 +523,8 @@ create --from roadmap → owners → guard → explain`.
523
523
  | v3.27.3 | Codex adapter reference stabilization: package-manager-aware command fallbacks (lockfile detection) + Adapter Contract & Custom Adapters docs (reference for future adapters) |
524
524
  | v3.28 | Claude Code adapter: `kaddo adapters install claude` (alias `kaddo export claude`) generates a `CLAUDE.md` projection reusing the shared adapter common core (`--dry-run`/`--force`) |
525
525
  | v3.28.1 | Claude adapter safe merge: `--inject` works for `CLAUDE.md` too; adapter markers are now target-neutral (`KADDO ADAPTER`) and legacy Codex markers auto-migrate on update |
526
+ | v3.28.2 | Adapter inject guard: `--inject` on a fully Kaddo-generated AGENTS.md/CLAUDE.md does nothing (suggests `--force`), preventing duplicated Kaddo guidance |
527
+ | v3.29 | OpenCode adapter: `kaddo adapters install opencode` (alias `kaddo export opencode`) generates an `AGENTS.md` projection reusing the shared adapter common core (`--dry-run`/`--force`/`--inject` + inject guard) |
526
528
 
527
529
  **Optional modules (installed with `kaddo add`):**
528
530
 
package/dist/index.js CHANGED
@@ -12404,7 +12404,11 @@ var ROLE_HINTS = {
12404
12404
  "graph-agent": "use to turn graph hints into front matter.",
12405
12405
  "capsule-agent": "use to refine a Knowledge Capsule for sharing."
12406
12406
  };
12407
- var TARGET_FILE = { codex: "AGENTS.md", claude: "CLAUDE.md" };
12407
+ var TARGET_FILE = {
12408
+ codex: "AGENTS.md",
12409
+ claude: "CLAUDE.md",
12410
+ opencode: "AGENTS.md"
12411
+ };
12408
12412
  function renderAdapterMarkdown(ctx, target) {
12409
12413
  const file = TARGET_FILE[target];
12410
12414
  const L = [];
@@ -12608,7 +12612,8 @@ ${sep}${block}
12608
12612
  // src/commands/adapters.ts
12609
12613
  var TARGETS2 = {
12610
12614
  codex: { target: "codex", file: "AGENTS.md", label: "Codex", supportsInject: true },
12611
- claude: { target: "claude", file: "CLAUDE.md", label: "Claude Code", supportsInject: true }
12615
+ claude: { target: "claude", file: "CLAUDE.md", label: "Claude Code", supportsInject: true },
12616
+ opencode: { target: "opencode", file: "AGENTS.md", label: "OpenCode", supportsInject: true }
12612
12617
  };
12613
12618
  function runAdaptersInstall(adapter, opts = {}) {
12614
12619
  const dir = cwd();
@@ -12634,6 +12639,15 @@ function runAdaptersInstall(adapter, opts = {}) {
12634
12639
  process.exit(1);
12635
12640
  return;
12636
12641
  }
12642
+ if (state === "generated_by_kaddo") {
12643
+ intro2(`${cmd} --inject`);
12644
+ log2.warn(`${rel} is already fully generated by Kaddo.`);
12645
+ log2.info("Nothing injected to avoid duplicated Kaddo guidance.");
12646
+ log2.info(`Use \`${cmd} --force\` to regenerate the full file.`);
12647
+ log2.info(`\`--inject\` is for team-owned files: keep your own ${rel} and run \`${cmd} --inject\` to add the Kaddo block.`);
12648
+ outro2("Nothing changed.");
12649
+ return;
12650
+ }
12637
12651
  if (existing === null) {
12638
12652
  const content2 = renderAdapterMarkdown(ctx, spec.target);
12639
12653
  if (opts.dryRun) {
@@ -12741,10 +12755,10 @@ var questionsAction = (opts) => runQuestions(opts);
12741
12755
  program.command("questions").description("Open-questions readiness gate: blocking/important/deferred decisions before the roadmap").option("--json", "Output JSON instead of a summary").option("--output <path>", "Write the report to a file (e.g. .kaddo/reports/questions-report.md)").action(questionsAction);
12742
12756
  program.command("readiness").description("Alias for `kaddo questions`").option("--json", "Output JSON instead of a summary").option("--output <path>", "Write the report to a file").action(questionsAction);
12743
12757
  var adaptersCmd = program.command("adapters").description("Generate adapters that project Kaddo knowledge for external coding agents");
12744
- adaptersCmd.command("install <adapter>").description("Generate an adapter file (codex \u2192 AGENTS.md, claude \u2192 CLAUDE.md) from Kaddo knowledge").option("--force", "Overwrite an existing output file").option("--inject", "Add or update only the Kaddo block in an existing file, preserving the rest").option("--dry-run", "Print the content without writing files").action((adapter, opts) => {
12758
+ adaptersCmd.command("install <adapter>").description("Generate an adapter file (codex/opencode \u2192 AGENTS.md, claude \u2192 CLAUDE.md) from Kaddo knowledge").option("--force", "Overwrite an existing output file").option("--inject", "Add or update only the Kaddo block in an existing file, preserving the rest").option("--dry-run", "Print the content without writing files").action((adapter, opts) => {
12745
12759
  runAdaptersInstall(adapter, opts);
12746
12760
  });
12747
- program.command("export <adapter>").description("Alias for `kaddo adapters install <adapter>` (codex \u2192 AGENTS.md, claude \u2192 CLAUDE.md)").option("--force", "Overwrite an existing output file").option("--inject", "Add or update only the Kaddo block in an existing file, preserving the rest").option("--dry-run", "Print the content without writing files").action((adapter, opts) => {
12761
+ program.command("export <adapter>").description("Alias for `kaddo adapters install <adapter>` (codex/opencode \u2192 AGENTS.md, claude \u2192 CLAUDE.md)").option("--force", "Overwrite an existing output file").option("--inject", "Add or update only the Kaddo block in an existing file, preserving the rest").option("--dry-run", "Print the content without writing files").action((adapter, opts) => {
12748
12762
  runAdaptersInstall(adapter, opts);
12749
12763
  });
12750
12764
  program.command("guard").description("Check if modified code has related artifacts that were not updated").option("--staged", "Check only staged files").option("--no-interactive", "Disable interactive ignore prompts").option("--ci", "CI mode: output JSON, no prompts, non-blocking").option("--json", "Output JSON (alias for --ci)").option("--workspace", "Also check local mapped module repos from .kaddo/modules.yml (opt-in)").option("--include-archived", "Include archived Work Items in ownership matching (excluded by default)").option("--record", "Record this run to .kaddo/history/ for drift trend reporting").action(async (opts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/cli",
3
- "version": "3.28.1",
3
+ "version": "3.29.0",
4
4
  "description": "Knowledge Driven Development toolkit",
5
5
  "license": "MIT",
6
6
  "repository": {