knowzcode 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +6 -3
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +43 -5
- package/agents/architect.md +26 -5
- package/agents/context-scout.md +1 -1
- package/agents/project-advisor.md +110 -0
- package/agents/security-officer.md +194 -0
- package/agents/test-advisor.md +162 -0
- package/commands/audit.md +101 -12
- package/commands/init.md +116 -1
- package/commands/plan.md +23 -10
- package/commands/work.md +235 -48
- package/knowzcode/claude_code_execution.md +64 -1
- package/knowzcode/copilot_execution.md +231 -0
- package/knowzcode/enterprise/compliance_manifest.md +3 -0
- package/knowzcode/knowzcode_loop.md +3 -1
- package/knowzcode/knowzcode_orchestration.md +66 -0
- package/knowzcode/platform_adapters.md +588 -26
- package/package.json +1 -1
- package/skills/alias-resolver.json +1 -1
- package/skills/architecture-diff.json +1 -1
- package/skills/check-installation-status.json +1 -1
- package/skills/continue.md +2 -1
- package/skills/environment-guard.json +1 -1
- package/skills/generate-workgroup-id.json +1 -1
- package/skills/install-knowzcode.json +1 -1
- package/skills/load-core-context.json +1 -1
- package/skills/log-entry-builder.json +1 -1
- package/skills/spec-quality-check.json +1 -1
- package/skills/spec-template.json +1 -1
- package/skills/spec-validator.json +1 -1
- package/skills/tracker-scan.json +1 -1
- package/skills/tracker-update.json +1 -1
- package/skills/validate-installation.json +1 -1
|
@@ -313,51 +313,613 @@ Before any feature work, read:
|
|
|
313
313
|
|
|
314
314
|
---
|
|
315
315
|
|
|
316
|
-
## GitHub Copilot (.github/copilot-instructions.md)
|
|
316
|
+
## GitHub Copilot (.github/copilot-instructions.md + .github/prompts/*.prompt.md)
|
|
317
317
|
|
|
318
|
-
|
|
318
|
+
GitHub Copilot (2026) supports three instruction mechanisms used by KnowzCode:
|
|
319
|
+
|
|
320
|
+
1. **`.github/copilot-instructions.md`** — Repository-level instructions, always active
|
|
321
|
+
2. **`.github/prompts/*.prompt.md`** — Custom prompts invocable via `#prompt:name` in VS Code
|
|
322
|
+
3. **MCP server tools** (`.vscode/mcp.json`) — Tool access for vault queries
|
|
323
|
+
|
|
324
|
+
Copilot operates as a **single-agent, sequential** platform — no multi-agent orchestration. Users manually transition between phases using prompt files. See `knowzcode/copilot_execution.md` for the full execution model.
|
|
325
|
+
|
|
326
|
+
### A. copilot-instructions.md
|
|
327
|
+
|
|
328
|
+
Create `.github/copilot-instructions.md`:
|
|
319
329
|
|
|
320
330
|
```markdown
|
|
331
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
332
|
+
|
|
321
333
|
# KnowzCode Development Methodology
|
|
322
334
|
|
|
323
|
-
This repository uses KnowzCode for structured TDD development.
|
|
335
|
+
This repository uses KnowzCode for structured TDD development with quality gates.
|
|
336
|
+
|
|
337
|
+
## Required Reading
|
|
338
|
+
- `knowzcode/knowzcode_loop.md` — Complete methodology (read first)
|
|
339
|
+
- `knowzcode/knowzcode_project.md` — Project context and tech stack
|
|
340
|
+
- `knowzcode/knowzcode_architecture.md` — Architecture documentation
|
|
341
|
+
- `knowzcode/knowzcode_tracker.md` — WorkGroup status tracking
|
|
342
|
+
|
|
343
|
+
## Workflow Overview
|
|
344
|
+
|
|
345
|
+
KnowzCode follows a 5-phase development loop with quality gates between each phase.
|
|
346
|
+
Use the prompt files in `.github/prompts/` to invoke each phase:
|
|
324
347
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
-
|
|
348
|
+
| Phase | Prompt | Description |
|
|
349
|
+
|-------|--------|-------------|
|
|
350
|
+
| Full workflow | `#prompt:kc-work` | Start a new feature — creates WorkGroup, classifies tier, runs Phase 1A |
|
|
351
|
+
| 1A: Analysis | `#prompt:kc-analyze` | Re-run impact analysis on existing WorkGroup |
|
|
352
|
+
| 1B: Specification | `#prompt:kc-specify` | Draft specs from approved Change Set |
|
|
353
|
+
| 2A: Implementation | `#prompt:kc-implement` | TDD implementation with verification loop |
|
|
354
|
+
| 2B: Audit | `#prompt:kc-audit` | READ-ONLY audit against specs |
|
|
355
|
+
| 3: Finalization | `#prompt:kc-finalize` | Update specs, tracker, log, commit |
|
|
356
|
+
| Quick fix | `#prompt:kc-fix` | Micro-fix for small, scoped changes |
|
|
357
|
+
| Research | `#prompt:kc-plan` | Investigate before implementing |
|
|
358
|
+
| Resume | `#prompt:kc-continue` | Resume or advance to next phase |
|
|
329
359
|
|
|
330
|
-
|
|
331
|
-
Reference `knowzcode/knowzcode_loop.md` for the complete development workflow.
|
|
332
|
-
Follow these phases for all feature work:
|
|
360
|
+
### Typical Flow
|
|
333
361
|
|
|
334
|
-
1.
|
|
335
|
-
2.
|
|
336
|
-
3.
|
|
337
|
-
4.
|
|
338
|
-
5.
|
|
362
|
+
1. `#prompt:kc-work "Build JWT authentication"` → Creates WorkGroup, proposes Change Set, **STOPs**
|
|
363
|
+
2. Approve Change Set
|
|
364
|
+
3. `#prompt:kc-specify` → Drafts specs, **STOPs**
|
|
365
|
+
4. Approve specs
|
|
366
|
+
5. `#prompt:kc-implement` → TDD Red-Green-Refactor, **STOPs**
|
|
367
|
+
6. `#prompt:kc-audit` → READ-ONLY audit, reports gaps, **STOPs**
|
|
368
|
+
7. `#prompt:kc-finalize` → Updates docs, commits
|
|
369
|
+
|
|
370
|
+
Use `#prompt:kc-continue` at any point to resume where you left off.
|
|
339
371
|
|
|
340
372
|
## Quality Gates
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
- After
|
|
344
|
-
- After
|
|
345
|
-
- After
|
|
373
|
+
|
|
374
|
+
STOP and await user approval at each gate:
|
|
375
|
+
- After Change Set proposal (1A)
|
|
376
|
+
- After spec drafts (1B)
|
|
377
|
+
- After implementation complete (2A — awaiting audit)
|
|
378
|
+
- After audit results (2B — user decides on gaps)
|
|
379
|
+
|
|
380
|
+
## TDD Enforcement
|
|
381
|
+
|
|
382
|
+
TDD is mandatory — no production code without a failing test first.
|
|
383
|
+
Follow Red-Green-Refactor for every feature/criterion in the spec.
|
|
384
|
+
|
|
385
|
+
## Key Rules
|
|
386
|
+
- NodeIDs are domain concepts (PascalCase), not tasks
|
|
387
|
+
- Consolidate specs when domains overlap >50%
|
|
388
|
+
- Every WorkGroup todo starts with `KnowzCode:` prefix
|
|
389
|
+
- Target <20 specs per project
|
|
390
|
+
- Log completions in `knowzcode/knowzcode_log.md`
|
|
346
391
|
|
|
347
392
|
## Key Files
|
|
348
|
-
- `knowzcode/knowzcode_loop.md` — Methodology
|
|
393
|
+
- `knowzcode/knowzcode_loop.md` — Methodology
|
|
349
394
|
- `knowzcode/knowzcode_project.md` — Project context
|
|
350
395
|
- `knowzcode/knowzcode_architecture.md` — Architecture docs
|
|
351
396
|
- `knowzcode/knowzcode_tracker.md` — WorkGroup tracking
|
|
352
397
|
- `knowzcode/specs/` — Component specifications
|
|
398
|
+
- `knowzcode/workgroups/` — Active session data (gitignored)
|
|
353
399
|
|
|
354
|
-
##
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
400
|
+
## MCP Integration (Optional)
|
|
401
|
+
|
|
402
|
+
If configured in `.vscode/mcp.json`, use `search_knowledge` and `ask_question` tools
|
|
403
|
+
for enhanced context from knowledge vaults. All prompts work without MCP.
|
|
404
|
+
|
|
405
|
+
## Copilot Coding Agent
|
|
406
|
+
|
|
407
|
+
When the Copilot Coding Agent works on GitHub issues for this repository:
|
|
408
|
+
- Read `knowzcode/knowzcode_loop.md` and this file for methodology
|
|
409
|
+
- Follow Phase 1A→3 workflow for any non-trivial change
|
|
410
|
+
- Include the Change Set in the PR description
|
|
411
|
+
- Use TDD — failing test before implementation code
|
|
412
|
+
- Self-audit against spec VERIFY statements before marking PR ready
|
|
413
|
+
- Quality gates are deferred to PR review (no interactive approval in async mode)
|
|
414
|
+
|
|
415
|
+
## Model Selection
|
|
416
|
+
- Complex phases (1A analysis, 1B spec drafting, 2B audit): Use Claude Opus or GPT-4o
|
|
417
|
+
- Implementation (2A): Any capable model with good code generation
|
|
418
|
+
- Quick fixes: Any model
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### B. Prompt File Templates (.github/prompts/)
|
|
422
|
+
|
|
423
|
+
Each prompt file is invocable via `#prompt:kc-*` in VS Code Copilot Chat. All use `agent: "agent"` for file editing capability.
|
|
424
|
+
|
|
425
|
+
#### kc-work.prompt.md
|
|
426
|
+
|
|
427
|
+
```markdown
|
|
428
|
+
---
|
|
429
|
+
agent: "agent"
|
|
430
|
+
description: "Start a new KnowzCode development workflow"
|
|
431
|
+
argument-hint: "Describe the feature or goal to build"
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
435
|
+
|
|
436
|
+
# KnowzCode: Start Workflow
|
|
437
|
+
|
|
438
|
+
You are starting a new KnowzCode development workflow. Follow the methodology precisely.
|
|
439
|
+
|
|
440
|
+
## Context
|
|
441
|
+
|
|
442
|
+
Read these files for methodology and project context:
|
|
443
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
444
|
+
- #file:knowzcode/knowzcode_project.md
|
|
445
|
+
- #file:knowzcode/knowzcode_tracker.md
|
|
446
|
+
- #file:knowzcode/knowzcode_architecture.md
|
|
447
|
+
|
|
448
|
+
## Instructions
|
|
449
|
+
|
|
450
|
+
The user's goal is provided in the chat message.
|
|
451
|
+
|
|
452
|
+
### Step 1: Classify Tier
|
|
453
|
+
|
|
454
|
+
Based on the goal, classify complexity:
|
|
455
|
+
- **Micro** (single file, <50 lines, no ripple): Redirect to `#prompt:kc-fix`
|
|
456
|
+
- **Light** (≤3 files, straightforward): Streamlined 2-phase path
|
|
457
|
+
- **Full** (>3 files or complex): Complete 5-phase workflow
|
|
458
|
+
|
|
459
|
+
### Step 2: Create Draft WorkGroup
|
|
460
|
+
|
|
461
|
+
Generate a WorkGroupID: `kc-{type}-{slug}-YYYYMMDD-HHMMSS`
|
|
462
|
+
Create a draft WorkGroup file at `knowzcode/workgroups/{WorkGroupID}.md` to store the analysis output.
|
|
463
|
+
|
|
464
|
+
### Step 3: Phase 1A — Impact Analysis
|
|
465
|
+
|
|
466
|
+
Follow Phase 1A from `knowzcode/knowzcode_loop.md`:
|
|
467
|
+
1. Identify the Change Set — all components affected by this change
|
|
468
|
+
2. Create NodeIDs for NEW capabilities only (domain concepts, PascalCase)
|
|
469
|
+
3. Check `knowzcode/specs/` for existing specs with domain overlap
|
|
470
|
+
4. Scan `knowzcode/workgroups/` for completed WorkGroups with relevant context
|
|
471
|
+
5. Propose the Change Set with NodeIDs, affected files, and risk assessment
|
|
472
|
+
|
|
473
|
+
## STOP
|
|
474
|
+
|
|
475
|
+
Present the Change Set for user approval. Do NOT proceed until approved.
|
|
476
|
+
|
|
477
|
+
**After approval:** Update `knowzcode/knowzcode_tracker.md` with new NodeIDs as `[WIP]`, then tell the user to invoke `#prompt:kc-specify` to draft specifications.
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
#### kc-analyze.prompt.md
|
|
481
|
+
|
|
482
|
+
```markdown
|
|
483
|
+
---
|
|
484
|
+
agent: "agent"
|
|
485
|
+
description: "Re-run Phase 1A impact analysis on existing WorkGroup"
|
|
486
|
+
---
|
|
487
|
+
|
|
488
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
489
|
+
|
|
490
|
+
# KnowzCode: Phase 1A — Impact Analysis
|
|
491
|
+
|
|
492
|
+
You are re-running impact analysis on an existing WorkGroup.
|
|
493
|
+
|
|
494
|
+
## Context
|
|
495
|
+
|
|
496
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
497
|
+
- #file:knowzcode/knowzcode_tracker.md
|
|
498
|
+
|
|
499
|
+
Read `knowzcode/knowzcode_tracker.md` to find the active `[WIP]` WorkGroup.
|
|
500
|
+
Then read the WorkGroup file at `knowzcode/workgroups/{WorkGroupID}.md`.
|
|
501
|
+
|
|
502
|
+
## Instructions
|
|
503
|
+
|
|
504
|
+
Follow Phase 1A from `knowzcode/knowzcode_loop.md`:
|
|
505
|
+
1. Re-analyze the goal from the WorkGroup file
|
|
506
|
+
2. Identify all affected components — check for changes since last analysis
|
|
507
|
+
3. Update NodeIDs if scope has changed
|
|
508
|
+
4. Check `knowzcode/specs/` for existing specs with domain overlap
|
|
509
|
+
5. Update the Change Set in the WorkGroup file
|
|
510
|
+
|
|
511
|
+
## STOP
|
|
512
|
+
|
|
513
|
+
Present the updated Change Set for user approval.
|
|
514
|
+
|
|
515
|
+
**Next step after approval:** `#prompt:kc-specify`
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
#### kc-specify.prompt.md
|
|
519
|
+
|
|
520
|
+
```markdown
|
|
521
|
+
---
|
|
522
|
+
agent: "agent"
|
|
523
|
+
description: "Draft specifications from approved Change Set (Phase 1B)"
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
527
|
+
|
|
528
|
+
# KnowzCode: Phase 1B — Specification
|
|
529
|
+
|
|
530
|
+
You are drafting specifications for the approved Change Set.
|
|
531
|
+
|
|
532
|
+
## Context
|
|
533
|
+
|
|
534
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
535
|
+
- #file:knowzcode/knowzcode_tracker.md
|
|
536
|
+
|
|
537
|
+
Read `knowzcode/knowzcode_tracker.md` to find the active `[WIP]` WorkGroup.
|
|
538
|
+
If no `[WIP]` entries found, scan `knowzcode/workgroups/` for the most recent draft WorkGroup file.
|
|
539
|
+
Then read the WorkGroup file at `knowzcode/workgroups/{WorkGroupID}.md` for the approved Change Set.
|
|
540
|
+
|
|
541
|
+
## Instructions
|
|
542
|
+
|
|
543
|
+
Follow Phase 1B from `knowzcode/knowzcode_loop.md`:
|
|
544
|
+
|
|
545
|
+
For each NodeID in the approved Change Set:
|
|
546
|
+
1. Draft `knowzcode/specs/{NodeID}.md` using the 4-section format:
|
|
547
|
+
- **Rules & Decisions** — Key architectural decisions, business rules, constraints
|
|
548
|
+
- **Interfaces** — Public contracts: inputs, outputs, API signatures, dependencies
|
|
549
|
+
- **Verification Criteria** — Testable `VERIFY:` assertions (minimum 2 per spec)
|
|
550
|
+
- **Debt & Gaps** — Known limitations and future work
|
|
551
|
+
2. Minimum valid spec: 1+ Rules, 1+ Interface, 2+ VERIFY statements
|
|
552
|
+
3. Check existing specs — if >50% domain overlap, UPDATE existing spec instead
|
|
553
|
+
4. Update the WorkGroup file with spec status
|
|
554
|
+
|
|
555
|
+
## STOP
|
|
556
|
+
|
|
557
|
+
Present all drafted specs for user approval. Do NOT proceed until approved.
|
|
558
|
+
|
|
559
|
+
**After approval:** Commit the specs as a pre-implementation checkpoint: `git commit -m "specs: draft specs for {WorkGroupID}"`
|
|
560
|
+
|
|
561
|
+
**Next step:** `#prompt:kc-implement`
|
|
359
562
|
```
|
|
360
563
|
|
|
564
|
+
#### kc-implement.prompt.md
|
|
565
|
+
|
|
566
|
+
```markdown
|
|
567
|
+
---
|
|
568
|
+
agent: "agent"
|
|
569
|
+
description: "TDD implementation with verification loop (Phase 2A)"
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
573
|
+
|
|
574
|
+
# KnowzCode: Phase 2A — Implementation
|
|
575
|
+
|
|
576
|
+
You are implementing the approved specifications using strict TDD.
|
|
577
|
+
|
|
578
|
+
## Context
|
|
579
|
+
|
|
580
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
581
|
+
- #file:knowzcode/knowzcode_tracker.md
|
|
582
|
+
|
|
583
|
+
Read `knowzcode/knowzcode_tracker.md` to find the active `[WIP]` WorkGroup.
|
|
584
|
+
Then read:
|
|
585
|
+
- The WorkGroup file at `knowzcode/workgroups/{WorkGroupID}.md`
|
|
586
|
+
- All spec files listed in the Change Set from `knowzcode/specs/`
|
|
587
|
+
|
|
588
|
+
## Instructions
|
|
589
|
+
|
|
590
|
+
Follow Phase 2A from `knowzcode/knowzcode_loop.md`:
|
|
591
|
+
|
|
592
|
+
For EACH feature/criterion in the specs:
|
|
593
|
+
1. **RED**: Write a failing test that defines expected behavior. Run test → confirm FAIL
|
|
594
|
+
2. **GREEN**: Write MINIMAL code to make the test pass. Run test → confirm PASS
|
|
595
|
+
3. **REFACTOR**: Clean up while keeping all tests green
|
|
596
|
+
|
|
597
|
+
### Verification Loop (must pass before reporting complete)
|
|
598
|
+
|
|
599
|
+
1. Run all tests → if FAIL: fix and restart
|
|
600
|
+
2. Run static analysis → if issues: fix and restart
|
|
601
|
+
3. Run build → if FAIL: fix and restart
|
|
602
|
+
4. Verify all VERIFY: criteria from specs → if unmet: implement and restart
|
|
603
|
+
5. All checks pass → report complete
|
|
604
|
+
|
|
605
|
+
Maximum 10 iterations. If exceeded, report blocker.
|
|
606
|
+
|
|
607
|
+
### Spec Issues
|
|
608
|
+
|
|
609
|
+
If you discover a spec is incorrect during implementation:
|
|
610
|
+
- Tag `[SPEC_ISSUE]` in the WorkGroup file with details
|
|
611
|
+
- Continue with best judgment
|
|
612
|
+
- Report in completion summary
|
|
613
|
+
|
|
614
|
+
## STOP
|
|
615
|
+
|
|
616
|
+
Report implementation results: test counts, verification iterations, criteria status.
|
|
617
|
+
|
|
618
|
+
**Next step:** `#prompt:kc-audit`
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
#### kc-audit.prompt.md
|
|
622
|
+
|
|
623
|
+
```markdown
|
|
624
|
+
---
|
|
625
|
+
agent: "agent"
|
|
626
|
+
description: "READ-ONLY completeness audit against specs (Phase 2B)"
|
|
627
|
+
---
|
|
628
|
+
|
|
629
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
630
|
+
|
|
631
|
+
# KnowzCode: Phase 2B — Completeness Audit
|
|
632
|
+
|
|
633
|
+
You are performing an independent, READ-ONLY audit of the implementation.
|
|
634
|
+
|
|
635
|
+
## Context
|
|
636
|
+
|
|
637
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
638
|
+
- #file:knowzcode/knowzcode_tracker.md
|
|
639
|
+
|
|
640
|
+
Read `knowzcode/knowzcode_tracker.md` to find the active `[WIP]` WorkGroup.
|
|
641
|
+
Then read:
|
|
642
|
+
- The WorkGroup file at `knowzcode/workgroups/{WorkGroupID}.md`
|
|
643
|
+
- All spec files listed in the Change Set from `knowzcode/specs/`
|
|
644
|
+
- The implementation files listed in the Change Set
|
|
645
|
+
|
|
646
|
+
## Instructions
|
|
647
|
+
|
|
648
|
+
Follow Phase 2B from `knowzcode/knowzcode_loop.md`:
|
|
649
|
+
|
|
650
|
+
**CRITICAL: This is a READ-ONLY audit. Do NOT modify any source files.**
|
|
651
|
+
|
|
652
|
+
1. For each NodeID, compare implementation against every VERIFY statement in its spec
|
|
653
|
+
2. Calculate objective completion percentage per NodeID and overall
|
|
654
|
+
3. Identify gaps: missing features, incomplete criteria, untested paths
|
|
655
|
+
4. Check for security concerns: input validation, authentication, data exposure
|
|
656
|
+
5. Check for orphan code: implementation not covered by any spec
|
|
657
|
+
6. Assess risk for any gaps found
|
|
658
|
+
|
|
659
|
+
### Standalone Audit Types
|
|
660
|
+
|
|
661
|
+
If the user specifies an audit type instead of a WorkGroup audit:
|
|
662
|
+
- **spec**: Audit spec quality — completeness, VERIFY statement coverage, format compliance
|
|
663
|
+
- **architecture**: Compare architecture doc against actual codebase structure
|
|
664
|
+
- **security**: Focused security review — OWASP top 10, input validation, auth flows
|
|
665
|
+
- **integration**: Check integration points, API contracts, dependency health
|
|
666
|
+
|
|
667
|
+
## STOP
|
|
668
|
+
|
|
669
|
+
Present audit results with completion percentage, gap list, and risk assessment.
|
|
670
|
+
|
|
671
|
+
**User decides:**
|
|
672
|
+
- Return to `#prompt:kc-implement` to fix gaps
|
|
673
|
+
- Accept and proceed to `#prompt:kc-finalize`
|
|
674
|
+
- Modify specs to match implementation
|
|
675
|
+
- Cancel the WorkGroup
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
#### kc-finalize.prompt.md
|
|
679
|
+
|
|
680
|
+
```markdown
|
|
681
|
+
---
|
|
682
|
+
agent: "agent"
|
|
683
|
+
description: "Finalize WorkGroup — update specs, tracker, log, commit (Phase 3)"
|
|
684
|
+
---
|
|
685
|
+
|
|
686
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
687
|
+
|
|
688
|
+
# KnowzCode: Phase 3 — Finalization
|
|
689
|
+
|
|
690
|
+
You are finalizing the WorkGroup after approved implementation and audit.
|
|
691
|
+
|
|
692
|
+
## Context
|
|
693
|
+
|
|
694
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
695
|
+
- #file:knowzcode/knowzcode_tracker.md
|
|
696
|
+
- #file:knowzcode/knowzcode_architecture.md
|
|
697
|
+
|
|
698
|
+
Read `knowzcode/knowzcode_tracker.md` to find the active `[WIP]` WorkGroup.
|
|
699
|
+
Then read the WorkGroup file at `knowzcode/workgroups/{WorkGroupID}.md`.
|
|
700
|
+
|
|
701
|
+
## Instructions
|
|
702
|
+
|
|
703
|
+
Follow Phase 3 from `knowzcode/knowzcode_loop.md`:
|
|
704
|
+
|
|
705
|
+
1. **Finalize Specs**: Update each `knowzcode/specs/{NodeID}.md` to as-built state (Status: As-Built)
|
|
706
|
+
2. **Architecture Check**: Compare `knowzcode/knowzcode_architecture.md` against the Change Set. Fix simple discrepancies directly; document complex ones for user review
|
|
707
|
+
3. **Log Entry**: Prepend an `ARC-Completion` entry to `knowzcode/knowzcode_log.md` with WorkGroupID, NodeIDs, verification summary, architectural learnings, and ripple effects
|
|
708
|
+
4. **Update Tracker**: Change NodeID statuses from `[WIP]` to `[VERIFIED]` in `knowzcode/knowzcode_tracker.md`. Create `REFACTOR_` tasks for significant tech debt
|
|
709
|
+
5. **Final Commit**: Stage and commit all changes (source + knowzcode files)
|
|
710
|
+
6. **Close WorkGroup**: Mark the WorkGroup file as closed
|
|
711
|
+
|
|
712
|
+
## Output
|
|
713
|
+
|
|
714
|
+
Report completion with summary of what was delivered and any `REFACTOR_` tasks created.
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
#### kc-fix.prompt.md
|
|
718
|
+
|
|
719
|
+
```markdown
|
|
720
|
+
---
|
|
721
|
+
agent: "agent"
|
|
722
|
+
description: "Quick targeted fix using micro-fix protocol"
|
|
723
|
+
argument-hint: "Describe the bug or issue to fix"
|
|
724
|
+
---
|
|
725
|
+
|
|
726
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
727
|
+
|
|
728
|
+
# KnowzCode: Micro-Fix
|
|
729
|
+
|
|
730
|
+
You are performing a quick, targeted fix using the micro-fix protocol.
|
|
731
|
+
|
|
732
|
+
## Context
|
|
733
|
+
|
|
734
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
735
|
+
|
|
736
|
+
## Scope Guard
|
|
737
|
+
|
|
738
|
+
This workflow is for changes that are:
|
|
739
|
+
- **Single file** (or minimal multi-file with no ripple effects)
|
|
740
|
+
- **<50 lines** changed
|
|
741
|
+
- **No architectural impact**
|
|
742
|
+
|
|
743
|
+
If the fix exceeds this scope, inform the user and suggest `#prompt:kc-work` instead.
|
|
744
|
+
|
|
745
|
+
## Instructions
|
|
746
|
+
|
|
747
|
+
Follow the Micro-Fix Protocol from `knowzcode/knowzcode_loop.md` Section 4:
|
|
748
|
+
|
|
749
|
+
1. **Implement** the fix
|
|
750
|
+
2. **Test** — run targeted tests for the affected code
|
|
751
|
+
3. **Log** — prepend a `MicroFix` entry to `knowzcode/knowzcode_log.md`:
|
|
752
|
+
- Type: MicroFix
|
|
753
|
+
- File/NodeID affected
|
|
754
|
+
- User request, action taken, verification outcome
|
|
755
|
+
4. **Commit** with `fix: {description}` message
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
#### kc-plan.prompt.md
|
|
759
|
+
|
|
760
|
+
```markdown
|
|
761
|
+
---
|
|
762
|
+
agent: "agent"
|
|
763
|
+
description: "Research and investigate before implementing"
|
|
764
|
+
argument-hint: "Describe the topic to research"
|
|
765
|
+
---
|
|
766
|
+
|
|
767
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
768
|
+
|
|
769
|
+
# KnowzCode: Plan / Investigate
|
|
770
|
+
|
|
771
|
+
You are researching a topic before implementation. This is an investigation workflow, not a build workflow.
|
|
772
|
+
|
|
773
|
+
## Context
|
|
774
|
+
|
|
775
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
776
|
+
- #file:knowzcode/knowzcode_project.md
|
|
777
|
+
- #file:knowzcode/knowzcode_architecture.md
|
|
778
|
+
|
|
779
|
+
## Instructions
|
|
780
|
+
|
|
781
|
+
The user's research topic is provided in the chat message.
|
|
782
|
+
|
|
783
|
+
1. **Explore the codebase** — search for relevant files, patterns, and existing implementations
|
|
784
|
+
2. **Read existing specs** — check `knowzcode/specs/` for related components
|
|
785
|
+
3. **Check history** — scan `knowzcode/workgroups/` for past WorkGroups that touched similar areas
|
|
786
|
+
4. **Analyze architecture** — review `knowzcode/knowzcode_architecture.md` for structural context
|
|
787
|
+
5. **Present findings** with:
|
|
788
|
+
- Current state of the relevant code
|
|
789
|
+
- Existing patterns and conventions
|
|
790
|
+
- Options for implementation (with trade-offs)
|
|
791
|
+
- Recommended approach
|
|
792
|
+
|
|
793
|
+
## STOP
|
|
794
|
+
|
|
795
|
+
Present research findings and recommendations.
|
|
796
|
+
|
|
797
|
+
**To implement:** Tell the user to invoke `#prompt:kc-work` with their chosen approach.
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
#### kc-continue.prompt.md
|
|
801
|
+
|
|
802
|
+
```markdown
|
|
803
|
+
---
|
|
804
|
+
agent: "agent"
|
|
805
|
+
description: "Resume interrupted work or advance to next phase"
|
|
806
|
+
---
|
|
807
|
+
|
|
808
|
+
<!-- Generated by KnowzCode vX.Y.Z /kc:init -->
|
|
809
|
+
|
|
810
|
+
# KnowzCode: Continue / Resume
|
|
811
|
+
|
|
812
|
+
You are resuming an interrupted KnowzCode workflow or advancing to the next phase.
|
|
813
|
+
|
|
814
|
+
## Context
|
|
815
|
+
|
|
816
|
+
- #file:knowzcode/knowzcode_loop.md
|
|
817
|
+
- #file:knowzcode/knowzcode_tracker.md
|
|
818
|
+
|
|
819
|
+
## Instructions
|
|
820
|
+
|
|
821
|
+
### Step 1: Find Active WorkGroup
|
|
822
|
+
|
|
823
|
+
Read `knowzcode/knowzcode_tracker.md` and find entries with `[WIP]` status.
|
|
824
|
+
|
|
825
|
+
- **One active WorkGroup**: Use it
|
|
826
|
+
- **Multiple active**: Present the list and ask the user which to resume
|
|
827
|
+
- **None active**: Inform the user and suggest `#prompt:kc-work`
|
|
828
|
+
|
|
829
|
+
### Step 2: Determine Current Phase
|
|
830
|
+
|
|
831
|
+
Read the WorkGroup file at `knowzcode/workgroups/{WorkGroupID}.md`.
|
|
832
|
+
Check the Phase History table to determine the current state.
|
|
833
|
+
|
|
834
|
+
### Step 3: Resume or Advance
|
|
835
|
+
|
|
836
|
+
| WorkGroup State | Action |
|
|
837
|
+
|----------------|--------|
|
|
838
|
+
| Phase 1A in progress | Complete the impact analysis, present Change Set |
|
|
839
|
+
| Phase 1A complete, awaiting approval | Present Change Set for approval |
|
|
840
|
+
| Phase 1A approved, specs not started | Begin Phase 1B — draft specs |
|
|
841
|
+
| Phase 1B in progress | Complete spec drafting |
|
|
842
|
+
| Phase 1B complete, awaiting approval | Present specs for approval |
|
|
843
|
+
| Phase 1B approved, implementation not started | Begin Phase 2A — TDD implementation |
|
|
844
|
+
| Phase 2A in progress | Resume implementation from outstanding todos |
|
|
845
|
+
| Phase 2A complete | Advise: `#prompt:kc-audit` |
|
|
846
|
+
| Phase 2B complete, gaps found | Present options: fix gaps or accept |
|
|
847
|
+
| Phase 2B complete, no gaps | Begin Phase 3 — finalization |
|
|
848
|
+
| Phase 3 in progress | Complete finalization |
|
|
849
|
+
|
|
850
|
+
### Step 4: Present Status
|
|
851
|
+
|
|
852
|
+
```
|
|
853
|
+
## Resuming WorkGroup: {WorkGroupID}
|
|
854
|
+
|
|
855
|
+
**Goal**: {primary goal}
|
|
856
|
+
**Phase**: {current phase}
|
|
857
|
+
**NodeIDs**: {list}
|
|
858
|
+
|
|
859
|
+
**Outstanding Work**:
|
|
860
|
+
{list from WorkGroup file}
|
|
861
|
+
|
|
862
|
+
Continuing from where we left off...
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
Then proceed with the appropriate phase instructions from `knowzcode/knowzcode_loop.md`.
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
### C. .vscode/mcp.json Template
|
|
869
|
+
|
|
870
|
+
Optionally generated by `/kc:init` when Copilot is detected and MCP is configured:
|
|
871
|
+
|
|
872
|
+
```json
|
|
873
|
+
{
|
|
874
|
+
"servers": {
|
|
875
|
+
"knowzcode": {
|
|
876
|
+
"type": "http",
|
|
877
|
+
"url": "${input:knowzcode_mcp_url}",
|
|
878
|
+
"headers": {
|
|
879
|
+
"x-api-key": "${input:knowzcode_api_key}"
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
"inputs": [
|
|
884
|
+
{
|
|
885
|
+
"id": "knowzcode_mcp_url",
|
|
886
|
+
"description": "KnowzCode MCP server URL",
|
|
887
|
+
"type": "promptString"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"id": "knowzcode_api_key",
|
|
891
|
+
"description": "KnowzCode API key",
|
|
892
|
+
"type": "promptString",
|
|
893
|
+
"password": true
|
|
894
|
+
}
|
|
895
|
+
]
|
|
896
|
+
}
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
### D. Copilot-Specific Notes
|
|
900
|
+
|
|
901
|
+
**VS Code usage:**
|
|
902
|
+
- Invoke prompts via `#prompt:kc-work`, `#prompt:kc-specify`, etc. in Copilot Chat
|
|
903
|
+
- Add extra files to context with `#file:path/to/file` in the chat message
|
|
904
|
+
- All prompt files use `agent: "agent"` frontmatter for file editing and terminal access
|
|
905
|
+
- Model can be selected per session — prefer stronger models for analysis/audit phases
|
|
906
|
+
|
|
907
|
+
**Copilot CLI fallback:**
|
|
908
|
+
- CLI does not support `#prompt:` syntax
|
|
909
|
+
- Check current CLI documentation for file reference syntax — it may differ from VS Code
|
|
910
|
+
- Alternatively, reference the methodology directly or paste prompt content into the CLI
|
|
911
|
+
|
|
912
|
+
**Copilot Coding Agent:**
|
|
913
|
+
- Follows `.github/copilot-instructions.md` automatically when processing GitHub issues
|
|
914
|
+
- Runs all phases autonomously — quality gates deferred to PR review
|
|
915
|
+
- Does not use prompt files (uses repository instructions only)
|
|
916
|
+
|
|
917
|
+
**Execution model:**
|
|
918
|
+
- See `knowzcode/copilot_execution.md` for the full execution guide
|
|
919
|
+
- Single-agent, sequential execution — user manually transitions between phases
|
|
920
|
+
- No multi-agent orchestration (no Parallel Teams, no agent spawning)
|
|
921
|
+
- WorkGroup files carry state between prompt invocations
|
|
922
|
+
|
|
361
923
|
---
|
|
362
924
|
|
|
363
925
|
## Windsurf (`.windsurf/rules/knowzcode.md`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alias-resolver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Resolves friendly natural-language aliases to KnowzCode canonical values (phase, audit, plan, workgroup_type).",
|
|
5
5
|
"parameters": [
|
|
6
6
|
{"name": "domain", "type": "string", "required": true},
|
package/skills/continue.md
CHANGED
|
@@ -52,6 +52,7 @@ Read `knowzcode/workgroups/{WorkGroupID}.md` to determine:
|
|
|
52
52
|
- Change Set
|
|
53
53
|
- Outstanding todos
|
|
54
54
|
- **Autonomous Mode**: If the WorkGroup file contains `**Autonomous Mode**: Active`, restore `AUTONOMOUS_MODE = true` and announce: `> **Autonomous Mode: RESTORED** — continuing with auto-approved gates.`
|
|
55
|
+
- **Orchestration Config**: If `knowzcode/knowzcode_orchestration.md` exists, parse and restore `MAX_BUILDERS`, `SCOUT_MODE`, `MCP_AGENTS_ENABLED`, `DEFAULT_SPECIALISTS` (same logic as work.md Step 2.4). Defaults apply if file is absent.
|
|
55
56
|
|
|
56
57
|
### Step 3: Resume at Current Phase
|
|
57
58
|
|
|
@@ -63,7 +64,7 @@ If the WorkGroup file contains a `## Current Stage` section (instead of `Current
|
|
|
63
64
|
- This is a **parallel-mode WorkGroup**
|
|
64
65
|
- Read the per-NodeID phase table to determine what's in progress
|
|
65
66
|
- Resume by recreating the team and spawning agents appropriate for the current stage:
|
|
66
|
-
- **Stage 0/1**: Spawn analyst + architect
|
|
67
|
+
- **Stage 0/1**: Spawn analyst + architect. If `SCOUT_MODE != "none"` and context is stale, re-spawn scout(s) per SCOUT_MODE.
|
|
67
68
|
- **Stage 2**: Spawn builder(s) per the dependency map + reviewer if any NodeIDs are past implementation
|
|
68
69
|
- **Stage 3**: Spawn closer
|
|
69
70
|
- Builders and reviewer persist through gap loops (don't respawn per iteration)
|