Skip to content

feat(sdd): cut wall-clock time with tree-once caching, tiered human gates, and closure rounds - #51

Merged
zpyoung merged 14 commits into
mainfrom
zpyoung/optimize-sdd
Oct 18, 2026
Merged

zpyoung merged 14 commits into
mainfrom
zpyoung/optimize-sdd

Conversation

@zpyoung

@zpyoung zpyoung commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Summary

SDD runs spend most of their wall clock waiting on people and re-running the same test suite on unchanged trees. In an eight-run audit, user waits totaled 839 minutes and full suites ran 4 to 10 times per review round on identical trees. This PR cuts that without loosening the final branch review.

  • Tree-once test caching. A green run is recorded by (tree_identity, exact_command), so acceptance checks, wave gates, and review pre-passes never re-test identical bytes. Only orchestrator or prepass runs populate the cache, never a worker's text claim.
  • Three-tier human gates. One consolidated preflight card blocks up front. Recoverable mid-run questions carry a 10-minute orca ask deadline with a recommended default. Review-finding adjudications go to a per-round digest with asynchronous user veto.
  • Scaled review depth. Wave checkpoints run at standard. Final round 1 runs full deep discovery. Rounds 2 and up are scoped closure passes, and a recurring defect in the same category and seam escalates instead of getting another narrow fixer.
  • Single-owner test topology. writing-plans assigns each test file to one task per wave and scopes task acceptance to owned tests. The wave gate runs the full suite once.
  • Pinned effort. Implementers, promoters, refuters, and fixers run at high. Only auxiliary roles drop to medium or low.

adversarial-review gets the deterministic CLI support these need, in the script that already owns chain integrity: default diff excludes with excluded_paths[] reporting, prepass --reuse-check anchored to artifact_hash and HEAD^{tree}, and claim/gate excerpts so refuters get only the cited hunks.

Where to look

  • skills/adversarial-review/scripts/adversarial-review: the largest code change (new excludes, reuse-check, excerpt handling).
  • skills/subagent-driven-development/SKILL.md: the orchestration changes for steps 1, 7, 8 to 10.
  • docs/quirk/specs/2026-10-16-sdd-wall-clock-optimization/: logic and tech specs. The exploration with the audit data is in docs/quirk/explorations/.

The branch also carries two rounds of adversarial-review fixes against its own diff (C1, S1, S2, X1, X2, and round 2 findings on path-target and diff-file excerpts and reuse-check target validation).

Testing

  • python3 -m pytest -q tests/test_adversarial_review.py tests/test_adversarial_review_skill.py: 607 passed.
  • The skill changes (SDD, writing-plans) are prompt text, so they aren't exercised end to end. [ASK: has an SDD run been done against the new flow? If so, add the result here.]

Copilot AI balanced review requested due to automatic review settings October 18, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zpyoung
zpyoung merged commit 0d0a354 into main Oct 18, 2026
1 check passed
github-actions Bot added a commit that referenced this pull request Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants