@imdeadpool/guardex 6.1.0 → 7.0.0

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
@@ -102,69 +102,69 @@ gx finish --all
102
102
  ## Copy-paste: common commands
103
103
 
104
104
  ```sh
105
- # health / safety status
105
+ # health check (default when run with no args)
106
106
  gx status
107
+ gx status --strict # exit non-zero on findings (v6 name: gx scan)
107
108
 
108
- # setup and repair
109
+ # bootstrap, repair, verify — all in one
109
110
  gx setup
110
- gx doctor
111
- # setup + repair another repo without switching your current repo checkout
111
+ gx setup --repair # repair only (v6 name: gx fix)
112
+ gx setup --install-only # scaffold templates, skip global installs (v6 name: gx install)
113
+ gx doctor # repair + verify (auto-sandboxes on protected main)
114
+
115
+ # target another repo without switching your current checkout
112
116
  gx setup --target /path/to/repo
113
117
  gx doctor --target /path/to/repo
114
- # optional: from parent folder, generate VS Code workspace view for repo + agent worktrees
115
- cd /path/to
116
- gx setup --target ./repo --parent-workspace-view
117
- # open this in VS Code to manage both base repo and .omx/agent-worktrees
118
- code ./repo-branches.code-workspace
118
+ # optional VS Code workspace showing repo + agent worktrees
119
+ gx setup --target /path/to/repo --parent-workspace-view
120
+
121
+ # monorepo with nested git repos (e.g. /mainfolder/.git + /mainfolder/apps/*/.git)
122
+ # setup auto-installs into every nested repo; use --no-recursive to limit to the top-level
123
+ gx setup --target /mainfolder
124
+ gx setup --target /mainfolder --no-recursive
119
125
 
120
126
  # protected branch management
121
127
  gx protect list
122
128
  gx protect add release staging
123
129
  gx protect remove release
124
130
 
125
- # sync with base branch
131
+ # sync current agent branch with origin/<base>
126
132
  gx sync --check
127
133
  gx sync
128
134
 
129
- # continuously monitor open PRs targeting current branch and dispatch codex-agent review/merge tasks
130
- gx review --interval 30
131
-
132
- # start both background bots for this repo (review + cleanup)
135
+ # background bots (review monitor + stale cleanup)
133
136
  gx agents start
134
-
135
- # stop both background bots for this repo
136
137
  gx agents stop
138
+ gx agents status
137
139
 
138
- # auto-commit finished agent branches and open/merge PR flow in one pass
139
- gx finish --all
140
-
141
- # cleanup merged agent branches and hide clean stale agent worktrees
142
- gx cleanup
143
-
144
- # run continuous stale-branch cleanup bot (default idle threshold: 10 minutes)
140
+ # per-agent-branch lifecycle
141
+ gx finish --all # commit + PR + merge every ready agent/* branch
142
+ gx cleanup # prune merged/stale branches and worktrees
145
143
  gx cleanup --watch --interval 60
146
144
 
147
- # scan/report
148
- gx scan
149
- gx report scorecard --repo github.com/recodeee/guardex
150
- ```
145
+ # AI-ready setup prompt (paste into Codex/Claude)
146
+ gx prompt # full checklist (v6 name: gx copy-prompt)
147
+ gx prompt --exec # commands only (v6 name: gx copy-commands)
148
+ gx prompt --snippet # AGENTS.md managed block template
151
149
 
152
- ### Continuous Codex PR monitor (local codex-auth session)
153
-
154
- Run this in your local shell to keep watching PRs targeting the current branch (or `--base <branch>`):
155
-
156
- ```sh
157
- gx review --interval 30
150
+ # reports
151
+ gx report scorecard --repo github.com/recodeee/guardex
158
152
  ```
159
153
 
160
- Useful flags:
154
+ ### v6 → v7 command migration
161
155
 
162
- - `--base main` watch a specific base branch
163
- - `--only-pr 123` process only one PR
164
- - `--once` run one polling cycle and exit
165
- - `--retry-failed` retry failed PRs without waiting for a new head SHA
156
+ Five commands were consolidated into flags. Old names still work and print a one-line deprecation notice; they'll be removed in v8.
166
157
 
167
- Note: the monitor dispatches Codex through explicit `--task/--agent/--base` flags for compatibility with both older and newer `scripts/codex-agent.sh` argument parsing.
158
+ | v6 command | v7 replacement |
159
+ | ---------------------- | ------------------------ |
160
+ | `gx init` | `gx setup` |
161
+ | `gx install` | `gx setup --install-only`|
162
+ | `gx fix` | `gx setup --repair` |
163
+ | `gx scan` | `gx status --strict` |
164
+ | `gx copy-prompt` | `gx prompt` |
165
+ | `gx copy-commands` | `gx prompt --exec` |
166
+ | `gx print-agents-snippet` | `gx prompt --snippet` |
167
+ | `gx review` | `gx agents start` (runs review + cleanup) |
168
168
 
