Audit Context
Evaluate the user's ambient context artifacts for compatibility with swarm's governance rules. You are a read-only diagnostic — never modify any files.
What to scan
- CLAUDE.md files. Read the project's
CLAUDE.md (working directory root). If .claude/CLAUDE.md exists, read that too. Also check ~/.claude/CLAUDE.md (global config) — it loads into every session.
- Memory files. Find the project memory path by checking
~/.claude/projects/ for a directory matching the current working directory. Claude Code dash-encodes the project path (e.g., /Users/foo/my-project becomes -Users-foo-my-project). If a memory/MEMORY.md index exists, read it and follow links to individual memory files.
- Local skills and commands. List
.claude/skills/ and .claude/commands/ in the project directory. Flag any skill whose name matches a swarm built-in: suggest-members, refine-outcomes, define-rubric, resolve-dispute, writing-style, code-mode, writing-mode, general-mode, workflow-rules, audit-context.
- Settings hooks. Check both
.claude/settings.json (project) and ~/.claude/settings.json (global) for a hooks section. Flag any hook that intercepts tools used by swarm (TeamCreate, Agent, SendMessage, CronCreate).
- Auto mode environment. Claude Code reads
autoMode from user scope (~/.claude/settings.json) and local scope (.claude/settings.local.json, gitignored) — it ignores shared project scope (.claude/settings.json). Check all three for autoMode.environment containing a string that mentions a source-control hostname (github.com, gitlab.com, bitbucket.org, or any host matching the working directory's git remote get-url origin) and does not contain a literal < placeholder. If absent or invalid in user and local scopes → flag as missing (the team's ship phase will stall on classifier prompts in auto mode). If present and valid only in shared project scope → flag as wrong scope (the entry is dead config; Claude Code ignores it there).
How to classify
For each artifact, classify as one of three categories:
- Complementary — Does not conflict with any swarm rule. Style preferences (brevity, tone, formatting), domain conventions, and tool permissions are complementary by default. No action needed.
- Potentially Interfering — Could conflict with a swarm rule depending on context. The artifact's intent is benign but its phrasing is broad enough to suppress or alter expected swarm behavior. Worth reviewing.
- Conflicting — Directly contradicts a named swarm governance rule. Will likely cause unexpected behavior during a team run. Should be addressed before launching.
Swarm governance rules to evaluate against
These are the rules that matter for interference detection:
Workflow control
- After greenlight, execution is autonomous — no mid-phase confirmations unless escalating per hard rules.
- The user's request wording is not a greenlight — members wait for the lead to assign work.
- Phase transitions require facilitator signals (RESEARCH COMPLETE, CONVERGED, CONFIDENCE REACHED).
- Final delivery requires explicit user sign-off.
Communication
- facilitator signal obligations are protocol mechanics — they must be sent regardless of communication preferences.
- Favor brevity during roundtables. No idle chatter.
- SendMessage is the only channel between teammates — plain text output dies with the turn.
Execution
- All members except the lead are read-only.
- The lead is the sole executor — only the lead writes, edits, or runs commands.
- No code changes during review rounds.
- Wait for ALL reviews before making changes.
Team structure
- Briefing templates are fixed — no added sections, task framing, or acknowledgment rituals.
- Hard rules are non-negotiable and take precedence over ambient preferences.
Common interference patterns
Flag these specific patterns when you encounter them:
| Pattern |
Example |
Classification |
Conflicting rule |
| Confirmation injection |
"Always confirm before editing" |
Conflicting |
Autonomous post-greenlight execution |
| Auto-commit/push |
"Commit after completing work" |
Conflicting |
Final delivery requires user approval |
| Silence preferences |
"Don't repeat yourself", "Stay silent while waiting" |
Potentially Interfering |
facilitator signal obligations |
| Verbosity injection |
"Explain your reasoning step by step" |
Potentially Interfering |
Favor brevity during roundtables |
| Methodology injection |
"Always use TDD", "Write tests first" |
Potentially Interfering |
Phase arc is defined by mode skill |
| Tool restrictions |
"Never use TeamCreate", "Don't spawn agents" |
Conflicting |
Always use TeamCreate |
| Briefing expansion |
"Add detailed context to all briefs" |
Conflicting |
Briefing templates are fixed |
| Skill name collision |
Local suggest-members skill |
Conflicting |
Shadows swarm built-in |
| Hook tool interception |
Hook that blocks TeamCreate or SendMessage |
Conflicting |
Team creation and communication require these tools |
| Auto mode setup gap |
autoMode.environment source-control trust missing from user and local scope |
Potentially Interfering |
Ship phase requires source-control trust in user (~/.claude/settings.json) or local (.claude/settings.local.json) scope — run /swarm:launch for the host-specific block and the auto-add option |
| Auto mode entry in wrong scope |
autoMode.environment set in shared project .claude/settings.json only |
Potentially Interfering |
Claude Code ignores autoMode from shared project scope — move the entry to user or local scope (run /swarm:launch for the auto-move flow) |
Output format
Present findings as a structured report grouped by source:
## Audit Results
### CLAUDE.md — [path]
- [excerpt] — **[Classification]** — conflicts with: [rule name]. [One-line recommendation.]
### Memory — [path]
- [excerpt] — **[Classification]** — conflicts with: [rule name]. [One-line recommendation.]
### Local Skills / Commands
- [name] — **[Classification]** — [reason]. [One-line recommendation.]
### Settings Hooks — .claude/settings.json
- [hook name / tool target] — **[Classification]** — [reason]. [One-line recommendation.]
### Summary
- Complementary: [count]
- Potentially Interfering: [count]
- Conflicting: [count]
If no artifacts are found, say so. If all artifacts are complementary, say "No interference detected — your environment is clean for swarm runs."
1---2name: audit-context3description: Evaluates ambient context artifacts (CLAUDE.md, memory, local skills, settings hooks) for compatibility with swarm governance. Returns a classified report so users can address interference before launching a team.4---5
6# Audit Context
7
8Evaluate the user's ambient context artifacts for compatibility with swarm's governance rules. You are a read-only diagnostic — never modify any files.
9
10## What to scan
11
121. **CLAUDE.md files.** Read the project's `CLAUDE.md` (working directory root). If `.claude/CLAUDE.md` exists, read that too. Also check `~/.claude/CLAUDE.md` (global config) — it loads into every session.
132. **Memory files.** Find the project memory path by checking `~/.claude/projects/` for a directory matching the current working directory. Claude Code dash-encodes the project path (e.g., `/Users/foo/my-project` becomes `-Users-foo-my-project`). If a `memory/MEMORY.md` index exists, read it and follow links to individual memory files.
143. **Local skills and commands.** List `.claude/skills/` and `.claude/commands/` in the project directory. Flag any skill whose name matches a swarm built-in: `suggest-members`, `refine-outcomes`, `define-rubric`, `resolve-dispute`, `writing-style`, `code-mode`, `writing-mode`, `general-mode`, `workflow-rules`, `audit-context`.
154. **Settings hooks.** Check both `.claude/settings.json` (project) and `~/.claude/settings.json` (global) for a `hooks` section. Flag any hook that intercepts tools used by swarm (TeamCreate, Agent, SendMessage, CronCreate).
165. **Auto mode environment.** Claude Code reads `autoMode` from user scope (`~/.claude/settings.json`) and local scope (`.claude/settings.local.json`, gitignored) — it ignores shared project scope (`.claude/settings.json`). Check all three for `autoMode.environment` containing a string that mentions a source-control hostname (`github.com`, `gitlab.com`, `bitbucket.org`, or any host matching the working directory's `git remote get-url origin`) and does not contain a literal `<` placeholder. If absent or invalid in user and local scopes → flag as **missing** (the team's ship phase will stall on classifier prompts in auto mode). If present and valid only in shared project scope → flag as **wrong scope** (the entry is dead config; Claude Code ignores it there).
17
18## How to classify
19
20For each artifact, classify as one of three categories:
21
22- **Complementary** — Does not conflict with any swarm rule. Style preferences (brevity, tone, formatting), domain conventions, and tool permissions are complementary by default. No action needed.
23- **Potentially Interfering** — Could conflict with a swarm rule depending on context. The artifact's intent is benign but its phrasing is broad enough to suppress or alter expected swarm behavior. Worth reviewing.
24- **Conflicting** — Directly contradicts a named swarm governance rule. Will likely cause unexpected behavior during a team run. Should be addressed before launching.
25
26## Swarm governance rules to evaluate against
27
28These are the rules that matter for interference detection:
29
30### Workflow control
31- After greenlight, execution is autonomous — no mid-phase confirmations unless escalating per hard rules.
32- The user's request wording is not a greenlight — members wait for the lead to assign work.
33- Phase transitions require facilitator signals (RESEARCH COMPLETE, CONVERGED, CONFIDENCE REACHED).
34- Final delivery requires explicit user sign-off.
35
36### Communication
37- facilitator signal obligations are protocol mechanics — they must be sent regardless of communication preferences.
38- Favor brevity during roundtables. No idle chatter.
39- SendMessage is the only channel between teammates — plain text output dies with the turn.
40
41### Execution
42- All members except the lead are read-only.
43- The lead is the sole executor — only the lead writes, edits, or runs commands.
44- No code changes during review rounds.
45- Wait for ALL reviews before making changes.
46
47### Team structure
48- Briefing templates are fixed — no added sections, task framing, or acknowledgment rituals.
49- Hard rules are non-negotiable and take precedence over ambient preferences.
50
51## Common interference patterns
52
53Flag these specific patterns when you encounter them:
54
55| Pattern | Example | Classification | Conflicting rule |
56|---|---|---|---|
57| Confirmation injection | "Always confirm before editing" | Conflicting | Autonomous post-greenlight execution |
58| Auto-commit/push | "Commit after completing work" | Conflicting | Final delivery requires user approval |
59| Silence preferences | "Don't repeat yourself", "Stay silent while waiting" | Potentially Interfering | facilitator signal obligations |
60| Verbosity injection | "Explain your reasoning step by step" | Potentially Interfering | Favor brevity during roundtables |
61| Methodology injection | "Always use TDD", "Write tests first" | Potentially Interfering | Phase arc is defined by mode skill |
62| Tool restrictions | "Never use TeamCreate", "Don't spawn agents" | Conflicting | Always use TeamCreate |
63| Briefing expansion | "Add detailed context to all briefs" | Conflicting | Briefing templates are fixed |
64| Skill name collision | Local `suggest-members` skill | Conflicting | Shadows swarm built-in |
65| Hook tool interception | Hook that blocks TeamCreate or SendMessage | Conflicting | Team creation and communication require these tools |
66| Auto mode setup gap | `autoMode.environment` source-control trust missing from user and local scope | Potentially Interfering | Ship phase requires source-control trust in user (`~/.claude/settings.json`) or local (`.claude/settings.local.json`) scope — run `/swarm:launch` for the host-specific block and the auto-add option |
67| Auto mode entry in wrong scope | `autoMode.environment` set in shared project `.claude/settings.json` only | Potentially Interfering | Claude Code ignores `autoMode` from shared project scope — move the entry to user or local scope (run `/swarm:launch` for the auto-move flow) |
68
69## Output format
70
71Present findings as a structured report grouped by source:
72
73```
74## Audit Results
75
76### CLAUDE.md — [path]
77- [excerpt] — **[Classification]** — conflicts with: [rule name]. [One-line recommendation.]
78
79### Memory — [path]
80- [excerpt] — **[Classification]** — conflicts with: [rule name]. [One-line recommendation.]
81
82### Local Skills / Commands
83- [name] — **[Classification]** — [reason]. [One-line recommendation.]
84
85### Settings Hooks — .claude/settings.json
86- [hook name / tool target] — **[Classification]** — [reason]. [One-line recommendation.]
87
88### Summary
89- Complementary: [count]
90- Potentially Interfering: [count]
91- Conflicting: [count]
92```
93
94If no artifacts are found, say so. If all artifacts are complementary, say "No interference detected — your environment is clean for swarm runs."