knowzcode 0.2.1 → 0.3.3
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/.claude-plugin/marketplace.json +6 -3
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +43 -5
- package/agents/analyst.md +31 -0
- package/agents/architect.md +93 -5
- package/agents/context-scout.md +1 -1
- package/agents/project-advisor.md +110 -0
- package/agents/security-officer.md +194 -0
- package/agents/test-advisor.md +162 -0
- package/commands/audit.md +101 -12
- package/commands/connect-mcp.md +24 -0
- package/commands/init.md +116 -1
- package/commands/plan.md +23 -10
- package/commands/work.md +363 -58
- package/knowzcode/claude_code_execution.md +91 -10
- package/knowzcode/copilot_execution.md +231 -0
- package/knowzcode/enterprise/compliance_manifest.md +3 -0
- package/knowzcode/knowzcode_loop.md +3 -1
- package/knowzcode/knowzcode_orchestration.md +66 -0
- package/knowzcode/platform_adapters.md +621 -27
- package/package.json +1 -1
- package/skills/alias-resolver.json +1 -1
- package/skills/architecture-diff.json +1 -1
- package/skills/check-installation-status.json +1 -1
- package/skills/continue.md +2 -1
- package/skills/environment-guard.json +1 -1
- package/skills/generate-workgroup-id.json +1 -1
- package/skills/install-knowzcode.json +1 -1
- package/skills/load-core-context.json +1 -1
- package/skills/log-entry-builder.json +1 -1
- package/skills/spec-quality-check.json +1 -1
- package/skills/spec-template.json +1 -1
- package/skills/spec-validator.json +1 -1
- package/skills/tracker-scan.json +1 -1
- package/skills/tracker-update.json +1 -1
- package/skills/validate-installation.json +1 -1
|
@@ -146,7 +146,8 @@ Use mailbox messaging for coordination between teammates:
|
|
|
146
146
|
| From | To | When |
|
|
147
147
|
|------|-----|------|
|
|
148
148
|
| scout | all | Initial context/vault findings (broadcast) |
|
|
149
|
-
|
|
|
149
|
+
| scanner | all | Codebase scan findings — affected files, test patterns (broadcast) |
|
|
150
|
+
| analyst | architect | `[PRELIMINARY]` NodeID findings during Stage 0 (max 3 DMs), scope clarifications, NodeID overlap with existing specs |
|
|
150
151
|
| architect | analyst | Scope adjustments needed |
|
|
151
152
|
| architect | builder | Design guidance and spec intent responses |
|
|
152
153
|
| builder | analyst | Affected files and dependency questions |
|
|
@@ -159,6 +160,16 @@ Use mailbox messaging for coordination between teammates:
|
|
|
159
160
|
| closer | knowz-scribe | Phase 3 learning capture (`"Capture Phase 3: {wgid}"`) |
|
|
160
161
|
| closer | analyst | Change scope for log entry accuracy |
|
|
161
162
|
| closer | architect | Spec format and legacy migration |
|
|
163
|
+
| security-officer | lead | Structured finding reports at gates (with `[SECURITY-BLOCK]` for CRITICAL/HIGH) |
|
|
164
|
+
| security-officer | architect | Security VERIFY criteria needs during Phase 1B |
|
|
165
|
+
| security-officer | builder | Security guidance for sensitive partitions (max 2 DMs per builder) |
|
|
166
|
+
| security-officer | test-advisor | Cross-cutting: test gaps in security-critical paths (max 2 inter-specialist DMs) |
|
|
167
|
+
| test-advisor | lead | Test quality reports at gates |
|
|
168
|
+
| test-advisor | architect | VERIFY criteria testability concerns during Phase 1B |
|
|
169
|
+
| test-advisor | builder | Specific test improvement feedback (max 2 DMs per builder) |
|
|
170
|
+
| test-advisor | security-officer | Cross-cutting: security scenarios needing test coverage (max 2 inter-specialist DMs) |
|
|
171
|
+
| project-advisor | lead | Backlog context (Stage 0) and proposals (late Stage 2) |
|
|
172
|
+
| project-advisor | knowz-scribe | Idea captures for vault storage |
|
|
162
173
|
|
|
163
174
|
### Gap Communication Flow
|
|
164
175
|
In Parallel Teams mode, gap communication goes through the lead:
|
|
@@ -207,12 +218,18 @@ Agents must NOT create new tasks for work already assigned to them via task ID.
|
|
|
207
218
|
| context-scout-specs | Stage 0 | After Gate #2 | Spec context lookups |
|
|
208
219
|
| context-scout-workgroups | Stage 0 | After Gate #2 | WorkGroup history lookups |
|
|
209
220
|
| context-scout-backlog | Stage 0 | After Gate #2 | Tracker/log/architecture lookups |
|
|
221
|
+
| scanner-direct | Stage 0 (conditional) | After Stage 1 (analyst done) | Source code scanning — broadcasts affected files and code paths |
|
|
222
|
+
| scanner-tests | Stage 0 (conditional) | After Stage 1 (analyst done) | Test discovery — broadcasts test patterns and coverage shape |
|
|
210
223
|
| knowz-scout | Stage 0 | After Phase 3 capture | Vault queries (read-only) throughout workflow |
|
|
211
224
|
| knowz-scribe | Stage 0 | After Phase 3 capture | Vault writes — receives capture messages, handles all `create_knowledge` calls |
|
|
212
225
|
| analyst | Stage 0 | Early Stage 2 | Scope questions from builders |
|
|
213
|
-
| architect | Stage 0 (pre-load) | After Gate #3 |
|
|
226
|
+
| architect | Stage 0 (pre-load + speculative research) | After Gate #3 | Pre-load → speculative research on `[PRELIMINARY]` NodeIDs → spec drafting (+ parallel coordination for 3+ NodeIDs) → design guidance for builders |
|
|
227
|
+
| spec-drafter(s) | Stage 1 (Path B, 3+ NodeIDs) | After architect consistency review | Draft specs for assigned NodeID partition |
|
|
214
228
|
| builder(s) | Stage 2 | After Gate #3 | Implementation + gap fixes (persistent through gap loop) |
|
|
215
229
|
| reviewer(s) | Stage 2 (1 per builder partition) | After Gate #3 | Incremental audit per partition (persistent through gap loop) |
|
|
230
|
+
| security-officer | Stage 0 (Group C) | After Gate #3 | Threat modeling + vulnerability scanning (officer — can block gates) |
|
|
231
|
+
| test-advisor | Stage 0 (Group C) | After Gate #3 | TDD enforcement + test quality review (advisor — informational) |
|
|
232
|
+
| project-advisor | Stage 0 (Group C) | Mid-Stage 2 | Backlog curation + idea capture (advisor — informational) |
|
|
216
233
|
| closer | Stage 3 | End of workflow | Finalization |
|
|
217
234
|
|
|
218
235
|
### Task Dependency Usage
|
|
@@ -224,16 +241,31 @@ All tasks in a workflow use `addBlockedBy` to express the dependency chain:
|
|
|
224
241
|
|
|
225
242
|
### Task Graph Patterns
|
|
226
243
|
|
|
227
|
-
- Stage 0 tasks: scout + knowz-scribe + analysis tasks (no deps)
|
|
228
|
-
- Stage 1 tasks: spec drafting tasks (blocked by gate approval — lead creates after gate)
|
|
244
|
+
- Stage 0 tasks: scout + scanner + knowz-scribe + analysis tasks (no deps)
|
|
245
|
+
- Stage 1 tasks: spec drafting tasks (blocked by gate approval — lead creates after gate). Path B (3+ NodeIDs): spec-drafter tasks + architect consistency review task
|
|
229
246
|
- Stage 2 tasks: implementation subtasks (blocked by spec approval), audit subtasks (blocked by implementation)
|
|
230
247
|
- Stage 3 tasks: finalization (blocked by audit approval)
|
|
231
248
|
|
|
249
|
+
### Orchestration Configuration
|
|
250
|
+
|
|
251
|
+
Team sizing defaults are configurable via `knowzcode/knowzcode_orchestration.md`:
|
|
252
|
+
|
|
253
|
+
| Parameter | Default | Flag Override | Effect |
|
|
254
|
+
|-----------|---------|--------------|--------|
|
|
255
|
+
| `max_builders` | 5 | `--max-builders=N` | Cap concurrent builders (1-5) |
|
|
256
|
+
| `scout_mode` | full | `--no-scouts` | full (3 scouts), minimal (1 scout), none (lead reads context) |
|
|
257
|
+
| `default_specialists` | [] | `--specialists`, `--no-specialists` | Project-level specialist defaults |
|
|
258
|
+
| `mcp_agents_enabled` | true | `--no-mcp` | Toggle vault agents (knowz-scout, knowz-scribe) |
|
|
259
|
+
| `codebase_scanner_enabled` | true | `--no-scanners` | Toggle codebase scanner agents (scanner-direct, scanner-tests) |
|
|
260
|
+
| `parallel_spec_threshold` | 3 | `--no-parallel-specs` | NodeID count threshold for parallel spec drafting (Path B) |
|
|
261
|
+
|
|
262
|
+
Precedence: hardcoded defaults → orchestration config → per-invocation flags.
|
|
263
|
+
|
|
232
264
|
### Builder Partitioning Rules
|
|
233
265
|
|
|
234
266
|
- No two builders touch the same file
|
|
235
267
|
- Analyst dependency map determines partitions
|
|
236
|
-
- Max
|
|
268
|
+
- Max `MAX_BUILDERS` concurrent builders (default 5, configurable in `knowzcode_orchestration.md`)
|
|
237
269
|
- If all NodeIDs share files → single builder with subtask tracking
|
|
238
270
|
- Builder-to-builder messages for interface changes affecting other partitions
|
|
239
271
|
|
|
@@ -258,11 +290,60 @@ During Stage 2, the architect persists as a read-only consultative resource:
|
|
|
258
290
|
- Lead notifies architect when builders are spawned — architect sends intro message to each builder
|
|
259
291
|
- Shut down with builders and reviewers after Gate #3
|
|
260
292
|
|
|
261
|
-
#### Discovery Pre-loading
|
|
262
|
-
During Stage 0, the architect pre-loads context in parallel with analysis:
|
|
263
|
-
- Architect reads architecture docs, existing specs, project config
|
|
264
|
-
-
|
|
265
|
-
-
|
|
293
|
+
#### Discovery Pre-loading + Speculative Research
|
|
294
|
+
During Stage 0, the architect pre-loads context and conducts speculative research in parallel with analysis:
|
|
295
|
+
- **Pre-load phase**: Architect reads architecture docs, existing specs, project config (3-5 turns)
|
|
296
|
+
- **Speculative research phase**: After pre-load, architect receives `[PRELIMINARY]` NodeID messages from the analyst (max 3). For each, it reads affected files, checks spec consolidation, and analyzes interface patterns — all read-only, no spec writing
|
|
297
|
+
- When Gate #1 is approved, architect already has context + deep research on flagged NodeIDs → specs drafted ~80% faster
|
|
298
|
+
- If Gate #1 rejected, architect context and research are still useful for the revised analysis cycle
|
|
299
|
+
- If no `[PRELIMINARY]` messages arrive (simple 1-NodeID change), architect finishes standard pre-load and waits
|
|
300
|
+
|
|
301
|
+
#### Parallel Spec Drafting (Path B — 3+ NodeIDs)
|
|
302
|
+
When the approved Change Set contains 3+ NodeIDs (configurable via `PARALLEL_SPEC_THRESHOLD`), spec drafting is parallelized:
|
|
303
|
+
- Architect proposes NodeID partitions (1-2 per partition, max 3 partitions)
|
|
304
|
+
- Lead spawns spec-drafter agents (using `architect` agent definition) for each partition
|
|
305
|
+
- Each drafter receives: its NodeIDs, architect's speculative research findings, cross-NodeID constraints
|
|
306
|
+
- After all drafters complete, architect runs a consistency review: cross-spec alignment, naming, VERIFY coverage
|
|
307
|
+
- Spec-drafters shut down after consistency review, before Gate #2
|
|
308
|
+
- For 1-2 NodeIDs (Path A), architect drafts all specs alone (current behavior, zero overhead)
|
|
309
|
+
|
|
310
|
+
#### Specialist Agents (Group C — opt-in via `--specialists`)
|
|
311
|
+
|
|
312
|
+
When specialists are enabled, three additional agents spawn at Stage 0 alongside Groups A and B:
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
Group A (always): 3 context-scouts + analyst + architect (5 agents)
|
|
316
|
+
Group A (if scanners): + scanner-direct + scanner-tests (+2 agents)
|
|
317
|
+
Group B (if MCP): knowz-scout + knowz-scribe (2 agents)
|
|
318
|
+
Group C (if --specialists): security-officer + test-advisor + project-advisor (3 agents)
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Max Stage 0 concurrent: 5-12 agents depending on orchestration config (scouts, scanners, MCP agents, specialists). Scouts shut down after Gate #2, scanners shut down after Stage 1, so Stage 2 peak is manageable.
|
|
322
|
+
|
|
323
|
+
##### Officer vs Advisor Authority
|
|
324
|
+
|
|
325
|
+
| Role | Authority | Gate Impact |
|
|
326
|
+
|------|-----------|-------------|
|
|
327
|
+
| **Officer** (security-officer) | CRITICAL/HIGH findings block gates | `[SECURITY-BLOCK]` tag pauses autonomous mode |
|
|
328
|
+
| **Advisor** (test-advisor, project-advisor) | Informational only | Findings included in gate reports, do not block |
|
|
329
|
+
|
|
330
|
+
##### Direct DM Protocol
|
|
331
|
+
|
|
332
|
+
Specialists communicate directly with builders, architect, and each other — no lead bottleneck relay:
|
|
333
|
+
|
|
334
|
+
- **security-officer → architect**: Security VERIFY criteria needs during Phase 1B
|
|
335
|
+
- **security-officer → builder-N**: Security guidance for sensitive partitions (max 2 DMs per builder)
|
|
336
|
+
- **test-advisor → architect**: VERIFY criteria testability concerns during Phase 1B
|
|
337
|
+
- **test-advisor → builder-N**: Specific test improvement feedback (max 2 DMs per builder)
|
|
338
|
+
- **project-advisor → knowz-scribe**: Idea captures for vault storage
|
|
339
|
+
- **security-officer ↔ test-advisor**: Cross-cutting test gaps in security paths (max 2 inter-specialist DMs total)
|
|
340
|
+
|
|
341
|
+
##### Communication Discipline
|
|
342
|
+
|
|
343
|
+
- Max 2 DMs to any individual builder from each specialist
|
|
344
|
+
- Max 2 inter-specialist DMs per workflow
|
|
345
|
+
- Consolidate findings — no per-file noise
|
|
346
|
+
- project-advisor does NOT DM builders or other specialists (observes via task list only)
|
|
266
347
|
|
|
267
348
|
---
|
|
268
349
|
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Copilot Execution Model
|
|
2
|
+
|
|
3
|
+
**Purpose:** Defines the execution model for GitHub Copilot users. Copilot operates as a single-agent, sequential platform — users manually transition between phases using prompt files.
|
|
4
|
+
|
|
5
|
+
Agents on other platforms should ignore this file — see `knowzcode/platform_adapters.md` for platform-specific instructions, or `knowzcode/claude_code_execution.md` for Claude Code Agent Teams.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Execution Model Overview
|
|
10
|
+
|
|
11
|
+
Copilot uses a **single-agent, user-driven** execution model:
|
|
12
|
+
|
|
13
|
+
- One AI assistant handles all phases sequentially
|
|
14
|
+
- The user invokes each phase via `#prompt:kc-*` prompt files in VS Code
|
|
15
|
+
- Quality gates are enforced by STOP instructions — the AI pauses and waits for user direction
|
|
16
|
+
- Context carries between phases via WorkGroup files in `knowzcode/workgroups/`
|
|
17
|
+
- No multi-agent orchestration, no inter-agent messaging, no task dependency tracking
|
|
18
|
+
|
|
19
|
+
This is equivalent to the "Sequential Execution Protocol" described in `knowzcode/knowzcode_loop.md` Section 8.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Prompt File Workflow
|
|
24
|
+
|
|
25
|
+
### Phase Sequence
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
#prompt:kc-work "goal"
|
|
29
|
+
→ Creates WorkGroup, classifies tier, Phase 1A analysis, proposes Change Set
|
|
30
|
+
→ STOP — await user approval
|
|
31
|
+
|
|
32
|
+
#prompt:kc-specify
|
|
33
|
+
→ Reads WorkGroup, drafts specs for approved Change Set
|
|
34
|
+
→ STOP — await user approval, then commits specs
|
|
35
|
+
|
|
36
|
+
#prompt:kc-implement
|
|
37
|
+
→ Reads WorkGroup + specs, TDD Red-Green-Refactor
|
|
38
|
+
→ STOP — report implementation results
|
|
39
|
+
|
|
40
|
+
#prompt:kc-audit
|
|
41
|
+
→ READ-ONLY audit against VERIFY statements
|
|
42
|
+
→ STOP — report gaps, await user decision
|
|
43
|
+
|
|
44
|
+
#prompt:kc-finalize
|
|
45
|
+
→ Updates specs to as-built, tracker, log, architecture check, commits
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Shortcut Workflows
|
|
49
|
+
|
|
50
|
+
| Prompt | Use Case |
|
|
51
|
+
|--------|----------|
|
|
52
|
+
| `#prompt:kc-fix "description"` | Single-file, <50 line fixes — skip the full loop |
|
|
53
|
+
| `#prompt:kc-plan "topic"` | Research and investigation before implementing |
|
|
54
|
+
| `#prompt:kc-continue` | Resume interrupted work or advance to next phase |
|
|
55
|
+
| `#prompt:kc-analyze` | Re-run Phase 1A on an existing WorkGroup |
|
|
56
|
+
|
|
57
|
+
### Prompt File Location
|
|
58
|
+
|
|
59
|
+
All prompt files live in `.github/prompts/` and are generated by `/kc:init` (or `npx knowzcode`). They use YAML frontmatter with `agent: "agent"` for file editing capability.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## VS Code Agent Mode
|
|
64
|
+
|
|
65
|
+
Copilot prompt files with `agent: "agent"` in their frontmatter enable agent mode, which allows:
|
|
66
|
+
|
|
67
|
+
- File creation and editing
|
|
68
|
+
- Terminal command execution (tests, builds, linting)
|
|
69
|
+
- Multi-file changes in a single session
|
|
70
|
+
|
|
71
|
+
All KnowzCode prompt files use `agent: "agent"` for TDD implementation, spec writing, and WorkGroup file updates.
|
|
72
|
+
|
|
73
|
+
### Using Prompt Files
|
|
74
|
+
|
|
75
|
+
In VS Code Copilot Chat:
|
|
76
|
+
1. Type `#prompt:kc-work` to invoke the workflow prompt
|
|
77
|
+
2. Add your goal as the chat message: `#prompt:kc-work "Build JWT authentication"`
|
|
78
|
+
3. Copilot loads the prompt file, pulls in `#file:` referenced context, and executes
|
|
79
|
+
|
|
80
|
+
### Adding Extra Context
|
|
81
|
+
|
|
82
|
+
You can add files to the prompt context manually:
|
|
83
|
+
- Reference files in chat: `#file:src/auth/login.ts`
|
|
84
|
+
- The prompt files already include `#file:` references for core KnowzCode files
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Copilot CLI Usage
|
|
89
|
+
|
|
90
|
+
The Copilot CLI does not support `#prompt:` syntax. Check the current CLI documentation for the exact file reference syntax — it may differ from VS Code's `#file:` references.
|
|
91
|
+
|
|
92
|
+
Alternatively, paste the goal and reference the methodology directly in the CLI prompt. The CLI provides the same AI capabilities but without the `#prompt:` shorthand.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Copilot Coding Agent Integration
|
|
97
|
+
|
|
98
|
+
The GitHub Copilot Coding Agent (cloud-based, triggered from GitHub Issues) follows `copilot-instructions.md` automatically when working on repository issues.
|
|
99
|
+
|
|
100
|
+
### Behavior
|
|
101
|
+
|
|
102
|
+
When the Coding Agent picks up an issue:
|
|
103
|
+
1. Reads `.github/copilot-instructions.md` for methodology
|
|
104
|
+
2. Follows Phase 1A→3 workflow for non-trivial changes
|
|
105
|
+
3. Includes the Change Set in the PR description
|
|
106
|
+
4. Uses TDD — failing test before implementation code
|
|
107
|
+
5. Self-audits against spec VERIFY statements
|
|
108
|
+
|
|
109
|
+
### Key Differences from Interactive Use
|
|
110
|
+
|
|
111
|
+
| Aspect | Interactive (VS Code) | Coding Agent (GitHub) |
|
|
112
|
+
|--------|----------------------|----------------------|
|
|
113
|
+
| Phase transitions | User invokes each `#prompt:kc-*` | Agent runs all phases autonomously |
|
|
114
|
+
| Quality gates | STOP and wait for user | Deferred to PR review |
|
|
115
|
+
| Prompt files | Used via `#prompt:` | Not used — follows `copilot-instructions.md` |
|
|
116
|
+
| Approval | Interactive at each gate | PR reviewers approve |
|
|
117
|
+
|
|
118
|
+
### PR Description Format
|
|
119
|
+
|
|
120
|
+
The Coding Agent should structure PR descriptions to reflect the KnowzCode workflow:
|
|
121
|
+
|
|
122
|
+
```markdown
|
|
123
|
+
## Change Set
|
|
124
|
+
- NodeID: Description
|
|
125
|
+
- Affected files: list
|
|
126
|
+
|
|
127
|
+
## Specs
|
|
128
|
+
- Link to spec files created/updated
|
|
129
|
+
|
|
130
|
+
## Verification
|
|
131
|
+
- Test results summary
|
|
132
|
+
- Self-audit completion percentage
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## MCP Configuration for VS Code
|
|
138
|
+
|
|
139
|
+
To enable vault access in Copilot, configure `.vscode/mcp.json`:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"servers": {
|
|
144
|
+
"knowzcode": {
|
|
145
|
+
"type": "http",
|
|
146
|
+
"url": "${input:knowzcode_mcp_url}",
|
|
147
|
+
"headers": {
|
|
148
|
+
"x-api-key": "${input:knowzcode_api_key}"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"inputs": [
|
|
153
|
+
{
|
|
154
|
+
"id": "knowzcode_mcp_url",
|
|
155
|
+
"description": "KnowzCode MCP server URL",
|
|
156
|
+
"type": "promptString"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "knowzcode_api_key",
|
|
160
|
+
"description": "KnowzCode API key",
|
|
161
|
+
"type": "promptString",
|
|
162
|
+
"password": true
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
MCP provides `search_knowledge`, `ask_question`, and `create_knowledge` tools for vault access. All prompt files work without MCP — it enhances context but never blocks.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Model Selection Guidance
|
|
173
|
+
|
|
174
|
+
| Phase | Recommended Model | Rationale |
|
|
175
|
+
|-------|------------------|-----------|
|
|
176
|
+
| 1A: Analysis | Claude Opus / GPT-4o | Complex reasoning about impact and scope |
|
|
177
|
+
| 1B: Specification | Claude Opus / GPT-4o | Structured spec drafting requires depth |
|
|
178
|
+
| 2A: Implementation | Any capable model | Code generation — Sonnet/GPT-4o sufficient |
|
|
179
|
+
| 2B: Audit | Claude Opus / GPT-4o | Critical evaluation requires strong reasoning |
|
|
180
|
+
| 3: Finalization | Any capable model | Mostly doc updates and formatting |
|
|
181
|
+
| Quick fix | Any model | Simple, scoped changes |
|
|
182
|
+
|
|
183
|
+
VS Code allows model selection per chat session. For complex features, prefer stronger models for analysis and audit phases.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Limitations and Workarounds
|
|
188
|
+
|
|
189
|
+
| Limitation | Impact | Workaround |
|
|
190
|
+
|-----------|--------|------------|
|
|
191
|
+
| No multi-agent orchestration | Cannot run parallel analysis/implementation | Sequential phase execution via prompt files |
|
|
192
|
+
| No inter-agent messaging | No scout/scribe delegation | Single agent reads all context directly |
|
|
193
|
+
| No task dependency tracking | No automated phase progression | User manually invokes next prompt |
|
|
194
|
+
| No persistent agents | Context reloaded each prompt invocation | WorkGroup files carry state between invocations |
|
|
195
|
+
| No dynamic agent spawning | Cannot create specialized agents at runtime | Prompt files encode all phase specialization |
|
|
196
|
+
| CLI lacks `#prompt:` support | Cannot use prompt shorthand in CLI | Check CLI docs for file reference syntax, or paste prompt content |
|
|
197
|
+
|
|
198
|
+
### What Works Well
|
|
199
|
+
|
|
200
|
+
- Agent mode provides full file editing and terminal access
|
|
201
|
+
- `#file:` references efficiently pull in methodology and context
|
|
202
|
+
- WorkGroup files maintain state across sessions
|
|
203
|
+
- Copilot Coding Agent follows `copilot-instructions.md` for autonomous issue resolution
|
|
204
|
+
- MCP tools integrate natively via `.vscode/mcp.json`
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Continue / Resume Workflow
|
|
209
|
+
|
|
210
|
+
When a user invokes `#prompt:kc-continue`:
|
|
211
|
+
|
|
212
|
+
1. **Find active WorkGroup**: Read `knowzcode/knowzcode_tracker.md` for `[WIP]` entries
|
|
213
|
+
2. **Determine current phase**: Read the WorkGroup file's Phase History table
|
|
214
|
+
3. **Resume or advance**:
|
|
215
|
+
- If mid-phase (incomplete todos): Resume the current phase
|
|
216
|
+
- If at a quality gate (phase complete, awaiting approval): Present results and await decision
|
|
217
|
+
- If between phases (approved, next not started): Begin the next phase
|
|
218
|
+
4. **Guide user**: Tell the user which `#prompt:kc-*` to invoke next, or proceed directly if the continue prompt can handle it
|
|
219
|
+
|
|
220
|
+
### Phase Detection Logic
|
|
221
|
+
|
|
222
|
+
| WorkGroup State | Action |
|
|
223
|
+
|----------------|--------|
|
|
224
|
+
| Phase 1A complete, no approval recorded | Present Change Set for approval |
|
|
225
|
+
| Phase 1A approved, no specs drafted | Advise: `#prompt:kc-specify` |
|
|
226
|
+
| Phase 1B complete, no approval recorded | Present specs for approval |
|
|
227
|
+
| Phase 1B approved, no implementation started | Advise: `#prompt:kc-implement` |
|
|
228
|
+
| Phase 2A complete | Advise: `#prompt:kc-audit` |
|
|
229
|
+
| Phase 2B complete, gaps found | Advise: fix gaps then `#prompt:kc-implement`, or `#prompt:kc-finalize` to accept |
|
|
230
|
+
| Phase 2B complete, no gaps | Advise: `#prompt:kc-finalize` |
|
|
231
|
+
| No active WorkGroup | Inform user, suggest `#prompt:kc-work` |
|
|
@@ -112,6 +112,9 @@ When `mcp_compliance_enabled: true`:
|
|
|
112
112
|
| analyst | create_knowledge | After 1A approval | Scope decisions, risk assessment |
|
|
113
113
|
| reviewer | create_knowledge | After 2B audit | Audit findings, security posture |
|
|
114
114
|
| closer | create_knowledge | After Phase 3 | Completion record, architecture changes |
|
|
115
|
+
| security-officer | search_knowledge | Stage 0, Stage 2 | Organization security standards, past security findings |
|
|
116
|
+
| test-advisor | (read-only) | Stage 2 | Enterprise ARC criteria for test coverage check |
|
|
117
|
+
| project-advisor | (read-only) | Stage 0 | Compliance config gaps for backlog proposals |
|
|
115
118
|
|
|
116
119
|
---
|
|
117
120
|
|
|
@@ -446,7 +446,9 @@ Both broadcast findings to inform analyst and architect work.
|
|
|
446
446
|
|
|
447
447
|
### Sequential Execution Protocol (for platforms without orchestration)
|
|
448
448
|
|
|
449
|
-
For platforms like Cursor, Copilot, or Windsurf where there is no agent orchestration
|
|
449
|
+
For platforms like Cursor, Copilot, or Windsurf where there is no agent orchestration.
|
|
450
|
+
|
|
451
|
+
**Copilot users:** Instead of manually reading phase prompts, use `#prompt:kc-*` prompt files in VS Code Copilot Chat (e.g., `#prompt:kc-work`, `#prompt:kc-specify`). These prompt files encode the sequential protocol below with `#file:` references for context. See `knowzcode/copilot_execution.md` for the full Copilot execution guide.
|
|
450
452
|
|
|
451
453
|
```
|
|
452
454
|
FOR each phase in [1A, 1B, 2A, 2B, 3]:
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# KnowzCode Orchestration Configuration
|
|
2
|
+
|
|
3
|
+
**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.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Builder Configuration
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
# Maximum concurrent builders in Parallel Teams mode (default: 5, range: 1-5)
|
|
11
|
+
# Lower values reduce token usage and complexity; higher values increase parallelism.
|
|
12
|
+
# If the dependency map produces fewer partitions, fewer builders spawn regardless.
|
|
13
|
+
max_builders: 5
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Scout Configuration
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
# Scout mode controls context-scout spawning at Stage 0 (default: full)
|
|
22
|
+
# full — 3 scouts: specs, workgroups, backlog (default)
|
|
23
|
+
# minimal — 1 scout: combined scan of all local context
|
|
24
|
+
# none — skip scouts entirely (lead loads context inline)
|
|
25
|
+
scout_mode: full
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Specialist Defaults
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
# Specialists enabled by default for this project (default: none)
|
|
34
|
+
# These activate without needing --specialists on every invocation.
|
|
35
|
+
# Per-invocation --no-specialists overrides this setting.
|
|
36
|
+
# Values: security-officer, test-advisor, project-advisor
|
|
37
|
+
default_specialists: []
|
|
38
|
+
|
|
39
|
+
# Examples:
|
|
40
|
+
# default_specialists: [security-officer]
|
|
41
|
+
# default_specialists: [security-officer, test-advisor]
|
|
42
|
+
# default_specialists: [security-officer, test-advisor, project-advisor]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## MCP Agent Configuration
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
# Enable MCP agents (knowz-scout, knowz-scribe) when vaults are configured (default: true)
|
|
51
|
+
# Set to false to skip vault agents even when vaults exist — reduces agent count.
|
|
52
|
+
mcp_agents_enabled: true
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Override Precedence
|
|
58
|
+
|
|
59
|
+
| Setting | Config Default | Flag Override |
|
|
60
|
+
|---------|---------------|--------------|
|
|
61
|
+
| max_builders | `max_builders:` | `--max-builders=N` |
|
|
62
|
+
| scout_mode | `scout_mode:` | `--no-scouts` |
|
|
63
|
+
| default_specialists | `default_specialists:` | `--specialists`, `--no-specialists` |
|
|
64
|
+
| mcp_agents_enabled | `mcp_agents_enabled:` | `--no-mcp` |
|
|
65
|
+
|
|
66
|
+
Per-invocation flags always win. `--specialists` adds to defaults; `--no-specialists` clears all.
|