claude-mpm 5.4.59__py3-none-any.whl → 5.4.71__py3-none-any.whl

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 (150) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/CLAUDE_MPM_OUTPUT_STYLE.md +63 -241
  3. claude_mpm/agents/CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md +109 -1925
  4. claude_mpm/agents/PM_INSTRUCTIONS.md +36 -9
  5. claude_mpm/cli/__init__.py +5 -1
  6. claude_mpm/cli/executor.py +1 -0
  7. claude_mpm/cli/parsers/base_parser.py +5 -0
  8. claude_mpm/cli/startup.py +58 -35
  9. claude_mpm/core/output_style_manager.py +5 -5
  10. claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-312.pyc +0 -0
  11. claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-312.pyc +0 -0
  12. claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-312.pyc +0 -0
  13. claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-312.pyc +0 -0
  14. claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-312.pyc +0 -0
  15. claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-312.pyc +0 -0
  16. claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-312.pyc +0 -0
  17. claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-312.pyc +0 -0
  18. claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-312.pyc +0 -0
  19. claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-312.pyc +0 -0
  20. claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-312.pyc +0 -0
  21. claude_mpm/scripts/start_activity_logging.py +0 -0
  22. claude_mpm/services/agents/deployment/agent_template_builder.py +8 -0
  23. claude_mpm/services/agents/startup_sync.py +5 -2
  24. claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +79 -0
  25. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +178 -0
  26. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +577 -0
  27. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +467 -0
  28. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +537 -0
  29. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +730 -0
  30. claude_mpm/skills/bundled/collaboration/git-worktrees.md +317 -0
  31. claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +112 -0
  32. claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +146 -0
  33. claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +412 -0
  34. claude_mpm/skills/bundled/collaboration/stacked-prs.md +251 -0
  35. claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +81 -0
  36. claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +362 -0
  37. claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +312 -0
  38. claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +152 -0
  39. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/advanced-techniques.md +668 -0
  40. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/examples.md +587 -0
  41. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/integration.md +438 -0
  42. claude_mpm/skills/bundled/debugging/root-cause-tracing/references/tracing-techniques.md +391 -0
  43. claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
  44. claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
  45. claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
  46. claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
  47. claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
  48. claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
  49. claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
  50. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
  51. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
  52. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
  53. claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +131 -0
  54. claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +325 -0
  55. claude_mpm/skills/bundled/debugging/verification-before-completion/references/integration-and-workflows.md +490 -0
  56. claude_mpm/skills/bundled/debugging/verification-before-completion/references/red-flags-and-failures.md +425 -0
  57. claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +499 -0
  58. claude_mpm/skills/bundled/infrastructure/env-manager/INTEGRATION.md +611 -0
  59. claude_mpm/skills/bundled/infrastructure/env-manager/README.md +596 -0
  60. claude_mpm/skills/bundled/infrastructure/env-manager/SKILL.md +260 -0
  61. claude_mpm/skills/bundled/infrastructure/env-manager/examples/nextjs-env-structure.md +315 -0
  62. claude_mpm/skills/bundled/infrastructure/env-manager/references/frameworks.md +436 -0
  63. claude_mpm/skills/bundled/infrastructure/env-manager/references/security.md +433 -0
  64. claude_mpm/skills/bundled/infrastructure/env-manager/references/synchronization.md +452 -0
  65. claude_mpm/skills/bundled/infrastructure/env-manager/references/troubleshooting.md +404 -0
  66. claude_mpm/skills/bundled/infrastructure/env-manager/references/validation.md +420 -0
  67. claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +86 -0
  68. claude_mpm/skills/bundled/main/internal-comms/SKILL.md +43 -0
  69. claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
  70. claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
  71. claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
  72. claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
  73. claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +160 -0
  74. claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +412 -0
  75. claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
  76. claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
  77. claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
  78. claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
  79. claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +1237 -0
  80. claude_mpm/skills/bundled/main/skill-creator/SKILL.md +189 -0
  81. claude_mpm/skills/bundled/main/skill-creator/references/best-practices.md +500 -0
  82. claude_mpm/skills/bundled/main/skill-creator/references/creation-workflow.md +464 -0
  83. claude_mpm/skills/bundled/main/skill-creator/references/examples.md +619 -0
  84. claude_mpm/skills/bundled/main/skill-creator/references/progressive-disclosure.md +437 -0
  85. claude_mpm/skills/bundled/main/skill-creator/references/skill-structure.md +231 -0
  86. claude_mpm/skills/bundled/php/espocrm-development/SKILL.md +170 -0
  87. claude_mpm/skills/bundled/php/espocrm-development/references/architecture.md +602 -0
  88. claude_mpm/skills/bundled/php/espocrm-development/references/common-tasks.md +821 -0
  89. claude_mpm/skills/bundled/php/espocrm-development/references/development-workflow.md +742 -0
  90. claude_mpm/skills/bundled/php/espocrm-development/references/frontend-customization.md +726 -0
  91. claude_mpm/skills/bundled/php/espocrm-development/references/hooks-and-services.md +764 -0
  92. claude_mpm/skills/bundled/php/espocrm-development/references/testing-debugging.md +831 -0
  93. claude_mpm/skills/bundled/pm/pm-delegation-patterns/SKILL.md +167 -0
  94. claude_mpm/skills/bundled/pm/pm-git-file-tracking/SKILL.md +113 -0
  95. claude_mpm/skills/bundled/pm/pm-pr-workflow/SKILL.md +124 -0
  96. claude_mpm/skills/bundled/pm/pm-teaching-mode/SKILL.md +657 -0
  97. claude_mpm/skills/bundled/pm/pm-ticketing-integration/SKILL.md +154 -0
  98. claude_mpm/skills/bundled/pm/pm-verification-protocols/SKILL.md +198 -0
  99. claude_mpm/skills/bundled/react/flexlayout-react.md +742 -0
  100. claude_mpm/skills/bundled/rust/desktop-applications/SKILL.md +226 -0
  101. claude_mpm/skills/bundled/rust/desktop-applications/references/architecture-patterns.md +901 -0
  102. claude_mpm/skills/bundled/rust/desktop-applications/references/native-gui-frameworks.md +901 -0
  103. claude_mpm/skills/bundled/rust/desktop-applications/references/platform-integration.md +775 -0
  104. claude_mpm/skills/bundled/rust/desktop-applications/references/state-management.md +937 -0
  105. claude_mpm/skills/bundled/rust/desktop-applications/references/tauri-framework.md +770 -0
  106. claude_mpm/skills/bundled/rust/desktop-applications/references/testing-deployment.md +961 -0
  107. claude_mpm/skills/bundled/tauri/tauri-async-patterns.md +495 -0
  108. claude_mpm/skills/bundled/tauri/tauri-build-deploy.md +599 -0
  109. claude_mpm/skills/bundled/tauri/tauri-command-patterns.md +535 -0
  110. claude_mpm/skills/bundled/tauri/tauri-error-handling.md +613 -0
  111. claude_mpm/skills/bundled/tauri/tauri-event-system.md +648 -0
  112. claude_mpm/skills/bundled/tauri/tauri-file-system.md +673 -0
  113. claude_mpm/skills/bundled/tauri/tauri-frontend-integration.md +767 -0
  114. claude_mpm/skills/bundled/tauri/tauri-performance.md +669 -0
  115. claude_mpm/skills/bundled/tauri/tauri-state-management.md +573 -0
  116. claude_mpm/skills/bundled/tauri/tauri-testing.md +384 -0
  117. claude_mpm/skills/bundled/tauri/tauri-window-management.md +628 -0
  118. claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +119 -0
  119. claude_mpm/skills/bundled/testing/condition-based-waiting/references/patterns-and-implementation.md +253 -0
  120. claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
  121. claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
  122. claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
  123. claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
  124. claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
  125. claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
  126. claude_mpm/skills/bundled/testing/test-quality-inspector/SKILL.md +458 -0
  127. claude_mpm/skills/bundled/testing/test-quality-inspector/examples/example-inspection-report.md +411 -0
  128. claude_mpm/skills/bundled/testing/test-quality-inspector/references/assertion-quality.md +317 -0
  129. claude_mpm/skills/bundled/testing/test-quality-inspector/references/inspection-checklist.md +270 -0
  130. claude_mpm/skills/bundled/testing/test-quality-inspector/references/red-flags.md +436 -0
  131. claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +140 -0
  132. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +572 -0
  133. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +411 -0
  134. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +569 -0
  135. claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +695 -0
  136. claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +184 -0
  137. claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +459 -0
  138. claude_mpm/skills/bundled/testing/webapp-testing/playwright-patterns.md +479 -0
  139. claude_mpm/skills/bundled/testing/webapp-testing/reconnaissance-pattern.md +687 -0
  140. claude_mpm/skills/bundled/testing/webapp-testing/server-management.md +758 -0
  141. claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +868 -0
  142. claude_mpm/utils/agent_dependency_loader.py +99 -2
  143. claude_mpm/utils/robust_installer.py +35 -18
  144. {claude_mpm-5.4.59.dist-info → claude_mpm-5.4.71.dist-info}/METADATA +21 -15
  145. {claude_mpm-5.4.59.dist-info → claude_mpm-5.4.71.dist-info}/RECORD +149 -20
  146. {claude_mpm-5.4.59.dist-info → claude_mpm-5.4.71.dist-info}/WHEEL +0 -0
  147. {claude_mpm-5.4.59.dist-info → claude_mpm-5.4.71.dist-info}/entry_points.txt +0 -0
  148. {claude_mpm-5.4.59.dist-info → claude_mpm-5.4.71.dist-info}/licenses/LICENSE +0 -0
  149. {claude_mpm-5.4.59.dist-info → claude_mpm-5.4.71.dist-info}/licenses/LICENSE-FAQ.md +0 -0
  150. {claude_mpm-5.4.59.dist-info → claude_mpm-5.4.71.dist-info}/top_level.txt +0 -0
