[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M786PAPM4MBNJNHFCJRY8W00":3,"skill-same:01M786PAPM4MBNJNHFCJRY8W00":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":5,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":48},"01M786PAPM4MBNJNHFCJRY8W00","frontmatter-protocol",null,"MANDATORY core standard for frontmatter (the file шапка \u002F header): what it is, why it exists, how to write it, how to read it. Owns the extension mechanism, the lazy-load routing mechanics (core §7), and four extensions: include (skill-frontmatter evaluation, boot-mandatory), tracking (git document tracking), lazyload (reference-card authoring; runtime-mandatory the moment session work touches skills or their references), offline (offline index\u002Fmanifest building). Every skill, memory, or document that carries a YAML frontmatter conforms to this protocol.","kalaverin\u002Fskills","kalaverin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6841312?v=4","01M786EMXK5R6A138KWFAS33T1","Alex Kalaverin","01M786EMYBQEDP3548REZHRX2Q",1,"BSD-3-Clause","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: frontmatter-protocol\ndescription: \"MANDATORY core standard for frontmatter (the file шапка \u002F header): what it is, why it exists, how to write it, how to read it. Owns the extension mechanism, the lazy-load routing mechanics (core §7), and four extensions: include (skill-frontmatter evaluation, boot-mandatory), tracking (git document tracking), lazyload (reference-card authoring; runtime-mandatory the moment session work touches skills or their references), offline (offline index\u002Fmanifest building). Every skill, memory, or document that carries a YAML frontmatter conforms to this protocol.\"\ntriggers:\n  always: true\n  reason: \"Every skill header, reference file, and Serena memory carries a frontmatter; this protocol is the single standard governing all of them.\"\nruntime: true\nrequires:\n  - markdown-protocol\nversion: 0.1.0\n---\n\n# SKILL: Frontmatter Protocol (Core Standard)\n\nThis skill is the single normative source for everything a frontmatter is and does.\nA frontmatter (synonyms: **header**, Russian: **шапка файла** — never \"заголовок\") is the machine-readable YAML block at the very start of a file.\nThis document is the CORE: it is always read whole.\nIts four extensions live in `references\u002F` and add their own key sets and algorithms on top of the core rules.\n\nNormative keywords (`MUST`, `SHOULD`, `MAY`) follow RFC 2119 \u002F RFC 8174 (by `read-for-comments` skill).\n\n## 1. BOOT HARD GATE (read this first)\n\n[ref: #fm-boot-gate]\n\nIf you are an agent reading this text, you MUST **immediately load `references\u002Finclude.md` WHOLE** and apply its algorithms before evaluating any other skill's frontmatter.\nThe boot chain is: system prompt → `bootstrap` (the Startup Gate it owns) → this `SKILL.md` → `references\u002Finclude.md` → evaluation of all other skills' headers.\nOnly include is always loaded (it evaluates every skill header); the lazy-load routing mechanics needed to CONSUME reference corpora live in this core (§7); tracking, lazyload, and offline load per the registry (§8).\n\n## 2. What a Frontmatter Is and Why\n\n[ref: #fm-what-is]\n\n- A frontmatter is a YAML mapping placed at the **very beginning** of a file, delimited by an opening line `---` and a closing line `---`.\n- It is the file's **machine-readable layer**: it exists so an agent can route (decide what to load), track (decide whether content is stale), and evaluate (decide whether a skill applies) **without reading the body**.\n- The body below the frontmatter is the human\u002Fprose layer. What the body looks like (its H1, headings, typography) is governed by `markdown-protocol`, not by this protocol.\n- Three consumer domains exist today: skill entry points (`SKILL.md`), lazy-loaded reference corpora (`references\u002F**\u002F*.md`), and Serena memory files. All three conform to this core; each adds an extension.\n\n## 3. Envelope Grammar (binding)\n\n[ref: #fm-envelope]\n\n1. The opening delimiter MUST be the **first line** of the file: exactly `---` (trailing whitespace tolerated, nothing else).\n2. The YAML block follows: a single YAML **mapping** (keys → values), parseable by a standard YAML parser, encoded in UTF-8.\n3. The closing delimiter MUST be a line containing exactly `---` (same tolerance).\n4. Exactly **one** frontmatter block per file. Nothing precedes the opening delimiter — no blank lines, no comments, no BOM-driven content.\n5. The core mandates **no keys**. Every key a file carries comes from an active extension (§8, §9) or from declared extras.\n\n## 4. The Delimiter Law (binding)\n\n[ref: #fm-delimiter-law]\n\n- Delimiters MUST be matched as **anchored whole lines**: regex `^---[ \\t]*$` (in awk: `\u002F^---[ \\t]*$\u002F`).\n- You MUST NEVER split a file on the bare substring `---`. Bodies legitimately contain `---` inside code blocks and comments; a naive split truncates the frontmatter and produces false YAML errors. Outside code blocks a bare `---` line is FORBIDDEN as a thematic break (`markdown-protocol`: use `***` instead) — and `~~~` is never an alternative, since it collides with fenced-code delimiters in CommonMark.\n- This law applies to every reader: shell one-liners, scripts, validators, and manual extraction alike.\n\n## 5. How to Write (binding)\n\n[ref: #fm-write-rules]\n\n1. The YAML MUST parse cleanly with a standard parser. If it does not parse, the file is non-conformant, period.\n2. The key set is **closed**: a file carries only the keys of its active extensions plus extras declared through the mechanism in §9. No stray keys, no commented-out keys, no \"just in case\" keys.\n3. Scalar style is plain YAML; extensions MAY tighten it (e.g. lazyload requires double-quoted one-sentence strings).\n4. Keep the frontmatter a pure metadata layer: no prose paragraphs, no markdown, no instructions that belong in the body.\n\n## 6. How to Read (binding)\n\n[ref: #fm-read-primitive]\n\nExtract the frontmatter without opening the body, using the delimiter law. Two canonical forms — the ONLY sanctioned dialect:\n\n**Form 1 — explicit file list:**\n\n```bash\nfor f in \"\u003CFILE-1>\" \"\u003CFILE-2>\" ...; do printf '\\n### %s\\n' \"$f\"; awk '\u002F^---[ \\t]*$\u002F{c++; if(c==2) exit; next} c==1{print}' \"$f\"; done\n```\n\n**Form 2 — dynamic file list** (while-read feeder; `LC_ALL=C` for byte-deterministic ordering; safe for paths with spaces):\n\n```bash\nfd \u003CFD-ARGS> 2>\u002Fdev\u002Fnull | LC_ALL=C sort -u | while IFS= read -r f; do printf '\\n### %s\\n' \"$f\"; awk '\u002F^---[ \\t]*$\u002F{c++; if(c==2) exit; next} c==1{print}' \"$f\"; done\n```\n\n- These two forms are the ONLY sanctioned dialect. Deprecated legacy variants: `xargs` wrappers (nested quoting, empty-input quirks on BSD), `$(...)` command-substitution feeders (word-splitting), and looser awk patterns such as `\u002F^---$\u002F` (violates the delimiter law).\n- Documented limits: line-based feeders cannot handle filenames containing newlines (impossible in conformant workspaces; NUL-based variants are rejected — `sort -z` and `read -d` are not portable to macOS\u002FBSD). `fd` prints an error for missing directory arguments but continues with the valid roots — `2>\u002Fdev\u002Fnull` covers absent optional roots.\n- Extensions build their loaders on top of these primitives (e.g. the §7 funnel, include's skill-discovery extraction).\n\n## 7. Lazy-Load Routing (Loader Mechanics)\n\n[ref: #lazy-load-routing]\n\nThis section is the COMPLETE instruction set for **consuming** a conformant reference corpus (`references\u002F**\u002F*.md` carrying `subject`+`index` frontmatter per the lazyload extension). Authoring or validating such corpora requires the lazyload extension (§8) — a reader needs only this section.\n\n**Toolbox discipline (HARD):** the canonical one-liners in §6 and this section are the ONLY sanctioned introspection tools. For every task they address — batch frontmatter extraction, subject maps, marker indexes, anchor-section extraction — the agent MUST use them exactly as written and MUST NOT hand-roll alternatives (`head`, `tail`, blind `rg -A N`, ad-hoc `awk`). **Single source of truth (HARD):** frontmatter-protocol is the ONLY home of introspection one-liners; nothing outside this skill may restate, copy, or paraphrase them — consumers either run the canonical command exactly as written here, or reference it by anchor (`[ref: #fm-read-primitive]`, `[ref: #lazy-load-routing]`). A restated introspection one-liner anywhere else is non-conformant: replace it with the anchor pointer on sight. If a canonical one-liner fails or returns unexpected output for its task, **STOP immediately and ASK the user** with the exact command and its output — do NOT fall back to ad-hoc tooling and do NOT improvise a workaround: the toolbox must be fixed without data loss. **Empty output on an existing file means 'not found' — STOP and ASK before proceeding; a command error or malformed output means STOP and report. No silent continuation in either case, no exceptions.**\n\n**Mental model.** A reference file is read in two stages: (1) **routing** — decide from frontmatter alone WHICH sections to load; (2) **loading** — read only the selected `[ref: #\u003Canchor>]` sections. Never read a whole reference file to decide relevance.\n\n**Card anatomy (reader's view).** `subject` is the file-level coarse router: one line naming every section area of the file. `index` is a flat list of decision cards; each card gates ONE body anchor and carries `what` \u002F `problem` \u002F `use_when` \u002F `avoid_when` \u002F `expected`. Several cards MAY share one anchor (convergence) — load the shared section once.\n\n**Command 1 — subject map** (coarse routing, one line per file; awk instead of sed — BSD sed does not interpret `\\t` in replacements):\n\n```bash\nrg -N -H '^subject:' references\u002F | awk '{sub(\u002F:subject:[[:space:]]*\u002F,\"\\t\"); print}' | LC_ALL=C sort\n```\n\n**Command 2 — full frontmatter of shortlisted files only** (the §6 primitives: Form 1 for an explicit list, Form 2 for a dynamic one).\n\n**Routing rules:**\n\n1. Shortlist candidate files from the subject map using `subject` plus the request **plus inferred session work**; shortlist generously.\n2. Within shortlisted frontmatter, read **every** card and match `what`\u002F`use_when`\u002F`avoid_when` semantically (OR semantics within and across files). Mark each matching card's `anchor`.\n3. **Deduplicate** anchors (convergence), then load each section.\n4. Routing stays in the **main agent**: subagents receive already-selected material.\n\n**Markers and load boundary.** A routable section opens with the literal marker line `[ref: #\u003Canchor>]` at column 0 and runs to the next marker **outside fenced code blocks** or end of file. Bounded section extraction (fence-aware, anchor matched as an exact string — never a blind `rg -A N` window):\n\n```bash\nawk -v a=\"\u003CANCHOR>\" '\u002F^```\u002F{fence=!fence;if(f)print;next} !fence&&$0==\"[ref: #\"a\"]\"{f=1;print;next} !fence&&f&&\u002F^\\[ref: #\u002F{exit} f' references\u002F\u003CFILE>.md\n```\n\nMulti-anchor extraction from one file (one pass per anchor, labeled output):\n\n```bash\nfor a in \u003CA1> \u003CA2> ...; do printf '\\n### [ref: #%s]\\n' \"$a\"; awk -v a=\"$a\" '\u002F^```\u002F{fence=!fence;if(f)print;next} !fence&&$0==\"[ref: #\"a\"]\"{f=1;print;next} !fence&&f&&\u002F^\\[ref: #\u002F{exit} f' references\u002F\u003CFILE>.md; done\n```\n\n(When the anchor id is needed first, the marker index is `rg -n '^\\[ref: #' references\u002F\u003CFILE>.md`.)\n\n## 8. Extension Registry\n\n[ref: #fm-extension-registry]\n\n| Extension | File | Activation (implicit-by-keys) | Load when |\n|---|---|---|---|\n| **include** | `references\u002Finclude.md` | boot-mandatory (§1) | Always — it evaluates every other skill's header. |\n| **tracking** | `references\u002Ftracking.md` | any of `repo`, `branch`, `commit`, `committed_at`, `stale_since` | Reading\u002Fwriting documents with git-tracking fields (Serena memories, user markdowns). |\n| **lazyload** | `references\u002Flazyload.md` | `subject` and\u002For `index` | **Runtime-mandatory on skill work:** the moment the agent realizes the task touches skills at all — authoring or editing a `SKILL.md`, its `references\u002F**` corpus, skill frontmatter, or skill tooling — it MUST load this extension BEFORE the first write. Also mandatory for authoring or validating any reference corpus (writing cards, migrating, running the validator). Pure §7 consumption of a corpus needs only the core. |\n| **offline** | `references\u002Foffline.md` | — (algorithmic, no keys) | Building an offline index\u002Fmanifest over a frontmatter corpus. |\n\n## 9. Extension Mechanism (binding)\n\n[ref: #fm-extension-mechanism]\n\n1. **Implicit activation by keys.** Seeing an extension's keys in a frontmatter activates that extension's full rule set for the file. No explicit opt-in key is required; existing documents conform unchanged.\n2. **Validator expectation (planned).** The validator (`scripts\u002Fvalidate_frontmatter.py`) is planned to accept `--expect-extension \u003Cname>` to hard-require an extension: it will then error on incomplete or contradictory extension field sets (e.g. `branch` without `commit`). Until the flag lands (tracked in the project backlog), only the lazyload profile is enforced mechanically; the other extensions conform editorially.\n3. **Skill-declared extras.** A skill MAY declare additional top-level keys for its own files. Every extra key MUST be declared and documented in that skill's `SKILL.md` (see lazyload §2 for the reference-corpus case).\n4. Extensions MUST NOT contradict the core. A skill addendum MUST NOT contradict an extension it uses.\n5. **`errata` is a cross-cutting optional key** (the conformance repair queue of the *Markdown Headings as a Public API* standard): its rules activate by its presence ALONE, independent of any extension's keys — documents without git-tracking fields (e.g. files outside tracking scope) may conformantly carry it. Its semantics and reason enum live in `markdown-protocol\u002Freferences\u002Fspecification.md` (`[ref: #mds-the-errata-mechanism]`).\n\n## 10. Conformance and Validator\n\n[ref: #fm-conformance]\n\n- The reference validator is `scripts\u002Fvalidate_frontmatter.py` (run with `uv run --no-project --with pyyaml python`). It currently implements the **lazyload** profile; `tracking` and `include` profiles are planned growth (recorded in the project backlog).\n- A file is conformant when: the envelope grammar (§3) holds, the delimiter law (§4) was used to read it, its key set is closed per §9, and every active extension's rules pass.\n\n**Violation protocol:** If you read or write a frontmatter while violating the envelope grammar, the delimiter law, the closed key set, or the boot hard gate, halt immediately, discard the offending operation, reload the violated section, and redo the operation correctly.\n","# SKILL: Frontmatter Protocol (Core Standard)\n\nThis skill is the single normative source for everything a frontmatter is and does.\nA frontmatter (synonyms: **header**, Russian: **шапка файла** — never \"заголовок\") is the machine-readable YAML block at the very start of a file.\nThis document is the CORE: it is always read whole.\nIts four extensions live in `references\u002F` and add their own key sets and algorithms on top of the core rules.\n\nNormative keywords (`MUST`, `SHOULD`, `MAY`) follow RFC 2119 \u002F RFC 8174 (by `read-for-comments` skill).\n\n## 1. BOOT HARD GATE (read this first)\n\n[ref: #fm-boot-gate]\n\nIf you are an agent reading this text, you MUST **immediately load `references\u002Finclude.md` WHOLE** and apply its algorithms before evaluating any other skill's frontmatter.\nThe boot chain is: system prompt → `bootstrap` (the Startup Gate it owns) → this `SKILL.md` → `references\u002Finclude.md` → evaluation of all other skills' headers.\nOnly include is always loaded (it evaluates every skill header); the lazy-load routing mechanics needed to CONSUME reference corpora live in this core (§7); tracking, lazyload, and offline load per the registry (§8).\n\n## 2. What a Frontmatter Is and Why\n\n[ref: #fm-what-is]\n\n- A frontmatter is a YAML mapping placed at the **very beginning** of a file, delimited by an opening line `---` and a closing line `---`.\n- It is the file's **machine-readable layer**: it exists so an agent can route (decide what to load), track (decide whether content is stale), and evaluate (decide whether a skill applies) **without reading the body**.\n- The body below the frontmatter is the human\u002Fprose layer. What the body looks like (its H1, headings, typography) is governed by `markdown-protocol`, not by this protocol.\n- Three consumer domains exist today: skill entry points (`SKILL.md`), lazy-loaded reference corpora (`references\u002F**\u002F*.md`), and Serena memory files. All three conform to this core; each adds an extension.\n\n## 3. Envelope Grammar (binding)\n\n[ref: #fm-envelope]\n\n1. The opening delimiter MUST be the **first line** of the file: exactly `---` (trailing whitespace tolerated, nothing else).\n2. The YAML block follows: a single YAML **mapping** (keys → values), parseable by a standard YAML parser, encoded in UTF-8.\n3. The closing delimiter MUST be a line containing exactly `---` (same tolerance).\n4. Exactly **one** frontmatter block per file. Nothing precedes the opening delimiter — no blank lines, no comments, no BOM-driven content.\n5. The core mandates **no keys**. Every key a file carries comes from an active extension (§8, §9) or from declared extras.\n\n## 4. The Delimiter Law (binding)\n\n[ref: #fm-delimiter-law]\n\n- Delimiters MUST be matched as **anchored whole lines**: regex `^---[ \\t]*$` (in awk: `\u002F^---[ \\t]*$\u002F`).\n- You MUST NEVER split a file on the bare substring `---`. Bodies legitimately contain `---` inside code blocks and comments; a naive split truncates the frontmatter and produces false YAML errors. Outside code blocks a bare `---` line is FORBIDDEN as a thematic break (`markdown-protocol`: use `***` instead) — and `~~~` is never an alternative, since it collides with fenced-code delimiters in CommonMark.\n- This law applies to every reader: shell one-liners, scripts, validators, and manual extraction alike.\n\n## 5. How to Write (binding)\n\n[ref: #fm-write-rules]\n\n1. The YAML MUST parse cleanly with a standard parser. If it does not parse, the file is non-conformant, period.\n2. The key set is **closed**: a file carries only the keys of its active extensions plus extras declared through the mechanism in §9. No stray keys, no commented-out keys, no \"just in case\" keys.\n3. Scalar style is plain YAML; extensions MAY tighten it (e.g. lazyload requires double-quoted one-sentence strings).\n4. Keep the frontmatter a pure metadata layer: no prose paragraphs, no markdown, no instructions that belong in the body.\n\n## 6. How to Read (binding)\n\n[ref: #fm-read-primitive]\n\nExtract the frontmatter without opening the body, using the delimiter law. Two canonical forms — the ONLY sanctioned dialect:\n\n**Form 1 — explicit file list:**\n\n```bash\nfor f in \"\u003CFILE-1>\" \"\u003CFILE-2>\" ...; do printf '\\n### %s\\n' \"$f\"; awk '\u002F^---[ \\t]*$\u002F{c++; if(c==2) exit; next} c==1{print}' \"$f\"; done\n```\n\n**Form 2 — dynamic file list** (while-read feeder; `LC_ALL=C` for byte-deterministic ordering; safe for paths with spaces):\n\n```bash\nfd \u003CFD-ARGS> 2>\u002Fdev\u002Fnull | LC_ALL=C sort -u | while IFS= read -r f; do printf '\\n### %s\\n' \"$f\"; awk '\u002F^---[ \\t]*$\u002F{c++; if(c==2) exit; next} c==1{print}' \"$f\"; done\n```\n\n- These two forms are the ONLY sanctioned dialect. Deprecated legacy variants: `xargs` wrappers (nested quoting, empty-input quirks on BSD), `$(...)` command-substitution feeders (word-splitting), and looser awk patterns such as `\u002F^---$\u002F` (violates the delimiter law).\n- Documented limits: line-based feeders cannot handle filenames containing newlines (impossible in conformant workspaces; NUL-based variants are rejected — `sort -z` and `read -d` are not portable to macOS\u002FBSD). `fd` prints an error for missing directory arguments but continues with the valid roots — `2>\u002Fdev\u002Fnull` covers absent optional roots.\n- Extensions build their loaders on top of these primitives (e.g. the §7 funnel, include's skill-discovery extraction).\n\n## 7. Lazy-Load Routing (Loader Mechanics)\n\n[ref: #lazy-load-routing]\n\nThis section is the COMPLETE instruction set for **consuming** a conformant reference corpus (`references\u002F**\u002F*.md` carrying `subject`+`index` frontmatter per the lazyload extension). Authoring or validating such corpora requires the lazyload extension (§8) — a reader needs only this section.\n\n**Toolbox discipline (HARD):** the canonical one-liners in §6 and this section are the ONLY sanctioned introspection tools. For every task they address — batch frontmatter extraction, subject maps, marker indexes, anchor-section extraction — the agent MUST use them exactly as written and MUST NOT hand-roll alternatives (`head`, `tail`, blind `rg -A N`, ad-hoc `awk`). **Single source of truth (HARD):** frontmatter-protocol is the ONLY home of introspection one-liners; nothing outside this skill may restate, copy, or paraphrase them — consumers either run the canonical command exactly as written here, or reference it by anchor (`[ref: #fm-read-primitive]`, `[ref: #lazy-load-routing]`). A restated introspection one-liner anywhere else is non-conformant: replace it with the anchor pointer on sight. If a canonical one-liner fails or returns unexpected output for its task, **STOP immediately and ASK the user** with the exact command and its output — do NOT fall back to ad-hoc tooling and do NOT improvise a workaround: the toolbox must be fixed without data loss. **Empty output on an existing file means 'not found' — STOP and ASK before proceeding; a command error or malformed output means STOP and report. No silent continuation in either case, no exceptions.**\n\n**Mental model.** A reference file is read in two stages: (1) **routing** — decide from frontmatter alone WHICH sections to load; (2) **loading** — read only the selected `[ref: #\u003Canchor>]` sections. Never read a whole reference file to decide relevance.\n\n**Card anatomy (reader's view).** `subject` is the file-level coarse router: one line naming every section area of the file. `index` is a flat list of decision cards; each card gates ONE body anchor and carries `what` \u002F `problem` \u002F `use_when` \u002F `avoid_when` \u002F `expected`. Several cards MAY share one anchor (convergence) — load the shared section once.\n\n**Command 1 — subject map** (coarse routing, one line per file; awk instead of sed — BSD sed does not interpret `\\t` in replacements):\n\n```bash\nrg -N -H '^subject:' references\u002F | awk '{sub(\u002F:subject:[[:space:]]*\u002F,\"\\t\"); print}' | LC_ALL=C sort\n```\n\n**Command 2 — full frontmatter of shortlisted files only** (the §6 primitives: Form 1 for an explicit list, Form 2 for a dynamic one).\n\n**Routing rules:**\n\n1. Shortlist candidate files from the subject map using `subject` plus the request **plus inferred session work**; shortlist generously.\n2. Within shortlisted frontmatter, read **every** card and match `what`\u002F`use_when`\u002F`avoid_when` semantically (OR semantics within and across files). Mark each matching card's `anchor`.\n3. **Deduplicate** anchors (convergence), then load each section.\n4. Routing stays in the **main agent**: subagents receive already-selected material.\n\n**Markers and load boundary.** A routable section opens with the literal marker line `[ref: #\u003Canchor>]` at column 0 and runs to the next marker **outside fenced code blocks** or end of file. Bounded section extraction (fence-aware, anchor matched as an exact string — never a blind `rg -A N` window):\n\n```bash\nawk -v a=\"\u003CANCHOR>\" '\u002F^```\u002F{fence=!fence;if(f)print;next} !fence&&$0==\"[ref: #\"a\"]\"{f=1;print;next} !fence&&f&&\u002F^\\[ref: #\u002F{exit} f' references\u002F\u003CFILE>.md\n```\n\nMulti-anchor extraction from one file (one pass per anchor, labeled output):\n\n```bash\nfor a in \u003CA1> \u003CA2> ...; do printf '\\n### [ref: #%s]\\n' \"$a\"; awk -v a=\"$a\" '\u002F^```\u002F{fence=!fence;if(f)print;next} !fence&&$0==\"[ref: #\"a\"]\"{f=1;print;next} !fence&&f&&\u002F^\\[ref: #\u002F{exit} f' references\u002F\u003CFILE>.md; done\n```\n\n(When the anchor id is needed first, the marker index is `rg -n '^\\[ref: #' references\u002F\u003CFILE>.md`.)\n\n## 8. Extension Registry\n\n[ref: #fm-extension-registry]\n\n| Extension | File | Activation (implicit-by-keys) | Load when |\n|---|---|---|---|\n| **include** | `references\u002Finclude.md` | boot-mandatory (§1) | Always — it evaluates every other skill's header. |\n| **tracking** | `references\u002Ftracking.md` | any of `repo`, `branch`, `commit`, `committed_at`, `stale_since` | Reading\u002Fwriting documents with git-tracking fields (Serena memories, user markdowns). |\n| **lazyload** | `references\u002Flazyload.md` | `subject` and\u002For `index` | **Runtime-mandatory on skill work:** the moment the agent realizes the task touches skills at all — authoring or editing a `SKILL.md`, its `references\u002F**` corpus, skill frontmatter, or skill tooling — it MUST load this extension BEFORE the first write. Also mandatory for authoring or validating any reference corpus (writing cards, migrating, running the validator). Pure §7 consumption of a corpus needs only the core. |\n| **offline** | `references\u002Foffline.md` | — (algorithmic, no keys) | Building an offline index\u002Fmanifest over a frontmatter corpus. |\n\n## 9. Extension Mechanism (binding)\n\n[ref: #fm-extension-mechanism]\n\n1. **Implicit activation by keys.** Seeing an extension's keys in a frontmatter activates that extension's full rule set for the file. No explicit opt-in key is required; existing documents conform unchanged.\n2. **Validator expectation (planned).** The validator (`scripts\u002Fvalidate_frontmatter.py`) is planned to accept `--expect-extension \u003Cname>` to hard-require an extension: it will then error on incomplete or contradictory extension field sets (e.g. `branch` without `commit`). Until the flag lands (tracked in the project backlog), only the lazyload profile is enforced mechanically; the other extensions conform editorially.\n3. **Skill-declared extras.** A skill MAY declare additional top-level keys for its own files. Every extra key MUST be declared and documented in that skill's `SKILL.md` (see lazyload §2 for the reference-corpus case).\n4. Extensions MUST NOT contradict the core. A skill addendum MUST NOT contradict an extension it uses.\n5. **`errata` is a cross-cutting optional key** (the conformance repair queue of the *Markdown Headings as a Public API* standard): its rules activate by its presence ALONE, independent of any extension's keys — documents without git-tracking fields (e.g. files outside tracking scope) may conformantly carry it. Its semantics and reason enum live in `markdown-protocol\u002Freferences\u002Fspecification.md` (`[ref: #mds-the-errata-mechanism]`).\n\n## 10. Conformance and Validator\n\n[ref: #fm-conformance]\n\n- The reference validator is `scripts\u002Fvalidate_frontmatter.py` (run with `uv run --no-project --with pyyaml python`). It currently implements the **lazyload** profile; `tracking` and `include` profiles are planned growth (recorded in the project backlog).\n- A file is conformant when: the envelope grammar (§3) holds, the delimiter law (§4) was used to read it, its key set is closed per §9, and every active extension's rules pass.\n\n**Violation protocol:** If you read or write a frontmatter while violating the envelope grammar, the delimiter law, the closed key set, or the boot hard gate, halt immediately, discard the offending operation, reload the violated section, and redo the operation correctly.\n",{"name":5,"runtime":24,"version":25,"requires":26,"triggers":28,"description":7},true,"0.1.0",[27],"markdown-protocol",{"always":24,"reason":29},"Every skill header, reference file, and Serena memory carries a frontmatter; this protocol is the single standard governing all of them.","main","7da8c355f6e99dcb88d8bb9f6ff27b3cb35bae47",0,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkalaverin","2026-11-15 01:37:57",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":24},[38,41,44],{"tool":39,"command":40},"npx","npx skills add kalaverin\u002Fskills --skill frontmatter-protocol",{"tool":42,"command":43},"bunx","bunx skills add kalaverin\u002Fskills --skill frontmatter-protocol",{"tool":45,"command":46},"pnpm","pnpm dlx skills add kalaverin\u002Fskills --skill frontmatter-protocol","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002FSKILL.md",[49,55,59,63,67,71,75,79,85],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"prompts\u002FCARD_AUTHORING.md","REFERENCE","参考文档",5661,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Fprompts\u002FCARD_AUTHORING.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"prompts\u002FREFERENCE_MIGRATION_PROMPT.md",12747,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Fprompts\u002FREFERENCE_MIGRATION_PROMPT.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"README.md",6177,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002FREADME.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Finclude.md",25369,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Freferences\u002Finclude.md",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Flazyload.md",29511,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Freferences\u002Flazyload.md",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Foffline.md",9042,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Freferences\u002Foffline.md",{"path":76,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Ftracking.md",18156,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Freferences\u002Ftracking.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fvalidate_frontmatter.py","SCRIPT","脚本",13147,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Fscripts\u002Fvalidate_frontmatter.py",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Fvalidate_memory_stub_port.py",2255,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ffrontmatter-protocol\u002Fscripts\u002Fvalidate_memory_stub_port.py",[90,97,104,111,118,125],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M786R9KK7RP1J8EB7X9TC9KR","todo-protocol","Mandatory protocol for using the SetTodoList tool. Governs when to create a todo list, how to update it without violating immutability rules, how to synchronize item status after every tool call, and the forbidden mutations. Always active.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ftodo-protocol\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M786QZTC43FBK3A251NTY62Y","subagents-protocol","Mandatory protocol for delegating work to built-in subagents (coder, explore, plan), also called our bots by users. Always active. Owns the context-hygiene delegation test (material vs answer, cost balance, warm-instance reuse), launch parameters (mandatory explicit `model`), the single-source model-selection table, answer budgets, degradation handling, the launch checklist, and the role library for delegated review\u002Faudit with intent routing (`references\u002Froles.md`).","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fsubagents-protocol\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M786QSXFDM550NCC4PQXN26X","serena-protocol","MANDATORY skill for Serena (MCP) memory, knowledge base, and symbolic code exploration operations. Use whenever the agent needs to: read or write Serena memories, mutate or persist memory, explore code via symbolic MCP tools, resolve contradictions in stored knowledge, or follow memory metadata, naming, and routing conventions.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fserena-protocol\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M786QMXA58XD5DJZ2AZER5ZP","read-for-comments","Mandatory local standards library and archive. Before fetching any standard from the internet, the agent MUST check the Serena `standard\u002F` archive and this skill's `references\u002F` seed; after ANY standard-body download, the agent MUST archive it per the event-bound Archival Rule. Governs standard lookup, fetch, archival, and the family and full-body rules.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fread-for-comments\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M786QD59A2R2JK1NJTK7MADP","python-lang","MANDATORY skill for Python code. Use when writing, editing, refactoring, or reviewing Python files, modules, packages, classes, functions, type annotations, imports, exceptions, comprehensions, decorators, or docstrings. Enforces Google Python Style Guide and a mandatory, unconditional Ruff format+check pipeline scoped strictly to the agent's own changes.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fpython-lang\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":19},"01M786Q683RHDC93NWABY7XKQN","preflight-checklist","Mandatory session-initialization closer and Startup Gate audit. Always loaded. Runs EXACTLY ONCE at session start, after all skill loading completes: verifies Startup Gate completion with evidence (mirror sync, forced import, discovery, activation, memory priming, MCP declaration, think block), runs dynamic session checks derived from the active skill set (mode states, delegation readiness), and reports a compact evidence-backed verdict table to the user before the first task output. Any FAIL is fixed before proceeding.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fpreflight-checklist\u002FSKILL.md",[],[]]