2.8 KiB
Codex Prompt Library
P00 — Repository takeover
Read AGENTS.md and all referenced product/architecture/API/MCP/plan/DoD docs. Do not modify code. Inspect the repository and report current status, V1 gaps, top 5 risks, next 1–3 Task IDs, and blockers. Do not redesign accepted ADRs.
P01 — Plan one task
Plan <TASK_ID> only. Read relevant docs/code. Output goal, touched modules, steps, tests, migration/API impact, risks and out-of-scope. Do not modify files.
P02 — Implement one task
Implement <TASK_ID> only. Preserve AGENTS.md invariants. Do not implement future tasks. Run format/lint/typecheck/tests and RAG eval if retrieval behavior changes. Report summary, changed files, validation, risks and follow-ups.
P03 — Self-review as PR
Review the current branch for correctness, architecture violations, ACL leakage, secrets, provider coupling, migration safety, idempotency, test coverage, API/MCP compatibility and source traceability. Fix Critical/High findings within scope and rerun validation.
P04 — Bug fix
Reproduce <BUG>, identify root cause, add failing regression test, implement smallest safe fix, run relevant checks, and report root cause + validation.
P05 — Retrieval change
For <TASK_ID>, identify changed retrieval stage. Preserve ACL-before/during-retrieval and source metadata. Run Golden Dataset before/after and report quality + latency deltas.
P06 — Embedding benchmark
Compare <MODELS> using the same Golden Dataset, corpus, chunk profile and retrieval config. Report Recall@K, MRR, NDCG@10, P50/P95 latency, throughput, dimensions, GPU/API needs, storage/cost and recommendation.
P07 — Parser benchmark
Compare MinerU and Docling on anonymized Chinese enterprise docs: native/scanned PDF, tables, multi-column, DOCX, PPTX, XLSX where applicable. Evaluate completeness, order, structure, tables, traceability, OCR, latency and GPU. Recommend routing rules.
P08 — MCP task
Implement/review <TASK_ID>. Expose business semantics only; bind identity; reuse REST authorization/application services; preserve traceability; do not expose underlying provider choices.
P09 — ACL audit
Verify Knowledge Base, folder inheritance, document overrides, REST, MCP, source download, retrieval, compiled knowledge and jobs. Fail review if unauthorized content can enter candidate Top-K before filtering.
P10 — Knowledge Compilation
Implement <TASK_ID> while preserving immutable source, source links, permission inheritance/intersection, stale detection and conflict safety. Never silently merge conflicting claims.
P11 — Release readiness
Assess V1 against PRD/DoD/tasks/ADRs: functionality, migrations, ACL/security, secrets, observability, backup/rebuild, performance, RAG quality, MCP, Admin Console and Compilation. Return blockers, high risks, known limitations and go/no-go.