create-claude-context 1.0.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/LICENSE +21 -0
- package/README.md +146 -0
- package/bin/create-claude-context.js +61 -0
- package/lib/detector.js +373 -0
- package/lib/index.js +170 -0
- package/lib/installer.js +362 -0
- package/lib/placeholder.js +208 -0
- package/lib/prompts.js +287 -0
- package/lib/spinner.js +60 -0
- package/lib/validate.js +147 -0
- package/package.json +59 -0
- package/templates/CLAUDE.md.template +235 -0
- package/templates/base/README.md +257 -0
- package/templates/base/RPI_WORKFLOW_PLAN.md +320 -0
- package/templates/base/agents/api-developer.md +76 -0
- package/templates/base/agents/context-engineer.md +525 -0
- package/templates/base/agents/core-architect.md +76 -0
- package/templates/base/agents/database-ops.md +76 -0
- package/templates/base/agents/deployment-ops.md +76 -0
- package/templates/base/agents/integration-hub.md +76 -0
- package/templates/base/analytics/README.md +114 -0
- package/templates/base/ci-templates/README.md +108 -0
- package/templates/base/ci-templates/github-actions/context-check.yml +144 -0
- package/templates/base/ci-templates/github-actions/validate-docs.yml +105 -0
- package/templates/base/commands/analytics.md +238 -0
- package/templates/base/commands/collab.md +194 -0
- package/templates/base/commands/help.md +450 -0
- package/templates/base/commands/rpi-implement.md +115 -0
- package/templates/base/commands/rpi-plan.md +93 -0
- package/templates/base/commands/rpi-research.md +88 -0
- package/templates/base/commands/validate-all.md +77 -0
- package/templates/base/commands/verify-docs-current.md +86 -0
- package/templates/base/config/base.json +57 -0
- package/templates/base/config/environments/development.json +13 -0
- package/templates/base/config/environments/production.json +17 -0
- package/templates/base/config/environments/staging.json +13 -0
- package/templates/base/config/local.json.example +21 -0
- package/templates/base/context/ARCHITECTURE_SNAPSHOT.md +156 -0
- package/templates/base/context/CODE_TO_WORKFLOW_MAP.md +94 -0
- package/templates/base/context/KNOWN_GOTCHAS.md +195 -0
- package/templates/base/context/WORKFLOW_INDEX.md +129 -0
- package/templates/base/context/workflows/WORKFLOW_TEMPLATE.md +294 -0
- package/templates/base/indexes/agents/CAPABILITY_MATRIX.md +255 -0
- package/templates/base/indexes/agents/CATEGORY_INDEX.md +44 -0
- package/templates/base/indexes/code/CATEGORY_INDEX.md +38 -0
- package/templates/base/indexes/routing/CATEGORY_INDEX.md +39 -0
- package/templates/base/indexes/search/CATEGORY_INDEX.md +39 -0
- package/templates/base/indexes/workflows/CATEGORY_INDEX.md +38 -0
- package/templates/base/knowledge/README.md +98 -0
- package/templates/base/knowledge/sessions/README.md +88 -0
- package/templates/base/knowledge/sessions/TEMPLATE.md +150 -0
- package/templates/base/knowledge/shared/decisions/0001-adopt-context-engineering.md +144 -0
- package/templates/base/knowledge/shared/decisions/README.md +49 -0
- package/templates/base/knowledge/shared/decisions/TEMPLATE.md +123 -0
- package/templates/base/knowledge/shared/patterns/README.md +62 -0
- package/templates/base/knowledge/shared/patterns/TEMPLATE.md +120 -0
- package/templates/base/plans/PLAN_TEMPLATE.md +250 -0
- package/templates/base/plans/active/.gitkeep +0 -0
- package/templates/base/plans/completed/.gitkeep +0 -0
- package/templates/base/research/RESEARCH_TEMPLATE.md +153 -0
- package/templates/base/research/active/.gitkeep +0 -0
- package/templates/base/research/completed/.gitkeep +0 -0
- package/templates/base/schemas/agent.schema.json +141 -0
- package/templates/base/schemas/command.schema.json +134 -0
- package/templates/base/schemas/manifest.schema.json +117 -0
- package/templates/base/schemas/plan.schema.json +136 -0
- package/templates/base/schemas/research.schema.json +115 -0
- package/templates/base/schemas/settings.schema.json +244 -0
- package/templates/base/schemas/workflow.schema.json +126 -0
- package/templates/base/settings.json +57 -0
- package/templates/base/standards/COMPATIBILITY.md +219 -0
- package/templates/base/standards/EXTENSION_GUIDELINES.md +280 -0
- package/templates/base/standards/QUALITY_CHECKLIST.md +211 -0
- package/templates/base/standards/README.md +66 -0
- package/templates/base/team/README.md +168 -0
- package/templates/base/team/config.json +79 -0
- package/templates/base/team/roles.json +145 -0
- package/templates/base/tools/bin/claude-context.js +151 -0
- package/templates/base/tools/lib/config-loader.js +363 -0
- package/templates/base/tools/lib/detector.js +350 -0
- package/templates/base/tools/lib/diagnose.js +206 -0
- package/templates/base/tools/lib/errors.js +199 -0
- package/templates/base/tools/lib/index.js +24 -0
- package/templates/base/tools/lib/init.js +192 -0
- package/templates/base/tools/lib/logger.js +230 -0
- package/templates/base/tools/lib/placeholder.js +201 -0
- package/templates/base/tools/lib/validate.js +521 -0
- package/templates/base/tools/package.json +49 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: help
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
description: "Display help for all available commands and agents"
|
|
5
|
+
category: "system"
|
|
6
|
+
context_budget_estimate: "5K tokens"
|
|
7
|
+
typical_context_usage: "2%"
|
|
8
|
+
prerequisites: []
|
|
9
|
+
outputs:
|
|
10
|
+
- "Command and agent reference information"
|
|
11
|
+
next_commands: []
|
|
12
|
+
related_agents: []
|
|
13
|
+
examples:
|
|
14
|
+
- command: "/help"
|
|
15
|
+
description: "List all commands and agents"
|
|
16
|
+
- command: "/help commands"
|
|
17
|
+
description: "Detailed command reference"
|
|
18
|
+
- command: "/help agents"
|
|
19
|
+
description: "Agent capability overview"
|
|
20
|
+
- command: "/help rpi"
|
|
21
|
+
description: "RPI workflow deep dive"
|
|
22
|
+
- command: "/help rpi-research"
|
|
23
|
+
description: "Specific command help"
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Help Command
|
|
27
|
+
|
|
28
|
+
Display help and reference information for Claude Context Engineering.
|
|
29
|
+
|
|
30
|
+
## Syntax
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
/help [topic]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Topics
|
|
37
|
+
|
|
38
|
+
| Topic | Description |
|
|
39
|
+
|-------|-------------|
|
|
40
|
+
| *(none)* | Overview of all commands and agents |
|
|
41
|
+
| `commands` | Detailed command reference |
|
|
42
|
+
| `agents` | Agent capabilities and selection guide |
|
|
43
|
+
| `rpi` | RPI workflow deep dive |
|
|
44
|
+
| `[command-name]` | Specific command help |
|
|
45
|
+
| `[agent-name]` | Specific agent help |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Quick Reference
|
|
50
|
+
|
|
51
|
+
### Available Commands
|
|
52
|
+
|
|
53
|
+
| Command | Category | Description |
|
|
54
|
+
|---------|----------|-------------|
|
|
55
|
+
| `/rpi-research [name]` | RPI | Research phase - systematic codebase exploration |
|
|
56
|
+
| `/rpi-plan [name]` | RPI | Plan phase - create implementation blueprint |
|
|
57
|
+
| `/rpi-implement [name]` | RPI | Implement phase - execute with continuous testing |
|
|
58
|
+
| `/verify-docs-current [file]` | Validation | Check documentation accuracy against code |
|
|
59
|
+
| `/validate-all` | Validation | Run complete validation suite |
|
|
60
|
+
| `/help [topic]` | System | Display this help information |
|
|
61
|
+
|
|
62
|
+
### Available Agents
|
|
63
|
+
|
|
64
|
+
| Agent | Domain | Primary Use |
|
|
65
|
+
|-------|--------|-------------|
|
|
66
|
+
| `@context-engineer` | Initialization | Transform template for any codebase |
|
|
67
|
+
| `@core-architect` | Architecture | System design, state machines, high-level planning |
|
|
68
|
+
| `@database-ops` | Database | Migrations, schema, query optimization |
|
|
69
|
+
| `@api-developer` | API | Endpoints, contracts, API documentation |
|
|
70
|
+
| `@integration-hub` | Integration | External services, webhooks, third-party APIs |
|
|
71
|
+
| `@deployment-ops` | DevOps | CI/CD, infrastructure, deployment strategies |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Commands Reference
|
|
76
|
+
|
|
77
|
+
### RPI Workflow Commands
|
|
78
|
+
|
|
79
|
+
The Research-Plan-Implement workflow prevents cascading errors through structured development.
|
|
80
|
+
|
|
81
|
+
#### `/rpi-research [feature-name]`
|
|
82
|
+
|
|
83
|
+
**Purpose:** Systematic, zero-code-modification exploration of the codebase.
|
|
84
|
+
|
|
85
|
+
**Context Budget:** ~50K tokens (25%)
|
|
86
|
+
|
|
87
|
+
**What it does:**
|
|
88
|
+
1. Launches 3 parallel exploration agents
|
|
89
|
+
2. Traces call chains 3 levels deep with file:line references
|
|
90
|
+
3. Maps dependencies (internal and external)
|
|
91
|
+
4. Identifies test coverage gaps
|
|
92
|
+
5. Creates research document in `.claude/research/active/`
|
|
93
|
+
|
|
94
|
+
**Exit Criteria:**
|
|
95
|
+
- [ ] 3-20 relevant files identified
|
|
96
|
+
- [ ] Call chains traced with line numbers
|
|
97
|
+
- [ ] Dependencies mapped
|
|
98
|
+
- [ ] 150-word summary for parent context
|
|
99
|
+
|
|
100
|
+
**Example:**
|
|
101
|
+
```bash
|
|
102
|
+
/rpi-research user-authentication
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
#### `/rpi-plan [feature-name]`
|
|
108
|
+
|
|
109
|
+
**Purpose:** Create detailed implementation blueprint with file:line precision.
|
|
110
|
+
|
|
111
|
+
**Context Budget:** ~35K tokens (17%)
|
|
112
|
+
|
|
113
|
+
**Prerequisites:** Research document must exist in `.claude/research/active/`
|
|
114
|
+
|
|
115
|
+
**What it does:**
|
|
116
|
+
1. Loads research document
|
|
117
|
+
2. Defines scope (in-scope, out-of-scope)
|
|
118
|
+
3. Creates modification table with file, lines, change, risk level
|
|
119
|
+
4. Designs step-by-step implementation
|
|
120
|
+
5. Defines test strategy
|
|
121
|
+
6. Requires human approval before proceeding
|
|
122
|
+
|
|
123
|
+
**Exit Criteria:**
|
|
124
|
+
- [ ] All modifications listed with file:line
|
|
125
|
+
- [ ] Step-by-step implementation defined
|
|
126
|
+
- [ ] Test strategy documented
|
|
127
|
+
- [ ] Human approval obtained
|
|
128
|
+
|
|
129
|
+
**Example:**
|
|
130
|
+
```bash
|
|
131
|
+
/rpi-plan user-authentication
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
#### `/rpi-implement [feature-name]`
|
|
137
|
+
|
|
138
|
+
**Purpose:** Execute approved plan with atomic changes and continuous testing.
|
|
139
|
+
|
|
140
|
+
**Context Budget:** ~60K tokens (30%)
|
|
141
|
+
|
|
142
|
+
**Prerequisites:** Approved plan in `.claude/plans/active/`
|
|
143
|
+
|
|
144
|
+
**Golden Rule:** ONE CHANGE → ONE TEST → ONE COMMIT
|
|
145
|
+
|
|
146
|
+
**What it does:**
|
|
147
|
+
1. Verifies preconditions (plan approved, clean branch, tests pass)
|
|
148
|
+
2. For each step: make change → run test → commit if pass
|
|
149
|
+
3. Updates documentation after each change
|
|
150
|
+
4. Runs full test suite after completion
|
|
151
|
+
5. Archives plan to `.claude/plans/completed/`
|
|
152
|
+
|
|
153
|
+
**Error Recovery:**
|
|
154
|
+
- Syntax error: Fix immediately
|
|
155
|
+
- Test failure: Stop, investigate, don't proceed
|
|
156
|
+
- 3+ failures: Stop, start fresh session
|
|
157
|
+
|
|
158
|
+
**Example:**
|
|
159
|
+
```bash
|
|
160
|
+
/rpi-implement user-authentication
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### Validation Commands
|
|
166
|
+
|
|
167
|
+
#### `/verify-docs-current [file_path]`
|
|
168
|
+
|
|
169
|
+
**Purpose:** Validate documentation accuracy against current code.
|
|
170
|
+
|
|
171
|
+
**Context Budget:** ~20K tokens (10%)
|
|
172
|
+
|
|
173
|
+
**What it does:**
|
|
174
|
+
1. Looks up file in CODE_TO_WORKFLOW_MAP.md
|
|
175
|
+
2. Finds all workflows that document this file
|
|
176
|
+
3. Verifies line number references (±10 line tolerance)
|
|
177
|
+
4. Checks markdown links resolve
|
|
178
|
+
5. Generates accuracy report
|
|
179
|
+
|
|
180
|
+
**Output:** Status per workflow (HEALTHY / NEEDS UPDATE / STALE)
|
|
181
|
+
|
|
182
|
+
**Example:**
|
|
183
|
+
```bash
|
|
184
|
+
/verify-docs-current src/services/auth.py
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
#### `/validate-all`
|
|
190
|
+
|
|
191
|
+
**Purpose:** Run complete validation suite.
|
|
192
|
+
|
|
193
|
+
**Context Budget:** ~40K tokens (20%)
|
|
194
|
+
|
|
195
|
+
**What it does:**
|
|
196
|
+
1. Documentation validation (line numbers, links, CODE_TO_WORKFLOW_MAP)
|
|
197
|
+
2. Test validation (unit, integration, coverage threshold)
|
|
198
|
+
3. Code quality checks (linting, type checking, security)
|
|
199
|
+
4. Configuration validation
|
|
200
|
+
|
|
201
|
+
**Output:** Report with PASS/FAIL per category, overall READY/NOT READY
|
|
202
|
+
|
|
203
|
+
**Example:**
|
|
204
|
+
```bash
|
|
205
|
+
/validate-all
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Agents Reference
|
|
211
|
+
|
|
212
|
+
### Agent Selection Guide
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
START
|
|
216
|
+
│
|
|
217
|
+
├── Is this initialization/setup? → @context-engineer
|
|
218
|
+
│
|
|
219
|
+
├── Does it involve external APIs/webhooks? → @integration-hub
|
|
220
|
+
│
|
|
221
|
+
├── Does it involve database changes? → @database-ops
|
|
222
|
+
│
|
|
223
|
+
├── Does it involve API endpoints? → @api-developer
|
|
224
|
+
│
|
|
225
|
+
├── Does it involve deployment/CI/CD? → @deployment-ops
|
|
226
|
+
│
|
|
227
|
+
└── Is it architecture/system design? → @core-architect
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Agent Details
|
|
231
|
+
|
|
232
|
+
#### `@context-engineer`
|
|
233
|
+
|
|
234
|
+
**Type:** Initialization Agent
|
|
235
|
+
**Complexity:** Very High
|
|
236
|
+
**Context Usage:** Up to 80K tokens (40%)
|
|
237
|
+
|
|
238
|
+
**Capabilities:**
|
|
239
|
+
- Tech stack detection
|
|
240
|
+
- Workflow discovery (8-15 workflows)
|
|
241
|
+
- Template population
|
|
242
|
+
- System validation
|
|
243
|
+
- Documentation generation
|
|
244
|
+
|
|
245
|
+
**Invocation:**
|
|
246
|
+
```bash
|
|
247
|
+
@context-engineer "Initialize context engineering for this repository"
|
|
248
|
+
@context-engineer "Document workflow: [name]"
|
|
249
|
+
@context-engineer "Refresh workflow: [name]"
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
#### `@core-architect`
|
|
255
|
+
|
|
256
|
+
**Type:** Architecture Specialist
|
|
257
|
+
**Complexity:** High
|
|
258
|
+
**Context Usage:** ~50K tokens (25%)
|
|
259
|
+
|
|
260
|
+
**Capabilities:**
|
|
261
|
+
- System architecture design
|
|
262
|
+
- State machine analysis
|
|
263
|
+
- Dependency mapping
|
|
264
|
+
- Scalability planning
|
|
265
|
+
- High-level design patterns
|
|
266
|
+
|
|
267
|
+
**Invocation:**
|
|
268
|
+
```bash
|
|
269
|
+
@core-architect "Document system architecture"
|
|
270
|
+
@core-architect "Analyze state transitions in [component]"
|
|
271
|
+
@core-architect "Identify scalability bottlenecks"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
#### `@database-ops`
|
|
277
|
+
|
|
278
|
+
**Type:** Database Specialist
|
|
279
|
+
**Complexity:** Medium-High
|
|
280
|
+
**Context Usage:** ~40K tokens (20%)
|
|
281
|
+
|
|
282
|
+
**Capabilities:**
|
|
283
|
+
- Schema design and validation
|
|
284
|
+
- Migration planning and execution
|
|
285
|
+
- Query optimization
|
|
286
|
+
- Data integrity checks
|
|
287
|
+
- Performance tuning
|
|
288
|
+
|
|
289
|
+
**Invocation:**
|
|
290
|
+
```bash
|
|
291
|
+
@database-ops "Document database schema"
|
|
292
|
+
@database-ops "Analyze query performance for [query]"
|
|
293
|
+
@database-ops "Plan migration for [change]"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
#### `@api-developer`
|
|
299
|
+
|
|
300
|
+
**Type:** API Specialist
|
|
301
|
+
**Complexity:** Medium
|
|
302
|
+
**Context Usage:** ~35K tokens (17%)
|
|
303
|
+
|
|
304
|
+
**Capabilities:**
|
|
305
|
+
- API design (REST, GraphQL)
|
|
306
|
+
- Contract definition
|
|
307
|
+
- Endpoint documentation
|
|
308
|
+
- API testing strategies
|
|
309
|
+
- Version management
|
|
310
|
+
|
|
311
|
+
**Invocation:**
|
|
312
|
+
```bash
|
|
313
|
+
@api-developer "Document API endpoints for [resource]"
|
|
314
|
+
@api-developer "Validate API contracts"
|
|
315
|
+
@api-developer "Generate OpenAPI spec"
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
#### `@integration-hub`
|
|
321
|
+
|
|
322
|
+
**Type:** Integration Specialist
|
|
323
|
+
**Complexity:** Medium-High
|
|
324
|
+
**Context Usage:** ~40K tokens (20%)
|
|
325
|
+
|
|
326
|
+
**Capabilities:**
|
|
327
|
+
- Third-party API integration
|
|
328
|
+
- Webhook handling
|
|
329
|
+
- Authentication management
|
|
330
|
+
- Rate limiting implementation
|
|
331
|
+
- Error handling for external services
|
|
332
|
+
|
|
333
|
+
**Invocation:**
|
|
334
|
+
```bash
|
|
335
|
+
@integration-hub "Document integration with [service]"
|
|
336
|
+
@integration-hub "Analyze webhook endpoints"
|
|
337
|
+
@integration-hub "Review authentication flows"
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
#### `@deployment-ops`
|
|
343
|
+
|
|
344
|
+
**Type:** DevOps Specialist
|
|
345
|
+
**Complexity:** High
|
|
346
|
+
**Context Usage:** ~45K tokens (22%)
|
|
347
|
+
|
|
348
|
+
**Capabilities:**
|
|
349
|
+
- CI/CD pipeline design
|
|
350
|
+
- Infrastructure as code
|
|
351
|
+
- Deployment strategies (blue-green, canary)
|
|
352
|
+
- Environment management
|
|
353
|
+
- Monitoring and rollback
|
|
354
|
+
|
|
355
|
+
**Invocation:**
|
|
356
|
+
```bash
|
|
357
|
+
@deployment-ops "Document deployment pipeline"
|
|
358
|
+
@deployment-ops "Review infrastructure configuration"
|
|
359
|
+
@deployment-ops "Plan rollback strategy"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## RPI Workflow Deep Dive
|
|
365
|
+
|
|
366
|
+
### Philosophy
|
|
367
|
+
|
|
368
|
+
The Research-Plan-Implement methodology prevents "slop" (degraded output quality) by:
|
|
369
|
+
|
|
370
|
+
1. **Separating concerns:** Research loads context, Plan uses it, Implement executes
|
|
371
|
+
2. **Human checkpoints:** Approval required between Plan and Implement
|
|
372
|
+
3. **Atomic changes:** Small, testable, reversible modifications
|
|
373
|
+
4. **Context discipline:** Each phase has a budget, compacts before next phase
|
|
374
|
+
|
|
375
|
+
### Token Budget Strategy
|
|
376
|
+
|
|
377
|
+
| Phase | Budget | Cumulative |
|
|
378
|
+
|-------|--------|------------|
|
|
379
|
+
| Research | 50K | 50K (25%) |
|
|
380
|
+
| Plan | 35K | 85K (42%) |
|
|
381
|
+
| Implement | 60K | 145K (72%) |
|
|
382
|
+
| Buffer | 55K | 200K (100%) |
|
|
383
|
+
|
|
384
|
+
### Workflow Diagram
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
User Request
|
|
388
|
+
│
|
|
389
|
+
▼
|
|
390
|
+
┌─────────────────┐
|
|
391
|
+
│ /rpi-research │ → .claude/research/active/[name]_research.md
|
|
392
|
+
└────────┬────────┘
|
|
393
|
+
│
|
|
394
|
+
▼
|
|
395
|
+
┌─────────────────┐
|
|
396
|
+
│ /rpi-plan │ → .claude/plans/active/[name]_plan.md
|
|
397
|
+
└────────┬────────┘
|
|
398
|
+
│
|
|
399
|
+
▼
|
|
400
|
+
┌─────────┐
|
|
401
|
+
│ APPROVE │ ← Human Review
|
|
402
|
+
└────┬────┘
|
|
403
|
+
│
|
|
404
|
+
▼
|
|
405
|
+
┌─────────────────┐
|
|
406
|
+
│ /rpi-implement │ → Code changes + Doc updates
|
|
407
|
+
└────────┬────────┘
|
|
408
|
+
│
|
|
409
|
+
▼
|
|
410
|
+
.claude/plans/completed/[name]_plan.md
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## CLI Tools
|
|
416
|
+
|
|
417
|
+
In addition to slash commands, CLI tools are available:
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
# Validate setup
|
|
421
|
+
npx claude-context validate
|
|
422
|
+
|
|
423
|
+
# Run diagnostics
|
|
424
|
+
npx claude-context diagnose
|
|
425
|
+
|
|
426
|
+
# Initialize (partial - requires agent for full init)
|
|
427
|
+
npx claude-context init
|
|
428
|
+
|
|
429
|
+
# View configuration
|
|
430
|
+
npx claude-context config
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## Quick Tips
|
|
436
|
+
|
|
437
|
+
1. **Start with indexes:** Load CATEGORY_INDEX.md before detail files
|
|
438
|
+
2. **Use progressive loading:** 5K → 15K → 40K tokens as needed
|
|
439
|
+
3. **After code changes:** Always run `/verify-docs-current`
|
|
440
|
+
4. **For complex features:** Full RPI cycle prevents errors
|
|
441
|
+
5. **When stuck:** Use `@context-engineer "help with [problem]"`
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## Getting More Help
|
|
446
|
+
|
|
447
|
+
- **Quick Start:** See `docs/QUICK_START_5MIN.md`
|
|
448
|
+
- **Troubleshooting:** See `docs/TROUBLESHOOTING.md`
|
|
449
|
+
- **Full Documentation:** See `.claude/README.md`
|
|
450
|
+
- **RPI Details:** See `.claude/RPI_WORKFLOW_PLAN.md`
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rpi-implement
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
description: "RPI Implement Phase: Execute plan with atomic changes and continuous testing"
|
|
5
|
+
category: "rpi-orchestration"
|
|
6
|
+
rpi_phase: "implement"
|
|
7
|
+
context_budget_estimate: "60K tokens"
|
|
8
|
+
typical_context_usage: "30%"
|
|
9
|
+
prerequisites:
|
|
10
|
+
- "Plan document exists in .claude/plans/active/"
|
|
11
|
+
- "Plan has been approved by human"
|
|
12
|
+
- "Git branch is clean"
|
|
13
|
+
- "All tests currently passing"
|
|
14
|
+
outputs:
|
|
15
|
+
- "Implemented feature/fix"
|
|
16
|
+
- "Updated documentation with new line numbers"
|
|
17
|
+
- "Commits with descriptive messages"
|
|
18
|
+
- "Archived plan in .claude/plans/completed/"
|
|
19
|
+
next_commands: ["/verify-docs-current", "/validate-all"]
|
|
20
|
+
related_agents: ["core-architect", "database-ops", "api-developer", "deployment-ops"]
|
|
21
|
+
examples:
|
|
22
|
+
- command: "/rpi-implement user-authentication"
|
|
23
|
+
description: "Execute the approved authentication plan"
|
|
24
|
+
- command: "/rpi-implement payment-bug-fix"
|
|
25
|
+
description: "Implement the approved bug fix"
|
|
26
|
+
exit_criteria:
|
|
27
|
+
- "All plan steps completed"
|
|
28
|
+
- "All tests passing"
|
|
29
|
+
- "Documentation updated"
|
|
30
|
+
- "Changes committed"
|
|
31
|
+
- "Plan archived to completed/"
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# RPI Implement Phase
|
|
35
|
+
|
|
36
|
+
**Purpose:** Execute implementation plan atomically
|
|
37
|
+
|
|
38
|
+
**Syntax:** `/rpi-implement [feature-name]`
|
|
39
|
+
|
|
40
|
+
**Prerequisites:** Plan must be approved in `.claude/plans/active/`
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Golden Rule
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
ONE CHANGE → ONE TEST → ONE COMMIT
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Execution Steps
|
|
53
|
+
|
|
54
|
+
### Step 1: Load Plan
|
|
55
|
+
Read `.claude/plans/active/[feature]_plan.md`
|
|
56
|
+
|
|
57
|
+
### Step 2: Verify Preconditions
|
|
58
|
+
- [ ] Plan is approved
|
|
59
|
+
- [ ] Branch is clean
|
|
60
|
+
- [ ] Tests pass before changes
|
|
61
|
+
|
|
62
|
+
### Step 3: Execute Each Step
|
|
63
|
+
For each step in plan:
|
|
64
|
+
1. Make the single, atomic change
|
|
65
|
+
2. Run step-specific test
|
|
66
|
+
3. If pass: commit with descriptive message
|
|
67
|
+
4. If fail: stop, investigate, do not proceed
|
|
68
|
+
|
|
69
|
+
### Step 4: Context Reset (Every 3 Steps)
|
|
70
|
+
1. Update progress in plan
|
|
71
|
+
2. Re-read plan document
|
|
72
|
+
3. Verify scope alignment
|
|
73
|
+
4. Compact if >35% context usage
|
|
74
|
+
|
|
75
|
+
### Step 5: Run Full Test Suite
|
|
76
|
+
After all steps complete
|
|
77
|
+
|
|
78
|
+
### Step 6: Update Documentation (MANDATORY)
|
|
79
|
+
1. Check CODE_TO_WORKFLOW_MAP.md
|
|
80
|
+
2. Update affected workflow files
|
|
81
|
+
3. Update line numbers
|
|
82
|
+
4. Run /verify-docs-current
|
|
83
|
+
|
|
84
|
+
### Step 7: Final Commit
|
|
85
|
+
Documentation updates
|
|
86
|
+
|
|
87
|
+
### Step 8: Archive Plan
|
|
88
|
+
Move to `.claude/plans/completed/`
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Error Recovery
|
|
93
|
+
|
|
94
|
+
| Error Type | Action |
|
|
95
|
+
|------------|--------|
|
|
96
|
+
| Syntax Error | Fix immediately |
|
|
97
|
+
| Test Failure | Stop, investigate |
|
|
98
|
+
| 3+ Failures | Compact, start new session |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Context Budget
|
|
103
|
+
|
|
104
|
+
- Plan: 15k tokens
|
|
105
|
+
- Active code: 30k tokens
|
|
106
|
+
- Test results: 15k tokens
|
|
107
|
+
- Total: 60k tokens (30%)
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Output
|
|
112
|
+
|
|
113
|
+
- Completed feature/fix
|
|
114
|
+
- Updated documentation
|
|
115
|
+
- Plan archived to completed/
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rpi-plan
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
description: "RPI Plan Phase: Create implementation blueprint with file:line precision"
|
|
5
|
+
category: "rpi-orchestration"
|
|
6
|
+
rpi_phase: "plan"
|
|
7
|
+
context_budget_estimate: "35K tokens"
|
|
8
|
+
typical_context_usage: "17%"
|
|
9
|
+
prerequisites:
|
|
10
|
+
- "Research document exists in .claude/research/active/"
|
|
11
|
+
- "/rpi-research phase completed"
|
|
12
|
+
outputs:
|
|
13
|
+
- "Plan document in .claude/plans/active/[name]_plan.md"
|
|
14
|
+
- "Modification table with file:line references"
|
|
15
|
+
- "Step-by-step implementation guide"
|
|
16
|
+
- "Test strategy"
|
|
17
|
+
- "Rollback plan"
|
|
18
|
+
next_commands: ["/rpi-implement"]
|
|
19
|
+
related_agents: ["core-architect", "database-ops", "api-developer"]
|
|
20
|
+
examples:
|
|
21
|
+
- command: "/rpi-plan user-authentication"
|
|
22
|
+
description: "Create implementation plan for auth feature"
|
|
23
|
+
- command: "/rpi-plan payment-bug-fix"
|
|
24
|
+
description: "Plan the fix for payment issue"
|
|
25
|
+
exit_criteria:
|
|
26
|
+
- "Plan document created in .claude/plans/active/"
|
|
27
|
+
- "All file modifications listed with line numbers"
|
|
28
|
+
- "Step-by-step implementation defined"
|
|
29
|
+
- "Test strategy documented"
|
|
30
|
+
- "Human approval obtained"
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# RPI Plan Phase
|
|
34
|
+
|
|
35
|
+
**Purpose:** Create detailed implementation blueprint
|
|
36
|
+
|
|
37
|
+
**Syntax:** `/rpi-plan [feature-name]`
|
|
38
|
+
|
|
39
|
+
**Prerequisites:** Research document must exist in `.claude/research/active/`
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Execution Steps
|
|
44
|
+
|
|
45
|
+
### Step 1: Load Research Document
|
|
46
|
+
Read `.claude/research/active/[feature]_research.md`
|
|
47
|
+
|
|
48
|
+
### Step 2: Define Scope
|
|
49
|
+
- In scope (explicit list)
|
|
50
|
+
- Out of scope (what we're NOT touching)
|
|
51
|
+
|
|
52
|
+
### Step 3: List File Modifications
|
|
53
|
+
| File | Lines | Change | Risk |
|
|
54
|
+
|------|-------|--------|------|
|
|
55
|
+
Each modification with exact line numbers
|
|
56
|
+
|
|
57
|
+
### Step 4: Create Step-by-Step Plan
|
|
58
|
+
For each step:
|
|
59
|
+
- Current code
|
|
60
|
+
- Proposed change
|
|
61
|
+
- Test to run after
|
|
62
|
+
|
|
63
|
+
### Step 5: Define Test Strategy
|
|
64
|
+
- Unit tests required
|
|
65
|
+
- Integration tests required
|
|
66
|
+
- E2E tests if applicable
|
|
67
|
+
|
|
68
|
+
### Step 6: Document Rollback Plan
|
|
69
|
+
- How to revert
|
|
70
|
+
- Safe commit to return to
|
|
71
|
+
|
|
72
|
+
### Step 7: Request Human Approval
|
|
73
|
+
Plan requires human review before implementation
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Output
|
|
78
|
+
|
|
79
|
+
Plan document in `.claude/plans/active/[feature]_plan.md`
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Context Budget
|
|
84
|
+
|
|
85
|
+
- Research doc: 20k tokens
|
|
86
|
+
- Plan creation: 15k tokens
|
|
87
|
+
- Total: 35k tokens (17%)
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Next Step
|
|
92
|
+
|
|
93
|
+
After human approval: `/rpi-implement [feature-name]`
|