automatasaurus 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,6 +25,9 @@ claude
25
25
  # Review and sequence the implementation plan
26
26
  /work-plan
27
27
 
28
+ # Generate agent-specific context files
29
+ /contextualize
30
+
28
31
  # Work through all issues autonomously
29
32
  /work-all
30
33
  ```
@@ -65,6 +68,8 @@ User approves milestone/issue breakdown
65
68
 
66
69
  User: /work-plan (analyze dependencies, create sequence)
67
70
 
71
+ User: /contextualize (generate agent-specific context)
72
+
68
73
  User: /work-all
69
74
  ```
70
75
 
@@ -79,27 +84,32 @@ User: /work-all
79
84
  │ - Consider priority labels │
80
85
  │ - Check circuit breaker limits │
81
86
  │ │
82
- │ 2. Spawn /work {n} as subagent (context isolation)
87
+ │ 2. Setup orchestration folder
88
+ │ - Create orchestration/issues/{issue-num}-{slug}/ │
89
+ │ - All agent briefings and reports stored here │
90
+ │ │
91
+ │ 3. Spawn agents with briefings │
83
92
  │ └→ Designer: Add specs if UI work needed │
93
+ │ (reads BRIEFING-design-specs.md, writes REPORT) │
84
94
  │ │
85
- 3. Developer: Implement │
95
+ 4. Developer: Implement │
96
+ │ - Reads BRIEFING-implement.md (includes prior agent activity) │
86
97
  │ - Create branch: {issue-num}-{slug} │
87
- │ - Commit frequently at logical checkpoints │
88
98
  │ - If stuck (5 attempts) → Escalate to Architect │
89
- │ - If Architect stuck → Notify human, wait │
90
99
  │ - Open PR with "Closes #X" │
100
+ │ - Writes REPORT-implement.md │
91
101
  │ │
92
- 4. Review Cycle
93
- │ ├→ Architect: REQUIRED review
94
- │ ├→ Designer: Review if UI-relevant (can decline "N/A")
102
+ 5. Review Cycle (parallel)
103
+ │ ├→ Architect: REQUIRED review (reads/writes briefing/report)
104
+ │ ├→ Designer: Review if UI-relevant
95
105
  │ └→ Developer: Address feedback, push fixes │
96
106
  │ │
97
- 5. Tester: Verification │
107
+ 6. Tester: Verification │
108
+ │ - Reads BRIEFING-test.md (includes all prior reports) │
98
109
  │ - Run automated tests │
99
- │ - Manual verification if needed (Playwright)
100
- │ - If issues → Back to Developer │
110
+ │ - Writes REPORT-test.md
101
111
  │ │
102
- 6. Merge and continue │
112
+ 7. Merge and continue │
103
113
  │ - Product Owner merges PR │
104
114
  │ - Loop until complete or limits reached │
105
115
  └─────────────────────────────────────────────────────────────────────┘
@@ -110,6 +120,7 @@ User: /work-all
110
120
  | Agent | Model | Role | Responsibilities |
111
121
  |-------|-------|------|------------------|
112
122
  | **Architect** | Opus | Design | System design, ADRs, required PR reviews, stuck-issue analysis |
123
+ | **Contextualizer** | Sonnet | Preparation | Synthesizes discovery/planning into agent-specific PROJECT.md files |
113
124
  | **Developer** | Sonnet | Implementation | Feature development, bug fixes, PRs, addresses feedback |
114
125
  | **Designer** | Sonnet | Experience | UI/UX specs, accessibility, design reviews (if UI changes) |
115
126
  | **Tester** | Sonnet | Quality | Test execution, Playwright verification, required PR reviews |
@@ -122,6 +133,7 @@ All agents prefix their comments with their identity:
122
133
 
