Authoring Standards - prototypdigital/bluetemberg-packs GitHub Wiki

Authoring Standards

The quality bar for every pack kind β€” rules, agents, skills, guardrails β€” and the cross-cutting description / triggering standard. Each principle is backed by a primary source (official vendor docs, RFCs, or peer-reviewed work), verified with the adversarial default-refute method described in Research & Sources. This page is the bar the meta-skills (create-rule, create-agent, create-skill, create-pack) enforce and that all shipped content is held to.

Legend: βœ… confirmed by a primary source Β· πŸ”Έ sound but vendor-best-practice / context-dependent.

Shared foundations

  • Always-on prose is advisory, not a guarantee. Even GPT-4 reaches only ~77% prompt-level strict accuracy on IFEval β€” roughly one instruction in four is violated. Non-negotiable invariants belong in a deterministic gate (a guardrail/hook, linter, or CI), not a prose rule. Claude Code states CLAUDE.md instructions are "advisory" whereas "hooks are deterministic". βœ…
  • The frontmatter description is the routing signal, not documentation. Only name + description are pre-loaded for model selection; the body is read only after the unit is chosen. So trigger keywords must live in the description itself. (Anthropic β€” Skill authoring best practices) βœ…
  • Claims beyond convention must be traceable to a primary source β€” see Research & Sources.
  • Tokens are a shared budget. Every always-on token competes with the task; long context degrades adherence (Lost in the Middle). Be dense and scoped.

Rules β€” always-on, passive context

Bluetemberg rules are short Markdown (frontmatter description + scope glob; body of Why / directives / BAD-GOOD / gotchas) loaded every interaction. (create-rule)

  1. Imperative and checkable. "Return early on invalid input", never "write clean code". A reviewer must be able to verify compliance from the code. Claude Code explicitly lists "self-evident practices like 'write clean code'" as content to exclude. (Anthropic β€” Be clear and direct, Claude Code best practices) βœ…
  2. Say what TO do, not only what NOT to do. Pair every prohibition with the positive replacement ("read from process.env", not just "never read .env"). (Anthropic, OpenAI) βœ…
  3. State the consequence (Why). One line on what breaks if ignored, so the model generalizes intent to cases the directives don't enumerate. πŸ”Έ
  4. Anchor with a BAD/GOOD example. Worked examples are "one of the most reliable ways to steer" output; keep them short and relevant. (Anthropic β€” Use examples, Cursor β€” Rules) βœ…
  5. Ruthless brevity β€” apply the deletion test. For every line: "would removing this cause a mistake?" If not, cut it. "Bloated CLAUDE.md files cause Claude to ignore your actual instructions." Prefer many small rules over one long one. (Claude Code, Cursor β€” <500 lines) βœ…
  6. Scope with a glob. Reserve '**' for genuinely universal rules; bind stack/area rules to their paths. (Cursor, GitHub Copilot applyTo) βœ…
  7. Hard invariants β†’ a guardrail/lint, not prose (see Shared foundations). βœ…
  8. Ration normative emphasis. Use MUST/SHOULD/MAY (RFC 2119) for requirement strength, but don't make every line "CRITICAL: YOU MUST" β€” newer models over-trigger on aggressive emphasis. πŸ”Έ

Agents β€” delegated specialist sub-agents

Bluetemberg agents are Markdown (frontmatter name + delegation description + minimal tools; body of Responsibilities / Constraints). (create-agent)

  1. Description is a delegation trigger, not a label β€” what it does and when to route to it, plus a proactive cue ("Use proactively after code changes", "MUST BE USED for X") when you want auto-delegation. (Claude Code β€” subagents) βœ…
  2. One coherent task. If responsibilities span unrelated domains or the prompt accretes if-then branches, split it. (Claude Code, OpenAI β€” Practical guide to building agents) βœ…
  3. Least-privilege tools. A read-only audit/review agent (no commands, no file edits) is Read + Grep + Glob only β€” never edit/execute. execute must be paired with edit to resolve, so a command-running agent that must not modify files (e.g. a headless gh reviewer) is the one exception: it gets edit solely for that reason and an explicit prose constraint forbidding file edits. Keep the prose constraint and the tool allowlist in lockstep (defense in depth). (Claude Code) βœ…
  4. Optimize tools for clarity and non-overlap, not count. Overlapping, vaguely-named tools confuse the agent more than a larger set of distinct ones. (Anthropic β€” Writing effective tools) βœ…
  5. Declare an objective and output/return format. A sub-agent returns a summary to the caller; vague specs cause duplicated or garbled work. (Anthropic β€” multi-agent) βœ…
  6. Layered, explicit constraints β€” what it must NOT do, where it defers, what blocks release. (Anthropic β€” Building effective agents, OpenAI) βœ…
  7. Use a sub-agent only for its real value β€” context isolation + returned summary, tool restriction, or self-contained verbose work. Keep tightly-coupled, iterative, latency-sensitive work in the main thread. Prefer extending one agent over proliferating near-duplicates. (Claude Code, Anthropic β€” start simple) βœ…/πŸ”Έ
  8. Match the model tier to the role β€” route narrow/read-only/high-volume specialists to a cheaper, faster model; reserve the largest model for reasoning-heavy roles. (Claude Code β€” Choose a model) βœ…