169
169
  ### Continuous stale branch cleanup bot
170
170
 
@@ -204,6 +204,7 @@ gx agents stop
204
204
  - Setup/doctor can install missing global OMX/OpenSpec/codex-auth with explicit Y/N confirmation.
205
205
  - `gx setup` checks GitHub CLI (`gh`) and prints install guidance if missing.
206
206
  - Optional parent-folder VS Code Source Control view: `gx setup --target /path/to/repo --parent-workspace-view` creates `../<repo>-branches.code-workspace`.
207
+ - Monorepo-aware: when the target contains nested git repos (e.g. `apps/*/.git`), `gx setup` installs the workflow into every discovered repo. Git submodules (`.git` files) and guardex worktrees under `.omx/agent-worktrees/` are skipped. Opt out with `--no-recursive`; tune discovery with `--max-depth <n>`, `--skip-nested <dir>`, and `--include-submodules`.
207
208
  - Interactive self-update prompt defaults to **No** (`[y/N]`).
208
209
  - In initialized repos, `setup`/`install`/`fix` block protected-base writes unless explicitly overridden.
209
210
  - Direct commits/pushes to protected branches are blocked by default.
@@ -372,6 +373,29 @@ npm pack --dry-run
372
373
 
373
374
  ## Release notes
374
375
 
376
+ ### v7.0.0
377
+
378
+ - **Breaking (soft).** Consolidated 17 commands into 12 visible commands with flag-based subcommands. Five removed names (`init`, `install`, `fix`, `scan`, `copy-prompt`, `copy-commands`, `print-agents-snippet`, `review`) still work but print a one-line deprecation notice on stderr and will be removed in v8. See the migration table in "Copy-paste: common commands" above.
379
+ - **Token-usage improvements.** Trimmed the auto-installed agent templates that live inside every consumer repo and get loaded into every Claude/Codex session:
380
+ - `templates/AGENTS.multiagent-safety.md`: 6990 B → 1615 B (−77%)
381
+ - `templates/codex/skills/guardex/SKILL.md`: 2732 B → 1086 B (−60%)
382
+ - `templates/claude/commands/guardex.md`: 472 B → 357 B (−24%)
383
+ - Total: 10194 B → 3058 B per consumer repo (−70%, ~1.5k fewer tokens per agent session).
384
+
385
+ The `AI_SETUP_PROMPT` and `AI_SETUP_COMMANDS` constants used by `gx prompt` are now compact checklists, so piping `gx prompt` into a model context is cheaper too.
386
+ - **New `gx prompt` command** replaces three prompt-emitting commands: `gx prompt` (full checklist), `gx prompt --exec` (commands only), `gx prompt --snippet` (AGENTS.md managed-block template).
387
+ - **New flag surface on `gx setup`**: `--install-only` (templates/hooks/locks only), `--repair` (fix drift), plus the existing `--target`, `--parent-workspace-view`, `--dry-run`, etc.
388
+ - **New `gx status --strict`** mirrors the old `gx scan` behavior (exit non-zero on findings).
389
+ - Updated internal `REQUIRED_PACKAGE_SCRIPTS` for consumer `package.json` so `agent:safety:scan` and `agent:safety:fix` helper scripts now invoke the new v7 surface (`gx status --strict`, `gx setup --repair`).
390
+
391
+ ### v6.0.1
392
+
393
+ - Preserve existing repo-owned `AGENTS.md` marker content during `gx setup` / `gx doctor` by default; only rewrite marker blocks when `--force` is explicitly used.
394
+ - Preserve existing `agent:*` package scripts during setup/doctor repairs by default so repo-local command customizations are not silently replaced.
395
+ - Forward `--force` through sandboxed doctor execution so intentional canonical template/script rewrites still work end-to-end.
396
+ - Added regression tests for both preservation behaviors (`setup` + `doctor`).
397
+ - Bumped package version from `6.0.0` to `6.0.1` for the next npm publish.
398
+
375
399
  ### v6.0.0
376
400
 
377
401
  - **Breaking** — removed the legacy `musafety` bin alias and all `MUSAFETY_*` environment variables. Callers must migrate to the `guardex` / `gx` bins and the `GUARDEX_*` env-var surface.