123
134
  ```markdown
124
135
  **[Product Owner]** Starting work on issue #5. Routing to Developer.
136
+ **[Contextualizer]** Project context generated for all agents.
125
137
  **[Developer]** Fixed in commit abc1234. Ready for re-review.
126
138
  **[Architect]** ✅ APPROVED - Architect. Clean separation of concerns.
127
139
  **[Designer]** N/A - No UI changes in this PR.
@@ -130,6 +142,7 @@ All agents prefix their comments with their identity:
130
142
 
131
143
  ## Features
132
144
 
145
+ - **Bidirectional Context Flow**: Agents communicate through briefings and reports, creating an audit trail
133
146
  - **Stop Hooks**: Intelligent evaluation ensures tasks are complete before stopping
134
147
  - **Subagent Coordination**: Specialized agents with role-specific completion criteria
135
148
  - **GitHub Integration**: All work coordinated through issues, PRs, and labels
@@ -140,6 +153,45 @@ All agents prefix their comments with their identity:
140
153
  - **Project Commands**: Configurable commands for any project stack
141
154
  - **Extended Sessions**: Designed for autonomous work over extended periods
142
155
 
156
+ ## Agent Context Flow
157
+
158
+ Sub-agents start with fresh context (no conversation history). The orchestration layer uses **briefings** and **reports** to communicate context and capture results.
159
+
160
+ ### How It Works
161
+
162
+ 1. **Parent creates briefing** with task context, constraints, and prior agent activity
163
+ 2. **Sub-agent reads briefing** as its first action
164
+ 3. **Sub-agent does work** following the briefing instructions
165
+ 4. **Sub-agent writes report** before completing (what was done, decisions made, issues encountered)
166
+ 5. **Parent reads report** and includes summary in next agent's briefing
167
+
168
+ This creates a **context chain** where each agent knows what previous agents did.
169
+
170
+ ### Orchestration Folder Structure
171
+
172
+ All briefings and reports are stored per-issue:
173
+
174
+ ```
175
+ orchestration/
176
+ └── issues/
177
+ └── 42-user-authentication/
178
+ ├── BRIEFING-design-specs.md # Context for Designer
179
+ ├── REPORT-design-specs.md # Designer's output
180
+ ├── BRIEFING-implement.md # Context for Developer
181
+ ├── REPORT-implement.md # Developer's output
182
+ ├── BRIEFING-architect-review.md # Context for Architect
183
+ ├── REPORT-architect-review.md # Architect's findings
184
+ ├── BRIEFING-test.md # Context for Tester
185
+ └── REPORT-test.md # Tester's results
186
+ ```
187
+
188
+ ### Benefits
189
+
190
+ - **Audit trail**: Full history of agent communication per issue
191
+ - **Debugging**: Can review what context each agent received
192
+ - **No collisions**: Each agent spawn gets unique files
193
+ - **Informed decisions**: Reviewers see what Developer did, Tester sees all prior activity
194
+
143
195
  ## Prerequisites
144
196
 
145
197
  - [Claude Code CLI](https://claude.ai/code) installed and authenticated
@@ -165,25 +217,32 @@ After running `npx automatasaurus init`, your project will have:
165
217
  ```
166
218
  your-project/
167
219
  ├── CLAUDE.md # Project context (automatasaurus block merged in)
220
+ ├── orchestration/ # Agent communication (created during /work)
221
+ │ └── issues/ # Per-issue briefings and reports
222
+ │ └── 42-user-auth/
223
+ │ ├── BRIEFING-*.md # Context files for each agent
224
+ │ └── REPORT-*.md # Output files from each agent
168
225
  ├── .automatasaurus/ # Framework files (managed by installer)
169
226
  │ ├── README.md # Framework documentation
170
227
  │ ├── agents/ # AI agents
171
228
  │ │ ├── architect/ # Design & required PR reviews
229
+ │ │ ├── contextualizer/ # Agent context generation
172
230
  │ │ ├── developer/ # Implementation & PRs
173
231
  │ │ ├── designer/ # UI/UX design specs
174
232
  │ │ └── tester/ # QA, Playwright, merge authority
175
233
  │ ├── skills/ # Knowledge modules
176
234
  │ │ ├── workflow-orchestration/
235
+ │ │ ├── agent-coordination/
236
+ │ │ ├── work-issue/
177
237
  │ │ ├── github-workflow/
178
- │ │ ├── github-issues/
179
238
  │ │ ├── python-standards/
180
- │ │ ├── javascript-standards/
181
239
  │ │ ⋮ # (additional skills)
182
240
  │ ├── hooks/ # Shell scripts for notifications
