Skip to content

Commit d4c87eb

Browse files
committed
docs: add maintainer operations guide
1 parent 6d67f4c commit d4c87eb

3 files changed

Lines changed: 142 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Added GitHub Actions npm Trusted Publishing workflow so tagged releases can publish without local npm tokens or OTP.
6+
- Added maintainer operations docs for releases, Trusted Publishing, and bundled Codex skill updates.
67

78
## 0.2.4 — 2026-06-05
89

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,4 @@ npm test # FakeAdapter only, no network
172172

173173
Regression suite covers keyed replay, dependency-subtree invalidation, schema repair, transient retry, writable-cwd protection, deterministic shadows + stable cache keys, soft-budget skip, crash-residue / non-terminal-repair journal recovery, backend routing, and the CLI (`install-codex` + `run`).
174174

175-
See [CONTRIBUTING.md](CONTRIBUTING.md) for local development rules and [docs/CODEX_FOR_OSS_APPLICATION.md](docs/CODEX_FOR_OSS_APPLICATION.md) for the Codex for Open Source application prep notes.
175+
See [CONTRIBUTING.md](CONTRIBUTING.md) for local development rules, [docs/MAINTAINER_OPERATIONS.md](docs/MAINTAINER_OPERATIONS.md) for release / skill update operations, and [docs/CODEX_FOR_OSS_APPLICATION.md](docs/CODEX_FOR_OSS_APPLICATION.md) for the Codex for Open Source application prep notes.

docs/MAINTAINER_OPERATIONS.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Maintainer operations
2+
3+
This file records the project-specific release and Codex skill maintenance steps. It is intentionally operational: follow it when publishing, updating bundled skills, or helping another maintainer refresh their local setup.
4+
5+
## What is already configured
6+
7+
- npm package: `codex-flow`
8+
- npm owner used here: `tutudma`
9+
- GitHub repo: `Dmatut7/codex-flow`
10+
- npm Trusted Publisher: GitHub Actions → `Dmatut7/codex-flow``publish.yml`
11+
- Allowed Trusted Publisher action: `npm publish`
12+
- Release workflow: `.github/workflows/publish.yml`
13+
14+
The release workflow uses OIDC Trusted Publishing. It must not use `NPM_TOKEN`, `NODE_AUTH_TOKEN`, or checked-in `.npmrc` credentials.
15+
16+
## Normal release flow
17+
18+
Start from a clean `main` branch.
19+
20+
```bash
21+
git checkout main
22+
git pull origin main
23+
git status --short
24+
npm run typecheck
25+
npm test
26+
```
27+
28+
Update `CHANGELOG.md` first. Move the relevant `Unreleased` notes into a dated version section.
29+
30+
Then bump and tag:
31+
32+
```bash
33+
npm version patch # or: npm version minor / npm version major
34+
git push origin main --tags
35+
```
36+
37+
Pushing the `v*` tag starts GitHub Actions. The workflow verifies the tag matches `package.json`, runs typecheck/tests, then publishes to npm by OIDC.
38+
39+
Check:
40+
41+
```bash
42+
npm view codex-flow version
43+
```
44+
45+
If the GitHub Action fails, fix the repo/workflow and push a new commit/tag as appropriate. Do not fall back to local token publishing unless Trusted Publishing itself is unavailable.
46+
47+
## One-time npm Trusted Publisher setup
48+
49+
This was already done for `codex-flow`, but if the package is recreated or moved:
50+
51+
1. Open `https://www.npmjs.com/package/codex-flow/access`.
52+
2. In **Trusted Publisher**, choose **GitHub Actions**.
53+
3. Fill:
54+
- Organization or user: `Dmatut7`
55+
- Repository: `codex-flow`
56+
- Workflow filename: `publish.yml`
57+
- Environment name: leave blank unless the workflow adds a GitHub environment
58+
4. Allow only `npm publish`.
59+
5. Confirm password / 2FA.
60+
6. Verify the page shows `Dmatut7/codex-flow`, `publish.yml`, and permission `npm publish`.
61+
62+
CLI equivalent, if npm authentication supports trust endpoints:
63+
64+
```bash
65+
npx npm@^11.10.0 trust github codex-flow \
66+
--repo Dmatut7/codex-flow \
67+
--file publish.yml \
68+
--allow-publish \
69+
--yes
70+
```
71+
72+
## Updating Codex skills after someone changes this repo
73+
74+
The bundled skills live in:
75+
76+
- `codex-skill/` → installs as `dynamic-workflow`
77+
- `codex-skill-business-audit/` → installs as `business-defect-audit`
78+
- `codex-skill-parallel-fix/` → installs as `parallel-fix`
79+
80+
For users installed from npm:
81+
82+
```bash
83+
npm install -g codex-flow@latest
84+
codex-flow install-codex
85+
codex-flow doctor
86+
# restart Codex App or Codex CLI
87+
```
88+
89+
For maintainers working from a local checkout:
90+
91+
```bash
92+
git pull origin main
93+
npm install
94+
node bin/codex-flow.mjs install-codex
95+
node bin/codex-flow.mjs doctor
96+
# restart Codex App or Codex CLI
97+
```
98+
99+
`install-codex` replaces stale installed skill folders. That is expected.
100+
101+
## What not to commit
102+
103+
These are local run artifacts and should stay untracked:
104+
105+
- `.codex-flow/` journals and generated temporary workflows
106+
- `.codex-workflow/`
107+
- `.dongt/`
108+
- `node_modules/`
109+
- temporary `.npmrc` files containing publish tokens
110+
- screenshots or one-off browser artifacts from npm/GitHub setup
111+
112+
If a temporary workflow is useful as a reusable example, copy a cleaned, import-free version into `examples/` and add tests/docs for it. Do not commit raw `.codex-flow/generated/*` files.
113+
114+
## Changing bundled skills
115+
116+
When editing any bundled skill:
117+
118+
1. Edit the source folder in this repo, not `~/.codex/skills`.
119+
2. Run:
120+
121+
```bash
122+
npm run typecheck
123+
npm test
124+
node bin/codex-flow.mjs install-codex --dir "$(mktemp -d)"
125+
```
126+
127+
3. If the change is user-visible, update `CHANGELOG.md`.
128+
4. Commit the repo change. Users get it by reinstalling `codex-flow@latest` and running `codex-flow install-codex`.
129+
130+
## Emergency local publish fallback
131+
132+
Only use this if GitHub Actions / OIDC is down and the release cannot wait.
133+
134+
```bash
135+
npm run typecheck
136+
npm test
137+
npm publish --access public
138+
```
139+
140+
Do not save tokens in the repo. If a temporary npm token or temporary npmrc is used, delete it immediately after publishing.

0 commit comments

Comments
 (0)