fix(kyberforge): resolve PR #144 review and audit round 2

- factory-audit: ./ and bare/absolute script checks scoped to command
  position (no false FAILs on ./src or printf); hook sources limited to
  .apm/hooks or package-root hooks/; Kiro-aware lowercase events;
  unfilled template placeholders FAIL; repo-only instructions FAIL at
  any scope; Vale description FAIL documented; bats 367 -> 378
- primitive-author: split-quote/spaced paths and handler-less entries
  promoted to Must; Step 4.2 renders into a scratch consumer instead of
  a no-op dry run; dispatch and gate hand-off trimmed
- apm-workflow 1.0.2: mutual boundary with primitive-author
- forge: no double package bump; gotcha wording
- skill-author: create keeps seeded 0.1.0 (ADR-0022); portable,
  retry-safe new-skill.sh; template and flow consistency fixes
- hook docs: cite the ADR-0019 correction; guard caveat

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
This commit is contained in:
2026-09-28 20:50:22 +00:00
parent df28351d3e
commit 965208bddd
29 changed files with 462 additions and 156 deletions

View File

@@ -107,6 +107,31 @@ teardown() {
assert_output --partial "nothing to do"
}
@test "no SKILL_NAME placeholder remains anywhere in a fresh scaffold" {
bash "$SCRIPT" my-tool "$DEST"
run grep -r "SKILL_NAME" "$DEST/my-tool"
assert_failure
}
@test "leaves no staging directory behind after a successful run" {
bash "$SCRIPT" my-tool "$DEST"
run bash -c "ls -d '$DEST'/my-tool.partial.* 2>/dev/null"
assert_output ""
}
@test "retry repairs a half-built scaffold that still carries SKILL_NAME" {
# Simulate an earlier run that copied the templates but died before the
# name substitution: the retry must finish the job, not no-op.
cp -r "$BATS_TEST_DIRNAME/../assets/templates" "$DEST/my-tool"
run bash "$SCRIPT" my-tool "$DEST"
assert_success
assert_output --partial "Repaired partial scaffold"
run grep -r "SKILL_NAME" "$DEST/my-tool"
assert_failure
run grep -E '^name: my-tool$' "$DEST/my-tool/SKILL.md"
assert_success
}
# ---------------------------------------------------------------------------
# Mode detection: package vs standalone
# ---------------------------------------------------------------------------