|
| 1 | +<h2-workflow id="gen-idea" name="Generate Idea Draft" version="0.1.0" schema="humanize2.workflow.html.v1"> |
| 2 | + <h2-manifest> |
| 3 | + <h2-capability name="agent" tools="claude,codex"></h2-capability> |
| 4 | + <h2-capability name="artifact" schemas="idea.input.v1,idea.directions.v1,idea.proposal.v1,idea.draft.v1"></h2-capability> |
| 5 | + <h2-capability name="script" allow="humanize.validateIdeaInput,idea.collectProposalStatus"></h2-capability> |
| 6 | + <h2-capability name="view"></h2-capability> |
| 7 | + </h2-manifest> |
| 8 | + |
| 9 | + <h2-state> |
| 10 | + <h2-board id="idea-scoreboard" schema="idea.scoreboard.v1"></h2-board> |
| 11 | + </h2-state> |
| 12 | + |
| 13 | + <h2-template id="direction-prompt" type="prompt"> |
| 14 | + Read the delivered idea-input artifact and repository context. Do not modify project files. |
| 15 | + Gather repo context from README.md, local instruction files when present, and the top-level directory listing. |
| 16 | + Produce exactly 6 orthogonal directions. Each direction must include a 2-5 word name and a single-sentence rationale explaining why it is distinct. |
| 17 | + If fewer than 6 directions are possible after one retry, deliver at least 2 directions and include a warning field. Deliver idea-directions through Humanize2. |
| 18 | + </h2-template> |
| 19 | + <h2-template id="exploration-prompt" type="prompt"> |
| 20 | + Explore the direction assigned by your vertex id and expected artifact. Read idea-directions and select the matching ordered direction. |
| 21 | + Include a verbatim copy of the original idea from idea-input in your reasoning context. |
| 22 | + Explore this direction within the current repo. Gather OBJECTIVE_EVIDENCE: |
| 23 | + - Specific repo paths with existing patterns worth extending. |
| 24 | + - Prior art or precedent in the codebase or adjacent tooling. |
| 25 | + - Measurable considerations where discoverable from reading the code. |
| 26 | + |
| 27 | + Read-only. Do not write any files. |
| 28 | + |
| 29 | + If no concrete evidence exists for this direction, report the literal string "exploratory, no concrete precedent" once in OBJECTIVE_EVIDENCE and stop exploring further. Fabrication of references is forbidden. |
| 30 | + |
| 31 | + Deliver your expected idea-proposal-* artifact through Humanize2 with APPROACH_SUMMARY, OBJECTIVE_EVIDENCE, KNOWN_RISKS, and CONFIDENCE. |
| 32 | + </h2-template> |
| 33 | + <h2-template id="synthesis-prompt" type="prompt"> |
| 34 | + Synthesize the delivered exploration proposals into one Primary direction and alternatives. |
| 35 | + Choose the Primary direction by evidence density, fit with existing repo patterns, implementation surface area, and confidence. |
| 36 | + Preserve the original idea content from idea-input byte-for-byte in the draft content. |
| 37 | + Deliver idea-draft through Humanize2 with title, original idea, primary direction, objective evidence, known risks, alternatives, synthesis notes, requested direction count, and actual proposal count. |
| 38 | + </h2-template> |
| 39 | + |
| 40 | + <h2-flow> |
| 41 | + <h2-check id="validate-input" uses="humanize.validateIdeaInput"></h2-check> |
| 42 | + <h2-await id="idea-input-await" on="exists(artifact.idea-input)"></h2-await> |
| 43 | + <h2-agent id="direction-lead" role="lead" tool="claude" prompt="#direction-prompt" short-name="gen-idea-directions" timeout="30m"> |
| 44 | + <h2-expect artifact="idea-directions" schema="idea.directions.v1"></h2-expect> |
| 45 | + </h2-agent> |
| 46 | + <h2-parallel id="exploration-swarm"> |
| 47 | + <h2-agent id="explore-direction-1" role="explorer" parent="direction-lead" tool="claude" prompt="#exploration-prompt" short-name="idea-direction-1" timeout="30m"> |
| 48 | + <h2-expect artifact="idea-proposal-1" schema="idea.proposal.v1"></h2-expect> |
| 49 | + </h2-agent> |
| 50 | + <h2-agent id="explore-direction-2" role="explorer" parent="direction-lead" tool="codex" prompt="#exploration-prompt" short-name="idea-direction-2" timeout="30m"> |
| 51 | + <h2-expect artifact="idea-proposal-2" schema="idea.proposal.v1"></h2-expect> |
| 52 | + </h2-agent> |
| 53 | + <h2-agent id="explore-direction-3" role="explorer" parent="direction-lead" tool="claude" prompt="#exploration-prompt" short-name="idea-direction-3" timeout="30m"> |
| 54 | + <h2-expect artifact="idea-proposal-3" schema="idea.proposal.v1"></h2-expect> |
| 55 | + </h2-agent> |
| 56 | + <h2-agent id="explore-direction-4" role="explorer" parent="direction-lead" tool="codex" prompt="#exploration-prompt" short-name="idea-direction-4" timeout="30m"> |
| 57 | + <h2-expect artifact="idea-proposal-4" schema="idea.proposal.v1"></h2-expect> |
| 58 | + </h2-agent> |
| 59 | + <h2-agent id="explore-direction-5" role="explorer" parent="direction-lead" tool="claude" prompt="#exploration-prompt" short-name="idea-direction-5" timeout="30m"> |
| 60 | + <h2-expect artifact="idea-proposal-5" schema="idea.proposal.v1"></h2-expect> |
| 61 | + </h2-agent> |
| 62 | + <h2-agent id="explore-direction-6" role="explorer" parent="direction-lead" tool="codex" prompt="#exploration-prompt" short-name="idea-direction-6" timeout="30m"> |
| 63 | + <h2-expect artifact="idea-proposal-6" schema="idea.proposal.v1"></h2-expect> |
| 64 | + </h2-agent> |
| 65 | + </h2-parallel> |
| 66 | + <h2-transform id="proposal-summary" from="artifact.idea-proposal-1" to="board.idea-scoreboard" uses="idea.collectProposalStatus"></h2-transform> |
| 67 | + <h2-agent id="synthesis-lead" role="synthesizer" tool="claude" prompt="#synthesis-prompt" short-name="idea-synthesis" timeout="30m"> |
| 68 | + <h2-expect artifact="idea-draft" schema="idea.draft.v1"></h2-expect> |
| 69 | + </h2-agent> |
| 70 | + </h2-flow> |
| 71 | + |
| 72 | + <h2-view slot="properties"> |
| 73 | + <section data-h2-view="idea-scoreboard"> |
| 74 | + <h3>Idea Exploration Scoreboard</h3> |
| 75 | + <p>Architecture proposal: <span data-h2-bind="board.idea-scoreboard.architecture">-</span></p> |
| 76 | + <p>Product proposal: <span data-h2-bind="board.idea-scoreboard.product">-</span></p> |
| 77 | + <p>Risk proposal: <span data-h2-bind="board.idea-scoreboard.risk">-</span></p> |
| 78 | + </section> |
| 79 | + </h2-view> |
| 80 | +</h2-workflow> |
0 commit comments