knowzcode 0.1.0 → 0.3.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 (64) hide show
  1. package/.claude-plugin/marketplace.json +9 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +170 -73
  4. package/agents/analyst.md +24 -62
  5. package/agents/architect.md +60 -48
  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/project-advisor.md +110 -0
  14. package/agents/reviewer.md +43 -91
  15. package/agents/security-officer.md +194 -0
  16. package/agents/test-advisor.md +162 -0
  17. package/agents/update-coordinator.md +7 -18
  18. package/bin/knowzcode.mjs +94 -7
  19. package/commands/audit.md +245 -25
  20. package/commands/connect-mcp.md +525 -507
  21. package/commands/fix.md +8 -8
  22. package/commands/init.md +125 -6
  23. package/commands/learn.md +327 -308
  24. package/commands/plan.md +173 -26
  25. package/commands/register.md +21 -12
  26. package/commands/status.md +309 -291
  27. package/commands/telemetry.md +188 -188
  28. package/commands/work.md +764 -114
  29. package/knowzcode/automation_manifest.md +59 -59
  30. package/knowzcode/claude_code_execution.md +291 -22
  31. package/knowzcode/copilot_execution.md +231 -0
  32. package/knowzcode/enterprise/compliance_manifest.md +5 -0
  33. package/knowzcode/knowzcode_loop.md +114 -46
  34. package/knowzcode/knowzcode_orchestration.md +66 -0
  35. package/knowzcode/knowzcode_project.md +48 -233
  36. package/knowzcode/knowzcode_vaults.md +183 -54
  37. package/knowzcode/mcp_config.md +72 -47
  38. package/knowzcode/platform_adapters.md +630 -29
  39. package/knowzcode/prompts/Execute_Micro_Fix.md +57 -57
  40. package/knowzcode/prompts/Investigate_Codebase.md +227 -227
  41. package/knowzcode/prompts/Migrate_Knowledge.md +301 -301
  42. package/knowzcode/prompts/Refactor_Node.md +72 -72
  43. package/knowzcode/prompts/Spec_Verification_Checkpoint.md +59 -59
  44. package/knowzcode/prompts/[LOOP_1A]__Propose_Change_Set.md +52 -52
  45. package/knowzcode/prompts/[LOOP_1B]__Draft_Specs.md +75 -75
  46. package/knowzcode/prompts/[LOOP_2A]__Implement_Change_Set.md +55 -55
  47. package/knowzcode/prompts/[LOOP_2B]__Verify_Implementation.md +72 -72
  48. package/knowzcode/prompts/[LOOP_3]__Finalize_And_Commit.md +67 -67
  49. package/package.json +1 -1
  50. package/skills/alias-resolver.json +1 -1
  51. package/skills/architecture-diff.json +1 -1
  52. package/skills/check-installation-status.json +1 -1
  53. package/skills/continue.md +25 -4
  54. package/skills/environment-guard.json +1 -1
  55. package/skills/generate-workgroup-id.json +1 -1
  56. package/skills/install-knowzcode.json +1 -1
  57. package/skills/load-core-context.json +1 -1
  58. package/skills/log-entry-builder.json +1 -1
  59. package/skills/spec-quality-check.json +1 -1
  60. package/skills/spec-template.json +1 -1
  61. package/skills/spec-validator.json +1 -1
  62. package/skills/tracker-scan.json +1 -1
  63. package/skills/tracker-update.json +1 -1
  64. package/skills/validate-installation.json +1 -1
@@ -12,10 +12,10 @@
12
12
 
13
13
  ## Vaults
14
14
 
15
- ### Research Vault (Primary)
15
+ ### Ecosystem Vault (Primary)
16
16
  - **Vault ID**: (not configured)
17
17
  - **Vault Name**: (not configured)
18
- - **Purpose**: Learnings, conventions, decisions, patterns
18
+ - **Purpose**: Decisions, conventions, security practices, integrations, business rules, domain knowledge
19
19
  - **Auto-configured**: No
20
20
 
21
21
  **Query Patterns (when configured):**
@@ -23,36 +23,36 @@
23
23
  - "What patterns for API versioning?"
24
24
  - "Security best practices we use"
25
25
  - "Why did we choose Redis cache?"
26
+ - "Stripe webhook setup"
27
+
28
+ > **Backwards compatibility**: Vaults previously configured as type `research`, `domain`, or `platform` are treated identically to `ecosystem`. No migration needed.
26
29
 
27
30
  ### Code Vault (Optional)
28
31
  - **Vault ID**: (not configured)
29
32
  - **Vault Name**: (not configured)
30
- - **Purpose**: Indexed source code for semantic search (AST-chunked)
33
+ - **Purpose**: Implementation patterns, workarounds, performance optimizations
31
34
 
32
35
  **Note**: Code search works well with local grep/glob for most projects.
