@oscaner-skills/cdd-engine 4.3.0 → 4.5.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/face/cli.js CHANGED
@@ -60,7 +60,8 @@ import { Workspace, WorkspaceRoot } from "../infra/workspace.js";
60
60
  import { BriefRenderer } from "../render/brief.js";
61
61
  import { IssueBodyRenderer } from "../render/issue-body.js";
62
62
  import { TemplateAssembler } from "../render/templates.js";
63
- import { TargetFaceTable, targetFaces } from "../session/faces.js";
63
+ import { DispatchAuthority, } from "../session/dispatch-authority.js";
64
+ import { TargetFaceTable, targetFaces, } from "../session/faces.js";
64
65
  import { TaskGraph } from "../session/graph.js";
65
66
  import { HoldingError, InFlight } from "../session/inflight.js";
66
67
  import { Ledger } from "../session/ledger.js";
@@ -104,10 +105,14 @@ export class Cli {
104
105
  #translator;
105
106
  /** The pre-flight board face (the blocked-dispatch wave hint). */
106
107
  #graphView;
107
- /** The lifecycle pre-flight seam (P4.1 T1) — the single dispatch gate the work
108
+ /** The lifecycle pre-flight seam (P4.1 T1) — the STRUCTURE gates the work
108
109
  * commands consult before ANY child dispatch (tree-clean → in-flight → graph →
109
- * plan-ledger → wave → doc-contract; the CLI orchestrates, never a re-type). */
110
+ * plan-ledger → doc-contract; the CLI orchestrates, never a re-type). */
110
111
  #preflight;
