fix(kyberforge): address independent review of #154

Quote the template description so the raw scaffold is valid YAML, reject
newline-containing names in new-instructions.sh, correct the empty-compile
facts (exit 1, --clean exits 0), and finish removing commit steps from the
skill-author, agent-author and forge references. Adds regression tests.

Refs #148

Co-Authored-By: Claude Code <[email protected]>
Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
This commit is contained in:
Defame1297andClaude Code committed 2026-10-01 16:28:15 +00:00
1 parent d576695bb9
commit 68fa2abb62
11 files changed
+34 -17

No files matched your search

@@ -21,7 +21,7 @@ make_package() {
fill() {
sed -i -E \
-e '/^#/{/^# FILL IN/!d}' \
-e 's/^description: FILL IN.*/description: Python style rules/' \
-e 's/^description: .?FILL IN.*/description: Python style rules/' \
-e 's/^applyTo: .*/applyTo: "**\/*.py"/' \
-e 's/^# FILL IN.*/# Python style/' \
-e 's/^- FILL IN.*/- Use type hints./' \
@@ -217,3 +217,21 @@ need_apm() {
assert_output --partial "Missing 'description'"
assert_output --partial "Empty content"
}
@test "rejects a name containing a newline" {
make_package
run bash "$SCRIPT" $'my-rule\nextra' "$ROOT"
assert_failure
assert_output --partial "lowercase letters"
assert [ ! -d "$ROOT/.apm" ]
}
@test "the raw scaffold is valid YAML and compiles with no parse warnings" {
need_apm
make_package
run bash "$SCRIPT" my-rule "$ROOT"
assert_success
cd "$ROOT"
run apm compile --dry-run --target claude
refute_output --partial "Failed to parse"
}