Leading Words

Time: 12 minutes. Tangible win: retire one restated phrase in a real skill of yours with a single leading word.

Ian, you described these repos as skills that "use words to guide the LLM". The sharpest form of that has a name: the leading word. Both repos lean on it. Matt Pocock names it explicitly; pstack uses the same move without the label. This lesson shows you where, then has you do it once on your own skill.

Primary source writing-for-agents (section "Leading words") — Matt Pocock. Read that one section; about 3 minutes.

The idea

A leading word is a compact concept the model already learned in pretraining, which the agent then thinks with while running your document. You repeat it as a token, never as a sentence, and it recruits the model's existing knowledge instead of you spelling it out (source).

It works in two places:

WhereJobEffect
In the bodyExecutionThe agent reaches for the same behaviour each time the word appears
In a pointer (description)InvocationA word shared with your prompts and docs makes the agent reach the skill more reliably

See it in Matt's repo

The guide's own example: "fast, deterministic, low-overhead" collapses to tight. In diagnosing-bugs, the whole skill hangs on that word and on red:

A 30-second flaky loop is barely better than no loop;
a 2-second deterministic one is tight, a debugging superpower.

Red turns a fuzzy gate ("a loop you believe in") into a binary state: the loop goes red on this bug, or it does not. The completion criterion then requires a loop that is "red-capable", so the agent cannot skip ahead.

See it in pstack

pstack's poteto-mode router lists 24 principle skills, each named as a short phrase: Subtract Before You Add, Build the Lever, Attack the Premise, Prove It Works. Each leaf is one page, for example principle-subtract-before-you-add. The router tells the agent to "name each principle that shaped a decision", so the phrase becomes shared vocabulary between you, the agent, and the PR.

My reading of the difference: Matt prefers single pretrained words (tight, red); pstack prefers short imperative phrases that work as names. Both repeat a stable token so the behaviour is recalled, not re-explained. This is my observation from the files, not a claim either author makes.

Three ways it goes wrong

Coined words: a made-up word recruits no priors, so you pay for it in definition tokens. Reach for an existing word first. Weak words: "be thorough" when the agent is already thorough is a no-op; the fix is a stronger word, not another technique. Negation: "don't think of an elephant" makes the elephant more available. State the target behaviour instead. All three are from the same source.

Retrieval check

Try to answer before you scroll back up.

A skill says the loop must be quick, stable, and unattended. Which rewrite uses a leading word?

Yes. Tight is the guide's own example: one pretrained word standing in for the whole triad.

Not that one. The triad version restates the idea at length; "robust" is a generic quality word with no specific region of behaviour behind it, closer to a no-op. Tight is the leading word.

Which line prompts the positive instead of leaning on negation?

Right. The target behaviour is stated, so the banned behaviour is never put in context.

Both other lines name the thing you want to avoid. Per the guide, that drags the forbidden behaviour into context. State what to do instead.

Practice: on your own skill

The guide says to assume every document carries restatements that leading words retire, and to go find them. Do that on one of yours.

  1. Pick a skill you wrote in ~/.kiro/skills/ (for example write-a-skill or tdd).
  2. Find one triad ("x, y, and z") or one sentence that gestures at an idea a single word could carry.
  3. Replace it with an existing word. Check it is not a coined word and not a no-op.
  4. Run the skill once on a real task. Matt's guide settles disputes by running the document, not by debating it.
  5. Tell me the before, the after, and whether behaviour changed. I will write it up as your first learning record.
Ask me: "Is blast radius in pstack a leading word or a coined one?" or paste your before/after and ask whether the new word beats the default.