Category: data-layer | Epic: 0 | Priority: medium
Summary
Implement CRUD operations for Axiom nodes in Neo4j. Axioms are foundational
world rules and constraints tied to universes (e.g., "magic requires verbal
components", "vampires burn in sunlight"). Supports provenance via SUPPORTED_BY
edges to sources/snippets.
Acceptance Criteria
Dependencies
This use case depends on:
Blocks
This use case blocks:
Implementation
Layer: 1
Files to create:
packages/data-layer/src/monitor_data/schemas/axioms.py
packages/data-layer/tests/test_tools/test_axiom_tools.py
Files to modify:
packages/data-layer/src/monitor_data/tools/neo4j_tools.py
packages/data-layer/src/monitor_data/middleware/auth.py
NEO4J Operations:
neo4j_create_axiom (authority: CanonKeeper)
neo4j_get_axiom (authority: *)
neo4j_list_axioms (authority: *)
neo4j_update_axiom (authority: CanonKeeper)
neo4j_delete_axiom (authority: CanonKeeper)
Notes:
- Axioms are world-building fundamentals (not specific facts)
- Used by rules engine for consistency checking
- Consider hierarchy (universal vs local axioms)
- Retconned axioms remain for history but marked inactive
Testing Requirements
Minimum coverage: 80%
Unit tests:
- test_create_axiom_success: valid params → Axiom node
- test_create_axiom_with_provenance: source_ids → SUPPORTED_BY edges
- test_create_axiom_domain: each domain value works
- test_get_axiom_with_provenance: returns full chain
- test_list_axioms_by_domain: domain filter works
- ... and 3 more
Integration tests:
- test_axiom_lifecycle: create → update → soft-delete
- test_axiom_provenance: create with sources → verify chain
References
Documentation:
Generated from /home/sebas/monitor2/docs/use-cases/data-layer/DL-13.yml
Category: data-layer | Epic: 0 | Priority: medium
Summary
Implement CRUD operations for Axiom nodes in Neo4j. Axioms are foundational
world rules and constraints tied to universes (e.g., "magic requires verbal
components", "vampires burn in sunlight"). Supports provenance via SUPPORTED_BY
edges to sources/snippets.
Acceptance Criteria
Dependencies
This use case depends on:
Blocks
This use case blocks:
Implementation
Layer: 1
Files to create:
packages/data-layer/src/monitor_data/schemas/axioms.pypackages/data-layer/tests/test_tools/test_axiom_tools.pyFiles to modify:
packages/data-layer/src/monitor_data/tools/neo4j_tools.pypackages/data-layer/src/monitor_data/middleware/auth.pyNEO4J Operations:
neo4j_create_axiom(authority: CanonKeeper)neo4j_get_axiom(authority: *)neo4j_list_axioms(authority: *)neo4j_update_axiom(authority: CanonKeeper)neo4j_delete_axiom(authority: CanonKeeper)Notes:
Testing Requirements
Minimum coverage: 80%
Unit tests:
Integration tests:
References
Documentation:
Code:
packages/data-layer/src/monitor_data/db/neo4j.pyGenerated from
/home/sebas/monitor2/docs/use-cases/data-layer/DL-13.yml