Overview
A Module Fingerprint is the structured description a module provides when registering with the Pulse. It serves two critical purposes:- Runtime routing: tells Retina which directories and memory namespaces to watch, and tells Layer 3 which question template to use
- Cold-start prior: tells Layer 2 which feature vector slots matter for this module, so the LSTM model is not random on day one
Fingerprints enable the Pulse to have a reasonable baseline on the first day of operation, before any training data exists.
Fingerprint Format
Field Reference
Top-Level Fields
| Field | Type | Required | Description |
|---|---|---|---|
module_id | string | Yes | Unique identifier for this module |
cluster | string | Yes | Cluster name for grouping related modules |
version | string | Yes | Fingerprint schema version |
question_template | string | Yes | Template for Layer 3 question formation |
default_threshold | float | Yes | Escalation threshold (0.0–1.0) |
signal_priors | object | Yes | Signal-specific priors (see below) |
Signal Priors: Filesystem
| Field | Type | Description |
|---|---|---|
watch_directories | list[string] | Directories to monitor. ~ is expanded to home directory. |
relevant_extensions | list[string] | File extensions strongly associated with this module (positive examples) |
irrelevant_extensions | list[string] | File extensions NOT associated with this module (negative examples) |
Extensions must start with
. (e.g., ".pdf", not "pdf"). This is validated at parse time.Signal Priors: Memory
| Field | Type | Description |
|---|---|---|
watch_namespaces | list[string] | Memory namespaces to monitor for writes/updates |
high_relevance_keys | list[string] | Specific keys within those namespaces that are highly relevant |
Future feature: Memory signal priors are parsed and validated but not yet used by Layer 1 (Retina) in the current implementation.
Signal Priors: Time
| Field | Type | Description |
|---|---|---|
active_hours | [int, int] | Hour range when this module is typically active (0–23, inclusive) |
active_days | list[int] | Days of week when active (0=Monday, 6=Sunday) |
typical_interval_hours | float | Expected time between activations (for relevance decay) |
Active hours encoding
Active hours encoding
The
active_hours field is a closed interval [start, end] where both start and end are included:[8, 22]means 8 AM through 10 PM (inclusive)[0, 23]means all day (no hour preference)- Start must be ≤ end (no wrap-around support yet)
Parsing and Validation
Fingerprints are parsed and validated usingparse_fingerprint():
pulse/fingerprint.py
Cold-Start Initialization
Feature Slot Relevance Mask
The fingerprint is converted to a relevance mask — a float32 array of length 16 (FEATURE_DIM) where each value indicates how much this module cares about that feature slot:pulse/fingerprint.py
Weight Biasing Formula
The mask is converted to a weight scale using:| Mask Value | Scale | Meaning |
|---|---|---|
| 0.0 | 0.1 | Nearly zeroed (irrelevant slot) |
| 0.5 | 1.05 | Neutral (weakly relevant) |
| 1.0 | 2.0 | Doubled (highly relevant) |
Synthetic Training Examples
Future feature: The architecture document specifies that fingerprints should be used to generate synthetic positive and negative training examples:The fingerprint is converted into synthetic training examples (positive and negative) that are used to pre-train the cluster model before any real data exists.Current implementation: Only weight biasing is implemented. Synthetic example generation is planned for a future version.
Extension Hash Encoding
File extensions are hashed using CRC32 for inclusion in the feature vector:pulse/fingerprint.py
Why CRC32 % 1000?
Why CRC32 % 1000?
The CRC32 hash produces a 32-bit integer. To normalize to
[0.0, 1.0):- Take
crc32(extension) % 1000to get a value in[0, 999] - Divide by 1000.0 to get a float in
[0.0, 0.999]
SignalEvent.to_feature_vector() slot [10] (see Layer 1: Retina).ModuleFingerprint Dataclass
pulse/fingerprint.py
Convenience Methods
Example Fingerprints
Homework Agent
Email Monitor
Time-Only Agent
Best Practices
Be Specific
List all relevant extensions and watch only necessary directories.
Set Realistic Thresholds
Start with 0.65–0.70 and adjust based on false positive/negative rates.
Use Clear Templates
Question templates should be specific to the module’s domain.
Test Validation
Always test fingerprints with
parse_fingerprint() before deployment.Validation Checklist
Before deploying a fingerprint:- All required fields present (
module_id,cluster,version,question_template,default_threshold) -
question_templatecontains{location}placeholder -
default_thresholdis in range [0.0, 1.0] - All extensions start with
.(e.g.,".pdf") -
active_hoursis[start, end]with start ≤ end -
active_dayscontains only integers in [0, 6] -
watch_directoriespaths exist on disk (or will be created)
Use
parse_fingerprint() during development to catch validation errors early. The parser provides detailed error messages.Next Steps
- Learn how fingerprints are used in Layer 2: Limbic for cold-start initialization
- Understand the Layer 1: Retina feature vector encoding
- See how Layer 3: Prefrontal uses question templates