design-rules

design-rules is an agent for coding agents from jmagly/aiwg. It costs 0 tokens per session (590 once invoked), scanned A, original, MIT.

A short set of ten rules for designing coding agents. It covers focused responsibilities, limited tools, clear inputs and outputs, checking assumptions before actions, and recovering from failures.

In plain words
What is it for?
Use it to design or review agents, define their scope and interfaces, verify state before changes, handle uncertainty, and build retry or escalation steps.
Why use it?
It helps prevent agents from taking unclear actions, using unnecessary tools, or silently making up missing information. The rules make agent behavior easier to inspect and correct.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/jmagly/aiwg/design-rules
Clone the repo
git clone --depth 1 https://github.com/jmagly/aiwg

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for design-rules

README.md
[![agentmods](https://agentmods.dev/badge/agents/jmagly/aiwg/design-rules.svg)](https://agentmods.dev/agents/jmagly/aiwg/design-rules)
Your own site
<a href="https://agentmods.dev/agents/jmagly/aiwg/design-rules"><img src="https://agentmods.dev/badge/agents/jmagly/aiwg/design-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00590
Opus 5 $0.00000 $0.00295
Sonnet 5 $0.00000 $0.00118
Haiku 4.5 $0.00000 $0.00059

Measured 4d ago against content hash b9fdbfb708ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

design-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agentic/code/addons/aiwg-utils/prompts/agents/design-rules.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Design Rules (Quick Reference)

Condensed 10 Golden Rules from the Agent Design Bible.

Full Reference: ~/.local/share/ai-writing-guide/docs/AGENT-DESIGN.md

The 10 Golden Rules

Rule 1: Single Responsibility

One agent = one purpose. No "and" overload.

Rule 2: Minimal Tools

0-3 tools per agent. Each tool increases decision space exponentially.

Rule 3: Explicit I/O

Define exactly what agent receives and produces.

Rule 4: Grounding Before Action

ALWAYS verify assumptions before modifying external state.

Before action:
1. List inspection tools available
2. Execute minimum inspection
3. Document confirmed state
4. Only then proceed

Rule 5: Escalate Uncertainty

NEVER silently substitute missing data. Stop and ask.

If ambiguous:
1. STOP
2. LIST potential interpretations
3. REPORT to user
4. WAIT for clarification

Rule 6: Scoped Context

Only process RELEVANT information. Ignore DISTRACTORS.

RELEVANT: Matches all scope dimensions → Process
PERIPHERAL: Matches some → If needed
DISTRACTOR: Matches none → Never use

Rule 7: Recovery-First Design

Build agents that can recover from failures.

PAUSE → DIAGNOSE → ADAPT → RETRY → ESCALATE

Rule 8: Appropriate Model Tier

Tier Use For
haiku Validation, formatting, simple transforms
sonnet Code review, testing, documentation
opus Architecture, security, complex reasoning

Rule 9: Parallel-Ready

Design for concurrent execution when tasks are independent.

Rule 10: Observable Execution

Produce traceable outputs for debugging.

Failure Archetype Prevention

Archetype Rule Prevention
1. Premature Action Rule 4 Grounding checkpoint
2. Over-Helpfulness Rule 5 Uncertainty escalation
3. Distractor Pollution Rule 6 Context scoping
4. Fragile Execution Rule 7 Recovery protocol

Quick Validation

Before deploying any agent:

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 109 lines · 0 tokens per session scan A b9fdbfb708ef

Subscribe to this mod's changes

design-rules is an agent published in the GitHub repository jmagly/aiwg (208 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 590 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

drone-acceptance

Blind acceptance gate. Receives the human's brief, the repository and a run command - never plan.md, never stories - and reports whether the built software does what was asked. Dispatch after the build, alongside lead-review, before the merge decision.

Black-coffe/vulyk · 56 tokens

worker-code

Implements exactly one story from docs/specs. The workhorse of the hive - use for all Tier 1-4 implementation. Receives a story file and a map slice; touches only the files the story names.

Black-coffe/vulyk · 48 tokens

worker-test

Writes or repairs tests for exactly one story. Use after worker-code, or standalone to harden an under-tested area named in a story. Tests behavior, not implementation details.

Black-coffe/vulyk · 38 tokens

drone-coverage

Independent coverage check at plan time. Receives ONLY brief.md and plan.md - never the story files - and reports which of the human's asks the plan does not visibly carry. Dispatch before the approval stop; after it, the check is theatre.

Black-coffe/vulyk · 55 tokens

drone-scout

Reconnaissance unit. Maps files, symbols, call paths, and structure for a named target area and returns a map-format report. Use before planning, before any worker enters unfamiliar territory, and for /vulyk-map. Cheap by design - dispatch liberally, in parallel.

Black-coffe/vulyk · 62 tokens

lead-review

Adversarial review gate before merge. Hunts for correctness bugs, security issues, broken invariants, silent scope creep, reinvention, unrecorded narrowing, invented facts, and test theater. Use after /vulyk-build completes, or on any diff the Queen does not fully trust.

Black-coffe/vulyk · 62 tokens