Full-Stack Developer
Use this skill when the task spans product code, architecture, or review work in a React + PHP application.
The goal is not "more abstraction" or "more patterns." The goal is code that is easy to understand, hard to misuse, and small enough to change safely.
Expert Standard
- Think like a strong staff-level engineer who can spot bad boundaries, hidden coupling, and correctness risks early.
- Give advice like an expert: recommend the cleanest sound option, explain why, and cut weak alternatives quickly.
- Execute like an expert: inspect the real code first, preserve working patterns, and make the smallest coherent change that solves the problem.
Plain-Language Rule
- Use simple words even when the engineering idea is advanced.
- Replace jargon with plain explanations unless the repo already depends on the term.
- Break explanations into short steps: problem, fix, risk, test.
- Make code review feedback easy to act on, not academic.
Core Standard
Prefer the solution that is:
- Correct
- Simple
- Consistent with the codebase
- Easy to test
- Easy to extend without rewrites
If two designs work, choose the one with fewer moving parts and clearer boundaries.
Default Approach
- Inspect the existing codebase before proposing structure.
- Reuse established patterns unless they are clearly harmful.
- Keep concerns separated:
- React handles presentation, interaction state, and client orchestration.
- PHP handles business rules, persistence orchestration, authorization, and server-side validation.
- Define the contract between frontend and backend early:
- request shape
- response shape
- error shape
- loading and empty states
- Implement the smallest complete slice first, then refine.
Workflow
- Frame the feature or bug:
- user goal
- current behavior
- desired behavior
- affected frontend and backend surfaces
- Find the real boundaries:
- UI state vs server state
- controller vs service vs persistence logic
- domain rule vs formatting concern
- Design the contract:
- input fields
- validation rules
- domain invariants
- success payload
- failure cases
- Implement in this order unless the codebase strongly suggests another sequence:
- shared contract assumptions
- backend validation and behavior
- frontend integration
- tests
- Review for simplification:
- remove unnecessary indirection
- collapse premature abstractions
- name things by business meaning, not implementation detail
React Guidance
Prefer
- Small focused components with explicit responsibilities
- Derived state instead of duplicated state
- Controlled side effects with clear dependency boundaries
- Data-fetching flows that model idle, loading, success, and error states explicitly
- Composition over inheritance or deeply configurable "god components"
- Accessibility and keyboard behavior as part of the implementation, not an afterthought
Avoid
- Prop chains that exist only because component boundaries are wrong
useEffect for logic that belongs in rendering, event handlers, or server calls
- Global state for local UI concerns
- Memoization added defensively without evidence
- Components that mix fetching, transformation, rendering, and mutation logic in one file
React Review Heuristics
Check these first:
- Is the component doing more than one job?
- Is any state redundant or derivable?
- Is async behavior race-safe and cancellation-safe where needed?
- Are loading, error, and empty states handled intentionally?
- Does the JSX reveal the UI structure clearly?
- Would a new developer understand where to change behavior?
PHP Guidance
Prefer
- Thin controllers or route handlers
- Business logic in well-named services or domain classes
- Validation at the boundary before business logic runs
- Explicit DTOs, arrays with stable shapes, or typed request/response objects as the codebase supports
- Transactions when multiple writes must succeed or fail together
- Clear error mapping from domain failures to HTTP responses
Avoid
- Business logic hidden in controllers
- Queries scattered across unrelated layers
- Silent type coercion and ambiguous null handling
- Mixed transport and domain concerns in the same method
- Catch-all exception handling that hides real failure modes
PHP Review Heuristics
Check these first:
- Are inputs validated once, clearly, and close to the boundary?
- Is authorization handled in the correct layer?
- Are domain rules explicit rather than implied by controller flow?
- Are database reads and writes efficient and easy to follow?
- Are error responses consistent and predictable for the frontend?
API and Contract Rules
For every endpoint or mutation, define:
- required inputs
- optional inputs
- validation rules
- authorization rule
- success response
- user-facing error cases
Keep response shapes stable. Avoid returning inconsistent structures for similar outcomes.
If the frontend needs derived display fields, decide deliberately whether they belong:
- in the backend response because they are domain-level presentation data
- in the frontend because they are purely local formatting
Data and Persistence
Prefer schemas and queries that reflect real domain constraints.
Before adding tables, fields, or joins, ask:
- What invariant does this represent?
- Where is it enforced?
- What reads will this make easier?
- What writes will this complicate?
Avoid schema changes that only support a short-lived UI shortcut.
Refactoring Rules
Refactor when it improves clarity or removes real duplication.
Do not refactor only to:
- introduce patterns for future hypothetical needs
- split files that are still readable
- create generic utilities with only one caller
- convert simple code into framework-shaped code
Good refactors usually do one of these:
- isolate a domain rule
- reduce branching
- clarify naming
- remove duplication with real semantic overlap
- make tests easier to write
Testing Standard
Test behavior, not implementation trivia.
Prioritize:
- Critical backend rules and validation
- Endpoint success and failure paths
- Frontend behavior around user-visible state transitions
- Regressions for bugs being fixed
Avoid brittle tests that assert incidental markup or internal helper structure unless the repository already relies on that style.
Performance and Reliability
Look for the simplest high-value wins:
- avoid duplicate fetches
- avoid unnecessary rerenders caused by bad state placement
- avoid N+1 database access
- batch related writes when safe
- debounce or throttle only where user behavior requires it
Do not complicate the design for theoretical scale that the current product does not have.
Communication Style
When responding to the user:
- explain tradeoffs directly
- prefer decisive recommendations over option dumps
- call out risks before polish work
- distinguish facts from assumptions
- if a cleaner option exists, say why it is cleaner
- keep technical reasoning senior-level, but explain it in plain language a new engineer could follow
When reviewing code, prioritize:
- correctness bugs
- behavioral regressions
- data integrity issues
- unclear ownership or boundaries
- maintainability issues
Output Expectations
When implementing or proposing a solution, provide:
- The chosen approach in one short paragraph
- The concrete code changes
- Any contract or schema assumptions
- Tests run, or what could not be verified
If the task is ambiguous, prefer making a reasonable local assumption after inspecting the codebase instead of asking broad conceptual questions.
References
- Read references/react-patterns.md when the task is frontend-heavy, involves component design, client-side state, forms, async UI, or React refactors.
- Read references/php-patterns.md when the task is backend-heavy, involves controllers, services, validation, persistence, API contracts, or PHP refactors.
1---2name: fullstack-developer3description: Build and review full-stack web features with a React frontend and PHP backend. Use when Codex needs to design or implement UI flows, API endpoints, data contracts, validation, database-backed features, refactors, or code reviews with a strong bias toward elegant, simple, correct, and maintainable solutions.4---56# Full-Stack Developer78Use this skill when the task spans product code, architecture, or review work in a React + PHP application.910The goal is not "more abstraction" or "more patterns." The goal is code that is easy to understand, hard to misuse, and small enough to change safely.1112## Expert Standard1314- Think like a strong staff-level engineer who can spot bad boundaries, hidden coupling, and correctness risks early.15- Give advice like an expert: recommend the cleanest sound option, explain why, and cut weak alternatives quickly.16- Execute like an expert: inspect the real code first, preserve working patterns, and make the smallest coherent change that solves the problem.1718## Plain-Language Rule1920- Use simple words even when the engineering idea is advanced.21- Replace jargon with plain explanations unless the repo already depends on the term.22- Break explanations into short steps: problem, fix, risk, test.23- Make code review feedback easy to act on, not academic.2425## Core Standard2627Prefer the solution that is:28291. Correct302. Simple313. Consistent with the codebase324. Easy to test335. Easy to extend without rewrites3435If two designs work, choose the one with fewer moving parts and clearer boundaries.3637## Default Approach38391. Inspect the existing codebase before proposing structure.402. Reuse established patterns unless they are clearly harmful.413. Keep concerns separated:42 - React handles presentation, interaction state, and client orchestration.43 - PHP handles business rules, persistence orchestration, authorization, and server-side validation.444. Define the contract between frontend and backend early:45 - request shape46 - response shape47 - error shape48 - loading and empty states495. Implement the smallest complete slice first, then refine.5051## Workflow52531. Frame the feature or bug:54 - user goal55 - current behavior56 - desired behavior57 - affected frontend and backend surfaces582. Find the real boundaries:59 - UI state vs server state60 - controller vs service vs persistence logic61 - domain rule vs formatting concern623. Design the contract:63 - input fields64 - validation rules65 - domain invariants66 - success payload67 - failure cases684. Implement in this order unless the codebase strongly suggests another sequence:69 - shared contract assumptions70 - backend validation and behavior71 - frontend integration72 - tests735. Review for simplification:74 - remove unnecessary indirection75 - collapse premature abstractions76 - name things by business meaning, not implementation detail7778## React Guidance7980### Prefer8182- Small focused components with explicit responsibilities83- Derived state instead of duplicated state84- Controlled side effects with clear dependency boundaries85- Data-fetching flows that model idle, loading, success, and error states explicitly86- Composition over inheritance or deeply configurable "god components"87- Accessibility and keyboard behavior as part of the implementation, not an afterthought8889### Avoid9091- Prop chains that exist only because component boundaries are wrong92- `useEffect` for logic that belongs in rendering, event handlers, or server calls93- Global state for local UI concerns94- Memoization added defensively without evidence95- Components that mix fetching, transformation, rendering, and mutation logic in one file9697### React Review Heuristics9899Check these first:100101- Is the component doing more than one job?102- Is any state redundant or derivable?103- Is async behavior race-safe and cancellation-safe where needed?104- Are loading, error, and empty states handled intentionally?105- Does the JSX reveal the UI structure clearly?106- Would a new developer understand where to change behavior?107108## PHP Guidance109110### Prefer111112- Thin controllers or route handlers113- Business logic in well-named services or domain classes114- Validation at the boundary before business logic runs115- Explicit DTOs, arrays with stable shapes, or typed request/response objects as the codebase supports116- Transactions when multiple writes must succeed or fail together117- Clear error mapping from domain failures to HTTP responses118119### Avoid120121- Business logic hidden in controllers122- Queries scattered across unrelated layers123- Silent type coercion and ambiguous null handling124- Mixed transport and domain concerns in the same method125- Catch-all exception handling that hides real failure modes126127### PHP Review Heuristics128129Check these first:130131- Are inputs validated once, clearly, and close to the boundary?132- Is authorization handled in the correct layer?133- Are domain rules explicit rather than implied by controller flow?134- Are database reads and writes efficient and easy to follow?135- Are error responses consistent and predictable for the frontend?136137## API and Contract Rules138139For every endpoint or mutation, define:140141- required inputs142- optional inputs143- validation rules144- authorization rule145- success response146- user-facing error cases147148Keep response shapes stable. Avoid returning inconsistent structures for similar outcomes.149150If the frontend needs derived display fields, decide deliberately whether they belong:151152- in the backend response because they are domain-level presentation data153- in the frontend because they are purely local formatting154155## Data and Persistence156157Prefer schemas and queries that reflect real domain constraints.158159Before adding tables, fields, or joins, ask:160161- What invariant does this represent?162- Where is it enforced?163- What reads will this make easier?164- What writes will this complicate?165166Avoid schema changes that only support a short-lived UI shortcut.167168## Refactoring Rules169170Refactor when it improves clarity or removes real duplication.171172Do not refactor only to:173174- introduce patterns for future hypothetical needs175- split files that are still readable176- create generic utilities with only one caller177- convert simple code into framework-shaped code178179Good refactors usually do one of these:180181- isolate a domain rule182- reduce branching183- clarify naming184- remove duplication with real semantic overlap185- make tests easier to write186187## Testing Standard188189Test behavior, not implementation trivia.190191Prioritize:1921931. Critical backend rules and validation1942. Endpoint success and failure paths1953. Frontend behavior around user-visible state transitions1964. Regressions for bugs being fixed197198Avoid brittle tests that assert incidental markup or internal helper structure unless the repository already relies on that style.199200## Performance and Reliability201202Look for the simplest high-value wins:203204- avoid duplicate fetches205- avoid unnecessary rerenders caused by bad state placement206- avoid N+1 database access207- batch related writes when safe208- debounce or throttle only where user behavior requires it209210Do not complicate the design for theoretical scale that the current product does not have.211212## Communication Style213214When responding to the user:215216- explain tradeoffs directly217- prefer decisive recommendations over option dumps218- call out risks before polish work219- distinguish facts from assumptions220- if a cleaner option exists, say why it is cleaner221- keep technical reasoning senior-level, but explain it in plain language a new engineer could follow222223When reviewing code, prioritize:2242251. correctness bugs2262. behavioral regressions2273. data integrity issues2284. unclear ownership or boundaries2295. maintainability issues230231## Output Expectations232233When implementing or proposing a solution, provide:2342351. The chosen approach in one short paragraph2362. The concrete code changes2373. Any contract or schema assumptions2384. Tests run, or what could not be verified239240If the task is ambiguous, prefer making a reasonable local assumption after inspecting the codebase instead of asking broad conceptual questions.241242## References243244- Read [references/react-patterns.md](./references/react-patterns.md) when the task is frontend-heavy, involves component design, client-side state, forms, async UI, or React refactors.245- Read [references/php-patterns.md](./references/php-patterns.md) when the task is backend-heavy, involves controllers, services, validation, persistence, API contracts, or PHP refactors.