Skip to content

Replace IMPLEMENTATION_RESULT JSON with .PR.md file - #63

Merged
dwilding merged 1 commit into
mainfrom
pr-description-file
Aug 25, 2026
Merged

Replace IMPLEMENTATION_RESULT JSON with .PR.md file#63
dwilding merged 1 commit into
mainfrom
pr-description-file

Conversation

@dwilding

Copy link
Copy Markdown
Owner

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.

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

  • 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.
  • 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.

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.
@dwilding
dwilding merged commit 3cfbe9a into main Aug 25, 2026
2 checks passed
@dwilding
dwilding deleted the pr-description-file branch August 25, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant