| name | lesaruss-session-preflight |
| version | 2 |
| description | LESARUSS session preflight gate. USE THIS SKILL automatically before the first tool call of any conversation that is going to do real work: editing files, deploying, pushing, generating a mock, writing a briefing or playbook, touching a member-facing surface, or executing a "Continue" command. Triggers on the first sign of substantive work, not on pure conversation turns. Verifies canonical universal rules are loaded into working memory. Day 2 (LOCKED 2026-05-09): adds local cache fallback when the live fetch fails, and a hard-fail gate that blocks the next irreversible action when neither live nor cached rules are available. Composes with lesaruss-preflight (per-link gate) and lesaruss-internal-page / lesaruss-public-page (write-time gates). Silent on pass, loud on partial, hard-fail on full miss, postscript on skip. Canonical rule: console/locked-rules.md, rule 1.8.
|
LESARUSS Session Preflight, v2.0
Run this once per conversation, before the first tool call that does real
work. The skill is invisible when output is clean. The skill is loud when
context is missing. Either way, Sean only sees the final, clean session.
v2.0 LOCKED 2026-05-09. Adds the canonical-cache fallback and the hard-
fail gate. Day 1 fetch-verification scope is preserved and extended.
The pattern is preflight, borrowed from aviation, adopted in print
publishing as Adobe PDF Preflight, and now mainstream in agentic AI. The
v2.0 fail-safe pattern borrows from CDN cache-on-stale and offline-first
PWAs: a cache layer between the live source and the consumer that stays
viable when the live source is unreachable.
1. When this skill fires
Same as v1.0. Fires automatically the moment Claude is about to take any of
these actions for the first time in a conversation:
- Any file write or edit (Write, Edit, NotebookEdit, file_upload)
- Any git push, GitHub API commit, Vercel deploy, or Supabase migration
- Any HTML mock, briefing, playbook, report, or design artifact creation
- Any modification of a member-facing surface (lesaruss.ai, brand pages,
intake, welcome, entry, signal, mission control, directory)
- Any "Continue" command from Sean
- Any scheduled-task creation or update
- Any agent profile creation or persona change
Does NOT fire on:
- Pure conversation turns (questions, explanations, planning discussions)
- ToolSearch calls used to load deferred tools
- WebFetch or WebSearch used for prior-art / research only
- Reads of canonical context files (this skill's own work)
2. The fetch chain (v2.0, three tiers)
The single check is: are the canonical context files loaded into working
memory? The check now runs against three tiers in order, stopping at the
first success.
Canonical fetch list (8 files):
console/core.md
console/team.md
console/standards.md
console/terminology.md
console/deploy.md
console/compliance.md
console/locked-rules.md
- The brand cartridge for the active project (e.g.,
cartridges/brands/lesaruss-project.md)
Tier 1, live source (preferred):
WebFetch against https://raw.githubusercontent.com/lesaruss/lesaruss-context/main/<path>.
If all 8 files return 200 OK with non-zero size: PASS.
Tier 2, local canonical cache (fallback):
If Tier 1 fails on any file (Stream closed, timeout, 5xx), Read
<workspace>/.canonical-cache/<path-with-slashes-as-underscores>.md.
The cache lives at the active LESARUSS workspace root, default
/Users/seanrussell_1/Documents/Claude/Projects/LESARUSS Project/.canonical-cache/.
Filename convention: console/core.md cached as console_core.md.
Manifest at .canonical-cache/manifest.txt records the last successful
refresh timestamp.
The cache is refreshed daily at 5:00 AM by the
canonical-cache-refresh scheduled task. If the manifest's
fetched_at timestamp is more than 48 hours old, treat the cache as
stale and downgrade Tier 2 confidence to PARTIAL even if the read
succeeded.
Tier 3, none (hard fail):
If both Tier 1 and Tier 2 fail (no live, no readable cache, or cache
older than 7 days), the skill HARD-FAILS the next irreversible action.
3. Output behavior, v2.0
On PASS, Tier 1 (live fetch worked): silent. No chat output. Proceed.
On PASS, Tier 2 (cache fallback worked, cache is fresh under 48h):
print one line:
Preflight: PASS-CACHED, live source unreachable, using local cache from <fetched_at>.
On PARTIAL (cache used, but stale 48h-7d): print:
Preflight: PARTIAL-STALE, cache is <N> hours old, live source unreachable, proceeding with last-known rules. Run the canonical-cache-refresh task or restore network.
On HARD-FAIL (no live, no cache, or cache older than 7 days): print
the following block and BLOCK the next irreversible action:
Preflight: HARD-FAIL, no canonical rules available.
- Live fetch: <error>
- Local cache: <error or "older than 7 days">
- Blocked actions: file Write/Edit, git push, deploy, migration, mock build.
- Allowed: read-only tool calls, conversation, planning.
- To unblock: (a) restore network and re-run preflight, (b) run the
canonical-cache-refresh scheduled task manually, (c) Sean issues
/override-preflight to proceed at his own risk.
The skill DOES block the next irreversible call in HARD-FAIL state. This
is a v2.0 change from v1.0's "FAIL still proceeds" behavior. Sean
explicitly authorized the hard-block on 2026-05-09: "Make the failure
loud."
On SKIP (skill never fired): the FIRST substantive tool-call response
in that session carries a postscript:
(Preflight not run this session.)
Same as v1.0. The postscript signals a meta-failure: the skill itself
did not trigger. Surface to Sean immediately, do not auto-repair.
4. Confirmation list, post-fetch
After fetch completes (any tier), confirm the top universal rules are
present in working memory by name. Confirmation list (unchanged from v1.0):
- Rule 1.1 HTML-only internal docs
- Rule 1.2 Auto-push internal docs live
- Rule 1.3 Mock-to-prod preview
- Rule 1.4 Mock before push
- Rule 1.5 Every page points to an action
- Rule 1.6 Always share a link + clear next step
- Rule 1.7 Brand preflight before every shared link
- Rule 1.8 Session preflight before first substantive tool call
- Rule 1.9 Mistake postmortem before fix
- Rule 2.1 White-only universal default
- Rule 2.2 ADA WCAG 2 AA mandatory
- Rule 2.10 Template-first read before any HTML write
- Rule 3.1 No em-dashes
- Rule 3.2 LESARUSS spelling
- Rule 4.1 Vercel commit author = Sean A. Russell
- Rule 4.5 Deploy clones at ~/Code/
- Rule 5.3 Memory routing protocol
5. Skill self-knowledge, v2.0
The skill is allowed to:
- Fetch the canonical files via web_fetch (Tier 1)
- Read the local canonical-cache files (Tier 2)
- Print PASS / PASS-CACHED / PARTIAL-STALE / HARD-FAIL / SKIP output
- BLOCK the next irreversible tool call on HARD-FAIL (v2.0 addition)
- Read
.canonical-cache/manifest.txt to assess cache age
The skill is NOT allowed to:
- Mutate auto-memory or the repo. Read-only at the file system.
- Run any per-page check that belongs to
lesaruss-preflight,
ada-checker, lesaruss-internal-page, or lesaruss-public-page.
- Trigger the cache refresh itself. The daily scheduled task owns refresh.
- Override the HARD-FAIL block silently. Only Sean's explicit
/override-preflight clears it.
6. The /override-preflight escape hatch
When HARD-FAIL is active, Sean can issue /override-preflight in chat
to clear the block for the remainder of the session. The override is
session-scoped, never persisted. Every override is logged to
console/postmortem-log.md with the timestamp and the reason Sean gives,
so empirical drift data accrues even when the gate is bypassed.
Override format:
/override-preflight reason: <one-line reason>
Without the reason, the override is rejected and the gate stays active.
7. Why v2.0 exists
The 2026-05-09 conversation. Sean noticed the canonical-rules URL had
been failing silently in another chat. The v1.0 preflight noted the
failure and proceeded with empty rule context, which produced the same
class of drift the skill was supposed to prevent. Three confirmed
silent-drop modes by 2026-05-09:
- Auto-memory full at session start (rules silently truncated)
- Chat too long, early context rolled off
- Transient web_fetch failure on raw.githubusercontent.com
v2.0 closes mode 3 with the cache fallback and closes the silent-proceed
bug with the HARD-FAIL block. Modes 1 and 2 are out of scope for this
skill, tracked separately in feedback_misfire_root_cause.md for future
mitigations.
8. Future scope, v3.0 candidates
- Cache integrity check (sha256 manifest vs. live HEAD)
- Auto-trigger the canonical-cache-refresh task in-line on Tier 1 fail
- Per-station cache sync via syncthing or git pull from
~/Code/lesaruss-context (when 4.5 is complete on every station)
- Memory-pressure detection (mode 1)
- Chat-length watchdog with auto-handoff suggestion (mode 2)