refactor(build-skill): align specification with formal Antigravity schema

- Add canonical directory structure to skeleton reference
- Enforce ^[a-z0-9-]+$ naming regex and frontmatter schema rules
- Update checklist with syntactic, structural, and invocation checks
- Clarify short spec requirements in step 5
This commit is contained in:
kiskaadee committed 2026-10-08 18:02:12 -05:00
1 parent c00271f691
commit 9ed6015b2c
3 files changed
+28 -10

No files matched your search

+3 -2
View File
@@ -25,8 +25,9 @@ disable-model-invocation: true
4. **Size it.** Decide the shape: reference (facts consulted on demand), transformation
(input to output), procedure (steps with checks between them), or interview (rounds of
questions). Add gates or checkpoints only for a failure you can name.
5. **Write a short spec:** name (= slash command), description, steps, "Your call" items,
done-when signal, hand-offs, files in `references/` or `scripts/` if any.
5. **Write a short spec:** name (matching `^[a-z0-9-]+$` = slash command), description
(3rd person, concrete triggers), manual invocation toggle if needed, steps, "Your call" items,
done-when signal, hand-offs, and files in canonical subdirectories (`references/`, `scripts/`, etc.).
6. **Write it** in this repo following [references/skeleton.md](references/skeleton.md),
then run the checks in [references/checklist.md](references/checklist.md).
7. **Dogfood.** Run it on a real task, read the agent's actual turns, and fix the smallest
+6 -3
View File
@@ -6,15 +6,18 @@ Used by `build-skill` at step 6 (writing) and step 7 (dogfooding).
| Check | Question |
| :--- | :--- |
| Name syntax | Does `name` strictly match `^[a-z0-9-]+$` (no uppercase, no underscores)? |
| Description | Does it state what the skill does in 3rd person and name concrete triggers? (The agent routes from this alone.) |
| Invocation | Should this ever auto-trigger? If manual only, is `disable-model-invocation: true` set? |
| Directory layout | Uses canonical layout (`SKILL.md`, and optional `references/`, `scripts/`, `resources/`, `examples/`)? |
| Section structure | Follows fixed sections: `Use when`, `Steps`, `Your call`, `Done when`, `Hands off to`? |
| Size | Is `SKILL.md` 80 lines or less, with bulky material/schemas in `references/`? |
| One job | Is there one recurring problem this skill owns? |
| Clear edges | Does "Hands off to" say where it stops? Does "Use when" say what it is not for? |
| One owner per rule | Is any rule here already defined elsewhere (AGENTS.md, another skill)? Point to it instead. |
| Deletion test | Would removing each sentence change what the agent does? If not, remove it. |
| Observable finish | Does "Done when" name a concrete signal (test passes, file exists, user approved)? |
| Human decisions | Does "Your call" list the decisions that must stay with the user? |
| Size | Is `SKILL.md` 80 lines or less, with bulky material in `references/`? |
| Invocation | Should this ever auto-trigger? If not, set `disable-model-invocation: true`. |
| Description | Does it say what the skill does and name concrete triggers? (The agent decides from this alone.) |
| Public repo | No absolute home paths, no secrets. |
Add extra controls (hard gates, state files, checkpoints) only for a failure you have actually
+19 -5
View File
@@ -2,12 +2,25 @@
Every `skills/*/SKILL.md` uses this shape. `build-skill` owns this file; other skills follow it and do not restate it.
## Canonical Directory Structure
```text
skills/<skill-name>/
├── SKILL.md # Required: Root instructions with YAML frontmatter
├── references/ # Optional: Deep documentation, schemas, and manuals
├── scripts/ # Optional: Deterministic executable scripts
├── resources/ # Optional: Templates, assets, or static data
└── examples/ # Optional: Reference cases and sample inputs/outputs
```
## SKILL.md Skeleton
```markdown
---
name: <command-name> # what the user types: /<command-name>
name: <command-name> # Regex ^[a-z0-9-]+$ (lowercase alphanumeric and hyphens; slash command: /<command-name>)
description: >-
<What it does, in one sentence. When to use it: concrete triggers.>
# disable-model-invocation: true # only for skills that must never auto-trigger
<What it does in 3rd person. When to use it: concrete triggers for semantic routing.>
# disable-model-invocation: true # Optional boolean: true prevents automatic model invocation (manual slash command only)
---
# <Title>
@@ -31,11 +44,12 @@ description: >-
## Rules
- **80 lines max** for `SKILL.md`. Templates, long formats and branch rules go in `references/`.
- **80 lines max** for `SKILL.md`. Templates, long formats, and branch rules go in `references/`.
- **Extra sections** are allowed only for a format used across several steps (e.g. `diagnose`'s checkpoint).
- **One owner per rule.** If another file already defines it (AGENTS.md, another skill), point to it.
- **Deletion test.** If removing a sentence would not change what the agent does, remove it.
- **Plain words.** No invented vocabulary. Prefer "decision" over "epistemic commitment".
- **No diagrams that repeat a list.** A numbered list is already the flow.
- **No em-dashes** in skill text.
- **The `name` is the slash command.** Never create a separate wrapper skill to expose a command.
- **The `name` is the slash command.** Must match `^[a-z0-9-]+$`. Never use underscores (`_`) or uppercase; never create a separate wrapper skill to expose a command.
- **Public repo hygiene.** Never hardcode user home paths (`/home/...`) or secrets.