33
- Configure a code vault for large codebases (50k+ LOC) where semantic search
34
- provides significant benefit.
36
+ Configure a code vault for teams that want semantic search over implementation patterns and reusable utilities.
35
37
 
36
38
  **Query Patterns (when configured):**
37
- - "Find all auth middleware"
38
- - "Where is PaymentService?"
39
- - "Show database migrations"
40
- - "JWT validation code"
39
+ - "Retry logic pattern"
40
+ - "Workaround for rate limiting"
41
+ - "Performance optimization for bulk inserts"
42
+ - "JWT validation pattern"
41
43
 
42
- ### Enterprise Vault (Optional)
44
+ ### Finalizations Vault (Optional)
43
45
  - **Vault ID**: (not configured)
44
46
  - **Vault Name**: (not configured)
45
- - **Purpose**: Team-wide standards, audit trails, compliance records
46
- - **Auto-configured**: No
47
+ - **Purpose**: WorkGroup completion summaries, outcome records, finalization details
47
48
 
48
- **Note**: Enterprise vault is for organizations that want centralized standards
49
- and audit trails across projects. Configure via `knowzcode/enterprise/compliance_manifest.md`
50
- with `mcp_compliance_enabled: true`.
49
+ **Note**: Finalizations vault provides a searchable history of completed work.
50
+ Useful for teams that want to review past work patterns and outcomes.
51
51
 
52
52
  **Query Patterns (when configured):**
53
- - "Team standards for React projects"
54
- - "Security requirements for API endpoints"
55
- - "Audit trail for WorkGroup kc-feat-auth"
53
+ - "What happened in WG-feat-auth?"
54
+ - "Recent completion outcomes"
55
+ - "Goals we worked on last week"
56
56
 
57
57
  ---
58
58
 
@@ -61,53 +61,56 @@ with `mcp_compliance_enabled: true`.
61
61
  KnowzCode recommends starting with a **single "KnowzCode" vault** for simplicity:
62
62
 
63
63
  ```
64
- ┌─────────────────────────────────────────────────────────┐
65
- KnowzCode Vault
66
-
67
- │ Purpose: Learnings, conventions, decisions, patterns │
68
- Used by: /kc:learn, closer, agents
69
- Code search: Uses local grep/glob (no code vault)
70
-
71
- └─────────────────────────────────────────────────────────┘
64
+ ┌──────────────────────────────────────────────────────┐
65
+ KnowzCode Vault
66
+
67
+ │ Purpose: All learnings, decisions, patterns, etc.
68
+ Read by: knowz-scout, knowz-scribe, all agents
69
+ Written by: knowz-scribe, knowz-scout, /kc:learn
70
+ Code search: Uses local grep/glob (no code vault)
71
+ │ │
72
+ └──────────────────────────────────────────────────────┘
72
73
  ```
73
74
 
74
75
  **Why single vault?**
75
- - Simpler onboarding (no "what's code vault vs research vault?")
76
+ - Simpler onboarding (no vault type decisions needed)
76
77
  - Code search works fine with grep/glob for most projects
77
78
  - MCP vault is optimized for organizational knowledge, not code indexing
78
- - Advanced users can add code vault later via `/kc:connect-mcp --configure-vaults`
79
+ - Advanced users can add specialized vaults later via `/kc:connect-mcp --configure-vaults`
79
80
 
80
81
  ---
81
82
 
82
83
  ## Usage in Agents
83
84
 
84
- | Agent | Research Vault | Code Vault | Purpose |
85
- |-------|----------------|------------|---------|
86
- | analyst | Query | Query (if configured) | Find past decisions + affected code |
87
- | architect | Query | Query (if configured) | Conventions + implementation examples |
88
- | builder | Query | Query (if configured) | Best practices + similar patterns |
89
- | reviewer | Query | Query (if configured) | Standards + precedent check |
90
- | closer | **Write** | - | Capture learnings |
85
+ | Agent | Vault Interaction | Purpose |
86
+ |-------|-------------------|---------|
87
+ | knowz-scout | Read all configured vaults | Find past decisions, conventions, patterns |
88
+ | knowz-scribe | Read and write to matching vaults | Route learnings per write conditions |
89
+ | analyst | Read via knowz-scout | Past decisions + affected code patterns |
90
+ | architect | Read via knowz-scout | Conventions + implementation examples |
91
+ | builder | Read via knowz-scout | Best practices + similar patterns |
92
+ | reviewer | Read via knowz-scout | Standards + precedent check |
93
+ | closer | Triggers knowz-scribe captures | Finalization learnings |
91
94
 
92
- **Fallback behavior**: When Code Vault is not configured, agents use local grep/glob
93
- for code search. This works well for most projects.
95
+ **Fallback behavior**: When specialized vaults are not configured, agents use local grep/glob
96
+ for code search and the single vault for all knowledge queries.
94
97
 
