feat(skills): add agent writing guide #191
1
.pi/skills/agent-writing-guide
Symbolic link
1
.pi/skills/agent-writing-guide
Symbolic link
@@ -0,0 +1 @@
|
||||
../../src/skills/agent-writing-guide
|
||||
@@ -1 +0,0 @@
|
||||
../../src/skills/craft-skill
|
||||
@@ -1 +0,0 @@
|
||||
../../src/skills/grill
|
||||
@@ -1 +0,0 @@
|
||||
../../src/skills/to-document
|
||||
@@ -124,3 +124,4 @@
|
||||
Preserve `git-subtree-dir` and `git-subtree-split` trailers on Pi vendor commits.
|
||||
- The default Pi model for NixOS user configuration is set in `configs/nixos/modules/shell/pi/default.nix`, not in vendored Pi source.
|
||||
- The `monorepo` and `status` libraries do not have `README.md` files.
|
||||
- Check root and `src/skills/.pi/skills/` for enabled symlinks before removing a monorepo skill.
|
||||
|
||||
13
docs/00 INBOX/credits.md
Normal file
13
docs/00 INBOX/credits.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
aliases:
|
||||
- Credits
|
||||
date-created: 2026-10-17 18:08
|
||||
date-modified: 2026-10-17 18:09
|
||||
---
|
||||
|
||||
# Credits
|
||||
|
||||
| Path | Original | Notes |
|
||||
|-------------------------------------|-----------------------------------------------------------------------------------------|-------|
|
||||
| `//src/skills/agent-writing-skills` | <https://github.com/mattpocock/skills/tree/main/skills/productivity/writing-for-agents> | |
|
||||
| | | |
|
||||
@@ -1 +0,0 @@
|
||||
../../craft-skill
|
||||
22
src/skills/agent-writing-guide/SKILL-MECHANICS.md
Normal file
22
src/skills/agent-writing-guide/SKILL-MECHANICS.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Skill mechanics
|
||||
|
||||
The skill-specific branch of [`agent-writing-guide`](SKILL.md): what changes when the document is a skill (frontmatter, the invocation choice, and router skills). Everything else about writing it is the universal reference in `SKILL.md`.
|
||||
|
||||
## Invocation
|
||||
|
||||
Two choices, trading the two loads:
|
||||
|
||||
- A **model-invoked** skill keeps a `description`, so the agent can fire it autonomously, and other skills can reach it. You can still type its name: model-invocation always _includes_ user reach; a description only ever adds agent discovery, never removes the human's. The description is the skill's top-level context pointer, forced to stay loaded at all times: permanent context load in exchange for discoverability. A model-invoked skill whose content is all reference is also one home for shared reference: another skill can invoke it, so reference needed by several skills lives in one place. Mechanics: omit `disable-model-invocation`, and write a model-facing description carrying the trigger branches (the pointer-writing rules in `SKILL.md` apply in full).
|
||||
- A **user-invoked** skill strips the description from the agent's reach: only the human typing its name can invoke it, and no other skill can. Zero context load, but it spends cognitive load: you are the index that must remember it exists. Mechanics: set `disable-model-invocation: true`; the `description` becomes human-facing: a one-line summary, trigger lists stripped.
|
||||
|
||||
Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.
|
||||
|
||||
Shared reference that two user-invoked skills both need can live in neither: neither skill exposes model invocation. Push it to a plain file outside the skill system: external reference any skill can point at.
|
||||
|
||||
## Splitting by invocation
|
||||
|
||||
The invocation cut of splitting (the sequence cut lives in `SKILL.md`): split off a model-invoked skill when you have a distinct leading word that should trigger it on its own (a trigger word you actually use in your prompts), or another skill must reach it. You pay context load for the new always-loaded description, so that independent reach has to be worth it.
|
||||
|
||||
## Router skills
|
||||
|
||||
When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a **router skill**: one user-invoked skill that names the others and when to reach for each, so the human has one skill to remember instead of many. It can only hint, never fire them: `disable-model-invocation: true` prevents model invocation, so nothing but the human can reach them.
|
||||
81
src/skills/agent-writing-guide/SKILL.md
Normal file
81
src/skills/agent-writing-guide/SKILL.md
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
name: agent-writing-guide
|
||||
description: Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
|
||||
---
|
||||
|
||||
Reference for writing any document an agent consumes: a skill, an `AGENTS.md` / `CLAUDE.md`, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable, since the agent takes the same _process_ every run rather than producing the same output.
|
||||
|
||||
When the document you're writing is a skill, read [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md) for frontmatter, invocation choice, and router skills.
|
||||
|
||||
## Context pointers
|
||||
|
||||
A **context pointer** is a reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. A skill's description is one; a line in `AGENTS.md` naming a doc is the same object. The pointer's _wording_, not its target, decides when the agent reaches the material, and how reliably. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.
|
||||
|
||||
A pointer does two jobs: state what the material is, and list the **branches** that should trigger reaching it (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:
|
||||
|
||||
- **Front-load the leading word**: the pointer is where it does its triggering work.
|
||||
- **One trigger per branch.** Synonyms that rename a single branch are one branch written twice; collapse them and keep only genuinely distinct branches.
|
||||
- **Cut identity the body already carries.**
|
||||
|
||||
## The two loads
|
||||
|
||||
Every document and pointer you add spends one of two budgets:
|
||||
|
||||
- **Context load** is the cost of always-loaded material on the agent's window: an `AGENTS.md` line, a skill description, anything sitting in context every turn, spending tokens and attention whether or not it fires.
|
||||
- **Cognitive load** is the cost on the human: which documents exist and when to reach for each. The human is the index. Not a cost to minimise: it is the price of human agency; spend it where human judgement matters, remove it where it does not.
|
||||
|
||||
Material reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.
|
||||
|
||||
## Information hierarchy
|
||||
|
||||
A document is built from two content types: **steps** (the ordered actions the agent performs) and **reference** (definitions, rules, facts consulted on demand). The two mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:
|
||||
|
||||
1. **In-file step** is the primary tier: what the agent does, in order.
|
||||
2. **In-file reference** is consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung), which is a fine arrangement, not a smell.
|
||||
3. **Disclosed reference** is pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.
|
||||
|
||||
Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
|
||||
|
||||
**Progressive disclosure** is the move down the ladder (out of the main file and behind a pointer) so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip: a variance lever, not just a legibility one.
|
||||
|
||||
**Co-location** is the within-file companion: where the ladder decides _how far down_ a piece sits, co-location decides _what sits beside it_ once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent. Grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)
|
||||
|
||||
**Sprawl** is the failure mode here: a document simply too long, even when every line is live and unique. Attention thins across the excess, and every extra line is one more to keep relevant. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.
|
||||
|
||||
## Steps and completion criteria
|
||||
|
||||
Every step ends on a **completion criterion**, the condition that tells the agent the work is done. Two properties make it a lever:
|
||||
|
||||
- **Clarity**: can the agent tell done from not-done? A vague bound ("understanding reached") invites **premature completion**: ending the step before it is genuinely done, attention slipping to _being done_. The visible steps still ahead (the **post-completion steps**) supply the pull; the criterion's clarity is the resistance. Defend in order: **sharpen the bound first** (local and cheap); only if it is irreducibly fuzzy _and_ you observe the rush, hide the later steps by splitting the sequence. Hiding only works across a real context boundary (a hand-off or a subagent dispatch; an inline call leaves the later steps in context and clears nothing).
|
||||
- **Demand**: how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not. Demand drives **legwork** (the digging the agent does within the work, latent in the wording rather than written as its own step), and it is not step-bound: "every rule applied" binds a body of flat reference just as "every step done" binds a sequence, which is how an all-reference document still carries an exhaustiveness bar.
|
||||
|
||||
The strongest criteria are both checkable and exhaustive.
|
||||
|
||||
## When to split
|
||||
|
||||
Splitting one document into two spends one of the two loads, so split only when the cut earns it:
|
||||
|
||||
- **By sequence**: split a run of steps where the post-completion steps tempt the agent to rush the one in front of it. Keeping them out of view drives more legwork on the current task. Beware the reverse: merging sequences exposes each step's later steps to what follows, inviting premature completion.
|
||||
- **By invocation**, skill-specific: see [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md).
|
||||
|
||||
## Leading words
|
||||
|
||||
A **leading word** is a compact concept already living in the model's pretraining that the agent thinks with while running the document (_lesson_, _fog of war_, _tracer bullets_). Repeated as a token, never as a sentence, it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds. Coining your own works if you define it clearly, but a made-up word recruits no priors: you pay in definition tokens what a pretrained word gives free; reach for an existing word first.
|
||||
|
||||
It anchors twice. In the body, _execution_: the agent reaches for the same behaviour every time the word appears, and inside flat reference it focuses attention on a class of thing to look for. In a pointer, _invocation_: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the material and reaches it more reliably.
|
||||
|
||||
Hunt for opportunities to refactor with leading words. A triad spelled out at three sites, a pointer spending a sentence to gesture at one idea. Each is a passage begging to collapse into a single token:
|
||||
|
||||
- "fast, deterministic, low-overhead" → _tight_ (a _tight_ loop).
|
||||
- "a loop you believe in" → _red_, turning a fuzzy gate into a binary observable state (the loop goes _red_ on the bug, or it doesn't).
|
||||
|
||||
You win twice: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every document is carrying restatements that leading words retire. Go find them.
|
||||
|
||||
**Negation** is the failure mode beside this lever: steering by prohibition drags the forbidden behaviour into context and makes it _more_ available, not less. _Don't think of an elephant_, and the elephant is all there is; the negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Prompt the **positive**: state the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.
|
||||
|
||||
## Pruning
|
||||
|
||||
- Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit. **Duplication** (the same meaning in more than one place) costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank. (The accidental inverse of a leading word, which repeats a token on purpose, never the meaning.)
|
||||
- The **environment** is a source of truth too (`package.json` scripts, config files, the directory layout, `--help` output), and a document that restates it is a **cache**: a copy of a lookup, earning its load only when the lookup is expensive. Cache what the agent cannot find by looking: the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave the one-file, one-command lookups to the environment, where they cannot go stale.
|
||||
- Check every line for **relevance**: does it still bear on what the document does? A line loses relevance by never bearing on the task (mere exposition, or a branch that should be disclosed) or by going stale as the behaviour or world it describes changes. Shorter documents are easier to keep relevant. Without a pruning discipline the default fate is **sediment**: stale layers that settle because adding feels safe and removing feels risky, until you must core down through them to find what is still live.
|
||||
- Hunt **no-ops** sentence by sentence: an instruction the model already obeys by default pays load to say nothing. The test (does it change behaviour versus the default?) is model-relative, not reader-relative: two people disagreeing about a no-op disagree about the default, and settle it by running the document, not by debate. When a sentence fails, delete the whole sentence rather than trim words from it. The test also grades leading words: a word too weak to beat the default (_be thorough_ when the agent is already thorough-ish) is a no-op, and the fix is a stronger word (_relentless_), not a different technique.
|
||||
@@ -1,161 +0,0 @@
|
||||
# Glossary — Skill Craft
|
||||
|
||||
This glossary defines the checks for [`craft-skill`](SKILL.md).
|
||||
Each term is a lever on **predictability**.
|
||||
|
||||
## Predictability
|
||||
|
||||
The degree to which a skill makes the agent follow the same process on every run.
|
||||
Predictability does not require identical output.
|
||||
A brainstorming skill can predictably produce different ideas.
|
||||
|
||||
## Invocation
|
||||
|
||||
How the agent or operator reaches a skill.
|
||||
Invocation controls who pays the load for discovery.
|
||||
|
||||
### Model-invoked
|
||||
|
||||
A skill that the harness exposes to the agent's available-skills list.
|
||||
The agent can load it without an explicit operator command.
|
||||
Use model invocation when the agent must discover the skill on its own.
|
||||
|
||||
### User-invoked
|
||||
|
||||
A skill that the operator runs deliberately through the harness invocation mechanism.
|
||||
Use user invocation when human judgment decides when the skill applies.
|
||||
For Pi, keep the required description and add `disable-model-invocation: true`.
|
||||
|
||||
### Description
|
||||
|
||||
Required metadata that states what the skill does and when to use it.
|
||||
For model-invoked skills, the description carries the trigger condition.
|
||||
For user-invoked skills, the description remains valid metadata.
|
||||
|
||||
### Context pointer
|
||||
|
||||
A short reference that tells the agent when to load out-of-context material.
|
||||
The pointer's wording controls whether the agent reaches the target.
|
||||
Fix weak wording before moving the target inline.
|
||||
The description is the top-level context pointer for a model-invoked skill.
|
||||
A link to a sibling reference file is a lower-level context pointer.
|
||||
|
||||
### Context load
|
||||
|
||||
The permanent attention cost of model-invoked skill descriptions.
|
||||
More discoverable skills create more context load.
|
||||
Use context load to decide whether a skill needs model invocation.
|
||||
|
||||
### Cognitive load
|
||||
|
||||
The memory cost that user-invoked skills place on the operator.
|
||||
More user-invoked skills make the operator remember more names and uses.
|
||||
Use cognitive load to decide whether a skill needs discoverability.
|
||||
|
||||
## Information hierarchy
|
||||
|
||||
How a skill ranks information by the moment the agent needs it.
|
||||
Keep the active procedure above supporting reference.
|
||||
Move branch-specific or large reference behind context pointers.
|
||||
|
||||
### Steps
|
||||
|
||||
Ordered actions that the agent performs.
|
||||
Put steps in `SKILL.md` when the skill has an active procedure.
|
||||
End each step with a completion criterion.
|
||||
|
||||
### Reference
|
||||
|
||||
Material that the agent consults while following steps.
|
||||
Keep short reference near the step that needs it.
|
||||
Move large or branch-specific reference to sibling files.
|
||||
|
||||
### External reference
|
||||
|
||||
Authoritative material that lives outside the skill directory.
|
||||
Point to external reference instead of duplicating project policy.
|
||||
Use it when another file owns the meaning.
|
||||
|
||||
### Progressive disclosure
|
||||
|
||||
Moving reference out of `SKILL.md` and behind a precise context pointer.
|
||||
Use progressive disclosure to protect the skill's active procedure.
|
||||
Keep must-read material inline when a pointer would miss too often.
|
||||
|
||||
### Co-location
|
||||
|
||||
Keeping a concept's rules, caveats, and examples near one another.
|
||||
Use co-location so one read gives the agent the complete local meaning.
|
||||
Do not scatter one concept across unrelated sections.
|
||||
|
||||
## Steering
|
||||
|
||||
How a skill shapes the agent's runtime behavior.
|
||||
Steering turns a document into a repeatable process.
|
||||
|
||||
### Branch
|
||||
|
||||
A distinct path through a skill.
|
||||
A branch handles a case that does not run the same steps as other cases.
|
||||
Do not call ordinary checklist items branches.
|
||||
|
||||
### Leading word
|
||||
|
||||
A compact term that anchors a repeated behavior.
|
||||
Prefer words already used by prompts, docs, or code.
|
||||
Repeat the word, not the full explanation.
|
||||
|
||||
### Completion criterion
|
||||
|
||||
The condition that tells the agent a step is complete.
|
||||
A strong completion criterion is checkable and demanding.
|
||||
Use it to prevent early movement to the next step.
|
||||
|
||||
### Legwork
|
||||
|
||||
The work the agent performs inside a step.
|
||||
Strong completion criteria increase legwork.
|
||||
Weak criteria let the agent stop after surface-level work.
|
||||
|
||||
### Post-completion steps
|
||||
|
||||
The steps visible after the current step.
|
||||
Visible later steps can pull the agent forward too early.
|
||||
Hide later steps only when a real context boundary exists.
|
||||
|
||||
## Failure modes
|
||||
|
||||
Use these findings during audit and verification.
|
||||
Quote the offending passage when a finding applies.
|
||||
|
||||
### Premature completion
|
||||
|
||||
A step ends before its necessary work is complete.
|
||||
This usually comes from a vague completion criterion.
|
||||
Fix the local criterion before splitting the skill.
|
||||
|
||||
### Duplication
|
||||
|
||||
One meaning has more than one authoritative expression.
|
||||
Duplication increases maintenance cost and false emphasis.
|
||||
Replace duplicates with one source and pointers to it.
|
||||
|
||||
### Sediment
|
||||
|
||||
Old content remains after the skill's behavior changes.
|
||||
Sediment makes the agent attend to stale instructions.
|
||||
Remove lines that no longer affect the skill's current behavior.
|
||||
|
||||
### Sprawl
|
||||
|
||||
`SKILL.md` contains too much live material.
|
||||
Sprawl hides the active procedure among supporting details.
|
||||
Move reference down the information hierarchy.
|
||||
|
||||
### No-op
|
||||
|
||||
An instruction does not change the agent's default behavior.
|
||||
No-op instructions spend attention without adding control.
|
||||
Judge no-op instructions against behavior, not style.
|
||||
Delete a no-op sentence instead of shortening it.
|
||||
Cut no-op sentences unless they anchor a target-project convention.
|
||||
@@ -1,116 +0,0 @@
|
||||
---
|
||||
name: craft-skill
|
||||
description: Draft or audit an Agent Skill for structural predictability. Run deliberately as /skill:craft-skill when creating or improving a skill.
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
# craft-skill
|
||||
|
||||
Draft or audit an Agent Skill.
|
||||
Judge the skill against one bar: **predictability**.
|
||||
Predictability means the agent follows the same process on every run.
|
||||
|
||||
Read [`GLOSSARY.md`](GLOSSARY.md) before applying glossary terms.
|
||||
Use this skill for skill structure, not general prose review.
|
||||
Apply project writing rules when the target project defines them.
|
||||
|
||||
## Choose the branch
|
||||
|
||||
Use **Draft** when creating a new skill source.
|
||||
Use **Audit** when reviewing an existing skill in its authoritative source.
|
||||
|
||||
Finish when one branch matches the user's requested change.
|
||||
|
||||
## Draft
|
||||
|
||||
1. Resolve the destination.
|
||||
Read the target project's instructions and skill-source conventions.
|
||||
Prefer an existing source directory over a new convention.
|
||||
Trace symlinks and generated placements to their source.
|
||||
Ask the user when multiple writable sources remain plausible.
|
||||
|
||||
Finish when the destination is writable and authoritative.
|
||||
|
||||
2. Create the skill structure.
|
||||
Create a directory whose name matches the skill name.
|
||||
Add `SKILL.md` with valid Agent Skills frontmatter.
|
||||
Add `disable-model-invocation: true` only for Pi user-invoked skills.
|
||||
Add sibling files only when they protect the **information hierarchy**.
|
||||
|
||||
Finish when the file layout matches the target harness and project.
|
||||
|
||||
3. Write the skill body.
|
||||
Put active **steps** in `SKILL.md`.
|
||||
Keep shared **reference** near the steps that need it.
|
||||
Move large or branch-specific reference behind precise **context pointers**.
|
||||
Front-load the **leading word** in descriptions and other context pointers.
|
||||
Write pointer text for the condition that loads the target.
|
||||
Give each step a checkable **completion criterion**.
|
||||
Cut sentences that do not change agent behavior.
|
||||
Use relative paths for all skill-local references.
|
||||
|
||||
Finish when each branch has ordered steps, resolved references, and checkable completion criteria.
|
||||
|
||||
## Audit
|
||||
|
||||
1. Locate the authoritative source.
|
||||
Read the target project's instructions and skill-source conventions.
|
||||
Inspect enabled-skill directories only to find the source.
|
||||
Do not edit symlinks, generated files, installed packages, or vendored copies.
|
||||
Ask the user when multiple sources claim the same skill.
|
||||
|
||||
Finish when you have identified the authoritative source.
|
||||
|
||||
2. Read the skill surface.
|
||||
Read `SKILL.md` and every disclosed file.
|
||||
Read project documents that the skill treats as authoritative.
|
||||
Record which file owns each meaning before judging duplication.
|
||||
|
||||
Finish when all referenced behavior is visible.
|
||||
|
||||
3. Apply the checklist.
|
||||
Quote each passage that fails a glossary check.
|
||||
Check **invocation** against the intended harness.
|
||||
Check **context pointers** for weak trigger wording.
|
||||
Check **information hierarchy** for buried steps or disclosed required material.
|
||||
Check **completion criteria** for vague or weak stopping points.
|
||||
Check **leading words** for repeated explanations they can replace.
|
||||
Check **pruning** for sentences that explain default model behavior.
|
||||
Check **duplication**, **sediment**, **sprawl**, and **no-op** instructions.
|
||||
|
||||
Finish when every finding has quoted evidence or no finding remains.
|
||||
|
||||
4. Report or fix findings.
|
||||
Report findings by default.
|
||||
Fix findings only when the user requests edits.
|
||||
Preserve behavior that passes the checklist.
|
||||
Change only structural skill problems unless the user expands the scope.
|
||||
|
||||
Finish when you have reported each finding or fixed each requested finding.
|
||||
|
||||
## Verify
|
||||
|
||||
1. Run deterministic checks.
|
||||
Verify required frontmatter exists.
|
||||
Verify the name is portable and matches the directory.
|
||||
Verify the description is specific and under 1024 characters.
|
||||
Verify every skill-local reference resolves with a relative path.
|
||||
Verify context pointers name when to load referenced material.
|
||||
Verify disclosed files exist.
|
||||
Verify each retained sentence changes behavior or records target-project policy.
|
||||
Verify no stale harness-specific assumption remains.
|
||||
|
||||
Finish when each check passes or the final report names checks that could not run.
|
||||
|
||||
2. Re-read against the glossary.
|
||||
Re-check **invocation**, **information hierarchy**, and **completion criteria**.
|
||||
Re-check **duplication**, **sediment**, **sprawl**, and **no-op** instructions.
|
||||
Fix any new structural finding.
|
||||
|
||||
Finish when no unresolved structural finding remains.
|
||||
|
||||
3. Report the result.
|
||||
List every changed path.
|
||||
State whether you enabled the skill or only authored it.
|
||||
|
||||
Finish when the user can review the exact files changed.
|
||||
@@ -1,88 +0,0 @@
|
||||
---
|
||||
name: grill
|
||||
description: Stress-test a plan, decision, or design through a one-question-at-a-time interview. Use when the user asks to grill, stress-test, pressure-test, challenge, interrogate, or poke holes in a plan.
|
||||
---
|
||||
|
||||
# grill
|
||||
|
||||
Interview the user until the session has no open or blocked questions.
|
||||
Open questions define the ending condition for the grill session.
|
||||
Blocked questions track known decisions with unsettled prerequisites.
|
||||
|
||||
Do not begin implementation during or after grill without an explicit user instruction.
|
||||
A completed grill summary is not an instruction to build.
|
||||
|
||||
## Run the interview
|
||||
|
||||
1. Prepare the grill.
|
||||
Read the conversation, files, and docs that can settle facts or reveal constraints.
|
||||
Resolve factual questions yourself when tools can answer them.
|
||||
Do not ask the user for facts you can find.
|
||||
Build the required-question set from the known plan or idea.
|
||||
Put ready questions under `Open questions:`.
|
||||
Put known questions with unsettled prerequisites under `Blocked questions:`.
|
||||
|
||||
Finish when both sections contain every known required question.
|
||||
|
||||
2. Start the interview.
|
||||
Show `Open questions:` and `Blocked questions:` in short form.
|
||||
Include titles only, not full question bodies.
|
||||
Use Markdown list items in both sections.
|
||||
Mark each initial item with `- [ ]`.
|
||||
Ask exactly one numbered question in the same turn.
|
||||
The question title must match an item under `Open questions:`.
|
||||
|
||||
Finish when the interview has started with exactly one numbered question.
|
||||
|
||||
3. Process the answer.
|
||||
Account for the user's answer before asking another question.
|
||||
Resolve, update, remove, unblock, or add questions as the answer requires.
|
||||
Use `- [ ]` for unchanged unresolved questions.
|
||||
Use `- [+]` for questions added by the latest answer.
|
||||
Use `- [u]` for questions updated by the latest answer.
|
||||
Use `- [x]` for questions resolved by the latest answer.
|
||||
Use `- [-]` for questions removed by the latest answer.
|
||||
Include a cause note for each `- [+]`, `- [u]`, and `- [-]` change.
|
||||
Indent cause notes by two spaces under the changed question.
|
||||
Show `- [+]`, `- [u]`, `- [x]`, and `- [-]` for one turn only.
|
||||
After that turn, keep an updated question visible as `- [ ]`.
|
||||
After that turn, remove resolved and removed questions from the visible list.
|
||||
Move unblocked questions from `Blocked questions:` to `Open questions:` with `- [u]`.
|
||||
Do not use `- [+]` for unblocked questions because they are not new.
|
||||
Add questions only when the latest answer directly causes them.
|
||||
When the user extends scope instead of answering, account for the new question before pursuing it.
|
||||
Do not add optional follow-up questions to either section.
|
||||
Put optional follow-up questions in the final summary instead.
|
||||
Resolve newly answerable facts yourself.
|
||||
|
||||
Finish when every list change has an explicit marker and required cause note.
|
||||
|
||||
4. Ask the next question.
|
||||
Show `Open questions:` and `Blocked questions:` on every active grill turn.
|
||||
Keep `- [ ]` items visible every turn.
|
||||
Preserve agent judgment when the user reframes or invalidates a question.
|
||||
Show the resulting list change instead of following a rigid reframe algorithm.
|
||||
If the user catches incorrect accounting, briefly explain the error.
|
||||
Then show the corrected question sections.
|
||||
Ask exactly one numbered question when `Open questions:` contains an unresolved item.
|
||||
The question title must match an item currently shown under `Open questions:`.
|
||||
Give concrete options with trade-offs.
|
||||
Label options with `A.`, `B.`, `C.`, and later letters.
|
||||
Use the same labels in the recommendation.
|
||||
Give a recommendation and rationale.
|
||||
Probe vague words, overloaded terms, and hidden assumptions.
|
||||
Use concrete scenarios to test concept boundaries and edge cases.
|
||||
When code contradicts the user's claim, quote both the claim and the code behavior.
|
||||
If the turn includes a correction, file edit, apology, or explanation, still end with the next numbered question.
|
||||
|
||||
Finish when the turn ends with the next numbered question.
|
||||
|
||||
5. Close or pause.
|
||||
Close when `Open questions:` and `Blocked questions:` are empty.
|
||||
Output a concise summary of every decision reached.
|
||||
Include optional follow-up questions that were not added to either section.
|
||||
Do not act on the summary unless the user gives a new implementation instruction.
|
||||
If the user changes tasks, state that grill is paused.
|
||||
End the turn with the final decision summary or the pause statement.
|
||||
|
||||
Finish when the summary is delivered or grill is explicitly paused.
|
||||
@@ -1,62 +0,0 @@
|
||||
# Document Format
|
||||
|
||||
## Template
|
||||
|
||||
```md
|
||||
## Problem Statement
|
||||
|
||||
The problem that the user is facing, from the user's perspective.
|
||||
|
||||
## Solution
|
||||
|
||||
The solution to the problem, from the user's perspective.
|
||||
|
||||
## User Stories
|
||||
|
||||
An extensive, numbered list of user stories, covering all aspects of the feature. Each user story should be in the format of:
|
||||
|
||||
1. As an <actor>, I want a <feature>, so that <benefit>
|
||||
|
||||
<user-story-example>
|
||||
1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
|
||||
</user-story-example>
|
||||
|
||||
## Implementation Decisions
|
||||
|
||||
A list of implementation decisions that were made. This can include:
|
||||
|
||||
- The modules that will be built/modified
|
||||
- The interfaces of those modules that will be modified
|
||||
- Technical clarifications from the developer
|
||||
- Architectural decisions
|
||||
- Schema changes
|
||||
- API contracts
|
||||
- Specific interactions
|
||||
|
||||
## Testing Decisions
|
||||
|
||||
A list of testing decisions that were made. Include:
|
||||
|
||||
- A description of what makes a good test (only test external behavior, not implementation details)
|
||||
- Which modules will be tested
|
||||
- Prior art for the tests, that is, similar tests in the codebase
|
||||
|
||||
## Out of Scope
|
||||
|
||||
A description of the things that are out of scope for this spec.
|
||||
|
||||
## Further Notes
|
||||
|
||||
Any further notes about the feature.
|
||||
```
|
||||
|
||||
## Rules
|
||||
|
||||
- **Do not include specific file paths or code snippets.**
|
||||
They can become outdated quickly.
|
||||
Exception: include a prototype snippet when it records a decision more precisely than prose.
|
||||
Examples include a state machine, reducer, schema, or type shape.
|
||||
Inline the snippet in the relevant implementation decision.
|
||||
Note briefly that the snippet came from a prototype.
|
||||
Trim the snippet to the decision-rich parts.
|
||||
Do not include a working demo.
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
name: to-document
|
||||
description: Draft a requested summary, specification, plan, decision record, or similar document from conversation and repository context.
|
||||
---
|
||||
|
||||
Do not start with an interview when the conversation gives a usable subject.
|
||||
Ask before drafting only when the conversation lacks a usable subject.
|
||||
|
||||
Do not put draft contents in the chat response.
|
||||
Always persist the draft to a file.
|
||||
|
||||
Do not implement the draft contents unless the operator gives a separate instruction.
|
||||
Treat a completed draft as documentation, not an instruction to build.
|
||||
|
||||
## Process
|
||||
|
||||
1. Identify the subject.
|
||||
Use the conversation as the primary source.
|
||||
If the conversation lacks a usable subject, ask what the document is about.
|
||||
Do not ask clarifying questions before drafting when a usable subject exists.
|
||||
|
||||
Finish when you have a subject or a question that requests the missing subject.
|
||||
|
||||
2. Gather repository facts that the draft needs.
|
||||
Inspect files when repository details matter.
|
||||
Do not invent modules, paths, commands, flows, contracts, or conventions.
|
||||
Distinguish confirmed facts from assumptions.
|
||||
|
||||
Finish when each repository-specific claim has support or an explicit assumption marker.
|
||||
|
||||
3. Choose the document shape.
|
||||
Infer the document type and title from context.
|
||||
Load [DOCUMENT-FORMAT.md](DOCUMENT-FORMAT.md) when the operator requests no specific format.
|
||||
Adapt the structure only when the requested document type needs different sections.
|
||||
Preserve useful sections for decisions, testing, scope, and notes.
|
||||
|
||||
Finish when the draft has a title and section plan that fit the requested document.
|
||||
|
||||
4. Write the draft.
|
||||
Capture known context accurately.
|
||||
Mark assumptions and gaps explicitly.
|
||||
Include decisions that the conversation settled.
|
||||
Include open questions only as gaps, not as an interview.
|
||||
Keep the document focused on the operator's problem and intended use.
|
||||
|
||||
Finish when the draft contains the relevant facts, decisions, assumptions, gaps, and scope.
|
||||
|
||||
5. Persist the draft.
|
||||
Use `docs/00 INBOX/ai` as the default destination.
|
||||
Use the operator's requested path when one exists.
|
||||
Derive a kebab-case slug from the inferred title.
|
||||
Create the destination directory when it does not exist.
|
||||
If the target file exists, summarize the expected change.
|
||||
Confirm before overwriting an existing file.
|
||||
Do not print the draft in chat instead of writing it.
|
||||
|
||||
Finish when the draft is written or overwrite confirmation is pending.
|
||||
|
||||
6. Finish with the result.
|
||||
Report the written path.
|
||||
Do not include the draft contents in the response.
|
||||
Do not continue into implementation without an explicit instruction.
|
||||
|
||||
Finish when the operator can find the written draft.
|
||||
Reference in New Issue
Block a user