fix(core): make --no-import-syntax actually change the adapter validation
Both branches of the flag reduced to the same expression, so the option was inert: a caller who asked for the no-import form got the import-form check anyway and a passing result that meant nothing. Two further defects in the same validator: --max-lines failed silently when given a value it could not use, and the Fix text told the agent to edit AGENTS.md when the offending content is the provider adapter's. The boundary clauses now name the operation being routed rather than the file type, which was ambiguous where both skills touch the same file. Addresses #115.
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
name: provider-adapter-author
|
||||
description: >
|
||||
Use when a provider file (CLAUDE.md, .cursor rules, copilot-instructions)
|
||||
duplicating the repo's AGENTS.md should be cut to a thin adapter.
|
||||
duplicating the repo's AGENTS.md should be cut to a thin adapter — "make
|
||||
CLAUDE.md just import AGENTS.md".
|
||||
Not writing the AGENTS file -> `agentsmd-author`.
|
||||
Not auditing the AGENTS file -> `agentsmd-audit`.
|
||||
allowed-tools: Bash Read Edit Write
|
||||
@@ -16,7 +17,6 @@ metadata:
|
||||
## Gotchas
|
||||
|
||||
- Assume a provider has no cross-file import mechanism until you have confirmed it has one. Claude Code is the exception, not the rule: a `CLAUDE.md` may consist of nothing but `@path` lines, while the same `@AGENTS.md` line in a Cursor rule or a Copilot instructions file is inert text no tool resolves. Pass `--no-import-syntax` to `scripts/validate-adapter.sh` for those providers.
|
||||
- Works standalone or composed-into by `agentsmd-author` — behave identically either way; don't assume a caller skill exists.
|
||||
|
||||
## Step 1 — Detect
|
||||
|
||||
@@ -43,7 +43,7 @@ Run the bundled check before finishing — this is the skill's own closeout gate
|
||||
bash scripts/validate-adapter.sh [--no-import-syntax] [--max-lines N] <adapter-file> <agents-md-file>
|
||||
```
|
||||
|
||||
Fix any `FAIL` by editing the provider file, and re-run until it exits `0`. The size `FAIL` advises moving provider-agnostic content into `AGENTS.md`; disregard that half of its wording and delete the redundant lines instead.
|
||||
Fix any `FAIL` by editing the provider file, and re-run until it exits `0`.
|
||||
|
||||
## Step 4 — Report
|
||||
|
||||
|
||||
Reference in New Issue
Block a user