Add Feature
Add new features or functionality to an existing project.
Input
$ARGUMENTS
Expected format: "<feature description>" [--repo <project-name-or-github-url>]
Examples:
- •
/add-feature "Add user authentication with JWT" --repo my-kanban-app - •
/add-feature "Add dark mode toggle" --repo my-kanban-app - •
/add-feature "Add export to PDF" --repo https://github.com/user/existing-app - •
/add-feature "Add real-time notifications with WebSockets" --repo my-kanban-app
If --repo is not provided, look for a project in the current directory or ask the user.
Workflow
Step 1: Locate and Understand the Project
For projects built by this tool (found in projects/<name>/):
- •Read
plan.mdfor architecture context - •Read
issues.jsonfor existing issue structure - •Read the codebase to understand current state
For external repositories (GitHub URL or cloned repo):
- •Clone or navigate to the repo
- •Read README.md, package.json, or equivalent for tech stack
- •Browse the codebase to understand architecture, patterns, and conventions
- •Check for existing staging branch; create one if missing
Step 2: Plan the Feature
Analyze the feature request against the existing codebase:
- •Identify which files need modification
- •Identify new files to create
- •Determine dependencies on existing code
- •Estimate scope (single issue or multiple issues)
Generate a feature plan as new entries for issues.json (or create one if it doesn't exist).
For small features (1-2 files changed):
- •Create a single issue
For larger features (3+ files, multiple components):
- •Break into multiple issues with dependencies
- •Assign them to a new phase (next phase number after existing phases)
Step 3: Create GitHub Issues
For each planned issue:
gh issue create --title "<title>" --body "<formatted body per CLAUDE.md template>"
Label new issues with the appropriate phase label and feature or enhancement.
Step 4: Implement via Standard Pipeline
For each new issue, follow the standard pipeline:
- •Create feature branch from staging:
feature/issue-{N}-{slug} - •Implement the code (delegate to implementer agent)
- •Commit, push, create PR targeting staging
- •Review PR (delegate to reviewer agent)
- •Execute test plan (delegate to tester agent)
- •Squash-merge PR into staging
- •Close the issue
Step 5: Phase Merge
After all new feature issues are complete:
- •Create PR from staging to main
- •Merge (non-squash, preserves history)
- •Sync staging with main
Handling External Repositories
When working with an existing repo not built by this tool:
- •
Clone if needed:
bashgh repo clone <owner>/<repo> projects/<repo-name> cd projects/<repo-name>
- •
Set up staging branch (if it doesn't exist):
bashgit checkout -b staging git push -u origin staging
- •
Generate project context (if plan.md doesn't exist):
- •Analyze the codebase
- •Create a lightweight
plan.mddocumenting the existing architecture - •Create
issues.jsonwith only the new feature issues
- •
Proceed with standard pipeline from Step 3 above.
Output
Report:
- •Number of issues created
- •Implementation status for each
- •PR numbers and URLs
- •Final repo URL with the new features merged
Example Usage
# Add a feature to a project you built /add-feature "Add drag-and-drop reordering for tasks" --repo my-kanban-app # Add multiple related features /add-feature "Add user profiles with avatar upload and bio editing" --repo my-kanban-app # Add feature to an external repo /add-feature "Add dark mode support" --repo https://github.com/user/my-app # Add feature to repo in current directory /add-feature "Add API rate limiting with Redis"