@imdeadpool/guardex 5.0.2 → 5.0.4

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 CHANGED
@@ -23,3 +23,4 @@ npm pack --dry-run
23
23
  - Keep `main` green (CI passing)
24
24
  - Prefer trusted publishing (`npm publish --provenance`)
25
25
  - Use a clean working tree and tag-based releases when possible
26
+ - When version changes, update `README.md` release notes in the same PR/commit
package/README.md CHANGED
@@ -4,405 +4,229 @@
4
4
  [![CI](https://github.com/recodeecom/multiagent-safety/actions/workflows/ci.yml/badge.svg)](https://github.com/recodeecom/multiagent-safety/actions/workflows/ci.yml)
5
5
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/recodeecom/multiagent-safety/badge)](https://securityscorecards.dev/viewer/?uri=github.com/recodeecom/multiagent-safety)
6
6
 
7
- GuardeX is a short-command, hardened multi-agent safety setup for any git repo.
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
- ## Why this tool exists
12
+ ## The problem (what was going wrong)
13
13
 
14
- If you run multiple agents at the same time, it is easy to get collisions:
15
- two agents editing the same files, unsafe deletes, broken branch flow, or
16
- confusing ownership.
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
- `GuardeX` adds strict guardrails so parallel agent work stays safe and predictable.
18
+ GuardeX exists to stop that loop.
19
19
 
20
20
  ![Multi-agent dashboard example](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/dashboard-multi-agent.png)
21
21
 
22
- The dashboard above is the exact kind of parallel workflow GuardeX is built for.
23
-
24
- It also includes an OpenSpec planning scaffold script so plan-mode workspaces
25
- can be bootstrapped consistently across repos.
26
-
27
- ## Install
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
- Package page: https://www.npmjs.com/package/@imdeadpool/guardex
34
-
35
-
36
- ## Command aliases
37
-
38
- - Preferred short command: `gx`
39
- - Full command: `guardex`
40
- - Legacy aliases still supported: `musafety`, `multiagent-safety`
31
+ ## What GuardeX enforces
41
32
 
42
- ## Security + maintenance posture
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
43
38
 
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
- # inside your repo
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
- That one command runs:
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.
47
+ Alias support:
72
48
 
73
- ## Setup behavior screenshot
49
+ - preferred: `gx`
50
+ - full: `guardex`
74
51
 
75
- ![gx status/setup behavior screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/setup-success.svg)
52
+ ## Copy-paste: daily workflow (per new user task)
76
53
 
77
- ## Status logs screenshot
54
+ ```sh
55
+ # 1) Start isolated branch/worktree
56
+ bash scripts/agent-branch-start.sh "task-name" "agent-name"
78
57
 
79
- ![gx service status screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/guardex-service-status.svg)
58
+ # 2) Claim ownership
59
+ python3 scripts/agent-file-locks.py claim --branch "$(git rev-parse --abbrev-ref HEAD)" <file...>
80
60
 
81
- ## AI helper skills installed by setup/doctor
61
+ # 3) Implement + verify
62
+ npm test
82
63
 
83
- `gx setup` and `gx doctor` also ensure these local helper files exist:
64
+ # 4) Finish (commit/push/PR/merge flow)
65
+ bash scripts/agent-branch-finish.sh --branch "$(git rev-parse --abbrev-ref HEAD)"
84
66
 
85
- - Codex skill: `.codex/skills/guardex/SKILL.md`
86
- - Claude command: `.claude/commands/guardex.md` (use as `/guardex`)
67
+ # 5) Optional cleanup after merge
68
+ gx cleanup --branch "$(git rev-parse --abbrev-ref HEAD)"
69
+ ```
87
70
 
88
- ## Scorecard report generation
71
+ If you use `scripts/codex-agent.sh`, the finish flow is auto-run after the Codex session exits.
89
72
 
90
- Create/update markdown reports from OpenSSF Scorecard JSON:
73
+ ## Visual workflow
91
74
 
92
- ```sh
93
- gx report scorecard --repo github.com/recodeecom/multiagent-safety
94
- ```
75
+ ### Setup status
95
76
 
96
- By default this writes:
77
+ ![gx setup behavior screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/setup-success.svg)
97
78
 
98
- - `docs/reports/openssf-scorecard-baseline-YYYY-MM-DD.md`
99
- - `docs/reports/openssf-scorecard-remediation-plan-YYYY-MM-DD.md`
79
+ ### Service logs/status
100
80
 
101
- ## Workflow protocol screenshots
81
+ ![gx status logs screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/status-tools-logs.svg)
102
82
 
103
- ### 1) Start isolated agent branch/worktree
83
+ ### Branch/worktree start protocol
104
84
 
105
85
  ![gx branch start protocol screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/workflow-branch-start.svg)
106
86
 
107
- ### 2) Lock claim + deletion guard protocol
87
+ ### Lock + delete guard protocol
108
88
 
109
89
  ![gx lock and delete guard screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/workflow-lock-guard.svg)
110
90
 
111
- ### 3) Multi-agent branch visibility (IDE/source control style)
112
-
113
- ![gx source control multi-agent screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/workflow-source-control.svg)
114
-
115
- #### Real VS Code Source Control example (after `gx setup`)
91
+ ## Copy-paste: common commands
116
92
 
117
- ![GuardeX real VS Code Source Control layout](./docs/images/workflow-vscode-guardex-real.png)
118
-
119
- This is the exact layout you should expect in VS Code Source Control after setup
120
- and a few `agent-branch-start` runs:
121
-
122
- ```text
123
- GuardeX (your preferred local branch: main/dev)
124
- agent_codex_<timestamp>-<snapshot>-<task>
125
- agent_bot_<timestamp>-<snapshot>-<task>
126
- agent_bot_<timestamp>-<snapshot>-<task>
127
- ```
128
-
129
- That gives you one stable main repo view plus parallel agent worktrees in the
130
- same VS Code window, so branch ownership and progress stay visible at once.
131
-
132
- ## Companion tool: `codex-auth` account switcher
133
-
134
- If you run multiple Codex identities, this workflow pairs well with
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.
93
+ ```sh
94
+ # health / safety status
95
+ gx status
138
96
 
139
- > [!WARNING]
140
- > Not affiliated with OpenAI or Codex. Not an official tool.
97
+ # setup and repair
98
+ gx setup
99
+ gx doctor
141
100
 
142
- How `codex-auth` works:
101
+ # protected branch management
102
+ gx protect list
103
+ gx protect add release staging
104
+ gx protect remove release
143
105
 
144
- - stores named snapshots in `~/.codex/accounts/*.json`
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
106
+ # sync with base branch
107
+ gx sync --check
108
+ gx sync
148
109
 
149
- Requirements: Node.js 18+
110
+ # continuously monitor open PRs targeting current branch and dispatch codex-agent review/merge tasks
111
+ bash scripts/review-bot-watch.sh --interval 30
150
112
 
151
- Install:
113
+ # cleanup merged agent branches/worktrees
114
+ gx cleanup
152
115
 
153
- ```sh
154
- npm i -g @imdeadpool/codex-account-switcher
116
+ # scan/report
117
+ gx scan
118
+ gx report scorecard --repo github.com/recodeecom/multiagent-safety
155
119
  ```
156
120
 
157
- Common commands:
121
+ ### Continuous Codex PR monitor (local codex-auth session)
158
122
 
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
- ```
168
-
169
- Optional shell-hook helpers:
123
+ Run this in your local shell to keep watching PRs targeting the current branch (or `--base <branch>`):
170
124
 
171
125
  ```sh
172
- codex-auth setup-login-hook
173
- codex-auth hook-status
174
- codex-auth remove-login-hook
126
+ bash scripts/review-bot-watch.sh --interval 30
175
127
  ```
176
128
 
177
- ## Copy prompt for your AI (Codex / Claude)
129
+ Useful flags:
178
130
 
179
- ```sh
180
- gx copy-prompt
181
- ```
131
+ - `--base main` watch a specific base branch
132
+ - `--only-pr 123` process only one PR
133
+ - `--once` run one polling cycle and exit
134
+ - `--retry-failed` retry failed PRs without waiting for a new head SHA
182
135
 
183
- This prints a ready-to-paste prompt.
136
+ Note: the monitor dispatches Codex through explicit `--task/--agent/--base` flags for compatibility with both older and newer `scripts/codex-agent.sh` argument parsing.
184
137
 
185
- ### Prompt preview (SVG)
138
+ ## Important behavior defaults
186
139
 
187
- ![gx copy prompt screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/copy-prompt-output.svg)
140
+ - No command defaults to `gx status`.
141
+ - `gx init` is alias of `gx setup`.
142
+ - Setup/doctor can install missing global OMX/OpenSpec/codex-auth with explicit Y/N confirmation.
143
+ - `gx setup` checks GitHub CLI (`gh`) and prints install guidance if missing.
144
+ - Interactive self-update prompt defaults to **No** (`[y/N]`).
145
+ - In initialized repos, `setup`/`install`/`fix` block protected-base writes unless explicitly overridden.
146
+ - In VS Code Source Control, manual (non-Codex) commits/pushes to protected branches are allowed by default.
147
+ - Codex/agent sessions stay blocked on protected branches and must use `agent/*` branch + PR workflow.
148
+ - On protected `main`, `gx doctor` auto-runs in a sandbox agent branch/worktree.
149
+ - `scripts/agent-branch-start.sh` hydrates `scripts/codex-agent.sh` into new sandbox worktrees when missing, so auto-finish launcher flow stays available.
188
150
 
189
- ### Commands-only copy mode
151
+ ## Configure protected branches
190
152
 
191
- If you only want executable commands (without explanatory text):
153
+ Default protected branches:
192
154
 
193
- ```sh
194
- gx copy-commands
195
- ```
196
-
197
- Example output:
155
+ - `dev`
156
+ - `main`
157
+ - `master`
198
158
 
199
159
  ```sh
200
- npm i -g @imdeadpool/guardex
201
- gx setup
202
- gx doctor
203
- bash scripts/codex-agent.sh "task" "agent-name"
204
- bash scripts/agent-branch-start.sh "task" "agent-name"
205
- python3 scripts/agent-file-locks.py claim --branch "$(git rev-parse --abbrev-ref HEAD)" <file...>
206
- bash scripts/agent-branch-finish.sh --branch "$(git rev-parse --abbrev-ref HEAD)"
207
- bash scripts/openspec/init-plan-workspace.sh "<plan-slug>"
208
- gx protect add release staging
209
- gx sync --check
210
- gx sync
160
+ gx protect list
161
+ gx protect set main release hotfix
162
+ gx protect reset
211
163
  ```
212
164
 
213
- Full checklist output:
165
+ Stored in git config key:
214
166
 
215
167
  ```text
216
- Use this exact checklist to setup multi-agent safety in this repository for Codex or Claude.
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
258
- ```
259
-
260
- ## Basic commands
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
168
+ multiagent.protectedBranches
282
169
  ```
283
170
 
284
- No command defaults to `gx status` (non-mutating health/status view).
285
- `gx status` reports CLI/runtime info, global OMX/OpenSpec/codex-auth service status, and repo safety service state.
286
- `gx init` is an alias of `gx setup`.
287
- When run in an interactive terminal, default `GuardeX` checks npm for a newer version first
288
- and asks `[y/N]` whether to update immediately (default is `N`).
289
-
290
- - Interactive setup: prompts for Y/N approval before global OMX/OpenSpec/codex-auth install.
291
- - Interactive prompt is strict (`[y/n]`) and waits for explicit answer.
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
303
-
304
- ```sh
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
- ```
171
+ ## Companion dependency: GitHub CLI (`gh`)
310
172
 
311
- ## Keep agent branches synced with your base branch
173
+ GuardeX PR/merge automation depends on GitHub CLI (`gh`), including
174
+ `agent-branch-finish.sh` PR flows and `codex-agent.sh` auto-finish behavior.
312
175
 
313
- Use sync checks before finishing agent branches:
176
+ Install + verify:
314
177
 
315
178
  ```sh
316
- gx sync --check
317
- gx sync
179
+ # install guide: https://cli.github.com/
180
+ gh --version
181
+ gh auth status
318
182
  ```
319
183
 
320
- Defaults:
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`
331
-
332
- Useful variants:
333
-
334
- ```sh
335
- gx sync --strategy merge
336
- gx sync --all-agent-branches --check
337
- ```
184
+ ## Companion dependency: `codex-auth` account switcher
338
185
 
339
- By default, `agent-branch-finish.sh` also blocks finishing when your branch is behind `origin/<base>` and points to `gx sync`.
186
+ For multi-identity Codex workflows, GuardeX pairs with
187
+ [`codex-auth`](https://github.com/recodeecom/codex-account-switcher-cli).
340
188
 
341
- Optional pre-commit behind-threshold gate (off by default):
189
+ Install:
342
190
 
343
191
  ```sh
344
- git config multiagent.sync.requireBeforeCommit true
345
- git config multiagent.sync.maxBehindCommits 0
192
+ npm i -g @imdeadpool/codex-account-switcher
346
193
  ```
347
194
 
348
- With that enabled, agent-branch commits are blocked if the branch is behind `origin/<base>` by more than the configured threshold.
349
-
350
- ## Configure protected branches
351
-
352
- Default protected branches are:
353
-
354
- - `dev`
355
- - `main`
356
- - `master`
357
-
358
- You can manage additional protected branches via CLI:
195
+ Common commands:
359
196
 
360
197
  ```sh
361
- gx protect list
362
- gx protect add release staging
363
- gx protect remove dev
364
- gx protect set main release hotfix
365
- gx protect reset
366
- ```
367
-
368
- Configuration is stored in local git config key:
369
-
370
- ```text
371
- multiagent.protectedBranches
198
+ codex-auth save <name>
199
+ codex-auth use <name>
200
+ codex-auth list --details
201
+ codex-auth current
372
202
  ```
373
203
 
374
- ## What is protected
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
204
+ ## Files installed by setup
390
205
 
391
206
  ```text
392
207
  scripts/agent-branch-start.sh
393
208
  scripts/agent-branch-finish.sh
394
209
  scripts/codex-agent.sh
210
+ scripts/review-bot-watch.sh
395
211
  scripts/agent-worktree-prune.sh
396
212
  scripts/agent-file-locks.py
397
213
  scripts/install-agent-git-hooks.sh
398
214
  scripts/openspec/init-plan-workspace.sh
399
215
  .githooks/pre-commit
216
+ .githooks/pre-push
400
217
  .codex/skills/guardex/SKILL.md
401
218
  .claude/commands/guardex.md
402
219
  .omx/state/agent-file-locks.json
403
220
  ```
404
221
 
405
- If `package.json` exists, it also adds helper scripts (`agent:*`).
222
+ If `package.json` exists, setup also adds `agent:*` helper scripts.
223
+
224
+ ## Security and maintenance posture
225
+
226
+ - CI matrix on Node 18/20/22 (`npm test`, `node --check`, `npm pack --dry-run`)
227
+ - trusted publishing with provenance in GitHub Actions
228
+ - OpenSSF Scorecard + Dependabot for Actions
229
+ - disclosure policy in [`SECURITY.md`](./SECURITY.md)
406
230
 
407
231
  ## Local development
408
232
 
@@ -414,6 +238,28 @@ npm pack --dry-run
414
238
 
415
239
  ## Release notes
416
240
 
241
+ ### v5.0.4
242
+
243
+ - Bumped package version from `5.0.3` to `5.0.4` to stay one patch ahead of the current npm published version.
244
+
245
+ ### v5.0.3
246
+
247
+ - Bumped package version from `5.0.2` to `5.0.3` for the next npm publish.
248
+
249
+ ### v5.0.2
250
+
251
+ - Auto-closes Codex sandbox branches through PR workflow and keeps merged branch/worktree sandboxes for explicit cleanup via `gx cleanup`.
252
+ - Runs `gx doctor` repairs from a sandbox when `main` is protected.
253
+ - Allows tightly guarded Codex-only commits for `AGENTS.md` / `.gitignore` on protected branches.
254
+ - Advanced package version to keep npm publishing unblocked.
255
+
256
+ ### v5.0.0
257
+
258
+ - Rebranded the CLI to **GuardeX** with `gx`-first command UX.
259
+ - Published under scoped package name `@imdeadpool/guardex` to avoid npm name collisions.
260
+ - Enforced a repeatable per-message agent branch lifecycle in setup/init flows.
261
+ - Added codex-auth-aware sandbox branch naming support.
262
+
417
263
  ### v0.4.6
418
264
 
419
265
  - Added repository metadata (`repository`, `bugs`, `homepage`, `funding`) in package manifest.
@@ -437,9 +283,9 @@ npm pack --dry-run
437
283
 
438
284
  - Setup now detects existing global OMX/OpenSpec installs first.
439
285
  - If tools are already present, setup skips global install automatically.
440
- - Interactive approval is now strict `[y/n]` (waits for explicit answer).
286
+ - Interactive approval is strict `[y/n]` (waits for explicit answer).
441
287
  - Added setup screenshot to README.
442
- - Added 3 additional workflow screenshots (branch start, lock/delete guard, source-control view).
288
+ - Added workflow screenshots (branch start, lock/delete guard, source-control view).
443
289
 
444
290
  ### v0.4.0
445
291