# audit-context

Adopt this skill: https://proskills.md/skills/other/dheerg-swarms-skills-audit-context

Page: https://proskills.md/skills/other/dheerg-swarms-skills-audit-context
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/audit-context/SKILL.md
size: 5633
upstream: https://github.com/dheerg/swarms/blob/main/skills/audit-context/SKILL.md

````text
---
name: audit-context
user-invocable: true
description: |
  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.
keywords: audit, context, interference, CLAUDE.md, memory, skills, hooks, compatibility
---

# 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

1. **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.
2. **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.
3. **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`, `define-rubric`, `resolve-dispute`, `writing-style`, `reflect-outcome`, `independent-review-loop`, `code-mode`, `triage-mode`, `writing-mode`, `general-mode`, `workflow-rules`, `audit-context`.
4. **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 (the Agent tool, SendMessage, or CronCreate).

## 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 | "Don't spawn agents", "Never spawn subagents" | Conflicting | Create the team per Step 8a |
| 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 the Agent tool or SendMessage | Conflicting | Team creation and communication require these tools |

## 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."
````

## File: README.md
upstream: https://github.com/dheerg/swarms/blob/main/README.md

````text
# Swarm

**Describe what you want. Get a reviewed, ship-ready PR — without babysitting the agent.**

Out-of-the-box agent teams can be excellent, but getting there takes time and effort — the right specialists, each with a point of view, and a bias applied where it sharpens the team and held back where it would box the agents in. Swarm puts in that effort for you, so the team converges instead of chattering and the work holds up.

```
/swarm:code add SSO so enterprise customers can log in with their own identity provider
```

Swarm assembles a team of five to eight for the task: experienced engineers, plus the customer and business voices a lone coder usually works without. They research the problem, debate the approach, build it, and review each other's work until it's ready, then hand you a PR. You approve the plan and the approach, then stay out of the build. You have the final say before anything ships.

*Swarm also runs triage, writing, and general-purpose teams — see [other ways to launch](#commands).*

---

## What you get

- **Ships code that holds up** — reviewed by a different agent, not rubber-stamped by its author.
- **Runs unattended for hours — even across days.**
- **Survives interrupted turns without stalling.**
- **Avoids the rate-limit errors parallel teams hit — at a fraction of the tokens.**

---

## Quick start

Swarm is a [Claude Code](https://code.claude.com) plugin, so you'll need the CLI installed first (v2.1.178 or newer).

```bash
claude plugin marketplace add DheerG/swarms
claude plugin install swarm@swarms --scope project
```

Agent teams must be enabled in Claude Code. Add this to `~/.claude/settings.json` (or let `/swarm:code` enable it for you on first run):

```json
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}
```

Restart Claude Code so the plugin and the flag take effect, then run `/swarm:code` and describe what you want.

---

## How it works

Three moments need you. The rest runs itself.

1. **Tell it what you want** — 1-2 sentences describing the outcome. It has the ability to refine the outcome with you and work around prompting gotchas that would normally result in poor code.
2. **Approve the team and the plan** — the suggested specialists (swap or add members by pointing at them), the plan, and, mid-run, the approach the team converged on. Nothing irreversible happens without your sign-off.
3. **Decide how to finish** — when the team hits the bar, you choose to refine further or ship; you see the result, not the debate, though you can follow it live in [AgentChat](https://github.com/DheerG/agent-chat) if you want to.

You see the whole plan before a single agent runs:

> **Team Plan**
>
> **Mode:** Code
> **Outcomes:** (your words, verbatim)
> **Team:** lead (your Claude session) + Principal Engineer facilitator + specialists for the work
> **Cost tier:** Ultra
> **Ship definition:** Create a feature branch from main, commit, push, open PR
>
> ---
> **Is this plan final, or do you have remaining inputs?**
>
> - Launch the team — *Plan is final — start creating the team now*
> - I have changes — *Let me adjust outcomes, members, or settings first*

Nothing runs until you pick "Launch the team" — and before this plan you've already picked the cost tier and approved the team member by member.

---

## A real Converge, in excerpt

Here is an excerpt from a real caching-strategy Converge:

> **Principal Engineer:** Two approaches on the table — cache-aside with a TTL, or read-through with invalidation on write. Security Reviewer, you flagged the TTL approach earlier. What's the actual risk you see?
>
> **Security Reviewer:** TTL means stale data can persist for up to N minutes after a permission change. If this endpoint returns authorization state, that's a window.
>
> **Principal Engineer:** Lead, does this endpoint return authorization state, or pure profile data?
>
> **Lead:** Profile data only — no permissions in the response.
>
> **Principal Engineer:** Then TTL risk is acceptable here. Team, any other concerns before I call CONVERGED?

Notice that the facilitator never settles the question itself. It hands the blocker to whoever can answer it and waits for evidence, and the lead fields that question like any other member. The security risk only surfaced because someone other than the implementer was looking. On their own, they'd have shipped the stale-data window. What reaches you is the conclusion; the argument stays inside the team.

---

## Why it works

### Outcomes over implementations

You describe what the world looks like when the work is done, rather than the steps to build it. That changes what the team debates.

- **Implementation framing:** "Add a Redis cache in front of the user service."
- **Outcome framing:** "User profile reads return in under 50ms and don't hit the DB when cached."

Implementation framing has the team comparing Redis and Memcached. Outcome framing has them weigh caching against query optimization, the wider and more useful argument.

### Everything is a prompt

Most agent frameworks bury what's actually running behind config and abstraction, so changing how the agents behave means digging through someone else's machinery. Swarm keeps the whole coordination system, from pre-flight through delivery, in readable markdown you can open:

```markdown
# /swarm:launch

