claude-autopm 2.8.9 → 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.
- package/autopm/.claude/agents-compressed-example.md +218 -0
- package/autopm/.claude/quick-ref/agent-quick-ref.md +153 -0
- package/autopm/.claude/quick-ref/common-patterns.md +215 -0
- package/autopm/.claude/quick-ref/context7-queries.md +122 -0
- package/autopm/.claude/quick-ref/tdd-cycle.md +49 -0
- package/autopm/.claude/quick-ref/workflow-steps.md +103 -0
- package/autopm/.claude/rules/agent-mandatory-optimized.md +91 -0
- package/autopm/.claude/rules/context7-enforcement-optimized.md +221 -0
- package/autopm/.claude/templates/claude-templates/addons/task-workflow.md +612 -0
- package/autopm/.claude/templates/claude-templates/base-optimized.md +245 -0
- package/autopm/.claude/templates/claude-templates/base.md +66 -14
- package/autopm/.claude/templates/plugin-manifest-template.xml +36 -0
- package/install/install.js +4 -0
- package/install/plugin-manifest-generator.js +182 -0
- package/package.json +1 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Agent Descriptions - Compressed Format Example
|
|
2
|
+
|
|
3
|
+
This file shows how agent descriptions can be compressed using XML and pipe-separated lists.
|
|
4
|
+
|
|
5
|
+
## Traditional Format (Long)
|
|
6
|
+
|
|
7
|
+
**Before Optimization:**
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
### python-backend-engineer
|
|
11
|
+
|
|
12
|
+
Use this agent for Python backend development including FastAPI, Django, Flask, and other Python frameworks.
|
|
13
|
+
Specializes in REST APIs, GraphQL, microservices, asynchronous programming, and database integration.
|
|
14
|
+
Expert in Python performance optimization, testing with pytest, and production deployment.
|
|
15
|
+
|
|
16
|
+
**When to use:**
|
|
17
|
+
- Building REST APIs with FastAPI
|
|
18
|
+
- Creating GraphQL endpoints
|
|
19
|
+
- Developing microservices
|
|
20
|
+
- Database integration with SQLAlchemy
|
|
21
|
+
- Async programming with asyncio
|
|
22
|
+
- Testing with pytest
|
|
23
|
+
|
|
24
|
+
**Documentation Queries:**
|
|
25
|
+
- `mcp://context7/fastapi/routing` - FastAPI routing and endpoints
|
|
26
|
+
- `mcp://context7/sqlalchemy/orm` - SQLAlchemy ORM patterns
|
|
27
|
+
- `mcp://context7/pytest/fixtures` - Pytest testing patterns
|
|
28
|
+
|
|
29
|
+
**Examples:**
|
|
30
|
+
- "Build a FastAPI authentication endpoint with JWT"
|
|
31
|
+
- "Create a microservice for user management"
|
|
32
|
+
- "Optimize database queries with SQLAlchemy"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Token Count:** ~200 tokens
|
|
36
|
+
|
|
37
|
+
## Compressed Format (Short)
|
|
38
|
+
|
|
39
|
+
**After Optimization:**
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
<agent id="python-backend-engineer">
|
|
43
|
+
<expertise>FastAPI|Django|Flask|REST|GraphQL|microservices|async|SQLAlchemy|pytest</expertise>
|
|
44
|
+
<use_for>REST APIs|GraphQL|microservices|DB integration|async|testing|optimization</use_for>
|
|
45
|
+
<context7>
|
|
46
|
+
fastapi/routing|sqlalchemy/orm|pytest/fixtures
|
|
47
|
+
</context7>
|
|
48
|
+
<examples>
|
|
49
|
+
FastAPI auth with JWT|User management microservice|SQLAlchemy query optimization
|
|
50
|
+
</examples>
|
|
51
|
+
</agent>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Token Count:** ~60 tokens
|
|
55
|
+
**Savings:** 70%
|
|
56
|
+
|
|
57
|
+
## Multiple Agents - Compressed
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
<agents>
|
|
61
|
+
|
|
62
|
+
<agent id="python-backend-engineer">
|
|
63
|
+
<exp>FastAPI|Django|Flask|REST|GraphQL|async|SQLAlchemy|pytest</exp>
|
|
64
|
+
<ctx7>fastapi/routing|sqlalchemy/orm|pytest/fixtures</ctx7>
|
|
65
|
+
</agent>
|
|
66
|
+
|
|
67
|
+
<agent id="react-frontend-engineer">
|
|
68
|
+
<exp>React|Next.js|TypeScript|hooks|state|routing|SSR|components</exp>
|
|
69
|
+
<ctx7>react/hooks|nextjs/routing|typescript/react</ctx7>
|
|
70
|
+
</agent>
|
|
71
|
+
|
|
72
|
+
<agent id="postgresql-expert">
|
|
73
|
+
<exp>PostgreSQL|indexing|optimization|partitioning|replication|JSON|full-text</exp>
|
|
74
|
+
<ctx7>postgresql/performance|postgresql/indexing|postgresql/jsonb</ctx7>
|
|
75
|
+
</agent>
|
|
76
|
+
|
|
77
|
+
<agent id="kubernetes-orchestrator">
|
|
78
|
+
<exp>K8s|Helm|deployments|services|ingress|operators|GitOps</exp>
|
|
79
|
+
<ctx7>kubernetes/deployments|kubernetes/services|helm/charts</ctx7>
|
|
80
|
+
</agent>
|
|
81
|
+
|
|
82
|
+
<agent id="code-analyzer">
|
|
83
|
+
<exp>Bug hunting|logic tracing|security analysis|performance|refactoring</exp>
|
|
84
|
+
<use>Review code|Find bugs|Trace logic|Security scan|Optimize</use>
|
|
85
|
+
</agent>
|
|
86
|
+
|
|
87
|
+
<agent id="test-runner">
|
|
88
|
+
<exp>Test execution|Jest|pytest|Playwright|analysis|reporting</exp>
|
|
89
|
+
<use>Run tests|Analyze results|Generate reports|Debug failures</use>
|
|
90
|
+
</agent>
|
|
91
|
+
|
|
92
|
+
</agents>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Full Compressed Agent Registry Format
|
|
96
|
+
|
|
97
|
+
For the CLAUDE.md Active Agents section:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
<!-- AGENTS_START -->
|
|
101
|
+
<agents_list>
|
|
102
|
+
<core>
|
|
103
|
+
agent-manager|code-analyzer|file-analyzer|test-runner|parallel-worker
|
|
104
|
+
</core>
|
|
105
|
+
|
|
106
|
+
<lang>
|
|
107
|
+
bash-scripting-expert|javascript-frontend-engineer|nodejs-backend-engineer|python-backend-engineer
|
|
108
|
+
</lang>
|
|
109
|
+
|
|
110
|
+
<frameworks>
|
|
111
|
+
react-frontend-engineer|react-ui-expert
|
|
112
|
+
</frameworks>
|
|
113
|
+
|
|
114
|
+
<testing>
|
|
115
|
+
e2e-test-engineer|frontend-testing-engineer
|
|
116
|
+
</testing>
|
|
117
|
+
|
|
118
|
+
<cloud>
|
|
119
|
+
aws-cloud-architect|azure-cloud-architect|gcp-cloud-architect
|
|
120
|
+
</cloud>
|
|
121
|
+
|
|
122
|
+
<devops>
|
|
123
|
+
docker-containerization-expert|github-operations-specialist|kubernetes-orchestrator
|
|
124
|
+
</devops>
|
|
125
|
+
|
|
126
|
+
<db>
|
|
127
|
+
bigquery-expert|cosmosdb-expert|mongodb-expert|postgresql-expert|redis-expert
|
|
128
|
+
</db>
|
|
129
|
+
|
|
130
|
+
<data>
|
|
131
|
+
airflow-orchestration-expert|kedro-pipeline-expert
|
|
132
|
+
</data>
|
|
133
|
+
|
|
134
|
+
<messaging>
|
|
135
|
+
message-queue-engineer|nats-messaging-expert
|
|
136
|
+
</messaging>
|
|
137
|
+
|
|
138
|
+
<integration>
|
|
139
|
+
azure-devops-specialist|gemini-api-expert|openai-python-expert
|
|
140
|
+
</integration>
|
|
141
|
+
|
|
142
|
+
<infra>
|
|
143
|
+
gcp-cloud-functions-engineer|terraform-infrastructure-expert|traefik-proxy-expert
|
|
144
|
+
</infra>
|
|
145
|
+
|
|
146
|
+
<monitoring>
|
|
147
|
+
observability-engineer
|
|
148
|
+
</monitoring>
|
|
149
|
+
|
|
150
|
+
<security>
|
|
151
|
+
ssh-operations-expert
|
|
152
|
+
</security>
|
|
153
|
+
|
|
154
|
+
<design>
|
|
155
|
+
tailwindcss-expert|ux-design-expert
|
|
156
|
+
</design>
|
|
157
|
+
|
|
158
|
+
<workflow>
|
|
159
|
+
langgraph-workflow-expert
|
|
160
|
+
</workflow>
|
|
161
|
+
|
|
162
|
+
<mgmt>
|
|
163
|
+
agent-manager|mcp-context-manager|mcp-manager
|
|
164
|
+
</mgmt>
|
|
165
|
+
|
|
166
|
+
📖 Full registry: .claude/agents/AGENT-REGISTRY.md
|
|
167
|
+
📖 Quick ref: .claude/quick-ref/agent-quick-ref.md
|
|
168
|
+
</agents_list>
|
|
169
|
+
<!-- AGENTS_END -->
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Traditional Format:** ~8,000 tokens (listing all 45+ agents with descriptions)
|
|
173
|
+
**Compressed Format:** ~500 tokens (pipe-separated categorized list)
|
|
174
|
+
**Savings:** 93.75%
|
|
175
|
+
|
|
176
|
+
## Benefits of Compressed Format
|
|
177
|
+
|
|
178
|
+
1. **Token Efficiency**: 70-93% reduction in tokens
|
|
179
|
+
2. **Quick Scanning**: Pipe-separated lists easier to scan
|
|
180
|
+
3. **Category Grouping**: XML tags organize by purpose
|
|
181
|
+
4. **Lazy Loading**: Full docs loaded on-demand
|
|
182
|
+
5. **Maintainability**: Simpler to update and maintain
|
|
183
|
+
|
|
184
|
+
## Usage Pattern
|
|
185
|
+
|
|
186
|
+
In CLAUDE.md optimized template:
|
|
187
|
+
|
|
188
|
+
```markdown
|
|
189
|
+
## 🤖 ACTIVE AGENTS (Compressed)
|
|
190
|
+
|
|
191
|
+
<!-- AGENTS_START -->
|
|
192
|
+
<agents_list>
|
|
193
|
+
Core: agent-manager|code-analyzer|file-analyzer|test-runner
|
|
194
|
+
Languages: bash-scripting-expert|javascript-frontend-engineer|python-backend-engineer
|
|
195
|
+
...
|
|
196
|
+
📖 Full registry: .claude/agents/AGENT-REGISTRY.md
|
|
197
|
+
</agents_list>
|
|
198
|
+
<!-- AGENTS_END -->
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
When agent is invoked:
|
|
202
|
+
1. User: `@python-backend-engineer build API`
|
|
203
|
+
2. Claude sees compressed listing
|
|
204
|
+
3. Lazy loads: `.claude/agents/languages/python-backend-engineer.md`
|
|
205
|
+
4. Queries Context7: `mcp://context7/fastapi/routing`
|
|
206
|
+
5. Implements using full knowledge
|
|
207
|
+
|
|
208
|
+
## Implementation Strategy
|
|
209
|
+
|
|
210
|
+
1. **Keep full agent files** in `.claude/agents/` directories
|
|
211
|
+
2. **Use compressed format** in CLAUDE.md for listing
|
|
212
|
+
3. **Lazy load** full agent description when invoked
|
|
213
|
+
4. **Query Context7** as required by agent's Documentation Queries section
|
|
214
|
+
|
|
215
|
+
This provides best of both worlds:
|
|
216
|
+
- Minimal tokens in initial context
|
|
217
|
+
- Full agent knowledge when needed
|
|
218
|
+
- Always-current documentation via Context7
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Agent Quick Reference
|
|
2
|
+
|
|
3
|
+
<agent_categories>
|
|
4
|
+
|
|
5
|
+
<core>
|
|
6
|
+
@agent-manager - Create|analyze|manage agents
|
|
7
|
+
@code-analyzer - Bug hunting|logic tracing|security analysis
|
|
8
|
+
@file-analyzer - File|log analysis|context reduction
|
|
9
|
+
@test-runner - Test execution|analysis|structured reports
|
|
10
|
+
@parallel-worker - Multi-stream parallel execution
|
|
11
|
+
</core>
|
|
12
|
+
|
|
13
|
+
<languages>
|
|
14
|
+
@bash-scripting-expert - Shell automation|scripts|POSIX
|
|
15
|
+
@javascript-frontend-engineer - Vanilla JS|TypeScript|browser APIs
|
|
16
|
+
@nodejs-backend-engineer - Node.js|Express|NestJS|Fastify
|
|
17
|
+
@python-backend-engineer - FastAPI|Django|Flask|async
|
|
18
|
+
</languages>
|
|
19
|
+
|
|
20
|
+
<frameworks>
|
|
21
|
+
@react-frontend-engineer - React|Next.js|component development
|
|
22
|
+
@react-ui-expert - React UI frameworks|design systems
|
|
23
|
+
</frameworks>
|
|
24
|
+
|
|
25
|
+
<testing>
|
|
26
|
+
@e2e-test-engineer - Playwright|Cypress|visual testing
|
|
27
|
+
@frontend-testing-engineer - Jest|Vitest|React Testing Library
|
|
28
|
+
</testing>
|
|
29
|
+
|
|
30
|
+
<cloud>
|
|
31
|
+
@aws-cloud-architect - AWS services|CloudFormation
|
|
32
|
+
@azure-cloud-architect - Azure services|ARM|Bicep
|
|
33
|
+
@gcp-cloud-architect - GCP services|Deployment Manager
|
|
34
|
+
</cloud>
|
|
35
|
+
|
|
36
|
+
<devops>
|
|
37
|
+
@docker-containerization-expert - Dockerfile|Compose|multi-stage
|
|
38
|
+
@github-operations-specialist - GitHub Actions|workflows|releases
|
|
39
|
+
@kubernetes-orchestrator - K8s|Helm|deployments|operators
|
|
40
|
+
</devops>
|
|
41
|
+
|
|
42
|
+
<databases>
|
|
43
|
+
@bigquery-expert - BigQuery|SQL|analytics|partitioning
|
|
44
|
+
@cosmosdb-expert - Cosmos DB|multi-region|consistency
|
|
45
|
+
@mongodb-expert - MongoDB|aggregation|sharding
|
|
46
|
+
@postgresql-expert - PostgreSQL|optimization|indexing
|
|
47
|
+
@redis-expert - Redis|caching|pub/sub|distributed locks
|
|
48
|
+
</databases>
|
|
49
|
+
|
|
50
|
+
<data>
|
|
51
|
+
@airflow-orchestration-expert - Airflow|DAGs|task dependencies
|
|
52
|
+
@kedro-pipeline-expert - Kedro|data pipelines|MLOps
|
|
53
|
+
</data>
|
|
54
|
+
|
|
55
|
+
<messaging>
|
|
56
|
+
@message-queue-engineer - Kafka|RabbitMQ|SQS|event streaming
|
|
57
|
+
@nats-messaging-expert - NATS|JetStream|clustering
|
|
58
|
+
</messaging>
|
|
59
|
+
|
|
60
|
+
<integration>
|
|
61
|
+
@azure-devops-specialist - Azure DevOps|work items|pipelines
|
|
62
|
+
@gemini-api-expert - Google Gemini|multimodal|function calling
|
|
63
|
+
@openai-python-expert - OpenAI|GPT|embeddings|assistants
|
|
64
|
+
</integration>
|
|
65
|
+
|
|
66
|
+
<infrastructure>
|
|
67
|
+
@gcp-cloud-functions-engineer - Cloud Functions|serverless
|
|
68
|
+
@terraform-infrastructure-expert - Terraform|IaC|modules
|
|
69
|
+
@traefik-proxy-expert - Traefik|reverse proxy|SSL
|
|
70
|
+
</infrastructure>
|
|
71
|
+
|
|
72
|
+
<monitoring>
|
|
73
|
+
@observability-engineer - Prometheus|Grafana|ELK|Jaeger|APM
|
|
74
|
+
</monitoring>
|
|
75
|
+
|
|
76
|
+
<security>
|
|
77
|
+
@ssh-operations-expert - SSH|key management|tunneling
|
|
78
|
+
</security>
|
|
79
|
+
|
|
80
|
+
<design>
|
|
81
|
+
@tailwindcss-expert - TailwindCSS|utility-first|design systems
|
|
82
|
+
@ux-design-expert - UX/UI|accessibility|user experience
|
|
83
|
+
</design>
|
|
84
|
+
|
|
85
|
+
<workflow>
|
|
86
|
+
@langgraph-workflow-expert - LangGraph|state machines|AI workflows
|
|
87
|
+
</workflow>
|
|
88
|
+
|
|
89
|
+
<management>
|
|
90
|
+
@mcp-context-manager - MCP servers|context optimization
|
|
91
|
+
@mcp-manager - MCP installation|lifecycle|configuration
|
|
92
|
+
</management>
|
|
93
|
+
|
|
94
|
+
</agent_categories>
|
|
95
|
+
|
|
96
|
+
<usage_patterns>
|
|
97
|
+
|
|
98
|
+
<pattern name="Task Delegation">
|
|
99
|
+
<rule>Use specialized agents for ALL non-trivial tasks</rule>
|
|
100
|
+
<example>
|
|
101
|
+
Task: Build FastAPI authentication
|
|
102
|
+
Agent: @python-backend-engineer
|
|
103
|
+
Context7: mcp://context7/fastapi/security
|
|
104
|
+
</example>
|
|
105
|
+
</pattern>
|
|
106
|
+
|
|
107
|
+
<pattern name="Context Preservation">
|
|
108
|
+
<rule>Agent responses ≤ 20% of input data</rule>
|
|
109
|
+
<when>
|
|
110
|
+
Large files → @file-analyzer
|
|
111
|
+
Deep analysis → @code-analyzer
|
|
112
|
+
Test execution → @test-runner
|
|
113
|
+
</when>
|
|
114
|
+
</pattern>
|
|
115
|
+
|
|
116
|
+
<pattern name="Parallel Execution">
|
|
117
|
+
<rule>Use @parallel-worker for independent work streams</rule>
|
|
118
|
+
<example>
|
|
119
|
+
@parallel-worker execute:
|
|
120
|
+
- Stream 1: Frontend changes
|
|
121
|
+
- Stream 2: Backend changes
|
|
122
|
+
- Stream 3: Database migrations
|
|
123
|
+
</example>
|
|
124
|
+
</pattern>
|
|
125
|
+
|
|
126
|
+
<pattern name="Specialist Selection">
|
|
127
|
+
<decision_tree>
|
|
128
|
+
Python code? → @python-backend-engineer
|
|
129
|
+
React UI? → @react-frontend-engineer
|
|
130
|
+
Database? → @[db-type]-expert
|
|
131
|
+
Cloud? → @[cloud]-cloud-architect
|
|
132
|
+
Tests? → @test-runner
|
|
133
|
+
Logs? → @file-analyzer
|
|
134
|
+
Bugs? → @code-analyzer
|
|
135
|
+
</decision_tree>
|
|
136
|
+
</pattern>
|
|
137
|
+
|
|
138
|
+
</usage_patterns>
|
|
139
|
+
|
|
140
|
+
<obligations>
|
|
141
|
+
✓ ALWAYS use agents for non-trivial tasks
|
|
142
|
+
✓ Check agent registry before implementing
|
|
143
|
+
✓ Delegate to preserve context
|
|
144
|
+
✓ Use parallel execution when possible
|
|
145
|
+
✓ Follow agent recommendations
|
|
146
|
+
</obligations>
|
|
147
|
+
|
|
148
|
+
<full_docs>
|
|
149
|
+
.claude/agents/AGENT-REGISTRY.md - Complete agent list
|
|
150
|
+
.claude/rules/agent-mandatory.md - Usage enforcement
|
|
151
|
+
.claude/rules/context-optimization.md - Context patterns
|
|
152
|
+
.claude/rules/agent-coordination.md - Multi-agent workflows
|
|
153
|
+
</full_docs>
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Common Development Patterns (Quick Reference)
|
|
2
|
+
|
|
3
|
+
<pattern_library>
|
|
4
|
+
|
|
5
|
+
<pattern id="error-handling">
|
|
6
|
+
<name>Fail-Fast Error Handling</name>
|
|
7
|
+
<when>Critical configuration|Invalid input|System requirements</when>
|
|
8
|
+
<code>
|
|
9
|
+
# Python
|
|
10
|
+
if not config.get('required_field'):
|
|
11
|
+
raise ValueError("Missing required_field")
|
|
12
|
+
|
|
13
|
+
# TypeScript
|
|
14
|
+
if (!config.requiredField) {
|
|
15
|
+
throw new Error('Missing requiredField');
|
|
16
|
+
}
|
|
17
|
+
</code>
|
|
18
|
+
<principle>Fail early|Clear messages|No silent failures</principle>
|
|
19
|
+
</pattern>
|
|
20
|
+
|
|
21
|
+
<pattern id="search-before-create">
|
|
22
|
+
<name>Search Before Creating</name>
|
|
23
|
+
<when>New files|New functions|New components</when>
|
|
24
|
+
<workflow>
|
|
25
|
+
1. @code-analyzer search for similar code
|
|
26
|
+
2. Grep for related patterns
|
|
27
|
+
3. Read existing implementations
|
|
28
|
+
4. Reuse or extend existing code
|
|
29
|
+
5. Only create if truly new
|
|
30
|
+
</workflow>
|
|
31
|
+
<why>Prevent duplication|Maintain consistency|Reduce complexity</why>
|
|
32
|
+
</pattern>
|
|
33
|
+
|
|
34
|
+
<pattern id="agent-delegation">
|
|
35
|
+
<name>Specialized Agent Delegation</name>
|
|
36
|
+
<when>Complex tasks|Domain expertise needed|Context optimization</when>
|
|
37
|
+
<mapping>
|
|
38
|
+
Python backend → @python-backend-engineer
|
|
39
|
+
React UI → @react-frontend-engineer
|
|
40
|
+
Database → @postgresql-expert|@mongodb-expert
|
|
41
|
+
Testing → @test-runner
|
|
42
|
+
Analysis → @code-analyzer
|
|
43
|
+
Logs → @file-analyzer
|
|
44
|
+
</mapping>
|
|
45
|
+
<benefit>Context preservation|Expert knowledge|Parallel work</benefit>
|
|
46
|
+
</pattern>
|
|
47
|
+
|
|
48
|
+
<pattern id="tdd-cycle">
|
|
49
|
+
<name>Test-Driven Development</name>
|
|
50
|
+
<steps>
|
|
51
|
+
🔴 RED: Write failing test
|
|
52
|
+
✅ GREEN: Minimal code to pass
|
|
53
|
+
♻️ REFACTOR: Clean up code
|
|
54
|
+
</steps>
|
|
55
|
+
<commits>
|
|
56
|
+
test: add failing test for [feature]
|
|
57
|
+
feat: implement [feature]
|
|
58
|
+
refactor: improve [feature] structure
|
|
59
|
+
</commits>
|
|
60
|
+
<ref>.claude/quick-ref/tdd-cycle.md</ref>
|
|
61
|
+
</pattern>
|
|
62
|
+
|
|
63
|
+
<pattern id="context7-first">
|
|
64
|
+
<name>Documentation-First Development</name>
|
|
65
|
+
<workflow>
|
|
66
|
+
1. Query Context7 for current docs
|
|
67
|
+
2. Review API signatures + patterns
|
|
68
|
+
3. Implement using verified approach
|
|
69
|
+
4. Test against documentation examples
|
|
70
|
+
</workflow>
|
|
71
|
+
<ref>.claude/quick-ref/context7-queries.md</ref>
|
|
72
|
+
</pattern>
|
|
73
|
+
|
|
74
|
+
<pattern id="git-workflow">
|
|
75
|
+
<name>Branch-Based Git Workflow</name>
|
|
76
|
+
<flow>
|
|
77
|
+
main (protected)
|
|
78
|
+
└─ feature/name
|
|
79
|
+
├─ commit: test
|
|
80
|
+
├─ commit: feat
|
|
81
|
+
├─ commit: refactor
|
|
82
|
+
└─ PR → review → merge
|
|
83
|
+
</flow>
|
|
84
|
+
<conventions>
|
|
85
|
+
feature/|bugfix/|hotfix/
|
|
86
|
+
Conventional commits (feat|fix|docs|test|refactor)
|
|
87
|
+
Squash merge to main
|
|
88
|
+
</conventions>
|
|
89
|
+
</pattern>
|
|
90
|
+
|
|
91
|
+
<pattern id="definition-of-done">
|
|
92
|
+
<name>Comprehensive Definition of Done</name>
|
|
93
|
+
<checklist>
|
|
94
|
+
✓ All Acceptance Criteria met
|
|
95
|
+
✓ Tests written (TDD)
|
|
96
|
+
✓ Tests passing (@test-runner)
|
|
97
|
+
✓ Code formatted (black|prettier|eslint)
|
|
98
|
+
✓ Linting clean (ruff|eslint)
|
|
99
|
+
✓ Type checking passed (mypy|tsc)
|
|
100
|
+
✓ Documentation updated
|
|
101
|
+
✓ No TODOs or placeholders
|
|
102
|
+
✓ No partial implementations
|
|
103
|
+
✓ Security considered
|
|
104
|
+
✓ Error handling implemented
|
|
105
|
+
</checklist>
|
|
106
|
+
</pattern>
|
|
107
|
+
|
|
108
|
+
<pattern id="pr-template">
|
|
109
|
+
<name>Standard PR Template</name>
|
|
110
|
+
<template>
|
|
111
|
+
## Summary
|
|
112
|
+
- What: [changes made]
|
|
113
|
+
- Why: [business/technical reason]
|
|
114
|
+
- How: [approach taken]
|
|
115
|
+
|
|
116
|
+
## Changes
|
|
117
|
+
- Component A: [description]
|
|
118
|
+
- Component B: [description]
|
|
119
|
+
|
|
120
|
+
## Test Plan
|
|
121
|
+
1. Automated: [test files]
|
|
122
|
+
2. Manual: [verification steps]
|
|
123
|
+
|
|
124
|
+
## Acceptance Criteria
|
|
125
|
+
✓ AC1: [description]
|
|
126
|
+
✓ AC2: [description]
|
|
127
|
+
|
|
128
|
+
## Checklist
|
|
129
|
+
✓ Tests pass
|
|
130
|
+
✓ Linting clean
|
|
131
|
+
✓ Documentation updated
|
|
132
|
+
✓ Breaking changes noted
|
|
133
|
+
</template>
|
|
134
|
+
</pattern>
|
|
135
|
+
|
|
136
|
+
<pattern id="context-optimization">
|
|
137
|
+
<name>Agent-Based Context Preservation</name>
|
|
138
|
+
<rule>Agent responses ≤ 20% of input data</rule>
|
|
139
|
+
<techniques>
|
|
140
|
+
- Summaries not full content
|
|
141
|
+
- Key findings only
|
|
142
|
+
- Actionable insights focus
|
|
143
|
+
- Error patterns not raw logs
|
|
144
|
+
- Use @file-analyzer for large files
|
|
145
|
+
- Use @code-analyzer for deep dives
|
|
146
|
+
- Use specialist agents for complex tasks
|
|
147
|
+
</techniques>
|
|
148
|
+
<ref>.claude/rules/context-optimization.md</ref>
|
|
149
|
+
</pattern>
|
|
150
|
+
|
|
151
|
+
<pattern id="real-services">
|
|
152
|
+
<name>Real Services in Tests</name>
|
|
153
|
+
<principle>No mocks|Use real implementations|Integration tests</principle>
|
|
154
|
+
<why>
|
|
155
|
+
Mocks hide bugs|Reality differs|Integration critical
|
|
156
|
+
</why>
|
|
157
|
+
<approach>
|
|
158
|
+
# Use testcontainers
|
|
159
|
+
docker run -d postgres:latest
|
|
160
|
+
docker run -d redis:latest
|
|
161
|
+
|
|
162
|
+
# Test against real services
|
|
163
|
+
pytest tests/ --real-db --real-cache
|
|
164
|
+
</approach>
|
|
165
|
+
<ref>.claude/rules/test-execution.md</ref>
|
|
166
|
+
</pattern>
|
|
167
|
+
|
|
168
|
+
<pattern id="datetime-handling">
|
|
169
|
+
<name>Real DateTime (No Placeholders)</name>
|
|
170
|
+
<rule>Use real ISO 8601 UTC timestamps</rule>
|
|
171
|
+
<prohibited>
|
|
172
|
+
❌ "2024-01-01T00:00:00Z" (placeholder)
|
|
173
|
+
❌ datetime.now() (timezone unaware)
|
|
174
|
+
</prohibited>
|
|
175
|
+
<correct>
|
|
176
|
+
✓ datetime.now(UTC)
|
|
177
|
+
✓ "2025-10-18T14:23:45.123Z" (actual time)
|
|
178
|
+
</correct>
|
|
179
|
+
<ref>.claude/rules/datetime.md</ref>
|
|
180
|
+
</pattern>
|
|
181
|
+
|
|
182
|
+
<pattern id="naming-conventions">
|
|
183
|
+
<name>Code Quality Standards</name>
|
|
184
|
+
<prohibited>
|
|
185
|
+
❌ "_fixed" suffixes
|
|
186
|
+
❌ "temp_" files
|
|
187
|
+
❌ "WIP" commits
|
|
188
|
+
❌ "TODO: add tests"
|
|
189
|
+
❌ Hardcoded values
|
|
190
|
+
❌ Magic numbers
|
|
191
|
+
</prohibited>
|
|
192
|
+
<required>
|
|
193
|
+
✓ Descriptive names
|
|
194
|
+
✓ Single responsibility
|
|
195
|
+
✓ Meaningful tests
|
|
196
|
+
✓ Error handling
|
|
197
|
+
✓ Type annotations
|
|
198
|
+
</required>
|
|
199
|
+
<ref>.claude/rules/naming-conventions.md</ref>
|
|
200
|
+
</pattern>
|
|
201
|
+
|
|
202
|
+
</pattern_library>
|
|
203
|
+
|
|
204
|
+
<usage>
|
|
205
|
+
These patterns are MANDATORY, not optional.
|
|
206
|
+
Follow them consistently across all projects.
|
|
207
|
+
See full documentation in .claude/rules/ for details.
|
|
208
|
+
</usage>
|
|
209
|
+
|
|
210
|
+
<full_docs>
|
|
211
|
+
.claude/rules/development-workflow.md
|
|
212
|
+
.claude/rules/naming-conventions.md
|
|
213
|
+
.claude/rules/test-execution.md
|
|
214
|
+
.claude/rules/context-optimization.md
|
|
215
|
+
</full_docs>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Context7 Documentation Queries (Quick Reference)
|
|
2
|
+
|
|
3
|
+
<context7_usage>
|
|
4
|
+
<when>
|
|
5
|
+
ALWAYS query BEFORE implementing:
|
|
6
|
+
- New features
|
|
7
|
+
- Framework usage
|
|
8
|
+
- API integration
|
|
9
|
+
- Best practices
|
|
10
|
+
- Design patterns
|
|
11
|
+
</when>
|
|
12
|
+
|
|
13
|
+
<why>
|
|
14
|
+
Training data is stale|APIs change|Best practices evolve
|
|
15
|
+
Context7 provides CURRENT documentation
|
|
16
|
+
</why>
|
|
17
|
+
</context7_usage>
|
|
18
|
+
|
|
19
|
+
<query_format>
|
|
20
|
+
mcp://context7/[library-name]/[topic]
|
|
21
|
+
|
|
22
|
+
<examples>
|
|
23
|
+
mcp://context7/fastapi/authentication
|
|
24
|
+
mcp://context7/react/hooks
|
|
25
|
+
mcp://context7/postgresql/indexing
|
|
26
|
+
mcp://context7/kubernetes/deployments
|
|
27
|
+
mcp://context7/aws/lambda
|
|
28
|
+
</examples>
|
|
29
|
+
</query_format>
|
|
30
|
+
|
|
31
|
+
<common_queries>
|
|
32
|
+
<backend>
|
|
33
|
+
# Python
|
|
34
|
+
mcp://context7/fastapi/routing
|
|
35
|
+
mcp://context7/sqlalchemy/relationships
|
|
36
|
+
mcp://context7/pydantic/validation
|
|
37
|
+
|
|
38
|
+
# Node.js
|
|
39
|
+
mcp://context7/express/middleware
|
|
40
|
+
mcp://context7/nestjs/modules
|
|
41
|
+
mcp://context7/prisma/migrations
|
|
42
|
+
</backend>
|
|
43
|
+
|
|
44
|
+
<frontend>
|
|
45
|
+
# React
|
|
46
|
+
mcp://context7/react/state-management
|
|
47
|
+
mcp://context7/nextjs/routing
|
|
48
|
+
mcp://context7/tailwindcss/utilities
|
|
49
|
+
|
|
50
|
+
# Vue
|
|
51
|
+
mcp://context7/vue/composition-api
|
|
52
|
+
mcp://context7/nuxt/server-routes
|
|
53
|
+
</frontend>
|
|
54
|
+
|
|
55
|
+
<testing>
|
|
56
|
+
mcp://context7/jest/mocking
|
|
57
|
+
mcp://context7/pytest/fixtures
|
|
58
|
+
mcp://context7/playwright/selectors
|
|
59
|
+
mcp://context7/cypress/commands
|
|
60
|
+
</testing>
|
|
61
|
+
|
|
62
|
+
<cloud>
|
|
63
|
+
# AWS
|
|
64
|
+
mcp://context7/aws/ec2
|
|
65
|
+
mcp://context7/aws/s3
|
|
66
|
+
mcp://context7/cloudformation/resources
|
|
67
|
+
|
|
68
|
+
# Azure
|
|
69
|
+
mcp://context7/azure/app-service
|
|
70
|
+
mcp://context7/azure/functions
|
|
71
|
+
mcp://context7/bicep/modules
|
|
72
|
+
|
|
73
|
+
# GCP
|
|
74
|
+
mcp://context7/gcp/cloud-run
|
|
75
|
+
mcp://context7/gcp/cloud-functions
|
|
76
|
+
mcp://context7/terraform/gcp
|
|
77
|
+
</cloud>
|
|
78
|
+
|
|
79
|
+
<databases>
|
|
80
|
+
mcp://context7/postgresql/performance
|
|
81
|
+
mcp://context7/mongodb/aggregation
|
|
82
|
+
mcp://context7/redis/caching
|
|
83
|
+
mcp://context7/elasticsearch/queries
|
|
84
|
+
</databases>
|
|
85
|
+
|
|
86
|
+
<devops>
|
|
87
|
+
mcp://context7/docker/multi-stage
|
|
88
|
+
mcp://context7/kubernetes/helm
|
|
89
|
+
mcp://context7/github-actions/workflows
|
|
90
|
+
mcp://context7/terraform/modules
|
|
91
|
+
</devops>
|
|
92
|
+
</common_queries>
|
|
93
|
+
|
|
94
|
+
<workflow_integration>
|
|
95
|
+
<step1>Receive task</step1>
|
|
96
|
+
<step2>Query Context7 for relevant docs</step2>
|
|
97
|
+
<step3>Review documentation findings</step3>
|
|
98
|
+
<step4>Implement using current best practices</step4>
|
|
99
|
+
<step5>Verify against documentation</step5>
|
|
100
|
+
</workflow_integration>
|
|
101
|
+
|
|
102
|
+
<example>
|
|
103
|
+
Task: "Implement user authentication with JWT"
|
|
104
|
+
|
|
105
|
+
Queries:
|
|
106
|
+
1. mcp://context7/fastapi/security
|
|
107
|
+
2. mcp://context7/jwt/best-practices
|
|
108
|
+
3. mcp://context7/pydantic/validation
|
|
109
|
+
4. mcp://context7/sqlalchemy/user-models
|
|
110
|
+
|
|
111
|
+
Result: Current, secure implementation using latest patterns
|
|
112
|
+
</example>
|
|
113
|
+
|
|
114
|
+
<obligations>
|
|
115
|
+
✓ Query BEFORE implementing
|
|
116
|
+
✓ Never rely solely on training data
|
|
117
|
+
✓ Verify API signatures
|
|
118
|
+
✓ Check for deprecations
|
|
119
|
+
✓ Follow current patterns
|
|
120
|
+
</obligations>
|
|
121
|
+
|
|
122
|
+
<full_docs>.claude/rules/context7-enforcement.md</full_docs>
|