Constitutional Knowledge System usage patterns and queries
Ensures all knowledge is properly ingested into the CKS database via DirectCKSIngestion API, not written as loose files. Enforces proper knowledge storage patterns and prevents bypassing CKS ingestion.
P:/__csf/src/features/cks/integration/commands/direct_knowledge_ingestion.py.speckit/data/cks.db, Hypergraph CKS at data/cks_hypergraph/cks_hypergraph.dbDirectCKSIngestion.ingest_knowledge(title, content, category, knowledge_type, tags)search_knowledge(), get_statistics()When ANY of these patterns are detected:
.json files to data/cks/ directory/learn command invocationUse DirectCKSIngestion class from src.cks.integration.commands.direct_knowledge_ingestion
Proper ingestion pattern:
from src.cks.integration.commands.direct_knowledge_ingestion import DirectCKSIngestion
ingestion = DirectCKSIngestion()
result = ingestion.ingest_knowledge(
title="Lesson Title",
content="Full lesson content...",
category="technical_lessons",
knowledge_type="lesson",
tags=["tag1", "tag2"],
)
For session learning (/learn):
| Database | Path |
|---|---|
| Main CKS | .speckit/data/cks.db |
| Hypergraph CKS | data/cks_hypergraph/cks_hypergraph.db |
❌ DO NOT:
data/cks/lessons/Path("data/cks/...").write_text() for knowledge✅ DO:
DirectCKSIngestion.ingest_knowledge()search_knowledge()get_statistics()Before completing /learn or knowledge storage:
DirectCKSIngestion was usedIf you detect yourself taking the shortcut: