From 2a877895238c0ece8cecd042b4874df2aa270c15 Mon Sep 17 00:00:00 2001 From: Steve Beaulac Date: Wed, 15 Jul 2026 17:18:36 -0400 Subject: [PATCH] feat(engineering): add implement-isolation skill, refine implement-issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add /skill:implement (implement-isolation) — ticket claim, worktree isolation, tdd, verify, code-review, ship loop - Fix implement-issue: worktree path to issue--, label semantics (remove-others), skill ref formatting, drop stale closing note --- common/engineering/implement-issue/SKILL.md | 16 +++---- common/engineering/implement/SKILL.md | 47 +++++++++++++++++++++ 2 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 common/engineering/implement/SKILL.md diff --git a/common/engineering/implement-issue/SKILL.md b/common/engineering/implement-issue/SKILL.md index 53b0ce5..c73aff9 100644 --- a/common/engineering/implement-issue/SKILL.md +++ b/common/engineering/implement-issue/SKILL.md @@ -18,17 +18,17 @@ disable-model-invocation: true #### 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`. #### b. Create the worktree ```bash -git worktree add -b ../-issue- +git worktree add -b ../issue-- ``` -Completion criterion: The worktree exists at `../-issue-` and the new branch is checked out. +Completion criterion: The worktree exists at `../issue--` and the new branch is checked out. ### 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. - **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: `. Change the issue triage label to needs-review when done." -- **Failure instruction**: "If any step fails, report where you stopped and what remains for manual recovery. Print the exact commands needed." +- **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: `. Change the issue triage label to needs-review when done. Remove all other labels" -(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). ### 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: @@ -65,6 +64,7 @@ Completion criterion: `tmux new-window` exits 0 and a new tmux window appears wi ### 4. Print summary After launching, print: + - Issue number and title - Worktree path - Branch name @@ -72,5 +72,3 @@ After launching, print: - Agent used (detected by tmux-launch-agent) - Tmux window name (so the user can find it) - Cleanup command: `git worktree remove && git worktree prune` - -The parent's turn ends here. The user can dispatch another issue immediately. diff --git a/common/engineering/implement/SKILL.md b/common/engineering/implement/SKILL.md new file mode 100644 index 0000000..f303423 --- /dev/null +++ b/common/engineering/implement/SKILL.md @@ -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 [--base ] [--force] + +- `` — required, the ticket/issue number +- `--base ` — 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 ../issue-- +``` + +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: `. Label the issue `needs-review`, remove all other labels.