@aviaratech/ai-delivery 0.3.25 → 0.3.27

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 (156) hide show
  1. package/README.md +115 -14
  2. package/dist/agent.d.ts +2 -0
  3. package/dist/agent.js +1 -0
  4. package/dist/agent.js.map +1 -1
  5. package/dist/agentReadiness.test.js +61 -123
  6. package/dist/agentReadiness.test.js.map +1 -1
  7. package/dist/cli.js +121 -32
  8. package/dist/cli.js.map +1 -1
  9. package/dist/cliResult.js +1 -1
  10. package/dist/cliResult.js.map +1 -1
  11. package/dist/cliResult.test.js +18 -0
  12. package/dist/cliResult.test.js.map +1 -1
  13. package/dist/config/deliveryConfig.js +5 -1
  14. package/dist/config/deliveryConfig.js.map +1 -1
  15. package/dist/deliveryHealth.test.d.ts +1 -0
  16. package/dist/deliveryHealth.test.js +167 -0
  17. package/dist/deliveryHealth.test.js.map +1 -0
  18. package/dist/dispatch.d.ts +26 -2
  19. package/dist/dispatch.js +78 -7
  20. package/dist/dispatch.js.map +1 -1
  21. package/dist/fixtures/inertEntrypointChild.d.ts +1 -0
  22. package/dist/fixtures/inertEntrypointChild.js +62 -0
  23. package/dist/fixtures/inertEntrypointChild.js.map +1 -0
  24. package/dist/fixtures/inertEntrypoints.d.ts +49 -0
  25. package/dist/fixtures/inertEntrypoints.js +276 -0
  26. package/dist/fixtures/inertEntrypoints.js.map +1 -0
  27. package/dist/fixtures/inertTarget.d.ts +643 -0
  28. package/dist/fixtures/inertTarget.js +713 -0
  29. package/dist/fixtures/inertTarget.js.map +1 -0
  30. package/dist/fixtures/issue63.d.ts +68 -0
  31. package/dist/fixtures/issue63.js +272 -0
  32. package/dist/fixtures/issue63.js.map +1 -0
  33. package/dist/github/client.d.ts +2 -0
  34. package/dist/github/client.js +94 -12
  35. package/dist/github/client.js.map +1 -1
  36. package/dist/github/issueHistory.d.ts +40 -0
  37. package/dist/github/issueHistory.js +144 -0
  38. package/dist/github/issueHistory.js.map +1 -0
  39. package/dist/github/machineAuth.d.ts +9 -0
  40. package/dist/github/machineAuth.js +135 -0
  41. package/dist/github/machineAuth.js.map +1 -0
  42. package/dist/github/machineAuth.test.d.ts +1 -0
  43. package/dist/github/machineAuth.test.js +409 -0
  44. package/dist/github/machineAuth.test.js.map +1 -0
  45. package/dist/github/projectDelivery.d.ts +2 -0
  46. package/dist/github/projectDelivery.js +6 -0
  47. package/dist/github/projectDelivery.js.map +1 -1
  48. package/dist/github/relationships.d.ts +9 -2
  49. package/dist/github/relationships.js +6 -2
  50. package/dist/github/relationships.js.map +1 -1
  51. package/dist/investigationCompletion.test.d.ts +1 -0
  52. package/dist/investigationCompletion.test.js +728 -0
  53. package/dist/investigationCompletion.test.js.map +1 -0
  54. package/dist/issue.d.ts +24 -6
  55. package/dist/issue.js +169 -21
  56. package/dist/issue.js.map +1 -1
  57. package/dist/issue63History.test.d.ts +1 -0
  58. package/dist/issue63History.test.js +45 -0
  59. package/dist/issue63History.test.js.map +1 -0
  60. package/dist/issue63Routes.test.d.ts +1 -0
  61. package/dist/issue63Routes.test.js +153 -0
  62. package/dist/issue63Routes.test.js.map +1 -0
  63. package/dist/issueBlockerGuard.test.d.ts +1 -0
  64. package/dist/issueBlockerGuard.test.js +162 -0
  65. package/dist/issueBlockerGuard.test.js.map +1 -0
  66. package/dist/issueContract.d.ts +230 -0
  67. package/dist/issueContract.js +341 -0
  68. package/dist/issueContract.js.map +1 -0
  69. package/dist/issueContract.test.d.ts +27 -0
  70. package/dist/issueContract.test.js +314 -0
  71. package/dist/issueContract.test.js.map +1 -0
  72. package/dist/issueIntake.test.d.ts +1 -0
  73. package/dist/issueIntake.test.js +994 -0
  74. package/dist/issueIntake.test.js.map +1 -0
  75. package/dist/issueJournal.d.ts +1 -1
  76. package/dist/issueTracking.test.js +16 -8
  77. package/dist/issueTracking.test.js.map +1 -1
  78. package/dist/mcp/tools.d.ts +135 -11
  79. package/dist/mcp/tools.js +85 -33
  80. package/dist/mcp/tools.js.map +1 -1
  81. package/dist/pluginAuthProbe.d.ts +6 -0
  82. package/dist/pluginAuthProbe.js +53 -0
  83. package/dist/pluginAuthProbe.js.map +1 -0
  84. package/dist/pluginAuthProbe.test.d.ts +1 -0
  85. package/dist/pluginAuthProbe.test.js +66 -0
  86. package/dist/pluginAuthProbe.test.js.map +1 -0
  87. package/dist/pluginCredentials.test.d.ts +1 -0
  88. package/dist/pluginCredentials.test.js +277 -0
  89. package/dist/pluginCredentials.test.js.map +1 -0
  90. package/dist/pluginDoctor.test.d.ts +1 -0
  91. package/dist/pluginDoctor.test.js +627 -0
  92. package/dist/pluginDoctor.test.js.map +1 -0
  93. package/dist/pluginInstaller.d.ts +36 -0
  94. package/dist/pluginInstaller.js +231 -10
  95. package/dist/pluginInstaller.js.map +1 -1
  96. package/dist/pluginInstaller.test.js +29 -0
  97. package/dist/pluginInstaller.test.js.map +1 -1
  98. package/dist/pluginPackaging.test.js +23 -3
  99. package/dist/pluginPackaging.test.js.map +1 -1
  100. package/dist/pr.d.ts +70 -0
  101. package/dist/pr.js +290 -3
  102. package/dist/pr.js.map +1 -1
  103. package/dist/prAssociation.test.js +31 -0
  104. package/dist/prAssociation.test.js.map +1 -1
  105. package/dist/review.test.js +133 -0
  106. package/dist/review.test.js.map +1 -1
  107. package/dist/services/agentReadinessService.d.ts +9 -8
  108. package/dist/services/agentReadinessService.js +32 -224
  109. package/dist/services/agentReadinessService.js.map +1 -1
  110. package/dist/services/blockerGuardService.d.ts +17 -0
  111. package/dist/services/blockerGuardService.js +194 -0
  112. package/dist/services/blockerGuardService.js.map +1 -0
  113. package/dist/services/deliveryAdmission.js +22 -19
  114. package/dist/services/deliveryAdmission.js.map +1 -1
  115. package/dist/services/deliveryHealthService.d.ts +84 -0
  116. package/dist/services/deliveryHealthService.js +206 -0
  117. package/dist/services/deliveryHealthService.js.map +1 -0
  118. package/dist/services/worktreeRegistry.d.ts +84 -0
  119. package/dist/services/worktreeRegistry.js +265 -1
  120. package/dist/services/worktreeRegistry.js.map +1 -1
  121. package/dist/setup.test.js +97 -3
  122. package/dist/setup.test.js.map +1 -1
  123. package/dist/start.test.js +31 -3
  124. package/dist/start.test.js.map +1 -1
  125. package/dist/stdoutRegression.test.js +38 -8
  126. package/dist/stdoutRegression.test.js.map +1 -1
  127. package/dist/targetPolicyDiscovery.test.d.ts +1 -0
  128. package/dist/targetPolicyDiscovery.test.js +150 -0
  129. package/dist/targetPolicyDiscovery.test.js.map +1 -0
  130. package/dist/targetPolicyEntrypoints.test.d.ts +1 -0
  131. package/dist/targetPolicyEntrypoints.test.js +275 -0
  132. package/dist/targetPolicyEntrypoints.test.js.map +1 -0
  133. package/dist/targetPolicyLocal.test.d.ts +1 -0
  134. package/dist/targetPolicyLocal.test.js +707 -0
  135. package/dist/targetPolicyLocal.test.js.map +1 -0
  136. package/dist/targetPolicyRoutes.test.d.ts +1 -0
  137. package/dist/targetPolicyRoutes.test.js +298 -0
  138. package/dist/targetPolicyRoutes.test.js.map +1 -0
  139. package/dist/verification.js +48 -12
  140. package/dist/verification.js.map +1 -1
  141. package/dist/verificationGate.test.d.ts +1 -0
  142. package/dist/verificationGate.test.js +106 -0
  143. package/dist/verificationGate.test.js.map +1 -0
  144. package/dist/worktree.d.ts +6 -1
  145. package/dist/worktree.js +90 -3
  146. package/dist/worktree.js.map +1 -1
  147. package/dist/worktreeTransition.test.js +1 -1
  148. package/dist/worktreeTransition.test.js.map +1 -1
  149. package/package.json +1 -1
  150. package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
  151. package/plugins/ai-delivery/README.md +160 -1
  152. package/plugins/ai-delivery/plugin.json +1 -1
  153. package/plugins/ai-delivery/runtime/dist/cli.js +83 -49
  154. package/plugins/ai-delivery/runtime/package.json +1 -1
  155. package/plugins/ai-delivery/skills/intake-create/SKILL.md +45 -30
  156. package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +20 -0
