spec-author ยท diff

git:20260929.b5a2f31 to git:20261024.50c112d

9 added, 18 removed. Audit A to A.

What this update changes in the checks

No check changed: every fixed check gives the same answer before and after this update.

A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.

---
name: spec-author
- description: Author a new agnostic-ai spec (agent, skill, rule, or hook). Use when the user wants to add a new prompt, convention, or hook to their project.
+ description: Author an agnostic-ai agent, skill, rule, or hook from the user's requested behavior.
---
# spec-author
- Authors a new agnostic-ai spec file from a description.
+ Create or update the smallest spec that expresses the requested behavior. Infer the kind from the request and existing specs; ask only when the choice changes the outcome. Reuse a matching spec instead of creating a duplicate.
## Steps
- 1. Ask the user which kind: agent, skill, rule, or hook.
- 2. Pick the right directory and extension:
- - agent: `agents/<name>.md`
- - skill: `skills/<name>/SKILL.md`
- - rule: `rules/<name>.md`
- - hook: `hooks/<name>.yaml`
- 3. Build the YAML frontmatter (or full YAML for hooks) per the matching page under `docs/site/content/docs/spec-format/`.
- 4. Write the body in plain English. Lead with the action.
- 5. Run `agnostic-ai validate` to confirm parse.
- 6. Run `agnostic-ai sync --dry-run` to preview emitted outputs.
-
- ## Conventions
+ 1. Read `agnostic-ai.yaml` for configured source paths and inspect sibling specs. The default root is `.agnostic-ai/`.
+ 2. Read the matching page under `docs/site/content/docs/spec-format/` for fields and native limits. For a new spec, use `go run ./cmd/agnostic-ai new <kind> <name> --dry-run` to inspect the scaffold, then create it. Never overwrite an existing spec with a scaffold.
+ 3. Use `agents/<name>.md`, `rules/<name>.md`, or `hooks/<name>.yaml` under the configured root. Skills can use `<name>.md` or `<name>/SKILL.md`; use the folder layout when bundling references or scripts.
+ 4. Write a short description that tells an agent when to use the spec. Keep the body focused on decisions and actions, with conditional details in existing references. Hooks need the documented event and exact `command`; test the emitted behavior in an isolated project.
+ 5. Run `go run ./cmd/agnostic-ai validate` and `go run ./cmd/agnostic-ai lint`, then preview with `go run ./cmd/agnostic-ai sync --dry-run`. Check the intended targets and output paths.
+ 6. Generate with `go run ./cmd/agnostic-ai sync`, then verify `go run ./cmd/agnostic-ai sync --check`. Review tracked output changes and keep ignored output ignored. Follow `docs/internal/contributing.md#choose-checks-for-your-change` for other checks the change requires.
- - `name` field matches the file name without extension.
- - `description` is one short sentence.
- - Body is markdown. Avoid em dashes. Avoid filler.
- - Hooks include a `command` field with the exact shell to run.
+ Use lowercase, hyphenated names. An explicit `name` matches the Markdown file stem, or the containing folder for `SKILL.md`. Paths in shared instructions are repository-root relative; state that convention when generated copies live at different depths.