Skip to content

Commit 6c1123e

Browse files
committed
feat: add autoship agent skill
1 parent 2923dd5 commit 6c1123e

2 files changed

Lines changed: 204 additions & 0 deletions

File tree

.agents/skills/autoship/SKILL.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
name: autoship
3+
description: Use when the user wants fully autonomous delivery in this repo from the next ready bd issue through implementation, verification, review, and PR follow-through.
4+
---
5+
6+
# Autoship
7+
8+
Run an end-to-end autonomous ship cycle for `dubstack`. Do not pause for confirmation unless blocked.
9+
10+
## Non-Negotiables
11+
12+
- Operate autonomously and avoid routine follow-up questions; make reasonable assumptions and record them.
13+
- Keep issue tracking in `bd` only.
14+
- Start with `bd ready --json`, pick work deterministically, and claim it.
15+
- Run two `review-council` passes:
16+
- Plan pass: `Architect` persona, prefer `claude`.
17+
- Code pass: `Staff Engineer` persona, prefer `claude` + `codex` + `gemini`.
18+
- Run repository quality gates twice (before and after council-driven fixes).
19+
- Require zero failures and zero warnings.
20+
- Run quality checks strictly sequentially (never parallel).
21+
- Use this repository's required quality-gate sequence:
22+
- `pnpm checks`
23+
- `pnpm typecheck`
24+
- `pnpm test`
25+
- If AI metadata or prompt generation changed, also run `pnpm evals`.
26+
- Maintain autonomy for git/PR operations: branch, commit, push, submit PR, and update the branch without waiting for extra confirmation.
27+
- Work only in the current checkout (no git worktrees).
28+
- Produce a written summary report for the user.
29+
30+
## Workflow
31+
32+
1. Select and claim work:
33+
- Run `bd ready --json`.
34+
- Pick the highest-priority unblocked issue (tie-breaker: oldest issue).
35+
- Run `bd update <id> --claim --json`.
36+
- Run `bd show <id> --json` and capture acceptance criteria.
37+
38+
2. Build an implementation plan:
39+
- Write a plan file at `.dispatch/<id>-implementation-plan.md`.
40+
- Include: scope, assumptions, risks, step-by-step tasks, test strategy, and rollback notes.
41+
42+
3. Plan review council (round 1):
43+
- Use the `review-council` skill.
44+
- Persona: `Architect`.
45+
- Prefer `claude`; if unavailable, use the best available reviewer and note the limitation.
46+
- Revise the plan based on feedback and save changes.
47+
48+
4. Implement:
49+
- Execute plan steps in order.
50+
- Maintain existing repo patterns and code standards.
51+
- Add/update tests for changed behavior near the edited code.
52+
- If new follow-up work is discovered, create linked bead issues using
53+
`--deps discovered-from:<current-id>`.
54+
55+
5. Quality gates (pass 1):
56+
- Run checks strictly one at a time. Start the next check only after the
57+
current check fully exits.
58+
- Never run multiple quality checks concurrently.
59+
- If a check is slow, keep waiting. Do not interrupt or spawn extra checks.
60+
- Execute this exact verification sequence, one command at a time:
61+
- `pnpm checks`
62+
- `pnpm typecheck`
63+
- `pnpm test`
64+
- If AI metadata or prompt generation changed:
65+
- `pnpm evals`
66+
- If repository policy requires wrappers/sub-agents for checks, still run the
67+
same checks in this exact order, sequentially.
68+
- Treat any warning as a failure.
69+
70+
6. Code review council (round 2):
71+
- Use the `review-council` skill.
72+
- Persona: `Staff Engineer` with strict review tone ("hard-ass staff engineer").
73+
- Prefer council members: `claude`, `codex`, and `gemini`.
74+
- If one member is unavailable, continue with available reviewers and record the gap.
75+
- Apply all valid fixes and document any rejected feedback with rationale.
76+
77+
7. Quality gates (pass 2):
78+
- Re-run the exact same full verification set from step 5.
79+
- Do not proceed until every check passes with zero warnings.
80+
81+
8. Create stacked PR:
82+
- Use `dub-flow` to create the branch, commit, and stacked PR.
83+
- Ensure PR description includes scope, test evidence, and bead reference(s).
84+
- If `dub-flow` is unavailable, fall back to `dub create ...` + `dub ss` and record why.
85+
86+
9. Post-PR CI watch and fix loop:
87+
- Run `gh pr checks --watch` and wait for completion.
88+
- If any check fails or reports issues:
89+
- Fix the issues in code.
90+
- Re-run the full local verification set sequentially (same commands as
91+
step 5/7).
92+
- Update the PR branch.
93+
- Run `gh pr checks --watch` again.
94+
- Repeat until all PR checks complete successfully.
95+
96+
10. Copilot review comments:
97+
- Ensure a Copilot review exists on the PR.
98+
- After CI is green, review Copilot comments and resolve all valid feedback.
99+
- Use the `review-pr-comments` skill in autonomous mode (do not pause for
100+
user confirmation) to process unresolved review threads.
101+
- For rejected comments, provide technical rationale in-thread before
102+
resolving.
103+
- If code changes were made while addressing comments, re-run local quality
104+
checks sequentially and run `gh pr checks --watch` again.
105+
106+
11. Produce final report:
107+
- Create `docs/reports/<date>-<id>-autoship-report.md` using
108+
[report-template.md](references/report-template.md).
109+
- Include: selected bead, plan changes from council, implementation summary,
110+
quality gate evidence (both passes), review-council findings + resolutions,
111+
CI watch cycles, Copilot review comment resolutions, PR link, and any
112+
follow-up beads.
113+
- Share a concise handoff summary with the user.
114+
115+
## Failure Handling
116+
117+
- If blocked by missing credentials, missing CLI tools, or infrastructure failure,
118+
stop and provide a blocker report with exact failing command, error, and next action.
119+
- Do not skip required steps, quality gates, or council rounds.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Autonomous Ship Report Template
2+
3+
Use this template for:
4+
`docs/reports/<date>-<id>-autoship-report.md`
5+
6+
## 1. Overview
7+
8+
- Date:
9+
- Bead ID:
10+
- Bead title:
11+
- Assignee:
12+
- PR link:
13+
14+
## 2. Scope Completed
15+
16+
- Primary objective:
17+
- Acceptance criteria completed:
18+
- Out-of-scope items intentionally deferred:
19+
20+
## 3. Assumptions Made (No User Questions Mode)
21+
22+
- Assumption 1:
23+
- Assumption 2:
24+
25+
## 4. Plan Review Council (Architect, Claude Only)
26+
27+
- Major feedback:
28+
- Plan changes applied:
29+
- Risks mitigated after revision:
30+
31+
## 5. Implementation Summary
32+
33+
- Files changed:
34+
- Core logic updates:
35+
- Pattern/standards alignment notes:
36+
37+
## 6. Quality Gates - Pass 1 (Sequential)
38+
39+
- `pnpm checks`:
40+
- `pnpm typecheck`:
41+
- `pnpm test`:
42+
- `pnpm evals` (only if AI metadata/prompt outputs changed):
43+
- Warnings observed: (must be `0`)
44+
45+
## 7. Code Review Council (Staff Engineer, Claude+Codex+Gemini)
46+
47+
- Critical issues found:
48+
- Minor issues found:
49+
- Fixes applied:
50+
- Feedback rejected and why:
51+
52+
## 8. Quality Gates - Pass 2 (Sequential)
53+
54+
- `pnpm checks`:
55+
- `pnpm typecheck`:
56+
- `pnpm test`:
57+
- `pnpm evals` (only if AI metadata/prompt outputs changed):
58+
- Warnings observed: (must be `0`)
59+
60+
## 9. Follow-up Beads
61+
62+
- Created issues (`discovered-from:<current-id>`):
63+
- Deferred items:
64+
65+
## 10. PR Checks Watch Loop
66+
67+
- First `gh pr checks --watch` result:
68+
- Issues found:
69+
- Fixes applied:
70+
- Number of watch/fix cycles:
71+
- Final checks status:
72+
73+
## 11. Copilot PR Review Resolution
74+
75+
- Copilot review present: (`yes`/`no`)
76+
- Total Copilot comments:
77+
- Comments resolved:
78+
- Rejected comments and rationale:
79+
- Additional code/test changes required:
80+
81+
## 12. Final Status
82+
83+
- Ready for merge:
84+
- Remaining blockers:
85+
- Handoff notes:

0 commit comments

Comments
 (0)