Skip to content
Back to skills

Squad Ontology

ASecurity

Use when the human wants to define, change, inspect, or export the squad's shared vocabulary, or check files for words the squad agreed not to use: phrases like "define first-time order", "what do we mean by X", "add a term", "that definition is wrong", "retire this term", "add a competency question", "show the vocabulary", "check these files for drift", "export the ontology as SKOS". Manages `.squad/ontology.md`, the human-owned file behind hard rule #17 (one word, one meaning). Verbs: add (...

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsgobash

Works with

  • claude code

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add amit1992KO/squad-os --skill squad-ontology --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Squad Ontology?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Squad Ontology
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/amit1992ko-squad-ontology/badge)](https://www.skillsdirectory.com/skills/amit1992ko-squad-ontology)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: squad-ontology
description: >-
  Use when the human wants to define, change, inspect, or export the squad's
  shared vocabulary, or check files for words the squad agreed not to use:
  phrases like "define first-time order", "what do we mean by X", "add a
  term", "that definition is wrong", "retire this term", "add a competency
  question", "show the vocabulary", "check these files for drift", "export the
  ontology as SKOS". Manages `.squad/ontology.md`, the human-owned file behind
  hard rule #17 (one word, one meaning). Verbs: add (or revise) a term, add a
  question, inspect, check, retire, export. Never lets a role define a term.
license: MIT
allowed-tools:
  - Read
  - 'Bash(bash "${CLAUDE_PLUGIN_ROOT}/skills/squad-ontology/scripts/ontology.sh" *)'
---

# squad-ontology

`.squad/ontology.md` is the squad's vocabulary: each term the squad's work depends on, with one definition, the words to avoid for it, and how it relates to other terms. The human owns it. This skill is the human's editor for it, run from the main session, and the third place in Squad OS where the human is the artifact's own author (after `claims-user.md` in `squad-world` and `.squad/partner.md` in `squad-partner`).

The block format, the seven kinds and every validation reason code live in `${CLAUDE_PLUGIN_ROOT}/templates/ontology.md`. Read it before the first write in a session; this skill does not repeat it.

## Hard rule #17: one word, one meaning

Every term has exactly one live definition, and the human agreed it. Four consequences:

- **The human writes; roles report.** No role writes `.squad/ontology.md`. The PermissionRequest hook defers any role write to it to the human (`.squad/` reservation, hard rule #7). A role that needs a missing term, or thinks a definition is wrong, says so in the `## Caveats` section of its hand-off manifest and in its final report. Those reports are this skill's inbox: when the human brings one here, run **add** or **revise**.
- **Confirm the exact block.** Every write shows the human the exact block (or the exact diff) that will land, and writes only after an explicit yes in the same turn. A correction means reprint and ask again. One exception: `squad-onboard`'s starting vocabulary. There the human confirms one compact line per block, and each line maps one-to-one to a block in the template's format, so that confirmed line is the confirmation for its block. Onboarding writes those blocks without a second question, then runs the default mode and fixes any `invalid` line with the human.
- **Every write asks for permission.** This skill's pre-approved tools only read and run `ontology.sh`, so each write (add, revise, retire, an export to a file) shows the human a permission prompt. That is intended: `.squad/ontology.md` is the human's file, and the prompt is one more look at the exact change before it lands.
- **Meaning is agreed, not evidenced.** This file is separate from the belief ledger (`squad-world`, hard rule #13) on purpose. A belief needs a source and a grade because it can be wrong about the world. A definition is a decision about words; it is right because the human agreed it. Keep beliefs out of definitions: "First-time order" defines an event, and "first-time orders are 40% of revenue" is a belief that belongs in the ledger.

## What is mechanical and what is instructed

Say this precisely when asked, and never round it up:

| Part | Enforcement |
|---|---|
| Roles cannot write `.squad/ontology.md` | Mechanical: the hook defers the write to the human |
| Required fields, closed kinds, duplicate keys, dangling relations, avoided-word collisions | Mechanical: `ontology.sh` marks the block invalid and keeps it out of every projection |
| Roles use the defined words and avoid the avoided ones | Instructed only: the spawn prompt says so. Nothing blocks a role from writing an avoided word |
| Drift in files | Reported, after the fact, by `--check`. Never blocked, never auto-fixed |
| Definitions are correct | Not checked by anything. The human's judgement |

## Running `ontology.sh`

Always from the project root:

```bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/squad-ontology/scripts/ontology.sh"            # JSON lines, summary last
bash "${CLAUDE_PLUGIN_ROOT}/skills/squad-ontology/scripts/ontology.sh" --index    # the spawn-prompt text
bash "${CLAUDE_PLUGIN_ROOT}/skills/squad-ontology/scripts/ontology.sh" --check <file>...
bash "${CLAUDE_PLUGIN_ROOT}/skills/squad-ontology/scripts/ontology.sh" --skos     # SKOS Turtle
```

Read-only in every mode. No output at all means there is no ontology yet (no file, or no block in it). The output shapes are documented in the script's header.

| Line | Meaning |
|---|---|
| `term` | A valid term, live or retired |
| `invalid` | A broken block with its `reasons`; it reaches no prompt, no check, no export |
| `question` | A competency question with `covered` and `missing` |
| `drift` | One avoided word on one line of a checked file, and the term it belongs to |
| `skipped` | A `--check` path that is not a readable file, so nothing in it was checked |
| `summary` | Counts, always last |

`covered: true` means every term the question needs is defined and live. That is coverage, not truth: the words exist, which says nothing about whether the squad can answer the question or whether the answer is right.

## Verbs

### add (and revise)

1. Take the term from the human's words: the key, the label they would write in prose, the kind, a one-sentence definition, the words to avoid, relations, and the source (`goal`, `human`, a file path). Ask only for what is missing, in one message.
2. Run the default mode first if the file exists. If the key is already live, this is a **revise**: go to step 4.
3. Draft the block in the template's format. Before showing it, check it against the live terms: an avoided word that is another term's key or label, a word another live term already avoids, or a relation to a term that does not exist will make the block invalid. Fix it with the human in the same message.
4. **Revise means reword, not redefine.** Rewording that keeps the meaning edits the block in place, shown as a diff. A changed meaning is a different concept: retire the old term (see **retire**) and add the new one under a new key, so work written under the old meaning still points at the old definition.
5. Show the exact block (or diff) and ask: *"That's the block. I'll write it to `.squad/ontology.md`. Go, or tell me what to change?"* Write nothing before the answer.
6. On go: if the file does not exist, create it with a first line `# Squad vocabulary` and a blank line, then the block. Otherwise append the block, or apply the diff.
7. Run the default mode. Done when the new key prints as a `term` line. If it prints as `invalid`, show the reasons and fix them with the human before moving on.

### add a question

A competency question is something the squad must be able to answer, written down so the words it needs are written down too.

1. Take the question in one line (`Asks`) and the term keys it needs (`Needs`).
2. Show the block, confirm, append, run the default mode.
3. Done when the question prints. If `covered` is false, list the `missing` keys and offer **add** for each. Coverage is a prompt for vocabulary work, never a claim that the question is answered.

### inspect

1. Run `--index` and print it as is: it is exactly what the next dispatch will bake into prompts. If it ends with `+N more terms not shown`, the cap (40 terms) cut it, and roles will not see those terms. The tail does not name the file, because a role is never sent to read it. To show the human the rest, use the default mode in step 2: it lists every term.
2. Run the default mode and summarise from it: invalid blocks with reasons, retired terms, questions with `covered: false` and what they miss.
3. If the output is empty, say there is no ontology yet and stop. Offer **add** only if the human asks for it.

### check

1. Take the files to check from the human (a role's deliverables, a brief, a role file).
2. Run `--check <file>...`. Each `drift` line names the avoided word, the term it belongs to, the file and the line.
3. Report every drift line, grouped by file, with the term's label as the suggested word. Name every `skipped` path too: nothing in it was checked.
4. Edit a file only when the human asks, and only a file outside `.squad/ontology.md`. Never edit a role's deliverable on its behalf without the human's go.

`--check` sees only exact avoided words and phrases, case-insensitive, as whole words. A plural, a paraphrase, or a phrase split across lines is not seen. Say "no drift found", never "the vocabulary is followed".

### retire

1. Name the term and show its block.
2. Run the default mode and list what retiring it affects: every live term whose `Relates` targets it (each becomes invalid with `dangling_relation` until fixed), and every question that `Needs` it (each becomes uncovered).
3. Show the diff (`Status: live` to `Status: retired`, or the added line) together with the fixes for the dependents, and confirm all of it as one write set.
4. Write. Run the default mode. Done when the term prints with `status: retired` and no new `invalid` line appeared.

Retire, never delete: a retired block keeps the old meaning on record for anything written under it. Retired terms leave the index, the drift check and the export.

### export

1. Run `--skos`. It prints SKOS Turtle for the live valid terms: `skos:Concept`, `skos:prefLabel` (Label), `skos:definition`, `skos:hiddenLabel` (each avoided word) and `skos:related` (each relation target), under the namespace `urn:squad-os:term:`.
2. Print it, or write it to the path the human names. Never pick a path for them.
3. State what SKOS does not carry: Kind, Source, relation names (`skos:related` is one unnamed, symmetric link), retired terms and questions. The Markdown file stays the source of truth; the export is a one-way snapshot (ADR 0005).

## Limits

- The definitions are only as good as the human's agreement. Nothing checks that a definition is true, useful or consistent with another in meaning.
- A role can still write an avoided word. The prompt instruction and the after-the-fact `--check` are the whole defence.
- One file, one project. There is no import from another project's vocabulary and no merge.
- Exported squad snapshots (`squad-roster` export, to Claude Code or Codex) do not carry the ontology yet: the exporter copies the goal and role goals, not `.squad/ontology.md`, and bakes no vocabulary section. A squad exported today loses its vocabulary.
- The evidence that a shared vocabulary improves multi-agent work is thin: small 2026 preprints and practitioner guidance. Treat it as a cheap discipline worth trying, not a measured gain.

## What this skill does not do

- Does not let a role add, revise or retire a term, and does not take a role's report as approval. A role's Caveats line is a request; the human's go in this session is the approval.
- Does not run on its own. `squad-onboard` proposes starter terms at its decomposition step and writes the ones the human confirms (the one exception to the exact-block rule, above). `squad-role` proposes a missing term in its Confirm step and writes it through this skill's **add**, with the usual exact-block confirmation.
- Does not get parked or switched with a squad. Like `.squad/partner.md`, the vocabulary belongs to the project, and it is committed with it.

Files in this skill

  • SKILL.md11.2 KB
  • scripts/ontology.sh22.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.