@erclx/aitk 3.31.0 → 3.33.0
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: claude-autoship
|
|
3
|
-
description: Chains implement → verify → review → ship after a feature plan is approved. Reads the plan for the current branch, runs the full pipeline in one session, and stops on any failure or non-minor review finding. Use when asked to "autoship", "ship this feature end to end", or "run the chain". Do NOT auto-trigger. Requires an approved plan file.
|
|
3
|
+
description: Chains implement → verify → review → ship after a feature plan is approved. Reads the plan the caller names, or the plan for the current branch when none is named, runs the full pipeline in one session, and stops on any failure or non-minor review finding. Use when asked to "autoship", "ship this feature end to end", or "run the chain". Do NOT auto-trigger. Requires an approved plan file.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,8 +11,8 @@ Chain the post-plan pipeline in a single run. Every step has a stop condition. S
|
|
|
11
11
|
## Guards
|
|
12
12
|
|
|
13
13
|
- All `.claude/plans/` and `.claude/review/` reads resolve at the main worktree root, not the current worktree. See Worktrees in `CLAUDE.md`.
|
|
14
|
-
- Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../../standards/slug.md`. This skill takes the stop rather than the `latest` fallback, since it commits and opens a pull request. If empty, stop: `❌ Detached HEAD. Checkout the feature branch first.`
|
|
15
|
-
-
|
|
14
|
+
- Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../../standards/slug.md`. This skill takes the stop rather than the `latest` fallback, since it commits and opens a pull request. If empty, stop: `❌ Detached HEAD. Checkout the feature branch first.` Every later step keys its output on this slug, being the worktree, the review receipt, the branch, and the memory proposal, regardless of which plan Step 1 reads.
|
|
15
|
+
- Resolve `<plan>` in Step 1, ahead of any other read.
|
|
16
16
|
- If the working tree has uncommitted changes unrelated to the plan, stop: `❌ Uncommitted changes outside the plan. Commit or stash before autoshipping.`
|
|
17
17
|
|
|
18
18
|
## Diff baseline
|
|
@@ -39,7 +39,16 @@ If the two commands differ, the session is already in a linked worktree. Continu
|
|
|
39
39
|
|
|
40
40
|
## Step 1: read the plan
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Resolve `<plan>` in this order, stopping at the first match:
|
|
43
|
+
|
|
44
|
+
1. **Caller-supplied.** The invocation carried an argument. Accept it as a plan path or a bare slug, in the same position `claude-worktree` tier 0 accepts its name. A bare slug resolves to `.claude/plans/feature-<slug>.md`, and a path is taken as given, relative to the main worktree root. If it does not resolve to a file, stop: `❌ No plan at <path>. Path was supplied, not derived, so check it and re-run.`
|
|
45
|
+
2. **Derived.** `.claude/plans/feature-<slug>.md`, from the `<slug>` the Guards derived. If it does not exist, stop: `❌ No approved plan at .claude/plans/feature-<slug>.md. Run /claude-feature first.`
|
|
46
|
+
|
|
47
|
+
Test the shape of whatever `<plan>` resolved to before reading it as one. A file resolving under either tier can still be the wrong document, a task file most often, so the test runs after both rather than guarding the supplied tier alone.
|
|
48
|
+
|
|
49
|
+
Check for a `**Files to touch:**` or `## Files to touch` marker per `${CLAUDE_SKILL_DIR}/../../standards/plan.md`, the one section every plan carries structurally and a task never does, where `## Outcomes` and `## Findings` are the task's own. If neither form is present, stop: `❌ <path> carries no plan sections. A plan lives at .claude/plans/feature-<slug>.md; a task lives at .claude/tasks/. Point autoship at the plan and re-run.`
|
|
50
|
+
|
|
51
|
+
Read `<plan>` at the main worktree root. This file is the scope for this run.
|
|
43
52
|
|
|
44
53
|
Its sections and its answer contract are fixed by `${CLAUDE_SKILL_DIR}/../../standards/plan.md`. A blank `- Answer:` accepts the `- Suggested:` line above it, so an unanswered question is a decision this run executes rather than a reason to stop.
|
|
45
54
|
|
|
@@ -150,14 +159,16 @@ Omit the second line if there were no minor findings, and the third if nothing r
|
|
|
150
159
|
|
|
151
160
|
Every stop point leaves recoverable state. The user resumes manually from the appropriate step.
|
|
152
161
|
|
|
153
|
-
| Stop point
|
|
154
|
-
|
|
|
155
|
-
| No plan
|
|
156
|
-
| No
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
162
|
+
| Stop point | Recovery |
|
|
163
|
+
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
164
|
+
| No plan (derived) | Run `/claude-feature` to create one |
|
|
165
|
+
| No plan (caller-supplied) | Check the path or slug passed to autoship, then re-run |
|
|
166
|
+
| Resolved file carries no plan shape | Point autoship at a real plan under `.claude/plans/feature-<slug>.md`, not a task file, then re-run |
|
|
167
|
+
| No diff baseline | Fetch origin so a merge base resolves against `main`, then re-run autoship |
|
|
168
|
+
| Empty changed-file list | Re-run once the plan produces tracked output. Ship gitignored output outside the chain, never by tracking it. |
|
|
169
|
+
| Branch collision on worktree entry | `claude-worktree` Step 5 found `<slug>` already as a local branch. Resolve manually (rename or delete the stale branch), then re-run autoship. |
|
|
170
|
+
| Verify fails | Read logs, fix manually, run `/git-ship` |
|
|
171
|
+
| UI checklist | Verify visually, run `/git-ship` |
|
|
172
|
+
| Inherited review findings | Fix findings, run `/git-ship` |
|
|
173
|
+
| Self-introduced finding survived | Read the receipt for what the one repair pass left open, fix it, run `/git-ship` |
|
|
174
|
+
| git-ship fails | Inspect hook or remote error, run again |
|
|
@@ -7,9 +7,9 @@ Run this at loop step 4, for a `## Run now` row whose plan is verified and whose
|
|
|
7
7
|
|
|
8
8
|
## Derive the candidate
|
|
9
9
|
|
|
10
|
-
Resolve `<slug>` from the row's plan the way `claude-worktree` Step 2 resolves a plan-matched name, per `${CLAUDE_SKILL_DIR}/../../standards/slug.md`. Resolve `<type>` off that plan's `## Summary` and `**Files to touch:**` lines, per `${CLAUDE_SKILL_DIR}/../../standards/branch.md`, defaulting to `feat` when the lines settle nothing. The candidate branch is `<type>/<slug>`.
|
|
10
|
+
Resolve `<slug>` from `<plan>`, the row's plan file, the way `claude-worktree` Step 2 resolves a plan-matched name, per `${CLAUDE_SKILL_DIR}/../../standards/slug.md`. Resolve `<type>` off that plan's `## Summary` and `**Files to touch:**` lines, per `${CLAUDE_SKILL_DIR}/../../standards/branch.md`, defaulting to `feat` when the lines settle nothing. The candidate branch is `<type>/<slug>`.
|
|
11
11
|
|
|
12
|
-
This is the branch the worker takes, not a guess at one it will derive for itself. Carry the exact string into the launch below. Both halves of that derivation have already disagreed in production: one run checked `docs/remaining-skill-verdicts` against a worker that took `docs/skill-verdicts-decide`, and a later one checked `fix/path-form-hook` against a worker that took `feat/path-form-hook`. A check against a branch nobody uses verifies nothing, and the run
|
|
12
|
+
This is the branch the worker takes, not a guess at one it will derive for itself. Carry the exact string into the launch below. Both halves of that derivation have already disagreed in production: one run checked `docs/remaining-skill-verdicts` against a worker that took `docs/skill-verdicts-decide`, and a later one checked `fix/path-form-hook` against a worker that took `feat/path-form-hook`. A check against a branch nobody uses verifies nothing, and a slug mismatch no longer fails the run downstream on its own, since `claude-autoship` now takes `<plan>` directly rather than resolving it from the worker's own branch. The check above is what has to catch a wrong candidate now.
|
|
13
13
|
|
|
14
14
|
## Check the branch is unclaimed
|
|
15
15
|
|
|
@@ -46,12 +46,12 @@ Name `<model>` on the launch, and pick it against the task rather than copying w
|
|
|
46
46
|
## Dispatch
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
claude --bg --model <model> -n "orchestrator-<slug>" "Run /aitk:claude-worktree <type>/<slug>, then /aitk:claude-autoship
|
|
49
|
+
claude --bg --model <model> -n "orchestrator-<slug>" "Run /aitk:claude-worktree <type>/<slug>, then /aitk:claude-autoship <plan>"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
`--bg, --background` starts the session as a background agent and returns immediately, `-n, --name` sets the display name `aitk sessions list` reads back for the worker cap, and `--model` overrides the inheritance the section above measured.
|
|
53
53
|
|
|
54
|
-
The worktree call comes first and carries the branch as its argument, which is tier 0 of `claude-worktree` Step 2 and the only tier a caller can reach. `claude-autoship` Step 0 then finds the session already in a linked worktree and continues, which is a path it already documents.
|
|
54
|
+
The worktree call comes first and carries the branch as its argument, which is tier 0 of `claude-worktree` Step 2 and the only tier a caller can reach. `claude-autoship` Step 0 then finds the session already in a linked worktree and continues, which is a path it already documents. The autoship call carries `<plan>`, the same file this runbook already read to derive the branch, so its Step 1 takes it as the caller-supplied plan rather than re-deriving one from the slug the worker's branch happens to carry.
|
|
55
55
|
|
|
56
56
|
Naming the branch in prose instead was tried and closes nothing, because no tier of that ladder reads the prompt. A worker launched onto `main` cannot match tier 1, a board carrying more than one plan puts tier 2 out of reach, and tier 3 tells it to ask a person who is not there. Four workers took the right branch that way, by inference rather than by contract, which is the same judgment both live disagreements came from.
|
|
57
57
|
|
|
@@ -11,6 +11,12 @@ Any session writes one. Do not assert a role on invocation, and do not add a rol
|
|
|
11
11
|
|
|
12
12
|
Run every step rather than judging in advance that one has nothing to act on. The capture skill and the drift verb each answer for themselves, refusal included, and a refusal recorded is a result where a prediction of one is not. A project carrying none of the scaffolding either step reads is the case this fires on, and it is the case where skipping looks most defensible.
|
|
13
13
|
|
|
14
|
+
## What fires this
|
|
15
|
+
|
|
16
|
+
Being asked is one route. The other is a `PreCompact` hook registered against the `manual` matcher, which a project may install and which blocks the first `/compact` of a session with a message naming this skill. The block fires once, so the next `/compact` proceeds whether or not a map was written, and an automatic compaction is never blocked. A project that registered no such hook reaches this skill by being asked alone.
|
|
17
|
+
|
|
18
|
+
Decline where the session holds no reasoning a reader could not get faster from git. Say so in one line and write nothing. The standard already names a `## State` filled from the tree as non-conforming, and the file that carries three such sections is worse than an absent one, because a reader who finds a map trusts it. Declining is a result the caller can act on, where a padded map is a result that misleads.
|
|
19
|
+
|
|
14
20
|
## Guards
|
|
15
21
|
|
|
16
22
|
- If `git rev-parse --git-dir` does not resolve, stop: `❌ Not a git repository. A session map takes its filename from the branch.`
|
|
@@ -54,4 +60,11 @@ The file sits at the main worktree root, which the file-editing tools refuse fro
|
|
|
54
60
|
<what the drift verb named, or the boundary it refused at>
|
|
55
61
|
```
|
|
56
62
|
|
|
63
|
+
A decline reports itself rather than falling silent, so a caller can tell it from a run that failed:
|
|
64
|
+
|
|
65
|
+
```plaintext
|
|
66
|
+
✅ No session map. <what the session holds that git does not, and why it is nothing>
|
|
67
|
+
<what the drift verb named, or the boundary it refused at>
|
|
68
|
+
```
|
|
69
|
+
|
|
57
70
|
Emit the path from the project root. The `## Output` section of the project's instruction file sets the form it takes.
|