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,63 +1,189 @@
1
1
  # KnowzCode Vault Configuration
2
2
 
3
- Multi-vault routing configuration for intelligent vault selection based on query intent.
3
+ Multi-vault routing configuration for intelligent vault selection based on query intent and write conditions.
4
4
 
5
5
  ---
6
6
 
7
7
  ## Connected Vaults
8
8
 
9
- > **No vaults configured yet.**
10
- >
11
- > Run `/kc:register` to set up your account and auto-configure your first vault,
12
- > or `/kc:connect-mcp --configure-vaults` to add vaults interactively.
9
+ ### (not created)
10
+ - **Name**: Code Patterns
11
+ - **ID**:
12
+ - **Type**: code
13
+ - **Description**: Key learnings, gotchas, takeaways, and architecture insights from the codebase.
14
+ - **Write Conditions**:
15
+ - After Phase 2A: implementation patterns and workarounds from TDD cycles
16
+ - After Phase 3: Pattern/Workaround/Performance learnings from WorkGroup scan
17
+ - **Content Filter**: Pattern:, Workaround:, Performance:
18
+
19
+ ### (not created)
20
+ - **Name**: Ecosystem Knowledge
21
+ - **ID**:
22
+ - **Type**: ecosystem
23
+ - **Description**: Business rules, platform logic, conventions, decisions, and cross-system details. Used for lookups of details beyond scope of current codebase, including how other systems interact.
24
+ - **Write Conditions**:
25
+ - After Phase 1A: scope decisions, risk assessment
26
+ - After Phase 2B: security findings, quality decisions
27
+ - After Phase 3: Decision/Convention/Security/Integration learnings
28
+ - **Content Filter**: Decision:, Convention:, Security:, Integration:, Scope:
29
+
30
+ ### (not created)
31
+ - **Name**: Finalizations
32
+ - **ID**:
33
+ - **Type**: finalizations
34
+ - **Description**: Final summaries at WorkGroup completion. All finalization details documenting complete execution and outcomes. Written only when work is verified and WorkGroup is marked completed.
35
+ - **Write Conditions**:
36
+ - After Phase 3: full WorkGroup summary with goal, NodeIDs, audit score, decisions, outcomes
37
+ - **Content Filter**: (completion records)
13
38
 
14
- <!--
15
- When vaults are configured, they appear here in this format:
39
+ ---
16
40
 
17
- ### vault-abc123-def456
18
- - **Name**: Project Codebase
19
- - **ID**: vault-abc123-def456
20
- - **Type**: code
21
- - **Description**: Questions about the actual source code, current file structure, implementations, and how things work today. Use for "where is X defined?", "how does Y work?", "find implementations of Z".
41
+ ## Vault Types
42
+
43
+ | Type | Purpose | Read By | Written By | Example Queries |
44
+ |------|---------|---------|------------|-----------------|
45
+ | **code** | Implementation patterns, workarounds, performance | knowz-scout, knowz-scribe, agents | knowz-scribe | "Find auth middleware pattern", "Retry logic workaround" |
46
+ | **ecosystem** | Decisions, conventions, security, integrations, business rules | knowz-scout, knowz-scribe, agents | knowz-scribe | "Error handling conventions", "Why Redis over Memcached?" |
47
+ | **finalizations** | WorkGroup completion summaries, outcome records | knowz-scout, knowz-scribe | knowz-scribe | "What happened in WG-feat-auth?", "Recent completions" |
22
48
 
23
- ### vault-xyz789-ghi012
24
- - **Name**: Engineering Knowledge
25
- - **ID**: vault-xyz789-ghi012
26
- - **Type**: research
27
- - **Description**: Organizational decisions, architectural patterns, team conventions, and learnings. Use for "why did we choose X?", "what's our convention for Y?", "best practices for Z".
28
- -->
49
+ > **Types are user-configurable labels, not framework constants.** Users can add, rename, or create custom vault types freely. The 3 defaults above cover common needs. For example, teams needing compliance tracking can add an `enterprise` type.
50
+ >
51
+ > **Backwards compatibility**: `research`, `domain`, and `platform` are aliases for `ecosystem`. `sessions` is an alias for `finalizations`. Existing vaults configured with these types continue to work — agents treat aliases identically when resolving vault targets.
29
52
 
30
53
  ---
31
54
 
32
55
  ## Vault Routing Rules
