@imdeadpool/guardex 8.4.14 → 8.4.15
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 +64 -422
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,480 +1,130 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img alt="GitGuardex logo" src="./logo.png" width="
|
|
2
|
+
<img alt="GitGuardex logo" src="./logo.png" width="180">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# GitGuardex
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
<strong>Safe parallel work for Codex, Claude, and humans.</strong><br>
|
|
9
|
-
One task → one worktree → one PR → one clean merge.
|
|
10
|
-
</p>
|
|
7
|
+
**Run Codex, Claude, and human contributors in parallel without sharing a checkout.** GitGuardex adds file claims, PR review gates, and safe cleanup to Git worktrees. One task → one worktree → one PR.
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<a href="https://scorecard.dev/viewer/?uri=github.com/recodeee/gitguardex"><img alt="OpenSSF Scorecard" src="https://img.shields.io/ossf-scorecard/github.com/recodeee/gitguardex?label=OpenSSF%20Scorecard&style=flat-square"></a>
|
|
16
|
-
<a href="https://github.com/recodeee/gitguardex/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/recodeee/gitguardex?label=stars&style=flat-square&color=d4ac0d"></a>
|
|
17
|
-
<a href="./LICENSE"><img alt="license" src="https://img.shields.io/npm/l/%40imdeadpool%2Fguardex?label=license&style=flat-square&color=97ca00"></a>
|
|
18
|
-
</p>
|
|
9
|
+
[](https://www.npmjs.com/package/@imdeadpool/guardex)
|
|
10
|
+
[](https://github.com/opencue/gitguardex/actions/workflows/ci.yml)
|
|
11
|
+
[License](./LICENSE)
|
|
19
12
|
|
|
20
|
-
|
|
21
|
-
<a href="#install">Install</a> ·
|
|
22
|
-
<a href="#the-problem">Why</a> ·
|
|
23
|
-
<a href="#what-gitguardex-can-do">Capabilities</a> ·
|
|
24
|
-
<a href="#see-every-lane-in-vs-code">VS Code view</a> ·
|
|
25
|
-
<a href="#daily-workflow">Workflow</a> ·
|
|
26
|
-
<a href="#code-assist-review-gate">Code assist</a> ·
|
|
27
|
-
<a href="#essential-commands">Commands</a>
|
|
28
|
-
</p>
|
|
29
|
-
|
|
30
|
-
---
|
|
13
|
+
[Quick start](#install) · [AI code review](#code-assist-review-gate) · [Impact Assist](#impact-assist) · [How it compares](#how-it-compares)
|
|
31
14
|
|
|
32
15
|
## Install
|
|
33
16
|
|
|
34
|
-
|
|
35
|
-
<img alt="Install GitGuardex" src="https://raw.githubusercontent.com/recodeee/gitguardex/main/docs/images/install-hero.svg" width="680">
|
|
36
|
-
</p>
|
|
17
|
+
Requires Node.js 18+, Git, and an authenticated GitHub CLI (`gh`) for the PR flow. Use Linux or macOS; on Windows, use WSL.
|
|
37
18
|
|
|
38
|
-
```
|
|
39
|
-
npm
|
|
40
|
-
cd /path/to/
|
|
19
|
+
```sh
|
|
20
|
+
npm install -g @imdeadpool/guardex
|
|
21
|
+
cd /path/to/repo
|
|
41
22
|
gx setup
|
|
42
|
-
gx
|
|
23
|
+
gx branch start "Add checkout validation" "codex" --no-transfer
|
|
43
24
|
```
|
|
44
25
|
|
|
45
|
-
|
|
46
|
-
Linux; use WSL on Windows.
|
|
47
|
-
|
|
48
|
-
### Adaptive local build queue
|
|
49
|
-
|
|
50
|
-
The npm install hook detects total RAM and reports the baseline. On Linux with
|
|
51
|
-
Python 3, Codex and Claude can share one foreground heavy-job queue across
|
|
52
|
-
worktrees:
|
|
26
|
+
Enter the worktree printed by `gx branch start`. Claim the files you intend to edit:
|
|
53
27
|
|
|
54
28
|
```sh
|
|
55
|
-
gx
|
|
56
|
-
gx run-heavy -- npm run build
|
|
57
|
-
gx run-heavy -- npm test
|
|
29
|
+
gx locks claim --branch "$(git branch --show-current)" src/checkout.ts
|
|
58
30
|
```
|
|
59
31
|
|
|
60
|
-
|
|
61
|
-
8 GiB of effective RAM (at least one, at most four); available RAM and active
|
|
62
|
-
slots are rechecked before every admission, so zero jobs may start under
|
|
63
|
-
pressure. On systemd systems with a user manager, jobs run in their own
|
|
64
|
-
worker scopes under the caller's user app or session slice, with a soft
|
|
65
|
-
`MemoryHigh` limit. It does not change earlyoom or systemd-oomd settings. Commands that do
|
|
66
|
-
not use GitGuardex are not queued, and background daemons are not supported.
|
|
32
|
+
Make the change and run your project's tests. Then ship the PR:
|
|
67
33
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
skip just the scope, or `GUARDEX_HEAVY_QUEUE=0` to run without the queue.
|
|
71
|
-
macOS and Linux without Python run commands directly. Ignoring npm install
|
|
72
|
-
scripts skips only the install report; the runtime still detects RAM.
|
|
73
|
-
|
|
74
|
-
> [!WARNING]
|
|
75
|
-
> GitGuardex is an independent project. It is not affiliated with OpenAI,
|
|
76
|
-
> Anthropic, or Codex.
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## The problem
|
|
81
|
-
|
|
82
|
-

|
|
83
|
-
|
|
84
|
-
Parallel agents can edit the same files, overwrite tests, or commit directly to
|
|
85
|
-
`main`. More agents can create more conflicts instead of more progress.
|
|
86
|
-
|
|
87
|
-
### What GitGuardex can do
|
|
88
|
-
|
|
89
|
-
<p align="center">
|
|
90
|
-
<img alt="GitGuardex capability map: isolated lanes, evidence-driven shipping, and safe cleanup" src="https://raw.githubusercontent.com/opencue/gitguardex/main/docs/images/capabilities-dark.svg" width="900">
|
|
91
|
-
</p>
|
|
92
|
-
|
|
93
|
-
| Isolate and coordinate | Ship with evidence | Recover without loss |
|
|
94
|
-
| --- | --- | --- |
|
|
95
|
-
| One `agent/*` branch and worktree per task. | Preflight, CI, and optional AI review block risky merges. | Dirty, locked, blocked, and uncertain lanes are preserved. |
|
|
96
|
-
| Shared file claims prevent silent overwrites. | The recorded base keeps unattended finishes on the correct target. | Successful lanes are merged, then their temporary branch and worktree are removed. |
|
|
97
|
-
| Protected branches stay behind a PR boundary. | Billing-aware fallbacks waive only explicitly named checks. | Cleanup fails closed instead of deleting work it cannot prove safe. |
|
|
98
|
-
|
|
99
|
-
<details>
|
|
100
|
-
<summary><strong>Implementation evidence and shipped hardening</strong></summary>
|
|
101
|
-
|
|
102
|
-
- **Correct base targeting** — persist and validate each lane's base so an
|
|
103
|
-
unattended finish cannot use another checkout's target. When
|
|
104
|
-
`branch.<b>.guardexBase` is absent (e.g., a worktree created with raw
|
|
105
|
-
`git worktree add`), the finish and stop hooks infer the base from git
|
|
106
|
-
history: the oldest reflog "Created from <name>" entry wins; if absent,
|
|
107
|
-
ancestry distance (commits ahead of each candidate's merge-base) selects the
|
|
108
|
-
closest; ties prefer `multiagent.baseBranch`, then protected branches, then
|
|
109
|
-
lexical order; and the result is persisted as `branch.<b>.guardexBase` for
|
|
110
|
-
every subsequent gate. ([#745](https://github.com/opencue/gitguardex/pull/745), [#750](https://github.com/opencue/gitguardex/pull/750), [#751](https://github.com/opencue/gitguardex/pull/751))
|
|
111
|
-
- **Billing-aware CI fallback** — waive only named checks that GitHub could not
|
|
112
|
-
start because of billing, while keeping repository preflight mandatory.
|
|
113
|
-
([#743](https://github.com/opencue/gitguardex/pull/743))
|
|
114
|
-
- **OpenSpec progress reconciliation** — merge conflicting `tasks.md` progress
|
|
115
|
-
deterministically and validate it before continuing. ([#753](https://github.com/opencue/gitguardex/pull/753))
|
|
116
|
-
- **Reusable successful preflight** — reuse proof only while the source HEAD,
|
|
117
|
-
base commit, command, and script stay unchanged; billing-waiver preflights
|
|
118
|
-
are never cached. ([#757](https://github.com/opencue/gitguardex/pull/757))
|
|
119
|
-
- **Fail-closed cleanup** — preserve dirty, locked, open-PR, blocked, or
|
|
120
|
-
uncertain lanes; close idle clean worktrees without deleting their branches.
|
|
121
|
-
([#741](https://github.com/opencue/gitguardex/pull/741), [#744](https://github.com/opencue/gitguardex/pull/744), [#746](https://github.com/opencue/gitguardex/pull/746), [#752](https://github.com/opencue/gitguardex/pull/752))
|
|
122
|
-
- **Workspace hygiene** — safely remove successful detached lanes, avoid stale
|
|
123
|
-
VS Code worktree providers, and keep `gx branch finish --help` free of
|
|
124
|
-
repository side effects. ([#742](https://github.com/opencue/gitguardex/pull/742), [#747](https://github.com/opencue/gitguardex/pull/747), [#748](https://github.com/opencue/gitguardex/pull/748), [#754](https://github.com/opencue/gitguardex/pull/754))
|
|
125
|
-
|
|
126
|
-
</details>
|
|
127
|
-
|
|
128
|
-
### See every lane in VS Code
|
|
129
|
-
|
|
130
|
-
Create an explicit multi-root workspace when you want every managed worktree to
|
|
131
|
-
appear as its own Source Control repository:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
gx setup --vscode-worktree-view
|
|
135
|
-
code ../<repo>-branches.code-workspace
|
|
34
|
+
```sh
|
|
35
|
+
gx branch finish --via-pr --wait-for-merge --cleanup
|
|
136
36
|
```
|
|
137
37
|
|
|
138
|
-
|
|
139
|
-
<img alt="VS Code Explorer showing separate Codex and Claude worktree groups" src="https://raw.githubusercontent.com/opencue/gitguardex/main/docs/images/vscode-worktrees-overview.png" width="668">
|
|
140
|
-
</p>
|
|
141
|
-
|
|
142
|
-
The generated workspace enables Git subfolder discovery, worktree detection,
|
|
143
|
-
and an empty repository-scan exclusion list. This is opt-in: GitGuardex does not
|
|
144
|
-
rewrite your repository's `.gitignore` or loosen the default single-repository
|
|
145
|
-
workspace. Disable future generation with `--no-vscode-worktree-view`.
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Daily workflow
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
# 1. Start an isolated lane
|
|
153
|
-
gx branch start "fix-auth" "codex"
|
|
38
|
+
Finish can commit and open the PR, run the selected gates, then squash-merge and clean up the finished lane. It does not override GitHub branch protection.
|
|
154
39
|
|
|
155
|
-
|
|
156
|
-
gx locks claim --branch "$(git branch --show-current)" src/auth.ts test/auth.test.ts
|
|
40
|
+
## Code-assist review gate
|
|
157
41
|
|
|
158
|
-
|
|
159
|
-
npm test
|
|
42
|
+
For AI code review, install and authenticate the Codex or Claude Code CLI.
|
|
160
43
|
|
|
161
|
-
|
|
162
|
-
gx
|
|
44
|
+
```sh
|
|
45
|
+
gx pr-review --pr 123 --post
|
|
163
46
|
```
|
|
164
47
|
|
|
165
|
-
|
|
48
|
+
Review an existing PR using your local Codex CLI. GitGuardex falls back to Claude Code if Codex cannot launch; pin either with `--provider` (or `--review-provider` when finishing). The review posts severity, file and line, and the reason a finding matters. **Posting a review does not merge the PR.**
|
|
166
49
|
|
|
167
|
-
|
|
168
|
-
token usage already recorded by supported coding-agent CLIs. Install ccusage
|
|
169
|
-
once with `npm install -g ccusage`; GX never silently downloads it.
|
|
50
|
+
With `--gate-review`, high and critical findings block the finish. Add `--gate-autofix` to attempt fixes and review the new head before merging. A green CI run is not a substitute for a clean review, or vice versa.
|
|
170
51
|
|
|
171
|
-
```
|
|
172
|
-
gx
|
|
173
|
-
gx usage codex session --json --offline # Codex sessions, machine-readable
|
|
174
|
-
gx usage claude daily --since 20260921 # Claude Code date filter
|
|
175
|
-
gx usage codex session --help # ccusage's report-specific options
|
|
52
|
+
```sh
|
|
53
|
+
gx branch finish --via-pr --wait-for-merge --cleanup --gate-review --gate-autofix
|
|
176
54
|
```
|
|
177
55
|
|
|
178
|
-
|
|
179
|
-
repository**. `CODEX_HOME` and other ccusage environment/config settings pass
|
|
180
|
-
through unchanged. Use `GUARDEX_CCUSAGE_BIN` to select an executable or JS entry
|
|
181
|
-
point. GX preserves the backend output and exit status, without recounting
|
|
182
|
-
tokens or treating missing ccusage as a successful empty report.
|
|
56
|
+
If a diff exceeds the review size limit, split the PR to continue. A standalone review may report partial findings, but cannot pass the gate. See [preflight setup](./docs/preflight.md) for local checks.
|
|
183
57
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
Missing logs cannot be measured, and Codex log support is experimental.
|
|
187
|
-
For A/B comparisons, use separate sessions with the same tasks/model and check
|
|
188
|
-
task success before comparing input, output, cached tokens and elapsed time.
|
|
189
|
-
This command reports usage; it does not itself run an A/B experiment.
|
|
190
|
-
|
|
191
|
-
### One-call agent context
|
|
192
|
-
|
|
193
|
-
`gx context` exposes the existing MCP context collector as compact JSON, scoped
|
|
194
|
-
to the current repository. Read the current lane, peer agents, and ownership of
|
|
195
|
-
multiple files without separate per-file calls:
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
gx context src/auth.ts test/auth.test.ts
|
|
199
|
-
gx context --target /path/to/worktree --max-bytes 20000 --json
|
|
200
|
-
```
|
|
58
|
+
<details>
|
|
59
|
+
<summary>See a real review on GitHub</summary>
|
|
201
60
|
|
|
202
|
-
|
|
203
|
-
of JSON, excluding the trailing newline; this is a byte budget, not a token
|
|
204
|
-
count. Up to 200 file paths are accepted. Use `--` before dash-prefixed filenames.
|
|
205
|
-
Only optional peer summaries may be omitted, with `complete: false` and an
|
|
206
|
-
omission count. Required safety data, including ownership conflicts, is never
|
|
207
|
-
truncated: an insufficient budget fails. Raise `--max-bytes` (up to 1 MiB) or
|
|
208
|
-
split the file batch. This read-only snapshot does not claim files or grant edit
|
|
209
|
-
permission; existing locks, approvals and merge gates still apply.
|
|
210
|
-
|
|
211
|
-
Run `node scripts/benchmark-context-cli.js` for a repeated local comparison of
|
|
212
|
-
separate MCP requests, the already-available batched MCP call, and this CLI.
|
|
213
|
-
It checks equivalent safety facts and reports timings and output bytes, not
|
|
214
|
-
provider-token counts or universal performance savings.
|
|
215
|
-
|
|
216
|
-
For a small change that you already verified locally, use the explicit fast
|
|
217
|
-
profile:
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
gx branch finish --fast
|
|
221
|
-
```
|
|
61
|
+

|
|
222
62
|
|
|
223
|
-
|
|
224
|
-
AI review, and review autofix. Repository branch protection and required CI
|
|
225
|
-
checks still control whether GitHub accepts the merge. Do not use fast mode for
|
|
226
|
-
security-sensitive, migration, dependency, or broad refactor changes.
|
|
63
|
+
[Open the example PR](https://github.com/projects-kssk/Wireless_KFB_Project/pull/165) · [Full-size screenshot](https://raw.githubusercontent.com/recodeee/gitguardex/main/docs/images/code-assist-review-gate.png)
|
|
227
64
|
|
|
228
|
-
|
|
229
|
-
<img alt="Guarded VS Code Source Control example" src="https://raw.githubusercontent.com/recodeee/gitguardex/main/docs/images/workflow-source-control-grouped.png" width="760">
|
|
230
|
-
</p>
|
|
65
|
+
</details>
|
|
231
66
|
|
|
232
67
|
---
|
|
233
68
|
|
|
234
|
-
##
|
|
69
|
+
## Impact Assist
|
|
235
70
|
|
|
236
|
-
|
|
71
|
+
**Code review asks what could break. Impact Assist asks what the repository gains or gives up by merging.** The review renders this as a **PR impact** section: benefits, trade-offs, links to supporting diff lines, and suggested next steps when available.
|
|
237
72
|
|
|
238
|
-
|
|
239
|
-
{
|
|
240
|
-
"provision": {
|
|
241
|
-
"files": { "copy": ["node_modules", ".env"], "symlink": [] },
|
|
242
|
-
"postCreate": ["npm run build"]
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
```
|
|
73
|
+
For example, a material benefit (**+25**) and a notable trade-off (**−10**) yield **65/100** from a neutral baseline of **50**. That is a diff-based estimate, not a benchmark or a merge verdict. If the diff is incomplete or the estimate has no valid supporting evidence, the section reports it as unavailable.
|
|
246
74
|
|
|
247
|
-
|
|
248
|
-
and directories, attempts native copy-on-write, and falls back to regular copying.
|
|
249
|
-
Unlike shared symlinks, modifying a copied dependency does not modify the source.
|
|
250
|
-
Existing targets are left untouched. Internal symlinks are relocated inside the
|
|
251
|
-
copy; dangling links, links outside the selected directory, and special files
|
|
252
|
-
fail the directory copy without installing a partial target. An explicit copy
|
|
253
|
-
never falls back to a shared symlink. Without an explicit copy policy, legacy
|
|
254
|
-
dependency sharing remains available; choose copies for writable dependencies.
|
|
255
|
-
|
|
256
|
-
**Migration:** `postCreate` now skips commands until their exact ordered list has
|
|
257
|
-
been approved locally for that repository. In a human terminal, run:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
gx worktree approve-hooks --target /path/to/source-repo
|
|
261
|
-
gx worktree provision --source /path/to/source-repo --target /path/to/agent-worktree
|
|
262
|
-
# Revoke approval without running hooks:
|
|
263
|
-
gx worktree approve-hooks --target /path/to/source-repo --revoke
|
|
264
|
-
```
|
|
75
|
+
[See Impact Assist on a real GitGuardex PR](https://github.com/opencue/gitguardex/pull/897#pullrequestreview-6070455129).
|
|
265
76
|
|
|
266
|
-
|
|
267
|
-
`.config/gitguardex/provision-approvals/`. Changed command lists require fresh
|
|
268
|
-
consent; noninteractive runs and `--yes` cannot grant it. Approved hooks can run
|
|
269
|
-
arbitrary shell code, including subsequently changed scripts: approval is not a
|
|
270
|
-
sandbox or a review of those scripts. `GUARDEX_PROVISION_HOOKS=0` disables even
|
|
271
|
-
approved hooks. `provision --with-defaults` also applies legacy dependency links
|
|
272
|
-
where they do not overlap an explicit copy policy (used by branch creation).
|
|
273
|
-
|
|
274
|
-
`gx agents status` prints its header before Git probes and then each completed
|
|
275
|
-
session row on a terminal. Redirected text and `--json` retain their prior format.
|
|
276
|
-
This is progressive display, not a claim that Git collection is faster.
|
|
277
|
-
|
|
278
|
-
These adaptations were inspired by [Worktrunk](https://github.com/max-sixty/worktrunk),
|
|
279
|
-
not implemented by adding a second worktree manager. Reproduce the local copy
|
|
280
|
-
comparison with `node scripts/benchmark-provision.js`; it reports repeated-run
|
|
281
|
-
timings and allocation accounting, not universal performance or storage savings.
|
|
282
|
-
|
|
283
|
-
### Native worktree navigation
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
eval "$(gx shell-init bash)" # zsh supported too; fish: gx shell-init fish | source
|
|
287
|
-
gx switch agent/bot/my-task # registered branch, worktree path, or "-" for previous
|
|
288
|
-
gx switch pr:123 --create # GitHub PR (requires gh); creation uses GX safety gates
|
|
289
|
-
gx switch # terminal picker with diff-stat and PR preview
|
|
290
|
-
gx switch agent/bot/my-task --json
|
|
291
|
-
```
|
|
77
|
+
## How it compares
|
|
292
78
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
a
|
|
297
|
-
|
|
298
|
-
are fetched through the origin repository's numbered PR ref and verified by SHA.
|
|
299
|
-
|
|
300
|
-
### Approved lifecycle hooks
|
|
301
|
-
|
|
302
|
-
Alongside the existing `provision.postCreate`, configure named lifecycle events:
|
|
303
|
-
|
|
304
|
-
```json
|
|
305
|
-
{
|
|
306
|
-
"hooks": {
|
|
307
|
-
"pre-start": ["npm ci", { "build": "npm run build", "lint": "npm run lint" }],
|
|
308
|
-
"pre-merge": "npm test",
|
|
309
|
-
"post-start": "echo Ready"
|
|
310
|
-
},
|
|
311
|
-
"hookTimeoutMs": 600000
|
|
312
|
-
}
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
An array is an ordered pipeline; commands in a named object run concurrently,
|
|
316
|
-
and the next stage waits for all of them to succeed. Pre hooks block; post hooks
|
|
317
|
-
run in the background with per-run output and status files.
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
gx worktree hook approve pre-start --source /path/to/repo
|
|
321
|
-
gx worktree hook approve pre-merge --source /path/to/repo
|
|
322
|
-
gx worktree hook approve post-start --source /path/to/repo
|
|
323
|
-
gx worktree hook pre-start --source /path/to/repo --worktree /path/to/lane --dry-run
|
|
324
|
-
gx worktree hook logs --source /path/to/repo --json
|
|
325
|
-
gx worktree hook approve pre-start --source /path/to/repo --revoke
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
Consent is interactive and local, bound to the repository, event, exact ordered
|
|
329
|
-
commands and timeout. Changes require approval again. These approvals are separate
|
|
330
|
-
from legacy `postCreate`; `--yes` cannot approve shell execution. State lives under
|
|
331
|
-
the Guardex user's `.config/gitguardex/lifecycle-hooks/`, outside the repository.
|
|
332
|
-
Approved commands are arbitrary shell code, not sandboxed; invoked scripts can
|
|
333
|
-
change independently of the approved command text.
|
|
334
|
-
|
|
335
|
-
Events are `pre-*` and `post-*` for `start`, `switch`, `commit`, `merge`,
|
|
336
|
-
and `remove`. Start hooks run after provisioning but before readiness, then
|
|
337
|
-
after successful initialization; reduced provisioning modes skip them. Switch
|
|
338
|
-
hooks surround destination selection, before the shell consumes its path.
|
|
339
|
-
Commit hooks surround GX finish's auto-commit (not unrelated manual Git commits).
|
|
340
|
-
Merge hooks supplement, never replace, existing PR/merge gates: a pre-merge hook
|
|
341
|
-
that changes the source revision or leaves changes aborts the merge.
|
|
342
|
-
Removal hooks apply to guarded prune and deferred finish cleanup, not internal
|
|
343
|
-
temporary integration/probe trees. A failed pre-remove preserves the worktree;
|
|
344
|
-
post-remove runs from the surviving repository, with `GUARDEX_WORKTREE` retaining
|
|
345
|
-
the removed path. Hooks also receive `GUARDEX_REPO_ROOT`, `GUARDEX_BRANCH` and
|
|
346
|
-
`GUARDEX_HOOK_EVENT`. `GUARDEX_PROVISION_HOOKS=0` disables hooks explicitly.
|
|
347
|
-
|
|
348
|
-
### Explicit ignored-file copy
|
|
349
|
-
|
|
350
|
-
```bash
|
|
351
|
-
gx worktree copy-ignored --source /path/to/repo --target /path/to/lane --dry-run --json
|
|
352
|
-
gx worktree copy-ignored --source /path/to/repo --target /path/to/lane
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
Only ignored files are eligible. Optional source `.worktreeinclude` narrows the
|
|
356
|
-
selection using Git's ignore-pattern syntax, for example `node_modules/**`
|
|
357
|
-
followed by `!node_modules/private/`. Existing or tracked target files are never
|
|
358
|
-
overwritten, and symlink escapes and nested repositories are rejected. This
|
|
359
|
-
explicit command does not broaden the normal branch-start copy policy.
|
|
360
|
-
GX runtime/ownership directories are excluded, including aliases pointing into
|
|
361
|
-
them. Foreign file claims and malformed lock registries block copying. Shared
|
|
362
|
-
remote-lock mode currently refuses this command rather than bypassing remote
|
|
363
|
-
ownership or fetching state during a read-only dry-run.
|
|
364
|
-
See [third-party attribution](THIRD-PARTY-NOTICES.md).
|
|
365
|
-
|
|
366
|
-
## Code-assist review gate
|
|
79
|
+
| If you use… | It handles… | What GitGuardex adds |
|
|
80
|
+
| --- | --- | --- |
|
|
81
|
+
| Plain `git worktree` | Separate checkouts | Task identity, shared file claims, and cleanup that preserves work it cannot safely remove |
|
|
82
|
+
| A standalone AI reviewer | Findings on a diff | Optional blocking review and autofix tied to the PR finish, plus a separate impact estimate |
|
|
83
|
+
| GitHub Actions and branch protection | Required checks and merge rules | Local preflight, worktree ownership, and a single workflow from task start to cleanup |
|
|
367
84
|
|
|
368
|
-
|
|
369
|
-
the agent repair blocking findings and run the review again.
|
|
85
|
+
GitGuardex works with Git, GitHub, and your existing agent CLI. It does not replace them.
|
|
370
86
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
--gate-review --gate-autofix
|
|
374
|
-
```
|
|
87
|
+
<details>
|
|
88
|
+
<summary>See the problem and capability diagrams</summary>
|
|
375
89
|
|
|
376
|
-
|
|
377
|
-
the PR as a readable severity, location, and finding table.
|
|
378
|
-
If the PR diff exceeds the review size limit, the merge gate stops before
|
|
379
|
-
launching the reviewer. Split the PR into smaller changes and rerun the gate.
|
|
380
|
-
A standalone `gx pr-review` can still produce an advisory report marked partial.
|
|
381
|
-
Both `gx pr-review` and the finish gate use Codex first. If the Codex CLI cannot
|
|
382
|
-
launch, they try Claude. Timeouts, failed or invalid reviews, and findings do not
|
|
383
|
-
trigger a switch. Use `--provider` or `--review-provider` to pin one provider.
|
|
384
|
-
|
|
385
|
-
After a clean review, normal gated finishes run the repository preflight while
|
|
386
|
-
GitHub CI runs. The final publish still requires both and checks the exact head
|
|
387
|
-
and base. After an interruption, rerun the same finish command: an unchanged
|
|
388
|
-
review policy and revision can reuse a recent Codex verdict if it is still the
|
|
389
|
-
latest, unchanged review on GitHub. A mandatory trusted-base CI fallback
|
|
390
|
-
preflight is never replaced by the regular preflight receipt.
|
|
391
|
-
|
|
392
|
-
Set `GUARDEX_REVIEW_COMPACT_DIFF=1` to try a smaller review prompt for large npm
|
|
393
|
-
lockfile patches. Only unchanged generated context is compacted; changed lines
|
|
394
|
-
and their coordinates are kept. The original diff is still used for coverage,
|
|
395
|
-
anchors and Abide. This opt-in does not apply to PR Lens.
|
|
396
|
-
|
|
397
|
-
For a repository that intentionally disables its GitHub Actions workflows,
|
|
398
|
-
enable the local CI fallback from that checkout:
|
|
399
|
-
|
|
400
|
-
```bash
|
|
401
|
-
git config --local multiagent.ciFallbackWhenDisabled true
|
|
402
|
-
```
|
|
90
|
+
## The problem
|
|
403
91
|
|
|
404
|
-
|
|
405
|
-
runs only if GitHub confirms a nonempty workflow list with every workflow
|
|
406
|
-
manually disabled and reports the reviewed PR as mergeable. A clean review
|
|
407
|
-
and a successful target-aware preflight from the trusted base are still
|
|
408
|
-
required. Missing or unverified workflow state, pending or failed checks,
|
|
409
|
-
and GitHub branch protection are not bypassed.
|
|
92
|
+

|
|
410
93
|
|
|
411
|
-
|
|
412
|
-
<a href="https://github.com/projects-kssk/Wireless_KFB_Project/pull/165">
|
|
413
|
-
<img alt="GitGuardex code-assist blocking a PR with review findings" src="https://raw.githubusercontent.com/recodeee/gitguardex/main/docs/images/code-assist-review-gate.png" width="920">
|
|
414
|
-
</a>
|
|
415
|
-
</p>
|
|
94
|
+
### What GitGuardex can do
|
|
416
95
|
|
|
417
96
|
<p align="center">
|
|
418
|
-
<
|
|
419
|
-
Real example: <a href="https://github.com/projects-kssk/Wireless_KFB_Project/pull/165">Wireless_KFB_Project PR #165</a>
|
|
420
|
-
· <a href="https://raw.githubusercontent.com/recodeee/gitguardex/main/docs/images/code-assist-review-gate.png">open the full-size screenshot</a>
|
|
421
|
-
</sub>
|
|
97
|
+
<img alt="GitGuardex capability map: isolated lanes, evidence-driven shipping, and safe cleanup" src="https://raw.githubusercontent.com/opencue/gitguardex/main/docs/images/capabilities-dark.svg" width="900">
|
|
422
98
|
</p>
|
|
423
99
|
|
|
424
|
-
|
|
100
|
+
</details>
|
|
425
101
|
|
|
426
|
-
##
|
|
427
|
-
|
|
428
|
-
| Command | Purpose |
|
|
429
|
-
| --- | --- |
|
|
430
|
-
| `gx` / `gx status` | Show repo safety and the next action. |
|
|
431
|
-
| `gx setup` | Install or refresh Guardex in a repo. |
|
|
432
|
-
| `gx doctor` | Repair Guardex drift. |
|
|
433
|
-
| `gx branch start "task" "agent"` | Create an isolated task lane. |
|
|
434
|
-
| `gx locks claim --branch <branch> <files...>` | Claim files before editing. |
|
|
435
|
-
| `gx branch finish --via-pr --wait-for-merge --cleanup` | Ship safely through a PR. |
|
|
436
|
-
| `gx branch finish --fast` | Squash-merge a locally verified small change without local preflight or AI review. |
|
|
437
|
-
| `gx agents status` | Show active agent lanes. |
|
|
438
|
-
| `gx agents send --session <id> --message <text>` | Deliver safely to an idle agent or queue for its next turn. |
|
|
439
|
-
| `gx agents inbox [--ack <message-id>]` | Read or acknowledge the authenticated standalone message queue. |
|
|
440
|
-
| `gx cleanup` | Prune merged or stale worktrees. |
|
|
441
|
-
|
|
442
|
-
Need the terminal cockpit? Run `gx cockpit`; see the
|
|
443
|
-
[cockpit guide](./docs/agents-cockpit.md). Run `gx --help` for every command.
|
|
102
|
+
## More workflows
|
|
444
103
|
|
|
445
|
-
|
|
104
|
+
- **See what other agents own:** `gx status`, `gx context path/to/file`, or the [agent cockpit](./docs/agents-cockpit.md).
|
|
105
|
+
- **Inspect local agent usage:** `gx usage` reads local logs through [ccusage](https://github.com/ccusage/ccusage); it does not install the backend.
|
|
106
|
+
- **Preview cleanup and storage:** `gx cleanup --dry-run` and the [worktree storage guide](./docs/worktree-storage.md).
|
|
107
|
+
- **Configure verification:** [local preflight](./docs/preflight.md), [OpenSpec (opt-in)](./docs/openspec-getting-started.md), or `gx --help`.
|
|
108
|
+
- **Advanced worktrees:** [provisioning, navigation, and lifecycle hooks](https://github.com/opencue/gitguardex/blob/f748d7e02c853b29826bb1e1005127468de407e8/README.md#worktree-provisioning) and [VS Code setup](https://github.com/opencue/gitguardex/blob/f748d7e02c853b29826bb1e1005127468de407e8/README.md#see-every-lane-in-vs-code).
|
|
109
|
+
- **Launch with a Cue profile:** [preview, start, and resume GitGuardex tasks](https://github.com/opencue/cuecards/blob/main/docs/gitguardex-workflows.md).
|
|
446
110
|
|
|
447
111
|
<details>
|
|
448
|
-
<summary
|
|
449
|
-
|
|
450
|
-
### AGENTS.md safety block
|
|
451
|
-
|
|
452
|
-
GitGuardex preserves your instructions. It only manages content between:
|
|
453
|
-
|
|
454
|
-
```text
|
|
455
|
-
<!-- multiagent-safety:START -->
|
|
456
|
-
<!-- multiagent-safety:END -->
|
|
457
|
-
```
|
|
112
|
+
<summary>Agent skills and maintainer releases</summary>
|
|
458
113
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
```bash
|
|
114
|
+
```sh
|
|
462
115
|
npx skills add recodee/gitguardex
|
|
463
|
-
|
|
116
|
+
gx release # create/update the current GitHub release from README notes
|
|
464
117
|
```
|
|
465
118
|
|
|
466
119
|
`gx setup` does not auto-run `npx skills add ...`. If the picker does not show a separate `guardex` skill, that is expected; use the `gitguardex` skill.
|
|
467
120
|
|
|
468
|
-
|
|
121
|
+
`gx release` is the maintainer path for package releases. It reads `README.md`, finds the last published GitHub release, and writes one grouped GitHub release body.
|
|
469
122
|
|
|
470
|
-
|
|
471
|
-
gx release # create/update the current GitHub release from README notes
|
|
472
|
-
```
|
|
123
|
+
</details>
|
|
473
124
|
|
|
474
|
-
|
|
475
|
-
finds the last published GitHub release, and writes one grouped GitHub release body.
|
|
125
|
+
[Contributing](./CONTRIBUTING.md) · [Security](./SECURITY.md) · [Issues](https://github.com/opencue/gitguardex/issues) · [Third-party notices](./THIRD-PARTY-NOTICES.md)
|
|
476
126
|
|
|
477
|
-
|
|
127
|
+
GitGuardex is independent and is not affiliated with OpenAI or Anthropic.
|
|
478
128
|
|
|
479
129
|
## Release notes
|
|
480
130
|
|
|
@@ -532,11 +182,3 @@ finds the last published GitHub release, and writes one grouped GitHub release b
|
|
|
532
182
|
the committed metadata so packed and signed assets stay aligned.
|
|
533
183
|
|
|
534
184
|
</details>
|
|
535
|
-
|
|
536
|
-
---
|
|
537
|
-
|
|
538
|
-
<p align="center">
|
|
539
|
-
<a href="https://github.com/recodeee/gitguardex/issues">Issues</a> ·
|
|
540
|
-
<a href="./CONTRIBUTING.md">Contributing</a> ·
|
|
541
|
-
<a href="./SECURITY.md">Security</a>
|
|
542
|
-
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imdeadpool/guardex",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.15",
|
|
4
4
|
"description": "Guardian T-Rex for your multi-agent repo. Isolated worktrees, file locks, and PR-only merges stop parallel Codex & Claude agents from overwriting each other's work. Auto-wires Oh My Codex, Oh My Claude, OpenSpec, and Caveman.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"preferGlobal": true,
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"jsonc-parser": "3.3.1",
|
|
99
99
|
"semver": "7.7.4"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "39adfb07abdaae8c2bfa267603355d60382d5d65"
|
|
102
102
|
}
|