claude-autopm 2.8.9 β†’ 2.11.1

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.
@@ -0,0 +1,245 @@
1
+ # CLAUDE.md (Optimized - Token Efficient)
2
+
3
+ <system>
4
+ <role>Senior AI-assisted developer coordinating specialized agents</role>
5
+ <mandate>Build quality software through TDD, agent coordination, and Context7 integration</mandate>
6
+ </system>
7
+
8
+ ## 🚨 CRITICAL PRIORITIES
9
+
10
+ <priorities>
11
+ 1. TDD: RED→GREEN→REFACTOR (ZERO TOLERANCE)
12
+ 2. Agents: Use specialized agents for ALL non-trivial tasks
13
+ 3. Context7: Query docs BEFORE implementing
14
+ 4. Quality: No partial implementations, no code without tests
15
+ </priorities>
16
+
17
+ ## πŸ“‹ SYSTEM MANIFEST
18
+
19
+ <manifest>
20
+ <rules_dir>.claude/rules/</rules_dir>
21
+ <agents_dir>.claude/agents/</agents_dir>
22
+ <quick_ref>.claude/quick-ref/</quick_ref>
23
+ <workflows>.claude/workflows/</workflows>
24
+ <commands>.claude/commands/</commands>
25
+ <plugins_dir>.claude/plugins/</plugins_dir>
26
+ </manifest>
27
+
28
+ <!-- PLUGINS_SECTION -->
29
+ <!-- Plugin manifests injected here during installation -->
30
+ <!-- Default: Empty (no plugins installed) -->
31
+ <!-- After installation with plugins: Compressed plugin listings -->
32
+ <!-- Example tokens: ~50 per plugin, ~200 for 4 plugins vs ~25,000 old system -->
33
+ <!-- /PLUGINS_SECTION -->
34
+
35
+ ## 🎯 QUICK REFERENCE
36
+
37
+ <quick_ref>
38
+ <tdd>
39
+ πŸ“– Full: .claude/rules/tdd.enforcement.md
40
+ πŸ”΄ RED: Write failing test FIRST
41
+ βœ… GREEN: Minimal code to pass
42
+ ♻️ REFACTOR: Improve while tests stay green
43
+ </tdd>
44
+
45
+ <agents>
46
+ πŸ“– Registry: .claude/agents/AGENT-REGISTRY.md
47
+ 🐍 Python: @python-backend-engineer
48
+ βš›οΈ React: @react-frontend-engineer
49
+ πŸ§ͺ Tests: @test-runner
50
+ πŸ“Š Analysis: @code-analyzer
51
+ πŸ“ Files: @file-analyzer
52
+ </agents>
53
+
54
+ <workflow>
55
+ πŸ“– Full: .claude/workflows/standard-task-workflow.md
56
+ 1️⃣ Pick task from backlog
57
+ 2️⃣ Create feature branch
58
+ 3️⃣ Implement (TDD cycle)
59
+ 4️⃣ Verify acceptance criteria
60
+ 5️⃣ Create PR
61
+ 6️⃣ Address feedback
62
+ 7️⃣ Merge & complete
63
+ </workflow>
64
+ </quick_ref>
65
+
66
+ ## πŸ”„ LAZY LOADING RULES
67
+
68
+ <lazy_load>
69
+ <rule>
70
+ Load full documentation on-demand:
71
+ - Read .claude/rules/*.md when rule enforcement needed
72
+ - Read .claude/agents/[agent].md when agent invoked
73
+ - Read .claude/workflows/*.md progressively as steps execute
74
+ </rule>
75
+
76
+ <triggers>
77
+ Keyword β†’ File mapping:
78
+ - "TDD"|"test" β†’ .claude/quick-ref/tdd-cycle.md
79
+ - "@[agent]" β†’ .claude/agents/[category]/[agent].md
80
+ - "workflow"|"task" β†’ .claude/quick-ref/workflow-steps.md
81
+ - "Context7" β†’ .claude/quick-ref/context7-queries.md
82
+ </triggers>
83
+ </lazy_load>
84
+
85
+ ## πŸ“š CORE RULES (Compressed)
86
+
87
+ <rules>
88
+ <rule id="tdd" priority="HIGHEST">
89
+ TDD mandatory|No code before tests|RED→GREEN→REFACTOR
90
+ πŸ“– Optimized: .claude/rules/tdd.enforcement-optimized.md
91
+ πŸ“– Full: .claude/rules/tdd.enforcement.md
92
+ </rule>
93
+
94
+ <rule id="agents" priority="HIGHEST">
95
+ Use agents for non-trivial tasks|Agent list: AGENT-REGISTRY.md
96
+ πŸ“– Optimized: .claude/rules/agent-mandatory-optimized.md
97
+ πŸ“– Full: .claude/rules/agent-mandatory.md
98
+ </rule>
99
+
100
+ <rule id="context7" priority="HIGHEST">
101
+ Query Context7 before implementing|mcp://context7/[lib]/[topic]
102
+ πŸ“– Optimized: .claude/rules/context7-enforcement-optimized.md
103
+ πŸ“– Full: .claude/rules/context7-enforcement.md
104
+ </rule>
105
+
106
+ <rule id="quality" priority="HIGH">
107
+ No partial implementations|No TODOs without tests|100% coverage for new code
108
+ πŸ“– .claude/rules/naming-conventions.md
109
+ </rule>
110
+
111
+ <rule id="git" priority="MEDIUM">
112
+ Work in branches|PRs required|Resolve conflicts immediately
113
+ πŸ“– .claude/rules/git-strategy.md
114
+ </rule>
115
+ </rules>
116
+
117
+ ## πŸ€– ACTIVE AGENTS (Compressed)
118
+
119
+ <!-- AGENTS_START -->
120
+ <agents_list>
121
+ Core: agent-manager|code-analyzer|file-analyzer|test-runner
122
+ Languages: bash-scripting-expert|javascript-frontend-engineer|nodejs-backend-engineer|python-backend-engineer
123
+ Frameworks: react-frontend-engineer|react-ui-expert
124
+ Testing: e2e-test-engineer|frontend-testing-engineer
125
+ Cloud: aws-cloud-architect|azure-cloud-architect|gcp-cloud-architect
126
+ DevOps: docker-containerization-expert|github-operations-specialist|kubernetes-orchestrator
127
+ Database: bigquery-expert|cosmosdb-expert|mongodb-expert|postgresql-expert|redis-expert
128
+ Data: airflow-orchestration-expert|kedro-pipeline-expert
129
+ Messaging: nats-messaging-expert|message-queue-engineer
130
+ Integration: azure-devops-specialist|gemini-api-expert|openai-python-expert
131
+ Infrastructure: gcp-cloud-functions-engineer|terraform-infrastructure-expert|traefik-proxy-expert
132
+ Monitoring: observability-engineer
133
+ Security: ssh-operations-expert
134
+ Design: ux-design-expert|tailwindcss-expert
135
+ CSS: tailwindcss-expert
136
+ Workflow: langgraph-workflow-expert|parallel-worker
137
+ Management: agent-manager|mcp-manager
138
+ Context: mcp-context-manager
139
+
140
+ πŸ“– Full registry: .claude/agents/AGENT-REGISTRY.md
141
+ </agents_list>
142
+ <!-- AGENTS_END -->
143
+
144
+ <!-- WORKFLOW_SECTION -->
145
+
146
+ <!-- CICD_SECTION -->
147
+
148
+ ## ⚑ PERFORMANCE OPTIMIZATIONS
149
+
150
+ <performance>
151
+ <token_efficiency>
152
+ - Load files on-demand, not upfront
153
+ - Use compressed formats (pipe-separated lists)
154
+ - Reference external files instead of embedding
155
+ - Progressive workflow loading
156
+ </token_efficiency>
157
+
158
+ <context_preservation>
159
+ - Agent responses: <20% of input data
160
+ - File analysis: Summary only, not full content
161
+ - Test output: Failures only, not all results
162
+ - Log analysis: Errors + patterns, not raw logs
163
+ </context_preservation>
164
+ </performance>
165
+
166
+ ## 🎯 WHEN TO LOAD FULL DOCUMENTATION
167
+
168
+ <load_conditions>
169
+ <condition trigger="Starting new task">
170
+ Load: .claude/workflows/standard-task-workflow.md
171
+ </condition>
172
+
173
+ <condition trigger="Agent invocation @[agent]">
174
+ Load: .claude/agents/[category]/[agent].md
175
+ </condition>
176
+
177
+ <condition trigger="Rule violation OR uncertainty">
178
+ Load: .claude/rules/[specific-rule].md
179
+ </condition>
180
+
181
+ <condition trigger="Complex multi-step task">
182
+ Load: .claude/quick-ref/common-patterns.md
183
+ </condition>
184
+ </load_conditions>
185
+
186
+ ## πŸ“– EXAMPLE: LAZY LOADING IN ACTION
187
+
188
+ <example>
189
+ <scenario>User: "Implement user authentication"</scenario>
190
+
191
+ <step1>Check QUICK REFERENCE for workflow</step1>
192
+ <step2>Trigger: "@python-backend-engineer" β†’ Load agent file</step2>
193
+ <step3>Trigger: "TDD" β†’ Load .claude/quick-ref/tdd-cycle.md</step3>
194
+ <step4>Trigger: "Context7" β†’ Query mcp://context7/fastapi/authentication</step4>
195
+ <step5>Execute: TDD cycle with agent assistance</step5>
196
+
197
+ <result>
198
+ Tokens loaded: ~3,000 (vs ~20,000 in old system)
199
+ Savings: 85%
200
+ </result>
201
+ </example>
202
+
203
+ ## πŸ”§ COMMIT CHECKLIST (Compressed)
204
+
205
+ <before_commit>
206
+ βœ“ Tests: REDβ†’GREENβ†’REFACTOR sequence
207
+ βœ“ Lint: black|prettier|eslint passed
208
+ βœ“ Format: Applied + verified
209
+ βœ“ Type: mypy|tsc passed
210
+ βœ“ Coverage: 100% for new code
211
+ βœ“ Commits: testβ†’featβ†’refactor sequence
212
+ </before_commit>
213
+
214
+ ## πŸ“ TONE & BEHAVIOR (Compressed)
215
+
216
+ <behavior>
217
+ Concise|Skeptical|Factual|No flattery|Ask when uncertain
218
+ Welcome criticism|Suggest better approaches|Reference standards
219
+ </behavior>
220
+
221
+ ## 🚫 ABSOLUTE PROHIBITIONS
222
+
223
+ <prohibited>
224
+ ❌ Code without tests
225
+ ❌ Partial implementations
226
+ ❌ "TODO: add tests later"
227
+ ❌ WIP commits
228
+ ❌ Direct commits to main
229
+ ❌ Mock services (use real)
230
+ ❌ Skipping refactor phase
231
+ </prohibited>
232
+
233
+ ## πŸ“š ADDITIONAL RESOURCES
234
+
235
+ <resources>
236
+ Checklists: .claude/checklists/
237
+ Examples: .claude/examples/
238
+ Templates: .claude/templates/
239
+ Strategies: .claude/strategies/
240
+ </resources>
241
+
242
+ ---
243
+
244
+ **Token Count: ~2,100 tokens (vs ~20,000 old system)**
245
+ **Savings: 89.5%**
@@ -118,26 +118,78 @@ Use for coordinating multiple work streams in parallel.
118
118
 
119
119
  <!-- CICD_SECTION -->
120
120
 
121
- ## TDD PIPELINE FOR ALL IMPLEMENTATIONS
121
+ ## 🚨 TDD PIPELINE FOR ALL IMPLEMENTATIONS (HIGHEST PRIORITY)
122
+
123
+ ```
124
+ ╔═══════════════════════════════════════════════════════════════════╗
125
+ β•‘ πŸ”΄ RED β†’ βœ… GREEN β†’ ♻️ REFACTOR β•‘
126
+ β•‘ β•‘
127
+ β•‘ ZERO TOLERANCE: No code without tests. No exceptions. β•‘
128
+ β•‘ See: .claude/rules/tdd.enforcement.md β•‘
129
+ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
130
+ ```
122
131
 
123
132
  ### Mandatory Test-Driven Development Cycle
124
133
 
125
- Every implementation MUST follow:
134
+ **CRITICAL**: Every implementation MUST follow TDD cycle. This rule has **HIGHEST PRIORITY**.
135
+
136
+ #### 1. πŸ”΄ RED Phase: Write FAILING Test First
137
+
138
+ - Write test that describes desired behavior
139
+ - Test **MUST FAIL** initially (run `@test-runner` to confirm)
140
+ - Test must be meaningful (no trivial assertions)
141
+ - **NEVER proceed to code without failing test**
142
+
143
+ ```bash
144
+ # Example workflow:
145
+ touch tests/test_feature.py
146
+ # Write test
147
+ @test-runner run tests/test_feature.py # MUST SEE RED ❌
148
+ git commit -m "test: add failing test for feature"
149
+ ```
150
+
151
+ #### 2. βœ… GREEN Phase: Write MINIMUM Code to Pass
152
+
153
+ - Write **MINIMUM** code to pass test
154
+ - Don't add features not required by test
155
+ - Focus on making test green, not perfection
156
+ - Run `@test-runner` to confirm tests pass
126
157
 
127
- 1. **RED Phase**: Write failing test first
128
- - Test must describe desired behavior
129
- - Test MUST fail initially
130
- - Test must be meaningful (no trivial assertions)
158
+ ```bash
159
+ # Implement feature
160
+ @test-runner run tests/test_feature.py # MUST SEE GREEN βœ…
161
+ git commit -m "feat: implement feature"
162
+ ```
163
+
164
+ #### 3. ♻️ REFACTOR Phase: Improve While Tests Stay Green
165
+
166
+ - Improve code structure
167
+ - Remove duplication
168
+ - Enhance readability
169
+ - **All tests MUST remain green**
170
+ - Run `@test-runner` after each change
171
+
172
+ ```bash
173
+ # Refactor code
174
+ @test-runner run all tests # ALL MUST BE GREEN βœ…
175
+ git commit -m "refactor: improve feature structure"
176
+ ```
177
+
178
+ ### TDD Commit Pattern (MANDATORY)
131
179
 
132
- 2. **GREEN Phase**: Make test pass
133
- - Write MINIMUM code to pass test
134
- - Don't add features not required by test
135
- - Focus on making test green, not perfection
180
+ For EVERY feature, you MUST see this commit sequence:
181
+ ```bash
182
+ git log --oneline
183
+ # c3d4e5f refactor: improve feature structure ♻️
184
+ # b2c3d4e feat: implement feature βœ…
185
+ # a1b2c3d test: add failing test for feature πŸ”΄
186
+ ```
136
187
 
137
- 3. **REFACTOR Phase**: Improve code
138
- - Improve structure while tests stay green
139
- - Remove duplication
140
- - Enhance readability
188
+ **❌ VIOLATIONS (Auto-Reject):**
189
+ - Commits with code but no tests
190
+ - Commits with "WIP" or "TODO: add tests later"
191
+ - Skipping any phase of TDD cycle
192
+ - Tests written after implementation
141
193
 
142
194
  ## CONTEXT OPTIMIZATION RULES
143
195
 
@@ -0,0 +1,36 @@
1
+ <!-- Plugin Manifest Template for Token-Optimized CLAUDE.md -->
2
+ <!-- This template generates compressed plugin listings for base-optimized.md -->
3
+
4
+ <plugins>
5
+ <installed>{{INSTALLED_PLUGINS}}</installed>
6
+
7
+ <manifest>
8
+ {{PLUGIN_MANIFESTS}}
9
+ </manifest>
10
+
11
+ <lazy_loading>
12
+ <enabled>true</enabled>
13
+ <triggers>
14
+ commands: "/[plugin-id]:[command-name]"
15
+ agents: "@[agent-name]" (from plugin)
16
+ rules: on-violation or explicit reference
17
+ </triggers>
18
+ </lazy_loading>
19
+
20
+ <usage>
21
+ Commands: Type /[plugin-id]:[command] to invoke
22
+ Agents: Type @[agent-name] to invoke
23
+ Rules: Automatically loaded when needed
24
+ Files: All available in .claude/plugins/[plugin-id]/
25
+ </usage>
26
+ </plugins>
27
+
28
+ <!-- Example compressed manifest per plugin -->
29
+ <!--
30
+ <plugin id="core">
31
+ agents: agent-manager|code-analyzer|test-runner|file-analyzer
32
+ commands: code-rabbit|prompt|re-init
33
+ rules: 23 files (on-demand)
34
+ πŸ“– .claude/plugins/core/
35
+ </plugin>
36
+ -->
@@ -24,7 +24,7 @@ module.exports = {
24
24
  .positional('action', {
25
25
  describe: 'Plugin action to perform',
26
26
  type: 'string',
27
- choices: ['list', 'search', 'install', 'uninstall', 'info', 'enable', 'disable']
27
+ choices: ['list', 'search', 'install', 'uninstall', 'update', 'info', 'enable', 'disable']
28
28
  })
29
29
  .positional('name', {
30
30
  describe: 'Plugin name (without @claudeautopm/plugin- prefix)',
@@ -40,6 +40,8 @@ module.exports = {
40
40
  .example('autopm plugin search cloud', 'Search for cloud-related plugins')
41
41
  .example('autopm plugin install cloud', 'Install cloud plugin')
42
42
  .example('autopm plugin uninstall cloud', 'Remove cloud plugin')
43
+ .example('autopm plugin update', 'Update all installed plugins')
44
+ .example('autopm plugin update cloud devops', 'Update specific plugins')
43
45
  .example('autopm plugin info cloud', 'Show cloud plugin details')
44
46
  .epilogue(`
45
47
  πŸ“¦ Plugin Management
@@ -121,6 +123,12 @@ Usage:
121
123
  }
122
124
  await handleDisable(manager, argv.name, argv);
123
125
  break;
126
+ case 'update':
127
+ // argv.name is optional - if not provided, update all
128
+ // argv._ contains additional arguments after the command
129
+ const pluginsToUpdate = argv.name ? [argv.name, ...(argv._.slice(3) || [])] : null;
130
+ await handleUpdate(manager, pluginsToUpdate, argv);
131
+ break;
124
132
  default:
125
133
  console.error(chalk.red(`Unknown action: ${argv.action}`));
126
134
  process.exit(1);
@@ -393,3 +401,120 @@ async function handleDisable(manager, pluginName, argv) {
393
401
  console.log(chalk.gray('Note: Agents remain in .claude/agents/ but plugin is marked as disabled'));
394
402
  console.log('');
395
403
  }
404
+
405
+ /**
406
+ * Handle 'update' command
407
+ */
408
+ async function handleUpdate(manager, pluginNames, argv) {
409
+ console.log(chalk.bold('\nπŸ”„ Updating Plugins\n'));
410
+
411
+ // Get list of installed plugins
412
+ const installed = manager.getInstalledPlugins();
413
+
414
+ if (installed.length === 0) {
415
+ console.log(chalk.yellow('No plugins installed to update.'));
416
+ console.log('');
417
+ return;
418
+ }
419
+
420
+ // Determine which plugins to update
421
+ let toUpdate = [];
422
+ if (pluginNames && pluginNames.length > 0) {
423
+ // Update specific plugins
424
+ for (const name of pluginNames) {
425
+ const fullName = name.startsWith('plugin-') ? name : `plugin-${name}`;
426
+ if (!installed.includes(fullName)) {
427
+ console.log(chalk.yellow(`⚠ Plugin ${name} is not installed, skipping`));
428
+ } else {
429
+ toUpdate.push(fullName);
430
+ }
431
+ }
432
+ } else {
433
+ // Update all installed plugins
434
+ toUpdate = installed;
435
+ console.log(chalk.gray(`Updating all ${installed.length} installed plugin(s)...\n`));
436
+ }
437
+
438
+ if (toUpdate.length === 0) {
439
+ console.log(chalk.yellow('No plugins to update.'));
440
+ console.log('');
441
+ return;
442
+ }
443
+
444
+ const results = {
445
+ updated: [],
446
+ failed: [],
447
+ skipped: [],
448
+ upToDate: []
449
+ };
450
+
451
+ // Update each plugin
452
+ for (const pluginName of toUpdate) {
453
+ const shortName = pluginName.replace('plugin-', '');
454
+
455
+ try {
456
+ console.log(chalk.bold(`\nπŸ“¦ Updating ${shortName}...`));
457
+
458
+ const result = await manager.updatePlugin(pluginName, {
459
+ verbose: argv.verbose,
460
+ force: argv.force
461
+ });
462
+
463
+ if (result.updated) {
464
+ results.updated.push({
465
+ name: shortName,
466
+ oldVersion: result.oldVersion,
467
+ newVersion: result.newVersion,
468
+ stats: result.stats
469
+ });
470
+ console.log(chalk.green(`βœ… Updated ${shortName} (${result.oldVersion} β†’ ${result.newVersion})`));
471
+
472
+ if (argv.verbose && result.stats) {
473
+ console.log(chalk.gray(` Agents: ${result.stats.agents || 0}, Commands: ${result.stats.commands || 0}, Rules: ${result.stats.rules || 0}`));
474
+ }
475
+ } else if (result.upToDate) {
476
+ results.upToDate.push(shortName);
477
+ console.log(chalk.gray(`βœ“ ${shortName} is already up to date (${result.currentVersion})`));
478
+ } else {
479
+ results.skipped.push(shortName);
480
+ console.log(chalk.yellow(`⚠ Skipped ${shortName}: ${result.reason || 'Unknown reason'}`));
481
+ }
482
+ } catch (error) {
483
+ results.failed.push({ name: shortName, error: error.message });
484
+ console.log(chalk.red(`βœ— Failed to update ${shortName}: ${error.message}`));
485
+
486
+ if (argv.verbose) {
487
+ console.error(chalk.red(error.stack));
488
+ }
489
+ }
490
+ }
491
+
492
+ // Summary
493
+ console.log(chalk.bold('\nπŸ“Š Update Summary\n'));
494
+ console.log(`${chalk.green('βœ… Updated:')} ${results.updated.length}`);
495
+ console.log(`${chalk.gray('βœ“ Up to date:')} ${results.upToDate.length}`);
496
+ console.log(`${chalk.yellow('⚠ Skipped:')} ${results.skipped.length}`);
497
+ console.log(`${chalk.red('βœ— Failed:')} ${results.failed.length}`);
498
+ console.log('');
499
+
500
+ if (results.updated.length > 0) {
501
+ console.log(chalk.bold('Updated Plugins:'));
502
+ for (const plugin of results.updated) {
503
+ console.log(` β€’ ${plugin.name} (${plugin.oldVersion} β†’ ${plugin.newVersion})`);
504
+ }
505
+ console.log('');
506
+ }
507
+
508
+ if (results.failed.length > 0) {
509
+ console.log(chalk.bold(chalk.red('Failed Updates:')));
510
+ for (const plugin of results.failed) {
511
+ console.log(chalk.red(` β€’ ${plugin.name}: ${plugin.error}`));
512
+ }
513
+ console.log('');
514
+ }
515
+
516
+ // Exit with error if any updates failed
517
+ if (results.failed.length > 0) {
518
+ process.exit(1);
519
+ }
520
+ }
@@ -765,6 +765,9 @@ See: https://github.com/rafeekpro/ClaudeAutoPM
765
765
  getRequiredAddons() {
766
766
  const addons = [];
767
767
 
768
+ // ALWAYS include task-workflow (standard workflow for all projects)
769
+ addons.push('task-workflow');
770
+
768
771
  // Based on scenario/configuration, determine required addons
769
772
  if (this.currentConfig) {
770
773
  if (this.currentConfig.tools?.docker?.enabled) {
@@ -804,6 +807,7 @@ See: https://github.com/rafeekpro/ClaudeAutoPM
804
807
  'docker-agents': 'AGENT_SELECTION_SECTION',
805
808
  'devops-agents': 'AGENT_SELECTION_SECTION',
806
809
  'minimal-agents': 'AGENT_SELECTION_SECTION',
810
+ 'task-workflow': 'WORKFLOW_SECTION',
807
811
  'docker-workflow': 'WORKFLOW_SECTION',
808
812
  'devops-workflow': 'WORKFLOW_SECTION',
809
813
  'minimal-workflow': 'WORKFLOW_SECTION',