Skip to content

docs(archdev-skill): refresh installed hooks from bootstrap; describe nudge hooks - #25

Merged
calvin-archastro merged 1 commit into
mainfrom
feat/skill-hook-refresh
Sep 23, 2026
Merged

calvin-archastro merged 1 commit into
mainfrom
feat/skill-hook-refresh

Conversation

@calvin-archastro

@calvin-archastro calvin-archastro commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review on ArchCode

Problem and author intent

Companion to ArchAstro/firstlanding#14954.

  • Stop no longer blocks. The CLI's repo monitor used to block every turn at Stop, which Claude Code shows as "Stop hook error". It now nudges through PostToolUse and repeats unanswered nudges once through UserPromptSubmit.
  • Hooks drifted from the CLI. Installed hooks never moved with the CLI, and the skill had no way to update them. Installed commands now carry --spec N.

This change lets the skills keep installed hooks current and updates the docs to match.

What changed

  • Bootstraps refresh hooks. archdev/scripts/bootstrap.{sh,ps1} and tasks/scripts/bootstrap.{sh,ps1} run archdev repo hook setup --refresh after the CLI check.

    • The refresh only runs when --refresh appears in setup --help, so older CLIs skip it.
    • Only harnesses that already have archdev hooks change; the refresh never opts a harness in.
    • Output goes to stderr, so stdout stays the executable path.
    • A failure is reported and never blocks the skill. One such failure: an older archdev earlier on PATH.
    • PowerShell relays stdout only and wraps the call in try/catch, because 2>&1 under ErrorActionPreference=Stop throws on any stderr line.
  • Docs. archdev/references/map.md, archdev/references/monitor.md and archdev/SKILL.md now describe:

    • the four hooks and the nudge/carryover flow
    • --spec and --refresh
    • the PATH guard

    These replace the "start + stop hooks" and stop-checkpoint wording.

Unchanged: min_version and every existing CLI capability check.

Scope

Skill docs and bootstrap scripts only.

Risk

Low.

  • The new block is gated on the CLI supporting --refresh.
  • It cannot change bootstrap's stdout contract, and it cannot fail the bootstrap.
  • The PowerShell path has not been run; no pwsh was available.

User impact

Loading either skill updates stale ArchDev hooks in place, for example from the blocking Stop hook to the nudge hooks, once the CLI release from #14954 is installed.

Testing

  • tasks/scripts/bootstrap.sh was run against a CLI built from #14954, with a temp HOME holding an old unstamped Claude Stop hook:
    • stdout was only the binary path
    • stderr showed the refresh
    • settings.json ended with all four hooks at --spec 2
  • bash -n passes on both bash scripts.
  • No automated test covers these scripts; this repo has no bootstrap test harness. The CLI side is covered by #14954's unit and end-to-end tests.

🤖 Generated with Claude Code

… nudge hooks

The CLI's repo monitor hooks no longer block at Stop: a PostToolUse hook
nudges after watched tool calls and a UserPromptSubmit hook repeats
unanswered nudges once (ArchAstro/firstlanding#14954). Installed commands
now carry --spec N, the CLI's hook wiring version.

- archdev and tasks bootstraps run `repo hook setup --refresh` after the
  CLI check, when the CLI supports it. Only harnesses that already have
  archdev hooks change; failures go to stderr and never block the skill.
  PowerShell relays stdout only, since 2>&1 under ErrorActionPreference=Stop
  throws on any stderr line.
- map.md / monitor.md / SKILL.md describe the four hooks, --spec, refresh,
  and the PATH guard instead of start + stop hooks and the stop checkpoint.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@calvin-archastro
calvin-archastro merged commit d1ce939 into main Sep 23, 2026
5 checks passed
@calvin-archastro
calvin-archastro deleted the feat/skill-hook-refresh branch September 23, 2026 19:04
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