@kaddo/cli 3.39.0 → 3.39.1

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 (3) hide show
  1. package/README.md +1 -0
  2. package/dist/index.js +101 -39
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -536,6 +536,7 @@ create --from roadmap → owners → guard → explain`.
536
536
  | v3.37.1 | Unified next-step: one shared resolver (`core/next-step.ts`) powers `context`, `understand` and `explain` (Phase + Readiness) so they never diverge; agent JSON exposes `nextStepRecommendation`. Fixes duplicate `capabilities` line in explain |
537
537
  | v3.38 | Open-question source locations: `kaddo questions` shows each question's `Source` (path:line), `Status`, `Severity`, `Note` + a copy/paste resolution example and localized how-to-resolve guide; JSON/report/MCP carry `sourcePath`, `line`, `raw`, `note` |
538
538
  | v3.39 | Existing capability discovery: state-aware `capabilities.md` (pre-ai/legacy = evidence-backed Capability Inventory + Gaps + Roadmap Candidate Signals; legacy adds criticality/change-risk/modernization); capability-agent discovers with evidence, roadmap-agent treats capabilities as primary source |
539
+ | v3.39.1 | Domain-oriented capability inventory: pre-ai/legacy `capabilities.md` groups capabilities under `## Capability Domains` (functional domains, not technical folders); gaps/candidates name their `Domain`; roadmap-agent reads it as a domain map; work-item-agent recommends `related_domain` + `related_capability` |
539
540
 
540
541
  **Optional modules (installed with `kaddo add`):**
541
542
 
