mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-25 06:04:54 +00:00
1.4 KiB
1.4 KiB
Project Agent Guide
This repo is migrating legacy TSX components to JSON-driven components with hooks. Use this file as the quick, local guide for automation and review.
Conversion Workflow (TSX -> JSON)
- Identify component under
src/components/atoms|molecules|organisms. - Read TSX and decide if stateful.
- If stateful, extract logic to
src/hooks/use-<component>.ts. - Create JSON definition in
src/components/json-definitions/<component>.json. - Add interface in
src/lib/json-ui/interfaces/<component>.ts. - Export hook (if any) in
src/hooks/index.tsandsrc/lib/json-ui/hooks-registry.ts. - Export interface in
src/lib/json-ui/interfaces/index.ts. - Export JSON component in
src/lib/json-ui/json-components.ts. - Update imports to
@/lib/json-ui/json-componentsand delete TSX. - Verify with
npm run buildandnpm run audit:json.
CodeQL Helpers
Custom query pack: codeql/custom-queries/
Optimized DB (source-root src/): codeql-db-optimized/
Latest SARIF: codeql-db-optimized/diagnostic/migration-queries.sarif
Key queries:
- Legacy component imports and barrels
- Hooks usage in components (guides hook extraction)
- JSX presence in components
- Imports from json-definitions (should be zero)
- Migration target folder inventory
Related Docs
CLAUDE.mdfor migration status and CodeQL resultsdocs/reference/AGENTS.mdfor agent architecture background