@@ -7,6 +7,17 @@
7
7
 
8
8
  The Project Manager (PM) agent coordinates work across specialized agents in the Claude MPM framework. The PM's responsibility is orchestration and quality assurance, not direct execution.
9
9
 
10
+ ## 🔴 ABSOLUTE PROHIBITIONS 🔴
11
+
12
+ **PM must NEVER:**
13
+ 1. Read source code files (`.py`, `.js`, `.ts`, `.tsx`, etc.) - DELEGATE to Research
14
+ 2. Use Read tool more than ONCE per session - DELEGATE to Research
15
+ 3. Investigate, debug, or analyze code directly - DELEGATE to Research
16
+ 4. Use Edit/Write tools on any file - DELEGATE to Engineer
17
+ 5. Run verification commands (curl, lsof) - DELEGATE to local-ops
18
+
19
+ **Violation of any prohibition = Circuit Breaker triggered**
20
+
10
21
  ### Why Delegation Matters
11
22
 
12
23
  The PM delegates all work to specialized agents for three key reasons:
@@ -315,22 +326,31 @@ TodoWrite:
315
326
 
316
327
  ### Read Tool Usage (Strict Hierarchy)
317
328
 
318
- **DEFAULT**: Zero reads - delegate to Research instead.
329
+ **ABSOLUTE PROHIBITION**: PM must NEVER read source code files directly.
330
+
331
+ **Source code extensions** (ALWAYS delegate to Research):
332
+ `.py`, `.js`, `.ts`, `.tsx`, `.jsx`, `.go`, `.rs`, `.java`, `.rb`, `.php`, `.swift`, `.kt`, `.c`, `.cpp`, `.h`
319
333
 
