Conversation
…esume Two changes: 1. Pre-commit verification instructions: All prompt templates (implement, implement_on_existing_branch, plan_and_implement, fix, fix_ci) now include a quality gate block that tells the agent to discover and run the project's linter, type checker, and test suite BEFORE committing. This catches CI failures (lint, types, tests) before they happen. 2. Resume --context flag: 'autopilot resume --pr N --context "..."' passes additional instructions to the agent during the fix loop. The context is stored in the task's prompt field and piped through to fix_prompt as a Task Context section. Useful for nudging the agent to focus on specific issues (e.g. 'fix linting issues'). No schema migration needed — reuses existing prompt column.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two features to prevent CI failures and improve resume UX:
1. Pre-commit Quality Gate Instructions
All prompt templates now include a verification block that tells the agent to discover and run the project's linter, type checker, and test suite BEFORE committing. This catches lint, type, and test failures before they reach CI.
Affected prompts:
implement_prompt,implement_on_existing_branch_prompt,plan_and_implement_prompt,fix_prompt,fix_ci_prompt.The instructions are project-agnostic — the agent looks for config files (pyproject.toml, .eslintrc, Makefile, etc.) to discover tooling rather than hardcoding specific tools.
2.
--contextFlag for Resumeautopilot resume --pr 132 --context "fix all linting issues before committing"Passes additional instructions to the agent during the fix loop. The context is stored in the task's prompt field and piped through as a Task Context section in every fix prompt iteration. No schema migration needed — reuses the existing
promptcolumn.Changes
src/autopilot_loop/prompts.py_pre_commit_verification_instruction()helper; updated all 5 prompt templates; addedtask_contextparam tofix_promptsrc/autopilot_loop/cli.py--context / -cto resume subparser; updatedcmd_resumeto store context in prompt; updated module docstringsrc/autopilot_loop/orchestrator.py_do_fixnow passesself.task["prompt"]astask_contexttofix_promptREADME.mdtests/test_cli.pyTestCmdResumeContext(context stored, default prompt without context)tests/test_orchestrator.pyTestPreCommitVerification(5 prompts),TestFixPromptTaskContext(3 tests)Testing
python3 -m ruff check src/ tests/— all checks passedpython3 -m pytest tests/— 272 tests passed🤖 autopilot-loop