Repository navigation
[Feature]: Project-scoped hooks (.augment/settings.json checked into the repo) #130
Description
Activity
This makes sense. Global hooks are personal automation. Repo hooks are part of the governed dev environment.
The bit I would add is a way to inspect what actually loaded before anything runs, for example:
auggie hooks list --project auggie hooks doctor
That should show each config layer, whether it is trusted, which surface loaded it, and which events it covers across CLI, VS Code and JetBrains.
The first run trust prompt matters, but drift detection matters just as much. If CLI and IDE surfaces resolve hooks differently, teams need to see that straight away.
That would also make it much easier for external collectors to map Augment events into a neutral runtime evidence envelope such as AgentHook. Not because Augment needs to depend on any one tool, but because the hook surface would be inspectable, attributable and consistent across surfaces.
Hi - we should already have this support.
Let me check if our documentation is up to date.Thanks, that is good to hear.
If project-scoped hook config is already supported, then the main gap may just be documentation/discoverability.
The bits I would find useful to see documented are the load locations, precedence, first-run trust behaviour, and whether CLI, VS Code and JetBrains all resolve the effective hook config the same way.
An inspect command like
auggie hooks listorauggie hooks doctorwould also help teams prove what hooks are active before anything runs.Happy to test against the documented flow once it is updated.
Thanks for the detailed write-up! Good news — project-scoped hooks are already supported today.
You can define hooks in:
<workspace>/.augment/settings.json— shared project settings, committed to source control<workspace>/.augment/settings.local.json— personal project overrides, not committedHooks from all config sources (system, user, project) are merged additively, and system-level hooks are immutable. This works in the CLI today, and VSCode/IntelliJ support is currently in beta.
Our hooks documentation was missing these locations, which is why it looked unsupported. The docs have been updated to reflect this.
Regarding auto-gitignoring settings.local.json, a trust/approval prompt for repo-provided hooks, and a hooks list inspection command — we'll follow up on these suggestions separately.
Thanks, that helps. We tested the project scoped hook shape and the tool/session side looks solid.
One question: are UserPromptSubmit, PreLLMCall, PostLLMCall, ModelResponse, or reasoning/model response boundaries exposed anywhere today?
For governance work, that difference matters. Tool hooks show what the agent tried to run. They do not show the full prompt to model to response chain.
A hooks list/doctor command that shows loaded config and supported events per surface would make this much easier to prove across CLI, VS Code and JetBrains. It would also help external hook standards map Augment accurately without guessing.
Sounds like there's a lot to cover here. To avoid back-and-forth on GitHub, let me reach out to you directly and see what we can do.
What would you like to be added?
Summary
Support reading hook configuration from a project-local file checked into the repository — e.g.
.augment/settings.json(and optionally.augment/settings.local.jsonfor personal/gitignored overrides) — in addition to the existing~/.augment/settings.jsonand/etc/augment/settings.jsonlocations. This should apply to all surfaces that already honor hooks: Auggie CLI, the VSCode extension, and the JetBrains/IntelliJ plugin.Problem
Per the current hooks docs, the only locations Augment loads hook configuration from are:
/etc/augment/settings.jsonC:\ProgramData\Augment\settings.json~/.augment/settings.jsonThere is no way for a repository to ship a hook configuration that:
This is a real blocker for several use cases:
terraform apply,kubectl delete) be blocked by aPreToolUsehook only within that repo, without globally affecting the developer's other projects.devx-ai-standards) that tags AI-assisted commits with a verifiable trailer. The reliable way to wire this up for the IDE surfaces is aPreToolUsehook onlaunch-processmatchinggit commit, since neither the VSCode extension nor the JetBrains plugin reliably exports an environment variable a git hook could detect. Without project-scoped hook config, every contributor on every machine has to manually merge a snippet into~/.augment/settings.json— and even then it leaks across all of their other projects.git clone, instead of via a side-channel doc that says "please go edit your home directory".Claude Code already supports exactly this pattern with
.claude/settings.jsonand.claude/settings.local.json(see their docs), and it's been a major reason teams have been able to standardize Claude Code hooks across a repo. The same model would solve the equivalent problem for Augment.Proposed Solution
1. Add two new hook config locations, in this precedence order (highest to lowest)
/etc/augment/settings.json(existing).augment/settings.local.json(new).augment/settings.json(new)~/.augment/settings.json(existing)Project discovery should walk up from the current working directory looking for
.augment/(mirroring how Claude Code does it), so it works in monorepo subdirectories and worktrees.2. Apply across all surfaces that already support hooks
The docs already list CLI, VSCode, and IntelliJ as supporting the existing hook locations — the new ones should be honored in all three. For the IDE surfaces, the discovery root is the workspace/project root.
3. Merge semantics
Following the existing precedence note in the docs (system overrides user), the new layers should compose: hooks from all applicable layers run, with later layers able to override matchers from earlier ones. This matches Claude Code's behavior and avoids surprising users when a repo hook silently disables their personal one (or vice versa).
4. Auto-gitignore the local file
When
.augment/settings.local.jsonis created, append it to.gitignore(Claude Code does this) so personal/experimental hook config doesn't accidentally get committed.5. Security guardrails
Project-scoped hooks execute arbitrary commands on contributor machines, so this needs the same treatment Claude Code applies:
.augment/settings.jsonfrom a freshly cloned repo, prompt the user to review and approve before any hook executes.auggie hooks list).Why is this needed?
Without project-scoped hooks, there is no way for a repository to ship a hook recipe that contributors get automatically and that is scoped to that repository. This forces every team that wants policy enforcement, AI provenance, or any other repo-level hook behavior to either:
~/.augment/settings.json(which then leaks into all of their other projects).The
~/.augment/settings.jsonmodel is the right one for personal preferences, but it is the wrong shape for repo-defined policy.Possible solution or alternatives
.claude/settings.jsonmodel (preferred, described above).~/.augment/settings.jsontoincludeexternal files by path, so a repo could ship a config and ask the user to add"include": ["./.augment/settings.json"]to their global config. This is strictly worse than option 1 — still requires per-user setup, still leaks across worktrees, no automatic discovery — but easier to implement.AUGMENT_SETTINGS_FILEenvironment variable pointing at an additional settings file. Also worse than option 1; doesn't solve the IDE surface case where there's no shell at all.Additional context
Reference implementations of project-scoped hook config:
.claude/settings.json, personal-overrides in.claude/settings.local.json(auto-gitignored).Filed by a team building an AI-provenance commit-attribution standard (
@clari/devx-ai-standards) that needs to support repository-defined hooks for both Augment (CLI + VSCode + IntelliJ) and Claude Code consumers.