Commit Graph

2 Commits

Author SHA1 Message Date
096120d12e fix(tests): auto-init submodules when bats binary is missing
Fresh worktrees don't have submodules checked out, so the pre-push
run-tests hook failed on first push with a manual-fix error message.
run-bats.sh now runs `git submodule update --init --recursive`
automatically instead of just printing instructions.

Also records two lessons from working across bare-repo/worktree
boundaries this session: the repo root has no working tree (edits
there are invisible to git), and local remote-tracking refs go stale
after a merge — verify via the Gitea API before asking about cleanup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FNJWdVvdgvZCHi1hZGqgVQ
2026-07-05 13:47:39 +00:00
6a94ccc270 test(kyberforge): add bats test suites for validate.sh and new-skill.sh
- Add bats-core, bats-support, bats-assert as git submodules under tests/
- Add tests/run-bats.sh — discovers and runs all *.bats files in the repo
- 17 tests for skill-audit/scripts/validate.sh: valid skill, --help, optional
  dirs, backtick-quoted placeholder exclusion, boundary checks (500 lines /
  1024 chars), and failure cases (missing SKILL.md, name mismatch, placeholders,
  non-executable scripts, interactive prompts, invalid name formats, no args)
- 16 tests for skill-write/scripts/new-skill.sh: scaffold structure, name
  substitution, numbers in name, /skill-audit reference in next-steps, and
  failure cases (uppercase, consecutive/leading/trailing hyphens, missing dest,
  existing target, no args)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:47:31 +00:00