# Agent guide What an AI agent contributing to `icat_app` needs to read first. This is the single starting page for an agent. Each section names the authoritative file; this guide does not duplicate content — it points. ## 1. Identity + base rules - `CLAUDE.md` — DECODE base rules (reviewer-required, verify-before-claim, patch-source-not-artifact, stage-files-explicitly, no-AI-attribution). - `AGENTS.md` — the thin entrypoint for any AI workflow (points back to `CLAUDE.md` + this file). ## 2. What this repo IS - `docs/architecture/repository-erd.md` — runtime topology (`app.py` → 8 tabs → `helper.py`), deploy pipe to Hugging Face Spaces. - `docs/architecture/active-surface.md` — which helpers each tab consumes. - `README.md` — public landing card (the HF Spaces frontmatter at the top is consumed by the Space; do not edit the keys). ## 3. Naming + structure rules - `docs/policies/naming-conventions.md` — `tab.py` rule, helper naming, what we do NOT do (no `src/` layout, no per-tab subdirs). - `docs/policies/root-artifact-policy.md` — what is allowed at root, what is gitignored, what is tolerated locally. ## 4. Where to NOT go - `docs/guides/ai-enablement-limits.md` — destructive ops, secret writes, AI-attribution, the deploy-critical file list. - `docs/guides/protected-boundary-policy.md` — `main` = HF deploy on every push; rules around touching `main.yml` and the runtime files. ## 5. How to actually do work - `docs/runbooks/local-setup.md` — clone → install → run → verify. - `docs/guides/git-and-pr-rules.md` — branch model, default flow (`feature/` → PR → `main`), PR target, the observed `dev` branch that is NOT the production branch despite being the repo default. - `docs/guides/review-workflow.md` — reviewer subagent contract, `.decode-reviewer-clean` marker semantics, override syntax. - `.github/pull_request_template.md` — the deploy-boundary checklist that appears on every new PR. ## 6. When CI fails - `docs/guides/ci-failure-triage.md` — per-workflow failure modes and recovery steps. Read before re-running anything. ## 7. Verification - `scripts/repo_validate.py` — local pre-push proof. Same script also runs on every PR via `.github/workflows/repo_validate.yml`. ## 8. Audit + standards alignment - `.claude/manifests/standards-sync.yaml` — the applied `decode-ai-standards` ref and slice ledger. - `.claude/skills/check_decode_ai_standards_updates/SKILL.md` — the freshness-check skill that compares the manifest against upstream. - `docs/progress/slice-integration-overview.md` — slice timeline. ## 9. Hooks + skills surface - `.claude/settings.json` — allowed/blocked tool patterns, hook wiring. - `.claude/hooks/` — runtime block-*.sh scripts. - `.claude/skills/{deslop,tdd,check_decode_ai_standards_updates}/SKILL.md` — repo-local skills. - `.githooks/pre-commit`, `.githooks/commit-msg` — git-side enforcement. Wired via `core.hooksPath` by `scripts/setup.sh`. ## Reading order for a fresh agent If you have time for only one pass, read in this order: 1. `CLAUDE.md` (base rules, reviewer procedure, hard rules 1–5) 2. `docs/guides/ai-enablement-limits.md` (what you cannot do and why) 3. `docs/guides/protected-boundary-policy.md` (the deploy story) 4. `docs/architecture/repository-erd.md` (what the code is) 5. `docs/runbooks/local-setup.md` (only if you intend to run it locally) If you have time for two passes, also read: 6. `docs/guides/review-workflow.md` 7. `docs/policies/naming-conventions.md` 8. `docs/policies/root-artifact-policy.md` The rest is referential — pull in on demand, not preemptively.