Technology Stack & Versions
【免费下载链接】BMAD-METHODBreakthrough Method for Agile Ai Driven Development项目地址: https://gitcode.com/gh_mirrors/bm/BMAD-METHOD
- Node.js 20.x, TypeScript 5.3, React 18.2
- State: Zustand (not Redux)
- Testing: Vitest, Playwright, MSW
- Styling: Tailwind CSS with custom design tokens
### 关键实现规则(Critical Implementation Rules) 记录代理仅凭阅读代码片段很难推导出来的模式与约定: ```markdown ## Critical Implementation Rules **TypeScript Configuration:** - Strict mode enabled — no `any` types without explicit approval - Use `interface` for public APIs, `type` for unions/intersections **Code Organization:** - Components in `/src/components/` with co-located `.test.tsx` - Utilities in `/src/lib/` for reusable pure functions - API calls use the `apiClient` singleton — never fetch directly **Testing Patterns:** - Unit tests focus on business logic, not implementation details - Integration tests use MSW to mock API responses - E2E tests cover critical user journeys only **Framework-Specific:** - All async operations use the `handleError` wrapper for consistent error handling - Feature flags accessed via `featureFlag()` from `@/lib/flags` - New routes follow the file-based routing pattern in `/src/app/`写作原则:聚焦"非显而易见"(non-obvious)的内容——即代理无法从代码片段中推断出来的事项。不要记录放之四海皆准的通用实践(如"使用有意义的变量名"),那是代理的默认行为。
三种创建方式详解
BMAD Method 提供三条创建路径,分别适配不同的项目阶段(核心步骤见 docs/cs/how-to/project-context.md)。
方式 A:手动创建(Manual)
当你能精确说出要文档化的规则时,手动创建最合适。在项目根目录执行:
mkdir -p _bmad-output touch _bmad-output/project-context.md然后填入技术栈与实现规则,完整的骨架文件如下(含 frontmatter 元数据):
--- project_name: 'MyProject' user_name: 'YourName' date: '2026-02-15' sections_completed: ['technology_stack', 'critical_rules'] --- # Project Context for AI Agents ## Technology Stack & Versions - Node.js 20.x, TypeScript 5.3, React 18.2 - State: Zustand - Testing: Vitest, Playwright - Styling: Tailwind CSS ## Critical Implementation Rules **TypeScript:** - Strict mode enabled, no `any` types - Use `interface` for public APIs, `type` for unions **Code Organization:** - Components in `/src/components/` with co-located tests - API calls use `apiClient` singleton — never fetch directly **Testing:** - Unit tests focus on business logic - Integration tests use MSW for API mocking其中 frontmatter 中的sections_completed字段用于声明已完成写入的板块,便于后续 workflow 识别文件状态。
方式 B:架构后生成(Generate After Architecture)
架构设计完成后,在新开的对话中运行:
bmad-generate-project-context该 workflow 会扫描你的架构文档与项目文件,自动生成上下文文件,把 solutioning 阶段做出的决策完整捕获下来。适合在架构完成后"无痛"沉淀决策。
方式 C:存量项目生成(Generate for Existing Projects)
对于已有代码库,同样运行:
bmad-generate-project-context【免费下载链接】BMAD-METHODBreakthrough Method for Agile Ai Driven Development项目地址: https://gitcode.com/gh_mirrors/bm/BMAD-METHOD
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考