knowzcode 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.claude-plugin/marketplace.json +6 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +132 -73
  4. package/agents/analyst.md +24 -62
  5. package/agents/architect.md +34 -43
  6. package/agents/builder.md +35 -86
  7. package/agents/closer.md +29 -87
  8. package/agents/context-scout.md +54 -0
  9. package/agents/knowledge-migrator.md +7 -7
  10. package/agents/knowz-scout.md +83 -0
  11. package/agents/knowz-scribe.md +155 -0
  12. package/agents/microfix-specialist.md +1 -6
  13. package/agents/reviewer.md +43 -91
  14. package/agents/update-coordinator.md +7 -18
  15. package/bin/knowzcode.mjs +94 -7
  16. package/commands/audit.md +156 -25
  17. package/commands/connect-mcp.md +525 -507
  18. package/commands/fix.md +8 -8
  19. package/commands/init.md +9 -5
  20. package/commands/learn.md +327 -308
  21. package/commands/plan.md +160 -26
  22. package/commands/register.md +21 -12
  23. package/commands/status.md +309 -291
  24. package/commands/telemetry.md +188 -188
  25. package/commands/work.md +577 -114
  26. package/knowzcode/automation_manifest.md +59 -59
  27. package/knowzcode/claude_code_execution.md +228 -22
  28. package/knowzcode/enterprise/compliance_manifest.md +2 -0
  29. package/knowzcode/knowzcode_loop.md +111 -45
  30. package/knowzcode/knowzcode_project.md +48 -233
  31. package/knowzcode/knowzcode_vaults.md +183 -54
  32. package/knowzcode/mcp_config.md +72 -47
  33. package/knowzcode/platform_adapters.md +43 -4
  34. package/knowzcode/prompts/Execute_Micro_Fix.md +57 -57
  35. package/knowzcode/prompts/Investigate_Codebase.md +227 -227
  36. package/knowzcode/prompts/Migrate_Knowledge.md +301 -301
  37. package/knowzcode/prompts/Refactor_Node.md +72 -72
  38. package/knowzcode/prompts/Spec_Verification_Checkpoint.md +59 -59
  39. package/knowzcode/prompts/[LOOP_1A]__Propose_Change_Set.md +52 -52
  40. package/knowzcode/prompts/[LOOP_1B]__Draft_Specs.md +75 -75
  41. package/knowzcode/prompts/[LOOP_2A]__Implement_Change_Set.md +55 -55
  42. package/knowzcode/prompts/[LOOP_2B]__Verify_Implementation.md +72 -72
  43. package/knowzcode/prompts/[LOOP_3]__Finalize_And_Commit.md +67 -67
  44. package/package.json +1 -1
  45. package/skills/alias-resolver.json +1 -1
  46. package/skills/architecture-diff.json +1 -1
  47. package/skills/check-installation-status.json +1 -1
  48. package/skills/continue.md +24 -4
  49. package/skills/environment-guard.json +1 -1
  50. package/skills/generate-workgroup-id.json +1 -1
  51. package/skills/install-knowzcode.json +1 -1
  52. package/skills/load-core-context.json +1 -1
  53. package/skills/log-entry-builder.json +1 -1
  54. package/skills/spec-quality-check.json +1 -1
  55. package/skills/spec-template.json +1 -1
  56. package/skills/spec-validator.json +1 -1
  57. package/skills/tracker-scan.json +1 -1
  58. package/skills/tracker-update.json +1 -1
  59. package/skills/validate-installation.json +1 -1
