Preflight
Validate runtime readiness before Pulse spends planning or execution effort.
This skill is the sole authority for onboarding, tool-health, and readiness decisions in a Pulse session.
pulse:using-pulse consumes the artifacts written here and routes next steps, but it does not rerun onboarding or readiness checks.
Do not explore, plan, validate, swarm, or execute until this skill finishes.
When to Use
- User says: "start Pulse", "run Pulse", "/go", "resume Pulse"
- Before any full Pulse workflow
- Before execution if tool availability is uncertain
- After environment changes: new machine, new shell, new repo clone, broken tooling
What This Skill Produces
.pulse/tooling-status.json.pulse/state.json.pulse/STATE.mdupdate with the latest preflight result- One of three outcomes:
PASS,DEGRADED, orFAIL
Load references/tool-readiness-matrix.md before Phase 3.
Hard Rules
- Never assume a tool exists because a repo or prior session mentioned it.
- Never report
PASSwithout running a real minimal check for each required tool. - If a tool is optional, record it as unavailable but do not fail the run.
- If a tool is required for the requested mode, block that mode explicitly.
- If the result is
FAIL, do not continue into planning or execution. - If the result is
DEGRADED, present the downgrade clearly before proceeding.
Phase 1: Establish Pulse State
- Resolve the project root.
- Ensure
.pulse/exists. Create it if missing. - Ensure
.pulse/handoffs/exists. Create it if missing. - Ensure
.pulse/STATE.mdexists. If missing, create:
# STATE
focus: (none)
phase: preflight
last_updated: <timestamp>
- Ensure
.pulse/handoffs/manifest.jsonexists. If missing, create:
{
"schema_version": "1.0",
"updated_at": "<ISO-8601>",
"active": []
}
- Detect whether
.pulse/handoffs/manifest.jsoncontains active resume entries. Record that resume data exists, but do not auto-resume. - Infer the requested mode:
full-pipelineplanning-onlyexecution-onlyresume
Phase 2: Check Onboarding
Verify that the Pulse plugin is properly onboarded in the current repo.
Run node --version first.
- If
nodeis missing or reports a version below 18: setonboardingtoNEEDS_SETUPand include a blocker entry: "Node.js 18+ required for onboarding — install or upgrade before continuing." Do not proceed to the onboarding script.
If Node.js 18+ is available, run the onboarding status check from this skill's directory. needs_onboarding is a remediation path for stale installs, not the normal Pulse bootstrap result:
node skills/using-pulse/scripts/onboard_pulse.mjs --repo-root <project_root>
Interpret the result:
status = "up_to_date"— Pulse onboarding is current. Setonboarding = PASS.status = "needs_onboarding"— the repo needs Pulse onboarding or remediation updates before normal bootstrap can continue. Useactionsplus any relevantdetailsto explain whether this is missing repo-local assets, stale.codex/hooks.jsonPulse entries, legacy.codex/hooks/*or.codex/pulse_*.mjscleanup, legacy Python hook files, legacy verification/memory layout, or a partial Pulse install.status = "missing_runtime"— Node.js 18+ is not available, so onboarding cannot run. Setonboarding = NEEDS_SETUP.
For needs_onboarding:
- Summarize what the script wants to create or update from
actions. - If
requires_confirmation = true, explain that an existingcompact_promptwas found and Pulse will preserve it unless the user explicitly approves replacement. - Ask the user before making any repo changes.
- After approval, run:
node skills/using-pulse/scripts/onboard_pulse.mjs --repo-root <project_root> --apply- Only pass
--allow-compact-prompt-replacewhen the user explicitly approved replacing the existing compaction prompt.
- Only pass
- If the apply run succeeds, update
onboardingtoPASSand continue. - If the apply run fails, keep
onboardingblocked and add a blocker entry.
An unresolved onboarding issue or missing runtime sets preflight result to FAIL.
Phase 3: Validate Core Tooling
Check the tools that Pulse depends on structurally:
gitbrbv
Use the smallest real checks that prove the tool is callable. Recommended checks:
command -v git
command -v br
command -v bv
git rev-parse --show-toplevel
br --help
bv --help
Rules:
- If
gitis missing or the project is not a git repo, result isFAIL - If
bris missing, result isFAIL - If
bvis missing, result isFAIL - If a command exists but the minimal call errors, mark it unavailable
- If
brorbvis unavailable, include the install references fromreferences/tool-readiness-matrix.mdin the failure report
Phase 4: Validate Execution Runtime
If the requested mode can lead to execution, validate the active runtime path.
Primary concerns:
- native swarm capability for the current CLI runtime
- shared reservation helper readiness for swarm execution
Run the smallest real health check available in the current environment. Examples vary by runtime:
- Claude Code: confirm teammate primitives needed for swarming are available in this session
- Codex: confirm native subagent flow is available in this session
- reservation helper: confirm onboarding installed
.pulse/scripts/pulse_reservations.mjs
If no real health-check primitive exists, mark swarm capability as unavailable. Do not infer readiness from environment variables alone.
Decision rules:
- If requested mode is
full-pipelineand swarm execution is expected:- native swarm + reservations ready -> keep
swarm - unavailable -> set result to
DEGRADEDand recommendsingle-worker
- native swarm + reservations ready -> keep
- If requested mode is
execution-onlyand the user explicitly asked for swarm mode:- unavailable -> stop and present the downgrade decision
Phase 5: Validate Optional Accelerators
Check optional helpers if relevant:
gitnexus- PR tooling such as
gh - docs or web research MCPs
Optional tools never fail preflight on their own. Record impact instead:
gitnexusmissing -> discovery falls back to grep/find/manual readsghmissing -> no automated PR creation- docs or web MCP missing -> research becomes manual or local-only
Phase 6: Decide Outcome
Choose exactly one result label:
PASS- all required tools for the requested mode are ready
DEGRADED- core tools are ready
- at least one optional capability is missing, or swarm must downgrade to single-worker
FAIL- any required tool for the requested mode is unavailable
- onboarding is
NEEDS_SETUPorNEEDS_ONBOARDINGand could not be resolved in Phase 2
Normalize status casing explicitly:
.pulse/tooling-status.jsonuses lowercase machine values:pass | degraded | fail.pulse/state.json,.pulse/STATE.md, and user-facing summaries may use uppercase labels:PASS | DEGRADED | FAIL
Also choose recommended_mode:
swarmsingle-workerplanning-onlyblocked
Phase 7: Write Artifacts
Write .pulse/tooling-status.json with this shape:
{
"timestamp": "<ISO-8601>",
"project_root": "<absolute path>",
"requested_mode": "full-pipeline",
"recommended_mode": "single-worker",
"status": "degraded",
"onboarding": "PASS",
"tools": {
"git": { "status": "ready", "check": "git rev-parse --show-toplevel" },
"br": { "status": "ready", "check": "br --help" },
"bv": { "status": "ready", "check": "bv --help" },
"swarm_runtime": { "status": "unavailable", "check": "<actual runtime capability probe or 'none available'>" },
"reservations": { "status": "ready", "check": "test -f .pulse/scripts/pulse_reservations.mjs" }
},
"blockers": [],
"degradations": [
"Native swarm path unavailable; execution downgraded to single-worker"
],
"next_skill": "pulse:using-pulse"
}
Also refresh `.pulse/state.json