Skill Wiki v0.1.0

Docs / spec / atoms

On this page

Atoms · 28 kinds

The unit of knowledge. Every atom declares id, version, body fields specific to its kind, and a list of typed edges. The 28 kinds are organised into 5 layers; pick what fits your domain and ignore the rest.

Anatomy of an atom

An atom is a .prime source file. Every atom has the same shape:

<kind> <PascalCaseName> {
  id: "@scope/kind-kebab-name"
  version: "1.0.0"
  description: "One sentence — appears in summary projection."
  domain: <domain>

  // kind-specific body fields
  // ...

  // edges out (any subset of 14 verbs)
  related:        [@scope/...]
  requires:       [@scope/...]
  validates-with: [@scope/...]
}

Required for every kind: id, version, description, domain. Each kind adds its own required fields (e.g. rule requires claim; method requires steps).

The 5 layers

LayerKindsRole
Data fact term value category example counter-example source metric What is. Verifiable claims, definitions, samples, citations.
Behaviour step check transform tool method What to do. Procedures, validations, transformations.
Composition rule taxonomy pattern anti-pattern type constraint What goes with what. Constraints, classifications, recurring shapes.
Meta collection scope tradeoff principle feedback About the corpus. Bundles, scope declarations, design tensions.
Voice & style (domain-flavoured) persona voice template provocation How to express. Used to varying degrees across corpora — observed in the wild: creative-writing ~10 kinds, security ~12, frontend-design 22 (current upper bound).

Full kind reference

KindOne-lineRequired fields
factA verifiable claim with confidence.statement, confidence
termA definition of a vocabulary unit.definition
valueA specific concrete value (constant).value, unit?
categoryA classification slot in a taxonomy.category, parent?
exampleA worked instance of a rule or pattern.shows, illustrates?
counter-exampleAn instance that fails a rule or pattern.fails, why
sourceCitation or reference to authoritative material.title, url? or doi?
metricA measurable quantity (e.g., contrast ratio ≥ 4.5:1).name, threshold?
stepOne step in a procedure.action
checkA verification gate (yes / no / details).check
transformAn input → output procedure.input, output
toolAn executable utility used by methods.signature
methodA multi-step procedure with inputs, outputs, and contract.steps, contract?
ruleA constraint with severity and applies-to.claim, severity
taxonomyA classification scheme.axis, buckets
patternA reusable solution to a recurring problem.problem, solution
anti-patternA common mistake and why it fails.shape, fails-because
typeA schema for an object the protocol traffics in.fields
constraintA hard limit or invariant.limit, applies-to
collectionA curated bundle of atoms.members
scopeA focused subset of the corpus.focus, members
tradeoffA decision where two values are in tension.tension
principleA higher-level belief that justifies rules.statement
feedbackRetrospective observation about prior decisions.observation
personaA named bundle of style for a coherent voice / posture (design lineage, writing style, brand system, …).posture
voiceA writing voice (cadence, register).register
templateA reusable scaffold for output.template
provocationA creative prompt to push the agent.prompt

Two complete examples

1. A rule

rule SqlInjectionPrevention {
  id: "@security/rule-sql-injection-prevention"
  version: "1.0.0"
  description: "Always use parameterised queries — never concatenate strings."
  domain: security

  claim:    "Use parameterised queries; never concatenate user input."
  applies-to: [api-endpoint, data-pipeline]
  severity: critical

  validates-with: [
    @security/source-owasp-input-validation,
    @security/check-sqlmap-scan,
  ]

  contradicts: [
    @security/anti-pattern-string-concat-query,
  ]
}

2. A method

method MakeTea {
  id: "@hello-world/method-make-tea"
  version: "1.0.0"
  description: "Boil water, steep tea, optional milk and sugar."
  domain: cooking

  steps: [
    @hello-world/step-boil-water,
    @hello-world/step-steep-tea,
    @hello-world/step-add-milk,
  ]

  contract: {
    must-include: [
      @hello-world/fact-water-boils-at-100c,
      @hello-world/term-steep,
    ]
    must-avoid: [
      @hello-world/anti-pattern-microwave-tea,
    ]
  }

  enhances: [
    @hello-world/voice-british-tea-time,
  ]
}

Picking kinds

A small corpus uses 5–8 kinds. As datapoints from real corpora: a creative-writing Prime might use ~10 kinds (heavy on Voice & Style); a security Prime ~12 (heavy on Data + Composition + Behaviour); the frontend-design Prime 22 (the current upper bound). The kinds you don't use simply don't appear in your corpus.

Need a kind we don't have? See Custom kinds — adding a kind to the protocol is a 4-file patch and a Tier-2 RFC.