@llipe.com/dev-tasks 0.16.1 → 0.16.4

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 (43) hide show
  1. package/.claude/agents/developer.md +45 -31
  2. package/.claude/agents/github-ops.md +2 -2
  3. package/.claude/agents/technical-writer.md +11 -9
  4. package/.claude/agents/verifier.md +15 -0
  5. package/.claude/commands/planner.md +61 -13
  6. package/.claude/commands/product-engineer.md +54 -8
  7. package/.claude/hooks/git-guard.sh +152 -64
  8. package/.claude/skills/git-ops/SKILL.md +6 -6
  9. package/.claude/skills/implement/SKILL.md +12 -8
  10. package/.claude/skills/memo-cli-usage/REFERENCE.md +11 -11
  11. package/.claude/skills/memo-cli-usage/SKILL.md +11 -9
  12. package/.github/agents/developer.agent.md +45 -31
  13. package/.github/agents/github-ops.agent.md +2 -2
  14. package/.github/agents/planner.agent.md +61 -13
  15. package/.github/agents/product-engineer.agent.md +54 -8
  16. package/.github/agents/technical-writer.agent.md +11 -9
  17. package/.github/agents/verifier.agent.md +15 -0
  18. package/.github/instructions/implement.instructions.md +12 -8
  19. package/.github/skills/git-ops/SKILL.md +6 -6
  20. package/.github/skills/memo-cli-usage/REFERENCE.md +11 -11
  21. package/.github/skills/memo-cli-usage/SKILL.md +11 -9
  22. package/.kiro/agents/developer.md +45 -31
  23. package/.kiro/agents/github-ops.md +2 -2
  24. package/.kiro/agents/planner.md +61 -13
  25. package/.kiro/agents/product-engineer.md +54 -8
  26. package/.kiro/agents/technical-writer.md +11 -9
  27. package/.kiro/agents/verifier.md +15 -0
  28. package/.kiro/hooks/scripts/git-guard.sh +96 -10
  29. package/.kiro/skills/git-ops/SKILL.md +6 -6
  30. package/.kiro/skills/memo-cli-usage/REFERENCE.md +11 -11
  31. package/.kiro/skills/memo-cli-usage/SKILL.md +11 -9
  32. package/.kiro/steering/implement.md +12 -8
  33. package/AGENTS.md +7 -5
  34. package/AGENTS.md.template +3 -1
  35. package/CHANGELOG.md +49 -0
  36. package/CLAUDE.md +2 -1
  37. package/CLAUDE.md.template +2 -1
  38. package/TESTING.md +47 -29
  39. package/dist/core/checks/decision-log-format.d.ts +24 -3
  40. package/dist/core/checks/decision-log-format.d.ts.map +1 -1
  41. package/dist/core/checks/decision-log-format.js +43 -3
  42. package/dist/core/checks/decision-log-format.js.map +1 -1
  43. package/package.json +8 -6
package/TESTING.md CHANGED
@@ -29,9 +29,9 @@ owner: qa-engineer
29
29
 
30
30
  This is a single-package TypeScript repository; no workspace manifest or additional package was detected.
31
31
 
32
- | Package | Language | Runner | Test command | Test environment | Coverage tooling |
33
- | ---------------------- | -------------- | ------------ | --------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------- |
34
- | `@llipe.com/dev-tasks` | TypeScript/ESM | Vitest 3.2.6 | `pnpm run test` | Node (`environment: "node"`) | V8 provider declared in `vitest.config.ts`, but no usable coverage command/provider package is installed |
32
+ | Package | Language | Runner | Test command | Test environment | Coverage tooling |
33
+ | ---------------------- | -------------- | ------------ | --------------- | ---------------------------- | ------------------------------------------------------------------------------- |
34
+ | `@llipe.com/dev-tasks` | TypeScript/ESM | Vitest 3.2.6 | `pnpm run test` | Node (`environment: "node"`) | V8 via `@vitest/coverage-v8` 3.2.6 (exact pin), run by `pnpm run test:coverage` |
35
35
 