Skills β€” on-demand, model-invoked workflows

Bluetemberg skills are llm/skills/<name>/SKILL.md, invoked when their description matches the task. The deep-skill standard: a step-by-step ## Protocol, decision trees where a branch matters, BAD/GOOD examples, and a ## Completion checklist. (create-skill) The research refines it as follows:

  1. Description carries what + when + trigger keywords, third person, ≀1024 chars; name ≀64 chars, lowercase-hyphen, no reserved words (anthropic/claude). The body ## Triggers section does not drive auto-invocation β€” only the description does. (Anthropic β€” Skill best practices) βœ…
  2. Be concise; use progressive disclosure, not a hard line count. Keep SKILL.md focused (official ceiling ~500 lines) and push depth into bundled reference.md / examples.md / scripts/ linked one level deep, rather than inflating or artificially compressing one file. (The bluetemberg "~60–120 lines" figure is a guideline for prose density, not a cap that should force splitting a genuinely procedural skill.) (Anthropic β€” progressive disclosure) βœ…
  3. Calibrate structure to the task's degrees of freedom. Fragile, deterministic workflows (migrations, deploys) get exact steps/scripts; open-ended judgment tasks (a critique, a design review) get higher-freedom prose. Don't force an ASCII decision tree or BAD/GOOD pair into a skill where it's contrived β€” use them where they add value. (Anthropic β€” Skill best practices) πŸ”Έ
  4. Keep a completion checklist of verifiable criteria. βœ… (deep-skill standard)
  5. Gate side-effecting skills. For deploy/migrate/destructive workflows, set disable-model-invocation (require explicit invocation) and document a planβ†’validateβ†’execute flow. (Anthropic / Claude Code skills) βœ…
  6. A "When NOT to use" section to prevent over-firing. βœ…
  7. Don't restate base-model knowledge. A skill that only repeats generic best practice adds nothing β€” deepen it or delete it. The opposite failure (over-explaining what the model already knows) wastes resident context, since an invoked skill stays loaded across turns. (Anthropic) πŸ”Έ

Guardrails β€” deterministic, auto-fired constraints

A guardrail is enforcement (code decides; the model gets no vote), versus a rule which is probabilistic guidance. Use one when the failure is safety/correctness-critical and the check is a pure function of available inputs. (Claude Code β€” hooks, Anthropic β€” Building effective agents)

  1. Deterministic + safety-critical only. Judgment calls stay in rules; deterministic, code-checkable invariants become guardrails. βœ…
  2. Fail closed β€” and verify the exit semantics. In Claude Code hooks only exit code 2 blocks; exit 1 is treated as a non-blocking error and the action proceeds. A guardrail that errors must not silently let the action through. (Claude Code β€” hooks reference) βœ…
  3. Deny-by-default / least privilege. Enumerate the allowed shape and deny the rest; deny rules evaluate before allow. (Claude Agent SDK β€” permissions) βœ…
  4. Narrow matcher scope. Bind to the specific tool/event, not every event. (Claude Code β€” hooks) βœ…
  5. Actionable, model-directed block message. State what was rejected, why, and the exact next action β€” the message is fed back to the model to adjust its plan. (Claude Code) βœ…
  6. Escalate irreversible actions to human approval, not a binary deny (force-push, history rewrite, deletes, financial writes). (OpenAI β€” Guardrails & human review) βœ…
  7. Test both paths before shipping β€” prove it blocks the bad case and allows the good case, including the error/edge path. (Anthropic β€” Building effective agents) βœ…

Description & triggering (cross-cutting)

Applies to every skill and agent β€” this is what makes the right unit fire.

  1. Put both capability and trigger in the description: "<What it does>. Use when <trigger contexts>." Don't rely on a body ## Triggers section for auto-invocation β€” it isn't pre-loaded. (Anthropic) βœ…
  2. Third person. "Processes Excel files… Use when…", never "I can…" / "You can use this to…" β€” mixed POV hurts discovery. (Anthropic) βœ…
  3. Pack in user-vocabulary keywords β€” verbs, domain nouns, file extensions, synonyms a user would actually type. "Helps with code" never auto-fires. (Anthropic, Claude Code) βœ…
  4. Disambiguate from neighbors. More similar-looking options raise wrong-selection rates; keep descriptions mutually exclusive and the active set small. (OpenAI β€” function calling, Anthropic β€” writing tools) βœ…
  5. Pass the "intern test." A new engineer should know from the description alone when to reach for it. βœ…
  6. Validate triggering with evals, not inspection β€” confirm the description discriminates against real queries before shipping. (Anthropic β€” build evaluations first) βœ…

How this is enforced

  • The meta-skills (create-rule/create-agent/create-skill/create-pack) encode these principles for authoring new content.
  • npm run validate checks structure, frontmatter limits, and catalog freshness deterministically.
  • Content is held to this bar in review; see Contributing.
⚠️ **GitHub.com Fallback** ⚠️