knowzcode 0.3.1 → 0.3.6
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 +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/agents/analyst.md +31 -0
- package/agents/architect.md +67 -0
- package/agents/closer.md +6 -1
- package/agents/knowz-scribe.md +60 -35
- package/agents/project-advisor.md +4 -3
- package/commands/connect-mcp.md +29 -5
- package/commands/learn.md +6 -1
- package/commands/register.md +5 -5
- package/commands/status.md +1 -1
- package/commands/work.md +154 -24
- package/knowzcode/claude_code_execution.md +28 -10
- package/knowzcode/knowzcode_loop.md +13 -3
- package/knowzcode/knowzcode_vaults.md +37 -13
- package/knowzcode/platform_adapters.md +65 -7
- 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/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
package/commands/work.md
CHANGED
|
@@ -66,11 +66,15 @@ If `knowzcode/knowzcode_orchestration.md` exists, parse its YAML blocks:
|
|
|
66
66
|
2. `SCOUT_MODE` = `scout_mode` value (default: "full")
|
|
67
67
|
3. `DEFAULT_SPECIALISTS` = `default_specialists` value (default: [])
|
|
68
68
|
4. `MCP_AGENTS_ENABLED` = `mcp_agents_enabled` value (default: true)
|
|
69
|
+
5. `CODEBASE_SCANNER_ENABLED` = `codebase_scanner_enabled` value (default: true)
|
|
70
|
+
6. `PARALLEL_SPEC_THRESHOLD` = `parallel_spec_threshold` value (default: 3, clamp to 2-10)
|
|
69
71
|
|
|
70
72
|
Apply flag overrides (flags win over config):
|
|
71
73
|
- `--max-builders=N` in `$ARGUMENTS` → override `MAX_BUILDERS`
|
|
72
74
|
- `--no-scouts` in `$ARGUMENTS` → override `SCOUT_MODE = "none"`
|
|
73
75
|
- `--no-mcp` in `$ARGUMENTS` → override `MCP_AGENTS_ENABLED = false`
|
|
76
|
+
- `--no-scanners` in `$ARGUMENTS` → override `CODEBASE_SCANNER_ENABLED = false`
|
|
77
|
+
- `--no-parallel-specs` in `$ARGUMENTS` → override `PARALLEL_SPEC_THRESHOLD = 999` (effectively disabled)
|
|
74
78
|
|
|
75
79
|
If the file doesn't exist, use hardcoded defaults (current behavior).
|
|
76
80
|
|
|
@@ -354,7 +358,13 @@ When Parallel Teams mode is active, follow these 4 stages instead of spawning on
|
|
|
354
358
|
- If `SCOUT_MODE = "none"`: spawn analyst + architect only (2 agents). Analyst and architect scan the codebase independently without pre-loaded scout context.
|
|
355
359
|
- Always:
|
|
356
360
|
- `TaskCreate("Phase 1A: Impact analysis for {goal}")` → `TaskUpdate(owner: "analyst")`
|
|
357
|
-
- `TaskCreate("Pre-load architecture context")` → `TaskUpdate(owner: "architect")`
|
|
361
|
+
- `TaskCreate("Pre-load architecture context and speculative research")` → `TaskUpdate(owner: "architect")`
|
|
362
|
+
- If `CODEBASE_SCANNER_ENABLED = true` (default):
|
|
363
|
+
- Derive two search focuses from the goal:
|
|
364
|
+
- **Scanner-Direct**: source code search — grep for goal keywords, read affected code paths
|
|
365
|
+
- **Scanner-Tests**: test discovery — search test directories for tests covering the goal area
|
|
366
|
+
- `TaskCreate("Scanner: direct codebase scan for {goal}")` → `TaskUpdate(owner: "scanner-direct")`
|
|
367
|
+
- `TaskCreate("Scanner: test coverage scan for {goal}")` → `TaskUpdate(owner: "scanner-tests")`
|
|
358
368
|
Spawn all Group A agents with their `{task-id}` in the spawn prompt (use spawn prompts from Phase Prompt Reference below).
|
|
359
369
|
5. **Spawn Group B** (MCP agents — same turn as Group A): If `VAULTS_CONFIGURED = true` AND `MCP_AGENTS_ENABLED = true`:
|
|
360
370
|
Create tasks first, pre-assign, then spawn with task IDs:
|
|
@@ -369,16 +379,17 @@ When Parallel Teams mode is active, follow these 4 stages instead of spawning on
|
|
|
369
379
|
- If `project-advisor` in list: `TaskCreate("Project advisor: backlog context")` → `TaskUpdate(owner: "project-advisor")`
|
|
370
380
|
Spawn each enabled specialist with its `{task-id}` in the spawn prompt (use spawn prompts from Specialist Spawn Prompts section below).
|
|
371
381
|
If `SPECIALISTS_ENABLED` is empty, skip Group C.
|
|
372
|
-
7. **Roster confirmation** — lead lists every spawned agent by name to the user. Include Group C specialists if active. If `VAULTS_CONFIGURED` was true but knowz-scout or knowz-scribe is missing from the roster, STOP and re-spawn the missing agent(s) before continuing.
|
|
373
|
-
8. All spawned agents work immediately in parallel (context scouts are cheap Sonnet read-only agents; knowz-scribe is a cheap Haiku agent; specialists are Sonnet read-only agents). Agent count depends on orchestration config: 2-
|
|
382
|
+
7. **Roster confirmation** — lead lists every spawned agent by name to the user. Include scanners and Group C specialists if active. If `VAULTS_CONFIGURED` was true but knowz-scout or knowz-scribe is missing from the roster, STOP and re-spawn the missing agent(s) before continuing.
|
|
383
|
+
8. All spawned agents work immediately in parallel (context scouts are cheap Sonnet read-only agents; scanners are lightweight general-purpose agents; knowz-scribe is a cheap Haiku agent; specialists are Sonnet read-only agents). Agent count depends on orchestration config: 2-12 agents at Stage 0.
|
|
374
384
|
9. Scouts broadcast findings → analyst and architect consume as messages. Specialists work independently on their Stage 0 tasks.
|
|
375
385
|
|
|
376
|
-
**Key**: The analyst does NOT wait for scouts or specialists to finish. It starts scanning the codebase immediately. Scout findings arrive as messages and enrich the analyst's work as they arrive. Specialist findings are consumed by the lead at gates.
|
|
386
|
+
**Key**: The analyst does NOT wait for scouts, scanners, or specialists to finish. It starts scanning the codebase immediately. Scout and scanner findings arrive as messages and enrich the analyst's work as they arrive. The analyst also streams `[PRELIMINARY]` NodeID findings to the architect as it discovers them (see Preliminary Findings Protocol). Specialist findings are consumed by the lead at gates.
|
|
377
387
|
|
|
378
388
|
### Stage 1: Analysis + Specification
|
|
379
389
|
|
|
380
390
|
1. Analyst completes Change Set (includes dependency map — see `agents/analyst.md`)
|
|
381
391
|
2. Lead reads analyst's task summary
|
|
392
|
+
3. Shut down scanners (scanner-direct, scanner-tests) if they were spawned — no longer needed after analysis
|
|
382
393
|
3. **Specialist Change Set reviews** (if `SPECIALISTS_ENABLED` non-empty): Create review tasks blocked on analysis:
|
|
383
394
|
- If `security-officer` active: `TaskCreate("Security officer: Change Set review", addBlockedBy: [analysis-task-id])` → `TaskUpdate(owner: "security-officer")`. DM security-officer: `"**New Task**: #{task-id} — Review Change Set for security risk. Rate each NodeID."`
|
|
384
395
|
- If `test-advisor` active: `TaskCreate("Test advisor: Change Set test strategy", addBlockedBy: [analysis-task-id])` → `TaskUpdate(owner: "test-advisor")`. DM test-advisor: `"**New Task**: #{task-id} — Recommend test types per NodeID."`
|
|
@@ -389,12 +400,29 @@ When Parallel Teams mode is active, follow these 4 stages instead of spawning on
|
|
|
389
400
|
- Specialist Reports (if active — see gate template below)
|
|
390
401
|
5. User approves (or rejects → re-run analyst with feedback)
|
|
391
402
|
6. Lead sends DM to architect with the approved Change Set
|
|
392
|
-
7.
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
-
|
|
403
|
+
7. **Spec Drafting** — choose path based on NodeID count and `PARALLEL_SPEC_THRESHOLD`:
|
|
404
|
+
|
|
405
|
+
**Path A: Standard (fewer than PARALLEL_SPEC_THRESHOLD NodeIDs)**
|
|
406
|
+
- Lead creates spec-drafting tasks for architect (1 task per NodeID, `addBlockedBy: [analysis-task-id]`):
|
|
407
|
+
- `TaskCreate("Spec: NodeID-X")` → `TaskUpdate(taskId, owner: "architect")`
|
|
408
|
+
- DM architect with task IDs: `"**New Tasks**: #{id-1} Spec: NodeID-A, #{id-2} Spec: NodeID-B. Approved Change Set: {summary}"`
|
|
409
|
+
- Architect is already warm (pre-loaded + speculative research during Stage 0) → specs drafted FAST
|
|
396
410
|
- If Gate #1 rejected: shut down architect, re-run analyst with feedback, re-spawn architect after
|
|
397
|
-
|
|
411
|
+
|
|
412
|
+
**Path B: Parallel Spec Drafting (PARALLEL_SPEC_THRESHOLD or more NodeIDs)**
|
|
413
|
+
- Lead DMs architect the full approved Change Set and asks for a partition plan (see `agents/architect.md` — Parallel Spec Coordination)
|
|
414
|
+
- Architect proposes NodeID partitions (1-2 NodeIDs each, max 3 partitions, respecting same-spec and interface constraints)
|
|
415
|
+
- Lead spawns spec-drafter agents — one per partition:
|
|
416
|
+
- Spec-drafters use the `architect` agent definition with a scoped spawn prompt
|
|
417
|
+
- Each drafter gets: its NodeID partition, architect's research findings, cross-NodeID interface constraints, consolidation instructions
|
|
418
|
+
- `TaskCreate("Spec draft: NodeID-A, NodeID-B")` → `TaskUpdate(owner: "spec-drafter-1")`
|
|
419
|
+
- Max 3 spec-drafters: `ceil(NodeID_count / 2)`, capped at 3
|
|
420
|
+
- Spec-drafters draft specs in parallel
|
|
421
|
+
- After all spec-drafters complete: architect runs consistency review (cross-spec alignment, naming, VERIFY coverage)
|
|
422
|
+
- Shut down spec-drafters after consistency review
|
|
423
|
+
- If Gate #1 rejected: shut down architect and any spec-drafters, re-run analyst with feedback, re-spawn architect after
|
|
424
|
+
|
|
425
|
+
8. Architect completes specs (Path A) or architect completes consistency review (Path B)
|
|
398
426
|
9. **Test-advisor spec review** (if `test-advisor` in `SPECIALISTS_ENABLED`): After specs drafted, create spec testability review task:
|
|
399
427
|
- `TaskCreate("Test advisor: spec testability review", addBlockedBy: [spec-task-id])` → `TaskUpdate(owner: "test-advisor")`
|
|
400
428
|
- DM test-advisor: `"**New Task**: #{task-id} — Review specs for testability. Check VERIFY criteria are automatable."`
|
|
@@ -508,11 +536,16 @@ When Parallel Teams mode is active, follow these 4 stages instead of spawning on
|
|
|
508
536
|
- Write ARC-Completion log entry
|
|
509
537
|
- Review architecture docs for discrepancies
|
|
510
538
|
- Schedule REFACTOR tasks for tech debt
|
|
511
|
-
-
|
|
539
|
+
- Create capture task for knowz-scribe (if active): `TaskCreate("Scribe: Capture Phase 3")` → `TaskUpdate(owner: "knowz-scribe")`, then send DM with task ID: `"Capture Phase 3: {wgid}. Your task: #{task-id}"`. Knowz-scout remains available for vault queries during finalization.
|
|
512
540
|
- Create final atomic commit
|
|
513
541
|
4. Lead presents completion summary
|
|
514
|
-
5.
|
|
515
|
-
|
|
542
|
+
5. **Wait for scribe Phase 3 capture** (if knowz-scribe is active):
|
|
543
|
+
- Check scribe capture task via `TaskGet(task-id)` — wait until status is `completed`
|
|
544
|
+
- Also wait for scribe's Phase 3 confirmation DM
|
|
545
|
+
- **Timeout**: If >2 minutes after closer completes and scribe task still not complete → DM scribe: `"Status check: Phase 3 capture for {wgid}?"`
|
|
546
|
+
- **Hard timeout**: If another minute passes with no completion → proceed with shutdown and log `WARNING: Scribe Phase 3 capture did not complete for {wgid}. Vault writes may be incomplete.`
|
|
547
|
+
6. Shutdown order: knowz-scout, knowz-scribe, closer, remaining agents
|
|
548
|
+
7. Delete team
|
|
516
549
|
|
|
517
550
|
### WorkGroup File Format (Parallel Mode)
|
|
518
551
|
|
|
@@ -544,14 +577,17 @@ When creating tasks, model the dependency chain with `addBlockedBy` and pre-assi
|
|
|
544
577
|
| Scout: backlog context | (none) | context-scout-backlog |
|
|
545
578
|
| Knowz-scout: vault queries | (none — persistent) | knowz-scout |
|
|
546
579
|
| Knowz-scribe: listen | (none — persistent) | knowz-scribe |
|
|
547
|
-
|
|
|
548
|
-
|
|
|
580
|
+
| Scanner: direct codebase scan | (none) | scanner-direct |
|
|
581
|
+
| Scanner: test coverage scan | (none) | scanner-tests |
|
|
582
|
+
| Phase 1A analysis | (none — scouts + scanners enrich via broadcast) | analyst |
|
|
583
|
+
| Architect pre-load + speculative research | (none — receives [PRELIMINARY] DMs from analyst) | architect |
|
|
549
584
|
| Security officer: initial threat scan | (none — Group C) | security-officer |
|
|
550
585
|
| Test advisor: coverage baseline | (none — Group C) | test-advisor |
|
|
551
586
|
| Project advisor: backlog context | (none — Group C) | project-advisor |
|
|
552
587
|
| Security officer: Change Set review | Phase 1A analysis | security-officer |
|
|
553
588
|
| Test advisor: Change Set test strategy | Phase 1A analysis | test-advisor |
|
|
554
|
-
| Spec: NodeID-X | Phase 1A (gate approval) | architect |
|
|
589
|
+
| Spec: NodeID-X | Phase 1A (gate approval) | architect (Path A) or spec-drafter-N (Path B) |
|
|
590
|
+
| Spec consistency review | All spec drafts complete (Path B only) | architect |
|
|
555
591
|
| Test advisor: spec testability review | Spec: NodeID-X | test-advisor |
|
|
556
592
|
| Implement: NodeID-X | Spec: NodeID-X | builder-N |
|
|
557
593
|
| Audit: NodeID-X | Implement: NodeID-X | reviewer-N |
|
|
@@ -561,6 +597,10 @@ When creating tasks, model the dependency chain with `addBlockedBy` and pre-assi
|
|
|
561
597
|
| Fix gaps: NodeID-X round N | Audit: NodeID-X (or re-audit N-1) | builder-N |
|
|
562
598
|
| Re-audit: NodeID-X round N | Fix gaps round N | reviewer-N |
|
|
563
599
|
| Phase 3 finalization | All audits approved | closer |
|
|
600
|
+
| Scribe: Capture Phase 1A | Phase 1A (gate approval) | knowz-scribe |
|
|
601
|
+
| Scribe: Capture Phase 2A | Implement: NodeID-X | knowz-scribe |
|
|
602
|
+
| Scribe: Capture Phase 2B | All audits approved | knowz-scribe |
|
|
603
|
+
| Scribe: Capture Phase 3 | Phase 3 finalization | knowz-scribe |
|
|
564
604
|
|
|
565
605
|
---
|
|
566
606
|
|
|
@@ -631,6 +671,51 @@ Three instances of the same agent, each focused on a different local folder grou
|
|
|
631
671
|
|
|
632
672
|
---
|
|
633
673
|
|
|
674
|
+
## Stage 0: Codebase Scanners (2 instances — conditional)
|
|
675
|
+
|
|
676
|
+
**Agent**: `general-purpose` (x2) | Lightweight codebase searchers (no agent definition file)
|
|
677
|
+
|
|
678
|
+
Two temporary agents that scan the codebase in parallel with the analyst, broadcasting findings to accelerate impact analysis. Only spawned when `CODEBASE_SCANNER_ENABLED = true` (default).
|
|
679
|
+
|
|
680
|
+
**scanner-direct spawn prompt**:
|
|
681
|
+
> You are `scanner-direct` for WorkGroup `{wgid}`.
|
|
682
|
+
> **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
|
|
683
|
+
> **Goal**: {goal}
|
|
684
|
+
> **Focus**: Search source code for goal-related keywords and patterns.
|
|
685
|
+
>
|
|
686
|
+
> **Steps**:
|
|
687
|
+
> 1. Grep for goal keywords across source files (exclude node_modules, dist, build, .git)
|
|
688
|
+
> 2. Read the top 5-8 matching files to understand affected code paths
|
|
689
|
+
> 3. Identify module boundaries and cross-module dependencies
|
|
690
|
+
> 4. Note public APIs and interfaces that may need changes
|
|
691
|
+
>
|
|
692
|
+
> **READ-ONLY.** Do NOT modify any files.
|
|
693
|
+
> **Deliverable**: Broadcast findings to all teammates — affected files, code paths, module boundaries, and interface patterns.
|
|
694
|
+
> **Budget**: Complete within ~12 turns. Focus on breadth over depth.
|
|
695
|
+
|
|
696
|
+
**scanner-tests spawn prompt**:
|
|
697
|
+
> You are `scanner-tests` for WorkGroup `{wgid}`.
|
|
698
|
+
> **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
|
|
699
|
+
> **Goal**: {goal}
|
|
700
|
+
> **Focus**: Discover tests covering the goal area to understand test patterns and coverage shape.
|
|
701
|
+
>
|
|
702
|
+
> **Steps**:
|
|
703
|
+
> 1. Glob for test files: `**/*.test.*`, `**/*.spec.*`, `**/test_*`, `**/tests/**`
|
|
704
|
+
> 2. Grep test files for goal-related keywords
|
|
705
|
+
> 3. Read 3-5 matching test files to understand testing patterns (test framework, mocking strategy, fixture patterns)
|
|
706
|
+
> 4. Check for integration/e2e tests related to the goal area
|
|
707
|
+
>
|
|
708
|
+
> **READ-ONLY.** Do NOT modify any files.
|
|
709
|
+
> **Deliverable**: Broadcast findings to all teammates — test file locations, testing patterns, coverage gaps, and fixture/mock patterns.
|
|
710
|
+
> **Budget**: Complete within ~12 turns. Focus on breadth over depth.
|
|
711
|
+
|
|
712
|
+
**Dispatch**:
|
|
713
|
+
- *Parallel Teams*: Spawned at Stage 0 if `CODEBASE_SCANNER_ENABLED = true`. Use `subagent_type: "general-purpose"`, `maxTurns: 12`. Shut down after Stage 1 (analyst completes Change Set).
|
|
714
|
+
- *Sequential Teams*: Not applicable (scanners are Parallel Teams only).
|
|
715
|
+
- *Subagent*: `Task(subagent_type="general-purpose", description="Scan codebase for {focus}", maxTurns=12, prompt=<above>)` if `CODEBASE_SCANNER_ENABLED = true`.
|
|
716
|
+
|
|
717
|
+
---
|
|
718
|
+
|
|
634
719
|
## Stage 0: Knowz Scout
|
|
635
720
|
|
|
636
721
|
**Agent**: `knowz-scout` | MCP vault researcher and knowledge agent
|
|
@@ -740,10 +825,12 @@ The spawn prompts below are used when `SPECIALISTS_ENABLED` is non-empty. Specia
|
|
|
740
825
|
>
|
|
741
826
|
> **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
|
|
742
827
|
> **Conventions**: Update WorkGroup file with results (prefix entries with `KnowzCode:`). If blocked, report blocker and notify lead.
|
|
828
|
+
> **Codebase scanners**: Scanner agents are running in parallel — their findings will arrive as broadcast messages. Incorporate them into your analysis but do NOT wait for them.
|
|
829
|
+
> **Preliminary Findings Protocol**: As you discover high-confidence NodeIDs, DM the architect with `[PRELIMINARY]` messages (max 3 — see `agents/analyst.md` for format). This lets the architect start speculative research early.
|
|
743
830
|
> **Deliverable**: Change Set proposal written to the WorkGroup file. Include NodeIDs, descriptions, affected files, risk assessment, and dependency map (for Parallel Teams mode).
|
|
744
831
|
|
|
745
832
|
**Dispatch**:
|
|
746
|
-
- *Parallel Teams*: Spawned at Stage 0 alongside scouts and architect. Starts immediately (no blockedBy).
|
|
833
|
+
- *Parallel Teams*: Spawned at Stage 0 alongside scouts, scanners, and architect. Starts immediately (no blockedBy).
|
|
747
834
|
- *Sequential Teams*: Spawn teammate `analyst`, create task `Phase 1A: Impact analysis for "{goal}"`, wait for completion.
|
|
748
835
|
- *Subagent*: `Task(subagent_type="analyst", description="Phase 1A impact analysis", prompt=<above>)`
|
|
749
836
|
|
|
@@ -777,17 +864,41 @@ If `AUTONOMOUS_MODE = false`: If rejected — re-run analyst with user feedback.
|
|
|
777
864
|
### MCP Learning Capture (Optional)
|
|
778
865
|
|
|
779
866
|
If MCP is configured and knowz-scribe is active, after Change Set approval:
|
|
780
|
-
-
|
|
867
|
+
- Create capture task: `TaskCreate("Scribe: Capture Phase 1A")` → `TaskUpdate(owner: "knowz-scribe")`
|
|
868
|
+
- Send message to **knowz-scribe** with task ID: `"Capture Phase 1A: {wgid}. Your task: #{task-id}"` — the scribe reads the WorkGroup file, extracts scope/risk/decision data, and writes to the appropriate vault
|
|
781
869
|
- `search_knowledge({resolved_domain_vault_id}, "patterns for {domain}")` — pull relevant past learnings to inform specification
|
|
782
870
|
- Share any relevant findings with the architect in the Phase 1B prompt
|
|
783
871
|
|
|
784
872
|
---
|
|
785
873
|
|
|
874
|
+
## Stage 0: Architect Pre-load (Parallel Teams)
|
|
875
|
+
|
|
876
|
+
**Agent**: `architect` | Spawned at Stage 0 for context pre-loading and speculative research
|
|
877
|
+
|
|
878
|
+
In Parallel Teams mode, the architect is spawned at Stage 0 (not at Phase 1B). It pre-loads architecture context and performs speculative research on `[PRELIMINARY]` NodeIDs from the analyst.
|
|
879
|
+
|
|
880
|
+
**Stage 0 spawn prompt** (Parallel Teams only):
|
|
881
|
+
> You are the **architect** for WorkGroup `{wgid}`.
|
|
882
|
+
> Read `agents/architect.md` for your full role definition.
|
|
883
|
+
>
|
|
884
|
+
> **Goal**: {goal}
|
|
885
|
+
> **Context files**: Read sections 1-2 and 3.2 of `knowzcode/knowzcode_loop.md` (skip other phases), `knowzcode/knowzcode_project.md`, `knowzcode/knowzcode_architecture.md`
|
|
886
|
+
> **WorkGroup file**: `knowzcode/workgroups/{wgid}.md`
|
|
887
|
+
> **Specs directory**: `knowzcode/specs/`
|
|
888
|
+
>
|
|
889
|
+
> **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
|
|
890
|
+
> **Stage 0 Role**: Pre-load architecture context, then perform speculative research on any `[PRELIMINARY]` NodeID messages from the analyst (see Speculative Research Protocol in `agents/architect.md`). READ-ONLY research — do NOT write specs yet.
|
|
891
|
+
> **Lifecycle**: You persist through the entire workflow. After Gate #1, you will receive spec-drafting tasks via DM. After Gate #2, you shift to consultative role for builders.
|
|
892
|
+
|
|
893
|
+
After Gate #1, the lead sends the approved Change Set via DM and creates spec-drafting tasks. For spec-drafting prompts, see Phase 1B below.
|
|
894
|
+
|
|
895
|
+
---
|
|
896
|
+
|
|
786
897
|
## Phase 1B: Specification
|
|
787
898
|
|
|
788
899
|
**Agent**: `architect` | **Loop.md**: Section 3.2
|
|
789
900
|
|
|
790
|
-
**
|
|
901
|
+
**Spec-drafting prompt** (sent via DM to already-warm architect in Parallel Teams, or as spawn prompt in Sequential/Subagent):
|
|
791
902
|
> You are the **architect** for WorkGroup `{wgid}`.
|
|
792
903
|
> Read `agents/architect.md` for your full role definition.
|
|
793
904
|
>
|
|
@@ -801,12 +912,29 @@ If MCP is configured and knowz-scribe is active, after Change Set approval:
|
|
|
801
912
|
> **Conventions**: Update WorkGroup file with results (prefix entries with `KnowzCode:`). If blocked, report blocker and notify lead.
|
|
802
913
|
> **Deliverable**: Finalized specs for all NodeIDs written to `knowzcode/specs/`.
|
|
803
914
|
|
|
915
|
+
**Spec-drafter spawn prompt** (Path B — 3+ NodeIDs, Parallel Teams only):
|
|
916
|
+
> You are `spec-drafter-{N}` for WorkGroup `{wgid}`.
|
|
917
|
+
> Read `agents/architect.md` for your full role definition — you follow the same Spec Philosophy, Spec Format, and Consolidation Mandate.
|
|
918
|
+
>
|
|
919
|
+
> **Goal**: {goal}
|
|
920
|
+
> **Your NodeIDs**: {partition — 1-2 NodeIDs assigned to this drafter}
|
|
921
|
+
> **Architect Research**: {research findings from architect's speculative research for these NodeIDs}
|
|
922
|
+
> **Cross-NodeID Constraints**: {interface dependencies, shared specs, naming conventions from architect}
|
|
923
|
+
> **Context files**: Read sections 1-2 and 3.2 of `knowzcode/knowzcode_loop.md`, `knowzcode/knowzcode_project.md`, `knowzcode/knowzcode_architecture.md`
|
|
924
|
+
> **WorkGroup file**: `knowzcode/workgroups/{wgid}.md`
|
|
925
|
+
> **Specs directory**: `knowzcode/specs/`
|
|
926
|
+
>
|
|
927
|
+
> **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
|
|
928
|
+
> **Deliverable**: Draft specs for your assigned NodeIDs written to `knowzcode/specs/`. The architect will review for consistency after all drafters finish.
|
|
929
|
+
|
|
804
930
|
**Dispatch**:
|
|
805
|
-
- *Parallel Teams*:
|
|
931
|
+
- *Parallel Teams*:
|
|
932
|
+
- **Path A** (< PARALLEL_SPEC_THRESHOLD NodeIDs): Architect is already warm from Stage 0 pre-load + speculative research. Lead sends DM with approved Change Set, then creates spec-drafting tasks. **Plan approval enabled** — add to prompt: `Present your spec design for lead review BEFORE writing final specs. Wait for approval.` If `AUTONOMOUS_MODE = true`: auto-approve `plan_approval_request` immediately. Log `[AUTO-APPROVED] Architect plan`.
|
|
933
|
+
- **Path B** (>= PARALLEL_SPEC_THRESHOLD NodeIDs): Lead asks architect for partition plan. Architect proposes partitions. Lead spawns spec-drafters (`subagent_type: "architect"`, `permissionMode: "acceptEdits"`, `maxTurns: 15`) with partition-scoped prompts. After all drafters complete, architect runs consistency review and reports to lead.
|
|
806
934
|
- *Sequential Teams*: Spawn teammate `architect`, create task `Phase 1B: Draft specifications for {N} NodeIDs`. **Plan approval enabled** — add to prompt: `Present your spec design for lead review BEFORE writing final specs. Wait for approval.` Wait for `plan_approval_request`, review, respond with `plan_approval_response`. If `AUTONOMOUS_MODE = true`: auto-approve immediately. Log `[AUTO-APPROVED] Architect plan`.
|
|
807
935
|
- *Subagent*: `Task(subagent_type="architect", description="Phase 1B specification drafting", prompt=<above> + "Present your spec design in your output for lead review.")`
|
|
808
936
|
|
|
809
|
-
> **Note:** Plan approval (agent pauses for lead review) only works in Agent Teams mode via `permissionMode: plan`. In subagent mode, the architect presents its design in the output for post-hoc review.
|
|
937
|
+
> **Note:** Plan approval (agent pauses for lead review) only works in Agent Teams mode via `permissionMode: plan`. In subagent mode, the architect presents its design in the output for post-hoc review. Spec-drafters (Path B) do NOT use plan approval — they follow the architect's partition briefing directly.
|
|
810
938
|
|
|
811
939
|
### Quality Gate #2
|
|
812
940
|
|
|
@@ -870,7 +998,8 @@ When complete, present implementation summary including files changed, tests wri
|
|
|
870
998
|
### MCP Learning Capture (Optional)
|
|
871
999
|
|
|
872
1000
|
If MCP is configured and knowz-scribe is active, after implementation completes:
|
|
873
|
-
-
|
|
1001
|
+
- Create capture task: `TaskCreate("Scribe: Capture Phase 2A")` → `TaskUpdate(owner: "knowz-scribe")`
|
|
1002
|
+
- Send message to **knowz-scribe** with task ID: `"Capture Phase 2A: {wgid}. Your task: #{task-id}"` — the scribe reads implementation results from the WorkGroup file and captures patterns, workarounds, and performance optimizations to the `code` vault
|
|
874
1003
|
|
|
875
1004
|
---
|
|
876
1005
|
|
|
@@ -951,7 +1080,8 @@ If `AUTONOMOUS_MODE = false`: User decides — proceed / fix gaps / modify specs
|
|
|
951
1080
|
### MCP Learning Capture (Optional)
|
|
952
1081
|
|
|
953
1082
|
If MCP is configured and knowz-scribe is active, after audit approval:
|
|
954
|
-
-
|
|
1083
|
+
- Create capture task: `TaskCreate("Scribe: Capture Phase 2B")` → `TaskUpdate(owner: "knowz-scribe")`
|
|
1084
|
+
- Send message to **knowz-scribe** with task ID: `"Capture Phase 2B: {wgid}. Your task: #{task-id}"` — the scribe reads audit results from the WorkGroup file and writes findings to the appropriate vault
|
|
955
1085
|
|
|
956
1086
|
---
|
|
957
1087
|
|
|
@@ -971,7 +1101,7 @@ If MCP is configured and knowz-scribe is active, after audit approval:
|
|
|
971
1101
|
>
|
|
972
1102
|
> **Your Task**: #{task-id} — claim immediately (`TaskUpdate(status: "in_progress")`). Mark completed with summary when done.
|
|
973
1103
|
> **Conventions**: Update WorkGroup file with results (prefix entries with `KnowzCode:`). If blocked, report blocker and notify lead.
|
|
974
|
-
> **Vault writes**: If knowz-scribe is active,
|
|
1104
|
+
> **Vault writes**: If knowz-scribe is active, create a capture task (`TaskCreate("Scribe: Capture Phase 3")` → `TaskUpdate(owner: "knowz-scribe")`), then send `"Capture Phase 3: {wgid}. Your task: #{task-id}"` to delegate learning capture and audit trail writes. Do NOT call `create_knowledge` directly.
|
|
975
1105
|
> **Deliverable**: Atomic finalization — update specs to FINAL, update tracker, write log entry, update architecture if needed, delegate learning capture to knowz-scribe, and create final commit.
|
|
976
1106
|
|
|
977
1107
|
**Dispatch**:
|
|
@@ -982,7 +1112,7 @@ If MCP is configured and knowz-scribe is active, after audit approval:
|
|
|
982
1112
|
### Phase 3 Output
|
|
983
1113
|
|
|
984
1114
|
When complete, if MCP is configured and knowz-scribe is active:
|
|
985
|
-
- The closer
|
|
1115
|
+
- The closer creates a capture task (`TaskCreate("Scribe: Capture Phase 3")` → `TaskUpdate(owner: "knowz-scribe")`) and sends a message with the task ID: `"Capture Phase 3: {wgid}. Your task: #{task-id}"`. The lead waits for the scribe's capture task to complete before shutdown.
|
|
986
1116
|
|
|
987
1117
|
Update workgroup to "Closed" and report:
|
|
988
1118
|
|
|
@@ -146,7 +146,8 @@ Use mailbox messaging for coordination between teammates:
|
|
|
146
146
|
| From | To | When |
|
|
147
147
|
|------|-----|------|
|
|
148
148
|
| scout | all | Initial context/vault findings (broadcast) |
|
|
149
|
-
|
|
|
149
|
+
| scanner | all | Codebase scan findings — affected files, test patterns (broadcast) |
|
|
150
|
+
| analyst | architect | `[PRELIMINARY]` NodeID findings during Stage 0 (max 3 DMs), scope clarifications, NodeID overlap with existing specs |
|
|
150
151
|
| architect | analyst | Scope adjustments needed |
|
|
151
152
|
| architect | builder | Design guidance and spec intent responses |
|
|
152
153
|
| builder | analyst | Affected files and dependency questions |
|
|
@@ -217,10 +218,13 @@ Agents must NOT create new tasks for work already assigned to them via task ID.
|
|
|
217
218
|
| context-scout-specs | Stage 0 | After Gate #2 | Spec context lookups |
|
|
218
219
|
| context-scout-workgroups | Stage 0 | After Gate #2 | WorkGroup history lookups |
|
|
219
220
|
| context-scout-backlog | Stage 0 | After Gate #2 | Tracker/log/architecture lookups |
|
|
221
|
+
| scanner-direct | Stage 0 (conditional) | After Stage 1 (analyst done) | Source code scanning — broadcasts affected files and code paths |
|
|
222
|
+
| scanner-tests | Stage 0 (conditional) | After Stage 1 (analyst done) | Test discovery — broadcasts test patterns and coverage shape |
|
|
220
223
|
| knowz-scout | Stage 0 | After Phase 3 capture | Vault queries (read-only) throughout workflow |
|
|
221
224
|
| knowz-scribe | Stage 0 | After Phase 3 capture | Vault writes — receives capture messages, handles all `create_knowledge` calls |
|
|
222
225
|
| analyst | Stage 0 | Early Stage 2 | Scope questions from builders |
|
|
223
|
-
| architect | Stage 0 (pre-load) | After Gate #3 |
|
|
226
|
+
| architect | Stage 0 (pre-load + speculative research) | After Gate #3 | Pre-load → speculative research on `[PRELIMINARY]` NodeIDs → spec drafting (+ parallel coordination for 3+ NodeIDs) → design guidance for builders |
|
|
227
|
+
| spec-drafter(s) | Stage 1 (Path B, 3+ NodeIDs) | After architect consistency review | Draft specs for assigned NodeID partition |
|
|
224
228
|
| builder(s) | Stage 2 | After Gate #3 | Implementation + gap fixes (persistent through gap loop) |
|
|
225
229
|
| reviewer(s) | Stage 2 (1 per builder partition) | After Gate #3 | Incremental audit per partition (persistent through gap loop) |
|
|
226
230
|
| security-officer | Stage 0 (Group C) | After Gate #3 | Threat modeling + vulnerability scanning (officer — can block gates) |
|
|
@@ -237,8 +241,8 @@ All tasks in a workflow use `addBlockedBy` to express the dependency chain:
|
|
|
237
241
|
|
|
238
242
|
### Task Graph Patterns
|
|
239
243
|
|
|
240
|
-
- Stage 0 tasks: scout + knowz-scribe + analysis tasks (no deps)
|
|
241
|
-
- Stage 1 tasks: spec drafting tasks (blocked by gate approval — lead creates after gate)
|
|
244
|
+
- Stage 0 tasks: scout + scanner + knowz-scribe + analysis tasks (no deps)
|
|
245
|
+
- Stage 1 tasks: spec drafting tasks (blocked by gate approval — lead creates after gate). Path B (3+ NodeIDs): spec-drafter tasks + architect consistency review task
|
|
242
246
|
- Stage 2 tasks: implementation subtasks (blocked by spec approval), audit subtasks (blocked by implementation)
|
|
243
247
|
- Stage 3 tasks: finalization (blocked by audit approval)
|
|
244
248
|
|
|
@@ -252,6 +256,8 @@ Team sizing defaults are configurable via `knowzcode/knowzcode_orchestration.md`
|
|
|
252
256
|
| `scout_mode` | full | `--no-scouts` | full (3 scouts), minimal (1 scout), none (lead reads context) |
|
|
253
257
|
| `default_specialists` | [] | `--specialists`, `--no-specialists` | Project-level specialist defaults |
|
|
254
258
|
| `mcp_agents_enabled` | true | `--no-mcp` | Toggle vault agents (knowz-scout, knowz-scribe) |
|
|
259
|
+
| `codebase_scanner_enabled` | true | `--no-scanners` | Toggle codebase scanner agents (scanner-direct, scanner-tests) |
|
|
260
|
+
| `parallel_spec_threshold` | 3 | `--no-parallel-specs` | NodeID count threshold for parallel spec drafting (Path B) |
|
|
255
261
|
|
|
256
262
|
Precedence: hardcoded defaults → orchestration config → per-invocation flags.
|
|
257
263
|
|
|
@@ -284,11 +290,22 @@ During Stage 2, the architect persists as a read-only consultative resource:
|
|
|
284
290
|
- Lead notifies architect when builders are spawned — architect sends intro message to each builder
|
|
285
291
|
- Shut down with builders and reviewers after Gate #3
|
|
286
292
|
|
|
287
|
-
#### Discovery Pre-loading
|
|
288
|
-
During Stage 0, the architect pre-loads context in parallel with analysis:
|
|
289
|
-
- Architect reads architecture docs, existing specs, project config
|
|
290
|
-
-
|
|
291
|
-
-
|
|
293
|
+
#### Discovery Pre-loading + Speculative Research
|
|
294
|
+
During Stage 0, the architect pre-loads context and conducts speculative research in parallel with analysis:
|
|
295
|
+
- **Pre-load phase**: Architect reads architecture docs, existing specs, project config (3-5 turns)
|
|
296
|
+
- **Speculative research phase**: After pre-load, architect receives `[PRELIMINARY]` NodeID messages from the analyst (max 3). For each, it reads affected files, checks spec consolidation, and analyzes interface patterns — all read-only, no spec writing
|
|
297
|
+
- When Gate #1 is approved, architect already has context + deep research on flagged NodeIDs → specs drafted ~80% faster
|
|
298
|
+
- If Gate #1 rejected, architect context and research are still useful for the revised analysis cycle
|
|
299
|
+
- If no `[PRELIMINARY]` messages arrive (simple 1-NodeID change), architect finishes standard pre-load and waits
|
|
300
|
+
|
|
301
|
+
#### Parallel Spec Drafting (Path B — 3+ NodeIDs)
|
|
302
|
+
When the approved Change Set contains 3+ NodeIDs (configurable via `PARALLEL_SPEC_THRESHOLD`), spec drafting is parallelized:
|
|
303
|
+
- Architect proposes NodeID partitions (1-2 per partition, max 3 partitions)
|
|
304
|
+
- Lead spawns spec-drafter agents (using `architect` agent definition) for each partition
|
|
305
|
+
- Each drafter receives: its NodeIDs, architect's speculative research findings, cross-NodeID constraints
|
|
306
|
+
- After all drafters complete, architect runs a consistency review: cross-spec alignment, naming, VERIFY coverage
|
|
307
|
+
- Spec-drafters shut down after consistency review, before Gate #2
|
|
308
|
+
- For 1-2 NodeIDs (Path A), architect drafts all specs alone (current behavior, zero overhead)
|
|
292
309
|
|
|
293
310
|
#### Specialist Agents (Group C — opt-in via `--specialists`)
|
|
294
311
|
|
|
@@ -296,11 +313,12 @@ When specialists are enabled, three additional agents spawn at Stage 0 alongside
|
|
|
296
313
|
|
|
297
314
|
```
|
|
298
315
|
Group A (always): 3 context-scouts + analyst + architect (5 agents)
|
|
316
|
+
Group A (if scanners): + scanner-direct + scanner-tests (+2 agents)
|
|
299
317
|
Group B (if MCP): knowz-scout + knowz-scribe (2 agents)
|
|
300
318
|
Group C (if --specialists): security-officer + test-advisor + project-advisor (3 agents)
|
|
301
319
|
```
|
|
302
320
|
|
|
303
|
-
Max Stage 0 concurrent: 5-
|
|
321
|
+
Max Stage 0 concurrent: 5-12 agents depending on orchestration config (scouts, scanners, MCP agents, specialists). Scouts shut down after Gate #2, scanners shut down after Stage 1, so Stage 2 peak is manageable.
|
|
304
322
|
|
|
305
323
|
##### Officer vs Advisor Authority
|
|
306
324
|
|
|
@@ -327,6 +327,8 @@ All phases work without MCP. MCP enhances analysis depth and organizational lear
|
|
|
327
327
|
|
|
328
328
|
## 7. Learning Capture (Optional)
|
|
329
329
|
|
|
330
|
+
> **Vault content must be detailed and self-contained.** Vault entries are retrieved via semantic search — not read directly like local files. Include full reasoning, specific technology names, code examples, and file paths. See `knowzcode/knowzcode_vaults.md` Content Detail Principle.
|
|
331
|
+
|
|
330
332
|
During finalization, scan the WorkGroup for insight-worthy patterns:
|
|
331
333
|
|
|
332
334
|
| Signal Type | Examples |
|
|
@@ -351,13 +353,21 @@ At each quality gate, send a message to the knowz-scribe with the phase identifi
|
|
|
351
353
|
|
|
352
354
|
The knowz-scribe reads the WorkGroup file, extracts relevant data, checks for duplicates, and writes to the appropriate vault. No other agent should call `create_knowledge` when the scribe is active.
|
|
353
355
|
|
|
356
|
+
**Ad-hoc captures (any agent, any time):**
|
|
357
|
+
|
|
358
|
+
Any agent can send knowledge to the knowz-scribe outside phase boundaries:
|
|
359
|
+
- `"Log: {description}"` — explicit capture, scribe must write it (decides vault routing)
|
|
360
|
+
- `"Consider: {description}"` — soft capture, scribe evaluates whether to log and where
|
|
361
|
+
|
|
362
|
+
The scribe handles routing, dedup, and formatting for both modes. If MCP is unavailable, captures are queued to `knowzcode/pending_captures.md` for later sync.
|
|
363
|
+
|
|
354
364
|
**Single-agent / no scribe (direct MCP writes):**
|
|
355
365
|
|
|
356
366
|
If MCP is available but no knowz-scribe, resolve vault IDs from `knowzcode/knowzcode_vaults.md` before writing:
|
|
357
367
|
|
|
358
|
-
- After Phase 1A: `create_knowledge({ecosystem_vault}, title="Scope: {goal}", content="[
|
|
359
|
-
- After Phase 2A: Capture implementation patterns and workarounds discovered during TDD cycles
|
|
360
|
-
- After Phase 2B: `create_knowledge({ecosystem_vault}, title="Audit: {wgid} - {score}%", content="[
|
|
368
|
+
- After Phase 1A: `create_knowledge({ecosystem_vault}, title="Scope: {descriptive goal summary}", content="[CONTEXT] {problem description, what prompted this work, constraints}\n[INSIGHT] {scope decisions — what's included/excluded and why}\n[RATIONALE] {risk assessment with full reasoning, affected files, mitigation}\n[TAGS] scope, {domain}", tags=["scope", "{domain}"])`
|
|
369
|
+
- After Phase 2A: Capture implementation patterns and workarounds discovered during TDD cycles — include specific file paths, code examples, and the problem each pattern solves
|
|
370
|
+
- After Phase 2B: `create_knowledge({ecosystem_vault}, title="Audit: {wgid} - {score}% — {key finding summary}", content="[CONTEXT] {what was audited, scope of the review}\n[INSIGHT] {specific gaps with file paths and line references, security findings with severity reasoning}\n[RATIONALE] {gap resolution decisions — what was deferred vs fixed and why}\n[TAGS] audit, {domain}", tags=["audit", "{domain}"])`
|
|
361
371
|
- After Phase 2B (enterprise): If enterprise vault configured and compliance enabled, push audit results to enterprise vault
|
|
362
372
|
- After Phase 3: Capture architectural learnings and consolidation decisions (handled by closer agent)
|
|
363
373
|
|
|
@@ -124,16 +124,39 @@ On confirmation, each vault is created via the MCP `create_vault(name, descripti
|
|
|
124
124
|
|
|
125
125
|
Each vault type defines when it accepts writes (Write Conditions) and how content should be formatted (Content Filter).
|
|
126
126
|
|
|
127
|
+
### Content Detail Principle
|
|
128
|
+
|
|
129
|
+
Vault entries live in a vector search index — they are chunked and retrieved via semantic search. Unlike local files (specs, workgroups, logs) which are read directly and benefit from being scannable, vault entries must be **self-contained, detailed, and keyword-rich** because they are discovered by meaning, not by file path.
|
|
130
|
+
|
|
131
|
+
**Include in every vault entry:**
|
|
132
|
+
- Full reasoning and context — why, not just what
|
|
133
|
+
- Specific technology names, library versions, framework details
|
|
134
|
+
- Code examples, file paths, error messages where relevant
|
|
135
|
+
- Consequences and alternatives considered
|
|
136
|
+
|
|
137
|
+
**Anti-pattern** (poor search recall, useless when retrieved):
|
|
138
|
+
|
|
139
|
+
> `"[NodeIDs] AuthMiddleware\n[Risk] Medium"`
|
|
140
|
+
|
|
141
|
+
**Good pattern** (rich search matches, self-contained on retrieval):
|
|
142
|
+
|
|
143
|
+
> `[CONTEXT] During JWT authentication implementation for the Express API, the jsonwebtoken library's verify() method silently accepts expired tokens when clockTolerance is set above 0.`
|
|
144
|
+
> `[INSIGHT] Always set clockTolerance to 0 (default) and handle TokenExpiredError explicitly. Some tutorials suggest 30s tolerance which creates a security window where revoked tokens remain valid.`
|
|
145
|
+
> `[RATIONALE] A 30-second tolerance means stolen tokens stay usable after revocation. Our auth middleware in src/middleware/auth.ts now checks expiry with zero tolerance.`
|
|
146
|
+
> `[TAGS] security, jwt, express, authentication`
|
|
147
|
+
|
|
148
|
+
Write vault content as if the reader has no project context — they will find this entry via a search query months from now.
|
|
149
|
+
|
|
127
150
|
### code
|
|
128
151
|
|
|
129
152
|
**Write Conditions**: Learning category is Pattern, Workaround, or Performance.
|
|
130
153
|
|
|
131
154
|
**Content Filter**:
|
|
132
155
|
```
|
|
133
|
-
[CONTEXT] {
|
|
134
|
-
[PATTERN] {
|
|
135
|
-
[EXAMPLE] {
|
|
136
|
-
[TAGS] {learning category, domain, language}
|
|
156
|
+
[CONTEXT] {Where and why the pattern was encountered — include the component, framework, and problem being solved. Provide enough background for someone with no project familiarity.}
|
|
157
|
+
[PATTERN] {What was built or discovered — describe the approach, the key insight, and how it differs from the obvious/naive solution.}
|
|
158
|
+
[EXAMPLE] {Code snippet, usage example, or file path reference — concrete enough to be directly useful when retrieved.}
|
|
159
|
+
[TAGS] {learning category, domain, language, framework — include specific technology names for search discoverability}
|
|
137
160
|
```
|
|
138
161
|
|
|
139
162
|
### ecosystem
|
|
@@ -142,10 +165,10 @@ Each vault type defines when it accepts writes (Write Conditions) and how conten
|
|
|
142
165
|
|
|
143
166
|
**Content Filter**:
|
|
144
167
|
```
|
|
145
|
-
[CONTEXT] {
|
|
146
|
-
[INSIGHT] {
|
|
147
|
-
[RATIONALE] {
|
|
148
|
-
[TAGS] {learning category, domain}
|
|
168
|
+
[CONTEXT] {What prompted the decision — the problem, the alternatives considered, and the constraints. Include component names and file paths where relevant.}
|
|
169
|
+
[INSIGHT] {The decision, convention, security finding, or integration detail — state it clearly and completely so it stands alone without context.}
|
|
170
|
+
[RATIONALE] {Why this approach was chosen over alternatives — include trade-offs, risks of the rejected options, and any conditions that might change this decision.}
|
|
171
|
+
[TAGS] {learning category, domain, specific technology names — be generous with tags for search discoverability}
|
|
149
172
|
```
|
|
150
173
|
|
|
151
174
|
### finalizations
|
|
@@ -154,11 +177,12 @@ Each vault type defines when it accepts writes (Write Conditions) and how conten
|
|
|
154
177
|
|
|
155
178
|
**Content Filter**:
|
|
156
179
|
```
|
|
157
|
-
[GOAL] {
|
|
158
|
-
[OUTCOME] {success | partial | abandoned}
|
|
159
|
-
[NODES] {NodeIDs changed}
|
|
160
|
-
[DURATION] {
|
|
161
|
-
[
|
|
180
|
+
[GOAL] {Original goal from WorkGroup — restate fully, not just the WorkGroup slug}
|
|
181
|
+
[OUTCOME] {success | partial | abandoned — include what was delivered and what was deferred}
|
|
182
|
+
[NODES] {NodeIDs changed — list each with a one-line summary of what it covers}
|
|
183
|
+
[DURATION] {Phases completed (e.g. "1A-3"), total iterations, any notable delays or blockers}
|
|
184
|
+
[SUMMARY] {Key learnings from this WorkGroup — architectural discoveries, patterns established, gotchas encountered. This is the most valuable field for future search queries.}
|
|
185
|
+
[TAGS] {finalization, domain, outcome, key technology names}
|
|
162
186
|
```
|
|
163
187
|
|
|
164
188
|
---
|