| name | implement |
| description | Execute an implementation plan, making changes and committing properly |
| allowed-tools | Read, Grep, Glob, Edit, Write, Bash |
Implement
Execute an implementation plan or review fixes, making code changes and committing according to guidelines.
Arguments
/implement [target]
Target (optional)
Specifies what to implement. Can be:
- Nothing - auto-detect from branch name, check for review.md then plan.md
- Directory name - folder within
.ai/ (e.g., issue-59-add-no-verify-option)
- Relative path - path to
.ai/ folder (e.g., .ai/my-feature)
- File path - direct path to a specific file (e.g.,
.ai/my-feature/review.md)
Source Priority
When given a directory (or auto-detecting):
- If
review.md exists → implement fixes from the review
- Otherwise if
plan.md exists → implement the plan
- If neither exists → suggest running
/create-plan or /code-review first
Examples
/implement
/implement issue-59-add-no-verify-option
/implement .ai/my-feature
/implement .ai/my-feature/plan.md
/implement .ai/my-feature/review.md
Instructions
-
Parse Arguments and Find Source
If a file path was provided (ends with .md):
- Use that file directly
- Determine if it's a plan or review from filename
If a directory/folder was provided:
- If it starts with
.ai/, use it directly
- Otherwise, treat it as a folder name within
.ai/
- Check for
review.md first, then plan.md
If no argument provided:
- Extract issue number from branch name (e.g.,
feature/59-... → 59)
- Look for existing
.ai/issue-<number>-* folder
- Check for
review.md first, then plan.md
If no source file found:
- Suggest running
/create-plan for new work
- Suggest running
/code-review if code exists but needs review
-
Verify Prerequisites
- Confirm on correct feature branch
- Check working directory is clean (
git status)
- Ensure tests pass before starting:
go test ./...
-
Load Guidelines
- Read CODING_GUIDELINES.md for implementation standards
- Read COMMIT_GUIDELINES.md for commit format
- Read GIT_TEST_SCENARIOS.md when implementing tests (required for Git scenario setup)
-
Execute Work
For Plan Mode (implementing from plan.md)
Tests come first. The plan's Test Plan section was gated by
/validate-tests and is authoritative:
- Confirm the plan was gated:
.ai/<folder>/codex-test-plan.md exists.
If not, stop and run /validate-tests first
- Implement all Test Plan scenarios as tests before any production code
- Verify they fail for the right reason — missing behavior, not setup
bugs — then commit the tests
- Only then work through the remaining implementation tasks
For each task in the plan:
Before Each Task:
- Review task requirements and identify all files to modify
Completion
For Plan Mode:
- Verify all tests pass
- Check all checkboxes in plan.md are complete
- Suggest running
/code-review before PR
For Review Mode:
- Verify all tests pass
- Check all blocking issues are resolved
- Update review.md with fixes applied
- Ready for PR if all blocking issues fixed