@champpaba/claude-agent-kit 2.0.0 → 2.1.0

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.
Files changed (87) hide show
  1. package/.claude/CLAUDE.md +253 -31
  2. package/.claude/agents/01-integration.md +106 -552
  3. package/.claude/agents/02-uxui-frontend.md +188 -850
  4. package/.claude/agents/03-test-debug.md +152 -521
  5. package/.claude/agents/04-frontend.md +169 -549
  6. package/.claude/agents/05-backend.md +132 -661
  7. package/.claude/agents/06-database.md +149 -698
  8. package/.claude/agents/_shared/README.md +57 -0
  9. package/.claude/agents/_shared/agent-boundaries.md +64 -0
  10. package/.claude/agents/_shared/documentation-policy.md +47 -0
  11. package/.claude/agents/_shared/package-manager.md +59 -0
  12. package/.claude/agents/_shared/pre-work-checklist.md +57 -0
  13. package/.claude/commands/cdev.md +36 -61
  14. package/.claude/commands/csetup.md +90 -14
  15. package/.claude/commands/cstatus.md +153 -60
  16. package/.claude/commands/cview.md +364 -364
  17. package/.claude/commands/designsetup.md +1 -1
  18. package/.claude/commands/pageplan.md +53 -177
  19. package/.claude/commands/pstatus.md +431 -0
  20. package/.claude/contexts/design/accessibility.md +611 -611
  21. package/.claude/contexts/design/box-thinking.md +1 -1
  22. package/.claude/contexts/design/index.md +1 -1
  23. package/.claude/contexts/design/layout.md +400 -400
  24. package/.claude/contexts/design/responsive.md +551 -551
  25. package/.claude/contexts/design/shadows.md +522 -522
  26. package/.claude/contexts/design/typography.md +465 -465
  27. package/.claude/contexts/domain/README.md +164 -164
  28. package/.claude/contexts/patterns/agent-coordination.md +388 -388
  29. package/.claude/contexts/patterns/agent-discovery.md +2 -2
  30. package/.claude/contexts/patterns/animation-patterns.md +1 -1
  31. package/.claude/contexts/patterns/change-workflow.md +541 -538
  32. package/.claude/contexts/patterns/code-standards.md +10 -8
  33. package/.claude/contexts/patterns/development-principles.md +513 -513
  34. package/.claude/contexts/patterns/error-handling.md +478 -478
  35. package/.claude/contexts/patterns/error-recovery.md +365 -365
  36. package/.claude/contexts/patterns/frontend-component-strategy.md +1 -1
  37. package/.claude/contexts/patterns/logging.md +424 -424
  38. package/.claude/contexts/patterns/performance-optimization.md +1 -1
  39. package/.claude/contexts/patterns/task-breakdown.md +452 -452
  40. package/.claude/contexts/patterns/task-classification.md +523 -523
  41. package/.claude/contexts/patterns/tdd-classification.md +516 -516
  42. package/.claude/contexts/patterns/testing.md +413 -413
  43. package/.claude/contexts/patterns/ui-component-consistency.md +3 -3
  44. package/.claude/contexts/patterns/validation-framework.md +779 -776
  45. package/.claude/lib/README.md +4 -4
  46. package/.claude/lib/agent-executor.md +31 -40
  47. package/.claude/lib/agent-router.md +450 -572
  48. package/.claude/lib/context-loading-protocol.md +19 -36
  49. package/.claude/lib/detailed-guides/agent-system.md +43 -121
  50. package/.claude/lib/detailed-guides/taskmaster-analysis.md +1 -1
  51. package/.claude/lib/document-loader.md +22 -25
  52. package/.claude/lib/flags-updater.md +461 -469
  53. package/.claude/lib/tdd-classifier.md +345 -345
  54. package/.claude/lib/validation-gates.md +484 -484
  55. package/.claude/settings.local.json +42 -42
  56. package/.claude/templates/STYLE_GUIDE.template.md +1 -1
  57. package/.claude/templates/context-template.md +45 -45
  58. package/.claude/templates/design-context-template.md +1 -1
  59. package/.claude/templates/flags-template.json +42 -42
  60. package/.claude/templates/phases-sections/accessibility-test.md +17 -17
  61. package/.claude/templates/phases-sections/api-design.md +37 -37
  62. package/.claude/templates/phases-sections/backend-tests.md +16 -16
  63. package/.claude/templates/phases-sections/backend.md +37 -37
  64. package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
  65. package/.claude/templates/phases-sections/component-tests.md +17 -17
  66. package/.claude/templates/phases-sections/contract-backend.md +16 -16
  67. package/.claude/templates/phases-sections/contract-frontend.md +16 -16
  68. package/.claude/templates/phases-sections/database.md +35 -35
  69. package/.claude/templates/phases-sections/e2e-tests.md +16 -16
  70. package/.claude/templates/phases-sections/fix-implementation.md +17 -17
  71. package/.claude/templates/phases-sections/frontend-integration.md +18 -18
  72. package/.claude/templates/phases-sections/frontend-mockup.md +126 -123
  73. package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
  74. package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
  75. package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
  76. package/.claude/templates/phases-sections/refactor.md +16 -16
  77. package/.claude/templates/phases-sections/regression-tests.md +15 -15
  78. package/.claude/templates/phases-sections/responsive-test.md +16 -16
  79. package/.claude/templates/phases-sections/script-implementation.md +43 -43
  80. package/.claude/templates/phases-sections/test-coverage.md +16 -16
  81. package/.claude/templates/phases-sections/user-approval.md +14 -14
  82. package/LICENSE +21 -21
  83. package/PROJECT_STATUS.template.yml +105 -0
  84. package/README.md +103 -1115
  85. package/lib/init.js +30 -2
  86. package/package.json +3 -2
  87. package/.claude/CHANGELOG-v1.1.1.md +0 -259