package/dist/index.js CHANGED
@@ -2213,11 +2213,11 @@ Adapt to \`project.state\` (from \`.kaddo/config.yml\`):
2213
2213
 
2214
2214
  - **new \u2192 Planned Capability Definition.** Define the capabilities the product *should* have. Use
2215
2215
  \`[planned]\` items; evidence is not required yet.
2216
- - **pre-ai \u2192 Existing Capability Discovery.** Document the capabilities the system *already has*, as a
2217
- structured inventory with **evidence**, status and gaps \u2014 a photograph of what exists today, not a
2218
- wishlist.
2219
- - **legacy \u2192 Legacy Capability Discovery.** Same inventory plus **criticality**, **change risk**,
2220
- **operational dependency** and **modernization notes** per capability.
2216
+ - **pre-ai \u2192 Existing Capability Discovery (Domain-Oriented Capability Inventory).** Document the
2217
+ capabilities the system *already has*, **grouped by functional domain**, with **evidence**, status
2218
+ and gaps \u2014 a photograph of what exists today, not a wishlist.
2219
+ - **legacy \u2192 Legacy Capability Discovery.** Same domain-oriented inventory plus **criticality**,
2220
+ **change risk**, **operational dependency** and **modernization notes** per domain/capability.
2221
2221
 
2222
2222
  ## Capability status values
2223
2223
 
@@ -2256,10 +2256,12 @@ Analyze the context pack and identify:
2256
2256
  7. Suggested ownership.
2257
2257
  8. Candidate code globs if evident.
2258
2258
 
2259
- For **pre-ai** and **legacy**, produce the richer inventory (see Output Format): a
2260
- \`## Capability Inventory\` with status + evidence per capability, a \`## Capability Gaps\` section, and
2261
- \`## Roadmap Candidate Signals\` (signals only \u2014 never a formal roadmap). For **legacy**, add
2262
- \`Criticality\`, \`Change risk\`, \`Operational dependency\` and \`Modernization notes\` per capability.
2259
+ For **pre-ai** and **legacy**, produce the domain-oriented inventory (see Output Format): a
2260
+ \`## Capability Domains\` section where each \`### Domain:\` groups capabilities by functional
2261
+ responsibility (with Purpose + Evidence summary), each \`#### Capability:\` has status + evidence, plus
2262
+ \`## Capability Gaps\` and \`## Roadmap Candidate Signals\` (signals only \u2014 never a formal roadmap). Every
2263
+ gap and candidate names its \`Domain\` and \`Related capability\`. For **legacy**, add \`Criticality\`,
2264
+ \`Change risk\`, \`Operational dependency\` and \`Modernization notes\`.
2263
2265
 
2264
2266
  ## Constraints
2265
2267
 
@@ -2312,36 +2314,50 @@ Generated from Kaddo Context Pack.
2312
2314
  ## Suggested Next Step
2313
2315
  \`\`\`
2314
2316
 
2315
- ### Output Format \u2014 pre-ai / legacy (Existing Capability Discovery)
2317
+ ### Output Format \u2014 pre-ai / legacy (Domain-Oriented Capability Inventory)
2318
+
2319
+ Group capabilities by **functional domain**, not by technical folder. Infer domains from the system
2320
+ (e.g. Loyalty, Billing & Subscriptions, Communications, Operations & Automation) \u2014 do not use a rigid
2321
+ universal taxonomy and do not use folders like \`src/components\` or \`src/app/api\` as domains. A single
2322
+ capability may have evidence across layers (frontend hook + API route + table + webhook).
2316
2323
 
2317
2324
  \`\`\`markdown
2318
2325
  # Existing Capabilities
2319
2326
 
2320
- ## Capability Inventory
2327
+ ## Capability Domains
2328
+
2329
+ ### Domain: <Domain name>
2330
+
2331
+ **Purpose:** <functional responsibility of this domain>
2332
+
2333
+ **Evidence summary:**
2334
+ - \`<path>\` / \`<route>\` / \`<table>\` / \`<function>\`
2335
+ <!-- legacy only: -->
2336
+ **Criticality:** low | medium | high
2337
+ **Change risk:** low | medium | high
2338
+ **Operational dependency:** <...>
2321
2339
 
2322
- ### <Capability name>
2340
+ #### Capability: <Capability name>
2323
2341
 
2324
2342
  - Status: implemented | partial | inferred | risky | deprecated | unknown
2325
2343
  - Capability type: business | product | technical | integration | operational
2326
2344
  - User-facing: yes | no | internal
2327
2345
  - Evidence:
2328
- - \`<path/to/file>\`
2329
- - \`<route>\` / \`<table>\` / \`<function>\`
2330
- - Related flows / data / integrations:
2346
+ - \`<path/to/file>\` / \`<route>\` / \`<table>\` / \`<function>\`
2347
+ - Related flows:
2348
+ - Related data:
2349
+ - Related integrations:
2331
2350
  - Current behavior:
2332
2351
  - Known constraints:
2333
2352
  - Risks or uncertainty:
2334
2353
  - Open questions:
2335
2354
  - [open] ...
2336
- <!-- legacy only: -->
2337
- - Criticality: low | medium | high
2338
- - Change risk: low | medium | high
2339
- - Operational dependency:
2340
- - Modernization notes:
2355
+ <!-- legacy only, per capability: Modernization notes -->
2341
2356
 
2342
2357
  ## Capability Gaps
2343
2358
 
2344
2359
  - [gap] <Gap description>
2360
+ - Domain: <Domain name>
2345
2361
  - Related capability: <name>
2346
2362
  - Impact: low | medium | high
2347
2363
  - Possible roadmap candidate: yes | no
@@ -2349,10 +2365,20 @@ Generated from Kaddo Context Pack.
2349
2365
  ## Roadmap Candidate Signals
2350
2366
 
2351
2367
  - [candidate] <Potential roadmap candidate>
2352
- - Based on: partial capability | gap | risk | open question | business goal
2368
+ - Domain: <Domain name>
2353
2369
  - Related capability: <name>
2370
+ - Based on: partial capability | gap | risk | open question | business goal
2354
2371
  \`\`\`
2355
2372
 
2373
+ ### Domain grouping rules
2374
+
2375
+ - Group by **functional responsibility**, never by technical folder.
2376
+ - A capability may span multiple layers \u2014 list all its evidence.
2377
+ - Keep the VS-074 evidence rule: \`implemented\` needs concrete evidence; indirect \u2192 \`inferred\`; none \u2192
2378
+ \`unknown\`. Never invent domains, paths, routes, tables or functions.
2379
+ - Every \`[gap]\` names its \`Domain\` and \`Related capability\`; every \`[candidate]\` names \`Domain\`,
2380
+ \`Related capability\` and \`Based on\`.
2381
+
2356
2382
  ## Where to Save the Result
2357
2383
 
2358
2384
  Save the output as \`knowledge/product/capabilities.md\`.
@@ -2472,7 +2498,8 @@ Use this agent after capabilities and architecture are understood (or at least a
2472
2498
  Provide \`.kaddo/context-pack.md\` as the primary input, and treat
2473
2499
  \`knowledge/product/capabilities.md\` as the **primary source for roadmap candidates** (VS-074).
2474
2500
 
2475
- Derive roadmap candidates from the capability inventory, prioritizing:
2501
+ Read \`capabilities.md\` as a **map of functional domains** (\`## Capability Domains\`). Derive roadmap
2502
+ candidates from the inventory, prioritizing:
2476
2503
 
2477
2504
  - \`partial\` capabilities (finish what exists)
2478
2505
  - \`## Capability Gaps\` (\`[gap]\` items, especially Impact: high)
@@ -2481,6 +2508,15 @@ Derive roadmap candidates from the capability inventory, prioritizing:
2481
2508
  - resolved/assumed/deferred open questions and business goals
2482
2509
  - technical risks and decision candidates
2483
2510
 
2511
+ Each roadmap candidate should reference its \`Domain\` and \`Related capability\`, e.g.:
2512
+
2513
+ \`\`\`md
2514
+ - [candidate] Harden idempotent payment webhook processing.
2515
+ - Domain: Billing & Subscriptions
2516
+ - Related capability: Payment Webhook Processing
2517
+ - Based on: risk
2518
+ \`\`\`
2519
+
2484
2520
  **Do not** build a roadmap from general ideas when \`capabilities.md\` is still a placeholder or weak:
2485
2521
  if capabilities are not yet discovered, recommend running the \`capability-agent\` first.
2486
2522
 
@@ -2895,9 +2931,10 @@ A refined Work Item intended to be saved under the lifecycle workspace:
2895
2931
 
2896
2932
  **Suggested ownership (code globs):**
2897
2933
 
2898
- **Related capability:** <!-- recommended (VS-074): the capability from
2899
- knowledge/product/capabilities.md this Work Item advances, so work traces back to a real capability.
2900
- Add \`related_capability: <name>\` to the front matter when known. -->
2934
+ **Related domain / capability:** <!-- recommended (VS-074/074.1): the functional domain and the
2935
+ capability from knowledge/product/capabilities.md this Work Item advances, so work traces back to the
2936
+ system's functional map. Add \`related_domain: <domain>\` and \`related_capability: <name>\` to the front
2937
+ matter when known. -->
2901
2938
  \`\`\`
2902
2939
 
2903
2940
  ## Where to Save the Result
@@ -7084,6 +7121,9 @@ function isPlaceholderLine(line) {
7084
7121
  if (/<[^>]+>/.test(t)) return true;
7085
7122
  if (/^[-*]\s+[^:]+:\s*$/.test(t)) return true;
7086
7123
  if (/^[-*]\s+[^:]+:\s*\S.*\s\|\s/.test(t)) return true;
7124
+ if (/^\*\*[^*]+:\*\*\s*$/.test(t)) return true;
7125
+ if (/^\*\*[^*]+:\*\*\s*_.*_$/.test(t)) return true;
7126
+ if (/^\*\*[^*]+:\*\*\s*\S.*\s\|\s/.test(t)) return true;
7087
7127
  return false;
7088
7128
  }
7089
7129
  function isStructuralLine(line, inFrontMatter) {
@@ -7926,7 +7966,7 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
7926
7966
  if (qBusiness !== "useful") return refine("refine-business", "business-agent", B, qBusiness);
7927
7967
  if (qProduct !== "useful" || qCap !== "useful") {
7928
7968
  if (qCap !== "useful") {
7929
- return refine("refine-product", "capability-agent", CAP, qCap, discovery ? "discover and document existing system capabilities in" : "complete");
7969
+ return refine("refine-product", "capability-agent", CAP, qCap, discovery ? "discover and document existing system capabilities grouped by functional domains in" : "complete");
7930
7970
  }
7931
7971
  return refine("refine-product", "capability-agent", P, qProduct);
7932
7972
  }
@@ -12252,18 +12292,29 @@ _Document the product capabilities that should exist._
12252
12292
  `,
