create-universal-ai-context 2.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.
Files changed (136) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +171 -0
  3. package/bin/create-ai-context.js +337 -0
  4. package/lib/adapters/antigravity.js +160 -0
  5. package/lib/adapters/claude.js +122 -0
  6. package/lib/adapters/cline.js +111 -0
  7. package/lib/adapters/copilot.js +117 -0
  8. package/lib/adapters/index.js +69 -0
  9. package/lib/ai-context-generator.js +234 -0
  10. package/lib/ai-orchestrator.js +431 -0
  11. package/lib/call-tracer.js +444 -0
  12. package/lib/detector.js +726 -0
  13. package/lib/environment-detector.js +239 -0
  14. package/lib/index.js +310 -0
  15. package/lib/installer.js +418 -0
  16. package/lib/migrate.js +319 -0
  17. package/lib/placeholder.js +541 -0
  18. package/lib/prompts.js +287 -0
  19. package/lib/spinner.js +60 -0
  20. package/lib/static-analyzer.js +729 -0
  21. package/lib/template-populator.js +843 -0
  22. package/lib/template-renderer.js +382 -0
  23. package/lib/validate.js +155 -0
  24. package/package.json +70 -0
  25. package/templates/AI_CONTEXT.md.template +245 -0
  26. package/templates/base/README.md +257 -0
  27. package/templates/base/RPI_WORKFLOW_PLAN.md +320 -0
  28. package/templates/base/agents/api-developer.md +76 -0
  29. package/templates/base/agents/context-engineer.md +525 -0
  30. package/templates/base/agents/core-architect.md +76 -0
  31. package/templates/base/agents/database-ops.md +76 -0
  32. package/templates/base/agents/deployment-ops.md +76 -0
  33. package/templates/base/agents/integration-hub.md +76 -0
  34. package/templates/base/analytics/README.md +114 -0
  35. package/templates/base/automation/config.json +58 -0
  36. package/templates/base/automation/generators/code-mapper.js +308 -0
  37. package/templates/base/automation/generators/index-builder.js +321 -0
  38. package/templates/base/automation/hooks/post-commit.sh +83 -0
  39. package/templates/base/automation/hooks/pre-commit.sh +103 -0
  40. package/templates/base/ci-templates/README.md +108 -0
  41. package/templates/base/ci-templates/github-actions/context-check.yml +144 -0
  42. package/templates/base/ci-templates/github-actions/validate-docs.yml +105 -0
  43. package/templates/base/commands/analytics.md +238 -0
  44. package/templates/base/commands/auto-sync.md +172 -0
  45. package/templates/base/commands/collab.md +194 -0
  46. package/templates/base/commands/help.md +450 -0
  47. package/templates/base/commands/rpi-implement.md +115 -0
  48. package/templates/base/commands/rpi-plan.md +93 -0
  49. package/templates/base/commands/rpi-research.md +88 -0
  50. package/templates/base/commands/session-resume.md +144 -0
  51. package/templates/base/commands/session-save.md +112 -0
  52. package/templates/base/commands/validate-all.md +77 -0
  53. package/templates/base/commands/verify-docs-current.md +86 -0
  54. package/templates/base/config/base.json +57 -0
  55. package/templates/base/config/environments/development.json +13 -0
  56. package/templates/base/config/environments/production.json +17 -0
  57. package/templates/base/config/environments/staging.json +13 -0
  58. package/templates/base/config/local.json.example +21 -0
  59. package/templates/base/context/.meta/generated-at.json +18 -0
  60. package/templates/base/context/ARCHITECTURE_SNAPSHOT.md +156 -0
  61. package/templates/base/context/CODE_TO_WORKFLOW_MAP.md +94 -0
  62. package/templates/base/context/FILE_OWNERSHIP.md +57 -0
  63. package/templates/base/context/INTEGRATION_POINTS.md +92 -0
  64. package/templates/base/context/KNOWN_GOTCHAS.md +195 -0
  65. package/templates/base/context/TESTING_MAP.md +95 -0
  66. package/templates/base/context/WORKFLOW_INDEX.md +129 -0
  67. package/templates/base/context/workflows/WORKFLOW_TEMPLATE.md +294 -0
  68. package/templates/base/indexes/agents/CAPABILITY_MATRIX.md +255 -0
  69. package/templates/base/indexes/agents/CATEGORY_INDEX.md +44 -0
  70. package/templates/base/indexes/code/CATEGORY_INDEX.md +38 -0
  71. package/templates/base/indexes/routing/CATEGORY_INDEX.md +39 -0
  72. package/templates/base/indexes/search/CATEGORY_INDEX.md +39 -0
  73. package/templates/base/indexes/workflows/CATEGORY_INDEX.md +38 -0
  74. package/templates/base/knowledge/README.md +98 -0
  75. package/templates/base/knowledge/sessions/README.md +88 -0
  76. package/templates/base/knowledge/sessions/TEMPLATE.md +150 -0
  77. package/templates/base/knowledge/shared/decisions/0001-adopt-context-engineering.md +144 -0
  78. package/templates/base/knowledge/shared/decisions/README.md +49 -0
  79. package/templates/base/knowledge/shared/decisions/TEMPLATE.md +123 -0
  80. package/templates/base/knowledge/shared/patterns/README.md +62 -0
  81. package/templates/base/knowledge/shared/patterns/TEMPLATE.md +120 -0
  82. package/templates/base/plans/PLAN_TEMPLATE.md +250 -0
  83. package/templates/base/plans/active/.gitkeep +0 -0
  84. package/templates/base/plans/completed/.gitkeep +0 -0
  85. package/templates/base/research/RESEARCH_TEMPLATE.md +153 -0
  86. package/templates/base/research/active/.gitkeep +0 -0
  87. package/templates/base/research/completed/.gitkeep +0 -0
  88. package/templates/base/schemas/agent.schema.json +141 -0
  89. package/templates/base/schemas/anchors.schema.json +54 -0
  90. package/templates/base/schemas/automation.schema.json +93 -0
  91. package/templates/base/schemas/command.schema.json +134 -0
  92. package/templates/base/schemas/hashes.schema.json +40 -0
  93. package/templates/base/schemas/manifest.schema.json +117 -0
  94. package/templates/base/schemas/plan.schema.json +136 -0
  95. package/templates/base/schemas/research.schema.json +115 -0
  96. package/templates/base/schemas/roles.schema.json +34 -0
  97. package/templates/base/schemas/session.schema.json +77 -0
  98. package/templates/base/schemas/settings.schema.json +244 -0
  99. package/templates/base/schemas/staleness.schema.json +53 -0
  100. package/templates/base/schemas/team-config.schema.json +42 -0
  101. package/templates/base/schemas/workflow.schema.json +126 -0
  102. package/templates/base/session/checkpoints/.gitkeep +2 -0
  103. package/templates/base/session/current/state.json +20 -0
  104. package/templates/base/session/history/.gitkeep +2 -0
  105. package/templates/base/settings.json +3 -0
  106. package/templates/base/standards/COMPATIBILITY.md +219 -0
  107. package/templates/base/standards/EXTENSION_GUIDELINES.md +280 -0
  108. package/templates/base/standards/QUALITY_CHECKLIST.md +211 -0
  109. package/templates/base/standards/README.md +66 -0
  110. package/templates/base/sync/anchors.json +6 -0
  111. package/templates/base/sync/hashes.json +6 -0
  112. package/templates/base/sync/staleness.json +10 -0
  113. package/templates/base/team/README.md +168 -0
  114. package/templates/base/team/config.json +79 -0
  115. package/templates/base/team/roles.json +145 -0
  116. package/templates/base/tools/bin/claude-context.js +151 -0
  117. package/templates/base/tools/lib/anchor-resolver.js +276 -0
  118. package/templates/base/tools/lib/config-loader.js +363 -0
  119. package/templates/base/tools/lib/detector.js +350 -0
  120. package/templates/base/tools/lib/diagnose.js +206 -0
  121. package/templates/base/tools/lib/drift-detector.js +373 -0
  122. package/templates/base/tools/lib/errors.js +199 -0
  123. package/templates/base/tools/lib/index.js +36 -0
  124. package/templates/base/tools/lib/init.js +192 -0
  125. package/templates/base/tools/lib/logger.js +230 -0
  126. package/templates/base/tools/lib/placeholder.js +201 -0
  127. package/templates/base/tools/lib/session-manager.js +354 -0
  128. package/templates/base/tools/lib/validate.js +521 -0
  129. package/templates/base/tools/package.json +49 -0
  130. package/templates/handlebars/antigravity.hbs +337 -0
  131. package/templates/handlebars/claude.hbs +184 -0
  132. package/templates/handlebars/cline.hbs +63 -0
  133. package/templates/handlebars/copilot.hbs +131 -0
  134. package/templates/handlebars/partials/gotcha-list.hbs +11 -0
  135. package/templates/handlebars/partials/header.hbs +3 -0
  136. package/templates/handlebars/partials/workflow-summary.hbs +16 -0
