Skip to content

fix(augmentcode): read Auggie 1.x permission and subagent spellings - #3741

Merged
dyoshikawa merged 4 commits into
mainfrom
resolve-issue-3729-auggie-1x
Nov 3, 2026
Merged

dyoshikawa merged 4 commits into
mainfrom
resolve-issue-3729-auggie-1x

Conversation

@dyoshikawa

@dyoshikawa dyoshikawa commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

Auggie 1.x (still a prerelease on npm; stable is 0.36.0) changed three things rulesync reads or writes in .augment/. This PR handles all three without changing output for 0.x users.

  1. Permissions (security): a 1.x shell rule ("toolName": "bash") with shellInputRegex imported as bash: {"*": "allow"}, and generate then appended an unconditional launch-process allow. Now bash / shell (and str_replace_editor / save_file) are aliases of the legacy names, so the regex is recovered like a launch-process one, and the bash row is managed (replaced or deduplicated) on regenerate.
  2. Subagents: an agent file without name (optional in 1.x, "Defaults to the filename without .md") made import exit 1. Import now uses the file name instead. Generate still writes name, because 0.36.0 requires it.
  3. augmentcode-plugin rules: 1.x no longer loads rules/ from plugins. 0.x still does (checked against /cli/v0/plugins), so the output stays the same. Generate now prints a warning, and the docs explain the gap.

Changes

  • augmentcode-permissions.ts: extended CURRENT_TO_LEGACY_AUGMENT_TOOL_NAMES with the 1.x legacy aliases from https://docs.augmentcode.com/cli/permissions. Rulesync keeps emitting the legacy names, which 0.x and 1.x both accept.
  • augmentcode-permissions.ts: a regex that matches a literal \* / \? no longer counts as roundtrippable. Turning it into a glob would make the literal a wildcard: ^rm \*$ became ^rm .*$. Allow and ask entries like this are now skipped with a warning. Deny entries are broadened to * (fail-closed), as before.
  • augmentcode-subagent.ts: name is now optional, and the name comes from the file name on import. A Markdown file with no frontmatter is still rejected, so a README in .agents/ does not import as an agent. Also updated the outdated class comment about disabled_tools.
  • rules-processor.ts: when augmentcode-plugin writes rule files, generate warns that they load on Auggie 0.x only.
  • Docs: file-formats.md (permissions aliases and regex fallback, a new AugmentCode subagent note), plugin-packaging.md, and a new "AugmentCode (Auggie 1.x) compatibility" section in supported-tools.md. docs-content.ts regenerated.

Out of scope, left open: .mdc rules, APPEND_SYSTEM.md, a grep ⇄ grep-search alias, the note in the feature-research reference map, and deciding whether to keep plugin rules once 1.x becomes stable.

Tests

  • New unit tests:
    • 1.x names import with their patterns.
    • A bash allow regex round-trips through generate as a single conditional launch-process row.
    • Literal-wildcard regexes are skipped or broadened.
    • A nameless agent imports as rev, and a file without frontmatter is rejected.
    • The plugin-rules warning is printed for augmentcode-plugin and not for augmentcode.
  • The permissions tests fail without the fix.
  • Ran the issue's repro in a scratch project with the dev CLI: import gives bash: {"npm test": "allow", "rm *": "deny"}, and generate writes only the two conditional launch-process rows.
  • pnpm cicheck passes.

Refs #3729

🤖 Generated with Claude Code

https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth

dyoshikawa and others added 4 commits November 3, 2026 16:29
- permissions: treat the Auggie 1.x tool names `bash` / `shell`,
  `str_replace_editor` and `save_file` as aliases of the legacy names
  rulesync emits, so a conditional `bash` rule keeps its shellInputRegex
  on import instead of collapsing into an unconditional shell allow
- permissions: never widen an allow/ask regex that matches a literal
  `*` or `?`; skip it with a warning (a deny is broadened fail-closed)
- subagents: accept agent files without `name` (optional in 1.x) and
  derive the name from the file name, as Auggie does
- rules: warn on generate that augmentcode-plugin rules load on Auggie
  0.x only; output is unchanged for the stable CLI
- docs: describe the Auggie 1.x behavior

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth
…n as globs

The lossy shellInputRegex conversion kept bare `*` / `?` quantifiers as
glob wildcards, so an allow such as `^rm -rf /tmp/a*$` came back as
`^rm -rf /tmp/a.*$`. Skip allow/ask entries whose regex has a bare
`*` / `?` / `+` / `{` outside a `.*` run, or an escaped `\*` / `\?`,
with a warning; deny stays fail-closed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth
…a glob class

An escaped `\[` in a shellInputRegex became a glob `[`, which targets
whose globs support character classes read as a one-character range.
Treat it as non-roundtrippable: allow/ask entries are skipped with a
warning and a deny is broadened to `*` (fail-closed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth
@dyoshikawa
dyoshikawa merged commit fdae369 into main Nov 3, 2026
10 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3729-auggie-1x branch November 3, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant