knowzcode 0.2.1 → 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.
package/commands/audit.md CHANGED
@@ -33,6 +33,22 @@ Read:
33
33
  - `knowzcode/knowzcode_tracker.md`
34
34
  - `knowzcode/knowzcode_architecture.md`
35
35
  - `knowzcode/knowzcode_project.md`
36
+ - `knowzcode/knowzcode_orchestration.md` (if exists)
37
+
38
+ ## Step 1.1: Parse Orchestration Config (Optional)
39
+
40
+ If `knowzcode/knowzcode_orchestration.md` exists, parse its YAML blocks:
41
+
42
+ 1. `SCOUT_MODE` = `scout_mode` value (default: "full")
43
+ 2. `DEFAULT_SPECIALISTS` = `default_specialists` value (default: [])
44
+ 3. `MCP_AGENTS_ENABLED` = `mcp_agents_enabled` value (default: true)
45
+
46
+ Apply flag overrides (flags win over config):
47
+ - `--no-scouts` in `$ARGUMENTS` → override `SCOUT_MODE = "none"`
48
+ - `--no-specialists` in `$ARGUMENTS` → override `DEFAULT_SPECIALISTS = []`
49
+ - `--no-mcp` in `$ARGUMENTS` → override `MCP_AGENTS_ENABLED = false`
50
+
51
+ If the file doesn't exist, use hardcoded defaults (current behavior).
36
52
 
37
53
  ## Step 2: Set Up Execution Mode
38
54
 
@@ -155,11 +171,55 @@ Spawn reviewers with their task IDs:
155
171
  > **Audit scope**: Enterprise compliance ONLY.
156
172
  > Check against guidelines in `knowzcode/enterprise/compliance_manifest.md`.
157
173
 
158
- 4. If `VAULTS_CONFIGURED = true`, spawn `knowz-scout` for standards lookup in parallel with reviewers:
174
+ 4. If `VAULTS_CONFIGURED = true` AND `MCP_AGENTS_ENABLED = true`, spawn `knowz-scout` for standards lookup in parallel with reviewers:
159
175
  > **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
160
176
  > Read `knowzcode/knowzcode_vaults.md` to resolve vault IDs by type. Query for team standards: `ask_question({vault matching "ecosystem" type}, "standards for {project_type}", researchMode=true)`
161
177
 
162
- Wait for all to complete. Synthesize results in Step 4.
178
+ Wait for all to complete.
179
+
180
+ #### Specialist Integration (Optional)
181
+
182
+ Initialize `AUDIT_SPECIALISTS = DEFAULT_SPECIALISTS` (from orchestration config, default: []).
183
+
184
+ If `$ARGUMENTS` contains `--specialists` (or `--specialists=security`, `--specialists=test`, `--specialists=security,test`):
185
+ - `--specialists` → enable all applicable: `[security-officer, test-advisor]`
186
+ - `--specialists=csv` → enable specified subset
187
+ - `--no-specialists` → clear to `[]` (overrides config defaults)
188
+
189
+ If neither `--specialists` nor `--no-specialists` is present, use `DEFAULT_SPECIALISTS` from config.
190
+
191
+ Parse which specialists to enable. Then spawn alongside reviewers:
192
+
193
+ 1. **security-officer** (if enabled) — spawn alongside `reviewer-sec-int` for deeper security scanning:
194
+ - `TaskCreate("Security officer: deep security audit")` → `TaskUpdate(owner: "security-officer")`
195
+ - Spawn `security-officer` teammate:
196
+ > **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
197
+ > You are the **security-officer** running a deep security audit.
198
+ > Read `agents/security-officer.md` for your role definition.
199
+ > Read `knowzcode/claude_code_execution.md` for team conventions.
200
+ >
201
+ > **Audit scope**: Full codebase security scan — vulnerability patterns, hardcoded secrets, injection vectors, auth bypass, SSRF, path traversal.
202
+ > **Context files**: knowzcode_tracker.md, knowzcode_architecture.md, knowzcode_project.md
203
+ > **Specs directory**: knowzcode/specs/
204
+ >
205
+ > Deliverable: Security finding report with severity ratings. Tag CRITICAL/HIGH findings with `[SECURITY-BLOCK]`.
206
+ > If `knowzcode/enterprise/compliance_manifest.md` exists and `compliance_enabled: true`, also cross-reference findings with enterprise guideline IDs.
207
+
208
+ 2. **test-advisor** (if enabled) — spawn alongside reviewers for test quality assessment:
209
+ - `TaskCreate("Test advisor: test quality audit")` → `TaskUpdate(owner: "test-advisor")`
210
+ - Spawn `test-advisor` teammate:
211
+ > **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
212
+ > You are the **test-advisor** running a test quality audit.
213
+ > Read `agents/test-advisor.md` for your role definition.
214
+ > Read `knowzcode/claude_code_execution.md` for team conventions.
215
+ >
216
+ > **Audit scope**: Test coverage, TDD compliance, assertion quality, edge case coverage, test isolation.
217
+ > **Context files**: knowzcode_tracker.md, knowzcode_project.md
218
+ >
219
+ > Deliverable: Test quality report with coverage metrics, TDD compliance, and improvement recommendations.
220
+ > If `knowzcode/enterprise/compliance_manifest.md` exists and `compliance_enabled: true`, also check enterprise ARC criteria for test coverage.
221
+
222
+ Wait for all reviewers and specialists to complete. Synthesize results in Step 4.
163
223
 
