revealui-doctor
Health check for RevealFleet Studio workflow across equal adapters (Claude + Grok at minimum). Verifies hook/rules homes, skill preconditions, git integrity, workboard freshness, daemon status, MCP configs, env leaks, toolchain, and disaster-recovery snapshot state.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- revealui-doctor
- license
- MIT
- metadata
- { "author": "RevealUI Studio", "version": "0.4.3", "website": "https://revealui.com" }
- description
- Health check for RevealFleet Studio workflow across equal adapters (Claude + Grok at minimum). Verifies hook/rules homes, skill preconditions, git integrity, workboard freshness, daemon status, MCP configs, env leaks, toolchain, and disaster-recovery snapshot state.
- allowed-tools
- Bash, Read, Glob, Grep
03 SKILL.md 正文
Run a health check on Studio-native workflow surfaces for equal adapters. Report pass/fail (or SKIP with reason) per section. Claude is one adapter; Grok is first-class.
Load helpers:
. "$REVEALFLEET_ROOT/revskills/scripts/lib/session-state.sh"
0. Adapter homes present
Report which homes exist:
| Adapter | Paths to note |
|---|---|
| Claude | ~/.claude/{hooks,rules,commands,settings.json} |
| Grok | ~/.grok/{hooks,rules,skills,config.toml,active_sessions.json} |
| Cursor | ~/.cursor or project .cursor/ (SKIP if absent) |
| OpenCode | tool-specific (SKIP if absent) |
If Claude home is missing: do not fail the whole doctor — continue with Grok/other and mark Claude sections SKIP.
1. Hook syntax
Claude: node --check on every ~/.claude/hooks/*.js when the dir exists. List failures. Confirm settings.json registers PreCompact → snapshot-before-compact.js (last-ditch mechanical capture).
Grok: list ~/.grok/hooks/*.json when present; confirm JSON parses (python3 -m json.tool or jq). FAIL on invalid JSON. Required for snapshot-before-compact: pre-compact.json and stop-snapshot.json (or equivalent PreCompact + Stop entries) pointing at snapshot-before-compact.js. WARN if either event is missing — Grok discards UserPromptSubmit stdout, so without these hooks checkpoints lose pre-compact fidelity. Required for the output cap: cap-tool-output.json with a PostToolUse entry pointing at cap-tool-output.js. FAIL if it is missing.
Compact sync: the authored numbers are revealui/packages/harnesses/src/token-budget.ts, materialized to .revealui/adapters/grok/token-budget.json and copied to ~/.local/share/revealui/hooks/token-budget.json. FAIL if ~/.grok/config.toml disagrees with that JSON: each models[] entry's compaction_at_tokens must equal compactionAtTokens, and auto_compact_threshold_percent must equal autoCompactThresholdPercent (derived from tokens / window, not stored as a second constant). FAIL if cap-tool-output.json is missing. A gate still described as 85% minus 25 with a floor of 50 is stale. Do not compare this budget to Claude context-thresholds.json (that file is a pressure score).
2. Rules directories
Verify these exist and contain .md files when the home is present:
$REVEALFLEET_ROOT/revealui/.claude/rules/$JV_REPO/.claude/rules/~/.claude/rules/(Claude adapter)~/.grok/rules/(Grok adapter; pointer files OK)
3. Skills self-test
Prefer SoT + multi-home:
bash "$REVEALFLEET_ROOT/revskills/scripts/lint-all-skills.sh"
Additionally, for each present command/skill root (~/.claude/commands, ~/.grok skill paths from config if readable):
- Extract referenced script paths under
~/.claude,$REVEALFLEET_ROOT/revskills,node/bashinvocations. - Assert each referenced script exists. Report missing.
- Flag any
~/suite/references as stale (retired 2026-05-07 →$REVEALFLEET_ROOT/).
4. Git integrity (RevealFleet repos)
For each repo in $REVEALFLEET_ROOT/revealui and $JV_REPO:
cd "$repo" && git fsck --full 2>&1 | grep -E '^(error|fatal|missing)'
ss_empty_objects "$repo"
Empty objects = WSL crash damage. Report loudly.
5. Workboard freshness
Parse $WORKBOARD (neutral $JV_REPO/.revealui/workboard.md; if that file is absent, the Claude adapter render $JV_REPO/.claude/workboard.md). In ## Log, flag [CRASHED] entries older than 24h. The adapter file and ~/.claude/rules/ are not the policy home. Write SSOT for board fragments is $JV_REPO/.revealui/workboard.d.
6. Events log size
$REVEALFLEET_ROOT/revealui/.claude/events.jsonl and $JV_REPO/.claude/events.jsonl. Warn if over 100KB.
7. Daemon + Studio surface health
ss_daemon_alive && echo "daemon: up" || echo "daemon: down"
ss_revvault_alive && echo "revvault: up" || echo "revvault: down"
8. MCP servers
Claude: if ~/.claude/config.json exists, extract mcpServers and verify command / cwd / absolute args paths.
Grok: if ~/.grok/config.toml has MCP / server entries (or document SKIP when config shape is opaque), note presence; do not invent a second MCP schema.
Flag any stale ~/projects/RevealUI path.
9. Git-tracked env files
In both RevealFleet repos: git ls-files '*.env*'. SAFE vs REVIEW classification as before (allowlist from repo security gate; do not hardcode).
10. Settings JSON validity
Claude: validate ~/.claude/settings.json and settings.local.json if present.
Grok: validate ~/.grok/config.toml parses if present (toml via python or skip with note).
11. Toolchain
pnpm -v; node -v; biome --version 2>/dev/null || echo "biome via pnpm exec"
cd "$REVEALFLEET_ROOT/revealui" && test -f flake.lock && nix flake metadata --json >/dev/null 2>&1 && echo "flake: ok" || echo "flake: check"
cd "$REVEALFLEET_ROOT/revealui" && direnv status 2>&1 | tail -3
12. Disaster recovery (WSL snapshot)
Per-repo LTS sync is retired. Flag leftover .claude/lts-mode under $REVEALFLEET_ROOT/*/. Snapshot freshness is Windows-side — SKIP with pointer to revkit check-backup-staleness.ps1 when LTS drive unreachable.
13. Session id auto-resolve (GAP-469)
ss_session_id && echo "session-id: ok" || echo "session-id: unresolved (non-fatal outside a harness session)"
Output
Traffic-light summary (PASS/WARN/FAIL/SKIP) per section and per adapter. JSON sidecar at /tmp/revealui-doctor-last.json (prefer this over Claude-only path names).
04 同仓库更多 Skills
good-skill
A minimal valid skill fixture used to prove the skills-lint and plugin-lint validators accept well formed input. Covers frontmatter shape only.
bad-skill-missing-field
暂无简介
bad-skill-awk
Fixture skill whose fenced shell block violates lint-skill.awk. skills-lint must reject it.
yjs-collaboration
Yjs CRDT collaboration patterns for real-time and offline-first editing. Use when building collaborative documents, shared scratchpads, or multi-user editing. Covers Y.Doc, Y.Map, Y.Array, Y.Text, state encoding, structured patches, server-side document manipulation, and conflict-free merge semantics.
vitest-testing
Vitest testing patterns for production TypeScript projects. Use when writing tests, fixing test failures, configuring coverage, mocking modules, debugging flaky tests, or setting up Vitest in a monorepo. Covers Vitest 3+, vi.mock, vi.fn, React Testing Library, PGlite in-memory PostgreSQL, pool forks, maxWorkers, and hookTimeout.
tailwind-v4
Tailwind CSS v4 patterns, CSS-first configuration, and v3 migration guide. Use when writing styles, configuring @theme variables, creating components with CVA, migrating from tailwind.config.js, or using container queries, dark mode, and new v4 utility syntax. Covers @import tailwindcss, custom properties, oklch colors, and clsx.