Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions agents/typescript-debugging-engineer.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ Test Plan: [How to reproduce]
| Signal | Load These Files | Why |
|---|---|---|
| debugging race conditions, async/await issues, memory leaks, production errors; bisecting regressions | `debugging-workflows.md` | Race conditions, type errors, production debugging, async issues, git bisect, memory leaks |
| errors | `typescript-errors.md` | Build errors, type system errors, React errors |
| writing or reviewing TypeScript for preferred-pattern violations | `typescript-preferred-patterns.md` | Preferred patterns and detection |
| type errors, hard gates, `any`, type assertions, React 19 migration, non-obvious failure modes | `typescript-frontend-engineer/references/engineering-rules.md` | House gates and the failure-mode table |

## Error Handling

Expand All @@ -152,7 +151,7 @@ Common debugging scenarios and approaches. See [references/debugging-workflows.m

## Preferred Patterns

Debugging patterns to follow. See [typescript-frontend-engineer/references/typescript-preferred-patterns.md](typescript-frontend-engineer/references/typescript-preferred-patterns.md) for TypeScript-specific patterns.
Debugging patterns to follow. See [typescript-frontend-engineer/references/engineering-rules.md](typescript-frontend-engineer/references/engineering-rules.md) for the hard gates and the non-obvious failure-mode table.

### Guessing Without Hypothesis
**What it looks like**: "Try changing X", "Maybe add this check", "What if you use Y instead"
Expand Down Expand Up @@ -245,7 +244,6 @@ These checkpoints are mandatory. Do not skip them even when confident.

For detailed debugging workflows:
- **Debugging Workflows**: [typescript-debugging-engineer/references/debugging-workflows.md](typescript-debugging-engineer/references/debugging-workflows.md) - Race conditions, type errors, production debugging, async issues, git bisect, memory leaks
- **TypeScript Errors**: [typescript-frontend-engineer/references/typescript-errors.md](typescript-frontend-engineer/references/typescript-errors.md) - Build errors, type system errors, React errors
- **TypeScript Pattern Detection**: [typescript-frontend-engineer/references/typescript-preferred-patterns.md](typescript-frontend-engineer/references/typescript-preferred-patterns.md) - Preferred patterns and detection
- **TypeScript Hard Gates & Failure Modes**: [typescript-frontend-engineer/references/engineering-rules.md](typescript-frontend-engineer/references/engineering-rules.md) - Hard gate table, exceptions, stop conditions, and symptoms whose cause is not local (inline components, `React.cache` argument equality, RSC serialization, effect remounts, localStorage throws)

See [shared-patterns/output-schemas.md](../skills/shared-patterns/output-schemas.md) for output format details.
37 changes: 8 additions & 29 deletions agents/typescript-frontend-engineer.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ routing:
retro-topics:
- typescript-patterns
- debugging
not_for: "React Native mobile apps (use react-native-engineer)"
pairs_with:
- universal-quality-gate
- typescript-check
Expand Down Expand Up @@ -123,16 +122,9 @@ Load [typescript-frontend-engineer/references/engineering-rules.md](typescript-f

| Signal | Load These Files | Why |
|---|---|---|
| type error, build error, tsc, tsconfig, compilation | `typescript-errors.md` | Routes to the matching deep reference |
| any, type assertion, validation, pattern detection | `typescript-preferred-patterns.md` | Routes to the matching deep reference |
| forwardRef, useFormState, Context.Provider, React 19 migration | `react19-typescript-patterns.md` | Routes to the matching deep reference |
| RSC, server component, data fetching, server action, React.cache, LRU, serialization | `react-server-patterns.md` | Routes to the matching deep reference |
| SWR, fetch, data loading, event listeners, localStorage | `react-client-data-fetching.md` | Routes to the matching deep reference |
| useState, useEffect, derived state, memo, useRef, transitions | `react-client-state-patterns.md` | Routes to the matching deep reference |
| compound component, provider, context interface, boolean props, render props, composition | `react-composition-patterns.md` | Routes to the matching deep reference |
| ViewTransition, page animation, shared element, navigation animation, view transition | `react-view-transitions.md` | Routes to the matching deep reference |
| output format, errors, preferred patterns, anti-rationalization, hard boundaries, blockers, phases, death-loop | `engineering-rules.md` | Routes to the matching deep reference |
| security, auth, XSS, CSRF, SSRF, Server Action auth, middleware bypass, or any vulnerability-related code | `nextjs-security.md` | Secure implementation patterns for Next.js and React |
| type error, any, type assertion, tsc, tsconfig, forwardRef, React 19 migration, hard gates, blockers, death-loop | `engineering-rules.md` | House gates, exceptions, stop conditions, and the non-obvious failure-mode table (RSC, cache, effects, localStorage) |
| ViewTransition, page animation, shared element, navigation animation, view transition | `react-view-transitions.md` | Thinly-documented canary API: activation rules, CSS workarounds, troubleshooting |
| security, auth, XSS, CSRF, SSRF, Server Action auth, middleware bypass, image optimizer, or any vulnerability-related code | `nextjs-security.md` | Version-pinned Next.js CVEs and detection commands |
| text/headline/label/microcopy animation | `skills/frontend/distinctive-frontend-design/references/roll-text.md` | Zero-npm roll/slot text pattern: standalone demo, extraction guide, knobs |

## References
Expand All @@ -141,26 +133,13 @@ Load the relevant reference file(s) before implementing. References are loaded o

| Task Keywords | Reference File |
|---------------|---------------|
| type error, build error, tsc, tsconfig, compilation | [typescript-errors.md](typescript-frontend-engineer/references/typescript-errors.md) |
| any, type assertion, validation, pattern detection | [typescript-preferred-patterns.md](typescript-frontend-engineer/references/typescript-preferred-patterns.md) |
| forwardRef, useFormState, Context.Provider, React 19 migration | [react19-typescript-patterns.md](typescript-frontend-engineer/references/react19-typescript-patterns.md) |
| RSC, server component, data fetching, server action, React.cache, LRU, serialization | [react-server-patterns.md](typescript-frontend-engineer/references/react-server-patterns.md) |
| SWR, fetch, data loading, event listeners, localStorage | [react-client-data-fetching.md](typescript-frontend-engineer/references/react-client-data-fetching.md) |
| useState, useEffect, derived state, memo, useRef, transitions | [react-client-state-patterns.md](typescript-frontend-engineer/references/react-client-state-patterns.md) |
| compound component, provider, context interface, boolean props, render props, composition | [react-composition-patterns.md](typescript-frontend-engineer/references/react-composition-patterns.md) |
| type error, any, type assertion, tsc, tsconfig, forwardRef, React 19 migration, hard gates, blockers, death-loop | [engineering-rules.md](typescript-frontend-engineer/references/engineering-rules.md) |
| ViewTransition, page animation, shared element, navigation animation, view transition | [react-view-transitions.md](typescript-frontend-engineer/references/react-view-transitions.md) |
| security, auth, XSS, CSRF, SSRF, Server Action auth, middleware bypass | [nextjs-security.md](typescript-frontend-engineer/references/nextjs-security.md) |
| output format, errors, preferred patterns, anti-rationalization, hard boundaries, blockers, phases, death-loop | [engineering-rules.md](typescript-frontend-engineer/references/engineering-rules.md) |
| security, auth, XSS, CSRF, SSRF, Server Action auth, middleware bypass, image optimizer | [nextjs-security.md](typescript-frontend-engineer/references/nextjs-security.md) |

**Reference Descriptions:**
- **typescript-errors.md** — Build errors, type system errors, React errors, form errors, API errors, performance issues
- **typescript-preferred-patterns.md** — Pattern detection: using any, over-engineering types, not validating data, ignoring errors, incorrect state patterns, type vs interface confusion, deprecated React patterns
- **react19-typescript-patterns.md** — forwardRef migration, Context simplification, useActionState, useOptimistic, use() hook, ref callbacks, document metadata, form actions
- **react-server-patterns.md** — RSC parallel fetching, React.cache() deduplication, request-scoped state, RSC serialization, LRU caching, static I/O hoisting, Server Action auth, non-blocking post-response work
- **react-client-data-fetching.md** — SWR deduplication, global listener deduplication, passive event listeners, localStorage versioning and schema migration patterns
- **react-client-state-patterns.md** — Derived state without useEffect, functional setState, lazy init, useDeferredValue, useTransition, useRef for transient values, memoized components, split hook computations, no inline components, effect event deps, event handler refs, initialize-once
- **react-composition-patterns.md** — Compound components, state lifting into providers, children over render props, explicit variants, context state/actions/meta interface, decoupled state management, React 19 ref-as-prop
- **react-view-transitions.md** — ViewTransition component API, activation triggers, CSS animation recipes, searchable grid pattern, card expand/collapse, type-safe helpers, persistent element isolation, troubleshooting
- **engineering-rules.md** — Output format, error handling, preferred patterns, anti-rationalization, hard boundaries, blocker criteria, systematic phases, death-loop prevention
- **engineering-rules.md** — Hard gate table and its exceptions, house preferences, anti-rationalization, verification STOP blocks, blocker criteria, death-loop limits, and the non-obvious failure-mode table (inline components, request-scoped state, `React.cache` argument equality, RSC serialization, effect remounts, localStorage throws)
- **react-view-transitions.md** — Canary `<ViewTransition>` activation rules, layout-vs-page placement, `key` semantics, text-morph and backdrop-filter CSS workarounds, duration budget, troubleshooting table
- **nextjs-security.md** — CVE-2025-29927 middleware bypass, CVE-2025-55182 Server Action closure params, GHSA-rvpw-p7vw-wj3m image-optimizer SSRF, RSC prop leakage, with detection commands

See [shared-patterns/output-schemas.md](../skills/shared-patterns/output-schemas.md) for output format details.
Loading
Loading