@@ -0,0 +1,194 @@
1
+ ---
2
+ name: collab
3
+ version: "1.0.0"
4
+ displayName: "Team Collaboration"
5
+ description: "Team collaboration tools for handoffs, knowledge sync, and status"
6
+ category: "team"
7
+ complexity: "low"
8
+ context_budget: "~10K tokens"
9
+ typical_context_usage: "5%"
10
+ prerequisites:
11
+ - ".ai-context/team/config.json exists"
12
+ - "Team configuration completed"
13
+ outputs:
14
+ - "Session handoff document (handoff)"
15
+ - "Sync status report (sync)"
16
+ - "Team status overview (status)"
17
+ related_agents: []
18
+ examples:
19
+ - command: "/collab handoff"
20
+ description: "Create session handoff for next team member"
21
+ - command: "/collab sync"
22
+ description: "Synchronize shared knowledge base"
23
+ - command: "/collab status"
24
+ description: "View team configuration and status"
25
+ ---
26
+
27
+ # /collab - Team Collaboration Command
28
+
29
+ Manage team collaboration features including session handoffs, knowledge synchronization, and team status.
30
+
31
+ ## Subcommands
32
+
33
+ ### `/collab handoff`
34
+
35
+ Create a session handoff document for the next team member.
36
+
37
+ **Workflow:**
38
+ 1. Collect session information:
39
+ - Files modified in session
40
+ - Git status and recent commits
41
+ - Open tasks and blockers
42
+ 2. Prompt for additional context:
43
+ - Work in progress description
44
+ - Blockers encountered
45
+ - Recommended next steps
46
+ 3. Generate handoff document from template
47
+ 4. Save to `.ai-context/knowledge/sessions/`
48
+ 5. Display handoff summary
49
+
50
+ **Output:** `.ai-context/knowledge/sessions/YYYY-MM-DD-HH-MM-{member-id}.md`
51
+
52
+ ### `/collab sync`
53
+
54
+ Synchronize and validate the shared knowledge base.
55
+
56
+ **Workflow:**
57
+ 1. Scan knowledge directories:
58
+ - `shared/decisions/` - ADRs
59
+ - `shared/patterns/` - Patterns
60
+ - `sessions/` - Recent handoffs
61
+ 2. Validate document structure
62
+ 3. Check for stale content (>30 days unchanged)
63
+ 4. Report sync status:
64
+ - Documents found
65
+ - Validation issues
66
+ - Stale content warnings
67
+ 5. Optionally notify team of updates
68
+
69
+ **Output:** Sync status report to console
70
+
71
+ ### `/collab status`
72
+
73
+ Display team configuration and current status.
74
+
75
+ **Workflow:**
76
+ 1. Load team configuration from `.ai-context/team/config.json`
77
+ 2. Display:
78
+ - Team name and organization
79
+ - Active members and roles
80
+ - Current policies
81
+ - Integration status
82
+ 3. Check for configuration issues
83
+ 4. Show recent activity summary
84
+
85
+ **Output:** Team status report to console
86
+
87
+ ## Usage Examples
88
+
89
+ ### End of Session Handoff
90
+
91
+ ```
92
+ User: /collab handoff
93
+
94
+ Claude: Creating session handoff...
95
+
96
+ ## Session Summary
97
+ Please describe what you worked on this session:
98
+
99
+ User: Implemented user authentication flow, added login/logout endpoints
100
+
101
+ Claude: ## Work In Progress
102
+ Any incomplete work to note?
103
+
104
+ User: JWT refresh token logic needs testing
105
+
106
+ Claude: ## Blockers
107
+ Any blockers for the next person?
108
+
109
+ User: None
110
+
111
+ Claude: ## Next Steps
112
+ Recommended priorities for next session?
113
+
114
+ User: 1. Test refresh tokens 2. Add password reset
115
+
116
+ Claude: Session handoff created: .ai-context/knowledge/sessions/2024-01-15-16-30-dev-1.md
117
+
118
+ ### Handoff Summary
119
+ - Session: 2024-01-15 16:30
120
+ - Files Modified: 8
121
+ - Commits: 3
122
+ - Status: Ready for handoff
123
+
124
+ The next team member can review this handoff to continue your work.
125
+ ```
126
+
127
+ ### Sync Knowledge Base
128
+
129
+ ```
130
+ User: /collab sync
131
+
132
+ Claude: Synchronizing knowledge base...
133
+
134
+ ### Scan Results
135
+ - ADRs: 3 documents
136
+ - Patterns: 5 documents
137
+ - Sessions: 12 handoffs
138
+
139
+ ### Validation
140
+ ✓ All ADRs have required sections
141
+ ✓ All patterns follow template
142
+ ⚠ 2 session handoffs > 30 days old
143
+
144
+ ### Recommendations
145
+ - Archive or delete old handoffs:
146
+ - sessions/2023-12-01-14-00-dev-2.md
147
+ - sessions/2023-12-05-09-15-dev-1.md
148
+
149
+ Knowledge base sync complete.
150
+ ```
151
+
152
+ ### Check Team Status
153
+
154
+ ```
155
+ User: /collab status
156
+
157
+ Claude: ## Team Status
158
+
159
+ ### Configuration
160
+ - Team: Engineering Team
161
+ - Organization: Acme Corp
162
+ - Version: 1.0.0
163
+
164
+ ### Members (3 active)
165
+ | Name | Role | Status |
166
+ |------|------|--------|
167
+ | Alice | team-lead | active |
168
+ | Bob | developer | active |
169
+ | Carol | developer | active |
170
+
171
+ ### Policies
172
+ - Code review required: Yes
173
+ - Documentation updates required: Yes
174
+ - Test coverage minimum: 80%
175
+
176
+ ### Integrations
177
+ - Slack: Configured ✓
178
+ - Jira: Not configured
179
+ - Confluence: Not configured
180
+
181
+ ### Recent Activity
182
+ - Last handoff: 2024-01-15 by Bob
183
+ - Knowledge updates: 2 this week
184
+ ```
185
+
186
+ ## Configuration
187
+
188
+ Requires `.ai-context/team/config.json` to be configured. See `.ai-context/team/README.md` for setup instructions.
189
+
190
+ ## Related
191
+
192
+ - [Team Configuration](./../team/README.md)
193
+ - [Knowledge Base](./../knowledge/README.md)
194
+ - [Session Handoff Template](./../knowledge/sessions/TEMPLATE.md)
@@ -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 `.ai-context/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 `.ai-context/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 `.ai-context/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 `.ai-context/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 │ → .ai-context/research/active/[name]_research.md
392
+ └────────┬────────┘
393
+
394
+
395
+ ┌─────────────────┐
396
+ │ /rpi-plan │ → .ai-context/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
+ .ai-context/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 `.ai-context/README.md`
450
+ - **RPI Details:** See `.ai-context/RPI_WORKFLOW_PLAN.md`