@@ -16,16 +16,70 @@ Bun-native TypeScript with no separate server compile step.
1616 ` tests/helpers/ ` , broader scenarios in ` tests/e2e-style/ ` .
1717- ` gui/ ` — React + Vite dashboard; packaged output is served from ` gui/dist ` .
1818- ` docs-site/ ` — public docs (Astro + Starlight), deployed to GitHub Pages.
19- - ` go/ ` — Go native runtime (primary on the ` dev2-go ` line during transition).
19+ - ` go/ ` — retired Go native-runtime experiment; kept only where the TypeScript
20+ runtime still references it. New work does not go here.
2021- ` structure/ ` — maintainer invariants and architecture notes; read before
2122 changing shared subsystems.
2223- ` scripts/ ` — release and maintenance tooling; ` scripts/release.ts ` is the
2324 release authority.
24- - ` devlog/ ` — planning and investigation artifacts (mostly gitignored).
25+ - ` devlog/ ` — maintainer-only planning and investigation notes. This is a
26+ ** private submodule** (` lidge-jun/opencodex-internal ` ), not a directory of
27+ this repository. See "The ` devlog ` submodule" below.
2528
2629Read the nearest nested ` AGENTS.md ` before changing files in a scoped
2730directory (` src/ ` , ` gui/ ` , ` docs-site/ ` , ` scripts/ ` , ` .github/ ` ).
2831
32+ ## The ` devlog ` submodule
33+
34+ Planning notes, triage matrices, and investigation artifacts live in the private
35+ ` lidge-jun/opencodex-internal ` repository, wired in as the ` devlog ` submodule.
36+ They quote live infrastructure state, provider behaviour, unfixed defects, and
37+ internal triage reasoning, so a public clone should carry the runtime and its
38+ docs and nothing else.
39+
40+ The pointer is deliberately ** loose** , so a missing or stale ` devlog ` can never
41+ fail a check:
42+
43+ - ` .gitmodules ` declares ` ignore = dirty ` , ` update = none ` , and ` shallow = true ` .
44+ A dirty or moved submodule working tree does not show up in ` git status ` on
45+ the parent, and ` git submodule update ` will not touch it unless asked
46+ explicitly.
47+ - No workflow checks it out. ` actions/checkout ` runs without ` submodules: ` , so
48+ CI clones the public tree only and the private URL is never resolved.
49+ - Nothing in the build, test, typecheck, or privacy-scan path reads from
50+ ` devlog/ ` . Contributors without access see an empty directory and every gate
51+ still passes.
52+ - ` devlog/ ` stays listed in ` .gitignore ` for the working tree; the submodule
53+ gitlink is tracked, its contents are not.
54+
55+ Two rules keep it that way. Never commit anything under ` devlog/ ` to * this*
56+ repository — commit inside the submodule, then update the pointer here as a
57+ separate commit. And never nest a git repository inside the submodule: a
58+ ` 160000 ` gitlink in a tree that CI does not initialize breaks
59+ ` actions/checkout ` for every contributor, which is exactly what happened before
60+ this split.
61+
62+ ## Security working notes
63+
64+ ** Security work is done in scratch space, never in a tracked directory.** That
65+ includes unreleased findings, severity assessments, draft advisories, exploit
66+ or bypass reasoning, reproduction steps for an unfixed defect, and
67+ pre-disclosure patch plans.
68+
69+ Use ` .tmp/ ` in the working tree (already gitignored) or a ` mktemp -d ` path.
70+ ` devlog/ ` is ** not** an acceptable location, and neither is a private
71+ repository: both get cloned across machines and CI, both outlive the embargo,
72+ and neither history is practical to purge afterwards.
73+
74+ Only the published outcome reaches a repository — the fix itself, its
75+ regression test, the release note, the advisory once it is public. Draft the
76+ advisory in scratch space and delete the scratch directory once the advisory is
77+ live.
78+
79+ This applies to ` AGENTS.md ` -following agents as much as to humans. If a task
80+ asks you to write up a security finding, put the write-up in scratch space and
81+ say where it is; do not add it to ` devlog/ ` , ` structure/ ` , or ` docs-site/ ` .
82+
2983## Commands
3084
3185``` bash
@@ -42,34 +96,29 @@ non-trivial change. CI runs these on Linux, Windows, and macOS.
4296
4397## Branch policy
4498
45- - ` dev ` — integration branch and the default target. A pull request goes here
46- unless it belongs to a scoped line below.
47- - ` dev2-go ` — parallel integration line for the Go native port: ` go/ ` ,
48- ` bin/native-runtime.mjs ` , ` src/lib/runtime-entry.ts ` , and the Go
49- release-asset tooling. Open for pull requests: the target-branch check
50- accepts ` dev ` and ` dev2-go ` as integration targets. Keep it to scoped Go
51- native-port work — the check cannot tell an intentional target from a
52- mistaken one, so that boundary is a review decision. It converges back
53- through maintainer-controlled merges, and promotion to ` main ` still happens
54- only from ` dev ` .
99+ - ` dev ` — the single integration branch and the target for every pull request.
55100- ` main ` — release branch. It only moves by maintainer-controlled promotion
56101 from ` dev ` (releases, docs deploys). Do not open feature PRs against ` main ` .
57102- ` preview ` — prerelease train (` x.y.z-preview.* ` versions).
58103
59- ### Transition to ` dev2-go `
104+ ### The retired ` dev2-go ` line
105+
106+ The project previously ran a parallel ` dev2-go ` integration line that was
107+ rebuilding the runtime as a Go native port, and every merge into ` dev ` had to be
108+ carried onto it. That dual-track policy is over: maintaining two integration
109+ lines cost more than the port returned, and dogfooding the Go runtime kept
110+ surfacing new defects.
60111
61- The project is moving its primary runtime to the Go native port, so ` dev2-go `
62- has to keep receiving everything that lands on ` dev ` . Pull requests against
63- ` dev ` stay welcome and unchanged — the extra work belongs to the maintainer who
64- merges them.
112+ ` dev2-go ` has been deleted, along with the ` codex/260728-go-port-* ` and
113+ ` tmp/dev2-go-source-export ` side branches. The full history lives in
114+ [ lidge-jun/opencodex-go-archive] ( https://github.com/lidge-jun/opencodex-go-archive )
115+ and the final tip is tagged ` archive/dev2-go ` in this repository. There is no
116+ carry or port obligation attached to a ` dev ` merge any more, and the
117+ ` needs-go-port ` label is gone.
65118
66- A merge into ` dev ` does not finish the task. The merging maintainer also
67- rebases that work onto ` dev2-go ` , ports whatever needs a Go counterpart under
68- ` go/ ` , and merges the port. The item is done only when both lines carry the
69- change. If a change has no Go counterpart, say so in the merge or tracking
70- issue; if the port has to wait, open a ` needs-go-port ` tracking issue against
71- ` dev2-go ` naming the source commits before closing out the ` dev ` merge.
72- [ ` MAINTAINERS.md ` ] ( ./MAINTAINERS.md ) holds the authoritative wording.
119+ Bun-native TypeScript is the only runtime line. If native code returns, the
120+ expectation is an incremental module (for example Rust via N-API) landing on
121+ ` dev ` , not a second full-runtime branch.
73122
74123The Claude Desktop integration formerly carried on the ` claudedesktop ` branch is
75124now fully merged into ` dev ` , and that branch has been retired. Desktop work
@@ -81,10 +130,10 @@ is ordinary maintenance rather than noise — open it as a normal pull request
81130and name the source commits in the description.
82131
83132The ** ` enforce-target ` ** CI check rejects pull requests whose head
84- ancestry sits on the ** ` main ` ** tip while far behind ** ` dev ` ** or ** ` dev2-go ` ** ,
85- and rejects empty, thin, or malformed descriptions; authors with repository
86- push permission skip the ancestry heuristic only. As with approval requirements
87- in [ ` MAINTAINERS.md ` ] ( ./MAINTAINERS.md ) , this is enforced by convention until
133+ ancestry sits on the ** ` main ` ** tip while far behind ** ` dev ` ** , and rejects
134+ empty, thin, or malformed descriptions; authors with repository push permission
135+ skip the ancestry heuristic only. As with approval requirements in
136+ [ ` MAINTAINERS.md ` ] ( ./MAINTAINERS.md ) , this is enforced by convention until
88137branch protection is configured.
89138
90139[ ` MAINTAINERS.md ` ] ( ./MAINTAINERS.md ) is authoritative for review and merge
@@ -100,12 +149,8 @@ reviewers (Codex, CodeRabbit).
100149 language. Be detailed and specific: name the file and line, describe the
101150 concrete failure mode, and suggest a fix. Avoid vague or purely stylistic
102151 commentary.
103- - ** Branch targeting:** flag any pull request that targets neither ` dev ` nor
104- ` dev2-go ` (releases and maintainer promotions are the only exceptions).
105- ` dev2-go ` is accepted by the automation but scoped by review: if a pull
106- request targets it without touching ` go/ ` , the native runtime entrypoint, or
107- the Go release-asset tooling, ask the author to retarget to ` dev ` . The
108- automation cannot make that judgement, which is why it is yours.
152+ - ** Branch targeting:** flag any pull request that does not target ` dev `
153+ (releases and maintainer promotions are the only exceptions).
109154- ** Security boundary (highest priority):** changes touching authentication,
110155 credential/token handling, OAuth flows, GitHub Actions workflows, release
111156 automation (` scripts/release.ts ` , ` .github/workflows/release.yml ` ), or
0 commit comments