fix(factory-audit): flag unbraced plugin-root tokens and close hook check gaps
Why: PR #144 review round 4 reproduced hooks referencing $PLUGIN_ROOT or ${PLUGIN_ROOT} without a path separator passing the audit, although apm only rewrites ${TOKEN}/ and the deployed hook points nowhere. - FAIL unbraced or unseparated plugin-root tokens - check the exec bit for scripts run via an interpreter -c string - skip env NAME=value prefixes when locating bare relative paths - correct input: and empty-frontmatter messages, depth-walk applyTo braces - INFO on unrecognised targets; failing-case tests for untested checks - document tiers, blind spots and crash exit 2; drop rtk from portable flow - restore the after-a-hand-edit trigger; pin upstream apm source URL 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:
@@ -1,8 +1,8 @@
|
||||
---
|
||||
name: factory-audit
|
||||
description: >
|
||||
Use when a skill, agent, or apm hook, instruction or prompt needs auditing,
|
||||
or "is this ready to ship". Not fixing a skill -> skill-author.
|
||||
Use when a skill, agent, apm hook, instruction or prompt needs auditing
|
||||
("ready to ship?"), even after a hand edit. Not fixing a skill -> skill-author.
|
||||
Not fixing an agent -> agent-author.
|
||||
Not fixing a hook, instruction or prompt -> primitive-author.
|
||||
allowed-tools: Bash Read
|
||||
@@ -42,7 +42,7 @@ Resolve the flow from the target path **before running anything**. The flows run
|
||||
| A file named `*.instructions.md` | instruction | `references/instruction-flow.md` |
|
||||
| A file named `*.prompt.md` | prompt | `references/prompt-flow.md` |
|
||||
| A `.md` file whose immediate parent directory is `agents/` (`.apm/agents`, `.claude/agents`, `.github/agents`, `.copilot/agents`) | agent | `references/agent-flow.md` |
|
||||
| A `.json` file whose immediate parent directory is `hooks/` (`.apm/hooks`, or a package-root `hooks/`; any other `hooks/` is deployed output the hook flow FAILs) | hook | `references/hook-flow.md` |
|
||||
| A `.json` file whose immediate parent directory is `hooks/` (`.apm/hooks`, or a package-root `hooks/`; the hook flow FAILs any other `hooks/`) | hook | `references/hook-flow.md` |
|
||||
| Anything else — a missing path, a directory without `SKILL.md`, any other file | none | — |
|
||||
|
||||
Read only the file its row matched. Each carries Steps 1 to 3 — the deterministic checks, the read, and the qualitative audit — and is self-contained. Return here for Step 4.
|
||||
|
||||
Reference in New Issue
Block a user