Repository Agent Instructions¶
Agents working in this repository should stay inside the shared uv-managed workflow whenever
possible. Prefer repository-local utilities over ad hoc one-off commands when the repository
already exposes the behavior through make or uv run repo-rag ....
Additional standing instructions live in AGENTS.md.d/*.md. Read them before reporting
verification results, and anchor status statements to the newest file in docs/audit/.
Codex Skills¶
- Repo-local skill implementations live under
.codex/skills/. - Use
file-summary-syncwhen tracked files are added, removed, renamed, or whenFILES.mdandFILES.csvneed to stay aligned with the repository tree. - Use
exploratorium-translation-syncwhen bilingual file/link/fetch-state summaries, bibliography fetch reporting, or thepublication/exploratorium_translation/subdocument are in scope. - Use
rust-sqlite-lookupwhen a repo question needs exact file hits, path discovery, or a cheap local search pass beforemake ask-dspy. - Use
repo-verification-audit-loopwhen verification work, audit-note updates, or repository health reporting are part of the task. - Use
post-push-gh-run-loggingimmediately after each push and whenever GitHub Actions failures orsamples/logs/updates are in scope. - Use
notebook-playbook-syncwhen editing notebooks, notebook scaffolding, notebook-facing docs, or training and population sample surfaces. - Use
todo-backlog-syncwhen editingtodo-backlog.yaml,TODO.MD, the publication backlog table, or backlog-facing workflow documentation.
Primary Utilities¶
make utility-summarymake files-syncmake rust-lookup-indexmake rust-lookup QUERY="..."make todo-syncmake exploratorium-syncmake ask QUESTION="..."make ask-live QUESTION="..."make retrieval-evalmake discover-mcpmake azure-openai-probemake azure-inference-probemake smoke-testmake verify-surfacesmake gh-runsmake gh-watchmake gh-failed-logsuv run repo-rag utility-summaryuv run repo-rag sync-file-summaries --root .uv run repo-rag sync-exploratorium-translation --root .cargo run --manifest-path rust-cli/Cargo.toml -- indexcargo run --manifest-path rust-cli/Cargo.toml -- lookup "dspy training"uv run repo-rag ask-live --question "..." --provider azure-openaiuv run repo-rag retrieval-eval --top-k-sweep "1,2,4,8"uv run repo-rag ask --question "..." --use-dspy
Working Rules¶
- Start with an existing
maketarget oruv run repo-rag ...command before inventing a new workflow. - Keep notebooks, tests, CLI behavior, and docs aligned around the same package helpers.
- When changing retrieval, MCP discovery, deployment metadata, or verification behavior, update tests and notebook guidance in the same turn.
- If adding a new user-facing utility, expose it through both the Python CLI and the
Makefilewhen practical. make askanduv run repo-rag asknow perform Rust SQLite lookup-first narrowing automatically. Usemake rust-lookupwhen you want to inspect those direct hits yourself before escalating tomake ask-dspy.- Prefer tests that validate user-visible behavior instead of only internal helpers.
- After every push, use
post-push-gh-run-logging: runmake gh-runs, thenmake gh-watch, and write a summary log intosamples/logs/. If the watched run fails, inspect it withmake gh-failed-logs, fix the repository, rerun local validation, and push again. If the only follow-up would be a recursive log-only commit for a prior log-only push, summarize the result instead of creating endless log churn. - If a permission-gated action is blocked, explicitly offer the user the option to make that permission permanent in Codex settings before retrying.
- Keep reusable notebook logic in
src/with doctests or normal pytest coverage instead of embedding it in notebook cells. - Keep the repository fully
uv-managed unlessuvno longer covers a required workflow. - Treat
README.AGENTS.mdas the overreaching research narrative for the repository; when a turn materially changes workflow stages, DSPy capabilities, notebooks, verification posture, publication scope, or deployment handoff, updateREADME.AGENTS.mdin the same turn. - When tracked files, publication inventories, or bibliography-linked fetch summaries change, refresh
FILES.md,FILES.csv, and the exploratorium outputs in the same turn.
Research Narrative¶
README.AGENTS.mdis the top-level narrative that explains how the repository's research story fits together across code, notebooks, DSPy, audits, CI logs, publication outputs, and deployment metadata.- Keep it current continuously, not as occasional cleanup. If the repo story changes, the narrative doc should change with it.
Validation Expectations¶
- For Python changes, run
uv run python -m compileall src tests. - For utility changes, run
uv run pytest tests/test_utilities.py tests/test_repository_rag_bdd.py. - For quality-sensitive changes, run
make quality. - For coverage-specific checks, run
make coverage. - After syncing the environment, run
make hooks-install. - If
cargoexists, also runcargo build --manifest-path rust-cli/Cargo.toml. - After pushing, run
make gh-runs GH_RUN_LIMIT=10, thenmake gh-watch, and store the relevant run details insamples/logs/.
Audit Files¶
- Use
repo-verification-audit-loopwhen verification evidence, audit-note updates, or repository status reporting are part of the task. - Review
docs/audit/README.mdand the newest dated audit note before describing repository health. - When verification status changes, update the relevant
docs/audit/*.mdfiles in the same turn.
Notebook Expectations¶
Notebooks in notebooks/ should read like research playbooks:
- Use
notebook-playbook-syncwhen notebook files or notebook-facing helpers are in scope. - Use Markdown headers and subheaders to explain each step.
- Keep code cells short and tied to one research action.
- Reuse repository-local utilities and package APIs instead of duplicating logic inline.
- Move training and corpus-population logic into doctested Python modules under
src/.