33
56
 
34
- Routing rules determine which vault to query based on the type of question or operation.
35
-
36
- ### Default Rules (when vaults are configured)
57
+ ### Read Routing (knowz-scout + agents)
37
58
 
38
59
  | Query Type | Description | Target Vault Type |
39
60
  |------------|-------------|-------------------|
40
- | **Code questions** | Implementations, files, structure, "where is X?" | `code` |
41
- | **Convention questions** | Patterns, decisions, best practices, "why did we?" | `research` |
42
- | **Learning capture** | Saving new insights, patterns, decisions | `research` (prompt if multiple) |
43
- | **Standards queries** | Team standards, compliance rules, requirements | `enterprise` |
44
- | **Audit trail push** | Completion records, audit results | `enterprise` |
61
+ | **Code patterns** | Implementations, patterns, "how did we build X?" | `code` |
62
+ | **Decisions / conventions** | Past decisions, best practices, "why did we?" | `ecosystem` |
63
+ | **Integration questions** | Third-party APIs, platform behaviors | `ecosystem` |
64
+ | **Standards / compliance** | Team standards, audit results | user's enterprise vault (if configured) |
65
+ | **Session history** | Past WorkGroups, outcomes | `finalizations` |
66
+
67
+ ### Write Routing (knowz-scribe)
68
+
69
+ | Learning Category | Target Vault Type | Title Prefix |
70
+ |-------------------|-------------------|--------------|
71
+ | Pattern | `code` | `Pattern:` |
72
+ | Workaround | `code` | `Workaround:` |
73
+ | Performance | `code` | `Performance:` |
74
+ | Decision | `ecosystem` | `Decision:` |
75
+ | Convention | `ecosystem` | `Convention:` |
76
+ | Security | `ecosystem` | `Security:` |
77
+ | Integration | `ecosystem` | `Integration:` |
78
+ | Scope | `ecosystem` | `Scope:` |
79
+ | Completion record | `finalizations` | `Completion:` |
80
+ | Audit trail (enterprise) | user's enterprise vault | `Audit:` |
45
81
 
46
82
  ### How Routing Works
47
83
 
48
- 1. **For queries**: Agent reads vault descriptions and matches query intent
49
- 2. **For writes**: If one research vault exists, use it; if multiple, prompt user
50
- 3. **Fallback**: If no match found, query the default research vault
84
+ 1. **For reads**: Agent reads vault descriptions and matches query intent to vault type
85
+ 2. **For writes**: Knowz-scribe matches learning category to vault type using the write routing table, then applies the vault's content filter to format the payload
86
+ 3. **Fallback**: If no specific match, use the first vault of type `ecosystem`. If only one vault exists, use it for everything
51
87
 
52
88
  ---
53
89
 
54
- ## Vault Types
90
+ ## Uncreated Vault Detection
91
+
92
+ Default vault entries ship with an empty **ID** field (null GUID), indicating "not yet created on server."
93
+
94
+ ### Detection Points
95
+
96
+ Uncreated vaults are detected at multiple points in the workflow:
97
+
98
+ 1. **`/kc:register` and `/kc:connect-mcp`** — detect empty IDs during initial setup and prompt to create vaults
99
+ 2. **`/kc:work`, `/kc:plan`, and `/kc:audit`** — detect empty IDs during the MCP Probe at workflow start. These commands always call `list_vaults()` regardless of whether vault IDs exist, then present a Vault Setup table showing each uncreated vault's name, type, description, and which phases write to it. The user can create all, select specific vaults, or skip (proceeding without knowledge capture).
100
+
101
+ ### Creation Flow
102
+
103
+ When uncreated vaults are detected, the user sees:
104
+
105
+ ```markdown
106
+ ## Vault Setup
107
+
108
+ Your Knowz API key is valid and MCP is connected, but {N} default vault(s) haven't been created yet.
109
+ Creating vaults enables knowledge capture throughout the workflow:
110
+
111
+ | Vault | Type | Description | Written During |
112
+ |-------|------|-------------|----------------|
113
+ ```
114
+
115
+ Table rows are built dynamically from uncreated entries — only showing vaults that haven't been created. The "Written During" column is derived from each vault's Write Conditions field.
116
+
117
+ Options: **A) Create all** (recommended), **B) Select which to create**, **C) Skip**.
118
+
119
+ On confirmation, each vault is created via the MCP `create_vault(name, description)` tool. If `create_vault` is not available, the command falls back to matching by name against `list_vaults()` results. The entry's **ID** field is updated with the server-returned vault ID. The H3 heading is updated from `(not created)` to the vault ID.
120
+
121
+ ---
122
+
123
+ ## Write Conditions and Content Filters
124
+
125
+ Each vault type defines when it accepts writes (Write Conditions) and how content should be formatted (Content Filter).
126
+
127
+ ### code
128
+
129
+ **Write Conditions**: Learning category is Pattern, Workaround, or Performance.
130
+
131
+ **Content Filter**:
132
+ ```
133
+ [CONTEXT] {where the pattern/workaround was encountered}
134
+ [PATTERN] {what was built or discovered}
135
+ [EXAMPLE] {code snippet or usage example}
136
+ [TAGS] {learning category, domain, language}
137
+ ```
138
+
139
+ ### ecosystem
140
+
141
+ **Write Conditions**: Learning category is Decision, Convention, Security, Scope, or Integration.
142
+
143
+ **Content Filter**:
144
+ ```
145
+ [CONTEXT] {what prompted the decision or convention}
146
+ [INSIGHT] {the decision, convention, security finding, or integration detail}
147
+ [RATIONALE] {why this approach was chosen}
148
+ [TAGS] {learning category, domain}
149
+ ```
150
+
151
+ ### finalizations
152
+
153
+ **Write Conditions**: Phase 3 finalization — WorkGroup completion record.
55
154
 
