@imdeadpool/guardex 5.0.8 → 5.0.11

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/README.md CHANGED
@@ -71,6 +71,12 @@ gx cleanup --branch "$(git rev-parse --abbrev-ref HEAD)"
71
71
  If you use `scripts/codex-agent.sh`, the finish flow is auto-run after the Codex session exits.
72
72
  It auto-commits sandbox changes, retries once after syncing if the branch moved behind base during the run, then pushes/opens PR merge flow against the current base branch.
73
73
 
74
+ If you run Codex in multiple existing agent worktrees directly (for example from VS Code Source Control), finalize all completed branches with:
75
+
76
+ ```sh
77
+ gx finish --all
78
+ ```
79
+
74
80
  ## Visual workflow
75
81
 
76
82
  ### Setup status
@@ -89,6 +95,10 @@ It auto-commits sandbox changes, retries once after syncing if the branch moved
89
95
 
90
96
  ![gx lock and delete guard screenshot](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/workflow-lock-guard.svg)
91
97
 
98
+ ### Real VS Code Source Control layout (exact screenshot)
99
+
100
+ ![Real VS Code Source Control layout](https://raw.githubusercontent.com/recodeecom/multiagent-safety/main/docs/images/workflow-vscode-source-control-exact.png)
101
+
92
102
  ## Copy-paste: common commands
93
103
 
94
104
  ```sh
@@ -114,9 +124,21 @@ gx sync
114
124
  # continuously monitor open PRs targeting current branch and dispatch codex-agent review/merge tasks
115
125
  gx review --interval 30
116
126
 
127
+ # start both background bots for this repo (review + cleanup)
128
+ gx agents start
129
+
130
+ # stop both background bots for this repo
131
+ gx agents stop
132
+
133
+ # auto-commit finished agent branches and open/merge PR flow in one pass
134
+ gx finish --all
135
+
117
136
  # cleanup merged agent branches and hide clean stale agent worktrees
118
137
  gx cleanup
119
138
 
139
+ # run continuous stale-branch cleanup bot (default idle threshold: 10 minutes)
140
+ gx cleanup --watch --interval 60
141
+
120
142
  # scan/report
121
143
  gx scan
122
144
  gx report scorecard --repo github.com/recodeecom/multiagent-safety
@@ -139,6 +161,37 @@ Useful flags:
139
161
 
140
162
  Note: the monitor dispatches Codex through explicit `--task/--agent/--base` flags for compatibility with both older and newer `scripts/codex-agent.sh` argument parsing.
141
163
 
164
+ ### Continuous stale branch cleanup bot
165
+
166
+ Use this to auto-prune idle `agent/*` worktrees created by Codex while keeping active worktrees untouched.
167
+
168
+ ```sh
169
+ # watch cleanup loop every minute (default idle threshold is 10 minutes when --watch is enabled)
170
+ gx cleanup --watch --interval 60
171
+
172
+ # one-shot cleanup for branches idle at least 10 minutes
173
+ gx cleanup --idle-minutes 10
174
+
175
+ # run a single watch cycle (helpful for cron/CI checks)
176
+ gx cleanup --watch --once --interval 60
177
+ ```
178
+
179
+ ### Repo Agent Supervisor (start both bots with one command)
180
+
181
+ ```sh
182
+ # starts review bot + cleanup bot in background for the current repo
183
+ gx agents start
184
+
185
+ # optional tuning
186
+ gx agents start --review-interval 30 --cleanup-interval 60 --idle-minutes 10
187
+
188
+ # show whether both bots are running for this repo
189
+ gx agents status
190
+
191
+ # stop both bots and clear repo-local state
192
+ gx agents stop
193
+ ```
194
+
142
195
  ## Important behavior defaults
143
196
 
144
197
  - No command defaults to `gx status`.
@@ -228,6 +281,36 @@ scripts/openspec/init-plan-workspace.sh
228
281
 
229
282
  If `package.json` exists, setup also adds `agent:*` helper scripts.
230
283
 
284
+ ## OpenSpec quick start after `gx setup`
285
+
286
+ If you enabled global OpenSpec install during setup (`@fission-ai/openspec`), use the full guide here:
287
+
288
+ - [`docs/openspec-getting-started.md`](./docs/openspec-getting-started.md)
289
+
290
+ Default core flow:
291
+
292
+ ```text
293
+ /opsx:propose <change-name> -> /opsx:apply -> /opsx:archive
294
+ ```
295
+
296
+ Optional expanded flow:
297
+
298
+ ```sh
299
+ openspec config profile <profile-name>
300
+ openspec update
301
+ ```
302
+
303
+ ```text
304
+ /opsx:new <change-name> -> /opsx:ff or /opsx:continue -> /opsx:apply -> /opsx:verify -> /opsx:archive
305
+ ```
306
+
307
+ ### OpenSpec in agent sub-branches
308
+
309
+ - `scripts/codex-agent.sh` enforces an OpenSpec workspace before it launches Codex in each sandbox branch/worktree.
310
+ - `scripts/agent-branch-start.sh` can also scaffold `openspec/plan/<agent-branch-slug>/` when you set `MUSAFETY_OPENSPEC_AUTO_INIT=true`.
311
+ - Set `MUSAFETY_OPENSPEC_AUTO_INIT=false` (default for `agent-branch-start`) to skip branch-start auto-bootstrap.
312
+ - Set `MUSAFETY_OPENSPEC_PLAN_SLUG=<kebab-case-slug>` to force a specific plan workspace name.
313
+
231
314
  ## Security and maintenance posture
232
315
 
233
316
  - CI matrix on Node 18/20/22 (`npm test`, `node --check`, `npm pack --dry-run`)
@@ -245,6 +328,22 @@ npm pack --dry-run
245
328
 
246
329
  ## Release notes
247
330
 
331
+ ### v5.0.11
332
+
333
+ - Updated the managed AGENTS contract wording to use `GX` naming and added an explicit OMX completion policy requiring commit + push + PR creation/update at task completion.
334
+ - Ensured `gx install` explicitly configures the managed `AGENTS.md` policy block and added regression coverage for this install-path behavior.
335
+ - Bumped package version from `5.0.10` to `5.0.11` for the next npm publish.
336
+
337
+ ### v5.0.10
338
+
339
+ - Bumped package version from `5.0.9` to `5.0.10` for the next npm publish.
340
+
341
+ ### v5.0.9
342
+
343
+ - Enforced OpenSpec workspace bootstrap for sandbox agent execution: `scripts/codex-agent.sh` now initializes `openspec/plan/<agent-branch-slug>/` before launching Codex, and `scripts/agent-branch-start.sh` supports `MUSAFETY_OPENSPEC_AUTO_INIT` plus `MUSAFETY_OPENSPEC_PLAN_SLUG`.
344
+ - Tightened doctor auto-finish correctness: sandbox finish now waits for merge and exits non-zero if the PR closes without merge, so repair flows are not reported as complete when policy blocks merge.
345
+ - Updated package version from `5.0.8` to `5.0.9` for the next npm publish.
346
+
248
347
  ### v5.0.8
249
348
 
250
349
  - Fixed `bin/multiagent-safety.js` syntax regressions in the doctor sandbox flow (`Unexpected identifier` / `Unexpected end of input`) that were breaking CLI execution and CI tests.