Optimize the harness (not projects) for accuracy/completeness with context pressure as a first-class constraint; token efficiency secondary. Authored as a Claude+Grok+ Gemini review (see review-3way.md): P0 reliability footguns (submodule-safe sync, serialized/staged wiki synthesis, syncro SSOT, warn-only guard), P1 context diet (one-line registry descriptions, CLAUDE CORE/EXTENDED, thin save/sync), P2 delegation re-tune, P3 knowledge tiering. Adds harness VERSION marker + OOB recovery as rollout safety. Python port split to a separate future spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.1 KiB
3.1 KiB
ClaudeTools Harness Optimization — Code References
Harness files (the ClaudeTools repo .claude/ + root), with their role and current cost.
Always / repeatedly in context (the diet targets)
.claude/CLAUDE.md— 351 lines / ~4.9k tokens. Injected every session; observed re-injected mid-session as a full system-reminder. -> Task 6 (CORE/EXTENDED split).- Skill/command REGISTRY — each
.claude/skills/*/SKILL.mddescription:frontmatter + each.claude/commands/*.mddescription. The full list injects repeatedly (~4x in one session). Paragraph-length offenders: rmm-audit (669 ln), gc-audit (669), b2 (261), bitdefender, packetdial, mailprotector. -> Task 5 (one-line descriptions). .claude/memory/MEMORY.md— 114 lines, auto-loaded each session. -> Task 10.
Injected on invoke (command bodies)
.claude/commands/syncro.md— 1139 lines. -> Task 8 (shard) + Task 3 (SSOT vs standard)..claude/commands/rmm.md— 783 lines. -> Task 8..claude/commands/save.md,.claude/commands/sync.md— multi-K bodies injected every use. -> Task 7 (thin wrappers).
Workflow / write-safety
.claude/scripts/sync.sh—git add -Aauto-commit + rebase + push + deploy commands/skills to global + vault sync. Thegit add -A+ submodule = the gitlink footgun. Phase 5b (commands->global) + the new Phase 5c (skills->global, added 2026-06-08). -> Task 1, Task 4, Task 11./saveflow — writes a session log, then a Sonnet wiki recompile, thensync.sh. The inline recompile is the 3-way-conflict source. -> Task 2..claude/commands/wiki-compile.md(403 ln) — full re-synthesis; should merge + lock. -> Task 2.- The git submodule:
projects/msp-tools/guru-rmm(andguru-connect). Parent pins a commit that intentionally lagsmain. -> Task 1.
Standards / source-of-truth
.claude/standards/(19 files, ~12k tokens, on-demand) +index.yml. Thesyncro/time-entry-protocol.mdvscommands/syncro.mdcontradiction. -> Task 3.
Hooks
.claude/settings.jsonhooks: PreToolUse, SessionStart, UserPromptSubmit..claude/hooks/(3 entries, incl.block-backslash-winpath.sh). -> Task 4 (pre-commit guard), Task 12 (SessionStart smoke checks).
Knowledge layers
wiki/— 57 articles, compiled from session logs (the synthesized layer).session-logs/— 283 logs (write-only archive). -> Task 10 (INDEX)..claude/memory/— 97 files + MEMORY.md.memory-dreamskill lints/dedupes. -> Task 10.
Cross-OS fragility (Task 11 targets)
TZ=America/Phoenix datesilently returns UTC on Git Bash (mis-dates logs)..claude/scripts/post-bot-alert.sh— 400s on em-dash/$(no JSON escaping)./tmpresolves differently in the Write tool vs Git Bash (documented; heredocs used).- The skills-deploy gap (global
~/.claude/skillswas empty until Phase 5c).
Existing tooling to lean on
coordskill / API — inter-session locks + broadcast (use for serialized wiki writes, fleet rollout announcements).self-checkskill — harness conformance; extend with smoke tests (Task 12).memory-dreamskill — memory dedupe/lint (Task 10).