320
334
  **SINGLE EXCEPTION**: ONE config/settings file for delegation context only.
335
+ - Allowed: `package.json`, `pyproject.toml`, `settings.json`, `.env.example`
336
+ - NOT allowed: Any file with source code extensions above
337
+
338
+ **Pre-Flight Check (MANDATORY before ANY Read call)**:
339
+ 1. Is this a source code file? → STOP, delegate to Research
340
+ 2. Have I already used Read once this session? → STOP, delegate to Research
341
+ 3. Does my task contain investigation keywords? → STOP, delegate to Research
342
+
343
+ **Investigation Keywords** (trigger delegation, not Read):
344
+ - check, look, see, find, search, analyze, investigate, debug
345
+ - understand, explore, examine, review, inspect, trace
346
+ - "what does", "how does", "why does", "where is"
321
347
 
322
348
  **Rules**:
323
349
  - ✅ Allowed: ONE file (`package.json`, `pyproject.toml`, `settings.json`, `.env.example`)
324
- - ❌ Forbidden: Source code (`.py`, `.js`, `.ts`, `.tsx`, `.go`, `.rs`)
325
- - ❌ Forbidden: Multiple files OR investigation keywords ("check", "analyze", "debug", "investigate")
350
+ - ❌ NEVER: Source code (`.py`, `.js`, `.ts`, `.tsx`, `.go`, `.rs`)
351
+ - ❌ NEVER: Multiple files OR investigation keywords ("check", "analyze", "debug", "investigate")
326
352
  - **Rationale**: Reading leads to investigating. PM must delegate, not do.
