Ownership map for source paths and documentation paths.
| Path | Purpose |
|---|---|
index.ts |
Plugin-host runtime entry |
lib/ |
Core runtime, auth, storage, UI, policies |
scripts/ |
CLI wrappers, repo hygiene, and helper scripts |
docs/ |
User docs + references + maintainer docs |
test/ |
Unit/integration/property tests |
config/ |
Plugin-host config examples |
vendor/ |
Vendored codex-ai-plugin + codex-ai-sdk dist shims |
assets/ |
Static project assets |
dist/ |
Generated build output (do not edit directly) |
| Area | Primary files |
|---|---|
| CLI auth manager | lib/codex-manager.ts |
| Settings hub | lib/codex-manager/settings-hub.ts |
| OAuth flow/server | lib/auth/* |
| Storage and paths | lib/storage.ts, lib/storage/paths.ts, lib/runtime-paths.ts |
| Worktree resolution | lib/storage/paths.ts (resolveProjectStorageIdentityRoot) |
| Unified settings | lib/unified-settings.ts, lib/dashboard-settings.ts, lib/config.ts |
| Account runtime | lib/accounts.ts, lib/rotation.ts, lib/forecast.ts |
| Quota runtime | lib/quota-probe.ts, lib/quota-cache.ts, lib/preemptive-quota-scheduler.ts |
| Resilience | lib/live-account-sync.ts, lib/session-affinity.ts, lib/refresh-guardian.ts, lib/refresh-lease.ts |
| Request pipeline | lib/request/*, index.ts |
| UI system | lib/ui/* |
| Repo hygiene | scripts/repo-hygiene.js |
| Area | Files |
|---|---|
| User docs | docs/getting-started.md, docs/configuration.md, docs/troubleshooting.md, docs/features.md, docs/upgrade.md, docs/privacy.md |
| Reference docs | docs/reference/* |
| Maintainer docs | docs/development/*, docs/DOCUMENTATION.md |
| Style and consistency | docs/STYLE_GUIDE.md |
Within this repo:
AGENTS.md(root scope)lib/AGENTS.mdforlib/**test/AGENTS.mdfortest/**
Deeper AGENTS files override higher-level guidance for their subtree.
dist/.tmp*directories- local caches/logs under runtime roots
Do not treat these as primary implementation sources.
When adding a new feature:
- Implement runtime/module code in
lib/. - Add/extend tests in
test/. - Update user docs (
docs/features.md+ relevant guides). - Update references if command/setting/path changed.
- Update architecture/config flow docs for cross-cutting behavior.
- Update
docs/upgrade.mdand any npm-script references when command flow/build steps changed.