164
224
  ### Subagent Mode
165
225
 
@@ -167,12 +227,15 @@ Wait for all to complete. Synthesize results in Step 4.
167
227
 
168
228
  Launch scouts + reviewer in parallel via `Task()`:
169
229
 
170
- 1. **context-scout** — Local context (3 parallel instances):
171
- - `Task(subagent_type="context-scout", name="context-scout-specs", description="Scout: specs context", prompt="Research audit scope: {audit_type}. Focus: knowzcode/specs/*.md — scan existing specifications for relevant NodeIDs, status, VERIFY criteria. Max 10 tool calls. Write findings to a concise summary.")`
172
- - `Task(subagent_type="context-scout", name="context-scout-workgroups", description="Scout: workgroups context", prompt="Research audit scope: {audit_type}. Focus: knowzcode/workgroups/*.md — scan previous WorkGroups for related audit findings. Max 10 tool calls. Write findings to a concise summary.")`
173
- - `Task(subagent_type="context-scout", name="context-scout-backlog", description="Scout: backlog context", prompt="Research audit scope: {audit_type}. Focus: knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md — scan for active WIP, prior audit results, architecture health. Max 10 tool calls. Write findings to a concise summary.")`
230
+ 1. **context-scout** — Local context (if `SCOUT_MODE != "none"`):
231
+ - `SCOUT_MODE = "full"` (default): 3 parallel instances:
232
+ - `Task(subagent_type="context-scout", name="context-scout-specs", description="Scout: specs context", prompt="Research audit scope: {audit_type}. Focus: knowzcode/specs/*.md — scan existing specifications for relevant NodeIDs, status, VERIFY criteria. Max 10 tool calls. Write findings to a concise summary.")`
233
+ - `Task(subagent_type="context-scout", name="context-scout-workgroups", description="Scout: workgroups context", prompt="Research audit scope: {audit_type}. Focus: knowzcode/workgroups/*.md — scan previous WorkGroups for related audit findings. Max 10 tool calls. Write findings to a concise summary.")`
234
+ - `Task(subagent_type="context-scout", name="context-scout-backlog", description="Scout: backlog context", prompt="Research audit scope: {audit_type}. Focus: knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md — scan for active WIP, prior audit results, architecture health. Max 10 tool calls. Write findings to a concise summary.")`
235
+ - `SCOUT_MODE = "minimal"`: 1 combined instance:
236
+ - `Task(subagent_type="context-scout", name="context-scout", description="Scout: combined context", prompt="Research audit scope: {audit_type}. Focus: ALL local context — knowzcode/specs/*.md, knowzcode/workgroups/*.md, knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md. Max 10 tool calls. Write findings to a concise summary.")`
174
237
 