327
353
 
328
- **Before Using Read, Check**:
329
- 1. Investigation keywords present? → Delegate to Research (zero reads)
330
- 2. Source code file? → Delegate to Research
331
- 3. Already used Read once? → Violation - delegate to Research
332
- 4. Purpose is delegation context (not understanding)? → ONE Read allowed
333
-
334
354
  ## Agent Deployment Architecture
335
355
 
336
356
  ### Cache Structure
@@ -1306,6 +1326,13 @@ PM: *Delegates to Research* # ✅ CORRECT: If vector search insufficient
1306
1326
  **Action**: BLOCK - Must delegate to Research instead
1307
1327
  **Enforcement**: Violation #1 = Warning, #2 = Session flagged, #3 = Non-compliant
1308
1328
 
1329
+ **Proactive Self-Check (PM must ask before EVERY Read call)**:
1330
+ 1. "Is this file a source code file?" → If yes, DELEGATE
1331
+ 2. "Have I already used Read this session?" → If yes, DELEGATE
1332
+ 3. "Am I investigating/debugging?" → If yes, DELEGATE
1333
+
1334
+ If ANY answer is YES → Do NOT use Read, delegate to Research instead.
1335
+
1309
1336
  **Allowed Exception:**
1310
1337
  - ONE config file read (package.json, pyproject.toml, settings.json, .env.example)
1311
1338
  - Purpose: Delegation context ONLY (not investigation)
@@ -91,7 +91,11 @@ def main(argv: Optional[list] = None):
91
91
  )
92
92
 
93
93
  try:
94
- run_background_services()
94
+ # Check for --force-sync flag or environment variable
95
+ force_sync = getattr(args, "force_sync", False) or os.environ.get(
96
+ "CLAUDE_MPM_FORCE_SYNC", "0"
97
+ ) in ("1", "true", "True", "yes")
98
+ run_background_services(force_sync=force_sync)
95
99
  launch_progress.finish(message="Ready")
96
100
 
97
101
  # Inform user about Claude Code initialization delay (3-5 seconds)
@@ -66,6 +66,7 @@ def ensure_run_attributes(args):
66
66
  args.monitor = getattr(args, "monitor", False)
67
67
  args.force = getattr(args, "force", False)
68
68
  args.reload_agents = getattr(args, "reload_agents", False)
69
+ args.force_sync = getattr(args, "force_sync", False)
69
70
  # Include dependency checking attributes
70
71
  args.check_dependencies = getattr(args, "check_dependencies", True)
71
72
  args.force_check_dependencies = getattr(args, "force_check_dependencies", False)
@@ -292,6 +292,11 @@ def add_top_level_run_arguments(parser: argparse.ArgumentParser) -> None:
292
292
  action="store_true",
293
293
  help="Force rebuild of all system agents by deleting local claude-mpm agents",
294
294
  )
295
+ run_group.add_argument(
296
+ "--force-sync",
297
+ action="store_true",
298
+ help="Force refresh agents and skills from remote repos, bypassing ETag cache",
299
+ )
295
300
 
296
301
  # Dependency checking options (for backward compatibility at top level)
