Skip to content

docs+test: apply CR round-1 findings (#1-#8) - #45

Merged
gregoryfoster merged 1 commit into
mainfrom
cr-round-1
Aug 15, 2026
Merged

gregoryfoster merged 1 commit into
mainfrom
cr-round-1

Conversation

@gregoryfoster

Copy link
Copy Markdown
Contributor

CR round-1 findings from the #39/#41 review, all eight actioned.

The findings clustered on one theme: the session fixed a hook whose failure mode was silence, and three of the changes reintroduced silence somewhere new.

# Finding Action
1 socraticode-health.sh installed as a copy while both sibling hooks are symlinks — the #16 drift, invisible to doctor.sh (which only reports dangling links) Re-linked into skills-vendor/; contradiction filed as skills#179
2 test_skills_hook.py pinned the symlink but not the registration — the half that failed in #39 was the half nothing guarded Two tests added, both verified red against a stripped registration first
3 The skills#177 workaround lived only in gitignored settings.local.json SOCRATICODE_DRIVER / SOCRATICODE_PROBE_FILE moved to committed .claude/settings.json
4 #177 note hand-added to docs/SOCRATICODE.md, six lines under its own "a re-run overwrites this wholesale" header Moved to AGENTS.md → ## Code Exploration Notes (repo-specific)
5 Neither socraticode hook documented anywhere docs/SKILLS.md now covers all three .claude/hooks/ entries
6 docs/SOCRATICODE.md hardcoded /home/exedev/replicator Now . and "$SOCRATICODE_DRIVER"
7 Health hook measures . → a worktree session reports a healthy index as broken Documented; filed as skills#180
8 Inventory table unchanged after a 153-commit bump Noted that it lists what is linked, and that new skills are unevaluated

The two that were more than tidying

Finding 2 is the regression guard for #39 itself. The old test's docstring reasoned "Nothing else catches a re-copy, so it is pinned here" — that argument now applies more strongly to the registration than to the link, since the registration is the half that actually went missing for nine days. Proven red before green:

FAILED test_the_hook_is_registered_in_settings_json
FAILED test_the_installer_agrees_that_both_halves_are_present
  install-refresh.sh --check reported a half-installed hook:
    hook symlink:       .claude/hooks/skills-submodule-update.sh -> ...
    SessionStart entry: MISSING — the hook is on disk but Claude Code never runs it

Finding 3 meant the committed repo shipped the bug this one machine was patched against: on CI, a fresh clone, or any worktree, the health hook resolved the broken skills/ symlink, the driver exited 0 printing nothing, and the hook reported clean without measuring anything.

Budget

The write guard caught the first draft of the finding-4 relocation at 6,068 tokens, 68 over. Rather than ship over budget, the detail went to docs/SKILLS.md and only the operative rule stayed inline — AGENTS.md lands at 5,949.

Verification

  • uv run pytest: 685 passed (2 new), 99.83% coverage
  • uv run ruff check . and ruff format --check .: clean
  • context surface: policy 5,949 / 6,000; every doc under 10,000; no dead links or anchors
  • install-refresh.sh --check: exit 0, both artifacts

🤖 Generated with Claude Code

1. `.claude/hooks/socraticode-health.sh` was installed as a copy while both
   sibling hooks are symlinks — the exact drift #16 caught, and invisible to
   `.skills/doctor.sh`, which only reports dangling links. Re-linked into
   skills-vendor/. `init-socraticode` says copy, `managing-skills` says never
   copy; filed as skills#179.

2. `tests/test_skills_hook.py` pinned the symlink but not the registration —
   the half that actually failed in #39 was the half nothing guarded. Two
   tests added: settings.json names the hook, and `install-refresh.sh --check`
   (the vendored definition of installed) exits 0. Both verified red against a
   stripped registration before being made green.

3. The skills#177 workaround lived only in gitignored settings.local.json, so
   every other checkout shipped a health hook that reports clean without
   measuring anything. `SOCRATICODE_DRIVER` and `SOCRATICODE_PROBE_FILE` are
   repo-relative, so they move to the committed `.claude/settings.json` env
   block; settings.local.json keeps only the absolute linked-project paths.

4. The #177 note and the measured-yield line were hand-added to
   docs/SOCRATICODE.md, six lines under its own "a re-run overwrites this file
   wholesale" header — #115's failure, one level down. Moved to AGENTS.md's
   `## Code Exploration Notes (repo-specific)`, which survives a re-run.

5. Neither socraticode hook was documented anywhere. docs/SKILLS.md now carries
   all three `.claude/hooks/` entries and both ways the health hook lies.

6. docs/SOCRATICODE.md hardcoded /home/exedev/replicator in a committed doc —
   now `.` and `"$SOCRATICODE_DRIVER"`.

7. The health hook measures `.`, so from a worktree it calls a healthy index
   broken — and this repo develops in worktrees by default, making the false
   report the common case. Not fixable consumer-side (the path takes no knob);
   documented and filed as skills#180.

8. docs/SKILLS.md notes that the inventory table lists what is *linked*, and
   that the 153-commit bump published skills this repo has not evaluated.

AGENTS.md held at 5,949 tokens — the write guard caught the first draft 68 over,
so the detail went to docs/SKILLS.md and only the operative rule stayed inline.

Verified: 685 tests pass (2 new), 99.83% coverage, ruff check and format clean,
no dead links or anchors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gregoryfoster
gregoryfoster merged commit 0662c20 into main Aug 15, 2026
2 checks passed
@gregoryfoster
gregoryfoster deleted the cr-round-1 branch September 14, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant