Replace IMPLEMENTATION_RESULT JSON with .PR.md file - #63
Merged
Conversation
The agent kept struggling with the JSON output format: wrapping it in code blocks, inventing its own fields instead of title/body, and failing to escape newlines. The fundamental problem was forcing markdown content through a JSON string value. New approach: the agent writes a .PR.md file to the repo root. It's a normal markdown document where the first # heading is the PR title and the rest is the body. No JSON, no escaping, no single-line constraint, no marker to remember for the happy path. Changes: - probe_issue.py: removed parse_decision() and IMPLEMENTATION_RESULT parsing. Added read_pr_description() which reads .PR.md and extracts title (first # heading) and body (rest). Replaced --title-file and --body-file args with --pr-description. The only stdout marker left is IMPLEMENTATION_BLOCKER (the opt-out). - probe-issue.yaml: reads .PR.md from the workspace, extracts title and body via sed/awk, deletes the file before git add so it's not in the PR diff. Path enforcement allows .PR.md at root. - probe-issue.md: updated key points to reference .PR.md. - AGENT_DESIGN.md: updated all references to the old JSON format. - .gitignore: added .PR.md so it never gets committed accidentally. - Output contract in prompt: replaced JSON instructions with write a .PR.md markdown file. System constraints allow editing .PR.md.
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.
The agent kept struggling with the JSON output format — wrapping it in code blocks, inventing its own fields instead of
title/body, and failing to escape newlines. The fundamental problem was forcing markdown content through a JSON string value.New approach
The agent writes a
.PR.mdfile to the repo root. It's a normal markdown document where the first#heading is the PR title and the rest is the body. No JSON, no escaping, no single-line constraint, no marker to remember for the happy path.The only stdout marker left is
IMPLEMENTATION_BLOCKER:(the opt-out). For the happy path, the workflow checks for changed files +.PR.md— no marker needed.Changes
parse_decision()andIMPLEMENTATION_RESULTparsing. Addedread_pr_description()which reads.PR.mdand extracts title (first#heading) and body (rest). Replaced--title-fileand--body-fileargs with--pr-description..PR.mdfrom the workspace, extracts title and body via sed/awk, deletes the file beforegit addso it's not in the PR diff. Path enforcement allows.PR.mdat root..PR.md..PR.mdso it never gets committed accidentally..PR.mdmarkdown file". System constraints allow editing.PR.md.