claude-autopm 2.8.8 → 2.11.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.
@@ -0,0 +1,49 @@
1
+ # TDD Cycle (Quick Reference)
2
+
3
+ <tdd_cycle>
4
+ <phase id="RED">
5
+ <action>Write failing test FIRST</action>
6
+ <verify>@test-runner confirms RED ❌</verify>
7
+ <commit>test: add failing test for [feature]</commit>
8
+ </phase>
9
+
10
+ <phase id="GREEN">
11
+ <action>Write MINIMUM code to pass</action>
12
+ <verify>@test-runner confirms GREEN ✅</verify>
13
+ <commit>feat: implement [feature]</commit>
14
+ </phase>
15
+
16
+ <phase id="REFACTOR">
17
+ <action>Improve code structure</action>
18
+ <verify>@test-runner confirms still GREEN ✅</verify>
19
+ <commit>refactor: improve [feature] structure</commit>
20
+ </phase>
21
+ </tdd_cycle>
22
+
23
+ <example>
24
+ ```bash
25
+ # RED
26
+ touch tests/test_auth.py
27
+ # Write test
28
+ @test-runner run tests/test_auth.py # Must be RED ❌
29
+ git commit -m "test: add failing test for auth"
30
+
31
+ # GREEN
32
+ # Write minimal implementation
33
+ @test-runner run tests/test_auth.py # Must be GREEN ✅
34
+ git commit -m "feat: implement auth endpoint"
35
+
36
+ # REFACTOR
37
+ # Improve code
38
+ @test-runner run all tests # Must be GREEN ✅
39
+ git commit -m "refactor: improve auth structure"
40
+ ```
41
+ </example>
42
+
43
+ <prohibited>
44
+ ❌ Code before test
45
+ ❌ Skip any phase
46
+ ❌ "TODO: add tests"
47
+ </prohibited>
48
+
49
+ <full_docs>.claude/rules/tdd.enforcement.md</full_docs>
@@ -0,0 +1,103 @@
1
+ # Standard Task Workflow (Quick Reference)
2
+
3
+ <workflow>
4
+ <step id="1" name="Pick Task">
5
+ <action>Select task from backlog (sorted by priority)</action>
6
+ <verify>Check Acceptance Criteria + Definition of Done</verify>
7
+ </step>
8
+
9
+ <step id="2" name="Create Branch">
10
+ <action>git checkout -b feature/task-name</action>
11
+ <convention>feature/|bugfix/|hotfix/</convention>
12
+ </step>
13
+
14
+ <step id="3" name="Implement">
15
+ <action>Follow TDD: RED→GREEN→REFACTOR</action>
16
+ <agents>@test-runner|@code-analyzer|specialist agents</agents>
17
+ <context7>Query docs BEFORE coding</context7>
18
+ </step>
19
+
20
+ <step id="4" name="Verify AC">
21
+ <checklist>
22
+ ✓ All Acceptance Criteria met
23
+ ✓ Definition of Done complete
24
+ ✓ Tests passing (@test-runner)
25
+ ✓ Code formatted + linted
26
+ ✓ No partial implementations
27
+ </checklist>
28
+ </step>
29
+
30
+ <step id="5" name="Create PR">
31
+ <action>gh pr create --title "feat: description"</action>
32
+ <template>
33
+ ## Summary
34
+ - What changed
35
+ - Why changed
36
+
37
+ ## Test Plan
38
+ - How to verify
39
+
40
+ ## Checklist
41
+ ✓ Tests pass
42
+ ✓ Linting clean
43
+ ✓ Documentation updated
44
+ </template>
45
+ </step>
46
+
47
+ <step id="6" name="Address Feedback">
48
+ <action>Interpret + resolve ALL PR comments</action>
49
+ <process>
50
+ 1. Read comment carefully
51
+ 2. Ask clarifying questions if unclear
52
+ 3. Implement requested changes
53
+ 4. Push updates
54
+ 5. Respond to comment
55
+ </process>
56
+ </step>
57
+
58
+ <step id="7" name="Merge">
59
+ <action>gh pr merge --squash</action>
60
+ <requirements>
61
+ ✓ All checks pass
62
+ ✓ All comments resolved
63
+ ✓ No merge conflicts
64
+ </requirements>
65
+ </step>
66
+
67
+ <step id="8" name="Complete">
68
+ <action>Mark task status: "completed" (NOT "ready")</action>
69
+ <cleanup>Delete feature branch</cleanup>
70
+ </step>
71
+
72
+ <step id="9" name="Next Task">
73
+ <action>Return to step 1</action>
74
+ </step>
75
+ </workflow>
76
+
77
+ <quick_commands>
78
+ # Branch workflow
79
+ git checkout -b feature/name
80
+ git add .
81
+ git commit -m "type: description"
82
+ git push -u origin feature/name
83
+
84
+ # PR workflow
85
+ gh pr create
86
+ gh pr view
87
+ gh pr merge --squash
88
+
89
+ # Verification
90
+ @test-runner run all tests
91
+ npm run lint
92
+ npm run build
93
+ </quick_commands>
94
+
95
+ <prohibited>
96
+ ❌ Direct commits to main
97
+ ❌ PRs without tests
98
+ ❌ Merging with conflicts
99
+ ❌ Ignoring PR feedback
100
+ ❌ Status "ready" (use "completed")
101
+ </prohibited>
102
+
103
+ <full_docs>.claude/workflows/standard-task-workflow.md</full_docs>
@@ -0,0 +1,91 @@
1
+ # Agent Usage - MANDATORY (Optimized)
2
+
3
+ <priority>HIGHEST - ZERO TOLERANCE</priority>
4
+
5
+ <core_requirement>
6
+ YOU MUST USE SPECIALIZED AGENTS FOR ALL NON-TRIVIAL TASKS
7
+ Do NOT perform complex tasks yourself
8
+ Use Task tool to delegate
9
+ </core_requirement>
10
+
11
+ <when_to_use>
12
+ <always>
13
+ Code writing|Testing|Infrastructure|Database|Analysis|GitHub ops|Large files
14
+ </always>
15
+
16
+ <mapping>
17
+ Python → python-backend-engineer
18
+ React → react-frontend-engineer
19
+ Node.js → nodejs-backend-engineer
20
+ Tests → test-runner|frontend-testing-engineer|e2e-test-engineer
21
+ K8s → kubernetes-orchestrator
22
+ Docker → docker-containerization-expert
23
+ Database → postgresql-expert|mongodb-expert|bigquery-expert
24
+ Review → code-analyzer
25
+ Logs → file-analyzer
26
+ GitHub → github-operations-specialist
27
+ Azure → azure-devops-specialist
28
+ </mapping>
29
+
30
+ <can_do_yourself>
31
+ Simple file reads (1-2 files)|Basic bash (ls, pwd, git)|Answering questions|TodoWrite
32
+ </can_do_yourself>
33
+ </when_to_use>
34
+
35
+ <violations>
36
+ <wrong>
37
+ User: "Create FastAPI endpoint"
38
+ You: *writes code directly*
39
+ </wrong>
40
+
41
+ <correct>
42
+ User: "Create FastAPI endpoint"
43
+ You: "Using @python-backend-engineer"
44
+ *Invokes Task tool*
45
+ </correct>
46
+ </violations>
47
+
48
+ <usage_patterns>
49
+ <single>
50
+ Task tool:
51
+ - subagent_type: "python-backend-engineer"
52
+ - description: "Create user endpoint"
53
+ - prompt: "Detailed requirements..."
54
+ </single>
55
+
56
+ <parallel>
57
+ Launch multiple agents IN SINGLE MESSAGE:
58
+ - python-backend-engineer (API)
59
+ - react-frontend-engineer (UI)
60
+ - postgresql-expert (schema)
61
+ </parallel>
62
+ </usage_patterns>
63
+
64
+ <decision_rule>
65
+ Before ANY complex task:
66
+ 1. Is there a specialized agent?
67
+ 2. Would agent do better?
68
+ 3. Am I trying to do what I should delegate?
69
+
70
+ YES to any? → USE THE AGENT
71
+ When in doubt? → USE THE AGENT
72
+ </decision_rule>
73
+
74
+ <common_mistakes>
75
+ ❌ Not checking Active Team Agents
76
+ ❌ Writing code for non-trivial tasks
77
+ ❌ Not using parallel agents
78
+ ❌ Wrong agent for task
79
+ ❌ Not using file-analyzer for large files
80
+ </common_mistakes>
81
+
82
+ <enforcement>
83
+ Git hooks|Code review|Self-monitoring
84
+ Default: YES use agent|Over-use better than under-use
85
+ </enforcement>
86
+
87
+ <ref>
88
+ Full version: .claude/rules/agent-mandatory.md
89
+ Quick ref: .claude/quick-ref/agent-quick-ref.md
90
+ Registry: .claude/agents/AGENT-REGISTRY.md
91
+ </ref>
@@ -0,0 +1,221 @@
1
+ # Context7 Documentation Enforcement (Optimized)
2
+
3
+ <priority>HIGHEST - ZERO TOLERANCE</priority>
4
+
5
+ <visual_reminder>
6
+ WHEN YOU SEE: `/pm:command` or `@agent-name`
7
+
8
+ YOU MUST:
9
+ 1. 📖 ANNOUNCE: "Querying Context7..."
10
+ 2. 🔍 READ command/agent file → extract Documentation Queries
11
+ 3. 🌐 QUERY Context7 MCP for EACH listed topic
12
+ 4. 📝 SUMMARIZE key findings
13
+ 5. ✅ CONFIRM: "Context7 complete. Proceeding..."
14
+
15
+ <output>
16
+ 🔒 Context7 Enforcement Active
17
+
18
+ 📋 Command: /pm:epic-decompose
19
+ 📚 Querying Context7...
20
+
21
+ ➜ mcp://context7/agile/epic-decomposition
22
+ ➜ mcp://context7/agile/task-sizing
23
+ ➜ mcp://context7/agile/user-stories
24
+
25
+ ✅ Context7 complete
26
+ 📖 Key findings: [summary]
27
+
28
+ Proceeding with Context7 best practices...
29
+ </output>
30
+ </visual_reminder>
31
+
32
+ <prime_directive>
33
+ Query live documentation from Context7 BEFORE implementing
34
+ No implementation without Context7 query
35
+ No reliance on training data for technical specifics
36
+ No shortcuts
37
+ </prime_directive>
38
+
39
+ <why_critical>
40
+ <problems>
41
+ Hallucinations|API changes|Best practices drift|Version conflicts
42
+ Training data stale|Frameworks evolve|Deprecated patterns
43
+ </problems>
44
+
45
+ <benefits>
46
+ Always current|Verified patterns|API accuracy|Breaking changes awareness
47
+ Live documentation|Real examples|Current signatures|No guesswork
48
+ </benefits>
49
+ </why_critical>
50
+
51
+ <context7_cycle>
52
+ <query_phase>
53
+ 1. Read command/agent file → extract Documentation Queries
54
+ 2. Query EACH Context7 MCP link
55
+ 3. Analyze: patterns|APIs|best practices|anti-patterns
56
+ 4. Summarize findings before proceeding
57
+ </query_phase>
58
+
59
+ <implement_phase>
60
+ Apply Context7 patterns EXACTLY as documented
61
+ Use API signatures from Context7 (NOT training data)
62
+ Follow architectural recommendations
63
+ Reference Context7 in comments
64
+ </implement_phase>
65
+
66
+ <validate_phase>
67
+ Implementation matches Context7
68
+ No hallucinations
69
+ Latest conventions followed
70
+ Deprecation warnings addressed
71
+ </validate_phase>
72
+ </context7_cycle>
73
+
74
+ <absolute_requirements>
75
+ <commands>
76
+ MUST read "Required Documentation Access"
77
+ MUST query EVERY mcp:// link before execution
78
+ MUST summarize Context7 findings
79
+ MUST apply Context7 guidance
80
+ </commands>
81
+
82
+ <agents>
83
+ MUST read "Documentation Queries"
84
+ MUST query before technical decisions
85
+ MUST verify API signatures
86
+ MUST flag training data conflicts
87
+ </agents>
88
+
89
+ <implementations>
90
+ NO code from training data alone
91
+ NO assumptions without Context7
92
+ NO "I think this works" - VERIFY
93
+ NO skip for "small changes"
94
+ </implementations>
95
+ </absolute_requirements>
96
+
97
+ <prohibited>
98
+ ❌ Implementing without querying
99
+ ❌ "I remember" - training data stale
100
+ ❌ Skip for "simple" tasks
101
+ ❌ Cached knowledge vs live docs
102
+ ❌ Proceed when query fails
103
+ ❌ Ignore Context7 guidance
104
+ </prohibited>
105
+
106
+ <query_quality>
107
+ <do>
108
+ ✅ Query ALL listed links
109
+ ✅ Request specific topics
110
+ ✅ Ask for examples + patterns
111
+ ✅ Verify API signatures
112
+ ✅ Check breaking changes
113
+ </do>
114
+
115
+ <dont>
116
+ ❌ Skip assuming training data sufficient
117
+ ❌ Query only one link
118
+ ❌ Accept generic results
119
+ ❌ Ignore version mismatches
120
+ </dont>
121
+
122
+ <coverage>
123
+ 100% query rate|Complete coverage|Result validation|Stop if fails
124
+ </coverage>
125
+ </query_quality>
126
+
127
+ <command_flow>
128
+ User: /pm:epic-decompose feature-name
129
+
130
+ BEFORE:
131
+ 1. Read .claude/commands/pm/epic-decompose.md
132
+ 2. Extract Documentation Queries
133
+ 3. Query Context7 for EACH link
134
+ 4. Summarize: "Context7 confirms INVEST criteria..."
135
+ 5. PROCEED with Context7 guidance
136
+
137
+ DURING:
138
+ Apply Context7 patterns|Reference examples|Follow best practices
139
+
140
+ AFTER:
141
+ Validate against Context7|Flag deviations
142
+ </command_flow>
143
+
144
+ <agent_flow>
145
+ User: @aws-cloud-architect design VPC
146
+
147
+ BEFORE:
148
+ 1. Read .claude/agents/cloud/aws-cloud-architect.md
149
+ 2. Extract Documentation Queries
150
+ 3. Query Context7 for EACH link
151
+ 4. Summarize: "Context7 shows VPC /16 for staging..."
152
+ 5. PROCEED with Context7 knowledge
153
+
154
+ DURING:
155
+ Current AWS API patterns|Terraform patterns|Networking best practices
156
+
157
+ AFTER:
158
+ Cross-check design|No deprecated patterns
159
+ </agent_flow>
160
+
161
+ <violations>
162
+ <immediate>
163
+ STOP execution|IDENTIFY unverified code|DELETE stale implementation|
164
+ QUERY Context7|REIMPLEMENT|DOCUMENT violation
165
+ </immediate>
166
+
167
+ <severity>
168
+ Level 1 (Minor): Partial queries → Complete + validate
169
+ Level 2 (Moderate): No queries → Stop + query + review
170
+ Level 3 (Critical): Contradicts Context7 → Delete + redo
171
+ </severity>
172
+
173
+ <no_exceptions>
174
+ NO "small changes"|NO "I'm confident"|NO "Context7 slow"|NO assumptions
175
+ </no_exceptions>
176
+ </violations>
177
+
178
+ <success_metrics>
179
+ ✅ 100% commands query Context7
180
+ ✅ 100% agents query Context7
181
+ ✅ Zero training-data-only implementations
182
+ ✅ All API signatures verified
183
+ ✅ No deprecated patterns
184
+ ✅ Findings documented
185
+ </success_metrics>
186
+
187
+ <automation>
188
+ <hooks>
189
+ .claude/hooks/pre-command-context7.js - Extract + query before commands
190
+ .claude/hooks/pre-agent-context7.js - Extract + query before agents
191
+ </hooks>
192
+
193
+ <validation>
194
+ .claude/rules/context7-enforcement.md - Highest priority rule
195
+ Read on every session|Zero tolerance
196
+ </validation>
197
+ </automation>
198
+
199
+ <emergency_fallback>
200
+ If Context7 unavailable:
201
+ 1. ALERT: "⚠️ Context7 MCP unavailable"
202
+ 2. REQUEST user decision: WAIT (recommended) or PROCEED (risky)
203
+ 3. DOCUMENT: // WARNING: No Context7 verification - MCP unavailable
204
+ 4. FLAG: TODO re-verify when available
205
+
206
+ DO NOT:
207
+ ❌ Silently proceed
208
+ ❌ Assume training data sufficient
209
+ ❌ Skip queries
210
+ </emergency_fallback>
211
+
212
+ <final_reminder>
213
+ Context7 is MANDATORY for EVERY command and agent execution.
214
+ Training data becomes stale. APIs change. Best practices evolve.
215
+ Context7 keeps us current. Query it. Every. Single. Time.
216
+ </final_reminder>
217
+
218
+ <ref>
219
+ Full version: .claude/rules/context7-enforcement.md
220
+ Quick ref: .claude/quick-ref/context7-queries.md
221
+ </ref>