feat(FN-4367): finalize structured workflow verdict contract

Fusion-Task-Id: FN-4367
Fusion-Task-Lineage: adbfac60-5cfe-4ae9-9706-1094dfe7d676
This commit is contained in:
Fusion
2026-05-14 11:08:10 -07:00
committed by gsxdsm
parent db78679758
commit 09ad2b4edf
12 changed files with 206 additions and 347 deletions

View File

@@ -225,6 +225,17 @@ For long outputs, click the expand icon (maximize) to open a larger viewer modal
This makes it easier to read structured markdown output and long logs.
### Prompt-mode Structured Verdict Contract
Prompt-mode workflow agents should emit a trailing JSON object:
`{"verdict":"APPROVE|APPROVE_WITH_NOTES|REVISE","notes":"..."}`
- `verdict` and `notes` are persisted on `WorkflowStepResult` when present.
- Script-mode steps do not populate these fields.
- Backward compatibility remains for legacy prose-only responses via heuristic fallback (`REQUEST REVISION` and approval keywords).
- If neither structured JSON nor fallback prose can be interpreted, the step is treated as skipped (malformed output) instead of hard-failing the task.
## Workflow Step APIs
| Endpoint | Purpose |