36
36
  Tests live in `test/unit/` and `test/integration/` and use `*.test.ts`. `test/fixtures/` is excluded from `.test.ts` collection by `vitest.config.ts`. That exclusion is about collection only — it does not mean the tree is inert. `test/fixtures/docs-structure/*` and `test/fixtures/workspace-*` are live input fixtures read by passing tests, and editing one changes what those tests assert.
37
37
 
@@ -61,33 +61,33 @@ The package is a CLI and filesystem toolkit, so Node is the correct environment;
61
61
 
62
62
  ### Runtime parity
63
63
 
64
- - CI workflow `publish-npm.yml` uses Node `24`.
64
+ - CI workflows `validate.yml` and `publish-npm.yml` use Node `24`.
65
65
  - The package declares production engine `>=24`.
66
66
  - Local validation has been observed on Node `v26.7.0`, which is above the declared engine floor.
67
- - The test suite runs at 64 files / 2138 tests with zero failures on both runtimes.
68
- - A deployment of CI against Node 24 while the development environment uses Node 26 represents a minor runtime mismatch but carries no known risk to the harness itself; the CLI and toolkit operate across both versions without defect.
67
+ - The full test suite passes on both runtimes, locally on Node 26 and on Node 24 in the `validate.yml` pull request check, apart from the known HEAD-dependent test listed under [Harness defects to track](#harness-defects-to-track). That test depends on the git state of the checkout, not on the Node version.
68
+ - A deployment of CI against Node 24 while the development environment uses Node 26 represents a minor runtime mismatch but carries no known risk to the harness itself; no runtime-specific failure has been observed on either version.
69
69
 
70
70
  ## Commands
71
71
 
72
- | Script | Purpose | Status |
73
- | ------------------ | ----------------------------------------------------------------------------------------------------- | -------------------------------------- |
74
- | `lint` | ESLint static analysis **and** `tsx core/checks/run.ts` (docs-structure gate) | present |
75
- | `lint:fix` | ESLint auto-fix | present |
76
- | `format` | Prettier write | present |
77
- | `format:check` | Prettier verification | present |
78
- | `typecheck` | TypeScript analysis | present |
79
- | `test` | Aggregate Vitest run; reaches this package's unit and integration tests | present |
80
- | `test:unit` | Unit tests | present |
81
- | `test:integration` | Integration-directory tests; these are CLI/filesystem integration tests, not Layer 2.5 database tests | present |
82
- | `test:e2e` | Playwright tests | not configured; no Playwright setup |
83
- | `test:coverage` | Coverage measurement | missing; no usable provider configured |
84
- | `audit` | Production dependency audit | present |
85
- | `validate` | `typecheck` → `lint` → `format:check` → aggregate `test` | present |
72
+ | Script | Purpose | Status |
73
+ | ------------------ | ----------------------------------------------------------------------------------------------------- | ----------------------------------- |
74
+ | `lint` | ESLint **and** `tsx core/checks/run.ts` (docs-structure, decision-log, glossary, vocabulary checks) | present |
75
+ | `lint:fix` | ESLint auto-fix | present |
76
+ | `format` | Prettier write | present |
77
+ | `format:check` | Prettier verification | present |
78
+ | `typecheck` | TypeScript analysis | present |
79
+ | `test` | Aggregate Vitest run; reaches this package's unit and integration tests | present |
80
+ | `test:unit` | Unit tests | present |
81
+ | `test:integration` | Integration-directory tests; these are CLI/filesystem integration tests, not Layer 2.5 database tests | present |
82
+ | `test:e2e` | Playwright tests | not configured; no Playwright setup |
83
+ | `test:coverage` | Coverage measurement (`vitest run --coverage`); separate from `validate`, which does not run coverage | present |
84
+ | `audit` | Production dependency audit | present |
85
+ | `validate` | `typecheck` → `lint` → `format:check` → aggregate `test` | present |
86
86
 
87
87
  ### Gate reachability
88
88
 
89
89
  - **Aggregate test command:** `pnpm run test` (`vitest run`), which includes `test/**/*.test.ts` and excludes `test/fixtures/**`; the single package is reached, including both `test/unit/` and `test/integration/`.
90
- - **CI gate:** `publish-npm.yml` invokes `pnpm run validate`, which reaches the aggregate test command, but only on its tag-triggered publish workflow. No general CI test workflow/job was detected.
90
+ - **CI gate:** `validate.yml` runs `pnpm run validate`, which reaches the aggregate test command, on every pull request into any base branch (#248; runbook `docs/runbooks/runbook-diagnose-pr-validate.md`). `publish-npm.yml` runs it again on the tag-triggered publish. The PR check is not yet _required_ by branch protection: that is a manual repository setting (`docs/runbooks/runbook-configure-branch-protection.md`). Coverage (`test:coverage`) is not part of either gate.
91
91
  - **Deploy gate:** no deploy workflow was detected; deploy quality-gate status is not automatically enforced.
92
92
  - `release-bundle.yml` does not invoke `validate` or the aggregate test command.
93
93
 
@@ -95,10 +95,27 @@ The package is a CLI and filesystem toolkit, so Node is the correct environment;
95
95
 
96
96
  ### Thresholds and baseline policy
97
97
 
98
- - Measurement tool: V8 is declared in `vitest.config.ts`, but `test:coverage` is absent and the coverage provider is not available as a project dependency.
99
- - Threshold policy: no numeric threshold has been established.
100
- - Baseline: none recorded.
101
- - Regression policy: coverage must not be reported as measured until a provider and command are configured; structural gap analysis is mandatory meanwhile.
98
+ - Measurement tool: V8, through `@vitest/coverage-v8` 3.2.6, pinned exactly to the installed `vitest` version. `vitest.config.ts` scopes measurement to `core/**/*.ts` and `bin/**/*.ts`. Run it with `pnpm run test:coverage`; reports are written to `coverage/` (text summary on stdout, plus HTML, `clover.xml`, and `coverage-final.json`), which is ignored by git, Prettier, and ESLint.
99
+ - Gate placement: coverage is **not** part of `validate`. `validate` runs the plain aggregate `test` command, so its runtime is unaffected by coverage instrumentation.
100
+ - Threshold policy: no numeric threshold has been established. The baseline below is **recorded, not enforced** this pass: `vitest.config.ts` declares no `thresholds`, and a coverage drop does not fail any script or gate.
101
+ - Regression policy: compare a new `pnpm run test:coverage` run against the baseline and report the delta in the `qa-engineer` coverage gate. Whether to enforce a floor is a later, separate decision.
102
+
103
+ ### Baseline
104
+
105
+ Measured 2026-10-02 at commit `463638d` (branch `story/S-247-coverage-baseline`, off `integration/quality-gate-hardening` at `1224aee`), 69 test files / 2271 tests, all passing. Covered / total in parentheses.
106
+
107
+ | Tree | Files | Statements | Branches | Functions | Lines |
108
+ | --------- | ----- | -------------------- | ------------------ | ---------------- | -------------------- |
109
+ | `core/**` | 23 | 91.12% (2063 / 2264) | 91.47% (644 / 704) | 91.75% (89 / 97) | 91.12% (2063 / 2264) |
110
+ | `bin/**` | 2 | 0.00% (0 / 500) | 0.00% (0 / 2) | 0.00% (0 / 2) | 0.00% (0 / 500) |
111
+ | All files | 25 | 74.63% (2063 / 2764) | 91.21% (644 / 706) | 89.89% (89 / 99) | 74.63% (2063 / 2764) |
112
+
113
+ How to read these numbers:
114
+
115
+ - The 0% for `bin/**` is mostly a measurement artifact. `test/unit/cli-binaries.test.ts` and the integration suite run `bin/dev-tasks.ts` by spawning it in a `tsx` child process. V8 coverage instruments only the Vitest worker process, so child-process execution is not recorded.
116
+ - `bin/parse-args.ts` is a real gap as well as an artifact: no test imports it directly, so it is exercised only end to end through the CLI child process.
117
+ - The same artifact affects `core/**`. `core/checks/run.ts` reads 0% (57 statements) because it runs only through `tsx`, from the `lint` script or a child process. The `core/**` baseline is therefore slightly understated, but it is still the meaningful baseline; the `All files` row is pulled down mainly by `bin/**`.
118
+ - Statements and lines are identical because the V8 provider maps coverage per line.
102
119
 
103
120
  When coverage cannot be measured, report `coverage_gate: SKIPPED(<non-empty reason>)` and enumerate untested or weakly tested surfaces, source-to-test ratios, exclusions, and limitations. Never infer zero coverage or a pass.
104
121
 
@@ -116,12 +133,13 @@ This package has no authentication or authorization implementation path in the a
116
133
 
117
134
  ### Environment-fragility patterns
118
135
 
119
- The test suite runs to completion with zero failures. However, some patterns in test design carry environment-fragility risk if new tests adopt them. Avoid these patterns:
136
+ The test suite runs to completion, and its only known intermittent failure is the HEAD-dependent test in item 5 below. Some patterns in test design carry environment-fragility risk if new tests adopt them. Avoid these patterns:
120
137
 
121
138
  - **Root-permission assumptions.** A test that `chmod`s a path unwritable and expects a failure passes only as a non-root user. Root ignores the bits. `test/unit/migrate-docs.test.ts` shows the correct pattern: probe whether writes are actually blocked, and `ctx.skip()` when they are not. `checkCacheDir` and `runUpdate --force` should adopt it if they are written.
122
139
  - **PATH assumptions.** A test that sets `PATH=/usr/bin:/bin` to simulate a missing binary depends on that binary being absent from those directories. `yq` is present at `/usr/bin/yq` in some containers. A purpose-built empty directory is the reliable form.
123
140
 
124
141
  1. `vitest.config.ts`: `restoreMocks` is not enabled. Expected state: enable explicit mock restoration if mocks/stubs are introduced, and retain per-test cleanup for any global stubs.
125
- 2. `package.json` and `vitest.config.ts`: V8 coverage is declared but no usable `test:coverage` command/provider is configured. Expected state: add the approved provider and canonical command in a separate approved change, then record thresholds and baseline; until then coverage is skipped.
126
- 3. CI/deploy wiring: no general CI test job and no deploy workflow invoke the aggregate test command. Expected state: every CI test job and deploy quality gate must run `pnpm run test` or `pnpm run validate`.
127
- 4. Runtime alignment: `publish-npm.yml` uses Node 24 while local development uses Node 26. Both runtimes pass the full test suite with zero failures, so there is no blocker to release. Future work may align these to a single supported range or explicitly document the tested range in the engine constraint.
142
+ 2. Coverage of `bin/**`: resolved for `core/**` by #247 (provider, `test:coverage`, and a recorded baseline). `bin/**` still measures 0% because it is exercised only through child processes, which in-process V8 coverage does not capture. Expected state: either measure child processes (for example via `NODE_V8_COVERAGE`) or record `bin/**` as out of measured scope.
143
+ 3. CI/deploy wiring: the pull request half is resolved by #248 — `validate.yml` runs `pnpm run validate` on every pull request. Still open: no deploy workflow invokes the aggregate test command, and the pull request check is not yet a _required_ status check in branch protection (a manual repository setting, see `docs/runbooks/runbook-configure-branch-protection.md`). Expected state: every CI test job and deploy quality gate runs `pnpm run test` or `pnpm run validate`, and the pull request check is required.
144
+ 4. Runtime alignment: `validate.yml` and `publish-npm.yml` use Node 24 while local development uses Node 26. Both runtimes pass the full test suite (the HEAD-dependent test in item 5 aside, which is not runtime-related), so there is no blocker to release. Future work may align these to a single supported range or explicitly document the tested range in the engine constraint.
145
+ 5. HEAD-dependent test: `test/unit/infra-script-contract.test.ts`, case `deploy.sh prod — ref rules (AC-4) > refuses when the ref is not an annotated tag on main`, expects a refusal and fails when `HEAD` is the tagged release commit. It was observed failing intermittently during the quality-gate-hardening batch (#245–#248). The pull request runbook (`docs/runbooks/runbook-diagnose-pr-validate.md`) tells a reader to re-run the job once when it is the only failure. Expected state: the test's result does not depend on which commit is checked out.
@@ -1,14 +1,14 @@
1
1
  /** A single format finding. */
2
2
  export interface DecisionLogFinding {
3
3
  /** Stable rule identifier, for grouping output. */
4
- rule: "duplicate-id" | "invalid-phase" | "dangling-supersedes";
4
+ rule: "duplicate-id" | "invalid-phase" | "cell-count-mismatch" | "dangling-supersedes";
5
5
  /** Repo-relative path of the file the finding is about. */
6
6
  path: string;
7
7
  /** One line, naming the row and the condition. */
8
8
  message: string;
9
9
  }
10
10
  export interface DecisionLogResult {
11
- /** Findings that fail the gate: duplicate ID, invalid Phase. */
11
+ /** Findings that fail the gate: duplicate ID, invalid Phase, cell-count mismatch. */
12
12
  failures: DecisionLogFinding[];
13
13
  /** Findings that are reported and do not fail the gate: dangling Supersedes. */
14
14
  staleness: DecisionLogFinding[];
@@ -18,14 +18,35 @@ interface Row {
18
18
  phase: string;
19
19
  supersedes: string;
20
20
  }
21
+ /** A body row whose cell count differs from its table header's. */
22
+ interface MalformedRow {
23
+ /** 1-based line number in the file. */
24
+ line: number;
25
+ /** The row's first cell, as split — usually the (possibly mangled) ID. */
26
+ firstCell: string;
27
+ /** Cells the row split into. */
28
+ cells: number;
29
+ /** Cells the header split into. */
30
+ expected: number;
31
+ }
32
+ export interface ParsedDecisionRows {
33
+ /** Rows whose cell count matched their header, read positionally. */
34
+ rows: Row[];
35
+ /** Rows skipped because their cell count did not match (#245). */
36
+ malformed: MalformedRow[];
37
+ }
21
38
  /**
22
39
  * Parse every decision row out of one file's content. A file may hold
23
40
  * several tables (WHAT phase, HOW phase, one per specification phase);
24
41
  * each is read independently by its own header, and all rows are
25
42
  * pooled — `ID` uniqueness and `Supersedes` resolution are file-wide,
26
43
  * not per-table (the format has one ID space for the whole file).
44
+ *
45
+ * A body row is read positionally only after its cell count is checked
46
+ * against the header's; a mismatched row is returned in `malformed`
47
+ * and never in `rows` (#245).
27
48
  */
28
- export declare function parseDecisionRows(content: string): Row[];
49
+ export declare function parseDecisionRows(content: string): ParsedDecisionRows;
29
50
  /**
30
51
  * Check one decision log's already-read content. `path` is the
31
52
  * repo-relative path used only in finding messages.
@@ -1 +1 @@
1
- {"version":3,"file":"decision-log-format.d.ts","sourceRoot":"","sources":["../../../core/checks/decision-log-format.ts"],"names":[],"mappings":"AAyBA,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,IAAI,EAAE,cAAc,GAAG,eAAe,GAAG,qBAAqB,CAAC;IAC/D,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,gFAAgF;IAChF,SAAS,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAUD,UAAU,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAkBD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,EAAE,CAoDxD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,iBAAiB,CA2CxF;AAYD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAY1E"}
1
+ {"version":3,"file":"decision-log-format.d.ts","sourceRoot":"","sources":["../../../core/checks/decision-log-format.ts"],"names":[],"mappings":"AAsCA,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,mDAAmD;IACnD,IAAI,EAAE,cAAc,GAAG,eAAe,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;IACvF,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,qFAAqF;IACrF,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,gFAAgF;IAChF,SAAS,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAUD,UAAU,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,mEAAmE;AACnE,UAAU,YAAY;IACpB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,kEAAkE;IAClE,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B;AAkBD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAqErE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAqDxF;AAYD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAY1E"}
@@ -8,7 +8,20 @@
8
8
  * file (the column is intra-file only — a value that happens to match
9
9
  * another feature's `D-NN` is still dangling here).
10
10
  *
11
- * Uniqueness and `Phase` are hard failures. A dangling `Supersedes` is
11
+ * Every body row must also have exactly as many cells as its table's
12
+ * header (#245). `splitRow` splits on every `|`, and a Markdown-escaped
13
+ * pipe (`\|`) inside a cell is still a `|` to it: the row grows a cell
14
+ * and every later column slides one position right. Read positionally,
15
+ * that row yields garbage — a regex fragment in `Supersedes`, or, for a
16
+ * shift landing after `Supersedes`, a silently corrupted `Author` and
17
+ * `Date` with no finding at all. So a row whose cell count differs from
18
+ * the header's is reported as `cell-count-mismatch` and skipped, never
19
+ * read. Teaching `splitRow` the escape is deliberately not done here;
20
+ * the point is that corruption is loud, not that it is repaired.
21
+ *
22
+ * Uniqueness, `Phase`, and cell count are hard failures — a shifted row
23
+ * makes every column read from it untrustworthy, which is a defect in
24
+ * the file, not work in progress. A dangling `Supersedes` is
12
25
  * reported the same way docs-structure reports staleness (D-21's
13
26
  * precedent): printed, not failed, so a decision log mid-session — a
14
27
  * row citing a `Supersedes` ID not yet appended — never blocks
@@ -49,13 +62,19 @@ function splitRow(line) {
49
62
  * each is read independently by its own header, and all rows are
50
63
  * pooled — `ID` uniqueness and `Supersedes` resolution are file-wide,
51
64
  * not per-table (the format has one ID space for the whole file).
65
+ *
66
+ * A body row is read positionally only after its cell count is checked
67
+ * against the header's; a mismatched row is returned in `malformed`
68
+ * and never in `rows` (#245).
52
69
  */
53
70
  export function parseDecisionRows(content) {
54
71
  const lines = content.split("\n");
55
72
  const rows = [];
73
+ const malformed = [];
56
74
  let idCol = -1;
57
75
  let phaseCol = -1;
58
76
  let supersedesCol = -1;
77
+ let headerCount = 0;
59
78
  let inTable = false;
60
79
  for (let i = 0; i < lines.length; i++) {
61
80
  const line = lines[i];
@@ -76,6 +95,7 @@ export function parseDecisionRows(content) {
76
95
  supersedesCol = headerCells.indexOf("supersedes");
77
96
  if (idCol === -1)
78
97
  continue; // not a decision table
98
+ headerCount = headerCells.length;
79
99
  inTable = true;
80
100
  i++; // consume the separator row too
81
101
  continue;
@@ -83,6 +103,18 @@ export function parseDecisionRows(content) {
83
103
  if (isSeparatorRow(trimmed))
84
104
  continue;
85
105
  const cells = splitRow(trimmed);
106
+ // Before any positional read: a row that split into a different
107
+ // number of cells than its header has shifted columns, and every
108
+ // value read from it by index would be wrong.
109
+ if (cells.length !== headerCount) {
110
+ malformed.push({
111
+ line: i + 1,
112
+ firstCell: cells[0] ?? "",
113
+ cells: cells.length,
114
+ expected: headerCount,
115
+ });
116
+ continue;
117
+ }
86
118
  const id = cells[idCol];
87
119
  if (id === undefined || id.length === 0) {
88
120
  inTable = false;
@@ -94,16 +126,24 @@ export function parseDecisionRows(content) {
94
126
  supersedes: supersedesCol === -1 ? "" : (cells[supersedesCol] ?? ""),
95
127
  });
96
128
  }
97
- return rows;
129
+ return { rows, malformed };
98
130
  }
99
131
  /**
100
132
  * Check one decision log's already-read content. `path` is the
101
133
  * repo-relative path used only in finding messages.
102
134
  */
103
135
  export function checkDecisionLogContent(content, path) {
104
- const rows = parseDecisionRows(content);
136
+ const { rows, malformed } = parseDecisionRows(content);
105
137
  const failures = [];
106
138
  const staleness = [];
139
+ for (const bad of malformed) {
140
+ failures.push({
141
+ rule: "cell-count-mismatch",
142
+ path,
143
+ message: `${path}:${bad.line}: row '${bad.firstCell}' has ${bad.cells} cells, header has ${bad.expected}. ` +
144
+ "A '|' inside a cell — escaped as '\\|' or not — splits it; reword the cell without a pipe.",
145
+ });
146
+ }
107
147
  const seen = new Set();
108
148
  const ids = new Set(rows.map((r) => r.id));
109
149
  for (const row of r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AAE,IAAI,CAAC,CAAC;QACtD,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClC,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AACjC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llipe.com/dev-tasks",
3
- "version": "0.16.1",
3
+ "version": "0.16.4",
4
4
  "description": "AI agent toolkit for structured, PRD-driven development workflows",
5
5
  "type": "module",
6
6
  "imports": {
@@ -48,11 +48,12 @@
48
48
  "typecheck": "tsc --noEmit",
49
49
  "lint": "eslint . --max-warnings 0 && tsx core/checks/run.ts",
50
50
  "lint:fix": "eslint . --fix",
51
- "format": "prettier --write \"bin/\" \"core/\" \"test/\" \"*.json\" \"*.ts\" \"eslint.config.js\" --ignore-unknown",
52
- "format:check": "prettier --check \"bin/\" \"core/\" \"test/\" \"*.json\" \"*.ts\" \"eslint.config.js\" --ignore-unknown",
51
+ "format": "prettier --write \"bin/\" \"core/\" \"test/\" \".claude/\" \".github/\" \".kiro/\" \"*.json\" \"*.ts\" \"eslint.config.js\" --ignore-unknown",
52
+ "format:check": "prettier --check \"bin/\" \"core/\" \"test/\" \".claude/\" \".github/\" \".kiro/\" \"*.json\" \"*.ts\" \"eslint.config.js\" --ignore-unknown",
53
53
  "test": "vitest run",
54
54
  "test:unit": "vitest run test/unit",
55
55
  "test:integration": "vitest run test/integration",
56
+ "test:coverage": "vitest run --coverage",
56
57
  "audit": "pnpm audit --prod",
57
58
  "validate": "pnpm run typecheck && pnpm run lint && pnpm run format:check && pnpm run test"
58
59
  },
@@ -74,6 +75,7 @@
74
75
  "@types/node": "24.13.3",
75
76
  "@typescript-eslint/eslint-plugin": "8.32.1",
76
77
  "@typescript-eslint/parser": "8.32.1",
78
+ "@vitest/coverage-v8": "3.2.6",
77
79
  "eslint": "9.27.0",
78
80
  "eslint-config-prettier": "10.1.5",
79
81
  "globals": "16.1.0",
@@ -92,9 +94,9 @@
92
94
  },
93
95
  "pnpm": {
94
96
  "overrides": {
95
- "brace-expansion@>=2.0.0 <2.1.4": ">=2.1.4",
96
- "brace-expansion@>=4.0.0 <5.0.9": ">=5.0.9",
97
- "brace-expansion@<1.1.18": ">=1.1.18"
97
+ "brace-expansion@>=2.0.0 <2.1.4": "^2.1.4",
98
+ "brace-expansion@>=4.0.0 <5.0.9": "^5.0.9",
99
+ "brace-expansion@<1.1.18": "^1.1.18"
98
100
  }
99
101
  }
100
102
  }