Development Setup¶
Prerequisites¶
- bash 4.0+
- python3
- git
- ShellCheck (for linting)
Clone the repo¶
Repository structure¶
adversarial-reviewing/
.claude-plugin/ # Marketplace metadata
.cursor/rules/ # Cursor IDE rules
.github/workflows/ # CI (test.yml)
adversarial-review/ # Plugin package
.claude-plugin/
plugin.json # Plugin manifest
commands/
adversarial-reviewing.md # Command definition
skills/adversarial-reviewing/
SKILL.md # Main orchestration procedure
profiles/ # Code and strategy profiles
phases/ # Phase procedures
protocols/ # Operational protocols
scripts/ # Validation and utility scripts
tests/ # Test suite
references/ # Knowledge base modules
templates/ # Output templates (legacy)
docs/ # Documentation and specs
AGENTS.md # Universal agent prompts
README.md
Makefile
Running tests¶
The test suite covers:
- Output validation (structure, injection detection)
- Triage validation
- Convergence detection
- Budget tracking
- Deduplication
- Reference module discovery
- Cache management
- Context fetching
- Diff and impact graph
- Comment parsing
- Guardrail enforcement
- Single-agent pipeline integration
Linting¶
ShellCheck runs in CI. To run locally:
Suppressed checks: SC2329, SC2317 (unreachable code in test functions), SC1091 (source paths).
CI pipeline¶
The .github/workflows/test.yml workflow:
- Test job: Runs
tests/run-all-tests.sh, asserts 0 failures - ShellCheck job: Lints all bash scripts
Local testing with Claude Code¶
To test changes locally before pushing:
-
Build and install the plugin from your working copy:
-
Start a new Claude Code session
- Run
/adversarial-reviewingagainst test code
Writing tests¶
Test scripts follow the pattern:
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/../scripts/some-script.sh"
test_some_behavior() {
local result
result=$(some_function "input")
[[ "$result" == "expected" ]] || { echo "FAIL: test_some_behavior"; return 1; }
echo "PASS: test_some_behavior"
}
test_some_behavior
Add new test files to tests/ and they'll be picked up by run-all-tests.sh automatically.