Compare commits

...

61 Commits

Author SHA1 Message Date
manjaroblack
c48ddf462a chore: remove deprecated CLAUDE.md documentation file 2025-08-16 15:52:50 -05:00
Murat Ozcan
0c10ccd149 chore: add changelog cleanup workflow and remove Claude attribution 2025-08-16 15:52:35 -05:00
manjaroblack
a0a0b1ba6c chore(ci): harden release skip-ci condition for non-push triggers 2025-08-16 09:38:07 -05:00
manjaroblack
3c72d01f97 chore(ci): fix release workflow skip-ci expression 2025-08-16 09:34:23 -05:00
manjaroblack
e2b72c0618 refactor: simplify Windsurf workflow generation with minimal frontmatter format 2025-08-16 09:10:06 -05:00
manjaroblack
1e5dcd043a chore(yaml): enforce .yaml extension and prefer double quotes in YAML via eslint-plugin-yml; fix rule name; format repo 2025-08-15 23:49:14 -05:00
manjaroblack
312540327f style: standardize quote formatting and indentation in template files 2025-08-15 22:32:14 -05:00
manjaroblack
74c78d2274 chore: standardize ESLint/Prettier formatting across codebase 2025-08-15 22:22:24 -05:00
Brian Madison
e1176f337e feat: publish stable release 5.0.0
BREAKING CHANGE: Promote beta features to stable release for v5.0.0

This commit ensures the stable release gets properly published to NPM and GitHub releases.
2025-08-15 21:42:52 -05:00
github-actions[bot]
424cea6d8f release: promote to stable 5.0.0
- Promote beta features to stable release
- Update version from 4.38.0 to 5.0.0
- Automated promotion via GitHub Actions
2025-08-16 02:16:25 +00:00
github-actions[bot]
3092c9c9c2 Merge remote-tracking branch 'origin/main' into stable 2025-08-16 02:16:17 +00:00
Murat K Ozcan
0b61175d98 feat: transform QA agent into Test Architect with advanced quality ca… (#433)
* feat: transform QA agent into Test Architect with advanced quality capabilities

  - Add 6 specialized quality assessment commands
  - Implement risk-based testing with scoring
  - Create quality gate system with deterministic decisions
  - Add comprehensive test design and NFR validation
  - Update documentation with stage-based workflow integration

* feat: transform QA agent into Test Architect with advanced quality capabilities

  - Add 6 specialized quality assessment commands
  - Implement risk-based testing with scoring
  - Create quality gate system with deterministic decisions
  - Add comprehensive test design and NFR validation
  - Update documentation with stage-based workflow integration

* docs: refined the docs for test architect

* fix: addressed review comments from manjaroblack, round 1

* fix: addressed review comments from manjaroblack, round 1

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-08-15 21:02:37 -05:00
cecil-the-coder
33269c888d fix: resolve CommonJS import compatibility for chalk, inquirer, and ora (#442)
Adds .default fallback for CommonJS imports to resolve compatibility issues
with newer versions of chalk, inquirer, and ora packages.

Fixes installer failures when error handlers or interactive prompts are triggered.

Changes:
- chalk: require('chalk').default || require('chalk')
- inquirer: require('inquirer').default || require('inquirer')
- ora: require('ora').default || require('ora')

Affects: installer.js, ide-setup.js, file-manager.js, ide-base-setup.js, bmad.js

Co-authored-by: Cecil <cecilthecoder@gmail.com>
2025-08-15 21:01:30 -05:00
github-actions[bot]
3c7f922564 release: promote to stable 4.38.0
- Promote beta features to stable release
- Update version from 4.37.0 to 4.38.0
- Automated promotion via GitHub Actions
2025-08-16 01:26:10 +00:00
github-actions[bot]
12aaaa537b Merge remote-tracking branch 'origin/main' into stable 2025-08-16 01:26:00 +00:00
Brian Madison
7f016d0020 fix: add permissions and authentication for promotion workflow
- Add contents:write permission for GitHub Actions
- Configure git to use GITHUB_TOKEN for authentication
- Set remote URL with access token for push operations
- This should resolve the 403 permission denied error
2025-08-15 20:25:12 -05:00
Brian Madison
8b0b72b7b4 docs: document dual publishing strategy and automated promotion
- Add comprehensive documentation for dual publishing workflow
- Document GitHub Actions promotion process
- Clarify user experience for stable vs beta installations
- Include step-by-step promotion instructions
2025-08-15 20:18:36 -05:00
Brian Madison
1c3420335b test: trigger beta release to test current workflow
This will create a new beta version that we can then promote to stable using the new automated workflow
2025-08-15 20:17:58 -05:00
Brian Madison
fb02234b59 feat: add automated promotion workflow for stable releases
- Add GitHub Actions workflow for one-click promotion to stable
- Supports patch/minor/major version bumps
- Automatically merges main to stable and handles version updates
- Eliminates manual git operations for stable releases
2025-08-15 20:17:49 -05:00
Brian Madison
faff4e06a1 fix: update package-lock.json for semver dependency 2025-08-15 20:06:34 -05:00
Brian Madison
5e5c7ed98f release: create stable 4.37.0 release
Promote beta features to stable release with dual publishing support
2025-08-15 20:04:58 -05:00
Brian Madison
e0dcbcf527 fix: update versions for dual publishing beta releases 2025-08-15 20:03:10 -05:00
Brian Madison
75ba8d82e1 feat: republish beta with corrected dependencies and tags 2025-08-15 19:39:35 -05:00
Brian Madison
f3e429d746 feat: trigger new beta release with fixed dependencies
This creates a new beta version that includes the semver dependency fix
2025-08-15 19:38:06 -05:00
Brian Madison
5ceca3aeb9 fix: add semver dependency and correct NPM dist-tag configuration
- Add missing semver dependency to installer package.json
- Configure semantic-release to use correct channels (beta/latest)
- This ensures beta releases publish to @beta tag correctly
2025-08-15 19:33:07 -05:00
Brian Madison
8e324f60b0 fix: remove git plugin to resolve branch protection conflicts
- Beta releases don't need to commit version bumps back to repo
- This allows semantic-release to complete successfully
- NPM publishing will still work for @beta tag
2025-08-15 19:15:55 -05:00
Brian Madison
8a29f0e319 test: verify dual publishing workflow 2025-08-15 19:14:32 -05:00
Brian Madison
d92ba835fa feat: implement dual NPM publishing strategy
- Configure semantic-release for @beta and @latest tags
- Main branch publishes to @beta (bleeding edge)
- Stable branch publishes to @latest (production)
- Enable CI/CD workflow for both branches
2025-08-15 19:03:48 -05:00
Aaron
9868437f10 Add update-check command (#423)
* Add update-check command

* Adding additional information to update-check command and aligning with cli theme

* Correct update-check message to exclude global
2025-08-14 22:24:37 -05:00
Stefan Klümpers
d563266b97 feat: install Cursor rules to subdirectory (#438)
* feat: install Cursor rules to subdirectory

Implement feature request #376 to avoid filename collisions and confusion
between repo-specific and BMAD-specific rules.

Changes:
- Move Cursor rules from .cursor/rules/ to .cursor/rules/bmad/
- Update installer configuration to use new subdirectory structure
- Update upgrader to reflect new rule directory path

This keeps BMAD Method files separate from existing project rules,
reducing chance of conflicts and improving organization.

Fixes #376

* chore: correct formatting in cursor rules directory path

---------

Co-authored-by: Stefan Klümpers <stefan.kluempers@materna.group>
2025-08-14 22:23:44 -05:00
Yongjip Kim
3efcfd54d4 fix(docs): fix broken link in GUIDING-PRINCIPLES.md (#428)
Co-authored-by: Brian <bmadcode@gmail.com>
2025-08-14 13:40:11 -05:00
Benjamin Wiese
31e44b110e Remove bmad-core/bmad-core including empty file (#431)
Co-authored-by: Ben Wiese <benjamin.wiese@simplifier.io>
2025-08-14 13:39:28 -05:00
semantic-release-bot
ffcb4d4bf2 chore(release): 4.36.2 [skip ci]
## [4.36.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.36.1...v4.36.2) (2025-08-10)

### Bug Fixes

* align installer dependencies with root package versions for ESM compatibility ([#420](https://github.com/bmadcode/BMAD-METHOD/issues/420)) ([3f6b674](3f6b67443d))
2025-08-10 14:26:15 +00:00
circus
3f6b67443d fix: align installer dependencies with root package versions for ESM compatibility (#420)
Downgrade chalk, inquirer, and ora in tools/installer to CommonJS-compatible versions:
- chalk: ^5.4.1 -> ^4.1.2
- inquirer: ^12.6.3 -> ^8.2.6
- ora: ^8.2.0 -> ^5.4.1

Resolves 'is not a function' errors caused by ESM/CommonJS incompatibility.
2025-08-10 09:25:46 -05:00
semantic-release-bot
85a0d83fc5 chore(release): 4.36.1 [skip ci]
## [4.36.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.36.0...v4.36.1) (2025-08-09)

### Bug Fixes

* update Node.js version to 20 in release workflow and reduce Discord spam ([3f7e19a](3f7e19a098))
2025-08-09 20:49:42 +00:00
Brian Madison
3f7e19a098 fix: update Node.js version to 20 in release workflow and reduce Discord spam
- Update release workflow Node.js version from 18 to 20 to match package.json requirements
- Remove push trigger from Discord workflow to reduce notification spam

This should resolve the semantic-release content-length header error after org migration.
2025-08-09 15:49:13 -05:00
semantic-release-bot
23df54c955 chore(release): 4.36.0 [skip ci]
# [4.36.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.3...v4.36.0) (2025-08-09)

### Features

* modularize flattener tool into separate components with improved project root detection ([#417](https://github.com/bmadcode/BMAD-METHOD/issues/417)) ([0fdbca7](0fdbca73fc))
2025-08-09 20:33:49 +00:00
manjaroblack
0fdbca73fc feat: modularize flattener tool into separate components with improved project root detection (#417) 2025-08-09 15:33:23 -05:00
Daniel Willitzer
5d7d7c9015 Merge pull request #369 from antmikinka/pr/part-1-gcp-setup
Feat(Expansion Pack): Part 1 - Google Cloud Setup
2025-08-08 19:23:48 -07:00
Brian Madison
dd2b4ed5ac discord PR spam 2025-08-08 20:07:32 -05:00
Lior Assouline
8f40576681 Flatten venv & many other bins dir fix (#408)
* added .venv to ignore list of flattener

* more files pattern to ignore

---------

Co-authored-by: Lior Assouline <Lior.Assouline@harmonicinc.com>
2025-08-08 07:54:47 -05:00
Yanqing Wang
fe86675c5f Update link in README.md (#384) 2025-08-07 07:49:14 -05:00
semantic-release-bot
8211d2daff chore(release): 4.35.3 [skip ci]
## [4.35.3](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.2...v4.35.3) (2025-08-06)

### Bug Fixes

* doc location improvement ([1676f51](1676f5189e))
2025-08-06 05:01:55 +00:00
Brian Madison
1676f5189e fix: doc location improvement 2025-08-06 00:00:26 -05:00
semantic-release-bot
3c3d58939f chore(release): 4.35.2 [skip ci]
## [4.35.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.1...v4.35.2) (2025-08-06)

### Bug Fixes

* npx status check ([f7c2a4f](f7c2a4fb6c))
2025-08-06 03:34:49 +00:00
Brian Madison
2d954d3481 merge 2025-08-05 22:34:21 -05:00
Brian Madison
f7c2a4fb6c fix: npx status check 2025-08-05 22:33:47 -05:00
semantic-release-bot
9df28d5313 chore(release): 4.35.1 [skip ci]
## [4.35.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.0...v4.35.1) (2025-08-06)

### Bug Fixes

* npx hanging commands ([2cf322e](2cf322ee0d))
2025-08-06 03:22:35 +00:00
Brian Madison
2cf322ee0d fix: npx hanging commands 2025-08-05 22:22:04 -05:00
semantic-release-bot
5dc4043577 chore(release): 4.35.0 [skip ci]
# [4.35.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.34.0...v4.35.0) (2025-08-04)

### Features

* add qwen-code ide support to bmad installer. ([#392](https://github.com/bmadcode/BMAD-METHOD/issues/392)) ([a72b790](a72b790f3b))
2025-08-04 01:24:35 +00:00
Houston Zhang
a72b790f3b feat: add qwen-code ide support to bmad installer. (#392)
Co-authored-by: Djanghao <hstnz>
2025-08-03 20:24:09 -05:00
semantic-release-bot
55f834954f chore(release): 4.34.0 [skip ci]
# [4.34.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.33.1...v4.34.0) (2025-08-03)

### Features

* add KiloCode integration support to BMAD installer ([#390](https://github.com/bmadcode/BMAD-METHOD/issues/390)) ([dcebe91](dcebe91d5e))
2025-08-03 14:50:09 +00:00
Mbosinwa Awunor
dcebe91d5e feat: add KiloCode integration support to BMAD installer (#390) 2025-08-03 09:49:39 -05:00
caseyrubin
ce5b37b628 Update user-guide.md (#378)
Align pre-dev validation cycle with BMad method.
2025-07-30 22:07:19 -05:00
yaksh gandhi
c079c28dc4 Update README.md (#338) 2025-07-28 21:07:24 -05:00
semantic-release-bot
4fc8e752a6 chore(release): 4.33.1 [skip ci]
## [4.33.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.33.0...v4.33.1) (2025-07-29)

### Bug Fixes

* dev agent yaml syntax for develop-story command ([#362](https://github.com/bmadcode/BMAD-METHOD/issues/362)) ([bcb3728](bcb3728f88))
2025-07-29 02:05:28 +00:00
Duane Cilliers
bcb3728f88 fix: dev agent yaml syntax for develop-story command (#362) 2025-07-28 21:05:00 -05:00
semantic-release-bot
f7963cbaa9 chore(release): 4.33.0 [skip ci]
# [4.33.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.32.0...v4.33.0) (2025-07-28)

### Features

* version bump ([e9dd4e7](e9dd4e7beb))
2025-07-28 04:54:52 +00:00
Brian Madison
e9dd4e7beb feat: version bump 2025-07-27 23:54:23 -05:00
manjaroblack
a80ea150f2 eat: enhance flattener tool with improved CLI integration and custom directory support (#372)
* feat(cli): move flatten command to installer and update docs

Refactor the flatten command from tools/cli.js to tools/installer/bin/bmad.js for better integration. Add support for custom input directory and improve error handling. Update documentation in README.md and working-in-the-brownfield.md to reflect new command usage. Also clean up package-lock.json and add it to .gitignore.

* chore: update gitignore and add package-lock.json for installer tool

Remove package-lock.json from root gitignore since it's now needed for the installer tool
Add package-lock.json with dependencies for the bmad-method installer

---------

Co-authored-by: Devin Stagner <devin@blackstag.family>
2025-07-27 18:02:08 -05:00
antmikinka
c7fc5d3606 Feat(Expansion Pack): Part 1 - Google Cloud Setup 2025-07-27 12:26:53 -07:00
181 changed files with 33616 additions and 24015 deletions

View File

@@ -1,9 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
title: ''
labels: ''
assignees: ''
---
**Describe the bug**

View File

@@ -1,9 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
title: ''
labels: ''
assignees: ''
---
**Did you discuss the idea first in Discord Server (#general-dev)**

25
.github/workflows/discord.yaml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Discord Notification
"on":
[
pull_request,
release,
create,
delete,
issue_comment,
pull_request_review,
pull_request_review_comment,
]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
title: "Triggered by ${{ github.event_name }}"
color: 0x5865F2

42
.github/workflows/format-check.yaml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: format-check
"on":
pull_request:
branches: ["**"]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Prettier format check
run: npm run format:check
eslint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: ESLint
run: npm run lint

122
.github/workflows/promote-to-stable.yaml vendored Normal file
View File

@@ -0,0 +1,122 @@
name: Promote to Stable
"on":
workflow_dispatch:
inputs:
version_bump:
description: "Version bump type"
required: true
default: "minor"
type: choice
options:
- patch
- minor
- major
jobs:
promote:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Switch to stable branch
run: |
git checkout stable
git pull origin stable
- name: Merge main into stable
run: |
git merge origin/main --no-edit
- name: Install dependencies
run: npm ci
- name: Get current version and calculate new version
id: version
run: |
# Get current version from package.json
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
# Remove beta suffix if present
BASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-beta\.[0-9]\+//')
echo "base_version=$BASE_VERSION" >> $GITHUB_OUTPUT
# Calculate new version based on bump type
IFS='.' read -ra VERSION_PARTS <<< "$BASE_VERSION"
MAJOR=${VERSION_PARTS[0]}
MINOR=${VERSION_PARTS[1]}
PATCH=${VERSION_PARTS[2]}
case "${{ github.event.inputs.version_bump }}" in
"major")
NEW_VERSION="$((MAJOR + 1)).0.0"
;;
"minor")
NEW_VERSION="$MAJOR.$((MINOR + 1)).0"
;;
"patch")
NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
;;
*)
NEW_VERSION="$BASE_VERSION"
;;
esac
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "Promoting from $CURRENT_VERSION to $NEW_VERSION"
- name: Update package.json versions
run: |
# Update main package.json
npm version ${{ steps.version.outputs.new_version }} --no-git-tag-version
# Update installer package.json
sed -i 's/"version": ".*"/"version": "${{ steps.version.outputs.new_version }}"/' tools/installer/package.json
- name: Update package-lock.json
run: npm install --package-lock-only
- name: Commit stable release
run: |
git add .
git commit -m "release: promote to stable ${{ steps.version.outputs.new_version }}
- Promote beta features to stable release
- Update version from ${{ steps.version.outputs.current_version }} to ${{ steps.version.outputs.new_version }}
- Automated promotion via GitHub Actions"
- name: Push stable release
run: |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git push origin stable
- name: Switch back to main
run: git checkout main
- name: Summary
run: |
echo "🎉 Successfully promoted to stable!"
echo "📦 Version: ${{ steps.version.outputs.new_version }}"
echo "🚀 The stable release will be automatically published to NPM via semantic-release"
echo "✅ Users running 'npx bmad-method install' will now get version ${{ steps.version.outputs.new_version }}"

View File

@@ -1,8 +1,9 @@
name: Release
'on':
"on":
push:
branches:
- main
- stable
workflow_dispatch:
inputs:
version_type:
@@ -22,7 +23,7 @@ permissions:
jobs:
release:
runs-on: ubuntu-latest
if: '!contains(github.event.head_commit.message, ''[skip ci]'')'
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -32,9 +33,9 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: npm
registry-url: https://registry.npmjs.org
node-version: "20"
cache: "npm"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Run tests and validation
@@ -57,3 +58,17 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release
- name: Clean changelog formatting
if: github.event_name == 'push'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Remove any Claude Code attribution from changelog
sed -i '/🤖 Generated with \[Claude Code\]/,+2d' CHANGELOG.md || true
# Format and commit if changes exist
npm run format
if ! git diff --quiet CHANGELOG.md; then
git add CHANGELOG.md
git commit -m "chore: clean changelog formatting [skip ci]"
git push
fi

5
.gitignore vendored
View File

@@ -3,6 +3,8 @@ node_modules/
pnpm-lock.yaml
bun.lock
deno.lock
pnpm-workspace.yaml
package-lock.json
# Logs
logs/
@@ -23,7 +25,6 @@ Thumbs.db
# Development tools and configs
.prettierignore
.prettierrc
.husky/
# IDE and editor configs
.windsurf/
@@ -41,3 +42,5 @@ CLAUDE.md
.bmad-creator-tools
test-project-install/*
sample-project/*
flattened-codebase.xml

3
.husky/pre-commit Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env sh
npx --no-install lint-staged

View File

@@ -1,18 +1,27 @@
{
"branches": ["main"],
"branches": [
{
"name": "main",
"prerelease": "beta",
"channel": "beta"
},
{
"name": "stable",
"channel": "latest"
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"./tools/semantic-release-sync-installer.js",
[
"@semantic-release/git",
"@semantic-release/changelog",
{
"assets": ["package.json", "package-lock.json", "tools/installer/package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
"changelogFile": "CHANGELOG.md",
"changelogTitle": ""
}
],
"@semantic-release/npm",
"./tools/semantic-release-sync-installer.js",
"@semantic-release/github"
]
}

27
.vscode/settings.json vendored
View File

@@ -40,5 +40,30 @@
"tileset",
"Trae",
"VNET"
]
],
"json.schemas": [
{
"fileMatch": ["package.json"],
"url": "https://json.schemastore.org/package.json"
},
{
"fileMatch": [".vscode/settings.json"],
"url": "vscode://schemas/settings/folder"
}
],
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"prettier.prettierPath": "node_modules/prettier",
"prettier.requireConfig": true,
"yaml.format.enable": false,
"eslint.useFlatConfig": true,
"eslint.validate": ["javascript", "yaml"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.rulers": [100]
}

View File

@@ -1,15 +1,73 @@
# [4.32.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.31.0...v4.32.0) (2025-07-27)
## [4.36.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.36.1...v4.36.2) (2025-08-10)
### Bug Fixes
* Add package-lock.json to fix GitHub Actions dependency resolution ([cce7a75](https://github.com/bmadcode/BMAD-METHOD/commit/cce7a758a632053e26d143b678eb7963599b432d))
* GHA fix ([62ccccd](https://github.com/bmadcode/BMAD-METHOD/commit/62ccccdc9e85f8621f63f99bd1ce0d14abe09783))
- align installer dependencies with root package versions for ESM compatibility ([#420](https://github.com/bmadcode/BMAD-METHOD/issues/420)) ([3f6b674](https://github.com/bmadcode/BMAD-METHOD/commit/3f6b67443d61ae6add98656374bed27da4704644))
## [4.36.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.36.0...v4.36.1) (2025-08-09)
### Bug Fixes
- update Node.js version to 20 in release workflow and reduce Discord spam ([3f7e19a](https://github.com/bmadcode/BMAD-METHOD/commit/3f7e19a098155341a2b89796addc47b0623cb87a))
# [4.36.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.3...v4.36.0) (2025-08-09)
### Features
* Overhaul and Enhance 2D Unity Game Dev Expansion Pack ([#350](https://github.com/bmadcode/BMAD-METHOD/issues/350)) ([a7038d4](https://github.com/bmadcode/BMAD-METHOD/commit/a7038d43d18246f6aef175aa89ba059b7c94f61f))
- modularize flattener tool into separate components with improved project root detection ([#417](https://github.com/bmadcode/BMAD-METHOD/issues/417)) ([0fdbca7](https://github.com/bmadcode/BMAD-METHOD/commit/0fdbca73fc60e306109f682f018e105e2b4623a2))
## [4.35.3](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.2...v4.35.3) (2025-08-06)
### Bug Fixes
- doc location improvement ([1676f51](https://github.com/bmadcode/BMAD-METHOD/commit/1676f5189ed057fa2d7facbd6a771fe67cdb6372))
## [4.35.2](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.1...v4.35.2) (2025-08-06)
### Bug Fixes
- npx status check ([f7c2a4f](https://github.com/bmadcode/BMAD-METHOD/commit/f7c2a4fb6c454b17d250b85537129b01ffee6b85))
## [4.35.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.35.0...v4.35.1) (2025-08-06)
### Bug Fixes
- npx hanging commands ([2cf322e](https://github.com/bmadcode/BMAD-METHOD/commit/2cf322ee0d9b563a4998c72b2c5eab259594739b))
# [4.35.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.34.0...v4.35.0) (2025-08-04)
### Features
- add qwen-code ide support to bmad installer. ([#392](https://github.com/bmadcode/BMAD-METHOD/issues/392)) ([a72b790](https://github.com/bmadcode/BMAD-METHOD/commit/a72b790f3be6c77355511ace2d63e6bec4d751f1))
# [4.34.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.33.1...v4.34.0) (2025-08-03)
### Features
- add KiloCode integration support to BMAD installer ([#390](https://github.com/bmadcode/BMAD-METHOD/issues/390)) ([dcebe91](https://github.com/bmadcode/BMAD-METHOD/commit/dcebe91d5ea68e69aa27183411a81639d444efd7))
## [4.33.1](https://github.com/bmadcode/BMAD-METHOD/compare/v4.33.0...v4.33.1) (2025-07-29)
### Bug Fixes
- dev agent yaml syntax for develop-story command ([#362](https://github.com/bmadcode/BMAD-METHOD/issues/362)) ([bcb3728](https://github.com/bmadcode/BMAD-METHOD/commit/bcb3728f8868c0f83bca3d61fbd7e15c4e114526))
# [4.33.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.32.0...v4.33.0) (2025-07-28)
### Features
- version bump ([e9dd4e7](https://github.com/bmadcode/BMAD-METHOD/commit/e9dd4e7beb46d0c80df0cd65ae02d1867a56d7c1))
# [4.32.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.31.0...v4.32.0) (2025-07-27)
### Bug Fixes
- Add package-lock.json to fix GitHub Actions dependency resolution ([cce7a75](https://github.com/bmadcode/BMAD-METHOD/commit/cce7a758a632053e26d143b678eb7963599b432d))
- GHA fix ([62ccccd](https://github.com/bmadcode/BMAD-METHOD/commit/62ccccdc9e85f8621f63f99bd1ce0d14abe09783))
### Features
- Overhaul and Enhance 2D Unity Game Dev Expansion Pack ([#350](https://github.com/bmadcode/BMAD-METHOD/issues/350)) ([a7038d4](https://github.com/bmadcode/BMAD-METHOD/commit/a7038d43d18246f6aef175aa89ba059b7c94f61f))
# [4.31.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.30.4...v4.31.0) (2025-07-20)
@@ -516,10 +574,6 @@
- Manual version bumping via npm scripts is now disabled. Use conventional commits for automated releases.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
# [4.2.0](https://github.com/bmadcode/BMAD-METHOD/compare/v4.1.0...v4.2.0) (2025-06-15)
### Bug Fixes
@@ -628,3 +682,5 @@ Co-Authored-By: Claude <noreply@anthropic.com>
### Features
- add versioning and release automation ([0ea5e50](https://github.com/bmadcode/BMAD-METHOD/commit/0ea5e50aa7ace5946d0100c180dd4c0da3e2fd8c))
# Promote to stable release 5.0.0

View File

@@ -23,7 +23,7 @@ Foundations in Agentic Agile Driven Development, known as the Breakthrough Metho
This two-phase approach eliminates both **planning inconsistency** and **context loss** - the biggest problems in AI-assisted development. Your Dev agent opens a story file with complete understanding of what to build, how to build it, and why.
**📖 [See the complete workflow in the User Guide](bmad-core/user-guide.md)** - Planning phase, development cycle, and all agent roles
**📖 [See the complete workflow in the User Guide](docs/user-guide.md)** - Planning phase, development cycle, and all agent roles
## Quick Navigation
@@ -31,18 +31,18 @@ This two-phase approach eliminates both **planning inconsistency** and **context
**Before diving in, review these critical workflow diagrams that explain how BMad works:**
1. **[Planning Workflow (Web UI)](bmad-core/user-guide.md#the-planning-workflow-web-ui)** - How to create PRD and Architecture documents
2. **[Core Development Cycle (IDE)](bmad-core/user-guide.md#the-core-development-cycle-ide)** - How SM, Dev, and QA agents collaborate through story files
1. **[Planning Workflow (Web UI)](docs/user-guide.md#the-planning-workflow-web-ui)** - How to create PRD and Architecture documents
2. **[Core Development Cycle (IDE)](docs/user-guide.md#the-core-development-cycle-ide)** - How SM, Dev, and QA agents collaborate through story files
> ⚠️ **These diagrams explain 90% of BMad Method Agentic Agile flow confusion** - Understanding the PRD+Architecture creation and the SM/Dev/QA workflow and how agents pass notes through story files is essential - and also explains why this is NOT taskmaster or just a simple task runner!
### What would you like to do?
- **[Install and Build software with Full Stack Agile AI Team](#quick-start)** → Quick Start Instruction
- **[Learn how to use BMad](bmad-core/user-guide.md)** → Complete user guide and walkthrough
- **[See available AI agents](#available-agents)** → Specialized roles for your team
- **[Learn how to use BMad](docs/user-guide.md)** → Complete user guide and walkthrough
- **[See available AI agents](/bmad-core/agents))** → Specialized roles for your team
- **[Explore non-technical uses](#-beyond-software-development---expansion-packs)** → Creative writing, business, wellness, education
- **[Create my own AI agents](#creating-your-own-expansion-pack)** → Build agents for your domain
- **[Create my own AI agents](docs/expansion-packs.md)** → Build agents for your domain
- **[Browse ready-made expansion packs](expansion-packs/)** → Game dev, DevOps, infrastructure and get inspired with ideas and examples
- **[Understand the architecture](docs/core-architecture.md)** → Technical deep dive
- **[Join the community](https://discord.gg/gk8jAdXWmj)** → Get help and share ideas
@@ -97,7 +97,7 @@ This single command handles:
3. **Upload & configure**: Upload the file and set instructions: "Your critical operating instructions are attached, do not break character as directed"
4. **Start Ideating and Planning**: Start chatting! Type `*help` to see available commands or pick an agent like `*analyst` to start right in on creating a brief.
5. **CRITICAL**: Talk to BMad Orchestrator in the web at ANY TIME (#bmad-orchestrator command) and ask it questions about how this all works!
6. **When to move to the IDE**: Once you have your PRD, Architecture, optional UX and Briefs - its time to switch over to the IDE to shard your docs, and start implementing the actual code! See the [User guide](bmad-core/user-guide.md) for more details
6. **When to move to the IDE**: Once you have your PRD, Architecture, optional UX and Briefs - its time to switch over to the IDE to shard your docs, and start implementing the actual code! See the [User guide](docs/user-guide.md) for more details
### Alternative: Clone and Build
@@ -126,18 +126,25 @@ The BMad-Method includes a powerful codebase flattener tool designed to prepare
```bash
# Basic usage - creates flattened-codebase.xml in current directory
npm run flatten
npx bmad-method flatten
# Specify custom input directory
npx bmad-method flatten --input /path/to/source/directory
npx bmad-method flatten -i /path/to/source/directory
# Specify custom output file
npm run flatten -- --output my-project.xml
npm run flatten -- -o /path/to/output/codebase.xml
npx bmad-method flatten --output my-project.xml
npx bmad-method flatten -o /path/to/output/codebase.xml
# Combine input and output options
npx bmad-method flatten --input /path/to/source --output /path/to/output/codebase.xml
```
### Example Output
The tool will display progress and provide a comprehensive summary:
```
```text
📊 Completion Summary:
✅ Successfully processed 156 files into flattened-codebase.xml
📁 Output file: /path/to/your/project/flattened-codebase.xml
@@ -148,13 +155,46 @@ The tool will display progress and provide a comprehensive summary:
📊 File breakdown: 142 text, 14 binary, 0 errors
```
The generated XML file contains all your project's source code in a structured format that AI models can easily parse and understand, making it perfect for code reviews, architecture discussions, or getting AI assistance with your BMad-Method projects.
The generated XML file contains your project's text-based source files in a structured format that AI models can easily parse and understand, making it perfect for code reviews, architecture discussions, or getting AI assistance with your BMad-Method projects.
#### Advanced Usage & Options
- CLI options
- `-i, --input <path>`: Directory to flatten. Default: current working directory or auto-detected project root when run interactively.
- `-o, --output <path>`: Output file path. Default: `flattened-codebase.xml` in the chosen directory.
- Interactive mode
- If you do not pass `--input` and `--output` and the terminal is interactive (TTY), the tool will attempt to detect your project root (by looking for markers like `.git`, `package.json`, etc.) and prompt you to confirm or override the paths.
- In non-interactive contexts (e.g., CI), it will prefer the detected root silently; otherwise it falls back to the current directory and default filename.
- File discovery and ignoring
- Uses `git ls-files` when inside a git repository for speed and correctness; otherwise falls back to a glob-based scan.
- Applies your `.gitignore` plus a curated set of default ignore patterns (e.g., `node_modules`, build outputs, caches, logs, IDE folders, lockfiles, large media/binaries, `.env*`, and previously generated XML outputs).
- Binary handling
- Binary files are detected and excluded from the XML content. They are counted in the final summary but not embedded in the output.
- XML format and safety
- UTF-8 encoded file with root element `<files>`.
- Each text file is emitted as a `<file path="relative/path">` element whose content is wrapped in `<![CDATA[ ... ]]>`.
- The tool safely handles occurrences of `]]>` inside content by splitting the CDATA to preserve correctness.
- File contents are preserved as-is and indented for readability inside the XML.
- Performance
- Concurrency is selected automatically based on your CPU and workload size. No configuration required.
- Running inside a git repo improves discovery performance.
#### Minimal XML example
```xml
<?xml version="1.0" encoding="UTF-8"?>
<files>
<file path="src/index.js"><![CDATA[
// your source content
]]></file>
</files>
```
## Documentation & Resources
### Essential Guides
- 📖 **[User Guide](bmad-core/user-guide.md)** - Complete walkthrough from project inception to completion
- 📖 **[User Guide](docs/user-guide.md)** - Complete walkthrough from project inception to completion
- 🏗️ **[Core Architecture](docs/core-architecture.md)** - Technical deep dive and system design
- 🚀 **[Expansion Packs Guide](docs/expansion-packs.md)** - Extend BMad to any domain beyond software development

View File

@@ -4,7 +4,7 @@ bundle:
description: Includes every core system agent.
agents:
- bmad-orchestrator
- '*'
- "*"
workflows:
- brownfield-fullstack.yaml
- brownfield-service.yaml

View File

@@ -52,7 +52,7 @@ persona:
- Integrity of Information - Ensure accurate sourcing and representation
- Numbered Options Protocol - Always use numbered lists for selections
# All commands require * prefix when used (e.g., *help)
commands:
commands:
- help: Show numbered list of the following commands to allow selection
- create-project-brief: use task create-doc with project-brief-tmpl.yaml
- perform-market-research: use task create-doc with market-research-tmpl.yaml

View File

@@ -1,6 +1,5 @@
# architect
ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
@@ -53,12 +52,12 @@ persona:
- Cost-Conscious Engineering - Balance technical ideals with financial reality
- Living Architecture - Design for change and adaptation
# All commands require * prefix when used (e.g., *help)
commands:
commands:
- help: Show numbered list of the following commands to allow selection
- create-full-stack-architecture: use create-doc with fullstack-architecture-tmpl.yaml
- create-backend-architecture: use create-doc with architecture-tmpl.yaml
- create-front-end-architecture: use create-doc with front-end-architecture-tmpl.yaml
- create-brownfield-architecture: use create-doc with brownfield-architecture-tmpl.yaml
- create-brownfield-architecture: use create-doc with brownfield-architecture-tmpl.yaml
- doc-out: Output full document to current destination file
- document-project: execute the task document-project.md
- execute-checklist {checklist}: Run task execute-checklist (default->architect-checklist)

View File

@@ -1,6 +1,5 @@
# BMad Master
ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:

View File

@@ -1,6 +1,5 @@
# BMad Web Orchestrator
ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
@@ -52,9 +51,9 @@ persona:
- Always use numbered lists for choices
- Process commands starting with * immediately
- Always remind users that commands require * prefix
commands: # All commands require * prefix when used (e.g., *help, *agent pm)
commands: # All commands require * prefix when used (e.g., *help, *agent pm)
help: Show this guide with available agents and workflows
chat-mode: Start conversational mode for detailed assistance
chat-mode: Start conversational mode for detailed assistance
kb-mode: Load full BMad knowledge base
status: Show current context, active agent, and progress
agent: Transform into a specialized agent (list if name not specified)
@@ -72,42 +71,42 @@ commands: # All commands require * prefix when used (e.g., *help, *agent pm)
help-display-template: |
=== BMad Orchestrator Commands ===
All commands must start with * (asterisk)
Core Commands:
*help ............... Show this guide
*chat-mode .......... Start conversational mode for detailed assistance
*kb-mode ............ Load full BMad knowledge base
*status ............. Show current context, active agent, and progress
*exit ............... Return to BMad or exit session
Agent & Task Management:
*agent [name] ....... Transform into specialized agent (list if no name)
*task [name] ........ Run specific task (list if no name, requires agent)
*checklist [name] ... Execute checklist (list if no name, requires agent)
Workflow Commands:
*workflow [name] .... Start specific workflow (list if no name)
*workflow-guidance .. Get personalized help selecting the right workflow
*plan ............... Create detailed workflow plan before starting
*plan-status ........ Show current workflow plan progress
*plan-update ........ Update workflow plan status
Other Commands:
*yolo ............... Toggle skip confirmations mode
*party-mode ......... Group chat with all agents
*doc-out ............ Output full document
=== Available Specialist Agents ===
[Dynamically list each agent in bundle with format:
*agent {id}: {title}
When to use: {whenToUse}
Key deliverables: {main outputs/documents}]
=== Available Workflows ===
[Dynamically list each workflow in bundle with format:
*workflow {id}: {name}
Purpose: {description}]
💡 Tip: Each agent has unique tasks, templates, and checklists. Switch to an agent to access their capabilities!
fuzzy-matching:
@@ -132,7 +131,7 @@ workflow-guidance:
- Understand each workflow's purpose, options, and decision points
- Ask clarifying questions based on the workflow's structure
- Guide users through workflow selection when multiple options exist
- When appropriate, suggest: "Would you like me to create a detailed workflow plan before starting?"
- When appropriate, suggest: 'Would you like me to create a detailed workflow plan before starting?'
- For workflows with divergent paths, help users choose the right path
- Adapt questions to the specific domain (e.g., game dev vs infrastructure vs web dev)
- Only recommend workflows that actually exist in the current bundle

View File

@@ -35,10 +35,9 @@ agent:
id: dev
title: Full Stack Developer
icon: 💻
whenToUse: "Use for code implementation, debugging, refactoring, and development best practices"
whenToUse: 'Use for code implementation, debugging, refactoring, and development best practices'
customization:
persona:
role: Expert Senior Software Engineer & Implementation Specialist
style: Extremely concise, pragmatic, detail-oriented, solution-focused
@@ -52,20 +51,20 @@ core_principles:
- Numbered Options - Always use numbered lists when presenting choices to the user
# All commands require * prefix when used (e.g., *help)
commands:
commands:
- help: Show numbered list of the following commands to allow selection
- run-tests: Execute linting and tests
- explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer.
- exit: Say goodbye as the Developer, and then abandon inhabiting this persona
develop-story:
order-of-execution: "Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then update the task checkbox with [x]→Update story section File List to ensure it lists and new or modified or deleted source file→repeat order-of-execution until complete"
story-file-updates-ONLY:
- CRITICAL: ONLY UPDATE THE STORY FILE WITH UPDATES TO SECTIONS INDICATED BELOW. DO NOT MODIFY ANY OTHER SECTIONS.
- CRITICAL: You are ONLY authorized to edit these specific sections of story files - Tasks / Subtasks Checkboxes, Dev Agent Record section and all its subsections, Agent Model Used, Debug Log References, Completion Notes List, File List, Change Log, Status
- CRITICAL: DO NOT modify Status, Story, Acceptance Criteria, Dev Notes, Testing sections, or any other sections not listed above
blocking: "HALT for: Unapproved deps needed, confirm with user | Ambiguous after story check | 3 failures attempting to implement or fix something repeatedly | Missing config | Failing regression"
ready-for-review: "Code matches requirements + All validations pass + Follows standards + File List complete"
completion: "All Tasks and Subtasks marked [x] and have tests→Validations and full regression passes (DON'T BE LAZY, EXECUTE ALL TESTS and CONFIRM)→Ensure File List is Complete→run the task execute-checklist for the checklist story-dod-checklist→set story status: 'Ready for Review'→HALT"
- develop-story:
- order-of-execution: 'Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then update the task checkbox with [x]→Update story section File List to ensure it lists and new or modified or deleted source file→repeat order-of-execution until complete'
- story-file-updates-ONLY:
- CRITICAL: ONLY UPDATE THE STORY FILE WITH UPDATES TO SECTIONS INDICATED BELOW. DO NOT MODIFY ANY OTHER SECTIONS.
- CRITICAL: You are ONLY authorized to edit these specific sections of story files - Tasks / Subtasks Checkboxes, Dev Agent Record section and all its subsections, Agent Model Used, Debug Log References, Completion Notes List, File List, Change Log, Status
- CRITICAL: DO NOT modify Status, Story, Acceptance Criteria, Dev Notes, Testing sections, or any other sections not listed above
- blocking: 'HALT for: Unapproved deps needed, confirm with user | Ambiguous after story check | 3 failures attempting to implement or fix something repeatedly | Missing config | Failing regression'
- ready-for-review: 'Code matches requirements + All validations pass + Follows standards + File List complete'
- completion: "All Tasks and Subtasks marked [x] and have tests→Validations and full regression passes (DON'T BE LAZY, EXECUTE ALL TESTS and CONFIRM)→Ensure File List is Complete→run the task execute-checklist for the checklist story-dod-checklist→set story status: 'Ready for Review'→HALT"
dependencies:
tasks:

View File

@@ -51,7 +51,7 @@ persona:
- Focus on Executable & Value-Driven Increments - Ensure work aligns with MVP goals
- Documentation Ecosystem Integrity - Maintain consistency across all documents
# All commands require * prefix when used (e.g., *help)
commands:
commands:
- help: Show numbered list of the following commands to allow selection
- execute-checklist-po: Run task execute-checklist (checklist po-master-checklist)
- shard-doc {document} {destination}: run the task shard-doc against the optionally provided document to the specified destination

View File

@@ -30,40 +30,59 @@ activation-instructions:
agent:
name: Quinn
id: qa
title: Senior Developer & QA Architect
title: Test Architect & Quality Advisor
icon: 🧪
whenToUse: Use for senior code review, refactoring, test planning, quality assurance, and mentoring through code improvements
whenToUse: |
Use for comprehensive test architecture review, quality gate decisions,
and code improvement. Provides thorough analysis including requirements
traceability, risk assessment, and test strategy.
Advisory only - teams choose their quality bar.
customization: null
persona:
role: Senior Developer & Test Architect
style: Methodical, detail-oriented, quality-focused, mentoring, strategic
identity: Senior developer with deep expertise in code quality, architecture, and test automation
focus: Code excellence through review, refactoring, and comprehensive testing strategies
role: Test Architect with Quality Advisory Authority
style: Comprehensive, systematic, advisory, educational, pragmatic
identity: Test architect who provides thorough quality assessment and actionable recommendations without blocking progress
focus: Comprehensive quality analysis through test architecture, risk assessment, and advisory gates
core_principles:
- Senior Developer Mindset - Review and improve code as a senior mentoring juniors
- Active Refactoring - Don't just identify issues, fix them with clear explanations
- Test Strategy & Architecture - Design holistic testing strategies across all levels
- Code Quality Excellence - Enforce best practices, patterns, and clean code principles
- Shift-Left Testing - Integrate testing early in development lifecycle
- Performance & Security - Proactively identify and fix performance/security issues
- Mentorship Through Action - Explain WHY and HOW when making improvements
- Risk-Based Testing - Prioritize testing based on risk and critical areas
- Continuous Improvement - Balance perfection with pragmatism
- Architecture & Design Patterns - Ensure proper patterns and maintainable code structure
- Depth As Needed - Go deep based on risk signals, stay concise when low risk
- Requirements Traceability - Map all stories to tests using Given-When-Then patterns
- Risk-Based Testing - Assess and prioritize by probability × impact
- Quality Attributes - Validate NFRs (security, performance, reliability) via scenarios
- Testability Assessment - Evaluate controllability, observability, debuggability
- Gate Governance - Provide clear PASS/CONCERNS/FAIL/WAIVED decisions with rationale
- Advisory Excellence - Educate through documentation, never block arbitrarily
- Technical Debt Awareness - Identify and quantify debt with improvement suggestions
- LLM Acceleration - Use LLMs to accelerate thorough yet focused analysis
- Pragmatic Balance - Distinguish must-fix from nice-to-have improvements
story-file-permissions:
- CRITICAL: When reviewing stories, you are ONLY authorized to update the "QA Results" section of story files
- CRITICAL: DO NOT modify any other sections including Status, Story, Acceptance Criteria, Tasks/Subtasks, Dev Notes, Testing, Dev Agent Record, Change Log, or any other sections
- CRITICAL: Your updates must be limited to appending your review results in the QA Results section only
# All commands require * prefix when used (e.g., *help)
commands:
commands:
- help: Show numbered list of the following commands to allow selection
- review {story}: execute the task review-story for the highest sequence story in docs/stories unless another is specified - keep any specified technical-preferences in mind as needed
- exit: Say goodbye as the QA Engineer, and then abandon inhabiting this persona
- review {story}: |
Adaptive, risk-aware comprehensive review.
Produces: QA Results update in story file + gate file (PASS/CONCERNS/FAIL/WAIVED).
Gate file location: docs/qa/gates/{epic}.{story}-{slug}.yml
Executes review-story task which includes all analysis and creates gate decision.
- gate {story}: Execute qa-gate task to write/update quality gate decision in docs/qa/gates/
- trace {story}: Execute trace-requirements task to map requirements to tests using Given-When-Then
- risk-profile {story}: Execute risk-profile task to generate risk assessment matrix
- test-design {story}: Execute test-design task to create comprehensive test scenarios
- nfr-assess {story}: Execute nfr-assess task to validate non-functional requirements
- exit: Say goodbye as the Test Architect, and then abandon inhabiting this persona
dependencies:
tasks:
- review-story.md
- qa-gate.md
- trace-requirements.md
- risk-profile.md
- test-design.md
- nfr-assess.md
data:
- technical-preferences.md
templates:
- story-tmpl.yaml
- qa-gate-tmpl.yaml
```

View File

@@ -44,7 +44,7 @@ persona:
- Will ensure all information comes from the PRD and Architecture to guide the dumb dev agent
- You are NOT allowed to implement stories or modify code EVER!
# All commands require * prefix when used (e.g., *help)
commands:
commands:
- help: Show numbered list of the following commands to allow selection
- draft: Execute task create-next-story.md
- correct-course: Execute task correct-course.md

View File

@@ -49,7 +49,7 @@ persona:
- You're particularly skilled at translating user needs into beautiful, functional designs.
- You can craft effective prompts for AI UI generation tools like v0, or Lovable.
# All commands require * prefix when used (e.g., *help)
commands:
commands:
- help: Show numbered list of the following commands to allow selection
- create-front-end-spec: run task create-doc.md with template front-end-spec-tmpl.yaml
- generate-ui-prompt: Run task generate-ai-frontend-prompt.md

View File

@@ -403,33 +403,28 @@ Ask the user if they want to work through the checklist:
Now that you've completed the checklist, generate a comprehensive validation report that includes:
1. Executive Summary
- Overall architecture readiness (High/Medium/Low)
- Critical risks identified
- Key strengths of the architecture
- Project type (Full-stack/Frontend/Backend) and sections evaluated
2. Section Analysis
- Pass rate for each major section (percentage of items passed)
- Most concerning failures or gaps
- Sections requiring immediate attention
- Note any sections skipped due to project type
3. Risk Assessment
- Top 5 risks by severity
- Mitigation recommendations for each
- Timeline impact of addressing issues
4. Recommendations
- Must-fix items before development
- Should-fix items for better quality
- Nice-to-have improvements
5. AI Implementation Readiness
- Specific concerns for AI agent implementation
- Areas needing additional clarification
- Complexity hotspots to address

View File

@@ -304,7 +304,6 @@ Ask the user if they want to work through the checklist:
Create a comprehensive validation report that includes:
1. Executive Summary
- Overall PRD completeness (percentage)
- MVP scope appropriateness (Too Large/Just Right/Too Small)
- Readiness for architecture phase (Ready/Nearly Ready/Not Ready)
@@ -312,26 +311,22 @@ Create a comprehensive validation report that includes:
2. Category Analysis Table
Fill in the actual table with:
- Status: PASS (90%+ complete), PARTIAL (60-89%), FAIL (<60%)
- Critical Issues: Specific problems that block progress
3. Top Issues by Priority
- BLOCKERS: Must fix before architect can proceed
- HIGH: Should fix for quality
- MEDIUM: Would improve clarity
- LOW: Nice to have
4. MVP Scope Assessment
- Features that might be cut for true MVP
- Missing features that are essential
- Complexity concerns
- Timeline realism
5. Technical Readiness
- Clarity of technical constraints
- Identified technical risks
- Areas needing architect investigation

View File

@@ -8,12 +8,10 @@ PROJECT TYPE DETECTION:
First, determine the project type by checking:
1. Is this a GREENFIELD project (new from scratch)?
- Look for: New project initialization, no existing codebase references
- Check for: prd.md, architecture.md, new project setup stories
2. Is this a BROWNFIELD project (enhancing existing system)?
- Look for: References to existing codebase, enhancement/modification language
- Check for: brownfield-prd.md, brownfield-architecture.md, existing system analysis
@@ -347,7 +345,6 @@ Ask the user if they want to work through the checklist:
Generate a comprehensive validation report that adapts to project type:
1. Executive Summary
- Project type: [Greenfield/Brownfield] with [UI/No UI]
- Overall readiness (percentage)
- Go/No-Go recommendation
@@ -357,42 +354,36 @@ Generate a comprehensive validation report that adapts to project type:
2. Project-Specific Analysis
FOR GREENFIELD:
- Setup completeness
- Dependency sequencing
- MVP scope appropriateness
- Development timeline feasibility
FOR BROWNFIELD:
- Integration risk level (High/Medium/Low)
- Existing system impact assessment
- Rollback readiness
- User disruption potential
3. Risk Assessment
- Top 5 risks by severity
- Mitigation recommendations
- Timeline impact of addressing issues
- [BROWNFIELD] Specific integration risks
4. MVP Completeness
- Core features coverage
- Missing essential functionality
- Scope creep identified
- True MVP vs over-engineering
5. Implementation Readiness
- Developer clarity score (1-10)
- Ambiguous requirements count
- Missing technical details
- [BROWNFIELD] Integration point clarity
6. Recommendations
- Must-fix before development
- Should-fix for quality
- Consider for improvement

View File

@@ -25,14 +25,12 @@ The goal is quality delivery, not just checking boxes.]]
1. **Requirements Met:**
[[LLM: Be specific - list each requirement and whether it's complete]]
- [ ] All functional requirements specified in the story are implemented.
- [ ] All acceptance criteria defined in the story are met.
2. **Coding Standards & Project Structure:**
[[LLM: Code quality matters for maintainability. Check each item carefully]]
- [ ] All new/modified code strictly adheres to `Operational Guidelines`.
- [ ] All new/modified code aligns with `Project Structure` (file locations, naming, etc.).
- [ ] Adherence to `Tech Stack` for technologies/versions used (if story introduces or modifies tech usage).
@@ -44,7 +42,6 @@ The goal is quality delivery, not just checking boxes.]]
3. **Testing:**
[[LLM: Testing proves your code works. Be honest about test coverage]]
- [ ] All required unit tests as per the story and `Operational Guidelines` Testing Strategy are implemented.
- [ ] All required integration tests (if applicable) as per the story and `Operational Guidelines` Testing Strategy are implemented.
- [ ] All tests (unit, integration, E2E if applicable) pass successfully.
@@ -53,14 +50,12 @@ The goal is quality delivery, not just checking boxes.]]
4. **Functionality & Verification:**
[[LLM: Did you actually run and test your code? Be specific about what you tested]]
- [ ] Functionality has been manually verified by the developer (e.g., running the app locally, checking UI, testing API endpoints).
- [ ] Edge cases and potential error conditions considered and handled gracefully.
5. **Story Administration:**
[[LLM: Documentation helps the next developer. What should they know?]]
- [ ] All tasks within the story file are marked as complete.
- [ ] Any clarifications or decisions made during development are documented in the story file or linked appropriately.
- [ ] The story wrap up section has been completed with notes of changes or information relevant to the next story or overall project, the agent model that was primarily used during development, and the changelog of any changes is properly updated.
@@ -68,7 +63,6 @@ The goal is quality delivery, not just checking boxes.]]
6. **Dependencies, Build & Configuration:**
[[LLM: Build issues block everyone. Ensure everything compiles and runs cleanly]]
- [ ] Project builds successfully without errors.
- [ ] Project linting passes
- [ ] Any new dependencies added were either pre-approved in the story requirements OR explicitly approved by the user during development (approval documented in story file).
@@ -79,7 +73,6 @@ The goal is quality delivery, not just checking boxes.]]
7. **Documentation (If Applicable):**
[[LLM: Good documentation prevents future confusion. What needs explaining?]]
- [ ] Relevant inline code documentation (e.g., JSDoc, TSDoc, Python docstrings) for new public APIs or complex logic is complete.
- [ ] User-facing documentation updated, if changes impact users.
- [ ] Technical documentation (e.g., READMEs, system diagrams) updated if significant architectural changes were made.

View File

@@ -117,19 +117,16 @@ Note: We don't need every file listed - just the important ones.]]
Generate a concise validation report:
1. Quick Summary
- Story readiness: READY / NEEDS REVISION / BLOCKED
- Clarity score (1-10)
- Major gaps identified
2. Fill in the validation table with:
- PASS: Requirements clearly met
- PARTIAL: Some gaps but workable
- FAIL: Critical information missing
3. Specific Issues (if any)
- List concrete problems to fix
- Suggest specific improvements
- Identify any blocking dependencies

View File

@@ -298,7 +298,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
- **Claude Code**: `/agent-name` (e.g., `/bmad-master`)
- **Cursor**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `/agent-name` (e.g., `/bmad-master`)
- **Trae**: `@agent-name` (e.g., `@bmad-master`)
- **Roo Code**: Select mode from mode selector (e.g., `bmad-master`)
- **GitHub Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
@@ -542,7 +542,7 @@ Each status change requires user verification and approval before proceeding.
#### Greenfield Development
- Business analysis and market research
- Product requirements and feature definition
- Product requirements and feature definition
- System architecture and design
- Development execution
- Testing and deployment
@@ -651,8 +651,11 @@ Templates with Level 2 headings (`##`) can be automatically sharded:
```markdown
## Goals and Background Context
## Requirements
## Requirements
## User Interface Design Goals
## Success Metrics
```

View File

@@ -3,16 +3,19 @@
## Core Reflective Methods
**Expand or Contract for Audience**
- Ask whether to 'expand' (add detail, elaborate) or 'contract' (simplify, clarify)
- Identify specific target audience if relevant
- Tailor content complexity and depth accordingly
**Explain Reasoning (CoT Step-by-Step)**
- Walk through the step-by-step thinking process
- Reveal underlying assumptions and decision points
- Show how conclusions were reached from current role's perspective
**Critique and Refine**
- Review output for flaws, inconsistencies, or improvement areas
- Identify specific weaknesses from role's expertise
- Suggest refined version reflecting domain knowledge
@@ -20,12 +23,14 @@
## Structural Analysis Methods
**Analyze Logical Flow and Dependencies**
- Examine content structure for logical progression
- Check internal consistency and coherence
- Identify and validate dependencies between elements
- Confirm effective ordering and sequencing
**Assess Alignment with Overall Goals**
- Evaluate content contribution to stated objectives
- Identify any misalignments or gaps
- Interpret alignment from specific role's perspective
@@ -34,12 +39,14 @@
## Risk and Challenge Methods
**Identify Potential Risks and Unforeseen Issues**
- Brainstorm potential risks from role's expertise
- Identify overlooked edge cases or scenarios
- Anticipate unintended consequences
- Highlight implementation challenges
**Challenge from Critical Perspective**
- Adopt critical stance on current content
- Play devil's advocate from specified viewpoint
- Argue against proposal highlighting weaknesses
@@ -48,12 +55,14 @@
## Creative Exploration Methods
**Tree of Thoughts Deep Dive**
- Break problem into discrete "thoughts" or intermediate steps
- Explore multiple reasoning paths simultaneously
- Use self-evaluation to classify each path as "sure", "likely", or "impossible"
- Apply search algorithms (BFS/DFS) to find optimal solution paths
**Hindsight is 20/20: The 'If Only...' Reflection**
- Imagine retrospective scenario based on current content
- Identify the one "if only we had known/done X..." insight
- Describe imagined consequences humorously or dramatically
@@ -62,6 +71,7 @@
## Multi-Persona Collaboration Methods
**Agile Team Perspective Shift**
- Rotate through different Scrum team member viewpoints
- Product Owner: Focus on user value and business impact
- Scrum Master: Examine process flow and team dynamics
@@ -69,12 +79,14 @@
- QA: Identify testing scenarios and quality concerns
**Stakeholder Round Table**
- Convene virtual meeting with multiple personas
- Each persona contributes unique perspective on content
- Identify conflicts and synergies between viewpoints
- Synthesize insights into actionable recommendations
**Meta-Prompting Analysis**
- Step back to analyze the structure and logic of current approach
- Question the format and methodology being used
- Suggest alternative frameworks or mental models
@@ -83,24 +95,28 @@
## Advanced 2025 Techniques
**Self-Consistency Validation**
- Generate multiple reasoning paths for same problem
- Compare consistency across different approaches
- Identify most reliable and robust solution
- Highlight areas where approaches diverge and why
**ReWOO (Reasoning Without Observation)**
- Separate parametric reasoning from tool-based actions
- Create reasoning plan without external dependencies
- Identify what can be solved through pure reasoning
- Optimize for efficiency and reduced token usage
**Persona-Pattern Hybrid**
- Combine specific role expertise with elicitation pattern
- Architect + Risk Analysis: Deep technical risk assessment
- UX Expert + User Journey: End-to-end experience critique
- PM + Stakeholder Analysis: Multi-perspective impact review
**Emergent Collaboration Discovery**
- Allow multiple perspectives to naturally emerge
- Identify unexpected insights from persona interactions
- Explore novel combinations of viewpoints
@@ -109,18 +125,21 @@
## Game-Based Elicitation Methods
**Red Team vs Blue Team**
- Red Team: Attack the proposal, find vulnerabilities
- Blue Team: Defend and strengthen the approach
- Competitive analysis reveals blind spots
- Results in more robust, battle-tested solutions
**Innovation Tournament**
- Pit multiple alternative approaches against each other
- Score each approach across different criteria
- Crowd-source evaluation from different personas
- Identify winning combination of features
**Escape Room Challenge**
- Present content as constraints to work within
- Find creative solutions within tight limitations
- Identify minimum viable approach
@@ -129,6 +148,7 @@
## Process Control
**Proceed / No Further Actions**
- Acknowledge choice to finalize current work
- Accept output as-is or move to next step
- Prepare to continue without additional elicitation

View File

@@ -0,0 +1,146 @@
# Test Levels Framework
Comprehensive guide for determining appropriate test levels (unit, integration, E2E) for different scenarios.
## Test Level Decision Matrix
### Unit Tests
**When to use:**
- Testing pure functions and business logic
- Algorithm correctness
- Input validation and data transformation
- Error handling in isolated components
- Complex calculations or state machines
**Characteristics:**
- Fast execution (immediate feedback)
- No external dependencies (DB, API, file system)
- Highly maintainable and stable
- Easy to debug failures
**Example scenarios:**
```yaml
unit_test:
component: 'PriceCalculator'
scenario: 'Calculate discount with multiple rules'
justification: 'Complex business logic with multiple branches'
mock_requirements: 'None - pure function'
```
### Integration Tests
**When to use:**
- Component interaction verification
- Database operations and transactions
- API endpoint contracts
- Service-to-service communication
- Middleware and interceptor behavior
**Characteristics:**
- Moderate execution time
- Tests component boundaries
- May use test databases or containers
- Validates system integration points
**Example scenarios:**
```yaml
integration_test:
components: ['UserService', 'AuthRepository']
scenario: 'Create user with role assignment'
justification: 'Critical data flow between service and persistence'
test_environment: 'In-memory database'
```
### End-to-End Tests
**When to use:**
- Critical user journeys
- Cross-system workflows
- Visual regression testing
- Compliance and regulatory requirements
- Final validation before release
**Characteristics:**
- Slower execution
- Tests complete workflows
- Requires full environment setup
- Most realistic but most brittle
**Example scenarios:**
```yaml
e2e_test:
journey: 'Complete checkout process'
scenario: 'User purchases with saved payment method'
justification: 'Revenue-critical path requiring full validation'
environment: 'Staging with test payment gateway'
```
## Test Level Selection Rules
### Favor Unit Tests When:
- Logic can be isolated
- No side effects involved
- Fast feedback needed
- High cyclomatic complexity
### Favor Integration Tests When:
- Testing persistence layer
- Validating service contracts
- Testing middleware/interceptors
- Component boundaries critical
### Favor E2E Tests When:
- User-facing critical paths
- Multi-system interactions
- Regulatory compliance scenarios
- Visual regression important
## Anti-patterns to Avoid
- E2E testing for business logic validation
- Unit testing framework behavior
- Integration testing third-party libraries
- Duplicate coverage across levels
## Duplicate Coverage Guard
**Before adding any test, check:**
1. Is this already tested at a lower level?
2. Can a unit test cover this instead of integration?
3. Can an integration test cover this instead of E2E?
**Coverage overlap is only acceptable when:**
- Testing different aspects (unit: logic, integration: interaction, e2e: user experience)
- Critical paths requiring defense in depth
- Regression prevention for previously broken functionality
## Test Naming Conventions
- Unit: `test_{component}_{scenario}`
- Integration: `test_{flow}_{interaction}`
- E2E: `test_{journey}_{outcome}`
## Test ID Format
`{EPIC}.{STORY}-{LEVEL}-{SEQ}`
Examples:
- `1.3-UNIT-001`
- `1.3-INT-002`
- `1.3-E2E-001`

View File

@@ -0,0 +1,172 @@
# Test Priorities Matrix
Guide for prioritizing test scenarios based on risk, criticality, and business impact.
## Priority Levels
### P0 - Critical (Must Test)
**Criteria:**
- Revenue-impacting functionality
- Security-critical paths
- Data integrity operations
- Regulatory compliance requirements
- Previously broken functionality (regression prevention)
**Examples:**
- Payment processing
- Authentication/authorization
- User data creation/deletion
- Financial calculations
- GDPR/privacy compliance
**Testing Requirements:**
- Comprehensive coverage at all levels
- Both happy and unhappy paths
- Edge cases and error scenarios
- Performance under load
### P1 - High (Should Test)
**Criteria:**
- Core user journeys
- Frequently used features
- Features with complex logic
- Integration points between systems
- Features affecting user experience
**Examples:**
- User registration flow
- Search functionality
- Data import/export
- Notification systems
- Dashboard displays
**Testing Requirements:**
- Primary happy paths required
- Key error scenarios
- Critical edge cases
- Basic performance validation
### P2 - Medium (Nice to Test)
**Criteria:**
- Secondary features
- Admin functionality
- Reporting features
- Configuration options
- UI polish and aesthetics
**Examples:**
- Admin settings panels
- Report generation
- Theme customization
- Help documentation
- Analytics tracking
**Testing Requirements:**
- Happy path coverage
- Basic error handling
- Can defer edge cases
### P3 - Low (Test if Time Permits)
**Criteria:**
- Rarely used features
- Nice-to-have functionality
- Cosmetic issues
- Non-critical optimizations
**Examples:**
- Advanced preferences
- Legacy feature support
- Experimental features
- Debug utilities
**Testing Requirements:**
- Smoke tests only
- Can rely on manual testing
- Document known limitations
## Risk-Based Priority Adjustments
### Increase Priority When:
- High user impact (affects >50% of users)
- High financial impact (>$10K potential loss)
- Security vulnerability potential
- Compliance/legal requirements
- Customer-reported issues
- Complex implementation (>500 LOC)
- Multiple system dependencies
### Decrease Priority When:
- Feature flag protected
- Gradual rollout planned
- Strong monitoring in place
- Easy rollback capability
- Low usage metrics
- Simple implementation
- Well-isolated component
## Test Coverage by Priority
| Priority | Unit Coverage | Integration Coverage | E2E Coverage |
| -------- | ------------- | -------------------- | ------------------ |
| P0 | >90% | >80% | All critical paths |
| P1 | >80% | >60% | Main happy paths |
| P2 | >60% | >40% | Smoke tests |
| P3 | Best effort | Best effort | Manual only |
## Priority Assignment Rules
1. **Start with business impact** - What happens if this fails?
2. **Consider probability** - How likely is failure?
3. **Factor in detectability** - Would we know if it failed?
4. **Account for recoverability** - Can we fix it quickly?
## Priority Decision Tree
```
Is it revenue-critical?
├─ YES → P0
└─ NO → Does it affect core user journey?
├─ YES → Is it high-risk?
│ ├─ YES → P0
│ └─ NO → P1
└─ NO → Is it frequently used?
├─ YES → P1
└─ NO → Is it customer-facing?
├─ YES → P2
└─ NO → P3
```
## Test Execution Order
1. Execute P0 tests first (fail fast on critical issues)
2. Execute P1 tests second (core functionality)
3. Execute P2 tests if time permits
4. P3 tests only in full regression cycles
## Continuous Adjustment
Review and adjust priorities based on:
- Production incident patterns
- User feedback and complaints
- Usage analytics
- Test failure history
- Business priority changes

View File

@@ -1,43 +0,0 @@
# Enhanced Development Workflow
This is a simple step-by-step guide to help you efficiently manage your development workflow using the BMad Method. Refer to the **[<ins>User Guide</ins>](user-guide.md)** for any scenario that is not covered here.
## Create new Branch
1. **Start new branch**
## Story Creation (Scrum Master)
1. **Start new chat/conversation**
2. **Load SM agent**
3. **Execute**: `*draft` (runs create-next-story task)
4. **Review generated story** in `docs/stories/`
5. **Update status**: Change from "Draft" to "Approved"
## Story Implementation (Developer)
1. **Start new chat/conversation**
2. **Load Dev agent**
3. **Execute**: `*develop-story {selected-story}` (runs execute-checklist task)
4. **Review generated report** in `{selected-story}`
## Story Review (Quality Assurance)
1. **Start new chat/conversation**
2. **Load QA agent**
3. **Execute**: `*review {selected-story}` (runs review-story task)
4. **Review generated report** in `{selected-story}`
## Commit Changes and Push
1. **Commit changes**
2. **Push to remote**
## Repeat Until Complete
- **SM**: Create next story → Review → Approve
- **Dev**: Implement story → Complete → Mark Ready for Review
- **QA**: Review story → Mark done
- **Commit**: All changes
- **Push**: To remote
- **Continue**: Until all features implemented

View File

@@ -128,7 +128,7 @@ Critical: For brownfield, ALWAYS include criteria about maintaining existing fun
Standard structure:
1. New functionality works as specified
2. Existing {{affected feature}} continues to work unchanged
2. Existing {{affected feature}} continues to work unchanged
3. Integration with {{existing system}} maintains current behavior
4. No regression in {{related area}}
5. Performance remains within acceptable bounds
@@ -139,16 +139,19 @@ Critical: This is where you'll need to be interactive with the user if informati
Create Dev Technical Guidance section with available information:
```markdown
````markdown
## Dev Technical Guidance
### Existing System Context
[Extract from available documentation]
### Integration Approach
[Based on patterns found or ask user]
### Technical Constraints
[From documentation or user input]
### Missing Information
@@ -191,6 +194,7 @@ Example task structure for brownfield:
- [ ] Integration test for {{integration point}}
- [ ] Update existing tests if needed
```
````
### 5. Risk Assessment and Mitigation
@@ -202,14 +206,17 @@ Add section for brownfield-specific risks:
## Risk Assessment
### Implementation Risks
- **Primary Risk**: {{main risk to existing system}}
- **Mitigation**: {{how to address}}
- **Verification**: {{how to confirm safety}}
### Rollback Plan
- {{Simple steps to undo changes if needed}}
### Safety Checks
- [ ] Existing {{feature}} tested before changes
- [ ] Changes can be feature-flagged or isolated
- [ ] Rollback procedure documented
@@ -252,6 +259,7 @@ Include header noting documentation context:
<!-- Context: Brownfield enhancement to {{existing system}} -->
## Status: Draft
[Rest of story content...]
```
@@ -272,7 +280,7 @@ Key Integration Points Identified:
Risks Noted:
- {{primary risk}}
{{If missing info}}:
{{If missing info}}:
Note: Some technical details were unclear. The story includes exploration tasks to gather needed information during implementation.
Next Steps:

View File

@@ -21,63 +21,54 @@ CRITICAL: First, help the user select the most appropriate research focus based
Present these numbered options to the user:
1. **Product Validation Research**
- Validate product hypotheses and market fit
- Test assumptions about user needs and solutions
- Assess technical and business feasibility
- Identify risks and mitigation strategies
2. **Market Opportunity Research**
- Analyze market size and growth potential
- Identify market segments and dynamics
- Assess market entry strategies
- Evaluate timing and market readiness
3. **User & Customer Research**
- Deep dive into user personas and behaviors
- Understand jobs-to-be-done and pain points
- Map customer journeys and touchpoints
- Analyze willingness to pay and value perception
4. **Competitive Intelligence Research**
- Detailed competitor analysis and positioning
- Feature and capability comparisons
- Business model and strategy analysis
- Identify competitive advantages and gaps
5. **Technology & Innovation Research**
- Assess technology trends and possibilities
- Evaluate technical approaches and architectures
- Identify emerging technologies and disruptions
- Analyze build vs. buy vs. partner options
6. **Industry & Ecosystem Research**
- Map industry value chains and dynamics
- Identify key players and relationships
- Analyze regulatory and compliance factors
- Understand partnership opportunities
7. **Strategic Options Research**
- Evaluate different strategic directions
- Assess business model alternatives
- Analyze go-to-market strategies
- Consider expansion and scaling paths
8. **Risk & Feasibility Research**
- Identify and assess various risk factors
- Evaluate implementation challenges
- Analyze resource requirements
- Consider regulatory and legal implications
9. **Custom Research Focus**
- User-defined research objectives
- Specialized domain investigation
- Cross-functional research needs
@@ -246,13 +237,11 @@ CRITICAL: collaborate with the user to develop specific, actionable research que
### 5. Review and Refinement
1. **Present Complete Prompt**
- Show the full research prompt
- Explain key elements and rationale
- Highlight any assumptions made
2. **Gather Feedback**
- Are the objectives clear and correct?
- Do the questions address all concerns?
- Is the scope appropriate?

View File

@@ -111,9 +111,9 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
### Change Log
| Date | Version | Description | Author |
|------|---------|-------------|--------|
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
| Date | Version | Description | Author |
| ------ | ------- | --------------------------- | --------- |
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
## Quick Reference - Key Files and Entry Points
@@ -136,11 +136,11 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
### Actual Tech Stack (from package.json/requirements.txt)
| Category | Technology | Version | Notes |
|----------|------------|---------|--------|
| Runtime | Node.js | 16.x | [Any constraints] |
| Framework | Express | 4.18.2 | [Custom middleware?] |
| Database | PostgreSQL | 13 | [Connection pooling setup] |
| Category | Technology | Version | Notes |
| --------- | ---------- | ------- | -------------------------- |
| Runtime | Node.js | 16.x | [Any constraints] |
| Framework | Express | 4.18.2 | [Custom middleware?] |
| Database | PostgreSQL | 13 | [Connection pooling setup] |
etc...
@@ -179,6 +179,7 @@ project-root/
### Data Models
Instead of duplicating, reference actual model files:
- **User Model**: See `src/models/User.js`
- **Order Model**: See `src/models/Order.js`
- **Related Types**: TypeScript definitions in `src/types/`
@@ -208,10 +209,10 @@ Instead of duplicating, reference actual model files:
### External Services
| Service | Purpose | Integration Type | Key Files |
|---------|---------|------------------|-----------|
| Stripe | Payments | REST API | `src/integrations/stripe/` |
| SendGrid | Emails | SDK | `src/services/emailService.js` |
| Service | Purpose | Integration Type | Key Files |
| -------- | -------- | ---------------- | ------------------------------ |
| Stripe | Payments | REST API | `src/integrations/stripe/` |
| SendGrid | Emails | SDK | `src/services/emailService.js` |
etc...
@@ -256,6 +257,7 @@ npm run test:integration # Runs integration tests (requires local DB)
### Files That Will Need Modification
Based on the enhancement requirements, these files will be affected:
- `src/services/userService.js` - Add new user fields
- `src/models/User.js` - Update schema
- `src/routes/userRoutes.js` - New endpoints
@@ -338,4 +340,4 @@ Apply the advanced elicitation task after major sections to refine based on user
- References actual files rather than duplicating content when possible
- Documents technical debt, workarounds, and constraints honestly
- For brownfield projects with PRD: Provides clear enhancement impact analysis
- The goal is PRACTICAL documentation for AI agents doing real work
- The goal is PRACTICAL documentation for AI agents doing real work

View File

@@ -1,6 +1,6 @@
---
docOutputLocation: docs/brainstorming-session-results.md
template: "{root}/templates/brainstorming-output-tmpl.yaml"
template: '{root}/templates/brainstorming-output-tmpl.yaml'
---
# Facilitate Brainstorming Session Task
@@ -43,7 +43,7 @@ If user selects Option 1, present numbered list of techniques from the brainstor
1. Apply selected technique according to data file description
2. Keep engaging with technique until user indicates they want to:
- Choose a different technique
- Apply current ideas to a new technique
- Apply current ideas to a new technique
- Move to convergent phase
- End session

View File

@@ -11,14 +11,12 @@ You are now operating as a Documentation Indexer. Your goal is to ensure all doc
### Required Steps
1. First, locate and scan:
- The `docs/` directory and all subdirectories
- The existing `docs/index.md` file (create if absent)
- All markdown (`.md`) and text (`.txt`) files in the documentation structure
- Note the folder structure for hierarchical organization
2. For the existing `docs/index.md`:
- Parse current entries
- Note existing file references and descriptions
- Identify any broken links or missing files
@@ -26,7 +24,6 @@ You are now operating as a Documentation Indexer. Your goal is to ensure all doc
- Preserve existing folder sections
3. For each documentation file found:
- Extract the title (from first heading or filename)
- Generate a brief description by analyzing the content
- Create a relative markdown link to the file
@@ -35,7 +32,6 @@ You are now operating as a Documentation Indexer. Your goal is to ensure all doc
- If missing or outdated, prepare an update
4. For any missing or non-existent files found in index:
- Present a list of all entries that reference non-existent files
- For each entry:
- Show the full entry details (title, path, description)
@@ -88,7 +84,6 @@ Documents within the `another-folder/` directory:
### [Nested Document](./another-folder/document.md)
Description of nested document.
```
### Index Entry Format
@@ -157,7 +152,6 @@ For each file referenced in the index but not found in the filesystem:
### Special Cases
1. **Sharded Documents**: If a folder contains an `index.md` file, treat it as a sharded document:
- Use the folder's `index.md` title as the section title
- List the folder's documents as subsections
- Note in the description that this is a multi-part document

View File

@@ -6,7 +6,7 @@ Provide a user-friendly interface to the BMad knowledge base without overwhelmin
## Instructions
When entering KB mode (*kb-mode), follow these steps:
When entering KB mode (\*kb-mode), follow these steps:
### 1. Welcome and Guide
@@ -48,12 +48,12 @@ Or ask me about anything else related to BMad-Method!
When user is done or wants to exit KB mode:
- Summarize key points discussed if helpful
- Remind them they can return to KB mode anytime with *kb-mode
- Remind them they can return to KB mode anytime with \*kb-mode
- Suggest next steps based on what was discussed
## Example Interaction
**User**: *kb-mode
**User**: \*kb-mode
**Assistant**: I've entered KB mode and have access to the full BMad knowledge base. I can help you with detailed information about any aspect of BMad-Method.

View File

@@ -0,0 +1,343 @@
# nfr-assess
Quick NFR validation focused on the core four: security, performance, reliability, maintainability.
## Inputs
```yaml
required:
- story_id: '{epic}.{story}' # e.g., "1.3"
- story_path: 'docs/stories/{epic}.{story}.*.md'
optional:
- architecture_refs: 'docs/architecture/*.md'
- technical_preferences: 'docs/technical-preferences.md'
- acceptance_criteria: From story file
```
## Purpose
Assess non-functional requirements for a story and generate:
1. YAML block for the gate file's `nfr_validation` section
2. Brief markdown assessment saved to `docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md`
## Process
### 0. Fail-safe for Missing Inputs
If story_path or story file can't be found:
- Still create assessment file with note: "Source story not found"
- Set all selected NFRs to CONCERNS with notes: "Target unknown / evidence missing"
- Continue with assessment to provide value
### 1. Elicit Scope
**Interactive mode:** Ask which NFRs to assess
**Non-interactive mode:** Default to core four (security, performance, reliability, maintainability)
```text
Which NFRs should I assess? (Enter numbers or press Enter for default)
[1] Security (default)
[2] Performance (default)
[3] Reliability (default)
[4] Maintainability (default)
[5] Usability
[6] Compatibility
[7] Portability
[8] Functional Suitability
> [Enter for 1-4]
```
### 2. Check for Thresholds
Look for NFR requirements in:
- Story acceptance criteria
- `docs/architecture/*.md` files
- `docs/technical-preferences.md`
**Interactive mode:** Ask for missing thresholds
**Non-interactive mode:** Mark as CONCERNS with "Target unknown"
```text
No performance requirements found. What's your target response time?
> 200ms for API calls
No security requirements found. Required auth method?
> JWT with refresh tokens
```
**Unknown targets policy:** If a target is missing and not provided, mark status as CONCERNS with notes: "Target unknown"
### 3. Quick Assessment
For each selected NFR, check:
- Is there evidence it's implemented?
- Can we validate it?
- Are there obvious gaps?
### 4. Generate Outputs
## Output 1: Gate YAML Block
Generate ONLY for NFRs actually assessed (no placeholders):
```yaml
# Gate YAML (copy/paste):
nfr_validation:
_assessed: [security, performance, reliability, maintainability]
security:
status: CONCERNS
notes: 'No rate limiting on auth endpoints'
performance:
status: PASS
notes: 'Response times < 200ms verified'
reliability:
status: PASS
notes: 'Error handling and retries implemented'
maintainability:
status: CONCERNS
notes: 'Test coverage at 65%, target is 80%'
```
## Deterministic Status Rules
- **FAIL**: Any selected NFR has critical gap or target clearly not met
- **CONCERNS**: No FAILs, but any NFR is unknown/partial/missing evidence
- **PASS**: All selected NFRs meet targets with evidence
## Quality Score Calculation
```
quality_score = 100
- 20 for each FAIL attribute
- 10 for each CONCERNS attribute
Floor at 0, ceiling at 100
```
If `technical-preferences.md` defines custom weights, use those instead.
## Output 2: Brief Assessment Report
**ALWAYS save to:** `docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md`
```markdown
# NFR Assessment: {epic}.{story}
Date: {date}
Reviewer: Quinn
<!-- Note: Source story not found (if applicable) -->
## Summary
- Security: CONCERNS - Missing rate limiting
- Performance: PASS - Meets <200ms requirement
- Reliability: PASS - Proper error handling
- Maintainability: CONCERNS - Test coverage below target
## Critical Issues
1. **No rate limiting** (Security)
- Risk: Brute force attacks possible
- Fix: Add rate limiting middleware to auth endpoints
2. **Test coverage 65%** (Maintainability)
- Risk: Untested code paths
- Fix: Add tests for uncovered branches
## Quick Wins
- Add rate limiting: ~2 hours
- Increase test coverage: ~4 hours
- Add performance monitoring: ~1 hour
```
## Output 3: Story Update Line
**End with this line for the review task to quote:**
```
NFR assessment: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
```
## Output 4: Gate Integration Line
**Always print at the end:**
```
Gate NFR block ready → paste into docs/qa/gates/{epic}.{story}-{slug}.yml under nfr_validation
```
## Assessment Criteria
### Security
**PASS if:**
- Authentication implemented
- Authorization enforced
- Input validation present
- No hardcoded secrets
**CONCERNS if:**
- Missing rate limiting
- Weak encryption
- Incomplete authorization
**FAIL if:**
- No authentication
- Hardcoded credentials
- SQL injection vulnerabilities
### Performance
**PASS if:**
- Meets response time targets
- No obvious bottlenecks
- Reasonable resource usage
**CONCERNS if:**
- Close to limits
- Missing indexes
- No caching strategy
**FAIL if:**
- Exceeds response time limits
- Memory leaks
- Unoptimized queries
### Reliability
**PASS if:**
- Error handling present
- Graceful degradation
- Retry logic where needed
**CONCERNS if:**
- Some error cases unhandled
- No circuit breakers
- Missing health checks
**FAIL if:**
- No error handling
- Crashes on errors
- No recovery mechanisms
### Maintainability
**PASS if:**
- Test coverage meets target
- Code well-structured
- Documentation present
**CONCERNS if:**
- Test coverage below target
- Some code duplication
- Missing documentation
**FAIL if:**
- No tests
- Highly coupled code
- No documentation
## Quick Reference
### What to Check
```yaml
security:
- Authentication mechanism
- Authorization checks
- Input validation
- Secret management
- Rate limiting
performance:
- Response times
- Database queries
- Caching usage
- Resource consumption
reliability:
- Error handling
- Retry logic
- Circuit breakers
- Health checks
- Logging
maintainability:
- Test coverage
- Code structure
- Documentation
- Dependencies
```
## Key Principles
- Focus on the core four NFRs by default
- Quick assessment, not deep analysis
- Gate-ready output format
- Brief, actionable findings
- Skip what doesn't apply
- Deterministic status rules for consistency
- Unknown targets → CONCERNS, not guesses
---
## Appendix: ISO 25010 Reference
<details>
<summary>Full ISO 25010 Quality Model (click to expand)</summary>
### All 8 Quality Characteristics
1. **Functional Suitability**: Completeness, correctness, appropriateness
2. **Performance Efficiency**: Time behavior, resource use, capacity
3. **Compatibility**: Co-existence, interoperability
4. **Usability**: Learnability, operability, accessibility
5. **Reliability**: Maturity, availability, fault tolerance
6. **Security**: Confidentiality, integrity, authenticity
7. **Maintainability**: Modularity, reusability, testability
8. **Portability**: Adaptability, installability
Use these when assessing beyond the core four.
</details>
<details>
<summary>Example: Deep Performance Analysis (click to expand)</summary>
```yaml
performance_deep_dive:
response_times:
p50: 45ms
p95: 180ms
p99: 350ms
database:
slow_queries: 2
missing_indexes: ['users.email', 'orders.user_id']
caching:
hit_rate: 0%
recommendation: 'Add Redis for session data'
load_test:
max_rps: 150
breaking_point: 200 rps
```
</details>

159
bmad-core/tasks/qa-gate.md Normal file
View File

@@ -0,0 +1,159 @@
# qa-gate
Create or update a quality gate decision file for a story based on review findings.
## Purpose
Generate a standalone quality gate file that provides a clear pass/fail decision with actionable feedback. This gate serves as an advisory checkpoint for teams to understand quality status.
## Prerequisites
- Story has been reviewed (manually or via review-story task)
- Review findings are available
- Understanding of story requirements and implementation
## Gate File Location
**ALWAYS** create file at: `docs/qa/gates/{epic}.{story}-{slug}.yml`
Slug rules:
- Convert to lowercase
- Replace spaces with hyphens
- Strip punctuation
- Example: "User Auth - Login!" becomes "user-auth-login"
## Minimal Required Schema
```yaml
schema: 1
story: '{epic}.{story}'
gate: PASS|CONCERNS|FAIL|WAIVED
status_reason: '1-2 sentence explanation of gate decision'
reviewer: 'Quinn'
updated: '{ISO-8601 timestamp}'
top_issues: [] # Empty array if no issues
waiver: { active: false } # Only set active: true if WAIVED
```
## Schema with Issues
```yaml
schema: 1
story: '1.3'
gate: CONCERNS
status_reason: 'Missing rate limiting on auth endpoints poses security risk.'
reviewer: 'Quinn'
updated: '2025-01-12T10:15:00Z'
top_issues:
- id: 'SEC-001'
severity: high # ONLY: low|medium|high
finding: 'No rate limiting on login endpoint'
suggested_action: 'Add rate limiting middleware before production'
- id: 'TEST-001'
severity: medium
finding: 'No integration tests for auth flow'
suggested_action: 'Add integration test coverage'
waiver: { active: false }
```
## Schema when Waived
```yaml
schema: 1
story: '1.3'
gate: WAIVED
status_reason: 'Known issues accepted for MVP release.'
reviewer: 'Quinn'
updated: '2025-01-12T10:15:00Z'
top_issues:
- id: 'PERF-001'
severity: low
finding: 'Dashboard loads slowly with 1000+ items'
suggested_action: 'Implement pagination in next sprint'
waiver:
active: true
reason: 'MVP release - performance optimization deferred'
approved_by: 'Product Owner'
```
## Gate Decision Criteria
### PASS
- All acceptance criteria met
- No high-severity issues
- Test coverage meets project standards
### CONCERNS
- Non-blocking issues present
- Should be tracked and scheduled
- Can proceed with awareness
### FAIL
- Acceptance criteria not met
- High-severity issues present
- Recommend return to InProgress
### WAIVED
- Issues explicitly accepted
- Requires approval and reason
- Proceed despite known issues
## Severity Scale
**FIXED VALUES - NO VARIATIONS:**
- `low`: Minor issues, cosmetic problems
- `medium`: Should fix soon, not blocking
- `high`: Critical issues, should block release
## Issue ID Prefixes
- `SEC-`: Security issues
- `PERF-`: Performance issues
- `REL-`: Reliability issues
- `TEST-`: Testing gaps
- `MNT-`: Maintainability concerns
- `ARCH-`: Architecture issues
- `DOC-`: Documentation gaps
- `REQ-`: Requirements issues
## Output Requirements
1. **ALWAYS** create gate file at: `docs/qa/gates/{epic}.{story}-{slug}.yml`
2. **ALWAYS** append this exact format to story's QA Results section:
```
Gate: {STATUS} → docs/qa/gates/{epic}.{story}-{slug}.yml
```
3. Keep status_reason to 1-2 sentences maximum
4. Use severity values exactly: `low`, `medium`, or `high`
## Example Story Update
After creating gate file, append to story's QA Results section:
```markdown
## QA Results
### Review Date: 2025-01-12
### Reviewed By: Quinn (Test Architect)
[... existing review content ...]
### Gate Status
Gate: CONCERNS → docs/qa/gates/1.3-user-auth-login.yml
```
## Key Principles
- Keep it minimal and predictable
- Fixed severity scale (low/medium/high)
- Always write to standard path
- Always update story with gate reference
- Clear, actionable findings

View File

@@ -1,6 +1,16 @@
# review-story
When a developer agent marks a story as "Ready for Review", perform a comprehensive senior developer code review with the ability to refactor and improve code directly.
Perform a comprehensive test architecture review with quality gate decision. This adaptive, risk-aware review creates both a story update and a detailed gate file.
## Inputs
```yaml
required:
- story_id: '{epic}.{story}' # e.g., "1.3"
- story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
- story_title: '{title}' # If missing, derive from story file H1
- story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
```
## Prerequisites
@@ -8,98 +18,133 @@ When a developer agent marks a story as "Ready for Review", perform a comprehens
- Developer has completed all tasks and updated the File List
- All automated tests are passing
## Review Process
## Review Process - Adaptive Test Architecture
1. **Read the Complete Story**
- Review all acceptance criteria
- Understand the dev notes and requirements
- Note any completion notes from the developer
### 1. Risk Assessment (Determines Review Depth)
2. **Verify Implementation Against Dev Notes Guidance**
- Review the "Dev Notes" section for specific technical guidance provided to the developer
- Verify the developer's implementation follows the architectural patterns specified in Dev Notes
- Check that file locations match the project structure guidance in Dev Notes
- Confirm any specified libraries, frameworks, or technical approaches were used correctly
- Validate that security considerations mentioned in Dev Notes were implemented
**Auto-escalate to deep review when:**
3. **Focus on the File List**
- Verify all files listed were actually created/modified
- Check for any missing files that should have been updated
- Ensure file locations align with the project structure guidance from Dev Notes
- Auth/payment/security files touched
- No tests added to story
- Diff > 500 lines
- Previous gate was FAIL/CONCERNS
- Story has > 5 acceptance criteria
4. **Senior Developer Code Review**
- Review code with the eye of a senior developer
- If changes form a cohesive whole, review them together
- If changes are independent, review incrementally file by file
- Focus on:
- Code architecture and design patterns
- Refactoring opportunities
- Code duplication or inefficiencies
- Performance optimizations
- Security concerns
- Best practices and patterns
### 2. Comprehensive Analysis
5. **Active Refactoring**
- As a senior developer, you CAN and SHOULD refactor code where improvements are needed
- When refactoring:
- Make the changes directly in the files
- Explain WHY you're making the change
- Describe HOW the change improves the code
- Ensure all tests still pass after refactoring
- Update the File List if you modify additional files
**A. Requirements Traceability**
6. **Standards Compliance Check**
- Verify adherence to `docs/coding-standards.md`
- Check compliance with `docs/unified-project-structure.md`
- Validate testing approach against `docs/testing-strategy.md`
- Ensure all guidelines mentioned in the story are followed
- Map each acceptance criteria to its validating tests (document mapping with Given-When-Then, not test code)
- Identify coverage gaps
- Verify all requirements have corresponding test cases
7. **Acceptance Criteria Validation**
- Verify each AC is fully implemented
- Check for any missing functionality
- Validate edge cases are handled
**B. Code Quality Review**
8. **Test Coverage Review**
- Ensure unit tests cover edge cases
- Add missing tests if critical coverage is lacking
- Verify integration tests (if required) are comprehensive
- Check that test assertions are meaningful
- Look for missing test scenarios
- Architecture and design patterns
- Refactoring opportunities (and perform them)
- Code duplication or inefficiencies
- Performance optimizations
- Security vulnerabilities
- Best practices adherence
9. **Documentation and Comments**
- Verify code is self-documenting where possible
- Add comments for complex logic if missing
- Ensure any API changes are documented
**C. Test Architecture Assessment**
## Update Story File - QA Results Section ONLY
- Test coverage adequacy at appropriate levels
- Test level appropriateness (what should be unit vs integration vs e2e)
- Test design quality and maintainability
- Test data management strategy
- Mock/stub usage appropriateness
- Edge case and error scenario coverage
- Test execution time and reliability
**D. Non-Functional Requirements (NFRs)**
- Security: Authentication, authorization, data protection
- Performance: Response times, resource usage
- Reliability: Error handling, recovery mechanisms
- Maintainability: Code clarity, documentation
**E. Testability Evaluation**
- Controllability: Can we control the inputs?
- Observability: Can we observe the outputs?
- Debuggability: Can we debug failures easily?
**F. Technical Debt Identification**
- Accumulated shortcuts
- Missing tests
- Outdated dependencies
- Architecture violations
### 3. Active Refactoring
- Refactor code where safe and appropriate
- Run tests to ensure changes don't break functionality
- Document all changes in QA Results section with clear WHY and HOW
- Do NOT alter story content beyond QA Results section
- Do NOT change story Status or File List; recommend next status only
### 4. Standards Compliance Check
- Verify adherence to `docs/coding-standards.md`
- Check compliance with `docs/unified-project-structure.md`
- Validate testing approach against `docs/testing-strategy.md`
- Ensure all guidelines mentioned in the story are followed
### 5. Acceptance Criteria Validation
- Verify each AC is fully implemented
- Check for any missing functionality
- Validate edge cases are handled
### 6. Documentation and Comments
- Verify code is self-documenting where possible
- Add comments for complex logic if missing
- Ensure any API changes are documented
## Output 1: Update Story File - QA Results Section ONLY
**CRITICAL**: You are ONLY authorized to update the "QA Results" section of the story file. DO NOT modify any other sections.
**QA Results Anchor Rule:**
- If `## QA Results` doesn't exist, append it at end of file
- If it exists, append a new dated entry below existing entries
- Never edit other sections
After review and any refactoring, append your results to the story file in the QA Results section:
```markdown
## QA Results
### Review Date: [Date]
### Reviewed By: Quinn (Senior Developer QA)
### Reviewed By: Quinn (Test Architect)
### Code Quality Assessment
[Overall assessment of implementation quality]
### Refactoring Performed
[List any refactoring you performed with explanations]
- **File**: [filename]
- **Change**: [what was changed]
- **Why**: [reason for change]
- **How**: [how it improves the code]
### Compliance Check
- Coding Standards: [✓/✗] [notes if any]
- Project Structure: [✓/✗] [notes if any]
- Testing Strategy: [✓/✗] [notes if any]
- All ACs Met: [✓/✗] [notes if any]
### Improvements Checklist
[Check off items you handled yourself, leave unchecked for dev to address]
- [x] Refactored user service for better error handling (services/user.service.ts)
@@ -109,22 +154,144 @@ After review and any refactoring, append your results to the story file in the Q
- [ ] Update API documentation for new error codes
### Security Review
[Any security concerns found and whether addressed]
### Performance Considerations
[Any performance issues found and whether addressed]
### Final Status
[✓ Approved - Ready for Done] / [✗ Changes Required - See unchecked items above]
### Files Modified During Review
[If you modified files, list them here - ask Dev to update File List]
### Gate Status
Gate: {STATUS} → docs/qa/gates/{epic}.{story}-{slug}.yml
Risk profile: docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
NFR assessment: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
# Note: Paths should reference core-config.yaml for custom configurations
### Recommended Status
[✓ Ready for Done] / [✗ Changes Required - See unchecked items above]
(Story owner decides final status)
```
## Output 2: Create Quality Gate File
**Template and Directory:**
- Render from `templates/qa-gate-tmpl.yaml`
- Create `docs/qa/gates/` directory if missing (or configure in core-config.yaml)
- Save to: `docs/qa/gates/{epic}.{story}-{slug}.yml`
Gate file structure:
```yaml
schema: 1
story: '{epic}.{story}'
story_title: '{story title}'
gate: PASS|CONCERNS|FAIL|WAIVED
status_reason: '1-2 sentence explanation of gate decision'
reviewer: 'Quinn (Test Architect)'
updated: '{ISO-8601 timestamp}'
top_issues: [] # Empty if no issues
waiver: { active: false } # Set active: true only if WAIVED
# Extended fields (optional but recommended):
quality_score: 0-100 # 100 - (20*FAILs) - (10*CONCERNS) or use technical-preferences.md weights
expires: '{ISO-8601 timestamp}' # Typically 2 weeks from review
evidence:
tests_reviewed: { count }
risks_identified: { count }
trace:
ac_covered: [1, 2, 3] # AC numbers with test coverage
ac_gaps: [4] # AC numbers lacking coverage
nfr_validation:
security:
status: PASS|CONCERNS|FAIL
notes: 'Specific findings'
performance:
status: PASS|CONCERNS|FAIL
notes: 'Specific findings'
reliability:
status: PASS|CONCERNS|FAIL
notes: 'Specific findings'
maintainability:
status: PASS|CONCERNS|FAIL
notes: 'Specific findings'
recommendations:
immediate: # Must fix before production
- action: 'Add rate limiting'
refs: ['api/auth/login.ts']
future: # Can be addressed later
- action: 'Consider caching'
refs: ['services/data.ts']
```
### Gate Decision Criteria
**Deterministic rule (apply in order):**
If risk_summary exists, apply its thresholds first (≥9 → FAIL, ≥6 → CONCERNS), then NFR statuses, then top_issues severity.
1. **Risk thresholds (if risk_summary present):**
- If any risk score ≥ 9 → Gate = FAIL (unless waived)
- Else if any score ≥ 6 → Gate = CONCERNS
2. **Test coverage gaps (if trace available):**
- If any P0 test from test-design is missing → Gate = CONCERNS
- If security/data-loss P0 test missing → Gate = FAIL
3. **Issue severity:**
- If any `top_issues.severity == high` → Gate = FAIL (unless waived)
- Else if any `severity == medium` → Gate = CONCERNS
4. **NFR statuses:**
- If any NFR status is FAIL → Gate = FAIL
- Else if any NFR status is CONCERNS → Gate = CONCERNS
- Else → Gate = PASS
- WAIVED only when waiver.active: true with reason/approver
Detailed criteria:
- **PASS**: All critical requirements met, no blocking issues
- **CONCERNS**: Non-critical issues found, team should review
- **FAIL**: Critical issues that should be addressed
- **WAIVED**: Issues acknowledged but explicitly waived by team
### Quality Score Calculation
```text
quality_score = 100 - (20 × number of FAILs) - (10 × number of CONCERNS)
Bounded between 0 and 100
```
If `technical-preferences.md` defines custom weights, use those instead.
### Suggested Owner Convention
For each issue in `top_issues`, include a `suggested_owner`:
- `dev`: Code changes needed
- `sm`: Requirements clarification needed
- `po`: Business decision needed
## Key Principles
- You are a SENIOR developer reviewing junior/mid-level work
- You have the authority and responsibility to improve code directly
- You are a Test Architect providing comprehensive quality assessment
- You have the authority to improve code directly when appropriate
- Always explain your changes for learning purposes
- Balance between perfection and pragmatism
- Focus on significant improvements, not nitpicks
- Focus on risk-based prioritization
- Provide actionable recommendations with clear ownership
## Blocking Conditions
@@ -140,6 +307,8 @@ Stop the review and request clarification if:
After review:
1. If all items are checked and approved: Update story status to "Done"
2. If unchecked items remain: Keep status as "Review" for dev to address
3. Always provide constructive feedback and explanations for learning
1. Update the QA Results section in the story file
2. Create the gate file in `docs/qa/gates/`
3. Recommend status: "Ready for Done" or "Changes Required" (owner decides)
4. If files were modified, list them in QA Results and ask Dev to update File List
5. Always provide constructive feedback and actionable recommendations

View File

@@ -0,0 +1,353 @@
# risk-profile
Generate a comprehensive risk assessment matrix for a story implementation using probability × impact analysis.
## Inputs
```yaml
required:
- story_id: '{epic}.{story}' # e.g., "1.3"
- story_path: 'docs/stories/{epic}.{story}.*.md'
- story_title: '{title}' # If missing, derive from story file H1
- story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
```
## Purpose
Identify, assess, and prioritize risks in the story implementation. Provide risk mitigation strategies and testing focus areas based on risk levels.
## Risk Assessment Framework
### Risk Categories
**Category Prefixes:**
- `TECH`: Technical Risks
- `SEC`: Security Risks
- `PERF`: Performance Risks
- `DATA`: Data Risks
- `BUS`: Business Risks
- `OPS`: Operational Risks
1. **Technical Risks (TECH)**
- Architecture complexity
- Integration challenges
- Technical debt
- Scalability concerns
- System dependencies
2. **Security Risks (SEC)**
- Authentication/authorization flaws
- Data exposure vulnerabilities
- Injection attacks
- Session management issues
- Cryptographic weaknesses
3. **Performance Risks (PERF)**
- Response time degradation
- Throughput bottlenecks
- Resource exhaustion
- Database query optimization
- Caching failures
4. **Data Risks (DATA)**
- Data loss potential
- Data corruption
- Privacy violations
- Compliance issues
- Backup/recovery gaps
5. **Business Risks (BUS)**
- Feature doesn't meet user needs
- Revenue impact
- Reputation damage
- Regulatory non-compliance
- Market timing
6. **Operational Risks (OPS)**
- Deployment failures
- Monitoring gaps
- Incident response readiness
- Documentation inadequacy
- Knowledge transfer issues
## Risk Analysis Process
### 1. Risk Identification
For each category, identify specific risks:
```yaml
risk:
id: 'SEC-001' # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
category: security
title: 'Insufficient input validation on user forms'
description: 'Form inputs not properly sanitized could lead to XSS attacks'
affected_components:
- 'UserRegistrationForm'
- 'ProfileUpdateForm'
detection_method: 'Code review revealed missing validation'
```
### 2. Risk Assessment
Evaluate each risk using probability × impact:
**Probability Levels:**
- `High (3)`: Likely to occur (>70% chance)
- `Medium (2)`: Possible occurrence (30-70% chance)
- `Low (1)`: Unlikely to occur (<30% chance)
**Impact Levels:**
- `High (3)`: Severe consequences (data breach, system down, major financial loss)
- `Medium (2)`: Moderate consequences (degraded performance, minor data issues)
- `Low (1)`: Minor consequences (cosmetic issues, slight inconvenience)
**Risk Score = Probability × Impact**
- 9: Critical Risk (Red)
- 6: High Risk (Orange)
- 4: Medium Risk (Yellow)
- 2-3: Low Risk (Green)
- 1: Minimal Risk (Blue)
### 3. Risk Prioritization
Create risk matrix:
```markdown
## Risk Matrix
| Risk ID | Description | Probability | Impact | Score | Priority |
| -------- | ----------------------- | ----------- | ---------- | ----- | -------- |
| SEC-001 | XSS vulnerability | High (3) | High (3) | 9 | Critical |
| PERF-001 | Slow query on dashboard | Medium (2) | Medium (2) | 4 | Medium |
| DATA-001 | Backup failure | Low (1) | High (3) | 3 | Low |
```
### 4. Risk Mitigation Strategies
For each identified risk, provide mitigation:
```yaml
mitigation:
risk_id: 'SEC-001'
strategy: 'preventive' # preventive|detective|corrective
actions:
- 'Implement input validation library (e.g., validator.js)'
- 'Add CSP headers to prevent XSS execution'
- 'Sanitize all user inputs before storage'
- 'Escape all outputs in templates'
testing_requirements:
- 'Security testing with OWASP ZAP'
- 'Manual penetration testing of forms'
- 'Unit tests for validation functions'
residual_risk: 'Low - Some zero-day vulnerabilities may remain'
owner: 'dev'
timeline: 'Before deployment'
```
## Outputs
### Output 1: Gate YAML Block
Generate for pasting into gate file under `risk_summary`:
**Output rules:**
- Only include assessed risks; do not emit placeholders
- Sort risks by score (desc) when emitting highest and any tabular lists
- If no risks: totals all zeros, omit highest, keep recommendations arrays empty
```yaml
# risk_summary (paste into gate file):
risk_summary:
totals:
critical: X # score 9
high: Y # score 6
medium: Z # score 4
low: W # score 2-3
highest:
id: SEC-001
score: 9
title: 'XSS on profile form'
recommendations:
must_fix:
- 'Add input sanitization & CSP'
monitor:
- 'Add security alerts for auth endpoints'
```
### Output 2: Markdown Report
**Save to:** `docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md`
```markdown
# Risk Profile: Story {epic}.{story}
Date: {date}
Reviewer: Quinn (Test Architect)
## Executive Summary
- Total Risks Identified: X
- Critical Risks: Y
- High Risks: Z
- Risk Score: XX/100 (calculated)
## Critical Risks Requiring Immediate Attention
### 1. [ID]: Risk Title
**Score: 9 (Critical)**
**Probability**: High - Detailed reasoning
**Impact**: High - Potential consequences
**Mitigation**:
- Immediate action required
- Specific steps to take
**Testing Focus**: Specific test scenarios needed
## Risk Distribution
### By Category
- Security: X risks (Y critical)
- Performance: X risks (Y critical)
- Data: X risks (Y critical)
- Business: X risks (Y critical)
- Operational: X risks (Y critical)
### By Component
- Frontend: X risks
- Backend: X risks
- Database: X risks
- Infrastructure: X risks
## Detailed Risk Register
[Full table of all risks with scores and mitigations]
## Risk-Based Testing Strategy
### Priority 1: Critical Risk Tests
- Test scenarios for critical risks
- Required test types (security, load, chaos)
- Test data requirements
### Priority 2: High Risk Tests
- Integration test scenarios
- Edge case coverage
### Priority 3: Medium/Low Risk Tests
- Standard functional tests
- Regression test suite
## Risk Acceptance Criteria
### Must Fix Before Production
- All critical risks (score 9)
- High risks affecting security/data
### Can Deploy with Mitigation
- Medium risks with compensating controls
- Low risks with monitoring in place
### Accepted Risks
- Document any risks team accepts
- Include sign-off from appropriate authority
## Monitoring Requirements
Post-deployment monitoring for:
- Performance metrics for PERF risks
- Security alerts for SEC risks
- Error rates for operational risks
- Business KPIs for business risks
## Risk Review Triggers
Review and update risk profile when:
- Architecture changes significantly
- New integrations added
- Security vulnerabilities discovered
- Performance issues reported
- Regulatory requirements change
```
## Risk Scoring Algorithm
Calculate overall story risk score:
```
Base Score = 100
For each risk:
- Critical (9): Deduct 20 points
- High (6): Deduct 10 points
- Medium (4): Deduct 5 points
- Low (2-3): Deduct 2 points
Minimum score = 0 (extremely risky)
Maximum score = 100 (minimal risk)
```
## Risk-Based Recommendations
Based on risk profile, recommend:
1. **Testing Priority**
- Which tests to run first
- Additional test types needed
- Test environment requirements
2. **Development Focus**
- Code review emphasis areas
- Additional validation needed
- Security controls to implement
3. **Deployment Strategy**
- Phased rollout for high-risk changes
- Feature flags for risky features
- Rollback procedures
4. **Monitoring Setup**
- Metrics to track
- Alerts to configure
- Dashboard requirements
## Integration with Quality Gates
**Deterministic gate mapping:**
- Any risk with score 9 Gate = FAIL (unless waived)
- Else if any score 6 Gate = CONCERNS
- Else Gate = PASS
- Unmitigated risks Document in gate
### Output 3: Story Hook Line
**Print this line for review task to quote:**
```
Risk profile: docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
```
## Key Principles
- Identify risks early and systematically
- Use consistent probability × impact scoring
- Provide actionable mitigation strategies
- Link risks to specific test requirements
- Track residual risk after mitigation
- Update risk profile as story evolves

View File

@@ -91,13 +91,11 @@ CRITICAL: Use proper parsing that understands markdown context. A ## inside a co
For each extracted section:
1. **Generate filename**: Convert the section heading to lowercase-dash-case
- Remove special characters
- Replace spaces with dashes
- Example: "## Tech Stack" → `tech-stack.md`
2. **Adjust heading levels**:
- The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
- All subsection levels decrease by 1:

View File

@@ -0,0 +1,174 @@
# test-design
Create comprehensive test scenarios with appropriate test level recommendations for story implementation.
## Inputs
```yaml
required:
- story_id: '{epic}.{story}' # e.g., "1.3"
- story_path: '{devStoryLocation}/{epic}.{story}.*.md' # Path from core-config.yaml
- story_title: '{title}' # If missing, derive from story file H1
- story_slug: '{slug}' # If missing, derive from title (lowercase, hyphenated)
```
## Purpose
Design a complete test strategy that identifies what to test, at which level (unit/integration/e2e), and why. This ensures efficient test coverage without redundancy while maintaining appropriate test boundaries.
## Dependencies
```yaml
data:
- test-levels-framework.md # Unit/Integration/E2E decision criteria
- test-priorities-matrix.md # P0/P1/P2/P3 classification system
```
## Process
### 1. Analyze Story Requirements
Break down each acceptance criterion into testable scenarios. For each AC:
- Identify the core functionality to test
- Determine data variations needed
- Consider error conditions
- Note edge cases
### 2. Apply Test Level Framework
**Reference:** Load `test-levels-framework.md` for detailed criteria
Quick rules:
- **Unit**: Pure logic, algorithms, calculations
- **Integration**: Component interactions, DB operations
- **E2E**: Critical user journeys, compliance
### 3. Assign Priorities
**Reference:** Load `test-priorities-matrix.md` for classification
Quick priority assignment:
- **P0**: Revenue-critical, security, compliance
- **P1**: Core user journeys, frequently used
- **P2**: Secondary features, admin functions
- **P3**: Nice-to-have, rarely used
### 4. Design Test Scenarios
For each identified test need, create:
```yaml
test_scenario:
id: '{epic}.{story}-{LEVEL}-{SEQ}'
requirement: 'AC reference'
priority: P0|P1|P2|P3
level: unit|integration|e2e
description: 'What is being tested'
justification: 'Why this level was chosen'
mitigates_risks: ['RISK-001'] # If risk profile exists
```
### 5. Validate Coverage
Ensure:
- Every AC has at least one test
- No duplicate coverage across levels
- Critical paths have multiple levels
- Risk mitigations are addressed
## Outputs
### Output 1: Test Design Document
**Save to:** `docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md`
```markdown
# Test Design: Story {epic}.{story}
Date: {date}
Designer: Quinn (Test Architect)
## Test Strategy Overview
- Total test scenarios: X
- Unit tests: Y (A%)
- Integration tests: Z (B%)
- E2E tests: W (C%)
- Priority distribution: P0: X, P1: Y, P2: Z
## Test Scenarios by Acceptance Criteria
### AC1: {description}
#### Scenarios
| ID | Level | Priority | Test | Justification |
| ------------ | ----------- | -------- | ------------------------- | ------------------------ |
| 1.3-UNIT-001 | Unit | P0 | Validate input format | Pure validation logic |
| 1.3-INT-001 | Integration | P0 | Service processes request | Multi-component flow |
| 1.3-E2E-001 | E2E | P1 | User completes journey | Critical path validation |
[Continue for all ACs...]
## Risk Coverage
[Map test scenarios to identified risks if risk profile exists]
## Recommended Execution Order
1. P0 Unit tests (fail fast)
2. P0 Integration tests
3. P0 E2E tests
4. P1 tests in order
5. P2+ as time permits
```
### Output 2: Gate YAML Block
Generate for inclusion in quality gate:
```yaml
test_design:
scenarios_total: X
by_level:
unit: Y
integration: Z
e2e: W
by_priority:
p0: A
p1: B
p2: C
coverage_gaps: [] # List any ACs without tests
```
### Output 3: Trace References
Print for use by trace-requirements task:
```text
Test design matrix: docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
P0 tests identified: {count}
```
## Quality Checklist
Before finalizing, verify:
- [ ] Every AC has test coverage
- [ ] Test levels are appropriate (not over-testing)
- [ ] No duplicate coverage across levels
- [ ] Priorities align with business risk
- [ ] Test IDs follow naming convention
- [ ] Scenarios are atomic and independent
## Key Principles
- **Shift left**: Prefer unit over integration, integration over E2E
- **Risk-based**: Focus on what could go wrong
- **Efficient coverage**: Test once at the right level
- **Maintainability**: Consider long-term test maintenance
- **Fast feedback**: Quick tests run first

View File

@@ -0,0 +1,264 @@
# trace-requirements
Map story requirements to test cases using Given-When-Then patterns for comprehensive traceability.
## Purpose
Create a requirements traceability matrix that ensures every acceptance criterion has corresponding test coverage. This task helps identify gaps in testing and ensures all requirements are validated.
**IMPORTANT**: Given-When-Then is used here for documenting the mapping between requirements and tests, NOT for writing the actual test code. Tests should follow your project's testing standards (no BDD syntax in test code).
## Prerequisites
- Story file with clear acceptance criteria
- Access to test files or test specifications
- Understanding of the implementation
## Traceability Process
### 1. Extract Requirements
Identify all testable requirements from:
- Acceptance Criteria (primary source)
- User story statement
- Tasks/subtasks with specific behaviors
- Non-functional requirements mentioned
- Edge cases documented
### 2. Map to Test Cases
For each requirement, document which tests validate it. Use Given-When-Then to describe what the test validates (not how it's written):
```yaml
requirement: 'AC1: User can login with valid credentials'
test_mappings:
- test_file: 'auth/login.test.ts'
test_case: 'should successfully login with valid email and password'
# Given-When-Then describes WHAT the test validates, not HOW it's coded
given: 'A registered user with valid credentials'
when: 'They submit the login form'
then: 'They are redirected to dashboard and session is created'
coverage: full
- test_file: 'e2e/auth-flow.test.ts'
test_case: 'complete login flow'
given: 'User on login page'
when: 'Entering valid credentials and submitting'
then: 'Dashboard loads with user data'
coverage: integration
```
### 3. Coverage Analysis
Evaluate coverage for each requirement:
**Coverage Levels:**
- `full`: Requirement completely tested
- `partial`: Some aspects tested, gaps exist
- `none`: No test coverage found
- `integration`: Covered in integration/e2e tests only
- `unit`: Covered in unit tests only
### 4. Gap Identification
Document any gaps found:
```yaml
coverage_gaps:
- requirement: 'AC3: Password reset email sent within 60 seconds'
gap: 'No test for email delivery timing'
severity: medium
suggested_test:
type: integration
description: 'Test email service SLA compliance'
- requirement: 'AC5: Support 1000 concurrent users'
gap: 'No load testing implemented'
severity: high
suggested_test:
type: performance
description: 'Load test with 1000 concurrent connections'
```
## Outputs
### Output 1: Gate YAML Block
**Generate for pasting into gate file under `trace`:**
```yaml
trace:
totals:
requirements: X
full: Y
partial: Z
none: W
planning_ref: 'docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md'
uncovered:
- ac: 'AC3'
reason: 'No test found for password reset timing'
notes: 'See docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md'
```
### Output 2: Traceability Report
**Save to:** `docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md`
Create a traceability report with:
```markdown
# Requirements Traceability Matrix
## Story: {epic}.{story} - {title}
### Coverage Summary
- Total Requirements: X
- Fully Covered: Y (Z%)
- Partially Covered: A (B%)
- Not Covered: C (D%)
### Requirement Mappings
#### AC1: {Acceptance Criterion 1}
**Coverage: FULL**
Given-When-Then Mappings:
- **Unit Test**: `auth.service.test.ts::validateCredentials`
- Given: Valid user credentials
- When: Validation method called
- Then: Returns true with user object
- **Integration Test**: `auth.integration.test.ts::loginFlow`
- Given: User with valid account
- When: Login API called
- Then: JWT token returned and session created
#### AC2: {Acceptance Criterion 2}
**Coverage: PARTIAL**
[Continue for all ACs...]
### Critical Gaps
1. **Performance Requirements**
- Gap: No load testing for concurrent users
- Risk: High - Could fail under production load
- Action: Implement load tests using k6 or similar
2. **Security Requirements**
- Gap: Rate limiting not tested
- Risk: Medium - Potential DoS vulnerability
- Action: Add rate limit tests to integration suite
### Test Design Recommendations
Based on gaps identified, recommend:
1. Additional test scenarios needed
2. Test types to implement (unit/integration/e2e/performance)
3. Test data requirements
4. Mock/stub strategies
### Risk Assessment
- **High Risk**: Requirements with no coverage
- **Medium Risk**: Requirements with only partial coverage
- **Low Risk**: Requirements with full unit + integration coverage
```
## Traceability Best Practices
### Given-When-Then for Mapping (Not Test Code)
Use Given-When-Then to document what each test validates:
**Given**: The initial context the test sets up
- What state/data the test prepares
- User context being simulated
- System preconditions
**When**: The action the test performs
- What the test executes
- API calls or user actions tested
- Events triggered
**Then**: What the test asserts
- Expected outcomes verified
- State changes checked
- Values validated
**Note**: This is for documentation only. Actual test code follows your project's standards (e.g., describe/it blocks, no BDD syntax).
### Coverage Priority
Prioritize coverage based on:
1. Critical business flows
2. Security-related requirements
3. Data integrity requirements
4. User-facing features
5. Performance SLAs
### Test Granularity
Map at appropriate levels:
- Unit tests for business logic
- Integration tests for component interaction
- E2E tests for user journeys
- Performance tests for NFRs
## Quality Indicators
Good traceability shows:
- Every AC has at least one test
- Critical paths have multiple test levels
- Edge cases are explicitly covered
- NFRs have appropriate test types
- Clear Given-When-Then for each test
## Red Flags
Watch for:
- ACs with no test coverage
- Tests that don't map to requirements
- Vague test descriptions
- Missing edge case coverage
- NFRs without specific tests
## Integration with Gates
This traceability feeds into quality gates:
- Critical gaps → FAIL
- Minor gaps → CONCERNS
- Missing P0 tests from test-design → CONCERNS
### Output 3: Story Hook Line
**Print this line for review task to quote:**
```text
Trace matrix: docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md
```
- Full coverage → PASS contribution
## Key Principles
- Every requirement must be testable
- Use Given-When-Then for clarity
- Identify both presence and absence
- Prioritize based on risk
- Make recommendations actionable

View File

@@ -20,20 +20,20 @@ sections:
- id: intro-content
content: |
This document outlines the overall project architecture for {{project_name}}, including backend systems, shared services, and non-UI specific concerns. Its primary goal is to serve as the guiding architectural blueprint for AI-driven development, ensuring consistency and adherence to chosen patterns and technologies.
**Relationship to Frontend Architecture:**
If the project includes a significant user interface, a separate Frontend Architecture Document will detail the frontend-specific design and MUST be used in conjunction with this document. Core technology stack choices documented herein (see "Tech Stack") are definitive for the entire project, including any frontend components.
- id: starter-template
title: Starter Template or Existing Project
instruction: |
Before proceeding further with architecture design, check if the project is based on a starter template or existing codebase:
1. Review the PRD and brainstorming brief for any mentions of:
- Starter templates (e.g., Create React App, Next.js, Vue CLI, Angular CLI, etc.)
- Existing projects or codebases being used as a foundation
- Boilerplate projects or scaffolding tools
- Previous projects to be cloned or adapted
2. If a starter template or existing project is mentioned:
- Ask the user to provide access via one of these methods:
- Link to the starter template documentation
@@ -46,16 +46,16 @@ sections:
- Existing architectural patterns and conventions
- Any limitations or constraints imposed by the starter
- Use this analysis to inform and align your architecture decisions
3. If no starter template is mentioned but this is a greenfield project:
- Suggest appropriate starter templates based on the tech stack preferences
- Explain the benefits (faster setup, best practices, community support)
- Let the user decide whether to use one
4. If the user confirms no starter template will be used:
- Proceed with architecture design from scratch
- Note that manual setup will be required for all tooling and configuration
Document the decision here before proceeding with the architecture design. If none, just say N/A
elicit: true
- id: changelog
@@ -83,7 +83,7 @@ sections:
title: High Level Overview
instruction: |
Based on the PRD's Technical Assumptions section, describe:
1. The main architectural style (e.g., Monolith, Microservices, Serverless, Event-Driven)
2. Repository structure decision from PRD (Monorepo/Polyrepo)
3. Service architecture decision from PRD
@@ -100,17 +100,17 @@ sections:
- Data flow directions
- External integrations
- User entry points
- id: architectural-patterns
title: Architectural and Design Patterns
instruction: |
List the key high-level patterns that will guide the architecture. For each pattern:
1. Present 2-3 viable options if multiple exist
2. Provide your recommendation with clear rationale
3. Get user confirmation before finalizing
4. These patterns should align with the PRD's technical assumptions and project goals
Common patterns to consider:
- Architectural style patterns (Serverless, Event-Driven, Microservices, CQRS, Hexagonal)
- Code organization patterns (Dependency Injection, Repository, Module, Factory)
@@ -126,23 +126,23 @@ sections:
title: Tech Stack
instruction: |
This is the DEFINITIVE technology selection section. Work with the user to make specific choices:
1. Review PRD technical assumptions and any preferences from {root}/data/technical-preferences.yaml or an attached technical-preferences
2. For each category, present 2-3 viable options with pros/cons
3. Make a clear recommendation based on project needs
4. Get explicit user approval for each selection
5. Document exact versions (avoid "latest" - pin specific versions)
6. This table is the single source of truth - all other docs must reference these choices
Key decisions to finalize - before displaying the table, ensure you are aware of or ask the user about - let the user know if they are not sure on any that you can also provide suggestions with rationale:
- Starter templates (if any)
- Languages and runtimes with exact versions
- Frameworks and libraries / packages
- Cloud provider and key services choices
- Database and storage solutions - if unclear suggest sql or nosql or other types depending on the project and depending on cloud provider offer a suggestion
- Development tools
Upon render of the table, ensure the user is aware of the importance of this sections choices, should also look for gaps or disagreements with anything, ask for any clarifications if something is unclear why its in the list, and also right away elicit feedback - this statement and the options should be rendered and then prompt right all before allowing user input.
elicit: true
sections:
@@ -166,13 +166,13 @@ sections:
title: Data Models
instruction: |
Define the core data models/entities:
1. Review PRD requirements and identify key business entities
2. For each model, explain its purpose and relationships
3. Include key attributes and data types
4. Show relationships between models
5. Discuss design decisions with user
Create a clear conceptual model before moving to database schema.
elicit: true
repeatable: true
@@ -181,11 +181,11 @@ sections:
title: "{{model_name}}"
template: |
**Purpose:** {{model_purpose}}
**Key Attributes:**
- {{attribute_1}}: {{type_1}} - {{description_1}}
- {{attribute_2}}: {{type_2}} - {{description_2}}
**Relationships:**
- {{relationship_1}}
- {{relationship_2}}
@@ -194,7 +194,7 @@ sections:
title: Components
instruction: |
Based on the architectural patterns, tech stack, and data models from above:
1. Identify major logical components/services and their responsibilities
2. Consider the repository structure (monorepo/polyrepo) from PRD
3. Define clear boundaries and interfaces between components
@@ -203,7 +203,7 @@ sections:
- Key interfaces/APIs exposed
- Dependencies on other components
- Technology specifics based on tech stack choices
5. Create component diagrams where helpful
elicit: true
sections:
@@ -212,13 +212,13 @@ sections:
title: "{{component_name}}"
template: |
**Responsibility:** {{component_description}}
**Key Interfaces:**
- {{interface_1}}
- {{interface_2}}
**Dependencies:** {{dependencies}}
**Technology Stack:** {{component_tech_details}}
- id: component-diagrams
title: Component Diagrams
@@ -235,13 +235,13 @@ sections:
condition: Project requires external API integrations
instruction: |
For each external service integration:
1. Identify APIs needed based on PRD requirements and component design
2. If documentation URLs are unknown, ask user for specifics
3. Document authentication methods and security considerations
4. List specific endpoints that will be used
5. Note any rate limits or usage constraints
If no external APIs are needed, state this explicitly and skip to next section.
elicit: true
repeatable: true
@@ -254,10 +254,10 @@ sections:
- **Base URL(s):** {{api_base_url}}
- **Authentication:** {{auth_method}}
- **Rate Limits:** {{rate_limits}}
**Key Endpoints Used:**
- `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
**Integration Notes:** {{integration_considerations}}
- id: core-workflows
@@ -266,13 +266,13 @@ sections:
mermaid_type: sequence
instruction: |
Illustrate key system workflows using sequence diagrams:
1. Identify critical user journeys from PRD
2. Show component interactions including external APIs
3. Include error handling paths
4. Document async operations
5. Create both high-level and detailed diagrams as needed
Focus on workflows that clarify architecture decisions or complex interactions.
elicit: true
@@ -283,13 +283,13 @@ sections:
language: yaml
instruction: |
If the project includes a REST API:
1. Create an OpenAPI 3.0 specification
2. Include all endpoints from epics/stories
3. Define request/response schemas based on data models
4. Document authentication requirements
5. Include example requests/responses
Use YAML format for better readability. If no REST API, skip this section.
elicit: true
template: |
@@ -306,13 +306,13 @@ sections:
title: Database Schema
instruction: |
Transform the conceptual data models into concrete database schemas:
1. Use the database type(s) selected in Tech Stack
2. Create schema definitions using appropriate notation
3. Include indexes, constraints, and relationships
4. Consider performance and scalability
5. For NoSQL, show document structures
Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
elicit: true
@@ -322,14 +322,14 @@ sections:
language: plaintext
instruction: |
Create a project folder structure that reflects:
1. The chosen repository structure (monorepo/polyrepo)
2. The service architecture (monolith/microservices/serverless)
3. The selected tech stack and languages
4. Component organization from above
5. Best practices for the chosen frameworks
6. Clear separation of concerns
Adapt the structure based on project needs. For monorepos, show service separation. For serverless, show function organization. Include language-specific conventions.
elicit: true
examples:
@@ -347,13 +347,13 @@ sections:
title: Infrastructure and Deployment
instruction: |
Define the deployment architecture and practices:
1. Use IaC tool selected in Tech Stack
2. Choose deployment strategy appropriate for the architecture
3. Define environments and promotion flow
4. Establish rollback procedures
5. Consider security, monitoring, and cost optimization
Get user input on deployment preferences and CI/CD tool choices.
elicit: true
sections:
@@ -389,13 +389,13 @@ sections:
title: Error Handling Strategy
instruction: |
Define comprehensive error handling approach:
1. Choose appropriate patterns for the language/framework from Tech Stack
2. Define logging standards and tools
3. Establish error categories and handling rules
4. Consider observability and debugging needs
5. Ensure security (no sensitive data in logs)
This section guides both AI and human developers in consistent error handling.
elicit: true
sections:
@@ -442,13 +442,13 @@ sections:
title: Coding Standards
instruction: |
These standards are MANDATORY for AI agents. Work with user to define ONLY the critical rules needed to prevent bad code. Explain that:
1. This section directly controls AI developer behavior
2. Keep it minimal - assume AI knows general best practices
3. Focus on project-specific conventions and gotchas
4. Overly detailed standards bloat context and slow development
5. Standards will be extracted to separate file for dev agent use
For each standard, get explicit user confirmation it's necessary.
elicit: true
sections:
@@ -470,7 +470,7 @@ sections:
- "Never use console.log in production code - use logger"
- "All API responses must use ApiResponse wrapper type"
- "Database queries must use repository pattern, never direct ORM"
Avoid obvious rules like "use SOLID principles" or "write clean code"
repeatable: true
template: "- **{{rule_name}}:** {{rule_description}}"
@@ -488,14 +488,14 @@ sections:
title: Test Strategy and Standards
instruction: |
Work with user to define comprehensive test strategy:
1. Use test frameworks from Tech Stack
2. Decide on TDD vs test-after approach
3. Define test organization and naming
4. Establish coverage goals
5. Determine integration test infrastructure
6. Plan for test data and external dependencies
Note: Basic info goes in Coding Standards for dev agent. This detailed section is for QA agent and team reference.
elicit: true
sections:
@@ -516,7 +516,7 @@ sections:
- **Location:** {{unit_test_location}}
- **Mocking Library:** {{mocking_library}}
- **Coverage Requirement:** {{unit_coverage}}
**AI Agent Requirements:**
- Generate tests for all public methods
- Cover edge cases and error conditions
@@ -558,7 +558,7 @@ sections:
title: Security
instruction: |
Define MANDATORY security requirements for AI and human developers:
1. Focus on implementation-specific rules
2. Reference security tools from Tech Stack
3. Define clear patterns for common scenarios
@@ -627,16 +627,16 @@ sections:
title: Next Steps
instruction: |
After completing the architecture:
1. If project has UI components:
- Use "Frontend Architecture Mode"
- Provide this document as input
2. For all projects:
- Review with Product Owner
- Begin story implementation with Dev agent
- Set up infrastructure with DevOps agent
3. Include specific prompts for next agents if needed
sections:
- id: architect-prompt

View File

@@ -23,11 +23,11 @@ sections:
- id: summary-details
template: |
**Topic:** {{session_topic}}
**Session Goals:** {{stated_goals}}
**Techniques Used:** {{techniques_list}}
**Total Ideas Generated:** {{total_ideas}}
- id: key-themes
title: "Key Themes Identified:"
@@ -152,5 +152,5 @@ sections:
- id: footer
content: |
---
*Session facilitated using the BMAD-METHOD brainstorming framework*
*Session facilitated using the BMAD-METHOD brainstorming framework*

View File

@@ -16,40 +16,40 @@ sections:
title: Introduction
instruction: |
IMPORTANT - SCOPE AND ASSESSMENT REQUIRED:
This architecture document is for SIGNIFICANT enhancements to existing projects that require comprehensive architectural planning. Before proceeding:
1. **Verify Complexity**: Confirm this enhancement requires architectural planning. For simple additions, recommend: "For simpler changes that don't require architectural planning, consider using the brownfield-create-epic or brownfield-create-story task with the Product Owner instead."
2. **REQUIRED INPUTS**:
- Completed brownfield-prd.md
- Existing project technical documentation (from docs folder or user-provided)
- Access to existing project structure (IDE or uploaded files)
3. **DEEP ANALYSIS MANDATE**: You MUST conduct thorough analysis of the existing codebase, architecture patterns, and technical constraints before making ANY architectural recommendations. Every suggestion must be based on actual project analysis, not assumptions.
4. **CONTINUOUS VALIDATION**: Throughout this process, explicitly validate your understanding with the user. For every architectural decision, confirm: "Based on my analysis of your existing system, I recommend [decision] because [evidence from actual project]. Does this align with your system's reality?"
If any required inputs are missing, request them before proceeding.
elicit: true
sections:
- id: intro-content
content: |
This document outlines the architectural approach for enhancing {{project_name}} with {{enhancement_description}}. Its primary goal is to serve as the guiding architectural blueprint for AI-driven development of new features while ensuring seamless integration with the existing system.
**Relationship to Existing Architecture:**
This document supplements existing project architecture by defining how new components will integrate with current systems. Where conflicts arise between new and existing patterns, this document provides guidance on maintaining consistency while implementing enhancements.
- id: existing-project-analysis
title: Existing Project Analysis
instruction: |
Analyze the existing project structure and architecture:
1. Review existing documentation in docs folder
2. Examine current technology stack and versions
3. Identify existing architectural patterns and conventions
4. Note current deployment and infrastructure setup
5. Document any constraints or limitations
CRITICAL: After your analysis, explicitly validate your findings: "Based on my analysis of your project, I've identified the following about your existing system: [key findings]. Please confirm these observations are accurate before I proceed with architectural recommendations."
elicit: true
sections:
@@ -78,12 +78,12 @@ sections:
title: Enhancement Scope and Integration Strategy
instruction: |
Define how the enhancement will integrate with the existing system:
1. Review the brownfield PRD enhancement scope
2. Identify integration points with existing code
3. Define boundaries between new and existing functionality
4. Establish compatibility requirements
VALIDATION CHECKPOINT: Before presenting the integration strategy, confirm: "Based on my analysis, the integration approach I'm proposing takes into account [specific existing system characteristics]. These integration points and boundaries respect your current architecture patterns. Is this assessment accurate?"
elicit: true
sections:
@@ -112,7 +112,7 @@ sections:
title: Tech Stack Alignment
instruction: |
Ensure new components align with existing technology choices:
1. Use existing technology stack as the foundation
2. Only introduce new technologies if absolutely necessary
3. Justify any new additions with clear rationale
@@ -135,7 +135,7 @@ sections:
title: Data Models and Schema Changes
instruction: |
Define new data models and how they integrate with existing schema:
1. Identify new entities required for the enhancement
2. Define relationships with existing data models
3. Plan database schema changes (additions, modifications)
@@ -151,11 +151,11 @@ sections:
template: |
**Purpose:** {{model_purpose}}
**Integration:** {{integration_with_existing}}
**Key Attributes:**
- {{attribute_1}}: {{type_1}} - {{description_1}}
- {{attribute_2}}: {{type_2}} - {{description_2}}
**Relationships:**
- **With Existing:** {{existing_relationships}}
- **With New:** {{new_relationships}}
@@ -167,7 +167,7 @@ sections:
- **Modified Tables:** {{modified_tables_list}}
- **New Indexes:** {{new_indexes_list}}
- **Migration Strategy:** {{migration_approach}}
**Backward Compatibility:**
- {{compatibility_measure_1}}
- {{compatibility_measure_2}}
@@ -176,12 +176,12 @@ sections:
title: Component Architecture
instruction: |
Define new components and their integration with existing architecture:
1. Identify new components required for the enhancement
2. Define interfaces with existing components
3. Establish clear boundaries and responsibilities
4. Plan integration points and data flow
MANDATORY VALIDATION: Before presenting component architecture, confirm: "The new components I'm proposing follow the existing architectural patterns I identified in your codebase: [specific patterns]. The integration interfaces respect your current component structure and communication patterns. Does this match your project's reality?"
elicit: true
sections:
@@ -194,15 +194,15 @@ sections:
template: |
**Responsibility:** {{component_description}}
**Integration Points:** {{integration_points}}
**Key Interfaces:**
- {{interface_1}}
- {{interface_2}}
**Dependencies:**
- **Existing Components:** {{existing_dependencies}}
- **New Components:** {{new_dependencies}}
**Technology Stack:** {{component_tech_details}}
- id: interaction-diagram
title: Component Interaction Diagram
@@ -215,7 +215,7 @@ sections:
condition: Enhancement requires API changes
instruction: |
Define new API endpoints and integration with existing APIs:
1. Plan new API endpoints required for the enhancement
2. Ensure consistency with existing API patterns
3. Define authentication and authorization integration
@@ -265,17 +265,17 @@ sections:
- **Base URL:** {{api_base_url}}
- **Authentication:** {{auth_method}}
- **Integration Method:** {{integration_approach}}
**Key Endpoints Used:**
- `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
**Error Handling:** {{error_handling_strategy}}
- id: source-tree-integration
title: Source Tree Integration
instruction: |
Define how new code will integrate with existing project structure:
1. Follow existing project organization patterns
2. Identify where new files/folders will be placed
3. Ensure consistency with existing naming conventions
@@ -314,7 +314,7 @@ sections:
title: Infrastructure and Deployment Integration
instruction: |
Define how the enhancement will be deployed alongside existing infrastructure:
1. Use existing deployment pipeline and infrastructure
2. Identify any infrastructure changes needed
3. Plan deployment strategy to minimize risk
@@ -344,7 +344,7 @@ sections:
title: Coding Standards and Conventions
instruction: |
Ensure new code follows existing project conventions:
1. Document existing coding standards from project analysis
2. Identify any enhancement-specific requirements
3. Ensure consistency with existing codebase patterns
@@ -375,7 +375,7 @@ sections:
title: Testing Strategy
instruction: |
Define testing approach for the enhancement:
1. Integrate with existing test suite
2. Ensure existing functionality remains intact
3. Plan for testing new features
@@ -415,7 +415,7 @@ sections:
title: Security Integration
instruction: |
Ensure security consistency with existing system:
1. Follow existing security patterns and tools
2. Ensure new features don't introduce vulnerabilities
3. Maintain existing security posture
@@ -450,7 +450,7 @@ sections:
title: Next Steps
instruction: |
After completing the brownfield architecture:
1. Review integration points with existing system
2. Begin story implementation with Dev agent
3. Set up deployment pipeline integration
@@ -473,4 +473,4 @@ sections:
- Integration requirements with existing codebase validated with user
- Key technical decisions based on real project constraints
- Existing system compatibility requirements with specific verification steps
- Clear sequencing of implementation to minimize risk to existing functionality
- Clear sequencing of implementation to minimize risk to existing functionality

View File

@@ -16,19 +16,19 @@ sections:
title: Intro Project Analysis and Context
instruction: |
IMPORTANT - SCOPE ASSESSMENT REQUIRED:
This PRD is for SIGNIFICANT enhancements to existing projects that require comprehensive planning and multiple stories. Before proceeding:
1. **Assess Enhancement Complexity**: If this is a simple feature addition or bug fix that could be completed in 1-2 focused development sessions, STOP and recommend: "For simpler changes, consider using the brownfield-create-epic or brownfield-create-story task with the Product Owner instead. This full PRD process is designed for substantial enhancements that require architectural planning and multiple coordinated stories."
2. **Project Context**: Determine if we're working in an IDE with the project already loaded or if the user needs to provide project information. If project files are available, analyze existing documentation in the docs folder. If insufficient documentation exists, recommend running the document-project task first.
3. **Deep Assessment Requirement**: You MUST thoroughly analyze the existing project structure, patterns, and constraints before making ANY suggestions. Every recommendation must be grounded in actual project analysis, not assumptions.
Gather comprehensive information about the existing project. This section must be completed before proceeding with requirements.
CRITICAL: Throughout this analysis, explicitly confirm your understanding with the user. For every assumption you make about the existing project, ask: "Based on my analysis, I understand that [assumption]. Is this correct?"
Do not proceed with any recommendations until the user has validated your understanding of the existing system.
sections:
- id: existing-project-overview
@@ -54,7 +54,7 @@ sections:
- Note: "Document-project analysis available - using existing technical documentation"
- List key documents created by document-project
- Skip the missing documentation check below
Otherwise, check for existing documentation:
sections:
- id: available-docs
@@ -178,7 +178,7 @@ sections:
If document-project output available:
- Extract from "Actual Tech Stack" table in High Level Architecture section
- Include version numbers and any noted constraints
Otherwise, document the current technology stack:
template: |
**Languages**: {{languages}}
@@ -217,7 +217,7 @@ sections:
- Reference "Technical Debt and Known Issues" section
- Include "Workarounds and Gotchas" that might impact enhancement
- Note any identified constraints from "Critical Technical Debt"
Build risk assessment incorporating existing known issues:
template: |
**Technical Risks**: {{technical_risks}}
@@ -240,7 +240,7 @@ sections:
title: "Epic 1: {{enhancement_title}}"
instruction: |
Comprehensive epic that delivers the brownfield enhancement while maintaining existing functionality
CRITICAL STORY SEQUENCING FOR BROWNFIELD:
- Stories must ensure existing functionality remains intact
- Each story should include verification that existing features still work
@@ -253,7 +253,7 @@ sections:
- Each story must deliver value while maintaining system integrity
template: |
**Epic Goal**: {{epic_goal}}
**Integration Requirements**: {{integration_requirements}}
sections:
- id: story
@@ -277,4 +277,4 @@ sections:
items:
- template: "IV1: {{existing_functionality_verification}}"
- template: "IV2: {{integration_point_verification}}"
- template: "IV3: {{performance_impact_verification}}"
- template: "IV3: {{performance_impact_verification}}"

View File

@@ -76,7 +76,7 @@ sections:
title: Competitor Prioritization Matrix
instruction: |
Help categorize competitors by market share and strategic threat level
Create a 2x2 matrix:
- Priority 1 (Core Competitors): High Market Share + High Threat
- Priority 2 (Emerging Threats): Low Market Share + High Threat
@@ -141,7 +141,14 @@ sections:
title: Feature Comparison Matrix
instruction: Create a detailed comparison table of key features across competitors
type: table
columns: ["Feature Category", "{{your_company}}", "{{competitor_1}}", "{{competitor_2}}", "{{competitor_3}}"]
columns:
[
"Feature Category",
"{{your_company}}",
"{{competitor_1}}",
"{{competitor_2}}",
"{{competitor_3}}",
]
rows:
- category: "Core Functionality"
items:
@@ -153,7 +160,13 @@ sections:
- ["Onboarding Time", "{{time}}", "{{time}}", "{{time}}", "{{time}}"]
- category: "Integration & Ecosystem"
items:
- ["API Availability", "{{availability}}", "{{availability}}", "{{availability}}", "{{availability}}"]
- [
"API Availability",
"{{availability}}",
"{{availability}}",
"{{availability}}",
"{{availability}}",
]
- ["Third-party Integrations", "{{number}}", "{{number}}", "{{number}}", "{{number}}"]
- category: "Pricing & Plans"
items:
@@ -180,7 +193,7 @@ sections:
title: Positioning Map
instruction: |
Describe competitor positions on key dimensions
Create a positioning description using 2 key dimensions relevant to the market, such as:
- Price vs. Features
- Ease of Use vs. Power
@@ -215,7 +228,7 @@ sections:
title: Blue Ocean Opportunities
instruction: |
Identify uncontested market spaces
List opportunities to create new market space:
- Underserved segments
- Unaddressed use cases
@@ -290,4 +303,4 @@ sections:
Recommended review schedule:
- Weekly: {{weekly_items}}
- Monthly: {{monthly_items}}
- Quarterly: {{quarterly_analysis}}
- Quarterly: {{quarterly_analysis}}

View File

@@ -16,16 +16,16 @@ sections:
title: Template and Framework Selection
instruction: |
Review provided documents including PRD, UX-UI Specification, and main Architecture Document. Focus on extracting technical implementation details needed for AI frontend tools and developer agents. Ask the user for any of these documents if you are unable to locate and were not provided.
Before proceeding with frontend architecture design, check if the project is using a frontend starter template or existing codebase:
1. Review the PRD, main architecture document, and brainstorming brief for mentions of:
- Frontend starter templates (e.g., Create React App, Next.js, Vite, Vue CLI, Angular CLI, etc.)
- UI kit or component library starters
- Existing frontend projects being used as a foundation
- Admin dashboard templates or other specialized starters
- Design system implementations
2. If a frontend starter template or existing project is mentioned:
- Ask the user to provide access via one of these methods:
- Link to the starter template documentation
@@ -41,7 +41,7 @@ sections:
- Testing setup and patterns
- Build and development scripts
- Use this analysis to ensure your frontend architecture aligns with the starter's patterns
3. If no frontend starter is mentioned but this is a new UI, ensure we know what the ui language and framework is:
- Based on the framework choice, suggest appropriate starters:
- React: Create React App, Next.js, Vite + React
@@ -49,11 +49,11 @@ sections:
- Angular: Angular CLI
- Or suggest popular UI templates if applicable
- Explain benefits specific to frontend development
4. If the user confirms no starter template will be used:
- Note that all tooling, bundling, and configuration will need manual setup
- Proceed with frontend architecture from scratch
Document the starter template decision and any constraints it imposes before proceeding.
sections:
- id: changelog
@@ -75,12 +75,24 @@ sections:
rows:
- ["Framework", "{{framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["UI Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["State Management", "{{state_management}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- [
"State Management",
"{{state_management}}",
"{{version}}",
"{{purpose}}",
"{{why_chosen}}",
]
- ["Routing", "{{routing_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Styling", "{{styling_solution}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Testing", "{{test_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Component Library", "{{component_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- [
"Component Library",
"{{component_lib}}",
"{{version}}",
"{{purpose}}",
"{{why_chosen}}",
]
- ["Form Handling", "{{form_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Animation", "{{animation_lib}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Dev Tools", "{{dev_tools}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
@@ -203,4 +215,4 @@ sections:
- Common commands (dev server, build, test)
- Key import patterns
- File naming conventions
- Project-specific patterns and utilities
- Project-specific patterns and utilities

View File

@@ -16,7 +16,7 @@ sections:
title: Introduction
instruction: |
Review provided documents including Project Brief, PRD, and any user research to gather context. Focus on understanding user needs, pain points, and desired outcomes before beginning the specification.
Establish the document's purpose and scope. Keep the content below but ensure project name is properly substituted.
content: |
This document defines the user experience goals, information architecture, user flows, and visual design specifications for {{project_name}}'s user interface. It serves as the foundation for visual design and frontend development, ensuring a cohesive and user-centered experience.
@@ -25,7 +25,7 @@ sections:
title: Overall UX Goals & Principles
instruction: |
Work with the user to establish and document the following. If not already defined, facilitate a discussion to determine:
1. Target User Personas - elicit details or confirm existing ones from PRD
2. Key Usability Goals - understand what success looks like for users
3. Core Design Principles - establish 3-5 guiding principles
@@ -66,7 +66,7 @@ sections:
title: Information Architecture (IA)
instruction: |
Collaborate with the user to create a comprehensive information architecture:
1. Build a Site Map or Screen Inventory showing all major areas
2. Define the Navigation Structure (primary, secondary, breadcrumbs)
3. Use Mermaid diagrams for visual representation
@@ -96,22 +96,22 @@ sections:
title: Navigation Structure
template: |
**Primary Navigation:** {{primary_nav_description}}
**Secondary Navigation:** {{secondary_nav_description}}
**Breadcrumb Strategy:** {{breadcrumb_strategy}}
- id: user-flows
title: User Flows
instruction: |
For each critical user task identified in the PRD:
1. Define the user's goal clearly
2. Map out all steps including decision points
3. Consider edge cases and error states
4. Use Mermaid flow diagrams for clarity
5. Link to external tools (Figma/Miro) if detailed flows exist there
Create subsections for each major flow.
elicit: true
repeatable: true
@@ -120,9 +120,9 @@ sections:
title: "{{flow_name}}"
template: |
**User Goal:** {{flow_goal}}
**Entry Points:** {{entry_points}}
**Success Criteria:** {{success_criteria}}
sections:
- id: flow-diagram
@@ -153,14 +153,14 @@ sections:
title: "{{screen_name}}"
template: |
**Purpose:** {{screen_purpose}}
**Key Elements:**
- {{element_1}}
- {{element_2}}
- {{element_3}}
**Interaction Notes:** {{interaction_notes}}
**Design File Reference:** {{specific_frame_link}}
- id: component-library
@@ -179,11 +179,11 @@ sections:
title: "{{component_name}}"
template: |
**Purpose:** {{component_purpose}}
**Variants:** {{component_variants}}
**States:** {{component_states}}
**Usage Guidelines:** {{usage_guidelines}}
- id: branding-style
@@ -229,13 +229,13 @@ sections:
title: Iconography
template: |
**Icon Library:** {{icon_library}}
**Usage Guidelines:** {{icon_guidelines}}
- id: spacing-layout
title: Spacing & Layout
template: |
**Grid System:** {{grid_system}}
**Spacing Scale:** {{spacing_scale}}
- id: accessibility
@@ -253,12 +253,12 @@ sections:
- Color contrast ratios: {{contrast_requirements}}
- Focus indicators: {{focus_requirements}}
- Text sizing: {{text_requirements}}
**Interaction:**
- Keyboard navigation: {{keyboard_requirements}}
- Screen reader support: {{screen_reader_requirements}}
- Touch targets: {{touch_requirements}}
**Content:**
- Alternative text: {{alt_text_requirements}}
- Heading structure: {{heading_requirements}}
@@ -285,11 +285,11 @@ sections:
title: Adaptation Patterns
template: |
**Layout Changes:** {{layout_adaptations}}
**Navigation Changes:** {{nav_adaptations}}
**Content Priority:** {{content_adaptations}}
**Interaction Changes:** {{interaction_adaptations}}
- id: animation
@@ -323,7 +323,7 @@ sections:
title: Next Steps
instruction: |
After completing the UI/UX specification:
1. Recommend review with stakeholders
2. Suggest creating/updating visual designs in design tool
3. Prepare for handoff to Design Architect for frontend architecture
@@ -346,4 +346,4 @@ sections:
- id: checklist-results
title: Checklist Results
instruction: If a UI/UX checklist exists, run it against this document and report results here.
instruction: If a UI/UX checklist exists, run it against this document and report results here.

View File

@@ -19,33 +19,33 @@ sections:
elicit: true
content: |
This document outlines the complete fullstack architecture for {{project_name}}, including backend systems, frontend implementation, and their integration. It serves as the single source of truth for AI-driven development, ensuring consistency across the entire technology stack.
This unified approach combines what would traditionally be separate backend and frontend architecture documents, streamlining the development process for modern fullstack applications where these concerns are increasingly intertwined.
sections:
- id: starter-template
title: Starter Template or Existing Project
instruction: |
Before proceeding with architecture design, check if the project is based on any starter templates or existing codebases:
1. Review the PRD and other documents for mentions of:
- Fullstack starter templates (e.g., T3 Stack, MEAN/MERN starters, Django + React templates)
- Monorepo templates (e.g., Nx, Turborepo starters)
- Platform-specific starters (e.g., Vercel templates, AWS Amplify starters)
- Existing projects being extended or cloned
2. If starter templates or existing projects are mentioned:
- Ask the user to provide access (links, repos, or files)
- Analyze to understand pre-configured choices and constraints
- Note any architectural decisions already made
- Identify what can be modified vs what must be retained
3. If no starter is mentioned but this is greenfield:
- Suggest appropriate fullstack starters based on tech preferences
- Consider platform-specific options (Vercel, AWS, etc.)
- Let user decide whether to use one
4. Document the decision and any constraints it imposes
If none, state "N/A - Greenfield project"
- id: changelog
title: Change Log
@@ -71,17 +71,17 @@ sections:
title: Platform and Infrastructure Choice
instruction: |
Based on PRD requirements and technical assumptions, make a platform recommendation:
1. Consider common patterns (not an exhaustive list, use your own best judgement and search the web as needed for emerging trends):
- **Vercel + Supabase**: For rapid development with Next.js, built-in auth/storage
- **AWS Full Stack**: For enterprise scale with Lambda, API Gateway, S3, Cognito
- **Azure**: For .NET ecosystems or enterprise Microsoft environments
- **Google Cloud**: For ML/AI heavy applications or Google ecosystem integration
2. Present 2-3 viable options with clear pros/cons
3. Make a recommendation with rationale
4. Get explicit user confirmation
Document the choice and key services that will be used.
template: |
**Platform:** {{selected_platform}}
@@ -91,7 +91,7 @@ sections:
title: Repository Structure
instruction: |
Define the repository approach based on PRD requirements and platform choice, explain your rationale or ask questions to the user if unsure:
1. For modern fullstack apps, monorepo is often preferred
2. Consider tooling (Nx, Turborepo, Lerna, npm workspaces)
3. Define package/app boundaries
@@ -113,7 +113,7 @@ sections:
- Databases and storage
- External integrations
- CDN and caching layers
Use appropriate diagram type for clarity.
- id: architectural-patterns
title: Architectural Patterns
@@ -123,7 +123,7 @@ sections:
- Frontend patterns (e.g., Component-based, State management)
- Backend patterns (e.g., Repository, CQRS, Event-driven)
- Integration patterns (e.g., BFF, API Gateway)
For each pattern, provide recommendation and rationale.
repeatable: true
template: "- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}"
@@ -137,7 +137,7 @@ sections:
title: Tech Stack
instruction: |
This is the DEFINITIVE technology selection for the entire project. Work with user to finalize all choices. This table is the single source of truth - all development must use these exact versions.
Key areas to cover:
- Frontend and backend languages/frameworks
- Databases and caching
@@ -146,7 +146,7 @@ sections:
- Testing tools for both frontend and backend
- Build and deployment tools
- Monitoring and logging
Upon render, elicit feedback immediately.
elicit: true
sections:
@@ -156,11 +156,29 @@ sections:
columns: [Category, Technology, Version, Purpose, Rationale]
rows:
- ["Frontend Language", "{{fe_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Frontend Framework", "{{fe_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["UI Component Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- [
"Frontend Framework",
"{{fe_framework}}",
"{{version}}",
"{{purpose}}",
"{{why_chosen}}",
]
- [
"UI Component Library",
"{{ui_library}}",
"{{version}}",
"{{purpose}}",
"{{why_chosen}}",
]
- ["State Management", "{{state_mgmt}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Backend Language", "{{be_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Backend Framework", "{{be_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- [
"Backend Framework",
"{{be_framework}}",
"{{version}}",
"{{purpose}}",
"{{why_chosen}}",
]
- ["API Style", "{{api_style}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Database", "{{database}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
- ["Cache", "{{cache}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
@@ -181,14 +199,14 @@ sections:
title: Data Models
instruction: |
Define the core data models/entities that will be shared between frontend and backend:
1. Review PRD requirements and identify key business entities
2. For each model, explain its purpose and relationships
3. Include key attributes and data types
4. Show relationships between models
5. Create TypeScript interfaces that can be shared
6. Discuss design decisions with user
Create a clear conceptual model before moving to database schema.
elicit: true
repeatable: true
@@ -197,7 +215,7 @@ sections:
title: "{{model_name}}"
template: |
**Purpose:** {{model_purpose}}
**Key Attributes:**
- {{attribute_1}}: {{type_1}} - {{description_1}}
- {{attribute_2}}: {{type_2}} - {{description_2}}
@@ -216,7 +234,7 @@ sections:
title: API Specification
instruction: |
Based on the chosen API style from Tech Stack:
1. If REST API, create an OpenAPI 3.0 specification
2. If GraphQL, provide the GraphQL schema
3. If tRPC, show router definitions
@@ -224,7 +242,7 @@ sections:
5. Define request/response schemas based on data models
6. Document authentication requirements
7. Include example requests/responses
Use appropriate format for the chosen API style. If no API (e.g., static site), skip this section.
elicit: true
sections:
@@ -259,7 +277,7 @@ sections:
title: Components
instruction: |
Based on the architectural patterns, tech stack, and data models from above:
1. Identify major logical components/services across the fullstack
2. Consider both frontend and backend components
3. Define clear boundaries and interfaces between components
@@ -268,7 +286,7 @@ sections:
- Key interfaces/APIs exposed
- Dependencies on other components
- Technology specifics based on tech stack choices
5. Create component diagrams where helpful
elicit: true
sections:
@@ -277,13 +295,13 @@ sections:
title: "{{component_name}}"
template: |
**Responsibility:** {{component_description}}
**Key Interfaces:**
- {{interface_1}}
- {{interface_2}}
**Dependencies:** {{dependencies}}
**Technology Stack:** {{component_tech_details}}
- id: component-diagrams
title: Component Diagrams
@@ -300,13 +318,13 @@ sections:
condition: Project requires external API integrations
instruction: |
For each external service integration:
1. Identify APIs needed based on PRD requirements and component design
2. If documentation URLs are unknown, ask user for specifics
3. Document authentication methods and security considerations
4. List specific endpoints that will be used
5. Note any rate limits or usage constraints
If no external APIs are needed, state this explicitly and skip to next section.
elicit: true
repeatable: true
@@ -319,10 +337,10 @@ sections:
- **Base URL(s):** {{api_base_url}}
- **Authentication:** {{auth_method}}
- **Rate Limits:** {{rate_limits}}
**Key Endpoints Used:**
- `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
**Integration Notes:** {{integration_considerations}}
- id: core-workflows
@@ -331,14 +349,14 @@ sections:
mermaid_type: sequence
instruction: |
Illustrate key system workflows using sequence diagrams:
1. Identify critical user journeys from PRD
2. Show component interactions including external APIs
3. Include both frontend and backend flows
4. Include error handling paths
5. Document async operations
6. Create both high-level and detailed diagrams as needed
Focus on workflows that clarify architecture decisions or complex interactions.
elicit: true
@@ -346,13 +364,13 @@ sections:
title: Database Schema
instruction: |
Transform the conceptual data models into concrete database schemas:
1. Use the database type(s) selected in Tech Stack
2. Create schema definitions using appropriate notation
3. Include indexes, constraints, and relationships
4. Consider performance and scalability
5. For NoSQL, show document structures
Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
elicit: true
@@ -488,60 +506,60 @@ sections:
type: code
language: plaintext
examples:
- |
{{project-name}}/
├── .github/ # CI/CD workflows
│ └── workflows/
│ ├── ci.yaml
│ └── deploy.yaml
├── apps/ # Application packages
│ ├── web/ # Frontend application
│ │ ├── src/
│ │ │ ├── components/ # UI components
│ │ │ ├── pages/ # Page components/routes
│ │ │ ├── hooks/ # Custom React hooks
│ │ │ ├── services/ # API client services
│ │ │ ├── stores/ # State management
│ │ │ ├── styles/ # Global styles/themes
│ │ │ └── utils/ # Frontend utilities
│ │ ├── public/ # Static assets
│ │ ├── tests/ # Frontend tests
│ │ └── package.json
│ └── api/ # Backend application
│ ├── src/
│ │ ├── routes/ # API routes/controllers
│ │ ├── services/ # Business logic
│ │ ├── models/ # Data models
│ │ ├── middleware/ # Express/API middleware
│ │ ├── utils/ # Backend utilities
│ │ └── {{serverless_or_server_entry}}
│ ├── tests/ # Backend tests
│ └── package.json
├── packages/ # Shared packages
│ ├── shared/ # Shared types/utilities
│ │ ├── src/
│ │ │ ├── types/ # TypeScript interfaces
│ │ │ ├── constants/ # Shared constants
│ │ │ └── utils/ # Shared utilities
│ │ └── package.json
│ ├── ui/ # Shared UI components
│ │ ├── src/
│ │ └── package.json
│ └── config/ # Shared configuration
│ ├── eslint/
│ ├── typescript/
│ └── jest/
├── infrastructure/ # IaC definitions
│ └── {{iac_structure}}
├── scripts/ # Build/deploy scripts
├── docs/ # Documentation
│ ├── prd.md
│ ├── front-end-spec.md
│ └── fullstack-architecture.md
├── .env.example # Environment template
├── package.json # Root package.json
├── {{monorepo_config}} # Monorepo configuration
└── README.md
- |
{{project-name}}/
├── .github/ # CI/CD workflows
│ └── workflows/
│ ├── ci.yaml
│ └── deploy.yaml
├── apps/ # Application packages
│ ├── web/ # Frontend application
│ │ ├── src/
│ │ │ ├── components/ # UI components
│ │ │ ├── pages/ # Page components/routes
│ │ │ ├── hooks/ # Custom React hooks
│ │ │ ├── services/ # API client services
│ │ │ ├── stores/ # State management
│ │ │ ├── styles/ # Global styles/themes
│ │ │ └── utils/ # Frontend utilities
│ │ ├── public/ # Static assets
│ │ ├── tests/ # Frontend tests
│ │ └── package.json
│ └── api/ # Backend application
│ ├── src/
│ │ ├── routes/ # API routes/controllers
│ │ ├── services/ # Business logic
│ │ ├── models/ # Data models
│ │ ├── middleware/ # Express/API middleware
│ │ ├── utils/ # Backend utilities
│ │ └── {{serverless_or_server_entry}}
│ ├── tests/ # Backend tests
│ └── package.json
├── packages/ # Shared packages
│ ├── shared/ # Shared types/utilities
│ │ ├── src/
│ │ │ ├── types/ # TypeScript interfaces
│ │ │ ├── constants/ # Shared constants
│ │ │ └── utils/ # Shared utilities
│ │ └── package.json
│ ├── ui/ # Shared UI components
│ │ ├── src/
│ │ └── package.json
│ └── config/ # Shared configuration
│ ├── eslint/
│ ├── typescript/
│ └── jest/
├── infrastructure/ # IaC definitions
│ └── {{iac_structure}}
├── scripts/ # Build/deploy scripts
├── docs/ # Documentation
│ ├── prd.md
│ ├── front-end-spec.md
│ └── fullstack-architecture.md
├── .env.example # Environment template
├── package.json # Root package.json
├── {{monorepo_config}} # Monorepo configuration
└── README.md
- id: development-workflow
title: Development Workflow
@@ -568,13 +586,13 @@ sections:
template: |
# Start all services
{{start_all_command}}
# Start frontend only
{{start_frontend_command}}
# Start backend only
{{start_backend_command}}
# Run tests
{{test_commands}}
- id: environment-config
@@ -587,10 +605,10 @@ sections:
template: |
# Frontend (.env.local)
{{frontend_env_vars}}
# Backend (.env)
{{backend_env_vars}}
# Shared
{{shared_env_vars}}
@@ -607,7 +625,7 @@ sections:
- **Build Command:** {{frontend_build_command}}
- **Output Directory:** {{frontend_output_dir}}
- **CDN/Edge:** {{cdn_strategy}}
**Backend Deployment:**
- **Platform:** {{backend_deploy_platform}}
- **Build Command:** {{backend_build_command}}
@@ -638,12 +656,12 @@ sections:
- CSP Headers: {{csp_policy}}
- XSS Prevention: {{xss_strategy}}
- Secure Storage: {{storage_strategy}}
**Backend Security:**
- Input Validation: {{validation_approach}}
- Rate Limiting: {{rate_limit_config}}
- CORS Policy: {{cors_config}}
**Authentication Security:**
- Token Storage: {{token_strategy}}
- Session Management: {{session_approach}}
@@ -655,7 +673,7 @@ sections:
- Bundle Size Target: {{bundle_size}}
- Loading Strategy: {{loading_approach}}
- Caching Strategy: {{fe_cache_strategy}}
**Backend Performance:**
- Response Time Target: {{response_target}}
- Database Optimization: {{db_optimization}}
@@ -671,10 +689,10 @@ sections:
type: code
language: text
template: |
E2E Tests
/ \
Integration Tests
/ \
E2E Tests
/ \
Integration Tests
/ \
Frontend Unit Backend Unit
- id: test-organization
title: Test Organization
@@ -793,7 +811,7 @@ sections:
- JavaScript errors
- API response times
- User interactions
**Backend Metrics:**
- Request rate
- Error rate
@@ -802,4 +820,4 @@ sections:
- id: checklist-results
title: Checklist Results Report
instruction: Before running the checklist, offer to output the full architecture document. Once user confirms, execute the architect-checklist and populate results here.
instruction: Before running the checklist, offer to output the full architecture document. Once user confirms, execute the architect-checklist and populate results here.

View File

@@ -130,7 +130,7 @@ sections:
instruction: Map the end-to-end customer experience for primary segments
template: |
For primary customer segment:
1. **Awareness:** {{discovery_process}}
2. **Consideration:** {{evaluation_criteria}}
3. **Purchase:** {{decision_triggers}}
@@ -249,4 +249,4 @@ sections:
instruction: Include any complex calculations or models
- id: additional-analysis
title: C. Additional Analysis
instruction: Any supplementary analysis not included in main body
instruction: Any supplementary analysis not included in main body

View File

@@ -56,7 +56,7 @@ sections:
condition: PRD has UX/UI requirements
instruction: |
Capture high-level UI/UX vision to guide Design Architect and to inform story creation. Steps:
1. Pre-fill all subsections with educated guesses based on project context
2. Present the complete rendered section to user
3. Clearly let the user know where assumptions were made
@@ -98,7 +98,7 @@ sections:
title: Technical Assumptions
instruction: |
Gather technical decisions that will guide the Architect. Steps:
1. Check if {root}/data/technical-preferences.yaml or an attached technical-preferences file exists - use it to pre-populate choices
2. Ask user about: languages, frameworks, starter templates, libraries, APIs, deployment targets
3. For unknowns, offer guidance based on project goals and MVP scope
@@ -126,9 +126,9 @@ sections:
title: Epic List
instruction: |
Present a high-level list of all epics for user approval. Each epic should have a title and a short (1 sentence) goal statement. This allows the user to review the overall structure before diving into details.
CRITICAL: Epics MUST be logically sequential following agile best practices:
- Each epic should deliver a significant, end-to-end, fully deployable increment of testable functionality
- Epic 1 must establish foundational project infrastructure (app setup, Git, CI/CD, core services) unless we are adding new functionality to an existing app, while also delivering an initial piece of functionality, even as simple as a health-check route or display of a simple canary page - remember this when we produce the stories for the first epic!
- Each subsequent epic builds upon previous epics' functionality delivering major blocks of functionality that provide tangible value to users or business when deployed
@@ -147,11 +147,11 @@ sections:
repeatable: true
instruction: |
After the epic list is approved, present each epic with all its stories and acceptance criteria as a complete review unit.
For each epic provide expanded goal (2-3 sentences describing the objective and value all the stories will achieve).
CRITICAL STORY SEQUENCING REQUIREMENTS:
- Stories within each epic MUST be logically sequential
- Each story should be a "vertical slice" delivering complete functionality aside from early enabler stories for project foundation
- No story should depend on work from a later story or epic
@@ -179,7 +179,7 @@ sections:
repeatable: true
instruction: |
Define clear, comprehensive, and testable acceptance criteria that:
- Precisely define what "done" means from a functional perspective
- Are unambiguous and serve as basis for verification
- Include any critical non-functional requirements from the PRD
@@ -199,4 +199,4 @@ sections:
instruction: This section will contain the prompt for the UX Expert, keep it short and to the point to initiate create architecture mode using this document as input.
- id: architect-prompt
title: Architect Prompt
instruction: This section will contain the prompt for the Architect, keep it short and to the point to initiate create architecture mode using this document as input.
instruction: This section will contain the prompt for the Architect, keep it short and to the point to initiate create architecture mode using this document as input.

View File

@@ -28,12 +28,12 @@ sections:
- id: introduction
instruction: |
This template guides creation of a comprehensive Project Brief that serves as the foundational input for product development.
Start by asking the user which mode they prefer:
1. **Interactive Mode** - Work through each section collaboratively
2. **YOLO Mode** - Generate complete draft for review and refinement
Before beginning, understand what inputs are available (brainstorming results, market research, competitive analysis, initial ideas) and gather project context.
- id: executive-summary
@@ -218,4 +218,4 @@ sections:
- id: pm-handoff
title: PM Handoff
content: |
This Project Brief provides the full context for {{project_name}}. Please start in 'PRD Generation Mode', review the brief thoroughly to work with the user to create the PRD section by section as the template indicates, asking for any necessary clarification or suggesting improvements.
This Project Brief provides the full context for {{project_name}}. Please start in 'PRD Generation Mode', review the brief thoroughly to work with the user to create the PRD section by section as the template indicates, asking for any necessary clarification or suggesting improvements.

View File

@@ -0,0 +1,102 @@
template:
id: qa-gate-template-v1
name: Quality Gate Decision
version: 1.0
output:
format: yaml
filename: docs/qa/gates/{{epic_num}}.{{story_num}}-{{story_slug}}.yml
title: "Quality Gate: {{epic_num}}.{{story_num}}"
# Required fields (keep these first)
schema: 1
story: "{{epic_num}}.{{story_num}}"
story_title: "{{story_title}}"
gate: "{{gate_status}}" # PASS|CONCERNS|FAIL|WAIVED
status_reason: "{{status_reason}}" # 1-2 sentence summary of why this gate decision
reviewer: "Quinn (Test Architect)"
updated: "{{iso_timestamp}}"
# Always present but only active when WAIVED
waiver: { active: false }
# Issues (if any) - Use fixed severity: low | medium | high
top_issues: []
# Risk summary (from risk-profile task if run)
risk_summary:
totals: { critical: 0, high: 0, medium: 0, low: 0 }
recommendations:
must_fix: []
monitor: []
# Examples section using block scalars for clarity
examples:
with_issues: |
top_issues:
- id: "SEC-001"
severity: high # ONLY: low|medium|high
finding: "No rate limiting on login endpoint"
suggested_action: "Add rate limiting middleware before production"
- id: "TEST-001"
severity: medium
finding: "Missing integration tests for auth flow"
suggested_action: "Add test coverage for critical paths"
when_waived: |
waiver:
active: true
reason: "Accepted for MVP release - will address in next sprint"
approved_by: "Product Owner"
# ============ Optional Extended Fields ============
# Uncomment and use if your team wants more detail
optional_fields_examples:
quality_and_expiry: |
quality_score: 75 # 0-100 (optional scoring)
expires: "2025-01-26T00:00:00Z" # Optional gate freshness window
evidence: |
evidence:
tests_reviewed: 15
risks_identified: 3
trace:
ac_covered: [1, 2, 3] # AC numbers with test coverage
ac_gaps: [4] # AC numbers lacking coverage
nfr_validation: |
nfr_validation:
security: { status: CONCERNS, notes: "Rate limiting missing" }
performance: { status: PASS, notes: "" }
reliability: { status: PASS, notes: "" }
maintainability: { status: PASS, notes: "" }
history: |
history: # Append-only audit trail
- at: "2025-01-12T10:00:00Z"
gate: FAIL
note: "Initial review - missing tests"
- at: "2025-01-12T15:00:00Z"
gate: CONCERNS
note: "Tests added but rate limiting still missing"
risk_summary: |
risk_summary: # From risk-profile task
totals:
critical: 0
high: 0
medium: 0
low: 0
# 'highest' is emitted only when risks exist
recommendations:
must_fix: []
monitor: []
recommendations: |
recommendations:
immediate: # Must fix before production
- action: "Add rate limiting to auth endpoints"
refs: ["api/auth/login.ts:42-68"]
future: # Can be addressed later
- action: "Consider caching for better performance"
refs: ["services/data.service.ts"]

View File

@@ -12,7 +12,7 @@ workflow:
elicitation: advanced-elicitation
agent_config:
editable_sections:
editable_sections:
- Status
- Story
- Acceptance Criteria
@@ -29,7 +29,7 @@ sections:
instruction: Select the current status of the story
owner: scrum-master
editors: [scrum-master, dev-agent]
- id: story
title: Story
type: template-text
@@ -41,7 +41,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: acceptance-criteria
title: Acceptance Criteria
type: numbered-list
@@ -49,7 +49,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: tasks-subtasks
title: Tasks / Subtasks
type: bullet-list
@@ -66,7 +66,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master, dev-agent]
- id: dev-notes
title: Dev Notes
instruction: |
@@ -90,7 +90,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: change-log
title: Change Log
type: table
@@ -98,7 +98,7 @@ sections:
instruction: Track changes made to this story document
owner: scrum-master
editors: [scrum-master, dev-agent, qa-agent]
- id: dev-agent-record
title: Dev Agent Record
instruction: This section is populated by the development agent during implementation
@@ -111,27 +111,27 @@ sections:
instruction: Record the specific AI agent model and version used for development
owner: dev-agent
editors: [dev-agent]
- id: debug-log-references
title: Debug Log References
instruction: Reference any debug logs or traces generated during development
owner: dev-agent
editors: [dev-agent]
- id: completion-notes
title: Completion Notes List
instruction: Notes about the completion of tasks and any issues encountered
owner: dev-agent
editors: [dev-agent]
- id: file-list
title: File List
instruction: List all files created, modified, or affected during story implementation
owner: dev-agent
editors: [dev-agent]
- id: qa-results
title: QA Results
instruction: Results from QA Agent QA review of the completed story implementation
owner: qa-agent
editors: [qa-agent]
editors: [qa-agent]

View File

@@ -1,251 +0,0 @@
# BMad-Method BMAd Code User Guide
This guide will help you understand and effectively use the BMad Method for agile AI driven planning and development.
## The BMad Plan and Execute Workflow
First, here is the full standard Greenfield Planning + Execution Workflow. Brownfield is very similar, but it's suggested to understand this greenfield first, even if on a simple project before tackling a brownfield project. The BMad Method needs to be installed to the root of your new project folder. For the planning phase, you can optionally perform it with powerful web agents, potentially resulting in higher quality results at a fraction of the cost it would take to complete if providing your own API key or credits in some Agentic tools. For planning, powerful thinking models and larger context - along with working as a partner with the agents will net the best results.
If you are going to use the BMad Method with a Brownfield project (an existing project), review **[Working in the Brownfield](./working-in-the-brownfield.md)**.
If you do not see the diagrams that following rendering, you can install Markdown All in One along with the Markdown Preview Mermaid Support plugins to VSCode (or one of the forked clones). With these plugin's, if you right click on the tab when open, there should be a Open Preview option, or check the IDE documentation.
### The Planning Workflow (Web UI or Powerful IDE Agents)
Before development begins, BMad follows a structured planning workflow that's ideally done in web UI for cost efficiency:
```mermaid
graph TD
A["Start: Project Idea"] --> B{"Optional: Analyst Research"}
B -->|Yes| C["Analyst: Brainstorming (Optional)"]
B -->|No| G{"Project Brief Available?"}
C --> C2["Analyst: Market Research (Optional)"]
C2 --> C3["Analyst: Competitor Analysis (Optional)"]
C3 --> D["Analyst: Create Project Brief"]
D --> G
G -->|Yes| E["PM: Create PRD from Brief (Fast Track)"]
G -->|No| E2["PM: Interactive PRD Creation (More Questions)"]
E --> F["PRD Created with FRs, NFRs, Epics & Stories"]
E2 --> F
F --> F2{"UX Required?"}
F2 -->|Yes| F3["UX Expert: Create Front End Spec"]
F2 -->|No| H["Architect: Create Architecture from PRD"]
F3 --> F4["UX Expert: Generate UI Prompt for Lovable/V0 (Optional)"]
F4 --> H2["Architect: Create Architecture from PRD + UX Spec"]
H --> I["PO: Run Master Checklist"]
H2 --> I
I --> J{"Documents Aligned?"}
J -->|Yes| K["Planning Complete"]
J -->|No| L["PO: Update Epics & Stories"]
L --> M["Update PRD/Architecture as needed"]
M --> I
K --> N["📁 Switch to IDE (If in a Web Agent Platform)"]
N --> O["PO: Shard Documents"]
O --> P["Ready for SM/Dev Cycle"]
style A fill:#f5f5f5,color:#000
style B fill:#e3f2fd,color:#000
style C fill:#e8f5e9,color:#000
style C2 fill:#e8f5e9,color:#000
style C3 fill:#e8f5e9,color:#000
style D fill:#e8f5e9,color:#000
style E fill:#fff3e0,color:#000
style E2 fill:#fff3e0,color:#000
style F fill:#fff3e0,color:#000
style F2 fill:#e3f2fd,color:#000
style F3 fill:#e1f5fe,color:#000
style F4 fill:#e1f5fe,color:#000
style G fill:#e3f2fd,color:#000
style H fill:#f3e5f5,color:#000
style H2 fill:#f3e5f5,color:#000
style I fill:#f9ab00,color:#fff
style J fill:#e3f2fd,color:#000
style K fill:#34a853,color:#fff
style L fill:#f9ab00,color:#fff
style M fill:#fff3e0,color:#000
style N fill:#1a73e8,color:#fff
style O fill:#f9ab00,color:#fff
style P fill:#34a853,color:#fff
```
#### Web UI to IDE Transition
**Critical Transition Point**: Once the PO confirms document alignment, you must switch from web UI to IDE to begin the development workflow:
1. **Copy Documents to Project**: Ensure `docs/prd.md` and `docs/architecture.md` are in your project's docs folder (or a custom location you can specify during installation)
2. **Switch to IDE**: Open your project in your preferred Agentic IDE
3. **Document Sharding**: Use the PO agent to shard the PRD and then the Architecture
4. **Begin Development**: Start the Core Development Cycle that follows
### The Core Development Cycle (IDE)
Once planning is complete and documents are sharded, BMad follows a structured development workflow:
```mermaid
graph TD
A["Development Phase Start"] --> B["SM: Reviews Previous Story Dev/QA Notes"]
B --> B2["SM: Drafts Next Story from Sharded Epic + Architecture"]
B2 --> B3{"QA: Review Story Draft (Optional)"}
B3 -->|Review Requested| B4["QA: Review Story Against Artifacts"]
B3 -->|Skip Review| C{"User Approval"}
B4 --> C
C -->|Approved| D["Dev: Sequential Task Execution"]
C -->|Needs Changes| B2
D --> E["Dev: Implement Tasks + Tests"]
E --> F["Dev: Run All Validations"]
F --> G["Dev: Mark Ready for Review + Add Notes"]
G --> H{"User Verification"}
H -->|Request QA Review| I["QA: Senior Dev Review + Active Refactoring"]
H -->|Approve Without QA| M["IMPORTANT: Verify All Regression Tests and Linting are Passing"]
I --> J["QA: Review, Refactor Code, Add Tests, Document Notes"]
J --> L{"QA Decision"}
L -->|Needs Dev Work| D
L -->|Approved| M
H -->|Needs Fixes| D
M --> N["IMPORTANT: COMMIT YOUR CHANGES BEFORE PROCEEDING!"]
N --> K["Mark Story as Done"]
K --> B
style A fill:#f5f5f5,color:#000
style B fill:#e8f5e9,color:#000
style B2 fill:#e8f5e9,color:#000
style B3 fill:#e3f2fd,color:#000
style B4 fill:#fce4ec,color:#000
style C fill:#e3f2fd,color:#000
style D fill:#e3f2fd,color:#000
style E fill:#e3f2fd,color:#000
style F fill:#e3f2fd,color:#000
style G fill:#e3f2fd,color:#000
style H fill:#e3f2fd,color:#000
style I fill:#f9ab00,color:#fff
style J fill:#ffd54f,color:#000
style K fill:#34a853,color:#fff
style L fill:#e3f2fd,color:#000
style M fill:#ff5722,color:#fff
style N fill:#d32f2f,color:#fff
```
## Installation
### Optional
If you want to do the planning in the Web with Claude (Sonnet 4 or Opus), Gemini Gem (2.5 Pro), or Custom GPT's:
1. Navigate to `dist/teams/`
2. Copy `team-fullstack.txt`
3. Create new Gemini Gem or CustomGPT
4. Upload file with instructions: "Your critical operating instructions are attached, do not break character as directed"
5. Type `/help` to see available commands
### IDE Project Setup
```bash
# Interactive installation (recommended)
npx bmad-method install
```
## Special Agents
There are two bmad agents - in the future they will be consolidated into the single bmad-master.
### BMad-Master
This agent can do any task or command that all other agents can do, aside from actual story implementation. Additionally, this agent can help explain the BMad Method when in the web by accessing the knowledge base and explaining anything to you about the process.
If you don't want to bother switching between different agents aside from the dev, this is the agent for you. Just remember that as the context grows, the performance of the agent degrades, therefore it is important to instruct the agent to compact the conversation and start a new conversation with the compacted conversation as the initial message. Do this often, preferably after each story is implemented.
### BMad-Orchestrator
This agent should NOT be used within the IDE, it is a heavy weight special purpose agent that utilizes a lot of context and can morph into any other agent. This exists solely to facilitate the team's within the web bundles. If you use a web bundle you will be greeted by the BMad Orchestrator.
### How Agents Work
#### Dependencies System
Each agent has a YAML section that defines its dependencies:
```yaml
dependencies:
templates:
- prd-template.md
- user-story-template.md
tasks:
- create-doc.md
- shard-doc.md
data:
- bmad-kb.md
```
**Key Points:**
- Agents only load resources they need (lean context)
- Dependencies are automatically resolved during bundling
- Resources are shared across agents to maintain consistency
#### Agent Interaction
**In IDE:**
```bash
# Some Ide's, like Cursor or Windsurf for example, utilize manual rules so interaction is done with the '@' symbol
@pm Create a PRD for a task management app
@architect Design the system architecture
@dev Implement the user authentication
# Some, like Claude Code use slash commands instead
/pm Create user stories
/dev Fix the login bug
```
#### Interactive Modes
- **Incremental Mode**: Step-by-step with user input
- **YOLO Mode**: Rapid generation with minimal interaction
## IDE Integration
### IDE Best Practices
- **Context Management**: Keep relevant files only in context, keep files as lean and focused as necessary
- **Agent Selection**: Use appropriate agent for task
- **Iterative Development**: Work in small, focused tasks
- **File Organization**: Maintain clean project structure
- **Commit Regularly**: Save your work frequently
## Technical Preferences System
BMad includes a personalization system through the `technical-preferences.md` file located in `.bmad-core/data/` - this can help bias the PM and Architect to recommend your preferences for design patterns, technology selection, or anything else you would like to put in here.
### Using with Web Bundles
When creating custom web bundles or uploading to AI platforms, include your `technical-preferences.md` content to ensure agents have your preferences from the start of any conversation.
## Core Configuration
The `bmad-core/core-config.yaml` file is a critical config that enables BMad to work seamlessly with differing project structures, more options will be made available in the future. Currently the most important is the devLoadAlwaysFiles list section in the yaml.
### Developer Context Files
Define which files the dev agent should always load:
```yaml
devLoadAlwaysFiles:
- docs/architecture/coding-standards.md
- docs/architecture/tech-stack.md
- docs/architecture/project-structure.md
```
You will want to verify from sharding your architecture that these documents exist, that they are as lean as possible, and contain exactly the information you want your dev agent to ALWAYS load into it's context. These are the rules the agent will follow.
As your project grows and the code starts to build consistent patterns, coding standards should be reduced to include only the standards that the agent still makes with. The agent will look at surrounding code in files to infer the coding standards that are relevant to the current task.
## Getting Help
- **Discord Community**: [Join Discord](https://discord.gg/gk8jAdXWmj)
- **GitHub Issues**: [Report bugs](https://github.com/bmadcode/bmad-method/issues)
- **Documentation**: [Browse docs](https://github.com/bmadcode/bmad-method/docs)
- **YouTube**: [BMadCode Channel](https://www.youtube.com/@BMadCode)
## Conclusion
Remember: BMad is designed to enhance your development process, not replace your expertise. Use it as a powerful tool to accelerate your projects while maintaining control over design decisions and implementation details.

View File

@@ -20,7 +20,7 @@ workflow:
- Single story (< 4 hours) → Use brownfield-create-story task
- Small feature (1-3 stories) → Use brownfield-create-epic task
- Major enhancement (multiple epics) → Continue with full workflow
Ask user: "Can you describe the enhancement scope? Is this a small fix, a feature addition, or a major enhancement requiring architectural changes?"
- step: routing_decision
@@ -181,7 +181,7 @@ workflow:
notes: |
All stories implemented and reviewed!
Project development phase complete.
Reference: {root}/data/bmad-kb.md#IDE Development Workflow
flow_diagram: |
@@ -265,33 +265,33 @@ workflow:
{{if single_story}}: Proceeding with brownfield-create-story task for immediate implementation.
{{if small_feature}}: Creating focused epic with brownfield-create-epic task.
{{if major_enhancement}}: Continuing with comprehensive planning workflow.
documentation_assessment: |
Documentation assessment complete:
{{if adequate}}: Existing documentation is sufficient. Proceeding directly to PRD creation.
{{if inadequate}}: Running document-project to capture current system state before PRD.
document_project_to_pm: |
Project analysis complete. Key findings documented in:
- {{document_list}}
Use these findings to inform PRD creation and avoid re-analyzing the same aspects.
pm_to_architect_decision: |
PRD complete and saved as docs/prd.md.
Architectural changes identified: {{yes/no}}
{{if yes}}: Proceeding to create architecture document for: {{specific_changes}}
{{if no}}: No architectural changes needed. Proceeding to validation.
architect_to_po: "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for integration safety."
po_to_sm: |
All artifacts validated.
Documentation type available: {{sharded_prd / brownfield_docs}}
{{if sharded}}: Use standard create-next-story task.
{{if brownfield}}: Use create-brownfield-story task to handle varied documentation formats.
sm_story_creation: |
Creating story from {{documentation_type}}.
{{if missing_context}}: May need to gather additional context from user during story creation.
complete: "All planning artifacts validated and development can begin. Stories will be created based on available documentation format."

View File

@@ -127,7 +127,7 @@ workflow:
notes: |
All stories implemented and reviewed!
Project development phase complete.
Reference: {root}/data/bmad-kb.md#IDE Development Workflow
flow_diagram: |

View File

@@ -134,7 +134,7 @@ workflow:
notes: |
All stories implemented and reviewed!
Project development phase complete.
Reference: {root}/data/bmad-kb.md#IDE Development Workflow
flow_diagram: |

View File

@@ -159,7 +159,7 @@ workflow:
notes: |
All stories implemented and reviewed!
Project development phase complete.
Reference: {root}/data/bmad-kb.md#IDE Development Workflow
flow_diagram: |

View File

@@ -135,7 +135,7 @@ workflow:
notes: |
All stories implemented and reviewed!
Service development phase complete.
Reference: {root}/data/bmad-kb.md#IDE Development Workflow
flow_diagram: |

View File

@@ -154,7 +154,7 @@ workflow:
notes: |
All stories implemented and reviewed!
Project development phase complete.
Reference: {root}/data/bmad-kb.md#IDE Development Workflow
flow_diagram: |

View File

@@ -1,364 +0,0 @@
# Working in the Brownfield: A Complete Guide
> **HIGHLY RECOMMENDED: Use Gemini Web or Gemini CLI for Brownfield Documentation Generation!**
>
> Gemini Web's 1M+ token context window or Gemini CLI (when it's working) can analyze your ENTIRE codebase, or critical sections of it, all at once (obviously within reason):
>
> - Upload via GitHub URL or use gemini cli in the project folder
> - If working in the web: use the flattener-tool to flatten your project into a single file, then upload that file to your web agent.
## What is Brownfield Development?
Brownfield development refers to adding features, fixing bugs, or modernizing existing software projects. Unlike greenfield (new) projects, brownfield work requires understanding existing code, respecting constraints, and ensuring new changes integrate seamlessly without breaking existing functionality.
## When to Use BMad for Brownfield
- Add significant new features to existing applications
- Modernize legacy codebases
- Integrate new technologies or services
- Refactor complex systems
- Fix bugs that require architectural understanding
- Document undocumented systems
## When NOT to use a Brownfield Flow
If you have just completed an MVP with BMad, and you want to continue with post-MVP, its easier to just talk to the PM and ask it to work with you to create a new epic to add into the PRD, shard out the epic, update any architecture documents with the architect, and just go from there.
## The Complete Brownfield Workflow
1. **Follow the [<ins>User Guide - Installation</ins>](user-guide.md#installation) steps to setup your agent in the web.**
2. **Generate a 'flattened' single file of your entire codebase** run: ```npm run flatten```
### Choose Your Approach
#### Approach A: PRD-First (Recommended if adding very large and complex new features, single or multiple epics or massive changes)
**Best for**: Large codebases, monorepos, or when you know exactly what you want to build
1. **Create PRD First** to define requirements
2. **Document only relevant areas** based on PRD needs
3. **More efficient** - avoids documenting unused code
#### Approach B: Document-First (Good for Smaller Projects)
**Best for**: Smaller codebases, unknown systems, or exploratory changes
1. **Document entire system** first
2. **Create PRD** with full context
3. **More thorough** - captures everything
### Approach A: PRD-First Workflow (Recommended)
#### Phase 1: Define Requirements First
**In Gemini Web (with your flattened-codebase.xml uploaded):**
```bash
@pm
*create-brownfield-prd
```
The PM will:
- **Ask about your enhancement** requirements
- **Explore the codebase** to understand current state
- **Identify affected areas** that need documentation
- **Create focused PRD** with clear scope
**Key Advantage**: The PRD identifies which parts of your monorepo/large codebase actually need documentation!
#### Phase 2: Focused Documentation
**Still in Gemini Web, now with PRD context:**
```bash
@architect
*document-project
```
The analyst will:
- **Ask about your focus** if no PRD was provided
- **Offer options**: Create PRD, provide requirements, or describe the enhancement
- **Reference the PRD/description** to understand scope
- **Focus on relevant modules** identified in PRD or your description
- **Skip unrelated areas** to keep docs lean
- **Generate ONE architecture document** for all environments
The analyst creates:
- **One comprehensive architecture document** following fullstack-architecture template
- **Covers all system aspects** in a single file
- **Easy to copy and save** as `docs/project-architecture.md`
- **Can be sharded later** in IDE if desired
For example, if you say "Add payment processing to user service":
- Documents only: user service, API endpoints, database schemas, payment integrations
- Creates focused source tree showing only payment-related code paths
- Skips: admin panels, reporting modules, unrelated microservices
### Approach B: Document-First Workflow
#### Phase 1: Document the Existing System
**Best Approach - Gemini Web with 1M+ Context**:
1. **Go to Gemini Web** (gemini.google.com)
2. **Upload your project**:
- **Option A**: Paste your GitHub repository URL directly
- **Option B**: Upload your flattened-codebase.xml file
3. **Load the analyst agent**: Upload `dist/agents/architect.txt`
4. **Run documentation**: Type `*document-project`
The analyst will generate comprehensive documentation of everything.
#### Phase 2: Plan Your Enhancement
##### Option A: Full Brownfield Workflow (Recommended for Major Changes)
**1. Create Brownfield PRD**:
```bash
@pm
*create-brownfield-prd
```
The PM agent will:
- **Analyze existing documentation** from Phase 1
- **Request specific enhancement details** from you
- **Assess complexity** and recommend approach
- **Create epic/story structure** for the enhancement
- **Identify risks and integration points**
**How PM Agent Gets Project Context**:
- In Gemini Web: Already has full project context from Phase 1 documentation
- In IDE: Will ask "Please provide the path to your existing project documentation"
**Key Prompts You'll Encounter**:
- "What specific enhancement or feature do you want to add?"
- "Are there any existing systems or APIs this needs to integrate with?"
- "What are the critical constraints we must respect?"
- "What is your timeline and team size?"
**2. Create Brownfield Architecture**:
```bash
@architect
*create-brownfield-architecture
```
The architect will:
- **Review the brownfield PRD**
- **Design integration strategy**
- **Plan migration approach** if needed
- **Identify technical risks**
- **Define compatibility requirements**
##### Option B: Quick Enhancement (For Focused Changes)
**For Single Epic Without Full PRD**:
```bash
@pm
*create-brownfield-epic
```
Use when:
- Enhancement is well-defined and isolated
- Existing documentation is comprehensive
- Changes don't impact multiple systems
- You need quick turnaround
**For Single Story**:
```bash
@pm
*create-brownfield-story
```
Use when:
- Bug fix or tiny feature
- Very isolated change
- No architectural impact
- Clear implementation path
### Phase 3: Validate Planning Artifacts
```bash
@po
*execute-checklist-po
```
The PO ensures:
- Compatibility with existing system
- No breaking changes planned
- Risk mitigation strategies in place
- Clear integration approach
### Phase 4: Save and Shard Documents
1. Save your PRD and Architecture as:
docs/brownfield-prd.md
docs/brownfield-architecture.md
2. Shard your docs:
In your IDE
```bash
@po
shard docs/brownfield-prd.md
```
```bash
@po
shard docs/brownfield-architecture.md
```
### Phase 5: Transition to Development
**Follow the [<ins>Enhanced IDE Development Workflow</ins>](enhanced-ide-development-workflow.md)**
## Brownfield Best Practices
### 1. Always Document First
Even if you think you know the codebase:
- Run `document-project` to capture current state
- AI agents need this context
- Discovers undocumented patterns
### 2. Respect Existing Patterns
The brownfield templates specifically look for:
- Current coding conventions
- Existing architectural patterns
- Technology constraints
- Team preferences
### 3. Plan for Gradual Rollout
Brownfield changes should:
- Support feature flags
- Plan rollback strategies
- Include migration scripts
- Maintain backwards compatibility
### 4. Test Integration Thoroughly
Focus testing on:
- Integration points
- Existing functionality (regression)
- Performance impact
- Data migrations
### 5. Communicate Changes
Document:
- What changed and why
- Migration instructions
- New patterns introduced
- Deprecation notices
## Common Brownfield Scenarios
### Scenario 1: Adding a New Feature
1. Document existing system
2. Create brownfield PRD focusing on integration
3. Architecture emphasizes compatibility
4. Stories include integration tasks
### Scenario 2: Modernizing Legacy Code
1. Extensive documentation phase
2. PRD includes migration strategy
3. Architecture plans gradual transition
4. Stories follow strangler fig pattern
### Scenario 3: Bug Fix in Complex System
1. Document relevant subsystems
2. Use `create-brownfield-story` for focused fix
3. Include regression test requirements
4. QA validates no side effects
### Scenario 4: API Integration
1. Document existing API patterns
2. PRD defines integration requirements
3. Architecture ensures consistent patterns
4. Stories include API documentation updates
## Troubleshooting
### "The AI doesn't understand my codebase"
**Solution**: Re-run `document-project` with more specific paths to critical files
### "Generated plans don't fit our patterns"
**Solution**: Update generated documentation with your specific conventions before planning phase
### "Too much boilerplate for small changes"
**Solution**: Use `create-brownfield-story` instead of full workflow
### "Integration points unclear"
**Solution**: Provide more context during PRD creation, specifically highlighting integration systems
## Quick Reference
### Brownfield-Specific Commands
```bash
# Document existing project
@architect → *document-project
# Create enhancement PRD
@pm → *create-brownfield-prd
# Create architecture with integration focus
@architect → *create-brownfield-architecture
# Quick epic creation
@pm → *create-brownfield-epic
# Single story creation
@pm → *create-brownfield-story
```
### Decision Tree
```text
Do you have a large codebase or monorepo?
├─ Yes → PRD-First Approach
│ └─ Create PRD → Document only affected areas
└─ No → Is the codebase well-known to you?
├─ Yes → PRD-First Approach
└─ No → Document-First Approach
Is this a major enhancement affecting multiple systems?
├─ Yes → Full Brownfield Workflow
└─ No → Is this more than a simple bug fix?
├─ Yes → brownfield-create-epic
└─ No → brownfield-create-story
```
## Conclusion
Brownfield development with BMad-Method provides structure and safety when modifying existing systems. The key is providing comprehensive context through documentation, using specialized templates that consider integration requirements, and following workflows that respect existing constraints while enabling progress.
Remember: **Document First, Plan Carefully, Integrate Safely**

View File

@@ -9,7 +9,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -22,14 +21,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -38,7 +35,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -46,7 +42,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -60,7 +55,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -70,7 +64,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context

View File

@@ -14,7 +14,7 @@ template:
output:
format: markdown
filename: default-path/to/{{filename}}.md
title: "{{variable}} Document Title"
title: '{{variable}} Document Title'
workflow:
mode: interactive
@@ -108,8 +108,8 @@ sections:
Use `{{variable_name}}` in titles, templates, and content:
```yaml
title: "Epic {{epic_number}} {{epic_title}}"
template: "As a {{user_type}}, I want {{action}}, so that {{benefit}}."
title: 'Epic {{epic_number}} {{epic_title}}'
template: 'As a {{user_type}}, I want {{action}}, so that {{benefit}}.'
```
### Conditional Sections
@@ -212,7 +212,7 @@ choices:
- id: criteria
title: Acceptance Criteria
type: numbered-list
item_template: "{{criterion_number}}: {{criteria}}"
item_template: '{{criterion_number}}: {{criteria}}'
repeatable: true
```
@@ -220,7 +220,7 @@ choices:
````yaml
examples:
- "FR6: The system must authenticate users within 2 seconds"
- 'FR6: The system must authenticate users within 2 seconds'
- |
```mermaid
sequenceDiagram

View File

@@ -106,7 +106,7 @@ dependencies:
==================== START: .bmad-core/tasks/facilitate-brainstorming-session.md ====================
---
docOutputLocation: docs/brainstorming-session-results.md
template: ".bmad-core/templates/brainstorming-output-tmpl.yaml"
template: '.bmad-core/templates/brainstorming-output-tmpl.yaml'
---
# Facilitate Brainstorming Session Task
@@ -149,7 +149,7 @@ If user selects Option 1, present numbered list of techniques from the brainstor
1. Apply selected technique according to data file description
2. Keep engaging with technique until user indicates they want to:
- Choose a different technique
- Apply current ideas to a new technique
- Apply current ideas to a new technique
- Move to convergent phase
- End session
@@ -266,63 +266,54 @@ CRITICAL: First, help the user select the most appropriate research focus based
Present these numbered options to the user:
1. **Product Validation Research**
- Validate product hypotheses and market fit
- Test assumptions about user needs and solutions
- Assess technical and business feasibility
- Identify risks and mitigation strategies
2. **Market Opportunity Research**
- Analyze market size and growth potential
- Identify market segments and dynamics
- Assess market entry strategies
- Evaluate timing and market readiness
3. **User & Customer Research**
- Deep dive into user personas and behaviors
- Understand jobs-to-be-done and pain points
- Map customer journeys and touchpoints
- Analyze willingness to pay and value perception
4. **Competitive Intelligence Research**
- Detailed competitor analysis and positioning
- Feature and capability comparisons
- Business model and strategy analysis
- Identify competitive advantages and gaps
5. **Technology & Innovation Research**
- Assess technology trends and possibilities
- Evaluate technical approaches and architectures
- Identify emerging technologies and disruptions
- Analyze build vs. buy vs. partner options
6. **Industry & Ecosystem Research**
- Map industry value chains and dynamics
- Identify key players and relationships
- Analyze regulatory and compliance factors
- Understand partnership opportunities
7. **Strategic Options Research**
- Evaluate different strategic directions
- Assess business model alternatives
- Analyze go-to-market strategies
- Consider expansion and scaling paths
8. **Risk & Feasibility Research**
- Identify and assess various risk factors
- Evaluate implementation challenges
- Analyze resource requirements
- Consider regulatory and legal implications
9. **Custom Research Focus**
- User-defined research objectives
- Specialized domain investigation
- Cross-functional research needs
@@ -491,13 +482,11 @@ CRITICAL: collaborate with the user to develop specific, actionable research que
### 5. Review and Refinement
1. **Present Complete Prompt**
- Show the full research prompt
- Explain key elements and rationale
- Highlight any assumptions made
2. **Gather Feedback**
- Are the objectives clear and correct?
- Do the questions address all concerns?
- Is the scope appropriate?
@@ -872,9 +861,9 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
### Change Log
| Date | Version | Description | Author |
|------|---------|-------------|--------|
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
| Date | Version | Description | Author |
| ------ | ------- | --------------------------- | --------- |
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
## Quick Reference - Key Files and Entry Points
@@ -897,11 +886,11 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
### Actual Tech Stack (from package.json/requirements.txt)
| Category | Technology | Version | Notes |
|----------|------------|---------|--------|
| Runtime | Node.js | 16.x | [Any constraints] |
| Framework | Express | 4.18.2 | [Custom middleware?] |
| Database | PostgreSQL | 13 | [Connection pooling setup] |
| Category | Technology | Version | Notes |
| --------- | ---------- | ------- | -------------------------- |
| Runtime | Node.js | 16.x | [Any constraints] |
| Framework | Express | 4.18.2 | [Custom middleware?] |
| Database | PostgreSQL | 13 | [Connection pooling setup] |
etc...
@@ -940,6 +929,7 @@ project-root/
### Data Models
Instead of duplicating, reference actual model files:
- **User Model**: See `src/models/User.js`
- **Order Model**: See `src/models/Order.js`
- **Related Types**: TypeScript definitions in `src/types/`
@@ -969,10 +959,10 @@ Instead of duplicating, reference actual model files:
### External Services
| Service | Purpose | Integration Type | Key Files |
|---------|---------|------------------|-----------|
| Stripe | Payments | REST API | `src/integrations/stripe/` |
| SendGrid | Emails | SDK | `src/services/emailService.js` |
| Service | Purpose | Integration Type | Key Files |
| -------- | -------- | ---------------- | ------------------------------ |
| Stripe | Payments | REST API | `src/integrations/stripe/` |
| SendGrid | Emails | SDK | `src/services/emailService.js` |
etc...
@@ -1017,6 +1007,7 @@ npm run test:integration # Runs integration tests (requires local DB)
### Files That Will Need Modification
Based on the enhancement requirements, these files will be affected:
- `src/services/userService.js` - Add new user fields
- `src/models/User.js` - Update schema
- `src/routes/userRoutes.js` - New endpoints
@@ -1110,35 +1101,35 @@ template:
output:
format: markdown
filename: docs/brief.md
title: "Project Brief: {{project_name}}"
title: 'Project Brief: {{project_name}}'
workflow:
mode: interactive
elicitation: advanced-elicitation
custom_elicitation:
title: "Project Brief Elicitation Actions"
title: 'Project Brief Elicitation Actions'
options:
- "Expand section with more specific details"
- "Validate against similar successful products"
- "Stress test assumptions with edge cases"
- "Explore alternative solution approaches"
- "Analyze resource/constraint trade-offs"
- "Generate risk mitigation strategies"
- "Challenge scope from MVP minimalist view"
- "Brainstorm creative feature possibilities"
- "If only we had [resource/capability/time]..."
- "Proceed to next section"
- 'Expand section with more specific details'
- 'Validate against similar successful products'
- 'Stress test assumptions with edge cases'
- 'Explore alternative solution approaches'
- 'Analyze resource/constraint trade-offs'
- 'Generate risk mitigation strategies'
- 'Challenge scope from MVP minimalist view'
- 'Brainstorm creative feature possibilities'
- 'If only we had [resource/capability/time]...'
- 'Proceed to next section'
sections:
- id: introduction
instruction: |
This template guides creation of a comprehensive Project Brief that serves as the foundational input for product development.
Start by asking the user which mode they prefer:
1. **Interactive Mode** - Work through each section collaboratively
2. **YOLO Mode** - Generate complete draft for review and refinement
Before beginning, understand what inputs are available (brainstorming results, market research, competitive analysis, initial ideas) and gather project context.
- id: executive-summary
@@ -1149,7 +1140,7 @@ sections:
- Primary problem being solved
- Target market identification
- Key value proposition
template: "{{executive_summary_content}}"
template: '{{executive_summary_content}}'
- id: problem-statement
title: Problem Statement
@@ -1159,7 +1150,7 @@ sections:
- Impact of the problem (quantify if possible)
- Why existing solutions fall short
- Urgency and importance of solving this now
template: "{{detailed_problem_description}}"
template: '{{detailed_problem_description}}'
- id: proposed-solution
title: Proposed Solution
@@ -1169,7 +1160,7 @@ sections:
- Key differentiators from existing solutions
- Why this solution will succeed where others haven't
- High-level vision for the product
template: "{{solution_description}}"
template: '{{solution_description}}'
- id: target-users
title: Target Users
@@ -1181,12 +1172,12 @@ sections:
- Goals they're trying to achieve
sections:
- id: primary-segment
title: "Primary User Segment: {{segment_name}}"
template: "{{primary_user_description}}"
title: 'Primary User Segment: {{segment_name}}'
template: '{{primary_user_description}}'
- id: secondary-segment
title: "Secondary User Segment: {{segment_name}}"
title: 'Secondary User Segment: {{segment_name}}'
condition: Has secondary user segment
template: "{{secondary_user_description}}"
template: '{{secondary_user_description}}'
- id: goals-metrics
title: Goals & Success Metrics
@@ -1195,15 +1186,15 @@ sections:
- id: business-objectives
title: Business Objectives
type: bullet-list
template: "- {{objective_with_metric}}"
template: '- {{objective_with_metric}}'
- id: user-success-metrics
title: User Success Metrics
type: bullet-list
template: "- {{user_metric}}"
template: '- {{user_metric}}'
- id: kpis
title: Key Performance Indicators (KPIs)
type: bullet-list
template: "- {{kpi}}: {{definition_and_target}}"
template: '- {{kpi}}: {{definition_and_target}}'
- id: mvp-scope
title: MVP Scope
@@ -1212,14 +1203,14 @@ sections:
- id: core-features
title: Core Features (Must Have)
type: bullet-list
template: "- **{{feature}}:** {{description_and_rationale}}"
template: '- **{{feature}}:** {{description_and_rationale}}'
- id: out-of-scope
title: Out of Scope for MVP
type: bullet-list
template: "- {{feature_or_capability}}"
template: '- {{feature_or_capability}}'
- id: mvp-success-criteria
title: MVP Success Criteria
template: "{{mvp_success_definition}}"
template: '{{mvp_success_definition}}'
- id: post-mvp-vision
title: Post-MVP Vision
@@ -1227,13 +1218,13 @@ sections:
sections:
- id: phase-2-features
title: Phase 2 Features
template: "{{next_priority_features}}"
template: '{{next_priority_features}}'
- id: long-term-vision
title: Long-term Vision
template: "{{one_two_year_vision}}"
template: '{{one_two_year_vision}}'
- id: expansion-opportunities
title: Expansion Opportunities
template: "{{potential_expansions}}"
template: '{{potential_expansions}}'
- id: technical-considerations
title: Technical Considerations
@@ -1274,7 +1265,7 @@ sections:
- id: key-assumptions
title: Key Assumptions
type: bullet-list
template: "- {{assumption}}"
template: '- {{assumption}}'
- id: risks-questions
title: Risks & Open Questions
@@ -1283,15 +1274,15 @@ sections:
- id: key-risks
title: Key Risks
type: bullet-list
template: "- **{{risk}}:** {{description_and_impact}}"
template: '- **{{risk}}:** {{description_and_impact}}'
- id: open-questions
title: Open Questions
type: bullet-list
template: "- {{question}}"
template: '- {{question}}'
- id: research-areas
title: Areas Needing Further Research
type: bullet-list
template: "- {{research_topic}}"
template: '- {{research_topic}}'
- id: appendices
title: Appendices
@@ -1308,10 +1299,10 @@ sections:
- id: stakeholder-input
title: B. Stakeholder Input
condition: Has stakeholder feedback
template: "{{stakeholder_feedback}}"
template: '{{stakeholder_feedback}}'
- id: references
title: C. References
template: "{{relevant_links_and_docs}}"
template: '{{relevant_links_and_docs}}'
- id: next-steps
title: Next Steps
@@ -1319,7 +1310,7 @@ sections:
- id: immediate-actions
title: Immediate Actions
type: numbered-list
template: "{{action_item}}"
template: '{{action_item}}'
- id: pm-handoff
title: PM Handoff
content: |
@@ -1334,24 +1325,24 @@ template:
output:
format: markdown
filename: docs/market-research.md
title: "Market Research Report: {{project_product_name}}"
title: 'Market Research Report: {{project_product_name}}'
workflow:
mode: interactive
elicitation: advanced-elicitation
custom_elicitation:
title: "Market Research Elicitation Actions"
title: 'Market Research Elicitation Actions'
options:
- "Expand market sizing calculations with sensitivity analysis"
- "Deep dive into a specific customer segment"
- "Analyze an emerging market trend in detail"
- "Compare this market to an analogous market"
- "Stress test market assumptions"
- "Explore adjacent market opportunities"
- "Challenge market definition and boundaries"
- "Generate strategic scenarios (best/base/worst case)"
- "If only we had considered [X market factor]..."
- "Proceed to next section"
- 'Expand market sizing calculations with sensitivity analysis'
- 'Deep dive into a specific customer segment'
- 'Analyze an emerging market trend in detail'
- 'Compare this market to an analogous market'
- 'Stress test market assumptions'
- 'Explore adjacent market opportunities'
- 'Challenge market definition and boundaries'
- 'Generate strategic scenarios (best/base/worst case)'
- 'If only we had considered [X market factor]...'
- 'Proceed to next section'
sections:
- id: executive-summary
@@ -1433,7 +1424,7 @@ sections:
repeatable: true
sections:
- id: segment
title: "Segment {{segment_number}}: {{segment_name}}"
title: 'Segment {{segment_number}}: {{segment_name}}'
template: |
- **Description:** {{brief_overview}}
- **Size:** {{number_of_customers_market_value}}
@@ -1459,7 +1450,7 @@ sections:
instruction: Map the end-to-end customer experience for primary segments
template: |
For primary customer segment:
1. **Awareness:** {{discovery_process}}
2. **Consideration:** {{evaluation_criteria}}
3. **Purchase:** {{decision_triggers}}
@@ -1502,20 +1493,20 @@ sections:
instruction: Analyze each force with specific evidence and implications
sections:
- id: supplier-power
title: "Supplier Power: {{power_level}}"
template: "{{analysis_and_implications}}"
title: 'Supplier Power: {{power_level}}'
template: '{{analysis_and_implications}}'
- id: buyer-power
title: "Buyer Power: {{power_level}}"
template: "{{analysis_and_implications}}"
title: 'Buyer Power: {{power_level}}'
template: '{{analysis_and_implications}}'
- id: competitive-rivalry
title: "Competitive Rivalry: {{intensity_level}}"
template: "{{analysis_and_implications}}"
title: 'Competitive Rivalry: {{intensity_level}}'
template: '{{analysis_and_implications}}'
- id: threat-new-entry
title: "Threat of New Entry: {{threat_level}}"
template: "{{analysis_and_implications}}"
title: 'Threat of New Entry: {{threat_level}}'
template: '{{analysis_and_implications}}'
- id: threat-substitutes
title: "Threat of Substitutes: {{threat_level}}"
template: "{{analysis_and_implications}}"
title: 'Threat of Substitutes: {{threat_level}}'
template: '{{analysis_and_implications}}'
- id: adoption-lifecycle
title: Technology Adoption Lifecycle Stage
instruction: |
@@ -1533,7 +1524,7 @@ sections:
repeatable: true
sections:
- id: opportunity
title: "Opportunity {{opportunity_number}}: {{name}}"
title: 'Opportunity {{opportunity_number}}: {{name}}'
template: |
- **Description:** {{what_is_the_opportunity}}
- **Size/Potential:** {{quantified_potential}}
@@ -1589,24 +1580,24 @@ template:
output:
format: markdown
filename: docs/competitor-analysis.md
title: "Competitive Analysis Report: {{project_product_name}}"
title: 'Competitive Analysis Report: {{project_product_name}}'
workflow:
mode: interactive
elicitation: advanced-elicitation
custom_elicitation:
title: "Competitive Analysis Elicitation Actions"
title: 'Competitive Analysis Elicitation Actions'
options:
- "Deep dive on a specific competitor's strategy"
- "Analyze competitive dynamics in a specific segment"
- "War game competitive responses to your moves"
- "Explore partnership vs. competition scenarios"
- "Stress test differentiation claims"
- "Analyze disruption potential (yours or theirs)"
- "Compare to competition in adjacent markets"
- "Generate win/loss analysis insights"
- 'Analyze competitive dynamics in a specific segment'
- 'War game competitive responses to your moves'
- 'Explore partnership vs. competition scenarios'
- 'Stress test differentiation claims'
- 'Analyze disruption potential (yours or theirs)'
- 'Compare to competition in adjacent markets'
- 'Generate win/loss analysis insights'
- "If only we had known about [competitor X's plan]..."
- "Proceed to next section"
- 'Proceed to next section'
sections:
- id: executive-summary
@@ -1660,7 +1651,7 @@ sections:
title: Competitor Prioritization Matrix
instruction: |
Help categorize competitors by market share and strategic threat level
Create a 2x2 matrix:
- Priority 1 (Core Competitors): High Market Share + High Threat
- Priority 2 (Emerging Threats): Low Market Share + High Threat
@@ -1673,7 +1664,7 @@ sections:
repeatable: true
sections:
- id: competitor
title: "{{competitor_name}} - Priority {{priority_level}}"
title: '{{competitor_name}} - Priority {{priority_level}}'
sections:
- id: company-overview
title: Company Overview
@@ -1705,11 +1696,11 @@ sections:
- id: strengths
title: Strengths
type: bullet-list
template: "- {{strength}}"
template: '- {{strength}}'
- id: weaknesses
title: Weaknesses
type: bullet-list
template: "- {{weakness}}"
template: '- {{weakness}}'
- id: market-position
title: Market Position & Performance
template: |
@@ -1725,24 +1716,37 @@ sections:
title: Feature Comparison Matrix
instruction: Create a detailed comparison table of key features across competitors
type: table
columns: ["Feature Category", "{{your_company}}", "{{competitor_1}}", "{{competitor_2}}", "{{competitor_3}}"]
columns:
[
'Feature Category',
'{{your_company}}',
'{{competitor_1}}',
'{{competitor_2}}',
'{{competitor_3}}',
]
rows:
- category: "Core Functionality"
- category: 'Core Functionality'
items:
- ["Feature A", "{{status}}", "{{status}}", "{{status}}", "{{status}}"]
- ["Feature B", "{{status}}", "{{status}}", "{{status}}", "{{status}}"]
- category: "User Experience"
- ['Feature A', '{{status}}', '{{status}}', '{{status}}', '{{status}}']
- ['Feature B', '{{status}}', '{{status}}', '{{status}}', '{{status}}']
- category: 'User Experience'
items:
- ["Mobile App", "{{rating}}", "{{rating}}", "{{rating}}", "{{rating}}"]
- ["Onboarding Time", "{{time}}", "{{time}}", "{{time}}", "{{time}}"]
- category: "Integration & Ecosystem"
- ['Mobile App', '{{rating}}', '{{rating}}', '{{rating}}', '{{rating}}']
- ['Onboarding Time', '{{time}}', '{{time}}', '{{time}}', '{{time}}']
- category: 'Integration & Ecosystem'
items:
- ["API Availability", "{{availability}}", "{{availability}}", "{{availability}}", "{{availability}}"]
- ["Third-party Integrations", "{{number}}", "{{number}}", "{{number}}", "{{number}}"]
- category: "Pricing & Plans"
- [
'API Availability',
'{{availability}}',
'{{availability}}',
'{{availability}}',
'{{availability}}',
]
- ['Third-party Integrations', '{{number}}', '{{number}}', '{{number}}', '{{number}}']
- category: 'Pricing & Plans'
items:
- ["Starting Price", "{{price}}", "{{price}}", "{{price}}", "{{price}}"]
- ["Free Tier", "{{yes_no}}", "{{yes_no}}", "{{yes_no}}", "{{yes_no}}"]
- ['Starting Price', '{{price}}', '{{price}}', '{{price}}', '{{price}}']
- ['Free Tier', '{{yes_no}}', '{{yes_no}}', '{{yes_no}}', '{{yes_no}}']
- id: swot-comparison
title: SWOT Comparison
instruction: Create SWOT analysis for your solution vs. top competitors
@@ -1755,7 +1759,7 @@ sections:
- **Opportunities:** {{opportunities}}
- **Threats:** {{threats}}
- id: vs-competitor
title: "vs. {{main_competitor}}"
title: 'vs. {{main_competitor}}'
template: |
- **Competitive Advantages:** {{your_advantages}}
- **Competitive Disadvantages:** {{their_advantages}}
@@ -1764,7 +1768,7 @@ sections:
title: Positioning Map
instruction: |
Describe competitor positions on key dimensions
Create a positioning description using 2 key dimensions relevant to the market, such as:
- Price vs. Features
- Ease of Use vs. Power
@@ -1799,7 +1803,7 @@ sections:
title: Blue Ocean Opportunities
instruction: |
Identify uncontested market spaces
List opportunities to create new market space:
- Underserved segments
- Unaddressed use cases
@@ -1885,7 +1889,7 @@ template:
output:
format: markdown
filename: docs/brainstorming-session-results.md
title: "Brainstorming Session Results"
title: 'Brainstorming Session Results'
workflow:
mode: non-interactive
@@ -1903,45 +1907,45 @@ sections:
- id: summary-details
template: |
**Topic:** {{session_topic}}
**Session Goals:** {{stated_goals}}
**Techniques Used:** {{techniques_list}}
**Total Ideas Generated:** {{total_ideas}}
- id: key-themes
title: "Key Themes Identified:"
title: 'Key Themes Identified:'
type: bullet-list
template: "- {{theme}}"
template: '- {{theme}}'
- id: technique-sessions
title: Technique Sessions
repeatable: true
sections:
- id: technique
title: "{{technique_name}} - {{duration}}"
title: '{{technique_name}} - {{duration}}'
sections:
- id: description
template: "**Description:** {{technique_description}}"
template: '**Description:** {{technique_description}}'
- id: ideas-generated
title: "Ideas Generated:"
title: 'Ideas Generated:'
type: numbered-list
template: "{{idea}}"
template: '{{idea}}'
- id: insights
title: "Insights Discovered:"
title: 'Insights Discovered:'
type: bullet-list
template: "- {{insight}}"
template: '- {{insight}}'
- id: connections
title: "Notable Connections:"
title: 'Notable Connections:'
type: bullet-list
template: "- {{connection}}"
template: '- {{connection}}'
- id: idea-categorization
title: Idea Categorization
sections:
- id: immediate-opportunities
title: Immediate Opportunities
content: "*Ideas ready to implement now*"
content: '*Ideas ready to implement now*'
repeatable: true
type: numbered-list
template: |
@@ -1951,7 +1955,7 @@ sections:
- Resources needed: {{requirements}}
- id: future-innovations
title: Future Innovations
content: "*Ideas requiring development/research*"
content: '*Ideas requiring development/research*'
repeatable: true
type: numbered-list
template: |
@@ -1961,7 +1965,7 @@ sections:
- Timeline estimate: {{timeline}}
- id: moonshots
title: Moonshots
content: "*Ambitious, transformative concepts*"
content: '*Ambitious, transformative concepts*'
repeatable: true
type: numbered-list
template: |
@@ -1971,9 +1975,9 @@ sections:
- Challenges to overcome: {{challenges}}
- id: insights-learnings
title: Insights & Learnings
content: "*Key realizations from the session*"
content: '*Key realizations from the session*'
type: bullet-list
template: "- {{insight}}: {{description_and_implications}}"
template: '- {{insight}}: {{description_and_implications}}'
- id: action-planning
title: Action Planning
@@ -1982,21 +1986,21 @@ sections:
title: Top 3 Priority Ideas
sections:
- id: priority-1
title: "#1 Priority: {{idea_name}}"
title: '#1 Priority: {{idea_name}}'
template: |
- Rationale: {{rationale}}
- Next steps: {{next_steps}}
- Resources needed: {{resources}}
- Timeline: {{timeline}}
- id: priority-2
title: "#2 Priority: {{idea_name}}"
title: '#2 Priority: {{idea_name}}'
template: |
- Rationale: {{rationale}}
- Next steps: {{next_steps}}
- Resources needed: {{resources}}
- Timeline: {{timeline}}
- id: priority-3
title: "#3 Priority: {{idea_name}}"
title: '#3 Priority: {{idea_name}}'
template: |
- Rationale: {{rationale}}
- Next steps: {{next_steps}}
@@ -2009,19 +2013,19 @@ sections:
- id: what-worked
title: What Worked Well
type: bullet-list
template: "- {{aspect}}"
template: '- {{aspect}}'
- id: areas-exploration
title: Areas for Further Exploration
type: bullet-list
template: "- {{area}}: {{reason}}"
template: '- {{area}}: {{reason}}'
- id: recommended-techniques
title: Recommended Follow-up Techniques
type: bullet-list
template: "- {{technique}}: {{reason}}"
template: '- {{technique}}: {{reason}}'
- id: questions-emerged
title: Questions That Emerged
type: bullet-list
template: "- {{question}}"
template: '- {{question}}'
- id: next-session
title: Next Session Planning
template: |
@@ -2032,7 +2036,7 @@ sections:
- id: footer
content: |
---
*Session facilitated using the BMAD-METHOD brainstorming framework*
==================== END: .bmad-core/templates/brainstorming-output-tmpl.yaml ====================
@@ -2337,7 +2341,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
- **Claude Code**: `/agent-name` (e.g., `/bmad-master`)
- **Cursor**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `/agent-name` (e.g., `/bmad-master`)
- **Trae**: `@agent-name` (e.g., `@bmad-master`)
- **Roo Code**: Select mode from mode selector (e.g., `bmad-master`)
- **GitHub Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
@@ -2581,7 +2585,7 @@ Each status change requires user verification and approval before proceeding.
#### Greenfield Development
- Business analysis and market research
- Product requirements and feature definition
- Product requirements and feature definition
- System architecture and design
- Development execution
- Testing and deployment
@@ -2690,8 +2694,11 @@ Templates with Level 2 headings (`##`) can be automatically sharded:
```markdown
## Goals and Background Context
## Requirements
## Requirements
## User Interface Design Goals
## Success Metrics
```

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -405,7 +405,7 @@ Provide a user-friendly interface to the BMad knowledge base without overwhelmin
## Instructions
When entering KB mode (*kb-mode), follow these steps:
When entering KB mode (\*kb-mode), follow these steps:
### 1. Welcome and Guide
@@ -447,12 +447,12 @@ Or ask me about anything else related to BMad-Method!
When user is done or wants to exit KB mode:
- Summarize key points discussed if helpful
- Remind them they can return to KB mode anytime with *kb-mode
- Remind them they can return to KB mode anytime with \*kb-mode
- Suggest next steps based on what was discussed
## Example Interaction
**User**: *kb-mode
**User**: \*kb-mode
**Assistant**: I've entered KB mode and have access to the full BMad knowledge base. I can help you with detailed information about any aspect of BMad-Method.
@@ -775,7 +775,7 @@ You are the "Vibe CEO" - thinking like a CEO with unlimited resources and a sing
- **Claude Code**: `/agent-name` (e.g., `/bmad-master`)
- **Cursor**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `@agent-name` (e.g., `@bmad-master`)
- **Windsurf**: `/agent-name` (e.g., `/bmad-master`)
- **Trae**: `@agent-name` (e.g., `@bmad-master`)
- **Roo Code**: Select mode from mode selector (e.g., `bmad-master`)
- **GitHub Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
@@ -1019,7 +1019,7 @@ Each status change requires user verification and approval before proceeding.
#### Greenfield Development
- Business analysis and market research
- Product requirements and feature definition
- Product requirements and feature definition
- System architecture and design
- Development execution
- Testing and deployment
@@ -1128,8 +1128,11 @@ Templates with Level 2 headings (`##`) can be automatically sharded:
```markdown
## Goals and Background Context
## Requirements
## Requirements
## User Interface Design Goals
## Success Metrics
```
@@ -1286,16 +1289,19 @@ Use the **expansion-creator** pack to build your own:
## Core Reflective Methods
**Expand or Contract for Audience**
- Ask whether to 'expand' (add detail, elaborate) or 'contract' (simplify, clarify)
- Identify specific target audience if relevant
- Tailor content complexity and depth accordingly
**Explain Reasoning (CoT Step-by-Step)**
- Walk through the step-by-step thinking process
- Reveal underlying assumptions and decision points
- Show how conclusions were reached from current role's perspective
**Critique and Refine**
- Review output for flaws, inconsistencies, or improvement areas
- Identify specific weaknesses from role's expertise
- Suggest refined version reflecting domain knowledge
@@ -1303,12 +1309,14 @@ Use the **expansion-creator** pack to build your own:
## Structural Analysis Methods
**Analyze Logical Flow and Dependencies**
- Examine content structure for logical progression
- Check internal consistency and coherence
- Identify and validate dependencies between elements
- Confirm effective ordering and sequencing
**Assess Alignment with Overall Goals**
- Evaluate content contribution to stated objectives
- Identify any misalignments or gaps
- Interpret alignment from specific role's perspective
@@ -1317,12 +1325,14 @@ Use the **expansion-creator** pack to build your own:
## Risk and Challenge Methods
**Identify Potential Risks and Unforeseen Issues**
- Brainstorm potential risks from role's expertise
- Identify overlooked edge cases or scenarios
- Anticipate unintended consequences
- Highlight implementation challenges
**Challenge from Critical Perspective**
- Adopt critical stance on current content
- Play devil's advocate from specified viewpoint
- Argue against proposal highlighting weaknesses
@@ -1331,12 +1341,14 @@ Use the **expansion-creator** pack to build your own:
## Creative Exploration Methods
**Tree of Thoughts Deep Dive**
- Break problem into discrete "thoughts" or intermediate steps
- Explore multiple reasoning paths simultaneously
- Use self-evaluation to classify each path as "sure", "likely", or "impossible"
- Apply search algorithms (BFS/DFS) to find optimal solution paths
**Hindsight is 20/20: The 'If Only...' Reflection**
- Imagine retrospective scenario based on current content
- Identify the one "if only we had known/done X..." insight
- Describe imagined consequences humorously or dramatically
@@ -1345,6 +1357,7 @@ Use the **expansion-creator** pack to build your own:
## Multi-Persona Collaboration Methods
**Agile Team Perspective Shift**
- Rotate through different Scrum team member viewpoints
- Product Owner: Focus on user value and business impact
- Scrum Master: Examine process flow and team dynamics
@@ -1352,12 +1365,14 @@ Use the **expansion-creator** pack to build your own:
- QA: Identify testing scenarios and quality concerns
**Stakeholder Round Table**
- Convene virtual meeting with multiple personas
- Each persona contributes unique perspective on content
- Identify conflicts and synergies between viewpoints
- Synthesize insights into actionable recommendations
**Meta-Prompting Analysis**
- Step back to analyze the structure and logic of current approach
- Question the format and methodology being used
- Suggest alternative frameworks or mental models
@@ -1366,24 +1381,28 @@ Use the **expansion-creator** pack to build your own:
## Advanced 2025 Techniques
**Self-Consistency Validation**
- Generate multiple reasoning paths for same problem
- Compare consistency across different approaches
- Identify most reliable and robust solution
- Highlight areas where approaches diverge and why
**ReWOO (Reasoning Without Observation)**
- Separate parametric reasoning from tool-based actions
- Create reasoning plan without external dependencies
- Identify what can be solved through pure reasoning
- Optimize for efficiency and reduced token usage
**Persona-Pattern Hybrid**
- Combine specific role expertise with elicitation pattern
- Architect + Risk Analysis: Deep technical risk assessment
- UX Expert + User Journey: End-to-end experience critique
- PM + Stakeholder Analysis: Multi-perspective impact review
**Emergent Collaboration Discovery**
- Allow multiple perspectives to naturally emerge
- Identify unexpected insights from persona interactions
- Explore novel combinations of viewpoints
@@ -1392,18 +1411,21 @@ Use the **expansion-creator** pack to build your own:
## Game-Based Elicitation Methods
**Red Team vs Blue Team**
- Red Team: Attack the proposal, find vulnerabilities
- Blue Team: Defend and strengthen the approach
- Competitive analysis reveals blind spots
- Results in more robust, battle-tested solutions
**Innovation Tournament**
- Pit multiple alternative approaches against each other
- Score each approach across different criteria
- Crowd-source evaluation from different personas
- Identify winning combination of features
**Escape Room Challenge**
- Present content as constraints to work within
- Find creative solutions within tight limitations
- Identify minimum viable approach
@@ -1412,6 +1434,7 @@ Use the **expansion-creator** pack to build your own:
## Process Control
**Proceed / No Further Actions**
- Acknowledge choice to finalize current work
- Accept output as-is or move to next step
- Prepare to continue without additional elicitation

32
dist/agents/dev.txt vendored
View File

@@ -72,15 +72,15 @@ commands:
- run-tests: Execute linting and tests
- explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer.
- exit: Say goodbye as the Developer, and then abandon inhabiting this persona
develop-story:
order-of-execution: Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then update the task checkbox with [x]→Update story section File List to ensure it lists and new or modified or deleted source file→repeat order-of-execution until complete
story-file-updates-ONLY:
- CRITICAL: ONLY UPDATE THE STORY FILE WITH UPDATES TO SECTIONS INDICATED BELOW. DO NOT MODIFY ANY OTHER SECTIONS.
- CRITICAL: You are ONLY authorized to edit these specific sections of story files - Tasks / Subtasks Checkboxes, Dev Agent Record section and all its subsections, Agent Model Used, Debug Log References, Completion Notes List, File List, Change Log, Status
- CRITICAL: DO NOT modify Status, Story, Acceptance Criteria, Dev Notes, Testing sections, or any other sections not listed above
blocking: 'HALT for: Unapproved deps needed, confirm with user | Ambiguous after story check | 3 failures attempting to implement or fix something repeatedly | Missing config | Failing regression'
ready-for-review: Code matches requirements + All validations pass + Follows standards + File List complete
completion: 'All Tasks and Subtasks marked [x] and have tests→Validations and full regression passes (DON''T BE LAZY, EXECUTE ALL TESTS and CONFIRM)→Ensure File List is Complete→run the task execute-checklist for the checklist story-dod-checklist→set story status: ''Ready for Review''→HALT'
- develop-story:
- order-of-execution: Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then update the task checkbox with [x]→Update story section File List to ensure it lists and new or modified or deleted source file→repeat order-of-execution until complete
- story-file-updates-ONLY:
- CRITICAL: ONLY UPDATE THE STORY FILE WITH UPDATES TO SECTIONS INDICATED BELOW. DO NOT MODIFY ANY OTHER SECTIONS.
- CRITICAL: You are ONLY authorized to edit these specific sections of story files - Tasks / Subtasks Checkboxes, Dev Agent Record section and all its subsections, Agent Model Used, Debug Log References, Completion Notes List, File List, Change Log, Status
- CRITICAL: DO NOT modify Status, Story, Acceptance Criteria, Dev Notes, Testing sections, or any other sections not listed above
- blocking: 'HALT for: Unapproved deps needed, confirm with user | Ambiguous after story check | 3 failures attempting to implement or fix something repeatedly | Missing config | Failing regression'
- ready-for-review: Code matches requirements + All validations pass + Follows standards + File List complete
- completion: 'All Tasks and Subtasks marked [x] and have tests→Validations and full regression passes (DON''T BE LAZY, EXECUTE ALL TESTS and CONFIRM)→Ensure File List is Complete→run the task execute-checklist for the checklist story-dod-checklist→set story status: ''Ready for Review''→HALT'
dependencies:
tasks:
- execute-checklist.md
@@ -102,7 +102,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -115,14 +114,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -131,7 +128,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -139,7 +135,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -153,7 +148,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -163,7 +157,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -351,14 +344,12 @@ The goal is quality delivery, not just checking boxes.]]
1. **Requirements Met:**
[[LLM: Be specific - list each requirement and whether it's complete]]
- [ ] All functional requirements specified in the story are implemented.
- [ ] All acceptance criteria defined in the story are met.
2. **Coding Standards & Project Structure:**
[[LLM: Code quality matters for maintainability. Check each item carefully]]
- [ ] All new/modified code strictly adheres to `Operational Guidelines`.
- [ ] All new/modified code aligns with `Project Structure` (file locations, naming, etc.).
- [ ] Adherence to `Tech Stack` for technologies/versions used (if story introduces or modifies tech usage).
@@ -370,7 +361,6 @@ The goal is quality delivery, not just checking boxes.]]
3. **Testing:**
[[LLM: Testing proves your code works. Be honest about test coverage]]
- [ ] All required unit tests as per the story and `Operational Guidelines` Testing Strategy are implemented.
- [ ] All required integration tests (if applicable) as per the story and `Operational Guidelines` Testing Strategy are implemented.
- [ ] All tests (unit, integration, E2E if applicable) pass successfully.
@@ -379,14 +369,12 @@ The goal is quality delivery, not just checking boxes.]]
4. **Functionality & Verification:**
[[LLM: Did you actually run and test your code? Be specific about what you tested]]
- [ ] Functionality has been manually verified by the developer (e.g., running the app locally, checking UI, testing API endpoints).
- [ ] Edge cases and potential error conditions considered and handled gracefully.
5. **Story Administration:**
[[LLM: Documentation helps the next developer. What should they know?]]
- [ ] All tasks within the story file are marked as complete.
- [ ] Any clarifications or decisions made during development are documented in the story file or linked appropriately.
- [ ] The story wrap up section has been completed with notes of changes or information relevant to the next story or overall project, the agent model that was primarily used during development, and the changelog of any changes is properly updated.
@@ -394,7 +382,6 @@ The goal is quality delivery, not just checking boxes.]]
6. **Dependencies, Build & Configuration:**
[[LLM: Build issues block everyone. Ensure everything compiles and runs cleanly]]
- [ ] Project builds successfully without errors.
- [ ] Project linting passes
- [ ] Any new dependencies added were either pre-approved in the story requirements OR explicitly approved by the user during development (approval documented in story file).
@@ -405,7 +392,6 @@ The goal is quality delivery, not just checking boxes.]]
7. **Documentation (If Applicable):**
[[LLM: Good documentation prevents future confusion. What needs explaining?]]
- [ ] Relevant inline code documentation (e.g., JSDoc, TSDoc, Python docstrings) for new public APIs or complex logic is complete.
- [ ] User-facing documentation updated, if changes impact users.
- [ ] Technical documentation (e.g., READMEs, system diagrams) updated if significant architectural changes were made.

145
dist/agents/pm.txt vendored
View File

@@ -304,63 +304,54 @@ CRITICAL: First, help the user select the most appropriate research focus based
Present these numbered options to the user:
1. **Product Validation Research**
- Validate product hypotheses and market fit
- Test assumptions about user needs and solutions
- Assess technical and business feasibility
- Identify risks and mitigation strategies
2. **Market Opportunity Research**
- Analyze market size and growth potential
- Identify market segments and dynamics
- Assess market entry strategies
- Evaluate timing and market readiness
3. **User & Customer Research**
- Deep dive into user personas and behaviors
- Understand jobs-to-be-done and pain points
- Map customer journeys and touchpoints
- Analyze willingness to pay and value perception
4. **Competitive Intelligence Research**
- Detailed competitor analysis and positioning
- Feature and capability comparisons
- Business model and strategy analysis
- Identify competitive advantages and gaps
5. **Technology & Innovation Research**
- Assess technology trends and possibilities
- Evaluate technical approaches and architectures
- Identify emerging technologies and disruptions
- Analyze build vs. buy vs. partner options
6. **Industry & Ecosystem Research**
- Map industry value chains and dynamics
- Identify key players and relationships
- Analyze regulatory and compliance factors
- Understand partnership opportunities
7. **Strategic Options Research**
- Evaluate different strategic directions
- Assess business model alternatives
- Analyze go-to-market strategies
- Consider expansion and scaling paths
8. **Risk & Feasibility Research**
- Identify and assess various risk factors
- Evaluate implementation challenges
- Analyze resource requirements
- Consider regulatory and legal implications
9. **Custom Research Focus**
- User-defined research objectives
- Specialized domain investigation
- Cross-functional research needs
@@ -529,13 +520,11 @@ CRITICAL: collaborate with the user to develop specific, actionable research que
### 5. Review and Refinement
1. **Present Complete Prompt**
- Show the full research prompt
- Explain key elements and rationale
- Highlight any assumptions made
2. **Gather Feedback**
- Are the objectives clear and correct?
- Do the questions address all concerns?
- Is the scope appropriate?
@@ -897,7 +886,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -910,14 +898,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -926,7 +912,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -934,7 +919,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -948,7 +932,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -958,7 +941,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -1075,13 +1057,11 @@ CRITICAL: Use proper parsing that understands markdown context. A ## inside a co
For each extracted section:
1. **Generate filename**: Convert the section heading to lowercase-dash-case
- Remove special characters
- Replace spaces with dashes
- Example: "## Tech Stack" → `tech-stack.md`
2. **Adjust heading levels**:
- The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
- All subsection levels decrease by 1:
@@ -1179,7 +1159,7 @@ template:
output:
format: markdown
filename: docs/prd.md
title: "{{project_name}} Product Requirements Document (PRD)"
title: '{{project_name}} Product Requirements Document (PRD)'
workflow:
mode: interactive
@@ -1216,21 +1196,21 @@ sections:
prefix: FR
instruction: Each Requirement will be a bullet markdown and an identifier sequence starting with FR
examples:
- "FR6: The Todo List uses AI to detect and warn against potentially duplicate todo items that are worded differently."
- 'FR6: The Todo List uses AI to detect and warn against potentially duplicate todo items that are worded differently.'
- id: non-functional
title: Non Functional
type: numbered-list
prefix: NFR
instruction: Each Requirement will be a bullet markdown and an identifier sequence starting with NFR
examples:
- "NFR1: AWS service usage must aim to stay within free-tier limits where feasible."
- 'NFR1: AWS service usage must aim to stay within free-tier limits where feasible.'
- id: ui-goals
title: User Interface Design Goals
condition: PRD has UX/UI requirements
instruction: |
Capture high-level UI/UX vision to guide Design Architect and to inform story creation. Steps:
1. Pre-fill all subsections with educated guesses based on project context
2. Present the complete rendered section to user
3. Clearly let the user know where assumptions were made
@@ -1249,30 +1229,30 @@ sections:
title: Core Screens and Views
instruction: From a product perspective, what are the most critical screens or views necessary to deliver the the PRD values and goals? This is meant to be Conceptual High Level to Drive Rough Epic or User Stories
examples:
- "Login Screen"
- "Main Dashboard"
- "Item Detail Page"
- "Settings Page"
- 'Login Screen'
- 'Main Dashboard'
- 'Item Detail Page'
- 'Settings Page'
- id: accessibility
title: "Accessibility: {None|WCAG AA|WCAG AAA|Custom Requirements}"
title: 'Accessibility: {None|WCAG AA|WCAG AAA|Custom Requirements}'
- id: branding
title: Branding
instruction: Any known branding elements or style guides that must be incorporated?
examples:
- "Replicate the look and feel of early 1900s black and white cinema, including animated effects replicating film damage or projector glitches during page or state transitions."
- "Attached is the full color pallet and tokens for our corporate branding."
- 'Replicate the look and feel of early 1900s black and white cinema, including animated effects replicating film damage or projector glitches during page or state transitions.'
- 'Attached is the full color pallet and tokens for our corporate branding.'
- id: target-platforms
title: "Target Device and Platforms: {Web Responsive|Mobile Only|Desktop Only|Cross-Platform}"
title: 'Target Device and Platforms: {Web Responsive|Mobile Only|Desktop Only|Cross-Platform}'
examples:
- "Web Responsive, and all mobile platforms"
- "iPhone Only"
- "ASCII Windows Desktop"
- 'Web Responsive, and all mobile platforms'
- 'iPhone Only'
- 'ASCII Windows Desktop'
- id: technical-assumptions
title: Technical Assumptions
instruction: |
Gather technical decisions that will guide the Architect. Steps:
1. Check if .bmad-core/data/technical-preferences.yaml or an attached technical-preferences file exists - use it to pre-populate choices
2. Ask user about: languages, frameworks, starter templates, libraries, APIs, deployment targets
3. For unknowns, offer guidance based on project goals and MVP scope
@@ -1285,13 +1265,13 @@ sections:
testing: [Unit Only, Unit + Integration, Full Testing Pyramid]
sections:
- id: repository-structure
title: "Repository Structure: {Monorepo|Polyrepo|Multi-repo}"
title: 'Repository Structure: {Monorepo|Polyrepo|Multi-repo}'
- id: service-architecture
title: Service Architecture
instruction: "CRITICAL DECISION - Document the high-level service architecture (e.g., Monolith, Microservices, Serverless functions within a Monorepo)."
instruction: 'CRITICAL DECISION - Document the high-level service architecture (e.g., Monolith, Microservices, Serverless functions within a Monorepo).'
- id: testing-requirements
title: Testing Requirements
instruction: "CRITICAL DECISION - Document the testing requirements, unit only, integration, e2e, manual, need for manual testing convenience methods)."
instruction: 'CRITICAL DECISION - Document the testing requirements, unit only, integration, e2e, manual, need for manual testing convenience methods).'
- id: additional-assumptions
title: Additional Technical Assumptions and Requests
instruction: Throughout the entire process of drafting this document, if any other technical assumptions are raised or discovered appropriate for the architect, add them here as additional bulleted items
@@ -1300,9 +1280,9 @@ sections:
title: Epic List
instruction: |
Present a high-level list of all epics for user approval. Each epic should have a title and a short (1 sentence) goal statement. This allows the user to review the overall structure before diving into details.
CRITICAL: Epics MUST be logically sequential following agile best practices:
- Each epic should deliver a significant, end-to-end, fully deployable increment of testable functionality
- Epic 1 must establish foundational project infrastructure (app setup, Git, CI/CD, core services) unless we are adding new functionality to an existing app, while also delivering an initial piece of functionality, even as simple as a health-check route or display of a simple canary page - remember this when we produce the stories for the first epic!
- Each subsequent epic builds upon previous epics' functionality delivering major blocks of functionality that provide tangible value to users or business when deployed
@@ -1311,21 +1291,21 @@ sections:
- Cross Cutting Concerns should flow through epics and stories and not be final stories. For example, adding a logging framework as a last story of an epic, or at the end of a project as a final epic or story would be terrible as we would not have logging from the beginning.
elicit: true
examples:
- "Epic 1: Foundation & Core Infrastructure: Establish project setup, authentication, and basic user management"
- "Epic 2: Core Business Entities: Create and manage primary domain objects with CRUD operations"
- "Epic 3: User Workflows & Interactions: Enable key user journeys and business processes"
- "Epic 4: Reporting & Analytics: Provide insights and data visualization for users"
- 'Epic 1: Foundation & Core Infrastructure: Establish project setup, authentication, and basic user management'
- 'Epic 2: Core Business Entities: Create and manage primary domain objects with CRUD operations'
- 'Epic 3: User Workflows & Interactions: Enable key user journeys and business processes'
- 'Epic 4: Reporting & Analytics: Provide insights and data visualization for users'
- id: epic-details
title: Epic {{epic_number}} {{epic_title}}
repeatable: true
instruction: |
After the epic list is approved, present each epic with all its stories and acceptance criteria as a complete review unit.
For each epic provide expanded goal (2-3 sentences describing the objective and value all the stories will achieve).
CRITICAL STORY SEQUENCING REQUIREMENTS:
- Stories within each epic MUST be logically sequential
- Each story should be a "vertical slice" delivering complete functionality aside from early enabler stories for project foundation
- No story should depend on work from a later story or epic
@@ -1336,7 +1316,7 @@ sections:
- Think "junior developer working for 2-4 hours" - stories must be small, focused, and self-contained
- If a story seems complex, break it down further as long as it can deliver a vertical slice
elicit: true
template: "{{epic_goal}}"
template: '{{epic_goal}}'
sections:
- id: story
title: Story {{epic_number}}.{{story_number}} {{story_title}}
@@ -1349,11 +1329,11 @@ sections:
- id: acceptance-criteria
title: Acceptance Criteria
type: numbered-list
item_template: "{{criterion_number}}: {{criteria}}"
item_template: '{{criterion_number}}: {{criteria}}'
repeatable: true
instruction: |
Define clear, comprehensive, and testable acceptance criteria that:
- Precisely define what "done" means from a functional perspective
- Are unambiguous and serve as basis for verification
- Include any critical non-functional requirements from the PRD
@@ -1384,7 +1364,7 @@ template:
output:
format: markdown
filename: docs/prd.md
title: "{{project_name}} Brownfield Enhancement PRD"
title: '{{project_name}} Brownfield Enhancement PRD'
workflow:
mode: interactive
@@ -1395,19 +1375,19 @@ sections:
title: Intro Project Analysis and Context
instruction: |
IMPORTANT - SCOPE ASSESSMENT REQUIRED:
This PRD is for SIGNIFICANT enhancements to existing projects that require comprehensive planning and multiple stories. Before proceeding:
1. **Assess Enhancement Complexity**: If this is a simple feature addition or bug fix that could be completed in 1-2 focused development sessions, STOP and recommend: "For simpler changes, consider using the brownfield-create-epic or brownfield-create-story task with the Product Owner instead. This full PRD process is designed for substantial enhancements that require architectural planning and multiple coordinated stories."
2. **Project Context**: Determine if we're working in an IDE with the project already loaded or if the user needs to provide project information. If project files are available, analyze existing documentation in the docs folder. If insufficient documentation exists, recommend running the document-project task first.
3. **Deep Assessment Requirement**: You MUST thoroughly analyze the existing project structure, patterns, and constraints before making ANY suggestions. Every recommendation must be grounded in actual project analysis, not assumptions.
Gather comprehensive information about the existing project. This section must be completed before proceeding with requirements.
CRITICAL: Throughout this analysis, explicitly confirm your understanding with the user. For every assumption you make about the existing project, ask: "Based on my analysis, I understand that [assumption]. Is this correct?"
Do not proceed with any recommendations until the user has validated your understanding of the existing system.
sections:
- id: existing-project-overview
@@ -1433,7 +1413,7 @@ sections:
- Note: "Document-project analysis available - using existing technical documentation"
- List key documents created by document-project
- Skip the missing documentation check below
Otherwise, check for existing documentation:
sections:
- id: available-docs
@@ -1447,7 +1427,7 @@ sections:
- External API Documentation [[LLM: If from document-project, check ✓]]
- UX/UI Guidelines [[LLM: May not be in document-project]]
- Technical Debt Documentation [[LLM: If from document-project, check ✓]]
- "Other: {{other_docs}}"
- 'Other: {{other_docs}}'
instruction: |
- If document-project was already run: "Using existing project analysis from document-project output."
- If critical documentation is missing and no document-project: "I recommend running the document-project task first..."
@@ -1467,7 +1447,7 @@ sections:
- UI/UX Overhaul
- Technology Stack Upgrade
- Bug Fix and Stability Improvements
- "Other: {{other_type}}"
- 'Other: {{other_type}}'
- id: enhancement-description
title: Enhancement Description
instruction: 2-3 sentences describing what the user wants to add or change
@@ -1508,29 +1488,29 @@ sections:
prefix: FR
instruction: Each Requirement will be a bullet markdown with identifier starting with FR
examples:
- "FR1: The existing Todo List will integrate with the new AI duplicate detection service without breaking current functionality."
- 'FR1: The existing Todo List will integrate with the new AI duplicate detection service without breaking current functionality.'
- id: non-functional
title: Non Functional
type: numbered-list
prefix: NFR
instruction: Each Requirement will be a bullet markdown with identifier starting with NFR. Include constraints from existing system
examples:
- "NFR1: Enhancement must maintain existing performance characteristics and not exceed current memory usage by more than 20%."
- 'NFR1: Enhancement must maintain existing performance characteristics and not exceed current memory usage by more than 20%.'
- id: compatibility
title: Compatibility Requirements
instruction: Critical for brownfield - what must remain compatible
type: numbered-list
prefix: CR
template: "{{requirement}}: {{description}}"
template: '{{requirement}}: {{description}}'
items:
- id: cr1
template: "CR1: {{existing_api_compatibility}}"
template: 'CR1: {{existing_api_compatibility}}'
- id: cr2
template: "CR2: {{database_schema_compatibility}}"
template: 'CR2: {{database_schema_compatibility}}'
- id: cr3
template: "CR3: {{ui_ux_consistency}}"
template: 'CR3: {{ui_ux_consistency}}'
- id: cr4
template: "CR4: {{integration_compatibility}}"
template: 'CR4: {{integration_compatibility}}'
- id: ui-enhancement-goals
title: User Interface Enhancement Goals
@@ -1557,7 +1537,7 @@ sections:
If document-project output available:
- Extract from "Actual Tech Stack" table in High Level Architecture section
- Include version numbers and any noted constraints
Otherwise, document the current technology stack:
template: |
**Languages**: {{languages}}
@@ -1596,7 +1576,7 @@ sections:
- Reference "Technical Debt and Known Issues" section
- Include "Workarounds and Gotchas" that might impact enhancement
- Note any identified constraints from "Critical Technical Debt"
Build risk assessment incorporating existing known issues:
template: |
**Technical Risks**: {{technical_risks}}
@@ -1613,13 +1593,13 @@ sections:
- id: epic-approach
title: Epic Approach
instruction: Explain the rationale for epic structure - typically single epic for brownfield unless multiple unrelated features
template: "**Epic Structure Decision**: {{epic_decision}} with rationale"
template: '**Epic Structure Decision**: {{epic_decision}} with rationale'
- id: epic-details
title: "Epic 1: {{enhancement_title}}"
title: 'Epic 1: {{enhancement_title}}'
instruction: |
Comprehensive epic that delivers the brownfield enhancement while maintaining existing functionality
CRITICAL STORY SEQUENCING FOR BROWNFIELD:
- Stories must ensure existing functionality remains intact
- Each story should include verification that existing features still work
@@ -1632,11 +1612,11 @@ sections:
- Each story must deliver value while maintaining system integrity
template: |
**Epic Goal**: {{epic_goal}}
**Integration Requirements**: {{integration_requirements}}
sections:
- id: story
title: "Story 1.{{story_number}} {{story_title}}"
title: 'Story 1.{{story_number}} {{story_title}}'
repeatable: true
template: |
As a {{user_type}},
@@ -1647,16 +1627,16 @@ sections:
title: Acceptance Criteria
type: numbered-list
instruction: Define criteria that include both new functionality and existing system integrity
item_template: "{{criterion_number}}: {{criteria}}"
item_template: '{{criterion_number}}: {{criteria}}'
- id: integration-verification
title: Integration Verification
instruction: Specific verification steps to ensure existing functionality remains intact
type: numbered-list
prefix: IV
items:
- template: "IV1: {{existing_functionality_verification}}"
- template: "IV2: {{integration_point_verification}}"
- template: "IV3: {{performance_impact_verification}}"
- template: 'IV1: {{existing_functionality_verification}}'
- template: 'IV2: {{integration_point_verification}}'
- template: 'IV3: {{performance_impact_verification}}'
==================== END: .bmad-core/templates/brownfield-prd-tmpl.yaml ====================
==================== START: .bmad-core/checklists/pm-checklist.md ====================
@@ -1966,7 +1946,6 @@ Ask the user if they want to work through the checklist:
Create a comprehensive validation report that includes:
1. Executive Summary
- Overall PRD completeness (percentage)
- MVP scope appropriateness (Too Large/Just Right/Too Small)
- Readiness for architecture phase (Ready/Nearly Ready/Not Ready)
@@ -1974,26 +1953,22 @@ Create a comprehensive validation report that includes:
2. Category Analysis Table
Fill in the actual table with:
- Status: PASS (90%+ complete), PARTIAL (60-89%), FAIL (<60%)
- Critical Issues: Specific problems that block progress
3. Top Issues by Priority
- BLOCKERS: Must fix before architect can proceed
- HIGH: Should fix for quality
- MEDIUM: Would improve clarity
- LOW: Nice to have
4. MVP Scope Assessment
- Features that might be cut for true MVP
- Missing features that are essential
- Complexity concerns
- Timeline realism
5. Technical Readiness
- Clarity of technical constraints
- Identified technical risks
- Areas needing architect investigation

44
dist/agents/po.txt vendored
View File

@@ -110,7 +110,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -123,14 +122,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -139,7 +136,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -147,7 +143,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -161,7 +156,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -171,7 +165,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -288,13 +281,11 @@ CRITICAL: Use proper parsing that understands markdown context. A ## inside a co
For each extracted section:
1. **Generate filename**: Convert the section heading to lowercase-dash-case
- Remove special characters
- Replace spaces with dashes
- Example: "## Tech Stack" → `tech-stack.md`
2. **Adjust heading levels**:
- The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
- All subsection levels decrease by 1:
@@ -602,14 +593,14 @@ template:
output:
format: markdown
filename: docs/stories/{{epic_num}}.{{story_num}}.{{story_title_short}}.md
title: "Story {{epic_num}}.{{story_num}}: {{story_title_short}}"
title: 'Story {{epic_num}}.{{story_num}}: {{story_title_short}}'
workflow:
mode: interactive
elicitation: advanced-elicitation
agent_config:
editable_sections:
editable_sections:
- Status
- Story
- Acceptance Criteria
@@ -626,7 +617,7 @@ sections:
instruction: Select the current status of the story
owner: scrum-master
editors: [scrum-master, dev-agent]
- id: story
title: Story
type: template-text
@@ -638,7 +629,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: acceptance-criteria
title: Acceptance Criteria
type: numbered-list
@@ -646,7 +637,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: tasks-subtasks
title: Tasks / Subtasks
type: bullet-list
@@ -663,7 +654,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master, dev-agent]
- id: dev-notes
title: Dev Notes
instruction: |
@@ -687,7 +678,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: change-log
title: Change Log
type: table
@@ -695,7 +686,7 @@ sections:
instruction: Track changes made to this story document
owner: scrum-master
editors: [scrum-master, dev-agent, qa-agent]
- id: dev-agent-record
title: Dev Agent Record
instruction: This section is populated by the development agent during implementation
@@ -704,29 +695,29 @@ sections:
sections:
- id: agent-model
title: Agent Model Used
template: "{{agent_model_name_version}}"
template: '{{agent_model_name_version}}'
instruction: Record the specific AI agent model and version used for development
owner: dev-agent
editors: [dev-agent]
- id: debug-log-references
title: Debug Log References
instruction: Reference any debug logs or traces generated during development
owner: dev-agent
editors: [dev-agent]
- id: completion-notes
title: Completion Notes List
instruction: Notes about the completion of tasks and any issues encountered
owner: dev-agent
editors: [dev-agent]
- id: file-list
title: File List
instruction: List all files created, modified, or affected during story implementation
owner: dev-agent
editors: [dev-agent]
- id: qa-results
title: QA Results
instruction: Results from QA Agent QA review of the completed story implementation
@@ -745,12 +736,10 @@ PROJECT TYPE DETECTION:
First, determine the project type by checking:
1. Is this a GREENFIELD project (new from scratch)?
- Look for: New project initialization, no existing codebase references
- Check for: prd.md, architecture.md, new project setup stories
2. Is this a BROWNFIELD project (enhancing existing system)?
- Look for: References to existing codebase, enhancement/modification language
- Check for: brownfield-prd.md, brownfield-architecture.md, existing system analysis
@@ -1084,7 +1073,6 @@ Ask the user if they want to work through the checklist:
Generate a comprehensive validation report that adapts to project type:
1. Executive Summary
- Project type: [Greenfield/Brownfield] with [UI/No UI]
- Overall readiness (percentage)
- Go/No-Go recommendation
@@ -1094,42 +1082,36 @@ Generate a comprehensive validation report that adapts to project type:
2. Project-Specific Analysis
FOR GREENFIELD:
- Setup completeness
- Dependency sequencing
- MVP scope appropriateness
- Development timeline feasibility
FOR BROWNFIELD:
- Integration risk level (High/Medium/Low)
- Existing system impact assessment
- Rollback readiness
- User disruption potential
3. Risk Assessment
- Top 5 risks by severity
- Mitigation recommendations
- Timeline impact of addressing issues
- [BROWNFIELD] Specific integration risks
4. MVP Completeness
- Core features coverage
- Missing essential functionality
- Scope creep identified
- True MVP vs over-engineering
5. Implementation Readiness
- Developer clarity score (1-10)
- Ambiguous requirements count
- Missing technical details
- [BROWNFIELD] Integration point clarity
6. Recommendations
- Must-fix before development
- Should-fix for quality
- Consider for improvement

1791
dist/agents/qa.txt vendored

File diff suppressed because it is too large Load Diff

36
dist/agents/sm.txt vendored
View File

@@ -211,7 +211,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -224,14 +223,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -240,7 +237,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -248,7 +244,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -262,7 +257,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -272,7 +266,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -376,14 +369,14 @@ template:
output:
format: markdown
filename: docs/stories/{{epic_num}}.{{story_num}}.{{story_title_short}}.md
title: "Story {{epic_num}}.{{story_num}}: {{story_title_short}}"
title: 'Story {{epic_num}}.{{story_num}}: {{story_title_short}}'
workflow:
mode: interactive
elicitation: advanced-elicitation
agent_config:
editable_sections:
editable_sections:
- Status
- Story
- Acceptance Criteria
@@ -400,7 +393,7 @@ sections:
instruction: Select the current status of the story
owner: scrum-master
editors: [scrum-master, dev-agent]
- id: story
title: Story
type: template-text
@@ -412,7 +405,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: acceptance-criteria
title: Acceptance Criteria
type: numbered-list
@@ -420,7 +413,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: tasks-subtasks
title: Tasks / Subtasks
type: bullet-list
@@ -437,7 +430,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master, dev-agent]
- id: dev-notes
title: Dev Notes
instruction: |
@@ -461,7 +454,7 @@ sections:
elicit: true
owner: scrum-master
editors: [scrum-master]
- id: change-log
title: Change Log
type: table
@@ -469,7 +462,7 @@ sections:
instruction: Track changes made to this story document
owner: scrum-master
editors: [scrum-master, dev-agent, qa-agent]
- id: dev-agent-record
title: Dev Agent Record
instruction: This section is populated by the development agent during implementation
@@ -478,29 +471,29 @@ sections:
sections:
- id: agent-model
title: Agent Model Used
template: "{{agent_model_name_version}}"
template: '{{agent_model_name_version}}'
instruction: Record the specific AI agent model and version used for development
owner: dev-agent
editors: [dev-agent]
- id: debug-log-references
title: Debug Log References
instruction: Reference any debug logs or traces generated during development
owner: dev-agent
editors: [dev-agent]
- id: completion-notes
title: Completion Notes List
instruction: Notes about the completion of tasks and any issues encountered
owner: dev-agent
editors: [dev-agent]
- id: file-list
title: File List
instruction: List all files created, modified, or affected during story implementation
owner: dev-agent
editors: [dev-agent]
- id: qa-results
title: QA Results
instruction: Results from QA Agent QA review of the completed story implementation
@@ -628,19 +621,16 @@ Note: We don't need every file listed - just the important ones.]]
Generate a concise validation report:
1. Quick Summary
- Story readiness: READY / NEEDS REVISION / BLOCKED
- Clarity score (1-10)
- Major gaps identified
2. Fill in the validation table with:
- PASS: Requirements clearly met
- PARTIAL: Some gaps but workable
- FAIL: Critical information missing
3. Specific Issues (if any)
- List concrete problems to fix
- Suggest specific improvements
- Identify any blocking dependencies

View File

@@ -258,7 +258,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -271,14 +270,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -287,7 +284,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -295,7 +291,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -309,7 +304,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -319,7 +313,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -350,7 +343,7 @@ template:
output:
format: markdown
filename: docs/front-end-spec.md
title: "{{project_name}} UI/UX Specification"
title: '{{project_name}} UI/UX Specification'
workflow:
mode: interactive
@@ -361,7 +354,7 @@ sections:
title: Introduction
instruction: |
Review provided documents including Project Brief, PRD, and any user research to gather context. Focus on understanding user needs, pain points, and desired outcomes before beginning the specification.
Establish the document's purpose and scope. Keep the content below but ensure project name is properly substituted.
content: |
This document defines the user experience goals, information architecture, user flows, and visual design specifications for {{project_name}}'s user interface. It serves as the foundation for visual design and frontend development, ensuring a cohesive and user-centered experience.
@@ -370,7 +363,7 @@ sections:
title: Overall UX Goals & Principles
instruction: |
Work with the user to establish and document the following. If not already defined, facilitate a discussion to determine:
1. Target User Personas - elicit details or confirm existing ones from PRD
2. Key Usability Goals - understand what success looks like for users
3. Core Design Principles - establish 3-5 guiding principles
@@ -378,29 +371,29 @@ sections:
sections:
- id: user-personas
title: Target User Personas
template: "{{persona_descriptions}}"
template: '{{persona_descriptions}}'
examples:
- "**Power User:** Technical professionals who need advanced features and efficiency"
- "**Casual User:** Occasional users who prioritize ease of use and clear guidance"
- "**Administrator:** System managers who need control and oversight capabilities"
- '**Power User:** Technical professionals who need advanced features and efficiency'
- '**Casual User:** Occasional users who prioritize ease of use and clear guidance'
- '**Administrator:** System managers who need control and oversight capabilities'
- id: usability-goals
title: Usability Goals
template: "{{usability_goals}}"
template: '{{usability_goals}}'
examples:
- "Ease of learning: New users can complete core tasks within 5 minutes"
- "Efficiency of use: Power users can complete frequent tasks with minimal clicks"
- "Error prevention: Clear validation and confirmation for destructive actions"
- "Memorability: Infrequent users can return without relearning"
- 'Ease of learning: New users can complete core tasks within 5 minutes'
- 'Efficiency of use: Power users can complete frequent tasks with minimal clicks'
- 'Error prevention: Clear validation and confirmation for destructive actions'
- 'Memorability: Infrequent users can return without relearning'
- id: design-principles
title: Design Principles
template: "{{design_principles}}"
template: '{{design_principles}}'
type: numbered-list
examples:
- "**Clarity over cleverness** - Prioritize clear communication over aesthetic innovation"
- '**Clarity over cleverness** - Prioritize clear communication over aesthetic innovation'
- "**Progressive disclosure** - Show only what's needed, when it's needed"
- "**Consistent patterns** - Use familiar UI patterns throughout the application"
- "**Immediate feedback** - Every action should have a clear, immediate response"
- "**Accessible by default** - Design for all users from the start"
- '**Consistent patterns** - Use familiar UI patterns throughout the application'
- '**Immediate feedback** - Every action should have a clear, immediate response'
- '**Accessible by default** - Design for all users from the start'
- id: changelog
title: Change Log
type: table
@@ -411,7 +404,7 @@ sections:
title: Information Architecture (IA)
instruction: |
Collaborate with the user to create a comprehensive information architecture:
1. Build a Site Map or Screen Inventory showing all major areas
2. Define the Navigation Structure (primary, secondary, breadcrumbs)
3. Use Mermaid diagrams for visual representation
@@ -422,7 +415,7 @@ sections:
title: Site Map / Screen Inventory
type: mermaid
mermaid_type: graph
template: "{{sitemap_diagram}}"
template: '{{sitemap_diagram}}'
examples:
- |
graph TD
@@ -441,46 +434,46 @@ sections:
title: Navigation Structure
template: |
**Primary Navigation:** {{primary_nav_description}}
**Secondary Navigation:** {{secondary_nav_description}}
**Breadcrumb Strategy:** {{breadcrumb_strategy}}
- id: user-flows
title: User Flows
instruction: |
For each critical user task identified in the PRD:
1. Define the user's goal clearly
2. Map out all steps including decision points
3. Consider edge cases and error states
4. Use Mermaid flow diagrams for clarity
5. Link to external tools (Figma/Miro) if detailed flows exist there
Create subsections for each major flow.
elicit: true
repeatable: true
sections:
- id: flow
title: "{{flow_name}}"
title: '{{flow_name}}'
template: |
**User Goal:** {{flow_goal}}
**Entry Points:** {{entry_points}}
**Success Criteria:** {{success_criteria}}
sections:
- id: flow-diagram
title: Flow Diagram
type: mermaid
mermaid_type: graph
template: "{{flow_diagram}}"
template: '{{flow_diagram}}'
- id: edge-cases
title: "Edge Cases & Error Handling:"
title: 'Edge Cases & Error Handling:'
type: bullet-list
template: "- {{edge_case}}"
template: '- {{edge_case}}'
- id: notes
template: "**Notes:** {{flow_notes}}"
template: '**Notes:** {{flow_notes}}'
- id: wireframes-mockups
title: Wireframes & Mockups
@@ -489,23 +482,23 @@ sections:
elicit: true
sections:
- id: design-files
template: "**Primary Design Files:** {{design_tool_link}}"
template: '**Primary Design Files:** {{design_tool_link}}'
- id: key-screen-layouts
title: Key Screen Layouts
repeatable: true
sections:
- id: screen
title: "{{screen_name}}"
title: '{{screen_name}}'
template: |
**Purpose:** {{screen_purpose}}
**Key Elements:**
- {{element_1}}
- {{element_2}}
- {{element_3}}
**Interaction Notes:** {{interaction_notes}}
**Design File Reference:** {{specific_frame_link}}
- id: component-library
@@ -515,20 +508,20 @@ sections:
elicit: true
sections:
- id: design-system-approach
template: "**Design System Approach:** {{design_system_approach}}"
template: '**Design System Approach:** {{design_system_approach}}'
- id: core-components
title: Core Components
repeatable: true
sections:
- id: component
title: "{{component_name}}"
title: '{{component_name}}'
template: |
**Purpose:** {{component_purpose}}
**Variants:** {{component_variants}}
**States:** {{component_states}}
**Usage Guidelines:** {{usage_guidelines}}
- id: branding-style
@@ -538,19 +531,19 @@ sections:
sections:
- id: visual-identity
title: Visual Identity
template: "**Brand Guidelines:** {{brand_guidelines_link}}"
template: '**Brand Guidelines:** {{brand_guidelines_link}}'
- id: color-palette
title: Color Palette
type: table
columns: ["Color Type", "Hex Code", "Usage"]
columns: ['Color Type', 'Hex Code', 'Usage']
rows:
- ["Primary", "{{primary_color}}", "{{primary_usage}}"]
- ["Secondary", "{{secondary_color}}", "{{secondary_usage}}"]
- ["Accent", "{{accent_color}}", "{{accent_usage}}"]
- ["Success", "{{success_color}}", "Positive feedback, confirmations"]
- ["Warning", "{{warning_color}}", "Cautions, important notices"]
- ["Error", "{{error_color}}", "Errors, destructive actions"]
- ["Neutral", "{{neutral_colors}}", "Text, borders, backgrounds"]
- ['Primary', '{{primary_color}}', '{{primary_usage}}']
- ['Secondary', '{{secondary_color}}', '{{secondary_usage}}']
- ['Accent', '{{accent_color}}', '{{accent_usage}}']
- ['Success', '{{success_color}}', 'Positive feedback, confirmations']
- ['Warning', '{{warning_color}}', 'Cautions, important notices']
- ['Error', '{{error_color}}', 'Errors, destructive actions']
- ['Neutral', '{{neutral_colors}}', 'Text, borders, backgrounds']
- id: typography
title: Typography
sections:
@@ -563,24 +556,24 @@ sections:
- id: type-scale
title: Type Scale
type: table
columns: ["Element", "Size", "Weight", "Line Height"]
columns: ['Element', 'Size', 'Weight', 'Line Height']
rows:
- ["H1", "{{h1_size}}", "{{h1_weight}}", "{{h1_line}}"]
- ["H2", "{{h2_size}}", "{{h2_weight}}", "{{h2_line}}"]
- ["H3", "{{h3_size}}", "{{h3_weight}}", "{{h3_line}}"]
- ["Body", "{{body_size}}", "{{body_weight}}", "{{body_line}}"]
- ["Small", "{{small_size}}", "{{small_weight}}", "{{small_line}}"]
- ['H1', '{{h1_size}}', '{{h1_weight}}', '{{h1_line}}']
- ['H2', '{{h2_size}}', '{{h2_weight}}', '{{h2_line}}']
- ['H3', '{{h3_size}}', '{{h3_weight}}', '{{h3_line}}']
- ['Body', '{{body_size}}', '{{body_weight}}', '{{body_line}}']
- ['Small', '{{small_size}}', '{{small_weight}}', '{{small_line}}']
- id: iconography
title: Iconography
template: |
**Icon Library:** {{icon_library}}
**Usage Guidelines:** {{icon_guidelines}}
- id: spacing-layout
title: Spacing & Layout
template: |
**Grid System:** {{grid_system}}
**Spacing Scale:** {{spacing_scale}}
- id: accessibility
@@ -590,7 +583,7 @@ sections:
sections:
- id: compliance-target
title: Compliance Target
template: "**Standard:** {{compliance_standard}}"
template: '**Standard:** {{compliance_standard}}'
- id: key-requirements
title: Key Requirements
template: |
@@ -598,19 +591,19 @@ sections:
- Color contrast ratios: {{contrast_requirements}}
- Focus indicators: {{focus_requirements}}
- Text sizing: {{text_requirements}}
**Interaction:**
- Keyboard navigation: {{keyboard_requirements}}
- Screen reader support: {{screen_reader_requirements}}
- Touch targets: {{touch_requirements}}
**Content:**
- Alternative text: {{alt_text_requirements}}
- Heading structure: {{heading_requirements}}
- Form labels: {{form_requirements}}
- id: testing-strategy
title: Testing Strategy
template: "{{accessibility_testing}}"
template: '{{accessibility_testing}}'
- id: responsiveness
title: Responsiveness Strategy
@@ -620,21 +613,21 @@ sections:
- id: breakpoints
title: Breakpoints
type: table
columns: ["Breakpoint", "Min Width", "Max Width", "Target Devices"]
columns: ['Breakpoint', 'Min Width', 'Max Width', 'Target Devices']
rows:
- ["Mobile", "{{mobile_min}}", "{{mobile_max}}", "{{mobile_devices}}"]
- ["Tablet", "{{tablet_min}}", "{{tablet_max}}", "{{tablet_devices}}"]
- ["Desktop", "{{desktop_min}}", "{{desktop_max}}", "{{desktop_devices}}"]
- ["Wide", "{{wide_min}}", "-", "{{wide_devices}}"]
- ['Mobile', '{{mobile_min}}', '{{mobile_max}}', '{{mobile_devices}}']
- ['Tablet', '{{tablet_min}}', '{{tablet_max}}', '{{tablet_devices}}']
- ['Desktop', '{{desktop_min}}', '{{desktop_max}}', '{{desktop_devices}}']
- ['Wide', '{{wide_min}}', '-', '{{wide_devices}}']
- id: adaptation-patterns
title: Adaptation Patterns
template: |
**Layout Changes:** {{layout_adaptations}}
**Navigation Changes:** {{nav_adaptations}}
**Content Priority:** {{content_adaptations}}
**Interaction Changes:** {{interaction_adaptations}}
- id: animation
@@ -644,11 +637,11 @@ sections:
sections:
- id: motion-principles
title: Motion Principles
template: "{{motion_principles}}"
template: '{{motion_principles}}'
- id: key-animations
title: Key Animations
repeatable: true
template: "- **{{animation_name}}:** {{animation_description}} (Duration: {{duration}}, Easing: {{easing}})"
template: '- **{{animation_name}}:** {{animation_description}} (Duration: {{duration}}, Easing: {{easing}})'
- id: performance
title: Performance Considerations
@@ -662,13 +655,13 @@ sections:
- **Animation FPS:** {{animation_goal}}
- id: design-strategies
title: Design Strategies
template: "{{performance_strategies}}"
template: '{{performance_strategies}}'
- id: next-steps
title: Next Steps
instruction: |
After completing the UI/UX specification:
1. Recommend review with stakeholders
2. Suggest creating/updating visual designs in design tool
3. Prepare for handoff to Design Architect for frontend architecture
@@ -677,17 +670,17 @@ sections:
- id: immediate-actions
title: Immediate Actions
type: numbered-list
template: "{{action}}"
template: '{{action}}'
- id: design-handoff-checklist
title: Design Handoff Checklist
type: checklist
items:
- "All user flows documented"
- "Component inventory complete"
- "Accessibility requirements defined"
- "Responsive strategy clear"
- "Brand guidelines incorporated"
- "Performance goals established"
- 'All user flows documented'
- 'Component inventory complete'
- 'Accessibility requirements defined'
- 'Responsive strategy clear'
- 'Brand guidelines incorporated'
- 'Performance goals established'
- id: checklist-results
title: Checklist Results

File diff suppressed because it is too large Load Diff

View File

@@ -113,7 +113,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -126,14 +125,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -142,7 +139,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -150,7 +146,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -164,7 +159,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -174,7 +168,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -204,8 +197,8 @@ template:
version: 2.0
output:
format: markdown
filename: "docs/{{game_name}}-game-architecture.md"
title: "{{game_title}} Game Architecture Document"
filename: 'docs/{{game_name}}-game-architecture.md'
title: '{{game_title}} Game Architecture Document'
workflow:
mode: interactive
@@ -214,7 +207,7 @@ sections:
- id: initial-setup
instruction: |
This template creates a comprehensive game architecture document specifically for Phaser 3 + TypeScript projects. This should provide the technical foundation for all game development stories and epics.
If available, review any provided documents: Game Design Document (GDD), Technical Preferences. This architecture should support all game mechanics defined in the GDD.
- id: introduction
@@ -222,7 +215,7 @@ sections:
instruction: Establish the document's purpose and scope for game development
content: |
This document outlines the complete technical architecture for {{game_title}}, a 2D game built with Phaser 3 and TypeScript. It serves as the technical foundation for AI-driven game development, ensuring consistency and scalability across all game systems.
This architecture is designed to support the gameplay mechanics defined in the Game Design Document while maintaining 60 FPS performance and cross-platform compatibility.
sections:
- id: change-log
@@ -241,7 +234,7 @@ sections:
title: Architecture Summary
instruction: |
Provide a comprehensive overview covering:
- Game engine choice and configuration
- Project structure and organization
- Key systems and their interactions
@@ -329,23 +322,23 @@ sections:
title: Scene Management System
template: |
**Purpose:** Handle game flow and scene transitions
**Key Components:**
- Scene loading and unloading
- Data passing between scenes
- Transition effects
- Memory management
**Implementation Requirements:**
- Preload scene for asset loading
- Menu system with navigation
- Gameplay scenes with state management
- Pause/resume functionality
**Files to Create:**
- `src/scenes/BootScene.ts`
- `src/scenes/PreloadScene.ts`
- `src/scenes/MenuScene.ts`
@@ -355,23 +348,23 @@ sections:
title: Game State Management
template: |
**Purpose:** Track player progress and game status
**State Categories:**
- Player progress (levels, unlocks)
- Game settings (audio, controls)
- Session data (current level, score)
- Persistent data (achievements, statistics)
**Implementation Requirements:**
- Save/load system with localStorage
- State validation and error recovery
- Cross-session data persistence
- Settings management
**Files to Create:**
- `src/systems/GameState.ts`
- `src/systems/SaveManager.ts`
- `src/types/GameData.ts`
@@ -379,23 +372,23 @@ sections:
title: Asset Management System
template: |
**Purpose:** Efficient loading and management of game assets
**Asset Categories:**
- Sprite sheets and animations
- Audio files and music
- Level data and configurations
- UI assets and fonts
**Implementation Requirements:**
- Progressive loading strategy
- Asset caching and optimization
- Error handling for failed loads
- Memory management for large assets
**Files to Create:**
- `src/systems/AssetManager.ts`
- `src/config/AssetConfig.ts`
- `src/utils/AssetLoader.ts`
@@ -403,23 +396,23 @@ sections:
title: Input Management System
template: |
**Purpose:** Handle all player input across platforms
**Input Types:**
- Keyboard controls
- Mouse/pointer interaction
- Touch gestures (mobile)
- Gamepad support (optional)
**Implementation Requirements:**
- Input mapping and configuration
- Touch-friendly mobile controls
- Input buffering for responsive gameplay
- Customizable control schemes
**Files to Create:**
- `src/systems/InputManager.ts`
- `src/utils/TouchControls.ts`
- `src/types/InputTypes.ts`
@@ -429,22 +422,22 @@ sections:
repeatable: true
sections:
- id: mechanic-system
title: "{{mechanic_name}} System"
title: '{{mechanic_name}} System'
template: |
**Purpose:** {{system_purpose}}
**Core Functionality:**
- {{feature_1}}
- {{feature_2}}
- {{feature_3}}
**Dependencies:** {{required_systems}}
**Performance Considerations:** {{optimization_notes}}
**Files to Create:**
- `src/systems/{{system_name}}.ts`
- `src/gameObjects/{{related_object}}.ts`
- `src/types/{{system_types}}.ts`
@@ -452,65 +445,65 @@ sections:
title: Physics & Collision System
template: |
**Physics Engine:** {{physics_choice}} (Arcade Physics/Matter.js)
**Collision Categories:**
- Player collision
- Enemy interactions
- Environmental objects
- Collectibles and items
**Implementation Requirements:**
- Optimized collision detection
- Physics body management
- Collision callbacks and events
- Performance monitoring
**Files to Create:**
- `src/systems/PhysicsManager.ts`
- `src/utils/CollisionGroups.ts`
- id: audio-system
title: Audio System
template: |
**Audio Requirements:**
- Background music with looping
- Sound effects for actions
- Audio settings and volume control
- Mobile audio optimization
**Implementation Features:**
- Audio sprite management
- Dynamic music system
- Spatial audio (if applicable)
- Audio pooling for performance
**Files to Create:**
- `src/systems/AudioManager.ts`
- `src/config/AudioConfig.ts`
- id: ui-system
title: UI System
template: |
**UI Components:**
- HUD elements (score, health, etc.)
- Menu navigation
- Modal dialogs
- Settings screens
**Implementation Requirements:**
- Responsive layout system
- Touch-friendly interface
- Keyboard navigation support
- Animation and transitions
**Files to Create:**
- `src/systems/UIManager.ts`
- `src/gameObjects/UI/`
- `src/types/UITypes.ts`
@@ -726,7 +719,7 @@ sections:
instruction: Break down the architecture implementation into phases that align with the GDD development phases
sections:
- id: phase-1-foundation
title: "Phase 1: Foundation ({{duration}})"
title: 'Phase 1: Foundation ({{duration}})'
sections:
- id: phase-1-core
title: Core Systems
@@ -744,7 +737,7 @@ sections:
- "Basic Scene Management System"
- "Asset Loading Foundation"
- id: phase-2-game-systems
title: "Phase 2: Game Systems ({{duration}})"
title: 'Phase 2: Game Systems ({{duration}})'
sections:
- id: phase-2-gameplay
title: Gameplay Systems
@@ -762,7 +755,7 @@ sections:
- "Physics and Collision Framework"
- "Game State Management System"
- id: phase-3-content-polish
title: "Phase 3: Content & Polish ({{duration}})"
title: 'Phase 3: Content & Polish ({{duration}})'
sections:
- id: phase-3-content
title: Content Systems
@@ -1052,7 +1045,7 @@ interface GameState {
interface GameSettings {
musicVolume: number;
sfxVolume: number;
difficulty: "easy" | "normal" | "hard";
difficulty: 'easy' | 'normal' | 'hard';
controls: ControlScheme;
}
```
@@ -1093,12 +1086,12 @@ class GameScene extends Phaser.Scene {
private inputManager!: InputManager;
constructor() {
super({ key: "GameScene" });
super({ key: 'GameScene' });
}
preload(): void {
// Load only scene-specific assets
this.load.image("player", "assets/player.png");
this.load.image('player', 'assets/player.png');
}
create(data: SceneData): void {
@@ -1123,7 +1116,7 @@ class GameScene extends Phaser.Scene {
this.inputManager.destroy();
// Remove event listeners
this.events.off("*");
this.events.off('*');
}
}
```
@@ -1132,13 +1125,13 @@ class GameScene extends Phaser.Scene {
```typescript
// Proper scene transitions with data
this.scene.start("NextScene", {
this.scene.start('NextScene', {
playerScore: this.playerScore,
currentLevel: this.currentLevel + 1,
});
// Scene overlays for UI
this.scene.launch("PauseMenuScene");
this.scene.launch('PauseMenuScene');
this.scene.pause();
```
@@ -1182,7 +1175,7 @@ class Player extends GameEntity {
private health!: HealthComponent;
constructor(scene: Phaser.Scene, x: number, y: number) {
super(scene, x, y, "player");
super(scene, x, y, 'player');
this.movement = this.addComponent(new MovementComponent(this));
this.health = this.addComponent(new HealthComponent(this, 100));
@@ -1202,7 +1195,7 @@ class GameManager {
constructor(scene: Phaser.Scene) {
if (GameManager.instance) {
throw new Error("GameManager already exists!");
throw new Error('GameManager already exists!');
}
this.scene = scene;
@@ -1212,7 +1205,7 @@ class GameManager {
static getInstance(): GameManager {
if (!GameManager.instance) {
throw new Error("GameManager not initialized!");
throw new Error('GameManager not initialized!');
}
return GameManager.instance;
}
@@ -1259,7 +1252,7 @@ class BulletPool {
}
// Pool exhausted - create new bullet
console.warn("Bullet pool exhausted, creating new bullet");
console.warn('Bullet pool exhausted, creating new bullet');
return new Bullet(this.scene, 0, 0);
}
@@ -1359,12 +1352,12 @@ class InputManager {
}
private setupKeyboard(): void {
this.keys = this.scene.input.keyboard.addKeys("W,A,S,D,SPACE,ESC,UP,DOWN,LEFT,RIGHT");
this.keys = this.scene.input.keyboard.addKeys('W,A,S,D,SPACE,ESC,UP,DOWN,LEFT,RIGHT');
}
private setupTouch(): void {
this.scene.input.on("pointerdown", this.handlePointerDown, this);
this.scene.input.on("pointerup", this.handlePointerUp, this);
this.scene.input.on('pointerdown', this.handlePointerDown, this);
this.scene.input.on('pointerup', this.handlePointerUp, this);
}
update(): void {
@@ -1391,9 +1384,9 @@ class InputManager {
class AssetManager {
loadAssets(): Promise<void> {
return new Promise((resolve, reject) => {
this.scene.load.on("filecomplete", this.handleFileComplete, this);
this.scene.load.on("loaderror", this.handleLoadError, this);
this.scene.load.on("complete", () => resolve());
this.scene.load.on('filecomplete', this.handleFileComplete, this);
this.scene.load.on('loaderror', this.handleLoadError, this);
this.scene.load.on('complete', () => resolve());
this.scene.load.start();
});
@@ -1409,8 +1402,8 @@ class AssetManager {
private loadFallbackAsset(key: string): void {
// Load placeholder or default assets
switch (key) {
case "player":
this.scene.load.image("player", "assets/defaults/default-player.png");
case 'player':
this.scene.load.image('player', 'assets/defaults/default-player.png');
break;
default:
console.warn(`No fallback for asset: ${key}`);
@@ -1437,11 +1430,11 @@ class GameSystem {
private attemptRecovery(context: string): void {
switch (context) {
case "update":
case 'update':
// Reset system state
this.reset();
break;
case "render":
case 'render':
// Disable visual effects
this.disableEffects();
break;
@@ -1461,7 +1454,7 @@ class GameSystem {
```typescript
// Example test for game mechanics
describe("HealthComponent", () => {
describe('HealthComponent', () => {
let healthComponent: HealthComponent;
beforeEach(() => {
@@ -1469,18 +1462,18 @@ describe("HealthComponent", () => {
healthComponent = new HealthComponent(mockEntity, 100);
});
test("should initialize with correct health", () => {
test('should initialize with correct health', () => {
expect(healthComponent.currentHealth).toBe(100);
expect(healthComponent.maxHealth).toBe(100);
});
test("should handle damage correctly", () => {
test('should handle damage correctly', () => {
healthComponent.takeDamage(25);
expect(healthComponent.currentHealth).toBe(75);
expect(healthComponent.isAlive()).toBe(true);
});
test("should handle death correctly", () => {
test('should handle death correctly', () => {
healthComponent.takeDamage(150);
expect(healthComponent.currentHealth).toBe(0);
expect(healthComponent.isAlive()).toBe(false);
@@ -1493,7 +1486,7 @@ describe("HealthComponent", () => {
**Scene Testing:**
```typescript
describe("GameScene Integration", () => {
describe('GameScene Integration', () => {
let scene: GameScene;
let mockGame: Phaser.Game;
@@ -1503,7 +1496,7 @@ describe("GameScene Integration", () => {
scene = new GameScene();
});
test("should initialize all systems", () => {
test('should initialize all systems', () => {
scene.create({});
expect(scene.gameManager).toBeDefined();
@@ -1564,25 +1557,21 @@ src/
### Story Implementation Process
1. **Read Story Requirements:**
- Understand acceptance criteria
- Identify technical requirements
- Review performance constraints
2. **Plan Implementation:**
- Identify files to create/modify
- Consider component architecture
- Plan testing approach
3. **Implement Feature:**
- Follow TypeScript strict mode
- Use established patterns
- Maintain 60 FPS performance
4. **Test Implementation:**
- Write unit tests for game logic
- Test cross-platform functionality
- Validate performance targets

View File

@@ -318,7 +318,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -331,14 +330,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -347,7 +344,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -355,7 +351,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -369,7 +364,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -379,7 +373,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -409,8 +402,8 @@ template:
version: 2.0
output:
format: markdown
filename: "stories/{{epic_name}}/{{story_id}}-{{story_name}}.md"
title: "Story: {{story_title}}"
filename: 'stories/{{epic_name}}/{{story_id}}-{{story_name}}.md'
title: 'Story: {{story_title}}'
workflow:
mode: interactive
@@ -419,13 +412,13 @@ sections:
- id: initial-setup
instruction: |
This template creates detailed game development stories that are immediately actionable by game developers. Each story should focus on a single, implementable feature that contributes to the overall game functionality.
Before starting, ensure you have access to:
- Game Design Document (GDD)
- Game Architecture Document
- Any existing stories in this epic
The story should be specific enough that a developer can implement it without requiring additional design decisions.
- id: story-header
@@ -439,7 +432,7 @@ sections:
- id: description
title: Description
instruction: Provide a clear, concise description of what this story implements. Focus on the specific game feature or system being built. Reference the GDD section that defines this feature.
template: "{{clear_description_of_what_needs_to_be_implemented}}"
template: '{{clear_description_of_what_needs_to_be_implemented}}'
- id: acceptance-criteria
title: Acceptance Criteria
@@ -449,22 +442,22 @@ sections:
title: Functional Requirements
type: checklist
items:
- "{{specific_functional_requirement}}"
- '{{specific_functional_requirement}}'
- id: technical-requirements
title: Technical Requirements
type: checklist
items:
- "Code follows TypeScript strict mode standards"
- "Maintains 60 FPS on target devices"
- "No memory leaks or performance degradation"
- "{{specific_technical_requirement}}"
- 'Code follows TypeScript strict mode standards'
- 'Maintains 60 FPS on target devices'
- 'No memory leaks or performance degradation'
- '{{specific_technical_requirement}}'
- id: game-design-requirements
title: Game Design Requirements
type: checklist
items:
- "{{gameplay_requirement_from_gdd}}"
- "{{balance_requirement_if_applicable}}"
- "{{player_experience_requirement}}"
- '{{gameplay_requirement_from_gdd}}'
- '{{balance_requirement_if_applicable}}'
- '{{player_experience_requirement}}'
- id: technical-specifications
title: Technical Specifications
@@ -474,12 +467,12 @@ sections:
title: Files to Create/Modify
template: |
**New Files:**
- `{{file_path_1}}` - {{purpose}}
- `{{file_path_2}}` - {{purpose}}
**Modified Files:**
- `{{existing_file_1}}` - {{changes_needed}}
- `{{existing_file_2}}` - {{changes_needed}}
- id: class-interface-definitions
@@ -494,15 +487,15 @@ sections:
{{property_2}}: {{type}};
{{method_1}}({{params}}): {{return_type}};
}
// {{class_name}}
class {{class_name}} extends {{phaser_class}} {
private {{property}}: {{type}};
constructor({{params}}) {
// Implementation requirements
}
public {{method}}({{params}}): {{return_type}} {
// Method requirements
}
@@ -512,15 +505,15 @@ sections:
instruction: Specify how this feature integrates with existing systems
template: |
**Scene Integration:**
- {{scene_name}}: {{integration_details}}
**System Dependencies:**
- {{system_name}}: {{dependency_description}}
**Event Communication:**
- Emits: `{{event_name}}` when {{condition}}
- Listens: `{{event_name}}` to {{response}}
@@ -532,7 +525,7 @@ sections:
title: Dev Agent Record
template: |
**Tasks:**
- [ ] {{task_1_description}}
- [ ] {{task_2_description}}
- [ ] {{task_3_description}}
@@ -540,18 +533,18 @@ sections:
- [ ] Write unit tests for {{component}}
- [ ] Integration testing with {{related_system}}
- [ ] Performance testing and optimization
**Debug Log:**
| Task | File | Change | Reverted? |
|------|------|--------|-----------|
| | | | |
**Completion Notes:**
<!-- Only note deviations from requirements, keep under 50 words -->
**Change Log:**
<!-- Only requirement changes during implementation -->
- id: game-design-context
@@ -559,13 +552,13 @@ sections:
instruction: Reference the specific sections of the GDD that this story implements
template: |
**GDD Reference:** {{section_name}} ({{page_or_section_number}})
**Game Mechanic:** {{mechanic_name}}
**Player Experience Goal:** {{experience_description}}
**Balance Parameters:**
- {{parameter_1}}: {{value_or_range}}
- {{parameter_2}}: {{value_or_range}}
@@ -577,11 +570,11 @@ sections:
title: Unit Tests
template: |
**Test Files:**
- `tests/{{component_name}}.test.ts`
**Test Scenarios:**
- {{test_scenario_1}}
- {{test_scenario_2}}
- {{edge_case_test}}
@@ -589,12 +582,12 @@ sections:
title: Game Testing
template: |
**Manual Test Cases:**
1. {{test_case_1_description}}
- Expected: {{expected_behavior}}
- Performance: {{performance_expectation}}
2. {{test_case_2_description}}
- Expected: {{expected_behavior}}
- Edge Case: {{edge_case_handling}}
@@ -602,7 +595,7 @@ sections:
title: Performance Tests
template: |
**Metrics to Verify:**
- Frame rate maintains {{fps_target}} FPS
- Memory usage stays under {{memory_limit}}MB
- {{feature_specific_performance_metric}}
@@ -612,15 +605,15 @@ sections:
instruction: List any dependencies that must be completed before this story can be implemented
template: |
**Story Dependencies:**
- {{story_id}}: {{dependency_description}}
**Technical Dependencies:**
- {{system_or_file}}: {{requirement}}
**Asset Dependencies:**
- {{asset_type}}: {{asset_description}}
- Location: `{{asset_path}}`
@@ -629,31 +622,31 @@ sections:
instruction: Checklist that must be completed before the story is considered finished
type: checklist
items:
- "All acceptance criteria met"
- "Code reviewed and approved"
- "Unit tests written and passing"
- "Integration tests passing"
- "Performance targets met"
- "No linting errors"
- "Documentation updated"
- "{{game_specific_dod_item}}"
- 'All acceptance criteria met'
- 'Code reviewed and approved'
- 'Unit tests written and passing'
- 'Integration tests passing'
- 'Performance targets met'
- 'No linting errors'
- 'Documentation updated'
- '{{game_specific_dod_item}}'
- id: notes
title: Notes
instruction: Any additional context, design decisions, or implementation notes
template: |
**Implementation Notes:**
- {{note_1}}
- {{note_2}}
**Design Decisions:**
- {{decision_1}}: {{rationale}}
- {{decision_2}}: {{rationale}}
**Future Considerations:**
- {{future_enhancement_1}}
- {{future_optimization_1}}
==================== END: .bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml ====================

View File

@@ -230,63 +230,54 @@ CRITICAL: First, help the user select the most appropriate research focus based
Present these numbered options to the user:
1. **Product Validation Research**
- Validate product hypotheses and market fit
- Test assumptions about user needs and solutions
- Assess technical and business feasibility
- Identify risks and mitigation strategies
2. **Market Opportunity Research**
- Analyze market size and growth potential
- Identify market segments and dynamics
- Assess market entry strategies
- Evaluate timing and market readiness
3. **User & Customer Research**
- Deep dive into user personas and behaviors
- Understand jobs-to-be-done and pain points
- Map customer journeys and touchpoints
- Analyze willingness to pay and value perception
4. **Competitive Intelligence Research**
- Detailed competitor analysis and positioning
- Feature and capability comparisons
- Business model and strategy analysis
- Identify competitive advantages and gaps
5. **Technology & Innovation Research**
- Assess technology trends and possibilities
- Evaluate technical approaches and architectures
- Identify emerging technologies and disruptions
- Analyze build vs. buy vs. partner options
6. **Industry & Ecosystem Research**
- Map industry value chains and dynamics
- Identify key players and relationships
- Analyze regulatory and compliance factors
- Understand partnership opportunities
7. **Strategic Options Research**
- Evaluate different strategic directions
- Assess business model alternatives
- Analyze go-to-market strategies
- Consider expansion and scaling paths
8. **Risk & Feasibility Research**
- Identify and assess various risk factors
- Evaluate implementation challenges
- Analyze resource requirements
- Consider regulatory and legal implications
9. **Custom Research Focus**
- User-defined research objectives
- Specialized domain investigation
- Cross-functional research needs
@@ -455,13 +446,11 @@ CRITICAL: collaborate with the user to develop specific, actionable research que
### 5. Review and Refinement
1. **Present Complete Prompt**
- Show the full research prompt
- Explain key elements and rationale
- Highlight any assumptions made
2. **Gather Feedback**
- Are the objectives clear and correct?
- Do the questions address all concerns?
- Is the scope appropriate?
@@ -592,13 +581,11 @@ CRITICAL: Use proper parsing that understands markdown context. A ## inside a co
For each extracted section:
1. **Generate filename**: Convert the section heading to lowercase-dash-case
- Remove special characters
- Replace spaces with dashes
- Example: "## Tech Stack" → `tech-stack.md`
2. **Adjust heading levels**:
- The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
- All subsection levels decrease by 1:
@@ -802,9 +789,9 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
### Change Log
| Date | Version | Description | Author |
|------|---------|-------------|--------|
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
| Date | Version | Description | Author |
| ------ | ------- | --------------------------- | --------- |
| [Date] | 1.0 | Initial brownfield analysis | [Analyst] |
## Quick Reference - Key Files and Entry Points
@@ -827,11 +814,11 @@ This document captures the CURRENT STATE of the [Project Name] codebase, includi
### Actual Tech Stack (from package.json/requirements.txt)
| Category | Technology | Version | Notes |
|----------|------------|---------|--------|
| Runtime | Node.js | 16.x | [Any constraints] |
| Framework | Express | 4.18.2 | [Custom middleware?] |
| Database | PostgreSQL | 13 | [Connection pooling setup] |
| Category | Technology | Version | Notes |
| --------- | ---------- | ------- | -------------------------- |
| Runtime | Node.js | 16.x | [Any constraints] |
| Framework | Express | 4.18.2 | [Custom middleware?] |
| Database | PostgreSQL | 13 | [Connection pooling setup] |
etc...
@@ -870,6 +857,7 @@ project-root/
### Data Models
Instead of duplicating, reference actual model files:
- **User Model**: See `src/models/User.js`
- **Order Model**: See `src/models/Order.js`
- **Related Types**: TypeScript definitions in `src/types/`
@@ -899,10 +887,10 @@ Instead of duplicating, reference actual model files:
### External Services
| Service | Purpose | Integration Type | Key Files |
|---------|---------|------------------|-----------|
| Stripe | Payments | REST API | `src/integrations/stripe/` |
| SendGrid | Emails | SDK | `src/services/emailService.js` |
| Service | Purpose | Integration Type | Key Files |
| -------- | -------- | ---------------- | ------------------------------ |
| Stripe | Payments | REST API | `src/integrations/stripe/` |
| SendGrid | Emails | SDK | `src/services/emailService.js` |
etc...
@@ -947,6 +935,7 @@ npm run test:integration # Runs integration tests (requires local DB)
### Files That Will Need Modification
Based on the enhancement requirements, these files will be affected:
- `src/services/userService.js` - Add new user fields
- `src/models/User.js` - Update schema
- `src/routes/userRoutes.js` - New endpoints
@@ -1044,7 +1033,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -1057,14 +1045,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -1073,7 +1059,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -1081,7 +1066,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -1095,7 +1079,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -1105,7 +1088,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -1149,7 +1131,6 @@ The LLM will:
2. If the section contains game flow diagrams, level layouts, or system diagrams, explain each diagram briefly with game development context before offering elicitation options (e.g., "The gameplay loop diagram shows how player actions lead to rewards and progression. Notice how each step maintains player engagement and creates opportunities for skill development.")
3. If the section contains multiple game elements (like multiple mechanics, multiple levels, multiple systems, etc.), inform the user they can apply elicitation actions to:
- The entire section as a whole
- Individual game elements within the section (specify which element when selecting an action)
@@ -1250,7 +1231,7 @@ template:
output:
format: markdown
filename: docs/game-architecture.md
title: "{{project_name}} Game Architecture Document"
title: '{{project_name}} Game Architecture Document'
workflow:
mode: interactive
@@ -1360,11 +1341,11 @@ sections:
- Game management patterns (Singleton managers, Event systems, State machines)
- Data patterns (ScriptableObject configuration, Save/Load systems)
- Unity-specific patterns (Object pooling, Coroutines, Unity Events)
template: "- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}"
template: '- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}'
examples:
- "**Component-Based Architecture:** Using MonoBehaviour components for game logic - _Rationale:_ Aligns with Unity's design philosophy and enables reusable, testable game systems"
- "**ScriptableObject Data:** Using ScriptableObjects for game configuration - _Rationale:_ Enables data-driven design and easy balancing without code changes"
- "**Event-Driven Communication:** Using Unity Events and C# events for system decoupling - _Rationale:_ Supports modular architecture and easier testing"
- '**ScriptableObject Data:** Using ScriptableObjects for game configuration - _Rationale:_ Enables data-driven design and easy balancing without code changes'
- '**Event-Driven Communication:** Using Unity Events and C# events for system decoupling - _Rationale:_ Supports modular architecture and easier testing'
- id: tech-stack
title: Tech Stack
@@ -1403,13 +1384,13 @@ sections:
columns: [Category, Technology, Version, Purpose, Rationale]
instruction: Populate the technology stack table with all relevant Unity technologies
examples:
- "| **Game Engine** | Unity | 2022.3.21f1 | Core game development platform | Latest LTS version, stable 2D tooling, comprehensive package ecosystem |"
- '| **Game Engine** | Unity | 2022.3.21f1 | Core game development platform | Latest LTS version, stable 2D tooling, comprehensive package ecosystem |'
- "| **Language** | C# | 10.0 | Primary scripting language | Unity's native language, strong typing, excellent tooling |"
- "| **Render Pipeline** | Universal Render Pipeline (URP) | 14.0.10 | 2D/3D rendering | Optimized for mobile, excellent 2D features, future-proof |"
- "| **Input System** | Unity Input System | 1.7.0 | Cross-platform input handling | Modern input system, supports multiple devices, rebindable controls |"
- "| **Physics** | Unity 2D Physics | Built-in | 2D collision and physics | Integrated Box2D, optimized for 2D games |"
- "| **Audio** | Unity Audio | Built-in | Audio playback and mixing | Built-in audio system with mixer support |"
- "| **Testing** | Unity Test Framework | 1.1.33 | Unit and integration testing | Built-in testing framework based on NUnit |"
- '| **Render Pipeline** | Universal Render Pipeline (URP) | 14.0.10 | 2D/3D rendering | Optimized for mobile, excellent 2D features, future-proof |'
- '| **Input System** | Unity Input System | 1.7.0 | Cross-platform input handling | Modern input system, supports multiple devices, rebindable controls |'
- '| **Physics** | Unity 2D Physics | Built-in | 2D collision and physics | Integrated Box2D, optimized for 2D games |'
- '| **Audio** | Unity Audio | Built-in | Audio playback and mixing | Built-in audio system with mixer support |'
- '| **Testing** | Unity Test Framework | 1.1.33 | Unit and integration testing | Built-in testing framework based on NUnit |'
- id: data-models
title: Game Data Models
@@ -1427,7 +1408,7 @@ sections:
repeatable: true
sections:
- id: model
title: "{{model_name}}"
title: '{{model_name}}'
template: |
**Purpose:** {{model_purpose}}
@@ -1462,7 +1443,7 @@ sections:
sections:
- id: system-list
repeatable: true
title: "{{system_name}} System"
title: '{{system_name}} System'
template: |
**Responsibility:** {{system_description}}
@@ -1986,7 +1967,7 @@ sections:
repeatable: true
sections:
- id: integration
title: "{{service_name}} Integration"
title: '{{service_name}} Integration'
template: |
- **Purpose:** {{service_purpose}}
- **Documentation:** {{service_docs_url}}
@@ -2098,12 +2079,12 @@ sections:
- id: environments
title: Build Environments
repeatable: true
template: "- **{{env_name}}:** {{env_purpose}} - {{platform_settings}}"
template: '- **{{env_name}}:** {{env_purpose}} - {{platform_settings}}'
- id: platform-specific-builds
title: Platform-Specific Build Settings
type: code
language: text
template: "{{platform_build_configurations}}"
template: '{{platform_build_configurations}}'
- id: coding-standards
title: Coding Standards
@@ -2132,9 +2113,9 @@ sections:
columns: [Element, Convention, Example]
instruction: Only include if deviating from Unity defaults
examples:
- "| MonoBehaviour | PascalCase + Component suffix | PlayerController, HealthSystem |"
- "| ScriptableObject | PascalCase + Data/Config suffix | PlayerData, GameConfig |"
- "| Prefab | PascalCase descriptive | PlayerCharacter, EnvironmentTile |"
- '| MonoBehaviour | PascalCase + Component suffix | PlayerController, HealthSystem |'
- '| ScriptableObject | PascalCase + Data/Config suffix | PlayerData, GameConfig |'
- '| Prefab | PascalCase descriptive | PlayerCharacter, EnvironmentTile |'
- id: critical-rules
title: Critical Unity Rules
instruction: |
@@ -2146,7 +2127,7 @@ sections:
Avoid obvious rules like "follow SOLID principles" or "optimize performance"
repeatable: true
template: "- **{{rule_name}}:** {{rule_description}}"
template: '- **{{rule_name}}:** {{rule_description}}'
- id: unity-specifics
title: Unity-Specific Guidelines
condition: Critical Unity-specific rules needed
@@ -2155,7 +2136,7 @@ sections:
- id: unity-lifecycle
title: Unity Lifecycle Rules
repeatable: true
template: "- **{{lifecycle_method}}:** {{usage_rule}}"
template: '- **{{lifecycle_method}}:** {{usage_rule}}'
- id: test-strategy
title: Test Strategy and Standards
@@ -2633,34 +2614,29 @@ Ask the user if they want to work through the checklist:
Generate a comprehensive validation report that includes:
1. Executive Summary
- Overall game architecture readiness (High/Medium/Low)
- Critical risks for game development
- Key strengths of the game architecture
- Unity-specific assessment
2. Game Systems Analysis
- Pass rate for each major system section
- Most concerning gaps in game architecture
- Systems requiring immediate attention
- Unity integration completeness
3. Performance Risk Assessment
- Top 5 performance risks for the game
- Mobile platform specific concerns
- Frame rate stability risks
- Memory usage concerns
4. Implementation Recommendations
- Must-fix items before development
- Unity-specific improvements needed
- Game development workflow enhancements
5. AI Agent Implementation Readiness
- Game-specific concerns for AI implementation
- Unity component complexity assessment
- Areas needing additional clarification
@@ -3208,25 +3184,21 @@ Assets/
### Story Implementation Process
1. **Read Story Requirements:**
- Understand acceptance criteria
- Identify technical requirements
- Review performance constraints
2. **Plan Implementation:**
- Identify files to create/modify
- Consider Unity's component-based architecture
- Plan testing approach
3. **Implement Feature:**
- Write clean C# code following all guidelines
- Use established patterns
- Maintain stable FPS performance
4. **Test Implementation:**
- Write edit mode tests for game logic
- Write play mode tests for integration testing
- Test cross-platform functionality
@@ -3540,7 +3512,6 @@ that can handle [specific game requirements] with stable performance."
**Prerequisites**: Game planning documents must exist in `docs/` folder of Unity project
1. **Document Sharding** (CRITICAL STEP for Game Development):
- Documents created by Game Designer/Architect (in Web or IDE) MUST be sharded for development
- Use core BMad agents or tools to shard:
a) **Manual**: Use core BMad `shard-doc` task if available
@@ -3563,20 +3534,17 @@ Resulting Unity Project Folder Structure:
3. **Game Development Cycle** (Sequential, one game story at a time):
**CRITICAL CONTEXT MANAGEMENT for Unity Development**:
- **Context windows matter!** Always use fresh, clean context windows
- **Model selection matters!** Use most powerful thinking model for Game SM story creation
- **ALWAYS start new chat between Game SM, Game Dev, and QA work**
**Step 1 - Game Story Creation**:
- **NEW CLEAN CHAT** → Select powerful model → `/bmad2du/game-sm` → `*draft`
- Game SM executes create-game-story task using `game-story-tmpl`
- Review generated story in `docs/game-stories/`
- Update status from "Draft" to "Approved"
**Step 2 - Unity Game Story Implementation**:
- **NEW CLEAN CHAT** → `/bmad2du/game-developer`
- Agent asks which game story to implement
- Include story file content to save game dev agent lookup time
@@ -3585,7 +3553,6 @@ Resulting Unity Project Folder Structure:
- Game Dev marks story as "Review" when complete with all Unity tests passing
**Step 3 - Game QA Review**:
- **NEW CLEAN CHAT** → Use core `@qa` agent → execute review-story task
- QA performs senior Unity developer code review
- QA can refactor and improve Unity code directly
@@ -3625,14 +3592,12 @@ Since this expansion pack doesn't include specific brownfield templates, you'll
1. **Upload Unity project to Web UI** (GitHub URL, files, or zip)
2. **Create adapted Game Design Document**: `/bmad2du/game-designer` - Modify `game-design-doc-tmpl` to include:
- Analysis of existing game systems
- Integration points for new features
- Compatibility requirements
- Risk assessment for changes
3. **Game Architecture Planning**:
- Use `/bmad2du/game-architect` with `game-architecture-tmpl`
- Focus on how new features integrate with existing Unity systems
- Plan for gradual rollout and testing
@@ -3733,7 +3698,7 @@ Use the `shard-doc` task or `@kayvan/markdown-tree-parser` tool for automatic ga
- **Claude Code**: `/bmad2du/game-designer`, `/bmad2du/game-developer`, `/bmad2du/game-sm`, `/bmad2du/game-architect`
- **Cursor**: `@bmad2du/game-designer`, `@bmad2du/game-developer`, `@bmad2du/game-sm`, `@bmad2du/game-architect`
- **Windsurf**: `@bmad2du/game-designer`, `@bmad2du/game-developer`, `@bmad2du/game-sm`, `@bmad2du/game-architect`
- **Windsurf**: `/bmad2du/game-designer`, `/bmad2du/game-developer`, `/bmad2du/game-sm`, `/bmad2du/game-architect`
- **Trae**: `@bmad2du/game-designer`, `@bmad2du/game-developer`, `@bmad2du/game-sm`, `@bmad2du/game-architect`
- **Roo Code**: Select mode from mode selector with bmad2du prefix
- **GitHub Copilot**: Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select the appropriate game agent.

File diff suppressed because it is too large Load Diff

View File

@@ -108,7 +108,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -121,14 +120,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -137,7 +134,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -145,7 +141,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -159,7 +154,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -169,7 +163,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -357,7 +350,6 @@ The goal is quality delivery, not just checking boxes.]]
1. **Requirements Met:**
[[LLM: Be specific - list each requirement and whether it's complete. Include game-specific requirements from GDD]]
- [ ] All functional requirements specified in the story are implemented.
- [ ] All acceptance criteria defined in the story are met.
- [ ] Game Design Document (GDD) requirements referenced in the story are implemented.
@@ -366,7 +358,6 @@ The goal is quality delivery, not just checking boxes.]]
2. **Coding Standards & Project Structure:**
[[LLM: Code quality matters for maintainability. Check Unity-specific patterns and C# standards]]
- [ ] All new/modified code strictly adheres to `Operational Guidelines`.
- [ ] All new/modified code aligns with `Project Structure` (Scripts/, Prefabs/, Scenes/, etc.).
- [ ] Adherence to `Tech Stack` for Unity version and packages used.
@@ -380,7 +371,6 @@ The goal is quality delivery, not just checking boxes.]]
3. **Testing:**
[[LLM: Testing proves your code works. Include Unity-specific testing with NUnit and manual testing]]
- [ ] All required unit tests (NUnit) as per the story and testing strategy are implemented.
- [ ] All required integration tests (if applicable) are implemented.
- [ ] Manual testing performed in Unity Editor for all game functionality.
@@ -392,7 +382,6 @@ The goal is quality delivery, not just checking boxes.]]
4. **Functionality & Verification:**
[[LLM: Did you actually run and test your code in Unity? Be specific about game mechanics tested]]
- [ ] Functionality has been manually verified in Unity Editor and play mode.
- [ ] Game mechanics work as specified in the GDD.
- [ ] Player controls and input handling work correctly.
@@ -405,7 +394,6 @@ The goal is quality delivery, not just checking boxes.]]
5. **Story Administration:**
[[LLM: Documentation helps the next developer. Include Unity-specific implementation notes]]
- [ ] All tasks within the story file are marked as complete.
- [ ] Any clarifications or decisions made during development are documented.
- [ ] Unity-specific implementation details documented (scene changes, prefab modifications).
@@ -415,7 +403,6 @@ The goal is quality delivery, not just checking boxes.]]
6. **Dependencies, Build & Configuration:**
[[LLM: Build issues block everyone. Ensure Unity project builds for all target platforms]]
- [ ] Unity project builds successfully without errors.
- [ ] Project builds for all target platforms (desktop/mobile as specified).
- [ ] Any new Unity packages or Asset Store items were pre-approved OR approved by user.
@@ -427,7 +414,6 @@ The goal is quality delivery, not just checking boxes.]]
7. **Game-Specific Quality:**
[[LLM: Game quality matters. Check performance, game feel, and player experience]]
- [ ] Frame rate meets target (30/60 FPS) on all platforms.
- [ ] Memory usage within acceptable limits.
- [ ] Game feel and responsiveness meet design requirements.
@@ -439,7 +425,6 @@ The goal is quality delivery, not just checking boxes.]]
8. **Documentation (If Applicable):**
[[LLM: Good documentation prevents future confusion. Include Unity-specific docs]]
- [ ] Code documentation (XML comments) for public APIs complete.
- [ ] Unity component documentation in Inspector updated.
- [ ] User-facing documentation updated, if changes impact players.

View File

@@ -286,7 +286,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
## Instructions
1. **Initial Assessment**
- If user or the task being run provides a checklist name:
- Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
- If multiple matches found, ask user to clarify
@@ -299,14 +298,12 @@ If the user asks or does not specify a specific checklist, list the checklists a
- All at once (YOLO mode - recommended for checklists, there will be a summary of sections at the end to discuss)
2. **Document and Artifact Gathering**
- Each checklist will specify its required documents/artifacts at the beginning
- Follow the checklist's specific instructions for what to gather, generally a file can be resolved in the docs folder, if not or unsure, halt and ask or confirm with the user.
3. **Checklist Processing**
If in interactive mode:
- Work through each section of the checklist one at a time
- For each section:
- Review all items in the section following instructions for that section embedded in the checklist
@@ -315,7 +312,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
- Get user confirmation before proceeding to next section or if any thing major do we need to halt and take corrective action
If in YOLO mode:
- Process all sections at once
- Create a comprehensive report of all findings
- Present the complete analysis to the user
@@ -323,7 +319,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
4. **Validation Approach**
For each checklist item:
- Read and understand the requirement
- Look for evidence in the documentation that satisfies the requirement
- Consider both explicit mentions and implicit coverage
@@ -337,7 +332,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
5. **Section Analysis**
For each section:
- think step by step to calculate pass rate
- Identify common themes in failed items
- Provide specific recommendations for improvement
@@ -347,7 +341,6 @@ If the user asks or does not specify a specific checklist, list the checklists a
6. **Final Report**
Prepare a summary that includes:
- Overall checklist completion status
- Pass rates by section
- List of failed items with context
@@ -387,7 +380,6 @@ The LLM will:
### 1. Initial Setup & Mode Selection
- **Acknowledge Task & Inputs:**
- Confirm with the user that the "Game Development Correct Course Task" is being initiated.
- Verify the change trigger (e.g., performance issue, platform constraint, gameplay feedback, technical blocker).
- Confirm access to relevant game artifacts:
@@ -408,7 +400,6 @@ The LLM will:
### 2. Execute Game Development Checklist Analysis
- Systematically work through the game-change-checklist sections:
1. **Change Context & Game Impact**
2. **Feature/System Impact Analysis**
3. **Technical Artifact Conflict Resolution**
@@ -433,7 +424,6 @@ The LLM will:
Based on the analysis and agreed path forward:
- **Identify affected game artifacts requiring updates:**
- GDD sections (mechanics, systems, progression)
- Technical specifications (architecture, performance targets)
- Unity-specific configurations (build settings, quality settings)
@@ -442,7 +432,6 @@ Based on the analysis and agreed path forward:
- Platform-specific adaptations
- **Draft explicit changes for each artifact:**
- **Game Stories:** Revise story text, Unity-specific acceptance criteria, technical constraints
- **Technical Specs:** Update architecture diagrams, component hierarchies, performance budgets
- **Unity Configurations:** Propose settings changes, optimization strategies, platform variants
@@ -462,14 +451,12 @@ Based on the analysis and agreed path forward:
- Create a comprehensive proposal document containing:
**A. Change Summary:**
- Original issue (performance, gameplay, technical constraint)
- Game systems affected
- Platform/performance implications
- Chosen solution approach
**B. Technical Impact Analysis:**
- Unity architecture changes needed
- Performance implications (with metrics)
- Platform compatibility effects
@@ -477,14 +464,12 @@ Based on the analysis and agreed path forward:
- Third-party dependency impacts
**C. Specific Proposed Edits:**
- For each game story: "Change Story GS-X.Y from: [old] To: [new]"
- For technical specs: "Update Unity Architecture Section X: [changes]"
- For GDD: "Modify [Feature] in Section Y: [updates]"
- For configurations: "Change [Setting] from [old_value] to [new_value]"
**D. Implementation Considerations:**
- Required Unity version updates
- Asset reimport needs
- Shader recompilation requirements
@@ -496,7 +481,6 @@ Based on the analysis and agreed path forward:
- Provide the finalized document to the user
- **Based on change scope:**
- **Minor adjustments (can be handled in current sprint):**
- Confirm task completion
- Suggest handoff to game-dev agent for implementation
@@ -510,7 +494,6 @@ Based on the analysis and agreed path forward:
## Output Deliverables
- **Primary:** "Game Development Change Proposal" document containing:
- Game-specific change analysis
- Technical impact assessment with Unity context
- Platform and performance considerations
@@ -531,8 +514,8 @@ template:
version: 3.0
output:
format: markdown
filename: "stories/{{epic_name}}/{{story_id}}-{{story_name}}.md"
title: "Story: {{story_title}}"
filename: 'stories/{{epic_name}}/{{story_id}}-{{story_name}}.md'
title: 'Story: {{story_title}}'
workflow:
mode: interactive
@@ -541,13 +524,13 @@ sections:
- id: initial-setup
instruction: |
This template creates detailed game development stories that are immediately actionable by game developers. Each story should focus on a single, implementable feature that contributes to the overall game functionality.
Before starting, ensure you have access to:
- Game Design Document (GDD)
- Game Architecture Document
- Any existing stories in this epic
The story should be specific enough that a developer can implement it without requiring additional design decisions.
- id: story-header
@@ -561,7 +544,7 @@ sections:
- id: description
title: Description
instruction: Provide a clear, concise description of what this story implements. Focus on the specific game feature or system being built. Reference the GDD section that defines this feature.
template: "{{clear_description_of_what_needs_to_be_implemented}}"
template: '{{clear_description_of_what_needs_to_be_implemented}}'
- id: acceptance-criteria
title: Acceptance Criteria
@@ -571,7 +554,7 @@ sections:
title: Functional Requirements
type: checklist
items:
- "{{specific_functional_requirement}}"
- '{{specific_functional_requirement}}'
- id: technical-requirements
title: Technical Requirements
type: checklist
@@ -579,14 +562,14 @@ sections:
- Code follows C# best practices
- Maintains stable frame rate on target devices
- No memory leaks or performance degradation
- "{{specific_technical_requirement}}"
- '{{specific_technical_requirement}}'
- id: game-design-requirements
title: Game Design Requirements
type: checklist
items:
- "{{gameplay_requirement_from_gdd}}"
- "{{balance_requirement_if_applicable}}"
- "{{player_experience_requirement}}"
- '{{gameplay_requirement_from_gdd}}'
- '{{balance_requirement_if_applicable}}'
- '{{player_experience_requirement}}'
- id: technical-specifications
title: Technical Specifications
@@ -596,12 +579,12 @@ sections:
title: Files to Create/Modify
template: |
**New Files:**
- `{{file_path_1}}` - {{purpose}}
- `{{file_path_2}}` - {{purpose}}
**Modified Files:**
- `{{existing_file_1}}` - {{changes_needed}}
- `{{existing_file_2}}` - {{changes_needed}}
- id: class-interface-definitions
@@ -684,13 +667,13 @@ sections:
instruction: Reference the specific sections of the GDD that this story implements
template: |
**GDD Reference:** {{section_name}} ({{page_or_section_number}})
**Game Mechanic:** {{mechanic_name}}
**Player Experience Goal:** {{experience_description}}
**Balance Parameters:**
- {{parameter_1}}: {{value_or_range}}
- {{parameter_2}}: {{value_or_range}}
@@ -737,15 +720,15 @@ sections:
instruction: List any dependencies that must be completed before this story can be implemented
template: |
**Story Dependencies:**
- {{story_id}}: {{dependency_description}}
**Technical Dependencies:**
- {{system_or_file}}: {{requirement}}
**Asset Dependencies:**
- {{asset_type}}: {{asset_description}}
- Location: `{{asset_path}}`
@@ -761,24 +744,24 @@ sections:
- Performance targets met
- No C# compiler errors or warnings
- Documentation updated
- "{{game_specific_dod_item}}"
- '{{game_specific_dod_item}}'
- id: notes
title: Notes
instruction: Any additional context, design decisions, or implementation notes
template: |
**Implementation Notes:**
- {{note_1}}
- {{note_2}}
**Design Decisions:**
- {{decision_1}}: {{rationale}}
- {{decision_2}}: {{rationale}}
**Future Considerations:**
- {{future_enhancement_1}}
- {{future_optimization_1}}
==================== END: .bmad-2d-unity-game-dev/templates/game-story-tmpl.yaml ====================

File diff suppressed because it is too large Load Diff

View File

@@ -239,7 +239,6 @@ To conduct a thorough review of existing infrastructure to identify improvement
### 3. Conduct Systematic Review
- **If "Incremental Mode" was selected:**
- For each section of the infrastructure checklist:
- **a. Present Section Focus:** Explain what aspects of infrastructure this section reviews
- **b. Work Through Items:** Examine each checklist item against current infrastructure
@@ -425,7 +424,6 @@ To comprehensively validate platform infrastructure changes against security, re
### 4. Execute Comprehensive Platform Validation Process
- **If "Incremental Mode" was selected:**
- For each section of the infrastructure checklist (Sections 1-16):
- **a. Present Section Purpose:** Explain what this section validates and why it's important for platform operations
- **b. Work Through Items:** Present each checklist item, guide the user through validation, and document compliance or gaps
@@ -532,40 +530,40 @@ template:
output:
format: markdown
filename: docs/infrastructure-architecture.md
title: "{{project_name}} Infrastructure Architecture"
title: '{{project_name}} Infrastructure Architecture'
workflow:
mode: interactive
elicitation: advanced-elicitation
custom_elicitation:
title: "Infrastructure Architecture Elicitation Actions"
title: 'Infrastructure Architecture Elicitation Actions'
sections:
- id: infrastructure-overview
options:
- "Multi-Cloud Strategy Analysis - Evaluate cloud provider options and vendor lock-in considerations"
- "Regional Distribution Planning - Analyze latency requirements and data residency needs"
- "Environment Isolation Strategy - Design security boundaries and resource segregation"
- "Scalability Patterns Review - Assess auto-scaling needs and traffic patterns"
- "Compliance Requirements Analysis - Review regulatory and security compliance needs"
- "Cost-Benefit Analysis - Compare infrastructure options and TCO"
- "Proceed to next section"
- 'Multi-Cloud Strategy Analysis - Evaluate cloud provider options and vendor lock-in considerations'
- 'Regional Distribution Planning - Analyze latency requirements and data residency needs'
- 'Environment Isolation Strategy - Design security boundaries and resource segregation'
- 'Scalability Patterns Review - Assess auto-scaling needs and traffic patterns'
- 'Compliance Requirements Analysis - Review regulatory and security compliance needs'
- 'Cost-Benefit Analysis - Compare infrastructure options and TCO'
- 'Proceed to next section'
sections:
- id: initial-setup
instruction: |
Initial Setup
1. Replace {{project_name}} with the actual project name throughout the document
2. Gather and review required inputs:
- Product Requirements Document (PRD) - Required for business needs and scale requirements
- Main System Architecture - Required for infrastructure dependencies
- Technical Preferences/Tech Stack Document - Required for technology choices
- PRD Technical Assumptions - Required for cross-referencing repository and service architecture
If any required documents are missing, ask user: "I need the following documents to create a comprehensive infrastructure architecture: [list missing]. Would you like to proceed with available information or provide the missing documents first?"
3. <critical_rule>Cross-reference with PRD Technical Assumptions to ensure infrastructure decisions align with repository and service architecture decisions made in the system architecture.</critical_rule>
Output file location: `docs/infrastructure-architecture.md`
- id: infrastructure-overview
@@ -594,7 +592,7 @@ sections:
- Repository Structure
- State Management
- Dependency Management
<critical_rule>All infrastructure must be defined as code. No manual resource creation in production environments.</critical_rule>
- id: environment-configuration
@@ -608,7 +606,7 @@ sections:
sections:
- id: environments
repeatable: true
title: "{{environment_name}} Environment"
title: '{{environment_name}} Environment'
template: |
- **Purpose:** {{environment_purpose}}
- **Resources:** {{environment_resources}}
@@ -630,7 +628,7 @@ sections:
title: Network Architecture
instruction: |
Design network topology considering security zones, traffic patterns, and compliance requirements. Reference main architecture for service communication patterns.
Create Mermaid diagram showing:
- VPC/Network structure
- Security zones and boundaries
@@ -693,7 +691,7 @@ sections:
title: Data Resources
instruction: |
Design data infrastructure based on data architecture from main system design. Consider data volumes, access patterns, compliance, and recovery requirements.
Create data flow diagram showing:
- Database topology
- Replication patterns
@@ -714,7 +712,7 @@ sections:
- Data Encryption
- Compliance Controls
- Security Scanning & Monitoring
<critical_rule>Apply principle of least privilege for all access controls. Document all security exceptions with business justification.</critical_rule>
- id: shared-responsibility
@@ -750,7 +748,7 @@ sections:
title: CI/CD Pipeline
instruction: |
Design deployment pipeline that balances speed with safety. Include progressive deployment strategies and automated quality gates.
Create pipeline diagram showing:
- Build stages
- Test gates
@@ -781,7 +779,7 @@ sections:
- Recovery Procedures
- RTO & RPO Targets
- DR Testing Approach
<critical_rule>DR procedures must be tested at least quarterly. Document test results and improvement actions.</critical_rule>
- id: cost-optimization
@@ -823,15 +821,15 @@ sections:
title: DevOps/Platform Feasibility Review
instruction: |
CRITICAL STEP - Present architectural blueprint summary to DevOps/Platform Engineering Agent for feasibility review. Request specific feedback on:
- **Operational Complexity:** Are the proposed patterns implementable with current tooling and expertise?
- **Resource Constraints:** Do infrastructure requirements align with available resources and budgets?
- **Security Implementation:** Are security patterns achievable with current security toolchain?
- **Operational Overhead:** Will the proposed architecture create excessive operational burden?
- **Technology Constraints:** Are selected technologies compatible with existing infrastructure?
Document all feasibility feedback and concerns raised. Iterate on architectural decisions based on operational constraints and feedback.
<critical_rule>Address all critical feasibility concerns before proceeding to final architecture documentation. If critical blockers identified, revise architecture before continuing.</critical_rule>
sections:
- id: feasibility-results
@@ -849,7 +847,7 @@ sections:
title: Validation Framework
content: |
This infrastructure architecture will be validated using the comprehensive `infrastructure-checklist.md`, with particular focus on Section 12: Architecture Documentation Validation. The checklist ensures:
- Completeness of architecture documentation
- Consistency with broader system architecture
- Appropriate level of detail for different stakeholders
@@ -859,12 +857,12 @@ sections:
title: Validation Process
content: |
The architecture documentation validation should be performed:
- After initial architecture development
- After significant architecture changes
- Before major implementation phases
- During periodic architecture reviews
The Platform Engineer should use the infrastructure checklist to systematically validate all aspects of this architecture document.
- id: implementation-handoff
@@ -875,7 +873,7 @@ sections:
title: Architecture Decision Records (ADRs)
content: |
Create ADRs for key infrastructure decisions:
- Cloud provider selection rationale
- Container orchestration platform choice
- Networking architecture decisions
@@ -885,7 +883,7 @@ sections:
title: Implementation Validation Criteria
content: |
Define specific criteria for validating correct implementation:
- Infrastructure as Code quality gates
- Security compliance checkpoints
- Performance benchmarks
@@ -945,7 +943,7 @@ sections:
instruction: Final Review - Ensure all sections are complete and consistent. Verify feasibility review was conducted and all concerns addressed. Apply final validation against infrastructure checklist.
content: |
---
_Document Version: 1.0_
_Last Updated: {{current_date}}_
_Next Review: {{review_date}}_
@@ -959,30 +957,30 @@ template:
output:
format: markdown
filename: docs/platform-infrastructure/platform-implementation.md
title: "{{project_name}} Platform Infrastructure Implementation"
title: '{{project_name}} Platform Infrastructure Implementation'
workflow:
mode: interactive
elicitation: advanced-elicitation
custom_elicitation:
title: "Platform Implementation Elicitation Actions"
title: 'Platform Implementation Elicitation Actions'
sections:
- id: foundation-infrastructure
options:
- "Platform Layer Security Hardening - Additional security controls and compliance validation"
- "Performance Optimization - Network and resource optimization"
- "Operational Excellence Enhancement - Automation and monitoring improvements"
- "Platform Integration Validation - Verify foundation supports upper layers"
- "Developer Experience Analysis - Foundation impact on developer workflows"
- "Disaster Recovery Testing - Foundation resilience validation"
- "BMAD Workflow Integration - Cross-agent support verification"
- "Finalize and Proceed to Container Platform"
- 'Platform Layer Security Hardening - Additional security controls and compliance validation'
- 'Performance Optimization - Network and resource optimization'
- 'Operational Excellence Enhancement - Automation and monitoring improvements'
- 'Platform Integration Validation - Verify foundation supports upper layers'
- 'Developer Experience Analysis - Foundation impact on developer workflows'
- 'Disaster Recovery Testing - Foundation resilience validation'
- 'BMAD Workflow Integration - Cross-agent support verification'
- 'Finalize and Proceed to Container Platform'
sections:
- id: initial-setup
instruction: |
Initial Setup
1. Replace {{project_name}} with the actual project name throughout the document
2. Gather and review required inputs:
- **Infrastructure Architecture Document** (Primary input - REQUIRED)
@@ -991,10 +989,10 @@ sections:
- Technology Stack Document
- Infrastructure Checklist
- NOTE: If Infrastructure Architecture Document is missing, HALT and request: "I need the Infrastructure Architecture Document to proceed with platform implementation. This document defines the infrastructure design that we'll be implementing."
3. Validate that the infrastructure architecture has been reviewed and approved
4. <critical_rule>All platform implementation must align with the approved infrastructure architecture. Any deviations require architect approval.</critical_rule>
Output file location: `docs/platform-infrastructure/platform-implementation.md`
- id: executive-summary
@@ -1067,7 +1065,7 @@ sections:
# Example Terraform for VPC setup
module "vpc" {
source = "./modules/vpc"
cidr_block = "{{vpc_cidr}}"
availability_zones = {{availability_zones}}
public_subnets = {{public_subnets}}
@@ -1462,7 +1460,7 @@ sections:
// K6 Load Test Example
import http from 'k6/http';
import { check } from 'k6';
export let options = {
stages: [
{ duration: '5m', target: {{target_users}} },
@@ -1576,7 +1574,7 @@ sections:
instruction: Final Review - Ensure all platform layers are properly implemented, integrated, and documented. Verify that the implementation fully supports the BMAD methodology and all agent workflows. Confirm successful validation against the infrastructure checklist.
content: |
---
_Platform Version: 1.0_
_Implementation Date: {{implementation_date}}_
_Next Review: {{review_date}}_

3254
dist/teams/team-all.txt vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -65,7 +65,7 @@ See [Expansion Packs Guide](../docs/expansion-packs.md) for detailed examples an
### Template Rules
Templates follow the [BMad Document Template](common/utils/bmad-doc-template.md) specification using YAML format:
Templates follow the [BMad Document Template](../common/utils/bmad-doc-template.md) specification using YAML format:
1. **Structure**: Templates are defined in YAML with clear metadata, workflow configuration, and section hierarchy
2. **Separation of Concerns**: Instructions for LLMs are in `instruction` fields, separate from content

View File

@@ -0,0 +1,248 @@
# Enhanced IDE Development Workflow
This is a simple step-by-step guide to help you efficiently manage your development workflow using the BMad Method. The workflow integrates the Test Architect (QA agent) throughout the development lifecycle to ensure quality, prevent regressions, and maintain high standards. Refer to the **[<ins>User Guide</ins>](user-guide.md)** for any scenario that is not covered here.
## Create New Branch
1. **Start new branch**
## Story Creation (Scrum Master)
1. **Start new chat/conversation**
2. **Load SM agent**
3. **Execute**: `*draft` (runs create-next-story task)
4. **Review generated story** in `docs/stories/`
5. **Update status**: Change from "Draft" to "Approved"
## Story Implementation (Developer)
1. **Start new chat/conversation**
2. **Load Dev agent**
3. **Execute**: `*develop-story {selected-story}` (runs execute-checklist task)
4. **Review generated report** in `{selected-story}`
## Test Architect Integration Throughout Workflow
The Test Architect (Quinn) provides comprehensive quality assurance throughout the development lifecycle. Here's how to leverage each capability at the right time.
**Command Aliases:** Documentation uses short forms (`*risk`, `*design`, `*nfr`, `*trace`) for the full commands (`*risk-profile`, `*test-design`, `*nfr-assess`, `*trace-requirements`).
### Quick Command Reference
| **Stage** | **Command** | **Purpose** | **Output** | **Priority** |
| ------------------------ | ----------- | --------------------------------------- | --------------------------------------------------------------- | --------------------------- |
| **After Story Approval** | `*risk` | Identify integration & regression risks | `docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md` | High for complex/brownfield |
| | `*design` | Create test strategy for dev | `docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md` | High for new features |
| **During Development** | `*trace` | Verify test coverage | `docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md` | Medium |
| | `*nfr` | Validate quality attributes | `docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md` | High for critical features |
| **After Development** | `*review` | Comprehensive assessment | QA Results in story + `docs/qa/gates/{epic}.{story}-{slug}.yml` | **Required** |
| **Post-Review** | `*gate` | Update quality decision | Updated `docs/qa/gates/{epic}.{story}-{slug}.yml` | As needed |
### Stage 1: After Story Creation (Before Dev Starts)
**RECOMMENDED - Set Developer Up for Success:**
```bash
# 1. RISK ASSESSMENT (Run FIRST for complex stories)
@qa *risk {approved-story}
# Identifies:
# - Technical debt impact
# - Integration complexity
# - Regression potential (1-9 scoring)
# - Mitigation strategies
# Critical for: Brownfield, API changes, data migrations
# 2. TEST DESIGN (Run SECOND to guide implementation)
@qa *design {approved-story}
# Provides:
# - Test scenarios per acceptance criterion
# - Test level recommendations (unit/integration/E2E)
# - Risk-based priorities (P0/P1/P2)
# - Test data requirements
# Share with Dev: Include in story comments or attach to ticket
```
### Stage 2: During Development (Mid-Implementation Checkpoints)
**Developer Self-Service Quality Checks:**
```bash
# 3. REQUIREMENTS TRACING (Verify coverage mid-development)
@qa *trace {story-in-progress}
# Validates:
# - All acceptance criteria have tests
# - No missing test scenarios
# - Appropriate test levels
# - Given-When-Then documentation clarity
# Run when: After writing initial tests
# 4. NFR VALIDATION (Check quality attributes)
@qa *nfr {story-in-progress}
# Assesses:
# - Security: Authentication, authorization, data protection
# - Performance: Response times, resource usage
# - Reliability: Error handling, recovery
# - Maintainability: Code quality, documentation
# Run when: Before marking "Ready for Review"
```
### Stage 3: Story Review (Quality Gate Assessment)
**REQUIRED - Comprehensive Test Architecture Review:**
**Prerequisite:** All tests green locally; lint & type checks pass.
```bash
# 5. FULL REVIEW (Standard review process)
@qa *review {completed-story}
```
**What Happens During Review:**
1. **Deep Code Analysis**
- Architecture pattern compliance
- Code quality and maintainability
- Security vulnerability scanning
- Performance bottleneck detection
2. **Active Refactoring**
- Improves code directly when safe
- Fixes obvious issues immediately
- Suggests complex refactoring for dev
3. **Test Validation**
- Coverage at all levels (unit/integration/E2E)
- Test quality (no flaky tests, proper assertions)
- Regression test adequacy
4. **Gate Decision**
- Creates: `docs/qa/gates/{epic}.{story}-{slug}.yml`
- Adds: QA Results section to story file
- Status: PASS/CONCERNS/FAIL/WAIVED
### Stage 4: Post-Review (After Addressing Issues)
**Update Gate Status After Fixes:**
```bash
# 6. GATE UPDATE (Document final decision)
@qa *gate {reviewed-story}
# Updates: Quality gate with new status
# Use when: After addressing review feedback
# Documents: What was fixed, what was waived
```
### Understanding Gate Decisions
| **Status** | **Meaning** | **Action Required** | **Can Proceed?** |
| ------------ | -------------------------------------------- | ----------------------- | ---------------- |
| **PASS** | All critical requirements met | None | ✅ Yes |
| **CONCERNS** | Non-critical issues found | Team review recommended | ⚠️ With caution |
| **FAIL** | Critical issues (security, missing P0 tests) | Must fix | ❌ No |
| **WAIVED** | Issues acknowledged and accepted | Document reasoning | ✅ With approval |
### Risk-Based Testing Strategy
The Test Architect uses risk scoring to prioritize testing:
| **Risk Score** | **Calculation** | **Testing Priority** | **Gate Impact** |
| -------------- | ------------------------------ | ------------------------- | ------------------------ |
| **9** | High probability × High impact | P0 - Must test thoroughly | FAIL if untested |
| **6** | Medium-high combinations | P1 - Should test well | CONCERNS if gaps |
| **4** | Medium combinations | P1 - Should test | CONCERNS if notable gaps |
| **2-3** | Low-medium combinations | P2 - Nice to have | Note in review |
| **1** | Minimal risk | P2 - Minimal | Note in review |
### Special Situations & Best Practices
#### High-Risk or Brownfield Stories
```bash
# ALWAYS run this sequence:
@qa *risk {story} # First - identify dangers
@qa *design {story} # Second - plan defense
# Then during dev:
@qa *trace {story} # Verify regression coverage
@qa *nfr {story} # Check performance impact
# Finally:
@qa *review {story} # Deep integration analysis
```
#### Complex Integrations
- Run `*trace` multiple times during development
- Focus on integration test coverage
- Use `*nfr` to validate cross-system performance
- Review with extra attention to API contracts
#### Performance-Critical Features
- Run `*nfr` early and often (not just at review)
- Establish performance baselines before changes
- Document acceptable performance degradation
- Consider load testing requirements in `*design`
### Test Quality Standards Enforced
Quinn ensures all tests meet these standards:
- **No Flaky Tests**: Proper async handling, explicit waits
- **No Hard Waits**: Dynamic strategies only (polling, events)
- **Stateless**: Tests run independently and in parallel
- **Self-Cleaning**: Tests manage their own test data
- **Appropriate Levels**: Unit for logic, integration for interactions, E2E for journeys
- **Clear Assertions**: Keep assertions in tests, not buried in helpers
### Documentation & Audit Trail
All Test Architect activities create permanent records:
- **Assessment Reports**: Timestamped analysis in `docs/qa/assessments/`
- **Gate Files**: Decision records in `docs/qa/gates/`
- **Story Updates**: QA Results sections in story files
- **Traceability**: Requirements to test mapping maintained
## Commit Changes and Push
1. **Commit changes**
2. **Push to remote**
## Complete Development Cycle Flow
### The Full Workflow with Test Architect
1. **SM**: Create next story → Review → Approve
2. **QA (Optional)**: Risk assessment (`*risk`) → Test design (`*design`)
3. **Dev**: Implement story → Write tests → Complete
4. **QA (Optional)**: Mid-dev checks (`*trace`, `*nfr`)
5. **Dev**: Mark Ready for Review
6. **QA (Required)**: Review story (`*review`) → Gate decision
7. **Dev (If needed)**: Address issues
8. **QA (If needed)**: Update gate (`*gate`)
9. **Commit**: All changes
10. **Push**: To remote
11. **Continue**: Until all features implemented
### Quick Decision Guide
**Should I run Test Architect commands?**
| **Scenario** | **Before Dev** | **During Dev** | **After Dev** |
| ------------------------ | ------------------------------- | ---------------------------- | ---------------------------- |
| **Simple bug fix** | Optional | Optional | Required `*review` |
| **New feature** | Recommended `*risk`, `*design` | Optional `*trace` | Required `*review` |
| **Brownfield change** | **Required** `*risk`, `*design` | Recommended `*trace`, `*nfr` | Required `*review` |
| **API modification** | **Required** `*risk`, `*design` | **Required** `*trace` | Required `*review` |
| **Performance-critical** | Recommended `*design` | **Required** `*nfr` | Required `*review` |
| **Data migration** | **Required** `*risk`, `*design` | **Required** `*trace` | Required `*review` + `*gate` |
### Success Metrics
The Test Architect helps achieve:
- **Zero regression defects** in production
- **100% requirements coverage** with tests
- **Clear quality gates** for go/no-go decisions
- **Documented risk acceptance** for technical debt
- **Consistent test quality** across the team
- **Shift-left testing** with early risk identification

504
docs/user-guide.md Normal file
View File

@@ -0,0 +1,504 @@
# BMad Method — User Guide
This guide will help you understand and effectively use the BMad Method for agile AI-driven planning and development.
## The BMad Plan and Execute Workflow
First, here is the full standard Greenfield Planning + Execution Workflow. Brownfield is very similar, but it's suggested to understand this greenfield first, even if on a simple project before tackling a brownfield project. The BMad Method needs to be installed to the root of your new project folder. For the planning phase, you can optionally perform it with powerful web agents, potentially resulting in higher quality results at a fraction of the cost it would take to complete if providing your own API key or credits in some Agentic tools. For planning, powerful thinking models and larger context - along with working as a partner with the agents will net the best results.
If you are going to use the BMad Method with a Brownfield project (an existing project), review **[Working in the Brownfield](./working-in-the-brownfield.md)**.
If the diagrams below don't render, install Markdown All in One along with the Markdown Preview Mermaid Support plugins to VSCode (or one of the forked clones). With these plugins, if you right click on the tab when open, there should be an Open Preview option, or check the IDE documentation.
### The Planning Workflow (Web UI or Powerful IDE Agents)
Before development begins, BMad follows a structured planning workflow that's ideally done in web UI for cost efficiency:
```mermaid
graph TD
A["Start: Project Idea"] --> B{"Optional: Analyst Research"}
B -->|Yes| C["Analyst: Brainstorming (Optional)"]
B -->|No| G{"Project Brief Available?"}
C --> C2["Analyst: Market Research (Optional)"]
C2 --> C3["Analyst: Competitor Analysis (Optional)"]
C3 --> D["Analyst: Create Project Brief"]
D --> G
G -->|Yes| E["PM: Create PRD from Brief (Fast Track)"]
G -->|No| E2["PM: Interactive PRD Creation (More Questions)"]
E --> F["PRD Created with FRs, NFRs, Epics & Stories"]
E2 --> F
F --> F2{"UX Required?"}
F2 -->|Yes| F3["UX Expert: Create Front End Spec"]
F2 -->|No| H["Architect: Create Architecture from PRD"]
F3 --> F4["UX Expert: Generate UI Prompt for Lovable/V0 (Optional)"]
F4 --> H2["Architect: Create Architecture from PRD + UX Spec"]
H --> Q{"Early Test Strategy? (Optional)"}
H2 --> Q
Q -->|Yes| R["QA: Early Test Architecture Input on High-Risk Areas"]
Q -->|No| I
R --> I["PO: Run Master Checklist"]
I --> J{"Documents Aligned?"}
J -->|Yes| K["Planning Complete"]
J -->|No| L["PO: Update Epics & Stories"]
L --> M["Update PRD/Architecture as needed"]
M --> I
K --> N["📁 Switch to IDE (If in a Web Agent Platform)"]
N --> O["PO: Shard Documents"]
O --> P["Ready for SM/Dev Cycle"]
style A fill:#f5f5f5,color:#000
style B fill:#e3f2fd,color:#000
style C fill:#e8f5e9,color:#000
style C2 fill:#e8f5e9,color:#000
style C3 fill:#e8f5e9,color:#000
style D fill:#e8f5e9,color:#000
style E fill:#fff3e0,color:#000
style E2 fill:#fff3e0,color:#000
style F fill:#fff3e0,color:#000
style F2 fill:#e3f2fd,color:#000
style F3 fill:#e1f5fe,color:#000
style F4 fill:#e1f5fe,color:#000
style G fill:#e3f2fd,color:#000
style H fill:#f3e5f5,color:#000
style H2 fill:#f3e5f5,color:#000
style Q fill:#e3f2fd,color:#000
style R fill:#ffd54f,color:#000
style I fill:#f9ab00,color:#fff
style J fill:#e3f2fd,color:#000
style K fill:#34a853,color:#fff
style L fill:#f9ab00,color:#fff
style M fill:#fff3e0,color:#000
style N fill:#1a73e8,color:#fff
style O fill:#f9ab00,color:#fff
style P fill:#34a853,color:#fff
```
#### Web UI to IDE Transition
**Critical Transition Point**: Once the PO confirms document alignment, you must switch from web UI to IDE to begin the development workflow:
1. **Copy Documents to Project**: Ensure `docs/prd.md` and `docs/architecture.md` are in your project's docs folder (or a custom location you can specify during installation)
2. **Switch to IDE**: Open your project in your preferred Agentic IDE
3. **Document Sharding**: Use the PO agent to shard the PRD and then the Architecture
4. **Begin Development**: Start the Core Development Cycle that follows
#### Planning Artifacts (Standard Paths)
```text
PRD → docs/prd.md
Architecture → docs/architecture.md
Sharded Epics → docs/epics/
Sharded Stories → docs/stories/
QA Assessments → docs/qa/assessments/
QA Gates → docs/qa/gates/
```
### The Core Development Cycle (IDE)
Once planning is complete and documents are sharded, BMad follows a structured development workflow:
```mermaid
graph TD
A["Development Phase Start"] --> B["SM: Reviews Previous Story Dev/QA Notes"]
B --> B2["SM: Drafts Next Story from Sharded Epic + Architecture"]
B2 --> S{"High-Risk Story? (Optional)"}
S -->|Yes| T["QA: *risk + *design on Draft Story"]
S -->|No| B3
T --> U["Test Strategy & Risk Profile Created"]
U --> B3{"PO: Validate Story Draft (Optional)"}
B3 -->|Validation Requested| B4["PO: Validate Story Against Artifacts"]
B3 -->|Skip Validation| C{"User Approval"}
B4 --> C
C -->|Approved| D["Dev: Sequential Task Execution"]
C -->|Needs Changes| B2
D --> E["Dev: Implement Tasks + Tests"]
E --> V{"Mid-Dev QA Check? (Optional)"}
V -->|Yes| W["QA: *trace or *nfr for Early Validation"]
V -->|No| F
W --> X["Dev: Address Coverage/NFR Gaps"]
X --> F["Dev: Run All Validations"]
F --> G["Dev: Mark Ready for Review + Add Notes"]
G --> H{"User Verification"}
H -->|Request QA Review| I["QA: Test Architect Review + Quality Gate"]
H -->|Approve Without QA| M["IMPORTANT: Verify All Regression Tests and Linting are Passing"]
I --> J["QA: Test Architecture Analysis + Active Refactoring"]
J --> L{"QA Decision"}
L -->|Needs Dev Work| D
L -->|Approved| M
H -->|Needs Fixes| D
M --> N["IMPORTANT: COMMIT YOUR CHANGES BEFORE PROCEEDING!"]
N --> Y{"Gate Update Needed?"}
Y -->|Yes| Z["QA: *gate to Update Status"]
Y -->|No| K
Z --> K["Mark Story as Done"]
K --> B
style A fill:#f5f5f5,color:#000
style B fill:#e8f5e9,color:#000
style B2 fill:#e8f5e9,color:#000
style S fill:#e3f2fd,color:#000
style T fill:#ffd54f,color:#000
style U fill:#ffd54f,color:#000
style B3 fill:#e3f2fd,color:#000
style B4 fill:#fce4ec,color:#000
style C fill:#e3f2fd,color:#000
style D fill:#e3f2fd,color:#000
style E fill:#e3f2fd,color:#000
style V fill:#e3f2fd,color:#000
style W fill:#ffd54f,color:#000
style X fill:#e3f2fd,color:#000
style F fill:#e3f2fd,color:#000
style G fill:#e3f2fd,color:#000
style H fill:#e3f2fd,color:#000
style I fill:#f9ab00,color:#fff
style J fill:#ffd54f,color:#000
style K fill:#34a853,color:#fff
style L fill:#e3f2fd,color:#000
style M fill:#ff5722,color:#fff
style N fill:#d32f2f,color:#fff
style Y fill:#e3f2fd,color:#000
style Z fill:#ffd54f,color:#000
```
## Prerequisites
Before installing BMad Method, ensure you have:
- **Node.js** ≥ 18, **npm** ≥ 9
- **Git** installed and configured
- **(Optional)** VS Code with "Markdown All in One" + "Markdown Preview Mermaid Support" extensions
## Installation
### Optional
If you want to do the planning on the web with Claude (Sonnet 4 or Opus), Gemini Gem (2.5 Pro), or Custom GPTs:
1. Navigate to `dist/teams/`
2. Copy `team-fullstack.txt`
3. Create new Gemini Gem or CustomGPT
4. Upload file with instructions: "Your critical operating instructions are attached, do not break character as directed"
5. Type `/help` to see available commands
### IDE Project Setup
```bash
# Interactive installation (recommended)
npx bmad-method install
```
## Special Agents
There are two BMad agents — in the future they'll be consolidated into a single BMad-Master.
### BMad-Master
This agent can do any task or command that all other agents can do, aside from actual story implementation. Additionally, this agent can help explain the BMad Method when on the web by accessing the knowledge base and explaining anything to you about the process.
If you don't want to bother switching between different agents aside from the dev, this is the agent for you. Just remember that as the context grows, the performance of the agent degrades, therefore it is important to instruct the agent to compact the conversation and start a new conversation with the compacted conversation as the initial message. Do this often, preferably after each story is implemented.
### BMad-Orchestrator
This agent should NOT be used within the IDE, it is a heavyweight, special-purpose agent that utilizes a lot of context and can morph into any other agent. This exists solely to facilitate the teams within the web bundles. If you use a web bundle you will be greeted by the BMad Orchestrator.
### How Agents Work
#### Dependencies System
Each agent has a YAML section that defines its dependencies:
```yaml
dependencies:
templates:
- prd-template.md
- user-story-template.md
tasks:
- create-doc.md
- shard-doc.md
data:
- bmad-kb.md
```
**Key Points:**
- Agents only load resources they need (lean context)
- Dependencies are automatically resolved during bundling
- Resources are shared across agents to maintain consistency
#### Agent Interaction
**In IDE:**
```bash
# Some IDEs, like Cursor or Windsurf for example, utilize manual rules so interaction is done with the '@' symbol
@pm Create a PRD for a task management app
@architect Design the system architecture
@dev Implement the user authentication
# Some IDEs, like Claude Code, use slash commands instead
/pm Create user stories
/dev Fix the login bug
```
#### Interactive Modes
- **Incremental Mode**: Step-by-step with user input
- **YOLO Mode**: Rapid generation with minimal interaction
## IDE Integration
### IDE Best Practices
- **Context Management**: Keep relevant files only in context, keep files as lean and focused as necessary
- **Agent Selection**: Use appropriate agent for task
- **Iterative Development**: Work in small, focused tasks
- **File Organization**: Maintain clean project structure
- **Commit Regularly**: Save your work frequently
## The Test Architect (QA Agent)
### Overview
The QA agent in BMad is not just a "senior developer reviewer" - it's a **Test Architect** with deep expertise in test strategy, quality gates, and risk-based testing. Named Quinn, this agent provides advisory authority on quality matters while actively improving code when safe to do so.
#### Quick Start (Essential Commands)
```bash
@qa *risk {story} # Assess risks before development
@qa *design {story} # Create test strategy
@qa *trace {story} # Verify test coverage during dev
@qa *nfr {story} # Check quality attributes
@qa *review {story} # Full assessment → writes gate
```
#### Command Aliases (Test Architect)
The documentation uses short forms for convenience. Both styles are valid:
```text
*risk → *risk-profile
*design → *test-design
*nfr → *nfr-assess
*trace → *trace-requirements (or just *trace)
*review → *review
*gate → *gate
```
### Core Capabilities
#### 1. Risk Profiling (`*risk`)
**When:** After story draft, before development begins (earliest intervention point)
Identifies and assesses implementation risks:
- **Categories**: Technical, Security, Performance, Data, Business, Operational
- **Scoring**: Probability × Impact analysis (1-9 scale)
- **Mitigation**: Specific strategies for each identified risk
- **Gate Impact**: Risks ≥9 trigger FAIL, ≥6 trigger CONCERNS (see `tasks/risk-profile.md` for authoritative rules)
#### 2. Test Design (`*design`)
**When:** After story draft, before development begins (guides what tests to write)
Creates comprehensive test strategies including:
- Test scenarios for each acceptance criterion
- Appropriate test level recommendations (unit vs integration vs E2E)
- Risk-based prioritization (P0/P1/P2)
- Test data requirements and mock strategies
- Execution strategies for CI/CD integration
**Example output:**
```yaml
test_summary:
total: 24
by_level:
unit: 15
integration: 7
e2e: 2
by_priority:
P0: 8 # Must have - linked to critical risks
P1: 10 # Should have - medium risks
P2: 6 # Nice to have - low risks
```
#### 3. Requirements Tracing (`*trace`)
**When:** During development (mid-implementation checkpoint)
Maps requirements to test coverage:
- Documents which tests validate each acceptance criterion
- Uses Given-When-Then for clarity (documentation only, not BDD code)
- Identifies coverage gaps with severity ratings
- Creates traceability matrix for audit purposes
#### 4. NFR Assessment (`*nfr`)
**When:** During development or early review (validate quality attributes)
Validates non-functional requirements:
- **Core Four**: Security, Performance, Reliability, Maintainability
- **Evidence-Based**: Looks for actual implementation proof
- **Gate Integration**: NFR failures directly impact quality gates
#### 5. Comprehensive Test Architecture Review (`*review`)
**When:** After development complete, story marked "Ready for Review"
When you run `@qa *review {story}`, Quinn performs:
- **Requirements Traceability**: Maps every acceptance criterion to its validating tests
- **Test Level Analysis**: Ensures appropriate testing at unit, integration, and E2E levels
- **Coverage Assessment**: Identifies gaps and redundant test coverage
- **Active Refactoring**: Improves code quality directly when safe
- **Quality Gate Decision**: Issues PASS/CONCERNS/FAIL status based on findings
#### 6. Quality Gates (`*gate`)
**When:** After review fixes or when gate status needs updating
Manages quality gate decisions:
- **Deterministic Rules**: Clear criteria for PASS/CONCERNS/FAIL
- **Parallel Authority**: QA owns gate files in `docs/qa/gates/`
- **Advisory Nature**: Provides recommendations, not blocks
- **Waiver Support**: Documents accepted risks when needed
**Note:** Gates are advisory; teams choose their quality bar. WAIVED requires reason, approver, and expiry date. See `templates/qa-gate-tmpl.yaml` for schema and `tasks/review-story.md` (gate rules) and `tasks/risk-profile.md` for scoring.
### Working with the Test Architect
#### Integration with BMad Workflow
The Test Architect provides value throughout the entire development lifecycle. Here's when and how to leverage each capability:
| **Stage** | **Command** | **When to Use** | **Value** | **Output** |
| ------------------ | ----------- | ----------------------- | -------------------------- | -------------------------------------------------------------- |
| **Story Drafting** | `*risk` | After SM drafts story | Identify pitfalls early | `docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md` |
| | `*design` | After risk assessment | Guide dev on test strategy | `docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md` |
| **Development** | `*trace` | Mid-implementation | Verify test coverage | `docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md` |
| | `*nfr` | While building features | Catch quality issues early | `docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md` |
| **Review** | `*review` | Story marked complete | Full quality assessment | QA Results in story + gate file |
| **Post-Review** | `*gate` | After fixing issues | Update quality decision | Updated `docs/qa/gates/{epic}.{story}-{slug}.yml` |
#### Example Commands
```bash
# Planning Stage - Run these BEFORE development starts
@qa *risk {draft-story} # What could go wrong?
@qa *design {draft-story} # What tests should we write?
# Development Stage - Run these DURING coding
@qa *trace {story} # Are we testing everything?
@qa *nfr {story} # Are we meeting quality standards?
# Review Stage - Run when development complete
@qa *review {story} # Comprehensive assessment + refactoring
# Post-Review - Run after addressing issues
@qa *gate {story} # Update gate status
```
### Quality Standards Enforced
Quinn enforces these test quality principles:
- **No Flaky Tests**: Ensures reliability through proper async handling
- **No Hard Waits**: Dynamic waiting strategies only
- **Stateless & Parallel-Safe**: Tests run independently
- **Self-Cleaning**: Tests manage their own test data
- **Appropriate Test Levels**: Unit for logic, integration for interactions, E2E for journeys
- **Explicit Assertions**: Keep assertions in tests, not helpers
### Gate Status Meanings
- **PASS**: All critical requirements met, no blocking issues
- **CONCERNS**: Non-critical issues found, team should review
- **FAIL**: Critical issues that should be addressed (security risks, missing P0 tests)
- **WAIVED**: Issues acknowledged but explicitly accepted by team
### Special Situations
**High-Risk Stories:**
- Always run `*risk` and `*design` before development starts
- Consider mid-development `*trace` and `*nfr` checkpoints
**Complex Integrations:**
- Run `*trace` during development to ensure all integration points tested
- Follow up with `*nfr` to validate performance across integrations
**Performance-Critical:**
- Run `*nfr` early and often during development
- Don't wait until review to discover performance issues
**Brownfield/Legacy Code:**
- Start with `*risk` to identify regression dangers
- Use `*review` with extra focus on backward compatibility
### Best Practices
- **Early Engagement**: Run `*design` and `*risk` during story drafting
- **Risk-Based Focus**: Let risk scores drive test prioritization
- **Iterative Improvement**: Use QA feedback to improve future stories
- **Gate Transparency**: Share gate decisions with the team
- **Continuous Learning**: QA documents patterns for team knowledge sharing
- **Brownfield Care**: Pay extra attention to regression risks in existing systems
### Output Paths Reference
Quick reference for where Test Architect outputs are stored:
```text
*risk-profile → docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
*test-design → docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
*trace → docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md
*nfr-assess → docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
*review → QA Results section in story + gate file reference
*gate → docs/qa/gates/{epic}.{story}-{slug}.yml
```
## Technical Preferences System
BMad includes a personalization system through the `technical-preferences.md` file located in `.bmad-core/data/` - this can help bias the PM and Architect to recommend your preferences for design patterns, technology selection, or anything else you would like to put in here.
### Using with Web Bundles
When creating custom web bundles or uploading to AI platforms, include your `technical-preferences.md` content to ensure agents have your preferences from the start of any conversation.
## Core Configuration
The `bmad-core/core-config.yaml` file is a critical config that enables BMad to work seamlessly with differing project structures, more options will be made available in the future. Currently the most important is the devLoadAlwaysFiles list section in the yaml.
### Developer Context Files
Define which files the dev agent should always load:
```yaml
devLoadAlwaysFiles:
- docs/architecture/coding-standards.md
- docs/architecture/tech-stack.md
- docs/architecture/project-structure.md
```
You will want to verify from sharding your architecture that these documents exist, that they are as lean as possible, and contain exactly the information you want your dev agent to ALWAYS load into its context. These are the rules the agent will follow.
As your project grows and the code starts to build consistent patterns, coding standards should be reduced to include only the standards the agent still needs enforced. The agent will look at surrounding code in files to infer the coding standards that are relevant to the current task.
## Getting Help
- **Discord Community**: [Join Discord](https://discord.gg/gk8jAdXWmj)
- **GitHub Issues**: [Report bugs](https://github.com/bmadcode/bmad-method/issues)
- **Documentation**: [Browse docs](https://github.com/bmadcode/bmad-method/docs)
- **YouTube**: [BMadCode Channel](https://www.youtube.com/@BMadCode)
## Conclusion
Remember: BMad is designed to enhance your development process, not replace your expertise. Use it as a powerful tool to accelerate your projects while maintaining control over design decisions and implementation details.

View File

@@ -0,0 +1,597 @@
# Working in the Brownfield: A Complete Guide
> **HIGHLY RECOMMENDED: Use Gemini Web or Gemini CLI for Brownfield Documentation Generation!**
>
> Gemini Web's 1M+ token context window or Gemini CLI (when it's working) can analyze your ENTIRE codebase, or critical sections of it, all at once (obviously within reason):
>
> - Upload via GitHub URL or use gemini cli in the project folder
> - If working in the web: use `npx bmad-method flatten` to flatten your project into a single file, then upload that file to your web agent.
## What is Brownfield Development?
Brownfield development refers to adding features, fixing bugs, or modernizing existing software projects. Unlike greenfield (new) projects, brownfield work requires understanding existing code, respecting constraints, and ensuring new changes integrate seamlessly without breaking existing functionality.
## When to Use BMad for Brownfield
- Add significant new features to existing applications
- Modernize legacy codebases
- Integrate new technologies or services
- Refactor complex systems
- Fix bugs that require architectural understanding
- Document undocumented systems
## When NOT to use a Brownfield Flow
If you have just completed an MVP with BMad, and you want to continue with post-MVP, its easier to just talk to the PM and ask it to work with you to create a new epic to add into the PRD, shard out the epic, update any architecture documents with the architect, and just go from there.
## The Complete Brownfield Workflow
1. **Follow the [<ins>User Guide - Installation</ins>](user-guide.md#installation) steps to setup your agent in the web.**
2. **Generate a 'flattened' single file of your entire codebase** run: `npx bmad-method flatten`
### Choose Your Approach
#### Approach A: PRD-First (Recommended if adding very large and complex new features, single or multiple epics or massive changes)
**Best for**: Large codebases, monorepos, or when you know exactly what you want to build
1. **Create PRD First** to define requirements
2. **Document only relevant areas** based on PRD needs
3. **More efficient** - avoids documenting unused code
#### Approach B: Document-First (Good for Smaller Projects)
**Best for**: Smaller codebases, unknown systems, or exploratory changes
1. **Document entire system** first
2. **Create PRD** with full context
3. **More thorough** - captures everything
### Approach A: PRD-First Workflow (Recommended)
#### Phase 1: Define Requirements First
**In Gemini Web (with your flattened-codebase.xml uploaded):**
```bash
@pm
*create-brownfield-prd
```
The PM will:
- **Ask about your enhancement** requirements
- **Explore the codebase** to understand current state
- **Identify affected areas** that need documentation
- **Create focused PRD** with clear scope
**Key Advantage**: The PRD identifies which parts of your monorepo/large codebase actually need documentation!
#### Phase 2: Focused Documentation
**Still in Gemini Web, now with PRD context:**
```bash
@architect
*document-project
```
The architect will:
- **Ask about your focus** if no PRD was provided
- **Offer options**: Create PRD, provide requirements, or describe the enhancement
- **Reference the PRD/description** to understand scope
- **Focus on relevant modules** identified in PRD or your description
- **Skip unrelated areas** to keep docs lean
- **Generate ONE architecture document** for all environments
The architect creates:
- **One comprehensive architecture document** following fullstack-architecture template
- **Covers all system aspects** in a single file
- **Easy to copy and save** as `docs/architecture.md`
- **Can be sharded later** in IDE if desired
For example, if you say "Add payment processing to user service":
- Documents only: user service, API endpoints, database schemas, payment integrations
- Creates focused source tree showing only payment-related code paths
- Skips: admin panels, reporting modules, unrelated microservices
### Approach B: Document-First Workflow
#### Phase 1: Document the Existing System
**Best Approach - Gemini Web with 1M+ Context**:
1. **Go to Gemini Web** (gemini.google.com)
2. **Upload your project**:
- **Option A**: Paste your GitHub repository URL directly
- **Option B**: Upload your flattened-codebase.xml file
3. **Load the architect agent**: Upload `dist/agents/architect.txt`
4. **Run documentation**: Type `*document-project`
The architect will generate comprehensive documentation of everything.
#### Phase 2: Plan Your Enhancement
##### Option A: Full Brownfield Workflow (Recommended for Major Changes)
**1. Create Brownfield PRD**:
```bash
@pm
*create-brownfield-prd
```
The PM agent will:
- **Analyze existing documentation** from Phase 1
- **Request specific enhancement details** from you
- **Assess complexity** and recommend approach
- **Create epic/story structure** for the enhancement
- **Identify risks and integration points**
**How PM Agent Gets Project Context**:
- In Gemini Web: Already has full project context from Phase 1 documentation
- In IDE: Will ask "Please provide the path to your existing project documentation"
**Key Prompts You'll Encounter**:
- "What specific enhancement or feature do you want to add?"
- "Are there any existing systems or APIs this needs to integrate with?"
- "What are the critical constraints we must respect?"
- "What is your timeline and team size?"
**2. Create Brownfield Architecture**:
```bash
@architect
*create-brownfield-architecture
```
The architect will:
- **Review the brownfield PRD**
- **Design integration strategy**
- **Plan migration approach** if needed
- **Identify technical risks**
- **Define compatibility requirements**
##### Option B: Quick Enhancement (For Focused Changes)
**For Single Epic Without Full PRD**:
```bash
@pm
*create-brownfield-epic
```
Use when:
- Enhancement is well-defined and isolated
- Existing documentation is comprehensive
- Changes don't impact multiple systems
- You need quick turnaround
**For Single Story**:
```bash
@pm
*create-brownfield-story
```
Use when:
- Bug fix or tiny feature
- Very isolated change
- No architectural impact
- Clear implementation path
### Phase 3: Validate Planning Artifacts
```bash
@po
*execute-checklist-po
```
The PO ensures:
- Compatibility with existing system
- No breaking changes planned
- Risk mitigation strategies in place
- Clear integration approach
### Phase 4: Save and Shard Documents
1. Save your PRD and Architecture as:
docs/prd.md
docs/architecture.md
(Note: You can optionally prefix with 'brownfield-' if managing multiple versions)
2. Shard your docs:
In your IDE
```bash
@po
shard docs/prd.md
```
```bash
@po
shard docs/architecture.md
```
### Phase 5: Transition to Development
**Follow the [<ins>Enhanced IDE Development Workflow</ins>](enhanced-ide-development-workflow.md)**
## Brownfield Best Practices
### 1. Always Document First
Even if you think you know the codebase:
- Run `document-project` to capture current state
- AI agents need this context
- Discovers undocumented patterns
### 2. Respect Existing Patterns
The brownfield templates specifically look for:
- Current coding conventions
- Existing architectural patterns
- Technology constraints
- Team preferences
### 3. Plan for Gradual Rollout
Brownfield changes should:
- Support feature flags
- Plan rollback strategies
- Include migration scripts
- Maintain backwards compatibility
### 4. Test Integration Thoroughly
#### Why the Test Architect is Critical for Brownfield
In brownfield projects, the Test Architect (Quinn) becomes your safety net against breaking existing functionality. Unlike greenfield where you're building fresh, brownfield requires careful validation that new changes don't destabilize what already works.
#### Brownfield-Specific Testing Challenges
The Test Architect addresses unique brownfield complexities:
| **Challenge** | **How Test Architect Helps** | **Command** |
| --------------------------- | ------------------------------------------------- | ------------------- |
| **Regression Risks** | Identifies which existing features might break | `*risk` |
| **Legacy Dependencies** | Maps integration points and hidden dependencies | `*trace` |
| **Performance Degradation** | Validates no slowdown in existing flows | `*nfr` |
| **Coverage Gaps** | Finds untested legacy code that new changes touch | `*design` |
| **Breaking Changes** | Detects API/contract violations | `*review` |
| **Migration Safety** | Validates data transformations and rollback plans | `*risk` + `*review` |
#### Complete Test Architect Workflow for Brownfield
##### Stage 1: Before Development (Risk & Strategy)
**CRITICAL FOR BROWNFIELD - Run These First:**
```bash
# 1. RISK ASSESSMENT (Run IMMEDIATELY after story creation)
@qa *risk {brownfield-story}
# Identifies: Legacy dependencies, breaking changes, integration points
# Output: docs/qa/assessments/{epic}.{story}-risk-{YYYYMMDD}.md
# Brownfield Focus:
# - Regression probability scoring
# - Affected downstream systems
# - Data migration risks
# - Rollback complexity
# 2. TEST DESIGN (After risk assessment)
@qa *design {brownfield-story}
# Creates: Regression test strategy + new feature tests
# Output: docs/qa/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md
# Brownfield Focus:
# - Existing functionality that needs regression tests
# - Integration test requirements
# - Performance benchmarks to maintain
# - Feature flag test scenarios
```
##### Stage 2: During Development (Continuous Validation)
**Monitor Integration Health While Coding:**
```bash
# 3. REQUIREMENTS TRACING (Mid-development checkpoint)
@qa *trace {brownfield-story}
# Maps: New requirements + existing functionality preservation
# Output: docs/qa/assessments/{epic}.{story}-trace-{YYYYMMDD}.md
# Brownfield Focus:
# - Existing features that must still work
# - New/old feature interactions
# - API contract preservation
# - Missing regression test coverage
# 4. NFR VALIDATION (Before considering "done")
@qa *nfr {brownfield-story}
# Validates: Performance, security, reliability unchanged
# Output: docs/qa/assessments/{epic}.{story}-nfr-{YYYYMMDD}.md
# Brownfield Focus:
# - Performance regression detection
# - Security implications of integrations
# - Backward compatibility validation
# - Load/stress on legacy components
```
##### Stage 3: Code Review (Deep Integration Analysis)
**Comprehensive Brownfield Review:**
```bash
# 5. FULL REVIEW (When development complete)
@qa *review {brownfield-story}
# Performs: Deep analysis + active refactoring
# Outputs:
# - QA Results in story file
# - Gate file: docs/qa/gates/{epic}.{story}-{slug}.yml
```
The review specifically analyzes:
- **API Breaking Changes**: Validates all existing contracts maintained
- **Data Migration Safety**: Checks transformation logic and rollback procedures
- **Performance Regression**: Compares against baseline metrics
- **Integration Points**: Validates all touchpoints with legacy code
- **Feature Flag Logic**: Ensures proper toggle behavior
- **Dependency Impacts**: Maps affected downstream systems
##### Stage 4: Post-Review (Gate Updates)
```bash
# 6. GATE STATUS UPDATE (After addressing issues)
@qa *gate {brownfield-story}
# Updates: Quality gate decision after fixes
# Output: docs/qa/gates/{epic}.{story}-{slug}.yml
# Brownfield Considerations:
# - May WAIVE certain legacy code issues
# - Documents technical debt acceptance
# - Tracks migration progress
```
#### Brownfield-Specific Risk Scoring
The Test Architect uses enhanced risk scoring for brownfield:
| **Risk Category** | **Brownfield Factors** | **Impact on Gate** |
| ---------------------- | ------------------------------------------ | ------------------- |
| **Regression Risk** | Number of integration points × Age of code | Score ≥9 = FAIL |
| **Data Risk** | Migration complexity × Data volume | Score ≥6 = CONCERNS |
| **Performance Risk** | Current load × Added complexity | Score ≥6 = CONCERNS |
| **Compatibility Risk** | API consumers × Contract changes | Score ≥9 = FAIL |
#### Brownfield Testing Standards
Quinn enforces additional standards for brownfield:
- **Regression Test Coverage**: Every touched legacy module needs tests
- **Performance Baselines**: Must maintain or improve current metrics
- **Rollback Procedures**: Every change needs a rollback plan
- **Feature Flags**: All risky changes behind toggles
- **Integration Tests**: Cover all legacy touchpoints
- **Contract Tests**: Validate API compatibility
- **Data Validation**: Migration correctness checks
#### Quick Reference: Brownfield Test Commands
| **Scenario** | **Commands to Run** | **Order** | **Why Critical** |
| --------------------------------- | ---------------------------------------------------- | ---------- | ----------------------------- |
| **Adding Feature to Legacy Code** | `*risk` → `*design` → `*trace` → `*review` | Sequential | Map all dependencies first |
| **API Modification** | `*risk` → `*design` → `*nfr` → `*review` | Sequential | Prevent breaking consumers |
| **Performance-Critical Change** | `*nfr` early and often → `*review` | Continuous | Catch degradation immediately |
| **Data Migration** | `*risk` → `*design` → `*trace` → `*review` → `*gate` | Full cycle | Ensure data integrity |
| **Bug Fix in Complex System** | `*risk` → `*trace` → `*review` | Focused | Prevent side effects |
#### Integration with Brownfield Scenarios
**Scenario-Specific Guidance:**
1. **Legacy Code Modernization**
- Start with `*risk` to map all dependencies
- Use `*design` to plan strangler fig approach
- Run `*trace` frequently to ensure nothing breaks
- `*review` with focus on gradual migration
2. **Adding Features to Monolith**
- `*risk` identifies integration complexity
- `*design` plans isolation strategies
- `*nfr` monitors performance impact
- `*review` validates no monolith degradation
3. **Microservice Extraction**
- `*risk` maps service boundaries
- `*trace` ensures functionality preservation
- `*nfr` validates network overhead acceptable
- `*gate` documents accepted trade-offs
4. **Database Schema Changes**
- `*risk` assesses migration complexity
- `*design` plans backward-compatible approach
- `*trace` maps all affected queries
- `*review` validates migration safety
### 5. Communicate Changes
Document:
- What changed and why
- Migration instructions
- New patterns introduced
- Deprecation notices
## Common Brownfield Scenarios
### Scenario 1: Adding a New Feature
1. Document existing system
2. Create brownfield PRD focusing on integration
3. **Test Architect Early Involvement**:
- Run `@qa *risk` on draft stories to identify integration risks
- Use `@qa *design` to plan regression test strategy
4. Architecture emphasizes compatibility
5. Stories include integration tasks with test requirements
6. **During Development**:
- Developer runs `@qa *trace` to verify coverage
- Use `@qa *nfr` to monitor performance impact
7. **Review Stage**: `@qa *review` validates integration safety
### Scenario 2: Modernizing Legacy Code
1. Extensive documentation phase
2. PRD includes migration strategy
3. **Test Architect Strategy Planning**:
- `@qa *risk` assesses modernization complexity
- `@qa *design` plans parallel testing approach
4. Architecture plans gradual transition (strangler fig pattern)
5. Stories follow incremental modernization with:
- Regression tests for untouched legacy code
- Integration tests for new/old boundaries
- Performance benchmarks at each stage
6. **Continuous Validation**: Run `@qa *trace` after each increment
7. **Gate Management**: Use `@qa *gate` to track technical debt acceptance
### Scenario 3: Bug Fix in Complex System
1. Document relevant subsystems
2. Use `create-brownfield-story` for focused fix
3. **Test Architect Risk Assessment**: Run `@qa *risk` to identify side effect potential
4. Include regression test requirements from `@qa *design` output
5. **During Fix**: Use `@qa *trace` to map affected functionality
6. **Before Commit**: Run `@qa *review` for comprehensive validation
7. Test Architect validates no side effects using:
- Risk profiling for side effect analysis (probability × impact scoring)
- Trace matrix to ensure fix doesn't break related features
- NFR assessment to verify performance/security unchanged
- Gate decision documents fix safety
### Scenario 4: API Integration
1. Document existing API patterns
2. PRD defines integration requirements
3. **Test Architect Contract Analysis**:
- `@qa *risk` identifies breaking change potential
- `@qa *design` creates contract test strategy
4. Architecture ensures consistent patterns
5. **API Testing Focus**:
- Contract tests for backward compatibility
- Integration tests for new endpoints
- Performance tests for added load
6. Stories include API documentation updates
7. **Validation Checkpoints**:
- `@qa *trace` maps all API consumers
- `@qa *nfr` validates response times
- `@qa *review` ensures no breaking changes
8. **Gate Decision**: Document any accepted breaking changes with migration path
## Troubleshooting
### "The AI doesn't understand my codebase"
**Solution**: Re-run `document-project` with more specific paths to critical files
### "Generated plans don't fit our patterns"
**Solution**: Update generated documentation with your specific conventions before planning phase
### "Too much boilerplate for small changes"
**Solution**: Use `create-brownfield-story` instead of full workflow
### "Integration points unclear"
**Solution**: Provide more context during PRD creation, specifically highlighting integration systems
## Quick Reference
### Brownfield-Specific Commands
```bash
# Document existing project
@architect *document-project
# Create enhancement PRD
@pm *create-brownfield-prd
# Create architecture with integration focus
@architect *create-brownfield-architecture
# Quick epic creation
@pm *create-brownfield-epic
# Single story creation
@pm *create-brownfield-story
```
### Test Architect Commands for Brownfield
Note: Short forms shown below. Full commands: `*risk-profile`, `*test-design`, `*nfr-assess`, `*trace-requirements`
```bash
# BEFORE DEVELOPMENT (Planning)
@qa *risk {story} # Assess regression & integration risks
@qa *design {story} # Plan regression + new feature tests
# DURING DEVELOPMENT (Validation)
@qa *trace {story} # Verify coverage of old + new
@qa *nfr {story} # Check performance degradation
# AFTER DEVELOPMENT (Review)
@qa *review {story} # Deep integration analysis
@qa *gate {story} # Update quality decision
```
### Decision Tree
```text
Do you have a large codebase or monorepo?
├─ Yes → PRD-First Approach
│ └─ Create PRD → Document only affected areas
└─ No → Is the codebase well-known to you?
├─ Yes → PRD-First Approach
└─ No → Document-First Approach
Is this a major enhancement affecting multiple systems?
├─ Yes → Full Brownfield Workflow
│ └─ ALWAYS run Test Architect *risk + *design first
└─ No → Is this more than a simple bug fix?
├─ Yes → *create-brownfield-epic
│ └─ Run Test Architect *risk for integration points
└─ No → *create-brownfield-story
└─ Still run *risk if touching critical paths
Does the change touch legacy code?
├─ Yes → Test Architect is MANDATORY
│ ├─ *risk → Identify regression potential
│ ├─ *design → Plan test coverage
│ └─ *review → Validate no breakage
└─ No → Test Architect is RECOMMENDED
└─ *review → Ensure quality standards
```
## Conclusion
Brownfield development with BMad Method provides structure and safety when modifying existing systems. The Test Architect becomes your critical safety net, using risk assessment, regression testing, and continuous validation to ensure new changes don't destabilize existing functionality.
**The Brownfield Success Formula:**
1. **Document First** - Understand what exists
2. **Assess Risk Early** - Use Test Architect `*risk` before coding
3. **Plan Test Strategy** - Design regression + new feature tests
4. **Validate Continuously** - Check integration health during development
5. **Review Comprehensively** - Deep analysis before committing
6. **Gate Decisively** - Document quality decisions
Remember: **In brownfield, the Test Architect isn't optional - it's your insurance policy against breaking production.**

119
eslint.config.mjs Normal file
View File

@@ -0,0 +1,119 @@
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
import nodePlugin from 'eslint-plugin-n';
import unicorn from 'eslint-plugin-unicorn';
import yml from 'eslint-plugin-yml';
export default [
// Global ignores for files/folders that should not be linted
{
ignores: ['dist/**', 'coverage/**', '**/*.min.js'],
},
// Base JavaScript recommended rules
js.configs.recommended,
// Node.js rules
...nodePlugin.configs['flat/mixed-esm-and-cjs'],
// Unicorn rules (modern best practices)
unicorn.configs.recommended,
// YAML linting
...yml.configs['flat/recommended'],
// Place Prettier last to disable conflicting stylistic rules
eslintConfigPrettier,
// Project-specific tweaks
{
rules: {
// Allow console for CLI tools in this repo
'no-console': 'off',
// Enforce .yaml file extension for consistency
'yml/file-extension': [
'error',
{
extension: 'yaml',
caseSensitive: true,
},
],
// Prefer double quotes in YAML wherever quoting is used, but allow the other to avoid escapes
'yml/quotes': [
'error',
{
prefer: 'double',
avoidEscape: true,
},
],
// Relax some Unicorn rules that are too opinionated for this codebase
'unicorn/prevent-abbreviations': 'off',
'unicorn/no-null': 'off',
},
},
// CLI/CommonJS scripts under tools/**
{
files: ['tools/**/*.js'],
rules: {
// Allow CommonJS patterns for Node CLI scripts
'unicorn/prefer-module': 'off',
'unicorn/import-style': 'off',
'unicorn/no-process-exit': 'off',
'n/no-process-exit': 'off',
'unicorn/no-await-expression-member': 'off',
'unicorn/prefer-top-level-await': 'off',
// Avoid failing CI on incidental unused vars in internal scripts
'no-unused-vars': 'off',
// Reduce style-only churn in internal tools
'unicorn/prefer-ternary': 'off',
'unicorn/filename-case': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/consistent-function-scoping': 'off',
'n/no-extraneous-require': 'off',
'n/no-extraneous-import': 'off',
'n/no-unpublished-require': 'off',
'n/no-unpublished-import': 'off',
// Some scripts intentionally use globals provided at runtime
'no-undef': 'off',
// Additional relaxed rules for legacy/internal scripts
'no-useless-catch': 'off',
'unicorn/prefer-number-properties': 'off',
'no-unreachable': 'off',
},
},
// ESLint config file should not be checked for publish-related Node rules
{
files: ['eslint.config.mjs'],
rules: {
'n/no-unpublished-import': 'off',
},
},
// YAML workflow templates allow empty mapping values intentionally
{
files: ['bmad-core/workflows/**/*.yaml'],
rules: {
'yml/no-empty-mapping-value': 'off',
},
},
// GitHub workflow files in this repo may use empty mapping values
{
files: ['.github/workflows/**/*.yaml'],
rules: {
'yml/no-empty-mapping-value': 'off',
},
},
// Other GitHub YAML files may intentionally use empty values and reserved filenames
{
files: ['.github/**/*.yaml'],
rules: {
'yml/no-empty-mapping-value': 'off',
'unicorn/filename-case': 'off',
},
},
];

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 181 KiB

View File

@@ -0,0 +1,13 @@
# 1. Create new Google Cloud Project
gcloud projects create {{PROJECT_ID}} --name="{{COMPANY_NAME}} AI Agent System"
# 2. Set default project
gcloud config set project {{PROJECT_ID}}
# 3. Enable required APIs
gcloud services enable aiplatform.googleapis.com
gcloud services enable storage.googleapis.com
gcloud services enable cloudfunctions.googleapis.com
gcloud services enable run.googleapis.com
gcloud services enable firestore.googleapis.com
gcloud services enable secretmanager.googleapis.com

Some files were not shown because too many files have changed in this diff Show More