Develop phase with exploration and plan validation
YOU ARE EXECUTING THE /dev SKILL. The user triggered this skill. Follow ALL instructions below step by step. Do NOT treat this as a freeform conversation - execute the skill workflow.
Follow CLAUDE.md rules.
Ultra think before each phase transition:
$ARGUMENTS.spec$ARGUMENTS.phase$ARGUMENTS.doneLaunch focused agents in a single message (parallel execution). There is no upper limit on agent count. Spawn one agent per distinct concern, area, or file-cluster the task actually has, and scale up freely with its breadth. The lists below are a starting menu, not a quota: add as many agents as full coverage requires.
explore-codebase: "Find entities, repository interfaces, value objects, and DTOs related to [feature] in backend/internal/domain/ and backend/internal/application/dto/"explore-codebase: "Find usecases related to [feature] in backend/internal/application/usecases/. Read their Execute methods, dependencies, and error handling"explore-codebase: "Find HTTP handlers and routes related to [feature] in backend/internal/presentation/. Check middleware, validation, response patterns"explore-codebase: "Find repo implementations, external service adapters, and config related to [feature] in backend/internal/infrastructure/"explore-codebase: "Find the most similar existing feature to [feature] in backend/. I need to replicate its patterns"explore-codebase: "Find components related to [feature] in frontend/src/components/. Check props, state, Shadcn UI usage"explore-codebase: "Find hooks, React Query calls, and state management related to [feature] in frontend/src/hooks/ and frontend/src/lib/"explore-codebase: "Find pages and layouts related to [feature] in frontend/src/app/. Check route structure, data fetching, i18n"explore-codebase: "Find TypeScript types, API client functions related to [feature] in frontend/src/types/ and frontend/src/lib/"explore-codebase: "Find the most similar existing feature to [feature] in frontend/src/. I need to replicate its patterns"The supporting agents below fan out the SAME way as the code agents: one agent per distinct concern, no maximum. None of them is capped at a single instance.
Launch one explore-db per distinct DB concern in the same single message. One agent is enough for a single-table lookup; scale up freely when the phase spans multiple table clusters, both dev and prod, or several concerns. First token of each prompt selects the env (dev/prod, defaults to dev).
explore-db: "dev - Map tables and foreign keys related to [feature]: columns, types, FK relationships"explore-db: "dev - Inspect constraints and RLS policies (if used) on tables related to [feature]"explore-db: "dev - List migrations touching [feature] tables, run get_advisors for security/perf issues"Add one agent per distinct table cluster, or to cover prod alongside dev.
Launch one explore-docs per distinct library or per distinct feature within a library. One agent is enough for a single lib question; scale up when the phase touches multiple libraries or several independent features of one.
explore-docs: "[library A] [specific feature] documentation"explore-docs: "[library B] [specific feature] documentation"Launch one websearch per distinct external question. One agent is enough for a single topic; scale up when there are several independent questions.
websearch: "[topic A] best practices 2025 2026"websearch: "[topic B] ..."After agents return, verify coverage across all dimensions:
explore-codebaseexplore-codebaseexplore-db agents (one per missing concern / cluster / env)explore-docs agents (one per missing library / feature)Do NOT proceed with incomplete context.
Display enriched plan:
## Phase $ARGUMENTS.phase
### Files to Create
- `path/file` - [purpose]
### Files to Modify
- `path/file:XX` - [what to change]
### Patterns to Reuse (from exploration)
- [existing code patterns found]
### Order
Backend: Domain -> Application -> Infrastructure -> Presentation
Frontend: Types -> API -> Hooks -> Components -> Pages
If $ARGUMENTS.auto is true:
Otherwise (default):
After validation, implement in appropriate order:
Backend: Domain -> Application -> Infrastructure -> Presentation
*_test.go)*Env struct helper)Frontend: Types -> API -> Hooks -> Components -> Pages
useTranslations from next-intl for ALL user-facing textany)*.test.ts / *.test.tsx)@testing-library/react, vi.mock for module-level deps, jest-dom matchers via the shared test setup)For significant UI: Skill(skill="frontend-design:frontend-design")
# Backend
cd backend && go build ./... && go vet ./... && golangci-lint run ./... && go test ./...
# Frontend
cd frontend && npm run test:run && npm run build
Backend and frontend tests are MANDATORY: All existing tests must pass (zero regressions). If a test fails, fix it before proceeding.
Database verification (if schema/policies changed): run get_advisors via explore-db (dev/prod).
Check off completed items in the Execution Plan of the spec file.