fix(kyberforge): correct instructions-author claims found in PR #154 review
Four clean-context reviewers checked the skill against apm 0.28.0 by experiment. Fix the target-mapping, schema, verify and SKILL.md claims they showed to be wrong, add the missing README row and forge Gotcha entry, note the AGENTS.md import caveat in forge, and close three test gaps (mismatched quotes, prefix type, tilde root) found by mutation. Refs #148 Co-Authored-By: Claude Code <[email protected]> Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
This commit is contained in:
1 parent
a92320a189
commit
b4499fd024
10 files changed
+55
-28
No files matched your search
@@ -64,6 +64,14 @@ need_apm() {
|
||||
assert [ ! -d "$ROOT/.apm" ]
|
||||
}
|
||||
|
||||
@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" ]
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Package resolution
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -117,6 +125,29 @@ need_apm() {
|
||||
assert [ ! -d "$ROOT/.apm" ]
|
||||
}
|
||||
|
||||
@test "a mismatched-quote type value is not a package marker" {
|
||||
mkdir -p "$ROOT/.git"
|
||||
printf 'name: p\ntype: "hybrid'"'"'\n' > "$ROOT/apm.yml"
|
||||
run bash "$SCRIPT" my-rule "$ROOT"
|
||||
assert_failure
|
||||
assert [ ! -d "$ROOT/.apm" ]
|
||||
}
|
||||
|
||||
@test "a type value that only starts with a package type is not a package marker" {
|
||||
mkdir -p "$ROOT/.git"
|
||||
printf 'name: p\ntype: prompts-only\n' > "$ROOT/apm.yml"
|
||||
run bash "$SCRIPT" my-rule "$ROOT"
|
||||
assert_failure
|
||||
assert [ ! -d "$ROOT/.apm" ]
|
||||
}
|
||||
|
||||
@test "expands a leading ~ in the root to HOME" {
|
||||
make_package
|
||||
run env HOME="$ROOT" bash "$SCRIPT" my-rule '~'
|
||||
assert_success
|
||||
assert [ -f "$ROOT/.apm/instructions/my-rule.instructions.md" ]
|
||||
}
|
||||
|
||||
@test "no-op when the file already exists" {
|
||||
make_package
|
||||
mkdir -p "$ROOT/.apm/instructions"
|
||||
@@ -218,14 +249,6 @@ need_apm() {
|
||||
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
|
||||
@@ -233,5 +256,8 @@ need_apm() {
|
||||
assert_success
|
||||
cd "$ROOT"
|
||||
run apm compile --dry-run --target claude
|
||||
assert_success
|
||||
assert_output --partial "dry-run"
|
||||
refute_output --partial "Failed to parse"
|
||||
refute_output --partial "Warning"
|
||||
}
|
||||
Reference in new issue
Block a user