feat: add Auggie (Augment Code) as first-class RTK agent
Summary
Adds Auggie (Augment Code) as a first-class RTK agent, matching the existing Claude, Cursor, Gemini, and Copilot integrations.
What this PR does
AgentTarget::Auggie— extends the agent enumrtk hook auggie— new subcommand that processes PreToolUse payloads (reuses Claude's payload processor since the JSON schema matches:tool_input.command)rtk init --agent auggie— installs a PreToolUse hook into~/.augment/settings.jsonwith matcherlaunch-processrtk init --agent auggie --uninstall— cleanly removes the hookhooks/auggie/— hook script and README- Documentation — updated hooks/README.md, top-level README.md, supported-agents.md, src/hooks/README.md
- 15 unit tests — payload processing, install/uninstall, idempotency, JSON structure validation
How it works
The hook registers in ~/.augment/settings.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "launch-process",
"hooks": [{ "type": "command", "command": "rtk hook auggie" }]
}]
}
}
When Augment fires a launch-process tool call, RTK intercepts the payload, rewrites supported commands (e.g. git status → rtk git status), and returns the rewrite via hookSpecificOutput.updatedInput.
Augment updatedInput status
Augment's PreToolUse hook system currently supports permissionDecision: "deny" but updatedInput is not yet implemented on Augment's side (docs reference). This means the RTK integration is fully ready and correct, but command rewriting will activate once Augment ships updatedInput support in a future release. No changes will be needed on RTK's side — it will just start working.
I'm coordinating with the Augment team and will update them once this is in a stable RTK release so they can update their docs accordingly.
Testing
- All 1744 tests pass (
cargo fmt && cargo clippy && cargo test) - Manual verification: hook payload processing confirmed working with real Augment PreToolUse payloads
- No new clippy warnings introduced
Files changed (10)
| File | Change |
|---|---|
src/main.rs |
Added AgentTarget::Auggie, HookCommands::Auggie, routing |
src/hooks/hook_cmd.rs |
run_auggie + 8 tests |
src/hooks/init.rs |
Install/show/uninstall + 7 tests |
src/hooks/constants.rs |
AUGGIE_HOOK_COMMAND, AUGMENT_DIR |
hooks/auggie/rtk-rewrite.sh |
Hook script |
hooks/auggie/README.md |
Hook documentation |
hooks/README.md |
Added Auggie entry |
README.md |
Added to Supported Agents table |
docs/guide/getting-started/supported-agents.md |
Added Auggie row |
src/hooks/README.md |
Added to mode table |
Pull Request opened by Augment Code with guidance from the PR author
Automatic message from CI checks : It seems like this branche is targeting the wrong branch, any contribution should target develop branch.
See CONTRIBUTING.md for details.
Thanks @augmentmoogi — reviewed the diff in depth. The native rtk hook auggie handler is a solid, well-tested integration (reusing process_claude_payload is exactly right, and the 15 tests cover the important cases). A few things to address before this can merge:
1. Rebase onto develop — drop release-please files (blocking)
The PR carries CHANGELOG.md, Cargo.lock, Cargo.toml and .release-please-manifest.json changes. Those are managed automatically by release-please and must not appear in a feature PR — they inflate the diff and conflict with the release flow. Please rebase onto the current develop and drop those four files (the wrong-base label and the release-bot comment point at the same thing).
2. Drop hooks/auggie/rtk-rewrite.sh entirely
Bash hook scripts were removed from RTK in 22892f0 ("native hook handlers, remove bash scripts"). No .sh is installed anymore — the remaining rtk-rewrite.sh files exist only so the installer can detect and clean up legacy installs. This PR already ships the correct approach (rtk hook auggie, native Rust), so the .sh is dead code that reintroduces a deliberately retired pattern. Please remove the script and the "Shell-based fallback" mention in hooks/auggie/README.md.
3. Honour --dry-run
run_auggie_mode takes only verbose: u8, so rtk init --agent auggie --dry-run still creates ~/.augment/settings.json (and the .bak backup); same for uninstall_auggie. Please thread InitContext through both so dry_run is respected.
4. Fold Auggie into uninstall_init_dispatch
The if agent == Some(AgentTarget::Auggie) branches scattered around uninstall_init_dispatch in main.rs are a side effect of the non-standard signature in (3). Once Auggie takes InitContext, route it through the existing dispatch helper for consistency.
For (3) and (4), it's worth aligning with how the other agent integrations are already implemented in this codebase — Cursor and Hermes in particular follow the InitContext + dispatch pattern end to end. Mirroring an existing agent's install/uninstall flow will keep Auggie consistent and make the review faster.
Also: the CLA isn't signed yet (license/cla is blocking CI) — please sign it so the checks can run.
Happy to re-review once the rebase + cleanup are done.