| name | improve-app |
| description | Add/remove features, fix bugs, redesign โ keeping code clean and artifacts in sync |
| disable-model-invocation | true |
Improve an existing app.
Change request: $ARGUMENTS
EXECUTION
Step 1: Understand the codebase
Read files in this order:
apps/<slug>/spec/prd.md โ what was supposed to be built
package.json โ dependencies, SDK versions
app.config.js โ Expo config, plugins, permissions
app/_layout.tsx โ root layout: providers, fonts, wrappers
app/ directory tree โ file-based routing = navigation map
src/ structure โ flat (components/, hooks/) or feature-based (features/auth/)
Identify state management: Zustand (useStore), Context (Provider), or other.
Step 2: Clarify (if needed)
Use AskUserQuestion only if ambiguous. Generate options specific to the app. Skip if already specific.
Step 3: Plan the change
Before writing code:
- PRD impact โ which sections change (ยง4 features, ยง5 monetization, ยง6 UX, ยง2 non-goals)
- Files to modify/create/delete
- Dead code โ what becomes unused after this change
- Tests to write โ new feature needs tests; changed feature needs updated tests
- Refactoring โ if a component being modified exceeds 250 lines or has 3+ useState, split it
- Artifacts to update:
spec/prd.md, README.md, privacy_policy.md if affected
- Version bump โ patch (bugfix), minor (feature/UX), major (redesign/breaking)
Do NOT update aso/ or marketing/ โ managed separately via /market-app.
Step 4: Apply changes
Execute in this order:
1. Update PRD first โ source of truth:
> [UPDATED <date>]: Added/removed/changed <what> โ <why>
2. Modify code โ follow existing patterns:
- Match the project's architecture
- Reuse existing components/hooks โ don't duplicate
- Fetch docs via mcpdoc before using any new SDK module
- Use
npx expo install <package> for new dependencies โ not npm install
3. Write/update tests:
- New feature โ write store tests, screen render test
- Changed feature โ update affected tests
- Bug fix โ write regression test that catches the bug
- New gesture interaction (swipe, long-press, drag) โ MUST add a Maestro flow that physically executes the gesture. Unit tests and runtime log checks cannot catch gesture-related crashes (missing GestureHandlerRootView, Reanimated babel plugin, etc.)
4. When removing a feature:
- Remove from PRD ยง4
- Delete screen, components, hooks, services, types
- Clean all imports and navigation entries
- Remove unused dependencies from package.json
- If feature had persisted Zustand state โ add migration to remove fields
- If feature's screen was a deep link target โ add redirect from old route
5. When renaming or removing routes:
- Grep codebase for old route path string before renaming
- Add
<Redirect> at old path after renaming
- Flag to user if push notifications target this route
6. When changing UX/design:
- Update PRD ยง6
- Apply consistently across ALL affected screens
- Verify accessibility labels survived โ component replacement drops them silently
7. When modifying data models:
- SQLite: add migration with incremented
user_version
- Zustand persisted stores: bump
version + add migrate function
8. Clean up:
- Delete unused files โ never comment out code
- Remove orphaned imports, dependencies, navigation routes, assets
9. Update artifacts:
app.config.js โ bump version
README.md โ update if features changed
privacy_policy.md โ update if data handling changed
Step 5: Verify
Run the verify loop from pipeline/qa.md (reads testing level from apps/<slug>/spec/testing-level.txt).
If the change affects UI: also read .claude/skills/visual-review/SKILL.md and review screenshots of affected screens.
If the change adds/removes interactive elements: read .claude/skills/interaction-map/SKILL.md to verify no broken promises were introduced.
Step 6: Report
Show summary (in user's language):
## v<new-version>
**Change**: <what was requested>
**Type**: feature / removal / fix / redesign
### Code
- Modified: <file list>
- Created: <file list>
- Deleted: <file list>
### Tests
- Added/updated: <test file list>
- Result: <X> tests passing
### QA
- tsc: PASS
- expo export: PASS
- jest: PASS (<X> tests)
- runtime: PASS (no errors on simulator)
Anything else to change?
Wait for feedback:
- More changes โ loop back to Step 2
- Done โ complete
- Revert โ undo changes
RULES
- PRD first โ update spec before code
- Understand before changing โ read codebase structure before writing
- Follow existing patterns โ match architecture, naming, style
- Write tests โ every change includes tests
- No dead code โ delete what's unused, never comment out
- Runtime verified โ app must run on simulator without errors
- Scope discipline โ one change per request, don't refactor unrelated code
- Version bump on every change
- Fetch docs before using new SDK modules