Skip to content

Drop bundled hooks/ + .cjs parity tests once hooks are all-Python in ~/skills (blocked by #39) #42

Description

@vanducng

Context

After the manifest refactor (v3.0.0–3.1.0) vd no longer embeds hooks — vd install hooks reads <repo>/hooks/hooks.toml. The repo's top-level hooks/ folder now only holds:

  • the reference Node .cjs hooks (session-init.cjs, subagent-init.cjs, scout-block.cjs, dev-rules-reminder.cjs, team-context-inject.cjs, statusline.cjs, task-completed-handler.cjs, teammate-idle-handler.cjs, lib/*),
  • a sample hooks.toml,
  • the golden/parity Node tests that read those .cjsinternal/hooks/parity.mjs (:37../../hooks), hook-tests.mjs, dev_rules_reminder_test.mjs, internal/hooks/testdata/golden/.

The actual hooks live in the user's own repo (~/skills/hooks/). Once #39 (unify all hooks to Python, run via uv) lands — the .cjs ported to Python in the skills repo — vd-cli no longer needs to carry the Node reference set or its Node parity tests.

Proposal — blocked by #39

When the hooks are all-Python in the skills repo:

  • Remove hooks/*.cjs + hooks/lib/ (and the sample hooks.toml, or replace with a tiny Python starter).
  • Remove the Node parity/golden tests (parity.mjs, hook-tests.mjs, dev_rules_reminder_test.mjs, testdata/golden/) and any paths_worktree_test.go dependency on hooks/.
  • Keep the manifest-driven install/register logic + its Go tests — they use temp fixtures, not the repo hooks/, so they survive untouched.

Considerations

  • Go tests (install_test.go, manifest_test.go, codex_test.go, settings tests) build temp fixtures → unaffected.
  • After removal vd-cli ships no bundled hooks; docs must state users maintain hooks in their own repo, with an inline example manifest (the vd hooks doc section already leans this way).
  • Decide: drop hooks/ entirely, or keep one minimal Python example hook as a starter.

Acceptance

  • Unify all hooks to Python, run via uv #39 complete (hooks all Python in ~/skills).
  • hooks/*.cjs + Node parity tests removed.
  • go test ./... green (temp-fixture tests survive).
  • Docs updated — no bundled hook set; example manifest inline.

Depends on #39.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions