@llipe.com/dev-tasks 0.8.0 → 0.9.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 (99) hide show
  1. package/.claude/agents/developer.md +16 -11
  2. package/.claude/agents/qa-engineer.md +104 -0
  3. package/.claude/agents/verifier.md +1 -1
  4. package/.claude/commands/developer.md +14 -10
  5. package/.claude/commands/planner.md +10 -8
  6. package/.claude/commands/qa-engineer.md +23 -0
  7. package/.claude/skills/activity-coverage-gap-analysis/SKILL.md +107 -0
  8. package/.claude/skills/activity-test-implementation/SKILL.md +109 -0
  9. package/.claude/skills/activity-test-standards/SKILL.md +122 -0
  10. package/.claude/skills/implement/SKILL.md +14 -12
  11. package/.github/agents/developer.agent.md +16 -11
  12. package/.github/agents/planner.agent.md +10 -8
  13. package/.github/agents/qa-engineer.agent.md +104 -0
  14. package/.github/agents/verifier.agent.md +1 -1
  15. package/.github/instructions/implement.instructions.md +14 -12
  16. package/.github/prompts/qa-engineer.prompt.md +23 -0
  17. package/.github/skills/activity-coverage-gap-analysis/SKILL.md +107 -0
  18. package/.github/skills/activity-test-implementation/SKILL.md +109 -0
  19. package/.github/skills/activity-test-standards/SKILL.md +122 -0
  20. package/.kiro/agents/developer.md +16 -11
  21. package/.kiro/agents/planner.md +10 -8
  22. package/.kiro/agents/qa-engineer.md +108 -0
  23. package/.kiro/agents/verifier.md +1 -1
  24. package/.kiro/skills/activity-coverage-gap-analysis/SKILL.md +107 -0
  25. package/.kiro/skills/activity-test-implementation/SKILL.md +109 -0
  26. package/.kiro/skills/activity-test-standards/SKILL.md +122 -0
  27. package/.kiro/steering/implement.md +14 -12
  28. package/AGENTS.md +50 -23
  29. package/CHANGELOG.md +56 -0
  30. package/CLAUDE.md +6 -3
  31. package/README.md +108 -112
  32. package/TESTING.md +183 -0
  33. package/bundle-manifest.json +1 -0
  34. package/dist/core/distribution/install.d.ts.map +1 -1
  35. package/dist/core/distribution/install.js +25 -2
  36. package/dist/core/distribution/install.js.map +1 -1
  37. package/dist/core/distribution/profiles.d.ts +21 -0
  38. package/dist/core/distribution/profiles.d.ts.map +1 -1
  39. package/dist/core/distribution/profiles.js +21 -0
  40. package/dist/core/distribution/profiles.js.map +1 -1
  41. package/dist/core/distribution/update.d.ts +3 -0
  42. package/dist/core/distribution/update.d.ts.map +1 -1
  43. package/dist/core/distribution/update.js +141 -15
  44. package/dist/core/distribution/update.js.map +1 -1
  45. package/dist/core/extract/asyncapi/declared.d.ts +19 -0
  46. package/dist/core/extract/asyncapi/declared.d.ts.map +1 -0
  47. package/dist/core/extract/asyncapi/declared.js +168 -0
  48. package/dist/core/extract/asyncapi/declared.js.map +1 -0
  49. package/dist/core/extract/asyncapi/index.d.ts +1 -0
  50. package/dist/core/extract/asyncapi/index.d.ts.map +1 -1
  51. package/dist/core/extract/asyncapi/index.js +1 -0
  52. package/dist/core/extract/asyncapi/index.js.map +1 -1
  53. package/dist/core/extract/asyncapi/types.d.ts +1 -1
  54. package/dist/core/extract/asyncapi/types.d.ts.map +1 -1
  55. package/dist/core/extract/ladder.d.ts +79 -0
  56. package/dist/core/extract/ladder.d.ts.map +1 -0
  57. package/dist/core/extract/ladder.js +70 -0
  58. package/dist/core/extract/ladder.js.map +1 -0
  59. package/dist/core/extract/openapi/index.d.ts +35 -5
  60. package/dist/core/extract/openapi/index.d.ts.map +1 -1
  61. package/dist/core/extract/openapi/index.js +136 -3
  62. package/dist/core/extract/openapi/index.js.map +1 -1
  63. package/dist/core/extract/openapi/route2-introspect.d.ts +18 -0
  64. package/dist/core/extract/openapi/route2-introspect.d.ts.map +1 -0
  65. package/dist/core/extract/openapi/route2-introspect.js +249 -0
  66. package/dist/core/extract/openapi/route2-introspect.js.map +1 -0
  67. package/dist/core/extract/openapi/route2.d.ts +40 -17
  68. package/dist/core/extract/openapi/route2.d.ts.map +1 -1
  69. package/dist/core/extract/openapi/route2.js +202 -10
  70. package/dist/core/extract/openapi/route2.js.map +1 -1
  71. package/dist/core/extract/openapi/types.d.ts +3 -3
  72. package/dist/core/extract/openapi/types.d.ts.map +1 -1
  73. package/dist/core/extract/provider.d.ts +4 -0
  74. package/dist/core/extract/provider.d.ts.map +1 -1
  75. package/dist/core/extract/report.d.ts +29 -1
  76. package/dist/core/extract/report.d.ts.map +1 -1
  77. package/dist/core/extract/report.js +7 -2
  78. package/dist/core/extract/report.js.map +1 -1
  79. package/dist/core/extract/schema.d.ts +16 -18
  80. package/dist/core/extract/schema.d.ts.map +1 -1
  81. package/dist/core/extract/schema.js +48 -43
  82. package/dist/core/extract/schema.js.map +1 -1
  83. package/dist/core/extract/workspaces.d.ts +33 -0
  84. package/dist/core/extract/workspaces.d.ts.map +1 -0
  85. package/dist/core/extract/workspaces.js +193 -0
  86. package/dist/core/extract/workspaces.js.map +1 -0
  87. package/package.json +11 -2
  88. package/dist/core/extract/openapi/llm-descriptions.d.ts +0 -41
  89. package/dist/core/extract/openapi/llm-descriptions.d.ts.map +0 -1
  90. package/dist/core/extract/openapi/llm-descriptions.js +0 -36
  91. package/dist/core/extract/openapi/llm-descriptions.js.map +0 -1
  92. package/dist/core/extract/orm/llm-descriptions.d.ts +0 -28
  93. package/dist/core/extract/orm/llm-descriptions.d.ts.map +0 -1
  94. package/dist/core/extract/orm/llm-descriptions.js +0 -64
  95. package/dist/core/extract/orm/llm-descriptions.js.map +0 -1
  96. package/dist/core/extract/orm/migration-inference.d.ts +0 -25
  97. package/dist/core/extract/orm/migration-inference.d.ts.map +0 -1
  98. package/dist/core/extract/orm/migration-inference.js +0 -76
  99. package/dist/core/extract/orm/migration-inference.js.map +0 -1