package/README.md CHANGED
@@ -22,7 +22,7 @@ Create `~/.config/aviaratech-ai/ai-delivery.json`, or set `AI_DELIVERY_CONFIG` t
22
22
  "author": {
23
23
  "identity": "host-author",
24
24
  "authSource": "personal",
25
- "credentialEnv": { "token": "DELIVERY_AUTHOR_TOKEN" }
25
+ "credentialEnv": { "token": "GH_TOKEN" }
26
26
  },
27
27
  "reviewer": {
28
28
  "identity": "delivery-reviewer",
@@ -38,7 +38,11 @@ Create `~/.config/aviaratech-ai/ai-delivery.json`, or set `AI_DELIVERY_CONFIG` t
38
38
  }
39
39
  ```
40
40
 
41
- An App author uses the same `credentialEnv` shape as the reviewer. Roles and credential environment names must be distinct. Credential values and private keys remain outside source control. A configured personal author uses only its named token variable. The optional `--identity` or `AI_DELIVERY_IDENTITY` override must select the command's configured role; neither is needed for normal operation. The explicit legacy `--identity personal --personal-auth` override is limited to development access diagnosis under an App author configuration; publication requires the configured author.
41
+ An App author uses the same `credentialEnv` shape as the reviewer. Roles and credential environment names must be distinct. Credential values and private keys remain outside source control. A configured personal author uses its named token variable. With the conventional `GH_TOKEN` reference **absent**, it instead uses the existing active personal account from GitHub CLI `gh` for `github.com`. A present empty, malformed or expired token fails without switching accounts. A custom reference such as `DELIVERY_AUTHOR_TOKEN` always requires that exact value; its absence does not select a machine session. Unrelated `GITHUB_TOKEN` values do not satisfy either configured reference. The optional `--identity` or `AI_DELIVERY_IDENTITY` override must select the command's configured role; neither is needed for normal operation. The explicit legacy `--identity personal --personal-auth` override is limited to development access diagnosis under an App author configuration; it requires an explicit token and does not use a missing-token machine fallback. Publication requires the configured author.
42
+
43
+ The machine route uses `gh auth status --hostname github.com --active --json hosts`, validates the selected account's state, then privately obtains that exact user's credential through `gh auth token --hostname github.com --user <active-user>`. An actual authenticated user read must match the selection. Repository discovery and command execution retain that account; failed identity/access never selects another account. Inactive accounts with errors do not invalidate a healthy active user. Only required non-secret home/PATH/gh configuration selectors reach `gh`; token overrides, debug flags and unrelated credentials are excluded. No login, switch, refresh, credential-store scraping or persistent configuration change occurs. The reviewer still uses its distinct configured App, with no personal-session fallback.
44
+
45
+ `gh` must be executable on the running process's PATH and able to access its existing session. A terminal login does not prove that a Codex or Claude GUI process can find `gh` or use its keyring. `config:resolve` reports the selected route/executable and authenticated actor, or a safe actionable refusal. Default plugin doctor does not inspect or authenticate the session. This package currently supports `github.com` repositories; enterprise URLs or a conflicting `GH_HOST` refuse rather than silently using another host. No write probe or permission grant is performed, and a successful identity/repository read does not guarantee every later write or counted App approval.
42
46
 
43
47
  The explicit organization Project number selects a compatible writable Project. Optional `pointsField`, `priorityField`, `statusField`, four `statuses` names (`todo`, `inProgress`, `blocked`, `done`), and `issueTypes` customize discovered metadata. Defaults are Points, Priority, Status and Todo/In Progress/Blocked/Done. IDs, option catalogs and issue types come from GitHub. This runtime supports github.com organization repositories and native organization single-select Points/Priority fields bound into the selected Project.
44
48
 
@@ -62,7 +66,38 @@ ai-delivery --repo example/widget pr:checks --pr 23
62
66
  ai-delivery --repo example/widget finish --issue 17 --pr 23 --reviewed-head <reviewed-sha>
63
67
  ```
