Skip to content

[BUG] generate-docs pre-commit hook misses new skill directories #144

Closed

Description

@gerchowl

Description

The generate-docs pre-commit hook does not trigger when skill directories are added or modified under .cursor/skills/. This means docs/SKILL_PIPELINE.md can become stale without the developer noticing during local commits.

Problem Statement

The hook's files filter only matches:

^(docs/templates/.*\.j2|docs/narrative/.*\.md|scripts/requirements\.yaml|justfile)$

docs/generate.py scans .cursor/skills/*/SKILL.md to build the skills table in SKILL_PIPELINE.md. When a new skill directory is added (e.g. pr_solve), the hook does not fire during local commits because the changed files don't match the filter. CI catches it with --all-files, but the developer only finds out after pushing.

This caused the CI failure on PR #142.

Proposed Solution

Add .cursor/skills/ to the hook's files pattern:

files: ^(docs/templates/.*\.j2|docs/narrative/.*\.md|scripts/requirements\.yaml|justfile|\.cursor/skills/.*)$

This ensures the hook fires whenever skills are added, removed, or modified.

Alternatives Considered

  • Do nothing — CI catches it with --all-files, but the feedback loop is slow and creates noise.
  • Add git add docs/SKILL_PIPELINE.md to the hook entry — The hook already auto-stages README.md, CONTRIBUTE.md, and TESTING.md, but SKILL_PIPELINE.md is missing from the git add list. Both the trigger pattern and the staging list should be updated together.

Impact

Prevents a class of CI failures where generated docs are stale after adding or modifying skills.

Activity

  1. added
    bug
    priority:low
    area:ci
    effort:small
    semver:patch
    on Feb 21, 2026
  2. c-vigo commented on Jun 23, 2026

    @c-vigo
    Contributor

    #626 (part of #625) moves skills from .cursor/skills/ to .claude/skills/, changing both docs/generate.py's scan path and the pre-commit hook's files filter — which absorbs this fix. Will close/redirect when #626 lands.

  3. c-vigo commented on Jul 2, 2026

    @c-vigo
    Contributor

    Fixed — the generate-docs hook's files: filter now matches .claude/skills/.*/SKILL.md, so adding/modifying a skill directory triggers regeneration of docs/SKILL_PIPELINE.md locally (generator scans .claude/skills/*/SKILL.md). New skill dirs are no longer missed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cibugeffort:smallpriority:lowsemver:patch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions