Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pipeline Plan 60

Seth Ford edited this page Feb 14, 2026 · 1 revision

The plan file is ready. Let me provide the plan summary here since the artifacts directory has restricted permissions.


Implementation Plan: Ruthless Quality Validation (Issue #60)

Summary

Replace the "optimistically compliant" quality system with ruthless, multi-layer validation across 5 layers.

Files to Modify

File Changes
scripts/sw-pipeline.sh DoD zero-auto-pass, quality score gating, multi-perspective review, progressive deepening
scripts/sw-loop.sh Intelligent completion, adaptive iteration budget, diminishing returns detection
scripts/sw-adversarial.sh Multi-persona support (security, correctness, architecture auditors)
templates/pipelines/*.json (all 8) Add quality_threshold, critical_blocks, progressive_deepening, multi_perspective
.claude/daemon-config.json Enable adversarial, simulation, architecture by default
scripts/sw-pipeline-test.sh Tests for all quality gates and blocking behavior

Implementation Steps

Step 1: Zero Auto-Pass DoD (sw-pipeline.sh:4638)

Replace *) item_passed=true with item_passed=false + optional AI verification. Unknown items fail by default. Also improve existing test/coverage/debug-statement checks to be more thorough.

Step 2: Quality Score as Hard Gate (sw-pipeline.sh:6195)

  • Read quality_threshold from pipeline config (default 80, replacing hardcoded 60)
  • Read critical_blocks config (default true)
  • Critical findings ALWAYS block pipeline regardless of score
  • Post detailed score breakdown table to GitHub issue

Step 3: Multi-Perspective Review (sw-adversarial.sh)

New multi_perspective_review() function running 3 distinct auditor personas:

  1. Security auditor: injection, auth bypass, secrets, CSRF, SSRF
  2. Correctness auditor: off-by-one, null access, race conditions, edge cases
  3. Architecture auditor: naming violations, coupling, circular deps, pattern breaks

Each writes to adversarial-{persona}.md, combined summary to JSON.

Step 4: Progressive Deepening (sw-pipeline.sh:5825)

Each compound quality cycle goes deeper, not wider:

  • Cycle 1 (fast): E2E, security scan, quality checks
  • Cycle 2 (medium): + adversarial, negative prompting, DoD
  • Cycle 3 (deep): + simulation, architecture, multi-perspective review
  • Cycle 4+ (targeted): Only re-run audits that previously found issues

Controlled by progressive_deepening config flag. Legacy behavior preserved when false.

Step 5: Intelligent Build Completion (sw-loop.sh)

  • Adaptive budget: Complexity <= 30 → 10 iter, <= 60 → 20, > 60 → 30 (only when not explicitly set)
  • Diminishing returns: Warn when velocity < 5 lines over last 3 iterations
  • Enhanced guard_completion: Reject if uncommitted changes or TODO/FIXME markers in diff

Step 6: Template Updates (all 8 templates)

Template threshold cycles critical_blocks progressive multi_perspective
fast 50 2 true false false
hotfix 60 2 true false false
cost-aware 60 3 true true false
standard 70 4 true true true
autonomous 80 5 true true true
full 80 5 true true true
deployed 80 5 true true true
enterprise 90 7 true true true

Step 7: Enable Intelligence Defaults

Change adversarial_enabled, simulation_enabled, architecture_enabled to true in daemon-config.

Step 8: Tests (8 new test cases)

  1. DoD unknown item fails (not auto-passes)
  2. Quality score blocks below threshold
  3. Quality score passes above threshold
  4. Critical findings block regardless of score
  5. Progressive deepening cycle 1 = fast (adversarial skipped)
  6. Progressive deepening cycle 3 = deep (all audits run)
  7. Multi-perspective review produces 3 persona files
  8. Convergence plateau detection

Task Checklist

  • Task 1: Replace DoD auto-pass with zero-auto-pass default in run_dod_audit()
  • Task 2: Improve DoD verification for test, coverage, and debug checks
  • Task 3: Make quality score threshold configurable (replace hardcoded 60)
  • Task 4: Add critical-findings-always-block logic
  • Task 5: Implement multi_perspective_review() in sw-adversarial.sh
  • Task 6: Wire multi-perspective review into stage_compound_quality()
  • Task 7: Implement progressive deepening (fast/medium/deep/targeted)
  • Task 8: Add adaptive iteration budget to sw-loop.sh
  • Task 9: Add diminishing returns detection to build loop
  • Task 10: Enhance guard_completion() with uncommitted/TODO checks
  • Task 11: Update all 8 pipeline templates
  • Task 12: Enable intelligence defaults in daemon-config
  • Task 13: Write tests for all quality gates
  • Task 14: Run full test suite and fix regressions

Definition of Done

  • *) item_passed=true replaced with item_passed=false + AI verification
  • Quality score threshold configurable per template (not hardcoded 60)
  • Critical findings block pipeline regardless of score
  • Multi-perspective review generates 3 auditor reports
  • Progressive deepening runs appropriate checks per cycle depth
  • Adaptive iteration budget based on complexity scoring
  • Diminishing returns detection active
  • All 8 templates updated with new quality config
  • Intelligence features enabled by default
  • All new code tested with PASS/FAIL assertions
  • Full test suite passes (npm test exits 0)
  • Bash 3.2 compatible

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /