knowzcode 0.3.7 → 0.4.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 (79) hide show
  1. package/.claude-plugin/marketplace.json +61 -61
  2. package/.claude-plugin/plugin.json +8 -8
  3. package/LICENSE +121 -121
  4. package/README.md +354 -320
  5. package/agents/analyst.md +114 -114
  6. package/agents/architect.md +200 -200
  7. package/agents/builder.md +104 -104
  8. package/agents/closer.md +177 -177
  9. package/agents/context-scout.md +54 -54
  10. package/agents/knowledge-migrator.md +349 -349
  11. package/agents/knowz-scout.md +83 -83
  12. package/agents/knowz-scribe.md +180 -180
  13. package/agents/microfix-specialist.md +135 -135
  14. package/agents/project-advisor.md +111 -111
  15. package/agents/reviewer.md +172 -172
  16. package/agents/security-officer.md +194 -194
  17. package/agents/test-advisor.md +162 -162
  18. package/agents/update-coordinator.md +394 -394
  19. package/bin/knowzcode.mjs +1199 -956
  20. package/commands/audit.md +328 -328
  21. package/commands/connect-mcp.md +549 -549
  22. package/commands/fix.md +107 -107
  23. package/commands/init.md +500 -439
  24. package/commands/learn.md +332 -332
  25. package/commands/plan.md +272 -272
  26. package/commands/register.md +733 -733
  27. package/commands/status.md +309 -309
  28. package/commands/telemetry-setup.md +368 -368
  29. package/commands/telemetry.md +188 -188
  30. package/commands/work.md +1204 -1202
  31. package/knowzcode/automation_manifest.md +59 -59
  32. package/knowzcode/claude_code_execution.md +431 -420
  33. package/knowzcode/copilot_execution.md +231 -231
  34. package/knowzcode/enterprise/compliance_manifest.md +137 -137
  35. package/knowzcode/enterprise/compliance_status.md +30 -30
  36. package/knowzcode/enterprise/guidelines/code-quality.md +67 -67
  37. package/knowzcode/enterprise/guidelines/security.md +355 -355
  38. package/knowzcode/enterprise/templates/guideline-template.md +55 -55
  39. package/knowzcode/gitignore.template +13 -13
  40. package/knowzcode/knowzcode_architecture.md +51 -51
  41. package/knowzcode/knowzcode_log.md +142 -142
  42. package/knowzcode/knowzcode_loop.md +596 -596
  43. package/knowzcode/knowzcode_orchestration.md +66 -66
  44. package/knowzcode/knowzcode_project.md +48 -48
  45. package/knowzcode/knowzcode_tracker.md +40 -40
  46. package/knowzcode/knowzcode_vaults.md +257 -257
  47. package/knowzcode/mcp_config.md +191 -191
  48. package/knowzcode/planning/Readme.md +6 -6
  49. package/knowzcode/platform_adapters.md +1260 -1047
  50. package/knowzcode/prompts/Execute_Micro_Fix.md +57 -57
  51. package/knowzcode/prompts/Investigate_Codebase.md +227 -227
  52. package/knowzcode/prompts/Migrate_Knowledge.md +301 -301
  53. package/knowzcode/prompts/Refactor_Node.md +72 -72
  54. package/knowzcode/prompts/Spec_Verification_Checkpoint.md +59 -59
  55. package/knowzcode/prompts/[LOOP_1A]__Propose_Change_Set.md +52 -52
  56. package/knowzcode/prompts/[LOOP_1B]__Draft_Specs.md +75 -75
  57. package/knowzcode/prompts/[LOOP_2A]__Implement_Change_Set.md +55 -55
  58. package/knowzcode/prompts/[LOOP_2B]__Verify_Implementation.md +72 -72
  59. package/knowzcode/prompts/[LOOP_3]__Finalize_And_Commit.md +67 -67
  60. package/knowzcode/specs/Readme.md +10 -10
  61. package/knowzcode/telemetry_config.md +89 -89
  62. package/knowzcode/user_preferences.md +120 -120
  63. package/package.json +53 -53
  64. package/skills/alias-resolver.json +1 -1
  65. package/skills/architecture-diff.json +1 -1
  66. package/skills/check-installation-status.json +1 -1
  67. package/skills/continue.md +126 -126
  68. package/skills/environment-guard.json +1 -1
  69. package/skills/generate-workgroup-id.json +1 -1
  70. package/skills/install-knowzcode.json +1 -1
  71. package/skills/load-core-context.json +1 -1
  72. package/skills/log-entry-builder.json +1 -1
  73. package/skills/spec-quality-check.json +1 -1
  74. package/skills/spec-template.json +1 -1
  75. package/skills/spec-validator.json +1 -1
  76. package/skills/start-work.md +224 -224
  77. package/skills/tracker-scan.json +1 -1
  78. package/skills/tracker-update.json +1 -1
  79. package/skills/validate-installation.json +1 -1
