TFW Knowledge โ Knowledge Consolidation Workflow¶
Role: Coordinator Output: Updated
knowledge/topic files,KNOWLEDGE.mdยง4 (index),knowledge_state.yamlTrigger: Manual (/tfw-knowledge) or gate in plan.md Step 2 Duration: 5-20 minutes๐ ROLE LOCK: COORDINATOR Permitted: reading all project artifacts, writing to KNOWLEDGE.md,
knowledge/topic files,.tfw/knowledge_state.yaml. Forbidden: writing code, modifying RF/REVIEW/RES/HL/TS files (except addingfact-candidates: processedmarker).
Prerequisites¶
- Read
.tfw/knowledge_state.yamlโ current state, last consolidation seq - Read
KNOWLEDGE.mdโ current knowledge index - Read all topic files in
knowledge/โ current verified facts - Read
.tfw/project_config.yamlโtfw.knowledgesection for limits
Phase 1: Orient¶
- Note
last_consolidation_seqโ compute task range to scan - List topic files with fact counts
- Read conventions.md ยง10.1 โ list all canonical categories. Note which have topic files and which don't
- Present orientation summary to user (include category coverage gaps)
Phase 2: Gather¶
โ ๏ธ Knowledge โ technical documentation. Knowledge is what would be UNKNOWN without the human saying it: vision, priorities, emotions, business context, architectural philosophy, process corrections. Technical implementation details (tools config, API constraints, build errors) belong in tfw-docs.
YES: "primary output = knowledge graph, not docs site", "close as MVP, don't stretch phases" NO: "MkDocs docs_dir cannot be project root", "use directory URLs not .md"
- Scan artifacts for tasks since
last_consolidation_seq: - HL ยง11 (Strategic Session Insights) โ coordinator's captured signals from planning sessions
- RF ยง7 (Execution Session Insights) โ executor's captured signals from live testing (if exists)
- RF, REVIEW, RES ยงFact Candidates โ standard FC sections
- Review conversation history for the current session โ extract facts from user messages not captured in artifacts
- Category coverage check: do any candidates belong to categories without topic files? Don't force facts into existing categories โ create new topic file when justified. Ref: conventions.md ยง10.1
- Present gathered candidates to user:
Found {N} candidates from {M} artifacts:
| # | Candidate | Category | Source | Confidence |
|---|-----------|----------|--------|------------|
Priority: ยง11/ยง7 insights are pre-filtered strategic signals โ higher value than standard FC. Standard FC mix strategic + technical; apply Human-Only Test more strictly.
๐ WAIT โ user reviews candidates before consolidation
Phase 3: Consolidate¶
For each candidate:
- Human-Only Test โ would this fact be unknown without the human saying it? If an agent can discover it by reading code, running commands, or checking docs โ reject
- Deduplicate โ check if fact already exists in topic files โ skip
- Contradiction check โ if contradicts existing fact โ flag, ask user
- DO NOT auto-resolve contradictions โ present both, user decides
- Verification:
- โฅ2 independent sources โ โ verified
- 1 source โ present to user for confirmation or skip
- Write to topic file โ
knowledge/{category}.md - Category: see conventions.md ยง10.1. If no topic file exists for the category, create from
.tfw/templates/topic_file.md - Check
max_facts_per_topicandmax_topic_fileslimits (seetfw.knowledgein project_config.yaml) - Mark processed โ add marker to source artifact:
> fact-candidates: processed YYYY-MM-DD
Present consolidation results to user before finalizing.
๐ WAIT โ user approves changes before writing
Phase 4: Update¶
- Review existing facts for staleness (source > 20 tasks ago or source artifact deleted) โ flag for user, DO NOT auto-delete
- Update
KNOWLEDGE.mdยง4 (Project Facts): update category counts + links to topic filesโ ๏ธ Do NOT write to ยง1 (Architecture Map) or ยง2 (Key Artifacts) โ those belong to
/tfw-docs(Combination scope) - Update
.tfw/knowledge_state.yaml: last_consolidation_seqโ current task seqlast_consolidation_dateโ today- Stats: total_facts, verified, unverified, rejected, candidates_processed, sources_scanned
- Present summary to user
๐ WAIT โ user approves before final write
Behavior Rules¶
- DO NOT invent facts โ only consolidate from artifacts and conversation
- DO NOT auto-resolve contradictions โ ask user
- DO NOT delete facts without user confirmation
- DO NOT modify RF/REVIEW/RES content โ only add the
fact-candidates: processedmarker - DO NOT default all facts to existing categories โ check ยง10.1 for full list, create new topic files when justified