From a3be8650b3f707603c5364c5acb4565f492e811d Mon Sep 17 00:00:00 2001 From: Roman Melnikov Date: Sun, 19 Apr 2026 02:10:19 +0300 Subject: [PATCH] =?UTF-8?q?fix(dev-workflow):=20#230=20=E2=80=94=20JSON=20?= =?UTF-8?q?output=20overrides=20for=20senior-developer=20+=20reality-check?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both agents had Zod schemas expecting structured JSON but prompts that inherited the role's markdown-output instruction. Live run would have failed Zod validation on step 2 of any feature/bugfix pipeline. Added "## Required output (JSON)" blocks matching their Zod schemas, mirroring the pattern already used by architectAgent + codeReviewerAgent. Bumps @ageflow/dev-workflow 0.0.15 → 0.0.16 (private). Closes #230 --- packages/dev-workflow/package.json | 2 +- packages/dev-workflow/pipelines/bugfix.ts | 12 ++++++++++++ packages/dev-workflow/pipelines/feature.ts | 12 ++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/dev-workflow/package.json b/packages/dev-workflow/package.json index 8b5b823..d5cd43e 100644 --- a/packages/dev-workflow/package.json +++ b/packages/dev-workflow/package.json @@ -1,6 +1,6 @@ { "name": "@ageflow/dev-workflow", - "version": "0.0.15", + "version": "0.0.16", "private": true, "type": "module", "scripts": { diff --git a/packages/dev-workflow/pipelines/bugfix.ts b/packages/dev-workflow/pipelines/bugfix.ts index b668757..5305b5e 100644 --- a/packages/dev-workflow/pipelines/bugfix.ts +++ b/packages/dev-workflow/pipelines/bugfix.ts @@ -211,6 +211,18 @@ const realityCheckerAgent = defineAgent({ "", "Reproduce the bug on master, then verify the fix on the worktree", "branch. Cite the test file + describe block that captures the bug.", + "", + "## Required output (JSON)", + "", + "```json", + "{", + ' "commandsRun": [{ "cmd": "", "result": "PASS" | "FAIL" | "SKIPPED" }],', + ' "regressionProof": "<1-2 sentence evidence the bug is gone>",', + ' "gate": "APPROVED" | "NEEDS_WORK"', + "}", + "```", + "", + "Wrap your response in this JSON object exactly. Do not add prose around it.", ].join("\n"); }, }); diff --git a/packages/dev-workflow/pipelines/feature.ts b/packages/dev-workflow/pipelines/feature.ts index bae28e9..391bf2b 100644 --- a/packages/dev-workflow/pipelines/feature.ts +++ b/packages/dev-workflow/pipelines/feature.ts @@ -96,6 +96,18 @@ const seniorDeveloperAgent = defineAgent({ "", "Implement per the plan. Run typecheck + tests locally before returning.", "Only commit reality: typecheckPassed must reflect actual exit code.", + "", + "## Required output (JSON)", + "", + "```json", + "{", + ' "filesChanged": ["", ...],', + ' "summary": "",', + ' "typecheckPassed": true | false', + "}", + "```", + "", + "Wrap your response in this JSON object exactly. Do not add prose around it.", ].join("\n"); }, });