175
- 2. **knowz-scout** — MCP knowledge (if `VAULTS_CONFIGURED = true`):
238
+ 2. **knowz-scout** — MCP knowledge (if `VAULTS_CONFIGURED = true` AND `MCP_AGENTS_ENABLED = true`):
176
239
  - `Task(subagent_type="knowz-scout", description="Scout: vault standards", prompt="Research audit scope: {audit_type}. Read knowzcode/knowzcode_vaults.md to discover configured vaults. Query for team standards, conventions, and past audit decisions. Max 10 tool calls. Write findings to a concise summary.")`
177
240
 
178
241
  3. **reviewer** — The audit itself:
@@ -191,12 +254,15 @@ All launched in parallel. Synthesize scout findings alongside reviewer results.
191
254
 
192
255
  Launch scouts + parallel reviewers via `Task()`:
193
256
 
194
- 1. **context-scout** — Local context (3 parallel instances):
195
- - `Task(subagent_type="context-scout", name="context-scout-specs", description="Scout: specs context", prompt="Research for comprehensive audit. Focus: knowzcode/specs/*.md — scan all specifications for quality, completeness, VERIFY criteria. Max 10 tool calls. Write findings to a concise summary.")`
196
- - `Task(subagent_type="context-scout", name="context-scout-workgroups", description="Scout: workgroups context", prompt="Research for comprehensive audit. Focus: knowzcode/workgroups/*.md — scan all WorkGroups for patterns, recurring issues, audit history. Max 10 tool calls. Write findings to a concise summary.")`
197
- - `Task(subagent_type="context-scout", name="context-scout-backlog", description="Scout: backlog context", prompt="Research for comprehensive audit. Focus: knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md — scan for WIP status, prior audit results, architecture health. Max 10 tool calls. Write findings to a concise summary.")`
257
+ 1. **context-scout** — Local context (if `SCOUT_MODE != "none"`):
258
+ - `SCOUT_MODE = "full"` (default): 3 parallel instances:
259
+ - `Task(subagent_type="context-scout", name="context-scout-specs", description="Scout: specs context", prompt="Research for comprehensive audit. Focus: knowzcode/specs/*.md — scan all specifications for quality, completeness, VERIFY criteria. Max 10 tool calls. Write findings to a concise summary.")`
260
+ - `Task(subagent_type="context-scout", name="context-scout-workgroups", description="Scout: workgroups context", prompt="Research for comprehensive audit. Focus: knowzcode/workgroups/*.md — scan all WorkGroups for patterns, recurring issues, audit history. Max 10 tool calls. Write findings to a concise summary.")`
261
+ - `Task(subagent_type="context-scout", name="context-scout-backlog", description="Scout: backlog context", prompt="Research for comprehensive audit. Focus: knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md — scan for WIP status, prior audit results, architecture health. Max 10 tool calls. Write findings to a concise summary.")`
262
+ - `SCOUT_MODE = "minimal"`: 1 combined instance:
263
+ - `Task(subagent_type="context-scout", name="context-scout", description="Scout: combined context", prompt="Research for comprehensive audit. Focus: ALL local context — knowzcode/specs/*.md, knowzcode/workgroups/*.md, knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md. Max 10 tool calls. Write findings to a concise summary.")`
198
264
 
199
- 2. **knowz-scout** — MCP knowledge (if `VAULTS_CONFIGURED = true`):
265
+ 2. **knowz-scout** — MCP knowledge (if `VAULTS_CONFIGURED = true` AND `MCP_AGENTS_ENABLED = true`):
200
266
  - `Task(subagent_type="knowz-scout", description="Scout: vault standards", prompt="Research for comprehensive audit. Read knowzcode/knowzcode_vaults.md to discover configured vaults. Query for team standards, conventions, security policies, and compliance requirements. Max 10 tool calls. Write findings to a concise summary.")`
201
267
 
202
268
  3. **Parallel reviewers**:
@@ -206,6 +272,25 @@ Launch scouts + parallel reviewers via `Task()`:
206
272
 
207
273
  Synthesize scout context alongside reviewer results.
208
274
 