56
- | Type | Purpose | Example Queries |
57
- |------|---------|-----------------|
58
- | **code** | Indexed source code (AST-chunked) | "Find auth middleware", "Where is PaymentService?" |
59
- | **research** | Architecture, conventions, learnings | "Error handling conventions", "Why Redis over Memcached?" |
60
- | **enterprise** | Team standards, audit trails, compliance | "Team standards for React", "Audit trail for kc-feat-auth" |
155
+ **Content Filter**:
156
+ ```
157
+ [GOAL] {original goal from WorkGroup}
158
+ [OUTCOME] {success | partial | abandoned}
159
+ [NODES] {NodeIDs changed}
160
+ [DURATION] {phases completed, e.g. "1A-3"}
161
+ [TAGS] {finalization, domain, outcome}
162
+ ```
163
+
164
+ ---
165
+
166
+ ## Single Vault Model
167
+
168
+ KnowzCode works with a single vault. If only one vault is configured (regardless of its declared type), all reads and writes route to it. This is the recommended starting point:
169
+
170
+ ```
171
+ ┌──────────────────────────────────────────────────────┐
172
+ │ KnowzCode Vault │
173
+ │ │
174
+ │ Purpose: All learnings, decisions, patterns, etc. │
175
+ │ Read by: knowz-scout, knowz-scribe, all agents │
176
+ │ Written by: knowz-scribe, /kc:learn │
177
+ │ Code search: Uses local grep/glob (no code vault) │
178
+ │ │
179
+ └──────────────────────────────────────────────────────┘
180
+ ```
181
+
182
+ **Why start with one vault?**
183
+ - Simpler onboarding — no vault type decisions needed
184
+ - Code search works with grep/glob for most projects
185
+ - MCP vault is optimized for organizational knowledge
186
+ - Add specialized vaults later via `/kc:connect-mcp --configure-vaults`
61
187
 
62
188
  ---
63
189
 
@@ -69,36 +195,39 @@ You can manually add vaults by editing this file. Use this format:
69
195
  ### {vault-id}
70
196
  - **Name**: {Display Name}
71
197
  - **ID**: {vault-id}
72
- - **Type**: code | research
198
+ - **Type**: code | ecosystem | finalizations | {custom}
73
199
  - **Description**: {Detailed description of what this vault contains. Be specific about what types of questions should be routed here. Include example queries.}
