From 3c35f2fbd51453eb5a1ab97a29e3f2b33ae47619 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Tue, 23 Jun 2026 20:33:18 +0000 Subject: [PATCH] fix(kyberforge): fix template test docs, dangling skill ref, and README table consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rewrite assets/templates/tests/README.md with correct repo-root context and SKILL_NAME placeholder in bats run command (was: `bats tests/`, wrong CWD) - Add sed substitution for tests/README.md in new-skill.sh so SKILL_NAME is replaced in scaffolded test docs; test added to new-skill.bats (red→green) - Remove /write-eval reference from skill-improve SKILL.md; reword as direct action since the skill does not exist in the kyberforge plugin - Remove self-referential README.md rows from skill-audit and skill-improve Files tables to match template and skill-write convention Co-Authored-By: Claude Sonnet 4.6 --- plugins/kyberforge/skills/skill-audit/README.md | 1 - plugins/kyberforge/skills/skill-improve/README.md | 1 - plugins/kyberforge/skills/skill-improve/SKILL.md | 2 +- .../skill-write/assets/templates/tests/README.md | 13 ++++++++----- .../skills/skill-write/scripts/new-skill.sh | 1 + .../skills/skill-write/tests/new-skill.bats | 6 ++++++ 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/plugins/kyberforge/skills/skill-audit/README.md b/plugins/kyberforge/skills/skill-audit/README.md index a70728e..a611879 100644 --- a/plugins/kyberforge/skills/skill-audit/README.md +++ b/plugins/kyberforge/skills/skill-audit/README.md @@ -27,4 +27,3 @@ Provide the path to the skill directory to audit when invoking. | `references/body-discipline.md` | Spec-grounded rubric for body discipline auditing — loaded when padding vs necessity is unclear | | `tests/validate.bats` | Bats test suite for validate.sh | | `tests/README.md` | Setup instructions for bats-support and bats-assert test dependencies | -| `README.md` | This file | diff --git a/plugins/kyberforge/skills/skill-improve/README.md b/plugins/kyberforge/skills/skill-improve/README.md index 6e95f3d..ac299b2 100644 --- a/plugins/kyberforge/skills/skill-improve/README.md +++ b/plugins/kyberforge/skills/skill-improve/README.md @@ -23,4 +23,3 @@ Provide the skill directory path and any signal files in the conversation. The s | File | Purpose | |------|---------| | `SKILL.md` | Skill instructions for agents | -| `README.md` | Human-facing description of the skill and its files | diff --git a/plugins/kyberforge/skills/skill-improve/SKILL.md b/plugins/kyberforge/skills/skill-improve/SKILL.md index f884e32..ca94209 100644 --- a/plugins/kyberforge/skills/skill-improve/SKILL.md +++ b/plugins/kyberforge/skills/skill-improve/SKILL.md @@ -73,4 +73,4 @@ If a signal points to a script or reference file, edit that file directly rather Run `/skill-audit` on the skill directory. Resolve any FAIL findings before considering the improvement complete. -If the skill has no `evals/` directory, note it after the audit: "No evals found — consider running `/write-eval` to add test coverage so future improvement cycles have quantitative signals to work from." +If the skill has no `evals/` directory, note it after the audit: "No evals found — consider adding an `evals/` directory with assertion-based test cases to give future improvement cycles quantitative signals to work from." diff --git a/plugins/kyberforge/skills/skill-write/assets/templates/tests/README.md b/plugins/kyberforge/skills/skill-write/assets/templates/tests/README.md index 2bdea45..c5c18f6 100644 --- a/plugins/kyberforge/skills/skill-write/assets/templates/tests/README.md +++ b/plugins/kyberforge/skills/skill-write/assets/templates/tests/README.md @@ -9,20 +9,23 @@ to break silently — validators, parsers, generators, anything with branching logic or edge cases. Test infrastructure (`.bats`, `*_test.*`, `test_*.sh`) belongs here, not in `scripts/`. -## Test runner +## Dependencies -Tests are run with [Bats](https://bats-core.readthedocs.io) for shell scripts. -Install support libraries under `tests/test_helper/`: +Tests require [bats-support](https://github.com/bats-core/bats-support) and +[bats-assert](https://github.com/bats-core/bats-assert). The test files load +helpers from the repo root's `tests/test_helper/`. + +From the repo root: ```bash git clone https://github.com/bats-core/bats-support tests/test_helper/bats-support git clone https://github.com/bats-core/bats-assert tests/test_helper/bats-assert ``` -Run all tests: +Run all tests for this skill (from the repo root): ```bash -bats tests/ +bats /SKILL_NAME/tests/ ``` ## If no tests are needed diff --git a/plugins/kyberforge/skills/skill-write/scripts/new-skill.sh b/plugins/kyberforge/skills/skill-write/scripts/new-skill.sh index 72508ff..446e234 100755 --- a/plugins/kyberforge/skills/skill-write/scripts/new-skill.sh +++ b/plugins/kyberforge/skills/skill-write/scripts/new-skill.sh @@ -76,6 +76,7 @@ cp -r "$TEMPLATES_DIR" "$TARGET" # Set skill name in templates sed -i "s/SKILL_NAME/$SKILL_NAME/g" "$TARGET/SKILL.md" sed -i "s/SKILL_NAME/$SKILL_NAME/g" "$TARGET/README.md" +sed -i "s/SKILL_NAME/$SKILL_NAME/g" "$TARGET/tests/README.md" echo "Scaffold created: $TARGET" echo "" diff --git a/plugins/kyberforge/skills/skill-write/tests/new-skill.bats b/plugins/kyberforge/skills/skill-write/tests/new-skill.bats index 35c86ef..b3ef085 100644 --- a/plugins/kyberforge/skills/skill-write/tests/new-skill.bats +++ b/plugins/kyberforge/skills/skill-write/tests/new-skill.bats @@ -59,6 +59,12 @@ teardown() { assert_success } +@test "substitutes skill name in tests/README.md" { + bash "$SCRIPT" my-tool "$DEST" + run grep "my-tool" "$DEST/my-tool/tests/README.md" + assert_success +} + @test "skill name with numbers is valid" { run bash "$SCRIPT" my-tool-2 "$DEST" assert_success