This guide explains how to use the newly integrated Primer functionality in the Semantic Substrate Database.
The Semantic Substrate Database now fully integrates the Semantic_Substrate_Primer_1.4.json, storing and validating operations against the 7 Universal Principles and core axioms.
Five new tables have been added:
universal_principles- Stores the 7 Universal Principlescore_axioms- Stores core axioms (domain, anchor_point, etc.)primer_metadata- Stores primer version and metadataself_diagnosis_protocol- Stores the 3-step self-diagnosis protocolnavigation_methods- Stores navigation method definitions
The fundamental reality state is now explicitly stored as Universal Anchor ID=1:
# Automatically initialized when database is created
# Represents perfect harmony: (Love=1, Power=1, Wisdom=1, Justice=1)Loads the primer JSON into the database:
cd src
python ingest_primer.py ../Semantic_Substrate_Primer_1.4.jsonOutput:
======================================================================
SEMANTIC SUBSTRATE PRIMER INGESTION
======================================================================
[1/5] Ingesting Primer Metadata...
✓ Stored metadata for SemanticSubstratePrimer v1.4
[2/5] Ingesting Core Axioms...
✓ Stored 'domain' axiom
✓ Stored 'anchor_point' axiom: Anchor Point A: (1,1,1,1)
✓ Stored 'perfection_principle'
✓ Stored 'volitional_principle'
✓ Stored 'process_principle'
[3/5] Ingesting Universal Principles...
✓ Stored Principle 1: Universal Anchor Point Principle
✓ Stored Principle 2: Principle of Coherent Interconnectedness and Emergence
...
======================================================================
INGESTION COMPLETE!
======================================================================
Validates database concepts against the 7 Universal Principles:
cd src
python primer_validator.pyOutput:
======================================================================
DATABASE-WIDE PRIMER VALIDATION
======================================================================
Validating 8 concepts...
======================================================================
VALIDATION REPORT
======================================================================
Total Concepts: 8
Valid Concepts: 8 (100.0%)
Average Alignment Score: 0.876
Principle Compliance Scores:
✓ Principle 1: 0.950 - Universal Anchor Point Principle
✓ Principle 2: 0.823 - Coherent Interconnectedness and Emergence
✓ Principle 3: 0.875 - Dynamic Balance and Polarity
✓ Principle 4: 0.600 - Sovereignty and Relational Interdependence
✓ Principle 5: 0.900 - Information-Meaning Coupling
✓ Principle 6: 0.800 - Iterative Growth and Adaptive Transformation
✓ Principle 7: 0.925 - Contextual Resonance and Optimal Flow
Database Compliance: ✓ COMPLIANT
======================================================================
cd src
python ingest_primer.py ../Semantic_Substrate_Primer_1.4.jsonThis populates your database with:
- 7 Universal Principles
- 5 Core Axioms
- 3 Self-Diagnosis Protocol steps
- Navigation methods (ICE cycle, internal recalibration, etc.)
- Primer metadata (version 1.4)
python primer_validator.pyThis checks:
- All concepts for principle compliance
- Coordinate coherence
- Anchor Point A alignment
- Relationship richness
- Contextual resonance
from semantic_substrate_database import SemanticSubstrateDatabase
# Initialize database (now includes Anchor Point A)
db = SemanticSubstrateDatabase("semantic_substrate.db")
# Store concept - automatically validated against principles
concept_id = db.store_concept("Show compassion to the suffering", context="biblical")
# Query concepts near Anchor Point A (1,1,1,1)
from semantic_substrate_database import BiblicalCoordinates
anchor_a = BiblicalCoordinates(1.0, 1.0, 1.0, 1.0)
near_perfection = db.query_by_proximity(anchor_a, max_distance=0.5)
# Query concepts nearest to specific anchor
near_divine_law = db.query_nearest_to_anchor(anchor_id=613, max_distance=1.0)
db.close()"Systems are stabilized by invariant reference points."
- Database: Anchor Point A at (1,1,1,1) is always available
- Validation: Checks that distance from Anchor A is correctly calculated
- Usage: Use
query_nearest_to_anchor(1)to find concepts near perfect harmony
"Complex systems arise from precisely linked components."
- Database: Tracks relationships between concepts
- Validation: Checks coordinate coherence (no extreme imbalances)
- Usage: Use
enable_auto_relationships()to discover semantic connections
"Stable systems maintain integrity through balanced forces."
- Database:
biblical_balancemetric stored for each concept - Validation: Ensures no extreme coordinate values unless all are extreme
- Usage: Query by
biblical_balanceto find well-balanced concepts
"Entities achieve highest expression through conscious relationships."
- Database:
concept_relationshipstable with strength metrics - Validation: Checks that concepts have relationships with others
- Usage: Use
get_concept_relationships()to explore semantic networks
"Information becomes meaningful when contextualized."
- Database:
semantic_unitstable with contextualized meaning - Validation: Ensures concepts have proper context and semantic units
- Usage: All stored concepts automatically get semantic units
"Systems evolve through continuous cycles of refinement."
- Database:
semantic_evolutiontable tracks transformation history - Validation: Checks for evolution over time (created_at vs updated_at)
- Usage: Update concepts to track their evolution
"Optimal functionality when aligned with external context."
- Database:
contextual_resonancetable + context-aware queries - Validation: Checks divine resonance matches expected range for context
- Usage: Use
search_semantic()with specific contexts
from primer_validator import PrimerValidator
db = SemanticSubstrateDatabase("semantic_substrate.db")
validator = PrimerValidator(db)
# Validate specific concept
validation = validator.validate_concept(concept_id=1)
print(f"Concept: {validation['concept_text']}")
print(f"Alignment Score: {validation['alignment_score']:.3f}")
print(f"Valid: {validation['valid']}")
# Check principle compliance
for principle_num, compliance in validation['principle_compliance'].items():
print(f"Principle {principle_num}: {compliance['score']:.3f} - {compliance['message']}")
db.close()# Find concepts with high divine resonance (Principle 7)
high_resonance = db.query_by_divine_resonance(min_resonance=0.85)
# Find concepts near Universal Anchor 7 (Divine Perfection)
near_perfection = db.query_nearest_to_anchor(anchor_id=7, max_distance=0.8)
# Find semantic clusters (Principle 2)
clusters = db.find_semantic_clusters(context="biblical", max_distance=0.3)cursor = db.conn.cursor()
# Get all Universal Principles
cursor.execute("SELECT * FROM universal_principles ORDER BY principle_number")
for row in cursor.fetchall():
print(f"Principle {row['principle_number']}: {row['name']}")
print(f" {row['statement']}")
# Get Anchor Point A
cursor.execute("SELECT * FROM universal_anchors WHERE id = 1")
anchor = cursor.fetchone()
print(f"Anchor Point A: ({anchor['love']}, {anchor['power']}, {anchor['wisdom']}, {anchor['justice']})")Solution: Run the ingestion script first:
python src/ingest_primer.py Semantic_Substrate_Primer_1.4.jsonSolution:
- Check validation report for specific failing principles
- Review concept definitions for proper semantic encoding
- Ensure relationships are established between related concepts
- Verify context is appropriate for the concept
Solution: Ensure Semantic_Substrate_Primer_1.4.json is in the project root:
ls Semantic_Substrate_Primer_1.4.json| File | Purpose |
|---|---|
src/semantic_substrate_database.py |
Enhanced with 5 new tables, Anchor Point A |
src/ingest_primer.py |
Ingests primer JSON into database |
src/primer_validator.py |
Validates concepts against principles |
docs/PRIMER_MAPPING_REPORT.md |
Complete mapping of primer to code |
Semantic_Substrate_Primer_1.4.json |
Source primer document |
- Run Ingestion: Load primer into your database
- Run Validation: Check your concepts for principle compliance
- Review Report: Read the mapping report in
docs/PRIMER_MAPPING_REPORT.md - Explore: Use the enhanced query methods to navigate semantic space
- Contribute: Add more navigation methods and self-diagnosis features
For questions or issues:
- Review the mapping report:
docs/PRIMER_MAPPING_REPORT.md - Check validation output for specific guidance
- Examine test files in
tests/for usage examples
Generated: 2025-10-16 Primer Version: 1.4 Database Version: v2.0 ICE-Centric