64
68
 
65
- `start` creates or reuses a GitHub-linked branch from the repository's default branch. It can create a tracking issue first, or resume a known partially created issue with `--resume-created`; recovery returns the exact known issue and safe arguments without creating another issue. Hosts own local worktree preparation and cleanup. PR creation accepts any non-empty body, appends the issue closing reference when absent, and reuses the matching remote branch/PR. Merged completion uses GitHub issue association even after branch deletion. Existing repository labels are accepted; an unknown label is refused before issue mutation.
69
+ `start` creates or reuses a GitHub-linked branch from the repository's default branch. A ready open issue with no unresolved native blockers is explicitly activated: the selected Project item becomes In Progress (using configured field/option names), with exact readback before the Started journal. An already active item is reused; missing membership is added only for that issue. Closed issues, parked drafts, unresolved blockers and archived Project items refuse activation. Info, body-only edits, PR dry runs and host worktree preparation do not activate work.
70
+
71
+ It can create a tracking issue first, or resume a known partially created issue with `--resume-created`; recovery returns the exact known issue and safe arguments without creating another issue.
72
+
73
+ If an existing issue's branch, Project status or journal operation fails or its response is uncertain, `start-incomplete` returns the known issue, failure phase and `safeResume.arguments`; CLI exits nonzero. Retry those arguments through `issue_start` (or `start --issue <number> --branch <branch>` when returned). Recovery rechecks current readiness, linked branches, Project membership/status and the authored journal before continuing, without creating another issue, branch or journal. Newly created issues retain `created-not-started` recovery. Only incomplete tracking returns `resumeCreated: true` with tracking fields; later start-stage recovery selects the known issue/branch and preserves subsequent native edits and parking.
74
+
75
+ Hosts own local worktree preparation and cleanup. PR creation accepts any non-empty body, appends the issue closing reference when absent, and reuses the matching remote branch/PR. Merged completion uses GitHub issue association even after branch deletion. Existing repository labels are accepted; an unknown label is refused before issue mutation.
76
+
77
+ For a new read-only investigation, the host first creates the linked `issue/N` worktree at the matching clone's exact `.worktrees/issue-N` path. Before investigating, explicitly register its unchanged current default commit:
78
+
79
+ ```sh
80
+ ai-delivery --repo example/widget --repo-root /clone start --issue 17 \
81
+ --investigation-worktree /clone/.worktrees/issue-17 --expected-head <initial-sha>
82
+ ```
83
+
84
+ This author operation records prospective commit/tree, physical worktree identity, canonical registry custody and a native preparation acknowledgement. It creates no branch or worktree and refuses existing legacy custody. Historical investigations without this preparation cannot be adopted retrospectively.
85
+
86
+ After independently reviewing the complete result, preserve it in a private regular file outside the worktree. The issue must already be closed with reason `completed`, with no PR associated with its linked branch. Inspection prints the exact operator authority body and, when its comment ID is supplied, the configured-App acceptance body:
87
+
88
+ ```sh
89
+ ai-delivery --repo example/widget --repo-root /clone finish --issue 17 \
90
+ --investigation --result /retained/result.txt --dry-run
91
+ ai-delivery --repo example/widget --repo-root /clone finish --issue 17 \
92
+ --investigation --result /retained/result.txt --authority-comment <operator-comment> --dry-run
93
+ ai-delivery --repo example/widget --repo-root /clone finish --issue 17 \
94
+ --investigation --result /retained/result.txt \
95
+ --authority-comment <operator-comment> --acceptance-comment <app-comment>
96
+ ```
97
+
98
+ Completion consumes existing whole native comments from the configured personal operator and distinct configured reviewer App. These bind the preparation, exact result bytes, unchanged commit/tree and removal scope, including producer quiescence and continued exclusion of writers. This path supplies no non-PR App acceptance writer; unavailable authentic acceptance is a refusal, never a local approval substitute. Keep the result, native acceptance and producer exclusion available through interruption and resume.
99
+
100
+ Run completion from outside the investigation worktree. Dirty, untracked or ignored files, `assume-unchanged` or `skip-worktree` index entries, new commits (including same-tree commits), changed native refs, ambiguous or foreign custody and retained verification writers refuse removal. PR/merge options are incompatible with investigation mode. A durable intent preserves the result, native authority and exact registry beforeimage before non-force Git removal. Resume the same command and evidence after an interruption; unexplained absence or recreated worktrees refuse. Exact disk/Git/registry postconditions seal completion. The branch, private evidence and unrelated registry entries remain retained; ordinary source delivery still requires its full merged-PR proof.
66
101
 