You are launching an agent team using the Swarm plugin. Follow every step below in exact order...
```

No imports, no build step. To change how a team works, you edit the prompt. Read it all: the launch flow in [commands/launch.md](commands/launch.md), the governance rules in [skills/workflow-rules/SKILL.md](skills/workflow-rules/SKILL.md).

### Recursive review until it's ready

Picture how a high-value change lands at a real company. A group of senior engineers picks it apart over weeks, not satisfied until it has clearly solved the problem, its blast radius is understood, and every edge case has been either fixed or deliberately accepted. Each concern is another round of back-and-forth, which is why a PR like that can sit in review for a month or two before anyone trusts it to merge.

Swarm runs that same gauntlet in a single session. The gate is explicit:

> 9/10+ means: logic is correct, tests pass where applicable, no regressions introduced, no known defects left unaddressed, reviewers would ship this.

A build often starts around 6/10. The team grinds it up, fixing and re-reviewing, and once it clears the bar an optional ladder (9.25 → 9.5 → 9.75 → 10) pushes it to the full scope of your outcome, re-earning any rung a later fix knocks loose. That is routinely 15+ rounds you never have to sit through. The mechanic that keeps it honest: the facilitator, not the lead, controls the gate. The agent that did the work never signs off on it; that call goes to a reviewer coming at it fresh, who has every reason to push back.

Before delivery you can add an independent pass: a reviewer that fails differently from the authors, a different model via Codex or a fresh-context agent, reads the whole change against your outcome. The lead fixes what it finds and the loop repeats until nothing in scope remains, often eight or more rounds on a large PR. What you get back is a PR that carries the kind of scrutiny a strong team would normally spend months assembling.

### Built to run anyway

Long agent-team runs hit a wall that has nothing to do with the work: rate limits. Run the members in parallel and they hammer the API hard enough to trip those limits, and the whole run can stall out partway through, often without a word. Swarm avoids that by spawning members one at a time, which keeps it under the limits and, as a side effect, costs a fraction of a parallel team's tokens. A heartbeat keeps the lead moving, and if a turn gets cut off, the team re-checks its last action and picks up where it left off.

### Portable quality across environments

Every rule that governs a team is inline in the command file,
````
