1f0d9b3471
(cherry picked from commit f4e7ba76d8)
2.6 KiB
2.6 KiB
Core Repository Rules
- Use
make helpto find available development targets - Run
make fmtto format.gofiles, and runmake lint-goto lint them - Run
make lint-jsto lint.tsfiles - Run
make tidyafter anygo.modchanges - Add the current year into the copyright header of new
.gofiles - Ensure no trailing whitespace in edited files
- Never force-push, amend, or squash unless asked. Use new commits and normal push for pull request updates
- Preserve existing code comments, do not remove or rewrite comments that are still relevant
- In TypeScript, use
!(non-null assertion) instead of?./??when a value is known to always exist - Include authorship attribution in issue and pull request comments
- Add
Co-Authored-Bylines to all commits, indicating name and model used
Execution Rules (Token Optimization)
- DO NOT read full files unless they are explicitly targeted with
@filename, referenced from instruction*.mdfiles, or required to complete the user's task. - Assume the workspace structure described in
./.codex-context.mdand./.codex-project-map.mdis the current baseline unless the user indicates otherwise. - DO NOT read
./.codex-history.mdend-to-end by default; search by keyword, subsystem, tag, or read only the latest relevant entries first.
Project Context
- Read and follow
./.codex-context.mdas the persistent repository context before starting work and when validating final changes. - Use
./.codex-project-map.mdfor the persistent structural and architectural map of the repository.
Routing Rules for Tasks (Multi-Model Delegation)
Apply these routing preferences when the environment supports model selection. If the preferred model is unavailable, use the closest available model and note the fallback.
Priority for mixed tasks: Architecture & Orchestration > Go & Database Coding > Frontend & Template Tasks > DevOps & Terminal Execution
- Architecture & Orchestration Tasks: Prefer
gpt-5.4(Reasoning: High/Extra High). Use for complex requirement breakdown, solution design, and validation of large structural updates. - Go & Database Coding Tasks: Prefer
gpt-5.3-codex(Reasoning: Medium). This includes writing HTTP handlers, database queries, internal Go business logic, and server-side integration work. - Frontend & Template Tasks: Prefer
gpt-5.3-codex(Reasoning: Medium). This includestemplates/,web_src/, CSS, and TypeScript changes. - DevOps & Terminal Commands: Prefer
gpt-5.4-mini(Reasoning: Low). Use forpnpm,git,go mod,npm,make, orbashexecution flows and shell-oriented maintenance tasks.