@@ -1,291 +1,309 @@
1
- ---
2
- description: Check KnowzCode MCP server connection status and available tools
3
- ---
4
-
5
- # KnowzCode MCP Connection Status
6
-
7
- You are the **KnowzCode Status Agent**. Your task is to verify the KnowzCode MCP server configuration and test connectivity.
8
-
9
- ## What This Checks
10
-
11
- - MCP server configuration status
12
- - Connection to KnowzCode API
13
- - Available tools and their status
14
- - API key validity
15
- - **Code Vault** configuration and status
16
- - **Research Vault** configuration and status
17
- - Project indexing status
18
-
19
- ## Your Task
20
-
21
- Check the KnowzCode MCP server status and report findings to the user.
22
-
23
- ### Steps to Execute
24
-
25
- 1. **Check MCP server configuration**
26
- ```bash
27
- claude mcp get knowzcode
28
- ```
29
-
30
- - If configured: Extract scope, endpoint, headers
31
- - If not configured: Report and suggest `/kc:connect`
32
-
33
- 2. **Check vault configuration**
34
- - **Primary**: Read `knowzcode/knowzcode_vaults.md` for multi-vault routing
35
- - Parse `## Connected Vaults` section
36
- - Extract all configured vaults (ID, Name, Type, Description)
37
- - **Fallback**: Read `knowzcode/mcp_config.md` for legacy single-vault config
38
- - Extract Code Vault ID and name
39
- - Extract Research Vault ID and name
40
- - Note if no vaults are configured
41
-
42
- 3. **Verify connection and vault health (if configured)**
43
- - The MCP server should automatically list its available tools
44
- - Check if tools are accessible
45
- - If vaults are configured, attempt `list_vaults(includeStats=true)` to verify vault accessibility
46
- - Report vault document counts and last sync times
47
- - If vault IDs are configured but inaccessible, show warning with remediation steps
48
-
49
- 4. **Report status**
50
-
51
- **If configured and working**:
52
- ```
53
- KnowzCode MCP Server: Connected
54
-
55
- Configuration:
56
- Scope: <local|project|user>
57
- Endpoint: https://mcp.knowz.io/mcp
58
- • Status: Active
59
-
60
- Connected Vaults (from knowzcode_vaults.md):
61
- ┌────┬──────────────────────┬──────────┬─────────────────────────────────┐
62
- # │ Name │ Type │ Description (routing)
63
- ├────┼──────────────────────┼──────────┼─────────────────────────────────┤
64
- 1 │ Engineering Knowledge│ research Patterns, decisions, conventions│
65
- │ 2 │ my-project-code │ code │ Source code for main API │
66
- 3 │ Team Wiki │ research │ Processes, onboarding │
67
- └────┴──────────────────────┴──────────┴─────────────────────────────────┘
68
-
69
- Vault Routing:
70
- Code questions my-project-code
71
- • Convention questions → Engineering Knowledge (default research)
72
- • Learning capture → Engineering Knowledge (or prompt if ambiguous)
73
-
74
- Available Tools:
75
- search_knowledge - Vector search across vaults
76
- ✓ ask_question - AI Q&A with research mode
77
- create_knowledge - Save learnings to vault
78
- ✓ update_knowledge - Update existing items
79
- find_entities - Find people/locations/events
80
-
81
- Project: <project-path>
82
- Last sync: <if available>
83
-
84
- All systems operational. Agents can use MCP tools.
85
- ```
86
-
87
- **If configured but not working**:
88
- ```
89
- ⚠️ KnowzCode MCP Server: Configured but unavailable
90
-
91
- Configuration:
92
- Scope: <scope>
93
- Endpoint: <endpoint>
94
- Status: Cannot connect
95
-
96
- Possible issues:
97
- API key may be invalid or expired
98
- • Network connectivity issues
99
- KnowzCode API may be down
100
-
101
- Troubleshooting:
102
- 1. Check your internet connection
103
- 2. Verify API key: https://knowz.io/api-keys
104
- 3. Reconfigure: /kc:connect-mcp <new-key>
105
- 4. Check status: https://status.knowz.io
106
- ```
107
-
108
- **If MCP connected but vaults not configured**:
109
- ```
110
- ⚠️ KnowzCode MCP Server: Connected (vaults not configured)
111
-
112
- Configuration:
113
- • Scope: <scope>
114
- Endpoint: <endpoint>
115
- Status: Active
116
-
117
- Connected Vaults: ⚠️ None configured
118
-
119
- MCP is connected but you haven't configured your vaults yet.
120
- Vaults enable semantic search and learning capture.
121
-
122
- To configure vaults:
123
- /kc:connect-mcp --configure-vaults
124
- (Interactive vault discovery and selection)
125
-
126
- Or manually edit: knowzcode/knowzcode_vaults.md
127
- ```
128
-
129
- **If not configured at all**:
130
- ```
131
- ℹ️ KnowzCode MCP Server: Not configured
132
-
133
- KnowzCode works fine without MCP! All core features work:
134
- ✓ TDD workflow (/kc:work)
135
- Spec generation
136
- ✓ Impact analysis
137
- Quality audits
138
-
139
- MCP adds enhanced capabilities:
140
- Vector search across indexed code (Code Vault)
141
- Convention and pattern lookups (Research Vault)
142
- AI-powered Q&A with research mode
143
- • Automatic learning capture
144
-
145
- To enable these features:
146
- New user? /kc:register (creates account + configures)
147
- Have a key? /kc:connect-mcp <api-key>
148
- ```
149
-
150
- 5. **Additional diagnostics (if helpful)**
151
- - Check if project is indexed (if MCP connected)
152
- - Show vault document counts and last sync times
153
- - Report any rate limiting or quota issues
154
- - List any cached data available
155
- - Show learning capture status (enabled/disabled)
156
-
157
- ## Output Format
158
-
159
- Use clear status indicators:
160
- - Green check: Working perfectly
161
- - ⚠️ Warning: Configured but issues
162
- - ℹ️ Info: Not configured
163
- - Error: Critical failure
164
-
165
- ## Connection Details
166
-
167
- If connection is active, optionally show:
168
-
169
- ```
170
- Connection Details:
171
- Response time: <ms>
172
- Tools loaded: <count>
173
- Cache status: <enabled/disabled>
174
- • Rate limit: <remaining/total>
175
- ```
176
-
177
- ## MCP Tool Details
178
-
179
- For each available tool, can optionally show:
180
-
181
- ```
182
- search_knowledge
183
- Description: Vector similarity search across vaults
184
- Vaults: Code Vault, Research Vault
185
- Status: Available
186
- Last used: <time>
187
-
188
- ask_question
189
- Description: AI-powered Q&A with optional research mode
190
- Vaults: Research Vault (primary)
191
- Research Mode: Enabled (8000+ token comprehensive answers)
192
- Status: ✓ Available
193
- Last used: <time>
194
-
195
- create_knowledge
196
- Description: Save learnings to research vault
197
- Vaults: Research Vault (write)
198
- Used by: closer, /kc:learn
199
- Status: ✓ Available
200
- Last used: <time>
201
- ```
202
-
203
- ## Vault Status Details
204
-
205
- If vaults are configured, optionally show:
206
-
207
- ```
208
- Code Vault: my-project-code
209
- Documents indexed: <count>
210
- Last index: <timestamp>
211
- Index status: Up to date / Stale / Indexing...
212
- • Paths: src/, tests/, packages/
213
-
214
- Research Vault: engineering-knowledge
215
- • Documents: <count>
216
- Notes: <count>
217
- Last updated: <timestamp>
218
- Top tags: architecture, security, patterns
219
- ```
220
-
221
- ## Error States
222
-
223
- ### Invalid API Key
224
- ```
225
- ❌ Authentication Error
226
- The API key is invalid or expired.
227
-
228
- Update: /kc:connect-mcp <new-key>
229
- ```
230
-
231
- ### Network Issues
232
- ```
233
- Connection Error
234
- Cannot reach KnowzCode API at <endpoint>
235
-
236
- Check:
237
- • Internet connection
238
- • Firewall settings
239
- VPN configuration
240
- ```
241
-
242
- ### Service Down
243
- ```
244
- Service Unavailable
245
- KnowzCode API is not responding.
246
-
247
- Status: https://status.knowz.io
248
- ```
249
-
250
- ## Usage Examples
251
-
252
- ### Basic status check
253
- ```bash
254
- /kc:status
255
- ```
256
-
257
- ### After configuration
258
- ```bash
259
- /kc:connect-mcp <api-key>
260
- # ... restart Claude Code ...
261
- /kc:status # Verify everything works
262
- ```
263
-
264
- ### Troubleshooting
265
- ```bash
266
- /kc:status # Check what's wrong
267
- # Follow suggested remediation steps
268
- ```
269
-
270
- ## Integration Notes
271
-
272
- This command is useful:
273
- - **After initial setup**: Verify `/kc:connect` worked
274
- - **When tools seem unavailable**: Debug MCP connection
275
- - **Before starting work**: Confirm enhanced features active
276
- - **Troubleshooting**: Diagnose connectivity issues
277
-
278
- ## Related Commands
279
-
280
- - `/kc:connect-mcp` - Configure MCP server
281
- - `/kc:init` - Initialize KnowzCode
282
- - `/kc:work` - Start feature (uses MCP if available)
283
-
284
- ## Important Notes
285
-
286
- - **Restart required**: After `/kc:connect-mcp`, Claude Code must restart
287
- - **Graceful degradation**: KnowzCode works without MCP (just less powerful)
288
- - **No credentials shown**: Never display full API keys
289
- - **Clear guidance**: Always suggest next steps if issues found
290
-
291
- Execute this status check now.
1
+ ---
2
+ description: Check KnowzCode MCP server connection status and available tools
3
+ ---
4
+
5
+ # KnowzCode MCP Connection Status
6
+
7
+ You are the **KnowzCode Status Agent**. Your task is to verify the KnowzCode MCP server configuration and test connectivity.
8
+
9
+ ## What This Checks
10
+
11
+ - MCP server configuration status
12
+ - Connection to KnowzCode API
13
+ - Available tools and their status
14
+ - API key validity
15
+ - **Code Vault** configuration and status
16
+ - **Ecosystem Vault** configuration and status
17
+ - **Finalizations Vault** configuration and status
18
+ - Project indexing status
19
+
20
+ ## Your Task
21
+
22
+ Check Agent Teams status, then check the KnowzCode MCP server status, and report findings to the user.
23
+
24
+ ### Steps to Execute
25
+
26
+ 1. **Check Agent Teams status**
27
+
28
+ Check for agent definition files:
29
+ - Glob for `agents/*.md`
30
+ - List found agents with their names
31
+
32
+ Report:
33
+ ```
34
+ ## Agent Teams
35
+
36
+ Agent Definitions: {count} found ({comma-separated names})
37
+ Agent Teams: Verified at runtime commands attempt TeamCreate and fall back to Subagent Delegation if unavailable
38
+ ```
39
+
40
+ Note: Agent Teams availability is no longer checked via settings files. Commands (`/kc:work`, `/kc:plan`, `/kc:audit`) detect availability at runtime by attempting `TeamCreate()` and falling back gracefully. The `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` env var must still be set at the Claude Code level for Agent Teams to work, but commands do not check for it directly.
41
+
42
+ 2. **Check MCP server configuration**
43
+ ```bash
44
+ claude mcp get knowzcode
45
+ ```
46
+
47
+ - If configured: Extract scope, endpoint, headers
48
+ - If not configured: Report and suggest `/kc:connect`
49
+
50
+ 3. **Check vault configuration**
51
+ - **Primary**: Read `knowzcode/knowzcode_vaults.md` for multi-vault routing
52
+ - Parse `## Connected Vaults` section
53
+ - Extract all configured vaults (ID, Name, Type, Description)
54
+ - **Fallback**: Read `knowzcode/mcp_config.md` for legacy single-vault config
55
+ - Extract Code Vault ID and name
56
+ - Extract Ecosystem Vault ID and name
57
+ - Note if no vaults are configured
58
+
59
+ 4. **Verify connection and vault health (if configured)**
60
+ - The MCP server should automatically list its available tools
61
+ - Check if tools are accessible
62
+ - If vaults are configured, attempt `list_vaults(includeStats=true)` to verify vault accessibility
63
+ - Report vault document counts and last sync times
64
+ - If vault IDs are configured but inaccessible, show warning with remediation steps
65
+
66
+ 5. **Report status**
67
+
68
+ **If configured and working**:
69
+ ```
70
+ KnowzCode MCP Server: Connected
71
+
72
+ Configuration:
73
+ • Scope: <local|project|user>
74
+ Endpoint: https://mcp.knowz.io/mcp
75
+ Status: Active
76
+
77
+ Connected Vaults (from knowzcode_vaults.md):
78
+ ┌────┬──────────────────────┬──────────┬─────────────────────────────────┐
79
+ # │ Name │ Type │ Description (routing) │
80
+ ├────┼──────────────────────┼──────────┼─────────────────────────────────┤
81
+ 1 │ Engineering Knowledge│ ecosystem│ Patterns, decisions, conventions│
82
+ 2 │ my-project-code │ code │ Source code for main API │
83
+ │ 3 │ Team Wiki │ ecosystem│ Processes, onboarding │
84
+ └────┴──────────────────────┴──────────┴─────────────────────────────────┘
85
+
86
+ Vault Routing:
87
+ Code questions my-project-code
88
+ • Convention questions → Engineering Knowledge (default ecosystem)
89
+ Completion records Finalizations
90
+ • Learning capture → Engineering Knowledge (or prompt if ambiguous)
91
+
92
+ Available Tools:
93
+ search_knowledge - Vector search across vaults
94
+ ask_question - AI Q&A with research mode
95
+ ✓ create_knowledge - Save learnings to vault
96
+ update_knowledge - Update existing items
97
+ find_entities - Find people/locations/events
98
+
99
+ Project: <project-path>
100
+ Last sync: <if available>
101
+
102
+ All systems operational. Agents can use MCP tools.
103
+ ```
104
+
105
+ **If configured but not working**:
106
+ ```
107
+ ⚠️ KnowzCode MCP Server: Configured but unavailable
108
+
109
+ Configuration:
110
+ Scope: <scope>
111
+ • Endpoint: <endpoint>
112
+ • Status: Cannot connect
113
+
114
+ Possible issues:
115
+ API key may be invalid or expired
116
+ • Network connectivity issues
117
+ KnowzCode API may be down
118
+
119
+ Troubleshooting:
120
+ 1. Check your internet connection
121
+ 2. Verify API key: https://knowz.io/api-keys
122
+ 3. Reconfigure: /kc:connect-mcp <new-key>
123
+ 4. Check status: https://status.knowz.io
124
+ ```
125
+
126
+ **If MCP connected but vaults not configured**:
127
+ ```
128
+ ⚠️ KnowzCode MCP Server: Connected (vaults not configured)
129
+
130
+ Configuration:
131
+ Scope: <scope>
132
+ • Endpoint: <endpoint>
133
+ Status: Active
134
+
135
+ Connected Vaults: ⚠️ None configured
136
+
137
+ MCP is connected but you haven't configured your vaults yet.
138
+ Vaults enable semantic search and learning capture.
139
+
140
+ To configure vaults:
141
+ /kc:connect-mcp --configure-vaults
142
+ (Interactive vault discovery and selection)
143
+
144
+ Or manually edit: knowzcode/knowzcode_vaults.md
145
+ ```
146
+
147
+ **If not configured at all**:
148
+ ```
149
+ ℹ️ KnowzCode MCP Server: Not configured
150
+
151
+ KnowzCode works fine without MCP! All core features work:
152
+ TDD workflow (/kc:work)
153
+ Spec generation
154
+ Impact analysis
155
+ Quality audits
156
+
157
+ MCP adds enhanced capabilities:
158
+ • Vector search across indexed code (Code Vault)
159
+ Convention and pattern lookups (Ecosystem Vault)
160
+ • AI-powered Q&A with research mode
161
+ Automatic learning capture
162
+
163
+ To enable these features:
164
+ New user? /kc:register (creates account + configures)
165
+ Have a key? /kc:connect-mcp <api-key>
166
+ ```
167
+
168
+ 6. **Additional diagnostics (if helpful)**
169
+ - Check if project is indexed (if MCP connected)
170
+ - Show vault document counts and last sync times
171
+ - Report any rate limiting or quota issues
172
+ - List any cached data available
173
+ - Show learning capture status (enabled/disabled)
174
+
175
+ ## Output Format
176
+
177
+ Use clear status indicators:
178
+ - ✅ Green check: Working perfectly
179
+ - ⚠️ Warning: Configured but issues
180
+ - ℹ️ Info: Not configured
181
+ - ❌ Error: Critical failure
182
+
183
+ ## Connection Details
184
+
185
+ If connection is active, optionally show:
186
+
187
+ ```
188
+ Connection Details:
189
+ Response time: <ms>
190
+ Tools loaded: <count>
191
+ Cache status: <enabled/disabled>
192
+ • Rate limit: <remaining/total>
193
+ ```
194
+
195
+ ## MCP Tool Details
196
+
197
+ For each available tool, can optionally show:
198
+
199
+ ```
200
+ search_knowledge
201
+ Description: Vector similarity search across vaults
202
+ Vaults: Code Vault, Ecosystem Vault
203
+ Status: Available
204
+ Last used: <time>
205
+
206
+ ask_question
207
+ Description: AI-powered Q&A with optional research mode
208
+ Vaults: Ecosystem Vault (primary)
209
+ Research Mode: Enabled (8000+ token comprehensive answers)
210
+ Status: Available
211
+ Last used: <time>
212
+
213
+ create_knowledge
214
+ Description: Save learnings to vault
215
+ Vaults: Ecosystem Vault (write)
216
+ Used by: closer, /kc:learn
217
+ Status: Available
218
+ Last used: <time>
219
+ ```
220
+
221
+ ## Vault Status Details
222
+
223
+ If vaults are configured, optionally show:
224
+
225
+ ```
226
+ Code Vault: my-project-code
227
+ • Documents indexed: <count>
228
+ Last index: <timestamp>
229
+ • Index status: Up to date / Stale / Indexing...
230
+ • Paths: src/, tests/, packages/
231
+
232
+ Ecosystem Vault: engineering-knowledge
233
+ Documents: <count>
234
+ Notes: <count>
235
+ • Last updated: <timestamp>
236
+ • Top tags: architecture, security, patterns
237
+ ```
238
+
239
+ ## Error States
240
+
241
+ ### Invalid API Key
242
+ ```
243
+ ❌ Authentication Error
244
+ The API key is invalid or expired.
245
+
246
+ Update: /kc:connect-mcp <new-key>
247
+ ```
248
+
249
+ ### Network Issues
250
+ ```
251
+ ❌ Connection Error
252
+ Cannot reach KnowzCode API at <endpoint>
253
+
254
+ Check:
255
+ • Internet connection
256
+ • Firewall settings
257
+ VPN configuration
258
+ ```
259
+
260
+ ### Service Down
261
+ ```
262
+ ❌ Service Unavailable
263
+ KnowzCode API is not responding.
264
+
265
+ Status: https://status.knowz.io
266
+ ```
267
+
268
+ ## Usage Examples
269
+
270
+ ### Basic status check
271
+ ```bash
272
+ /kc:status
273
+ ```
274
+
275
+ ### After configuration
276
+ ```bash
277
+ /kc:connect-mcp <api-key>
278
+ # ... restart Claude Code ...
279
+ /kc:status # Verify everything works
280
+ ```
281
+
282
+ ### Troubleshooting
283
+ ```bash
284
+ /kc:status # Check what's wrong
285
+ # Follow suggested remediation steps
286
+ ```
287
+
288
+ ## Integration Notes
289
+
290
+ This command is useful:
291
+ - **After initial setup**: Verify `/kc:connect` worked
292
+ - **When tools seem unavailable**: Debug MCP connection
293
+ - **Before starting work**: Confirm enhanced features active
294
+ - **Troubleshooting**: Diagnose connectivity issues
295
+
296
+ ## Related Commands
297
+
298
+ - `/kc:connect-mcp` - Configure MCP server
299
+ - `/kc:init` - Initialize KnowzCode
300
+ - `/kc:work` - Start feature (uses MCP if available)
301
+
302
+ ## Important Notes
303
+
304
+ - **Restart required**: After `/kc:connect-mcp`, Claude Code must restart
305
+ - **Graceful degradation**: KnowzCode works without MCP (just less powerful)
306
+ - **No credentials shown**: Never display full API keys
307
+ - **Clear guidance**: Always suggest next steps if issues found
308
+
309
+ Execute this status check now.