agentleFS
Hook12aaaHook12aaa/skill-cheat/skills/skill-design/SKILL.md

skill-design

Skill0 starsChanged 41 days agoMITView on GitHub

Stage 2 of skill-cheat, the five-stage SKILL.md pipeline. Trigger /skill-design. Fire whenever the user says "design it now", "write the HARD-GATEs", "draft the contract", "move on from scope to design", or "lock the immutable fields". Writes HARD-GATEs, Core Principle, Process Flow, and Integrity Block, then emits design.md plus a SHA-256 sidecar once SCOPE_LOCKED is in hand. Emits DESIGN_LOCKED, DESIGN_REJECTED, or BLOCKED_REVIEWER.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 10 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT proceed without reading scope.md in this session.

    line 10
  2. Distinctive:

    Never name libraries or frameworks in HARD-GATE content.

    line 14
  3. Very specific:

    Never commit design.md without emitting design.md.sha256.

    line 18
  4. Distinctive:

    Write the immutable contract before writing the body.

    line 27
  5. Distinctive:

    Read scope.md and confirm all six fields are present.

    line 58
  6. Distinctive:

    Write the Integrity Block with all six immutable fields.

    line 65
  7. Very specific:

    Write design.json alongside design.md (design.json follows references/design-schema.md).

    line 67
  8. Very specific:

    Use references/dot-digraph-template.md as the skeleton.

    line 86
  9. Very specific:

    Every bullet must match: - BEFORE <action>: "<question>?".

    line 94
  10. Very specific:

    Use the exact delimiter strings from references/integrity-block.md.

    line 102
  11. Very specific:

    Run bash scripts/integrity-hash.sh <design-path>.

    line 106
  12. Very specific:

    Run bash scripts/emit-assertion-skeleton.sh --skill-name <skill-name> --design-json design.json --design-md design.md > …

    line 114
  13. Distinctive:

    BEFORE drafting HARD-GATEs: "Is each precondition one or two imperative sentences?"

    line 118
  14. Distinctive:

    BEFORE naming the Core Principle: "Am I naming the shape of the work or a tool?"

    line 119
  15. Distinctive:

    BEFORE writing the Process Flow: "Does every node reach a terminal or a declared backtrack?"

    line 120
  16. Very specific:

    BEFORE emitting DESIGN_LOCKED: "Does design.md.sha256 match a fresh hash of the block?"

    line 121
  17. Distinctive:

    Gates are imperatives: No rationale inside a HARD-GATE block.

    line 141
  18. Distinctive:

    Integrity Block is immutable: Never edit inside the markers after the sidecar is written.

    line 142

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- design-region-clean-of-hard-gates -->

skill-design

<HARD-GATE> Do NOT proceed without reading scope.md in this session. STOP and invoke /skill-scope. </HARD-GATE><HARD-GATE> Never name libraries or frameworks in HARD-GATE content. STOP and rewrite. </HARD-GATE><HARD-GATE> Never commit design.md without emitting design.md.sha256. STOP and run integrity-hash.sh. </HARD-GATE>

Anti-Pattern

"I can tighten the HARD-GATEs after review" — gates authored after the body is written reflect the body, not the contract. Write the immutable contract first or it drifts to match whatever was already written.

Core Principle

Write the immutable contract before writing the body.

Process Flow

digraph skill_design {
    rankdir=TB;
    "Read scope.md" [shape=box];
    "Draft HARD-GATEs" [shape=box];
    "Draft Core Principle" [shape=box];
    "Draft Process Flow" [shape=box];
    "Draft Checklist" [shape=box];
    "Draft Gate Functions" [shape=box];
    "Spawn reviewer" [shape=box];
    "Write Integrity Block" [shape=box];
    "Emit SHA-256 sidecar" [shape=box];
    "DESIGN_LOCKED" [shape=doublecircle];
    "Read scope.md" -> "Draft HARD-GATEs";
    "Draft HARD-GATEs" -> "Draft Core Principle";
    "Draft Core Principle" -> "Draft Process Flow";
    "Draft Process Flow" -> "Draft Checklist";
    "Draft Checklist" -> "Draft Gate Functions";
    "Draft Gate Functions" -> "Spawn reviewer";
    "Spawn reviewer" -> "Write Integrity Block";
    "Write Integrity Block" -> "Emit SHA-256 sidecar";
    "Emit SHA-256 sidecar" -> "DESIGN_LOCKED";
}

