knowzcode 0.3.6 → 0.4.0

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 (79) hide show
  1. package/.claude-plugin/marketplace.json +61 -61
  2. package/.claude-plugin/plugin.json +8 -8
  3. package/LICENSE +121 -121
  4. package/README.md +354 -320
  5. package/agents/analyst.md +114 -114
  6. package/agents/architect.md +200 -200
  7. package/agents/builder.md +104 -104
  8. package/agents/closer.md +177 -95
  9. package/agents/context-scout.md +54 -54
  10. package/agents/knowledge-migrator.md +349 -349
  11. package/agents/knowz-scout.md +83 -83
  12. package/agents/knowz-scribe.md +180 -180
  13. package/agents/microfix-specialist.md +135 -135
  14. package/agents/project-advisor.md +111 -111
  15. package/agents/reviewer.md +172 -172
  16. package/agents/security-officer.md +194 -194
  17. package/agents/test-advisor.md +162 -162
  18. package/agents/update-coordinator.md +394 -394
  19. package/bin/knowzcode.mjs +1199 -956
  20. package/commands/audit.md +328 -328
  21. package/commands/connect-mcp.md +549 -549
  22. package/commands/fix.md +107 -107
  23. package/commands/init.md +500 -439
  24. package/commands/learn.md +332 -332
  25. package/commands/plan.md +272 -272
  26. package/commands/register.md +733 -733
  27. package/commands/status.md +309 -309
  28. package/commands/telemetry-setup.md +368 -368
  29. package/commands/telemetry.md +188 -188
  30. package/commands/work.md +1204 -1170
  31. package/knowzcode/automation_manifest.md +59 -59
  32. package/knowzcode/claude_code_execution.md +431 -420
  33. package/knowzcode/copilot_execution.md +231 -231
  34. package/knowzcode/enterprise/compliance_manifest.md +137 -137
  35. package/knowzcode/enterprise/compliance_status.md +30 -30
  36. package/knowzcode/enterprise/guidelines/code-quality.md +67 -67
  37. package/knowzcode/enterprise/guidelines/security.md +355 -355
  38. package/knowzcode/enterprise/templates/guideline-template.md +55 -55
  39. package/knowzcode/gitignore.template +13 -13
  40. package/knowzcode/knowzcode_architecture.md +51 -51
  41. package/knowzcode/knowzcode_log.md +142 -142
  42. package/knowzcode/knowzcode_loop.md +596 -593
  43. package/knowzcode/knowzcode_orchestration.md +66 -66
  44. package/knowzcode/knowzcode_project.md +48 -48
  45. package/knowzcode/knowzcode_tracker.md +40 -40
  46. package/knowzcode/knowzcode_vaults.md +257 -257
  47. package/knowzcode/mcp_config.md +191 -191
  48. package/knowzcode/planning/Readme.md +6 -6
  49. package/knowzcode/platform_adapters.md +1260 -1047
  50. package/knowzcode/prompts/Execute_Micro_Fix.md +57 -57
  51. package/knowzcode/prompts/Investigate_Codebase.md +227 -227
  52. package/knowzcode/prompts/Migrate_Knowledge.md +301 -301
  53. package/knowzcode/prompts/Refactor_Node.md +72 -72
  54. package/knowzcode/prompts/Spec_Verification_Checkpoint.md +59 -59
  55. package/knowzcode/prompts/[LOOP_1A]__Propose_Change_Set.md +52 -52
  56. package/knowzcode/prompts/[LOOP_1B]__Draft_Specs.md +75 -75
  57. package/knowzcode/prompts/[LOOP_2A]__Implement_Change_Set.md +55 -55
  58. package/knowzcode/prompts/[LOOP_2B]__Verify_Implementation.md +72 -72
  59. package/knowzcode/prompts/[LOOP_3]__Finalize_And_Commit.md +67 -67
  60. package/knowzcode/specs/Readme.md +10 -10
  61. package/knowzcode/telemetry_config.md +89 -89
  62. package/knowzcode/user_preferences.md +120 -120
  63. package/package.json +53 -53
  64. package/skills/alias-resolver.json +15 -15
  65. package/skills/architecture-diff.json +12 -12
  66. package/skills/check-installation-status.json +14 -14
  67. package/skills/continue.md +126 -126
  68. package/skills/environment-guard.json +12 -12
  69. package/skills/generate-workgroup-id.json +25 -25
  70. package/skills/install-knowzcode.json +21 -21
  71. package/skills/load-core-context.json +18 -18
  72. package/skills/log-entry-builder.json +15 -15
  73. package/skills/spec-quality-check.json +14 -14
  74. package/skills/spec-template.json +15 -15
  75. package/skills/spec-validator.json +25 -25
  76. package/skills/start-work.md +224 -224
  77. package/skills/tracker-scan.json +12 -12
  78. package/skills/tracker-update.json +28 -28
  79. package/skills/validate-installation.json +14 -14
