Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"name": "paacm",
"description": "PAACM: the Verified Single-Writer Loop for agentic coding. One writer agent, read-only explorer and reviewer subagents, tests protected after approval, and completion gated on executed checks.",
"version": "3.2.0",
"version": "3.3.0",
"source": "./plugins/paacm"
}
]
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"name": "paacm",
"description": "PAACM: the Verified Single-Writer Loop for agentic coding. One writer agent, read-only explorer and reviewer subagents, tests protected after approval, and completion gated on executed checks.",
"version": "3.2.0",
"version": "3.3.0",
"source": "plugins/paacm"
}
]
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 3.3.0 — Error-handling review and companion plugins

- **Error-handling reviewer.** `paacm-silent-failure-hunter`, adapted from Anthropic's `silent-failure-hunter` (Apache License 2.0), reviews the same `review-input.md` as the reviewer when a diff changes error handling, and reports only failures the changed code can hide: swallowed errors, overly broad catches, unrequested fallbacks, retries that give up silently ([ADR 0019](docs/method/adr/0019-error-handling-review-and-companion-plugins.md)).
- **Security scan for high-stakes work.** When Anthropic's `claude-security` plugin is installed, verification of high-stakes work runs its scan of the changes at high effort.
- **Companion plugins.** The setup guide explains `claude-security` and `security-guidance`, including what `security-guidance` installs at runtime and which of its reviews duplicate PAACM's.
- **Research addendum.** An assessment of Anthropic's official plugins in [07-claude-code-and-cursor.md](docs/research/07-claude-code-and-cursor.md).

## 3.2.0 — Code intelligence and test strength

- **Reasoning effort by role.** The reviewer runs at `high` effort and the implementer at `medium`, as [ADR 0010](docs/method/adr/0010-model-allocation.md) prescribes; Cursor ignores the field.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The [user guide](docs/guide/README.md) covers setup, writing requests, supportin

## Status and limits

PAACM 3.2.0 is a complete implementation of the specification for Claude Code and Cursor, including project extensions for adapting it to a repository's own conventions ([guide](docs/guide/extending.md)). Markdown instructions are guidance; the enforcement comes from the hooks, the IDE's permissions and its sandbox. Use the power layer or a plugin when enforcement matters. The method's evidence comes from published studies and vendor guidance, not from your code: [evaluate it](docs/guide/evaluation.md) on tasks from your own history before relying on a claim that it helps.
PAACM 3.3.0 is a complete implementation of the specification for Claude Code and Cursor, including project extensions for adapting it to a repository's own conventions ([guide](docs/guide/extending.md)). Markdown instructions are guidance; the enforcement comes from the hooks, the IDE's permissions and its sandbox. Use the power layer or a plugin when enforcement matters. The method's evidence comes from published studies and vendor guidance, not from your code: [evaluate it](docs/guide/evaluation.md) on tasks from your own history before relying on a claim that it helps.

Upgrading from PAACM 2.0.0: see [upgrading-from-2.md](docs/guide/upgrading-from-2.md).

Expand Down
13 changes: 13 additions & 0 deletions docs/guide/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ With a language server connected, Claude Code sees the type errors and missing i

The plugins work in terminal sessions; cloud sessions do not start language servers. A language server can disagree with the project's own type checker, and the gate's checks stay the authority. In Cursor, the agent reads the editor's diagnostics for open files ([Cursor forum](https://forum.cursor.com/t/does-agents-iterate-on-lint-errors-work-with-custom-third-party-lsp-servers-or-only-built-in-linters/168705)).

## Companion plugins (optional)

Two plugins from Anthropic's official marketplace work alongside PAACM in Claude Code. The kit does not install either ([ADR 0019](../method/adr/0019-error-handling-review-and-companion-plugins.md)).

**`claude-security`: a security scan for high-stakes work.** A team of agents maps the code, hunts for vulnerabilities and tries to disprove each finding before it reaches the report, which it writes with a SARIF log to a git-ignored `CLAUDE-SECURITY-*` folder ([README](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/claude-security)). When it is installed, PAACM runs a scan of the changes at high effort during verification of high-stakes work, and you confirm the scan's time and cost. It is also worth a whole-repository scan before a release. Install it with `/plugin install claude-security@claude-plugins-official`. It adds small hooks after shell commands, for usage metrics and tips.

**`security-guidance`: security warnings while editing.** It warns on about 25 dangerous patterns when a file is edited, reviews the diff with a model when a turn ends, and reviews each commit with an agent that follows data flow across files ([README](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/security-guidance)). Before you enable it, know what it adds:

