refactor: Migrate from Claude Code to Codex CLI - .claude to .codex restructure
- Replaced .claude/ with .codex/ directory structure - Created CODEX.md as root instructions for Codex - Added .codex/prompts/ with templates for each development phase - Added .codex/config/project.md for project configuration - Removed .claude/agents/ (not compatible with Codex) - Updated features/INDEX.md and docs/PRD.md references
This commit is contained in:
32
.codex/config/project.md
Normal file
32
.codex/config/project.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Codex Configuration
|
||||
|
||||
## Project Settings
|
||||
|
||||
This project is optimized for Codex CLI autonomous coding.
|
||||
|
||||
## Key Files
|
||||
|
||||
- CODEX.md - Root instructions (this file guides Codex)
|
||||
- .codex/prompts/ - Pre-built prompts for each development phase
|
||||
- features/INDEX.md - Feature tracking and status
|
||||
- docs/PRD.md - Product Requirements Document
|
||||
|
||||
## Development Workflow
|
||||
|
||||
1. Requirements → 2. Architecture → 3. Frontend → 4. Backend → 5. QA → 6. Deploy
|
||||
|
||||
Each phase uses `codex exec` with natural language prompts.
|
||||
See CODEX.md for example commands.
|
||||
|
||||
## Conventions
|
||||
|
||||
- Feature IDs: PROJ-1, PROJ-2, etc.
|
||||
- Commits: feat(PROJ-X): description
|
||||
- Tests: co-located with source files
|
||||
- shadcn/ui first: never recreate installed components
|
||||
|
||||
## Recommended Flags
|
||||
|
||||
- `--full-auto` for feature development (auto-approves changes)
|
||||
- `--yolo` for quick refactoring (no sandbox)
|
||||
- Interactive (default) for review/debugging
|
||||
16
.codex/prompts/architecture.md
Normal file
16
.codex/prompts/architecture.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Architecture Prompt Template
|
||||
|
||||
Use this prompt structure with Codex:
|
||||
|
||||
```
|
||||
Read the feature spec at features/PROJ-X-feature-name.md.
|
||||
|
||||
Design the technical architecture and add a "Tech Design" section to the spec with:
|
||||
- Component hierarchy (list components to build)
|
||||
- API endpoints (method, path, request/response shapes)
|
||||
- Database schema changes (tables, columns, RLS policies)
|
||||
- Implementation order (what to build first, dependencies)
|
||||
- Tech stack decisions ( libraries, patterns)
|
||||
|
||||
Focus on: practical, implementable, PM-friendly (no code yet).
|
||||
```
|
||||
19
.codex/prompts/backend.md
Normal file
19
.codex/prompts/backend.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Backend Prompt Template
|
||||
|
||||
Use this prompt structure with Codex:
|
||||
|
||||
```
|
||||
Read the feature spec Tech Design section at features/PROJ-X-feature-name.md.
|
||||
Check existing APIs: ls src/app/api/
|
||||
Check Supabase schema: cat src/lib/supabase.ts
|
||||
|
||||
[Describe what to build]
|
||||
|
||||
Implementation rules:
|
||||
- Use Supabase client from src/lib/supabase.ts
|
||||
- Create API routes in src/app/api/[entity]/
|
||||
- Follow existing patterns for route structure
|
||||
- Add RLS policies for new tables
|
||||
- Write tests for all endpoints
|
||||
- Run: npm test after implementation
|
||||
```
|
||||
15
.codex/prompts/deploy.md
Normal file
15
.codex/prompts/deploy.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Deploy Prompt Template
|
||||
|
||||
Use this prompt structure with Codex:
|
||||
|
||||
```
|
||||
Deploy to production:
|
||||
1. Run: npm run build (must succeed)
|
||||
2. Run: npm run lint (no errors)
|
||||
3. Run: vercel --prod
|
||||
4. Verify deployment URL
|
||||
5. Run smoke tests on production
|
||||
|
||||
If build fails: fix errors first, then deploy.
|
||||
If lint errors: run npm run lint:fix, commit, then deploy.
|
||||
```
|
||||
21
.codex/prompts/frontend.md
Normal file
21
.codex/prompts/frontend.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Frontend Prompt Template
|
||||
|
||||
Use this prompt structure with Codex:
|
||||
|
||||
```
|
||||
Read features/INDEX.md and the feature spec at features/PROJ-X-feature-name.md.
|
||||
Check existing components: ls src/components/ui/
|
||||
Check installed shadcn: ls src/components/ui/ | wc -l
|
||||
|
||||
[Describe what to build]
|
||||
|
||||
Implementation rules:
|
||||
- ALWAYS use shadcn/ui components (check src/components/ui/ first)
|
||||
- If missing: npx shadcn@latest add <component-name>
|
||||
- Tailwind CSS for all styling
|
||||
- Write unit tests next to source files (*.test.ts next to *.ts)
|
||||
- Run npm run lint after changes
|
||||
|
||||
If design files exist: check design/ mockups/ assets/
|
||||
Otherwise ask about: visual style, brand colors, layout preference.
|
||||
```
|
||||
20
.codex/prompts/qa.md
Normal file
20
.codex/prompts/qa.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# QA Prompt Template
|
||||
|
||||
Use this prompt structure with Codex:
|
||||
|
||||
```
|
||||
Read the feature spec at features/PROJ-X-feature-name.md, especially:
|
||||
- Acceptance criteria
|
||||
- User stories
|
||||
- Edge cases
|
||||
|
||||
Test the implementation:
|
||||
1. Run unit tests: npm test
|
||||
2. Run E2E tests: npm run test:e2e
|
||||
3. Manual testing if needed
|
||||
4. Check each acceptance criterion
|
||||
5. Verify edge cases are handled
|
||||
|
||||
Report: what passed, what failed, what needs fixing.
|
||||
Fix all failures before declaring done.
|
||||
```
|
||||
25
.codex/prompts/requirements.md
Normal file
25
.codex/prompts/requirements.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Requirements Prompt Template
|
||||
|
||||
Use this prompt structure with Codex:
|
||||
|
||||
```
|
||||
Read docs/PRD.md to understand the project vision and constraints.
|
||||
Read features/INDEX.md to see existing features and the next available PROJ-X ID.
|
||||
|
||||
[Describe the feature idea clearly]
|
||||
|
||||
Create a feature specification in features/PROJ-X-feature-name.md with:
|
||||
- Feature name and ID
|
||||
- User stories (3-5, with: As a [role], I want [action], so that [benefit])
|
||||
- Acceptance criteria (testable, specific)
|
||||
- Edge cases (error handling, edge inputs, boundary conditions)
|
||||
- Dependencies (other features required)
|
||||
- Implementation notes (optional)
|
||||
|
||||
Update features/INDEX.md with the new feature status.
|
||||
```
|
||||
|
||||
Example:
|
||||
```
|
||||
codex exec "Read docs/PRD.md and features/INDEX.md. Create a feature spec for user authentication with email/password login, including: user stories for login/logout, acceptance criteria for valid/invalid credentials, edge cases for locked accounts and rate limiting."
|
||||
```
|
||||
Reference in New Issue
Block a user