opencodex / structure
AGENTS.md17k starsChanged 2 months agoMITView on GitHub
This file applies to structure/ and inherits the repository-wide rules in AGENTS.md. INDEX.md is the reading order and the source-to-doc map; it is generated from manifest.json, so it is never the file you edit to record something. A doc in this folder states the contract that holds right now, in the present tense, for one subsystem. That is the whole job. - Public user workflows belong in docs-site/. - Open work, triage, and investigation belong in devlog/. - Superseded or…
Trending
More talk lately.about the whole repository
Who's talking about lidge-jun/opencodex
- A Hacker News story“Proxy for OpenAI Codex and Claude Code, use any LLM with those apps”Hacker News · Jul 22, 2026 · 6 points
- @ds-wen.bsky.social“Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, …”Bluesky · Jul 22, 2026 · 3 likes
- router-for-me/CLIProxyAPI“Antigravity 调用 Claude 5.5 返回 404 Requested entity was not found”GitHub · Oct 4, 2026 · 1 reactions
- alphaXiv/OpenResearch“Feature Request: Opencodex Style Codex subscription pooling plan?”GitHub · Sep 18, 2026 · 1 reactions
- NousResearch/hermes-agent“[Provider compatibility]: Nous Portal stealth/ox-alpha returns empty responses with tools”GitHub · Aug 23, 2026 · 1 reactions
The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 53
Talked about on GitHub, Bluesky and Hacker News (53 times).
On GitHub · 50
- Oct 4, 2026Antigravity 调用 Claude 5.5 返回 404 Requested entity was not found — router-for-me/CLIProxyAPI1 reaction · 3 comments
- Sep 18, 2026Feature Request: Opencodex Style Codex subscription pooling plan? — alphaXiv/OpenResearch1 reaction
- Aug 23, 2026[Provider compatibility]: Nous Portal stealth/ox-alpha returns empty responses with tools — NousResearch/hermes-agent1 reaction · 1 comment
- Nov 2, 2026tracking: dashboard-first reliability and operator workflows (2026-11-02) — amanverasia/Janus0 reactions
- Nov 2, 2026fix(routing): preserve cooldown expiry and calculate retry time across overlapping scopes — amanverasia/Janus0 reactions
45 more on GitHub
- Nov 2, 2026feat(inventory): provide classified account recovery and safe re-entry into routing — amanverasia/Janus0 reactions
- Nov 1, 2026feat(install): option --opencodex (OpenCodex app, CLI ocx, workers, raccourci zsh) — WhiteRoseLK/ctf-agents0 reactions
- Nov 1, 2026install.sh : option --opencodex (orchestrateur multi-provider) — WhiteRoseLK/ctf-agents0 reactions
- Nov 1, 2026agent-skills.github.lidge-jun.opencodex: 2.95.0 → 2.96.0 — sudosubin/agents.nix0 reactions
- Oct 31, 2026agent-skills.github.lidge-jun.opencodex: 2.94.0 → 2.95.0 — sudosubin/agents.nix0 reactions
- Oct 30, 2026[Bug/错误]: Codex 即便透传也无法调用自带的搜索 — looplj/axonhub0 reactions
- Oct 29, 2026agent-skills.github.lidge-jun.opencodex: 2.93.0 → 2.94.0 — sudosubin/agents.nix0 reactions
- Oct 29, 2026fix(volcengine): carry reviewed Kimi regression coverage — AaronZ345/opencodex0 reactions · 2 comments
- Oct 27, 2026agent-skills.github.lidge-jun.opencodex: 2.92.0 → 2.93.0 — sudosubin/agents.nix0 reactions
- Oct 24, 2026agent-skills.github.lidge-jun.opencodex: 2.91.0 → 2.92.0 — sudosubin/agents.nix0 reactions
- Oct 24, 2026perf(proxy): bound CONNECT header buffering and eliminate repeated prefix copies — luvs01/opencodex0 reactions · 3 comments
- Oct 22, 2026agent-skills.github.lidge-jun.opencodex: 2.90.0 → 2.91.0 — sudosubin/agents.nix0 reactions
- Oct 21, 2026agent-skills.github.lidge-jun.opencodex: 2.89.0 → 2.90.0 — sudosubin/agents.nix0 reactions
- Oct 19, 2026agent-skills.github.lidge-jun.opencodex: 2.88.0 → 2.89.0 — sudosubin/agents.nix0 reactions
- Oct 17, 2026agent-skills.github.lidge-jun.opencodex: 2.87.0 → 2.88.0 — sudosubin/agents.nix0 reactions
- Oct 16, 2026agent-skills.github.lidge-jun.opencodex: 2.86.0 → 2.87.0 — sudosubin/agents.nix0 reactions
- Oct 15, 2026agent-skills.github.lidge-jun.opencodex: 2.84.0 → 2.86.0 — sudosubin/agents.nix0 reactions
- Oct 14, 2026[WRONG BRANCH] fix(cli): treat connected client state as successful ensure and inject OPENCODEX_API_AUTH_TOKEN in system-env — andrew05060414/opencodex0 reactions · 2 comments
- Oct 14, 2026Discovery watchlist — rishibhaskar777/whichai0 reactions
- Oct 14, 2026agent-skills.github.lidge-jun.opencodex: 2.78.0 → 2.84.0 — sudosubin/agents.nix0 reactions
- Oct 6, 2026Recover stalled OpenCodex processes with a Rust liveness watchdog — AutoDevJapan/cc-pc-tools-rs0 reactions · 4 comments
- Oct 5, 2026agent-skills.github.lidge-jun.opencodex: 2.77.0 → 2.78.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-skills.github.lidge-jun.opencodex: 2.76.0 → 2.77.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.lidge-jun.opencodex: 2.64.0 → 2.76.0 — sudosubin/agents.nix0 reactions
- Sep 29, 2026agent-skills.github.lidge-jun.opencodex: init at 2.64.0 — sudosubin/agents.nix0 reactions
- Sep 29, 2026Add OpenCodex — AppImage/appimage.github.io0 reactions · 1 comment
- Sep 20, 2026[Bug]: Model picker shows one flat list; group models by provider the way Hermes does — hardbeat920/monocode0 reactions · 4 comments
- Sep 20, 2026chore(deps): bump @bitkyc08/opencodex from 2.29.0 to 2.57.0 — Cyberdad247/Camelot-Ecosystem0 reactions · 2 comments
- Sep 19, 2026loop: dispatching lanes without arming a wake leaves every lane stalled after it opens its PR — lidge-jun/codexclaw0 reactions
- Sep 18, 2026[WRONG BRANCH] test(server): validate the #5014 fixture fix against current dev — luvs01/opencodex0 reactions · 4 comments
- Sep 16, 2026docs(workflow): make parallel worktree lanes mergeable across Codex tasks — lidge-jun/codexclaw0 reactions
- Sep 14, 2026Replace the retiring GPT-5.3-Codex-Spark in the Codex live tests — panarch/caffold0 reactions
- Sep 13, 2026Same-model background review can resolve a different cache scope than its gateway parent — NousResearch/hermes-agent0 reactions · 4 comments
- Sep 11, 2026collections: Measure-Object -Line silently counts only non-empty lines, so it undercounts any file with blank lines — lidge-jun/fuck-powershell0 reactions
- Sep 10, 2026feat(discovery): 週に一度、新しく出たツールの候補を集めて PR にする — konweb/nanteyomu0 reactions · 1 comment
- Sep 8, 2026fix(claude): stabilize Responses instructions for Muse/Go prompt cache — Warexpor/opencodex0 reactions · 4 comments
- Sep 8, 2026OpenCode Go rejects requests over missing `x-opencode-session` — raine/claude-code-proxy0 reactions
- Sep 7, 2026ocx: add page — tldr-pages/tldr0 reactions · 2 comments
- Aug 21, 2026feat(gui): Subagents Roles editor and prompt fields — yansigit/opencodex0 reactions · 2 comments
- Aug 21, 2026[WRONG BRANCH] feat(agent): marker-owned Codex role TOML sync — yansigit/opencodex0 reactions · 3 comments
- Aug 10, 2026[Feature]: First-class OpenCodeX integration for Codex and Claude Code sessions — stablyai/orca0 reactions
- Aug 9, 2026[兼容性问题] 请问 兼容 opencodex 代理吗? — architectds/modeldock0 reactions · 1 comment
- Aug 6, 2026Add opencodex package — bet4it/nur-packages0 reactions
- Jul 23, 2026增强自定义供应商模型发现:独立 modelsUrl 与 Anthropic 后缀回退 — makecindy/cindy0 reactions
- Jul 21, 2026docs: add opencodex visual explainer — 53able/docs-site0 reactions
On Bluesky · 2
- Jul 22, 2026Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK,… — @ds-wen.bsky.social3 likes and reposts · 1 reply
- Aug 22, 2026opencodex points Codex, Claude Code, Claude Desktop, and Grok Build at any LLM you like, but the sharper lesson is how it bounds the state… — @agentpalisade.bsky.social1 likes and repost
On Hacker News · 1
- Jul 22, 2026Proxy for OpenAI Codex and Claude Code, use any LLM with those apps6 points · 1 comment
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs-site/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- gui/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- ocxSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
If you cannot write a sentence in the present tense about how the system behaves today, it is not a structure doc.
- Distinctive: line 116
Write or move the file.
- Very specific: line 117
Add or update its manifest.json entry: path, tier, title, scope, documents.
- Very specific: line 118
Add or update any affected contract authority and dependent links in manifest.json.
- Distinctive: line 128
every doc on disk is in the manifest and every manifest doc exists, exactly once.
- Distinctive: line 130
no doc exceeds the line budget, and no grace entry outlives the split it promised.
- Very specific: line 131
every relative link resolves, including its #anchor.
- Very specific: line 133
every backticked repository path a doc names is real, checked against the git index rather than the filesystem — existsSync cannot tell a …
- Distinctive: line 137
no doc body carries either inline decision-log marker: the bracketed Decision-Log heading that the old layout used, or the Korean bullet …
- Distinctive: line 141
every decision record is linked from exactly one doc, and no number is reused.
- Distinctive: line 142
every bound invariant names an existing test that names the id back, and every unbound one is recorded with a reason.
- Very specific: line 144
every src/ directory and top-level module is described by a doc or recorded as undescribed.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rules for structure/
This file applies to structure/ and inherits the repository-wide rules in AGENTS.md.
INDEX.md is the reading order and the source-to-doc map; it is generated from
manifest.json, so it is never the file you edit to record something.
What belongs here
A doc in this folder states the contract that holds right now, in the present tense, for one subsystem. That is the whole job.
- Public user workflows belong in
docs-site/. - Open work, triage, and investigation belong in
devlog/. - Superseded or alternative reasoning belongs in
decisions/, not in the doc body. - Unreleased security findings belong in scratch space and nowhere in this repository. The rule in
the root
AGENTS.mdbinds this folder without exception.
If you cannot write a sentence in the present tense about how the system behaves today, it is not a structure doc.
Layout rules
- File names are kebab-case, start with a letter, and sit at most one directory deep:
providers/google.md, notproviders/google/wire.md, and not04_transports.mdor04-transports.md. - Ordering lives in
manifest.json, never in a filename. Leading digits are rejected outright. The oldNN_topic.mdscheme produced two09_files and made splitting a doc cost a renumber, which is how04_transports-and-sidecars.mdreached 1,860 lines before this folder was reorganised. - A doc stays under the line budget in
manifest.json. Over budget, split it along a topic boundary and give each half its own manifest entry. Agrace.oversizeDocsentry is for a split already planned; the gate drops it again once the doc is back under budget. - Stage a new file before running the gate. Repository paths are resolved through the git index,
so a file you have written but not
git added does not exist as far as the check is concerned. That is deliberate: CI runs on a clean checkout, and a gate that passed on untracked local files would disagree with it. - Know what the budget does and does not do: it is a line count, so a doc written as a wide table can carry far more prose per line than one written as paragraphs. It bounds the runaway-file failure, not density.
The source-to-doc map
Each doc lists the source areas it describes, in its documents array. INDEX.md publishes
the inverse.
- An area can be described by more than one doc, and usually is. These docs are organised by
topic;
src/is organised by module.src/server/is genuinely described by the management-API doc, the Responses transport doc and the Images doc. An earlier revision of this folder demanded exactly one owner per area, and that rule was simply false here — a false rule is worse than none, because the gate reports green while the map sends a maintainer to the wrong doc. - Changing an area obliges the same change to review every doc listed for it. Review fan-out is unchanged by contract authority: update the authority when the shared contract changes, and update a dependent only when its local explanation or consequence changes. A reviewed document whose content remains accurate does not need copied unchanged prose.
- Describing an area means naming a path inside it. If a doc explains a subsystem without ever citing
a path, the map cannot see it, and the area lands in
grace.undocumentedSourceAreasinstead — which is a signal to add the path reference, not a place to park work. The gate checks the weak form of this: adocumentsentry is rejected when the doc never names the area or any path under it. Naming the directory itself passes, which a table of directory names does, so the check catches an invented claim but does not prove the doc says anything useful about the area. That part is review. - A new
src/<area>/or top-levelsrc/*.tseither joins a doc'sdocumentslist or is recorded ingrace.undocumentedSourceAreaswith a reason. The gate rejects one that is neither.
What the map still does not do: it cannot tell you that two docs describe the same behavior in contradictory words. Avoiding that is a review judgement. Prefer one statement and a link over two statements that will drift apart.
Cross-cutting authority is declared by the optional versioned contracts object in
manifest.json. Each entry has a stable kebab-case id, one owner with a
manifest-declared document and heading anchor, and a dependents array of manifest-declared
documents. Every dependent links the exact owner anchor. The registry supplements the source map;
it never narrows which documents a source change requires review of.
The gate proves declared topology: identifiers are unique, files and anchors exist, and each dependent carries the declared link. It does not compare prose or prove that the owner statement is behaviorally correct. Those remain review judgements.
Decision records
decisions/ADR-NNNN-<slug>.md holds the reasoning: intent, prior constraints, alternatives, the
choice, why, and consequences.
- One record has exactly one owning doc, which links it with a
> Decision record:line. - Numbers are permanent and unique. They are deliberately not required to be contiguous: two branches that each add a record would otherwise both take the next number and collide on merge.
- Records are historical. When the contract changes, edit the doc body and add a new record; do not rewrite an old one to match. For the same reason the gate does not validate the repository paths a record names — a record describes a past tree, and holding it against the present one would force you to falsify it.
- A record's title names the doc section it was recorded under, not the decision it contains. That is
why every title reads
decision recorded under "<section>": the records extracted during the 2026-09-11 reorganisation took their heading from the section they sat in, and a title that looked like a decision name but was not would send a maintainer to the wrong record. Read the body. - Ownership is the
> Decision record:link, and nothing else. A record path mentioned in prose or shown inside a fenced example is not a claim, so an illustration cannot make a doc a second owner. The link has to land insidedecisions/; pointing it elsewhere is rejected rather than matched on the filename.
Invariants
overview.md is the invariant index. Each entry needs a stable INV-<AREA>-NN id, and a
bound entry adds an Enforced by line naming exactly one tests/**.test.ts path, with that id repeated
in a comment inside the test.
Be precise about the strength of that binding, because it is easy to overstate:
- It proves the test file exists and claims the id. Deleting or renaming the file fails the gate.
- It does not prove the assertions inside still cover the rule. Moving the assertions to another file while leaving the comment behind passes. Only review catches that.
An invariant with no honest test goes in the index without an Enforced by line and with an entry
in grace.unboundInvariants explaining why. Naming a test that would pass while the rule was
violated is worse than admitting the gap: it converts an open question into false assurance.
Adding or changing a doc
- Write or move the file.
- Add or update its
manifest.jsonentry:path,tier,title,scope,documents. - Add or update any affected contract authority and dependent links in
manifest.json; review every document mapped to the changed source area even when its text remains accurate. bun run structure:indexto regenerateINDEX.md.bun run structure:checkuntil it is green.
What the gate checks
bun run structure:check — also run by tests/ci-workflows/structure-ssot.test.ts, so it blocks CI —
verifies that:
- every doc on disk is in the manifest and every manifest doc exists, exactly once;
- file names are kebab-case, letter-initial, and at most one directory deep;
- no doc exceeds the line budget, and no grace entry outlives the split it promised;
- every relative link resolves, including its
#anchor; - a fragment-only link resolves against its own document, which is where one broken anchor was hiding;
- every backticked repository path a doc names is real, checked against the git index rather than
the filesystem —
existsSynccannot tell a tracked file from untracked local leftovers, and it is case-insensitive on Windows and case-sensitive on Linux CI, which would make the gate mean something different on each machine; - no doc body carries either inline decision-log marker: the bracketed Decision-Log heading that the old layout used, or the Korean bullet template that followed it. Reasoning written as ordinary prose is not detectable and stays a review judgement. The check is a literal match, which is why this line describes the marker instead of quoting it;
- every decision record is linked from exactly one doc, and no number is reused;
- every bound invariant names an existing test that names the id back, and every unbound one is recorded with a reason;
- every
src/directory and top-level module is described by a doc or recorded as undescribed; - contract ids are unique, owner and dependent documents exist in the manifest, owner anchors exist, and every dependent links its declared authority without listing the owner as a dependent;
- the manifest itself parses and has the shape the gate expects, reported as a failure rather than a stack trace;
overview.mdexists, because its absence would otherwise silence every invariant check at once;INDEX.mdmatches what the manifest generates, compared after newline normalisation so a CRLF checkout is not a failure.
Contract checks establish declared authority and links only. They make no automatic claim that an owner's prose is semantically complete or that a dependent's explanation is behaviorally correct.
Checks are scanned with fenced code blocks removed, so an example inside a fence does not trip a rule it is only illustrating.
One boundary worth stating, because it looks like a gap and is a deliberate one: a backticked token is
treated as a repository path only when its first segment is a top-level entry this repository has or
used to have. That covers root files too, so package.json and MAINTAINERS.md are checked directly,
not only through the links that point at them. What is NOT checked is a bare filename that was never
a top-level entry, because these docs name runtime files that live in a user's home rather than in
the repository — config.toml, models_cache.json, ocx.pid — and validating every filename-shaped
token would reject them.
The top-level set deliberately includes roots that no longer exist, such as go/. Deriving it from
the current tree alone would make every reference to a deleted directory invisible at exactly the
moment those references go stale.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