Checklist

  1. Read scope.md and confirm all six fields are present.
  2. Draft HARD-GATEs from the precondition list in scope.md.
  3. Draft the Core Principle as one sentence.
  4. Draft the Process Flow digraph.
  5. Draft the Checklist and Step Details.
  6. Draft Gate Functions.
  7. Spawn the voice-reviewer subagent.
  8. Write the Integrity Block with all six immutable fields.
  9. Emit the SHA-256 sidecar file.
  10. Write design.json alongside design.md (design.json follows references/design-schema.md).
  11. Emit evals/assertion-skeleton.json (run bash scripts/emit-assertion-skeleton.sh --skill-name <skill-name> --design-json design.json --design-md design.md > evals/assertion-skeleton.json).

Step Details

1. Read scope.md and confirm all six fields are present

Confirm: skill name, triggers, verdicts, Anti-Pattern, target project path, plugin-mode. Block on any missing field.

2. Draft HARD-GATEs from the precondition list in scope.md

One or two imperative sentences per gate. No rationale inside the block. Read references/hard-gate-patterns.md for canonical forms.

3. Draft the Core Principle as one sentence

Name the shape of the work. Do not name a library, framework, or tool. One sentence.

4. Draft the Process Flow digraph

Use references/dot-digraph-template.md as the skeleton. Every node must reach a terminal or a declared backtrack loop.

5. Draft the Checklist and Step Details

Number the checklist items. Write one H3 Step Detail per item. Keep step prose imperative.

6. Draft Gate Functions

Every bullet must match: - BEFORE <action>: "<question>?". Four or more bullets.

7. Spawn the voice-reviewer subagent

Dispatch a fresh subagent with the draft design.md. Wait for its verdict before writing the Integrity Block.

8. Write the Integrity Block with all six immutable fields

Use the exact delimiter strings from references/integrity-block.md. Include: skill name, triggers, verdict vocabulary, HARD-GATEs, Core Principle, Gate Functions.

9. Emit the SHA-256 sidecar file

Run bash scripts/integrity-hash.sh <design-path>. Confirm sidecar lands at <design-path>.sha256.

10. Write design.json alongside design.md

Save design.json to docs/skill-cheat/skills-in-progress/<skill-name>/design.json. Follow references/design-schema.md. Extract the fields mechanically from the drafted sections — do NOT hand-edit the JSON after emission. Downstream stages read design.json, not design.md.

11. Emit evals/assertion-skeleton.json for the behavioral benchmark

Run bash scripts/emit-assertion-skeleton.sh --skill-name <skill-name> --design-json design.json --design-md design.md > evals/assertion-skeleton.json. The emitter seeds one assertion per HARD-GATE and one per Gate Function. /skill-voice-review (Plan 5) dispatches these against the benchmark runs.

Gate Functions

  • BEFORE drafting HARD-GATEs: "Is each precondition one or two imperative sentences?"
  • BEFORE naming the Core Principle: "Am I naming the shape of the work or a tool?"
  • BEFORE writing the Process Flow: "Does every node reach a terminal or a declared backtrack?"
  • BEFORE emitting DESIGN_LOCKED: "Does design.md.sha256 match a fresh hash of the block?"

Rationalization Table

You think...Reality
"HARD-GATEs need a rationale clause"Keep rationale outside the block. Write gates as imperatives only.
"The Core Principle can reference the main tool"Name the shape, not the tool. Strip any library name before locking.
"Integrity Block is overkill for a small skill"Emit the Integrity Block regardless of skill size. No exemptions.
"I can tighten the gates after the review"Gates authored after the body drift to match it. Write the contract first.

Red Flags

  • "I'll tighten the gates later"
  • "This gate needs a because clause"
  • "Integrity Block is overkill for a small skill"
  • "The Core Principle can name the library"

Key Principles

  • Gates are imperatives. No rationale inside a HARD-GATE block.
  • Integrity Block is immutable. Never edit inside the markers after the sidecar is written.
  • Reviewer is a fresh subagent. Dispatch with no authoring session history.

The Bottom Line

#!/usr/bin/env bash
set -euo pipefail
design_path="${1:-docs/skill-cheat/skills-in-progress/<skill-name>/design.md}"
if bash scripts/integrity-hash.sh "$design_path"; then
    echo "VERDICT: DESIGN_LOCKED"
else
    echo "VERDICT: BLOCKED_TAMPER"
    exit 1
fi

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.