275
+ #### Specialist Integration (Subagent Mode — Optional)
276
+
277
+ Initialize `AUDIT_SPECIALISTS = DEFAULT_SPECIALISTS` (from orchestration config, default: []).
278
+
279
+ If `$ARGUMENTS` contains `--specialists` (or `--specialists=security`, `--specialists=test`, `--specialists=security,test`):
280
+ - `--specialists` → enable all applicable
281
+ - `--specialists=csv` → enable specified subset
282
+ - `--no-specialists` → clear to `[]`
283
+
284
+ If `AUDIT_SPECIALISTS` is non-empty, launch specialist `Task()` calls in parallel with reviewers:
285
+
286
+ 1. **security-officer** (if enabled):
287
+ - `Task(subagent_type="security-officer", description="Security officer: deep security audit", prompt="Audit scope: Full codebase security scan. Context files: knowzcode_tracker.md, knowzcode_architecture.md. Specs: knowzcode/specs/. Deliverable: Security finding report with severity ratings. Tag CRITICAL/HIGH with [SECURITY-BLOCK]. If knowzcode/enterprise/compliance_manifest.md exists and compliance_enabled: true, also cross-reference findings with enterprise guideline IDs.")`
288
+
289
+ 2. **test-advisor** (if enabled):
290
+ - `Task(subagent_type="test-advisor", description="Test advisor: test quality audit", prompt="Audit scope: Test coverage, TDD compliance, assertion quality, edge cases. Context files: knowzcode_tracker.md. Deliverable: Test quality report with coverage metrics and recommendations. If knowzcode/enterprise/compliance_manifest.md exists and compliance_enabled: true, also check enterprise ARC criteria for test coverage.")`
291
+
292
+ Synthesize specialist findings alongside reviewer results.
293
+
209
294
  ## Step 4: Present Results
210
295
 
211
296
  ```markdown
@@ -227,6 +312,10 @@ Synthesize scout context alongside reviewer results.
227
312
 
228
313
  ### Recommendations
229
314
  {prioritized action items}
315
+
316
+ ### Specialist Reports [only when --specialists active]
317
+ **Security Officer**: {finding count, severity breakdown, SECURITY-BLOCK tags}
318
+ **Test Advisor**: {coverage %, TDD compliance, quality assessment}
230
319
  ```
231
320
 
232
321
  ## Step 5: Log Audit
package/commands/init.md CHANGED
@@ -33,6 +33,7 @@ knowzcode/
33
33
  ├── knowzcode_log.md
34
34
  ├── knowzcode_architecture.md
35
35
  ├── knowzcode_loop.md
36
+ ├── knowzcode_orchestration.md
36
37
  ├── platform_adapters.md
37
38
  ├── environment_context.md
38
39
  ├── user_preferences.md (if configured)
@@ -59,6 +60,20 @@ Use the embedded templates below.
59
60
  - If yes: prompt for testing frameworks, code style, quality priorities
60
61
  - Create `knowzcode/user_preferences.md`
61
62
 
