poimen
5342de37cc
feat(phase-2.2): synthesis activities (5 activities)
...
Activities for the synthesis workflow pipeline:
1. ChunkAndEmbedActivity — deterministic chunk ID + ingest via memory service
2. ExtractEntitiesActivity — wiki-link, proper noun, technical term extraction
3. ExtractFactsActivity — verb pattern matching (uses/runs/has/is/depends_on)
4. DetectContradictionsActivity — query existing facts + pre-filter contradictions
5. PersistSynthesisActivity — save entities + facts to memory service
Entity extraction patterns:
- [[WikiLinks]] → 0.95 confidence
- ProperNouns → 0.70 confidence
- TECHNICAL_TERMS/camelCase → 0.65 confidence
- Deduplication across patterns
Fact extraction:
- 6 verb patterns (uses, runs_on, has, is, depends_on, connects_to)
- Confidence boost when subject/object are known entities
Contradiction detection:
- Query memory service for existing facts about same subject
- Pre-filter: subject match + different object
- Severity: low/medium/high based on similarity score
- Auto-resolve low severity, queue review for medium/high
Tests: 10 pass (wiki links, proper nouns, tech terms, dedup,
verb patterns, empty text, contradicts, contains, common, classify)
Build: clean, 35 packages pass
2026-09-08 17:38:48 -07:00
Test
9c9e9450bc
refactor: rename action→activity, statemachine→workflow, remove HTTP API layer
...
- action/ → activity/ (Temporal activities)
- statemachine/ → workflow/ (Temporal workflows)
- Removed internal/api/ and cmd/server/ (api-gw handles HTTP, Temporal is the API)
- Created pkg/types/types.go as single source of truth for all shared types
- Extracted CallRoleLLM helper (DRY: implementer/planner/judge shared pattern)
- Fixed circular import: workflow_graph_query uses string activity names
- Fixed logger.logf → logger.Info/Warn (method didn't exist)
- Fixed routing types: added Branches, Activity, BackoffSeconds, TaskActivity
- Fixed db.Canvas.Name, db.Client→DB, GetWorkflow→FetchWorkflow
- Removed unused imports
- All tests pass, build clean, vet clean
2026-09-05 23:59:13 -07:00