67
102
  Use explicit `--non-closing` on each PR command when delivering a partial fix while its issue remains OPEN. The default closing lifecycle above is unchanged. A non-closing body begins with exactly `References owner/repository#number` on its first line. Creation adds this line to the supplied body; inspection, review, promotion and merge require it to remain unchanged in meaning.
68
103
 
@@ -115,7 +150,30 @@ the managed version units for recovery and uses Claude Code's `--keep-data`.
115
150
  Every command supports `--dry-run` and `--json`. Dry-run reports the target
116
151
  without fetching an archive, running a native command, or writing configuration.
117
152
  Doctor reports managed installation and source integrity, skills, and a direct
118
- stdio startup check of the selected bundled MCP server. Restart the native host
153
+ credential-free stdio startup check of the selected bundled MCP server. Startup
154
+ means that the server initialized and listed its tools; it does not validate
155
+ user settings, receive GitHub credentials, or authenticate either delivery role.
156
+ For an opt-in authentication check, select a repository explicitly:
157
+
158
+ ```sh
159
+ ai-delivery --repo example/widget plugin doctor --host codex --scope user --check-auth --json
160
+ ```
161
+
162
+ This checks settings and required process references before running the verified,
163
+ enabled plugin's selected CLI `config:resolve`. It reports authenticated actors,
164
+ repository access and visible review rules separately. Only configured credential
165
+ names and required runtime selectors reach that subprocess; an absent default
166
+ `GH_TOKEN` may use the selected machine session. Unrelated tokens and
167
+ legacy personal overrides do not. Missing or invalid inputs stop before key
168
+ access or network authentication. An eligible machine route is explicitly
169
+ authenticated through `gh` and the selected client after those gates. Dry-run
170
+ performs none of these checks.
171
+ The readback is labelled `selected_runtime_cli`; it does not prove GUI credential
172
+ propagation or counted exact-head approval. `config:resolve` remains available
173
+ for direct CLI readback; check an actual native tool call separately. The
174
+ [credential and readiness guide](plugins/ai-delivery/README.md#credentials-and-readiness)
175
+ explains the environment boundary and the evidence to retain without secrets.
176
+ Restart the native host
119
177
  after changing a plugin so it reloads that selection. Installing a plugin does not admit a consumer controller. Ordinary remote GitHub delivery uses user configuration; explicit controller staging and admission remain separate operations.
120
178
 
121
179
  First read `config:resolve` with the configured author, then stage a reviewed
@@ -194,6 +252,49 @@ Legacy transitions remain explicit preservation operations. Inspection returns e
194
252
 
195
253
  The remote contract is `ai-delivery.mcp@2`. CLI and MCP call the same owners. Issue listing/search preserve native filters, pagination, literal search boundaries and repository-qualified relationships. Issue updates preserve typed journals, history-before-rewrite and native reasoned closure. `issue_info.worktree` is null. Offline `migrate:legacy-issues --input-file` remains a read-only plan. Public exports expose remote delivery, metadata, digest utilities and explicit setup; removed executable policy/stage/evidence APIs are not exported.
196
254
 
255
+ ## Blocker overrides and delivery health
256
+
257
+ `create`, `start` and `update` accept `--blocks <issue-numbers>` to add the
258
+ selected issue as a native blocker of named dependents. This preserves those
259
+ dependents' other blockers. `--blocked-by` retains its exact-set replacement
260
+ semantics. The corresponding MCP inputs are `blocks` and `blockedBy`.
261
+
262
+ A genuinely new blocker on configured-Project **In Progress** work requires
263
+ `--override-reason <reason>` / `overrideReason` (1–2,000 trimmed characters).
264
+ The configured author must authenticate, and an author-verified comment must
265
+ precede the native edge. Existing edges and removals require no override.
266
+ Unresolved dependent status refuses additions. Creation preflights existing
267
+ dependents before creating the new issue. A retry reuses the same verified
268
+ comment for the same native removal episode; a later remove/re-add records a
269
+ new episode. Comments record intent, not successful dependency writes.
270
+
271
+ GitHub does not atomically lock status, comments and relationships. Every actual
272
+ addition is rechecked at its write boundary. A later failure can follow earlier
273
+ writes; inspect native state and resume the known issue rather than recreate it.
274
+ If creation partially succeeds, the existing known-created recovery identifies
275
+ that issue. Low-level exported relationship primitives remain available to
276
+ callers that own their own policy; the guard applies to canonical issue writes.
277
+
278
+ ```sh
279
+ ai-delivery --repo example/widget update --issue 17 --blocked-by 18 --override-reason 'Await prerequisite validation'
280
+ ai-delivery --repo example/widget health --from 2026-10-01T00:00:00Z --to 2026-10-08T00:00:00Z
281
+ ```
282
+
283
+ `delivery_health` / `health` requires an explicit repository and UTC `[from,to)`
284
+ window. It reports distinct issues opened and closed, current open In Progress
285
+ work in that repository lane of the configured Project, oldest active issues by
286
+ creation time, and distinct native blocker additions classified by proven
287
+ historical Project membership and status. Reopen/reclose counts one closed issue
288
+ per window. Unknown history is separate and never a violation verdict. Age is
289
+ since issue creation, not time spent in progress.
290
+
291
+ The window must end at or before collection time. The read-only snapshot is non-atomic and records collection timestamps. Defaults
292
+ are 200 issues, five timeline pages per issue, five Project item pages per
293
+ status read and ten oldest issues; bounds are 500 issues, 20 pages per read
294
+ and 20 oldest issues. `--max-project-pages` bounds Project status collection. Limits and read failures
295
+ produce explicit partial **observed** counts, not complete zeroes. Issues whose
296
+ current Project status cannot be resolved have a separate unknown count.
297
+
197
298
  ## Typed issue journals
198
299
 
199
300
  `issue_comment` posts a typed journal through the configured author role. The public
@@ -222,12 +323,12 @@ operator's machine. Validation requires HTTPS with a DNS hostname; it rejects
222
323
  file paths, credential-bearing URLs, IP literals, localhost and `.local` names.
223
324
  It does not probe remote reachability. Each kind also requires these fields:
224
325
 
225
- | Kind | Required fields |
226
- | --- | --- |
227
- | `start` | `outcome` |
228
- | `progress` | `done` (nonempty list), `decisionNeeded`; at least one evidence link |
229
- | `decision` | `decision`, `rationale` |
230
- | `blocker` | `blocker`, `resolution` |
326
+ | Kind | Required fields |
327
+ | ---------- | ----------------------------------------------------------------------------------------- |
328
+ | `start` | `outcome` |
329
+ | `progress` | `done` (nonempty list), `decisionNeeded`; at least one evidence link |
330
+ | `decision` | `decision`, `rationale` |
331
+ | `blocker` | `blocker`, `resolution` |
231
332
  | `closeout` | `acceptance` (nonempty `{criterion, evidence}` list), `followUps` (list; empty when none) |
232
333
 
233
334
  Optional `details` adds supporting prose. `lengthCap` (600–10,000 characters,
@@ -262,10 +363,10 @@ original start or exact-merge closeout even after a lost response or worktree
262
363
  cleanup. Markers from another author never establish reuse. Operations from the
263
364
  same local controller serialize their comment writes; independently configured
264
365
  controllers still require one issue owner. A failed journal write/readback is
265
- reported and the same lifecycle call can recover it. Creation-only start failures
266
- return the created issue identity and `safeResume.arguments` with
267
- `resumeCreated: true` and `develop: false`, so recovery never creates another
268
- issue or starts development. Historical comments are
366
+ reported and the same lifecycle call can recover it. Created-issue failures
367
+ return the exact issue identity and `safeResume.arguments`. Incomplete tracking
368
+ uses `resumeCreated: true`; later start recovery preserves the current native
369
+ body and eligibility without replaying the original tracking fields. Historical comments are
269
370
  preserved. Generated issue Status blocks and general readability warnings are
270
371
  owned by the separate issue-contract work.
271
372
 
package/dist/agent.d.ts CHANGED
@@ -19,3 +19,5 @@ export type { DeliveryRouting, DiscoveryClients } from './github/discovery.js';
19
19
  export type { DeliveryOverrides, DeliveryPolicySettings, LoadedDeliverySettings } from './config/deliveryConfig.js';
20
20
  export { stageRuntime, admitRuntime, RuntimeAdmissionCommitUnknownError } from './setup.js';
21
21
  export type { StageRuntimeInput, AdmitRuntimeInput, RuntimeStageResult } from './setup.js';
22
+ export { deliveryHealth } from './services/deliveryHealthService.js';
23
+ export type { DeliveryHealthRequest } from './services/deliveryHealthService.js';
package/dist/agent.js CHANGED
@@ -12,4 +12,5 @@ export { normalizeLegacyIssue, planOfflineLegacyIssueMigration } from './service
12
12
  export { withVerificationFilesystemFixture } from './verification.js';
13
13
  export { discoverDeliveryRouting } from './github/discovery.js';
14
14
  export { stageRuntime, admitRuntime, RuntimeAdmissionCommitUnknownError } from './setup.js';
15
+ export { deliveryHealth } from './services/deliveryHealthService.js';
15
16
  //# sourceMappingURL=agent.js.map
package/dist/agent.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OA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,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAItD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzG,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AAC3G,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAIhE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AAG5F,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC"}
@@ -1,139 +1,77 @@
1
1
  import assert from 'node:assert/strict';
2
- import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
2
+ import { mkdtempSync, rmSync } from 'node:fs';
3
3
  import { tmpdir } from 'node:os';
4
4
  import { join } from 'node:path';
5
- import { afterEach, beforeEach, describe, test } from 'vitest';
5
+ import { test } from 'vitest';
6
6
  import { evaluateAgentReadiness } from './agent.js';
7
- let repoRoot;
8
- beforeEach(() => {
9
- repoRoot = mkdtempSync(join(tmpdir(), 'readiness-currency-'));
10
- for (const path of ['src/feature.ts', 'src/$1.ts', 'docs/guide.md', '$1/config.ts']) {
11
- const filename = join(repoRoot, path);
12
- mkdirSync(join(filename, '..'), { recursive: true });
13
- writeFileSync(filename, 'Synthetic feature fixture.\n');
14
- }
15
- });
16
- afterEach(() => rmSync(repoRoot, { recursive: true, force: true }));
17
- function body(scope, evidence = '') {
18
- return [
19
- '## Problem',
20
- 'Keep feature behavior correct while evaluating a bounded change.',
21
- '## Scope',
22
- scope,
23
- '## Acceptance Criteria',
24
- '- [ ] The intended feature works.',
25
- '- [ ] Existing behavior is preserved.',
26
- '## Verification',
27
- '`npm run checks`',
28
- '## Current State',
29
- evidence,
30
- ].join('\n');
7
+ import { IssueFields, renderIssueBody } from './issueContract.js';
8
+ function fixture() {
9
+ return IssueFields.parse({
10
+ title: 'Reject invalid widget identifiers before persistence',
11
+ points: 2,
12
+ problem: 'The Project Todo column tracks work; TODO/TBD are literal documentation.',
13
+ outcome: 'Reject malformed widget identifiers.',
14
+ acceptanceCriteria: [
15
+ {
16
+ behavior: 'An invalid widget identifier returns an error without a write.',
17
+ verifiedBy: 'A synthetic mock asserts no write.',
18
+ },
19
+ ],
20
+ outOfScope: ['Changing storage.'],
21
+ context: { files: ['src/absent.ts'], components: [], evidence: [] },
22
+ });
31
23
  }
32
- function evaluate(scope, overrides = {}) {
24
+ function evaluate(overrides = {}) {
25
+ const issue = fixture();
33
26
  return evaluateAgentReadiness({
34
- body: body(scope),
27
+ title: issue.title,
28
+ body: renderIssueBody(issue),
35
29
  points: 2,
36
- repoRoot,
37
- title: 'Improve the synthetic feature',
30
+ repoRoot: undefined,
38
31
  ...overrides,
39
32
  });
40
33
  }
41
- describe('inline monetary prose in declared readiness scope', () => {
42
- test.each(['$1/$2', '$1', '$2.50', '$1,000.00', '$0.50 / $2.00', '$1-$2', '$1–$2'])('accepts an existing scope path with monetary prose %s without false path or evidence requirements', (currency) => {
43
- assert.deepEqual(evaluate(`- \`src/feature.ts\`\nPrices are \`${currency}\`.`), {
44
- ready: true,
45
- failures: [],
46
- });
47
- });
48
- test('handles whitespace and several independent monetary spans', () => {
49
- assert.equal(evaluate('- `src/feature.ts`\nPrices are ` $1/$2 `, `$3.50` and `$4`.').ready, true);
50
- });
51
- test.each(['$1/$2', '$2.50', '$1,000.00'])('does not let monetary prose %s substitute for declared scope', (currency) => {
52
- assert.deepEqual(evaluate(`Prices are \`${currency}\`.`).failures.map((failure) => failure.code), ['scope']);
53
- });
54
- test('does not let currency-only scope pass when no local repository root is available', () => {
55
- assert.deepEqual(evaluate('Prices are `$1/$2`.', { repoRoot: undefined }).failures.map((failure) => failure.code), ['scope']);
56
- });
57
- test('ignores monetary prose without changing path syntax validation when the root is unavailable', () => {
58
- assert.equal(evaluate('- `src/feature.ts`\nPrices are `$1/$2`.', { repoRoot: undefined }).ready, true);
59
- assert.equal(evaluate('- `../feature.ts`\nPrices are `$1/$2`.', { repoRoot: undefined }).ready, false);
60
- });
34
+ test('readiness from a non-git directory accepts Todo prose, absent paths and portable non-command verification', () => {
35
+ const prior = process.cwd();
36
+ const root = mkdtempSync(join(tmpdir(), 'typed-readiness-'));
37
+ try {
38
+ process.chdir(root);
39
+ const result = evaluate();
40
+ assert.equal(result.ready, true);
41
+ assert.deepEqual(result.failures, []);
42
+ }
43
+ finally {
44
+ process.chdir(prior);
45
+ rmSync(root, { recursive: true, force: true });
46
+ }
47
+ });
48
+ test('one or eight observable criteria are valid; count warns above seven', () => {
49
+ for (const count of [1, 8]) {
50
+ const issue = fixture();
51
+ issue.acceptanceCriteria = Array.from({ length: count }, () => ({ ...issue.acceptanceCriteria[0] }));
52
+ const result = evaluate({ body: renderIssueBody(issue) });
53
+ assert.equal(result.ready, true);
54
+ assert.equal(result.warnings.some((w) => w.code === 'many-criteria'), count === 8);
55
+ }
61
56
  });
62
- describe('preserved path and evidence requirements', () => {
63
- test.each(['src/feature.ts', './src/feature.ts', 'src\\feature.ts', 'src/feature.ts:3', 'src/feature.ts:3:2'])('accepts the existing path syntax %s', (path) => assert.equal(evaluate(`- \`${path}\`\nPrices are \`$1/$2\`.`).ready, true));
64
- test.each(['src/$1.ts', '$1/config.ts'])('preserves existing dollar-bearing paths %s', (path) => assert.equal(evaluate(`- \`${path}\``).ready, true));
65
- test.each([
66
- 'src/missing.ts',
67
- 'missing',
68
- '../outside.ts',
69
- 'src/../../outside.ts',
70
- '/absolute.ts',
71
- '..\\outside.ts',
72
- 'src/$2.ts',
73
- '$2/config.ts',
74
- '$1/$2.ts',
75
- '$HOME',
76
- '1/2',
77
- 'USD 1/2',
78
- '$1/$2suffix',
79
- '$1,00',
80
- 'arbitrary inline prose',
81
- 'npm run checks',
82
- ])('still rejects missing, invalid or non-currency inline scope %s', (path) => {
83
- const result = evaluate(`- \`src/feature.ts\`\n- \`${path}\`\nPrices are \`$1/$2\`.`);
57
+ for (const [name, override, code] of [
58
+ ['missing live Points', { points: undefined }, 'points'],
59
+ ['open native blocker', { blockedBy: [17] }, 'blocked'],
60
+ ['tracking parent', { trackingParent: true }, 'tracking-parent'],
61
+ ])
62
+ test(name + ' blocks independently of a valid body', () => {
63
+ const result = evaluate(override);
84
64
  assert.equal(result.ready, false);
85
- assert.ok(result.failures.some((failure) => failure.code === 'scope'));
86
- });
87
- test('does not let currency hide a missing declared path', () => {
88
- assert.ok(evaluate('- `src/missing.ts`\nPrices are `$1/$2`.').failures.some((failure) => failure.code === 'scope'));
89
- });
90
- test('keeps repository-backed evidence mandatory for contract-sensitive scope', () => {
91
- const scope = '- `src/feature.ts`\nPrices are `$1/$2`.';
92
- const input = body(scope).replace('bounded change', 'contract-sensitive change');
93
- assert.deepEqual(evaluate(scope, { body: input }).failures.map((failure) => failure.code), ['evidence']);
94
- assert.equal(evaluate(scope, { body: `${input}\nObserved implementation: \`src/feature.ts\`.` }).ready, true);
95
- });
96
- test('keeps evidence mandatory for multiple real ownership roots', () => {
97
- const scope = '- `src/feature.ts`\n- `docs/guide.md`\nPrices are `$1/$2`.';
98
- assert.deepEqual(evaluate(scope).failures.map((failure) => failure.code), ['evidence']);
99
- assert.equal(evaluate(scope, { body: body(scope, 'Observed implementation: `src/feature.ts`.') }).ready, true);
100
- });
101
- test('keeps evidence mandatory for aggregate scope', () => {
102
- const scope = '- `.`\nPrices are `$1/$2`.';
103
- assert.deepEqual(evaluate(scope).failures.map((failure) => failure.code), ['evidence']);
104
- assert.equal(evaluate(scope, { body: body(scope, 'Observed implementation: `src/feature.ts`.') }).ready, true);
105
- });
106
- test('does not treat currency or a missing path outside Scope as repository-backed evidence', () => {
107
- const scope = '- `src/feature.ts`';
108
- const input = body(scope, 'Observed prices: `$1/$2`; absent implementation: `src/missing.ts`.').replace('bounded change', 'contract-sensitive change');
109
- assert.deepEqual(evaluate(scope, { body: input }).failures.map((failure) => failure.code), ['evidence']);
65
+ assert.ok(result.failures.some((f) => f.code === code));
110
66
  });
67
+ test('draft and structured open questions block even without TODO markers', () => {
68
+ for (const changed of [{ draft: true }, { openQuestions: ['Select the persistence contract.'] }]) {
69
+ const issue = { ...fixture(), ...changed };
70
+ assert.equal(evaluate({ body: renderIssueBody(issue) }).ready, false);
71
+ }
111
72
  });
112
- describe('preserved non-scope readiness gates', () => {
113
- const scope = '- `src/feature.ts`\nPrices are `$1/$2`.';
114
- test('requires configured points', () => {
115
- assert.deepEqual(evaluateAgentReadiness({ body: body(scope), repoRoot, title: 'Improve the synthetic feature' }).failures.map((failure) => failure.code), ['points']);
116
- });
117
- test('requires two to five acceptance criteria', () => {
118
- const input = body(scope).replace('- [ ] Existing behavior is preserved.\n', '');
119
- assert.deepEqual(evaluate(scope, { body: input }).failures.map((failure) => failure.code), ['acceptance-criteria']);
120
- });
121
- test('requires executable verification', () => {
122
- const input = body(scope).replace('`npm run checks`', 'Inspect the change.');
123
- assert.deepEqual(evaluate(scope, { body: input }).failures.map((failure) => failure.code), ['verification']);
124
- });
125
- test('requires a substantive outcome or problem', () => {
126
- const input = body(scope).replace('Keep feature behavior correct while evaluating a bounded change.', 'Brief.');
127
- assert.deepEqual(evaluate(scope, { body: input }).failures.map((failure) => failure.code), ['outcome']);
128
- });
129
- test('refuses native blockers', () => {
130
- assert.deepEqual(evaluate(scope, { blockedBy: [17] }).failures.map((failure) => failure.code), ['blocked']);
131
- });
132
- test('refuses tracking parents', () => {
133
- assert.deepEqual(evaluate(scope, { trackingParent: true }).failures.map((failure) => failure.code), ['tracking-parent']);
134
- });
135
- test('refuses unresolved decisions', () => {
136
- assert.deepEqual(evaluate(scope, { body: `${body(scope)}\nTBD` }).failures.map((failure) => failure.code), ['unresolved']);
137
- });
73
+ test('native Points drift and visible/payload divergence cannot pass canonical readiness', () => {
74
+ assert.ok(evaluate({ points: 3 }).failures.some((f) => f.code === 'points.sync'));
75
+ assert.ok(evaluate({ body: renderIssueBody(fixture()).replace('## Status', '## Changed status') }).failures.some((f) => f.code === 'body.canonical'));
138
76
  });
139
77
  //# sourceMappingURL=agentReadiness.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentReadiness.test.js","sourceRoot":"","sources":["../src/agentReadiness.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,IAAI,QAAgB,CAAC;AAErB,UAAU,CAAC,GAAG,EAAE;IACd,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,MA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