112
+ /** The dispatch authority (P27 §2) — the ONE verdict over structure → upstream →
113
+ * line, and the ONE refusal line. The dispatch gate reads it before its first
114
+ * write; the capsule and the board read the same hop the refusal names. */
115
+ #authority;
111
116
  /** The contract coordinator — the doc-contract judgment face the pre-flight's
112
117
  * doc gate reads (the single interpreter entry; spec §12 · D34 retired the
113
118
  * filename→type derivation — the doc type is now the declared header fact read
@@ -162,7 +167,8 @@ export class Cli {
162
167
  contract: this.#contract,
163
168
  words: this.#words,
164
169
  });
165
- this.#gate = new CliGate({ brief: this.#brief });
170
+ this.#authority = opts.authority ?? new DispatchAuthority();
171
+ this.#gate = new CliGate({ brief: this.#brief, authority: this.#authority });
166
172
  this.#artifacts = new CliArtifacts({
167
173
  io: this.#io,
168
174
  projector: this.#projector,
@@ -288,13 +294,22 @@ export class Cli {
288
294
  if (parsed.harness === undefined)
289
295
  this.#usage(command, "cdd init: missing --harness");
290
296
  const update = parsed.update ?? false;
297
+ // The recommended tier is its own parsed boolean — an absent flag means the
298
+ // core-only face, never a derived default.
299
+ const recommended = parsed.includeRecommends ?? false;
300
+ // The flatten request — the ONE shape `preview` and `run` both read.
301
+ const request = {
302
+ host: parsed.harness,
303
+ shape: update ? "update" : "install",
304
+ recommended,
305
+ };
291
306
  if (dryRun) {
292
- for (const line of this.#init.preview(parsed.harness, update))
307
+ for (const line of this.#init.preview(request))
293
308
  this.#initHeader(line);
294
309
  this.#exitCode = 0;
295
310
  return;
296
311
  }
297
- this.#exitCode = await this.#init.run(parsed.harness, update);
312
+ this.#exitCode = await this.#init.run(request);
298
313
  });
299
314
  }
300
315
  /** `cdd board --plan <path> / --spec <path>` — the entry document's progress board
@@ -357,10 +372,11 @@ export class Cli {
357
372
  // The in-flight fact is TREE-level: the board inspects it (read-only — the gate
358
373
  // and the board share `InFlight.inspect()`, never a second liveness judgment).
359
374
  const inflight = new InFlight(new WorkspaceRoot(repoRoot, this.#config.handoffNamespace().workspaceRoot), entry.slug ?? "");
360
- // The board's `next:` line renders ONE injected `NextHop` (P22 §5.2): the
361
- // pipeline OBSERVATION comes from the board face, the four face-order rules and
362
- // the ONE derivation from this assembly point (`BoardNext`) — the board itself
363
- // holds no ledger for the next line and judges nothing.
375
+ // The board's `next:` line renders ONE injected `NextHop` (P22 §5.2 · P24 §11):
376
+ // the pipeline FACTS come from the board face, and the ONE hop assembly (the four
377
+ // face-order rules + the six hop cells) lives in the session plane's
378
+ // `PipelineFrontier` — the same assembly the capsule renders, so the board and the
379
+ // capsule state one hop. Neither face judges anything here.
364
380
  const next = BoardNext.of(index, entry, root);
365
381
  const board = BoardView.render(index, entry, repoRoot, this.#words, host, ARGV_CHANNEL, await inflight.inspect(), next);
366
382
  for (const line of board.lines)
@@ -404,6 +420,7 @@ export class Cli {
404
420
  // boolean, never a truthy string.
405
421
  harness: HOST_IDS.find((id) => id === harnessToken),
406
422
  update: globals.update === true,
423
+ includeRecommends: globals.includeRecommends === true,
407
424
  };
408
425
  }
409
426
  /** The invocation's `--dry-run` scope — the constructor flag OR the program-scope
@@ -459,13 +476,14 @@ export class Cli {
459
476
  const scene = await this.#sceneOf(verb, type, node, root, parsed);
460
477
  if (scene === null)
461
478
  return 1;
462
- // THE pre-flight seam (P4.1 T1 · design §1): the single dispatch gate —
463
- // tree-clean → in-flight → graph → plan-ledger → wave → doc-contract — ONE call,
464
- // the whole sequence lives in the seam (session/preflight.ts), the CLI orchestrates
465
- // the call + the verdict render (zero re-implemented gate here). A refused verdict
466
- // returns before any brief/lifecycle: no child dispatch ever runs. The
467
- // dirty-tree / doc-contract refusals ride the CDD_BLOCKED channel; the
468
- // graph / wave refusals keep the pre-existing refusal face. The doc-face read
479
+ // THE pre-flight seam (P4.1 T1 · design §1): the STRUCTURE gates —
480
+ // tree-clean → in-flight → graph → plan-ledger → doc-contract — ONE call, the
481
+ // whole sequence lives in the seam (session/preflight.ts), the CLI orchestrates
482
+ // the call + the verdict render (zero re-implemented gate here). The dispatch's
483
+ // own phase is the authority's verdict below (P27 §2), never a second seam. A
484
+ // refused verdict returns before any brief/lifecycle: no child dispatch ever
485
+ // runs. The dirty-tree / doc-contract refusals ride the CDD_BLOCKED channel; the
486
+ // graph / plan-ledger refusals keep the pre-existing refusal face. The doc-face read
469
487
  // path is the repoRoot-relative branded `RepoPath` (T4 §2.2 — a bare `string`
470
488
  // never reaches the read faces `BoardView.readDocType`/`PreFlightDoc.path`; the
471
489
  // CLI feeds the funnel-shaped relative value, each read face erasing to the
@@ -480,11 +498,9 @@ export class Cli {
480
498
  // only inspects it; the lifecycle's real dispatch path acquires it after the gate.
481
499
  const inflight = new InFlight(scene.workspace.root, scene.workspace.slug);
482
500
  const preflight = await this.#preflight.vet({
483
- verb: verb,
484
501
  type,
485
502
  repoRoot: scene.workspace.root.repoRoot,
486
503
  planText: scene.planText,
487
- tasks: type === "wave" ? new Set(this.#gate.tasksOf(parsed)) : null,
488
504
  ledger: scene.ledger,
489
505
  doc: TargetFaceTable.isDocShape(type)
490
506
  ? {
@@ -502,19 +518,76 @@ export class Cli {
502
518
  // preview still judges the same gate, sees the same holder facts, and exits 1.
503
519
  stealStale: !parsed.dryRun && parsed.args.stealStale === "true",
504
520
  });
505
- if (!preflight.ok) {
506
- if (parsed.dryRun && preflight.gate === "in-flight" && preflight.holding !== undefined) {
507
- // The preview's read-only held face: the SAME gate verdict, rendered as the
508
- // lock row + the takeover hint, exit 1. Zero write (the preview never
509
- // acquires / steals / releases).
510
- for (const line of new Preview({ scene, words: this.#words }).heldBlock(verb, preflight.holding))
511
- this.#io.stdout(`${line}\n`);
512
- // The checked face rides the SAME stdout stream here: every dry-run shape
513
- // (pass / dirty / held / blocked) reports which gates ran.
514
- this.#renderChecked(preflight, (text) => this.#io.stdout(text));
521
+ // The per-invocation batch cursor: the in-memory done set mirrors the on-disk
522
+ // ledger's closed waves (the C5 closure single face) — NOT a "every non-group
523
+ // task pre-done" shortcut. The old shortcut made the frontier yield exactly the
524
+ // requested group, but it also emptied readyBatch() at every closure: a mid-run
525
+ // wave's fix rendered `next: done` instead of the next wave (the {16,22,24} →
526
+ // {25,26,27} bug — the closure routing judged a per-invocation cursor, not the
527
+ // plan's real remaining frontier). The ledger mirror keeps the progress face
528
+ // cross-invocation: the dispatched group's own closure marks in #markTerminal
529
+ // as the loop advances, and the next wave surfaces from the live closed set. The
530
+ // request's own validity (a task id absent from the plan) is a USAGE rejection,
531
+ // judged before any gate, write or child: nothing of the dispatch exists yet.
532
+ let group = null;
533
+ if (type === "wave") {
534
+ group = new Set(this.#gate.tasksOf(parsed));
535
+ const planIds = scene.planText !== null
536
+ ? new PlanDocType("plan")
537
+ .parse(scene.planText.split("\n"))
538
+ .taskBlocks.map((block) => block.id)
539
+ : [];
540
+ for (const id of group) {
541
+ if (!planIds.includes(id)) {
542
+ this.#usage(node, `cdd ${verb}: task ${id} not found in the plan`);
543
+ }
544
+ }
545
+ for (const id of scene.ledger.closedWaves())
546
+ scene.state.markDone(id);
547
+ }
548
+ const expected = verb === "implement" ? "implement" : verb === "fix" ? "fix" : scene.face.product.reviewLead;
549
+ // THE dispatch verdict (P27 §2.2) — ONE authority over the three legs, in
550
+ // priority order: the structure leg (the pre-flight verdict just judged), the
551
+ // upstream station leg, then this line's own phase. A refusal is ONE verdict —
552
+ // the stderr face, the capsule's `next:` and the board's `next:` all read the
553
+ // same hop, so a command can never name a round another face refuses. The
554
+ // dispatch gate consults the verdict BEFORE its first write: a refused dispatch
555
+ // creates no workspace, no brief, no round.
556
+ const identity = this.#gate.lineIdentity(scene);
557
+ const verdict = this.#authority.verdict({
558
+ verb: verb,
559
+ type,
560
+ structure: preflight,
561
+ line: {
562
+ ledger: scene.ledger,
563
+ words: this.#words,
564
+ // The wave face's frontier source is the run state's own parsed graph (one
565
+ // plan read per invocation); the doc/branch faces carry none.
566
+ graph: scene.state instanceof TaskGraph ? scene.state : null,
567
+ tasks: group,
568
+ lineKey: identity.key,
569
+ doc: identity.doc,
570
+ pipeline: scene.pipeline,
571
+ docClassOf: (candidate) => BoardView.docClassOf(scene.workspace.root.basis, candidate),
572
+ },
573
+ });
574
+ if (!verdict.allowed) {
575
+ if (verdict.leg === "structure") {
576
+ if (parsed.dryRun && preflight.gate === "in-flight" && preflight.holding !== undefined) {
577
+ // The preview's read-only held face: the SAME gate verdict, rendered as the
578
+ // lock row + the takeover hint, exit 1. Zero write (the preview never
579
+ // acquires / steals / releases).
580
+ for (const line of new Preview({ scene, words: this.#words }).heldBlock(verb, preflight.holding))
581
+ this.#io.stdout(`${line}\n`);
582
+ // The checked face rides the SAME stdout stream here: every dry-run shape
583
+ // (pass / dirty / held / blocked) reports which gates ran.
584
+ this.#renderChecked(preflight, (text) => this.#io.stdout(text));
585
+ return 1;
586
+ }
587
+ this.#renderPreflightBlocked(verb, verdict, preflight);
515
588
  return 1;
516
589
  }
517
- this.#renderPreflightBlocked(verb, preflight, scene);
590
+ this.#renderLineRefusal(verb, expected, verdict, scene, preflight);
518
591
  return 1;
519
592
  }
520
593
  // The approved path's checked face (P21 §3.4): the SAME rows the refusal path
@@ -541,32 +614,6 @@ export class Cli {
541
614
  // preview names the same path through RoundNaming instead of rendering it.
542
615
  if (!parsed.dryRun && type === "wave" && scene.planText !== null)
543
616
  scene.briefPath = this.#gate.renderBrief(scene, parsed);
544
- const expected = verb === "implement" ? "implement" : verb === "fix" ? "fix" : scene.face.product.reviewLead;
545
- // The per-invocation batch cursor: the in-memory done set mirrors the on-disk
546
- // ledger's closed waves (the C5 closure single face) — NOT a "every non-group
547
- // task pre-done" shortcut. The old shortcut made the frontier yield exactly the
548
- // requested group, but it also emptied readyBatch() at every closure: a mid-run
549
- // wave's fix rendered `next: done` instead of the next wave (the {16,22,24} →
550
- // {25,26,27} bug — the closure routing judged a per-invocation cursor, not the
551
- // plan's real remaining frontier). The ledger mirror keeps the progress face
552
- // cross-invocation: the dispatched group's own closure marks in #markTerminal
553
- // as the loop advances, and the next wave surfaces from the live closed set.
554
- let group = null;
555
- if (type === "wave") {
556
- group = new Set(this.#gate.tasksOf(parsed));
557
- const planIds = scene.planText !== null
558
- ? new PlanDocType("plan")
559
- .parse(scene.planText.split("\n"))
560
- .taskBlocks.map((block) => block.id)
561
- : [];
562
- for (const id of group) {
563
- if (!planIds.includes(id)) {
564
- this.#usage(node, `cdd ${verb}: task ${id} not found in the plan`);
565
- }
566
- }
567
- for (const id of scene.ledger.closedWaves())
568
- scene.state.markDone(id);
569
- }
570
617
  const statuses = [];
571
618
  const dispatch = this.#dispatchOf(scene, parsed);
572
619
  const run = new Lifecycle({
@@ -586,32 +633,15 @@ export class Cli {
586
633
  },
587
634
  target: scene.target ?? undefined,
588
635
  capsule: new Capsule(this.#words, ARGV_CHANNEL, HostDetect.detect(process.env), scene.workspace.root.basis),
589
- planPath: scene.planPath,
636
+ planPath: scene.pipeline.planPath,
637
+ specType: scene.pipeline.specType,
638
+ specPath: scene.pipeline.specPath,
639
+ planGraph: scene.pipeline.planGraph,
590
640
  // The hop derivation's pipeline-station discrimination (§5.2) — the ONE
591
641
  // declaration-reading judgment, injected so the session plane never imports a
592
642
  // face class.
593
643
  docClassOf: (candidate) => BoardView.docClassOf(scene.workspace.root.basis, candidate),
594
644
  });
595
- // The requested-phase gate — the line faces (branch/spec/plan) keep the
596
- // line-phase readiness check; the task face needs no second gate (the WaveGate's
597
- // wrong-phase verdict above IS the phase authority for the requested wave).
598
- if (group === null) {
599
- const { phase: open, verdict, reviewed } = this.#gate.lineGate(scene);
600
- if (open !== expected) {
601
- const pendingBlock = verdict === "pending-fix" ? this.#gate.pendingFixBlock(scene, reviewed) : null;
602
- const docBlock = open === null ? this.#gate.docLineBlock(scene, reviewed) : null;
603
- // The generic refusal renders the SAME `NextHop` the capsule / board /
604
- // frontier read (P22 §5.2 · the ONE message shape): `<reason> · the next
605
- // round is <hop>` · `<reason> · next: <station>` · the bare reason. The two
606
- // identity-aware block messages above own their facts (`reviewed` has no
607
- // Home in `NextHop`) and stay verbatim.
608
- const reject = pendingBlock ??
609
- docBlock ??
610
- this.#gate.lineHopMessage(scene, this.#gate.lineHop(scene), this.#words);
611
- this.#io.stderr(`cdd ${verb}: cannot dispatch a ${expected} round — ${reject}\n`);
612
- return 1;
613
- }
614
- }
615
645
  // Advance the requested phase across the wave (one dispatch per frame — the
616
646
  // lifecycle's "one dispatch, one advance" step), keeping only the LAST step's
617
647
  // capsule for the invocation's single stdout face (the per-step intermediate
@@ -672,7 +702,11 @@ export class Cli {
672
702
  // The dispatch-entry gate's refusal (the lifecycle's hard child zero-dispatch wiring —
673
703
  // structurally unreachable here: the seam already returned above on refusal).
674
704
  if (step.preflight !== undefined) {
675
- this.#renderPreflightBlocked(verb, step.preflight, scene);
705
+ // The lifecycle re-states the seam's refusal (structurally unreachable — the
706
+ // verdict above already returned on it): the structure leg's own line.
707
+ const rejection = this.#authority.structureRefusal(step.preflight);
708
+ if (rejection !== null)
709
+ this.#renderPreflightBlocked(verb, rejection, step.preflight);
676
710
  return 1;
677
711
  }
678
712
  dispatched += 1;
@@ -755,38 +789,56 @@ export class Cli {
755
789
  const artifact = read.kind === "ok" ? read.value : null;
756
790
  return typeof artifact?.base === "string" ? artifact.base : "";
757
791
  }
758
- /** Render a refused pre-flight verdict — the work command's BLOCK face (P4.1 T1).
759
- * The dirty-tree / doc-contract refusals ride the CDD_BLOCKED channel (the
760
- * commit/discard guidance + the named structural findings); the graph / wave
761
- * refusals keep the pre-existing refusal face (the wave-board hint renders for the
762
- * wave gate's split row — its done face rides the SAME closedWaves() read the gate
763
- * judged, one closed set, one source). */
764
- #renderPreflightBlocked(verb, verdict, scene) {
765
- if (verdict.gate === "tree-clean" ||
766
- verdict.gate === "in-flight" ||
767
- verdict.gate === "doc-contract") {
768
- this.#io.stderr(`${this.#words.station("blocked")} ${verdict.message ?? ""}\n`);
769
- for (const detail of verdict.details ?? [])
792
+ /** Render a refused STRUCTURE-leg verdict — the work command's BLOCK face (P4.1
793
+ * T1). The structure leg's ONE line (§2.6) is `<reason> · <the seam's own
794
+ * wording>`: the dirty-tree / doc-contract rows ride the CDD_BLOCKED channel (the
795
+ * commit/discard guidance + the named structural findings), the graph /
796
+ * plan-ledger rows keep their refusal face. The leg names no hop — a refused
797
+ * structure carries no `next:` round. */
798
+ #renderPreflightBlocked(verb, rejection, preflight) {
799
+ const message = this.#authority.message(rejection, { detail: preflight.message });
800
+ if (preflight.gate === "tree-clean" ||
801
+ preflight.gate === "in-flight" ||
802
+ preflight.gate === "doc-contract") {
803
+ this.#io.stderr(`${this.#words.station("blocked")} ${message}\n`);
804
+ for (const detail of preflight.details ?? [])
770
805
  this.#io.stderr(` ${detail}\n`);
771
- this.#renderChecked(verdict);
806
+ this.#renderChecked(preflight);
772
807
  return;
773
808
  }
774
- this.#io.stderr(`cdd ${verb}: ${verdict.message ?? "the dispatch gate refused the request"}\n`);
775
- for (const detail of verdict.details ?? [])
809
+ this.#io.stderr(`cdd ${verb}: ${message}\n`);
810
+ for (const detail of preflight.details ?? [])
776
811
  this.#io.stderr(` ${detail}\n`);
777
- if (verdict.gate === "wave" && verdict.reason === "split" && scene.planText !== null) {
778
- const graph = new TaskGraph(new PlanDocType("plan").parse(scene.planText.split("\n")));
779
- const closed = scene.ledger.closedWaves();
780
- // The graph title's plan path renders repoRoot-relative (D47 · the ONE shape;
781
- // `scene.planPath` is argv-origin) — normalized through the scene's OWN basis
782
- // value object (F2: never a per-call re-wrap).
783
- const titlePlan = scene.workspace.root.basis.relativize(scene.planPath ?? "");
784
- for (const line of this.#graphView
785
- .render(graph.report(closed), `graph: ${titlePlan}`)
786
- .split("\n"))
787
- this.#io.stderr(` ${line}\n`);
812
+ this.#renderChecked(preflight);
813
+ }
814
+ /** Render a refused LINE-leg verdict (§2.6) — ONE line, `<reason> · next: <the
815
+ * command the capsule and the board print>`. The wave face's split row keeps its
816
+ * wave-board hint (the graph the refusal is about — its done face rides the SAME
817
+ * closedWaves() read the gate judged, one closed set, one source), and the checked
818
+ * face reports the structure gates that passed. */
819
+ #renderLineRefusal(verb, expected, rejection, scene, preflight) {
820
+ const message = this.#authority.message(rejection, {
821
+ command: (hop) => this.#gate.hopCommand(scene, hop, this.#words),
822
+ });
823
+ this.#io.stderr(`cdd ${verb}: cannot dispatch a ${expected} round — ${message}\n`);
824
+ if (rejection.reason === "split" && scene.planText !== null) {
825
+ this.#renderWaveBoard(scene, scene.planText);
788
826
  }
