agent-instructions

Write and maintain instruction files so each rule met when the agent applies it.

579|76|Updated Oct 29, 2026
Ready to run
npx skills add https://github.com/phuryn/product-engineering --skill agent-instructions-phuryn
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: agent-instructions
Source: https://github.com/phuryn/product-engineering/tree/main/agent-harness/skills/agent-instructions
Command: npx skills add https://github.com/phuryn/product-engineering --skill agent-instructions-phuryn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Agents operate on instruction files loaded into every session, but prose rules decay without a structure that routes the agent to the right file at the decisive moment. This Skill eliminates the pattern where rules are written but never followed: it builds instruction files that route to operative files keyed by the task at hand, so rules are met when they apply. ## Core Features & Use Cases - Progressive Disclosure via Router: A three-column table keys tasks by user words and routes to the operative files that hold depth, so a rule not read is not missed. - Prose vs. Code Decision: Separates rules that depend on memory at the decisive moment (which become code paths—tests, scripts, validators) from judgement principles that live as brief routing prose. - Word Budgets and Reachability Checks: Every instruction file has a word budget enforced by check_budgets.py, and check_reachable.py lists docs no chain from the entry file reaches, so rules stay discoverable. - Use Case: A SaaS repository using agents runs a release ceremony without reading the release gate rules because status overwhelmed the entry file, and a production migration shipped without dry-run. This Skill rebuilds the file with status moved to docs, a router row keyed by "releasing" that opens the gate procedure, and a check_reachable.py run in CI. ## Quick Start Ask the agent: write or restructure the AGENTS.md entry file by copying the skeleton from this Skill's references/agents-md-skeleton.md, adapt its two sections, populate a router keyed by task moments, and run the reachability and budget checks to confirm every doc is routed and every file stays within its word budget.

Frequently Asked Questions about agent-instructions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an AGENTS.md file so agents actually follow the rules?▼

Use two sections: Section 1 holds reusable building mechanics (ownership, testing, a router table); Section 2 holds product choices (what it is, users, shape, constraints). The router is a three-column table keyed by task moments ("when you are pushing a branch that deploys") that opens operative files. Agents read the router at task start and open every matching row's files before acting.

What is the difference between router rows and always-on rules?▼

Router rows fire when a task matches their moment; agents reread them at every new task. Always-on rules fire after task classification, need no trigger, and must be capped (ten bullets worked) because a long always-on list becomes a manual.

When should a rule become code instead of prose?▼

Ask whether compliance depends on the agent holding the sentence in working memory at the decisive moment. If yes, prose will lose to competing information, and the rule belongs in code: a required argument, a script, a validation that runs, or a test that fails if the rule is broken.

How do I keep instruction files from growing into unreadable manuals?▼

Assign each file a word budget (copy `check_budgets.py` to your repo and track budgets in `budgets.json`), run the check in your test gate, and apply "one in, one out": every new rule replaces or tightens an existing one. At release, move status and narrative out to docs, retire obsolete rules, and move depth that only one task needs to that task's operative file.

How do I know whether a doc is actually reachable from the entry file?▼

Run `check_reachable.py` from this Skill: it walks the chain starting at AGENTS.md or CLAUDE.md, follows every markdown link and `@import`, and lists files in your scope (docs/, knowledge/) that no chain reaches. Fix each orphan by routing it from the right operative file or a router row.

What happens when a mistake occurs because the entry file missed a rule?▼

Fix it in the moment with a receipt: the date and what went wrong. Add the rule with its receipt so it carries its reason. Then ask whether a router row should have fired (and add it), or whether the rule depends on memory and belongs in code instead of prose.