12253
12293
  "pre-ai": `# Existing Capabilities
12254
12294
 
12255
- > Discover the capabilities the system already has (evidence-backed). Use the capability-agent to fill this in \u2014 run \`kaddo add agents\`, then feed it the context pack.
12295
+ > Discover the capabilities the system already has, grouped by **functional domain** (not technical folders), evidence-backed. Use the capability-agent to fill this in \u2014 run \`kaddo add agents\`, then feed it the context pack.
12256
12296
 
12257
- ## Capability Inventory
12297
+ ## Capability Domains
12258
12298
 
12259
- ### <Capability name>
12299
+ ### Domain: <Domain name>
12300
+
12301
+ **Purpose:** _What functional responsibility this domain covers._
12302
+
12303
+ **Evidence summary:**
12304
+ - _\`path\`, route, table or function._
12305
+
12306
+ #### Capability: <Capability name>
12260
12307
 
12261
12308
  - Status: implemented | partial | inferred | risky | deprecated | unknown
12262
12309
  - Capability type: business | product | technical | integration | operational
12263
12310
  - User-facing: yes | no | internal
12264
12311
  - Evidence:
12265
12312
  - _\`path/to/file\`, route, table or function \u2014 or \`pending validation\`._
12266
- - Related flows / data / integrations:
12313
+ - Related flows:
12314
+ - _..._
12315
+ - Related data:
12316
+ - _..._
12317
+ - Related integrations:
12267
12318
  - _..._
12268
12319
  - Current behavior:
12269
12320
  - _..._
@@ -12277,6 +12328,7 @@ _Document the product capabilities that should exist._
12277
12328
  ## Capability Gaps
12278
12329
 
12279
12330
  - [gap] _Gap description._
12331
+ - Domain: _<Domain name>_
12280
12332
  - Related capability: _<name>_
12281
12333
  - Impact: low | medium | high
12282
12334
  - Possible roadmap candidate: yes | no
@@ -12284,24 +12336,32 @@ _Document the product capabilities that should exist._
12284
12336
  ## Roadmap Candidate Signals
12285
12337
 
12286
12338
  - [candidate] _Potential roadmap candidate._
12287
- - Based on: partial capability | gap | risk | open question | business goal
12339
+ - Domain: _<Domain name>_
12288
12340
  - Related capability: _<name>_
12341
+ - Based on: partial capability | gap | risk | open question | business goal
12289
12342
  `,
