Skip to content

Commit 354be67

Browse files
authored
Merge pull request #9 from SharedIntellect/feature/tester-critic
v0.6.0: Tester Critic (6/9) + Shipping Process Infrastructure What shipped Tester Critic (Milestone #10) — Critic 6 of 9 • L1 deterministic verification: loci existence, line number range, excerpt matching, file path validation • L2 LLM claim verification: evaluates whether findings are substantiated by cited evidence • 805 lines code, 994 lines tests, 76/76 passing Shipping Process Infrastructure — prevents the doc staleness that triggered this work • critic-status.yaml: single source of truth for critic/feature status (replaces hardcoded counts across 10+ files) • tools/validate-docs.py: automated doc validation against the manifest (CI-enforced) • SHIPPING.md: shipping checklist for humans and agents • CLAUDE.md: agent instructions with mandatory shipping process • .github/workflows/validate-docs.yml: CI gate — runs on every PR to main Documentation sweep — 11 files updated from stale "4 critics" / "5 critics" to accurate "6 critics" with Cross-Consistency noted as requiring --relationships flag. Quorum self-validation results validate-docs.py was validated by Quorum at standard depth across two runs: Run 1 (pre-fix): REVISE — 5 HIGH, 4 MEDIUM, 1 LOW. All 5 HIGHs were legitimate code quality issues: broad exception handling, unvalidated YAML input, missing type annotations, no file size guards. All addressed in commit 2ad0df0. Run 2 (post-fix): REVISE — 3 HIGH, 6 MEDIUM, 2 LOW. These are SEC-07 convergence findings — new issues generated by the fixes themselves: | # | Severity | Finding | Disposition | | --- | -------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | 1 | HIGH | read_file_lines() returns None without None checks at call sites | False positive. validate_docs() explicitly checks if lines is None: continue on line 218. | | 2 | HIGH | load_manifest() calls sys.exit(2) violating return type contract | By design. CLI utility, not a library. sys.exit() in validation helpers is standard Python CLI pattern. | | 3 | HIGH | read_file_lines() return behavior inconsistent with docstring | Docstring says "returns None on failure." Returning None on oversized files IS the documented failure path. | | 4 | MEDIUM | sys.exit() prevents testability | Accepted for a CLI script. Would refactor if this became a library. | | 5 | MEDIUM | main() mixes concerns | Addressed in run 1 (extracted 3 helpers). Remaining main() is ~30 lines of orchestration. | | 6 | MEDIUM | Hardcoded yaml dependency | Not actionable — yaml IS the dependency. | | 7 | MEDIUM | YAML not validated before field access | False positive. load_manifest() validates structure — this was the H3 fix from run 1. | | 8-9 | MEDIUM | Error messages expose file paths | Local developer tool. Paths in errors are diagnostic, not a security exposure. | | 10 | LOW | MAX_FILE_SIZE_BYTES is a magic number | False positive. It IS a named constant with a docstring. | | 11 | LOW | TOCTOU race on file size check | Theoretical — local markdown files in a git repo, not untrusted concurrent input. | This is the SEC-07 self-validation convergence pattern documented in docs/SEC07_SELF_VALIDATION_CONVERGENCE.md: each fix round changes code, giving the critic fresh context to generate new findings about the fixes. Run 1 findings were genuine; run 2 findings are the critic being conservative about a 250-line CLI utility. Tests pass (76/76). Merging per SEC-07 interim policy: advisory-only self-validation, CRITICAL-only blocking.
2 parents fcb2594 + 2ad0df0 commit 354be67

20 files changed

Lines changed: 1120 additions & 27 deletions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Validate Documentation
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
validate-docs:
11+
name: Check docs match critic-status.yaml
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
21+
- name: Install PyYAML
22+
run: pip install pyyaml
23+
24+
- name: Run doc validation
25+
run: python tools/validate-docs.py

CLAUDE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# CLAUDE.md — Agent Instructions for Quorum
2+
3+
This file provides context for Claude Code and other AI agents working on this repository.
4+
5+
## Project Overview
6+
7+
Quorum is a multi-critic quality assurance framework. The reference implementation lives in `reference-implementation/` and is published on PyPI as `quorum-validator`.
8+
9+
## Current State
10+
11+
- **6 of 9 critics shipped**: Correctness, Completeness, Security, Code Hygiene, Cross-Consistency (`--relationships` flag required), Tester (L1 + L2)
12+
- **3 planned**: Architecture, Delegation, Style
13+
- **Version**: See `critic-status.yaml` for the canonical version and critic status
14+
- **Tests**: `cd reference-implementation && pytest tests/ -v` (exclude `test_e2e_smoke.py` and `test_performance.py` for offline runs)
15+
16+
## Shipping Checklist — MANDATORY
17+
18+
**When shipping any feature or critic to main, follow `SHIPPING.md` in the repo root.**
19+
20+
Key steps:
21+
1. Update `critic-status.yaml` (the single source of truth for critic/feature status)
22+
2. Bump version in `critic-status.yaml` AND `reference-implementation/pyproject.toml`
23+
3. Run `python tools/validate-docs.py` — fix all findings before merging
24+
4. Run `tools/boundary-scan.sh` (located in the workspace, not this repo) — ensure no private paths leak
25+
5. Update `docs/CHANGELOG.md` with a full release entry
26+
6. All doc files that reference critic counts or status markers must match the manifest
27+
28+
**Why this matters:** We've shipped features with 10+ doc files still claiming old critic counts. The manifest + validation script + CI gate exists to prevent that. Don't skip it.
29+
30+
## Key Files
31+
32+
| File | Purpose |
33+
|------|---------|
34+
| `critic-status.yaml` | Single source of truth for shipped critics and features |
35+
| `SHIPPING.md` | Full shipping checklist |
36+
| `tools/validate-docs.py` | Automated doc validation (reads manifest, flags stale references) |
37+
| `SPEC.md` | Framework specification |
38+
| `reference-implementation/` | Python CLI implementation |
39+
| `docs/CHANGELOG.md` | Release history |
40+
41+
## Conventions
42+
43+
- **Evidence grounding**: Every critic finding must cite specific locus (file, line, excerpt). No hand-waving.
44+
- **Test coverage**: New critics need both unit tests and integration tests. Target: 20+ tests per critic.
45+
- **Status markers**: Use ✅ Shipped or 🔜 Planned in docs. Update `critic-status.yaml` first, then docs.
46+
- **Boundary scan**: No private file paths, internal names, or credentials in public files. `quorum-runs/` is gitignored.

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ Not every artifact needs the full treatment. Tell me how much is riding on it, a
109109
| Depth | Critics | Time | Cost* | When to use it |
110110
|-------|---------|------|-------|----------------|
111111
| **Quick** | 2 (correctness, completeness) | 5-10 min | ~$0.15 | "Give me a sanity check before I keep going" |
112-
| **Standard** | 4 (+ security, code_hygiene) | 15-30 min | ~$0.50 | Most work — solid coverage without the wait |
113-
| **Thorough** | 4 now; more when they ship | 30-60 min | ~$1.50+ | "This is going to production. It cannot be wrong." |
112+
| **Standard** | 6 (+ security, code_hygiene, cross_consistency†, tester) | 15-30 min | ~$0.50 | Most work — solid coverage without the wait |
113+
| **Thorough** | 6 shipped; more when they ship | 30-60 min | ~$1.50+ | "This is going to production. It cannot be wrong." |
114114

115-
*Estimates on Claude Sonnet. Scales with model and artifact size. Pre-screen (10 deterministic checks + DevSkim + Ruff + Bandit + PSScriptAnalyzer) runs before LLM critics at every depth level — no extra cost. Today I ship with 4 critics (Correctness, Completeness, Security, Code Hygiene) + re-validation loops + learning memory. Architecture, Delegation, and Tester are coming — the full architecture supports all 9 (see [SPEC.md](SPEC.md)).
115+
*†Cross-Consistency requires `--relationships` flag with a relationships manifest.*
116+
117+
*Estimates on Claude Sonnet. Scales with model and artifact size. Pre-screen (10 deterministic checks + DevSkim + Ruff + Bandit + PSScriptAnalyzer) runs before LLM critics at every depth level — no extra cost. Today I ship with 6 critics (Correctness, Completeness, Security, Code Hygiene, Cross-Consistency†, and Tester) + re-validation loops + learning memory. The full architecture supports all 9 — Architecture, Delegation, and Style are next (see [SPEC.md](SPEC.md)).*
116118

117119
---
118120

@@ -137,8 +139,11 @@ Not every artifact needs the full treatment. Tell me how much is riding on it, a
137139
│ ┌──────────┐ ┌──────────┐ │
138140
│ │ Security │ │CodeHygine│ ← shipped │
139141
│ └──────────┘ └──────────┘ │
142+
│ ┌──────────┐ ┌──────────┐ │
143+
│ │CrossConsist│ │ Tester │ ← shipped │
144+
│ └──────────┘ └──────────┘ (†Cross-Consistency requires --relationships)
140145
│ ┌──────┐ ┌──────┐ ┌────────┐ │
141-
│ │ Arch │ │Deleg │ │ Tester │ ← roadmap│
146+
│ │ Arch │ │Deleg │ │ Style │ ← roadmap│
142147
│ └──────┘ └──────┘ └────────┘ │
143148
└──────────────┬───────────────────────────┘
144149
│ Phase 1.5: (if max_fix_loops > 0)
@@ -189,9 +194,9 @@ I auto-detect your model on first run and configure myself accordingly. Details:
189194

190195
I'm working. I'm real. I'm also still growing.
191196

192-
**What I can do today** (v0.5.3):
197+
**What I can do today** (v0.6.0):
193198
- Full CLI: `quorum run --target <file> [--depth] [--rubric] [--pattern] [--relationships] [--output-dir] [--verbose] [--fix-loops N] [--no-learning] [--max-cost USD] [--audit-report] [--resume <batch-dir>] [--yes]`
194-
- **4 critics** — Correctness, Completeness, Security (OWASP ASVS 5.0, CWE Top 25, NIST SA-11; see [SEC-02 workflow](docs/SEC02_BUSINESS_LOGIC_VALIDATION.md) for business logic validation guidance), Code Hygiene (ISO 25010:2023, CISQ) — all with evidence grounding
199+
- **6 critics** — Correctness, Completeness, Security (OWASP ASVS 5.0, CWE Top 25, NIST SA-11; see [SEC-02 workflow](docs/SEC02_BUSINESS_LOGIC_VALIDATION.md) for business logic validation guidance), Code Hygiene (ISO 25010:2023, CISQ), Cross-Consistency† (`--relationships`), and Tester (L1 deterministic + L2 LLM claim verification) — all with evidence grounding
195200
- **Parallel execution** — critics run concurrently (ThreadPoolExecutor, max 4); batch files run concurrently (max 3)
196201
- **Re-validation loops** — Fixer proposes text replacements for CRITICAL/HIGH findings → applies them → re-runs only the critics that flagged the originals → reports improved/unchanged/regressed. Up to 3 loops, stops early when findings clear. `--fix-loops N` or `--depth thorough` (default 1 loop)
197202
- **Learning memory** — tracks recurring failure patterns across runs in `known_issues.json`. High-frequency patterns auto-promote to mandatory checks injected into critic prompts. `quorum issues list|promote|reset` CLI. Disable with `--no-learning`
@@ -210,7 +215,7 @@ I'm working. I'm real. I'm also still growing.
210215

211216
**What's coming:**
212217
- Dynamic model pricing updates (`quorum costs update`)
213-
- More critics (Architecture, Delegation, Style, Tester)
218+
- More critics (Architecture, Delegation, Style)
214219
- Domain-specific rubric packs (compliance, security, infrastructure)
215220
- Confidence calibration against golden sets
216221
- Branch protection enforcement (require PR + passing validation to merge to main)

SHIPPING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Shipping Checklist
2+
3+
Follow this checklist before merging any feature PR to `main`. Both humans and agents (including Claude Code) must complete all steps.
4+
5+
---
6+
7+
## 1. Code Quality
8+
- [ ] All tests pass (`pytest`)
9+
- [ ] No regressions in existing functionality
10+
11+
## 2. Update Manifest
12+
- [ ] `critic-status.yaml` updated (add/change status for shipped feature)
13+
- [ ] Version string bumped in `critic-status.yaml`
14+
- [ ] Version string bumped in `reference-implementation/pyproject.toml`
15+
16+
## 3. Documentation Sweep
17+
Run `python tools/validate-docs.py` to find stale references, then fix:
18+
19+
- [ ] `CHANGELOG.md` — add entry for this release
20+
- [ ] `README.md` — "What I can do today" section accurate
21+
- [ ] `README.md` — critic count in depth table footnote
22+
- [ ] `README.md` — architecture diagram labels (shipped vs roadmap)
23+
- [ ] `README.md` — "What's coming" section (remove shipped items)
24+
- [ ] `SPEC.md` — status matrix / implementation checklist updated
25+
- [ ] `SPEC.md` — shipped critic counts in prose
26+
- [ ] `docs/FOR_BEGINNERS.md` — critic counts and cost estimates
27+
- [ ] `docs/CONFIG_REFERENCE.md` — critic status markers
28+
- [ ] `docs/TUTORIAL.md` — critic descriptions and status markers
29+
- [ ] `docs/IMPLEMENTATION.md` — critic status markers and depth profiles
30+
- [ ] `SKILL.md` — critic counts in depth descriptions
31+
32+
**⚠️ Note on Cross-Consistency:** Cross-Consistency is a shipped critic but requires the `--relationships` flag. When updating counts, use language like: "6 shipped critics (including Cross-Consistency, activated with `--relationships`)".
33+
34+
## 4. Validation
35+
- [ ] `python tools/validate-docs.py` passes (exit 0)
36+
- [ ] `tools/boundary-scan.sh` passes (exit 0)
37+
38+
## 5. Commit & Ship
39+
- [ ] Commit message includes: what shipped, critic N of 9, known limitations
40+
- [ ] Tag release if version bump warrants it
41+
42+
---
43+
44+
## Why This Exists
45+
46+
PR #8 (Tester critic) shipped with 10+ doc files still claiming "4 critics." The Cross-Consistency critic shipped at some point with zero doc updates. This checklist + `validate-docs.py` + CI enforcement exists to prevent that from happening again.

SKILL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ python -m quorum.cli run --target <path-to-artifact> --rubric <rubric-name>
3333
### Depth Profiles
3434

3535
- `quick` — 2 critics (correctness, completeness) + pre-screen, ~5-10 min
36-
- `standard` — 4 critics (+ security, code_hygiene) + pre-screen, ~15-30 min (default)
37-
- `thorough` — all 4 shipped critics + pre-screen, ~30-60 min
36+
- `standard` — 6 critics (+ security, code_hygiene, cross_consistency†, tester) + pre-screen, ~15-30 min (default)
37+
- `thorough` — all 6 shipped critics + pre-screen + fix loops, ~30-60 min
38+
39+
*†Cross-Consistency requires `--relationships` flag with a relationships manifest.*
3840

3941
All depth profiles include the deterministic pre-screen (10 checks: credentials, PII, syntax errors, broken links, TODOs, and more) before any LLM critic runs.
4042

SPEC.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## 1. Overview
1111

12-
Quorum is a quality assurance framework with a nine-agent target architecture. Currently, 5 critics are implemented (Correctness, Completeness, Security, Code Hygiene, and Cross-Artifact Consistency), with 4 additional critics planned. The framework is designed to rigorously evaluate multi-agent systems, configurations, research, code, and operational procedures against domain-specific rubrics. It combines:
12+
Quorum is a quality assurance framework with a nine-agent target architecture. Currently, 6 critics are implemented (Correctness, Completeness, Security, Code Hygiene, Cross-Artifact Consistency†, and Tester), with 3 additional critics planned. †Cross-Consistency is activated with the `--relationships` flag. The framework is designed to rigorously evaluate multi-agent systems, configurations, research, code, and operational procedures against domain-specific rubrics. It combines:
1313

1414
- **Parallel specialized critics** (9 agents with distinct expertise)
1515
- **Grounded evidence requirement** (every critique must cite tool-verified proof)
@@ -403,8 +403,7 @@ Status as of v0.5.0 (reference implementation):
403403
- [x] LLM provider — LiteLLM universal provider (100+ models, any tier combination)
404404
- [x] File-based artifact passing (no in-memory state between agents)
405405
- [x] Pre-screen layer — 10 built-in checks (PS-001–PS-010) + DevSkim SAST integration
406-
- [x] 4 critics implemented — Correctness, Completeness, Security, Code Hygiene
407-
- [x] Cross-Artifact Consistency critic (Phase 2, relationships manifest)
406+
- [x] 6 critics implemented — Correctness, Completeness, Security, Code Hygiene, Cross-Artifact Consistency† (`--relationships`), Tester (L1 + L2)
408407
- [x] Rubric system (JSON schema + validator, 3 built-in rubrics: research-synthesis, agent-config, python-code)
409408
- [x] Batch/multi-file validation with `BatchVerdict`
410409
- [x] Aggregator synthesis logic (conflict resolution)
@@ -416,7 +415,7 @@ Status as of v0.5.0 (reference implementation):
416415
- [x] Fixer agent — proposal mode + re-validation loops (Phase 1.5; proposes and applies text replacements for CRITICAL/HIGH, then re-runs critics to verify)
417416
- [x] Python code rubric (25 criteria, PC-001–PC-025, auto-detects on .py files)
418417
- [x] Learning memory system (known_issues.json frequency tracking + mandatory check promotion — shipped in v0.5.3)
419-
- [ ] Remaining 4 critics — Architecture, Delegation, Style, Tester
418+
- [ ] Remaining 3 critics — Architecture, Delegation, Style
420419
- [ ] Trust/monitoring system (per-critic accuracy tracking)
421420

422421
See IMPLEMENTATION.md for a reference walkthrough.
@@ -441,7 +440,7 @@ Quorum is built on these peer-reviewed papers:
441440

442441
### Current Limitations (v3.0)
443442

444-
- Only **5 of 9 critics are implemented** (Architecture, Delegation, Style, Tester are specified but not built)
443+
- Only **6 of 9 critics are implemented** (Architecture, Delegation, Style are specified but not built)
445444
- Rubric panel is **static** (doesn't specialize per artifact type dynamically)
446445
- **No critic-to-critic debate** (relies on Aggregator to resolve conflicts)
447446
- Learning is **frequency-based** only (no semantic deduplication of patterns yet)
@@ -450,7 +449,7 @@ Quorum is built on these peer-reviewed papers:
450449

451450
### Planned
452451

453-
- Remaining critics: Architecture, Delegation, Style, Tester
452+
- Remaining critics: Architecture, Delegation, Style
454453
- ~~Re-validation loops~~ → **Shipped in v0.5.3**
455454
- ~~Learning memory~~ → **Shipped in v0.5.3**
456455
- Dynamic critic specialization (spawn domain-specific critics on-demand)

critic-status.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# critic-status.yaml — Single source of truth for shipped features
2+
# Used by tools/validate-docs.py to detect stale documentation.
3+
# Update this file FIRST when shipping a critic or feature.
4+
5+
version: "0.6.0"
6+
7+
critics:
8+
correctness:
9+
status: shipped
10+
since: "0.3.0"
11+
description: "Factual accuracy, citation validity, logical consistency"
12+
completeness:
13+
status: shipped
14+
since: "0.3.0"
15+
description: "Coverage gaps, missing sections, rubric criterion coverage"
16+
security:
17+
status: shipped
18+
since: "0.4.0"
19+
description: "OWASP ASVS 5.0, CWE Top 25, NIST SA-11, business logic"
20+
code_hygiene:
21+
status: shipped
22+
since: "0.4.0"
23+
description: "ISO 25010:2023, CISQ quality measures, maintainability"
24+
cross_consistency:
25+
status: shipped
26+
since: "0.5.0"
27+
description: "Inter-file consistency via relationships manifest (requires --relationships flag)"
28+
note: "Activated with --relationships flag; not part of default depth panel"
29+
tester:
30+
status: shipped
31+
since: "0.6.0"
32+
description: "Finding verification — L1 deterministic + L2 LLM claim checking"
33+
architecture:
34+
status: planned
35+
description: "Structural design, modularity, dependency analysis"
36+
delegation:
37+
status: planned
38+
description: "Multi-agent coordination, responsibility boundaries"
39+
style:
40+
status: planned
41+
description: "Writing quality, tone consistency, formatting standards"
42+
43+
features:
44+
prescreen:
45+
status: shipped
46+
description: "10 deterministic checks + DevSkim + Ruff + Bandit + PSScriptAnalyzer"
47+
fix_loops:
48+
status: shipped
49+
description: "Re-validation loops with fixer proposals, up to 3 iterations"
50+
learning_memory:
51+
status: shipped
52+
description: "Recurring pattern tracking via known_issues.json"
53+
batch_validation:
54+
status: shipped
55+
description: "Directory/pattern validation with crash-resilient progressive saves"
56+
cost_tracking:
57+
status: shipped
58+
description: "Per-call token counts, cost estimates, budget caps"
59+
audit_reports:
60+
status: shipped
61+
description: "CSV audit detail + summary reports with SHA-256 integrity"
62+
time_estimation:
63+
status: shipped
64+
description: "Pre-run time + cost estimates with --estimate-time flag"

0 commit comments

Comments
 (0)