Complete feature development lifecycle from task selection through commit. Orchestrates component design, build loops with browser testing, PostHog analytics, and documentation updates...
Orchestrates the complete feature development lifecycle with clear phases, entry/exit criteria, and conversation loop patterns. This skill transforms feature requests into shipped, tested, and documented code.
Acceptance Criteria First β Define what "done" looks like before writing code. Testable criteria prevent scope creep and enable verification.
Components Live in Style Guide β Every UI component starts in the style-guide page. This ensures reusability, documents all states, and provides a living reference.
Test What You Build β Use browser tools to verify each step. Don't wait until the end to discover issues.
KISS (Keep It Simple, Stupid) β Implement the simplest solution that meets the criteria. Avoid over-engineering.
Loop Back, Don't Push Forward β When something doesn't work, return to the appropriate phase rather than patching around issues.
Features are built through phases that can loop back when issues arise:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββββββ β
β β Task ββββΆβComponent ββββΆβ Build ββββΆβ Analytics β β
β βSelection β β Design β β Loop β β Setup β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββββββ β
β β² β β β β
β β βΌ βΌ βΌ β
β β ββββββββββββββββββββββββββββββββββββββββββββββββ
β β (loop back if criteria fail) β
β β β
β β ββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββββββ Commit & βββββ
β (next feature) β Document β β
β ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Read TASKS.md β Identify the next item from Current Sprint
Read TASKS.md and identify the next unchecked item in Current Sprint
Confirm Scope β Clarify with user what's included and excluded
Break Down if Complex β Split large features into sub-tasks
Define Acceptance Criteria β Write testable criteria
### Feature: [Name]
**Acceptance Criteria:**
- [ ] User can [specific action]
- [ ] System [specific behavior] when [condition]
- [ ] Error case: [scenario] displays [message]
- [ ] Mobile: [behavior] works on viewport < 768px
Check Style Guide First β Look for existing components that can be reused or extended
Navigate to /style-guide and snapshot to see existing components
Design in Style Guide β Build new components in the style-guide page
components/ui/ barrel fileShow All States β Document every component state:
Mobile Considerations β Test responsive behavior
<section id="my-component">
<SectionHeader title="My Component" />
<div className="space-y-6">
<h4 className="text-xs font-medium text-muted-foreground uppercase tracking-wide">
Variants
</h4>
<div className="flex flex-wrap gap-3">
<MyComponent variant="default" />
<MyComponent variant="secondary" />
</div>
<h4 className="text-xs font-medium text-muted-foreground uppercase tracking-wide">
States
</h4>
<div className="flex flex-wrap gap-3">
<MyComponent loading />
<MyComponent disabled />
<MyComponent error="Error message" />
</div>
</div>
</section>
/style-guidecomponents/ui/index.tsBuild data layer and API before wiring to UI:
Wire components to backend:
Test at each step using Cursor browser tools:
1. Navigate to the page being tested
2. Snapshot to get element references
3. Interact with elements (click, type, etc.)
4. Re-snapshot after state changes
5. Verify expected behavior
6. Screenshot if visual verification needed
See references/testing-patterns.md for detailed testing scenarios.
Forms:
Lists/Tables:
Modals/Dialogs:
Navigation:
Return to Phase 2 if:
Return to Phase 1 if:
Identify Tracking Needs β What user actions matter?
| Feature Type | Typical Events |
|---|---|
| Form | {form}_submitted, {form}_error |
| Feature | {feature}_used, {feature}_completed |
| Navigation | {page}_viewed |
| Pro Feature | {feature}_attempted, {feature}_upgrade_shown |
Implement Events β Add PostHog capture calls
posthog.capture('{feature}_{action}', {
feature: 'feature-name',
// action-specific properties
})
Create Dashboard (if appropriate) β Use PostHog MCP tools
Use mcp_posthog-study-bible_dashboard-create for new dashboards
Use mcp_posthog-study-bible_insight-create-from-query for insights
Pro Features β If feature is gated, follow feature-gating skill:
useProFeature() hook_attempted, _upgrade_shown, _upgrade_clicked events{feature}_{action}
Examples:
- notes_created
- notes_synced
- chat_message_sent
- upgrade_modal_shown
- model_changed
Update TASKS.md
Update CHANGELOG.md
Stage and Commit
<type>(<scope>): <subject>
Types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert
Provide at end of feature for easy copy-paste:
### Done
**Summary**: [Brief description of what was built]
**Commits** (ohmyzsh):
gaa && gcmsg "feat(scope): add feature description"
gcmsg "fix(scope): fix related issue"
gp
## Completed
- [x] Feature name (YYYY-MM-DD)
- [x] Sub-task 1 β
- [x] Sub-task 2 β
- [x] Sub-task 3 β
| Phase | Entry | Exit |
|---|---|---|
| 1. Task Selection | Feature request | Criteria defined |
| 2. Component Design | Criteria clear | Components in style-guide |
| 3. Build Loop | Components ready | All criteria pass |
| 4. Analytics | Feature working | Events instrumented |
| 5. Commit | Analytics done | Docs updated, committed |
# Start dev server
npm run dev
# Clear Next.js cache if issues
rm -rf .next
# Rebuild native modules
npm rebuild better-sqlite3
# Git workflow (ohmyzsh)
gaa && gcmsg "feat(scope): description"
gp
1. mcp_cursor-ide-browser_browser_navigate β load page
2. mcp_cursor-ide-browser_browser_snapshot β get elements
3. mcp_cursor-ide-browser_browser_click/type β interact
4. mcp_cursor-ide-browser_browser_snapshot β verify changes
5. mcp_cursor-ide-browser_browser_take_screenshot β visual check