Markdown that steers an LLM is code. Genesis is the architectural layer for designing multi-agent, multi-skill systems -- with named patterns, contracts, and substrate portability, before you write them.
SaferSkills independently audited genesis (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill encodes a disciplined process for designing agentic primitive modules. Markdown that steers an LLM is code; you do not write production code without a design. The output of this skill is DESIGN ARTIFACTS, not finished modules. A separate coding step emits the natural-language modules from the artifacts.
file, or orchestrator workflow.
or threading rules (e.g. sequential single-loop where fan-out fits).
this SKILL.md. Harness syntax lives only in assets/runtime-affordances/per-harness/<harness>.md and is loaded only at step 7.
against assets/runtime-affordances/common.md first; reaching into a per-harness adapter requires a justified declaration per assets/runtime-affordances/portability-rules.md.
No tacit context.
1 intent + scope (+ cost stance, optional cap)
v
2 component diagram <-- load assets/mermaid-conventions.md
v load assets/primitives.md
v load assets/design-patterns.md
v load assets/architectural-patterns.md
v load assets/refactor-patterns.md
3 thread / sequence diagram
v
3.1 tradeoff check <-- load assets/pattern-tradeoffs.md
v (only if two patterns fit one slot)
3.2 cost check <-- load assets/token-economics.md
v load assets/runtime-affordances/model-catalog.md
v (mandatory; mirrors 3.1)
3.5 composition decision <-- load assets/composition-substrate.md
v (per-box: inline | sibling | external module)
4 SoC pass against existing modules
v
5 classic + PROSE + LLM-physics compliance check
v
6 handoff packet (diagrams + interface sketch + declared targets
+ module composition table + cost projection
+ todos)
v [PERSIST PACKET to plan store; truth #5]
v [DESIGN ENDS HERE]
----- caller / coder thread takes over -----
7a portability check
v load runtime-affordances/common.md (always)
7b draft natural- load runtime-affordances/per-harness/<x>.md
language module ONLY if step 7a flagged a per-harness need
v load module-system-adapters/<tool>.md
v ONLY if step 3.5 declared external modules
v RELOAD plan before each module / spawn
8 validate against diagrams + lint (PROSE 5-axis, size budget,
ASCII, coherent unit, portability honored, declared external
modules wired correctly, cost projection honored)Write one paragraph: the user-facing capability, the trigger conditions, the boundary (what it does NOT do). Apply Single Responsibility: if the paragraph contains "and" connecting two distinct capabilities, split into two designs.
Also draft the dispatch description that will become this module's frontmatter description: name the trigger nouns and verbs, the boundary, and the intended invocation mode (FORCED | DISCOVERY | BOTH). This is the function signature the dispatcher LLM matches against; see the persona's "Skill dispatch" section.
The description follows four rules from the canonical spec for the MODULE ENTRYPOINT primitive (see assets/primitives.md -- the agentskills.io optimizing-descriptions page is the load-bearing authority; verify against the live URL):
this skill when ..." rather than declarative "This skill does ...".
achieve, not the skill's internal procedure.
EVEN IF the user does not name the domain directly. Be pushy.
assets/primitives.md MODULE ENTRYPOINT; silent rejection above this).
Also read the operator's COST STANCE (frugal / balanced default / quality / unbounded) and optional COST BUDGET CAP (dollars, tokens, or premium-requests for a typical run). Stance shapes which patterns get picked; cap is the only place genesis refuses on cost grounds (enforced at step 6). See references/cost-economics- process.md for declaration mechanics.
Load:
assets/primitives.mdassets/design-patterns.mdassets/architectural-patterns.mdassets/refactor-patterns.mdassets/mermaid-conventions.mdEmit a flowchart showing every primitive module the design uses and which other modules it depends on (via links). Mark which modules already exist vs new. Mark each module with one of: PERSONA, SKILL, RULE, ORCHESTRATOR, ASSET.
Emit a sequenceDiagram showing:
Pattern selection runs in tier order, ALWAYS:
assets/refactor-patterns.md)across the existing module graph. A missing R1 SPLIT or R3 EXTRACT will distort every downstream pattern decision.
assets/architectural-patterns.md. If the design's shape matches PANEL, PIPELINE, ORCHESTRATOR-SAGA, STAFFED PLAN, WAVE EXECUTION, EVENT-DRIVEN, or RECONCILIATION LOOP, name it and inherit its anti-patterns verbatim. RECONCILIATION LOOP is the right call when the intent describes a queue of items each driven to terminal state under non-determinism (trigger phrases: "queue of items", "for each issue/PR/file", "drive to terminal state", "until green", "drift correction", "reconcile", "sweep the backlog"); it requires only sub-agent dispatch + persistent state + completion signal from the substrate, no vendor sugar.
(assets/design-patterns.md) along the GoF axes. ATTENTION ANCHOR (B8) and PLAN MEMENTO (B4) are MANDATORY on any non-trivial work.
assets/runtime-affordances/per-harness/<x>.md)load only at codegen time (step 7b), not now.
If the design has >=3 independent lenses with no shared state and the diagram shows a single-thread loop, redo: it is a fan-out opportunity. The default for that shape is FAN-OUT + SYNTHESIZER (B1) realizing PANEL (A1).
If step 3 surfaced two or more patterns that fit the same slot, load assets/pattern-tradeoffs.md. Find the matrix that cuts the choice (hallucination countermeasures; gate types; grounding doctrine; threading topology; synthesis style; persona composition; plan persistence; refactor triggers). Pick the cell that matches the failure mode you are guarding against, not the first pattern that fits. Cite the matrix and the row in the step 6 handoff packet so reviewers can reproduce the choice.
Skip this step if step 3 produced an unambiguous pattern selection.
Load assets/token-economics.md and assets/runtime-affordances/model-catalog.md. For each module, pick: ROLE CLASS (cheapest meeting capability); PREFIX SHAPE (audit for cache invalidators, apply B13); OUTPUT VOLUME band (L in fan-out = R5 trigger); TOOL SURFACE (B15 or S7 if catalog > 20); WORKFLOW SHAPE (heterogeneous stages = A12).
Apply the stance read at step 1. If two cost patterns fit the same slot, cite the cost-shape matrix row in assets/pattern-tradeoffs.md section 10. Full procedure in references/cost-economics-process.md. Skip step 3.2 ONLY when stance is unbounded AND operator declined cost recording.
For every task() spawn planned, fill the PER-SPAWN DECLARATION TABLE (Audience/Tier/Brief mode/Receipt mode/Justification) per references/audience-boundary.md. Default INTERNAL = caveman per B14b/B14c.
Load assets/composition-substrate.md. For EACH box in the component diagram, decide its composition mode and record the rationale:
to this module).
the content is reused only within this project). Before placing it, ask: does the USER-FACING bundle need this AT RUNTIME? If no (eval scenarios, contributor scripts, dev fixtures), it is maintainer-scope -- place it OUTSIDE the user-facing module's distribution boundary (contributor-only directory). Otherwise the module ships with BUNDLE LEAKAGE (see composition-substrate.md anti-patterns).
(default when the content meets at least one of: rule of three -- needed in 3+ projects; independent release cadence; owned by a different team; benefits from version pinning across consumers).
Then sketch a flowchart LR DEPENDENCY GRAPH showing this module plus its declared external modules and any transitive closure edges you can name. Mark each edge with the composition mode.
For every artifact emitted, name audience per composition-substrate §7 AUDIENCE BOUNDARY. INTERNAL → caveman (B14b/B14c); EXTERNAL → normal prose; synthesizers decompress at the boundary.
If any external module is declared, two things follow. (1) The handoff packet MUST list it under "external modules required" so the coder step (7b) loads the module-system adapter. (2) The emitted module that depends on it MUST DECLARE the dependency at its OWN distribution surface -- otherwise the module ships with PHANTOM DEPENDENCY and downstream loaders cannot supply the adapter. The chosen DECLARATION MECHANISM is recorded in the handoff packet (step 6) and is one of:
through a module system that supports them;
PLUS a tool-call probe at the use-site (mirrors the A9 SUPERVISED EXECUTION flow this skill applies at its own step 7b for the module-system adapter);
emitted module also ships standalone to users who do not run that module system.
For each module in the component diagram (now annotated with composition modes from step 3.5), check:
via link; do not duplicate. If the existing module lives outside this project, mark it EXTERNAL MODULE and revisit step 3.5.
redraw boundaries.
sibling's description? If yes, narrow one or merge. (DISPATCH COLLISION; HIGH severity.)
conjunction, fragment callers, body over budget, multi-lens body, divergent change cadence)? If yes, redesign per R1. If none fire but the design splits anyway, flag PREMATURE SPLIT.
loaded with a sibling? Apply R2 FUSE.
rule / asset? Apply R3 EXTRACT.
reference? Apply R4 INLINE.
post, deploy, migrate, mutate state) or a FACT THAT MUST BE TRUE (current state, version, hash, file content) and leave it as LLM-asserted prose? If yes, that step MUST cross S7 DETERMINISTIC TOOL BRIDGE; pick the EXTENSION PATH (preloaded terminal, custom CLI/script/API, or MCP server) per the S7 selection rule. Default to the preloaded terminal where an installed CLI already does the job. Wrap with A9 SUPERVISED EXECUTION when the work spans plan + execute + verify. See assets/refactor-patterns.md for the full trigger set.
Apply each row of the persona's classic principles table; flag violations with severity (BLOCKER / HIGH / MEDIUM / LOW). Then apply the PROSE constraints (Progressive Disclosure, Reduced Scope, Orchestrated Composition, Safety Boundaries, Explicit Hierarchy) and the seven durable LLM truths. Any BLOCKER stops the design; return to step 2.
Also enforce the MODULE ENTRYPOINT canonical spec compliance row (BLOCKER on any miss; verify against the live spec linked from assets/primitives.md):
name field is 1-64 characters, lowercase [a-z0-9-], noleading / trailing / consecutive hyphens, AND equals the parent directory name. Mismatch = harness rejects the module.
stay in the body; it moves to references/<topic>.md and the body links to it with an explicit LOAD TRIGGER condition (e.g. "Read references/api-errors.md if the API returns non-200") rather than a generic "see references/".
Produce a single artifact containing:
inputs, outputs, dependencies (as relative links).
| EXTERNAL MODULE, with rationale.
loads a module-system adapter). For EACH external module, ALSO record the DECLARATION MECHANISM chosen at step 3.5 (manifest dep | companion-module recommendation + tool-call probe | both). Drives step 8 validation that the emitted module did not ship with PHANTOM DEPENDENCY.
common-only | <list of harnesses>.BOTH. (Drives how strict description-collision review must be.)
with dependencies between entries where they exist.
EXTERNAL_ARTIFACT_SPEC per references/audience-boundary.md template.
copied into any SPAWN_BRIEF.
evaluating-skills + optimizing-descriptions; see assets/primitives.md). At minimum:
twice (with the skill loaded and without it) so the value delta is visible. If with_skill and without_skill produce indistinguishable outputs, the skill is not adding value; redesign or delete.
that should trigger plus 8-10 near-miss queries that should NOT, split 60/40 train/val. Validation split is the ship gate.
unbounded + opt-out).Contains: per-module qualitative bands (role class, prefix / output bands, turn / cache ratio); workflow-level quantitative range (input / output tokens, dollar range per representative run) sourced from the per-harness adapter pricing footnote; three workload scenarios (S trivial / M known module / L repo-wide); cited cost-shape matrix rows; declared stance; cap check (halt if L scenario exceeds cap). Bands are the CONTRACT (step 8 validates); ranges are the PREDICTION (operator reads). Full template in references/cost-economics-process.md.
PERSIST THE PACKET. Per truth #5 (plan before execution) and substrate concept 6 (PLAN PERSISTENCE), the handoff packet MUST be written to the runtime's plan store BEFORE step 7b begins. The exact location is harness-specific (see runtime-affordances/per-harness/<x>.md -> section 6); the substrate guarantees that a slot exists in every supported harness. If unsure, write it to a markdown file named plan.md in the session's working area; that is portable.
DESIGN ENDS HERE. Stop. Do not draft natural language.
Caller loads assets/runtime-affordances/common.md. For each module in the handoff packet, check whether its required affordances are all in the common substrate.
If yes -> declared target = common-only; proceed to 7b loading only common.md.
If no -> consult assets/runtime-affordances/portability-rules.md. Either justify reaching into a specific harness adapter (and declare the constraint in the module header) or redesign to fit common substrate (return to step 2).
Using the loaded substrate (and per-harness adapter if justified), emit each module's body. This is the only step that touches today's syntax.
RELOAD THE PLAN before drafting each module, before each spawn, and after each spawn returns. The plan was persisted at step 6 precisely so the executor can reground itself instead of relying on degraded recall (truth #1, substrate concept 6, patterns B4 PLAN MEMENTO + B8 ATTENTION ANCHOR). Update the todo list as each module reaches done.
If the handoff packet declares any EXTERNAL MODULE under "external modules required", a MODULE-SYSTEM ADAPTER must be loaded before emitting manifest, CLI, or lockfile content. The adapter owns that syntax; the architect persona stays ignorant of it. The current canonical adapter is apm-usage (microsoft/apm-guide); other adapters may exist or be authored later.
Apply A9 SUPERVISED EXECUTION here -- the adapter being reachable is a fact-that-must-be-true (truth #2 CONTEXT EXPLICIT + truth #6 HARNESSES BRIDGE). Do not skip the probe; PHANTOM DEPENDENCY is the failure mode otherwise.
companion-skill registry / check the project root for an existing manifest. Do not assume the adapter is loaded from prose alone.
delegate manifest / CLI / lockfile vocabulary to it.
Surface three options:
apm install microsoft/apm/packages/apm-guide (then re-probe).
print an explicit "you must wire these into your module system manually" banner so the operator is not surprised.
apm.yml, package.json, or any specific manifestfield from LLM recall. Either the adapter supplied the vocabulary (probe hit) or the operator chose raw-file fallback. Otherwise the failure chain is TOOLLESS ASSERTION -> HAND-ROLLED HALLUCINATION -> silent drift.
Use the canonical directory layout for any bundled content (the MODULE ENTRYPOINT spec linked from assets/primitives.md is the source of truth; verify if anything has moved):
scripts/ - executable programs invoked by the skill body viaRELATIVE path. Must be NON-INTERACTIVE (agents run in shells with no TTY; any prompt blocks indefinitely). Pin tool versions on one-off commands (e.g. npx [email protected]). Document with --help. Emit STRUCTURED data (JSON / CSV) on stdout, diagnostics on stderr. List bundled scripts in the SKILL.md body so the agent can find them.
references/ - load-on-demand documentation. Every link from thebody MUST state the trigger condition that loads it (see step 5).
assets/ - templates and data the skill emits or composes against.Calibrate prescriptiveness PER SECTION: prescriptive on fragile or sequenced operations; freedom on judgement calls. A uniformly prescriptive body over-constrains; a uniformly free body under-grounds. Prefer procedures (how to approach a class of problems) over declarations (what to produce for one instance). For any structured output the skill must produce, INCLUDE A TEMPLATE inline -- agents pattern-match against concrete structure better than against prose description.
packet.
(SKILL.md body <= 500 lines AND <= 5000 tokens; overflow moved to references/).
name field passes the regex AND matches parent directory.description <= 1024 characters, imperative, intent-first,indirect-triggers named.
common-only module.
emitted module declares the dependency at its distribution surface via the mechanism recorded at step 6 (manifest entry / companion-module recommendation + tool-call probe at use-site / both). Mere prose mention of the dependency handle is NOT declaration -- that is PHANTOM DEPENDENCY (see architect anti-patterns).
documented, stdout/stderr split.
evals/evals.json (or equivalent) is present and exercisedwith_skill vs without_skill. If no measurable delta, redesign or delete -- do not ship.
should-trigger queries AND < 0.5 on near-miss should-not- trigger queries.
each emitted module's role class matches projection bands; no introduced cache invalidators; every cited cost pattern materialized in some module; stance-mandated patterns present (frugal -> B12 / B15 / B16; quality -> planner-class promotions); cap still holds. Failures are HIGH severity but do not block ship -- they surface so the operator can accept or redesign. Full procedure in references/cost-economics-process.md.
rows use caveman brief or justified exception; SPAWN_BRIEFs paired with RECEIPT_SCHEMAs; EXTERNAL specs declare NORMAL prose.
skill on at least one real task, capture the trace, and revise from what actually happened (not what you expected). One-shot drafts that never met execution are not done.
When in doubt, pick the pattern that minimizes context degradation in any one thread:
with a validation gate between them.
artifact between phases.
See assets/design-patterns.md for the design-pattern catalogue (GoF axes) and assets/architectural-patterns.md for the architectural patterns (system-topology shapes).
Load references/audience-boundary.md before drafting handoff packet step 6 if the design includes ≥1 task() spawn.
Worked examples ship in examples/ alongside this SKILL.md file, not in assets/. They are LAZY: load only when the operator explicitly asks for an example or when a design step needs a reference shape to imitate. The progressive-disclosure rule for assets does NOT apply to examples; do not load them eagerly.
examples/01-readme-iteration.md -- canonical shape for anycreative, multi-round artifact work where cold-traffic conversion matters and goal drift is a real risk (READMEs, landing pages, PR descriptions, announcement posts). Composes A8 ALIGNMENT LOOP + A1 PANEL + A7 ADVERSARIAL REVIEW + COLD READER SIMULATION + B9 GOAL STEWARD + B10 HUMAN CHECKPOINT.
examples/02-review-panel-architecture.md -- canonicalre-architecture lesson for any multi-lens module (panel, audit, multi-perspective critique). Walks one real panel from single-loop anti-pattern to fan-out + parent synthesizer.
examples/03-release-notes-single-skill.md -- minimal outputreference: when A1 PANEL is NOT warranted (lens-count gate did not fire). A9 SUPERVISED EXECUTION + S7 + S4, single thread.
examples/04-pr-review-advisory.md -- multi-primitive panelreference: A6 EVENT + A1 PANEL + DISSENT-WEIGHTED arbiter, no side effects on a system of record beyond comment posting.
examples/05-pr-review-verdict.md -- consequential-writereference: same panel as 04 with verdict emission added. Shows S7 + S4 + A9 verifier hardening, and explicitly rejects A8 / B5 / R1 with WHEN-clause grounding -- read this when stake pressure tempts you to add new orchestration layers.
examples/06-cost-aware-panel.md -- cost-shape reference: theexample 02 panel with A12 GRADIENT WORKFLOW + B12 MODEL ROUTER + B13 CACHE-AWARE PREFIX + R5 COST PRUNE pass. Read when stance is frugal or when fan-out width >= 4 at daily cadence.
A design session produces:
module(s) it designs, OR posted as a comment on the PR that introduces them.
The handoff packet is the source of truth for any future refactor: re-running this skill starts from it, not from the emitted natural language.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.