Skip to content

[Feature]: Project-scoped hooks (.augment/settings.json checked into the repo) #130

Description

@kwalitynut

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.json for personal/gitignored overrides) — in addition to the existing ~/.augment/settings.json and /etc/augment/settings.json locations. 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:

Location Scope
/etc/augment/settings.json System-wide (requires sudo)
C:\ProgramData\Augment\settings.json System-wide (Windows)
~/.augment/settings.json Per-user, applies to ALL projects

There is no way for a repository to ship a hook configuration that:

  1. Applies only to that repository.
  2. Is version-controlled and reviewed alongside the code it governs.
  3. Is automatically picked up by every contributor without each of them editing files in their home directory.

This is a real blocker for several use cases:

  • Repo-scoped policy enforcement. A repository wants to require that certain commands (e.g. terraform apply, kubectl delete) be blocked by a PreToolUse hook only within that repo, without globally affecting the developer's other projects.
  • AI provenance / commit attribution. We're rolling out a tool (devx-ai-standards) that tags AI-assisted commits with a verifiable trailer. The reliable way to wire this up for the IDE surfaces is a PreToolUse hook on launch-process matching git 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.
  • Onboarding & reproducibility. New contributors get the project's hooks the moment they 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.json and .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)

Location Scope Committed?
/etc/augment/settings.json (existing) System-wide n/a
.augment/settings.local.json (new) This repo, this user only No (auto-gitignored)
.augment/settings.json (new) This repo, all contributors Yes
~/.augment/settings.json (existing) This user, all repos n/a

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.json is 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:

  • On first encounter of a .augment/settings.json from a freshly cloned repo, prompt the user to review and approve before any hook executes.
  • Provide a clear way to inspect what hooks would run (e.g. auggie hooks list).
  • Document the trust model loudly.

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:

  • give up on hooks for the IDE surfaces and rely only on git hooks (which can't see Augment's tool-execution lifecycle), or
  • ask every contributor to manually merge a snippet into their global ~/.augment/settings.json (which then leaks into all of their other projects).

The ~/.augment/settings.json model is the right one for personal preferences, but it is the wrong shape for repo-defined policy.

Possible solution or alternatives

  • Mirror Claude Code's .claude/settings.json model (preferred, described above).
  • Allow ~/.augment/settings.json to include external 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.
  • Honor an AUGMENT_SETTINGS_FILE environment 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 Code: Settings docs, Hooks guide. Project hooks live in .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.

Activity

  1. AgenticThinkingUK commented on May 9, 2026

    @AgenticThinkingUK

    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.

  2. augmentmoogi commented on May 10, 2026

    @augmentmoogi
    Contributor

    Hi - we should already have this support.
    Let me check if our documentation is up to date.

  3. AgenticThinkingUK commented on May 10, 2026

    @AgenticThinkingUK

    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 list or auggie hooks doctor would also help teams prove what hooks are active before anything runs.

    Happy to test against the documented flow once it is updated.

  4. augmentmoogi commented on May 10, 2026

    @augmentmoogi
    Contributor

    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 committed

    Hooks 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.

  5. AgenticThinkingUK commented on May 10, 2026

    @AgenticThinkingUK

    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.

  6. augmentmoogi commented on May 11, 2026

    @augmentmoogi
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions