Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thanks for contributing to `GuardeX`.
Thanks for contributing to `GitGuardex`.

## Development setup

Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# GitGuardex — Guardian T-Rex for your repo

[![npm version](https://img.shields.io/npm/v/%40imdeadpool%2Fguardex?label=npm&color=cb3837&logo=npm)](https://www.npmjs.com/package/@imdeadpool/guardex)
[![npm downloads](https://img.shields.io/npm/dm/%40imdeadpool%2Fguardex?label=downloads&color=0b76c5)](https://www.npmjs.com/package/@imdeadpool/guardex)
[![npm version](https://img.shields.io/npm/v/%40imdeadpool%2Fgitguardex?label=npm&color=cb3837&logo=npm)](https://www.npmjs.com/package/@imdeadpool/gitguardex)
[![npm downloads](https://img.shields.io/npm/dm/%40imdeadpool%2Fgitguardex?label=downloads&color=0b76c5)](https://www.npmjs.com/package/@imdeadpool/gitguardex)
[![GitHub stars](https://img.shields.io/github/stars/recodeee/gitguardex?label=stars&color=d4ac0d)](https://github.com/recodeee/gitguardex/stargazers)
[![License](https://img.shields.io/npm/l/%40imdeadpool%2Fguardex?label=License&color=97ca00)](./LICENSE)
[![License](https://img.shields.io/npm/l/%40imdeadpool%2Fgitguardex?label=License&color=97ca00)](./LICENSE)

[![CI](https://img.shields.io/github/actions/workflow/status/recodeee/gitguardex/ci.yml?branch=main&label=CI)](https://github.com/recodeee/gitguardex/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/actions/workflow/status/recodeee/gitguardex/release.yml?label=Release)](https://github.com/recodeee/gitguardex/actions/workflows/release.yml)
Expand Down Expand Up @@ -38,7 +38,7 @@ GitGuardex exists to stop that loop. Every agent gets its own worktree, claims t
<h3 align="center">Install in one line</h3>

```bash
npm i -g @imdeadpool/guardex
npm i -g @imdeadpool/gitguardex
```

<p align="center">
Expand All @@ -49,8 +49,8 @@ npm i -g @imdeadpool/guardex
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@imdeadpool/guardex"><img alt="npm" src="https://img.shields.io/npm/v/%40imdeadpool%2Fguardex?label=latest&style=flat-square&color=cb3837&logo=npm&logoColor=white"></a>
<a href="https://www.npmjs.com/package/@imdeadpool/guardex"><img alt="downloads" src="https://img.shields.io/npm/dm/%40imdeadpool%2Fguardex?label=downloads&style=flat-square&color=0b76c5"></a>
<a href="https://www.npmjs.com/package/@imdeadpool/gitguardex"><img alt="npm" src="https://img.shields.io/npm/v/%40imdeadpool%2Fgitguardex?label=latest&style=flat-square&color=cb3837&logo=npm&logoColor=white"></a>
<a href="https://www.npmjs.com/package/@imdeadpool/gitguardex"><img alt="downloads" src="https://img.shields.io/npm/dm/%40imdeadpool%2Fgitguardex?label=downloads&style=flat-square&color=0b76c5"></a>
<a href="https://github.com/recodeee/gitguardex/stargazers"><img alt="stars" src="https://img.shields.io/github/stars/recodeee/gitguardex?style=flat-square&color=d4ac0d"></a>
</p>

Expand All @@ -70,19 +70,19 @@ Coming soon: [recodee.com](https://recodee.com) — live account health, usage,
- **Protected-base safety** — `main`, `dev`, `master` are blocked by default; agents must go through PRs.
- **Auto-merges agent configs into every worktree** — `oh-my-codex`, `oh-my-claudecode`, caveman mode, and OpenSpec all get applied automatically so every spawned agent starts tuned, not bare.
- **Repair/doctor flow** — when drift happens (and it will), `gx doctor` gets you back to a clean state.
- **Auto-finish** — when Codex exits a session, Guardex commits sandbox changes, syncs against the base, retries once if the base moved, and opens a PR.
- **Auto-finish** — when Codex exits a session, GitGuardex commits sandbox changes, syncs against the base, retries once if the base moved, and opens a PR.

---

## Quick start

```sh
npm i -g @imdeadpool/guardex
npm i -g @imdeadpool/gitguardex
cd /path/to/your/repo
gx setup
```

That's it. Setup installs hooks, scripts, templates, and scaffolds OpenSpec/caveman/OMX wiring. Aliases: `gx` (preferred), `gitguardex` (full), `guardex` (legacy).
That's it. New installs should use `@imdeadpool/gitguardex` so the published package matches the GitGuardex name. Setup installs hooks, scripts, templates, and scaffolds OpenSpec/caveman/OMX wiring. Aliases: `gx` (preferred), `gitguardex` (full), `guardex` (legacy compatibility).

---

Expand Down Expand Up @@ -199,7 +199,7 @@ bash scripts/agent-branch-finish.sh \

If you use `scripts/codex-agent.sh`, the finish flow runs automatically when the Codex session exits — it auto-commits, retries once after syncing if the base moved during the run, then pushes and opens the PR.

Guardex normally prunes merged sandboxes for you as part of the finish flow. If you simply do not want a local sandbox/worktree anymore, remove that worktree directly; delete the branch too only if you are intentionally abandoning that lane:
GitGuardex normally prunes merged sandboxes for you as part of the finish flow. If you simply do not want a local sandbox/worktree anymore, remove that worktree directly; delete the branch too only if you are intentionally abandoning that lane:

```sh
git worktree remove .omx/agent-worktrees/<worktree-name>
Expand Down Expand Up @@ -229,11 +229,11 @@ Codex sessions default to `.omx/agent-worktrees/`. Claude Code sessions default

### How It Works In VS Code

This is the real Source Control shape Guardex is aiming for: isolated agent branches, clear OpenSpec artifacts, and no pile-up on one shared checkout.
This is the real Source Control shape GitGuardex is aiming for: isolated agent branches, clear OpenSpec artifacts, and no pile-up on one shared checkout.

![Guarded VS Code Source Control example](https://raw.githubusercontent.com/recodeee/gitguardex/main/docs/images/workflow-source-control-grouped.png)

To install the real companion into local VS Code from a Guardex-wired repo:
To install the real companion into local VS Code from a GitGuardex-wired repo:

```sh
node scripts/install-vscode-active-agents-extension.js
Expand Down Expand Up @@ -406,7 +406,7 @@ GitGuardex is designed to work alongside these. All optional — but if you're r

### oh-my-codex — Codex config + skills framework

Loads skills, slash commands, and session defaults into Codex. Guardex merges `oh-my-codex` into every agent worktree automatically, so every spawned agent starts with the same tuned config instead of vanilla Codex.
Loads skills, slash commands, and session defaults into Codex. GitGuardex merges `oh-my-codex` into every agent worktree automatically, so every spawned agent starts with the same tuned config instead of vanilla Codex.

```sh
npm i -g oh-my-codex
Expand All @@ -417,7 +417,7 @@ Repo: <https://github.com/Yeachan-Heo/oh-my-codex>

### oh-my-claudecode — Claude Code equivalent

Claude-side mirror of oh-my-codex. Same idea: skills, commands, and defaults loaded into every Claude Code session. Guardex merges it into worktrees alongside oh-my-codex so mixed Codex + Claude agent fleets behave consistently. For the npm CLI/runtime path, the published package name is `oh-my-claude-sisyphus`.
Claude-side mirror of oh-my-codex. Same idea: skills, commands, and defaults loaded into every Claude Code session. GitGuardex merges it into worktrees alongside oh-my-codex so mixed Codex + Claude agent fleets behave consistently. For the npm CLI/runtime path, the published package name is `oh-my-claude-sisyphus`.

```sh
npm i -g oh-my-claude-sisyphus@latest
Expand Down Expand Up @@ -636,10 +636,11 @@ npm pack --dry-run
<summary><strong>v7.x</strong></summary>

### v7.0.16
- GitGuardex now publishes under the matching npm package name `@imdeadpool/gitguardex`, and install/help/docs surfaces point at the renamed package instead of the older `@imdeadpool/guardex` scope.
- `gx doctor` now keeps nested repo repair runs visibly progressing, and overlapping integration work stays off the protected base branch instead of trying to merge back on `main`.
- Cleanup and finish flows are less brittle: `codex-agent` no longer waits on PRs that can never exist, and prune cleanup now walks both managed worktree roots so stale sandboxes get removed consistently.
- Mirror-sync diagnostics are quieter: when the mirror PAT is unset, Guardex now skips the sync path instead of marking the run red, and shared `ralplan` lanes stay easier to identify during handoff/debugging.
- Bumped `@imdeadpool/guardex` from `7.0.15` → `7.0.16` after npm rejected a republish over the already-published `7.0.15`.
- Mirror-sync diagnostics are quieter: when the mirror PAT is unset, GitGuardex now skips the sync path instead of marking the run red, and shared `ralplan` lanes stay easier to identify during handoff/debugging.
- Bumped the release from `7.0.15` → `7.0.16` after npm rejected a republish of `7.0.15`.

### v7.0.15
- `gx doctor` no longer blocks recursive nested protected-repo repairs on child PR merge waits; nested sandboxes now force `--no-wait-for-merge` so the parent repair loop can continue.
Expand All @@ -652,7 +653,7 @@ npm pack --dry-run

### v7.0.13
- `gx status` and `gx setup` now present the Claude companion as `oh-my-claudecode` while still installing the published npm package `oh-my-claude-sisyphus`.
- When that dependency is inactive or the user declines the optional install, Guardex now prints the upstream repo URL so the missing dependency is explicit instead of hidden behind the npm package name.
- When that dependency is inactive or the user declines the optional install, GitGuardex now prints the upstream repo URL so the missing dependency is explicit instead of hidden behind the npm package name.
- Bumped `@imdeadpool/guardex` from `7.0.12` → `7.0.13` after npm rejected a republish over the already-published `7.0.12`.

### v7.0.12
Expand Down Expand Up @@ -710,8 +711,8 @@ npm pack --dry-run
- **Breaking (soft).** Consolidated 17 commands into 12 visible commands with flag-based subcommands. Removed names still work but print a deprecation notice; will be removed in v8.
- **Token-usage improvements.** Trimmed auto-installed agent templates that live in every consumer repo and get loaded into every session:
- `templates/AGENTS.multiagent-safety.md`: 6990 B → 1615 B (−77%)
- `templates/codex/skills/guardex/SKILL.md`: 2732 B → 1086 B (−60%)
- `templates/claude/commands/guardex.md`: 472 B → 357 B (−24%)
- `templates/codex/skills/gitguardex/SKILL.md`: 2732 B → 1086 B (−60%)
- `templates/claude/commands/gitguardex.md`: 472 B → 357 B (−24%)
- Total: 10194 B → 3058 B per consumer repo (−70%, ~1.5k fewer tokens per agent session).
- New `gx prompt` command replaces three prompt-emitting commands.
- New flag surface on `gx setup`: `--install-only`, `--repair`.
Expand Down Expand Up @@ -752,7 +753,7 @@ Version bumps for npm publish continuity plus incremental fixes: doctor arg-pars
- Allows tightly guarded Codex-only commits for `AGENTS.md` / `.gitignore` on protected branches.

### v5.0.0
- Rebranded CLI to **GuardeX** with `gx`-first command UX.
- Rebranded CLI to **GitGuardex** with `gx`-first command UX.
- Published under scoped package name `@imdeadpool/guardex`.
- Enforced repeatable per-message agent branch lifecycle in setup/init flows.
- Added codex-auth-aware sandbox branch naming support.
Expand Down
9 changes: 5 additions & 4 deletions bin/multiagent-safety.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const TOOL_NAME = 'gitguardex';
const SHORT_TOOL_NAME = 'gx';
const LEGACY_NAMES = ['guardex', 'multiagent-safety'];
const GLOBAL_INSTALL_COMMAND = `npm i -g ${packageJson.name}`;
const OPENSPEC_PACKAGE = '@fission-ai/openspec';
const OMC_PACKAGE = 'oh-my-claude-sisyphus';
const OMC_REPO_URL = 'https://github.com/Yeachan-Heo/oh-my-claudecode';
Expand Down Expand Up @@ -281,7 +282,7 @@ const CLI_COMMAND_DESCRIPTIONS = [
['prompt', 'Print AI setup checklist (--exec, --snippet)'],
['report', 'Security/safety reports (e.g. OpenSSF scorecard)'],
['help', 'Show this help output'],
['version', 'Print GuardeX version'],
['version', 'Print GitGuardex version'],
];
const DEPRECATED_COMMAND_ALIASES = new Map([
['init', { target: 'setup', hint: 'gx setup' }],
Expand Down Expand Up @@ -315,7 +316,7 @@ function defaultAgentWorktreeRelativeDir(env = process.env) {

const AI_SETUP_PROMPT = `GitGuardex (gx) setup checklist for Codex/Claude in this repo.

1) Install: npm i -g @imdeadpool/guardex && gh --version
1) Install: ${GLOBAL_INSTALL_COMMAND} && gh --version
2) Bootstrap: gx setup
3) Repair: gx doctor
4) Task loop: bash scripts/codex-agent.sh "<task>" "<agent>"
Expand All @@ -330,7 +331,7 @@ const AI_SETUP_PROMPT = `GitGuardex (gx) setup checklist for Codex/Claude in thi
12) Fork sync: install https://github.com/apps/pull + cp .github/pull.yml.example .github/pull.yml
`;

const AI_SETUP_COMMANDS = `npm i -g @imdeadpool/guardex
const AI_SETUP_COMMANDS = `${GLOBAL_INSTALL_COMMAND}
gh --version
gx setup
gx doctor
Expand Down Expand Up @@ -2517,7 +2518,7 @@ function runDoctorInSandbox(options, blocked) {
if (finishResult.stderr) process.stderr.write(finishResult.stderr);
} else if (finishResult.status === 'failed') {
console.log(`[${TOOL_NAME}] Auto-finish flow failed for sandbox branch '${metadata.branch}'.`);
console.log(`[guardex] Auto-finish flow failed for sandbox branch '${metadata.branch}'.`);
console.log(`[${TOOL_NAME}] Auto-finish flow failed for sandbox branch '${metadata.branch}'.`);
if (finishResult.stdout) process.stdout.write(finishResult.stdout);
if (finishResult.stderr) process.stderr.write(finishResult.stderr);
} else {
Expand Down
2 changes: 1 addition & 1 deletion docs/branch-sync-spec.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GuardeX branch sync feature spec (pre-implementation)
# GitGuardex branch sync feature spec (pre-implementation)

Status: draft
Scope: CLI UX + behavior spec + test matrix for keeping `agent/*` branches synced with `origin/dev` safely.
Expand Down
10 changes: 5 additions & 5 deletions docs/images/guardex-service-status.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/images/install-hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions docs/images/setup-success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading