merge probe results (new
available
/
detail
/
version
) with preserved
disabled
flags
Ensure
docs/
directory exists
(create if missing)
Write
docs/environment_state.json
with 2-space indentation
Validate
written file against
references/environment_state_schema.json
structure (key presence check)
Phase 3: Summary Report
Display results as a table:
Environment Scan Complete:
| Agent | Status | Detail |
|--------|-------------|---------------------------|
| Codex | available | 0.1.2503 |
| Gemini | unavailable | Command not found in PATH |
State written to: docs/environment_state.json
If any agent has
disabled: true
, show status as
disabled
(not available/unavailable).
Critical Rules
Probe all agents.
This skill always probes ALL agents, regardless of existing state. It is the full rescan.
Preserve
disabled
.
Never overwrite user's
disabled: true
flags. Detection state updates, user preference stays.
No side effects.
This skill only writes
docs/environment_state.json
. No other files modified.
Fail gracefully.
Each probe is independent. One failure = one
available: false
entry, scan continues.
No TTL.
State file has no expiration. It is refreshed only by running this skill.
Anti-Patterns
DON'T
DO
Skip probes for "known" agents
Always probe all agents — this is a full scan
Delete
disabled
flags on rescan
Merge: overwrite detection fields, preserve
disabled
Retry failed probes
One attempt per agent. Failure =
available: false
Probe MCP tools or platform
Only probe CLI agents (Codex, Gemini). MCP tools configured elsewhere
Add TTL or cache expiry logic
State is manual-refresh only
Definition of Done
Both agents probed (Codex, Gemini)
Hook health check completed (hooks.json, scripts, dependencies)
docs/environment_state.json
written with valid structure (agents + hooks)
Existing
disabled
flags preserved across rescan
Summary table displayed to user
Version:
2.0.0
Last Updated:
2026-03-08