Skip to content

Add post-develop verification before label transition #69

Description

@monkut

Context

cli.py:202-232 — After develop completes, the code only logs git status and git worktree list. The transition to action:review happens unconditionally on exit code 0 (cli.py:231-232). No verification that tests pass, build succeeds, or linting is clean.

Proposal

Add a post-develop verification step in cli.py between runner completion and transition_issue_to_review():

if action == AgentAction.DEVELOP and return_code == 0:
    # Run project verification before transitioning
    verify_result = _run_project_verification(cwd)
    if verify_result.passed:
        transition_issue_to_review(issue_url)
    else:
        logger.warning("Post-develop verification failed: %s", verify_result.message)
        # Don't transition — issue stays in develop state

Verification checks

Detection-based approach — try common project commands:

  1. Tests: detect and run test command (uv run poe test, pytest, npm test, make test)
  2. Linting: detect and run linter (uv run poe check, ruff check, eslint, make lint)
  3. Type check: detect and run type checker (uv run poe typecheck, mypy, tsc --noEmit)

If no commands are detected, skip verification (don't block).

Rationale

Transitioning to action:review signals that the work is ready for human review. If tests are failing or linting is broken, the issue isn't ready — the reviewer wastes time on mechanical failures instead of reviewing logic.

Research shows all successful frameworks (agent-skills, Superpowers, gstack) enforce verification before declaring work complete.

Activity

  1. added a commit that references this issue on Apr 9, 2026
    81fd7d5
  2. monkut commented on Apr 9, 2026

    @monkut
    OwnerAuthor

    Implemented in #75.

    Changes:

    • Added _run_project_verification() in functions.py that detects and runs project verification commands (tests, lint, type check) based on config files (pyproject.toml, package.json, Makefile)
    • Detection supports poe tasks, direct tool invocation, npm scripts, and Makefile targets
    • Gated transition_issue_to_review() in cli.py on verification passing — if any check fails, the issue stays in develop state with detailed failure logging
    • If no verification commands are detected, verification is skipped (no blocking)
    • Added 11 new tests covering detection, execution, pass/fail/timeout/not-found scenarios, and transition integration

    :tokens-used: model: N/A, input: 52, output: 19986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions