ai-preflight

Bootstraps AI-OS sessions by reading DIGEST, TASKS.md, and stamping SESSION.md.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/Vimurai/ai-os --skill ai-preflight-vimurai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-preflight
Source: https://github.com/Vimurai/ai-os/tree/main/.claude/skills/ai-preflight
Command: npx skills add https://github.com/Vimurai/ai-os --skill ai-preflight-vimurai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Starting a new agent session in an AI-OS project without context wastes tokens and risks acting on stale task state. This Skill standardizes session bootstrap so every agent reads the right project files in the right order and verifies that markdown task lists match the SQLite state database. ## Core Features & Use Cases - DIGEST-first read order: Loads .ai/DIGEST.md as the primary project snapshot, then .ai/TASKS.md for assignments, skipping heavy files like architect.md to save tokens. - State synchronization check: Calls the task-synchronizer MCP to verify TASKS.md agrees with state.sqlite before trusting any task status. - Health probes: Runs the incident aggregator and INSIGHTS.md staleness check to surface recurring failures and outdated meta-cognition reports. - Layered fallback: Provides a Bash/python3 Layer 2 fallback when the orchestrator MCP is unavailable, escalating to ENGINEER.md emergency recovery at Layer 3. - Use Case: An engineer opens a terminal in an AI-OS project and invokes the skill; the agent immediately knows the current focus, open E-## tasks, unread implementation deltas, and any incident thresholds reached. ## Quick Start Activate the ai-preflight skill at the start of every session in an AI-OS project to load project context and stamp SESSION.md.

Frequently Asked Questions about ai-preflight

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bootstrap an agent session in an AI-OS project?▼

Invoke the ai-preflight skill at session start. It reads .ai/DIGEST.md first, then .ai/TASKS.md for assignments, runs sync and staleness checks, and appends a session stamp to .ai/SESSION.md.

How does ai-preflight verify task list consistency?▼

It calls the task-synchronizer MCP verify_markdown_sync tool, which compares TASKS.md checkboxes against state.sqlite rows. SYNC_FAIL anomalies, such as a task marked done in markdown but open in state, must be fixed via update_task_status before proceeding.

What happens if the orchestrator MCP server is unavailable?▼

The skill falls back to Layer 2: Bash and python3 commands read DIGEST.md, extract task counts and stamps from state.json, list open tasks, and stamp SESSION.md manually. If that also fails, it escalates to the Emergency Recovery section in ENGINEER.md.

Why does ai-preflight skip reading architect.md?▼

Skipping .ai/architect.md during preflight saves tokens under the project's token-economy rules. The blueprint is only read after preflight when a specific assigned task explicitly requires architectural details.

Can the incident and insights checks be disabled?▼

Yes. Set AI_INCIDENT_TRACKER_DISABLE=1 to short-circuit the incident aggregator and AI_INSIGHTS_STALENESS_DISABLE=1 for the staleness probe. Both checks fail open and report DISABLED or UNAVAILABLE without blocking the session.