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
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official KnowzCode plugin marketplace - Platform-agnostic AI development methodology",
9
- "version": "0.1.0"
9
+ "version": "0.2.1"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "kc",
14
14
  "source": "./",
15
15
  "description": "KnowzCode - Platform-agnostic AI development methodology with TDD, quality gates, and structured workflows",
16
- "version": "0.1.0",
16
+ "version": "0.2.1",
17
17
  "author": {
18
18
  "name": "Alex Headscarf"
19
19
  },
@@ -42,9 +42,12 @@
42
42
  "./agents/builder.md",
43
43
  "./agents/reviewer.md",
44
44
  "./agents/closer.md",
45
+ "./agents/context-scout.md",
46
+ "./agents/knowz-scout.md",
45
47
  "./agents/microfix-specialist.md",
46
48
  "./agents/knowledge-migrator.md",
47
- "./agents/update-coordinator.md"
49
+ "./agents/update-coordinator.md",
50
+ "./agents/knowz-scribe.md"
48
51
  ],
49
52
  "skills": [
50
53
  "./skills/start-work.md",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kc",
3
3
  "description": "KnowzCode - Platform-agnostic AI development methodology with TDD, quality gates, and structured workflows",
4
- "version": "0.1.0",
4
+ "version": "0.2.1",
5
5
  "author": {
6
6
  "name": "Alex Headscarf"
7
7
  }
package/README.md CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- **Turn any AI coding assistant into a disciplined software engineer.**
5
+ **A structured development methodology for AI coding assistants.**
6
6
 
7
7
  [![License: MIT + Commons Clause](https://img.shields.io/badge/License-MIT_+_Commons_Clause-yellow.svg)](LICENSE)
8
8
  [![Claude Code Plugin](https://img.shields.io/badge/Claude_Code-Plugin-purple)](https://github.com/knowz-io/knowzcode)
9
- [![Version](https://img.shields.io/badge/version-1.0.0-blue)](https://github.com/knowz-io/knowzcode/releases)
9
+ [![Version](https://img.shields.io/badge/version-0.2.1-blue)](https://github.com/knowz-io/knowzcode/releases)
10
10
 
11
- [Installation](#installation) · [Quick Start](#quick-start) · [How It Works](#how-it-works) · [Commands](#commands) · [Docs](#documentation)
11
+ [Installation](#installation) · [Quick Start](#quick-start) · [When to Use It](#when-to-use-knowzcode) · [How It Works](#how-it-works) · [Commands](#commands) · [Docs](#documentation)
12
12
 
13
13
  </div>
14
14
 
@@ -16,62 +16,78 @@
16
16
 
17
17
  ## The Problem
18
18
 
19
- AI coding assistants are powerful — they can read your entire codebase, write complex code, and understand requirements. But without structure, they forget context between sessions, make random changes without considering impact, declare "done" when they've only written code (not verified it), and let documentation drift from reality immediately.
20
-
21
- **KnowzCode fixes this.**
19
+ AI coding assistants lack structure. Without it, they:
20
+ - Forget context between sessions
21
+ - Make changes without considering impact
22
+ - Declare "done" without verifying anything works
23
+ - Let documentation drift from reality immediately
22
24
 
23
25
  ## What KnowzCode Does
24
26
 
25
- KnowzCode is a **platform-agnostic development methodology** that lives in a `knowzcode/` directory inside your project. It gives any AI assistant a structured TDD workflow with quality gates, specifications, and session tracking — turning chaotic AI coding into systematic, verifiable software engineering.
27
+ KnowzCode is a **platform-agnostic development methodology** that lives in your project's `knowzcode/` directory.
26
28
 
27
- - **5-Phase Development Loop** — Impact analysis specs TDD implementation audit finalization
29
+ - **Adaptive Development Loop** — Scales from quick fixes to full 5-phase TDD workflows with quality gates at each phase
28
30
  - **Quality Gates** — Automated verification at each phase prevents broken code from advancing
29
31
  - **Living Documentation** — Architecture diagrams and specs auto-update as code changes
30
32
  - **Session Memory** — WorkGroups track complete context so nothing is lost between sessions
31
33
  - **Interruption Recovery** — Say "continue" to resume exactly where you left off
32
34
  - **Multi-Platform** — Works with Claude Code, Codex, Gemini, Cursor, Copilot, and Windsurf
33
35
 
36
+ ## When to Use KnowzCode
37
+
38
+ KnowzCode adds overhead — more time, more tokens, more structure than letting your coding agent plan and execute natively. That's the tradeoff. Here's when it's worth it:
39
+
40
+ **Your agent's native mode is fine for:**
41
+ - Single-file changes, bug fixes, small refactors
42
+ - Tasks where "good enough" is good enough
43
+ - Anything you can verify at a glance
44
+
45
+ **Reach for KnowzCode when:**
46
+ - **Outcomes aren't meeting expectations** — the agent keeps missing edge cases, breaking things, or delivering incomplete work
47
+ - **Multi-component changes** — features that touch multiple layers (API + DB + UI + tests) benefit from impact analysis and phased execution
48
+ - **Architecture and security matter** — quality gates catch issues before they compound
49
+ - **You need documentation that stays current** — specs and architecture docs update as part of the workflow, not as an afterthought
50
+ - **Enforcing standards** — personal conventions, team guidelines, or enterprise compliance rules baked into every phase
51
+ - **Resumability** — long-running work that spans sessions, where losing context means starting over
52
+ - **Autonomous execution** — approve specs upfront, then let the agent run; verification loops and quality gates keep output on track without constant oversight
53
+
54
+ The overhead pays for itself when the cost of getting it wrong exceeds the cost of being thorough.
55
+
34
56
  ## How It Works
35
57
 
36
58
  Every feature follows a structured loop with quality gates between phases:
37
59
 
38
60
  ```
39
- ┌─────────────────────────────────────────────────────────┐
40
- THE KNOWZCODE LOOP
41
-
42
- You provide a goal (e.g., "Add user authentication")
43
-
44
- ┌──────────┐ ┌──────────┐ ┌──────────┐
45
- Phase 1A │──→│ Phase 1B │──→│ Phase 2A
46
- │ Analyze │ │ Specify │ │ Build │ │
47
- │ │ Impact │ │ Design │ │ with TDD │ │
48
- │ └──────────┘ └──────────┘ └──────────┘ │
49
- │ ↑ ↑ │ │
50
- │ [approve] [approve] ↓ │
51
- │ ┌──────────┐ ┌──────────┐ │
52
- │ │ Phase 2B │──→│ Phase 3 │ │
53
- │ │ Audit │ │ Finalize │ │
54
- │ │ Quality │ │ & Commit │ │
55
- │ └──────────┘ └──────────┘ │
56
- │ ↑ │
57
- │ [approve] │
58
- └─────────────────────────────────────────────────────────┘
61
+ ┌──────────────────── THE KNOWZCODE LOOP ────────────────────┐
62
+
63
+ │ Goal → Analyze → ✓ → Design → ✓ → Build → Audit → ✓ → Ship
64
+ Impact Specs (TDD) Quality
65
+ 1A 1B 2A 2B 3
66
+
67
+ = approval gate (you decide whether to proceed)
68
+ └─────────────────────────────────────────────────────────────┘
59
69
  ```
60
70
 
71
+ KnowzCode automatically classifies tasks by complexity:
72
+ - **Micro** — single-file fixes skip the loop entirely (`/kc:fix`)
73
+ - **Light** — small changes (≤3 files) use a streamlined 2-phase path
74
+ - **Full** — complex features get the complete 5-phase workflow above
75
+
61
76
  Each gate requires your approval before proceeding. See the [Workflow Reference](./docs/workflow-reference.md) for details.
62
77
 
63
78
  ## Installation
64
79
 
65
- ### Claude Code (Plugin)
80
+ ### Claude Code (Recommended)
66
81
 
67
82
  ```bash
68
- /plugin marketplace add https://github.com/knowz-io/knowzcode
69
- /plugin install knowzcode
83
+ /plugin marketplace add knowz-io/knowzcode
84
+ /plugin install kc@knowzcode
70
85
  cd your-project/
71
86
  /kc:init
87
+ /kc:work "Build user authentication"
72
88
  ```
73
89
 
74
- ### npx (Any Platform)
90
+ ### Alternative: Script Install
75
91
 
76
92
  ```bash
77
93
  npx knowzcode # Interactive setup
@@ -79,14 +95,22 @@ npx knowzcode install --platforms claude,cursor # Specific platforms
79
95
  npx knowzcode install --platforms all # All 6 platforms
80
96
  ```
81
97
 
98
+ Commands available as `/work`, `/plan`, `/fix` (without `kc:` prefix).
99
+ For `/kc:` prefix, also run: `/plugin install kc@knowzcode`.
100
+
101
+ <details>
102
+ <summary><strong>Supported Platforms (6)</strong></summary>
103
+
82
104
  | Platform | Instruction File | Support Level |
83
105
  |----------|-----------------|---------------|
84
- | Claude Code | `CLAUDE.md` | Full (agents + commands) |
85
- | OpenAI Codex | `AGENTS.md` | Adapter template |
86
- | Gemini CLI | `GEMINI.md` | Adapter template |
87
- | Cursor | `.cursor/rules/knowzcode.mdc` | Adapter template |
88
- | GitHub Copilot | `copilot-instructions.md` | Adapter template |
89
- | Windsurf | `.windsurf/rules/knowzcode.md` | Adapter template |
106
+ | Claude Code | `CLAUDE.md` | Full support (plugin + agents + commands) |
107
+ | Gemini CLI | `GEMINI.md` + `.gemini/commands/kc/*.toml` | Native `/kc:` commands + instruction file |
108
+ | OpenAI Codex | `AGENTS.md` | Instruction file + SKILL.md format |
109
+ | Cursor | `.cursor/rules/*.mdc` + `.cursor/commands/*.md` | Rules + commands (beta) |
110
+ | GitHub Copilot | `.github/copilot-instructions.md` + `.github/agents/*.agent.md` | Instructions + agent definitions |
111
+ | Windsurf | `.windsurf/rules/*.md` + `.windsurf/workflows/*.md` | Rules + workflows |
112
+
113
+ </details>
90
114
 
91
115
  ### Manual (No Node.js)
92
116
 
@@ -109,7 +133,7 @@ Connect to KnowzCode Cloud for vector-powered semantic search, AI Q&A, and learn
109
133
  /kc:work "Build user authentication with email and password"
110
134
  ```
111
135
 
112
- KnowzCode analyzes impact, generates specs, guides TDD implementation, verifies quality, and updates documentation — all with approval gates at each phase.
136
+ Runs the full loop: impact analysis specs TDD audit → finalize, with approval gates between each phase.
113
137
 
114
138
  ### Research First
115
139
 
@@ -117,7 +141,7 @@ KnowzCode analyzes impact, generates specs, guides TDD implementation, verifies
117
141
  /kc:plan "how is authentication implemented?"
118
142
  ```
119
143
 
120
- Spawns parallel research agents to explore your codebase. After investigation, say "implement" to transition into `/kc:work` with findings pre-loaded.
144
+ Explores your codebase first. Say "implement" to transition into `/kc:work` with findings pre-loaded.
121
145
 
122
146
  ### Quick Fix
123
147
 
@@ -129,19 +153,19 @@ Targeted fixes that skip the full loop — for typos, small bugs, and CSS tweaks
129
153
 
130
154
  ## Commands
131
155
 
132
- | Command | Description | Example |
133
- |:--------|:------------|:--------|
134
- | `/kc:init` | Initialize KnowzCode in project | `/kc:init` |
135
- | `/kc:work <goal>` | Start feature workflow | `/kc:work "Add dark mode"` |
136
- | `/kc:plan <topic>` | Research before implementing | `/kc:plan "how does auth work?"` |
137
- | `/kc:audit [type]` | Run quality audits | `/kc:audit security` |
138
- | `/kc:fix <target>` | Quick targeted fix | `/kc:fix auth.js` |
139
- | `/kc:connect-mcp` | Configure MCP server | `/kc:connect-mcp <api-key>` |
140
- | `/kc:register` | Register and configure MCP | `/kc:register` |
141
- | `/kc:status` | Check MCP connection | `/kc:status` |
142
- | `/kc:learn` | Capture learnings to vault | `/kc:learn "insight"` |
143
- | `/kc:telemetry` | Investigate production telemetry | `/kc:telemetry "error 500"` |
144
- | `/kc:telemetry-setup` | Configure telemetry sources | `/kc:telemetry-setup` |
156
+ | Command | Description |
157
+ |:--------|:------------|
158
+ | `/kc:init` | Initialize KnowzCode in project |
159
+ | `/kc:work <goal>` | Start feature workflow |
160
+ | `/kc:plan <topic>` | Research before implementing |
161
+ | `/kc:audit [type]` | Run quality audits |
162
+ | `/kc:fix <target>` | Quick targeted fix |
163
+ | `/kc:connect-mcp` | Configure MCP server |
164
+ | `/kc:register` | Register and configure MCP |
165
+ | `/kc:status` | Check MCP connection |
166
+ | `/kc:learn` | Capture learnings to vault |
167
+ | `/kc:telemetry` | Investigate production telemetry |
168
+ | `/kc:telemetry-setup` | Configure telemetry sources |
145
169
 
146
170
  ## Architecture
147
171
 
@@ -159,7 +183,54 @@ Layer 1: Core Methodology (platform-agnostic, the actual product)
159
183
  knowzcode/ directory → loop, specs, tracker, architecture
160
184
  ```
161
185
 
162
- The real product is Layer 1 — the `knowzcode/` directory. Everything else enhances it. See [Understanding KnowzCode](./docs/understanding-knowzcode.md) for a deep dive.
186
+ The real product is Layer 1 — the `knowzcode/` directory. Everything else enhances it.
187
+ On Claude Code, Layer 4 provides 10 specialized agents with parallel orchestration.
188
+ On other platforms, the AI follows the same methodology directly.
189
+ See [Understanding KnowzCode](./docs/understanding-knowzcode.md) for a deep dive.
190
+
191
+ ## Execution Modes
192
+
193
+ ### Claude Code
194
+
195
+ When using Claude Code, `/kc:work` automatically selects an execution strategy based on task complexity and available features:
196
+
197
+ | Mode | When Used | How It Works |
198
+ |------|-----------|-------------|
199
+ | **Parallel Teams** | Complex features (default for >3 files) | Multiple agents work concurrently — scouts gather context, builders implement in parallel, reviewer audits incrementally |
200
+ | **Sequential Teams** | Lighter features or `--sequential` flag | One agent per phase with persistent team context |
201
+ | **Subagent Delegation** | Agent Teams not enabled | One agent spawned per phase via fallback — works on all Claude Code instances |
202
+
203
+ <details>
204
+ <summary><strong>Agent Teams Setup & Roster (10 agents)</strong></summary>
205
+
206
+ Parallel and Sequential Teams require [Agent Teams (experimental)](https://code.claude.com/docs/en/agent-teams). Enable by adding the following to your Claude Code `settings.json`:
207
+
208
+ ```json
209
+ { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }
210
+ ```
211
+
212
+ Or ask Claude Code: _"Enable Agent Teams in my settings."_ Then restart. Without it, subagent delegation is used automatically.
213
+
214
+ | Agent | Role | Phase |
215
+ |-------|------|-------|
216
+ | `context-scout` | Local context research (specs, tracker, history) | Discovery |
217
+ | `knowz-scout` | MCP vault research (conventions, decisions) | Discovery |
218
+ | `analyst` | Impact analysis, Change Set proposals | 1A |
219
+ | `architect` | Specification drafting, architecture review | 1B |
220
+ | `builder` | TDD implementation, verification loops | 2A |
221
+ | `reviewer` | Quality audit, security review | 2B |
222
+ | `closer` | Finalization, learning capture | 3 |
223
+ | `microfix-specialist` | Quick targeted fixes | Utility |
224
+ | `knowledge-migrator` | Knowledge migration between vaults | Utility |
225
+ | `update-coordinator` | Plugin update coordination | Utility |
226
+
227
+ </details>
228
+
229
+ See the [Workflow Reference](./docs/workflow-reference.md) for detailed orchestration flows.
230
+
231
+ ### Other Platforms
232
+
233
+ Gemini, Cursor, Copilot, Codex, and Windsurf follow the same methodology phases sequentially — the AI reads prompt templates from `knowzcode/prompts/` and follows the same quality gates. No agent orchestration is needed.
163
234
 
164
235
  ## Project Structure
165
236
 
@@ -174,33 +245,21 @@ your-project/
174
245
  ├── specs/ # Component specifications
175
246
  ├── prompts/ # Phase prompt templates (works with any AI)
176
247
  ├── workgroups/ # Session data (gitignored)
177
- └── enterprise/ # Optional compliance config
248
+ └── enterprise/ # Optional compliance config (gitignored, experimental)
178
249
  ```
179
250
 
180
- **Committed to git:** `knowzcode/*.md`, `knowzcode/specs/`, `knowzcode/prompts/`
181
- **Gitignored:** `knowzcode/workgroups/`, `knowzcode/environment_context.md`, `knowzcode/*.local.md`
182
-
183
251
  ## Documentation
184
252
 
185
253
  | Guide | Description |
186
254
  |:------|:------------|
187
- | [Getting Started](./docs/knowzcode_getting_started.md) | Complete walkthrough, MCP setup, migration |
188
- | [Understanding KnowzCode](./docs/understanding-knowzcode.md) | Deep dive into concepts and architecture |
189
- | [Workflow Reference](./docs/workflow-reference.md) | Phase details, agent delegation, parallel execution |
190
- | [Prompts Guide](./docs/knowzcode_prompts_guide.md) | All prompts and command reference |
191
- | [Visual Guide](./docs/knowzcode_guide.md) | File structure roadmap |
192
- | [Developer Guide](./CLAUDE.md) | Plugin development documentation |
255
+ | [Getting Started](./docs/knowzcode_getting_started.md) | Walkthrough, MCP setup, file structure |
256
+ | [Understanding KnowzCode](./docs/understanding-knowzcode.md) | Concepts and architecture deep dive |
257
+ | [Workflow Reference](./docs/workflow-reference.md) | Phase details, execution modes, parallel orchestration |
258
+ | [Prompts Guide](./docs/knowzcode_prompts_guide.md) | Prompt templates and command reference |
193
259
 
194
260
  ## Contributing
195
261
 
196
- We welcome contributions!
197
-
198
- 1. Fork the repository
199
- 2. Create a feature branch: `git checkout -b feature/amazing`
200
- 3. Make changes and test thoroughly
201
- 4. Submit a pull request
202
-
203
- See **[CLAUDE.md](CLAUDE.md)** for developer documentation.
262
+ Fork branch → PR. See **[CLAUDE.md](CLAUDE.md)** for developer docs.
204
263
 
205
264
  ## Acknowledgments
206
265
 
@@ -214,7 +273,7 @@ MIT License with Commons Clause — See [LICENSE](LICENSE) file for details.
214
273
 
215
274
  <div align="center">
216
275
 
217
- **Turn any AI coding assistant into a disciplined software engineer.**
276
+ **A structured development methodology for AI coding assistants.**
218
277
 
219
278
  [Get Started](#installation) · [Read the Docs](#documentation) · [Contribute](#contributing)
220
279
 
package/agents/analyst.md CHANGED
@@ -18,28 +18,11 @@ Analyze the codebase to understand what needs to change for the given goal, then
18
18
 
19
19
  ## NodeID Classification Rules
20
20
 
21
- NodeIDs must be **domain concepts**, not tasks.
21
+ Follow the NodeID naming conventions in `knowzcode_loop.md` section 3.1. Key rules:
22
22
 
23
- ### Default: Domain-Area Names (PascalCase)
24
-
25
- | Pattern | Examples | Covers |
26
- |---------|----------|--------|
27
- | `Authentication` | login form, auth endpoint, token service | All auth components |
28
- | `FileManagement` | files tab, blob proxy, PDF worker | All file handling |
29
- | `Checkout` | cart, orders, payment | All purchase flow |
30
-
31
- Sub-areas when a domain grows large: `Authentication_OAuth`, `Payments_Stripe`
32
-
33
- ### Exception: Utility/Config NodeIDs
34
-
35
- | Prefix | Examples |
36
- |--------|----------|
37
- | `LIB_` | `LIB_DateFormat`, `LIB_Validation` |
38
- | `CONFIG_` | `CONFIG_FeatureFlags` |
39
-
40
- ### Invalid NodeIDs (Never Use)
41
-
42
- `FIX-001`, `UI-FIX-002`, `TASK-123`, `FEATURE-X` — tasks belong in WorkGroup files, not as NodeIDs.
23
+ - NodeIDs must be **domain concepts** (PascalCase), not tasks
24
+ - Use `LIB_` prefix for isolated utilities, `CONFIG_` for configuration
25
+ - Never use task-oriented names: `FIX-001`, `TASK-X`, `FEATURE-Y`
43
26
 
44
27
  ## Consolidation-First Mindset
45
28
 
@@ -53,31 +36,12 @@ Before proposing ANY new NodeID:
53
36
 
54
37
  - One NodeID per new capability, not per file modified
55
38
  - Files that use/integrate a capability are "affected files" — no NodeID needed
56
- - Ask: "Is this creating NEW functionality?" If yes, NodeID. If just integrating, affected file.
57
-
58
- ## Change Set Format
59
-
60
- ```markdown
61
- ## Change Set for WorkGroup [ID]
62
-
63
- ### New Capabilities (NodeIDs)
64
- | NodeID | Description |
65
- |--------|-------------|
66
- | LIB_DateTimeFormat | Timezone formatting utility |
67
-
68
- ### Affected Files (no NodeIDs needed)
69
- - JobsPage.tsx - integrate formatDateTime
70
- - IntakeJobsPage.tsx - integrate formatDateTime
71
-
72
- **Specs Required**: 1
73
- ```
74
39
 
75
40
  ## Historical Context
76
41
 
77
42
  Before analyzing impact:
78
43
  1. Scan `knowzcode/workgroups/` for completed WorkGroups touching similar features
79
- 2. Extract implementation patterns, decisions, and lessons learned
80
- 3. Reference relevant context in your Change Set proposal
44
+ 2. Reference relevant context in your Change Set proposal
81
45
 
82
46
  ## Smart Scanning Strategy
83
47
 
@@ -88,34 +52,32 @@ Before analyzing impact:
88
52
 
89
53
  ## MCP Integration (Optional)
90
54
 
91
- If MCP is configured, enhance your analysis with vault queries:
92
-
93
- - `search_knowledge(research_vault, "past decisions about {domain}")` — find relevant architectural decisions
94
- - `search_knowledge(code_vault, "{affected_component} implementation")` — find related code patterns
95
- - `ask_question(research_vault, "conventions for {domain}?")` — check team conventions
55
+ If MCP is configured:
56
+ - Read `knowzcode/knowzcode_vaults.md` to resolve vault IDs by type
57
+ - `search_knowledge({vault matching "ecosystem" type}, "past decisions about {domain}")` — find relevant architectural decisions
58
+ - `search_knowledge({vault matching "code" type}, "{affected_component} implementation")` — find related code patterns
96
59
 
97
- If MCP is not available, use standard grep/glob — works fine. All analysis works without MCP.
98
-
99
- ## MCP Learning (Optional)
100
-
101
- After Change Set is approved, if MCP is configured:
102
- - `create_knowledge(research_vault, title="Scope: {goal}", tags=["scope", "change-set"])`
103
- with NodeIDs, risk assessment, and user-approved boundaries
104
- - Skip if MCP unavailable — this is enhancement only
60
+ If MCP is not available, use standard grep/glob. All analysis works without MCP.
105
61
 
106
62
  ## Exit Expectations
107
63
 
108
- - Produce a complete Change Set with NodeIDs and spec status
64
+ - Produce a complete Change Set (format defined in `knowzcode_loop.md` section 3.1)
109
65
  - Flag nodes requiring new specs as `[NEEDS_SPEC]`
110
66
  - Include risk assessment and historical context
67
+ - Include dependency map (see below) when running in Parallel Teams mode
111
68
  - Present to user for approval
112
69
 
113
- ## Multi-Agent Coordination
70
+ ## Dependency Map (Parallel Teams)
71
+
72
+ When running in Parallel Teams mode, include a dependency map in your Change Set:
114
73
 
115
- When running in a multi-agent workflow:
116
- - Your Change Set output feeds into the architect for spec drafting
117
- - Clarify scope with the architect if NodeIDs overlap with existing specs
118
- - Answer the builder's questions about affected files and dependencies
119
- - Answer the reviewer's questions about change scope
74
+ ### NodeID Dependencies & Parallelism
75
+ | NodeID | Depends On | Shared Files With | Parallel Group |
76
+ |--------|-----------|-------------------|----------------|
77
+ | {id} | {deps or "none"} | {other NodeIDs sharing files} | {group number} |
120
78
 
121
- For Claude Code Agent Teams behavior, see `knowzcode/claude_code_execution.md`.
79
+ Rules:
80
+ - Two NodeIDs that share ANY affected file must be in the SAME parallel group
81
+ - NodeIDs with no shared files can be in different groups
82
+ - Mark sequential dependencies (NodeID-B requires NodeID-A's output)
83
+ - The lead uses this to partition work across builders
@@ -33,31 +33,9 @@ Specs are **lean decision records + contracts** — quick reference documents ca
33
33
  - Data structure definitions (unless there's a decision to document)
34
34
  - Error handling catalogs (capture via `VERIFY:` statements instead)
35
35
 
36
- ## The 4-Section Template
36
+ ## Spec Format
37
37
 
38
- ```markdown
39
- # {NodeID}: {Human-Readable Name}
40
-
41
- **Updated:** {timestamp}
42
- **Status:** Draft | Approved | As-Built
43
-
44
- ## Rules & Decisions
45
- - Decision: chose X over Y because Z
46
- - Rule: must always validate before persisting
47
-
48
- ## Interfaces
49
- - POST /api/users -> { id, email }
50
- - Depends on: AuthService for token validation
51
-
52
- ## Verification Criteria
53
- - VERIFY: when valid credentials, returns JWT token
54
- - VERIFY: when email exists, returns 409
55
-
56
- ## Debt & Gaps
57
- - TODO: add rate limiting
58
- ```
59
-
60
- **Minimum valid spec:** 1+ Rules item, 1+ Interface item, 2+ `VERIFY:` statements.
38
+ Use the 4-section template defined in `knowzcode_loop.md` section 3.2. **Minimum valid spec:** 1+ Rules item, 1+ Interface item, 2+ `VERIFY:` statements.
61
39
 
62
40
  ## Consolidation Mandate
63
41
 
@@ -85,37 +63,50 @@ When assessing architectural impact:
85
63
  - Drift Detected: {list or None}
86
64
  ```
87
65
 
66
+ ## During Implementation (Parallel Teams — Consultative Role)
67
+
68
+ When builders are implementing, you persist as a read-only consultative resource:
69
+
70
+ ### What To Do
71
+ - Respond to builder DMs about spec intent and design decisions
72
+ - Clarify interface contracts and expected behavior
73
+ - Flag architectural concerns if implementation drifts from spec intent
74
+ - Advise on `[SPEC_ISSUE]` flags raised by builders
75
+
76
+ ### What NOT To Do
77
+ - Write code or modify source files
78
+ - Modify specs (spec changes require a new gate approval cycle)
79
+ - Create tasks or assign work
80
+ - Block builders — respond promptly, don't gatekeep
81
+
82
+ ### Proactive Availability
83
+ When notified that builders are spawning, send a brief intro to each builder:
84
+ > I'm the architect for this WorkGroup. DM me if you need clarification on spec intent, interface contracts, or design decisions.
85
+
88
86
  ## Enterprise Compliance (Optional)
89
87
 
90
88
  If `knowzcode/enterprise/compliance_manifest.md` exists and `compliance_enabled: true`:
91
89
  - Merge guideline criteria into Verification Criteria as `VERIFY:` statements
92
- - Address required concerns in Rules & Decisions
93
90
  - Flag blocking vs advisory compliance issues
94
91
 
95
92
  ## MCP Integration (Optional)
96
93
 
97
- If MCP is configured, enhance your spec drafting with vault queries:
98
-
99
- - `ask_question(research_vault, "conventions for {component_type}?")` — check team conventions before drafting
100
- - `search_knowledge(research_vault, "{NodeID_domain} patterns")` — find related patterns and prior decisions
101
- - `search_knowledge(code_vault, "{component_type} implementation")` — find implementation examples to inform interfaces
94
+ If MCP is configured:
95
+ - Read `knowzcode/knowzcode_vaults.md` to resolve vault IDs by type
96
+ - `ask_question({vault matching "ecosystem" type}, "conventions for {component_type}?")` — check team conventions
97
+ - `search_knowledge({vault matching "ecosystem" type}, "{NodeID_domain} patterns")` — find related patterns
98
+ - `search_knowledge({vault matching "ecosystem" type}, "{component_type} integration context")` — find integration patterns
102
99
 
103
- If MCP is not available, use grep/glob and read existing specs directly. All spec drafting works without MCP.
100
+ If MCP is not available, use grep/glob. All spec drafting works without MCP.
104
101
 
105
102
  ## Exit Expectations
106
103
 
107
- - All specs use the 4-section format
108
- - Each spec has 2+ `VERIFY:` statements
104
+ ### After Specification (Gate #2)
105
+ - All specs use the 4-section format with 2+ `VERIFY:` statements
109
106
  - Tracker statuses updated
110
107
  - Present specs to user for approval
111
108
 
112
- ## Multi-Agent Coordination
113
-
114
- When running in a multi-agent workflow:
115
- - Receive the approved Change Set from the analyst
116
- - Clarify scope with the analyst if NodeIDs need adjustment
117
- - Answer the builder's questions about spec intent and design decisions
118
- - Answer the reviewer's questions about expected behavior
119
- - Notify the closer about spec format and any legacy specs needing migration
120
-
121
- For Claude Code Agent Teams behavior, see `knowzcode/claude_code_execution.md`.
109
+ ### After Implementation (Gate #3 — Parallel Teams only)
110
+ - All builder spec-clarification questions answered
111
+ - `[SPEC_ISSUE]` flags reviewed and addressed
112
+ - No outstanding architectural concerns from implementation review