Why: two blind verifiers re-ran the five preceding commits and found four defects of the same class this branch exists to close -- a confidently stated measured claim that does not survive re-measurement -- this time inside the fixes themselves. - AGENTS.md:41 still carried both phrasingsc68e864reports having corrected. `grep -rn repo-defined` returned exactly one hit repo-wide: that line, in the file every session preloads.4d336bbedited the line directly above it. - ADR-0021 asserted twice, in the section justifying that no gate is added, that the ADR-0020 validators "never open an apm.yml". All three open and yaml.safe_load it (skill-size-check.sh:342, both validate.sh). The conclusion survives -- none reads the description: key, and their globs are SKILL.md and *.agent.md only -- but the stated mechanism is falsified by one grep. - architecture.md said the ADR directory holds 20 numbered ADRs;c7ba3d2made it 21, andc68e864audited that file for exactly this class of stale count. The number is dropped rather than corrected: `ls docs/adr/` is already the index, so a count in prose is a second thing to maintain. - gates.md's new three-verdict table said `-> name` promotes an unresolved target to ERROR. Reproduced with fixtures: NAME_HYPH (skill-size-check.sh:543) requires a hyphen, so `-> gitea-prs` is checked and `-> triage` is not extracted at all, and the unicode arrow is never recognised. The SUGGESTION text advises that spelling, so taking its advice can silence the finding. The gap is now documented as a defect; nothing covers it, since the one arrow case in test-adr0020-targets.sh happens to use a hyphenated target. Implementation notes: - AGENTS.md:48's coverage claim is shrunk rather than chased. Restoring six glossary entries did not make it true: 12 more sampled terms are undefined, three of them (trigger/capability/boundary clause) used inside CONTEXT.md itself. It now says CONTEXT.md is the glossary and is not exhaustive. - CONTEXT.md's output profile and near-miss entries are corrected against their sources. The first stated a false exclusion -- .github/plugin/plugin.json IS apm-generated; only the marketplace mirror has no profile. The second inverted its source's referent: description-quality.md defines a near-miss as a query, not a sibling skill. - The strict-mode message named jq, which no suite guards on (`command -v jq` appears nowhere in tests/), while omitting python3/PyYAML, which three do. - README's git and gitea bullets now name git-workflow and gitea-workflow. ADR-0021 leaves README the only inventory and architecture.md now points at it, so the two bullets that were short had to be completed. - ADR-0018's 2026-08-14 correction is marked superseded in place. It asserted machine state in the present tense that its own 2026-08-17 note retracts. - ADR-0021's remaining errors: six files -> four (measured fromde84d1b), the wiki description's length 114 -> 96 chars, the codex self-contradiction, the cost argument overstating bumps already owed for any skill addition, and two claims about files this branch went on to edit. - The "15 of 17 suites" figure is restored where I had removed it: it is a dated record of one incident, not a live count, and four sites now describe it the same way. Impact: 16/16 pre-push hooks pass, suite 24 passed 0 skipped 0 failed. No behaviour change; every edit is prose or a comment. Refs: #105 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmFqzpuExLJv3m114XVE9w
227 lines
11 KiB
Markdown
227 lines
11 KiB
Markdown
---
|
|
name: AI Development Repo
|
|
description: The domain language of the global AI development config repository
|
|
---
|
|
|
|
# AI Development Repo
|
|
|
|
The bounded context of this repo is **how agent instructions are authored, packaged, distributed, and
|
|
kept small**. Terms here name concepts specific to that problem. Mechanics live elsewhere:
|
|
`docs/spec/architecture.md` for structure, `docs/spec/gates.md` for enforcement, `docs/adr/` for
|
|
decisions.
|
|
|
|
## Language
|
|
|
|
### Context cost
|
|
|
|
**Preload tax**:
|
|
The always-on context cost of every installed skill's `name` and `description`, charged from the
|
|
first token of every session whether the skill is invoked or not. Measurement method and current
|
|
figure: ADR-0020.
|
|
_Avoid_: context cost, token overhead
|
|
|
|
**Skill context contract**:
|
|
The ADR-0020 authoring rules that hold the preload tax and body size down — a description carries a
|
|
trigger clause, at most one capability clause, and a boundary clause, and nothing else. Thresholds
|
|
and the target-resolution walk: `docs/spec/gates.md`.
|
|
_Avoid_: skill budget, size limit
|
|
|
|
**Dispatch body**:
|
|
The body pattern a skill with two or more mutually exclusive flows must use — the body carries only
|
|
the dispatch table and the gates common to every branch, and each flow lives in its own
|
|
self-contained `references/` file. Exemplar: `apm-workflow`.
|
|
_Avoid_: router body, thin body
|
|
|
|
**Hand-invoked skill**:
|
|
A skill reached only by typing its slash command, declared `disable-model-invocation: true`. The host
|
|
withholds it from the model-visible listing entirely, so it pays no preload tax and its description
|
|
becomes human-facing text. Exemplar: `zoom-out`.
|
|
_Avoid_: manual skill, disabled skill
|
|
|
|
**Delegation discipline**:
|
|
The agent-side counterpart to the dispatch body. A plugin-scope agent is a single `.agent.md` file
|
|
with no sibling `references/` directory, so it cannot disclose to itself — it can only delegate to
|
|
skills. Its characteristic defect is therefore restatement, not length.
|
|
_Avoid_: agent hygiene
|
|
|
|
### Distribution
|
|
|
|
**Skill**:
|
|
A reusable slash command defined as a `SKILL.md` file following the
|
|
[Agent Skills open standard](https://agentskills.io), authored at
|
|
`plugins/<plugin>/.apm/skills/<skill>/SKILL.md`.
|
|
_Avoid_: command, prompt, macro
|
|
|
|
**Plugin**:
|
|
The deployable unit — one or more skills, agents, hooks, commands, and MCP servers bundled into a
|
|
single installable directory under `plugins/<name>/`, compiled from that plugin's `.apm/` source.
|
|
_Avoid_: package, bundle, module
|
|
|
|
**apm package**:
|
|
The unit apm builds and installs — `plugins/<name>/apm.yml` plus the hand-authored
|
|
`plugins/<name>/.apm/` tree it compiles from (ADR-0015).
|
|
_Avoid_: plugin directory, source tree
|
|
|
|
**Content mirror**:
|
|
The generated flat `skills/`, `agents/`, `commands/`, `instructions/`, `extensions/` directories and
|
|
merged `hooks/hooks.json` at a plugin root — also called the flat mirror — compiled from that
|
|
plugin's `.apm/` tree so hosts that convention-scan those paths discover the content (ADR-0017).
|
|
_Avoid_: generated copy, duplicate tree
|
|
|
|
**Output profile**:
|
|
An `apm pack` target format for a generated *marketplace* manifest; apm has `claude`
|
|
(`.claude-plugin/marketplace.json`) and `codex` (the differently-shaped
|
|
`.agents/plugins/marketplace.json`), and none for `.github/plugin/marketplace.json` (Copilot CLI's
|
|
legacy path), which a sync script mirrors instead. Mechanics: `docs/spec/architecture.md`.
|
|
_Avoid_: build target, export format
|
|
|
|
**Plugin marketplace**:
|
|
A Git repository carrying a `marketplace.json` manifest that lists installable plugins. There is no
|
|
backend, registry, or SaaS — the Git repo is the marketplace.
|
|
_Avoid_: registry, store, catalogue
|
|
|
|
**holocron**:
|
|
This repository, in its role as a plugin marketplace and as the remote the six plugin dependencies
|
|
resolve against.
|
|
_Avoid_: the marketplace, upstream
|
|
|
|
**apm-consumed install**:
|
|
How this repo installs its own plugins as of 2026-08-14 — six `dependencies.apm` entries in the root
|
|
`apm.yml` deployed by `apm install`, rather than `claude plugin install <name>@holocron`. Its
|
|
consequences: ADR-0018.
|
|
_Avoid_: apm install, dependency install
|
|
|
|
**Provenance chain**:
|
|
The three-stage traceability record linking a skill back to its research inputs: `/research` produces
|
|
topic docs and a `sources.md`; the author skill records which sources informed which files in
|
|
`references/sources.md` and `source_keys` frontmatter; `skill-audit` validates the chain is complete
|
|
and internally consistent.
|
|
_Avoid_: sources, citations, attribution
|
|
|
|
### Governance
|
|
|
|
**HITL** (human-in-the-loop):
|
|
The agent pauses before a consequential action and a human approves before execution. Required for
|
|
irreversible or high-stakes actions — architecture changes, production deployments, security
|
|
configuration.
|
|
_Avoid_: manual approval, gated action
|
|
|
|
**HOTL** (human-on-the-loop):
|
|
The agent acts and a human monitors, able to intervene after the fact. Acceptable only for
|
|
low-stakes, bounded, reversible actions where the cost of pausing exceeds the blast radius of an
|
|
error.
|
|
_Avoid_: autonomous, unsupervised
|
|
|
|
**Sycophancy**:
|
|
The failure mode where an RLHF-trained model prioritises approval over accuracy — changing a correct
|
|
answer to a wrong one under user pressure, then persisting in the wrong answer. Treated here as a
|
|
first-class reliability risk, not a quality-of-life concern.
|
|
_Avoid_: agreeableness, people-pleasing
|
|
|
|
### Documents
|
|
|
|
**AGENTS.md**:
|
|
The provider-agnostic always-on instruction file, in plain markdown with no provider-specific syntax
|
|
(ADR-0003). Two exist: repo-level, and the global `core/AGENTS.md` deployed to `~/.agents/AGENTS.md`.
|
|
_Avoid_: instructions file, system prompt
|
|
|
|
**Thin adapter**:
|
|
A provider-specific instruction file (`CLAUDE.md`, `.cursor/rules/*.mdc`, `copilot-instructions.md`)
|
|
that imports its `AGENTS.md` and adds only that provider's syntax, carrying no original always-on
|
|
content of its own (ADR-0002, ADR-0003).
|
|
_Avoid_: wrapper, shim, provider file
|
|
|
|
**LESSONS.md**:
|
|
The long-loop feedback log for patterns observed across sessions, at the repo root.
|
|
_Avoid_: changelog, retro, postmortem
|
|
|
|
**Management Application**:
|
|
A separate product in a separate repo for browsing, editing, and configuring AI development configs
|
|
through a product UI, with Git as an invisible persistence layer. Repo-agnostic; this repo is its
|
|
canonical default content. Roadmap: `docs/VISION.md`.
|
|
_Avoid_: the UI, the dashboard, the app
|
|
|
|
### Quality
|
|
|
|
**Skill composition**:
|
|
A skill calling another skill by name to delegate a sub-task — the caller owns the orchestration
|
|
decision ("when to do X"), the callee owns the mechanics ("how to do X").
|
|
_Avoid_: chaining, nesting, sub-skill
|
|
|
|
**Vale audit prefilter**:
|
|
The deterministic Vale pass that runs ahead of `skill-audit`/`agent-audit`'s Description dimension,
|
|
so LLM judgment is spent only on what a pattern cannot catch. Mechanics: `docs/spec/gates.md`.
|
|
_Avoid_: linting, style check
|
|
|
|
**Authoring root**:
|
|
The directory a gate resolves against — the nearest ancestor of the file being checked holding
|
|
`plugins/*/.apm/skills` or `plugins/*/.apm/agents`, falling back to the nearest ancestor holding
|
|
`.git`. The walk: `docs/spec/gates.md`.
|
|
_Avoid_: repo root, project root
|
|
|
|
**Near-miss**:
|
|
A query that shares keywords with this skill but needs a different one — and, by extension, the
|
|
sibling that would wrongly answer it; boundary clauses exist to exclude genuine near-misses rather
|
|
than to enumerate siblings. Detail: `skill-audit/references/description-quality.md`.
|
|
_Avoid_: overlap, similar skill
|
|
|
|
**Vacuous green**:
|
|
A check that reports success because it measured nothing — zero files scanned, an unparsed value read
|
|
as empty, a conditional branch that never armed.
|
|
_Avoid_: false pass, clean run
|
|
|
|
**Issue**:
|
|
The cross-provider term for a tracked unit of work. Gitea is this repo's canonical tracker
|
|
(ADR-0007), but skills say "linked issue" generically rather than naming a provider.
|
|
_Avoid_: ticket, card, task
|
|
|
|
## Relationships
|
|
|
|
- A **Plugin** bundles one or more **Skills** and agents; a **Plugin marketplace** lists **Plugins**;
|
|
**holocron** is this repo wearing that hat.
|
|
- Every model-invocable **Skill** pays the **Preload tax**. A **Hand-invoked skill** does not — which
|
|
is the first question to settle when authoring one.
|
|
- The **Skill context contract** bounds both the **Preload tax** (description) and the body.
|
|
A **Dispatch body** is how a skill stays inside it; **Delegation discipline** is how an agent does.
|
|
- **AGENTS.md** is the source of always-on rules; a **Thin adapter** imports it and originates
|
|
nothing.
|
|
- **Skill composition** is the caller/callee split. `forge` routes a genuinely *undecided* artifact
|
|
type to the matching author skill — an already-specified fix (file, line, and change known) calls
|
|
that author skill directly, because each routing hop re-derives instructions from a shorter brief
|
|
and has been observed to drop hard constraints handed down the chain.
|
|
- **HITL** and **HOTL** are exclusive per action class, and the choice must be explicit and
|
|
documented. **Sycophancy** is why HOTL is not the safe default.
|
|
- A **Skill** built on research carries a **Provenance chain**; `skill-audit` fails it when broken.
|
|
- **LESSONS.md** feeds the standing files: three or more entries on one pattern graduate the pattern
|
|
into the relevant standing document.
|
|
|
|
## Example dialogue
|
|
|
|
> **Dev:** "This one only fires when someone types the slash command. Does its description still need
|
|
> trigger words?"
|
|
> **Maintainer:** "No — that's a **hand-invoked skill**. The host withholds it from the model-visible
|
|
> listing, so it pays no **preload tax** at all and the description is human-facing text."
|
|
> **Dev:** "Then the body can be as long as it needs to be?"
|
|
> **Maintainer:** "Different budget. The **skill context contract** gates the body whether or not the
|
|
> skill is model-invoked — the description competes with every other skill's description, the body
|
|
> competes with the caller's live conversation. Four mutually exclusive flows means a **dispatch
|
|
> body**: table in `SKILL.md`, one `references/` file per flow."
|
|
> **Dev:** "And if I split it into an agent instead?"
|
|
> **Maintainer:** "Then you're in **delegation discipline** territory. An agent has no `references/`
|
|
> to disclose to, so the failure mode flips — it stops being length and starts being restatement of
|
|
> a procedure some skill already owns."
|
|
|
|
## Flagged ambiguities
|
|
|
|
- "skill" was used for both the authored `SKILL.md` under `plugins/<name>/.apm/skills/` and the
|
|
deployed copy under `.claude/skills/` — resolved: the authoring source is the **Skill**; the
|
|
deployed copy is gitignored `apm install` output and is never edited.
|
|
- Skills can answer to two names, bare (`gitea-prs`) and namespaced (`gitea:gitea-prs`), depending on
|
|
whether a native install exists at user scope alongside the apm one (ADR-0018) — resolved: write
|
|
the bare name, which is the only form `apm install` produces.
|
|
- "context" means both the model's live token window (the **Preload tax** sense) and the bounded
|
|
domain this file describes — resolved: unqualified "context" in this repo means the token window.
|
|
- "audit" was used for both an author skill's inline closeout and `forge`'s independent
|
|
clean-context recheck — resolved: these are two distinct layers, kept separate precisely because
|
|
an audit running in the same context as the work it checks shares that work's blind spots.
|