@kaddo/cli 3.2.0 → 3.3.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
@@ -434,6 +434,7 @@ create --from roadmap → owners → guard → explain`.
434
434
  | v3.0 | Knowledge-centric realignment: `architecture/` → `knowledge/` with layers Business → Product → Tech → Delivery; context/explain by layer (breaking) |
435
435
  | v3.1 | Minimum Sufficient Knowledge: bootstrap one consolidated file per layer; progressive `add agents` by group (state default, `--all`, `--group`) |
436
436
  | v3.2 | New-project flow hardening: agents in per-layer folders; `new` recommends capability+architecture agents; explain Work Item parser fix; intent vs reality (codebase vs current-state) |
437
+ | v3.3 | Work Item delivery lifecycle: `understand` shows branch → scan → ownership → guard → knowledge → commit for active Work Items (suggestions only; Kaddo never runs git) |
437
438
 
438
439
  **Optional modules (installed with `kaddo add`):**
439
440
 
package/dist/index.js CHANGED
@@ -5185,6 +5185,66 @@ function renderUnderstandTerminal(plan) {
5185
5185
  return lines.join("\n");
5186
5186
  }
5187
5187
 
5188
+ // src/core/delivery.ts
5189
+ function slugify2(s) {
5190
+ return s.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
5191
+ }
5192
+ function isWorkItem(a) {
5193
+ return a.filePath.replace(/\\/g, "/").includes("/delivery/work-items/") && Boolean(a.type);
5194
+ }
5195
+ function activeWorkItems(dir) {
5196
+ const archDir = join(dir, "knowledge");
5197
+ if (!exists(archDir)) return [];
5198
+ return readArtifacts(archDir).filter((a) => isWorkItem(a) && a.status === "in-progress").map((a) => {
5199
+ const id = a.id || a.title || "WI";
5200
+ return { id, title: a.title || id, type: a.type, slug: slugify2(a.title || id) };
5201
+ });
5202
+ }
5203
+ function branchPrefix(type) {
5204
+ switch (type) {
5205
+ case "bugfix":
5206
+ return "bugfix";
5207
+ case "hotfix":
5208
+ return "hotfix";
5209
+ case "spike":
5210
+ return "spike";
5211
+ default:
5212
+ return "feature";
5213
+ }
5214
+ }
5215
+ function commitPrefix(type) {
5216
+ switch (type) {
5217
+ case "bugfix":
5218
+ case "hotfix":
5219
+ return "fix";
5220
+ case "spike":
5221
+ return "chore";
5222
+ default:
5223
+ return "feat";
5224
+ }
5225
+ }
5226
+ function suggestedBranch(wi) {
5227
+ return `${branchPrefix(wi.type)}/${wi.id}-${wi.slug}`;
5228
+ }
5229
+ function suggestedCommit(wi) {
5230
+ return `${commitPrefix(wi.type)}: ${wi.title.toLowerCase()}`;
5231
+ }
5232
+ function renderDeliveryLifecycle(wi) {
5233
+ return [
5234
+ `Active work item: ${wi.id} \u2014 ${wi.title}`,
5235
+ "",
5236
+ "Delivery lifecycle (Kaddo never runs git for you):",
5237
+ ` 1. Create a branch e.g. ${suggestedBranch(wi)}`,
5238
+ " 2. Implement the work item",
5239
+ " 3. Run `kaddo scan` (after new modules/migrations/contracts)",
5240
+ " 4. Run `kaddo owners suggest` \u2192 confirm code: globs",
5241
+ " 5. Run `kaddo guard` before committing (detect knowledge drift)",
5242
+ " 6. Update knowledge ADR / capabilities.md / current-state.md as needed",
5243
+ " 7. Review (human)",
5244
+ ` 8. Commit e.g. ${suggestedCommit(wi)}`
5245
+ ];
5246
+ }
5247
+
5188
5248
  // src/commands/understand.ts
5189
5249
  function runUnderstand() {
5190
5250
  const dir = cwd();
@@ -5247,6 +5307,15 @@ function runUnderstand() {
5247
5307
  if (groupAgents.length > 0) {
5248
5308
  console.log(`Agents for this phase: ${groupAgents.join(", ")}`);
5249
5309
  }
5310
+ const active = activeWorkItems(dir);
5311
+ if (active.length > 0) {
5312
+ console.log("");
5313
+ for (const line of renderDeliveryLifecycle(active[0])) console.log(line);
5314
+ if (active.length > 1) {
5315
+ console.log("");
5316
+ console.log(`Other active work items: ${active.slice(1).map((w) => w.id).join(", ")}`);
5317
+ }
5318
+ }
5250
5319
  writeFile(join(dir, ".kaddo", "understand.md"), renderUnderstand(plan));
5251
5320
  log2.success("Wrote .kaddo/understand.md");
5252
5321
  outro2("Handoff ready. CLI prepares context \u2014 your LLM creates the understanding.");
@@ -7638,7 +7707,7 @@ var MODULE_TYPES = [
7638
7707
  "data",
7639
7708
  "unknown"
7640
7709
  ];
7641
- function slugify2(name) {
7710
+ function slugify3(name) {
7642
7711
  return name.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
7643
7712
  }
7644
7713
  function readModulesDescriptor(dir) {
@@ -7658,7 +7727,7 @@ function moduleDir(id) {
7658
7727
  return `knowledge/tech/modules/${id}`;
7659
7728
  }
7660
7729
  function buildModule(input) {
7661
- const id = slugify2(input.name);
7730
+ const id = slugify3(input.name);
7662
7731
  const base = moduleDir(id);
7663
7732
  return {
7664
7733
  id,
@@ -7925,7 +7994,7 @@ async function runBootstrap(dir = cwd()) {
7925
7994
 
7926
7995
  // src/index.ts
7927
7996
  var program = new Command();
7928
- program.name("kaddo").description("Knowledge Driven Development toolkit").version("3.2.0");
7997
+ program.name("kaddo").description("Knowledge Driven Development toolkit").version("3.3.0");
7929
7998
  program.command("init").description("Initialize Kaddo in the current project").action(async () => {
7930
7999
  await runInit();
7931
8000
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/cli",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Knowledge Driven Development toolkit",
5
5
  "license": "MIT",
6
6
  "repository": {