95
98
  ---
96
99
 
97
100
  ## MCP Tools Reference
98
101
 
99
- ### Query Tools (Read)
102
+ ### Query Tools (Read — used by knowz-scout)
100
103
 
101
104
  **search_knowledge(query, vaultId, limit)**
102
105
  - Vector similarity search across indexed content
103
106
  - Use for: finding code patterns or documentation
104
- - Example: `search_knowledge("authentication logic", research_vault_id, 10)`
107
+ - Example: `search_knowledge("authentication logic", ecosystem_vault_id, 10)`
105
108
 
106
109
  **ask_question(question, vaultId, researchMode)**
107
110
  - AI-powered question answering with document synthesis
108
111
  - `researchMode: false` - Quick answer (faster)
109
112
  - `researchMode: true` - Comprehensive answer (8000+ tokens, multi-document)
110
- - Example: `ask_question("What are our error handling conventions?", research_vault_id, true)`
113
+ - Example: `ask_question("What are our error handling conventions?", ecosystem_vault_id, true)`
111
114
 
112
115
  **find_entities(entityType, query, limit)**
113
116
  - Find people, locations, or events extracted from knowledge base
@@ -121,7 +124,7 @@ for code search. This works well for most projects.
121
124
  **list_vaults(includeStats)**
122
125
  - List all accessible vaults with optional statistics
123
126
 
124
- ### Write Tools (Learning Capture)
127
+ ### Write Tools (used by knowz-scribe and /kc:learn)
125
128
 
126
129
  **create_knowledge(content, title, knowledgeType, vaultId, tags, source)**
127
130
  - Create new knowledge item in vault
@@ -129,22 +132,30 @@ for code search. This works well for most projects.
129
132
  - Example:
130
133
  ```json
131
134
  {
132
- "content": "[CONTEXT]...\n[INSIGHT]...\n[EXAMPLE]...",
133
- "title": "Pattern: JWT Refresh Flow",
135
+ "content": "[CONTEXT]...\n[INSIGHT]...\n[RATIONALE]...",
136
+ "title": "Decision: JWT Refresh Flow",
134
137
  "knowledgeType": "Note",
135
- "vaultId": "{research_vault_id}",
136
- "tags": ["security", "jwt", "patterns"],
138
+ "vaultId": "{ecosystem_vault_id}",
139
+ "tags": ["security", "jwt", "decision"],
137
140
  "source": "KnowzCode WorkGroup WG-feat-auth-20260128"
138
141
  }
139
142
  ```
140
143
 
144
+ **create_vault(name, description)**
145
+ - Create a new vault on the Knowz server
146
+ - `name`: Display name for the vault (e.g., "Code Patterns")
147
+ - `description`: Description of the vault's purpose and content
148
+ - Returns the created vault's ID
149
+ - Used during vault setup when default entries have empty IDs
150
+ - **Note**: Availability depends on MCP server version. If not available, fall back to matching by name against `list_vaults()` results.
151
+
141
152
  ---
142
153
 
143
154
  ## Auto-Learning Configuration
144
155
 
145
156
  - **Enabled**: Yes
146
157
  - **Prompt on Detection**: Yes
147
- - **Learning Categories**: Pattern, Decision, Workaround, Performance, Security, Convention
158
+ - **Learning Categories**: Pattern, Decision, Workaround, Performance, Security, Convention, Integration
148
159
 
149
160
  ### Detection Signals
150
161
 
@@ -154,6 +165,20 @@ Learnings are auto-detected when WorkGroup contains:
154
165
  - **Workaround signals**: "workaround", "limitation", "temporary"
155
166
  - **Performance signals**: "optimized", "reduced from X to Y"
156
167
  - **Security signals**: "security", "vulnerability", "sanitize"
168
+ - **Integration signals**: "integrated with", "API behavior", "third-party"
169
+
170
+ ### Learning Category Routing
171
+
172
+ | Category | Target Vault Type |
173
+ |----------|-------------------|
174
+ | Pattern | `code` |
175
+ | Workaround | `code` |
176
+ | Performance | `code` |
177
+ | Decision | `ecosystem` |
178
+ | Convention | `ecosystem` |
179
+ | Security | `ecosystem` |
180
+ | Integration | `ecosystem` |
181
+ | Completion record | `finalizations` |
157
182
 
158
183
  ---
159
184
 
@@ -163,4 +188,4 @@ Learnings are auto-detected when WorkGroup contains:
163
188
  - `/kc:connect-mcp` - Configure MCP server (use existing API key)
164
189
  - `/kc:connect-mcp --configure-vaults` - Reconfigure vault IDs
165
190
  - `/kc:status` - Check connection status and vault info
166
- - `/kc:learn "insight"` - Manually create learning in research vault
191
+ - `/kc:learn "insight"` - Manually create learning (routes via knowz-scribe if available)