@@ -1,57 +1,57 @@
1
- # KnowzCode: Execute Micro-Fix
2
-
3
- **Target:** [NodeID or specific file path]
4
- **Issue:** [Brief, one-line description of the small change needed]
5
-
6
- Remember to log follow-up tasks in `knowzcode/workgroups/<WorkGroupID>.md` with the `KnowzCode:` prefix.
7
-
8
- > **Automation Path:** Prefer invoking `/kc-microfix target=<NodeID> summary="..."` to delegate to the `microfix-specialist` subagent while keeping scope under the 50-line threshold.
9
-
10
- ---
11
-
12
- ## Your Mission
13
- You have been instructed to perform a "Micro-Fix." This protocol is for small, localized changes that do not alter system architecture or component interfaces.
14
-
15
- **CRITICAL RULE: Before proceeding, confirm this task qualifies as a Micro-Fix.** It must be a small change (e.g., < 50 lines), have no ripple effects, and require no spec updates. If it does not qualify, **STOP** and inform the Orchestrator that the full KnowzCode loop is required.
16
-
17
- **Reference:** Your actions are governed by the "Micro-Fix Protocol" in `knowzcode_loop.md`.
18
-
19
- ---
20
-
21
- ### Execution Protocol
22
-
23
- 1. **Implement Fix:**
24
- * Make the small, targeted change precisely as requested.
25
-
26
- 2. **Quick Verification:**
27
- * Perform a focused check to confirm the fix resolves the described issue and introduces no regressions in the immediate vicinity of the change.
28
-
29
- 3. **Log Operation (Ref: `knowzcode_loop.md` - Step 4.3):**
30
- * Prepend a `MicroFix` entry to `knowzcode_log.md`. The entry **MUST** use the following format and an environment-sourced timestamp:
31
- ```markdown
32
- ---
33
- **Type:** MicroFix
34
- **Timestamp:** [Generated Timestamp]
35
- **NodeID(s)/File:** [TargetNodeID or file_path]
36
- **Logged By:** AI-Agent
37
- **Details:**
38
- - **User Request:** [Orchestrator's brief issue description].
39
- - **Action Taken:** [Brief description of change made].
40
- - **Verification:** [Brief verification method/outcome].
41
- ---
42
- ```
43
-
44
- 4. **Commit Fix (Ref: `knowzcode_loop.md` - Step 4.4):**
45
- * Commit the change to version control with a descriptive `fix:` message (e.g., `fix: correct label on login button`). Use the `git` command specified in your `environment_context.md`.
46
-
47
- ### Final Report
48
-
49
- * Once all steps are complete, provide a concise confirmation report.
50
-
51
- **Example Response:**
52
- > "✓ Micro-Fix completed for `[Target]`.
53
- > * **Change:** Corrected the CSS padding on the main header.
54
- > * **Verification:** Visually confirmed the alignment is now correct.
55
- > * **Documentation:** Log entry added and a `fix:` commit has been made.
56
- >
57
- > Awaiting next `PrimaryGoal`."
1
+ # KnowzCode: Execute Micro-Fix
2
+
3
+ **Target:** [NodeID or specific file path]
4
+ **Issue:** [Brief, one-line description of the small change needed]
5
+
6
+ Remember to log follow-up tasks in `knowzcode/workgroups/<WorkGroupID>.md` with the `KnowzCode:` prefix.
7
+
8
+ > **Automation Path:** Prefer invoking `/kc-microfix target=<NodeID> summary="..."` to delegate to the `microfix-specialist` subagent while keeping scope under the 50-line threshold.
9
+
10
+ ---
11
+
12
+ ## Your Mission
13
+ You have been instructed to perform a "Micro-Fix." This protocol is for small, localized changes that do not alter system architecture or component interfaces.
14
+
15
+ **CRITICAL RULE: Before proceeding, confirm this task qualifies as a Micro-Fix.** It must be a small change (e.g., < 50 lines), have no ripple effects, and require no spec updates. If it does not qualify, **STOP** and inform the Orchestrator that the full KnowzCode loop is required.
16
+
17
+ **Reference:** Your actions are governed by the "Micro-Fix Protocol" in `knowzcode_loop.md`.
18
+
19
+ ---
20
+
21
+ ### Execution Protocol
22
+
23
+ 1. **Implement Fix:**
24
+ * Make the small, targeted change precisely as requested.
25
+
26
+ 2. **Quick Verification:**
27
+ * Perform a focused check to confirm the fix resolves the described issue and introduces no regressions in the immediate vicinity of the change.
28
+
29
+ 3. **Log Operation (Ref: `knowzcode_loop.md` - Step 4.3):**
30
+ * Prepend a `MicroFix` entry to `knowzcode_log.md`. The entry **MUST** use the following format and an environment-sourced timestamp:
31
+ ```markdown
32
+ ---
33
+ **Type:** MicroFix
34
+ **Timestamp:** [Generated Timestamp]
35
+ **NodeID(s)/File:** [TargetNodeID or file_path]
36
+ **Logged By:** AI-Agent
37
+ **Details:**
38
+ - **User Request:** [Orchestrator's brief issue description].
39
+ - **Action Taken:** [Brief description of change made].
40
+ - **Verification:** [Brief verification method/outcome].
41
+ ---
42
+ ```
43
+
44
+ 4. **Commit Fix (Ref: `knowzcode_loop.md` - Step 4.4):**
45
+ * Commit the change to version control with a descriptive `fix:` message (e.g., `fix: correct label on login button`). Use the `git` command specified in your `environment_context.md`.
46
+
47
+ ### Final Report
48
+
49
+ * Once all steps are complete, provide a concise confirmation report.
50
+
51
+ **Example Response:**
52
+ > "✓ Micro-Fix completed for `[Target]`.
53
+ > * **Change:** Corrected the CSS padding on the main header.
54
+ > * **Verification:** Visually confirmed the alignment is now correct.
55
+ > * **Documentation:** Log entry added and a `fix:` commit has been made.
56
+ >
57
+ > Awaiting next `PrimaryGoal`."
@@ -1,227 +1,227 @@
1
- # KnowzCode: Investigate Codebase
2
-
3
- > **Automation Path:** On Claude Code, run `/kc:plan "your question"` to orchestrate this automatically.
4
-
5
- ## Your Mission
6
-
7
- You are performing a focused investigation of the codebase to answer a specific question. You will conduct 1-3 research passes (based on question relevance) to gather evidence, then synthesize findings into actionable recommendations.
8
-
9
- **Investigation Question**: $ARGUMENTS
10
-
11
- ---
12
-
13
- ## Phase 1: Context Loading (Do Once)
14
-
15
- Read these files ONCE at the start:
16
- - `knowzcode/knowzcode_project.md` - project context
17
- - `knowzcode/knowzcode_architecture.md` - architecture overview
18
- - `knowzcode/knowzcode_tracker.md` - existing NodeIDs
19
-
20
- ---
21
-
22
- ## Phase 2: Selective Investigation Passes
23
-
24
- Conduct ONLY investigation passes that are relevant to the question.
25
-
26
- ### Step 1: Determine Which Passes Are Needed
27
-
28
- Analyze the question and select investigation passes based on relevance:
29
-
30
- | Pass | When to Include | Skip When |
31
- |------|-----------------|-----------|
32
- | **Code Exploration** | ALWAYS (provides code evidence) | Never skip - always needed |
33
- | **Architecture & Patterns** | Question involves patterns, design, structure, consistency, layers | Simple lookup questions, bug hunts, "where is X?" |
34
- | **Security & Performance** | Question involves auth, security, performance, data handling, risk | Code organization questions, refactoring questions |
35
-
36
- **Question Type -> Pass Selection Guide:**
37
-
38
- | Question Type | Example | Passes |
39
- |---------------|---------|--------|
40
- | Code location | "Where is user auth handled?" | Code Exploration only |
41
- | Implementation check | "How is error handling done?" | Code Exploration + Architecture |
42
- | Security concern | "Is the API properly secured?" | Code Exploration + Security |
43
- | Full assessment | "Is the auth system well designed and secure?" | All 3 passes |
44
- | Pattern consistency | "Are we consistent in how we handle dates?" | Code Exploration + Architecture |
45
-
46
- ### Step 2: Execute Investigation Passes
47
-
48
- On platforms with agent orchestration, run these in parallel. Otherwise, execute sequentially.
49
-
50
- **Pass 1: Code Exploration (ALWAYS INCLUDE)**
51
- - Find code evidence to answer the question
52
- - Constraints: Max 10 tool calls. Focus on 5 most relevant files
53
- - Output: Code evidence with file paths and line numbers
54
-
55
- **Pass 2: Architecture & Pattern Analysis (IF RELEVANT)**
56
- - Evaluate patterns and design for this question
57
- - Constraints: Max 8 tool calls. Focus on pattern consistency
58
- - Output: Pattern observations with examples
59
-
60
- **Pass 3: Security & Performance (IF RELEVANT)**
61
- - Check security/performance aspects for this question
62
- - Constraints: Max 8 tool calls. Only check relevant OWASP categories
63
- - Output: Risk observations with severity levels
64
-
65
- ---
66
-
67
- ## Phase 3: Synthesize Findings
68
-
69
- **When ALL spawned agents return:**
70
-
71
- 1. Merge results into unified investigation report
72
- 2. Cross-reference findings from agents consulted
73
- 3. Identify agreements and conflicts (if multiple agents)
74
- 4. Formulate direct answer to the original question
75
- 5. Generate actionable recommendations
76
-
77
- ### Save Investigation Report
78
-
79
- Save findings to `knowzcode/planning/investigation-{timestamp}.md`:
80
-
81
- ```markdown
82
- # Investigation: {question summary}
83
-
84
- **Question**: {$ARGUMENTS}
85
- **Timestamp**: {timestamp}
86
- **Agents Consulted**: {list agents actually spawned}
87
-
88
- ## Executive Summary
89
-
90
- {Direct 2-3 sentence answer to the question}
91
-
92
- ## Detailed Findings
93
-
94
- ### Code Exploration (analyst)
95
- {findings}
96
-
97
- ### Pattern Analysis (architect)
98
- {findings}
99
-
100
- ### Security/Performance Assessment (reviewer)
101
- {findings}
102
-
103
- ## Synthesis
104
-
105
- **Key Findings**:
106
- {consolidated bullet points}
107
-
108
- **Cross-Agent Agreements**:
109
- {where agents agree}
110
-
111
- **Areas of Concern**:
112
- {issues identified}
113
-
114
- ## Recommendations
115
-
116
- | # | Action | Priority | Effort |
117
- |---|--------|----------|--------|
118
- | 1 | {action} | HIGH/MED/LOW | S/M/L |
119
- | 2 | {action} | HIGH/MED/LOW | S/M/L |
120
- | 3 | {action} | HIGH/MED/LOW | S/M/L |
121
- ```
122
-
123
- ---
124
-
125
- ## Phase 4: Present Findings
126
-
127
- Present investigation results to user:
128
-
129
- ```markdown
130
- ## KnowzCode Investigation Complete
131
-
132
- **Question**: {$ARGUMENTS}
133
- **Agents Consulted**: {N} (in parallel)
134
-
135
- ### Summary
136
-
137
- {Direct answer to the question}
138
-
139
- ### Key Findings
140
-
141
- {3-5 bullet points summarizing discoveries}
142
-
143
- ### Recommendations
144
-
145
- {numbered list of actionable improvements}
146
-
147
- ---
148
-
149
- **Implementation Options:**
150
-
151
- 1. {First recommendation action}
152
- 2. {Second recommendation action}
153
- 3. {Third recommendation action}
154
-
155
- Say "implement", "do it", or select an option (e.g., "option 1") to proceed with implementation.
156
- Or say "that's all" if you just needed the information.
157
- ```
158
-
159
- ---
160
-
161
- ## Phase 5: Action Listening Mode
162
-
163
- **After presenting findings, enter Action Listening Mode.**
164
-
165
- Monitor subsequent user messages for implementation triggers:
166
-
167
- ### Implementation Triggers (Transition to Phase 1A)
168
-
169
- Detect these patterns in user's next message:
170
-
171
- | Pattern | Example | Action |
172
- |---------|---------|--------|
173
- | Imperative verbs | "implement", "fix", "build", "add", "create" | Extract goal, proceed to Phase 1A |
174
- | Confirmation words | "do it", "go ahead", "proceed", "yes", "let's do it" | Use top recommendation |
175
- | Option selection | "option 1", "the first one", "#2", "do number 2" | Use selected recommendation |
176
- | "Fix it" / "Make it work" | "fix it", "make it work", "just do it" | Use top recommendation |
177
-
178
- ### When Trigger Detected:
179
-
180
- 1. Extract implementation goal from:
181
- - User's specific request (if provided)
182
- - Selected option (if option number given)
183
- - Top recommendation (if generic "do it")
184
-
185
- 2. Log investigation context for handoff:
186
- ```
187
- Investigation findings available at: knowzcode/planning/investigation-{timestamp}.md
188
- ```
189
-
190
- 3. Transition to Phase 1A:
191
- ```markdown
192
- **Transitioning to implementation...**
193
-
194
- Goal extracted: "{extracted goal}"
195
- Investigation context: Pre-loaded from investigation findings
196
-
197
- Proceeding to Phase 1A (Impact Analysis)...
198
- ```
199
-
200
- 4. Pass investigation findings to Phase 1A:
201
- - NodeIDs already identified -> pre-populate Change Set
202
- - Security concerns -> carry forward as annotations
203
- - Architecture observations -> carry forward as annotations
204
- - Skip redundant discovery -> focus Phase 1A on validation
205
-
206
- ### Non-Trigger Responses
207
-
208
- If user message does NOT contain implementation trigger:
209
- - "ok thanks" -> End gracefully: "Investigation complete. Start Phase 1A when ready to implement."
210
- - "tell me more about X" -> Provide additional detail from findings
211
- - "what about Y?" -> Follow-up investigation (run additional passes)
212
-
213
- ---
214
-
215
- ## Logging
216
-
217
- After investigation, log to `knowzcode/knowzcode_log.md`:
218
-
219
- ```markdown
220
- ---
221
- **Type:** Investigation
222
- **Timestamp:** {timestamp}
223
- **Question:** {$ARGUMENTS}
224
- **Finding:** {one-line summary}
225
- **Status:** {Complete | Handoff to Phase 1A}
226
- ---
227
- ```
1
+ # KnowzCode: Investigate Codebase
2
+
3
+ > **Automation Path:** On Claude Code, run `/kc:plan "your question"` to orchestrate this automatically.
4
+
5
+ ## Your Mission
6
+
7
+ You are performing a focused investigation of the codebase to answer a specific question. You will conduct 1-3 research passes (based on question relevance) to gather evidence, then synthesize findings into actionable recommendations.
8
+
9
+ **Investigation Question**: $ARGUMENTS
10
+
11
+ ---
12
+
13
+ ## Phase 1: Context Loading (Do Once)
14
+
15
+ Read these files ONCE at the start:
16
+ - `knowzcode/knowzcode_project.md` - project context
17
+ - `knowzcode/knowzcode_architecture.md` - architecture overview
18
+ - `knowzcode/knowzcode_tracker.md` - existing NodeIDs
19
+
20
+ ---
21
+
22
+ ## Phase 2: Selective Investigation Passes
23
+
24
+ Conduct ONLY investigation passes that are relevant to the question.
25
+
26
+ ### Step 1: Determine Which Passes Are Needed
27
+
28
+ Analyze the question and select investigation passes based on relevance:
29
+
30
+ | Pass | When to Include | Skip When |
31
+ |------|-----------------|-----------|
32
+ | **Code Exploration** | ALWAYS (provides code evidence) | Never skip - always needed |
33
+ | **Architecture & Patterns** | Question involves patterns, design, structure, consistency, layers | Simple lookup questions, bug hunts, "where is X?" |
34
+ | **Security & Performance** | Question involves auth, security, performance, data handling, risk | Code organization questions, refactoring questions |
35
+
36
+ **Question Type -> Pass Selection Guide:**
37
+
38
+ | Question Type | Example | Passes |
39
+ |---------------|---------|--------|
40
+ | Code location | "Where is user auth handled?" | Code Exploration only |
41
+ | Implementation check | "How is error handling done?" | Code Exploration + Architecture |
42
+ | Security concern | "Is the API properly secured?" | Code Exploration + Security |
43
+ | Full assessment | "Is the auth system well designed and secure?" | All 3 passes |
44
+ | Pattern consistency | "Are we consistent in how we handle dates?" | Code Exploration + Architecture |
45
+
46
+ ### Step 2: Execute Investigation Passes
47
+
48
+ On platforms with agent orchestration, run these in parallel. Otherwise, execute sequentially.
49
+
50
+ **Pass 1: Code Exploration (ALWAYS INCLUDE)**
51
+ - Find code evidence to answer the question
52
+ - Constraints: Max 10 tool calls. Focus on 5 most relevant files
53
+ - Output: Code evidence with file paths and line numbers
54
+
55
+ **Pass 2: Architecture & Pattern Analysis (IF RELEVANT)**
56
+ - Evaluate patterns and design for this question
57
+ - Constraints: Max 8 tool calls. Focus on pattern consistency
58
+ - Output: Pattern observations with examples
59
+
60
+ **Pass 3: Security & Performance (IF RELEVANT)**
61
+ - Check security/performance aspects for this question
62
+ - Constraints: Max 8 tool calls. Only check relevant OWASP categories
63
+ - Output: Risk observations with severity levels
64
+
65
+ ---
66
+
67
+ ## Phase 3: Synthesize Findings
68
+
69
+ **When ALL spawned agents return:**
70
+
71
+ 1. Merge results into unified investigation report
72
+ 2. Cross-reference findings from agents consulted
73
+ 3. Identify agreements and conflicts (if multiple agents)
74
+ 4. Formulate direct answer to the original question
75
+ 5. Generate actionable recommendations
76
+
77
+ ### Save Investigation Report
78
+
79
+ Save findings to `knowzcode/planning/investigation-{timestamp}.md`:
80
+
81
+ ```markdown
82
+ # Investigation: {question summary}
83
+
84
+ **Question**: {$ARGUMENTS}
85
+ **Timestamp**: {timestamp}
86
+ **Agents Consulted**: {list agents actually spawned}
87
+
88
+ ## Executive Summary
89
+
90
+ {Direct 2-3 sentence answer to the question}
91
+
92
+ ## Detailed Findings
93
+
94
+ ### Code Exploration (analyst)
95
+ {findings}
96
+
97
+ ### Pattern Analysis (architect)
98
+ {findings}
99
+
100
+ ### Security/Performance Assessment (reviewer)
101
+ {findings}
102
+
103
+ ## Synthesis
104
+
105
+ **Key Findings**:
106
+ {consolidated bullet points}
107
+
108
+ **Cross-Agent Agreements**:
109
+ {where agents agree}
110
+
111
+ **Areas of Concern**:
112
+ {issues identified}
113
+
114
+ ## Recommendations
115
+
116
+ | # | Action | Priority | Effort |
117
+ |---|--------|----------|--------|
118
+ | 1 | {action} | HIGH/MED/LOW | S/M/L |
119
+ | 2 | {action} | HIGH/MED/LOW | S/M/L |
120
+ | 3 | {action} | HIGH/MED/LOW | S/M/L |
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Phase 4: Present Findings
126
+
127
+ Present investigation results to user:
128
+
129
+ ```markdown
130
+ ## KnowzCode Investigation Complete
131
+
132
+ **Question**: {$ARGUMENTS}
133
+ **Agents Consulted**: {N} (in parallel)
134
+
135
+ ### Summary
136
+
137
+ {Direct answer to the question}
138
+
139
+ ### Key Findings
140
+
141
+ {3-5 bullet points summarizing discoveries}
142
+
143
+ ### Recommendations
144
+
145
+ {numbered list of actionable improvements}
146
+
147
+ ---
148
+
149
+ **Implementation Options:**
150
+
151
+ 1. {First recommendation action}
152
+ 2. {Second recommendation action}
153
+ 3. {Third recommendation action}
154
+
155
+ Say "implement", "do it", or select an option (e.g., "option 1") to proceed with implementation.
156
+ Or say "that's all" if you just needed the information.
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Phase 5: Action Listening Mode
162
+
163
+ **After presenting findings, enter Action Listening Mode.**
164
+
165
+ Monitor subsequent user messages for implementation triggers:
166
+
167
+ ### Implementation Triggers (Transition to Phase 1A)
168
+
169
+ Detect these patterns in user's next message:
170
+
171
+ | Pattern | Example | Action |
172
+ |---------|---------|--------|
173
+ | Imperative verbs | "implement", "fix", "build", "add", "create" | Extract goal, proceed to Phase 1A |
174
+ | Confirmation words | "do it", "go ahead", "proceed", "yes", "let's do it" | Use top recommendation |
175
+ | Option selection | "option 1", "the first one", "#2", "do number 2" | Use selected recommendation |
176
+ | "Fix it" / "Make it work" | "fix it", "make it work", "just do it" | Use top recommendation |
177
+
178
+ ### When Trigger Detected:
179
+
180
+ 1. Extract implementation goal from:
181
+ - User's specific request (if provided)
182
+ - Selected option (if option number given)
183
+ - Top recommendation (if generic "do it")
184
+
185
+ 2. Log investigation context for handoff:
186
+ ```
187
+ Investigation findings available at: knowzcode/planning/investigation-{timestamp}.md
188
+ ```
189
+
190
+ 3. Transition to Phase 1A:
191
+ ```markdown
192
+ **Transitioning to implementation...**
193
+
194
+ Goal extracted: "{extracted goal}"
195
+ Investigation context: Pre-loaded from investigation findings
196
+
197
+ Proceeding to Phase 1A (Impact Analysis)...
198
+ ```
199
+
200
+ 4. Pass investigation findings to Phase 1A:
201
+ - NodeIDs already identified -> pre-populate Change Set
202
+ - Security concerns -> carry forward as annotations
203
+ - Architecture observations -> carry forward as annotations
204
+ - Skip redundant discovery -> focus Phase 1A on validation
205
+
206
+ ### Non-Trigger Responses
207
+
208
+ If user message does NOT contain implementation trigger:
209
+ - "ok thanks" -> End gracefully: "Investigation complete. Start Phase 1A when ready to implement."
210
+ - "tell me more about X" -> Provide additional detail from findings
211
+ - "what about Y?" -> Follow-up investigation (run additional passes)
212
+
213
+ ---
214
+
215
+ ## Logging
216
+
217
+ After investigation, log to `knowzcode/knowzcode_log.md`:
218
+
219
+ ```markdown
220
+ ---
221
+ **Type:** Investigation
222
+ **Timestamp:** {timestamp}
223
+ **Question:** {$ARGUMENTS}
224
+ **Finding:** {one-line summary}
225
+ **Status:** {Complete | Handoff to Phase 1A}
226
+ ---
227
+ ```