diff --git a/plugins/kyberforge/skills/agent-author/references/scripts.md b/plugins/kyberforge/skills/agent-author/references/scripts.md index 6a4966c..42c4493 100644 --- a/plugins/kyberforge/skills/agent-author/references/scripts.md +++ b/plugins/kyberforge/skills/agent-author/references/scripts.md @@ -15,6 +15,7 @@ All scripts in this skill must follow these rules: - **Idempotent** — "create if not exists" per file. The scaffold script skips any file that already exists; agents may safely re-run it. - **Meaningful exit codes** — `0` success, `1` invalid arguments or precondition failure. Document in `--help`. - **Self-contained** — no external package installs at runtime. The script uses only bash builtins and POSIX tools (`sed`, `mkdir`, `cat`). +- **No restated field rosters** — no script output, in `--help` or in next-steps guidance, enumerates permitted, forbidden, or required frontmatter fields. Point at the `apm-agent-allowlist` section of `agent-audit`'s `references/field-inventory.md`, which `agent-audit`'s `validate.sh` reads from there as data. A roster copied into script output goes stale one step further out than the list itself: the next-steps hint `(name, description, model, body only)` kept printing after ADR-0016's 2026-08-14 amendment added `disallowedTools` to the permitted set. `tests/new-agent.bats` enforces this for the plugin/APM branch — naming some allowlisted fields but not all is a failure. ## Template variables diff --git a/plugins/kyberforge/skills/agent-author/scripts/new-agent.sh b/plugins/kyberforge/skills/agent-author/scripts/new-agent.sh index c771dd1..4742610 100755 --- a/plugins/kyberforge/skills/agent-author/scripts/new-agent.sh +++ b/plugins/kyberforge/skills/agent-author/scripts/new-agent.sh @@ -21,10 +21,12 @@ Arguments: without type: is a marketplace-only manifest and is skipped, the walk continues upward → creates /.apm/agents/.agent.md - (single vendor-neutral file — no tools, - isolation, maxTurns, effort, memory, or - permissionMode; apm compile has no per-target - field integrator, see ADR-0016) + (single vendor-neutral file; apm compile copies + its frontmatter verbatim to every target with no + per-target field integrator, so the permitted + field set is narrow — see the apm-agent-allowlist + section of agent-audit's + references/field-inventory.md and ADR-0016) → creates /sources.md (if absent) project scope : no type:-bearing apm.yml found; root is a project directory @@ -258,6 +260,19 @@ SOURCES fi fi +# Next-steps guidance names no frontmatter fields, by rule (see references/scripts.md). +# A roster restated in terminal output goes stale one step further out than the list +# itself: the old "(name, description, model, body only)" hint outlived ADR-0016's +# 2026-08-14 amendment, which added disallowedTools to the permitted set. Point at the +# scaffolded file's own comments for what to fill, and at agent-audit's validate.sh — +# which reads the allowlist from field-inventory.md as data — for what is permitted. +AUDIT_SCRIPTS="$(cd "$SKILL_ROOT/../agent-audit/scripts" 2>/dev/null && pwd || true)" +if [[ -n "$AUDIT_SCRIPTS" && -f "$AUDIT_SCRIPTS/validate.sh" ]]; then + VALIDATE_HINT="$AUDIT_SCRIPTS/validate.sh" +else + VALIDATE_HINT="agent-audit's scripts/validate.sh" +fi + if [[ "$created_any" == false ]]; then echo "All files already exist — nothing to do." >&2 else @@ -266,12 +281,17 @@ else echo "" >&2 echo "Next steps:" >&2 if [[ "$SCOPE" == "plugin" ]]; then - echo " 1. Fill in $APM_FILE — replace all FILL IN: placeholders (name, description, model, body only)" >&2 + echo " 1. Fill in $APM_FILE — replace every FILL IN: placeholder. Optional fields are" >&2 + echo " scaffolded there as commented blocks; uncomment the ones that apply." >&2 echo " 2. Populate $SOURCES_DIR/sources.md with research sources, or delete it" >&2 - echo " 3. Validate: check required fields (name, description, system prompt) in the file" >&2 + echo " 3. Validate: $VALIDATE_HINT $APM_FILE" >&2 + echo " It checks the frontmatter against the apm-agent-allowlist section of" >&2 + echo " agent-audit's references/field-inventory.md, the authoritative field list." >&2 else - echo " 1. Fill in $CC_FILE — replace all FILL IN: placeholders" >&2 - echo " 2. Fill in $CP_FILE — replace all FILL IN: placeholders" >&2 - echo " 3. Validate: check required fields (name, description, system prompt) in both files" >&2 + echo " 1. Fill in $CC_FILE — replace every FILL IN: placeholder. Optional fields are" >&2 + echo " scaffolded there as commented blocks; uncomment the ones that apply." >&2 + echo " 2. Fill in $CP_FILE — same, and heed its closing comment: the Claude Code-only" >&2 + echo " fields it names must not cross over from the file above." >&2 + echo " 3. Validate: run $VALIDATE_HINT on each file" >&2 fi fi