Motion Autocomplete Gen 8
| Gen | Focus | Key Addition | |-----|-------|--------------| | 1-5 | Foundation | Motion detection, Markov prediction, time patterns | | **6** | **Intent Recognition** | **Precursor detection, WHY-inference, goal chains** | | 7 | Holistic Awareness | Wearables + Spatial + Social + Health + Calendar | | **8** | **Living Space** | **Smart Home + Voice Override + Circadian Rhythm** |
Full Public Reader
Motion Autocomplete Gen 8
> ߊ߬ ߞߊ߫ ߖߊ߬ߕߋ߬ ߞߊ߬ ߕߊ߯ ߢߊ ߟߐ߲߫ — "To know where to go, know the path"
AI that predicts your next physical movement and prepares context before you arrive.
Evolution History
| Gen | Focus | Key Addition |
|---|---|---|
| 1-5 | Foundation | Motion detection, Markov prediction, time patterns |
| 6 | Intent Recognition | Precursor detection, WHY-inference, goal chains |
| 7 | Holistic Awareness | Wearables + Spatial + Social + Health + Calendar |
| 8 | Living Space | Smart Home + Voice Override + Circadian Rhythm |
Gen 6 Components (Intent Recognition)
### 🧠 Precursor Detector (`intent/precursor-detector.ts`)
The body broadcasts intent before conscious action — a weight shift, a glance, a reach.
These micro-movements give us 500-2000ms of lead time.
| Precursor Type | Detection Method | Lead Time |
|---|---|---|
| weight-shift | Accelerometer center-of-gravity change | 800-1500ms |
| gaze-redirect | Eye tracking / head turn | 500-1000ms |
| hand-preparation | Gyroscope hand positioning | 300-800ms |
| screen-disengage | Keyboard/mouse activity drop | 1000-2000ms |
| postural-adjustment | Subtle position changes | 500-1000ms |
| breathing-change | Heart rate variability | 1500-3000ms |
// Precursors emit before full movement
mac.on('precursor-signal', ({ type, confidence, impliedIntent }) => {
// weight-shift detected (0.82 confidence)
// implies: ['leaving-seat', 'focus-shifting']
});### 🎯 Intent Engine (`intent/intent-engine.ts`)
Understanding WHY people move, not just WHAT they do.
Intent Categories:
- `leaving-seat` — About to stand up and go somewhere
- `refreshment-seeking` — Heading for food/drink
- `rest-seeking` — Winding down for sleep/nap
- `social-interaction` — Engaging with another person
- `communication-intent` — About to check phone/send message
- `exercise-preparing` — Getting ready for physical activity
- `focus-shifting` — Changing mental context
- `approaching-task` — Settling in for focused work
mac.on('intent-detected', (intent) => {
// Intent: refreshment-seeking (0.78 confidence)
// Goal chain: rising_from_chair → walking_to_kitchen → stationary_kitchen
// Context needs: hydration-reminder-suppress, kitchen-light-prep
});### 🌉 Context Bridge (`intent/context-bridge.ts`)
Translates intent into prepared context with intelligent queuing.
// Actions queue based on confidence and priority
mac.on('context-ready', ({ intent, actionCount, expiresIn }) => {
// refreshment-seeking: 4 actions queued, expires in 45s
});
// Or handle actions directly
mac.registerActionHandler('smart-home', async (action) => {
await homekit.execute(action.parameters);
});Gen 6 Philosophy: Know the WHY
> ߞߊ߬ߡߊ ߞߐ߬ߣߐ߲߬ ߞߊ߫ ߕߊ߯ ߢߊ ߦߋ߫ — "The body knows the path before the mind"
The difference between "standing up" and "standing up to get coffee" determines what context to prepare:
| Movement | Without Intent | With Intent (Gen 6) |
|---|---|---|
| Rising from chair | Generic "mobile mode" | Kitchen lights warming, coffee status checked |
| Walking to door | "Leaving" context | Weather loaded, commute times ready, calendar checked |
| Reaching for phone | "Device check" | Priority messages summarized, quick-reply ready |
Learning System:
- Records actual outcomes vs predictions
- Learns personal precursor patterns
- Adapts goal profiles to individual habits
- Per-activity historical accuracy tracking
Gen 8 Components
### 🏠 Smart Home Integration (`smarthome/device-orchestrator.ts`)
Your home follows you through space:
- Lights warm before you arrive, dim as you leave
- Thermostat adjusts based on zone occupancy
- Appliances prepare (coffee starts when you walk to kitchen)
- Circadian-aware: Light temperature follows your biology
- Learning: Remembers when you manually adjust settings
// Devices auto-prepare based on motion prediction
mac.on('smarthome-preparing', ({ zone, devices }) => {
// Living room lights warming up, TV ready to resume
});### 🎤 Voice Override System (`voice/voice-override.ts`)
Natural language control over predictions:
| Say This | What Happens |
|---|---|
| "I'm not leaving yet" | Cancels all motion preparations |
| "Give me 10 more minutes" | Delays scheduled actions |
| "Skip the coffee" | Cancels specific device |
| "Too bright" / "Warmer" | Adjusts current zone lighting |
| "Switch to focus mode" | Forces specific context mode |
| "Remember this" | Learns current settings as preference |
| "Undo" | Reverts last action |
Wake words: "hey home", "ok motion", "computer" (customizable)
const result = mac.processVoiceCommand("hey home, I'm not leaving yet");
// { success: true, message: "Cancelled all motion preparations" }### 🌡️ Circadian Rhythm Engine (`bio/circadian-rhythm.ts`)
Predictions align with your biology:
- Chronotype detection: Early bird, intermediate, or night owl
- Phase awareness: Peak cognitive, energy dip, wind-down, etc.
- Activity alignment: Scores how well predictions fit current phase
- Confidence adjustment: Lower confidence for biologically unlikely motions
- Optimal timing: Suggests best times for specific activities
mac.getCircadianSummary();
// 🌡️ Phase: morning-peak
// ⚡ Energy: 95%
// 🧠 Cognitive: peak
// 💡 Light: 5000K
mac.suggestTimeFor('deep-work');
// [{ hour: 9, score: 100, phase: 'morning-peak' }, ...]Full Architecture
┌─────────────────────────────────────────────────────────────────────────┐
│ Motion Autocomplete Gen 8 │
│ (Main Orchestrator) │
├─────────────────────────────────────────────────────────────────────────┤
│ GEN 8 COMPONENTS │
├──────────────┬───────────────────┬──────────────────────────────────────┤
│ Device │ Voice │ Circadian │
│ Orchestrator │ Override │ Rhythm │
│ (🏠 Home) │ (🎤 Control) │ (🌡️ Biology) │
├──────────────┴───────────────────┴──────────────────────────────────────┤
│ GEN 7 COMPONENTS │
├──────────┬──────────┬───────────┬────────────┬──────────────────────────┤
│ Watch │ Spatial │ Social │ Health │ Calendar │
│ Bridge │ Mesh │ Network │ Insights │ Intelligence │
├──────────┴──────────┴───────────┴────────────┴──────────────────────────┤
│ GEN 6 COMPONENTS (Intent Layer) │
├────────────────┬──────────────────┬─────────────────────────────────────┤
│ Precursor │ Intent │ Context │
│ Detector │ Engine │ Bridge │
│ (🔮 Signals) │ (🎯 Goals) │ (🌉 Actions) │
├────────────────┴──────────────────┴─────────────────────────────────────┤
│ Event System │
├─────────────────────────────────────────────────────────────────────────┤
│ intent-detected | precursor-signal | motion-pattern | context-ready │
│ motion-anticipated | zone-transition | smarthome-preparing │
│ voice-override | circadian-phase | preparations-cancelled │
└─────────────────────────────────────────────────────────────────────────┘Event Flow Example
1. [Watch] Wrist rotation detected → weight-shift precursor
2. [Gen 6 Precursor] Detected: weight-shift (0.82), postural-adjustment (0.71)
3. [Gen 6 Intent] Pattern match: "Pre-stand sequence" (68% match)
4. [Gen 6 Intent] Inferred: refreshment-seeking (0.74 confidence)
- Goal chain: rising → walking_to_kitchen → stationary
- Evidence: time=10:30am (peak coffee time), screen-disengage recent
5. [Gen 6 Bridge] Queue actions:
- hydration-reminder-suppress (immediate)
- kitchen-light-prep (500ms delay)
- coffee-status-check (immediate)
6. [Circadian] Current phase: morning-peak, energy: 85%
7. [Circadian] Activity alignment: cooking (score: 90%) → boost confidence
8. [SmartHome] Execute kitchen prep:
- Main light: ON, 4000K, 100%
- Under-cabinet: ON
- Coffee maker: Start brew
9. [Voice] User: "Skip the coffee"
10. [SmartHome] Cancel coffee maker action
11. [Spatial] Kitchen sensors confirm arrival
12. [Gen 6 Learning] Record outcome: [rising, walking_to_kitchen] ✓ Correct!Usage
import MotionAutocomplete from './src';
// Initialize with chronotype hint
const mac = new MotionAutocomplete('user-001', {
chronotype: 'intermediate'
});
// ═══════════════════════════════════════════════
// Gen 6: Intent Recognition
// ═══════════════════════════════════════════════
// Feed raw sensor data for intent inference
mac.feedSensorData('phone-accelerometer', {
x: 0.3, y: 0.1, z: 0.8,
duration: 350
});
// Get current inferred intent
const intent = mac.getCurrentIntent();
// { category: 'refreshment-seeking', confidence: 0.74, goalChain: [...] }
// Get predicted movement chain
const chain = mac.getPredictedMovementChain();
// ['rising_from_chair', 'walking_to_kitchen', 'stationary_kitchen']
// Record actual outcome (for learning)
mac.recordMovementOutcome(['rising_from_chair', 'walking_to_kitchen']);
// Listen for intent events
mac.on('intent-detected', (intent) => {
console.log(`Intent: ${intent.category} (${intent.confidence})`);
console.log(`Goal chain: ${intent.goalChain.join(' → ')}`);
});
mac.on('precursor-signal', ({ type, confidence }) => {
console.log(`Precursor: ${type} (${confidence})`);
});
mac.on('context-ready', ({ intent, actionCount }) => {
console.log(`${actionCount} actions queued for ${intent}`);
});
// Register custom action handler
mac.registerActionHandler('smart-home', async (action) => {
await myHomeKit.execute(action.parameters);
});
// ═══════════════════════════════════════════════
// Gen 8: Voice + Circadian + Smart Home
// ═══════════════════════════════════════════════
// Voice commands
mac.processVoiceCommand("hey home, too bright");
// Circadian-aware predictions
const prediction = mac.getPrediction();
// Includes: circadianAlignment, smartHomePrepped
// Activity optimization
const bestTimes = mac.suggestTimeFor('exercise');
// Smart home events
mac.on('smarthome-preparing', ({ zone, devices }) => {
console.log(`Preparing ${zone}: ${devices.length} devices`);
});
// Override events
mac.on('preparations-cancelled', (params) => {
console.log('User cancelled predictions');
});Philosophy
The best interface anticipates, not reacts.
Gen 8 Principle: The Living Space
Your home is an extension of your body. It should:
- Breathe with you — lights follow circadian rhythm
- Listen to you — voice overrides predictions naturally
- Learn from you — preferences adapt over time
- Support you — not demand your attention
> ߞߊ߲ ߦߋ߫ ߛߋ߫ ߟߊ߫ — "Voice has power"
Demo
npx ts-node src/index.tsOutput:
🏃 Motion Autocomplete Gen 8 - Demo Mode
New in Gen 6: Intent Recognition • Precursor Detection • Goal Chains
New in Gen 8: Smart Home • Voice Override • Circadian Rhythm
═══════════════════════════════════════════════
🧠 GEN 6: INTENT STATUS
═══════════════════════════════════════════════
Precursor Buffer: 3 signals (5s window)
Recent: weight-shift, postural-adjustment, screen-disengage
Active Intent: refreshment-seeking
Confidence: 0.74
Goal Chain: rising_from_chair → walking_to_kitchen
Time Horizon: short
Evidence:
- Precursors: weight-shift, screen-disengage
- Temporal: hour_10 (peak coffee time)
Context Actions Queued:
✓ hydration-reminder-suppress (immediate)
⏳ kitchen-light-prep (500ms)
✓ coffee-status-check (immediate)
Learning Stats:
Patterns Learned: 12
Recent Accuracy: 78%
History Size: 143 outcomes
═══════════════════════════════════════════════
📊 CURRENT STATE
═══════════════════════════════════════════════
Circadian Status:
🌡️ Phase: afternoon-recovery
⚡ Energy: 70%
🧠 Cognitive: rising
🏃 Physical: moderate
⏭️ Next: afternoon-peak (45min)
💡 Light: 4500K
Recommended Lighting:
Temperature: 4500K
Brightness: 76%
Best time for deep work:
9:00 (morning-peak) - 100% alignment
16:00 (afternoon-peak) - 85% alignment
10:00 (late-morning) - 75% alignment
═══════════════════════════════════════════════
🎤 VOICE COMMAND DEMO
═══════════════════════════════════════════════
> "hey home, I'm not leaving yet"
✓ Cancelled all motion preparations
> "hey home, skip the coffee"
✓ Skipping coffee-maker
> "hey home, give me 10 more minutes"
✓ Delaying actions by 10 minutesGen 9+ Ideas
- [ ] Predictive file sync (offline what you'll need)
- [ ] WebXR spatial anchors for AR context overlays
- [ ] Collaborative workspace awareness (who's in focus mode?)
- [ ] Sleep quality feedback loop
- [ ] Commute-aware (traffic → leave early suggestions)
- [ ] Weather-responsive (rain → prepare umbrella context)
Privacy Principles
- All processing local-first
- No motion data leaves device
- Voice processing done locally
- Smart home commands stay on local network
- Circadian data never shared
- Learning is per-device, not cloud-synced
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
motion-autocomplete/README.md
Detected Structure
Method · Evaluation · References · Code Anchors · Architecture