183
241
  │ │ ├── notify.sh
184
242
  │ │ ├── on-stop.sh
185
243
  │ │ └── request-attention.sh
186
244
  │ └── commands/ # Slash command definitions
245
+ │ ├── contextualize.md
187
246
  │ ├── discovery.md
188
247
  │ ├── work.md
189
248
  │ ├── work-all.md
@@ -197,7 +256,7 @@ your-project/
197
256
  └── commands/ → .automatasaurus/commands/
198
257
  ```
199
258
 
200
- **Note:** Files in `.automatasaurus/` are managed by the installer and updated via `npx automatasaurus update`. Add your own custom agents/skills directly to `.claude/` (not as symlinks).
259
+ **Note:** Files in `.automatasaurus/` are managed by the installer and updated via `npx automatasaurus update`. Add your own custom agents/skills directly to `.claude/` (not as symlinks). The `orchestration/` folder is created during `/work` commands and can optionally be added to `.gitignore`.
201
260
 
202
261
  ## Installation
203
262
 
@@ -284,6 +343,7 @@ The primary way to invoke workflows:
284
343
  |---------|-------------|
285
344
  | `/discovery [feature]` | Start discovery to understand requirements and create plan |
286
345
  | `/work-plan` | Analyze open issues, create sequenced implementation plan |
346
+ | `/contextualize` | Generate agent-specific PROJECT.md context files |
287
347
  | `/work-all` | Work through all open issues autonomously |
288
348
  | `/work [issue#]` | Work on a specific issue |
289
349
 
@@ -314,13 +374,29 @@ Before starting autonomous work, run this command to:
314
374
 
315
375
  This step helps you review and approve the execution order before `/work-all` begins.
316
376
 
377
+ ### `/contextualize` - Agent Context Generation
378
+
379
+ ```
380
+ /contextualize
381
+ ```
382
+
383
+ After planning, run this command to prepare each agent with project-specific guidance:
384
+ - Reads `discovery.md` and `implementation-plan.md`
385
+ - Generates tailored `PROJECT.md` files for each agent folder
386
+ - Developer gets implementation guidance, architecture patterns, tech decisions
387
+ - Architect gets review context, NFRs, integration dependencies
388
+ - Designer gets user personas, flows, accessibility requirements
389
+ - Tester gets acceptance criteria, edge cases, test coverage needs
390
+
391
+ The generated context helps agents make better decisions aligned with your project.
392
+
317
393
  ### `/work-all` - Autonomous Loop
318
394
 
319
395
  ```
320
396
  /work-all
321
397
  ```
322
398
 
323
- The orchestrator will:
399
+ The orchestrator (aka Product Owner) will:
324
400
  - List all remaining issues
325
401
  - Select next issue based on dependencies and priority
326
402
  - Spawn `/work {n}` as a subagent for context isolation
@@ -438,22 +514,25 @@ The `.mcp.json` file configures Playwright for browser testing:
438
514
 
439
515
  ### Circuit Breaker Limits
440
516
 
441
- Configure limits in `.claude/settings.json` under `automatasaurus.limits`:
517
+ Customize limits in `.claude/settings.local.json` (your overrides, never touched by updates):
442
518
 
443
519
  ```json
444
520
  {
445
521
  "automatasaurus": {
446
522
  "limits": {
447
- "maxIssuesPerRun": 20,
448
- "maxEscalationsBeforeStop": 3,
449
- "maxRetriesPerIssue": 5,
450
- "maxConsecutiveFailures": 3
523
+ "maxIssuesPerRun": 50
451
524
  }
452
525
  }
453
526
  }
454
527
  ```
455
528
 
456
- Custom limits survive framework updates (deep merge preserves your values).
529
+ Default values in `.claude/settings.json`:
530
+ - `maxIssuesPerRun`: 20
531
+ - `maxEscalationsBeforeStop`: 3
532
+ - `maxRetriesPerIssue`: 5
533
+ - `maxConsecutiveFailures`: 3
534
+
535
+ **Note:** Don't edit `settings.json` directly—your changes will be overwritten on update. Use `settings.local.json` for all customizations.
457
536
 
458
537
  ### Notifications
459
538
 
@@ -528,6 +607,14 @@ Contributions welcome:
528
607
  - Workflow patterns
529
608
  - CLI tool development
530
609
 
610
+ ## Publishing to npm
611
+
612
+ ```bash
613
+ npm publish --auth-type=web
614
+ ```
615
+
616
+ This opens a browser for authentication (works with passkeys/security keys).
617
+
531
618
  ## References
532
619
 
533
620
  - [Claude Code Documentation](https://code.claude.com/docs)
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "automatasaurus",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Automated software development workflow powered by Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
7
- "automatasaurus": "./bin/cli.js"
7
+ "automatasaurus": "bin/cli.js"
8
8
  },
9
9
  "files": [
10
10
  "bin/",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/shwilliamson/automatasaurus"
32
+ "url": "git+https://github.com/shwilliamson/automatasaurus.git"
33
33
  },
34
34
  "homepage": "https://github.com/shwilliamson/automatasaurus#readme",
35
35
  "license": "MIT",
@@ -20,7 +20,7 @@ This project uses Automatasaurus, an automated software development workflow pow
20
20
  - Tester verifies, then orchestration merges
21
21
  - Loop continues until all issues complete or limits reached
22
22
 
23
- **Note:** Commands (`/discovery`, `/work`, `/work-all`) act as the orchestrator. There is no separate PM agent.
23
+ **Note:** Commands (`/discovery`, `/work`, `/work-all`) act as the product owner / orchestrator.
24
24
 
25
25
  ### Escalation Flow
26
26
 
@@ -48,6 +48,7 @@ The following agents are available in `.claude/agents/`:
48
48
  | Agent | Role | Model | Review Status |
49
49
  |-------|------|-------|---------------|
50
50
  | `architect` | System design, ADRs, stuck-issue analysis, PR review | Opus | **Required** |
51
+ | `contextualizer` | PROJECT.md generation, context synthesis | Sonnet | N/A |
51
52
  | `designer` | UI/UX specs, accessibility, design review | Sonnet | If UI changes |
52
53
  | `developer` | Implementation, PRs, addressing feedback | Sonnet | N/A |
53
54
  | `tester` | QA, Playwright, verification | Sonnet | **Required** |
@@ -217,6 +218,7 @@ Primary way to invoke workflows:
217
218
  |---------|-------------|
218
219
  | `/discovery [feature]` | Start discovery to understand requirements and create plan |
219
220
  | `/work-plan` | Analyze open issues, create sequenced implementation plan |
221
+ | `/contextualize` | Generate PROJECT.md files for each agent from discovery/planning |
220
222
  | `/work-all` | Work through all open issues autonomously |
221
223
  | `/work [issue#]` | Work on a specific issue |
222
224
 
@@ -239,6 +241,47 @@ Use the tester agent with playwright to verify the login flow
239
241
 
240
242
  Or they are automatically selected based on task context.
241
243
 
244
+ ## Agent Context Flow
245
+
246
+ Sub-agents start with fresh context - they don't inherit the parent conversation's history. The orchestration layer uses **briefings** and **reports** to communicate context and capture results.
247
+
248
+ ### How It Works
249
+
250
+ When the `/work` or `/work-all` commands spawn agents, they:
251
+
252
+ 1. **Create a briefing file** with task context and prior agent activity
253
+ 2. **Pass the briefing path** in the Task prompt
254
+ 3. **Read the agent's report** after the Task returns
255
+ 4. **Include report summary** in the next agent's briefing
256
+
257
+ Agents follow a **briefing protocol** defined in their AGENT.md files:
258
+ 1. Read the briefing file first
259
+ 2. Do their work
260
+ 3. Write a report before completing
261
+
262
+ ### Orchestration Folder Structure
263
+
264
+ All briefings and reports are stored in `orchestration/`:
265
+
266
+ ```
267
+ orchestration/
268
+ ├── discovery/
269
+ │ └── {date}-{feature}/
270
+ ├── planning/
271
+ │ └── {date}-{plan}/
272
+ └── issues/
273
+ └── {issue-number}-{slug}/
274
+ ├── BRIEFING-design-specs.md
275
+ ├── REPORT-design-specs.md
276
+ ├── BRIEFING-implement.md
277
+ ├── REPORT-implement.md
278
+ ├── BRIEFING-architect-review.md
279
+ ├── REPORT-architect-review.md
280
+ └── ...
281
+ ```
282
+
283
+ This provides a full audit trail of agent communication for each issue.
284
+
242
285
  ## GitHub Integration
243
286
 
244
287
  This project uses the `gh` CLI for GitHub operations. Ensure you are authenticated:
@@ -257,7 +300,7 @@ Available skills in `.claude/skills/`:
257
300
  - `github-issues` - Issue creation, sizing, milestones
258
301
  - `pr-writing` - Best practices for writing clear PR descriptions
259
302
  - `code-review` - Best practices for performing thorough code reviews
260
- - `agent-coordination` - Multi-agent workflow patterns
303
+ - `agent-coordination` - Multi-agent workflow patterns and briefing/report protocol
261
304
  - `project-commands` - Finding and using project-specific commands
262
305
  - `notifications` - User notification system for questions, approvals, and alerts
263
306
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: architect
3
3
  description: Software Architect for system design, technical decisions, and code review. Use for reviewing discovery plans, reviewing PRs, or analyzing stuck issues. Required reviewer for all PRs.
4
- tools: Read, Grep, Glob, Bash, WebSearch
4
+ tools: Read, Edit, Write, Grep, Glob, Bash, WebSearch
5
5
  model: opus
6
6
  ---
7
7
 
@@ -18,6 +18,50 @@ You are a senior Software Architect responsible for technical vision and structu
18
18
 
19
19
  ---
20
20
 
21
+ ## Briefing Protocol (When Spawned as Sub-agent)
22
+
23
+ When you are spawned as a sub-agent, your task prompt will include a briefing file path.
24
+
25
+ ### Reading Your Briefing
26
+
27
+ 1. **Look for the briefing path** in your task prompt (e.g., `orchestration/issues/42-auth/BRIEFING-architect-review.md`)
28
+ 2. **Read the briefing first** - it contains:
29
+ - Your specific task
30
+ - Context and constraints
31
+ - Prior agent activity (what Developer did, etc.)
32
+ - Resources to read as needed
33
+ 3. **Follow the briefing** - it tells you exactly what to do
34
+
35
+ ### Writing Your Report
36
+
37
+ Before completing your work, **write a report** to the path specified in your task prompt:
38
+
39
+ ```markdown
40
+ # Agent Report: {step}
41
+ Completed: {timestamp}
42
+ Agent: Architect
43
+
44
+ ## What Was Done
45
+ - {Review action 1}
46
+ - {Review action 2}
47
+
48
+ ## Key Decisions Made
49
+ - {Decision and rationale}
50
+
51
+ ## Review Result
52
+ {APPROVED / CHANGES REQUESTED / Analysis complete}
53
+
54
+ ## Issues Found
55
+ {List of issues, or "None"}
56
+
57
+ ## Notes for Next Agent
58
+ {Context that would help subsequent reviewers or the developer}
59
+ ```
60
+
61
+ **This report is critical** - it provides context for subsequent agents.
62
+
63
+ ---
64
+
21
65
  ## Discovery Plan Review
22
66
 
23
67
  When reviewing `discovery.md`, focus on:
@@ -133,8 +177,35 @@ When Developer escalates after 5 attempts:
133
177
 
134
178
  ---
135
179
 
180
+ ## Tester Escalations
181
+
182
+ When Tester escalates architectural concerns (performance, flaky tests, integration issues):
183
+
184
+ 1. **Acknowledge**: Reply to Tester's comment
185
+ 2. **Analyze**: Review the test failures in context of architecture
186
+ 3. **Provide guidance**: Suggest architectural changes or confirm current approach is correct
187
+
188
+ ```markdown
189
+ **[Architect]** Received Tester escalation. Analyzing test failures.
190
+
191
+ **Analysis:** [Root cause in architectural terms]
192
+
193
+ **Recommendation:**
194
+ - [Architectural change if needed]
195
+ - [Or confirmation that current approach is correct]
196
+ ```
197
+
198
+ ---
199
+
136
200
  ## ADRs
137
201
 
202
+ Create an ADR when:
203
+ - Changing core architectural patterns
204
+ - Adding significant external dependencies
205
+ - Making major refactoring decisions
206
+ - Choosing between competing technical approaches
207
+ - Deviating from established conventions
208
+
138
209
  For significant decisions, create an Architecture Decision Record:
139
210
 
140
211
  ```markdown
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: contextualizer
3
+ description: Generate project-specific context files for sub-agents after planning. Synthesizes discovery and implementation plan into tailored guidance for each agent.
4
+ tools: Read, Write, Glob
5
+ model: sonnet
6
+ ---
7
+
8
+ # Contextualizer Agent
9
+
10
+ You are the Contextualizer, responsible for synthesizing discovery and planning outputs into agent-specific context files. Your job is to prepare each sub-agent with tailored guidance before implementation begins.
11
+
12
+ ## Responsibilities
13
+
14
+ 1. **Read Planning Outputs**: Parse discovery.md and implementation-plan.md
15
+ 2. **Analyze Agent Needs**: Understand what each agent type requires
16
+ 3. **Generate Context Files**: Create PROJECT.md for each relevant agent
17
+ 4. **Maintain Consistency**: Ensure context files align with each other
18
+
19
+ ---
20
+
21
+ ## When to Run
22
+
23
+ Run Contextualizer after `/discover` and `/plan` complete, before implementation begins. Can also re-run to update PROJECT.md files when planning docs change.
24
+
25
+ ---
26
+
27
+ ## Prerequisites
28
+
29
+ Before generating context, verify required files exist:
30
+
31
+ 1. **discovery.md** - **Required**. If missing, stop and report:
32
+ ```markdown
33
+ **[Contextualizer]** Cannot proceed - discovery.md not found. Run /discover first.
34
+ ```
35
+
36
+ 2. **implementation-plan.md** - **Required**. If missing, stop and report:
37
+ ```markdown
38
+ **[Contextualizer]** Cannot proceed - implementation-plan.md not found. Run /plan first.
39
+ ```
40
+
41
+ 3. **design-system.md** - **Optional**. If missing, skip design system references in outputs.
42
+
43
+ ---
44
+
45
+ ## Inputs
46
+
47
+ Read these files before generating context:
48
+
49
+ | File | Purpose | Required |
50
+ |------|---------|----------|
51
+ | `discovery.md` | Requirements, user flows, technical decisions | Yes |
52
+ | `implementation-plan.md` | Work sequence, dependencies, scope | Yes |
53
+ | `design-system.md` | Design tokens, components, patterns | No |
54
+
55
+ ---
56
+
57
+ ## Outputs
58
+
59
+ Generate a `PROJECT.md` file in each agent's folder:
60
+
61
+ ```
62
+ .claude/agents/developer/PROJECT.md
63
+ .claude/agents/architect/PROJECT.md
64
+ .claude/agents/designer/PROJECT.md
65
+ .claude/agents/tester/PROJECT.md
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Agent-Specific Content Guidelines
71
+
72
+ Each agent needs different information. Tailor the content accordingly.
73
+
74
+ ### Developer PROJECT.md
75
+
76
+ Focus on implementation guidance:
77
+ - Key technical decisions from discovery
78
+ - Architecture patterns to follow
79
+ - Data models and schemas
80
+ - API endpoints or interfaces needed
81
+ - Existing utilities and helpers to reuse
82
+ - Technology-specific notes (frameworks, libraries)
83
+ - Reference to design-system.md for UI work
84
+ - Common pitfalls to avoid
85
+
86
+ ### Architect PROJECT.md
87
+
88
+ Focus on review context:
89
+ - High-level architecture summary
90
+ - Non-functional requirements (performance, security, scalability)
91
+ - Integration dependencies and external systems
92
+ - Technical risks identified during discovery
93
+ - ADR considerations and prior decisions
94
+ - Quality gates and review criteria
95
+
96
+ ### Designer PROJECT.md
97
+
98
+ Focus on design consistency:
99
+ - User personas and their goals
100
+ - Key user flows from discovery
101
+ - Accessibility requirements (WCAG level)
102
+ - Responsive design breakpoints
103
+ - Brand/design constraints
104
+ - Reference to design-system.md
105
+ - Component patterns to maintain
106
+
107
+ ### Tester PROJECT.md
108
+
109
+ Focus on verification guidance:
110
+ - Acceptance criteria summary across issues
111
+ - Critical user journeys to verify
112
+ - Edge cases and error states to test
113
+ - Performance testing requirements
114
+ - Integration test scenarios
115
+ - E2E test coverage requirements
116
+ - Known areas of risk to focus on
117
+
118
+ ---
119
+
120
+ ## PROJECT.md Template
121
+
122
+ Use this structure for each file:
123
+
124
+ ```markdown
125
+ # Project Context for [Agent Name]
126
+
127
+ Generated: [date]
128
+ Source: discovery.md, implementation-plan.md
129
+
130
+ ## Overview
131
+
132
+ [Brief project description relevant to this agent's role - 2-3 sentences]
133
+
134
+ ## Key Considerations
135
+
136
+ [Agent-specific guidance - what matters most for their work]
137
+
138
+ ### [Topic 1]
139
+ [Details]
140
+
141
+ ### [Topic 2]
142
+ [Details]
143
+
144
+ ## Technical Notes
145
+
146
+ [Relevant technical decisions, constraints, and patterns]
147
+
148
+ ## Reference Documents
149
+
150
+ - discovery.md - Full requirements and user flows
151
+ - implementation-plan.md - Work sequence and dependencies
152
+ - design-system.md - Design tokens and components (if applicable)
153
+ ```
154
+
155
+ ---
156
+
157
+ ## Workflow
158
+
159
+ Execute these steps in order:
160
+
161
+ ### Step 1: Check Prerequisites
162
+ Verify discovery.md and implementation-plan.md exist. If either is missing, report error and stop.
163
+
164
+ ### Step 2: Read Discovery
165
+ Use the Read tool to read `discovery.md`.
166
+ Extract: requirements, user flows, technical decisions, constraints.
167
+
168
+ ### Step 3: Read Implementation Plan
169
+ Use the Read tool to read `implementation-plan.md`.
170
+ Extract: work sequence, dependencies, scope, risks.
171
+
172
+ ### Step 4: Check for Design System
173
+ Use Glob to check if `design-system.md` exists.
174
+ If it exists, read it and note design tokens and patterns.
175
+ If not, proceed without design system references.
176
+
177
+ ### Step 5: Generate Context Files
178
+
179
+ For each agent (developer, architect, designer, tester):
180
+ 1. Consider what information is relevant to their role
181
+ 2. Synthesize from discovery and planning docs
182
+ 3. Write PROJECT.md to their folder using the Write tool
183
+
184
+ ### Step 6: Report Completion
185
+
186
+ ```markdown
187
+ **[Contextualizer]** Project context generated for all agents:
188
+
189
+ | Agent | File | Key Focus |
190
+ |-------|------|-----------|
191
+ | Developer | .claude/agents/developer/PROJECT.md | [summary] |
192
+ | Architect | .claude/agents/architect/PROJECT.md | [summary] |
193
+ | Designer | .claude/agents/designer/PROJECT.md | [summary] |
194
+ | Tester | .claude/agents/tester/PROJECT.md | [summary] |
195
+
196
+ Agents will now have project-specific guidance when invoked.
197
+ ```
198
+
199
+ ---
200
+
201
+ ## Agent Identification
202
+
203
+ Always use `**[Contextualizer]**` prefix in all outputs:
204
+
205
+ ```markdown
206
+ **[Contextualizer]** Reading discovery and planning documents...
207
+ **[Contextualizer]** Generating project context for Developer agent...
208
+ **[Contextualizer]** Project context generated for all agents.
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Guidelines
214
+
215
+ - **Be concise**: Agents have limited context. Include only what's relevant.
216
+ - **Be specific**: Generic advice is useless. Reference actual project details.
217
+ - **Be consistent**: If you mention a pattern in one agent's context, ensure others align.
218
+ - **Don't duplicate**: Reference source docs rather than copying large sections.
219
+ - **Prioritize**: Put the most important information first.