Files
gitea/AGENTS.md
T
petru 03f90d9234 Updated AGENTS.md
Co-Authored-By: Petru via Codex GPT-5 <petru-codex@example.com>
2026-05-22 23:44:18 +03:00

2.9 KiB

Core Repository Rules

  • Use make help to find available development targets
  • Run make fmt to format .go files, and run make lint-go to lint them
  • Run make lint-js to lint .ts files
  • Run make tidy after any go.mod changes
  • Add the current year into the copyright header of new .go files
  • 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-By lines to all commits, indicating name and model used
  • Mark each code change with edit/add - by petru @ codex wherever the target file format supports comments without breaking syntax or generated output
  • For single-line changes, mark only that line with edit/add - by petru @ codex
  • For multi-line changes, wrap the changed block with start edit/add - by petru @ codex and end edit/add - by petru @ codex

Execution Rules (Token Optimization)

  • DO NOT read full files unless they are explicitly targeted with @filename, referenced from instruction *.md files, or required to complete the user's task.
  • Assume the workspace structure described in ./.codex-context.md and ./.codex-project-map.md is the current baseline unless the user indicates otherwise.
  • DO NOT read ./.codex-history.md end-to-end by default; search by keyword, subsystem, tag, or read only the latest relevant entries first.

Project Context

  • Read and follow ./.codex-context.md as the persistent repository context before starting work and when validating final changes.
  • Use ./.codex-project-map.md for 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

  1. Architecture & Orchestration Tasks: Prefer gpt-5.4 (Reasoning: High/Extra High). Use for complex requirement breakdown, solution design, and validation of large structural updates.
  2. 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.
  3. Frontend & Template Tasks: Prefer gpt-5.3-codex (Reasoning: Medium). This includes templates/, web_src/, CSS, and TypeScript changes.
  4. DevOps & Terminal Commands: Prefer gpt-5.4-mini (Reasoning: Low). Use for pnpm, git, go mod, npm, make, or bash execution flows and shell-oriented maintenance tasks.