From 0c68421e6f4843f68df5c5bfcedd6934f0013706 Mon Sep 17 00:00:00 2001 From: Agent Date: Wed, 8 Apr 2026 18:54:40 +0000 Subject: [PATCH] fix: fix: architect creates sprint PR with raw JSON body instead of formatted markdown (#431) --- formulas/run-architect.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/formulas/run-architect.toml b/formulas/run-architect.toml index cd8010a..af145d9 100644 --- a/formulas/run-architect.toml +++ b/formulas/run-architect.toml @@ -169,7 +169,7 @@ If step 2 (research/pitch) produced a pitch and no PR exists yet: 3. Create PR on ops repo via Forgejo API: - Title: `architect: ` - - Body: pitch content (what it enables, complexity, risks, cost) + - Body: **plain markdown text** from the scratch file (pitch content with sections: What this enables, Complexity, Risks, Cost, Recommendation). Preserve newlines as-is — do NOT JSON-encode the body. - Base branch: primary branch (main/master) - Head branch: architect/ - Footer: "Reply `ACCEPT` to proceed with design questions, or `REJECT: ` to decline." @@ -195,9 +195,15 @@ Body: {"message": "sprint: add .md", "content": "", "body": "", "head": "architect/", "base": "main"} +Body: {"title": "architect: ", "body": "", "head": "architect/", "base": "main"} ``` +**Important: PR body format** +- The `body` field must contain **plain markdown text** (the raw content from the scratch file) +- Do NOT JSON-encode or escape the body — pass it as a JSON string value +- Newlines and markdown formatting (headings, lists, etc.) must be preserved as-is +- Example: if the sprint pitch contains `## What this enables`, the PR body should render this as a markdown heading, not as literal `## What this enables` text + ### Close PR ``` PATCH /repos/{owner}/{repo}/pulls/{index}