@imdeadpool/guardex 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +1 -0
- package/README.md +129 -311
- package/bin/multiagent-safety.js +506 -22
- package/package.json +2 -2
- package/templates/AGENTS.multiagent-safety.md +5 -3
- package/templates/scripts/agent-branch-finish.sh +141 -8
- package/templates/scripts/agent-branch-start.sh +40 -6
- package/templates/scripts/codex-agent.sh +21 -4
package/CONTRIBUTING.md
CHANGED
package/README.md
CHANGED
|
@@ -4,389 +4,182 @@
|
|
|
4
4
|
[](https://github.com/recodeecom/multiagent-safety/actions/workflows/ci.yml)
|
|
5
5
|
[](https://securityscorecards.dev/viewer/?uri=github.com/recodeecom/multiagent-safety)
|
|
6
6
|
|
|
7
|
-
GuardeX is a
|
|
7
|
+
GuardeX is a safety layer for parallel Codex/agent work in git repos.
|
|
8
8
|
|
|
9
9
|
> [!WARNING]
|
|
10
10
|
> Not affiliated with OpenAI or Codex. Not an official tool.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## The problem (what was going wrong)
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Multiple Codex agents worked on the same files at the same time.
|
|
15
|
+
They started overwriting or deleting each other's changes.
|
|
16
|
+
Progress became **de-progressive**: more activity, less real forward movement.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
GuardeX exists to stop that loop.
|
|
19
19
|
|
|
20
20
|

|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
npm i -g @imdeadpool/guardex
|
|
22
|
+
```mermaid
|
|
23
|
+
flowchart LR
|
|
24
|
+
A[Agent A edits file X] --> C[Conflict / overwrite]
|
|
25
|
+
B[Agent B edits file X] --> C
|
|
26
|
+
C --> D[Deleted or lost code]
|
|
27
|
+
D --> E[Rework and confusion]
|
|
28
|
+
E --> C
|
|
31
29
|
```
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
## What GuardeX enforces
|
|
34
32
|
|
|
33
|
+
- isolated `agent/*` branch + worktree per task
|
|
34
|
+
- explicit file lock claiming before edits
|
|
35
|
+
- deletion guard for claimed files
|
|
36
|
+
- protected-base branch safety (`main`, `dev`, `master` by default)
|
|
37
|
+
- repair/doctor flow when drift appears
|
|
35
38
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
- Preferred short command: `gx`
|
|
39
|
-
- Full command: `guardex`
|
|
40
|
-
- Legacy aliases still supported: `musafety`, `multiagent-safety`
|
|
41
|
-
|
|
42
|
-
## Security + maintenance posture
|
|
43
|
-
|
|
44
|
-
- CI matrix on Node 18/20/22 (`npm test`, `node --check`, `npm pack --dry-run`)
|
|
45
|
-
- trusted publishing workflow uses `npm publish --provenance` in GitHub Actions
|
|
46
|
-
- OpenSSF Scorecard workflow and weekly Dependabot for GitHub Actions
|
|
47
|
-
- Dedicated security disclosure policy in [`SECURITY.md`](./SECURITY.md)
|
|
48
|
-
|
|
49
|
-
Related tools:
|
|
50
|
-
|
|
51
|
-
- [oh-my-codex (OMX)](https://github.com/Yeachan-Heo/oh-my-codex)
|
|
52
|
-
- [OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
53
|
-
- [codex-account-switcher-cli](https://github.com/recodeecom/codex-account-switcher-cli)
|
|
54
|
-
|
|
55
|
-
## Fast setup (recommended)
|
|
39
|
+
## Copy-paste: install + bootstrap
|
|
56
40
|
|
|
57
41
|
```sh
|
|
58
|
-
|
|
42
|
+
npm i -g @imdeadpool/guardex
|
|
43
|
+
cd /path/to/your/repo
|
|
59
44
|
gx setup
|
|
60
|
-
# alias:
|
|
61
|
-
gx init
|
|
62
45
|
```
|
|
63
46
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
1. detects whether OMX/OpenSpec/codex-auth are already globally installed,
|
|
67
|
-
2. asks strict Y/N approval only if something is missing,
|
|
68
|
-
3. installs guardrail scripts/hooks,
|
|
69
|
-
4. repairs common safety problems,
|
|
70
|
-
5. installs local Codex + Claude gx helper skill files if missing,
|
|
71
|
-
6. scans and reports final status.
|
|
72
|
-
|
|
73
|
-
## Setup behavior screenshot
|
|
74
|
-
|
|
75
|
-

|
|
76
|
-
|
|
77
|
-
## Status logs screenshot
|
|
47
|
+
Alias support:
|
|
78
48
|
|
|
79
|
-
|
|
49
|
+
- preferred: `gx`
|
|
50
|
+
- full: `guardex`
|
|
80
51
|
|
|
81
|
-
##
|
|
82
|
-
|
|
83
|
-
`gx setup` and `gx doctor` also ensure these local helper files exist:
|
|
84
|
-
|
|
85
|
-
- Codex skill: `.codex/skills/guardex/SKILL.md`
|
|
86
|
-
- Claude command: `.claude/commands/guardex.md` (use as `/guardex`)
|
|
87
|
-
|
|
88
|
-
## Scorecard report generation
|
|
89
|
-
|
|
90
|
-
Create/update markdown reports from OpenSSF Scorecard JSON:
|
|
52
|
+
## Copy-paste: daily workflow (per new user task)
|
|
91
53
|
|
|
92
54
|
```sh
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
By default this writes:
|
|
97
|
-
|
|
98
|
-
- `docs/reports/openssf-scorecard-baseline-YYYY-MM-DD.md`
|
|
99
|
-
- `docs/reports/openssf-scorecard-remediation-plan-YYYY-MM-DD.md`
|
|
100
|
-
|
|
101
|
-
## Workflow protocol screenshots
|
|
102
|
-
|
|
103
|
-
### 1) Start isolated agent branch/worktree
|
|
104
|
-
|
|
105
|
-

|
|
106
|
-
|
|
107
|
-
### 2) Lock claim + deletion guard protocol
|
|
108
|
-
|
|
109
|
-

|
|
110
|
-
|
|
111
|
-
### 3) Multi-agent branch visibility (IDE/source control style)
|
|
55
|
+
# 1) Start isolated branch/worktree
|
|
56
|
+
bash scripts/agent-branch-start.sh "task-name" "agent-name"
|
|
112
57
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
#### Real VS Code Source Control example (after `gx setup`)
|
|
58
|
+
# 2) Claim ownership
|
|
59
|
+
python3 scripts/agent-file-locks.py claim --branch "$(git rev-parse --abbrev-ref HEAD)" <file...>
|
|
116
60
|
|
|
117
|
-
|
|
61
|
+
# 3) Implement + verify
|
|
62
|
+
npm test
|
|
118
63
|
|
|
119
|
-
|
|
120
|
-
|
|
64
|
+
# 4) Finish (commit/push/PR/merge flow)
|
|
65
|
+
bash scripts/agent-branch-finish.sh --branch "$(git rev-parse --abbrev-ref HEAD)"
|
|
121
66
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
agent_codex_<timestamp>-<snapshot>-<task>
|
|
125
|
-
agent_bot_<timestamp>-<snapshot>-<task>
|
|
126
|
-
agent_bot_<timestamp>-<snapshot>-<task>
|
|
67
|
+
# 5) Optional cleanup after merge
|
|
68
|
+
gx cleanup --branch "$(git rev-parse --abbrev-ref HEAD)"
|
|
127
69
|
```
|
|
128
70
|
|
|
129
|
-
|
|
130
|
-
same VS Code window, so branch ownership and progress stay visible at once.
|
|
71
|
+
If you use `scripts/codex-agent.sh`, the finish flow is auto-run after the Codex session exits.
|
|
131
72
|
|
|
132
|
-
##
|
|
73
|
+
## Visual workflow
|
|
133
74
|
|
|
134
|
-
|
|
135
|
-
[`codex-auth`](https://github.com/recodeecom/codex-account-switcher-cli/tree/main),
|
|
136
|
-
a CLI that snapshots `~/.codex/auth.json` per account and lets you switch fast
|
|
137
|
-
without repeated login/logout loops.
|
|
75
|
+
### Setup status
|
|
138
76
|
|
|
139
|
-
|
|
140
|
-
> Not affiliated with OpenAI or Codex. Not an official tool.
|
|
77
|
+

|
|
141
78
|
|
|
142
|
-
|
|
79
|
+
### Service logs/status
|
|
143
80
|
|
|
144
|
-
|
|
145
|
-
- switches by replacing active `~/.codex/auth.json`
|
|
146
|
-
- keeps lightweight per-terminal session memory (default key is shell PPID),
|
|
147
|
-
so older terminals can keep their original account context
|
|
81
|
+

|
|
148
82
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Install:
|
|
83
|
+
### Branch/worktree start protocol
|
|
152
84
|
|
|
153
|
-
|
|
154
|
-
npm i -g @imdeadpool/codex-account-switcher
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Common commands:
|
|
158
|
-
|
|
159
|
-
```sh
|
|
160
|
-
codex-auth login [name]
|
|
161
|
-
codex-auth save <name>
|
|
162
|
-
codex-auth use <name>
|
|
163
|
-
codex-auth list --details
|
|
164
|
-
codex-auth current
|
|
165
|
-
codex-auth status
|
|
166
|
-
codex-auth self-update --check
|
|
167
|
-
```
|
|
85
|
+

|
|
168
86
|
|
|
169
|
-
|
|
87
|
+
### Lock + delete guard protocol
|
|
170
88
|
|
|
171
|
-
|
|
172
|
-
codex-auth setup-login-hook
|
|
173
|
-
codex-auth hook-status
|
|
174
|
-
codex-auth remove-login-hook
|
|
175
|
-
```
|
|
89
|
+

|
|
176
90
|
|
|
177
|
-
## Copy
|
|
91
|
+
## Copy-paste: common commands
|
|
178
92
|
|
|
179
93
|
```sh
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
This prints a ready-to-paste prompt.
|
|
184
|
-
|
|
185
|
-
### Prompt preview (SVG)
|
|
186
|
-
|
|
187
|
-

|
|
94
|
+
# health / safety status
|
|
95
|
+
gx status
|
|
188
96
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
If you only want executable commands (without explanatory text):
|
|
192
|
-
|
|
193
|
-
```sh
|
|
194
|
-
gx copy-commands
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Example output:
|
|
198
|
-
|
|
199
|
-
```sh
|
|
200
|
-
npm i -g @imdeadpool/guardex
|
|
97
|
+
# setup and repair
|
|
201
98
|
gx setup
|
|
202
99
|
gx doctor
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
bash scripts/agent-branch-finish.sh --branch "$(git rev-parse --abbrev-ref HEAD)"
|
|
207
|
-
bash scripts/openspec/init-plan-workspace.sh "<plan-slug>"
|
|
100
|
+
|
|
101
|
+
# protected branch management
|
|
102
|
+
gx protect list
|
|
208
103
|
gx protect add release staging
|
|
104
|
+
gx protect remove release
|
|
105
|
+
|
|
106
|
+
# sync with base branch
|
|
209
107
|
gx sync --check
|
|
210
108
|
gx sync
|
|
211
|
-
```
|
|
212
109
|
|
|
213
|
-
|
|
110
|
+
# cleanup merged agent branches/worktrees
|
|
111
|
+
gx cleanup
|
|
214
112
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
1) Install (if missing):
|
|
219
|
-
npm i -g @imdeadpool/guardex
|
|
220
|
-
|
|
221
|
-
2) Bootstrap safety in this repo:
|
|
222
|
-
gx setup
|
|
223
|
-
# alias: gx init
|
|
224
|
-
|
|
225
|
-
- Setup detects global OMX/OpenSpec/codex-auth first.
|
|
226
|
-
- If one is missing and setup asks for approval, reply explicitly:
|
|
227
|
-
- y = run: npm i -g oh-my-codex @fission-ai/openspec @imdeadpool/codex-account-switcher (missing ones only)
|
|
228
|
-
- n = skip global installs
|
|
229
|
-
|
|
230
|
-
3) If setup reports warnings/errors, repair + re-check:
|
|
231
|
-
gx doctor
|
|
232
|
-
|
|
233
|
-
4) Confirm next safe agent workflow commands:
|
|
234
|
-
bash scripts/codex-agent.sh "task" "agent-name"
|
|
235
|
-
bash scripts/agent-branch-start.sh "task" "agent-name"
|
|
236
|
-
python3 scripts/agent-file-locks.py claim --branch "$(git rev-parse --abbrev-ref HEAD)" <file...>
|
|
237
|
-
bash scripts/agent-branch-finish.sh --branch "$(git rev-parse --abbrev-ref HEAD)"
|
|
238
|
-
- For every new user message/task, repeat the same cycle:
|
|
239
|
-
start isolated agent branch/worktree -> claim file locks -> implement/verify ->
|
|
240
|
-
finish via PR/merge cleanup with scripts/agent-branch-finish.sh.
|
|
241
|
-
- `scripts/codex-agent.sh` now auto-runs this finish flow after Codex exits:
|
|
242
|
-
auto-commit changed files -> push/create PR -> merge attempt -> keep branch/worktree for follow-up.
|
|
243
|
-
- Remove merged branches when you are done reviewing:
|
|
244
|
-
gx cleanup --branch "$(git rev-parse --abbrev-ref HEAD)"
|
|
245
|
-
|
|
246
|
-
5) Optional: create OpenSpec planning workspace:
|
|
247
|
-
bash scripts/openspec/init-plan-workspace.sh "<plan-slug>"
|
|
248
|
-
|
|
249
|
-
6) Optional: protect extra branches:
|
|
250
|
-
gx protect add release staging
|
|
251
|
-
|
|
252
|
-
7) Optional: sync your current agent branch with latest base branch:
|
|
253
|
-
gx sync --check
|
|
254
|
-
gx sync
|
|
255
|
-
|
|
256
|
-
8) Optional (GitHub remote cleanup): enable:
|
|
257
|
-
Settings -> General -> Pull Requests -> Automatically delete head branches
|
|
113
|
+
# scan/report
|
|
114
|
+
gx scan
|
|
115
|
+
gx report scorecard --repo github.com/recodeecom/multiagent-safety
|
|
258
116
|
```
|
|
259
117
|
|
|
260
|
-
##
|
|
261
|
-
|
|
262
|
-
```sh
|
|
263
|
-
gx status [--target <path>] [--json]
|
|
264
|
-
gx setup [--target <path>] [--dry-run] [--yes-global-install|--no-global-install] [--no-gitignore] [--allow-protected-base-write]
|
|
265
|
-
gx init [--target <path>] [--dry-run] [--yes-global-install|--no-global-install] [--no-gitignore] [--allow-protected-base-write]
|
|
266
|
-
gx doctor [--target <path>] [--dry-run] [--json] [--keep-stale-locks] [--no-gitignore] [--allow-protected-base-write]
|
|
267
|
-
gx copy-prompt
|
|
268
|
-
gx copy-commands
|
|
269
|
-
gx protect list [--target <path>]
|
|
270
|
-
gx protect add <branch...> [--target <path>]
|
|
271
|
-
gx protect remove <branch...> [--target <path>]
|
|
272
|
-
gx protect set <branch...> [--target <path>]
|
|
273
|
-
gx protect reset [--target <path>]
|
|
274
|
-
gx sync --check [--target <path>] [--base <branch>] [--json]
|
|
275
|
-
gx sync [--target <path>] [--base <branch>] [--strategy rebase|merge] [--ff-only]
|
|
276
|
-
gx cleanup [--target <path>] [--base <branch>] [--branch <agent/...>] [--dry-run] [--force-dirty] [--keep-remote]
|
|
277
|
-
gx report scorecard [--target <path>] [--repo github.com/<owner>/<repo>] [--scorecard-json <file>] [--output-dir <path>] [--date YYYY-MM-DD]
|
|
278
|
-
bash scripts/agent-worktree-prune.sh # prune temporary worktrees only (keeps merged agent branches by default)
|
|
279
|
-
bash scripts/agent-worktree-prune.sh --delete-branches --delete-remote-branches # full merged-branch cleanup
|
|
280
|
-
bash scripts/agent-worktree-prune.sh --force-dirty --delete-branches # force-remove dirty merged worktrees too
|
|
281
|
-
bash scripts/openspec/init-plan-workspace.sh <plan-slug> # optional OpenSpec plan scaffold
|
|
282
|
-
```
|
|
118
|
+
## Important behavior defaults
|
|
283
119
|
|
|
284
|
-
No command defaults to `gx status
|
|
285
|
-
`gx
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
-
|
|
291
|
-
-
|
|
292
|
-
- Non-interactive setup: skips global installs by default; use `--yes-global-install` to force.
|
|
293
|
-
- In already-initialized repos, `setup` / `install` / `fix` block writes on protected `main` by default; start an agent branch first. Use `--allow-protected-base-write` only for emergency in-place maintenance.
|
|
294
|
-
- `gx doctor` on protected `main` auto-starts an isolated `agent/gx/...-gx-doctor` worktree branch and applies repairs there.
|
|
295
|
-
- `gx setup` and `gx doctor` always refresh `.githooks/pre-commit` from templates, so Codex sub-branch enforcement stays repaired.
|
|
296
|
-
- `scripts/codex-agent.sh` now auto-runs finish automation after a Codex session when `origin` exists:
|
|
297
|
-
auto-commit changed files, run PR/merge automation, and keep merged agent branches/worktrees by default.
|
|
298
|
-
It also auto-syncs each sandbox branch against the latest base branch before task execution.
|
|
299
|
-
If conflicts remain, it keeps the sandbox and prompts for a conflict-resolution review pass.
|
|
300
|
-
- use `gx cleanup` (or `gx cleanup --branch <agent/...>`) to remove merged branches/worktrees when done.
|
|
301
|
-
|
|
302
|
-
## Advanced commands
|
|
120
|
+
- No command defaults to `gx status`.
|
|
121
|
+
- `gx init` is alias of `gx setup`.
|
|
122
|
+
- Setup/doctor can install missing global OMX/OpenSpec/codex-auth with explicit Y/N confirmation.
|
|
123
|
+
- `gx setup` checks GitHub CLI (`gh`) and prints install guidance if missing.
|
|
124
|
+
- Interactive self-update prompt defaults to **No** (`[y/N]`).
|
|
125
|
+
- In initialized repos, `setup`/`install`/`fix` block protected-base writes unless explicitly overridden.
|
|
126
|
+
- On protected `main`, `gx doctor` auto-runs in a sandbox agent branch/worktree.
|
|
127
|
+
- `scripts/agent-branch-start.sh` hydrates `scripts/codex-agent.sh` into new sandbox worktrees when missing, so auto-finish launcher flow stays available.
|
|
303
128
|
|
|
304
|
-
|
|
305
|
-
gx install [--target <path>] [--force] [--skip-agents] [--skip-package-json] [--no-gitignore] [--dry-run] [--allow-protected-base-write]
|
|
306
|
-
gx fix [--target <path>] [--dry-run] [--keep-stale-locks] [--no-gitignore] [--allow-protected-base-write]
|
|
307
|
-
gx scan [--target <path>] [--json]
|
|
308
|
-
gx report help
|
|
309
|
-
```
|
|
129
|
+
## Configure protected branches
|
|
310
130
|
|
|
311
|
-
|
|
131
|
+
Default protected branches:
|
|
312
132
|
|
|
313
|
-
|
|
133
|
+
- `dev`
|
|
134
|
+
- `main`
|
|
135
|
+
- `master`
|
|
314
136
|
|
|
315
137
|
```sh
|
|
316
|
-
gx
|
|
317
|
-
gx
|
|
138
|
+
gx protect list
|
|
139
|
+
gx protect set main release hotfix
|
|
140
|
+
gx protect reset
|
|
318
141
|
```
|
|
319
142
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
- `gx sync` base branch: `dev` (or `multiagent.baseBranch`)
|
|
323
|
-
- strategy: `rebase` (or `multiagent.sync.strategy`)
|
|
324
|
-
|
|
325
|
-
`agent-branch-start.sh` and `agent-branch-finish.sh` resolve base branch in this order:
|
|
326
|
-
|
|
327
|
-
1. explicit `--base`
|
|
328
|
-
2. `multiagent.baseBranch`
|
|
329
|
-
3. branch-linked base metadata / source upstream / current checked-out branch (context-dependent)
|
|
330
|
-
4. fallback `dev`
|
|
143
|
+
Stored in git config key:
|
|
331
144
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
```sh
|
|
335
|
-
gx sync --strategy merge
|
|
336
|
-
gx sync --all-agent-branches --check
|
|
145
|
+
```text
|
|
146
|
+
multiagent.protectedBranches
|
|
337
147
|
```
|
|
338
148
|
|
|
339
|
-
|
|
149
|
+
## Companion dependency: GitHub CLI (`gh`)
|
|
340
150
|
|
|
341
|
-
|
|
151
|
+
GuardeX PR/merge automation depends on GitHub CLI (`gh`), including
|
|
152
|
+
`agent-branch-finish.sh` PR flows and `codex-agent.sh` auto-finish behavior.
|
|
153
|
+
|
|
154
|
+
Install + verify:
|
|
342
155
|
|
|
343
156
|
```sh
|
|
344
|
-
|
|
345
|
-
|
|
157
|
+
# install guide: https://cli.github.com/
|
|
158
|
+
gh --version
|
|
159
|
+
gh auth status
|
|
346
160
|
```
|
|
347
161
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
## Configure protected branches
|
|
351
|
-
|
|
352
|
-
Default protected branches are:
|
|
162
|
+
## Companion dependency: `codex-auth` account switcher
|
|
353
163
|
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
- `master`
|
|
164
|
+
For multi-identity Codex workflows, GuardeX pairs with
|
|
165
|
+
[`codex-auth`](https://github.com/recodeecom/codex-account-switcher-cli).
|
|
357
166
|
|
|
358
|
-
|
|
167
|
+
Install:
|
|
359
168
|
|
|
360
169
|
```sh
|
|
361
|
-
|
|
362
|
-
gx protect add release staging
|
|
363
|
-
gx protect remove dev
|
|
364
|
-
gx protect set main release hotfix
|
|
365
|
-
gx protect reset
|
|
170
|
+
npm i -g @imdeadpool/codex-account-switcher
|
|
366
171
|
```
|
|
367
172
|
|
|
368
|
-
|
|
173
|
+
Common commands:
|
|
369
174
|
|
|
370
|
-
```
|
|
371
|
-
|
|
175
|
+
```sh
|
|
176
|
+
codex-auth save <name>
|
|
177
|
+
codex-auth use <name>
|
|
178
|
+
codex-auth list --details
|
|
179
|
+
codex-auth current
|
|
372
180
|
```
|
|
373
181
|
|
|
374
|
-
##
|
|
375
|
-
|
|
376
|
-
- direct commits to protected branches (defaults: `dev`, `main`, `master`; configurable via `gx protect ...`)
|
|
377
|
-
- protected-branch commits are blocked by default for all clients; Codex sessions only may commit protected branches when staged files are strictly `AGENTS.md` and/or `.gitignore`
|
|
378
|
-
- Codex-session commits on non-`agent/*` branches are blocked by default (`multiagent.codexRequireAgentBranch=true`)
|
|
379
|
-
- Codex commits attempted on protected branches trigger `guardex-preedit-guard` and require starting work via `scripts/codex-agent.sh`
|
|
380
|
-
- overlapping file ownership between agents
|
|
381
|
-
- unapproved deletions of claimed files
|
|
382
|
-
- risky stale/missing lock state
|
|
383
|
-
- accidental loss of critical guardrail files
|
|
384
|
-
- in-place branch bootstrap requires explicit opt-in (`--in-place --allow-in-place`)
|
|
385
|
-
- setup also writes a managed `.gitignore` block so generated gx scripts/hooks stay out of normal git status noise by default
|
|
386
|
-
- includes `oh-my-codex/` by default to keep local OMX source clones out of repo status
|
|
387
|
-
- pass `--no-gitignore` if you want to keep tracking these files in git
|
|
388
|
-
|
|
389
|
-
## Files it installs
|
|
182
|
+
## Files installed by setup
|
|
390
183
|
|
|
391
184
|
```text
|
|
392
185
|
scripts/agent-branch-start.sh
|
|
@@ -402,7 +195,14 @@ scripts/openspec/init-plan-workspace.sh
|
|
|
402
195
|
.omx/state/agent-file-locks.json
|
|
403
196
|
```
|
|
404
197
|
|
|
405
|
-
If `package.json` exists,
|
|
198
|
+
If `package.json` exists, setup also adds `agent:*` helper scripts.
|
|
199
|
+
|
|
200
|
+
## Security and maintenance posture
|
|
201
|
+
|
|
202
|
+
- CI matrix on Node 18/20/22 (`npm test`, `node --check`, `npm pack --dry-run`)
|
|
203
|
+
- trusted publishing with provenance in GitHub Actions
|
|
204
|
+
- OpenSSF Scorecard + Dependabot for Actions
|
|
205
|
+
- disclosure policy in [`SECURITY.md`](./SECURITY.md)
|
|
406
206
|
|
|
407
207
|
## Local development
|
|
408
208
|
|
|
@@ -414,6 +214,24 @@ npm pack --dry-run
|
|
|
414
214
|
|
|
415
215
|
## Release notes
|
|
416
216
|
|
|
217
|
+
### v5.0.3
|
|
218
|
+
|
|
219
|
+
- Bumped package version from `5.0.2` to `5.0.3` for the next npm publish.
|
|
220
|
+
|
|
221
|
+
### v5.0.2
|
|
222
|
+
|
|
223
|
+
- Auto-closes Codex sandbox branches through PR workflow and keeps merged branch/worktree sandboxes for explicit cleanup via `gx cleanup`.
|
|
224
|
+
- Runs `gx doctor` repairs from a sandbox when `main` is protected.
|
|
225
|
+
- Allows tightly guarded Codex-only commits for `AGENTS.md` / `.gitignore` on protected branches.
|
|
226
|
+
- Advanced package version to keep npm publishing unblocked.
|
|
227
|
+
|
|
228
|
+
### v5.0.0
|
|
229
|
+
|
|
230
|
+
- Rebranded the CLI to **GuardeX** with `gx`-first command UX.
|
|
231
|
+
- Published under scoped package name `@imdeadpool/guardex` to avoid npm name collisions.
|
|
232
|
+
- Enforced a repeatable per-message agent branch lifecycle in setup/init flows.
|
|
233
|
+
- Added codex-auth-aware sandbox branch naming support.
|
|
234
|
+
|
|
417
235
|
### v0.4.6
|
|
418
236
|
|
|
419
237
|
- Added repository metadata (`repository`, `bugs`, `homepage`, `funding`) in package manifest.
|
|
@@ -437,9 +255,9 @@ npm pack --dry-run
|
|
|
437
255
|
|
|
438
256
|
- Setup now detects existing global OMX/OpenSpec installs first.
|
|
439
257
|
- If tools are already present, setup skips global install automatically.
|
|
440
|
-
- Interactive approval is
|
|
258
|
+
- Interactive approval is strict `[y/n]` (waits for explicit answer).
|
|
441
259
|
- Added setup screenshot to README.
|
|
442
|
-
- Added
|
|
260
|
+
- Added workflow screenshots (branch start, lock/delete guard, source-control view).
|
|
443
261
|
|
|
444
262
|
### v0.4.0
|
|
445
263
|
|