feat: add explicit brainstorm state-dir selection#977
Open
feat: add explicit brainstorm state-dir selection#977
Conversation
Owner
|
It looks like you opened two similar pull requests for this same thing. What's going on? |
Author
Yeah, I'll close the other one |
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.
What problem are you trying to solve?
The brainstorm companion currently pushes persistent session state into the working tree when
--project-diris used, under<project>/.superpowers/brainstorm/.For open source repos, that creates repo pollution and leads users toward
.gitignorechurn just to hide AI-tool state. Persistent brainstorm state should default to a user-owned location outside the repository, while still allowing explicit in-repo storage when someone really wants it.What does this PR change?
This adds a new
--state-dirflag andSUPERPOWERS_STATE_DIRenvironment variable for explicit brainstorm state storage.It also changes the default persistent storage root to a user-owned data directory outside the working tree, and keeps
--project-diras a compatibility alias that still resolves to<project>/.superpowers/brainstorm/<session-id>/.Is this change appropriate for the core library?
Yes.
This is general-purpose core behavior for brainstorm session storage, not a project-specific workflow or third-party integration. Any user of the brainstorm companion can hit the same repo-pollution problem.
What alternatives did you consider?
Remove
--project-dirimmediately.Rejected because it would break existing workflows that already rely on in-repo persistence.
Keep
/tmpas the default persistent location.Rejected because it is ephemeral and may be unsuitable for retaining brainstorm sessions across restarts.
Add a more complex platform-specific storage abstraction.
Rejected because a simple user-owned default path plus explicit override mechanisms solves the problem with less complexity.
Does this PR contain multiple unrelated changes?
No. This PR is limited to brainstorm session storage selection and the associated documentation/tests.
Existing PRs
Environment tested
Evaluation
What was the initial prompt you (or your human partner) used to start the session that led to this change?
How many eval sessions did you run AFTER making the change?
start-server.shwith--state-dir.How did outcomes change compared to before the change?
--project-dir, and persistent in-repo storage was the documented path.--state-dirandSUPERPOWERS_STATE_DIR, defaults to a user-owned storage directory outside the working tree, and still accepts--project-diras a compatibility alias.Rigor
superpowers:writing-plansstyle discipline for scoped implementation and added targeted test coverage for the new path-selection behaviorVerification run:
bash tests/brainstorm-server/start-server-paths.test.shgit diff --checkbash skills/brainstorming/scripts/start-server.sh --state-dir /tmp/sp-state-smoke --foregroundHuman review