Skip to content

Comments

fix: handle nested hooks.json, skip frontmatterless markdown, fix error display#10

Merged
terraboops merged 1 commit intomainfrom
fix/discover-ci-failures
Feb 20, 2026
Merged

fix: handle nested hooks.json, skip frontmatterless markdown, fix error display#10
terraboops merged 1 commit intomainfrom
fix/discover-ci-failures

Conversation

@terraboops
Copy link
Collaborator

Summary

  • Fix mergeHooks() crash on nested hooks.json format ({ description, hooks: { ... } })
  • Require frontmatter for heuristic markdown classification — silently skip reference docs and planning notes
  • Fix action.yml error display dead code (set -e + $? check → if ! pattern)
  • Add 11 tests covering mergeHooks formats and classifyComponent edge cases

Context

Two PRs in bc-llm-skills have failing CI:

  • PR #43 (design engineering plugin): crashes discover job — hooks.json has nested format
  • PR #42 (BitHub MCP integration): fails validate — PLAN-mcp-auth-post.md has no frontmatter

Test plan

  • npm test passes (23/23)
  • npm run build regenerates dist
  • Verified against PR #43 branch: no crash, hooks discovered, references/*.md skipped
  • Verified against PR #42 branch: PLAN-mcp-auth-post.md skipped, zero errors

🤖 Generated with Claude Code

…or display

mergeHooks() crashed on hooks.json files with a wrapper object
(e.g., { description: "...", hooks: { EventName: [...] } }). Now detects
nested format and skips non-array values.

classifyComponent() now requires frontmatter for heuristic classification
(steps 4+). Markdown files without frontmatter that don't match by filename
or location are silently skipped instead of producing classification errors.
This fixes reference docs and planning notes being flagged.

action.yml error display was dead code due to set -e killing the shell
before the $? check. Replaced with if-! pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@terraboops terraboops merged commit 458b0a9 into main Feb 20, 2026
4 checks passed
@terraboops terraboops deleted the fix/discover-ci-failures branch February 20, 2026 09:03
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