feat(engineering): add implement-isolation skill, refine implement-issue
- Add /skill:implement (implement-isolation) — ticket claim, worktree isolation, tdd, verify, code-review, ship loop - Fix implement-issue: worktree path to issue-<N>-<repo-slug>, label semantics (remove-others), skill ref formatting, drop stale closing note
This commit is contained in:
@@ -18,17 +18,17 @@ disable-model-invocation: true
|
|||||||
|
|
||||||
#### a. Label the issue `in-progress`
|
#### a. Label the issue `in-progress`
|
||||||
|
|
||||||
Change the issue triage label to `in-progress`.
|
Change the issue triage label to `in-progress`, remove all other labels.
|
||||||
|
|
||||||
Completion criterion: The issue label is confirmed as `in-progress`.
|
Completion criterion: The issue label is confirmed as `in-progress`.
|
||||||
|
|
||||||
#### b. Create the worktree
|
#### b. Create the worktree
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git worktree add -b <branch-name> ../<repo-name>-issue-<N> <base>
|
git worktree add -b <branch-name> ../issue-<N>-<repo-slug> <base>
|
||||||
```
|
```
|
||||||
|
|
||||||
Completion criterion: The worktree exists at `../<repo-name>-issue-<N>` and the new branch is checked out.
|
Completion criterion: The worktree exists at `../issue-<N>-<repo-slug>` and the new branch is checked out.
|
||||||
|
|
||||||
### 2. Compose the child prompt
|
### 2. Compose the child prompt
|
||||||
|
|
||||||
@@ -36,16 +36,15 @@ Assemble a single prompt that the child agent will receive. Include:
|
|||||||
|
|
||||||
- **Issue body** — the full markdown body of the issue.
|
- **Issue body** — the full markdown body of the issue.
|
||||||
- **Comments** — all comments, if any
|
- **Comments** — all comments, if any
|
||||||
- **Standing instruction**: "Implement using /tdd where possible, at the pre-agreed seam. Run typechecking regularly, run single test files regularly, and run the full test suite once at the end. Once done, use /code-review to review the work. Commit your work and push the new branch and create a PR with a link to the issue, one-sentence summary, and short key-changes list. Comment on the issue with the PR link: `PR opened: <url>`. Change the issue triage label to needs-review when done."
|
- **Standing instruction**: "Implement using tdd skill where possible, at the pre-agreed seam. Run typechecking regularly, run single test files regularly, and run the full test suite once at the end. Once done, use code-review skill to review the work. Commit your work and push the new branch and create a PR with a link to the issue, one-sentence summary, and short key-changes list. Comment on the issue with the PR link: `PR opened: <url>`. Change the issue triage label to needs-review when done. Remove all other labels"
|
||||||
- **Failure instruction**: "If any step fails, report where you stopped and what remains for manual recovery. Print the exact commands needed."
|
|
||||||
|
|
||||||
(The prompt is passed as arguments to tmux-launch-agent in step 3, which handles writing it to a temp file if needed.)
|
- **Failure instruction**: "If any step fails, report where you stopped and what remains for manual recovery. Print the exact commands needed."
|
||||||
|
|
||||||
Completion criterion: The prompt is composed with all required sections (issue body, comments, standing instruction, failure instruction).
|
Completion criterion: The prompt is composed with all required sections (issue body, comments, standing instruction, failure instruction).
|
||||||
|
|
||||||
### 3. Launch the child via tmux-launch-agent
|
### 3. Launch the child via tmux-launch-agent
|
||||||
|
|
||||||
Use the [`tmux-launch-agent`](../../../../.agents/skills/tmux-launch-agent/SKILL.md) skill to fork the child agent into a new tmux window. Tmux-launch-agent handles agent detection, config lookup, command building (prompt-file or stdin-pipe), mise/SHELL wrapping, and `tmux new-window` creation.
|
Use the `tmux-launch-agent` skill to fork the child agent into a new tmux window. Tmux-launch-agent handles agent detection, config lookup, command building (prompt-file or stdin-pipe), mise/SHELL wrapping, and `tmux new-window` creation.
|
||||||
|
|
||||||
Pass these parameters:
|
Pass these parameters:
|
||||||
|
|
||||||
@@ -65,6 +64,7 @@ Completion criterion: `tmux new-window` exits 0 and a new tmux window appears wi
|
|||||||
### 4. Print summary
|
### 4. Print summary
|
||||||
|
|
||||||
After launching, print:
|
After launching, print:
|
||||||
|
|
||||||
- Issue number and title
|
- Issue number and title
|
||||||
- Worktree path
|
- Worktree path
|
||||||
- Branch name
|
- Branch name
|
||||||
@@ -72,5 +72,3 @@ After launching, print:
|
|||||||
- Agent used (detected by tmux-launch-agent)
|
- Agent used (detected by tmux-launch-agent)
|
||||||
- Tmux window name (so the user can find it)
|
- Tmux window name (so the user can find it)
|
||||||
- Cleanup command: `git worktree remove <worktree-path> && git worktree prune`
|
- Cleanup command: `git worktree remove <worktree-path> && git worktree prune`
|
||||||
|
|
||||||
The parent's turn ends here. The user can dispatch another issue immediately.
|
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
name: implement-isolation
|
||||||
|
description: "Implement a piece of work based on a spec or set of tickets in isolation."
|
||||||
|
disable-model-invocation: true
|
||||||
|
---
|
||||||
|
|
||||||
|
## Invocation
|
||||||
|
|
||||||
|
/skill:implement <N> [--base <branch>] [--force]
|
||||||
|
|
||||||
|
- `<N>` — required, the ticket/issue number
|
||||||
|
- `--base <branch>` — optional, target base branch (default: repo default branch)
|
||||||
|
- `--force` — optional, allow overwriting an existing `worktree`
|
||||||
|
|
||||||
|
Triage labels follow the vocabulary in `docs/agents/triage-labels.md`.
|
||||||
|
|
||||||
|
## Process
|
||||||
|
|
||||||
|
### 1. Claim the ticket
|
||||||
|
|
||||||
|
Label the issue `in-progress`, remove all other labels.
|
||||||
|
|
||||||
|
### 2. Isolate the workspace
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git worktree add -b <branch-name> ../issue-<N>-<repo-slug> <base>
|
||||||
|
```
|
||||||
|
|
||||||
|
Change into the new worktree directory.
|
||||||
|
|
||||||
|
### 3. Implement
|
||||||
|
|
||||||
|
Drive every acceptance criterion through **red-green-refactor**: write the test first (red), make it pass (green), clean up (refactor). No code without a failing test first.
|
||||||
|
|
||||||
|
### 4. Verify
|
||||||
|
|
||||||
|
Run the full test suite. Every test must pass.
|
||||||
|
|
||||||
|
### 5. Review
|
||||||
|
|
||||||
|
Run /code-review against the base branch. Fix every finding before proceeding.
|
||||||
|
|
||||||
|
### 6. Ship
|
||||||
|
|
||||||
|
Push the branch, open a PR. The PR description must include a link to the ticket and a key-changes list.
|
||||||
|
|
||||||
|
Comment on the issue: `PR opened: <url>`. Label the issue `needs-review`, remove all other labels.
|
||||||
Reference in New Issue
Block a user