Community생산성 & 협업github.com

intent-first-instructions

Writing intent-first instructions for AI agents. Use when creating, refactoring, or auditing skills, AGENTS.md, CLAUDE.md, coding standards, workflow docs, or agent briefs.

intent-first-instructions란 무엇인가요?

intent-first-instructions is a Claude Code agent skill that writing intent-first instructions for AI agents. Use when creating, refactoring, or auditing skills, AGENTS.md, CLAUDE.md, coding standards, workflow docs, or agent briefs.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Dankosik/intent-first-instructions/tree/HEAD

Installed? Explore more 생산성 & 협업 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Intent-First Instructions

Reference for designing, writing, and auditing any document an AI agent consumes: a skill, an AGENTS.md / CLAUDE.md, coding standards, a workflow playbook, or a subagent brief. The packaging differs; the engineering levers do not.

  • Packaging or restructuring a skill (frontmatter, model- vs user-invocation, splitting by invocation, router skills): read references/skill-mechanics.md.
  • Refactoring or auditing an existing instruction set (choreography-to-intent rewrites, 4-layer repo docs split, audit criteria): read references/refactoring-and-audits.md.

Intent over choreography

Strong models perform best when instructions define the intent, the quality bar, and the real guardrails, leaving the path to the model. Micromanaging how the model thinks, researches, counts options, paces questions, or formats reasoning narrows exploration and ages poorly as models improve.

Split every candidate rule using the guardrail vs choreography test:

  • Keep strict guardrails when breaking the rule causes real damage or violates an external boundary: security, data loss, secret handling, production safety, hardware limits, wire contracts, repo write policies, or deterministic tool quirks (for example, git stash leaking across worktrees).
  • Replace choreography with intent whenever a rule scripts cognitive work: exact research checklists ("check A, then B, then C"), arbitrary counts ("compare 2-3 options", "3-8 line walkthrough", "ask 1-3 questions per turn"), forced output tags, or rigid step-by-step micro-loops. State what a strong result looks like and let the model choose the best path to get there.

For solved engineering problems (parsers, batch writers, codecs, sandboxes, protocols), express ambition directly: expect the agent to investigate prior art, ready solutions, and mature production designs before writing code, without dictating the exact search route.

Context pointers and the two loads

Every document and pointer spends one of two budgets:

  • Context load: always-loaded material sitting in the agent's window every turn (AGENTS.md lines, model-invoked skill descriptions). It costs tokens and attention whether or not it fires.
  • Cognitive load: what the human must remember exists and when to invoke it. Spend cognitive load where human judgment matters; remove it where it does not.

A context pointer names out-of-context material and states the condition for reaching it. A skill description and an AGENTS.md routing row are the same object. Pointer wording, not the target file, controls invocation reliability. When a must-have doc is skipped, sharpen the pointer first; inline the content only if sharpening fails.

Prune always-loaded pointers harder than bodies:

  • Front-load the leading word where triggering happens.
  • One trigger per distinct branch. Collapse synonyms that rename the same case.
  • Cut identity the body already carries.

Information hierarchy and progressive disclosure

Documents combine two content types: steps (ordered actions) and reference (rules, boundaries, facts consulted on demand). Place every piece on the information hierarchy:

  1. In-file step: what every run must perform, in order.
  2. In-file reference: flat peer rules or facts consulted on demand (a flat list of peer rules is fine, not a smell).
  3. Disclosed reference: moved to a separate file behind a context pointer and loaded only when that branch fires.

Progressive disclosure protects the hierarchy, not just token count. Inline what every branch needs; push branch-specific reference behind a pointer. Keep a concept's rule, rationale, and caveats co-located under one heading so reading one part brings its neighbors with it. When a document grows into sprawl, attention thins even if every line is unique: disclose reference behind pointers and split by branch or sequence.

Completion criteria: clarity and demand

Procedural documents and briefs need checkable completion criteria ("Done when") that distinguish finished from unfinished work. Two levers make a criterion work:

  • Clarity: a vague bound ("understanding reached") invites premature completion, where visible later steps pull the model to rush the current one. Sharpen the bound into an observable check first; split steps across a fresh context boundary (handoff or fresh subagent) only when an irreducibly fuzzy step still gets rushed.
  • Demand: high-demand outcomes drive legwork without scripting it. "Every modified invariant fails a test when broken" or "grounded in proven prior art and verified against live manifests" pulls deeper work than a rigid checklist.

The strongest criteria are binary, observable, and exhaustive.

Leading words and positive framing

A leading word is a compact, established concept already strong in pretraining (deep module, idempotent, falsifiable, expand-and-contract, tight, red). One precise token recruits an entire mental model for free; spelling out textbook explanations burns attention. Repeat the exact leading word across pointers, docs, and prompts so shared vocabulary anchors invocation and execution.

Steer toward the positive target. Bare prohibitions ("don't write shallow wrappers") activate the forbidden concept in context. State what to build instead ("hide mechanics behind deep modules"). Reserve prohibitions for hard guardrails that cannot be phrased positively, and pair each ban with the target pattern (Instead of X -> Y).

Genre separation and mechanical-first ratchets

Keep distinct concerns in separate single-owner files so each stays short and attracts the right reader at the right time:

  • Code and design craft: timeless judgment calls, types, module boundaries, contracts, testability.
  • Architecture and placement maps: where things live in a specific repo, inviolable dependency walls, live check commands.
  • Operational workflow: agent authority, review gates, workstation/CI budgets, Git and release hygiene.
  • Scope filter: what to build now versus defer to measurable triggers.

Apply a mechanical-first ratchet: anything deterministic (formatting, banned APIs, import boundaries, broken links, schema drift) belongs in a linter, type system, or CI check. Reserve Markdown for engineering judgment, unwritten conventions, and context pointers.

Pruning

  • Single source of truth: every rule or fact has one owner; link everywhere else instead of restating.
  • Environment as truth: never mirror fast local lookups (package.json, Cargo.toml, justfile, lint configs, --help) in Markdown. Document only what inspection cannot reveal: unwritten conventions, boundary invariants, and non-obvious gotchas.
  • No sediment: delete or replace stale lines in place; old layers dilute attention on what is live.
  • Model-relative no-op pruning: test each sentence against what a strong model already does by default. If a sentence does not shift behavior past default, delete the whole sentence rather than trimming words. Upgrade weak leading words ("be thorough") to sharper ones ("falsifiable", "exhaustive") instead of adding more prose.

Done when

  • Every retained constraint is either a real guardrail (safety, external boundary, tool quirk) or an intent/quality bar, with cognitive choreography removed.
  • Always-loaded pointers carry front-loaded leading words and one trigger per distinct branch; branch-only material sits behind progressive disclosure.
  • Deterministic checks live in linters/CI, environment facts stay in code/configs, and every sentence passes the model-relative no-op test.

관련 스킬