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.
- package/.claude-plugin/marketplace.json +61 -61
- package/.claude-plugin/plugin.json +8 -8
- package/LICENSE +121 -121
- package/README.md +354 -320
- package/agents/analyst.md +114 -114
- package/agents/architect.md +200 -200
- package/agents/builder.md +104 -104
- package/agents/closer.md +177 -95
- package/agents/context-scout.md +54 -54
- package/agents/knowledge-migrator.md +349 -349
- package/agents/knowz-scout.md +83 -83
- package/agents/knowz-scribe.md +180 -180
- package/agents/microfix-specialist.md +135 -135
- package/agents/project-advisor.md +111 -111
- package/agents/reviewer.md +172 -172
- package/agents/security-officer.md +194 -194
- package/agents/test-advisor.md +162 -162
- package/agents/update-coordinator.md +394 -394
- package/bin/knowzcode.mjs +1199 -956
- package/commands/audit.md +328 -328
- package/commands/connect-mcp.md +549 -549
- package/commands/fix.md +107 -107
- package/commands/init.md +500 -439
- package/commands/learn.md +332 -332
- package/commands/plan.md +272 -272
- package/commands/register.md +733 -733
- package/commands/status.md +309 -309
- package/commands/telemetry-setup.md +368 -368
- package/commands/telemetry.md +188 -188
- package/commands/work.md +1204 -1170
- package/knowzcode/automation_manifest.md +59 -59
- package/knowzcode/claude_code_execution.md +431 -420
- package/knowzcode/copilot_execution.md +231 -231
- package/knowzcode/enterprise/compliance_manifest.md +137 -137
- package/knowzcode/enterprise/compliance_status.md +30 -30
- package/knowzcode/enterprise/guidelines/code-quality.md +67 -67
- package/knowzcode/enterprise/guidelines/security.md +355 -355
- package/knowzcode/enterprise/templates/guideline-template.md +55 -55
- package/knowzcode/gitignore.template +13 -13
- package/knowzcode/knowzcode_architecture.md +51 -51
- package/knowzcode/knowzcode_log.md +142 -142
- package/knowzcode/knowzcode_loop.md +596 -593
- package/knowzcode/knowzcode_orchestration.md +66 -66
- package/knowzcode/knowzcode_project.md +48 -48
- package/knowzcode/knowzcode_tracker.md +40 -40
- package/knowzcode/knowzcode_vaults.md +257 -257
- package/knowzcode/mcp_config.md +191 -191
- package/knowzcode/planning/Readme.md +6 -6
- package/knowzcode/platform_adapters.md +1260 -1047
- package/knowzcode/prompts/Execute_Micro_Fix.md +57 -57
- package/knowzcode/prompts/Investigate_Codebase.md +227 -227
- package/knowzcode/prompts/Migrate_Knowledge.md +301 -301
- package/knowzcode/prompts/Refactor_Node.md +72 -72
- package/knowzcode/prompts/Spec_Verification_Checkpoint.md +59 -59
- package/knowzcode/prompts/[LOOP_1A]__Propose_Change_Set.md +52 -52
- package/knowzcode/prompts/[LOOP_1B]__Draft_Specs.md +75 -75
- package/knowzcode/prompts/[LOOP_2A]__Implement_Change_Set.md +55 -55
- package/knowzcode/prompts/[LOOP_2B]__Verify_Implementation.md +72 -72
- package/knowzcode/prompts/[LOOP_3]__Finalize_And_Commit.md +67 -67
- package/knowzcode/specs/Readme.md +10 -10
- package/knowzcode/telemetry_config.md +89 -89
- package/knowzcode/user_preferences.md +120 -120
- package/package.json +53 -53
- package/skills/alias-resolver.json +15 -15
- package/skills/architecture-diff.json +12 -12
- package/skills/check-installation-status.json +14 -14
- package/skills/continue.md +126 -126
- package/skills/environment-guard.json +12 -12
- package/skills/generate-workgroup-id.json +25 -25
- package/skills/install-knowzcode.json +21 -21
- package/skills/load-core-context.json +18 -18
- package/skills/log-entry-builder.json +15 -15
- package/skills/spec-quality-check.json +14 -14
- package/skills/spec-template.json +15 -15
- package/skills/spec-validator.json +25 -25
- package/skills/start-work.md +224 -224
- package/skills/tracker-scan.json +12 -12
- package/skills/tracker-update.json +28 -28
- package/skills/validate-installation.json +14 -14
package/skills/start-work.md
CHANGED
|
@@ -1,224 +1,224 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: start-work
|
|
3
|
-
description: Detect plan implementation intent and redirect to /kc:work with extracted context
|
|
4
|
-
trigger: User expresses intent to implement a plan, findings, or spec
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Start Work Skill
|
|
8
|
-
|
|
9
|
-
**Purpose**: Intercept implementation intent phrases and auto-invoke `/kc:work` with appropriate context from plans, investigations, or user statements.
|
|
10
|
-
|
|
11
|
-
## Trigger Patterns
|
|
12
|
-
|
|
13
|
-
Activate when user message matches ANY of these patterns:
|
|
14
|
-
- "implement this plan"
|
|
15
|
-
- "implement the plan"
|
|
16
|
-
- "Implement the following plan"
|
|
17
|
-
- "implement the following"
|
|
18
|
-
- "let's implement"
|
|
19
|
-
- "start implementing"
|
|
20
|
-
- "execute the plan"
|
|
21
|
-
- "begin implementation"
|
|
22
|
-
- "proceed with implementation"
|
|
23
|
-
- "do option 1" / "do option 2" / "do option 3"
|
|
24
|
-
- "implement option 1" / "implement option 2" / "implement option 3"
|
|
25
|
-
- "implement findings"
|
|
26
|
-
- "build this"
|
|
27
|
-
- "start work"
|
|
28
|
-
- "let me implement"
|
|
29
|
-
- "go ahead"
|
|
30
|
-
- "make the changes"
|
|
31
|
-
- "do it"
|
|
32
|
-
- "proceed"
|
|
33
|
-
- "implement it"
|
|
34
|
-
|
|
35
|
-
## Context Requirements
|
|
36
|
-
|
|
37
|
-
- Must be in a KnowzCode-initialized project (knowzcode/ directory exists)
|
|
38
|
-
- Should NOT trigger during active /kc:* command execution
|
|
39
|
-
- Should have some prior context to extract goal from (plan, investigation, or user statement)
|
|
40
|
-
|
|
41
|
-
## When NOT to Trigger
|
|
42
|
-
|
|
43
|
-
Do NOT trigger this skill if:
|
|
44
|
-
- User is asking a question about implementation (e.g., "should we implement X?", "how should we implement?")
|
|
45
|
-
- User is requesting changes to a previous implementation (e.g., "implement it differently")
|
|
46
|
-
- User says "implement" but in context of explaining something to someone else
|
|
47
|
-
- Already inside a /kc:* command execution
|
|
48
|
-
- knowzcode/ directory doesn't exist (not a KnowzCode project)
|
|
49
|
-
- User's message is a continuation of giving new feature requirements (not referencing a prior plan)
|
|
50
|
-
|
|
51
|
-
## Detection Logic
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
IF user_message matches implementation_pattern AND
|
|
55
|
-
knowzcode_directory exists AND
|
|
56
|
-
NOT question_pattern (ends with ?, starts with "should/could/would/how") AND
|
|
57
|
-
NOT currently_executing_kc_command THEN
|
|
58
|
-
trigger_start_work_skill()
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Question Detection** (exclude these):
|
|
62
|
-
- Message ends with `?`
|
|
63
|
-
- Message starts with: should, could, would, how, why, can, is, does, what
|
|
64
|
-
- Message contains: "should we", "could we", "would you", "how to"
|
|
65
|
-
|
|
66
|
-
## Skill Behavior
|
|
67
|
-
|
|
68
|
-
When triggered:
|
|
69
|
-
|
|
70
|
-
### Step 1: Acknowledge Intent
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
Starting KnowzCode workflow to implement your request...
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Step 2: Look for Implementation Context
|
|
77
|
-
|
|
78
|
-
Search for context in this priority order:
|
|
79
|
-
|
|
80
|
-
#### Priority A: Recent Plan File (Claude Code plan mode)
|
|
81
|
-
1. Check for recent plan files (< 30 minutes old):
|
|
82
|
-
- Location: `~/.claude/projects/*/` or `~/.claude/plans/`
|
|
83
|
-
- Pattern: `*.md` files containing plan content
|
|
84
|
-
2. If found: Extract full plan content as context
|
|
85
|
-
|
|
86
|
-
#### Priority B: Recent Investigation
|
|
87
|
-
1. Check `knowzcode/planning/investigation-*.md` for files < 30 min old
|
|
88
|
-
2. If found: Extract top recommendation and key findings
|
|
89
|
-
3. Handle "option N" phrases by extracting that specific option
|
|
90
|
-
|
|
91
|
-
#### Priority C: Active WorkGroup
|
|
92
|
-
1. Check `knowzcode/knowzcode_tracker.md` for `[WIP]` entries
|
|
93
|
-
2. If found: Use existing primary goal from WorkGroup file
|
|
94
|
-
|
|
95
|
-
#### Priority D: User's Explicit Statement
|
|
96
|
-
1. If user message contains actionable content beyond trigger phrase
|
|
97
|
-
2. Parse verbs + objects to form goal
|
|
98
|
-
|
|
99
|
-
### Step 3: Handle Missing Context
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
IF no context found:
|
|
103
|
-
PROMPT: "What would you like to implement? Please describe the feature or goal."
|
|
104
|
-
WAIT for user response
|
|
105
|
-
USE user_response as goal
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Step 4: Invoke Workflow
|
|
109
|
-
|
|
110
|
-
Pass full context to /kc:work and let it extract the goal:
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
/kc:work --context "{plan_or_investigation_content}"
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
The /kc:work command will:
|
|
117
|
-
- Parse the context to extract the implementation goal
|
|
118
|
-
- Handle "option N" references from investigations
|
|
119
|
-
- Detect matching specs for optimization paths
|
|
120
|
-
|
|
121
|
-
## Example Interactions
|
|
122
|
-
|
|
123
|
-
### Example 1: After Plan Mode Exit
|
|
124
|
-
```
|
|
125
|
-
User: implement this plan
|
|
126
|
-
Skill: Starting KnowzCode workflow based on your plan...
|
|
127
|
-
Loading plan context from recent session.
|
|
128
|
-
[Reads plan content, passes full context to /kc:work]
|
|
129
|
-
[/kc:work extracts goal: "Add user authentication with JWT tokens"]
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Example 2: After Investigation (Option Selection)
|
|
133
|
-
```
|
|
134
|
-
User: do option 2
|
|
135
|
-
Skill: Starting implementation of option 2 from investigation...
|
|
136
|
-
Loading context from: knowzcode/planning/investigation-20250116-143022.md
|
|
137
|
-
[Extracts option 2 content, passes to /kc:work]
|
|
138
|
-
[/kc:work interprets: "Option 2: Refactor error handling with centralized middleware"]
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Example 3: After Investigation (Generic)
|
|
142
|
-
```
|
|
143
|
-
User: implement the findings
|
|
144
|
-
Skill: Starting implementation based on investigation findings...
|
|
145
|
-
Loading context from: knowzcode/planning/investigation-20250116-143022.md
|
|
146
|
-
[Passes top recommendation to /kc:work]
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Example 4: No Context Found
|
|
150
|
-
```
|
|
151
|
-
User: let's implement
|
|
152
|
-
Skill: I don't see a recent plan or investigation context.
|
|
153
|
-
What would you like to implement? Please describe the feature or goal.
|
|
154
|
-
User: Add dark mode toggle to the settings page
|
|
155
|
-
[Passes goal to /kc:work "Add dark mode toggle to the settings page"]
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Example 5: With In-Message Context
|
|
159
|
-
```
|
|
160
|
-
User: go ahead and build the payment integration
|
|
161
|
-
Skill: Starting KnowzCode workflow...
|
|
162
|
-
[Extracts "build the payment integration" as goal]
|
|
163
|
-
[Invokes /kc:work "Build the payment integration"]
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Option Number Parsing
|
|
167
|
-
|
|
168
|
-
When user says "do option N" or "implement option N":
|
|
169
|
-
|
|
170
|
-
1. Read most recent investigation file
|
|
171
|
-
2. Search for pattern: `Option {N}:` or `**Option {N}**` or `{N})` or `{N}.`
|
|
172
|
-
3. Extract the description following that marker
|
|
173
|
-
4. Pass to /kc:work with full option description
|
|
174
|
-
|
|
175
|
-
Example investigation content:
|
|
176
|
-
```markdown
|
|
177
|
-
## Recommendations
|
|
178
|
-
|
|
179
|
-
**Option 1**: Add validation middleware (Low effort, High impact)
|
|
180
|
-
**Option 2**: Refactor to use centralized error handling (Medium effort, High impact)
|
|
181
|
-
**Option 3**: Full error architecture overhaul (High effort, Very high impact)
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
User says: "do option 2"
|
|
185
|
-
Extracted: "Refactor to use centralized error handling"
|
|
186
|
-
|
|
187
|
-
## Integration with /kc:work
|
|
188
|
-
|
|
189
|
-
This skill prepares context for /kc:work, which will then:
|
|
190
|
-
1. Apply Step 4.5 spec detection to check for existing comprehensive specs
|
|
191
|
-
2. Offer optimization paths (Quick/Validation/Full workflow)
|
|
192
|
-
3. Load investigation context to pre-populate Phase 1A if applicable
|
|
193
|
-
|
|
194
|
-
## Logging
|
|
195
|
-
|
|
196
|
-
Log skill activation in `knowzcode/knowzcode_log.md`:
|
|
197
|
-
|
|
198
|
-
```markdown
|
|
199
|
-
---
|
|
200
|
-
**Type:** SkillActivation
|
|
201
|
-
**Timestamp:** [Generated Timestamp]
|
|
202
|
-
**Skill:** start-work
|
|
203
|
-
**Trigger:** User said "{user_message}"
|
|
204
|
-
**Context Source:** {plan|investigation|workgroup|user_input|none}
|
|
205
|
-
**Goal Extracted:** "{goal or context summary}"
|
|
206
|
-
**Action:** Invoked /kc:work
|
|
207
|
-
**Logged By:** AI-Agent
|
|
208
|
-
---
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Skill Configuration
|
|
212
|
-
|
|
213
|
-
**Priority**: High (should check before generic "okay, let's do it" responses)
|
|
214
|
-
**Auto-invoke**: Yes (when pattern matches and context requirements met)
|
|
215
|
-
**Requires confirmation**: No (redirects to command which has its own approval gates)
|
|
216
|
-
**Safe operation**: Yes (just extracts context and invokes structured command)
|
|
217
|
-
|
|
218
|
-
## Benefits
|
|
219
|
-
|
|
220
|
-
1. **Seamless Plan → Work Transition**: Natural language works after plan mode
|
|
221
|
-
2. **Investigation → Implementation Flow**: "do option 1" just works
|
|
222
|
-
3. **Context Preservation**: Full plan/investigation context flows to /kc:work
|
|
223
|
-
4. **Framework Discipline**: Ensures TDD, specs, quality gates are applied
|
|
224
|
-
5. **User Convenience**: No need to manually re-type goals
|
|
1
|
+
---
|
|
2
|
+
name: start-work
|
|
3
|
+
description: Detect plan implementation intent and redirect to /kc:work with extracted context
|
|
4
|
+
trigger: User expresses intent to implement a plan, findings, or spec
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Start Work Skill
|
|
8
|
+
|
|
9
|
+
**Purpose**: Intercept implementation intent phrases and auto-invoke `/kc:work` with appropriate context from plans, investigations, or user statements.
|
|
10
|
+
|
|
11
|
+
## Trigger Patterns
|
|
12
|
+
|
|
13
|
+
Activate when user message matches ANY of these patterns:
|
|
14
|
+
- "implement this plan"
|
|
15
|
+
- "implement the plan"
|
|
16
|
+
- "Implement the following plan"
|
|
17
|
+
- "implement the following"
|
|
18
|
+
- "let's implement"
|
|
19
|
+
- "start implementing"
|
|
20
|
+
- "execute the plan"
|
|
21
|
+
- "begin implementation"
|
|
22
|
+
- "proceed with implementation"
|
|
23
|
+
- "do option 1" / "do option 2" / "do option 3"
|
|
24
|
+
- "implement option 1" / "implement option 2" / "implement option 3"
|
|
25
|
+
- "implement findings"
|
|
26
|
+
- "build this"
|
|
27
|
+
- "start work"
|
|
28
|
+
- "let me implement"
|
|
29
|
+
- "go ahead"
|
|
30
|
+
- "make the changes"
|
|
31
|
+
- "do it"
|
|
32
|
+
- "proceed"
|
|
33
|
+
- "implement it"
|
|
34
|
+
|
|
35
|
+
## Context Requirements
|
|
36
|
+
|
|
37
|
+
- Must be in a KnowzCode-initialized project (knowzcode/ directory exists)
|
|
38
|
+
- Should NOT trigger during active /kc:* command execution
|
|
39
|
+
- Should have some prior context to extract goal from (plan, investigation, or user statement)
|
|
40
|
+
|
|
41
|
+
## When NOT to Trigger
|
|
42
|
+
|
|
43
|
+
Do NOT trigger this skill if:
|
|
44
|
+
- User is asking a question about implementation (e.g., "should we implement X?", "how should we implement?")
|
|
45
|
+
- User is requesting changes to a previous implementation (e.g., "implement it differently")
|
|
46
|
+
- User says "implement" but in context of explaining something to someone else
|
|
47
|
+
- Already inside a /kc:* command execution
|
|
48
|
+
- knowzcode/ directory doesn't exist (not a KnowzCode project)
|
|
49
|
+
- User's message is a continuation of giving new feature requirements (not referencing a prior plan)
|
|
50
|
+
|
|
51
|
+
## Detection Logic
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
IF user_message matches implementation_pattern AND
|
|
55
|
+
knowzcode_directory exists AND
|
|
56
|
+
NOT question_pattern (ends with ?, starts with "should/could/would/how") AND
|
|
57
|
+
NOT currently_executing_kc_command THEN
|
|
58
|
+
trigger_start_work_skill()
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Question Detection** (exclude these):
|
|
62
|
+
- Message ends with `?`
|
|
63
|
+
- Message starts with: should, could, would, how, why, can, is, does, what
|
|
64
|
+
- Message contains: "should we", "could we", "would you", "how to"
|
|
65
|
+
|
|
66
|
+
## Skill Behavior
|
|
67
|
+
|
|
68
|
+
When triggered:
|
|
69
|
+
|
|
70
|
+
### Step 1: Acknowledge Intent
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Starting KnowzCode workflow to implement your request...
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 2: Look for Implementation Context
|
|
77
|
+
|
|
78
|
+
Search for context in this priority order:
|
|
79
|
+
|
|
80
|
+
#### Priority A: Recent Plan File (Claude Code plan mode)
|
|
81
|
+
1. Check for recent plan files (< 30 minutes old):
|
|
82
|
+
- Location: `~/.claude/projects/*/` or `~/.claude/plans/`
|
|
83
|
+
- Pattern: `*.md` files containing plan content
|
|
84
|
+
2. If found: Extract full plan content as context
|
|
85
|
+
|
|
86
|
+
#### Priority B: Recent Investigation
|
|
87
|
+
1. Check `knowzcode/planning/investigation-*.md` for files < 30 min old
|
|
88
|
+
2. If found: Extract top recommendation and key findings
|
|
89
|
+
3. Handle "option N" phrases by extracting that specific option
|
|
90
|
+
|
|
91
|
+
#### Priority C: Active WorkGroup
|
|
92
|
+
1. Check `knowzcode/knowzcode_tracker.md` for `[WIP]` entries
|
|
93
|
+
2. If found: Use existing primary goal from WorkGroup file
|
|
94
|
+
|
|
95
|
+
#### Priority D: User's Explicit Statement
|
|
96
|
+
1. If user message contains actionable content beyond trigger phrase
|
|
97
|
+
2. Parse verbs + objects to form goal
|
|
98
|
+
|
|
99
|
+
### Step 3: Handle Missing Context
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
IF no context found:
|
|
103
|
+
PROMPT: "What would you like to implement? Please describe the feature or goal."
|
|
104
|
+
WAIT for user response
|
|
105
|
+
USE user_response as goal
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Step 4: Invoke Workflow
|
|
109
|
+
|
|
110
|
+
Pass full context to /kc:work and let it extract the goal:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
/kc:work --context "{plan_or_investigation_content}"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The /kc:work command will:
|
|
117
|
+
- Parse the context to extract the implementation goal
|
|
118
|
+
- Handle "option N" references from investigations
|
|
119
|
+
- Detect matching specs for optimization paths
|
|
120
|
+
|
|
121
|
+
## Example Interactions
|
|
122
|
+
|
|
123
|
+
### Example 1: After Plan Mode Exit
|
|
124
|
+
```
|
|
125
|
+
User: implement this plan
|
|
126
|
+
Skill: Starting KnowzCode workflow based on your plan...
|
|
127
|
+
Loading plan context from recent session.
|
|
128
|
+
[Reads plan content, passes full context to /kc:work]
|
|
129
|
+
[/kc:work extracts goal: "Add user authentication with JWT tokens"]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Example 2: After Investigation (Option Selection)
|
|
133
|
+
```
|
|
134
|
+
User: do option 2
|
|
135
|
+
Skill: Starting implementation of option 2 from investigation...
|
|
136
|
+
Loading context from: knowzcode/planning/investigation-20250116-143022.md
|
|
137
|
+
[Extracts option 2 content, passes to /kc:work]
|
|
138
|
+
[/kc:work interprets: "Option 2: Refactor error handling with centralized middleware"]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Example 3: After Investigation (Generic)
|
|
142
|
+
```
|
|
143
|
+
User: implement the findings
|
|
144
|
+
Skill: Starting implementation based on investigation findings...
|
|
145
|
+
Loading context from: knowzcode/planning/investigation-20250116-143022.md
|
|
146
|
+
[Passes top recommendation to /kc:work]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Example 4: No Context Found
|
|
150
|
+
```
|
|
151
|
+
User: let's implement
|
|
152
|
+
Skill: I don't see a recent plan or investigation context.
|
|
153
|
+
What would you like to implement? Please describe the feature or goal.
|
|
154
|
+
User: Add dark mode toggle to the settings page
|
|
155
|
+
[Passes goal to /kc:work "Add dark mode toggle to the settings page"]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Example 5: With In-Message Context
|
|
159
|
+
```
|
|
160
|
+
User: go ahead and build the payment integration
|
|
161
|
+
Skill: Starting KnowzCode workflow...
|
|
162
|
+
[Extracts "build the payment integration" as goal]
|
|
163
|
+
[Invokes /kc:work "Build the payment integration"]
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Option Number Parsing
|
|
167
|
+
|
|
168
|
+
When user says "do option N" or "implement option N":
|
|
169
|
+
|
|
170
|
+
1. Read most recent investigation file
|
|
171
|
+
2. Search for pattern: `Option {N}:` or `**Option {N}**` or `{N})` or `{N}.`
|
|
172
|
+
3. Extract the description following that marker
|
|
173
|
+
4. Pass to /kc:work with full option description
|
|
174
|
+
|
|
175
|
+
Example investigation content:
|
|
176
|
+
```markdown
|
|
177
|
+
## Recommendations
|
|
178
|
+
|
|
179
|
+
**Option 1**: Add validation middleware (Low effort, High impact)
|
|
180
|
+
**Option 2**: Refactor to use centralized error handling (Medium effort, High impact)
|
|
181
|
+
**Option 3**: Full error architecture overhaul (High effort, Very high impact)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
User says: "do option 2"
|
|
185
|
+
Extracted: "Refactor to use centralized error handling"
|
|
186
|
+
|
|
187
|
+
## Integration with /kc:work
|
|
188
|
+
|
|
189
|
+
This skill prepares context for /kc:work, which will then:
|
|
190
|
+
1. Apply Step 4.5 spec detection to check for existing comprehensive specs
|
|
191
|
+
2. Offer optimization paths (Quick/Validation/Full workflow)
|
|
192
|
+
3. Load investigation context to pre-populate Phase 1A if applicable
|
|
193
|
+
|
|
194
|
+
## Logging
|
|
195
|
+
|
|
196
|
+
Log skill activation in `knowzcode/knowzcode_log.md`:
|
|
197
|
+
|
|
198
|
+
```markdown
|
|
199
|
+
---
|
|
200
|
+
**Type:** SkillActivation
|
|
201
|
+
**Timestamp:** [Generated Timestamp]
|
|
202
|
+
**Skill:** start-work
|
|
203
|
+
**Trigger:** User said "{user_message}"
|
|
204
|
+
**Context Source:** {plan|investigation|workgroup|user_input|none}
|
|
205
|
+
**Goal Extracted:** "{goal or context summary}"
|
|
206
|
+
**Action:** Invoked /kc:work
|
|
207
|
+
**Logged By:** AI-Agent
|
|
208
|
+
---
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Skill Configuration
|
|
212
|
+
|
|
213
|
+
**Priority**: High (should check before generic "okay, let's do it" responses)
|
|
214
|
+
**Auto-invoke**: Yes (when pattern matches and context requirements met)
|
|
215
|
+
**Requires confirmation**: No (redirects to command which has its own approval gates)
|
|
216
|
+
**Safe operation**: Yes (just extracts context and invokes structured command)
|
|
217
|
+
|
|
218
|
+
## Benefits
|
|
219
|
+
|
|
220
|
+
1. **Seamless Plan → Work Transition**: Natural language works after plan mode
|
|
221
|
+
2. **Investigation → Implementation Flow**: "do option 1" just works
|
|
222
|
+
3. **Context Preservation**: Full plan/investigation context flows to /kc:work
|
|
223
|
+
4. **Framework Discipline**: Ensures TDD, specs, quality gates are applied
|
|
224
|
+
5. **User Convenience**: No need to manually re-type goals
|
package/skills/tracker-scan.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tracker-scan",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Extracts NodeID statuses and WorkGroup assignments from the KnowzCode tracker.",
|
|
5
|
-
"parameters": [],
|
|
6
|
-
"actions": [
|
|
7
|
-
{
|
|
8
|
-
"type": "python",
|
|
9
|
-
"code": "from pathlib import Path\ntext = Path('knowzcode/knowzcode_tracker.md').read_text()\nrows = []\nfor line in text.splitlines():\n if line.startswith('|') and '`' in line:\n cols = [c.strip() for c in line.strip('|').split('|')]\n if len(cols) >= 9 and cols[2] != 'Node ID':\n rows.append({'status': cols[0], 'workgroup_id': cols[1], 'node_id': cols[2].strip('`'), 'notes': cols[8]})\noutputs['rows'] = rows\n"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tracker-scan",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Extracts NodeID statuses and WorkGroup assignments from the KnowzCode tracker.",
|
|
5
|
+
"parameters": [],
|
|
6
|
+
"actions": [
|
|
7
|
+
{
|
|
8
|
+
"type": "python",
|
|
9
|
+
"code": "from pathlib import Path\ntext = Path('knowzcode/knowzcode_tracker.md').read_text()\nrows = []\nfor line in text.splitlines():\n if line.startswith('|') and '`' in line:\n cols = [c.strip() for c in line.strip('|').split('|')]\n if len(cols) >= 9 and cols[2] != 'Node ID':\n rows.append({'status': cols[0], 'workgroup_id': cols[1], 'node_id': cols[2].strip('`'), 'notes': cols[8]})\noutputs['rows'] = rows\n"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tracker-update",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Applies validated updates to knowzcode/knowzcode_tracker.md while preserving table structure.",
|
|
5
|
-
"parameters": [
|
|
6
|
-
{
|
|
7
|
-
"name": "updates",
|
|
8
|
-
"type": "array",
|
|
9
|
-
"items": {
|
|
10
|
-
"type": "object",
|
|
11
|
-
"properties": {
|
|
12
|
-
"node_id": {"type": "string"},
|
|
13
|
-
"status": {"type": "string"},
|
|
14
|
-
"workgroup_id": {"type": "string"},
|
|
15
|
-
"notes": {"type": "string"}
|
|
16
|
-
},
|
|
17
|
-
"required": ["node_id"]
|
|
18
|
-
},
|
|
19
|
-
"required": true
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"actions": [
|
|
23
|
-
{
|
|
24
|
-
"type": "python",
|
|
25
|
-
"code": "from pathlib import Path\npath = Path('knowzcode/knowzcode_tracker.md')\ntext = path.read_text()\nlines = text.splitlines()\nheader_idx = next(i for i, line in enumerate(lines) if line.startswith('| Status |'))\ntable = lines[header_idx:]\nrows = [line for line in table if line.startswith('|')]\nupdates = {u['node_id']: u for u in inputs['updates']}\nnew_rows = []\nfor row in rows:\n parts = [p.strip() for p in row.strip('|').split('|')]\n if not parts or parts[2] == 'Node ID':\n new_rows.append(row)\n continue\n node_id = parts[2].strip('`')\n if node_id in updates:\n upd = updates[node_id]\n status = upd.get('status', parts[0].strip())\n workgroup = upd.get('workgroup_id', parts[1].strip())\n notes = upd.get('notes', parts[8].strip())\n new_row = f\"| {status} | {workgroup} | `{node_id}` | {parts[3]} | {parts[4]} | {parts[5]} | {parts[6]} | {parts[7]} | {notes} |\"\n new_rows.append(new_row)\n updates.pop(node_id)\n else:\n new_rows.append(row)\nif updates:\n missing = ', '.join(sorted(updates.keys()))\n raise ValueError(f\"NodeIDs {missing} not found in tracker table\")\nlines[header_idx:] = new_rows + lines[header_idx + len(rows):]\npath.write_text('\\n'.join(lines) + '\\n')"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tracker-update",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Applies validated updates to knowzcode/knowzcode_tracker.md while preserving table structure.",
|
|
5
|
+
"parameters": [
|
|
6
|
+
{
|
|
7
|
+
"name": "updates",
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"node_id": {"type": "string"},
|
|
13
|
+
"status": {"type": "string"},
|
|
14
|
+
"workgroup_id": {"type": "string"},
|
|
15
|
+
"notes": {"type": "string"}
|
|
16
|
+
},
|
|
17
|
+
"required": ["node_id"]
|
|
18
|
+
},
|
|
19
|
+
"required": true
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"actions": [
|
|
23
|
+
{
|
|
24
|
+
"type": "python",
|
|
25
|
+
"code": "from pathlib import Path\npath = Path('knowzcode/knowzcode_tracker.md')\ntext = path.read_text()\nlines = text.splitlines()\nheader_idx = next(i for i, line in enumerate(lines) if line.startswith('| Status |'))\ntable = lines[header_idx:]\nrows = [line for line in table if line.startswith('|')]\nupdates = {u['node_id']: u for u in inputs['updates']}\nnew_rows = []\nfor row in rows:\n parts = [p.strip() for p in row.strip('|').split('|')]\n if not parts or parts[2] == 'Node ID':\n new_rows.append(row)\n continue\n node_id = parts[2].strip('`')\n if node_id in updates:\n upd = updates[node_id]\n status = upd.get('status', parts[0].strip())\n workgroup = upd.get('workgroup_id', parts[1].strip())\n notes = upd.get('notes', parts[8].strip())\n new_row = f\"| {status} | {workgroup} | `{node_id}` | {parts[3]} | {parts[4]} | {parts[5]} | {parts[6]} | {parts[7]} | {notes} |\"\n new_rows.append(new_row)\n updates.pop(node_id)\n else:\n new_rows.append(row)\nif updates:\n missing = ', '.join(sorted(updates.keys()))\n raise ValueError(f\"NodeIDs {missing} not found in tracker table\")\nlines[header_idx:] = new_rows + lines[header_idx + len(rows):]\npath.write_text('\\n'.join(lines) + '\\n')"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "validate-installation",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Validates that KnowzCode installation completed successfully with required directories and files",
|
|
5
|
-
|
|
6
|
-
"parameters": [],
|
|
7
|
-
|
|
8
|
-
"actions": [
|
|
9
|
-
{
|
|
10
|
-
"type": "python",
|
|
11
|
-
"code": "from pathlib import Path\nimport json\n\n# Check for knowzcode directory (the primary installation target)\nknowzcode_dir = Path('knowzcode')\nerrors = []\nwarnings = []\n\n# Check directory exists\nif not knowzcode_dir.exists():\n errors.append('knowzcode/ directory not found')\n outputs['valid'] = False\n outputs['errors'] = errors\n outputs['warnings'] = warnings\n outputs['commands_count'] = 0\n outputs['skills_count'] = 0\n outputs['agents_count'] = 0\n exit()\n\n# Check required knowzcode files\nrequired_files = [\n 'knowzcode_loop.md',\n 'knowzcode_tracker.md',\n 'knowzcode_project.md',\n 'knowzcode_architecture.md'\n]\n\nfor required_file in required_files:\n if not (knowzcode_dir / required_file).exists():\n errors.append(f'Missing required file: knowzcode/{required_file}')\n\n# Check required subdirectories\nrequired_dirs = [\n 'specs',\n 'workgroups',\n 'prompts'\n]\n\nfor subdir in required_dirs:\n if not (knowzcode_dir / subdir).exists():\n warnings.append(f'Missing directory: knowzcode/{subdir}')\n\n# Check .claude directory for commands/agents (plugin or local installation)\nclaude_dir = Path('.claude')\ncommands_count = 0\nskills_count = 0\nagents_count = 0\n\nif claude_dir.exists():\n if (claude_dir / 'commands').exists():\n commands_count = len(list((claude_dir / 'commands').glob('*.md')))\n if (claude_dir / 'skills').exists():\n skills_count = len(list((claude_dir / 'skills').glob('*.json')))\n if (claude_dir / 'agents').exists():\n agents_count = len(list((claude_dir / 'agents').glob('*.md')))\n if (claude_dir / 'subagents').exists():\n agents_count += len(list((claude_dir / 'subagents').glob('*.yaml')))\n\n# Also check top-level commands/skills/agents (plugin installation)\nif Path('commands').exists():\n commands_count = max(commands_count, len(list(Path('commands').glob('*.md'))))\nif Path('skills').exists():\n skills_count = max(skills_count, len(list(Path('skills').glob('*.json'))))\nif Path('agents').exists():\n agents_count = max(agents_count, len(list(Path('agents').glob('*.md'))))\n\n# Expected minimums\nif commands_count < 5:\n warnings.append(f'Expected at least 5 commands, found {commands_count}')\nif agents_count < 10:\n warnings.append(f'Expected at least 10 agents, found {agents_count}')\n\noutputs['valid'] = len(errors) == 0\noutputs['errors'] = errors\noutputs['warnings'] = warnings\noutputs['commands_count'] = commands_count\noutputs['skills_count'] = skills_count\noutputs['agents_count'] = agents_count"
|
|
12
|
-
}
|
|
13
|
-
]
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "validate-installation",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Validates that KnowzCode installation completed successfully with required directories and files",
|
|
5
|
+
|
|
6
|
+
"parameters": [],
|
|
7
|
+
|
|
8
|
+
"actions": [
|
|
9
|
+
{
|
|
10
|
+
"type": "python",
|
|
11
|
+
"code": "from pathlib import Path\nimport json\n\n# Check for knowzcode directory (the primary installation target)\nknowzcode_dir = Path('knowzcode')\nerrors = []\nwarnings = []\n\n# Check directory exists\nif not knowzcode_dir.exists():\n errors.append('knowzcode/ directory not found')\n outputs['valid'] = False\n outputs['errors'] = errors\n outputs['warnings'] = warnings\n outputs['commands_count'] = 0\n outputs['skills_count'] = 0\n outputs['agents_count'] = 0\n exit()\n\n# Check required knowzcode files\nrequired_files = [\n 'knowzcode_loop.md',\n 'knowzcode_tracker.md',\n 'knowzcode_project.md',\n 'knowzcode_architecture.md'\n]\n\nfor required_file in required_files:\n if not (knowzcode_dir / required_file).exists():\n errors.append(f'Missing required file: knowzcode/{required_file}')\n\n# Check required subdirectories\nrequired_dirs = [\n 'specs',\n 'workgroups',\n 'prompts'\n]\n\nfor subdir in required_dirs:\n if not (knowzcode_dir / subdir).exists():\n warnings.append(f'Missing directory: knowzcode/{subdir}')\n\n# Check .claude directory for commands/agents (plugin or local installation)\nclaude_dir = Path('.claude')\ncommands_count = 0\nskills_count = 0\nagents_count = 0\n\nif claude_dir.exists():\n if (claude_dir / 'commands').exists():\n commands_count = len(list((claude_dir / 'commands').glob('*.md')))\n if (claude_dir / 'skills').exists():\n skills_count = len(list((claude_dir / 'skills').glob('*.json')))\n if (claude_dir / 'agents').exists():\n agents_count = len(list((claude_dir / 'agents').glob('*.md')))\n if (claude_dir / 'subagents').exists():\n agents_count += len(list((claude_dir / 'subagents').glob('*.yaml')))\n\n# Also check top-level commands/skills/agents (plugin installation)\nif Path('commands').exists():\n commands_count = max(commands_count, len(list(Path('commands').glob('*.md'))))\nif Path('skills').exists():\n skills_count = max(skills_count, len(list(Path('skills').glob('*.json'))))\nif Path('agents').exists():\n agents_count = max(agents_count, len(list(Path('agents').glob('*.md'))))\n\n# Expected minimums\nif commands_count < 5:\n warnings.append(f'Expected at least 5 commands, found {commands_count}')\nif agents_count < 10:\n warnings.append(f'Expected at least 10 agents, found {agents_count}')\n\noutputs['valid'] = len(errors) == 0\noutputs['errors'] = errors\noutputs['warnings'] = warnings\noutputs['commands_count'] = commands_count\noutputs['skills_count'] = skills_count\noutputs['agents_count'] = agents_count"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|