2.9 KiB
2.9 KiB
allowed-tools, argument-hint, description, model
| allowed-tools | argument-hint | description | model | |
|---|---|---|---|---|
| Read, Bash(reqvire:*), Bash(git:*) |
|
Generate implementation task plan from requirement changes using change-impact analysis | claude-sonnet-4-5-20250929 |
Generate Tasks
Generate implementation task plan from requirement changes on a feature branch.
Context
- Current branch: !
git rev-parse --abbrev-ref HEAD - Base commit: ${1:-!
git merge-base main HEAD 2>/dev/null || git merge-base master HEAD}
Steps
-
Detect base branch:
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) if git show-ref --verify --quiet refs/heads/main; then BASE_BRANCH="main" elif git show-ref --verify --quiet refs/heads/master; then BASE_BRANCH="master" else echo "Specify base commit manually" exit 1 fi BASE_COMMIT="${1:-$(git merge-base $BASE_BRANCH HEAD)}" -
Run change impact:
reqvire change-impact --git-commit=$BASE_COMMIT --json > /tmp/impact.json -
For each changed requirement:
Get details:
reqvire search --filter-id="<requirement-id>" --jsonExtract:
- Requirement content
- verifiedBy relations (tests to run)
- satisfiedBy relations (code to update)
- derivedFrom relations (context)
-
For each verification:
Get test paths:
reqvire search --filter-id="<verification-id>" --jsonExtract satisfiedBy relations (test files).
-
Generate TodoWrite task plan:
For new requirements:
☐ Implement "{Requirement Name}" ({REQ-ID}) ☐ Review requirement: [link to blob] ☐ Implement functionality ☐ Run tests: {test paths} ☐ Add satisfiedBy relation ☐ Validate: reqvire validateFor modified requirements:
☐ Update "{Requirement Name}" ({REQ-ID}) ☐ Review changes: [link to blob] ☐ Review code: {satisfiedBy paths} ☐ Update implementation ☐ Run tests: {test paths} ☐ Validate: reqvire validate -
Generate git blob links:
REPO_URL=$(git remote get-url origin | sed 's/\.git$//' | sed 's/git@github.com:/https:\/\/github.com\//') BLOB_URL="${REPO_URL}/blob/${BASE_COMMIT}/${file_path}#${element-anchor}" -
Present task plan:
- Phase 1: New requirements to implement
- Phase 2: Modified requirements to update
- Phase 3: Affected verifications to review
Task Plan Structure
# Implementation Task Plan
**Base**: {base_branch}@{base_commit}
**Feature**: {current_branch}
## Summary
- New requirements: X
- Modified requirements: Y
- Tests to run: Z
## Tasks
{TodoWrite formatted tasks}
Notes
- Task plan uses TodoWrite format for tracking
- Links to exact requirement versions via git blob URLs
- Repository-agnostic: no technology assumptions
- Always read full requirements, not just summaries