63
+ ### 5.5. Configure orchestration defaults (optional)
64
+
65
+ Ask: "Would you like to configure agent orchestration defaults? (optional — can be changed later in knowzcode/knowzcode_orchestration.md)"
66
+
67
+ If yes: prompt for:
68
+ - Max concurrent builders (1-5, default: 5)
69
+ - Scout mode (full/minimal/none, default: full)
70
+ - Default specialists (checkboxes: security-officer, test-advisor, project-advisor)
71
+ - MCP agents enabled (yes/no, default: yes)
72
+
73
+ If no: generate with all defaults.
74
+
75
+ Generate `knowzcode/knowzcode_orchestration.md` from the template (always — it's part of the standard file set).
76
+
62
77
  ### 6. Create .gitignore
63
78
 
64
79
  Protect environment-specific files from git:
@@ -80,7 +95,7 @@ CHECK for existing files:
80
95
  - AGENTS.md or AGENTS.override.md → offer to generate Codex adapter
81
96
  - GEMINI.md or ~/.gemini/GEMINI.md → offer to generate Gemini adapter
82
97
  - .cursor/rules/ or .cursorrules (deprecated) → offer Cursor adapter (.cursor/rules/knowzcode.mdc)
83
- - .github/copilot-instructions.md → offer Copilot adapter
98
+ - .github/copilot-instructions.md OR .github/ directory → offer Copilot adapter (full prompt files)
84
99
  - .windsurf/rules/ or .windsurfrules (deprecated) → offer Windsurf adapter (.windsurf/rules/knowzcode.md)
85
100
  ```
86
101
 
@@ -119,6 +134,53 @@ After generation, verify each adapter:
119
134
 
120
135
  Adapter templates are in `knowzcode/platform_adapters.md`. Copy the relevant sections into the appropriate files.
121
136
 
137
+ **Step 7e: Copilot-specific generation**
138
+
139
+ When Copilot is selected, generate the full prompt file suite in addition to the instructions file:
140
+
141
+ ```
142
+ 1. Create .github/ directory if it doesn't exist
143
+ 2. Create .github/copilot-instructions.md from platform_adapters.md template Section A
144
+ 3. Create .github/prompts/ directory
145
+ 4. Generate all 9 prompt files from platform_adapters.md template Section B:
146
+ - .github/prompts/kc-work.prompt.md
147
+ - .github/prompts/kc-analyze.prompt.md
148
+ - .github/prompts/kc-specify.prompt.md
149
+ - .github/prompts/kc-implement.prompt.md
150
+ - .github/prompts/kc-audit.prompt.md
151
+ - .github/prompts/kc-finalize.prompt.md
152
+ - .github/prompts/kc-fix.prompt.md
153
+ - .github/prompts/kc-plan.prompt.md
154
+ - .github/prompts/kc-continue.prompt.md
155
+ 5. Replace "vX.Y.Z" in generated files with the current KnowzCode version
156
+ 6. Optionally create .vscode/mcp.json skeleton from template Section C
157
+ (ask user: "Would you like to generate MCP configuration for VS Code?")
158
+ ```
159
+
160
+ **Skip Agent Teams enablement for Copilot** — Copilot uses single-agent sequential execution.
161
+
162
+ **Copilot success message:**
163
+ ```
164
+ GitHub Copilot adapter generated:
165
+ .github/copilot-instructions.md (repository-level instructions)
166
+ .github/prompts/kc-work.prompt.md (start workflow: #prompt:kc-work)
167
+ .github/prompts/kc-analyze.prompt.md
168
+ .github/prompts/kc-specify.prompt.md
169
+ .github/prompts/kc-implement.prompt.md
170
+ .github/prompts/kc-audit.prompt.md
171
+ .github/prompts/kc-finalize.prompt.md
172
+ .github/prompts/kc-fix.prompt.md (quick fix: #prompt:kc-fix)
173
+ .github/prompts/kc-plan.prompt.md (research: #prompt:kc-plan)
174
+ .github/prompts/kc-continue.prompt.md (resume: #prompt:kc-continue)
175
+
176
+ Usage in VS Code:
177
+ #prompt:kc-work "Build user authentication" — Start a feature
178
+ #prompt:kc-fix "Fix login redirect bug" — Quick fix
179
+ #prompt:kc-continue — Resume where you left off
180
+
181
+ See knowzcode/copilot_execution.md for the full execution guide.
182
+ ```
183
+
122
184
  ### 7.5. Enable Agent Teams (Claude Code only)
123
185
 
124
186
  If the user is on Claude Code, **actively offer** to enable Agent Teams:
@@ -192,6 +254,7 @@ Created:
192
254
  knowzcode/knowzcode_log.md
193
255
  knowzcode/knowzcode_architecture.md
194
256
  knowzcode/knowzcode_loop.md
257
+ knowzcode/knowzcode_orchestration.md
195
258
  knowzcode/platform_adapters.md
196
259
  knowzcode/.gitignore
197
260
  knowzcode/specs/
@@ -311,6 +374,58 @@ Next steps:
311
374
  **Test Runner:** [Auto-detected]
312
375
  ```
313
376
 
377
+ ### knowzcode_orchestration.md
378
+ ```markdown
379
+ # KnowzCode Orchestration Configuration
380
+
381
+ **Purpose:** Project-level defaults for team sizing and agent orchestration. Read by `/kc:work` and `/kc:audit` at startup. Per-invocation flags override these settings.
382
+
383
+ ---
384
+
385
+ ## Builder Configuration
386
+
387
+ ```yaml
388
+ max_builders: 5
389
+ ```
390
+
391
+ ---
392
+
393
+ ## Scout Configuration
394
+
395
+ ```yaml
396
+ scout_mode: full
397
+ ```
398
+
399
+ ---
400
+
401
+ ## Specialist Defaults
402
+
403
+ ```yaml
404
+ default_specialists: []
405
+ ```
406
+
407
+ ---
408
+
409
+ ## MCP Agent Configuration
410
+
411
+ ```yaml
412
+ mcp_agents_enabled: true
413
+ ```
414
+
415
+ ---
416
+
417
+ ## Override Precedence
418
+
419
+ | Setting | Config Default | Flag Override |
420
+ |---------|---------------|--------------|
421
+ | max_builders | `max_builders:` | `--max-builders=N` |
422
+ | scout_mode | `scout_mode:` | `--no-scouts` |
423
+ | default_specialists | `default_specialists:` | `--specialists`, `--no-specialists` |
424
+ | mcp_agents_enabled | `mcp_agents_enabled:` | `--no-mcp` |
425
+
426
+ Per-invocation flags always win. `--specialists` adds to defaults; `--no-specialists` clears all.
427
+ ```
428
+
314
429
  ---
315
430
 
316
431
  ## Error Handling
package/commands/plan.md CHANGED
@@ -40,6 +40,16 @@ Attempt `TeamCreate(team_name="kc-plan-{slug}")` (2-4 word kebab-case from topic
40
40
 
41
41
  The user MUST see the execution mode announcement before investigation begins.
42
42
 
43
+ ## Step 3.5: Load Orchestration Config (Optional)
44
+
45
+ If `knowzcode/knowzcode_orchestration.md` exists, parse:
46
+ 1. `SCOUT_MODE` = `scout_mode` value (default: "full")
47
+ 2. `MCP_AGENTS_ENABLED` = `mcp_agents_enabled` value (default: true)
48
+
49
+ Flag overrides: `--no-scouts` → `SCOUT_MODE = "none"`, `--no-mcp` → `MCP_AGENTS_ENABLED = false`
50
+
51
+ If file doesn't exist, use defaults. Other config settings (`max_builders`, `default_specialists`) are not applicable to `/kc:plan`.
52
+
43
53
  ## Step 4: Launch Parallel Investigation
44
54
 
45
55
  ### MCP Probe
@@ -83,15 +93,15 @@ Before spawning agents, determine vault availability:
83
93
 
84
94
  Create tasks first, pre-assign, then spawn with task IDs:
85
95
 
86
- 1. `TaskCreate("Scout: local context for {topic}")` → `TaskUpdate(owner: "context-scout")`
87
- 2. `TaskCreate("Scout: vault knowledge for {topic}")` → `TaskUpdate(owner: "knowz-scout")` (if `VAULTS_CONFIGURED = true`)
96
+ 1. If `SCOUT_MODE != "none"`: `TaskCreate("Scout: local context for {topic}")` → `TaskUpdate(owner: "context-scout")`
97
+ 2. `TaskCreate("Scout: vault knowledge for {topic}")` → `TaskUpdate(owner: "knowz-scout")` (if `VAULTS_CONFIGURED = true` AND `MCP_AGENTS_ENABLED = true`)
88
98
  3. `TaskCreate("Research: code exploration")` → `TaskUpdate(owner: "analyst")`
89
99
  4. `TaskCreate("Research: architecture")` → `TaskUpdate(owner: "architect")`
90
100
  5. `TaskCreate("Research: security + quality")` → `TaskUpdate(owner: "reviewer")`
91
101
 
92
- Spawn up to five teammates with their task IDs:
102
+ Spawn teammates with their task IDs (count depends on SCOUT_MODE and MCP settings):
93
103
 
94
- 1. Spawn `context-scout` teammate:
104
+ 1. If `SCOUT_MODE != "none"`, spawn `context-scout` teammate:
95
105
  > **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
96
106
  > You are researching "{topic}" from a **knowzcode history** angle.
97
107
  > Read `agents/context-scout.md` for your role definition.
@@ -99,7 +109,7 @@ Spawn up to five teammates with their task IDs:
99
109
  > Find: existing specs, prior WorkGroups, tracker entries relevant to this topic.
100
110
  > Broadcast findings to all teammates.
101
111
 
102
- 2. If `VAULTS_CONFIGURED = true`, spawn `knowz-scout` teammate:
112
+ 2. If `VAULTS_CONFIGURED = true` AND `MCP_AGENTS_ENABLED = true`, spawn `knowz-scout` teammate:
103
113
  > **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
104
114
  > You are researching "{topic}" from a **vault knowledge** angle.
105
115
  > Read `agents/knowz-scout.md` for your role definition.
@@ -138,12 +148,15 @@ Wait for all to complete, then synthesize in Step 5.
138
148
 
139
149
  Delegate to up to five agents in parallel via `Task()`:
140
150
 
141
- 1. **context-scout** — Local context (3 parallel instances):
142
- - `Task(subagent_type="context-scout", name="context-scout-specs", description="Scout: specs context", prompt="Research \"{topic}\". Focus: knowzcode/specs/*.md — scan existing specifications for relevant NodeIDs, status, VERIFY criteria. Max 10 tool calls. Write findings to a concise summary.")`
143
- - `Task(subagent_type="context-scout", name="context-scout-workgroups", description="Scout: workgroups context", prompt="Research \"{topic}\". Focus: knowzcode/workgroups/*.md — scan previous WorkGroups for similar goals, what was tried, what succeeded/failed. Max 10 tool calls. Write findings to a concise summary.")`
144
- - `Task(subagent_type="context-scout", name="context-scout-backlog", description="Scout: backlog context", prompt="Research \"{topic}\". Focus: knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md, knowzcode/knowzcode_project.md scan for active WIP, REFACTOR tasks, architecture summary, recent log patterns. Max 10 tool calls. Write findings to a concise summary.")`
151
+ 1. **context-scout** — Local context (if `SCOUT_MODE != "none"`):
152
+ - `SCOUT_MODE = "full"` (default): 3 parallel instances:
153
+ - `Task(subagent_type="context-scout", name="context-scout-specs", description="Scout: specs context", prompt="Research \"{topic}\". Focus: knowzcode/specs/*.md — scan existing specifications for relevant NodeIDs, status, VERIFY criteria. Max 10 tool calls. Write findings to a concise summary.")`
154
+ - `Task(subagent_type="context-scout", name="context-scout-workgroups", description="Scout: workgroups context", prompt="Research \"{topic}\". Focus: knowzcode/workgroups/*.md scan previous WorkGroups for similar goals, what was tried, what succeeded/failed. Max 10 tool calls. Write findings to a concise summary.")`
155
+ - `Task(subagent_type="context-scout", name="context-scout-backlog", description="Scout: backlog context", prompt="Research \"{topic}\". Focus: knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md, knowzcode/knowzcode_project.md — scan for active WIP, REFACTOR tasks, architecture summary, recent log patterns. Max 10 tool calls. Write findings to a concise summary.")`
156
+ - `SCOUT_MODE = "minimal"`: 1 combined instance:
157
+ - `Task(subagent_type="context-scout", name="context-scout", description="Scout: combined context", prompt="Research \"{topic}\". Focus: ALL local context — knowzcode/specs/*.md, knowzcode/workgroups/*.md, knowzcode/knowzcode_tracker.md, knowzcode/knowzcode_log.md, knowzcode/knowzcode_architecture.md, knowzcode/knowzcode_project.md. Max 10 tool calls. Write findings to a concise summary.")`
145
158
 
146
- 2. **knowz-scout** — MCP knowledge (if `VAULTS_CONFIGURED = true`):
159
+ 2. **knowz-scout** — MCP knowledge (if `VAULTS_CONFIGURED = true` AND `MCP_AGENTS_ENABLED = true`):
147
160
  - `Task(subagent_type="knowz-scout", description="Scout: vault knowledge", prompt="Research \"{topic}\". Read knowzcode/knowzcode_vaults.md to discover configured vaults. Query each for relevant knowledge: team conventions, past decisions, similar implementations. Max 10 tool calls. Write findings to a concise summary.")`
148
161
 
149
162
  3. **analyst** — Code exploration: