[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758FS9C2KNNJSS5649EH1H9":3,"skill-same:01M758FS9C2KNNJSS5649EH1H9":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M758FS9C2KNNJSS5649EH1H9","repo-health-review",null,"Systematic repo health review — survey scripts, detect duplicates, check naming, find gaps, prune dead weight, and produce a structured report. Run before major refactors or when asked to audit the repo.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: repo-health-review\nversion: 1.1.0\ncategory: devops\ndescription: >-\n  Systematic repo health review — survey scripts, detect duplicates,\n  check naming, find gaps, prune dead weight, and produce a structured\n  report. Run before major refactors or when asked to audit the repo.\npinned: false\nrelated_skills:\n  - fleet-preflight\n  - documentation-auditing\n  - change-checklist\n---\n\n# Repo Health Review — Systematic Audit\n\n## When to Use\n\n- User asks \"review the repo\", \"audit for gaps\", \"look for consolidation opportunities\"\n- Before a major refactor\n- When onboarding a new team member (to document current state)\n\n## Multi-Axis Audit (preferred for comprehensive reviews)\n\nFor thorough reviews, run 3+ parallel subagents via `delegate_task` — one per axis.\nEach subagent scans a different dimension simultaneously, keeping your context\nuncluttered while they work:\n\n```python\n# Standard 3-axis dispatch\ndelegate_task(tasks=[{\n    \"goal\": \"Audit docs for stale paths, broken cross-refs, missing sections\",\n    \"context\": \"Check docs\u002F for stale src\u002F, deploy\u002F, runtime\u002F references...\"\n}, {\n    \"goal\": \"Audit install\u002Fupdate\u002Fdoctor pipeline\",\n    \"context\": \"Check fleet-update.sh register() validity, doctor --quick...\"\n}, {\n    \"goal\": \"Audit Linux vs macOS platform support and agent types\",\n    \"context\": \"Check platform-specific code, SOUL.md profiles...\"\n}])\n```\n\nAfter subagents return, consolidate findings, fix easy items immediately,\nthen produce a structured report of what was fixed vs deferred.\n\n## The 7-Pass Review (use for smaller\u002Fscript-focused audits)\n\n### Pass 1: Structure Survey\n```bash\nls ops\u002Fscripts\u002F*\u002F           # All script directories\nls docs\u002F                    # All docs\nls skills\u002F                  # All skill categories\n```\n\n### Pass 2: Duplicate Detection\nCheck for files with same name in multiple directories:\n```bash\nfind ops\u002Fscripts\u002F -name '*.py' -o -name '*.sh' | sed 's|.*\u002F||' | sort | uniq -d\n```\nVerify identical content via MD5 when found:\n```bash\nmd5sum \u003Cpath1> \u003Cpath2>\n```\n\n### Pass 3: Naming Check\nIdentify scripts breaking hyphen convention:\n```bash\nfind ops\u002Fscripts\u002F -name '*_*' -not -path '*\u002F__pycache__\u002F*' -not -name '__*'\n```\n### Pass 4: Registration Check (Bi-Directional)\n\nCheck BOTH directions:\n- Scripts in `ops\u002Fscripts\u002F` that are NOT registered in `fleet-update.sh`\n- `register()` entries in `fleet-update.sh` that point to NON-EXISTENT files\n\n```bash\n# Direction A: Which scripts are NOT registered?\ngrep -oP 'register\\s+\"[^\"]+' ops\u002Fscripts\u002Ffleet-update.sh | sed 's\u002Fregister \"\u002F\u002F'\n\n# Direction B: Which registered files are MISSING on disk?\ngrep -oP 'register\\s+\"[^\"]+' ops\u002Fscripts\u002Ffleet-update.sh | sed 's\u002Fregister \"\u002F\u002F' | while read f; do [ -f \"$f\" ] || echo \"MISSING: $f\"; done\n```\n\nStale `register()` entries silently fail during deploy — the file simply\ndoesn't get copied. Over time this causes the deployed state to diverge\nfrom expectations. Fix by removing the stale line from fleet-update.sh.\n\nAlso check for **duplicate registrations** (same file registered twice)\nand **path drift** (file was renamed but register wasn't updated, e.g.\n`offline_code_index_cron.sh` → `offline-code-index-cron.sh`).\n\n### Pass 4b: Stale Deploy Check\n\nCheck for deployed files that are no longer registered in `fleet-update.sh`.\nWhen a `register()` line is removed, the deployed copy stays on disk as\nan orphan. The doctor detects these:\n\n```bash\npython3 ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Fmanage\u002Ffleet-doctor.py 2>&1 | grep \"Stale deploy\"\n```\n\nFix with:\n```bash\nbash ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Ffleet-update.sh --clean-stale\n```\n\nOr run `fleet-update.sh` (auto-cleans stales after deploy). For non-scripts\ndeploy targets (dashboard\u002F, bus\u002F, systemd units, launchd plists), manual\ncleanup may be needed.\n\n### Pass 4c: Doctor Comprehensive Check\n\nAfter any structural change, run the full doctor and check ALL sections:\n\n```bash\npython3 ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Fmanage\u002Ffleet-doctor.py 2>&1 | grep -E \"❌|⚠️|ℹ️\" | head -20\n```\n\nNew in this session (2026-07-23):\n- **check_stale_deploys()** — detects orphaned deploy files and missing sources\n- **Orphan cron detection** — flags crons in scheduler not in expected list\n- **Network safety** — scans for services on 0.0.0.0 (Ollama, Bus, Langfuse)\n- **Systemd linger** — verifies Linux user services survive reboot\n- **Skills disk presence** — verifies every listed skill exists on disk\n\nThe doctor itself was modularized into `fleet_doctor\u002F` package (8 modules).\nMonolith at `fleet-doctor.py` is now a 34-line shim. To add a new check:\ncreate a new function in `checks.py` and add it to the `all_checks` list in `cli.py`.\n\n### Pass 5: Doc Cross-Reference\nCheck which docs are NOT referenced by any other doc, AGENTS.md, or README.md:\n```\nSearch every .md for each doc filename. Unreferenced docs may be lost or stale.\n```\n\n### Pass 6: Stale File Check\n- `__pycache__` directories\n- `.pytest_cache` directories\n- Root-level test files (should be in `tests\u002F`)\n- Zero-byte files\n- `runtime` symlinks\n\n### Pass 7: Gap Analysis\n- PRDs with no named implementation\n- Overlapping scripts doing similar things\n- Features documented but not wired\n\n### Pass 8a: Platform & Agent-Type Consistency\n\nCheck that platform-aware code handles both Linux and macOS:\n\n```bash\ngrep -rn \"systemctl\\|launchctl\\|brew\\|apt-get\\|platform\\|uname\" ops\u002Fscripts\u002F --include=\"*.py\" --include=\"*.sh\"\n```\n\nIdentify scripts that assume one platform without an OS guard. Key patterns:\n- `systemctl` used without falling back to `launchctl` on macOS\n- `apt-get` used on macOS (should be `brew`)\n- Hardcoded paths like `\u002Fhome\u002F` (Linux-only) or `\u002FUsers\u002F` (macOS-only)\n\nCheck SOUL.md profiles for platform consistency:\n- Does each agent profile declare a `platforms:` field in frontmatter?\n- Do orchestrator profiles specify Linux?\n- Do dev-agent profiles specify macOS\u002FLinux?\n\nCheck agent-type coverage in docs:\n- `docs\u002Fagent-architecture.md` — lists all 4 roles (orchestrator, backup-orch, server-agent, dev-agent)?\n- `docs\u002Ffleet-reference.md` — maps real agent names (Moses, Esther, etc.) to roles?\n- `docs\u002Fcron-schedules.md` — split by `orch-*`, `agent-*`, `local-*` prefixes?\n- `AGENTS.md` — mentions agent type differences?\n\n### Pass 8b: Cross-Script Deploy\u002FInstall\u002FDoctor Consistency Audit\n\n**Purpose:** Verify that the three core lifecycle scripts — `install.sh`, `fleet-update.sh`, and `fleet_doctor\u002F` — agree on agent-type branching. If they diverge, agents get false-positive doctor failures, wrong cron expectations, or orphan deploy artifacts.\n\n**Run when:** User asks to audit agent-type branching, fix doctor false positives on non-orch agents, or verify deploy\u002Finstall\u002Fdoctor pipeline consistency. Also run before adding a new agent type.\n\n**Methodology — check 5 dimensions:**\n\n#### 8b-1: Capability Model vs Role Model\n\nIdentify whether the system uses a **capability model** (`FLEET_PROFILE=core|laptop|server` — how much hardware) or a **role model** (`--agent-type orchestrator|server|dev` — what services to run):\n\n```bash\n# Which model does install.sh use?\ngrep -n 'FLEET_PROFILE' ops\u002Finstall\u002Finstall.sh | head -5\ngrep -n 'agent.type\\|agent_type\\|--agent-type' ops\u002Finstall\u002Finstall.sh | head -5\n\n# Which model does the doctor use?\ngrep -n 'is_orch\\|IS_ORCH\\|hostname\\|agent.type' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fconfig.py\n```\n\n**Gap to detect:** A capability model (FLEET_PROFILE) cannot distinguish between an orchestrator (needs bus server + dashboard + nginx) and a server-agent (needs bus client + crons, NOT dashboard\u002Fnginx). When both map to `server`, orchestrator-only services get deployed to server-agents and produce doctor false positives.\n\n#### 8b-2: register() Guard Coverage in fleet-update.sh\n\nCheck whether orchestrator-only service files (dashboard, fleet-bus server, nginx configs) are **conditionally registered** or deployed to every agent:\n\n```bash\n# Are dashboard\u002Fbus\u002Fnginx files registered unconditionally?\ngrep -n 'register.*dashboard\\|register.*bus\\|register.*nginx' ops\u002Fscripts\u002Ffleet-update.sh\n\n# Is deploy_nginx_configs() guarded?\ngrep -B3 -A3 'deploy_nginx_configs' ops\u002Fscripts\u002Ffleet-update.sh\n\n# Is deploy_system_scripts() guarded?\ngrep -B3 -A3 'deploy_system_scripts' ops\u002Fscripts\u002Ffleet-update.sh\n```\n\n**Check:** Is there an `IS_ORCHESTRATOR`, `IS_SERVER`, or `FLEET_PROFILE` guard on these? If they run unconditionally, server-agents and dev-agents get files they don't need. The only guard is `FLEET_SKIP_NGINX` env var — optional, not default.\n\n#### 8b-3: Doctor EXTERNAL_SERVICES Hardcoding\n\nThe doctor's `config.py` defines `EXTERNAL_SERVICES` — endpoints it checks for health. If this list is hardcoded with Dashboard, Langfuse, and Agent Bus, it will FAIL on every non-orch agent:\n\n```bash\ngrep -A10 'EXTERNAL_SERVICES' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fconfig.py\n```\n\n**Check:** Is there agent-type awareness? Does the doctor skip Dashboard\u002FLangfuse checks on server-agents that don't host them? Also check `check_nginx()` — does it run unconditionally?\n\n#### 8b-4: Cron Separation and Doctor Cron Expectation\n\nThree cron layers should be cleanly separated. Verify cross-referencing:\n\n```bash\n# Universal crons (all agents)\ngrep -n 'agent-' ops\u002Fscripts\u002Finstall-crons.sh | head -5\n\n# Orchestrator-only crons\ngrep -n 'orch-' ops\u002Fscripts\u002Finstall\u002Finstall-orch-crons.sh | head -5\n\n# Dev-agent crons — local-* prefix (created manually, no installer exists)\ngrep -n 'local-' ops\u002Fscripts\u002Finstall-crons.sh | head -5\n```\n\n**Check path 1:** Does the doctor's `parse_expected_crons()` correctly exclude orch crons from the universal expected list?\n\n```bash\ngrep -A15 'parse_expected_crons' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fconfig.py\n```\n\n**Check path 2:** Does `check_crons()` correctly identify orchestrator hosts and only FAIL on missing orch crons for those hosts?\n\n```bash\ngrep -A15 'orch_crons_list' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fchecks.py\n```\n\n**Check path 3:** Does `check_crons()` check the `IS_ORCHESTRATOR` env var (like fleet-update.sh does), or only hostname? Hostname-only is brittle — won't match fresh installs or custom hostnames.\n\n**Gap to detect:** If `parse_expected_crons()` doesn't match `install-orch-crons.sh`, or if `check_crons()` hostname detection differs from `install-orch-crons.sh`, the doctor will produce inconsistent results.\n\n#### 8b-5: Dev-Agent Minimal Path\n\nCheck whether dev agents (e.g. `titus`) have a valid automated setup path:\n\n```bash\n# Is there an install-local-crons.sh script?\nfind ops\u002F -name '*local*' 2>\u002Fdev\u002Fnull\n\n# Does install.sh --agent-type dev exist?\ngrep 'dev\\|titus' ops\u002Finstall\u002Finstall.sh\n\n# Does fleet-update.sh skip dashboard\u002Fbus\u002Fnginx for dev agents?\ngrep 'IS_DEV\\|agent.dev\\|dev.minimal\\|skip.*dev' ops\u002Fscripts\u002Ffleet-update.sh\n```\n\n**Gap to detect:** Dev agents with no automated installer must create `local-*` crons manually. If the `local-*` prefix is documented in comments but no scaffolding exists (no installer, no doctor awareness, no update guard), the dev-agent path is incomplete.\n\n#### 8b-6: Verify Hostname Detection Uniformity\n\nThe same hostname\u002Forch-detection logic should appear in:\n1. `fleet-update.sh` (lines ~1412-1438) — `IS_ORCHESTRATOR` env var + hostname fallback\n2. `fleet_doctor\u002Fchecks.py` (lines ~407-421) — hostname only\n3. `install-orch-crons.sh` (lines ~29-39) — `IS_ORCHESTRATOR` env var + hostname fallback\n\n**Gap:** If the doctor doesn't read `IS_ORCHESTRATOR` from `.env`, it will fail to detect orchestrator hosts not named moses\u002Festher. Scripts 1 and 3 agree; script 2 may be out of sync.\n\n#### 8b-7: Produce Cross-Script Consistency Table (see also: `references\u002Fagent-type-system.md`)\n\nAfter checking all 5 dimensions, produce a table showing which files branch on what:\n\n```markdown\n| Dimension | install.sh | fleet-update.sh | fleet_doctor\u002F |\n|-----------|-----------|-----------------|----------------|\n| Service install guard | FLEET_PROFILE=server | none (unconditional deploy) | none (hardcoded EXTERNAL_SERVICES) |\n| Nginx deploy guard | FLEET_PROFILE=server | FLEET_SKIP_NGINX (optional) | none (always checks) |\n| Orch cron guard | N\u002FA | IS_ORCHESTRATOR + hostname | hostname only |\n| Dev-agent path | none | none | none |\n```\n\nThis table makes gaps visible at a glance. Each row that differs by column is a consistency failure.\n\n## User Preference Signals\n\nWhen the user corrects your approach or style, capture the lesson:\n\n| Signal | Response |\n|--------|----------|\n| \"No. Refactor. Do it right\" | Don't take shortcuts — thin wrappers are tech debt. Do the full refactor, not a compromise. |\n| \"Finish. Don't wait for future\" | Don't defer actionable items. Fix them in the same session — every issue found during audit must be fixed or explicitly acknowledged before reporting done. |\n| \"Thoroughly test\" | Every change must be exercised with real tool output before reporting done. |\n| \"Make agent X aware of Y\" | If the doctor or pipeline should check for Y, add a check — don't just document it. |\n| User repeats a correction | Add a structural guardrail (skill update, pre-commit hook, doctor check, auto-cleanup) that makes the mistake impossible. |\n\nEncode these in the relevant skill's SKILL.md body — not just in memory.\nSkills capture \"how to do this class of task for this user\"; memory\ncaptures \"who the user is and what the current situation is.\"\n\n## Deliverable\n\nProduce a structured report with:\n1. **Summary** — counts: scripts, docs, skills, issues found, issues fixed\n2. **Fixed Items** — what was changed (moved, renamed, pruned, archived)\n3. **Documented Items** — what was noted for future action\n4. **Priority Recommendations** — ordered by effort vs impact\n\n## Output Path\n\nPersist the report as a durable markdown document in the repo, committed so the\nwhole fleet benefits:\n\n`docs\u002Freviews\u002Frepo-health-review-YYYY-MM-DD.md`\n\nTreat that as relative to the repo root (e.g. `steadfaste-fleet\u002Fdocs\u002Freviews\u002F`).\nPrior reports live alongside it in `docs\u002Freviews\u002F` — keep new reports there,\nnever at the docs root.\n\n## Anti-Patterns\n\n- ❌ Only searching disk, not git — file may exist in repo but not deployed\n- ❌ Skipping MD5 verification — two files with same name may differ\n- ❌ Not checking cross-references before renames — breaks other agents\n- ❌ Leaving stales without documenting the decision\n","# Repo Health Review — Systematic Audit\n\n## When to Use\n\n- User asks \"review the repo\", \"audit for gaps\", \"look for consolidation opportunities\"\n- Before a major refactor\n- When onboarding a new team member (to document current state)\n\n## Multi-Axis Audit (preferred for comprehensive reviews)\n\nFor thorough reviews, run 3+ parallel subagents via `delegate_task` — one per axis.\nEach subagent scans a different dimension simultaneously, keeping your context\nuncluttered while they work:\n\n```python\n# Standard 3-axis dispatch\ndelegate_task(tasks=[{\n    \"goal\": \"Audit docs for stale paths, broken cross-refs, missing sections\",\n    \"context\": \"Check docs\u002F for stale src\u002F, deploy\u002F, runtime\u002F references...\"\n}, {\n    \"goal\": \"Audit install\u002Fupdate\u002Fdoctor pipeline\",\n    \"context\": \"Check fleet-update.sh register() validity, doctor --quick...\"\n}, {\n    \"goal\": \"Audit Linux vs macOS platform support and agent types\",\n    \"context\": \"Check platform-specific code, SOUL.md profiles...\"\n}])\n```\n\nAfter subagents return, consolidate findings, fix easy items immediately,\nthen produce a structured report of what was fixed vs deferred.\n\n## The 7-Pass Review (use for smaller\u002Fscript-focused audits)\n\n### Pass 1: Structure Survey\n```bash\nls ops\u002Fscripts\u002F*\u002F           # All script directories\nls docs\u002F                    # All docs\nls skills\u002F                  # All skill categories\n```\n\n### Pass 2: Duplicate Detection\nCheck for files with same name in multiple directories:\n```bash\nfind ops\u002Fscripts\u002F -name '*.py' -o -name '*.sh' | sed 's|.*\u002F||' | sort | uniq -d\n```\nVerify identical content via MD5 when found:\n```bash\nmd5sum \u003Cpath1> \u003Cpath2>\n```\n\n### Pass 3: Naming Check\nIdentify scripts breaking hyphen convention:\n```bash\nfind ops\u002Fscripts\u002F -name '*_*' -not -path '*\u002F__pycache__\u002F*' -not -name '__*'\n```\n### Pass 4: Registration Check (Bi-Directional)\n\nCheck BOTH directions:\n- Scripts in `ops\u002Fscripts\u002F` that are NOT registered in `fleet-update.sh`\n- `register()` entries in `fleet-update.sh` that point to NON-EXISTENT files\n\n```bash\n# Direction A: Which scripts are NOT registered?\ngrep -oP 'register\\s+\"[^\"]+' ops\u002Fscripts\u002Ffleet-update.sh | sed 's\u002Fregister \"\u002F\u002F'\n\n# Direction B: Which registered files are MISSING on disk?\ngrep -oP 'register\\s+\"[^\"]+' ops\u002Fscripts\u002Ffleet-update.sh | sed 's\u002Fregister \"\u002F\u002F' | while read f; do [ -f \"$f\" ] || echo \"MISSING: $f\"; done\n```\n\nStale `register()` entries silently fail during deploy — the file simply\ndoesn't get copied. Over time this causes the deployed state to diverge\nfrom expectations. Fix by removing the stale line from fleet-update.sh.\n\nAlso check for **duplicate registrations** (same file registered twice)\nand **path drift** (file was renamed but register wasn't updated, e.g.\n`offline_code_index_cron.sh` → `offline-code-index-cron.sh`).\n\n### Pass 4b: Stale Deploy Check\n\nCheck for deployed files that are no longer registered in `fleet-update.sh`.\nWhen a `register()` line is removed, the deployed copy stays on disk as\nan orphan. The doctor detects these:\n\n```bash\npython3 ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Fmanage\u002Ffleet-doctor.py 2>&1 | grep \"Stale deploy\"\n```\n\nFix with:\n```bash\nbash ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Ffleet-update.sh --clean-stale\n```\n\nOr run `fleet-update.sh` (auto-cleans stales after deploy). For non-scripts\ndeploy targets (dashboard\u002F, bus\u002F, systemd units, launchd plists), manual\ncleanup may be needed.\n\n### Pass 4c: Doctor Comprehensive Check\n\nAfter any structural change, run the full doctor and check ALL sections:\n\n```bash\npython3 ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Fmanage\u002Ffleet-doctor.py 2>&1 | grep -E \"❌|⚠️|ℹ️\" | head -20\n```\n\nNew in this session (2026-07-23):\n- **check_stale_deploys()** — detects orphaned deploy files and missing sources\n- **Orphan cron detection** — flags crons in scheduler not in expected list\n- **Network safety** — scans for services on 0.0.0.0 (Ollama, Bus, Langfuse)\n- **Systemd linger** — verifies Linux user services survive reboot\n- **Skills disk presence** — verifies every listed skill exists on disk\n\nThe doctor itself was modularized into `fleet_doctor\u002F` package (8 modules).\nMonolith at `fleet-doctor.py` is now a 34-line shim. To add a new check:\ncreate a new function in `checks.py` and add it to the `all_checks` list in `cli.py`.\n\n### Pass 5: Doc Cross-Reference\nCheck which docs are NOT referenced by any other doc, AGENTS.md, or README.md:\n```\nSearch every .md for each doc filename. Unreferenced docs may be lost or stale.\n```\n\n### Pass 6: Stale File Check\n- `__pycache__` directories\n- `.pytest_cache` directories\n- Root-level test files (should be in `tests\u002F`)\n- Zero-byte files\n- `runtime` symlinks\n\n### Pass 7: Gap Analysis\n- PRDs with no named implementation\n- Overlapping scripts doing similar things\n- Features documented but not wired\n\n### Pass 8a: Platform & Agent-Type Consistency\n\nCheck that platform-aware code handles both Linux and macOS:\n\n```bash\ngrep -rn \"systemctl\\|launchctl\\|brew\\|apt-get\\|platform\\|uname\" ops\u002Fscripts\u002F --include=\"*.py\" --include=\"*.sh\"\n```\n\nIdentify scripts that assume one platform without an OS guard. Key patterns:\n- `systemctl` used without falling back to `launchctl` on macOS\n- `apt-get` used on macOS (should be `brew`)\n- Hardcoded paths like `\u002Fhome\u002F` (Linux-only) or `\u002FUsers\u002F` (macOS-only)\n\nCheck SOUL.md profiles for platform consistency:\n- Does each agent profile declare a `platforms:` field in frontmatter?\n- Do orchestrator profiles specify Linux?\n- Do dev-agent profiles specify macOS\u002FLinux?\n\nCheck agent-type coverage in docs:\n- `docs\u002Fagent-architecture.md` — lists all 4 roles (orchestrator, backup-orch, server-agent, dev-agent)?\n- `docs\u002Ffleet-reference.md` — maps real agent names (Moses, Esther, etc.) to roles?\n- `docs\u002Fcron-schedules.md` — split by `orch-*`, `agent-*`, `local-*` prefixes?\n- `AGENTS.md` — mentions agent type differences?\n\n### Pass 8b: Cross-Script Deploy\u002FInstall\u002FDoctor Consistency Audit\n\n**Purpose:** Verify that the three core lifecycle scripts — `install.sh`, `fleet-update.sh`, and `fleet_doctor\u002F` — agree on agent-type branching. If they diverge, agents get false-positive doctor failures, wrong cron expectations, or orphan deploy artifacts.\n\n**Run when:** User asks to audit agent-type branching, fix doctor false positives on non-orch agents, or verify deploy\u002Finstall\u002Fdoctor pipeline consistency. Also run before adding a new agent type.\n\n**Methodology — check 5 dimensions:**\n\n#### 8b-1: Capability Model vs Role Model\n\nIdentify whether the system uses a **capability model** (`FLEET_PROFILE=core|laptop|server` — how much hardware) or a **role model** (`--agent-type orchestrator|server|dev` — what services to run):\n\n```bash\n# Which model does install.sh use?\ngrep -n 'FLEET_PROFILE' ops\u002Finstall\u002Finstall.sh | head -5\ngrep -n 'agent.type\\|agent_type\\|--agent-type' ops\u002Finstall\u002Finstall.sh | head -5\n\n# Which model does the doctor use?\ngrep -n 'is_orch\\|IS_ORCH\\|hostname\\|agent.type' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fconfig.py\n```\n\n**Gap to detect:** A capability model (FLEET_PROFILE) cannot distinguish between an orchestrator (needs bus server + dashboard + nginx) and a server-agent (needs bus client + crons, NOT dashboard\u002Fnginx). When both map to `server`, orchestrator-only services get deployed to server-agents and produce doctor false positives.\n\n#### 8b-2: register() Guard Coverage in fleet-update.sh\n\nCheck whether orchestrator-only service files (dashboard, fleet-bus server, nginx configs) are **conditionally registered** or deployed to every agent:\n\n```bash\n# Are dashboard\u002Fbus\u002Fnginx files registered unconditionally?\ngrep -n 'register.*dashboard\\|register.*bus\\|register.*nginx' ops\u002Fscripts\u002Ffleet-update.sh\n\n# Is deploy_nginx_configs() guarded?\ngrep -B3 -A3 'deploy_nginx_configs' ops\u002Fscripts\u002Ffleet-update.sh\n\n# Is deploy_system_scripts() guarded?\ngrep -B3 -A3 'deploy_system_scripts' ops\u002Fscripts\u002Ffleet-update.sh\n```\n\n**Check:** Is there an `IS_ORCHESTRATOR`, `IS_SERVER`, or `FLEET_PROFILE` guard on these? If they run unconditionally, server-agents and dev-agents get files they don't need. The only guard is `FLEET_SKIP_NGINX` env var — optional, not default.\n\n#### 8b-3: Doctor EXTERNAL_SERVICES Hardcoding\n\nThe doctor's `config.py` defines `EXTERNAL_SERVICES` — endpoints it checks for health. If this list is hardcoded with Dashboard, Langfuse, and Agent Bus, it will FAIL on every non-orch agent:\n\n```bash\ngrep -A10 'EXTERNAL_SERVICES' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fconfig.py\n```\n\n**Check:** Is there agent-type awareness? Does the doctor skip Dashboard\u002FLangfuse checks on server-agents that don't host them? Also check `check_nginx()` — does it run unconditionally?\n\n#### 8b-4: Cron Separation and Doctor Cron Expectation\n\nThree cron layers should be cleanly separated. Verify cross-referencing:\n\n```bash\n# Universal crons (all agents)\ngrep -n 'agent-' ops\u002Fscripts\u002Finstall-crons.sh | head -5\n\n# Orchestrator-only crons\ngrep -n 'orch-' ops\u002Fscripts\u002Finstall\u002Finstall-orch-crons.sh | head -5\n\n# Dev-agent crons — local-* prefix (created manually, no installer exists)\ngrep -n 'local-' ops\u002Fscripts\u002Finstall-crons.sh | head -5\n```\n\n**Check path 1:** Does the doctor's `parse_expected_crons()` correctly exclude orch crons from the universal expected list?\n\n```bash\ngrep -A15 'parse_expected_crons' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fconfig.py\n```\n\n**Check path 2:** Does `check_crons()` correctly identify orchestrator hosts and only FAIL on missing orch crons for those hosts?\n\n```bash\ngrep -A15 'orch_crons_list' ops\u002Fscripts\u002Fmanage\u002Ffleet_doctor\u002Fchecks.py\n```\n\n**Check path 3:** Does `check_crons()` check the `IS_ORCHESTRATOR` env var (like fleet-update.sh does), or only hostname? Hostname-only is brittle — won't match fresh installs or custom hostnames.\n\n**Gap to detect:** If `parse_expected_crons()` doesn't match `install-orch-crons.sh`, or if `check_crons()` hostname detection differs from `install-orch-crons.sh`, the doctor will produce inconsistent results.\n\n#### 8b-5: Dev-Agent Minimal Path\n\nCheck whether dev agents (e.g. `titus`) have a valid automated setup path:\n\n```bash\n# Is there an install-local-crons.sh script?\nfind ops\u002F -name '*local*' 2>\u002Fdev\u002Fnull\n\n# Does install.sh --agent-type dev exist?\ngrep 'dev\\|titus' ops\u002Finstall\u002Finstall.sh\n\n# Does fleet-update.sh skip dashboard\u002Fbus\u002Fnginx for dev agents?\ngrep 'IS_DEV\\|agent.dev\\|dev.minimal\\|skip.*dev' ops\u002Fscripts\u002Ffleet-update.sh\n```\n\n**Gap to detect:** Dev agents with no automated installer must create `local-*` crons manually. If the `local-*` prefix is documented in comments but no scaffolding exists (no installer, no doctor awareness, no update guard), the dev-agent path is incomplete.\n\n#### 8b-6: Verify Hostname Detection Uniformity\n\nThe same hostname\u002Forch-detection logic should appear in:\n1. `fleet-update.sh` (lines ~1412-1438) — `IS_ORCHESTRATOR` env var + hostname fallback\n2. `fleet_doctor\u002Fchecks.py` (lines ~407-421) — hostname only\n3. `install-orch-crons.sh` (lines ~29-39) — `IS_ORCHESTRATOR` env var + hostname fallback\n\n**Gap:** If the doctor doesn't read `IS_ORCHESTRATOR` from `.env`, it will fail to detect orchestrator hosts not named moses\u002Festher. Scripts 1 and 3 agree; script 2 may be out of sync.\n\n#### 8b-7: Produce Cross-Script Consistency Table (see also: `references\u002Fagent-type-system.md`)\n\nAfter checking all 5 dimensions, produce a table showing which files branch on what:\n\n```markdown\n| Dimension | install.sh | fleet-update.sh | fleet_doctor\u002F |\n|-----------|-----------|-----------------|----------------|\n| Service install guard | FLEET_PROFILE=server | none (unconditional deploy) | none (hardcoded EXTERNAL_SERVICES) |\n| Nginx deploy guard | FLEET_PROFILE=server | FLEET_SKIP_NGINX (optional) | none (always checks) |\n| Orch cron guard | N\u002FA | IS_ORCHESTRATOR + hostname | hostname only |\n| Dev-agent path | none | none | none |\n```\n\nThis table makes gaps visible at a glance. Each row that differs by column is a consistency failure.\n\n## User Preference Signals\n\nWhen the user corrects your approach or style, capture the lesson:\n\n| Signal | Response |\n|--------|----------|\n| \"No. Refactor. Do it right\" | Don't take shortcuts — thin wrappers are tech debt. Do the full refactor, not a compromise. |\n| \"Finish. Don't wait for future\" | Don't defer actionable items. Fix them in the same session — every issue found during audit must be fixed or explicitly acknowledged before reporting done. |\n| \"Thoroughly test\" | Every change must be exercised with real tool output before reporting done. |\n| \"Make agent X aware of Y\" | If the doctor or pipeline should check for Y, add a check — don't just document it. |\n| User repeats a correction | Add a structural guardrail (skill update, pre-commit hook, doctor check, auto-cleanup) that makes the mistake impossible. |\n\nEncode these in the relevant skill's SKILL.md body — not just in memory.\nSkills capture \"how to do this class of task for this user\"; memory\ncaptures \"who the user is and what the current situation is.\"\n\n## Deliverable\n\nProduce a structured report with:\n1. **Summary** — counts: scripts, docs, skills, issues found, issues fixed\n2. **Fixed Items** — what was changed (moved, renamed, pruned, archived)\n3. **Documented Items** — what was noted for future action\n4. **Priority Recommendations** — ordered by effort vs impact\n\n## Output Path\n\nPersist the report as a durable markdown document in the repo, committed so the\nwhole fleet benefits:\n\n`docs\u002Freviews\u002Frepo-health-review-YYYY-MM-DD.md`\n\nTreat that as relative to the repo root (e.g. `steadfaste-fleet\u002Fdocs\u002Freviews\u002F`).\nPrior reports live alongside it in `docs\u002Freviews\u002F` — keep new reports there,\nnever at the docs root.\n\n## Anti-Patterns\n\n- ❌ Only searching disk, not git — file may exist in repo but not deployed\n- ❌ Skipping MD5 verification — two files with same name may differ\n- ❌ Not checking cross-references before renames — breaks other agents\n- ❌ Leaving stales without documenting the decision\n",{"name":5,"pinned":20,"version":24,"category":25,"description":7,"related_skills":26},"1.1.0","devops",[27,28,29],"fleet-preflight","documentation-auditing","change-checklist","main","9dc0e92c5fa81d4db5292b205716e8ea0c00d10e","skills\u002Fdevops\u002Frepo-health-review",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill repo-health-review",{"tool":45,"command":46},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill repo-health-review",{"tool":48,"command":49},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill repo-health-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002FSKILL.md",true,[53,59,63,67,71,75],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fagent-type-branching-audit-2026-07-23.md","REFERENCE","参考文档",2787,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002Freferences\u002Fagent-type-branching-audit-2026-07-23.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fagent-type-system.md",2361,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002Freferences\u002Fagent-type-system.md",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fcomprehensive-review-2026-07-23.md",2357,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002Freferences\u002Fcomprehensive-review-2026-07-23.md",{"path":68,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Ffull-review-checklist.md",2813,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002Freferences\u002Ffull-review-checklist.md",{"path":72,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fstale-deploy-and-auto-doctor.md",2542,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002Freferences\u002Fstale-deploy-and-auto-doctor.md",{"path":76,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fstale-deploy-cleanup.md",2938,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Frepo-health-review\u002Freferences\u002Fstale-deploy-cleanup.md",[80,88,95,102,109,116],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":87},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":87},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":87},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":87},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":87},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":117,"name":27,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":87},"01M78SP1CHW0T0BWE5ZT6JBPX8","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]