789
- this.#renderChecked(verdict);
827
+ this.#renderChecked(preflight);
828
+ }
829
+ /** The wave-board hint of a split refusal — the derived graph the refusal is
830
+ * about, rendered on the stderr detail channel. */
831
+ #renderWaveBoard(scene, planText) {
832
+ const graph = new TaskGraph(new PlanDocType("plan").parse(planText.split("\n")));
833
+ const closed = scene.ledger.closedWaves();
834
+ // The graph title's plan path renders repoRoot-relative (D47 · the ONE shape;
835
+ // `scene.planPath` is argv-origin) — normalized through the scene's OWN basis
836
+ // value object (F2: never a per-call re-wrap).
837
+ const titlePlan = scene.workspace.root.basis.relativize(scene.planPath ?? "");
838
+ for (const line of this.#graphView
839
+ .render(graph.report(closed), `graph: ${titlePlan}`)
840
+ .split("\n"))
841
+ this.#io.stderr(` ${line}\n`);
790
842
  }
791
843
  /** Render the acquire race's held BLOCK — the in-flight gate's own message face
792
844
  * (`Words.inFlightBlocked`, one filler for both call sites), exit 1 at the caller. */
@@ -919,6 +971,23 @@ export class Cli {
919
971
  const state = type === "wave"
920
972
  ? new TaskGraph(new PlanDocType("plan").parse(planText.split("\n")))
921
973
  : EMPTY_RUN_STATE;
974
+ // The pipeline frontier's four declared cells (§11) — the composition root's ONE
975
+ // collection point. The identity word + path come from the document index (never
976
+ // the argv `--type` spelling): every non-plan declared document owns the identity
977
+ // slot, so `phase-spec` / `single-spec` / `overall` all reach the same assembly.
978
+ // The plan path is the argv value on the plan / branch lines and the index's
979
+ // same-slug plan on a `--spec` round whose argv names none — a spec round that
980
+ // dropped it would leave the frontier blind to the plan face and the capsule
981
+ // printing this line's own exit. The graph is the ONE guarded plan read (the wave
982
+ // run's already-parsed state stands in; the session plane reads no file).
983
+ const identity = index.identityDoc(slug);
984
+ const hopPlanPath = planPath ?? index.planOf(slug)?.path ?? null;
985
+ const pipeline = {
986
+ specType: identity?.docType ?? null,
987
+ specPath: identity?.path ?? null,
988
+ planPath: hopPlanPath,
989
+ planGraph: state instanceof TaskGraph ? state : BoardView.planGraph(hopPlanPath),
990
+ };
922
991
  return {
923
992
  workspace,
924
993
  ledger,
@@ -929,6 +998,7 @@ export class Cli {
929
998
  target,
930
999
  state,
931
1000
  router: new NextStepRouter(),
1001
+ pipeline,
932
1002
  briefPath: null,
933
1003
  specLink,
934
1004
  overallLink,
@@ -76,6 +76,11 @@ export const ARGV_CHANNEL = {
76
76
  type: "bool",
77
77
  help: "update the installed plugin set instead of installing it",
78
78
  },
79
+ includeRecommends: {
80
+ flag: "--include-recommends",
81
+ type: "bool",
82
+ help: "also install/update the recommended pi capability packages",
83
+ },
79
84
  dryRun: {
80
85
  flag: "--dry-run",
81
86
  type: "bool",
@@ -233,7 +238,7 @@ export const CLI_COMMANDS = [
233
238
  name: "init",
234
239
  description: "install or update the kairos plugin set for a harness",
235
240
  example: "cdd init --harness=claude",
236
- keys: [{ key: "harness", required: true }, { key: "update" }],
241
+ keys: [{ key: "harness", required: true }, { key: "update" }, { key: "includeRecommends" }],
237
242
  },
238
243
  ];
239
244
  /** The schema `<type>` vocabulary — the get leaf's ONE table (spec §5.3): the