From bmad-cowork
This skill activates when the user asks about "architecture extraction", "story context", "dev notes", "source citations", "context bridge", "relevant architecture", or needs guidance on how BMAD extracts and embeds relevant architecture context into story files for developers.
npx claudepluginhub vamfi/vamfi-plugins --plugin bmad-coworkThis skill uses the workspace's default tool permissions.
Architecture documents can span thousands of lines across many files. Developers working on a single story should not need to read 100% of the architecture to be effective. Context extraction solves this by:
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Architecture documents can span thousands of lines across many files. Developers working on a single story should not need to read 100% of the architecture to be effective. Context extraction solves this by:
When creating a story, bob-sm follows this process:
Read the story's acceptance criteria and tasks to determine which architectural concerns apply:
From the architecture docs in docs/architecture/, extract ONLY the sections relevant to this story. Do not copy entire documents. Target:
Every extracted block in Dev Notes must include a source citation:
## Dev Notes
### API Design
The user endpoint follows RESTful conventions with JWT auth:
- POST /api/users — create new user
- GET /api/users/:id — retrieve user profile
- Auth: Bearer token required, validated via middleware
[Source: architecture/api-design.md#user-endpoints]
### Data Model
User schema includes: id (UUID), email (unique), name, created_at, updated_at
Password is stored as bcrypt hash, never returned in API responses.
[Source: architecture/data-model.md#user-schema]
### Conventions
- Use repository pattern for data access
- All endpoints return { data, error, meta } envelope
[Source: architecture/index.md#coding-conventions]
Citations follow this pattern:
[Source: architecture/<filename>.md#<section-heading>]
filename is the architecture doc file namesection-heading is the nearest heading above the extracted content, lowercased with hyphensExamples:
[Source: architecture/index.md#tech-stack][Source: architecture/api-design.md#error-handling][Source: architecture/data-model.md#relationships][Source: architecture/auth.md#jwt-flow]| In Dev Notes | In Architecture Docs |
|---|---|
| Subset of architecture relevant to THIS story | Complete system architecture |
| Specific API endpoints being implemented | All API endpoints across the system |
| Data models being created/modified | Full data model with all entities |
| Relevant conventions and patterns | Complete style guide and conventions |
| Cross-references to related stories | No story references |
Dev Notes are a lens into the architecture, not a copy. They should be concise and actionable.
When a story builds on work from a previous story, bob-sm should include:
### Previous Story Context
Story E1.S2 implemented the user authentication endpoint. The auth middleware
created there should be reused for this story's protected routes.
[Source: stories/story-E1.S2.md#completion-notes]
This creates a chain of context that helps developers understand the evolving codebase without re-reading all prior stories.
Architecture documents may change during the project. Context extraction should be re-done when:
Bob-sm should check file modification timestamps before extracting context for new stories. If architecture has changed since the last story was created, re-extract affected sections for accuracy.