200
+ - **Write Conditions**: {When knowz-scribe should write to this vault}
201
+ - **Content Filter**: {Format template for create_knowledge content}
74
202
  ```
75
203
 
76
204
  **Tips for good descriptions:**
77
- - Be specific about content type (source code vs documentation)
205
+ - Be specific about content type (patterns vs decisions vs integrations)
78
206
  - Include example queries that should route to this vault
79
207
  - Mention key topics or domains covered
80
- - Describe the time period or version if relevant
208
+ - Write conditions should reference learning categories from the routing table
81
209
 
82
210
  ---
83
211
 
84
- ## Configuration Commands
212
+ ## Integration with Agents
85
213
 
86
- - `/kc:register` - Create account and auto-configure first vault
87
- - `/kc:connect-mcp --configure-vaults` - Interactive vault setup
88
- - `/kc:status` - Check vault connection status
214
+ | Agent | Vault Interaction | Purpose |
215
+ |-------|-------------------|---------|
216
+ | `knowz-scout` | Read all configured vaults | Find past decisions, conventions, patterns |
217
+ | `knowz-scribe` | Read and write to matching vaults | Route and capture learnings |
218
+ | `analyst` | Read via knowz-scout | Past decisions + affected code patterns |
219
+ | `architect` | Read via knowz-scout | Conventions + implementation examples |
220
+ | `builder` | Read via knowz-scout | Best practices + similar patterns |
221
+ | `reviewer` | Read via knowz-scout | Standards + precedent checks |
222
+ | `closer` | Triggers knowz-scribe captures | Finalization learnings |
89
223
 
90
- ---
224
+ **Fallback behavior**: If vault routing cannot determine the best vault, agents use the first `ecosystem`-type vault or prompt the user.
91
225
 
92
- ## Integration with Agents
93
-
94
- When configured, agents automatically route queries to the appropriate vault:
226
+ ---
95
227
 
96
- | Agent | Uses Vault Routing For |
97
- |-------|------------------------|
98
- | `analyst` | Finding affected code + past decisions |
99
- | `architect` | Implementation examples + conventions |
100
- | `builder` | Similar patterns + best practices |
101
- | `reviewer` | Standards + precedent checks |
102
- | `closer` | Duplicate checking + learning capture |
228
+ ## Configuration Commands
103
229
 
104
- **Fallback behavior**: If vault routing cannot determine the best vault, agents use the first matching vault of the required type or prompt the user.
230
+ - `/kc:register` - Create account and auto-configure first vault
231
+ - `/kc:connect-mcp --configure-vaults` - Interactive vault setup
232
+ - `/kc:status` - Check vault connection status
233
+ - `/kc:learn "insight"` - Manually create learning (routes via knowz-scribe if available, direct write otherwise)
@@ -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)
@@ -68,7 +68,7 @@ All commands work without MCP — it enhances but never blocks.
68
68
 
69
69
  ## OpenAI Codex (AGENTS.md)
70
70
 
71
- Create `AGENTS.md` in project root. Notes: `AGENTS.override.md` can be used for user-local overrides. 32KB file size limit. Plain text format (no YAML frontmatter).
71
+ Create `AGENTS.md` in project root. Notes: `AGENTS.override.md` can be used for user-local overrides. 32KB file size limit. Plain text format (no YAML frontmatter). Codex (2026) also supports `SKILL.md` files for discoverable skills — these appear as available commands in the Codex UI. `AGENTS.md` remains the primary instruction mechanism for KnowzCode methodology.
72
72
 
73
73
  ```markdown
74
74
  # KnowzCode Development Methodology
@@ -152,6 +152,45 @@ For single-file, <50 line, no-ripple-effect changes:
152
152
 
153
153
  Create `GEMINI.md` in project root. Notes: Gemini CLI supports `@file.md` imports for pulling in methodology files (e.g., `@knowzcode/knowzcode_loop.md`). User-global preferences can be placed in `~/.gemini/GEMINI.md`.
154
154
 
