Skip to content

fix(taskctl): adversarial-pipeline prompt missing critical review instructions #269

@randomm

Description

@randomm

Task Description

Several adversarial review failures observed in live pipeline runs reveal gaps in the adversarial-pipeline agent prompt:

Problems Observed

  1. Wrong test directory — adversarial ran bun test from project root instead of packages/opencode, getting "do-not-run-tests-from-root" error
  2. Scope expansion not caught — developer added out-of-scope tests; adversarial approved them
  3. Cross-platform assumption missedexpect(tmp.path).not.toContain('/tmp/') fails on Linux; first adversarial caught it, second approved the same code anyway
  4. Inconsistent verdicts — second adversarial APPROVED despite first adversarial finding ISSUES_FOUND on identical code

Required Prompt Additions

Test execution (fix wrong directory):

Run tests from packages/opencode directory ONLY:
  cd <worktree>/packages/opencode && bun test
  cd <worktree>/packages/opencode && bun run typecheck
Never run from project root or worktree root.

Scope enforcement:

Check: Does the implementation add ANYTHING not in the task description or acceptance criteria?
- New tests not covering the implementation → ISSUES_FOUND (MEDIUM)
- New functions, helpers, or features not requested → ISSUES_FOUND (HIGH)
- Scope expansion is a violation even if the code is correct

Cross-platform check:

Check: Are there platform-specific assumptions?
- Path assertions hardcoding /var/folders (macOS only) or /tmp (Linux)
- OS-specific API usage without fallbacks
- These are CRITICAL if they will fail on common platforms

Explicit APPROVED criteria:

APPROVED only if ALL true:
- All acceptance criteria met
- bun test passes (from packages/opencode)
- bun run typecheck passes (from packages/opencode)  
- Zero CRITICAL or HIGH issues
- No scope expansion beyond task description
- No cross-platform assumptions that will break

ISSUES_FOUND if ANY:
- MEDIUM/LOW quality issues OR out-of-scope additions

CRITICAL_ISSUES_FOUND if ANY:
- CRITICAL/HIGH bugs, test failures, typecheck failures, cross-platform breaks

Quality Gates (Non-Negotiable)

  • TDD: existing adversarial prompt tests must still pass
  • All linting passes
  • Local verification complete

Acceptance Criteria

  • Adversarial runs tests from correct directory (packages/opencode)
  • Adversarial flags out-of-scope additions as ISSUES_FOUND
  • Adversarial checks for cross-platform path assumptions
  • APPROVED/ISSUES_FOUND/CRITICAL criteria are unambiguous and consistent

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions