Repository navigation
fix(workflows): give plan validation adversarial teeth - #1870
Conversation
Closes #1757 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🟡 Impact Analysis — PR #1870Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 3 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ❌ | Branch up to date | dev is 1 commit(s) ahead — rebase recommended |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 0 active Copilot thread(s) resolved (2 outdated skipped) |
| ✅ | CI passing | All checks passing |
Files Changed (2 files, +267 −8)
| File | +/− |
|---|---|
test/gh-aw-plan-lifecycle.test.ts |
+162 −5 |
workflows/squad.md |
+105 −3 |
Total: +267 −8
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
🟡 Changes recommended
The PR introduces contract vocabulary/parsing inconsistencies (risk-acceptance heading) and a correctness issue in the updated skillBlock() helper that should be fixed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR strengthens the long-path planning lifecycle by turning /squad plan validate into a true gate: it now requires adversarial Devil’s Advocate evidence and validator-owned synthesis (PASS/FAIL), rather than allowing a structurally neat but substantively weak plan to pass.
Changes:
- Expands
squad-plan-validatefrom 10 structural checks to 16 checks including adversarial evidence requirements and explicit verdict-ownership synthesis. - Introduces a bounded
fact-checkersub-agent definition intended to supply the five-part Devil’s Advocate brief as advisory input (not a verdict). - Adds lifecycle contract tests to prevent regressions and to ensure structural-only validation artifacts are rejected.
File summaries
| File | Description |
|---|---|
| workflows/squad.md | Extends plan validation contract with adversarial checks and adds a Fact Checker Devil’s Advocate sub-agent definition. |
| test/gh-aw-plan-lifecycle.test.ts | Adds behavioral contract tests for adversarial validation and updates parsing helpers to recognize explicit end-skill markers and the new agent block. |
Review details
Suppressed comments (1)
test/gh-aw-plan-lifecycle.test.ts:440
- This test expects the Fact Checker to emit a "##### Risk acceptance" section, but the validation gate names the check/section "Remaining risk acceptance". Update the expected heading to match the workflow contract so the test enforces the same vocabulary the prompt uses.
'##### Risk acceptance',
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
/squad plan validatefrom ten structural checks to sixteen structural, adversarial, and verdict-ownership checksimplementation -> validate -> accept scope -> accept implementation -> activateorderCloses #1757
Validation
gh aw compilepassed in an isolated.github/workflowsfixturevitest@4.1.11; the failed restore left@typescript-eslint/parserandtscunavailable. No manifest or lockfile workaround was made.Security review
Prompt-body and test changes only. No frontmatter, permissions, secrets, actions, network access, or safe-output configuration changed. The isolated compiler's first-run safe-update warning named the workflow's existing
SQUAD_GITHUB_APP_PRIVATE_KEYandSQUAD_GITHUB_TOKEN; this PR does not add or modify either secret.