package/README.md CHANGED
@@ -121,6 +121,8 @@ For which artifacts are JSON vs YAML, and which are generated vs hand-written, s
121
121
 
122
122
  - **`dev-tasks` (bootstrap/distribution):** [`docs/dev-tasks-user-manual.md`](docs/dev-tasks-user-manual.md) — install, update, pin/unpin, profiles, manifest merging, reconciliation
123
123
  - **`dt` (extraction/catalog/context):** [`docs/dt-user-manual.md`](docs/dt-user-manual.md) — extract, catalog, context, scope
124
+ - **Architecture and artifacts:** [`docs/system-overview.md`](docs/system-overview.md) and [`docs/data-model.md`](docs/data-model.md)
125
+ - **Everything else:** [`docs/README.md`](docs/README.md)
124
126
 
125
127
  ### Global options
126
128
 
@@ -132,14 +134,20 @@ For which artifacts are JSON vs YAML, and which are generated vs hand-written, s
132
134
 
133
135
  ### Exit codes
134
136
 
137
+ Both binaries share one exit-code table. Common cases:
138
+
135
139
  | Code | Meaning |
136
140
  | ---- | ------------------------------------------------- |
137
141
  | 0 | OK |
138
142
  | 1 | Unexpected error |
139
143
  | 2 | Incorrect usage |
144
+ | 7 | Gate aborted (scope gate G1–G4) |
145
+ | 8 | Breaking contract change detected |
140
146
  | 13 | Incomplete extraction: required fields unresolved |
141
147
  | 14 | Reconciliation conflict (edited fields) |
142
148
 
