knowzcode 0.3.7 → 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 -177
- 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 -1202
- 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 -596
- 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 +1 -1
- package/skills/architecture-diff.json +1 -1
- package/skills/check-installation-status.json +1 -1
- package/skills/continue.md +126 -126
- package/skills/environment-guard.json +1 -1
- package/skills/generate-workgroup-id.json +1 -1
- package/skills/install-knowzcode.json +1 -1
- package/skills/load-core-context.json +1 -1
- package/skills/log-entry-builder.json +1 -1
- package/skills/spec-quality-check.json +1 -1
- package/skills/spec-template.json +1 -1
- package/skills/spec-validator.json +1 -1
- package/skills/start-work.md +224 -224
- package/skills/tracker-scan.json +1 -1
- package/skills/tracker-update.json +1 -1
- package/skills/validate-installation.json +1 -1
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
# KnowzCode: Refactor Node
|
|
2
|
-
|
|
3
|
-
**Target NodeID:** [The NodeID to be refactored, e.g., `API_UserSearch`]
|
|
4
|
-
**Refactoring Goal:** [The specific goal, e.g., "Improve performance by optimizing database queries"]
|
|
5
|
-
|
|
6
|
-
> **Automation Path:** Begin with `/kc-step phase=1A` targeting the `REFACTOR_<NodeID>` tracker entry to scope the Change Set before executing this prompt.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Your Mission
|
|
11
|
-
You have been assigned a technical debt task to refactor the specified `TargetNodeID`. Your goal is to improve the internal quality of the code (e.g., performance, readability, simplicity) **without changing its external behavior or interfaces.**
|
|
12
|
-
|
|
13
|
-
**CRITICAL RULE: The functional contract of the node, as defined by its existing Verification Criteria, MUST NOT change. All existing tests and verification criteria must still pass after the refactoring is complete.**
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
### Pre-Flight Check
|
|
18
|
-
Before proceeding, confirm the following:
|
|
19
|
-
* The `TargetNodeID` is in a stable, `[VERIFIED]` state in `knowzcode/knowzcode_tracker.md`.
|
|
20
|
-
* The goal is purely internal improvement, not adding features or fixing functional bugs. If this is not the case, **STOP** and inform the Orchestrator that a different protocol is required.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
### Refactoring Protocol
|
|
25
|
-
|
|
26
|
-
#### Phase 1: Planning & Setup
|
|
27
|
-
1. **Initiate Work:**
|
|
28
|
-
* In `knowzcode/knowzcode_tracker.md`, find the row for the `TargetNodeID`. Change its `Status` from `[VERIFIED]` to `[WIP]` and assign a new, unique `WorkGroupID` (e.g., `refactor-<timestamp>`).
|
|
29
|
-
2. **Review & Plan:**
|
|
30
|
-
* Thoroughly review the existing code for the `TargetNodeID`.
|
|
31
|
-
* Review its spec at `knowzcode/specs/[TargetNodeID].md`, paying close attention to the `VERIFY:` statements in the Verification Criteria section. These are your success metrics.
|
|
32
|
-
* Develop a clear internal plan for the refactoring.
|
|
33
|
-
|
|
34
|
-
#### Phase 2: Implementation & Verification
|
|
35
|
-
1. **Execute Refactoring:**
|
|
36
|
-
* Incrementally apply your planned improvements to the code.
|
|
37
|
-
* Ensure all existing functionality is preserved.
|
|
38
|
-
2. **Full Verification:**
|
|
39
|
-
* After refactoring, conduct a **full verification** against the *existing* `knowzcode/specs/[TargetNodeID].md`.
|
|
40
|
-
* All original `VERIFY:` statements from the Verification Criteria section **must** pass. This proves there have been no functional regressions.
|
|
41
|
-
* Run all associated unit and integration tests.
|
|
42
|
-
* Iterate on your refactoring until the code is improved AND all verification checks pass.
|
|
43
|
-
|
|
44
|
-
#### Phase 3: Documentation & Final Commit
|
|
45
|
-
1. **Update Specification (If Necessary):**
|
|
46
|
-
* If the internal "Core Logic" was significantly changed (e.g., a different algorithm is now used), update that section of the spec to reflect the new, cleaner approach.
|
|
47
|
-
* **Do not change the Interfaces or Verification Criteria sections.**
|
|
48
|
-
2. **Log Operation:**
|
|
49
|
-
* Prepend a `RefactorCompletion` entry to `knowzcode/knowzcode_log.md`. The entry **MUST** use the following format and an environment-sourced timestamp:
|
|
50
|
-
```markdown
|
|
51
|
-
---
|
|
52
|
-
**Type:** RefactorCompletion
|
|
53
|
-
**Timestamp:** [Generated Timestamp]
|
|
54
|
-
**WorkGroupID:** [The WorkGroupID for this refactor]
|
|
55
|
-
**NodeID(s):** [TargetNodeID]
|
|
56
|
-
**Logged By:** AI-Agent
|
|
57
|
-
**Details:**
|
|
58
|
-
- **Goal:** [Original refactoring goal].
|
|
59
|
-
- **Summary of Improvements:** [List of specific improvements made, e.g., "Replaced N+1 query with a single JOIN", "Extracted duplicated logic into a helper function"].
|
|
60
|
-
- **Verification:** Confirmed that all original Verification Criteria for the node still pass, ensuring no functional regressions.
|
|
61
|
-
---
|
|
62
|
-
```
|
|
63
|
-
3. **Update Tracker & Finalize:**
|
|
64
|
-
* In `knowzcode/knowzcode_tracker.md`:
|
|
65
|
-
* Find the row for `TargetNodeID`, change its `Status` back to `[VERIFIED]`, and clear its `WorkGroupID`.
|
|
66
|
-
* If a `REFACTOR_[TargetNodeID]` task exists, **delete that entire row** from the tracker.
|
|
67
|
-
4. **Final Commit:**
|
|
68
|
-
* Commit all changes (code, spec updates, log, tracker) with a descriptive `refactor:` message (e.g., `refactor(API_UserSearch): Optimize query performance`).
|
|
69
|
-
|
|
70
|
-
### Final Report
|
|
71
|
-
* Once all steps are complete, provide a concise confirmation report.
|
|
72
|
-
> "✓ Refactoring of `[TargetNodeID]` is complete. The technical debt task has been resolved, logged, and committed. The tracker has been updated."
|
|
1
|
+
# KnowzCode: Refactor Node
|
|
2
|
+
|
|
3
|
+
**Target NodeID:** [The NodeID to be refactored, e.g., `API_UserSearch`]
|
|
4
|
+
**Refactoring Goal:** [The specific goal, e.g., "Improve performance by optimizing database queries"]
|
|
5
|
+
|
|
6
|
+
> **Automation Path:** Begin with `/kc-step phase=1A` targeting the `REFACTOR_<NodeID>` tracker entry to scope the Change Set before executing this prompt.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Your Mission
|
|
11
|
+
You have been assigned a technical debt task to refactor the specified `TargetNodeID`. Your goal is to improve the internal quality of the code (e.g., performance, readability, simplicity) **without changing its external behavior or interfaces.**
|
|
12
|
+
|
|
13
|
+
**CRITICAL RULE: The functional contract of the node, as defined by its existing Verification Criteria, MUST NOT change. All existing tests and verification criteria must still pass after the refactoring is complete.**
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
### Pre-Flight Check
|
|
18
|
+
Before proceeding, confirm the following:
|
|
19
|
+
* The `TargetNodeID` is in a stable, `[VERIFIED]` state in `knowzcode/knowzcode_tracker.md`.
|
|
20
|
+
* The goal is purely internal improvement, not adding features or fixing functional bugs. If this is not the case, **STOP** and inform the Orchestrator that a different protocol is required.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### Refactoring Protocol
|
|
25
|
+
|
|
26
|
+
#### Phase 1: Planning & Setup
|
|
27
|
+
1. **Initiate Work:**
|
|
28
|
+
* In `knowzcode/knowzcode_tracker.md`, find the row for the `TargetNodeID`. Change its `Status` from `[VERIFIED]` to `[WIP]` and assign a new, unique `WorkGroupID` (e.g., `refactor-<timestamp>`).
|
|
29
|
+
2. **Review & Plan:**
|
|
30
|
+
* Thoroughly review the existing code for the `TargetNodeID`.
|
|
31
|
+
* Review its spec at `knowzcode/specs/[TargetNodeID].md`, paying close attention to the `VERIFY:` statements in the Verification Criteria section. These are your success metrics.
|
|
32
|
+
* Develop a clear internal plan for the refactoring.
|
|
33
|
+
|
|
34
|
+
#### Phase 2: Implementation & Verification
|
|
35
|
+
1. **Execute Refactoring:**
|
|
36
|
+
* Incrementally apply your planned improvements to the code.
|
|
37
|
+
* Ensure all existing functionality is preserved.
|
|
38
|
+
2. **Full Verification:**
|
|
39
|
+
* After refactoring, conduct a **full verification** against the *existing* `knowzcode/specs/[TargetNodeID].md`.
|
|
40
|
+
* All original `VERIFY:` statements from the Verification Criteria section **must** pass. This proves there have been no functional regressions.
|
|
41
|
+
* Run all associated unit and integration tests.
|
|
42
|
+
* Iterate on your refactoring until the code is improved AND all verification checks pass.
|
|
43
|
+
|
|
44
|
+
#### Phase 3: Documentation & Final Commit
|
|
45
|
+
1. **Update Specification (If Necessary):**
|
|
46
|
+
* If the internal "Core Logic" was significantly changed (e.g., a different algorithm is now used), update that section of the spec to reflect the new, cleaner approach.
|
|
47
|
+
* **Do not change the Interfaces or Verification Criteria sections.**
|
|
48
|
+
2. **Log Operation:**
|
|
49
|
+
* Prepend a `RefactorCompletion` entry to `knowzcode/knowzcode_log.md`. The entry **MUST** use the following format and an environment-sourced timestamp:
|
|
50
|
+
```markdown
|
|
51
|
+
---
|
|
52
|
+
**Type:** RefactorCompletion
|
|
53
|
+
**Timestamp:** [Generated Timestamp]
|
|
54
|
+
**WorkGroupID:** [The WorkGroupID for this refactor]
|
|
55
|
+
**NodeID(s):** [TargetNodeID]
|
|
56
|
+
**Logged By:** AI-Agent
|
|
57
|
+
**Details:**
|
|
58
|
+
- **Goal:** [Original refactoring goal].
|
|
59
|
+
- **Summary of Improvements:** [List of specific improvements made, e.g., "Replaced N+1 query with a single JOIN", "Extracted duplicated logic into a helper function"].
|
|
60
|
+
- **Verification:** Confirmed that all original Verification Criteria for the node still pass, ensuring no functional regressions.
|
|
61
|
+
---
|
|
62
|
+
```
|
|
63
|
+
3. **Update Tracker & Finalize:**
|
|
64
|
+
* In `knowzcode/knowzcode_tracker.md`:
|
|
65
|
+
* Find the row for `TargetNodeID`, change its `Status` back to `[VERIFIED]`, and clear its `WorkGroupID`.
|
|
66
|
+
* If a `REFACTOR_[TargetNodeID]` task exists, **delete that entire row** from the tracker.
|
|
67
|
+
4. **Final Commit:**
|
|
68
|
+
* Commit all changes (code, spec updates, log, tracker) with a descriptive `refactor:` message (e.g., `refactor(API_UserSearch): Optimize query performance`).
|
|
69
|
+
|
|
70
|
+
### Final Report
|
|
71
|
+
* Once all steps are complete, provide a concise confirmation report.
|
|
72
|
+
> "✓ Refactoring of `[TargetNodeID]` is complete. The technical debt task has been resolved, logged, and committed. The tracker has been updated."
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
# KnowzCode: Spec Verification Checkpoint
|
|
2
|
-
|
|
3
|
-
**WorkGroupID for Verification:**
|
|
4
|
-
[Orchestrator: Re-state the `WorkGroupID` that requires specification verification.]
|
|
5
|
-
|
|
6
|
-
> **Automation Path:** Use `/kc-audit audit=spec workgroup_id=<ID>` to run the `reviewer` subagent against the draft specs before implementation.
|
|
7
|
-
|
|
8
|
-
**WorkGroupID:** `[wip-timestamp-to-verify]`
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Your Mission
|
|
13
|
-
This is a **READ-ONLY** quality gate to ensure all specifications for the given `WorkGroupID` are complete and ready for implementation. You must systematically check every spec file associated with the WorkGroupID against the quality criteria.
|
|
14
|
-
|
|
15
|
-
**CRITICAL RULE: You MUST NOT modify any files during this check. This is a verification step, not a correction step.**
|
|
16
|
-
|
|
17
|
-
**Reference:** Your actions are governed by `knowzcode_loop.md`, executing the quality check defined in **Step 3.5**.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
### Execution Protocol
|
|
22
|
-
|
|
23
|
-
1. **Identify Scope:**
|
|
24
|
-
* Using the `WorkGroupID`, identify all `NodeID`s from `knowzcode_tracker.md` that are part of this verification task.
|
|
25
|
-
|
|
26
|
-
2. **Systematic Spec Review:**
|
|
27
|
-
* For **each** `NodeID` in the scope, read its corresponding `specs/[NodeID].md` file.
|
|
28
|
-
* Verify the following for each file:
|
|
29
|
-
* **Existence:** Does the spec file actually exist?
|
|
30
|
-
* **Completeness:** Are all 4 sections filled out? (Rules & Decisions, Interfaces, Verification Criteria, Debt & Gaps). Legacy 7-section format also accepted.
|
|
31
|
-
* **Clarity:** Are the `VERIFY:` statements (or legacy `ARC_XXX_01:` criteria) specific, testable, and unambiguous? Minimum 2 VERIFY: statements per spec.
|
|
32
|
-
* **Consistency:** Do the dependencies listed in Interfaces align with the Change Set?
|
|
33
|
-
|
|
34
|
-
3. **Synthesize Findings & Report:**
|
|
35
|
-
* After reviewing all specs, compile a single report summarizing the overall quality.
|
|
36
|
-
|
|
37
|
-
### Reporting
|
|
38
|
-
|
|
39
|
-
* **On Success:** If all specs are present, complete, and meet quality standards.
|
|
40
|
-
* **Success Report:**
|
|
41
|
-
> "Specification Verification Checkpoint for `WorkGroupID: [ID]` is complete. All specs are present, complete, and meet quality standards. Ready to proceed to implementation. Awaiting the `[LOOP_2A]__Implement_Change_Set.md` command."
|
|
42
|
-
|
|
43
|
-
* **On Issues Found:** If any specs are missing, incomplete, or have quality issues.
|
|
44
|
-
* **Issues Report:**
|
|
45
|
-
> "Specification Verification Checkpoint for `WorkGroupID: [ID]` is complete. The following issues were found:
|
|
46
|
-
>
|
|
47
|
-
> * **Missing Specs:**
|
|
48
|
-
> * `[NodeID_X]`
|
|
49
|
-
> * **Incomplete Specs:**
|
|
50
|
-
> * `[NodeID_Y]`: 'Verification Criteria' section is empty or has <2 VERIFY: statements.
|
|
51
|
-
> * `[NodeID_Z]`: 'Rules & Decisions' section contains only placeholder text.
|
|
52
|
-
>
|
|
53
|
-
> Recommendation: Return to `LOOP 1B` to address these specification issues before proceeding with implementation."
|
|
54
|
-
|
|
55
|
-
### Final State
|
|
56
|
-
|
|
57
|
-
* Upon completion of your report, you will **PAUSE**.
|
|
58
|
-
* The Orchestrator will decide whether to proceed to Loop 2A or return to Loop 1B to fix the specs.
|
|
59
|
-
---
|
|
1
|
+
# KnowzCode: Spec Verification Checkpoint
|
|
2
|
+
|
|
3
|
+
**WorkGroupID for Verification:**
|
|
4
|
+
[Orchestrator: Re-state the `WorkGroupID` that requires specification verification.]
|
|
5
|
+
|
|
6
|
+
> **Automation Path:** Use `/kc-audit audit=spec workgroup_id=<ID>` to run the `reviewer` subagent against the draft specs before implementation.
|
|
7
|
+
|
|
8
|
+
**WorkGroupID:** `[wip-timestamp-to-verify]`
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Your Mission
|
|
13
|
+
This is a **READ-ONLY** quality gate to ensure all specifications for the given `WorkGroupID` are complete and ready for implementation. You must systematically check every spec file associated with the WorkGroupID against the quality criteria.
|
|
14
|
+
|
|
15
|
+
**CRITICAL RULE: You MUST NOT modify any files during this check. This is a verification step, not a correction step.**
|
|
16
|
+
|
|
17
|
+
**Reference:** Your actions are governed by `knowzcode_loop.md`, executing the quality check defined in **Step 3.5**.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Execution Protocol
|
|
22
|
+
|
|
23
|
+
1. **Identify Scope:**
|
|
24
|
+
* Using the `WorkGroupID`, identify all `NodeID`s from `knowzcode_tracker.md` that are part of this verification task.
|
|
25
|
+
|
|
26
|
+
2. **Systematic Spec Review:**
|
|
27
|
+
* For **each** `NodeID` in the scope, read its corresponding `specs/[NodeID].md` file.
|
|
28
|
+
* Verify the following for each file:
|
|
29
|
+
* **Existence:** Does the spec file actually exist?
|
|
30
|
+
* **Completeness:** Are all 4 sections filled out? (Rules & Decisions, Interfaces, Verification Criteria, Debt & Gaps). Legacy 7-section format also accepted.
|
|
31
|
+
* **Clarity:** Are the `VERIFY:` statements (or legacy `ARC_XXX_01:` criteria) specific, testable, and unambiguous? Minimum 2 VERIFY: statements per spec.
|
|
32
|
+
* **Consistency:** Do the dependencies listed in Interfaces align with the Change Set?
|
|
33
|
+
|
|
34
|
+
3. **Synthesize Findings & Report:**
|
|
35
|
+
* After reviewing all specs, compile a single report summarizing the overall quality.
|
|
36
|
+
|
|
37
|
+
### Reporting
|
|
38
|
+
|
|
39
|
+
* **On Success:** If all specs are present, complete, and meet quality standards.
|
|
40
|
+
* **Success Report:**
|
|
41
|
+
> "Specification Verification Checkpoint for `WorkGroupID: [ID]` is complete. All specs are present, complete, and meet quality standards. Ready to proceed to implementation. Awaiting the `[LOOP_2A]__Implement_Change_Set.md` command."
|
|
42
|
+
|
|
43
|
+
* **On Issues Found:** If any specs are missing, incomplete, or have quality issues.
|
|
44
|
+
* **Issues Report:**
|
|
45
|
+
> "Specification Verification Checkpoint for `WorkGroupID: [ID]` is complete. The following issues were found:
|
|
46
|
+
>
|
|
47
|
+
> * **Missing Specs:**
|
|
48
|
+
> * `[NodeID_X]`
|
|
49
|
+
> * **Incomplete Specs:**
|
|
50
|
+
> * `[NodeID_Y]`: 'Verification Criteria' section is empty or has <2 VERIFY: statements.
|
|
51
|
+
> * `[NodeID_Z]`: 'Rules & Decisions' section contains only placeholder text.
|
|
52
|
+
>
|
|
53
|
+
> Recommendation: Return to `LOOP 1B` to address these specification issues before proceeding with implementation."
|
|
54
|
+
|
|
55
|
+
### Final State
|
|
56
|
+
|
|
57
|
+
* Upon completion of your report, you will **PAUSE**.
|
|
58
|
+
* The Orchestrator will decide whether to proceed to Loop 2A or return to Loop 1B to fix the specs.
|
|
59
|
+
---
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
# KnowzCode: [LOOP 1A] Propose Change Set
|
|
2
|
-
|
|
3
|
-
**Primary Goal:** [Orchestrator: Re-state the confirmed feature or task, e.g., "Implement a user logout button and its backend logic."]
|
|
4
|
-
|
|
5
|
-
> **Automation Path:** Run `/kc-step phase=1A` to engage the `analyst` subagent with the `load-core-context`, `tracker-scan`, and `generate-workgroup-id` skills preloaded. Review the summary in `knowzcode/automation_manifest.md` if you need a refresher on available helpers.
|
|
6
|
-
|
|
7
|
-
**Remember:**
|
|
8
|
-
- Inspect existing specs in `knowzcode/specs/` for every impacted NodeID and note gaps.
|
|
9
|
-
- Log discovery tasks in `knowzcode/workgroups/<WorkGroupID>.md` — each line must start with `KnowzCode:` so todos stay visible on-screen.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Your Mission
|
|
14
|
-
You have been given a `PrimaryGoal`. Your sole objective for this step is to perform a system-wide impact analysis and propose a complete "Change Set" required to achieve this goal. This is the first critical step of the KnowzCode development loop.
|
|
15
|
-
|
|
16
|
-
**CRITICAL RULE: Your work in this phase is strictly limited to updating KnowzCode's own project and specification files (`.md` files). You MUST NOT write or modify any application source code (e.g., `.js`, `.py`, `.html` files).**
|
|
17
|
-
|
|
18
|
-
**Reference:** Your actions are governed by `knowzcode_loop.md`, specifically **Steps 1.2 and 1.3**.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
### Step 1: Analyze System-Wide Impact (Ref: `knowzcode_loop.md` - Step 1.2)
|
|
23
|
-
|
|
24
|
-
* Thoroughly analyze the `PrimaryGoal` in the context of the entire project, including `knowzcode_architecture.md`, `knowzcode_tracker.md`, and all files in the `specs/` directory.
|
|
25
|
-
* Your analysis **MUST** identify the complete Change Set, which includes:
|
|
26
|
-
1. All **new `NodeID`s** that must be created.
|
|
27
|
-
2. All **existing `NodeID`s** that will be impacted or require modification. This includes nodes that are currently `[TESTED]` or `[TODO]` but whose specifications or code will need to be updated to support the new feature.
|
|
28
|
-
|
|
29
|
-
### Step 2: Propose the Change Set for Orchestrator Review (Ref: `knowzcode_loop.md` - Step 1.3)
|
|
30
|
-
|
|
31
|
-
* Synthesize your analysis into a clear, itemized list for the Orchestrator.
|
|
32
|
-
* For each existing node, you **must** briefly state its current status and the reason for its inclusion (e.g., "modify to add new endpoint," "update spec to handle new state").
|
|
33
|
-
* Present this list as the final proposed Change Set.
|
|
34
|
-
|
|
35
|
-
**Example Response Format:**
|
|
36
|
-
> "Analysis complete. To achieve the goal of '[PrimaryGoal]', I propose the following Change Set for your approval:
|
|
37
|
-
>
|
|
38
|
-
> * **New Nodes to Create:**
|
|
39
|
-
> * `UI_LogoutButton`: The user-facing button component.
|
|
40
|
-
> * `API_LogoutEndpoint`: The backend endpoint to handle the logout request.
|
|
41
|
-
> * **Existing Nodes to be Modified (will become part of the Work Group):**
|
|
42
|
-
> * `SVC_AuthSession` (Status: `[VERIFIED]`): Will be modified to add a method for invalidating a user's session.
|
|
43
|
-
> * `UI_Navbar` (Status: `[VERIFIED]`): The spec and code will be updated to include the new `UI_LogoutButton`.
|
|
44
|
-
>
|
|
45
|
-
> Please review and confirm this complete Change Set. Your confirmation via the `[LOOP 1B]` prompt will authorize me to mark all these nodes as `[WIP]` and proceed."
|
|
46
|
-
|
|
47
|
-
### Step 3: Pause for Confirmation
|
|
48
|
-
|
|
49
|
-
* **Your work for this prompt is now complete.**
|
|
50
|
-
* You will now **PAUSE** and await the Orchestrator's next command, which will be **`[LOOP_1B]__Draft_Specs.md`**. Do not take any further action.
|
|
51
|
-
|
|
52
|
-
---
|
|
1
|
+
# KnowzCode: [LOOP 1A] Propose Change Set
|
|
2
|
+
|
|
3
|
+
**Primary Goal:** [Orchestrator: Re-state the confirmed feature or task, e.g., "Implement a user logout button and its backend logic."]
|
|
4
|
+
|
|
5
|
+
> **Automation Path:** Run `/kc-step phase=1A` to engage the `analyst` subagent with the `load-core-context`, `tracker-scan`, and `generate-workgroup-id` skills preloaded. Review the summary in `knowzcode/automation_manifest.md` if you need a refresher on available helpers.
|
|
6
|
+
|
|
7
|
+
**Remember:**
|
|
8
|
+
- Inspect existing specs in `knowzcode/specs/` for every impacted NodeID and note gaps.
|
|
9
|
+
- Log discovery tasks in `knowzcode/workgroups/<WorkGroupID>.md` — each line must start with `KnowzCode:` so todos stay visible on-screen.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Your Mission
|
|
14
|
+
You have been given a `PrimaryGoal`. Your sole objective for this step is to perform a system-wide impact analysis and propose a complete "Change Set" required to achieve this goal. This is the first critical step of the KnowzCode development loop.
|
|
15
|
+
|
|
16
|
+
**CRITICAL RULE: Your work in this phase is strictly limited to updating KnowzCode's own project and specification files (`.md` files). You MUST NOT write or modify any application source code (e.g., `.js`, `.py`, `.html` files).**
|
|
17
|
+
|
|
18
|
+
**Reference:** Your actions are governed by `knowzcode_loop.md`, specifically **Steps 1.2 and 1.3**.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Step 1: Analyze System-Wide Impact (Ref: `knowzcode_loop.md` - Step 1.2)
|
|
23
|
+
|
|
24
|
+
* Thoroughly analyze the `PrimaryGoal` in the context of the entire project, including `knowzcode_architecture.md`, `knowzcode_tracker.md`, and all files in the `specs/` directory.
|
|
25
|
+
* Your analysis **MUST** identify the complete Change Set, which includes:
|
|
26
|
+
1. All **new `NodeID`s** that must be created.
|
|
27
|
+
2. All **existing `NodeID`s** that will be impacted or require modification. This includes nodes that are currently `[TESTED]` or `[TODO]` but whose specifications or code will need to be updated to support the new feature.
|
|
28
|
+
|
|
29
|
+
### Step 2: Propose the Change Set for Orchestrator Review (Ref: `knowzcode_loop.md` - Step 1.3)
|
|
30
|
+
|
|
31
|
+
* Synthesize your analysis into a clear, itemized list for the Orchestrator.
|
|
32
|
+
* For each existing node, you **must** briefly state its current status and the reason for its inclusion (e.g., "modify to add new endpoint," "update spec to handle new state").
|
|
33
|
+
* Present this list as the final proposed Change Set.
|
|
34
|
+
|
|
35
|
+
**Example Response Format:**
|
|
36
|
+
> "Analysis complete. To achieve the goal of '[PrimaryGoal]', I propose the following Change Set for your approval:
|
|
37
|
+
>
|
|
38
|
+
> * **New Nodes to Create:**
|
|
39
|
+
> * `UI_LogoutButton`: The user-facing button component.
|
|
40
|
+
> * `API_LogoutEndpoint`: The backend endpoint to handle the logout request.
|
|
41
|
+
> * **Existing Nodes to be Modified (will become part of the Work Group):**
|
|
42
|
+
> * `SVC_AuthSession` (Status: `[VERIFIED]`): Will be modified to add a method for invalidating a user's session.
|
|
43
|
+
> * `UI_Navbar` (Status: `[VERIFIED]`): The spec and code will be updated to include the new `UI_LogoutButton`.
|
|
44
|
+
>
|
|
45
|
+
> Please review and confirm this complete Change Set. Your confirmation via the `[LOOP 1B]` prompt will authorize me to mark all these nodes as `[WIP]` and proceed."
|
|
46
|
+
|
|
47
|
+
### Step 3: Pause for Confirmation
|
|
48
|
+
|
|
49
|
+
* **Your work for this prompt is now complete.**
|
|
50
|
+
* You will now **PAUSE** and await the Orchestrator's next command, which will be **`[LOOP_1B]__Draft_Specs.md`**. Do not take any further action.
|
|
51
|
+
|
|
52
|
+
---
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
# KnowzCode: [LOOP 1B] Authorize Change Set & Draft Specs
|
|
2
|
-
|
|
3
|
-
**Confirmed Change Set:**
|
|
4
|
-
[Orchestrator: Copy and paste the *exact* Change Set that the agent proposed and you are approving. This serves as the official, unambiguous authorization.]
|
|
5
|
-
|
|
6
|
-
> **Automation Path:** Invoke `/kc-step phase=1B workgroup_id=<ID>` to delegate to the `architect` subagent. This automatically applies the `spec-template`, `spec-quality-check`, and `tracker-update` skills before presenting draft specs.
|
|
7
|
-
|
|
8
|
-
**Remember:**
|
|
9
|
-
- Update each affected spec in `knowzcode/specs/` using the lean 4-section template (Rules & Decisions, Interfaces, Verification Criteria, Debt & Gaps).
|
|
10
|
-
- Capture spec todo items in `knowzcode/workgroups/<WorkGroupID>.md` (prefix every bullet with `KnowzCode:`).
|
|
11
|
-
|
|
12
|
-
* **New Nodes to Create:**
|
|
13
|
-
* `[NodeID_A]`
|
|
14
|
-
* `[NodeID_B]`
|
|
15
|
-
* **Existing Nodes to be Modified:**
|
|
16
|
-
* `[NodeID_C]` (Status: `[VERIFIED]`)
|
|
17
|
-
* `[NodeID_D]` (Status: `[TODO]`)
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Your Mission
|
|
22
|
-
The Change Set has been confirmed. Your first action is to **update the `knowzcode_tracker.md`** to reflect the start of this work. Then, proceed to draft or refine all required specifications directly in their respective files.
|
|
23
|
-
|
|
24
|
-
**CRITICAL RULE: Your work in this phase is strictly limited to updating KnowzCode's own project and specification files (`.md` files). You MUST NOT write or modify any application source code (e.g., `.js`, `.py`, `.html` files).**
|
|
25
|
-
|
|
26
|
-
**Reference:** Your actions are governed by `knowzcode_loop.md`, executing the sequence from **Step 1.4 to Step 3**.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
### Step 1: Establish Work Group & Update Tracker (Ref: `knowzcode_loop.md` - Step 1.4)
|
|
31
|
-
|
|
32
|
-
* Generate a single, unique `WorkGroupID` for this session (e.g., `wip-<timestamp>`).
|
|
33
|
-
* In `knowzcode_tracker.md`, immediately update every node listed in the confirmed Change Set above:
|
|
34
|
-
1. Set its `Status` to `[WIP]`.
|
|
35
|
-
2. Assign the new `WorkGroupID` to it.
|
|
36
|
-
* This action formally begins the work session and reserves the nodes for this task.
|
|
37
|
-
|
|
38
|
-
### Step 2: Draft and Refine Specifications (Ref: `knowzcode_loop.md` - Steps 2 & 3)
|
|
39
|
-
|
|
40
|
-
* Now that the tracker is updated, execute a **full Context Assembly (Step 2)** from the loop to gather all necessary information for the entire Change Set.
|
|
41
|
-
* Proceed to **Specification Management (Step 3)**:
|
|
42
|
-
* For each **new** node in the Change Set, **create and write** its complete specification to a new file at `specs/[NodeID].md`.
|
|
43
|
-
* For each **existing** node in the Change Set, **read, modify, and save** its specification file at `specs/[NodeID].md`.
|
|
44
|
-
|
|
45
|
-
### Step 3: Report Readiness for Review (Ref: `knowzcode_loop.md` - Step 3.3)
|
|
46
|
-
|
|
47
|
-
* Once all spec files for the *entire* Change Set have been created or updated, **do not output their contents.**
|
|
48
|
-
* Instead, report that the administrative and drafting phases are complete, providing a clear list of the files that are now ready for the Orchestrator's review.
|
|
49
|
-
|
|
50
|
-
**Example Response Format:**
|
|
51
|
-
> "Authorization received. The `knowzcode_tracker.md` has been updated and all nodes in `WorkGroupID: [ID]` are now marked as `[WIP]`.
|
|
52
|
-
>
|
|
53
|
-
> The specification drafting and refinement phase is also complete. The following files are now ready for your review in the `specs/` directory:
|
|
54
|
-
>
|
|
55
|
-
> * **New Specs Created:**
|
|
56
|
-
> * `specs/[NodeID_A].md`
|
|
57
|
-
> * `specs/[NodeID_B].md`
|
|
58
|
-
> * **Existing Specs Modified:**
|
|
59
|
-
> * `specs/[NodeID_C].md`
|
|
60
|
-
> * `specs/[NodeID_D].md`
|
|
61
|
-
>
|
|
62
|
-
> Please review these files at your convenience. Based on a Change Set size of [Number] nodes, I recommend we proceed to [Spec Verification Checkpoint | LOOP 2A]. Your approval via the next prompt will authorize the next step."
|
|
63
|
-
|
|
64
|
-
### Step 4: Verification Recommendation
|
|
65
|
-
* **Assess the Change Set size.**
|
|
66
|
-
* If the Change Set involves **10 or more NodeIDs**, recommend that the Orchestrator runs the **`Spec_Verification_Checkpoint.md`** prompt next.
|
|
67
|
-
* If the Change Set is **5-9 NodeIDs**, note that the checkpoint is optional but suggested.
|
|
68
|
-
* For **<5 NodeIDs**, proceed directly to Loop 2.
|
|
69
|
-
|
|
70
|
-
### Step 5: Pause for Approval
|
|
71
|
-
|
|
72
|
-
* **Your work for this prompt is now complete.**
|
|
73
|
-
* You will now **PAUSE** and await the Orchestrator's next command. This will either be the **Spec Verification Checkpoint** for large change sets, or **`[LOOP_2A]__Implement_Change_Set.md`** to begin implementation. Do not take any further action.
|
|
74
|
-
|
|
75
|
-
---
|
|
1
|
+
# KnowzCode: [LOOP 1B] Authorize Change Set & Draft Specs
|
|
2
|
+
|
|
3
|
+
**Confirmed Change Set:**
|
|
4
|
+
[Orchestrator: Copy and paste the *exact* Change Set that the agent proposed and you are approving. This serves as the official, unambiguous authorization.]
|
|
5
|
+
|
|
6
|
+
> **Automation Path:** Invoke `/kc-step phase=1B workgroup_id=<ID>` to delegate to the `architect` subagent. This automatically applies the `spec-template`, `spec-quality-check`, and `tracker-update` skills before presenting draft specs.
|
|
7
|
+
|
|
8
|
+
**Remember:**
|
|
9
|
+
- Update each affected spec in `knowzcode/specs/` using the lean 4-section template (Rules & Decisions, Interfaces, Verification Criteria, Debt & Gaps).
|
|
10
|
+
- Capture spec todo items in `knowzcode/workgroups/<WorkGroupID>.md` (prefix every bullet with `KnowzCode:`).
|
|
11
|
+
|
|
12
|
+
* **New Nodes to Create:**
|
|
13
|
+
* `[NodeID_A]`
|
|
14
|
+
* `[NodeID_B]`
|
|
15
|
+
* **Existing Nodes to be Modified:**
|
|
16
|
+
* `[NodeID_C]` (Status: `[VERIFIED]`)
|
|
17
|
+
* `[NodeID_D]` (Status: `[TODO]`)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Your Mission
|
|
22
|
+
The Change Set has been confirmed. Your first action is to **update the `knowzcode_tracker.md`** to reflect the start of this work. Then, proceed to draft or refine all required specifications directly in their respective files.
|
|
23
|
+
|
|
24
|
+
**CRITICAL RULE: Your work in this phase is strictly limited to updating KnowzCode's own project and specification files (`.md` files). You MUST NOT write or modify any application source code (e.g., `.js`, `.py`, `.html` files).**
|
|
25
|
+
|
|
26
|
+
**Reference:** Your actions are governed by `knowzcode_loop.md`, executing the sequence from **Step 1.4 to Step 3**.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### Step 1: Establish Work Group & Update Tracker (Ref: `knowzcode_loop.md` - Step 1.4)
|
|
31
|
+
|
|
32
|
+
* Generate a single, unique `WorkGroupID` for this session (e.g., `wip-<timestamp>`).
|
|
33
|
+
* In `knowzcode_tracker.md`, immediately update every node listed in the confirmed Change Set above:
|
|
34
|
+
1. Set its `Status` to `[WIP]`.
|
|
35
|
+
2. Assign the new `WorkGroupID` to it.
|
|
36
|
+
* This action formally begins the work session and reserves the nodes for this task.
|
|
37
|
+
|
|
38
|
+
### Step 2: Draft and Refine Specifications (Ref: `knowzcode_loop.md` - Steps 2 & 3)
|
|
39
|
+
|
|
40
|
+
* Now that the tracker is updated, execute a **full Context Assembly (Step 2)** from the loop to gather all necessary information for the entire Change Set.
|
|
41
|
+
* Proceed to **Specification Management (Step 3)**:
|
|
42
|
+
* For each **new** node in the Change Set, **create and write** its complete specification to a new file at `specs/[NodeID].md`.
|
|
43
|
+
* For each **existing** node in the Change Set, **read, modify, and save** its specification file at `specs/[NodeID].md`.
|
|
44
|
+
|
|
45
|
+
### Step 3: Report Readiness for Review (Ref: `knowzcode_loop.md` - Step 3.3)
|
|
46
|
+
|
|
47
|
+
* Once all spec files for the *entire* Change Set have been created or updated, **do not output their contents.**
|
|
48
|
+
* Instead, report that the administrative and drafting phases are complete, providing a clear list of the files that are now ready for the Orchestrator's review.
|
|
49
|
+
|
|
50
|
+
**Example Response Format:**
|
|
51
|
+
> "Authorization received. The `knowzcode_tracker.md` has been updated and all nodes in `WorkGroupID: [ID]` are now marked as `[WIP]`.
|
|
52
|
+
>
|
|
53
|
+
> The specification drafting and refinement phase is also complete. The following files are now ready for your review in the `specs/` directory:
|
|
54
|
+
>
|
|
55
|
+
> * **New Specs Created:**
|
|
56
|
+
> * `specs/[NodeID_A].md`
|
|
57
|
+
> * `specs/[NodeID_B].md`
|
|
58
|
+
> * **Existing Specs Modified:**
|
|
59
|
+
> * `specs/[NodeID_C].md`
|
|
60
|
+
> * `specs/[NodeID_D].md`
|
|
61
|
+
>
|
|
62
|
+
> Please review these files at your convenience. Based on a Change Set size of [Number] nodes, I recommend we proceed to [Spec Verification Checkpoint | LOOP 2A]. Your approval via the next prompt will authorize the next step."
|
|
63
|
+
|
|
64
|
+
### Step 4: Verification Recommendation
|
|
65
|
+
* **Assess the Change Set size.**
|
|
66
|
+
* If the Change Set involves **10 or more NodeIDs**, recommend that the Orchestrator runs the **`Spec_Verification_Checkpoint.md`** prompt next.
|
|
67
|
+
* If the Change Set is **5-9 NodeIDs**, note that the checkpoint is optional but suggested.
|
|
68
|
+
* For **<5 NodeIDs**, proceed directly to Loop 2.
|
|
69
|
+
|
|
70
|
+
### Step 5: Pause for Approval
|
|
71
|
+
|
|
72
|
+
* **Your work for this prompt is now complete.**
|
|
73
|
+
* You will now **PAUSE** and await the Orchestrator's next command. This will either be the **Spec Verification Checkpoint** for large change sets, or **`[LOOP_2A]__Implement_Change_Set.md`** to begin implementation. Do not take any further action.
|
|
74
|
+
|
|
75
|
+
---
|