297
302
  dep_group_top = parser.add_argument_group(
claude_mpm/cli/startup.py CHANGED
@@ -308,12 +308,12 @@ def deploy_output_style_on_startup():
308
308
  communication without emojis and exclamation points. Styles are project-specific
309
309
  to allow different projects to have different communication styles.
310
310
 
311
- DESIGN DECISION: This is non-blocking and idempotent. Deploys to project-level
312
- directory (.claude/settings/output-styles/) instead of user-level to maintain
313
- project isolation.
311
+ DESIGN DECISION: This is non-blocking and idempotent. Deploys to user-level
312
+ directory (~/.claude/output-styles/) which is the official Claude Code location
313
+ for custom output styles.
314
314
 
315
315
  Deploys two styles:
316
- - claude-mpm-style.md (professional mode)
316
+ - claude-mpm.md (professional mode)
317
317
  - claude-mpm-teacher.md (teaching mode)
318
318
  """
319
319
  try:
@@ -325,24 +325,29 @@ def deploy_output_style_on_startup():
325
325
  professional_source = package_dir / "CLAUDE_MPM_OUTPUT_STYLE.md"
326
326
  teacher_source = package_dir / "CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md"
327
327
 
328
- # Target directory (PROJECT-LEVEL, not user-level)
329
- project_dir = Path.cwd()
330
- output_styles_dir = project_dir / ".claude" / "settings" / "output-styles"
331
- professional_target = output_styles_dir / "claude-mpm-style.md"
328
+ # Target directory (USER-LEVEL for global availability)
329
+ # Claude Code reads output styles from ~/.claude/output-styles/
330
+ user_home = Path.home()
331
+ output_styles_dir = user_home / ".claude" / "output-styles"
332
+ professional_target = output_styles_dir / "claude-mpm.md"
332
333
  teacher_target = output_styles_dir / "claude-mpm-teacher.md"
333
334
 
334
335
  # Create directory if it doesn't exist
335
336
  output_styles_dir.mkdir(parents=True, exist_ok=True)
336
337
 
337
- # Check if already deployed (both files exist and have content)
338
- already_deployed = (
338
+ # Check if already deployed AND up-to-date (compare sizes to detect changes)
339
+ professional_up_to_date = (
339
340
  professional_target.exists()
340
- and teacher_target.exists()
341
- and professional_target.stat().st_size > 0
342
- and teacher_target.stat().st_size > 0
341
+ and professional_source.exists()
342
+ and professional_target.stat().st_size == professional_source.stat().st_size
343
+ )
344
+ teacher_up_to_date = (
345
+ teacher_target.exists()
346
+ and teacher_source.exists()
347
+ and teacher_target.stat().st_size == teacher_source.stat().st_size
343
348
  )
344
349
 
345
- if already_deployed:
350
+ if professional_up_to_date and teacher_up_to_date:
346
351
  # Show feedback that output styles are ready
347
352
  print("✓ Output styles ready", flush=True)
348
353
  return
@@ -453,7 +458,7 @@ def _cleanup_orphaned_agents(deploy_target: Path, deployed_agents: list[str]) ->
453
458
  return removed_count
454
459
 
455
460
 
456
- def sync_remote_agents_on_startup():
461
+ def sync_remote_agents_on_startup(force_sync: bool = False):
457
462
  """
458
463
  Synchronize agent templates from remote sources on startup.
459
464
 
@@ -466,16 +471,16 @@ def sync_remote_agents_on_startup():
466
471
  block startup to ensure claude-mpm remains functional.
467
472
 
468
473
  Workflow:
469
- 1. Cleanup legacy agent cache directories (if any)
470
- 2. Sync all enabled Git sources (download/cache files) - Phase 1 progress bar
471
- 3. Deploy agents to ~/.claude/agents/ - Phase 2 progress bar
472
- 4. Cleanup orphaned agents (ours but no longer deployed) - Phase 3
474
+ 1. Sync all enabled Git sources (download/cache files) - Phase 1 progress bar
475
+ 2. Deploy agents to ~/.claude/agents/ - Phase 2 progress bar
476
+ 3. Cleanup orphaned agents (ours but no longer deployed) - Phase 3
477
+ 4. Cleanup legacy agent cache directories (after sync/deployment) - Phase 4
473
478
  5. Log deployment results
474
- """
475
- # Cleanup legacy cache directories first (before syncing)
476
- cleanup_legacy_agent_cache()
477
479
 
478
- # DEPRECATED: Legacy warning - replaced by automatic cleanup above
480
+ Args:
481
+ force_sync: Force download even if cache is fresh (bypasses ETag).
482
+ """
483
+ # DEPRECATED: Legacy warning - no-op function, kept for compatibility
479
484
  check_legacy_cache()
480
485
 
481
486
  try:
@@ -509,7 +514,7 @@ def sync_remote_agents_on_startup():
509
514
  )
510
515
 
511
516
  # Phase 1: Sync files from Git sources
512
- result = sync_agents_on_startup()
517
+ result = sync_agents_on_startup(force_refresh=force_sync)
513
518
 
514
519
  # Only proceed with deployment if sync was enabled and ran
515
520
  if result.get("enabled") and result.get("sources_synced", 0) > 0:
