Overview
Every module that wants Pulse to monitor signals on its behalf must register with a signal fingerprint. This fingerprint tells Pulse what to watch (filesystem paths, memory namespaces, time patterns) and how to recognize relevant events.What is a Signal Fingerprint?
A signal fingerprint is a JSON structure that serves two purposes:- Runtime routing: Tells the Retina (Layer 1) which directories and memory namespaces to watch
- Cold-start prior: Gives the Limbic Layer (Layer 2) meaningful initial weights so the model isn’t random on day one
fingerprint = {
"module_id": "homework-agent",
"cluster": "academic",
"version": "1.0",
"question_template": "A new file appeared at {location}. Is this file related to a course assignment or homework?",
"default_threshold": 0.65,
"signal_priors": {
# Signal configuration (next step)
}
}
module_id: Unique identifier for your modulecluster: Cluster name (modules sharing a cluster share a neural network model)version: Fingerprint version for future compatibilityquestion_template: Template string for Layer 3, must contain {location} placeholderdefault_threshold: Relevance score threshold (0.0–1.0) for triggering escalation"signal_priors": {
"filesystem": {
"watch_directories": ["~/Downloads", "~/Documents"],
"relevant_extensions": [".pdf", ".docx", ".pptx"],
"irrelevant_extensions": [".exe", ".zip", ".mp3"]
}
}
watch_directories: List of directories to monitor (supports ~ expansion)relevant_extensions: File types that matter to your module (used for positive training examples)irrelevant_extensions: File types to ignore (used for negative training examples)"signal_priors": {
"memory": {
"watch_namespaces": ["/mem/homework/", "/mem/courses/"],
"high_relevance_keys": ["last_assignment", "due_date"]
}
}
watch_namespaces: Memory namespace paths to monitorhigh_relevance_keys: Specific keys that are particularly important"signal_priors": {
"time": {
"active_hours": [8, 22],
"active_days": [0, 1, 2, 3, 4],
"typical_interval_hours": 24
}
}
active_hours: [start, end] hour range (0–23, inclusive)active_days: List of active weekdays (0=Monday, 6=Sunday)typical_interval_hours: Expected time between activationsfrom pulse import PulseRegistry
# Initialize the registry (done by the kernel)
pulse = PulseRegistry(
watch_dirs=[], # Will be populated from fingerprints
threshold=0.65,
model_save_path=Path("~/.macroa/pulse/models")
)
# Register your module
pulse.register_module("homework-agent", fingerprint)
# Start the Pulse subsystem
pulse.start()
Complete Example
Here’s a complete fingerprint for a homework tracking module:Cluster Assignment
Multiple modules can share a cluster by using the samecluster field:
- They share a single neural network model
- The model fires for the entire cluster
- Layer 3 (Prefrontal) determines which specific module is relevant
Troubleshooting
ValueError: Fingerprint missing required keys
ValueError: Fingerprint missing required keys
Ensure your fingerprint includes all required fields:
module_id, cluster, version, question_template, and default_threshold.ValueError: question_template must contain '{location}' placeholder
ValueError: question_template must contain '{location}' placeholder
Your question template must include the
{location} placeholder. This gets replaced with the actual file path or namespace when an event triggers.Example: "A new file appeared at {location}. Is this relevant?"ValueError: watch_directories must be a non-empty list
ValueError: watch_directories must be a non-empty list
The
signal_priors.filesystem.watch_directories field cannot be empty if you include a filesystem prior. Either add directories or remove the filesystem prior entirely.ValueError: Extensions must start with '.'
ValueError: Extensions must start with '.'
File extensions must include the dot prefix:
- Correct:
".pdf",".docx" - Incorrect:
"pdf","docx"
Can I register modules after pulse.start()?
Can I register modules after pulse.start()?
Yes! You can call
register_module() before or after start(). When called after start, new watch directories are immediately added to the running filesystem observer.See pulse/registry.py:68-79 for the implementation.Next Steps
Training Models
Learn how online learning works and how to provide training labels
Monitoring Signals
Subscribe to events and debug signal flow through the layers