feat: support --file flag and --issue URL for autopilot start#68
Merged
feat: support --file flag and --issue URL for autopilot start#68
Conversation
Add --file / -f flag to read prompt from a plain text file, avoiding shell escaping and truncation issues with long CLI prompts. The prompt file is protected from agent edits via two layers: 1. Dynamically added to .git/info/exclude (prevents commit) 2. Explicit agent instruction prepended to all prompt builders Add full GitHub issue URL support for --issue (e.g. https://github.com/org/repo/issues/45) with cross-repo fetch via --repo flag on gh issue view. Plain numbers still work (backward compatible). Other changes: - --prompt, --issue, --file are now mutually exclusive - Full prompt logged at INFO level (was truncated to 100 chars) - Prompt source and length logged at task start - Schema v6: prompt_file column with migration - 24 new tests across cli, orchestrator, persistence Closes #40 Closes #67
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.
Description
Support reading prompts from a file (
--file / -f) and full GitHub issue URLs in--issue, improving how users provide task prompts to autopilot.Closes #40
Closes #67
--file / -fflag (#67)Users with long or complex prompts can now write them to a file instead of pasting into CLI args:
Prompt file protection (two layers):
.git/info/exclude(local-only, never committed). Prevents the file from being staged even if the agent runsgit add ..Full prompt logging -- agent.py now logs the full prompt at INFO level (was truncated to 100 chars). Prompt source (file/CLI/issue) and length are logged at task start.
--issueURL support (#40)--issuenow accepts full GitHub URLs for cross-repo issue fetching:Other changes
--prompt,--issue, and--fileare now mutually exclusive (exactly one required)prompt_filecolumn with migrationChecklist
ruff check src/ tests/-- no errorspython -m pytest tests/-- all tests pass (245 passed)🤖 autopilot-loop