@@ -1,188 +1,188 @@
1
- ---
2
- description: "Investigate telemetry data from Sentry, App Insights, and other sources"
3
- argument-hint: "<natural language description>"
4
- ---
5
-
6
- # KnowzCode Telemetry Investigation
7
-
8
- Investigate production telemetry to diagnose errors, trace issues, and identify root causes.
9
-
10
- **Usage**: `/kc:telemetry "<natural language description>"`
11
-
12
- Describe everything in plain English - environment, timeframe, and error context will be extracted automatically.
13
-
14
- **Examples**:
15
- ```
16
- /kc:telemetry "in staging in the last 20 min, error 500"
17
- /kc:telemetry "NullReferenceException in production over the past hour"
18
- /kc:telemetry "checkout failures in dev since this morning"
19
- /kc:telemetry "slow API responses in user service today"
20
- ```
21
-
22
- ---
23
-
24
- ## Parameter
25
-
26
- | Parameter | Required | Description |
27
- |-----------|----------|-------------|
28
- | `description` | Yes | Natural language query describing what to investigate, including any context about environment, timeframe, etc. |
29
-
30
- ---
31
-
32
- ## Workflow
33
-
34
- ### Step 1: Parse Natural Language Query
35
-
36
- Extract from the user's description:
37
- - **Environment**: staging/production/dev (from phrases like "in staging", "in prod")
38
- - **Timeframe**: How far back to search (from phrases like "last 20 min", "past 4 hours")
39
- - **Search query**: The error/symptom to investigate (everything else)
40
-
41
- ### Step 2: Load Configuration and Detect Sources
42
-
43
- Before investigation, load configuration and verify sources are available AND authenticated.
44
-
45
- #### 2.1 Load Telemetry Configuration
46
-
47
- Read `knowzcode/telemetry_config.md` to get environment-to-resource mappings.
48
-
49
- **Parse the config** to extract:
50
- - **Sentry**: Enabled status, **method** (cli or mcp), organization, environment-to-project mappings
51
- - **App Insights**: Enabled status, subscription, environment-to-app ID mappings
52
-
53
- #### 2.2 Detect Tool Installation
54
-
55
- ```bash
56
- # Check Sentry CLI installation
57
- which sentry-cli 2>/dev/null && echo "SENTRY_CLI_INSTALLED" || echo "NO_SENTRY_CLI"
58
-
59
- # Check Azure CLI + App Insights extension
60
- which az 2>/dev/null && az extension list --query "[?name=='application-insights'].name" -o tsv 2>/dev/null && echo "APPINSIGHTS_INSTALLED" || echo "NO_APPINSIGHTS"
61
- ```
62
-
63
- #### 2.3 Verify Authentication
64
-
65
- For each installed tool, verify it's authenticated:
66
-
67
- ```bash
68
- # Sentry: Check authentication (quick check)
69
- sentry-cli info 2>&1 | grep -q "Organization" && echo "SENTRY_AUTHENTICATED" || echo "SENTRY_NOT_AUTHENTICATED"
70
-
71
- # Azure: Check authentication
72
- az account show --query "name" -o tsv 2>/dev/null && echo "AZURE_AUTHENTICATED" || echo "AZURE_NOT_AUTHENTICATED"
73
- ```
74
-
75
- #### 2.4 Handle Configuration Issues
76
-
77
- **If config doesn't exist or sources not configured:**
78
-
79
- ```markdown
80
- Telemetry not configured.
81
-
82
- Run `/kc:telemetry-setup` to:
83
- 1. Detect available telemetry tools
84
- 2. Verify authentication
85
- 3. Auto-discover projects/resources
86
- 4. Configure environment mappings
87
-
88
- After setup, re-run your telemetry query.
89
- ```
90
-
91
- **If tools not authenticated:**
92
-
93
- ```markdown
94
- Telemetry tools detected but not authenticated.
95
-
96
- Sentry: {status}
97
- App Insights: {status}
98
-
99
- Run `/kc:telemetry-setup` to verify authentication and configure sources.
100
- ```
101
-
102
- ### Step 3: Investigate Telemetry
103
-
104
- Spawn the **reviewer** agent to perform the telemetry investigation:
105
-
106
- ```
107
- Task(reviewer):
108
- Investigate telemetry for the following issue.
109
-
110
- Natural Language Query: {user's full natural language description}
111
- Available Sources: {detected sources that are installed AND authenticated}
112
-
113
- Telemetry Configuration:
114
- - Sentry: {enabled, method, org, environment mappings}
115
- - App Insights: {enabled, subscription, environment mappings}
116
-
117
- Instructions:
118
- 1. Parse the natural language query to extract environment, timeframe, and search terms
119
- 2. Use the environment to look up the correct project/app ID from config
120
- 3. Query available sources using CLI tools (sentry-cli, az monitor)
121
- 4. Synthesize into unified timeline
122
- 5. Generate root cause hypothesis
123
- 6. Return structured findings
124
- ```
125
-
126
- ### Step 4: Present Findings
127
-
128
- Display the synthesized telemetry investigation results:
129
-
130
- ```markdown
131
- ## KnowzCode Telemetry Investigation
132
-
133
- **Original Query**: {user's natural language description}
134
- **Extracted**:
135
- - Environment: {extracted env}
136
- - Timeframe: {extracted timeframe}
137
- - Search: {extracted search terms}
138
- **Sources Queried**: {list of sources}
139
-
140
- ### Event Timeline (merged)
141
- | Timestamp | Source | Type | Summary |
142
- |-----------|--------|------|---------|
143
- | ... | ... | ... | ... |
144
-
145
- ### Root Cause Hypothesis
146
- **Most Likely**: {hypothesis}
147
- **Evidence**: {supporting evidence}
148
- **Confidence**: HIGH/MEDIUM/LOW
149
-
150
- ### Recommendations
151
- 1. {quick fix recommendation}
152
- 2. {proper fix recommendation}
153
-
154
- ---
155
-
156
- **Next Steps:**
157
- - `/kc:fix {target}` - Apply a micro-fix
158
- - `/kc:work "Fix {issue}"` - Full implementation workflow
159
- ```
160
-
161
- ---
162
-
163
- ## Integration with Other Commands
164
-
165
- | Command | Relationship |
166
- |---------|--------------|
167
- | `/kc:fix` | Hand off quick fixes discovered |
168
- | `/kc:work` | Hand off larger remediation tasks |
169
- | `builder` | Can invoke telemetry investigation during debugging |
170
- | `microfix-specialist` | Can invoke telemetry investigation for verification |
171
-
172
- ---
173
-
174
- ## Logging
175
-
176
- After investigation, log to `knowzcode/knowzcode_log.md`:
177
-
178
- ```markdown
179
- ---
180
- **Type:** Telemetry Investigation
181
- **Timestamp:** {timestamp}
182
- **Query:** {original natural language query}
183
- **Extracted**: env={env}, timeframe={timeframe}
184
- **Sources:** {sources queried}
185
- **Finding:** {one-line root cause summary}
186
- **Status:** Complete
187
- ---
188
- ```
1
+ ---
2
+ description: "Investigate telemetry data from Sentry, App Insights, and other sources"
3
+ argument-hint: "<natural language description>"
4
+ ---
5
+
6
+ # KnowzCode Telemetry Investigation
7
+
8
+ Investigate production telemetry to diagnose errors, trace issues, and identify root causes.
9
+
10
+ **Usage**: `/kc:telemetry "<natural language description>"`
11
+
12
+ Describe everything in plain English - environment, timeframe, and error context will be extracted automatically.
13
+
14
+ **Examples**:
15
+ ```
16
+ /kc:telemetry "in staging in the last 20 min, error 500"
17
+ /kc:telemetry "NullReferenceException in production over the past hour"
18
+ /kc:telemetry "checkout failures in dev since this morning"
19
+ /kc:telemetry "slow API responses in user service today"
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Parameter
25
+
26
+ | Parameter | Required | Description |
27
+ |-----------|----------|-------------|
28
+ | `description` | Yes | Natural language query describing what to investigate, including any context about environment, timeframe, etc. |
29
+
30
+ ---
31
+
32
+ ## Workflow
33
+
34
+ ### Step 1: Parse Natural Language Query
35
+
36
+ Extract from the user's description:
37
+ - **Environment**: staging/production/dev (from phrases like "in staging", "in prod")
38
+ - **Timeframe**: How far back to search (from phrases like "last 20 min", "past 4 hours")
39
+ - **Search query**: The error/symptom to investigate (everything else)
40
+
41
+ ### Step 2: Load Configuration and Detect Sources
42
+
43
+ Before investigation, load configuration and verify sources are available AND authenticated.
44
+
45
+ #### 2.1 Load Telemetry Configuration
46
+
47
+ Read `knowzcode/telemetry_config.md` to get environment-to-resource mappings.
48
+
49
+ **Parse the config** to extract:
50
+ - **Sentry**: Enabled status, **method** (cli or mcp), organization, environment-to-project mappings
51
+ - **App Insights**: Enabled status, subscription, environment-to-app ID mappings
52
+
53
+ #### 2.2 Detect Tool Installation
54
+
55
+ ```bash
56
+ # Check Sentry CLI installation
57
+ which sentry-cli 2>/dev/null && echo "SENTRY_CLI_INSTALLED" || echo "NO_SENTRY_CLI"
58
+
59
+ # Check Azure CLI + App Insights extension
60
+ which az 2>/dev/null && az extension list --query "[?name=='application-insights'].name" -o tsv 2>/dev/null && echo "APPINSIGHTS_INSTALLED" || echo "NO_APPINSIGHTS"
61
+ ```
62
+
63
+ #### 2.3 Verify Authentication
64
+
65
+ For each installed tool, verify it's authenticated:
66
+
67
+ ```bash
68
+ # Sentry: Check authentication (quick check)
69
+ sentry-cli info 2>&1 | grep -q "Organization" && echo "SENTRY_AUTHENTICATED" || echo "SENTRY_NOT_AUTHENTICATED"
70
+
71
+ # Azure: Check authentication
72
+ az account show --query "name" -o tsv 2>/dev/null && echo "AZURE_AUTHENTICATED" || echo "AZURE_NOT_AUTHENTICATED"
73
+ ```
74
+
75
+ #### 2.4 Handle Configuration Issues
76
+
77
+ **If config doesn't exist or sources not configured:**
78
+
79
+ ```markdown
80
+ Telemetry not configured.
81
+
82
+ Run `/kc:telemetry-setup` to:
83
+ 1. Detect available telemetry tools
84
+ 2. Verify authentication
85
+ 3. Auto-discover projects/resources
86
+ 4. Configure environment mappings
87
+
88
+ After setup, re-run your telemetry query.
89
+ ```
90
+
91
+ **If tools not authenticated:**
92
+
93
+ ```markdown
94
+ Telemetry tools detected but not authenticated.
95
+
96
+ Sentry: {status}
97
+ App Insights: {status}
98
+
99
+ Run `/kc:telemetry-setup` to verify authentication and configure sources.
100
+ ```
101
+
102
+ ### Step 3: Investigate Telemetry
103
+
104
+ Spawn the **reviewer** agent to perform the telemetry investigation:
105
+
106
+ ```
107
+ Task(reviewer):
108
+ Investigate telemetry for the following issue.
109
+
110
+ Natural Language Query: {user's full natural language description}
111
+ Available Sources: {detected sources that are installed AND authenticated}
112
+
113
+ Telemetry Configuration:
114
+ - Sentry: {enabled, method, org, environment mappings}
115
+ - App Insights: {enabled, subscription, environment mappings}
116
+
117
+ Instructions:
118
+ 1. Parse the natural language query to extract environment, timeframe, and search terms
119
+ 2. Use the environment to look up the correct project/app ID from config
120
+ 3. Query available sources using CLI tools (sentry-cli, az monitor)
121
+ 4. Synthesize into unified timeline
122
+ 5. Generate root cause hypothesis
123
+ 6. Return structured findings
124
+ ```
125
+
126
+ ### Step 4: Present Findings
127
+
128
+ Display the synthesized telemetry investigation results:
129
+
130
+ ```markdown
131
+ ## KnowzCode Telemetry Investigation
132
+
133
+ **Original Query**: {user's natural language description}
134
+ **Extracted**:
135
+ - Environment: {extracted env}
136
+ - Timeframe: {extracted timeframe}
137
+ - Search: {extracted search terms}
138
+ **Sources Queried**: {list of sources}
139
+
140
+ ### Event Timeline (merged)
141
+ | Timestamp | Source | Type | Summary |
142
+ |-----------|--------|------|---------|
143
+ | ... | ... | ... | ... |
144
+
145
+ ### Root Cause Hypothesis
146
+ **Most Likely**: {hypothesis}
147
+ **Evidence**: {supporting evidence}
148
+ **Confidence**: HIGH/MEDIUM/LOW
149
+
150
+ ### Recommendations
151
+ 1. {quick fix recommendation}
152
+ 2. {proper fix recommendation}
153
+
154
+ ---
155
+
156
+ **Next Steps:**
157
+ - `/kc:fix {target}` - Apply a micro-fix
158
+ - `/kc:work "Fix {issue}"` - Full implementation workflow
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Integration with Other Commands
164
+
165
+ | Command | Relationship |
166
+ |---------|--------------|
167
+ | `/kc:fix` | Hand off quick fixes discovered |
168
+ | `/kc:work` | Hand off larger remediation tasks |
169
+ | `builder` | Can invoke telemetry investigation during debugging |
170
+ | `microfix-specialist` | Can invoke telemetry investigation for verification |
171
+
172
+ ---
173
+
174
+ ## Logging
175
+
176
+ After investigation, log to `knowzcode/knowzcode_log.md`:
177
+
178
+ ```markdown
179
+ ---
180
+ **Type:** Telemetry Investigation
181
+ **Timestamp:** {timestamp}
182
+ **Query:** {original natural language query}
183
+ **Extracted**: env={env}, timeframe={timeframe}
184
+ **Sources:** {sources queried}
185
+ **Finding:** {one-line root cause summary}
186
+ **Status:** Complete
187
+ ---
188
+ ```