Skip to content

Workflows & Recipes

Preset workflows and custom recipes for repeatable development tasks.

Workflows & Recipes

Brainstorm includes preset workflows for common development tasks and a recipe system for defining your own repeatable workflows.

Preset Workflows

implement-feature

A full feature implementation workflow that runs through planning, coding, testing, and review:

1. Analyze the feature request and create a plan

2. Implement the code changes

3. Write or update tests

4. Run verification (tests, types, lint)

5. Self-review the changes

6. Generate a summary

``bash

storm workflow run implement-feature "Add dark mode toggle to the settings page"

`

fix-bug

Focused bug investigation and resolution:

1. Reproduce the issue from the description

2. Trace the root cause through the codebase

3. Implement the fix

4. Add a regression test

5. Verify the fix

`bash

storm workflow run fix-bug "Users see a blank page after login on Safari"

`

code-review

Systematic code review with security, performance, and correctness checks:

1. Analyze all changed files

2. Check for security vulnerabilities

3. Evaluate performance implications

4. Verify correctness and edge cases

5. Assess style and convention adherence

6. Produce a review report

`bash

storm workflow run code-review # reviews current git diff

`

explain

Deep explanation of a codebase area with architecture diagrams and data flow:

1. Map the specified code area

2. Trace data flow and dependencies

3. Identify patterns and conventions

4. Produce a structured explanation

`bash

storm workflow run explain "How does the payment processing pipeline work?"

`

Recipe System

Recipes are YAML files stored in .brainstorm/recipes/ that define custom, repeatable workflows for your project.

Creating Recipes

`bash

storm recipe init my-deploy # scaffold a new recipe

`

This creates .brainstorm/recipes/my-deploy.yaml:

`yaml

name: my-deploy

description: "Deploy to staging with database migration"

steps:

- name: check-status

agent: explore

prompt: "Verify all tests pass and there are no uncommitted changes"

- name: migrate

agent: code

prompt: "Run pending database migrations"

tools: [shell]

- name: deploy

agent: code

prompt: "Build and deploy to staging environment"

tools: [shell]

- name: verify

agent: explore

prompt: "Hit the health endpoint and verify the deployment is healthy"

tools: [web_fetch]

`

Running Recipes

`bash

storm recipe run my-deploy

storm recipe run my-deploy --dry-run # preview without executing

`

Listing Recipes

`bash

storm recipe list # show all available recipes

`

This lists both project-local recipes from .brainstorm/recipes/ and any globally installed recipes from ~/.brainstorm/recipes/.

Workflow Artifacts

Workflows and recipes produce artifacts that are persisted to disk with manifests. Artifacts include:

  • Generated code files
  • Test files
  • Documentation updates
  • Review reports
  • Execution logs with timing and cost data

Artifacts are stored in .brainstorm/artifacts/ and can be referenced in subsequent sessions.

Context Filtering

Each workflow step can specify which context to include, keeping the prompt focused:

`yaml

steps:

- name: review-auth

agent: review

context:

include: ["src/auth/", "src/middleware/"]

exclude: ["**/*.test.*"]

``

This prevents irrelevant files from consuming context window space during focused tasks.