Loopx
SPECIFICATION: LOOPX ENGINE
Status: DRAFT (auto-generated by LOOPX — requires Captain review)
Generated: 2026-04-20 10:24 UTC
Source: ~/loopx_engine.py
Auto-generated by: loopx_engine.handle_fill()
⚠ DRAFT NOTICE: This spec was auto-generated from loopx_engine.py.
Invariants were extracted mechanically. Failure modes and verification criteria
require Captain review before this spec is considered AUTHORIZED.
PURPOSE
LOOPX ENGINE — Spec Audit Loop Automation
κ ⚒ | ROUTX module (no standalone server) | Vacuum Rule
handle_query(q) → {"result": ..., "_routed_to": "loopx"}
Commands:
"loop audit" → run full spec audit (delegates to specx) + log result
"loop stale" → specs not updated >7 days
"loop conflicts" → specs with contradicting ports/constants
"loop gaps" → .py engine files with no matching SPEC_*.md
Implementation: ~/loopx_engine.py — no HTTP port (module-only)
ENDPOINTS
(no HTTP endpoints — module-only)
PUBLIC API
handle_audit()— Full spec audit: count, stale, gaps, conflicts. Log result.handle_stale()— Delegate to specx spec stale.handle_conflicts()— Delegate to specx spec conflicts.handle_gaps()— Delegate to specx spec gaps.handle_drift()— Check if spec description matches actual engine docstring.handle_register()— Register daily 04:00 ET loop audit in user crontab (idempotent).handle_fill(target_name: str = "")— Generate DRAFT SPEC_[NAME].md for gap engines.handle_query(q: str)
DEPENDENCIES
Imports: datetime, json, os, pathlib, re, subprocess, sys, time
INVARIANTS
These must remain true at all times. (Auto-extracted — verify each.)
DAILY_LOG=os.path.join(HOME, "spec_audit_daily.log")(extracted from source — verify design intent)ROUTX_URL=http://127.0.0.1:9191/query(extracted from source — verify design intent)
VERIFICATION CRITERIA
GAP — requires Captain review.
Auto-generation cannot determine correctness criteria.
Add verification criteria based on design intent:
>
- [ ] VCx: [describe expected behavior under normal conditions]
- [ ] VCx: [describe expected output for known inputs]
- [ ] VCx: [describe integration behavior with ROUTX / other modules]
FAILURE MODES
GAP — requires Captain review.
Auto-generation cannot determine failure semantics.
Add failure modes based on operational experience:
>
- [ ] FMx: [describe what breaks when dependency X is unavailable]
- [ ] FMx: [describe what happens on malformed input]
- [ ] FMx: [describe recovery behavior]
κ ⚒ LOOPX auto-generated draft. Φζ.⊤.
Promote to AUTHORIZED after Captain review and gap fill.
Jeremy Zlabis
Chronogeometer · Visionary · Disruptor · Chief
42 Sisters AI · East York, Toronto
🍁 Φ 0.042