This file is the repo-local Codex development overlay for this monorepo. Codex reads it while working inside this repository; it is not installed into user projects.
The installable Codex pack source lives in src.codex/. The Claude Code pack source lives in src.claude/. See INSTALL.md for installation instructions.
Use this file together with the shared governance in shared/AGENTS.shared.md. The local .agents/ directory is repo-install output created by the install scripts and is not committed.
At the start of a new maintenance session, read docs/new-session-guide.md before non-trivial edits. It is the repo-local orientation contract: this monorepo is the source of truth, and installed files under ~/.codex/, ~/.claude/, project .agents/, or project .claude/ are runtime outputs to sync only after the owning source is fixed.
When working inside this monorepo itself, do not assume that a missing local .agents/ tree means the Codex install is broken. Maintainers may intentionally rely on the global Codex install under ~/.codex/ while editing the installer source. If .agents/.agents-mode.yaml is absent here, ordinary reads should fall back to ~/.codex/.agents-mode.yaml before treating the state as missing. Create a repo-local install only when the user explicitly wants one, and explain that it should be created by the installer rather than ad hoc file creation.
When maintaining the Codex side of this monorepo or shared repo-local governance:
- keep
shared/AGENTS.shared.mdaligned with the installed global policy because it is the single shared source for both packs - update
src.codex/skills/<role>/SKILL.mdwhen a role's contract, artifact, or gate changes - update
src.codex/skills/<role>/agents/openai.yamlwhen trigger or prompt behavior changes - MUST update
shared/references/for repo-wide design-only methodology and the affectedreferences-codex/pack-specific docs when governance, protocol, gate, or routing semantics change in the installed pack. Shared references are the canonical cross-pack methodology source of truth; pack-local references must stay aligned where they carry Codex-specific semantics or stable compatibility pointers. A governance change that updatessrc.codex/without updating the affected shared or pack-local reference docs is incomplete. - Treat
shared/references/subagent-operating-model.mdas the canonical shared blueprint andreferences-codex/subagent-operating-model.mdonly as the Codex-specific runtime and repository addendum. Do not reintroduce a second full Codex-side methodology copy inreferences-codex/. - MUST update
README.mdandINSTALL.mdwhen pack structure, skill count, install targets, or entry points change. A structural change without doc update is incomplete. - MUST update
RELEASE_NOTES.mdin the same change when staged tracked content changes installed behavior, governance, routing, role contracts, install surface, developer or operator workflow, or other release-relevant user-facing expectations. Keep the log in reverse-chronological## YYYY-MM-DDsections: append new explanatory bullets under the current date heading or create today's heading if it is missing, and do not keep a long-lived## Unreleasedbucket. The release-notes entry must explain the improvement, why it matters, and the affected user or operator workflow, not just list filenames or terse labels. Purely local-only hygiene edits such as formatting, link fixes, report-only churn, scratch cleanup, archive moves, and non-semantic wording cleanup do not require a release-notes entry, but that exemption must be an explicit reviewer determination at publication time rather than an untracked assumption. - When updating human-facing repo documentation, apply the shared documentation terminology discipline: end terminology-heavy documents with
## Terms and Abbreviationsor a localized equivalent, and explain unclear terms, abbreviations, provider names, role names, workflow labels, and mixed-language terms there. - No mechanical application: do not copy, move, rename, merge, or propagate content mechanically — between packs, between files, or within the same file — without verifying that the result is correct in the target context. Platform-specific semantics (execution model, parallelism, invocation mechanism, paths, tool capabilities), ownership boundaries, and behavioral implications must be checked before the change lands. "The other pack has it" or "the source file said so" is not sufficient justification. Every change must be independently valid where it lands.
- Provider/runtime claims: when documentation or implementation describes provider-native behavior, explicitly distinguish
official provider behavior,Orchestrarium repo-local convention, andobserved installed/runtime behavior. Use the official provider docs when they exist, and do not present a source-tree pattern or local install convention as if it were guaranteed by the provider itself. For install-contract changes, verify both the authoritative doc and the installed result before calling the behavior established. - Repo-local external routing heuristic:
externalProvider: autouses only production-recommended provider profiles, currentlycodex | claude, and resolves through the active priority profile rather than by host-pack default. Orchestrarium treatsexternalPriorityProfile: balancedas the quiet default production profile. Gemini and Qwen are classified here asWEAK MODEL / NOT RECOMMENDED; keep both out of productionautorouting and use explicitexternalProvider: geminiorexternalProvider: qwenonly as example or compatibility demonstration paths unless a later accepted design promotes either provider into production routing. - Reserve advisory/review candidate:
reserveis a symbolic supplemental read-only candidate for advisory and review profile orders only, after primaryclaudeandcodex, and independent of the primary provider candidate.reserveResolverbinds it to one concrete read-only resolver:claude-sonnet,claude-wrapper,wrapper:<command>, ordisabled.wrapper:<command>must be a PATH-resolved command or repo-relative wrapper path rather than a workstation-specific absolute path in tracked config, and the execution record must name the actual resolved path. Mutating implementation, code-generation, file-editing, or publication actions must not usereserve; they must use the allowed primary provider path or report the provider unavailable. - External CLI prompt delivery: provider-backed consultant, worker, and reviewer launches that carry a substantive task prompt must use file-based prompt delivery: write the prompt to a temporary prompt file and feed it through the provider's stdin or supported file-input mechanism. Keep argv to launcher flags, model/profile options, and file paths; inline prompt argv is only for tiny smoke checks or a documented provider limitation, and the deviation must be recorded.
- Source-tree organization: the shared rules
Directory-level entity separationandTrash hygiene and archival(inshared/AGENTS.shared.md### Scope and ownership discipline) govern how this repo organizes source files. Three legacy directories (src.claude/agents/scripts/,src.codex/skills/lead/scripts/, rootscripts/) are grandfathered exceptions for user-copy / install-script convenience. New entity types MUST follow the shared rule (typed subdirectory or canonical home), not extend the legacy co-located dirs. Full design narrative + exception rationale + worked examples:shared/references/repository-source-hygiene.md. - Cross-pack sync: when editing shared semantic blocks in
operating-model.mdorsubagent-contracts.md, consultcross-pack-reconciliation.mdto identify and update the matching block in the other pack. - Monorepo install choice: when a skill or repo-local workflow wants Codex runtime state such as
.agents/.agents-mode.yamlwhile operating inside this monorepo, use the global install at~/.codex/as the default fallback when the local overlay is absent. Create a repo-local install viascripts/install-codex.sh|ps1orinstall.sh|ps1only when the user explicitly wants project-local runtime state; do not synthesize.agents/by hand inside the monorepo just to satisfy a gate. - update
src.codex/skills/lead/operating-model.mdwhen orchestration or gate semantics change - update
src.codex/skills/lead/external-dispatch.mdwhen the agents-mode schema, provider paths, provenance rules, or external role dispatch semantics change - update
docs/agents-mode-reference.mdand any affected provider help surface when external-role eligibility, unsupported-route policy, or fail-fast external routing semantics change - update
src.codex/skills/consultant/SKILL.mdwhen consultant execution policy changes, keeping it aligned with the shared external-dispatch contract instead of duplicating dispatch semantics inline - use
$knowledge-archivistfor repository hygiene, canonical-source alignment, documentation upkeep, and reference maintenance - route semantic repository control-plane changes prepared by
$knowledge-archivistthrough an independent$architecture-reviewergate before completion or publication; hygiene-only edits such as link fixes, formatting, recovery-entry-point sync, archive moves, and non-semantic wording cleanup do not require that extra reviewer
Use these roles first for skill-pack support and maintenance:
$lead: coordinate maintenance work, routing, accepted artifacts, and gate decisions$knowledge-archivist: docs, references, structure, canonical-source alignment, reports, and hygiene cleanup$toolchain-engineer: build, packaging, installation, reproducibility, and developer ergonomics for the skill pack$qa-engineer: verification of maintenance changes against accepted behavior and likely regressions$architecture-reviewer: maintainability and cohesion gate for structural or semantic control-plane changes to the pack$external-worker: cross-provider worker-side adapter for eligible non-owner, non-review roles; preference comes from.agents/.agents-mode.yamlor explicit user routing$external-reviewer: cross-provider review and QA adapter for eligible review-side roles; preference comes from.agents/.agents-mode.yamlor explicit user routing$consultant: independent advisory second opinion for ambiguous workflow or policy changes; ordinary use is optional, any repo-local consultant-check remains advisory-only, andconsultantMode: disabledwaives consultant closeout instead of leaving a hidden blocker$product-manager: roadmap, sequencing, and admission decisions for the skill pack itself
This monorepo keeps work-items/ as repo-local task memory for interruption recovery, but work-items/ is intentionally local-only and must stay out of tracked git.
-
work-items/remains the repo-local recovery directory for admitted work and archive history on the operator machine, but it is not publication-facing tracked canon for this repository. -
When information from local task memory needs to become tracked source of truth, promote the accepted result into the owning canonical surface such as
docs/,shared/references/, pack references,README.md,INSTALL.md, orRELEASE_NOTES.mdinstead of committingwork-items/directly. -
New admitted work routed through
$leadmay still usework-items/locally for recovery, resume, and archive hygiene; completed, cancelled, or superseded work stays in the configured local archive location unless a human explicitly asks to publish a distilled artifact elsewhere. -
For lead-routed non-trivial work,
roadmap.md,brief.md, andstatus.mdare mandatory when the local task-memory workflow is enabled. -
plan.mdbecomes mandatory before implementation or review starts. -
closure.mdbecomes mandatory before moving an item to the configured archive location. -
Missing required upstream artifacts are a hard gate. If the current stage needs
roadmap,research,design,plan, specialist constraints, or review artifacts and they are missing or stale, stop and restore them or route the item back to the required upstream stage before continuing delivery. -
Ownership:
$product-managerownsroadmap.mdwhen roadmap intake is explicit; if the admission source is a direct human request,$leadrecords that source inroadmap.md.$leadownsbrief.mdandstatus.md.$plannerownsplan.md. Each specialist owns the artifact for their own lane.$knowledge-archivistowns recovery-entry-point, template, and archive hygiene for the configured task-memory locations. -
notes.mdornotes/holds technical notes, implementation discoveries, and follow-ups. Accepted long-lived decisions belong indesign.mdoradr.md, not only in notes. -
closure.mdholds the final closeout record before archive move;status.mdstays the live recovery log in the configured recovery location. -
After interruption or context loss, resume from the repository-defined recovery entry point, then the item's
status.md, thenbrief.md. If the required docs are missing or stale, stop and restore task memory before continuing delivery. -
The older ignored
.plans/directory is legacy local history only. Do not treat it as the canonical tracked source of truth for new work items.
- shared/references/repository-publication-safety.md is the repo-wide source of truth for what may be committed to tracked git.
RELEASE_NOTES.mdis the canonical tracked release log for this repository.- Root
.gitignoredefines the local-only boundary at/.scratch/,/.plans/,/.reports/, and/work-items/; keep raw logs, transcripts, temp outputs, and repo-local task-memory artifacts there. - Never hardcode workstation-specific paths, usernames, drive letters, or local tool details into tracked content unless they are intentionally public and synthetic.
- Human review before
git push, release, or equivalent publication must include a leak-check of staged changes. - Run
bash scripts/check-publication-gate.shor.\scripts\check-publication-gate.ps1as the repo-local publication gate before publication review; it combines the staged leak scan with theRELEASE_NOTES.mdrequirement for release-relevant tracked changes. - If staged tracked changes are release-relevant, publication review must confirm that
RELEASE_NOTES.mdis updated in the same change and that the entry explains the change's practical meaning, not just its title. Publication without either the matching explanatory release-notes entry or an explicit reviewer determination that the change is release-notes-exempt isBLOCKED. $knowledge-archivistis the default human approver at the publication gate.$leadremains the default operator of the publication-safety scan and prepares the staged diff for publication, but the publication approver must be a different role than the role that accepted the artifact into the pipeline.- Relevant reviewers may run the same publication-safety scan for spot checks or gate review, and author self-checks do not replace the required human publication review.
- Only
$security-reviewermay approve a publication-safety exception. Without that approval, publication isBLOCKED.
shared/references/subagent-operating-model.mdis the canonical shared blueprint reference for cross-pack orchestration methodology; Codex runtime specifics remain in references-codex/subagent-operating-model.md.- references-codex/periodic-control-matrix.md is the Codex-side periodic-control reference for this repository.
periodic-control-matrixremains intentionally pack-local for now rather than moving intoshared/references/, because it still depends on pack/runtime vocabulary, task-memory layout, and runtime-doc links that are not yet expressed as a generic shared skeleton.- Use periodic controls to catch stale items, drift, archive hygiene issues, repo consistency drift, and publication-safety regressions between stage transitions.
- Do not use periodic controls to replace mandatory stage gates, reviewer approvals, or human publication review.
Keep accepted artifacts near the code when the repository is the source of truth: roadmap decision package, canonical brief, status log, research memo, design package, UX design package when used, specialist constraint packages, phase plan, technical notes when needed, and review reports.
AGENTS.md: the Codex-readable governance and instruction file for this repository.AGENTS.shared.md: the shared governance source merged into installable provider packs.ADR: Architecture Decision Record, a durable note for an accepted architecture decision.API: Application Programming Interface, a programmatic contract exposed by a tool, runtime, or service.argv: the command-line argument vector passed to a process.CLI: Command-Line Interface, a terminal command surface such ascodex,claude, orgemini.Codex: the OpenAI Codex runtime and provider pack maintained by this repository.Claude Code: Anthropic's Claude Code runtime and matching provider pack.Gemini: the Google Gemini runtime/provider family; in this repository it is example-only unless explicitly selected.MCP: Model Context Protocol, a protocol used to expose tools and resources to agent runtimes.QA: Quality Assurance, verification work focused on tests, regressions, and acceptance criteria.Qwen: the Qwen runtime/provider family; in this repository it is example-only unless explicitly selected.RELEASE_NOTES.md: the tracked release log for release-relevant repository changes.stdin: standard input, the input stream provided to a process.UI: User Interface, the visible or interactive surface presented to a user.UX: User Experience, the user's end-to-end interaction quality and clarity.WEAK MODEL / NOT RECOMMENDED: the repository's classification for example-only providers that must stay out of productionautorouting.YAML: YAML Ain't Markup Language, the structured data format used by files such as.agents-mode.yaml.