Build the knowledge graph pillar with the kg package: - Node: hierarchical notes with parent/children, C2 wiki-style naming, shared tag/category pool with artifacts - Cell: content units (markdown, code, plain) with ordinal ordering - Fact: EAV tuples with transaction timestamps and retraction support - Edge: directed graph links (child, parent, related, artifact_link) Includes schema migration (002_knowledge_graph.sql), protobuf definitions (kg.proto), full gRPC KnowledgeGraphService implementation, CLI commands (node create/get), and comprehensive test coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4.8 KiB
4.8 KiB
Progress
Tracks implementation progress against the phases in PROJECT_PLAN.md.
Phase 1: Foundation — COMPLETE
Deliverables:
- Go module (
go.mod) atgit.wntrmute.dev/kyle/exo corepackage:Header,Metadata,Value,ObjectType,NewUUID,MapFromList/ListFromMap- SQLite migration framework with embedded SQL files (
db/migrations/) - Initial schema migration (
001_initial.sql): 13 tables covering shared infrastructure, bibliographic, and artifact repository - Database access layer:
Open(with WAL, foreign keys, busy timeout),StartTX/EndTX,ToDBTime/FromDBTime configpackage:Configstruct with paths for database, blob store, Minio endpoint, gRPC listen address.golangci.yaml— strict linting (errcheck, govet, gosec, staticcheck, revive, errorlint)Makefile— vet, lint, test, build targets- Full test coverage for all packages (core, db, config)
Files created:
go.mod,go.sumcore/core.go,core/core_test.godb/db.go,db/db_test.go,db/migrations/001_initial.sqlconfig/config.go,config/config_test.go.golangci.yaml,Makefile
Phase 2: Artifact Repository — COMPLETE
Deliverables:
artifactspackage:Artifact,Snapshot,BlobRef,Citation,Publishertypes withGet/StoremethodsMIMEtype alias for clarity- Tag and category management:
CreateTag/GetTag/GetAllTags,CreateCategory/GetCategory/GetAllCategories,GetArtifactIDsForTag - Metadata store/retrieve operations (
StoreMetadata/GetMetadata) blobpackage: Content-addressable blob store (SHA256 hashing, hierarchical directory layout, read/write/exists)- YAML import:
ArtifactYAML,SnapshotYAML,CitationYAMLwithToStd()conversions andLoadArtifactFromYAML - Protobuf message definitions for all artifact types (
proto/exo/v1/common.proto,proto/exo/v1/artifacts.proto) - gRPC service:
ArtifactServicewith create/get artifacts, store/retrieve blobs, manage tags/categories, search by tag serverpackage: Full gRPC service implementation with proto-domain conversion helpers- buf.yaml for proto linting, buf.gen.yaml for code generation
- Full test coverage for all packages (artifacts, blob, server)
Files created:
blob/blob.go,blob/blob_test.goartifacts/artifact.go,artifacts/citation.go,artifacts/publisher.go,artifacts/snapshot.goartifacts/metadata.go,artifacts/tagcat.go,artifacts/yaml.go,artifacts/artifacts_test.goproto/exo/v1/common.proto,proto/exo/v1/artifacts.protoproto/buf.yaml,proto/buf.gen.yamlproto/exo/v1/*.pb.go(generated)server/server.go,server/server_test.go
Phase 3: CLI Tools — COMPLETE
Deliverables:
exodserver binary: gRPC daemon with startup, graceful shutdown (SIGINT/SIGTERM), auto-migration, flag-based configuration (-listen,-base,-version)exoCLI binary:import(YAML artifacts),tag add/list,cat add/list,search tag- YAML import parser in CLI (converts to proto messages for gRPC transport)
- Environment variable support (
EXO_ADDRfor server address) - Makefile
buildtarget produces both binaries inbin/ - Version injection via
-ldflags
Files created:
cmd/exod/main.gocmd/exo/main.go,cmd/exo/yaml.go
Phase 4: Knowledge Graph — COMPLETE
Deliverables:
kgpackage:Node,Cell,Fact,Edgetypes withStore/Getmethods- Database schema migration (
002_knowledge_graph.sql): nodes, cells, facts, edges, node_tags, node_categories tables - Node hierarchy (parent/children), C2 wiki-style naming, lookup by name
- Cell content types (markdown, code, plain) with ordinal ordering
- EAV fact storage with transaction timestamps and retraction support
GetCurrentFactsForEntityapplies retraction logic to return only active facts- Edge types: child, parent, related, artifact_link (cross-pillar references)
- Protobuf definitions (
proto/exo/v1/kg.proto): Node, Cell, Fact, Edge messages and KnowledgeGraphService - gRPC service: CreateNode, GetNode, AddCell, RecordFact, GetFacts, AddEdge, GetEdges
- CLI commands:
exo node create <name>,exo node get <id> - KG service registered in exod
- Shared tag/category pool: nodes use the same tags/categories tables as artifacts
- Full test coverage (kg package: 10 tests covering nodes, cells, facts, edges, hierarchy, retractions)
Files created:
kg/node.go,kg/cell.go,kg/fact.go,kg/edge.go,kg/kg_test.godb/migrations/002_knowledge_graph.sqlproto/exo/v1/kg.proto,proto/exo/v1/kg.pb.go,proto/exo/v1/kg_grpc.pb.goserver/kg_server.go