package/.claude/CLAUDE.md CHANGED
@@ -1,8 +1,46 @@
1
1
  # CLAUDE.md
2
2
 
3
3
  > **Navigation Hub for AI Agents**
4
- > **Template Version:** 2.0.0 - Universal Multi-Agent Template
5
- > **Latest:** Design System v2.0 - Interactive setup, theme selection, selective pattern loading, page type detection
4
+ > **Template Version:** 2.0.0 - Claude 4.5 Optimized + Design System v2.0
5
+ > **Latest:** Full template refactored with Claude 4.5 best practices (agents ~65% smaller) + Interactive design setup with theme selection
6
+
7
+ ---
8
+
9
+ ## 📁 File Naming Conventions (OpenSpec + Template)
10
+
11
+ > **IMPORTANT:** Avoid confusion between OpenSpec files and Template files
12
+
13
+ ### OpenSpec Files (from [Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec))
14
+
15
+ | File | Purpose | When to Read |
16
+ |------|---------|--------------|
17
+ | `proposal.md` | WHY - Goals, scope, rationale | Phase planning |
18
+ | `tasks.md` | WHAT - Implementation checklist | Task tracking |
19
+ | `design.md` | **Technical/Architecture decisions** (optional) | Backend/Database phases |
20
+ | `specs/` | Delta specs (ADDED/MODIFIED/REMOVED) | Requirement validation |
21
+
22
+ ### Template Files (from claude-multi-agent-template)
23
+
24
+ | File | Purpose | When to Read |
25
+ |------|---------|--------------|
26
+ | `STYLE_GUIDE.md` | **Visual design** (colors, typography, spacing) | UI/Frontend phases |
27
+ | `tokens.json` | Design tokens with style/theme/animations (~800 tokens) | Quick UI reference |
28
+ | `page-plan.md` | UI component layout + content strategy | uxui-frontend agent |
29
+ | `phases.md` | Execution plan with agent assignments | All phases |
30
+ | `flags.json` | Progress tracking | All phases |
31
+
32
+ ### Key Distinction
33
+
34
+ ```
35
+ OpenSpec design.md = Technical Architecture (data flow, API structure, system design)
36
+ Template STYLE_GUIDE = Visual Design (colors, fonts, spacing, component styles)
37
+ ```
38
+
39
+ **Agents should read BOTH when relevant:**
40
+ - `uxui-frontend` → STYLE_GUIDE.md (visual) + design.md (if has UI architecture)
41
+ - `backend` → design.md (API/data architecture)
42
+ - `database` → design.md (data models, relationships)
43
+ - `frontend` → STYLE_GUIDE.md (visual) + design.md (API contracts)
6
44
 