149
+ Full table with all 15 codes: [`docs/data-model.md`](docs/data-model.md#exit-code-contract).
150
+
143
151
  ---
144
152
 
145
153
  ## `dev-tasks` Command Reference
@@ -166,14 +174,14 @@ dev-tasks unpin # Remove the pin (update will use the local package versi
166
174
 
167
175
  ### Options (install / update)
168
176
 
169
- | Option | Description |
170
- | ------------------ | ---------------------------------------------------- |
171
- | `--profile <name>` | `copilot` \| `claude` \| `kiro` \| `both` \| `all` |
172
- | `--dry-run` | Print planned changes without writing any files |
173
- | `--backup` | Backup managed files before replacing |
174
- | `--yes` | Skip confirmation prompts (useful in CI) |
175
- | `--pin <version>` | Pin to a specific release version |
176
- | `--force` | Accept all upstream changes without conflict prompts |
177
+ | Option | Applies to | Description |
178
+ | ------------------ | ---------- | ------------------------------------------------------------------- |
179
+ | `--profile <name>` | install | `copilot` \| `claude` \| `kiro` \| `both` \| `all` (default: `all`) |
180
+ | `--pin <version>` | install | Pin to a specific release version |
181
+ | `--force` | update | Back up conflicting files, then overwrite them |
182
+ | `--json` | both | Machine-readable output |
183
+
184
+ `update` never overwrites a locally modified managed file without `--force`; it reports the conflict and exits `14`.
177
185
 
178
186
  ---
179
187
 
@@ -195,11 +203,11 @@ This system brings structure and clarity to AI-assisted development by:
195
203
  | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- |
196
204
  | **Agent** | Autonomous role with decision-making, phases, and handoff discipline. Owns a workflow end-to-end. | Invoked by name (`@agent`) |
197
205
  | **Skill** | Reusable on-demand capability. Describes _procedures_ or _activities_ that any agent can invoke when needed. Not loaded unless referenced. | On demand (invoked by agent or prompt) |
198
- | **Instruction** | Always-loaded rule scoped via `applyTo` frontmatter. Enforced automatically for every matching context. | Always (auto-applied by runtime) |
206
+ | **Instruction** | Rule scoped via `applyTo`/`fileMatchPattern` frontmatter. Enforced automatically whenever the agent touches a matching file. | Auto-applied on matching context |
199
207
 
200
208
  **Key distinctions:**
201
209
 
202
- - Skills save context window space — they are loaded only when invoked, unlike instructions which are always present.
210
+ - Skills save context window space — they are loaded only when invoked, unlike instructions which load automatically for every matching file.
203
211
  - Agent files define _who_ (identity, phases, handoff rules). Skill files define _how_ (procedures, templates, steps).
204
212
  - Instructions are for cross-cutting rules that must never be forgotten (e.g., implementation discipline, planning format).
205
213
 
@@ -209,7 +217,7 @@ This system brings structure and clarity to AI-assisted development by:
209
217
 
210
218
  Agents are autonomous personas that orchestrate skills and activities.
211
219
 
212
- > **Available for:** Copilot (`.github/agents/`), Claude Code (`.claude/agents/`), Kiro (`.kiro/agents/`). All three platforms define the same 8 agents below.
220
+ > **Available for:** Copilot (`.github/agents/`), Claude Code (`.claude/agents/`), Kiro (`.kiro/agents/`). Copilot and Kiro define all 9 agents below. On Claude Code, the two orchestrators (`planner`, `product-engineer`) run in the main thread as `/commands` so they can pause for approval gates; the other 7 are subagents.
213
221
 
214
222
  ### `product-engineer`
215
223
 
@@ -223,7 +231,7 @@ Also owns drift reconciliation via `activity-drift-reconciliation`.
223
231
 
224
232
  ### `developer`
225
233
 
226
- Execution agent — implements code from an existing task list. Runs `implement`, including a mandatory `verifier` audit before every PR is marked ready. Uses `git-ops` for branch management.
234
+ Execution agent — implements code from an existing task list. Runs `implement`, including a `qa-engineer` coverage gate and a mandatory `verifier` audit before every PR is marked ready. Uses `git-ops` for branch management.
227
235
 
228
236
  ### `planner`
229
237
 
@@ -241,13 +249,14 @@ Multi-story orchestration with checkpoint/resume:
241
249
 
242
250
  ### Other Agents
243
251
 
244
- | Agent | Purpose |
245
- | ------------------ | -------------------------------------------------- |
246
- | `ux-engineer` | PRD/SPEC-to-mockup prototyping |
247
- | `technical-writer` | Documentation maintenance |
248
- | `housekeeping` | Lint, type, and test-wiring fixes |
249
- | `github-ops` | GitHub consistency — issues, PRs, branches, labels |
250
- | `verifier` | Compliance test-plan design and fidelity auditing |
252
+ | Agent | Purpose |
253
+ | ------------------ | -------------------------------------------------------------------- |
254
+ | `ux-engineer` | PRD/SPEC-to-mockup prototyping |
255
+ | `technical-writer` | Documentation maintenance |
256
+ | `housekeeping` | Lint, type, and test-wiring fixes |
257
+ | `github-ops` | GitHub consistency — issues, PRs, branches, labels |
258
+ | `verifier` | Compliance test-plan design and fidelity auditing |
259
+ | `qa-engineer` | Testing standard, missing test harnesses, coverage and gap reporting |
251
260
 
252
261
  ---
253
262
 
@@ -255,119 +264,105 @@ Multi-story orchestration with checkpoint/resume:
255
264
 
256
265
  On-demand capabilities loaded only when invoked.
257
266
 
258
- | Skill | Purpose | Consumer |
259
- | ------------------------------- | ----------------------------------------------- | --------------------------------------------------- |
260
- | `activity-init` | Product context and technical guidelines | `product-engineer` |
261
- | `activity-refine` | Issue refinement or PRD creation | `product-engineer` |
262
- | `activity-generate-spec` | PRD → technical specification | `product-engineer` |
263
- | `activity-generate-stories` | Spec → user stories with coverage validation | `product-engineer` |
264
- | `activity-publish-github` | Stories → GitHub Issues | `product-engineer` |
265
- | `activity-drift-reconciliation` | Routes verifier drift findings into remediation | `product-engineer` |
266
- | `git-ops` | Branch, rebase, merge, conflict resolution | `developer`, `planner` |
267
- | `webapp-mockup` | React mockup scaffold for UX testing | `ux-engineer` |
268
- | `activity-e2e-test-design` | E2E black-box test scenario generation | `verifier` |
269
- | `activity-contract-test-design` | Consumer/provider contract testing | `verifier` |
270
- | `activity-edge-case-refinement` | Systematic edge-case discovery | `verifier` |
271
- | `activity-random-test-tactics` | Randomized, fuzz, and property-inspired tests | `verifier` |
272
- | `memo-cli-usage` | Shared architectural memory across sessions | `product-engineer`, `developer`, `technical-writer` |
267
+ | Skill | Purpose | Consumer |
268
+ | -------------------------------- | ----------------------------------------------- | --------------------------------------------------- |
269
+ | `activity-init` | Product context and technical guidelines | `product-engineer` |
270
+ | `activity-refine` | Issue refinement or PRD creation | `product-engineer` |
271
+ | `activity-generate-spec` | PRD → technical specification | `product-engineer` |
272
+ | `activity-generate-stories` | Spec → user stories with coverage validation | `product-engineer` |
273
+ | `activity-publish-github` | Stories → GitHub Issues | `product-engineer` |
274
+ | `activity-drift-reconciliation` | Routes verifier drift findings into remediation | `product-engineer` |
275
+ | `git-ops` | Branch, rebase, merge, conflict resolution | `developer`, `planner` |
276
+ | `webapp-mockup` | React mockup scaffold for UX testing | `ux-engineer` |
277
+ | `activity-e2e-test-design` | E2E black-box test scenario generation | `verifier` |
278
+ | `activity-contract-test-design` | Consumer/provider contract testing | `verifier` |
279
+ | `activity-edge-case-refinement` | Systematic edge-case discovery | `verifier` |
280
+ | `activity-random-test-tactics` | Randomized, fuzz, and property-inspired tests | `verifier` |
281
+ | `activity-test-standards` | Establish and maintain `/TESTING.md` | `qa-engineer` |
282
+ | `activity-test-implementation` | Author Layer 1-2 tests with enforced boundaries | `qa-engineer` |
283
+ | `activity-coverage-gap-analysis` | Coverage measurement and risk-ranked gaps | `qa-engineer` |
284
+ | `memo-cli-usage` | Shared architectural memory across sessions | `product-engineer`, `developer`, `technical-writer` |
273
285
 
274
286
  ---
275
287
 
276
- ## Instructions (Always-Loaded)
288
+ ## Instructions (Scoped)
277
289
 
278
- | Instruction | Scope | Purpose |
279
- | ------------------------------------------------ | ---------- | -------------------------------------- |
280
- | `plan.instructions.md` | `**` | Convert stories/issues into task lists |
281
- | `implement.instructions.md` | `**` | Execute task list with approval gates |
282
- | `domain/nextjs-pages-components.instructions.md` | `**/*.tsx` | Next.js + React conventions |
290
+ Auto-applied whenever the agent touches a matching file. Claude Code has no scoped-instruction mechanism, so `plan` and `implement` ship there as skills.
283
291
 
284
- ---
292
+ | Instruction | Scope | Purpose |
293
+ | ------------------------- | -------------------------- | -------------------------------------- |
294
+ | `plan` | `workstream/**` | Convert stories/issues into task lists |
295
+ | `implement` | `workstream/**/tasks-*.md` | Execute task list with approval gates |
296
+ | `nextjs-pages-components` | `**/app/**/*.tsx` | Next.js + React conventions |
297
+ | `git-guard-notice` | Always loaded (Kiro) | Restates the three git invariants |
285
298
 
286
- ## Prompts
299
+ Copilot reads `.github/instructions/*.instructions.md`, Kiro reads `.kiro/steering/*.md`, and Claude Code reads `.claude/skills/{plan,implement}/`.
287
300
 
288
- > Copilot: `.github/prompts/*.prompt.md`. Claude Code: `.claude/commands/*.md`. Kiro: embedded in `.kiro/agents/*.md`.
301
+ ### Hooks
289
302
 
290
- | Prompt | Agent | Purpose |
291
- | -------------------------- | ---------------- | --------------------------------- |
292
- | `product-engineer-init` | product-engineer | Initialize foundation documents |
293
- | `product-engineer-feature` | product-engineer | Design and plan a feature |
294
- | `product-engineer-issue` | product-engineer | Refine and plan a GitHub Issue |
295
- | `developer-execute` | developer | Execute an existing task list |
296
- | `planner` | planner | Orchestrate multi-story execution |
297
- | `planner-resume` | planner | Resume from checkpoint |
298
- | `ux-engineer` | ux-engineer | Generate UX mockups |
299
- | `github-ops` | github-ops | GitHub consistency |
300
- | `technical-writer` | technical-writer | Documentation maintenance |
301
- | `housekeeping` | housekeeping | Lint, type, test fixes |
302
- | `verifier-design` | verifier | Generate compliance test plan |
303
- | `verifier-audit` | verifier | Grey-box fidelity audit |
303
+ `git-guard` blocks pushes and merges to `main`, non-Conventional commit messages, and inline `gh --body`. `branch-guard` blocks write operations while on the default branch. Both are best-effort; human PR review is the actual gate.
304
304
 
305
305
  ---
306
306
 
307
- ## Workflow Chains
308
-
309
- Match your situation to a chain below, then invoke the first agent in the chain.
310
-
311
- ### Full Feature (PRD-Driven)
312
-
313
- ```
314
- product-engineer: refine → generate-spec → generate-stories → publish-github → plan
315
- ↓
316
- developer: implement
317
- ```
318
-
319
- ### Single GitHub Issue
307
+ ## Prompts
320
308
 
321
- ```
322
- product-engineer: refine → plan
323
- ↓
324
- developer: implement
325
- ```
309
+ > Copilot: `.github/prompts/*.prompt.md`. Claude Code: `.claude/commands/*.md`. Kiro: embedded in `.kiro/agents/*.md`.
326
310
 
327
- ### Multi-Story Orchestration
311
+ | Prompt | Agent | Purpose |
312
+ | -------------------------- | ---------------- | ---------------------------------- |
313
+ | `product-engineer-init` | product-engineer | Initialize foundation documents |
314
+ | `product-engineer-feature` | product-engineer | Design and plan a feature |
315
+ | `product-engineer-issue` | product-engineer | Refine and plan a GitHub Issue |
316
+ | `developer-execute` | developer | Execute an existing task list |
317
+ | `planner` | planner | Orchestrate multi-story execution |
318
+ | `planner-resume` | planner | Resume from checkpoint |
319
+ | `ux-engineer` | ux-engineer | Generate UX mockups |
320
+ | `github-ops` | github-ops | GitHub consistency |
321
+ | `technical-writer` | technical-writer | Documentation maintenance |
322
+ | `housekeeping` | housekeeping | Lint, type, test fixes |
323
+ | `qa-engineer` | qa-engineer | Testing standard and coverage gate |
324
+ | `verifier-design` | verifier | Generate compliance test plan |
325
+ | `verifier-audit` | verifier | Grey-box fidelity audit |
328
326
 
329
- ```
330
- product-engineer: ... → plan
331
- ↓
332
- planner: orchestrate → developer: implement (per story, sequential)
333
- ```
327
+ ---
334
328
 
335
- ### Quick Fix
329
+ ## Workflow Chains
336
330
 
337
- ```
338
- developer: implement
339
- ```
331
+ Match your situation to a chain, then invoke the first agent in it. Full diagrams, including the UX validation loop and project initialization, are in [`docs/workflow-chains.md`](docs/workflow-chains.md).
340
332
 
341
- ### Test-First Design (Verifier)
333
+ | Situation | Chain |
334
+ | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
335
+ | Full feature, PRD-driven | `product-engineer` (refine → spec → stories → publish → plan) → `developer` |
336
+ | Single GitHub Issue | `product-engineer` (refine → plan) → `developer` |
337
+ | Several dependent stories | `product-engineer` (… → plan) → `planner` → `developer` per story, sequential |
338
+ | Quick fix, task list exists | `developer` |
339
+ | Test-first design | … → plan → `verifier` (design) → `developer` → `qa-engineer` → `verifier` (audit) → `product-engineer` (drift reconciliation) |
340
+ | UX validation before build | `product-engineer` (refine → spec) → `ux-engineer` → `product-engineer` |
341
+ | New project | `product-engineer` (init mode) |
342
342
 
343
- ```
344
- product-engineer: spec → stories → plan
345
- ↓
346
- verifier (design mode): generate test plan
347
- ↓
348
- developer: implement (tests first, then code)
349
- ↓ (mandatory)
350
- verifier (audit mode): fidelity audit → report
351
- ↓ (drift findings, non-blocking)
352
- product-engineer: drift-reconciliation
353
- ```
343
+ The `verifier` audit after implementation is mandatory and non-skippable before a PR is marked ready.
354
344
 
355
345
  ---
356
346
 
357
347
  ## File Organization
358
348
 
359
- | Directory | Contents |
360
- | --------------------- | ------------------------------------------------------- |
361
- | `/docs/` | Foundation docs — product-context, technical-guidelines |
362
- | `/docs/requirements/` | PRDs produced by the refine skill |
363
- | `/workstream/` | Active feature work — specs, stories, task lists |
364
- | `bin/` | CLI entrypoints (`dev-tasks.ts`, `dt.ts`) |
365
- | `core/` | Business logic library (extract, distribution) |
366
- | `adapters/cli/` | CLI adapter — wraps core, formats stdout/JSON |
367
- | `schemas/` | JSON Schemas for validation |
368
- | `test/` | Unit and integration tests + fixtures |
369
- | `.github/` | Copilot agents, skills, instructions, prompts |
370
- | `.kiro/` | Kiro agents, skills, steering, hooks |
349
+ | Directory | Contents |
350
+ | --------------------- | ----------------------------------------------------------------------- |
351
+ | `/docs/` | Documentation — see [`docs/README.md`](docs/README.md) for the index |
352
+ | `/docs/adr/` | Architecture decision records |
353
+ | `/docs/requirements/` | PRDs produced by the refine skill |
354
+ | `/workstream/` | Active feature work — specs, stories, task lists, fidelity reports |
355
+ | `bin/` | CLI entrypoints (`dev-tasks.ts`, `dt.ts`) |
356
+ | `core/` | Business logic — catalog, context, distribution, extract, scope, verify |
357
+ | `adapters/cli/` | CLI adapter — wraps core, formats stdout/JSON |
358
+ | `adapters/mcp/` | MCP adapter placeholder (not implemented) |
359
+ | `schemas/` | JSON Schemas for validation |
360
+ | `scripts/` | Bundle build, release, and formatting scripts |
361
+ | `templates/` | Meta-repo scaffold and CI templates |
362
+ | `test/` | Unit and integration tests + fixtures |
363
+ | `.github/` | Copilot agents, skills, instructions, prompts; CI workflows |
364
+ | `.claude/` | Claude Code agents, skills, commands, hooks |
365
+ | `.kiro/` | Kiro agents, skills, steering, hooks |
371
366
 
372
367
  ---
373
368
 
@@ -389,11 +384,12 @@ memo setup init --repo <repo-name> --org <org-name> --domain <domain>
389
384
 
390
385
  ## Known Limitations
391
386
 
392
- - **Route 2 (isolated framework boot) is interface-only** — only routes 1 and 3 are functional for OpenAPI extraction.
393
- - **LLM inference is stubbed** — no real LLM provider is wired yet.
387
+ - **Route 2 (boot + introspect) supports Express and Express 5 only** — Fastify, Hono, and NestJS support is planned but not yet implemented.
388
+ - **Observed DB rung requires PostgreSQL** — the `information_schema` reader works with `pg` only; MySQL/SQLite support is deferred.
394
389
  - **Only Node/TS provider** — other language stacks require additional extraction providers.
395
390
  - **Zod extraction handles basic `z.object` patterns only** — complex compositions are not fully supported.
396
- - **Only kafkajs patterns supported** — other messaging clients are not detected.
391
+ - **Only kafkajs patterns supported** — other messaging clients are not detected; kafkajs inference is now low-confidence.
392
+ - **Monorepo detection is pnpm/npm workspaces only** — custom workspace layouts require manual configuration.
397
393
 
398
394
  ---
399
395
 
package/TESTING.md ADDED
@@ -0,0 +1,183 @@
1
+ ---
2
+ version: alpha
3
+ name: Testing Standard
4
+ description: Canonical testing contract for this repository — declares what to test at which layer, which commands to run, and how coverage is judged.
5
+ status: placeholder
6
+ ---
7
+
8
+ <!--
9
+ PLACEHOLDER. This file ships with dev-tasks as a section contract only — it
10
+ deliberately asserts no project-specific values.
11
+
12
+ Run `qa-engineer` to inspect this repository and fill it in. The agent detects
13
+ the test framework, runner, script inventory, test locations, coverage tooling,
14
+ and mocking approach per package, then replaces the `<!-- unfilled -->` markers
15
+
16
+ below. Content you write here is preserved: this file is listed in
17
+ `consumer_owned_paths`, so `dev-tasks update` will never overwrite it.
18
+
19
+ Owned by `qa-engineer`. `developer` keeps it current when the testing contract
20
+ changes. Agents that read it MUST treat an unfilled placeholder as "no standard
21
+ established" rather than as permission.
22
+ -->
23
+
24
+ ## Test Layers
25
+
26
+ The layer taxonomy below is fixed. What belongs in each layer is project-specific.
27
+
28
+ | Layer | Name | Scope | Status |
29
+ | ----- | ------------------------- | ------------------------------------------------------------------------- | ----------------- |
30
+ | 1 | Deterministic foundations | Unit tests, schema validation. No I/O, no network, no real database. | <!-- unfilled --> |
31
+ | 2 | Constrained model/tool | Backend component tests, mocked APIs, fixtures and gold datasets. | <!-- unfilled --> |
32
+ | 3 | Product evaluation | Semantic, tone, groundedness, hallucination evals. Only for LLM features. | <!-- unfilled --> |
33
+ | 4 | Human evaluation | Review gates, safeguards, risk alerts. | <!-- unfilled --> |
34
+
35
+ Integration and end-to-end layers are declared per project in the table below
36
+ when they exist.
37
+
38
+ ### Layer boundaries
39
+
40
+ State explicitly what must **not** be tested at each layer, so the boundary is
41
+ enforceable rather than aspirational.
42
+
43
+ - **Layer 1 must not:** <!-- unfilled -->
44
+ - **Layer 2 must not:** <!-- unfilled -->
45
+ - **Escalation rule** — when a Layer 1 test needs a real dependency, it moves up
46
+ a layer rather than growing a test double that reimplements the dependency.
47
+
48
+ ## Packages
49
+
50
+ One row per package. In a single-package repository this table has one row.
51
+ A package's language determines its runner and commands — a non-JS package is
52
+ described in its own terms, not forced into JavaScript script names.
53
+
54
+ | Package | Language | Runner | Test command | Test environment | Coverage tooling |
55
+ | ----------------- | ----------------- | ----------------- | ----------------- | ----------------- | ----------------- |
56
+ | <!-- unfilled --> | <!-- unfilled --> | <!-- unfilled --> | <!-- unfilled --> | <!-- unfilled --> | <!-- unfilled --> |
57
+
58
+ ### Test environment
59
+
60
+ Each package declares the environment its tests run under, and why. A package
61
+ rendering DOM components under a bare `node` environment is a defect, not a
62
+ preference.
63
+
64
+ <!-- unfilled -->
65
+
66
+ ### Runtime parity
67
+
68
+ Record the runtime version used locally, in CI, and in production for each
69
+ package. Divergence is a finding: tests that pass on one runtime prove nothing
70
+ about another.
71
+
72
+ <!-- unfilled -->
73
+
74
+ ## Commands
75
+
76
+ ### JavaScript / TypeScript default
77
+
78
+ Canonical script names for JS/TS packages. Prefer `pnpm`.
79
+
80
+ | Script | Purpose | Required |
81
+ | ------------------ | ----------------------------------------- | ------------------- |
82
+ | `lint` | Static analysis | yes |
83
+ | `lint:fix` | Auto-fix lint findings | no |
84
+ | `format` | Write formatting | no |
85
+ | `format:check` | Verify formatting | yes |
86
+ | `typecheck` | Type analysis | yes |
87
+ | `test` | Aggregate — MUST reach every test package | yes |
88
+ | `test:unit` | Layer 1 | yes |
89
+ | `test:integration` | Integration layer | when present |
90
+ | `test:e2e` | End-to-end layer | when present |
91
+ | `test:coverage` | Coverage measurement | when tooling exists |
92
+ | `audit` | Dependency vulnerability scan | yes |
93
+ | `validate` | Aggregate quality gate | yes |
94
+
95
+ ### Non-JS packages
96
+
97
+ Declare each non-JS package's equivalent commands here. The canonical names
98
+ above are a JS/TS convention, not a cross-language requirement — what matters is
99
+ that every package has a discoverable command per purpose and that the aggregate
100
+ test command reaches it.
101
+
102
+ | Package | Purpose | Command |
103
+ | ----------------- | ----------------- | ----------------- |
104
+ | <!-- unfilled --> | <!-- unfilled --> | <!-- unfilled --> |
105
+
106
+ ### Gate reachability
107
+
108
+ The aggregate test command MUST reach every package that contains tests, and the
109
+ CI and deploy quality gates MUST invoke that aggregate. A correctly named script
110
+ that silently omits a package is the failure this section exists to prevent.
111
+
112
+ - Aggregate test command: <!-- unfilled -->
113
+ - Packages reached: <!-- unfilled -->
114
+ - CI gate: <!-- unfilled -->
115
+ - Deploy gate: <!-- unfilled -->
116
+
117
+ ## Coverage
118
+
119
+ ### Thresholds and baseline policy
120
+
121
+ Coverage percentages alone do not establish confidence — a suite can cover every
122
+ line while asserting nothing meaningful. Thresholds are a floor, not a goal.
123
+
124
+ - Measurement tool per package: <!-- unfilled -->
125
+ - Threshold policy: <!-- unfilled -->
126
+ - Baseline: <!-- unfilled -->
127
+ - Regression policy: <!-- unfilled -->
128
+
129
+ ### When coverage cannot be measured
130
+
131
+ If no coverage provider is configured, the gate reports
132
+ `SKIPPED(<reason>)` — never a pass — and structural gap analysis runs instead:
133
+ untested files and exported symbols are enumerated, source-to-test size ratios
134
+ are reported per package, and gaps are ranked by size and risk. Absence of
135
+ tooling is never reported as absence of gaps.
136
+
137
+ Existing coverage artifacts are validated before being trusted. A stale report,
138
+ or one whose measured scope is narrower than the package it claims to describe,
139
+ is reported as misleading rather than used as evidence.
140
+
141
+ ## Fixtures and Mocking
142
+
143
+ ### Strategy
144
+
145
+ <!-- unfilled -->
146
+
147
+ ### Rules
148
+
149
+ - Shared fixtures and helpers live in one place per package. Duplicating a token
150
+ builder or a client mock across test files is a defect.
151
+ - A test double must not reimplement the logic it stands in for. When a mock
152
+ grows a copy of production behavior, the test validates the mock.
153
+ - Stubbed globals are restored after each test. Rely on explicit restoration
154
+ rather than on worker isolation.
155
+ - Placeholder assertions such as `expect(true)` are prohibited. They report
156
+ health without exercising anything.
157
+
158
+ ### Gold datasets
159
+
160
+ Record where recorded responses and golden files live, how they were captured,
161
+ and how to regenerate them.
162
+
163
+ <!-- unfilled -->
164
+
165
+ ## Security-Negative Tests
166
+
167
+ Required for every authentication and authorization code path. A suite that
168
+ only asserts the behavior the implementation happens to have provides no
169
+ security evidence.
170
+
171
+ | Case | Required |
172
+ | --------------------------- | -------- |
173
+ | Invalid signature rejected | yes |
174
+ | Expired credential rejected | yes |
175
+ | Wrong issuer or audience | yes |
176
+ | Tampered claims rejected | yes |
177
+ | Cross-tenant access denied | yes |
178
+
179
+ Where isolation is asserted against test doubles rather than the real policy
180
+ layer, record that limitation here — fake-based isolation is not evidence that
181
+ the production policy holds.
182
+
183
+ <!-- unfilled -->
@@ -103,6 +103,7 @@
103
103
  "consumer_owned_paths": [
104
104
  "AGENTS.md",
105
105
  "CLAUDE.md",
106
+ "TESTING.md",
106
107
  ".claude/settings.json",
107
108
  ".kiro/settings/mcp.json",
108
109
  ".kiro/specs"
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../core/distribution/install.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAA8C,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,QAAQ,EAEd,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAgED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CA6DlF;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;IACpE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAGD"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../core/distribution/install.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAA8C,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,QAAQ,EAEd,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAgED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAoFlF;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;IACpE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAGD"}
@@ -6,7 +6,7 @@ import { readdir, readFile, writeFile, mkdir } from "node:fs/promises";
6
6
  import { join, relative } from "node:path";
7
7
  import { hashContent } from "./hash.js";
8
8
  import { readManifest, writeManifest } from "./manifest.js";
9
- import { resolveProfile, PROFILE_PATHS, } from "./profiles.js";
9
+ import { resolveProfile, PROFILE_PATHS, ROOT_FILES, ROOT_PROFILE_TAG, } from "./profiles.js";
10
10
  /**
11
11
  * Recursively collect all files under a directory.
12
12
  * Returns paths relative to the given baseDir.
@@ -97,6 +97,28 @@ export async function installFiles(options) {
97
97
  }
98
98
  }
99
99
  }
100
+ // Root files belong to no platform: install once per run, not once per platform.
101
+ for (const relFile of ROOT_FILES) {
102
+ const sourcePath = join(sourceDir, relFile);
103
+ let content;
104
+ try {
105
+ content = await readFile(sourcePath, "utf-8");
106
+ }
107
+ catch {
108
+ // A bundle that ships no root file is valid; skip silently.
109
+ continue;
110
+ }
111
+ const hash = hashContent(content);
112
+ const targetPath = join(targetDir, relFile);
113
+ await mkdir(join(targetPath, ".."), { recursive: true });
114
+ await writeFile(targetPath, content, "utf-8");
115
+ managedFiles.push({
116
+ path: relFile,
117
+ profile: ROOT_PROFILE_TAG,
118
+ sha256: hash,
119
+ origin_sha256: hash,
120
+ });
121
+ }
100
122
  const manifest = {
101
123
  version,
102
124
  pinned: pin,
@@ -107,7 +129,8 @@ export async function installFiles(options) {
107
129
  // Merge with existing manifest: preserve files from profiles not being installed
108
130
  const existing = await readManifest(targetDir);
109
131
  if (existing) {
110
- const installedProfileSet = new Set(platforms);
132
+ // Include the root tag so root entries are replaced, not duplicated.
133
+ const installedProfileSet = new Set([...platforms, ROOT_PROFILE_TAG]);
111
134
  const preservedFiles = existing.files.filter((f) => !installedProfileSet.has(f.profile));
112
135
  manifest.files = [...preservedFiles, ...managedFiles];
113
136
  manifest.extraction = existing.extraction;
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../core/distribution/install.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAwC,MAAM,eAAe,CAAC;AAClG,OAAO,EACL,cAAc,EACd,aAAa,GAId,MAAM,eAAe,CAAC;AAqBvB;;;GAGG;AACH,KAAK,UAAU,YAAY,CAAC,GAAW,EAAE,OAAe;IACtD,IAAI,OA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AAU,EAAE,EAAE;KACf,CAAC;IAEF,iFAAiF;IACjF,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,CAAC;IAC/C,IAAI,QAAQ,EAAE,CAAC;QACb,qEAAqE;QACrE,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAS,CAAC,GAAG,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC9E,MAAM,cAAc,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACzF,QAAQ,CAAC,KAAK,GAAG,CAAC,GAAG,cAAc,EAAE,GAAG,YAAY,CAAC,CAAC;QACtD,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IAC5C,CAAC;IAED,MAAM,aAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAEzC,OAAO;QACL,SAAS,EAAE,YAAY;QACvB,YAAY,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,eAAe,CAAC;QAC5D,SAAS;KACV,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAuB;IAIzD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;AAC5E,CAAC"}
@@ -17,6 +17,27 @@ export interface ManagedPath {
17
17
  }
18
18
  /** Profile-to-paths mapping for each individual platform. */
19
19
  export declare const PROFILE_PATHS: Record<Platform, ManagedPath[]>;
20
+ /**
21
+ * Repo-root files that belong to no platform.
22
+ *
23
+ * These are canonical contract documents installed once per run regardless of
24
+ * how many platforms the profile resolves to. They are also listed in
25
+ * `consumer_owned_paths` in `bundle-manifest.json`, so `dev-tasks update` never
26
+ * overwrites a version the consumer has filled in.
27
+ *
28
+ * Entries MUST be bare filenames at the repository root — a nested or
29
+ * platform-prefixed path belongs in `PROFILE_PATHS` instead.
30
+ */
31
+ export declare const ROOT_FILES: readonly string[];
32
+ /**
33
+ * Manifest `profile` tag for root files.
34
+ *
35
+ * Platform-agnostic files cannot be tagged with a single platform: manifest
36
+ * merging replaces entries whose profile is in the installed set, so a root file
37
+ * tagged `kiro` would be dropped when installing `copilot` and duplicated when
38
+ * installing `all`. A dedicated tag keeps it to exactly one entry.
39
+ */
40
+ export declare const ROOT_PROFILE_TAG = "root";
20
41
  /** Valid profile values for CLI validation. */
21
42
  export declare const VALID_PROFILES: readonly Profile[];
22
43
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../core/distribution/profiles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mCAAmC;AACnC,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAErE,qEAAqE;AACrE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAErD,wDAAwD;AACxD,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,6DAA6D;AAC7D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,CAmBzD,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,cAAc,EAAE,SAAS,OAAO,EAMnC,CAAC;AAEX;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,EAAE,CAa3D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM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