|
| 1 | +# Codex Instructions for Gitfolio |
| 2 | + |
| 3 | +## Goal |
| 4 | +Contribute safely to Gitfolio with small, correct changes that preserve branch/data architecture and static-site behavior. |
| 5 | + |
| 6 | +## Understand first |
| 7 | +- Read `CLAUDE.md`, `README.md`, and relevant workflow files before structural changes. |
| 8 | +- Prefer minimal edits in existing patterns over broad rewrites. |
| 9 | + |
| 10 | +## Critical repository constraints |
| 11 | +- Two-branch model: |
| 12 | + - `main`: template/dev branch, `data/*.json` must remain empty (`[]`). |
| 13 | + - `web`: deployment branch with real personal data. |
| 14 | +- `sync-to-web.yml` preserves `web` data and dispatches deploy. |
| 15 | +- `deploy.yml` deploys from `web`. |
| 16 | + |
| 17 | +## Data and generation rules |
| 18 | +- Do not hand-edit generated outputs: |
| 19 | + - `src/generated/githubData.ts` |
| 20 | + - `src/siteContent.json` |
| 21 | +- Use existing generator script when needed: `scripts/generate-github-data.js`. |
| 22 | + |
| 23 | +## Security rules |
| 24 | +- Never commit secrets or local credentials: |
| 25 | + - `.env`, PAT tokens, OAuth secrets, private keys |
| 26 | + - `gitforge.config.json` when it contains private token values |
| 27 | +- Follow `SECURITY.md` guidance for safe commits. |
| 28 | + |
| 29 | +## Implementation style |
| 30 | +- React: functional components + TypeScript. |
| 31 | +- UI: Tailwind-first, clean and minimal style. |
| 32 | +- Keep browser behavior static/deterministic (no runtime GitHub API access in frontend). |
| 33 | +- Reuse existing utilities/components and avoid unnecessary dependencies. |
| 34 | + |
| 35 | +## Validation |
| 36 | +- Install dependencies: `pnpm install` |
| 37 | +- Lint: `pnpm lint` |
| 38 | +- Build: `pnpm build` |
| 39 | +- Report pre-existing failures separately from new issues introduced by your changes. |
| 40 | + |
| 41 | +## Scope discipline |
| 42 | +- Only change what the task requires. |
| 43 | +- If touching workflows or branching logic, ensure behavior still protects `web` data and `main` cleanliness. |
0 commit comments