- Your linters may already cover the pattern warnings, and PAACM's post-edit hook runs them on every edit (for example Ruff's `S` rules for Python and Biome's security rules for TypeScript).
- When the Claude Agent SDK is missing, its session-start hook installs the SDK into a virtual environment under `~/.claude/security/` from the package index, whatever review switches you set.
- Its reviews send the diff, and for commit reviews the files the reviewer reads, to your model endpoint. They cost model calls on every turn and commit.
- Its turn-end review runs beside PAACM's stop gate and reviewer. To keep one review per turn, set `ENABLE_STOP_REVIEW` to `0` in the `env` of `.claude/settings.json` and keep the commit review.

## Check the installation

```bash
Expand Down
7 changes: 5 additions & 2 deletions docs/method/ALGORITHM.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ PAACM turns a development request into an accepted change with the least human a
| **Explorer** | Subagent `paacm-explorer` | A fast, inexpensive model | None (read-only) | Fresh. Returns `path:line` pointers, short quoted snippets and a summary of at most about 2,000 tokens |
| **Implementer** (optional) | Subagent `paacm-implementer` | An inexpensive model; medium reasoning effort | The files named in its brief, in its own worktree when running in parallel | Fresh. Receives a written brief (section 9) |
| **Reviewer** | Subagent `paacm-reviewer` | A strong model; high reasoning effort | None (read-only) | Fresh. Sees only the diff, the specification and the executed evidence |
| **Error-handling reviewer** (when the diff changes error handling) | Subagent `paacm-silent-failure-hunter` | A strong model; high reasoning effort | None (read-only) | Fresh. Same input as the reviewer; reports only failures the changed code can hide |
| **Gate** | Hook scripts and the check runner (`paacm check`) | None (deterministic) | None | Not applicable |

The **human** approves specifications, plans and consequential tests, answers escalations, and merges. The writer MUST NOT merge its own change into a protected branch.
Expand Down Expand Up @@ -208,7 +209,8 @@ Each phase lists its entry condition, the steps, the artifact it produces and it
4. **High-stakes escalations:**
- Run held-out acceptance tests kept outside the writer's workspace, in CI.
- Optionally, run best-of-N: two to four worktree-isolated attempts, filtered by the regression and acceptance tests, then selected by the reviewer. The selector MUST be independent of the tests the writer saw.
5. A project MAY configure a mutation check in the `full` tier. When it fails, the writer MUST NOT edit the frozen tests; it reports the surviving mutants and stops with `BLOCKED:` (trigger 4) for the human to decide on more tests.
5. When the `claude-security` plugin is installed, high-stakes work also runs its scan of the changes at high effort; confirmed findings are fixed within the plan or end in `BLOCKED:`.
6. A project MAY configure a mutation check in the `full` tier. When it fails, the writer MUST NOT edit the frozen tests; it reports the surviving mutants and stops with `BLOCKED:` (trigger 4) for the human to decide on more tests.
- **Exit:** the gate is green and the diff audit is clean.
- **Rule:** after **three consecutive gate failures on the same check** (the retry cap), the writer MUST stop and escalate (trigger 5) instead of trying again.

Expand All @@ -217,7 +219,7 @@ Each phase lists its entry condition, the steps, the artifact it produces and it
- **Entry:** STANDARD and DEEP, after phase 7 is green.
- **Steps:**
1. Delegate to the reviewer with the diff, `SPEC.md` (or the triage line) and the gate output, and nothing else. The reviewer ignores the prose of commit messages and pull request descriptions.
2. The reviewer reports only **correctness, requirement and scope** findings, each with file and line evidence and a severity. It does not suggest refactors or style changes.
2. The reviewer reports only **correctness, requirement and scope** findings, each with file and line evidence and a severity. It does not suggest refactors or style changes. When the diff adds or changes error handling, the error-handling reviewer reviews the same input and reports only failures the changed code can hide, such as swallowed errors, overly broad catches and unrequested fallbacks.
3. The writer fixes every correctness finding (returning to phase 6), or explains why a finding is wrong.
- **Exit:** no unresolved correctness findings.

Expand Down Expand Up @@ -346,6 +348,7 @@ A criterion is `passed` only with evidence produced by the harness in this sessi
| Shell guard | `PreToolUse` hook, matcher `Bash` | `beforeShellExecution` hook, `failClosed: true` |
| Post-edit checks | `PostToolUse` hook, matcher `Edit\|Write` | `postToolUse` hook, matcher `Write` |
| Stop gate | `Stop` hook returning `decision: "block"` while checks fail | `stop` hook returning `followup_message` while checks fail, bounded by `loop_limit` |
| Security scan (high-stakes) | The `claude-security` plugin, when installed | Not available (a Claude Code plugin) |
| Code intelligence | Official code-intelligence plugins (`pyright-lsp`, `typescript-lsp`, …): diagnostics after edits and the read-only `LSP` tool for the explorer and reviewer | The editor's language servers: the agent reads diagnostics for open files |
| Autonomy levels | Permission modes, `permissions` rules and the sandbox in `.claude/settings.json` | Run modes, `.cursor/permissions.json` and `.cursor/sandbox.json` |
| Distribution | Plugin marketplace (`.claude-plugin/marketplace.json`) or project install | Plugin (`.cursor-plugin/`) or project install |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 0019. An error-handling reviewer and optional companion plugins

- **Status:** accepted
- **Date:** 2026-10-17

## Context

The reviewer's scope (correctness, requirements, scope) covers a bug that the tests reveal, but an error that the code swallows produces no failing test and no wrong output until production. Anthropic's official plugin marketplace has reviewers and security tools that the study of 14 October did not assess.

## Decision

- The kit ships `paacm-silent-failure-hunter`, adapted from Anthropic's `silent-failure-hunter` (Apache License 2.0): read-only, fed the same `review-input.md` as the reviewer, run in phase 8 when the diff changes error handling, and limited to failures the changed code can actually hide.
- High-stakes verification runs the `claude-security` plugin's scan of the changes when the plugin is installed. The kit does not ship it.
- The setup guide describes `security-guidance` as an optional companion, with its costs. The kit neither ships nor enables it.

## Evidence

- The reviewer agents in `pr-review-toolkit`, including `silent-failure-hunter`, are licensed under Apache License 2.0, the kit's own licence; the original prompt names one company's internal logging functions and asks for every instance "no matter how minor", so it is adapted rather than copied ([pr-review-toolkit](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/pr-review-toolkit)) [V].
- `claude-security` verifies each finding with independent agents before reporting it, and writes a report and a SARIF log; it is proprietary ("All rights reserved") and adds small Bash hooks for metrics and tips ([claude-security](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/claude-security)) [V].
- `security-guidance` adds pattern warnings on edits, an LLM review of the diff when a turn ends and an agentic review on each commit. Its session-start hook installs the Claude Agent SDK into a virtual environment under `~/.claude/security/` from the package index when the SDK is missing, whatever review switches are set, and its reviews send the diff to the model endpoint ([security-guidance](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/security-guidance)) [V].

## Consequences

Swallowed errors become review findings. High-stakes changes get an independent security scan where the plugin is available. Teams that want `security-guidance` know what it installs and duplicates: a project's linters often cover its pattern layer (for example Ruff's `S` rules and Biome's security rules), and its turn-end review runs beside PAACM's stop gate.

## Alternatives considered

Shipping the whole `pr-review-toolkit` (rejected: its test, comment and simplification agents overlap the reviewer and the phase rules), enabling `security-guidance` by default (rejected: a runtime install and a second review on every turn), and vendoring `claude-security` (not permitted by its licence).
1 change: 1 addition & 0 deletions docs/method/adr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Each record states one design decision of PAACM 3.0, the evidence behind it, and
| [0016](0016-project-extensions.md) | Projects extend the method per phase, never by removing a gate |
| [0017](0017-code-intelligence.md) | Code intelligence through language servers |
| [0018](0018-test-strength.md) | Test strength: property-based tests and an optional mutation check |
| [0019](0019-error-handling-review-and-companion-plugins.md) | An error-handling reviewer and optional companion plugins |
8 changes: 8 additions & 0 deletions docs/project/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,11 @@ Evidence (`npm test`, 88 tests):
- `test/tools.test.mjs`: `doctor` finds the official code-intelligence plugins a project enables and reports whether each language server is installed.
- `node bin/paacm.mjs validate`: the subagents' new `effort` fields are supported subagent fields; `build --check`: the plugin copies for both IDEs match the source.
- `test/docs.test.mjs`: every new link and anchor resolves.

## Release 3.3.0

Release 3.3.0 adds an error-handling reviewer and uses Anthropic's official security tools where they fit (R3, R4, R9). `paacm-silent-failure-hunter` reviews diffs that change error handling, high-stakes verification runs the `claude-security` scan when that plugin is installed, and the setup guide explains `security-guidance` and its costs ([ADR 0019](../method/adr/0019-error-handling-review-and-companion-plugins.md)).

Evidence (`npm test`, 89 tests):

- `test/content.test.mjs`: the new reviewer is read-only, carries its licence notice, and both review paths (phase 8 and the `paacm-review` skill) run it on error-handling changes; the plugin ships four valid agents.
12 changes: 12 additions & 0 deletions docs/research/07-claude-code-and-cursor.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,15 @@ Since neither tool's checkpoints capture everything, the method treats **git com
## Added on 17 October 2026: code intelligence

Claude Code connects language servers through code-intelligence plugins. Anthropic's official marketplace has one per language (`pyright-lsp` for Python, `typescript-lsp` for TypeScript and JavaScript, and others for C/C++, C#, Go, Java, Kotlin, Lua, PHP, Ruby, Rust and Swift). A plugin names the server command and the file extensions; the developer installs the binary. With a server running, Claude gets the errors and warnings an edit introduced right after the edit, and a read-only `LSP` tool for definitions, references, implementations, call hierarchies and workspace symbols. The tool needs no permission, stays inactive until a plugin is installed, and is not available in cloud sessions ([code intelligence plugins](https://code.claude.com/docs/en/plugins/code-intelligence); [tools reference](https://code.claude.com/docs/en/tools-reference#lsp-tool-behavior)) [V]. In Cursor, the agent reads the editor's diagnostics for open files from the same store as the Problems panel; according to Cursor staff, the Agents window, the CLI and cloud agents do not run that loop ([Cursor forum](https://forum.cursor.com/t/does-agents-iterate-on-lint-errors-work-with-custom-third-party-lsp-servers-or-only-built-in-linters/168705)) [A].

## Added on 17 October 2026: Anthropic's official plugins

Anthropic's official marketplace (`claude-plugins-official`, read at commit `ea10b21`) has plugins the study did not assess. The ones that touch this method ([marketplace](https://github.com/anthropics/claude-plugins-official/tree/main/plugins)) [V]:

| Plugin | What it does | Verdict for PAACM |
|---|---|---|
| `pr-review-toolkit` | Six review agents: code, comments, tests, silent failures, type design, simplification. Apache License 2.0 | Adapt `silent-failure-hunter` as a read-only reviewer for error handling; the others overlap the reviewer and the phase rules |
| `claude-security` | A multi-agent vulnerability scan whose findings must survive independent verification; report plus SARIF; patch suggestions. Proprietary | Use when installed, for high-stakes work and releases |
| `security-guidance` | Edit-time pattern warnings, a turn-end diff review and a per-commit agentic review. Its session-start hook installs the Claude Agent SDK from the package index when it is missing | Optional companion; project linters often cover the patterns, and the turn-end review duplicates PAACM's |
| `frontend-design` | Pushes distinctive, bold visual design for frontend work | Not adopted: it conflicts with a project's own design system |
| `claude-md-management` | Audits `CLAUDE.md` and writes session learnings into it | Not adopted: model-written instruction files lowered success in the study's evidence, so always-on instructions stay human-written ([ADR 0004](../method/adr/0004-minimal-instructions.md)) |
2 changes: 1 addition & 1 deletion docs/research/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is the research PAACM is built on. It surveys the approaches, architectures, methods, libraries and tools for agentic coding that existed in October 2026, compares them on evidence, and derives the single method that [the PAACM algorithm](../method/ALGORITHM.md) specifies.

**Research date:** 14 October 2026. **Tool versions covered:** Claude Code 2.1.299, Cursor 3.24. **Sources:** public material only, about 210 distinct URLs. **Addendum, 17 October 2026:** test strength (mutation and property-based tests) in [04-verification.md](04-verification.md#added-on-17-october-2026-how-strong-are-the-frozen-tests) and code intelligence in [07-claude-code-and-cursor.md](07-claude-code-and-cursor.md#added-on-17-october-2026-code-intelligence).
**Research date:** 14 October 2026. **Tool versions covered:** Claude Code 2.1.299, Cursor 3.24. **Sources:** public material only, about 210 distinct URLs. **Addendum, 17 October 2026:** test strength (mutation and property-based tests) in [04-verification.md](04-verification.md#added-on-17-october-2026-how-strong-are-the-frozen-tests) and code intelligence and Anthropic's official plugins in [07-claude-code-and-cursor.md](07-claude-code-and-cursor.md#added-on-17-october-2026-code-intelligence).

## Summary

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paacm",
"version": "3.2.0",
"version": "3.3.0",
"description": "PAACM: the Verified Single-Writer Loop for agentic coding in Claude Code and Cursor. Installer, check runner, hooks and evaluation harness.",
"type": "module",
"license": "Apache-2.0",
Expand Down
Loading
Loading