feat(brainstormer): axis-aligned epic/ticket generator (#123)#136
Merged
Conversation
…etic guardrail (#123) Introduces the `Brainstormer` SDK session that reads a ProductVision (from #122), scans the open backlog via `gh_client`, and proposes epics + tickets that must cite an axis + customer story. The post-SDK guardrail drops anything missing citations, citing an unknown axis, or substring-matching an axis's `rejected_as_cosmetic` list — defense in depth against the loop drifting into cosmetic work. - src/forge_loop/brainstormer.py — `Brainstormer.run(vision)`, `BrainstormReport`, `ProposedEpic`, `ProposedTicket`. - src/forge_loop/_brainstormer_sdk.py — sync SDK shim mirroring `_critic_sdk.py` shape. - src/forge_loop/briefs/brainstormer.md.tmpl — primes the session with vision (verbatim), axes (yaml-rendered), open backlog, and the hard-refusal rubric. - src/forge_loop/gh_client.py — adds `list_open_backlog` + `OpenBacklog` so callers don't shell to `gh`. - tests/test_brainstormer.py — happy path, every filter (missing axis, missing story, unknown axis, cosmetic title/body match, case-insensitive), empty-vision guardrail, SDK timeout + error + malformed-output handling, integration with fixtures, prompt- contents assertion. Part of #121.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brainstormermodule: readsProductVision, scans open backlog viagh_client, drives an SDK session, returns a filteredBrainstormReport.rejected_as_cosmetic(case-insensitive). Drops are logged at INFO._brainstormer_sdk.py(mirrors_critic_sdk.py) + brief templatebrainstormer.md.tmpl(vision verbatim + axes yaml + open backlog + rubric).list_open_backloghelper ingh_client.py— no shell-outs frombrainstormer.py.Closes #123. Part of #121.
Test plan
pytest tests/test_brainstormer.py— 18 passingValueErrorRuntimeErrorRuntimeErrorRuntimeErrorcarrying raw last_message🤖 Generated with Claude Code