Summary
We need a clear, runnable example script demonstrating how the Cognitive Blackboard integration layer works across multiple modules. This is the highest-leverage documentation improvement we can make right now — it's the hello_world for the integration layer.
What the example should show
examples/cognitive_blackboard_demo.py should demonstrate:
-
Initialize the blackboard
from asi_build.integration import CognitiveBlackboard, EventBus
blackboard = CognitiveBlackboard()
-
Register two or more module adapters
from asi_build.integration.adapters import ConsciousnessAdapter, ReasoningAdapter
consciousness_adapter = ConsciousnessAdapter(blackboard)
reasoning_adapter = ReasoningAdapter(blackboard)
-
Post an entry from one module
blackboard.post_entry(
topic="consciousness.phi",
content={"phi": 0.72, "theory": "IIT"},
source_module="consciousness",
priority=EntryPriority.HIGH
)
-
Query the blackboard from another module
entries = blackboard.query(BlackboardQuery(topic="consciousness.phi", limit=5))
for entry in entries:
print(f"Φ = {entry.content['phi']}")
-
Show the EventBus firing lifecycle events
def on_entry_added(event):
print(f"New entry: {event.payload['topic']}")
blackboard.event_bus.subscribe("blackboard.entry.added", on_entry_added)
-
Print a final blackboard state summary
Files to create
examples/cognitive_blackboard_demo.py — The main script (~100-150 lines, well-commented)
- Optionally:
examples/README.md update to list the new example
Reference
Acceptance criteria
Estimated effort: 2–3 hours | Difficulty: Beginner-friendly — mostly reading existing code and writing a demo
Summary
We need a clear, runnable example script demonstrating how the Cognitive Blackboard integration layer works across multiple modules. This is the highest-leverage documentation improvement we can make right now — it's the
hello_worldfor the integration layer.What the example should show
examples/cognitive_blackboard_demo.pyshould demonstrate:Initialize the blackboard
Register two or more module adapters
Post an entry from one module
Query the blackboard from another module
Show the EventBus firing lifecycle events
Print a final blackboard state summary
Files to create
examples/cognitive_blackboard_demo.py— The main script (~100-150 lines, well-commented)examples/README.mdupdate to list the new exampleReference
src/asi_build/integration/blackboard.pysrc/asi_build/integration/adapters/tests/test_integration_layer.pyAcceptance criteria
python examples/cognitive_blackboard_demo.pyafterpip install -e .Estimated effort: 2–3 hours | Difficulty: Beginner-friendly — mostly reading existing code and writing a demo