From 644c9d7f0851d56999dd8b2b02734eaeb7145ab6 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Fri, 27 Nov 2026 14:47:14 +0000 Subject: [PATCH] fix(skills): write BOMs as escape sequences so apm audit stops flagging them The validate-adapter.bats fixtures and factory-audit's strip_bom held literal U+FEFF characters, which apm audit reports as hidden characters on every install. Replace each with the Python backslash-ufeff escape; behaviour is unchanged (fixtures still emit EF BB BF, all 349 bats tests pass). Bump factory-audit to 1.0.7 (ADR-0022); provider-adapter-author's change is under tests/, which the bump gate ignores. Refs #208 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi --- .../provider-adapter-author/tests/validate-adapter.bats | 4 ++-- plugins/kyberforge/.apm/skills/factory-audit/SKILL.md | 2 +- .../skills/factory-audit/scripts/lib-boundary-resolver.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/core/.apm/skills/provider-adapter-author/tests/validate-adapter.bats b/plugins/core/.apm/skills/provider-adapter-author/tests/validate-adapter.bats index 2204e35..4fb5f37 100644 --- a/plugins/core/.apm/skills/provider-adapter-author/tests/validate-adapter.bats +++ b/plugins/core/.apm/skills/provider-adapter-author/tests/validate-adapter.bats @@ -298,14 +298,14 @@ EOF @test "a doubled UTF-8 BOM does not hide the @import line" { ADAPTER="$TMPDIR/CLAUDE.md" - python3 -c "import sys; open(sys.argv[1], 'wb').write(('@AGENTS.md\n').encode('utf-8'))" "$ADAPTER" + python3 -c "import sys; open(sys.argv[1], 'wb').write(('\ufeff\ufeff@AGENTS.md\n').encode('utf-8'))" "$ADAPTER" run bash "$SCRIPT" "$ADAPTER" "$AGENTS_MD" assert_success } @test "a BOM in front of a mid-file @import line does not hide it" { ADAPTER="$TMPDIR/CLAUDE.md" - python3 -c "import sys; open(sys.argv[1], 'wb').write(('# Claude notes\n\n@AGENTS.md\n').encode('utf-8'))" "$ADAPTER" + python3 -c "import sys; open(sys.argv[1], 'wb').write(('# Claude notes\n\n\ufeff@AGENTS.md\n').encode('utf-8'))" "$ADAPTER" run bash "$SCRIPT" "$ADAPTER" "$AGENTS_MD" assert_success } diff --git a/plugins/kyberforge/.apm/skills/factory-audit/SKILL.md b/plugins/kyberforge/.apm/skills/factory-audit/SKILL.md index 39653ee..8e1caa8 100644 --- a/plugins/kyberforge/.apm/skills/factory-audit/SKILL.md +++ b/plugins/kyberforge/.apm/skills/factory-audit/SKILL.md @@ -7,7 +7,7 @@ description: > fixes -> agent-author. allowed-tools: Bash Read metadata: - version: "1.0.6" + version: "1.0.7" category: factory source_keys: - agentskills-home diff --git a/plugins/kyberforge/.apm/skills/factory-audit/scripts/lib-boundary-resolver.sh b/plugins/kyberforge/.apm/skills/factory-audit/scripts/lib-boundary-resolver.sh index b4cb58c..0409c21 100755 --- a/plugins/kyberforge/.apm/skills/factory-audit/scripts/lib-boundary-resolver.sh +++ b/plugins/kyberforge/.apm/skills/factory-audit/scripts/lib-boundary-resolver.sh @@ -1055,7 +1055,7 @@ FRONTMATTER_RE = re.compile( def strip_bom(text): - return text[1:] if text.startswith(u'') else text + return text[1:] if text.startswith(u'\ufeff') else text class FrontmatterError(Exception):