12290
12343
  legacy: `# Legacy Capabilities
12291
12344
 
12292
- > Discover existing capabilities plus their criticality, change risk and modernization signals. Use the capability-agent to fill this in.
12345
+ > Discover existing capabilities grouped by **functional domain** (not technical folders), plus criticality, change risk and modernization signals. Use the capability-agent to fill this in.
12293
12346
 
12294
- ## Capability Inventory
12347
+ ## Capability Domains
12295
12348
 
12296
- ### <Capability name>
12349
+ ### Domain: <Domain name>
12350
+
12351
+ **Purpose:** _What functional responsibility this domain covers._
12352
+
12353
+ **Criticality:** low | medium | high
12354
+ **Change risk:** low | medium | high
12355
+ **Operational dependency:** _..._
12356
+
12357
+ **Evidence summary:**
12358
+ - _\`path\`, route, table or function._
12359
+
12360
+ #### Capability: <Capability name>
12297
12361
 
12298
12362
  - Status: implemented | partial | inferred | risky | deprecated | unknown
12299
12363
  - Capability type: business | product | technical | integration | operational
12300
12364
  - User-facing: yes | no | internal
12301
- - Criticality: low | medium | high
12302
- - Change risk: low | medium | high
12303
- - Operational dependency:
12304
- - _..._
12305
12365
  - Evidence:
12306
12366
  - _\`path/to/file\`, route, table or function \u2014 or \`pending validation\`._
12307
12367
  - Current behavior:
@@ -12314,6 +12374,7 @@ _Document the product capabilities that should exist._
12314
12374
  ## Capability Gaps
12315
12375
 
12316
12376
  - [gap] _Gap description._
12377
+ - Domain: _<Domain name>_
12317
12378
  - Related capability: _<name>_
12318
12379
  - Impact: low | medium | high
12319
12380
  - Possible roadmap candidate: yes | no
@@ -12321,8 +12382,9 @@ _Document the product capabilities that should exist._
12321
12382
  ## Roadmap Candidate Signals
12322
12383
 
12323
12384
  - [candidate] _Potential modernization or roadmap candidate._
12324
- - Based on: partial capability | gap | risk | open question | business goal
12385
+ - Domain: _<Domain name>_
12325
12386
  - Related capability: _<name>_
12387
+ - Based on: partial capability | gap | risk | open question | business goal
12326
12388
  `
12327
12389
  },
12328
12390
  codebase: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/cli",
3
- "version": "3.39.0",
3
+ "version": "3.39.1",
4
4
  "description": "Knowledge Driven Development toolkit",
5
5
  "license": "MIT",
6
6
  "repository": {