@@ -695,7 +700,8 @@ def sync_remote_agents_on_startup():
695
700
  agent_files = [
696
701
  f
697
702
  for f in all_md_files
698
- if (
703
+ if
704
+ (
699
705
  # Must be in an agent directory
700
706
  # Supports: cache/agents/{category}/... (flat)
701
707
  # Supports: cache/agents/{owner}/{repo}/agents/{category}/... (GitHub sync)
@@ -838,6 +844,11 @@ def sync_remote_agents_on_startup():
838
844
  logger = get_logger("cli")
839
845
  logger.warning(f"Failed to deploy agents from cache: {e}")
840
846
 
847
+ # Phase 4: Cleanup legacy agent cache directories (after sync/deployment)
848
+ # CRITICAL: This must run AFTER sync completes because sync may recreate
849
+ # legacy directories. Running cleanup here ensures they're removed.
850
+ cleanup_legacy_agent_cache()
851
+
841
852
  except Exception as e:
842
853
  # Non-critical - log but don't fail startup
843
854
  from ..core.logger import get_logger
@@ -846,8 +857,14 @@ def sync_remote_agents_on_startup():
846
857
  logger.debug(f"Failed to sync remote agents: {e}")
847
858
  # Continue execution - agent sync failure shouldn't block startup
848
859
 
860
+ # Cleanup legacy cache even if sync failed
861
+ try:
862
+ cleanup_legacy_agent_cache()
863
+ except Exception:
864
+ pass # Ignore cleanup errors
849
865
 
850
- def sync_remote_skills_on_startup():
866
+
867
+ def sync_remote_skills_on_startup(force_sync: bool = False):
851
868
  """
852
869
  Synchronize skill templates from remote sources on startup.
853
870
 
@@ -865,6 +882,9 @@ def sync_remote_skills_on_startup():
865
882
  4. Apply profile filtering if active
866
883
  5. Deploy resolved skills to ~/.claude/skills/ - Phase 2 progress bar
867
884
  6. Log deployment results with source indication
885
+
886
+ Args:
887
+ force_sync: Force download even if cache is fresh (bypasses ETag).
868
888
  """
869
889
  try:
870
890
  from pathlib import Path
@@ -970,7 +990,7 @@ def sync_remote_skills_on_startup():
970
990
 
971
991
  # Sync all sources with progress callback
972
992
  results = manager.sync_all_sources(
973
- force=False, progress_callback=sync_progress.update
993
+ force=force_sync, progress_callback=sync_progress.update
974
994
  )
975
995
 
976
996
  # Finish sync progress bar with clear breakdown
@@ -1068,9 +1088,7 @@ def sync_remote_skills_on_startup():
1068
1088
  total_skill_count = len(all_skills)
1069
1089
 
1070
1090
  # Determine skill count based on resolution
1071
- skill_count = (
1072
- len(skills_to_deploy) if skills_to_deploy else total_skill_count
1073
- )
1091
+ skill_count = len(skills_to_deploy) if skills_to_deploy else total_skill_count
1074
1092
 
1075
1093
  if skill_count > 0:
1076
1094
  # Deploy skills with resolved filter
@@ -1081,11 +1099,13 @@ def sync_remote_skills_on_startup():
1081
1099
  # Deploy to project-local directory with cleanup
1082
1100
  deployment_result = manager.deploy_skills(
1083
1101
  target_dir=Path.cwd() / ".claude" / "skills",
1084
- force=False,
1102
+ force=force_sync,
1085
1103
  # CRITICAL FIX: Empty list should mean "deploy no skills", not "deploy all"
1086
1104
  # When skills_to_deploy is [], we want skill_filter=set() NOT skill_filter=None
1087
1105
  # None means "no filtering" (deploy all), empty set means "filter to nothing"
1088
- skill_filter=set(skills_to_deploy) if skills_to_deploy is not None else None,
1106
+ skill_filter=set(skills_to_deploy)
1107
+ if skills_to_deploy is not None
1108
+ else None,
1089
1109
  )
1090
1110
 
1091
1111
  # REMOVED: User-level deployment (lines 1068-1074)
@@ -1423,7 +1443,7 @@ def auto_install_chrome_devtools_on_startup():
1423
1443
  # Continue execution - chrome-devtools installation failure shouldn't block startup
1424
1444
 
1425
1445
 
1426
- def run_background_services():
1446
+ def run_background_services(force_sync: bool = False):
1427
1447
  """
1428
1448
  Initialize all background services on startup.
1429
1449
 
@@ -1434,6 +1454,9 @@ def run_background_services():
1434
1454
  explicitly requests them via agent-manager commands. This prevents unwanted
1435
1455
  file creation in project .claude/ directories.
1436
1456
  See: SystemInstructionsDeployer and agent_deployment.py line 504-509
1457
+
1458
+ Args:
1459
+ force_sync: Force download even if cache is fresh (bypasses ETag).
1437
1460
  """
1438
1461
  # Sync hooks early to ensure up-to-date configuration
1439
1462
  # RATIONALE: Hooks should be synced before other services to fix stale configs
@@ -1444,7 +1467,7 @@ def run_background_services():
1444
1467
  check_mcp_auto_configuration()
1445
1468
  verify_mcp_gateway_startup()
1446
1469
  check_for_updates_async()
1447
- sync_remote_agents_on_startup() # Sync agents from remote sources
1470
+ sync_remote_agents_on_startup(force_sync=force_sync) # Sync agents from remote sources
1448
1471
  show_agent_summary() # Display agent counts after deployment
1449
1472
 
1450
1473
  # Skills deployment order (precedence: remote > bundled)
@@ -1453,7 +1476,7 @@ def run_background_services():
1453
1476
  # 3. Discover and link runtime skills (user-added skills)
1454
1477
  # This ensures remote skills take precedence over bundled skills when names conflict
1455
1478
  deploy_bundled_skills() # Base layer: package-bundled skills
1456
- sync_remote_skills_on_startup() # Override layer: Git-based skills (takes precedence)
1479
+ sync_remote_skills_on_startup(force_sync=force_sync) # Override layer: Git-based skills (takes precedence)
1457
1480
  discover_and_link_runtime_skills() # Discovery: user-added skills
1458
1481
  show_skill_summary() # Display skill counts after deployment
1459
1482
  verify_and_show_pm_skills() # PM skills verification and status
@@ -43,7 +43,7 @@ class OutputStyleManager:
43
43
 
44
44
  Supports two output styles:
45
45
  - professional: Default Claude MPM style (claude-mpm.md)
46
- - teaching: Adaptive teaching mode (claude-mpm-teach.md)
46
+ - teaching: Adaptive teaching mode (claude-mpm-teacher.md)
47
47
  """
48
48
 
49
49
  def __init__(self) -> None:
@@ -51,8 +51,8 @@ class OutputStyleManager:
51
51
  self.logger = get_logger("output_style_manager") # type: ignore[misc]
52
52
  self.claude_version = self._detect_claude_version()
53
53
 
54
- # Deploy to ~/.claude/styles/ directory (NOT output-styles/)
55
- self.output_style_dir = Path.home() / ".claude" / "styles"
54
+ # Deploy to ~/.claude/output-styles/ directory (official Claude Code location)
55
+ self.output_style_dir = Path.home() / ".claude" / "output-styles"
56
56
  self.settings_file = Path.home() / ".claude" / "settings.json"
57
57
 
58
58
  # Style definitions
@@ -68,8 +68,8 @@ class OutputStyleManager:
68
68
  source=Path(__file__).parent.parent
69
69
  / "agents"
70
70
  / "CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md",
71
- target=self.output_style_dir / "claude-mpm-teach.md",
72
- name="claude-mpm-teach",
71
+ target=self.output_style_dir / "claude-mpm-teacher.md",
72
+ name="claude-mpm-teacher",
73
73
  ),
74
74
  }
75
75
 
File without changes
@@ -586,6 +586,14 @@ class AgentTemplateBuilder:
586
586
  tags_str = ",".join(metadata["tags"])
587
587
  frontmatter_lines.append(f"tags: {tags_str}")
588
588
 
589
+ # CRITICAL: Preserve skills field from template for selective skill deployment
590
+ # Skills are used by startup.py to determine which skills to deploy
591
+ skills = template_data.get("skills", [])
592
+ if skills and isinstance(skills, list):
593
+ frontmatter_lines.append("skills:")
594
+ for skill in skills:
595
+ frontmatter_lines.append(f"- {skill}")
596
+
589
597
  frontmatter_lines.extend(
590
598
  [
591
599
  "---",
@@ -32,7 +32,9 @@ from claude_mpm.services.agents.sources.git_source_sync_service import (
32
32
  logger = logging.getLogger(__name__)
33
33
 
34
34
 
35
- def sync_agents_on_startup(config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
35
+ def sync_agents_on_startup(
36
+ config: Optional[Dict[str, Any]] = None, force_refresh: bool = False
37
+ ) -> Dict[str, Any]:
36
38
  """Synchronize agents from remote sources on Claude MPM startup.
37
39
 
38
40
  Design Decision: Single-source support for Stage 1
@@ -44,6 +46,7 @@ def sync_agents_on_startup(config: Optional[Dict[str, Any]] = None) -> Dict[str,
44
46
 
45
47
  Args:
46
48
  config: Optional configuration dictionary. If None, loads from Config singleton.
49
+ force_refresh: Force download even if cache is fresh (bypasses ETag).
47
50
 
48
51
  Returns:
49
52
  Dictionary with sync results:
@@ -156,7 +159,7 @@ def sync_agents_on_startup(config: Optional[Dict[str, Any]] = None) -> Dict[str,
156
159
  )
157
160
 
158
161
  # Perform sync
159
- sync_result = sync_service.sync_agents(force_refresh=False)
162
+ sync_result = sync_service.sync_agents(force_refresh=force_refresh)
160
163
 
161
164
  # Aggregate results
162
165
  result["sources_synced"] += 1
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: Brainstorming Ideas Into Designs
3
+ description: Interactive idea refinement using Socratic method to develop fully-formed designs
4
+ when_to_use: when partner describes any feature or project idea, before writing code or implementation plans
5
+ version: 2.2.0
6
+ progressive_disclosure:
7
+ level: 1
8
+ references: []
9
+ note: Already optimal at 75 lines - intentionally compact, no references needed
10
+ ---
11
+
12
+ # Brainstorming Ideas Into Designs
13
+
14
+ ## Overview
15
+
16
+ Transform rough ideas into fully-formed designs through structured questioning and alternative exploration.
17
+
18
+ **Core principle:** Ask questions to understand, explore alternatives, present design incrementally for validation.
19
+
20
+ **Announce at start:** "I'm using the Brainstorming skill to refine your idea into a design."
21
+
22
+ ## The Process
23
+
24
+ ### Phase 1: Understanding
25
+ - Check current project state in working directory
26
+ - Ask ONE question at a time to refine the idea
27
+ - Prefer multiple choice when possible
28
+ - Gather: Purpose, constraints, success criteria
29
+
30
+ ### Phase 2: Exploration
31
+ - Propose 2-3 different approaches
32
+ - For each: Core architecture, trade-offs, complexity assessment
33
+ - Ask your human partner which approach resonates
34
+
35
+ ### Phase 3: Design Presentation
36
+ - Present in 200-300 word sections
37
+ - Cover: Architecture, components, data flow, error handling, testing
38
+ - Ask after each section: "Does this look right so far?"
39
+
40
+ ### Phase 4: Worktree Setup (for implementation)
41
+ When design is approved and implementation will follow:
42
+ - Announce: "I'm using the Using Git Worktrees skill to set up an isolated workspace."
43
+ - Switch to skills/collaboration/using-git-worktrees
44
+ - Follow that skill's process for directory selection, safety verification, and setup
45
+ - Return here when worktree ready
46
+
47
+ ### Phase 5: Planning Handoff
48
+ Ask: "Ready to create the implementation plan?"
49
+
50
+ When your human partner confirms (any affirmative response):
51
+ - Announce: "I'm using the Writing Plans skill to create the implementation plan."
52
+ - Switch to skills/collaboration/writing-plans skill
53
+ - Create detailed plan in the worktree
54
+
55
+ ## When to Revisit Earlier Phases
56
+
57
+ **You can and should go backward when:**
58
+ - Partner reveals new constraint during Phase 2 or 3 → Return to Phase 1 to understand it
59
+ - Validation shows fundamental gap in requirements → Return to Phase 1
60
+ - Partner questions approach during Phase 3 → Return to Phase 2 to explore alternatives
61
+ - Something doesn't make sense → Go back and clarify
62
+
63
+ **Don't force forward linearly** when going backward would give better results.
64
+
65
+ ## Related Skills
66
+
67
+ **During exploration:**
68
+ - When approaches have genuine trade-offs: skills/architecture/preserving-productive-tensions
69
+
70
+ **Before proposing changes to existing code:**
71
+ - Understand why it exists: skills/research/tracing-knowledge-lineages
72
+
73
+ ## Remember
74
+ - One question per message during Phase 1
75
+ - Apply YAGNI ruthlessly
76
+ - Explore 2-3 alternatives before settling
77
+ - Present incrementally, validate as you go
78
+ - Go backward when needed - flexibility > rigid progression
79
+ - Announce skill usage at start