155
+ ### Native Commands (`.gemini/commands/kc/*.toml`)
156
+
157
+ Gemini CLI (2026) supports native custom commands via TOML files in `.gemini/commands/`. Subdirectory namespacing gives the `/kc:` prefix automatically:
158
+
159
+ ```toml
160
+ # .gemini/commands/kc/work.toml
161
+ description = "Start a new KnowzCode development workflow"
162
+ prompt = """Read knowzcode/knowzcode_loop.md. Follow Phase 1A→3 workflow for:
163
+ <ARGS/>
164
+ Read knowzcode/knowzcode_project.md for project context.
165
+ Read knowzcode/knowzcode_tracker.md for active work."""
166
+ ```
167
+
168
+ ```toml
169
+ # .gemini/commands/kc/plan.toml
170
+ description = "Research before implementing"
171
+ prompt = """Read knowzcode/knowzcode_loop.md and knowzcode/knowzcode_project.md.
172
+ Investigate the codebase for: <ARGS/>
173
+ Present findings with options. Say 'implement' to transition to /kc:work."""
174
+ ```
175
+
176
+ ```toml
177
+ # .gemini/commands/kc/fix.toml
178
+ description = "Quick targeted fix (micro-fix workflow)"
179
+ prompt = """Read knowzcode/knowzcode_loop.md section on Micro-Fix.
180
+ Apply a targeted fix for: <ARGS/>
181
+ Run tests, log a MicroFix entry, commit with fix: prefix."""
182
+ ```
183
+
184
+ ```toml
185
+ # .gemini/commands/kc/audit.toml
186
+ description = "Run quality audit against specs"
187
+ prompt = """Read knowzcode/knowzcode_loop.md Phase 2B.
188
+ Perform a READ-ONLY audit comparing implementation against specs in knowzcode/specs/.
189
+ Report completion percentage, gaps, and security concerns for: <ARGS/>"""
190
+ ```
191
+
192
+ Gemini also supports extensions (`gemini-extension.json`) for tool integration and `@file.md` imports for including methodology files directly in prompts.
193
+
155
194
  ```markdown
156
195
  # KnowzCode Development Methodology
157
196
 
@@ -212,7 +251,7 @@ Single file, <50 lines, no ripple effects:
212
251
 
213
252
  ## Cursor (`.cursor/rules/knowzcode.mdc`)
214
253
 
215
- Create `.cursor/rules/knowzcode.mdc` with YAML frontmatter. Notes: Modern Cursor uses `.cursor/rules/*.mdc` files instead of the deprecated `.cursorrules`. Scoped rules can target specific file patterns using the `globs` frontmatter field.
254
+ Create `.cursor/rules/knowzcode.mdc` with YAML frontmatter. Notes: Modern Cursor uses `.cursor/rules/*.mdc` files instead of the deprecated `.cursorrules`. Scoped rules can target specific file patterns using the `globs` frontmatter field. Cursor 1.6+ (2026) also supports `.cursor/commands/*.md` for custom slash commands (beta) and reads `AGENTS.md` for agent instructions.
216
255
 
217
256
  ```markdown
218
257
  ---
@@ -276,7 +315,7 @@ Before any feature work, read:
276
315
 
277
316
  ## GitHub Copilot (.github/copilot-instructions.md)
278
317
 
279
- Create `.github/copilot-instructions.md` for repository-level instructions. Notes: GitHub Copilot also supports scoped instructions via `*.instructions.md` files with `applyTo` YAML frontmatter (e.g., `knowzcode.instructions.md` with `applyTo: "knowzcode/**"` to scope KnowzCode methodology to the framework directory).
318
+ Create `.github/copilot-instructions.md` for repository-level instructions. Notes: GitHub Copilot also supports scoped instructions via `*.instructions.md` files with `applyTo` YAML frontmatter (e.g., `knowzcode.instructions.md` with `applyTo: "knowzcode/**"` to scope KnowzCode methodology to the framework directory). Copilot (2026) now supports `.github/agents/*.agent.md` files with YAML frontmatter including `tools`, `handoffs`, `agents` (subagents), and `model` fields. KnowzCode phases map well to handoff chains between agent definitions.
280
319
 
281
320
  ```markdown
282
321
  # KnowzCode Development Methodology
@@ -323,7 +362,7 @@ STOP and get user approval:
323
362
 
324
363
  ## Windsurf (`.windsurf/rules/knowzcode.md`)
325
364
 
326
- Create `.windsurf/rules/knowzcode.md`. Notes: Modern Windsurf uses the `.windsurf/rules/` directory instead of the deprecated `.windsurfrules` file. Cascade multi-file editing works well with KnowzCode's cross-component implementation phases.
365
+ Create `.windsurf/rules/knowzcode.md`. Notes: Modern Windsurf uses the `.windsurf/rules/` directory instead of the deprecated `.windsurfrules` file. Cascade multi-file editing works well with KnowzCode's cross-component implementation phases. Windsurf also supports `.windsurf/workflows/*.md` for custom commands invoked as `/workflow-name` — KnowzCode workflows can be defined as individual workflow files for each phase.
327
366
 
328
367
  ```markdown
329
368
  # KnowzCode Development Methodology