7
45
  ---
8
46
 
@@ -19,8 +57,8 @@ Universal, framework-agnostic template for AI-assisted development.
19
57
  - ✅ Domain-Specific Support (add your business logic)
20
58
 
21
59
  **What's NOT Included:**
22
- - ❌ Framework patterns → Generated dynamically via `/agentsetup`
23
- - ❌ Package managers → Detected by `/agentsetup`
60
+ - ❌ Framework patterns → Generated dynamically via `/csetup`
61
+ - ❌ Package managers → Auto-detected by `/csetup`
24
62
  - ❌ Spec frameworks → Optional (OpenSpec, BMAD, SpecKit)
25
63
 
26
64
  ---
@@ -28,12 +66,12 @@ Universal, framework-agnostic template for AI-assisted development.
28
66
  ## 📖 Quick Navigation
29
67
 
30
68
  **Design/UI (v2.0.0):**
31
- - `/extract https://site.com` - **NEW!** Extract design from reference sites (multi-URL, style detection)
32
- - `/designsetup @prd.md` - **ENHANCED!** Interactive design setup (3-round loop, theme selection)
33
- - `design-system/tokens.json` - **v2.0!** Design tokens with style/theme/animations (~800 tokens) ✨
34
- - `design-system/patterns/*.md` - **NEW!** Selective code patterns (buttons, cards, forms, animations, decorations)
69
+ - `/extract https://site.com` - Extract design from reference sites (multi-URL, style detection)
70
+ - `/designsetup @prd.md` - Interactive design setup (3-round loop, theme selection)
71
+ - `design-system/tokens.json` - Design tokens with style/theme/animations (~800 tokens) ✨
72
+ - `design-system/patterns/*.md` - Selective code patterns (buttons, cards, forms, animations, decorations)
35
73
  - `design-system/STYLE_GUIDE.md` - Human-readable guide (no code, ~150 lines)
36
- - `.claude/extractions/*.json` - **NEW!** Extracted site data
74
+ - `.claude/extractions/*.json` - Extracted site data
37
75
  - `@/.claude/lib/document-loader.md` - Token-efficient loading patterns
38
76
  - `@/.claude/contexts/design/index.md` (General design principles - fallback)
39
77
 
@@ -49,15 +87,14 @@ Universal, framework-agnostic template for AI-assisted development.
49
87
  **Project Setup:**
50
88
  - `/extract https://site.com` - Extract design from reference sites
51
89
  - `/designsetup @prd.md` - Interactive design system setup
52
- - `/psetup` - One-time project setup (detect tech stack, generate best practices)
53
- - `/agentsetup` - Auto-detect tech stack and generate best practices
90
+ - `/csetup` - **v1.8.0+:** Now auto-detects tech stack + generates best practices (replaces /psetup, /agentsetup)
54
91
 
55
92
  **Page Planning (UI Tasks) - v2.0.0:**
56
- - `/pageplan @prd.md @brief.md` - **ENHANCED v2.0.0!** Generate page structure with auto page type detection
93
+ - `/pageplan @prd.md @brief.md` - Generate page structure with auto page type detection
57
94
  - Output: `openspec/changes/{id}/page-plan.md` (component reuse, buyer avatar, conversion copy, asset checklist)
