@aviaratech/ai-delivery 0.3.35 → 0.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +12 -206
- package/README.md +56 -554
- package/dist/agent.d.ts +1 -3
- package/dist/agent.js +74 -16
- package/dist/agent.js.map +7 -1
- package/dist/agentReadiness.test.js +73 -67
- package/dist/agentReadiness.test.js.map +7 -1
- package/dist/boardReconcile.test.js +1651 -1590
- package/dist/boardReconcile.test.js.map +7 -1
- package/dist/build.test.js +130 -0
- package/dist/build.test.js.map +7 -0
- package/dist/callerErrors.test.js +91 -0
- package/dist/callerErrors.test.js.map +7 -0
- package/dist/cli.js +389 -517
- package/dist/cli.js.map +7 -1
- package/dist/cliResult.d.ts +2 -2
- package/dist/cliResult.js +42 -45
- package/dist/cliResult.js.map +7 -1
- package/dist/cliResult.test.js +424 -369
- package/dist/cliResult.test.js.map +7 -1
- package/dist/config/deliveryConfig.d.ts +288 -14
- package/dist/config/deliveryConfig.js +472 -390
- package/dist/config/deliveryConfig.js.map +7 -1
- package/dist/config/deliveryConfig.test.js +773 -649
- package/dist/config/deliveryConfig.test.js.map +7 -1
- package/dist/contributorChecks.test.js +1694 -916
- package/dist/contributorChecks.test.js.map +7 -1
- package/dist/currentConsumer.test.js +819 -737
- package/dist/currentConsumer.test.js.map +7 -1
- package/dist/currentTrackingScenario.test.js +499 -479
- package/dist/currentTrackingScenario.test.js.map +7 -1
- package/dist/delivery/common.js +160 -172
- package/dist/delivery/common.js.map +7 -1
- package/dist/delivery/delivery.test.js +509 -431
- package/dist/delivery/delivery.test.js.map +7 -1
- package/dist/delivery/evidence.d.ts +2 -2
- package/dist/delivery/evidence.js +133 -120
- package/dist/delivery/evidence.js.map +7 -1
- package/dist/delivery/index.js +7 -2
- package/dist/delivery/index.js.map +7 -1
- package/dist/delivery/legacy.js +65 -5
- package/dist/delivery/legacy.js.map +7 -1
- package/dist/delivery/policy.d.ts +10 -10
- package/dist/delivery/policy.js +211 -238
- package/dist/delivery/policy.js.map +7 -1
- package/dist/delivery/stage.d.ts +18 -18
- package/dist/delivery/stage.js +220 -235
- package/dist/delivery/stage.js.map +7 -1
- package/dist/deliveryBoard.d.ts +74 -0
- package/dist/deliveryBoard.js +644 -0
- package/dist/deliveryBoard.js.map +7 -0
- package/dist/deliveryBoard.test.js +649 -0
- package/dist/deliveryBoard.test.js.map +7 -0
- package/dist/deliveryHealth.test.js +179 -155
- package/dist/deliveryHealth.test.js.map +7 -1
- package/dist/dependencyCompatibility.test.js +154 -140
- package/dist/dependencyCompatibility.test.js.map +7 -1
- package/dist/directoryIndependent.test.js +417 -383
- package/dist/directoryIndependent.test.js.map +7 -1
- package/dist/dispatch.d.ts +16 -11
- package/dist/dispatch.js +316 -354
- package/dist/dispatch.js.map +7 -1
- package/dist/errors.d.ts +3 -3
- package/dist/errors.js +103 -96
- package/dist/errors.js.map +7 -1
- package/dist/fixtures/deliveryBoardReplay.d.ts +56 -0
- package/dist/fixtures/deliveryBoardReplay.js +617 -0
- package/dist/fixtures/deliveryBoardReplay.js.map +7 -0
- package/dist/fixtures/discovery.d.ts +63 -23
- package/dist/fixtures/discovery.js +96 -90
- package/dist/fixtures/discovery.js.map +7 -1
- package/dist/fixtures/inertEntrypointChild.js +57 -56
- package/dist/fixtures/inertEntrypointChild.js.map +7 -1
- package/dist/fixtures/inertEntrypoints.d.ts +1 -1
- package/dist/fixtures/inertEntrypoints.js +321 -276
- package/dist/fixtures/inertEntrypoints.js.map +7 -1
- package/dist/fixtures/inertTarget.d.ts +78 -7
- package/dist/fixtures/inertTarget.js +769 -691
- package/dist/fixtures/inertTarget.js.map +7 -1
- package/dist/fixtures/issue63.d.ts +4 -3
- package/dist/fixtures/issue63.js +260 -274
- package/dist/fixtures/issue63.js.map +7 -1
- package/dist/fixtures/issueProjectItems.d.ts +20 -0
- package/dist/fixtures/issueProjectItems.js +15 -0
- package/dist/fixtures/issueProjectItems.js.map +7 -0
- package/dist/fixtures/readView.d.ts +120 -0
- package/dist/fixtures/readView.js +172 -0
- package/dist/fixtures/readView.js.map +7 -0
- package/dist/fixtures/recordedGitHubFlows.d.ts +120 -0
- package/dist/fixtures/recordedGitHubFlows.js +109 -0
- package/dist/fixtures/recordedGitHubFlows.js.map +7 -0
- package/dist/genericCompatibility.test.js +64 -55
- package/dist/genericCompatibility.test.js.map +7 -1
- package/dist/git.d.ts +0 -3
- package/dist/git.js +59 -76
- package/dist/git.js.map +7 -1
- package/dist/gitProcess.d.ts +1 -1
- package/dist/gitProcess.js +58 -53
- package/dist/gitProcess.js.map +7 -1
- package/dist/github/client.d.ts +2 -2
- package/dist/github/client.js +484 -379
- package/dist/github/client.js.map +7 -1
- package/dist/github/commandIdentityPolicy.js +42 -52
- package/dist/github/commandIdentityPolicy.js.map +7 -1
- package/dist/github/discovery.d.ts +1 -0
- package/dist/github/discovery.js +197 -215
- package/dist/github/discovery.js.map +7 -1
- package/dist/github/discovery.test.js +223 -177
- package/dist/github/discovery.test.js.map +7 -1
- package/dist/github/issueHistory.d.ts +2 -2
- package/dist/github/issueHistory.js +117 -125
- package/dist/github/issueHistory.js.map +7 -1
- package/dist/github/machineAuth.d.ts +1 -1
- package/dist/github/machineAuth.js +126 -117
- package/dist/github/machineAuth.js.map +7 -1
- package/dist/github/machineAuth.test.js +755 -639
- package/dist/github/machineAuth.test.js.map +7 -1
- package/dist/github/nativeIssueMetadata.js +286 -273
- package/dist/github/nativeIssueMetadata.js.map +7 -1
- package/dist/github/projectDelivery.d.ts +18 -2
- package/dist/github/projectDelivery.js +615 -557
- package/dist/github/projectDelivery.js.map +7 -1
- package/dist/github/relationships.js +433 -389
- package/dist/github/relationships.js.map +7 -1
- package/dist/github/repo.d.ts +1 -0
- package/dist/github/repo.js +123 -96
- package/dist/github/repo.js.map +7 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +7 -1
- package/dist/issue.d.ts +40 -9
- package/dist/issue.js +2102 -1742
- package/dist/issue.js.map +7 -1
- package/dist/issue63History.test.js +40 -42
- package/dist/issue63History.test.js.map +7 -1
- package/dist/issue63Routes.test.js +154 -143
- package/dist/issue63Routes.test.js.map +7 -1
- package/dist/issueBatchUpdate.test.js +989 -885
- package/dist/issueBatchUpdate.test.js.map +7 -1
- package/dist/issueBlockerGuard.test.js +262 -226
- package/dist/issueBlockerGuard.test.js.map +7 -1
- package/dist/issueContract.d.ts +23 -4
- package/dist/issueContract.js +416 -395
- package/dist/issueContract.js.map +7 -1
- package/dist/issueContract.test.d.ts +4 -3
- package/dist/issueContract.test.js +358 -321
- package/dist/issueContract.test.js.map +7 -1
- package/dist/issueDates.test.js +235 -233
- package/dist/issueDates.test.js.map +7 -1
- package/dist/issueInfoReadback.test.js +304 -190
- package/dist/issueInfoReadback.test.js.map +7 -1
- package/dist/issueIntake.test.js +1938 -1732
- package/dist/issueIntake.test.js.map +7 -1
- package/dist/issueJournal.d.ts +40 -19
- package/dist/issueJournal.js +229 -138
- package/dist/issueJournal.js.map +7 -1
- package/dist/issueJournal.test.js +605 -422
- package/dist/issueJournal.test.js.map +7 -1
- package/dist/issueRollup.test.d.ts +1 -0
- package/dist/issueRollup.test.js +476 -0
- package/dist/issueRollup.test.js.map +7 -0
- package/dist/issueTracking.test.js +1059 -989
- package/dist/issueTracking.test.js.map +7 -1
- package/dist/issueWriteRecovery.test.d.ts +1 -0
- package/dist/issueWriteRecovery.test.js +260 -0
- package/dist/issueWriteRecovery.test.js.map +7 -0
- package/dist/lifecycle.test.js +112 -441
- package/dist/lifecycle.test.js.map +7 -1
- package/dist/logger.js +80 -74
- package/dist/logger.js.map +7 -1
- package/dist/mcp/index.js +116 -94
- package/dist/mcp/index.js.map +7 -1
- package/dist/mcp/tools.d.ts +252 -310
- package/dist/mcp/tools.js +235 -342
- package/dist/mcp/tools.js.map +7 -1
- package/dist/pluginAuthProbe.js +63 -52
- package/dist/pluginAuthProbe.js.map +7 -1
- package/dist/pluginAuthProbe.test.js +85 -62
- package/dist/pluginAuthProbe.test.js.map +7 -1
- package/dist/pluginCredentials.test.js +282 -259
- package/dist/pluginCredentials.test.js.map +7 -1
- package/dist/pluginDoctor.test.js +653 -588
- package/dist/pluginDoctor.test.js.map +7 -1
- package/dist/pluginInstaller.d.ts +7 -5
- package/dist/pluginInstaller.js +1173 -1229
- package/dist/pluginInstaller.js.map +7 -1
- package/dist/pluginInstaller.test.js +1842 -1423
- package/dist/pluginInstaller.test.js.map +7 -1
- package/dist/pluginPackaging.test.js +417 -413
- package/dist/pluginPackaging.test.js.map +7 -1
- package/dist/pr.d.ts +114 -131
- package/dist/pr.js +1314 -1327
- package/dist/pr.js.map +7 -1
- package/dist/pr.test.js +967 -653
- package/dist/pr.test.js.map +7 -1
- package/dist/prAssociation.test.js +2419 -1788
- package/dist/prAssociation.test.js.map +7 -1
- package/dist/prDispatch.test.js +123 -89
- package/dist/prDispatch.test.js.map +7 -1
- package/dist/readView.d.ts +184 -0
- package/dist/readView.js +218 -0
- package/dist/readView.js.map +7 -0
- package/dist/readView.test.d.ts +1 -0
- package/dist/readView.test.js +146 -0
- package/dist/readView.test.js.map +7 -0
- package/dist/releaseReconciliation.test.js +267 -288
- package/dist/releaseReconciliation.test.js.map +7 -1
- package/dist/releaseWorkflow.test.js +2493 -422
- package/dist/releaseWorkflow.test.js.map +7 -1
- package/dist/review.d.ts +738 -2
- package/dist/review.js +601 -348
- package/dist/review.js.map +7 -1
- package/dist/review.test.js +1218 -812
- package/dist/review.test.js.map +7 -1
- package/dist/reviewSubmit.test.d.ts +1 -0
- package/dist/reviewSubmit.test.js +747 -0
- package/dist/reviewSubmit.test.js.map +7 -0
- package/dist/services/agentReadinessService.js +42 -37
- package/dist/services/agentReadinessService.js.map +7 -1
- package/dist/services/blockerGuardService.js +188 -188
- package/dist/services/blockerGuardService.js.map +7 -1
- package/dist/services/boardReconcileService.d.ts +125 -125
- package/dist/services/boardReconcileService.js +1295 -1421
- package/dist/services/boardReconcileService.js.map +7 -1
- package/dist/services/deliveryHealthService.js +197 -199
- package/dist/services/deliveryHealthService.js.map +7 -1
- package/dist/services/legacyIssueMigration.js +263 -277
- package/dist/services/legacyIssueMigration.js.map +7 -1
- package/dist/stagedChecks.test.js +396 -194
- package/dist/stagedChecks.test.js.map +7 -1
- package/dist/start.test.js +99 -95
- package/dist/start.test.js.map +7 -1
- package/dist/stdoutRegression.test.js +321 -358
- package/dist/stdoutRegression.test.js.map +7 -1
- package/dist/targetPolicyDiscovery.test.js +141 -143
- package/dist/targetPolicyDiscovery.test.js.map +7 -1
- package/dist/targetPolicyEntrypoints.test.js +308 -269
- package/dist/targetPolicyEntrypoints.test.js.map +7 -1
- package/dist/targetPolicyLocal.test.js +580 -1051
- package/dist/targetPolicyLocal.test.js.map +7 -1
- package/dist/targetPolicyRoutes.test.js +274 -281
- package/dist/targetPolicyRoutes.test.js.map +7 -1
- package/dist/targetRepositoryExecution.test.d.ts +1 -0
- package/dist/targetRepositoryExecution.test.js +451 -0
- package/dist/targetRepositoryExecution.test.js.map +7 -0
- package/dist/terminalMessages.js +41 -35
- package/dist/terminalMessages.js.map +7 -1
- package/dist/toolOutput.d.ts +2 -0
- package/dist/toolOutput.js +36 -0
- package/dist/toolOutput.js.map +7 -0
- package/dist/toolOutput.test.d.ts +1 -0
- package/dist/toolOutput.test.js +240 -0
- package/dist/toolOutput.test.js.map +7 -0
- package/dist/utils/atomicJson.d.ts +0 -2
- package/dist/utils/atomicJson.js +81 -77
- package/dist/utils/atomicJson.js.map +7 -1
- package/dist/utils/filesystem.d.ts +0 -8
- package/dist/utils/filesystem.js +5 -19
- package/dist/utils/filesystem.js.map +7 -1
- package/dist/utils/lockfile.js +68 -71
- package/dist/utils/lockfile.js.map +7 -1
- package/dist/verification.d.ts +1 -54
- package/dist/verification.js +976 -1941
- package/dist/verification.js.map +7 -1
- package/dist/verificationGate.test.js +127 -117
- package/dist/verificationGate.test.js.map +7 -1
- package/dist/version.js +45 -24
- package/dist/version.js.map +7 -1
- package/package.json +9 -8
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/README.md +47 -156
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/THIRD-PARTY-NOTICES.md +238 -44
- package/plugins/ai-delivery/runtime/dist/cli.js +351 -115
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/intake-create/SKILL.md +14 -78
- package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +35 -36
- package/plugins/ai-delivery/skills/worktree-lifecycle/SKILL.md +14 -15
- package/dist/investigationCompletion.test.js +0 -728
- package/dist/investigationCompletion.test.js.map +0 -1
- package/dist/services/deliveryAdmission.d.ts +0 -49
- package/dist/services/deliveryAdmission.js +0 -165
- package/dist/services/deliveryAdmission.js.map +0 -1
- package/dist/services/worktreeRegistry.d.ts +0 -434
- package/dist/services/worktreeRegistry.js +0 -1248
- package/dist/services/worktreeRegistry.js.map +0 -1
- package/dist/setup.d.ts +0 -60
- package/dist/setup.js +0 -585
- package/dist/setup.js.map +0 -1
- package/dist/setup.test.js +0 -3329
- package/dist/setup.test.js.map +0 -1
- package/dist/worktree.d.ts +0 -28
- package/dist/worktree.js +0 -188
- package/dist/worktree.js.map +0 -1
- package/dist/worktreeTransition.d.ts +0 -211
- package/dist/worktreeTransition.js +0 -1037
- package/dist/worktreeTransition.js.map +0 -1
- package/dist/worktreeTransition.test.js +0 -1191
- package/dist/worktreeTransition.test.js.map +0 -1
- /package/dist/{investigationCompletion.test.d.ts → build.test.d.ts} +0 -0
- /package/dist/{setup.test.d.ts → callerErrors.test.d.ts} +0 -0
- /package/dist/{worktreeTransition.test.d.ts → deliveryBoard.test.d.ts} +0 -0
|
@@ -5,96 +5,32 @@ description: Use ai-delivery MCP to read, list, search, create or update GitHub
|
|
|
5
5
|
|
|
6
6
|
# GitHub issue work
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
1. Discover requested installed MCP provider/schema; pass explicit `repo`. Prefixes aren't portable; remote calls need no checkout. Honor read-only/MCP-only/provider/“no other GitHub tool” restrictions. Missing/incompatible providers stop; no tool/actor/credential/permission/config substitution. CLI fallback requires unavailable MCP and permitted restrictions. Tools grant no authority; never evade refusals.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
2. Reads use requested `issue_info`/`issue_list`/`issue_search` only. Before authorized updates inspect full native issue/metadata/relationships; use configured author, not Git identity. Preserve requirements/history; exclude secrets.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
3. Typed intake requires problem/outcome, `behavior`/`verifiedBy`, non-goals, resolved questions/portable context, edge behavior and Bug regression/steps/expected/actual/reproducibility/environment. Native Type/Points: configured 1–8; split13. Blocked/tracking parents cannot autonomously start.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
4. Ready defaults; Draft requires explicitly parked incomplete work and secret checks. Inspect warnings; fix blocking `code`/`field`/`fixHint`. Read `issue_info`/`issue_ready_check` before `issue_start`. [Schemas](https://github.com/aviaratech/ai-delivery/blob/main/src/mcp/tools.ts)/[status fields](https://github.com/aviaratech/ai-delivery/blob/main/src/issueContract.ts), drafts/publication prove neither readiness/review/merge/adoption.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
{"repo": "example/widget", "issueNumber": 17}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Use the repository and issue actually requested. Reading needs no typed intake fields, readiness check or start action. A read-only request stays read-only: call `issue_info` for that read, or the requested `issue_list`/`issue_search` for finding work, without `issue_create`, `issue_update` or `issue_start`. Honor an explicitly selected provider and any “MCP only” or “no other GitHub tool” constraint. If the requested compatible provider is unavailable or its schema differs, report that limitation and stop; do not silently use another provider/CLI or change registrations, permissions, actors, credentials or host configuration.
|
|
21
|
-
|
|
22
|
-
## Issue intake and authorized updates
|
|
23
|
-
|
|
24
|
-
Use the complete native GitHub issue and its live relationships as the current contract. Select the intended repository explicitly and use its configured author identity; Git commit authors are not authentication. Inspect the current title, body, Issue Type, Points, Project status, parent and blockers before updating an existing issue. Preserve every agreed requirement and original history when correcting intake.
|
|
25
|
-
|
|
26
|
-
Gather the concrete problem, intended outcome, affected components/files, and portable evidence. Write each acceptance criterion as `behavior` plus `verifiedBy`: observable input/result plus the proof that establishes it. Include failure or edge behavior, and a regression test for a Bug. State at least one non-goal. Resolve `openQuestions` before proceeding. For Bugs gather ordered steps, expected and actual results, reproducibility and environment. Keep credentials and private keys out of every public field.
|
|
27
|
-
|
|
28
|
-
Choose native Points from the configured values within 1–8. Split a 13-point issue into executable children. Native Issue Type and Points remain authoritative; changing relationships must preserve the intended endpoints and native Project tracking. Tracking parents and issues with open blockers cannot start autonomously.
|
|
29
|
-
|
|
30
|
-
## Typed MCP workflow
|
|
16
|
+
5. Preserve [status/history/legacy retention](https://github.com/aviaratech/ai-delivery/blob/main/src/issue.ts); display blockers aren't native edges; status-only edits preserve other bytes. Validation rejects without writes. Reconcile partial/uncertain writes through native readback before retry; never duplicate creation.
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
2. Use `draft: true` only for explicitly parked, incomplete work. It produces a Draft status; resolve fields and set `draft: false` to resume Ready intake. Drafts still reject secrets. Existing `park` also retains execution as a draft.
|
|
34
|
-
3. Inspect the native readback and warnings. More than seven criteria, absent edge/regression/context, only machine-local evidence or readable text strictly over 4,000 characters warn without blocking. Embedded issue-data is excluded. Consider a smaller scope or better proof.
|
|
35
|
-
4. Read `issue_info` and `issue_ready_check` before `issue_start`. Readiness validates the typed contract and live Points/blockers/tracking/draft state, without local path checks or a runnable-command requirement. Mentioning the Project Todo column is ordinary prose; unresolved decisions belong in `openQuestions`.
|
|
36
|
-
5. Bodies use `<!-- ai-delivery:issue@1 -->` with canonical field data and five status fields: Ready/Draft, last updated in UTC, next milestone (default `Not started`), native blockers (or `None`), and latest journal (`None yet`). Create accepts `status.nextMilestone`; update also accepts display-only `status.blockers` and `status.latestJournal`. These single-line fields work in CLI field files. A status-only patch preserves every byte outside Status, including issue-data/start markers, and an unchanged patch keeps its timestamp. Display blockers do not mutate native dependencies; use `blockedBy` separately. Update typed fields rather than editing one generated copy. Legacy conversion preserves exact prior native history before default render omission, returning the prior/canonical diff. Incoming legacy bytes absent from history remain visible. `preserveHistory` controls history snapshots; `retainLegacyBody` independently controls readable legacy text and does not erase its embedded record or comments. Explicit `retainLegacyBody: false` is a deliberate render drop; with `preserveHistory: false`, the default retains unpreserved legacy text. Retention true keeps text visible even with history preservation. Repeated unchanged updates do not grow the body or duplicate history. Failed history readback or content drift refuses rewriting. Missing proof is reported, never invented. Review the diff and exact native readback.
|
|
18
|
+
6. Batches: 1–50 complete same-repository updates; dry runs write nothing. Inspect ordered results. Reconcile partial/unavailable state; resume skips satisfied outcomes/reuses comments. Rate exhaustion stops remaining writes. No transaction/rollback/automatic replay. CLI `--fields-file`: same patch; explicit flags override, omitted preserve.
|
|
37
19
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Worked example
|
|
41
|
-
|
|
42
|
-
Save this UTF-8 typed field object as `/owned/issue.json` in your task-owned directory:
|
|
20
|
+
Read example:
|
|
43
21
|
|
|
44
22
|
```json
|
|
45
|
-
{
|
|
46
|
-
"title": "Reject invalid widget identifiers before persistence",
|
|
47
|
-
"issueType": "Task",
|
|
48
|
-
"points": 2,
|
|
49
|
-
"problem": "Malformed identifiers currently reach widget persistence.",
|
|
50
|
-
"outcome": "Reject malformed identifiers before any persistence call.",
|
|
51
|
-
"acceptanceCriteria": [
|
|
52
|
-
{
|
|
53
|
-
"behavior": "An invalid identifier returns a typed error without a persistence call.",
|
|
54
|
-
"verifiedBy": "A synthetic persistence regression asserts the error and zero calls."
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"outOfScope": ["Changing the storage engine."],
|
|
58
|
-
"openQuestions": [],
|
|
59
|
-
"context": {
|
|
60
|
-
"components": ["widget intake"],
|
|
61
|
-
"files": ["src/widget.ts"],
|
|
62
|
-
"evidence": ["A portable synthetic malformed identifier fixture."]
|
|
63
|
-
},
|
|
64
|
-
"draft": false
|
|
65
|
-
}
|
|
23
|
+
{"repo":"example/widget","issueNumber":17}
|
|
66
24
|
```
|
|
67
25
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
For an authorized list of 1–50 current-repository updates, use
|
|
71
|
-
`issue_batch_update({repo, items, dryRun})`, or the CLI
|
|
72
|
-
`batch:update --items-file <UTF-8-JSON-array> [--dry-run]`. Each item supports the
|
|
73
|
-
complete `issue_update` contract, including close, defer/undefer, parent,
|
|
74
|
-
blockers, status, typed contract and history/render-retention fields. A per-item
|
|
75
|
-
repository must match the selected repository. Existing author and native guards
|
|
76
|
-
still apply; this tool adds no authority or live fixture permission.
|
|
77
|
-
|
|
78
|
-
Use dry run for read-only intent: it performs no writes, including journals,
|
|
79
|
-
history, metadata, Project or related-issue changes. Inspect each ordered plan
|
|
80
|
-
and current readback. Execution returns applied/unchanged/failed results for all
|
|
81
|
-
items and a summary; CLI retains complete JSON and exits nonzero for any failure.
|
|
82
|
-
Partial writes remain failed with observed state or an explicit unavailable
|
|
83
|
-
readback. Reconcile that existing state before retrying; a rerun skips satisfied
|
|
84
|
-
outcomes and reuses authored comments. Rate exhaustion stops remaining writes,
|
|
85
|
-
reports every remaining item and exposes only numeric rate-limit observations.
|
|
86
|
-
No cross-repository transaction, rollback or automatic mutation replay is implied.
|
|
26
|
+
Ready `/owned/issue.json`:
|
|
87
27
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
28
|
+
```json
|
|
29
|
+
{"title":"Reject invalid widget identifiers before persistence","issueType":"Task","points":2,"problem":"Malformed identifiers currently reach widget persistence.","outcome":"Reject malformed identifiers before persistence.","acceptanceCriteria":[{"behavior":"Invalid identifiers cause no persistence call.","verifiedBy":"Synthetic invalid-ID fixture asserts zero persistence calls."}],"outOfScope":["Changing storage."],"openQuestions":[],"context":{"components":["widget intake"],"files":["src/widget.ts"],"evidence":["Portable synthetic invalid-identifier fixture."]},"draft":false}
|
|
30
|
+
```
|
|
91
31
|
|
|
92
|
-
```
|
|
32
|
+
```sh
|
|
93
33
|
ai-delivery --identity host-author --repo example/widget create --title 'Reject invalid widget identifiers before persistence' --fields-file /owned/issue.json
|
|
94
|
-
ai-delivery --identity host-author --repo example/widget info --issue 17
|
|
95
|
-
ai-delivery --identity host-author --repo example/widget update --issue 17 --fields-file /owned/issue.json --preserve-history
|
|
96
|
-
ai-delivery --identity host-author --repo example/widget ready:check --issue 17
|
|
97
|
-
ai-delivery --identity host-author --repo example/widget start --issue 17
|
|
98
34
|
```
|
|
99
35
|
|
|
100
|
-
|
|
36
|
+
Canonical marker: `<!-- ai-delivery:issue@1 -->`.
|
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "ai-delivery:pr-handoff"
|
|
3
|
-
description:
|
|
3
|
+
description: Open a PR for a GitHub issue, get it independently reviewed through a reviewer App, and merge it.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# PR handoff
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Use this after your change is committed and pushed on the issue branch. The
|
|
9
|
+
target repo's own rules (its `AGENTS.md` or `CONTRIBUTING.md`) decide which
|
|
10
|
+
checks run and whether review is required.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Missing or ambiguous authority leaves the affected mutation pending while independent authorized work continues. Request only the concrete missing scope through the appropriate authorized native user context, naming the operation, repository/PR/head/actor route and any hold or rejection. Already authorized actions need no redundant request. A host refusal remains a refusal even when standing authority exists; these instructions do not guarantee platform acceptance.
|
|
15
|
-
|
|
16
|
-
Preserve each attempted, delivered and executed state, exact rejection reason and actually admitted retry. A denied delegation delivers no instruction and stops its dependent mutations; do not switch actors, use indirect execution or another route to evade it. After an admitted retry is refused, make one concise action-specific native-user request identifying the refusal and its source. The request itself admits no retry: reconcile the concrete cause and current authority before any permitted continuation. Retain earlier failed attempts as failed. Do not repeat successful preflight merely to restate evidence; refresh the live safeguards required by the pending action.
|
|
17
|
-
|
|
18
|
-
A failed or uncertain mutation acknowledgement can follow server success. Reconcile the original operation through supported read-only receipts and the same PR's native state before deciding what remains pending. Record confirmed success once; unknown state admits no duplicate mutation. A read-only network failure alone establishes neither an authorization refusal nor invalid credentials.
|
|
19
|
-
|
|
20
|
-
Fictional `example/widget` PR23 at reviewed head H and base B illustrates these boundaries; these are decisions, not platform tests:
|
|
21
|
-
|
|
22
|
-
- A lead quotes approval with a source ID: retain it as relayed evidence and resolve original scope when needed; the quote is neither local authentication nor an execution receipt.
|
|
23
|
-
- Checks, App access and review dry-run pass with no verified operator grant: submission remains pending and no approval has counted.
|
|
24
|
-
- Delegation and its admitted retry are refused: preserve both undelivered attempts, stop dependent writes and make the single precise native-user request without changing actor or route.
|
|
25
|
-
- The original operator grant covers App submission and promotion: resume only pending admitted operations, read back the exact review and counted approval before promotion, and reconcile an uncertain acknowledgement before retrying. Merge needs its own coverage within the grant and the existing exact-head, current-base, protection, checks, association, serial-lane and native GitHub eligibility guards. Changed source requires fresh verification/review and reconciliation of authority scope.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Run contributor checks through the repository's normal workflow. Keep the resulting commit unchanged through publication and independent review; a changed head requires fresh checks and review.
|
|
29
|
-
|
|
30
|
-
Call `issue_pr_create` with explicit `repo`, issue number, a non-empty body and `dryRun: true`. Inspect configured actor and rule evidence, then create a draft from the GitHub-linked branch. Hosts own commits and pushes. Resolve missing credentials or same-actor routes; unknown approval eligibility is not approval.
|
|
31
|
-
|
|
32
|
-
Obtain a read-only independent review of the exact remote commit, tree and complete diff. Submit its artifact with `issue_pr_review` using the configured reviewer App. A matching review is reused. Inspect GitHub's live required-review decision and checks; submission alone does not prove the approval counted. Resolve stale/dismissed reviews, blockers, failed required checks and moved heads or bases without relaxing protection.
|
|
12
|
+
```sh
|
|
13
|
+
# Open the PR as a draft.
|
|
14
|
+
ai-delivery --repo <owner/name> pr:create --issue <n> --body-file pr-body.md
|
|
33
15
|
|
|
34
|
-
|
|
16
|
+
# The reviewer reads the exact head and diff, writes verdict.json, then submits it.
|
|
17
|
+
ai-delivery review submit --pr <pr> --head <sha> --identity <reviewer-profile> \
|
|
18
|
+
--verdict verdict.json --repo <owner/name>
|
|
35
19
|
|
|
36
|
-
|
|
37
|
-
ai-delivery --repo <owner/name> pr:create --issue <
|
|
38
|
-
ai-delivery --repo <owner/name> pr:
|
|
39
|
-
|
|
40
|
-
ai-delivery --repo <owner/name> pr:review --issue <number> --pr <number> --artifact ./review-artifact.json
|
|
41
|
-
ai-delivery --repo <owner/name> pr:create --issue <number> --ready
|
|
42
|
-
ai-delivery --repo <owner/name> pr:checks --pr <number>
|
|
43
|
-
ai-delivery --repo <owner/name> finish --issue <number> --pr <number> --reviewed-head <reviewed-sha>
|
|
20
|
+
# Mark it ready, check it, and merge.
|
|
21
|
+
ai-delivery --repo <owner/name> pr:create --issue <n> --ready
|
|
22
|
+
ai-delivery --repo <owner/name> pr:checks --pr <pr>
|
|
23
|
+
gh pr merge <pr> --repo <owner/name> --squash --match-head-commit <sha>
|
|
44
24
|
```
|
|
45
25
|
|
|
46
|
-
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **Review.** The builder never submits its own review. A separate reviewer
|
|
29
|
+
agent writes the `ai-delivery.review-verdict@1` file, which holds:
|
|
30
|
+
- the verdict, approve or request-changes;
|
|
31
|
+
- its findings, each marked blocking or non-blocking.
|
|
32
|
+
|
|
33
|
+
The reviewer submits that file itself.
|
|
34
|
+
- **New head.** If the head changes after review, the reviewer reviews the new
|
|
35
|
+
head before merge.
|
|
36
|
+
- **Merging.** GitHub's branch rules decide when the PR can merge.
|
|
37
|
+
`--match-head-commit` merges only the reviewed head. If GitHub refuses, fix
|
|
38
|
+
the reason it gives.
|
|
39
|
+
- **Unclear results.** If a command times out or its result is unclear, run
|
|
40
|
+
`pr:info` before retrying, so you don't create a duplicate.
|
|
41
|
+
- **Reviewer setup.** To check a reviewer App's setup without posting
|
|
42
|
+
anything, run `ai-delivery review doctor --identity <profile>`.
|
|
43
|
+
- **Credentials.** Never print them.
|
|
44
|
+
- **Partial fixes.** For a fix that should leave the issue open, see the
|
|
45
|
+
README's `--non-closing` notes. This is rare.
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Start a GitHub-linked issue branch
|
|
2
|
+
name: 'ai-delivery:worktree-lifecycle'
|
|
3
|
+
description: Start a GitHub-linked issue branch and prepare a host-owned worktree.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Worktree lifecycle
|
|
7
7
|
|
|
8
|
-
Read
|
|
8
|
+
Read the target repository's `AGENTS.md` and `CONTRIBUTING.md` before changing it.
|
|
9
|
+
Use `issue_info` and `issue_ready_check` with an explicit `repo`, then
|
|
10
|
+
`issue_start` to create or reuse the existing issue's GitHub-linked branch.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
Prepare one isolated worktree with the host's supported tools. ai-delivery
|
|
13
|
+
manages GitHub state; the host owns local files, checks and cleanup.
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ai-delivery --repo <owner/name> start --issue <number>
|
|
15
|
-
# Prepare a host-owned worktree, implement, run contributor checks, commit and push.
|
|
16
|
-
```
|
|
15
|
+
Implement the smallest change and run the checks required by that repository.
|
|
16
|
+
Commit and push through the normal host workflow, then use the PR handoff skill.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
This runtime's CLI/MCP cannot reconstruct the historical repository-policy binding, so those transition commands refuse. Use the original controller for their successful execution; retained engine tests do not imply compatibility of the new public entrypoint.
|
|
18
|
+
If a call fails or its result is unclear, read the current issue and branch
|
|
19
|
+
state before retrying. Report refusals without changing actors or permissions.
|
|
20
|
+
Parking an issue preserves its remote tracking; clean up only your own local
|
|
21
|
+
resources.
|