58
- - **NEW v2.0.0:** Auto-detects page type (landing/dashboard/auth) from proposal.md/tasks.md
59
- - **NEW v2.0.0:** Reads tokens.json for style/theme/animations
60
- - **NEW v2.0.0:** Loads patterns/*.md selectively based on page type
95
+ - Auto-detects page type (landing/dashboard/auth) from proposal.md/tasks.md
96
+ - Reads tokens.json for style/theme/animations
97
+ - Loads patterns/*.md selectively based on page type
61
98
  - Buyer avatar analysis (Eugene Schwartz framework) for marketing pages only
62
99
  - Used by: uxui-frontend agent (auto-reads in STEP 0.5)
63
100
 
@@ -66,9 +103,16 @@ Universal, framework-agnostic template for AI-assisted development.
66
103
  - `/cdev {change-id}` - Start/continue multi-agent development
67
104
  - `/cview {change-id}` - View detailed progress for a change
68
105
  - `/cstatus {change-id}` - Quick progress status for a change
106
+ - `/pstatus` - Update PROJECT_STATUS.yml (cross-session context)
107
+
108
+ **Cross-Session Context (v2.1.0):**
109
+ - `PROJECT_STATUS.yml` (project root) - Quick context snapshot for new sessions
110
+ - Contains: infrastructure state, blockers, completed work, next priorities
111
+ - Created by: `cak init` (optional) or manually
112
+ - Updated by: `/pstatus` command or Main Claude prompts
69
113
 
70
114
  **Best Practices (Dynamic):**
71
- - `.claude/contexts/domain/{project}/best-practices/` (generated by `/agentsetup`)
115
+ - `.claude/contexts/domain/project/best-practices/` (auto-generated by `/csetup`)
72
116
  - Framework-specific guidelines from Context7 MCP
73
117
 
74
118
  **Indexing (3 Levels):**
@@ -76,25 +120,31 @@ Universal, framework-agnostic template for AI-assisted development.
76
120
  - Level 2: `.claude/contexts/domain/{project}/README.md` (Project Overview)
77
121
  - Level 3: `.claude/contexts/domain/{project}/best-practices/index.md` (Best Practices Registry)
78
122
 
79
- **🆕 Implementation Logic (v1.1.0):**
123
+ **Implementation Logic:**
80
124
  - `@/.claude/lib/README.md` - Implementation logic overview
81
- - `@/.claude/lib/agent-executor.md` - Agent retry & escalation logic (used by /cdev)
125
+ - `@/.claude/lib/agent-executor.md` - Agent retry & escalation logic (used by /cdev) + Incremental testing execution
82
126
  - `@/.claude/lib/tdd-classifier.md` - TDD classification logic (used by /csetup)
83
- - `@/.claude/lib/flags-updater.md` - 🆕 Progress tracking protocol (Main Claude updates flags.json)
84
- - `@/.claude/lib/agent-router.md` - 🆕 Mandatory agent routing rules (enforce delegation)
127
+ - `@/.claude/lib/task-analyzer.md` - Task analysis with milestone generation
128
+ - `@/.claude/lib/flags-updater.md` - Progress tracking protocol (Main Claude updates flags.json)
129
+ - `@/.claude/lib/agent-router.md` - Mandatory agent routing rules (enforce delegation)
85
130
  - `@/.claude/contexts/patterns/agent-discovery.md` - Shared agent discovery flow
86
131
 
87
132
  ---
88
133
 
89
- ## 📚 Best Practices System
90
-
91
- **→ See:** `@/.claude/lib/detailed-guides/best-practices-system.md` for complete guide
134
+ ## 📚 Best Practices System (v1.8.0)
92
135
 
93
136
  **Quick Summary:**
94
- - Run `/agentsetup` → Auto-detects tech stack → Queries Context7 Generates framework-specific best practices
95
- - Files created in `.claude/contexts/domain/{project}/best-practices/` (React, Next.js, Prisma, etc.)
96
- - Agents auto-discover via 3-level indexing (domainprojectbest-practices)
97
- - Enforces code quality with framework-specific patterns
137
+ - `/csetup` **auto-detects tech stack** from: package.json design.mdproposal/tasks (3 sources)
138
+ - **Auto-generates best practices** from Context7 MCP (React, Next.js, Prisma, etc.)
139
+ - Files created in `.claude/contexts/domain/project/best-practices/`
140
+ - **Agents read** best practices before coding (validated by agent-executor)
141
+ - `/cdev` **injects** relevant best-practices paths into agent prompts
142
+
143
+ **Flow:**
144
+ ```
145
+ /csetup → detect stack → query Context7 → generate best-practices
146
+ /cdev → inject paths into prompt → agent reads → validation checks
147
+ ```
98
148
 
99
149
  ---
100
150
 
@@ -157,9 +207,9 @@ Universal, framework-agnostic template for AI-assisted development.
157
207
  **Quick Summary:**
158
208
  - **Problem:** Agents duplicate components (Navbar 3x), use random colors, lorem ipsum content, wrong decorations for page type
159
209
  - **Solution:** `/pageplan @prd.md @brief.md` → Generates `openspec/changes/{id}/page-plan.md` with:
160
- - **Auto page type detection** 🆕 (landing/dashboard/auth from proposal.md/tasks.md)
161
- - **tokens.json integration** 🆕 (style, theme, animations, decorative direction)
162
- - **Selective pattern loading** 🆕 (only load patterns relevant to page type)
210
+ - **Auto page type detection** (landing/dashboard/auth from proposal.md/tasks.md)
211
+ - **tokens.json integration** (style, theme, animations, decorative direction)
212
+ - **Selective pattern loading** (only load patterns relevant to page type)
163
213
  - Component reuse plan ✅ (prevent duplicates)
164
214
  - Buyer avatar analysis (Eugene Schwartz framework) **for marketing pages only**
165
215
  - Conversion-optimized content (pain → promise → CTA) **for marketing pages only**
@@ -192,6 +242,20 @@ Universal, framework-agnostic template for AI-assisted development.
192
242
 
193
243
  ---
194
244
 
245
+ ## 🔄 Incremental Testing (v1.6.0)
246
+
247
+ **→ See:** `@/.claude/lib/detailed-guides/incremental-testing.md` for complete guide
248
+
249
+ **Quick Summary:**
250
+ - **Problem:** All-or-nothing testing → bugs found at scale (1000 records) → hard to debug, expensive rework
251
+ - **Solution:** Milestone-based validation → Test 1 record → 10 → errors → scale → catch bugs early (75% faster debug)
252
+ - **3 Patterns:** Backend API (4 milestones), Complex Form (3 milestones), Database Migration (3 milestones)
253
+ - **Round-based Retry:** 2 attempts → Main Claude intervention (hints vs ask human) → new round (unlimited)
254
+ - **Detection:** Auto-triggered for Risk=HIGH OR (Risk=MEDIUM + Complexity≥7) OR External API OR Data-intensive (~20-30% of tasks)
255
+ - **Benefits:** 60-70% rework reduction, 40-50% net speedup, 90% success rate with progressive confidence
256
+
257
+ ---
258
+
195
259
  ## 🤖 Agent System
196
260
 
197
261
  **→ See:** `@/.claude/lib/detailed-guides/agent-system.md` for complete guide
@@ -199,7 +263,7 @@ Universal, framework-agnostic template for AI-assisted development.
199
263
  **Quick Summary:**
200
264
  - **6 specialist agents**: integration (validate contracts), uxui-frontend (UI with mock data), test-debug (tests/bugs), frontend (connect UI to API), backend (API endpoints), database (schemas/migrations)
201
265
  - **Main Claude's role**: Orchestrator (plan, coordinate, report), NOT implementer (no writing code directly)
202
- - **Self-check protocol**: MANDATORY checklist before ANY work (detect work type → select agent → delegate)
266
+ - **Self-check protocol**: Checklist before ANY work (detect work type → select agent → delegate)
203
267
  - **Agent pre-work**: STEP 0 (project discovery for ALL) + STEP 1-5 (design fundamentals for uxui-frontend only)
204
268
 
205
269
  **Example workflow:**
@@ -210,6 +274,164 @@ User: "Build login system"
210
274
  → Phase 2.5: integration (validate contracts)
211
275
  → Phase 3: frontend (connect UI to API)
212
276
  → Phase 4: test-debug (tests)
277
+ ```
278
+
279
+ ---
280
+
281
+ ## 🆕 v2.0.0: Claude 4.5 Optimization + Design System v2.0
282
+
283
+ **Based on:** [Claude 4 Best Practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-4-best-practices)
284
+
285
+ ### Claude 4.5 Changes Applied
286
+
287
+ | Before | After | WHY |
288
+ |--------|-------|-----|
289
+ | "MUST", "WILL BE REJECTED" | Professional tone | Claude 4.5 works better with respectful instructions |
290
+ | "Don't do X", "Never Y" | "Use X instead" | Positive instructions are clearer |
291
+ | Rules without context | Rules with WHY | Claude applies rules more intelligently |
292
+ | Duplicated content (6x) | Shared `_shared/` folder | 83% token reduction |
293
+ | ~1000 lines per agent | ~250-350 lines | 65% smaller |
294
+
295
+ ### New Shared Components
296
+
297
+ ```
298
+ .claude/agents/_shared/
299
+ ├── pre-work-checklist.md # Common validation steps
300
+ ├── package-manager.md # Package manager protocol
301
+ ├── documentation-policy.md # What files to create
302
+ ├── agent-boundaries.md # When to use which agent
303
+ └── README.md # Overview
304
+ ```
305
+
306
+ ### Token Savings
307
+
308
+ | Agent | Before | After | Reduction |
309
+ |-------|--------|-------|-----------|
310
+ | uxui-frontend | ~1037 | ~375 | 64% |
311
+ | integration | ~600 | ~210 | 65% |
312
+ | backend | ~700 | ~244 | 65% |
313
+ | database | ~680 | ~273 | 60% |
314
+ | frontend | ~650 | ~296 | 54% |
315
+ | test-debug | ~580 | ~252 | 57% |
316
+ | **Total** | **~4247** | **~1650** | **61%** |
317
+
318
+ Plus ~500 tokens in shared files = **~2150 total** (was ~4247)
319
+
320
+ ### Best Practices Applied
321
+
322
+ 1. **Tone Calibration** - Professional, direct (not aggressive)
323
+ 2. **Action Orientation** - Explicit "Write code" vs "Consider"
324
+ 3. **Prevent Overengineering** - Clear boundaries
325
+ 4. **Encourage Exploration** - Read before implementing
326
+ 5. **Rich Output When Needed** - Specify requirements
327
+ 6. **Context for Rules** - Explain WHY
328
+ 7. **Positive Instructions** - "Use X" not "Don't Y"
329
+
330
+ ### Additional Files Refactored
331
+
332
+ Beyond the 6 agent files, these supporting files were also updated:
333
+
334
+ **Implementation Logic (lib/):**
335
+ | File | Changes |
336
+ |------|---------|
337
+ | `agent-router.md` | Routing table format, removed "CANNOT/forbidden" language |
338
+ | `agent-executor.md` | Professional rejection messages, table format |
339
+ | `context-loading-protocol.md` | WHY explanations, removed "CRITICAL" warnings |
340
+ | `flags-updater.md` | Best practices table, removed "Step 3 CANNOT be skipped" |
341
+ | `document-loader.md` | Table format for DO/DON'T sections |
342
+ | `detailed-guides/agent-system.md` | Compact table format, shared file references |
343
+
344
+ **Commands:**
345
+ | File | Changes |
346
+ |------|---------|
347
+ | `cdev.md` | WHY context for best practices, softer tone |
348
+ | `csetup.md` | Best Practices / Anti-Patterns format |
349
+ | `pageplan.md` | "Guidelines" instead of "CRITICAL Rules" |
350
+ | `designsetup.md` | "Follow this format" instead of "EXACT format" |
351
+
352
+ **Patterns (contexts/patterns/):**
353
+ | File | Changes |
354
+ |------|---------|
355
+ | `validation-framework.md` | WHY explanations, removed "🚨" symbols |
356
+ | `error-recovery.md` | "⚠️" instead of "🚨", professional escalation format |
357
+ | `ui-component-consistency.md` | "Common Issues" instead of "Red Flags" |
358
+ | `task-breakdown.md` | Positive framing for incremental approach |
359
+ | `agent-discovery.md` | Softer language, "⚠️ Fallback" instead of "🚨" |
360
+ | `code-standards.md` | "File Creation Policy" with WHY table |
361
+ | `animation-patterns.md` | "⚠️ Common Mistakes" instead of "🚨" |
362
+ | `frontend-component-strategy.md` | "⚠️ Anti-Patterns" instead of "🚨" |
363
+ | `performance-optimization.md` | "⚠️ Common Mistakes" instead of "🚨" |
364
+ | `change-workflow.md` | Table format for read-only files |
365
+ | `task-classification.md` | "Agent Capabilities Reference" section title |
366
+
367
+ **Design (contexts/design/):**
368
+ | File | Changes |
369
+ |------|---------|
370
+ | `index.md` | "should check" instead of "MUST check" |
371
+ | `box-thinking.md` | "⚠️ Common Mistakes" instead of "🚨" |
372
+
373
+ **Templates:**
374
+ | File | Changes |
375
+ |------|---------|
376
+ | `phases-sections/frontend-mockup.md` | Table with WHY for design rules |
377
+ | `design-context-template.md` | "⚠️ Design Rules" instead of "🚨 Critical" |
378
+ | `STYLE_GUIDE.template.md` | "🔧 Troubleshooting" instead of "🚨" |
379
+
380
+ **Other lib files:**
381
+ | File | Changes |
382
+ |------|---------|
383
+ | `lib/README.md` | Softer descriptions, "📌 Important" |
384
+ | `detailed-guides/taskmaster-analysis.md` | "🔴 HIGH" instead of "🚨 HIGH" |
385
+
386
+ ---
387
+
388
+ ## 📊 PROJECT_STATUS.yml Protocol (v2.1.0)
389
+
390
+ **WHY this exists:** New Claude sessions lose context about infrastructure state, blockers, and priorities. This file provides a quick snapshot.
391
+
392
+ ### Session Start Behavior
393
+
394
+ If `PROJECT_STATUS.yml` exists in project root:
395
+ 1. Read it first before other files
396
+ 2. Note: `current_focus`, `blockers`, `infrastructure` state
397
+ 3. If `last_updated` > 7 days (or `_config.stale_warning_days`) → Suggest: "PROJECT_STATUS.yml may be outdated. Run /pstatus?"
398
+
399
+ ### Intelligent Update Prompts
400
+
401
+ Prompt "Update PROJECT_STATUS.yml?" when detecting these patterns:
402
+
403
+ | Event Detected | What to Update |
404
+ |----------------|----------------|
405
+ | After `/openspec:archive` completes | Add to `completed_changes` |
406
+ | User says "waiting for...", "need X from...", "blocked by..." | Add to `blockers` |
407
+ | User mentions blocker resolved | Remove from `blockers` |
408
+ | Infrastructure change (deploy, tunnel, DB migration) | Update `infrastructure` |
409
+ | User discusses priority shift | Update `next_priorities` |
410
+ | `/csetup {change-id}` started | Update `current_focus.active_change` |
411
+
412
+ ### Update Protocol
413
+
414
+ - Always ask before modifying (user confirms)
415
+ - Use `/pstatus` for comprehensive review
416
+ - Keep updates atomic (one section at a time during work)
417
+ - Auto-detect archived changes not listed and suggest additions
418
+
419
+ ### Example Interaction
420
+
421
+ ```
422
+ # Session start
423
+ Claude: *reads PROJECT_STATUS.yml*
424
+ Claude: "I see auth-system is active, tunnel running but waiting for domain."
425
+
426
+ # During work
427
+ User: "Domain is now configured"
428
+ Claude: "Update PROJECT_STATUS.yml?
429
+ - Remove 'domain' from blockers
430
+ - Update cloudflare_tunnel.waiting_for to null"
431
+
432
+ # After archiving
433
+ Claude: "Auth-system archived. Add to completed_changes?"
434
+ ```
213
435
 
214
436
  ---
215
437