docs-audience-tracks-apply
Skill0 starsChanged 3 months agoMITView on GitHub
Audits a repository against the canonical-language file under spec/project/docs-audience-tracks/ and, with per-item user approval, scaffolds or patches the documentation-tracks layer: per-page `track:` frontmatter across the per-language docs/ tree, required user-docs and developer-docs content blocks, and the audience-to-track mapping in the project's audience artefact. Three operations: `audit` (read-only conformance report), `migrate` (brownfield), `patch` (additive fixes one finding at a time). Invoke when the user asks to apply, audit, migrate, or patch documentation tracks against the spec; also handles equivalent German-language requests. Don't use for the MkDocs skeleton (`mkdocs-structure-apply`), audience artefact (`audience-identify`), page content (`audience-doc-author`), drift detection (`docs-freshness-checker`), or prose mechanics (`prose-vale-curator`). Supports resume on re-invocation per `spec/claude/resumable-work/`.
- Commits and pushes
In this repository36 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audience-identifySkill
- backlog-delivery-orchestrateSkill
- backstage-catalog-generateSkill
- blog-authorSkill
- blog-author-triggerSkill
- cicd-pipeline-designSkill
- continuous-improvement-triageSkill
- cookiecutter-template-manageSkill
- docs-dry-refactorSkill
- github-issue-templates-applySkill
- issue-backlog-partitionSkill
- issue-batch-orchestrateSkill
- issue-orchestrateSkill
- lektorat-applySkill
- lektorat-auto-reviseSkill
- mermaid-diagrams-applySkill
- mkdocs-structure-applySkill
- permission-allowlist-maintainSkill
- portfolio-auditSkill
- portfolio-inflight-triageSkill
- project-structure-applySkill
- pull-request-createSkill
- pull-request-mergeSkill
- pull-request-runner-sweepSkill
- readme-structure-applySkill
- release-notes-curateSkill
- release-publish-triggerSkill
- requirements-elicitSkill
- spec-drift-auditSkill
- specSkill
- tech-stack-captureSkill
- vocab-drift-auditSkill
- workflow-health-triageSkill
- working-copy-startSkill
- yaml-json-schemaSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
When the spec isn't present in the target repository, fall back to the copy shipped by the nolte-shared plugin (read it at runtime from …
- Distinctive: line 38
Mid-flow user approval is the contract: Every page-frontmatter edit, every content-block scaffold, and every audience-artefact patch is …
- Very specific: line 69
Check for uncommitted changes in docs/, the audience artefact, and mkdocs.yml.
- Distinctive: line 95
When the repository serves both tracks but the Home page doesn't route between them, propose a one-paragraph addition to the Home page that …
- Very specific: line 96
After every successful write, re-run mkdocs build --strict so the user sees the change verified end-to-end.
- Very specific: line 123
Dirty
docs/tree blocks the operation: if uncommitted changes exist in docs/<lang>/, the audience artefact, or mkdocs.yml when the skill … - Very specific: line 129
Read examples/01-audit-track-coverage.md when running a read-only audit and classifying each Acceptance-Criteria item as pass / missing / …
- Very specific: line 130
Read examples/02-migrate-brownfield-tree.md when running migrate on a brownfield tree where most pages lack track: frontmatter, under …
- Very specific: line 131
Read examples/03-patch-audience-track-mismatch.md when running patch on a single audience-track mismatch finding and offering the two …
- Very specific: line 143
Always: read the spec at runtime: prefer the target repo's spec/project/docs-audience-tracks/<canonical_language>.md.
- Very specific: line 144
Always: verify the build after every write: mkdocs build --strict must run green before the operation ends.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Documentation Audience Tracks Apply
Operationalises spec/project/docs-audience-tracks/<canonical_language>.md inside the current repository. The skill audits whether every page under docs/<lang>/ carries the track: frontmatter, whether each track ships the content blocks the spec mandates, and whether the project's audience artefact maps each audience to a track. With explicit per-item user consent it migrates an existing (brownfield) documentation tree onto the contract or patches a single finding at a time.
When the spec isn't present in the target repository, fall back to the copy shipped by the nolte-shared plugin (read it at runtime from ${CLAUDE_PLUGIN_ROOT}/spec/project/docs-audience-tracks/<canonical_language>.md). Never invent requirements that don't appear in the spec.
Why this is a skill, not an agent
Per spec/claude/skill-vs-agent/ §Decision dimensions, this capability is a skill because:
- Mid-flow user approval is the contract. Every page-frontmatter edit, every content-block scaffold, and every audience-artefact patch is written only with explicit per-change confirmation; the audit is read-only and the apply step is a sequence of approvals an agent's fire-and-forget shape can't carry.
- Persistent on-disk output that flows back into the main conversation. The audit table, the per-page proposals, the audience-artefact diff, and the post-migration
mkdocs build --strictoutput all surface in the conversation so the user can decide; isolating them in a structured-report boundary would obscure the per-file approval surface. - Orchestrator pattern. The skill can dispatch the
audience-doc-authoragent for content-block authoring once the container exists, theaudience-identifyskill for missing audience artefacts, anddocs-freshness-checkerfor the post-migration parity check; perspec/claude/skill-vs-agent/§Hybrid pattern, the orchestrator is always a skill. - Precedent. Follows the same audit + scaffold + patch shape as
mkdocs-structure-apply,project-structure-apply,skill-agent-catalog-apply; portfolio-wide consistency (spec/claude/skill-vs-agent/§Portfolio-wide consistency) favours the same artefact type. - Counter-dimension considered. A narrower agent could specialise on per-page frontmatter rewriting and gain on context-window protection, but the high-impact part is the per-block approval dialogue and the audience-artefact patch — both load-bearing on user judgement, not mechanical generation; skill wins.
User-language policy
Detect the user's language from their message and respond in it. Generated artefacts (docs/<lang>/ frontmatter, content-block placeholder pages, audience-artefact patches) are written in the language the surrounding docs/<lang>/ tree uses; the track: and content_mode: keys are English-only because they're enumeration values, not prose.
Tools used
Tools this skill uses: Read, Write, Edit, Glob, Grep, Bash.
Read/Glob/Grepfor repository inspection (docs/<lang>/ trees, page frontmatter, audience artefact, marker files that indicate active extension specs).Write/Editfor scaffold and patch operations on per-page frontmatter, content-block placeholder pages, and the audience artefact; never overwriting an existing audience artefact wholesale (delegate that toaudience-identify).Bashis necessary formkdocs build --strictverification after migrations and forgit rev-parse --is-inside-work-treeprecondition. No destructive bash (nogit push, nogh pr create, norm).- No
WebFetch/WebSearch: the spec is the only source of truth.
Preconditions
Before doing anything:
- Confirm the working directory is a git repository (
git rev-parse --is-inside-work-tree). - Locate
spec/project/docs-audience-tracks/<canonical_language>.md— either in the target repo or via thenolte-sharedplugin. If neither is reachable, stop and ask the user which spec source to use. - Locate the audience artefact per
spec/project/audience-identification/§Artifact location (AUDIENCES.mdat the bounded-context root, or the documented alternative). If the artefact is missing, stop and route the user to theaudience-identifyskill — this skill cannot proceed without an authoritative audience list. - Locate
mkdocs.ymland derive the language list. Ifmkdocs.ymlis absent, route the user tomkdocs-structure-applyfirst. - Resolve the operation:
- User asked for a read-only audit →
audit. docs/<lang>/pages mostly lacktrack:frontmatter (>50% missing) →migrateis the default (subject to user confirmation).- Single finding to fix →
patch.
- User asked for a read-only audit →
- Check for uncommitted changes in
docs/, the audience artefact, andmkdocs.yml. If the tree is dirty there, report and ask whether to stash, commit, or abort — never overwrite uncommitted work.
Operations
1. audit (read-only)
Walk through the spec's Acceptance Criteria one item at a time, classify each finding as pass, missing, or drift. Group findings by spec area:
- Track frontmatter (per
spec/project/docs-audience-tracks/§Per-page contract): every page underdocs/<lang>/outside_-prefixed snippet folders carriestrack:whose value isuser-docs,developer-docs, or an explicitly opted-in extension value. Report:- Missing-key findings.
- Unrecognised-value findings.
- Audience-to-track mapping (per §Audience-to-track mapping): the audience artefact maps every listed audience to exactly one canonical track, or carries an explicit omission note for an unserved track. Verify the default mapping (
user→user-docs;contributor/operator/release-manager→developer-docs) when the artefact doesn't override. - User-docs content contract (per §User-docs content contract; skip when the audience artefact opts out of
user-docs): the four MUST blocks (installation / onboarding, value proposition, audience, use cases) are present and reachable from the Home page within one navigation step. The two SHOULD blocks (quickstart, troubleshooting) are reported as suggestions, not failures. - Developer-docs content contract (per §Developer-docs content contract; skip when the audience artefact opts out of
developer-docs): the three MUST blocks (setup / prerequisites, tech-stack, interfaces / contracts) are present and reachable from the Home page within one navigation step. The four SHOULD blocks (architecture overview, glossary, troubleshooting, contribution flow) are reported as suggestions. - Content-mode mapping (per §Content-mode mapping): every page declares
trackandcontent_modeindependently; no page infers one from the other. Cross-check against the audience-track mismatch heuristic (audiencevalue mapping to a different track than the page'strackvalue) — report each mismatch. - Home-page contract (per §Home-page contract): when the repository serves both tracks, the Home page (
docs/<lang>/index.md) names both tracks in routing prose.
Audit is read-only — never autofix during audit.
2. migrate (brownfield: most pages lack track:)
For each step below, confirm with the user per file or per group before writing.
- For every page under
docs/<lang>/(outside_-prefixed snippet folders): propose addingtrack:to its frontmatter. Default the value from the page's path and existingaudiencefrontmatter via the portfolio-baseline default mapping; never invent. When neither the path noraudiencegives a deterministic answer, proposetrack: # TODO: confirmand ask the user inline. - For every track the audience artefact serves and that lacks one of the MUST content blocks: scaffold a placeholder page at a stable location (
docs/<lang>/getting-started/installation.mdfor installation,docs/<lang>/index.mdH2 sections for value proposition / audience / use cases,docs/<lang>/getting-started/setup.mdfor setup, …). Write only the container plus the per-page frontmatter contract — page-content authoring belongs to theaudience-doc-authoragent or the human author. - Patch the audience artefact to add the
track:field next to each audience entry. When the artefact uses a structured table or list form (per theaudience-identifyskill's template), insert the new field in the right column or sub-bullet. When the artefact lacks atrackfield shape entirely, propose extending it and route the user to re-runaudience-identify'svalidateoperation afterwards. - When the repository serves both tracks but the Home page doesn't route between them, propose a one-paragraph addition to the Home page that points end users at the user-docs entry and contributors at the developer-docs entry.
- After every successful write, re-run
mkdocs build --strictso the user sees the change verified end-to-end. A failing build stops the operation and surfaces the raw output verbatim; never claim success on a red build.
3. patch (additive: a single finding from a prior audit)
For each missing or drift finding from an audit run, propose the exact change and ask the user to approve it before writing. Don't bundle unrelated changes into a single approval step.
- Missing
track:on a page: propose the value via the default mapping, surface the rationale, request approval. - Unrecognised
track:value: surface the value, list the legal enumeration, request approval for a replacement. - Missing MUST content block: propose the placeholder page (containers only, no prose), request approval.
- Audience-track mismatch: surface the conflict, propose two resolutions (change
track:on the page, or change the audience-artefact entry), request the user's decision. - Audience artefact missing
track:fields: route the user toaudience-identifyto add them through the canonical methodology, rather than patching the artefact from this skill.
Output contract
The skill returns to the user, in this order:
- Operation + target: which operation ran (
audit/migrate/patch), absolute target repo root, detected language list, detected audience artefact location. - Pre-state: brief summary of what was found (audience artefact present?
track:coverage percentage acrossdocs/<lang>/? both tracks served per audience artefact?). - Audit findings (always): grouped per spec area, with one row per Acceptance-Criteria item showing status (
pass/missing/drift) and a one-line evidence snippet. - Planned edits (for
migrate/patch): list of files to create or modify, one line per file, with rationale linking back to the spec line. - Approval gate (for
migrate/patch): explicit user-decision point; nothing is written until the user confirms. - Applied edits (after approval): list of files actually written, with absolute paths.
- Build verification:
mkdocs build --strictexit code plus a raw output snippet on failure; on success report the build summary line only. - Caller follow-ups: explicit list — commit the working-tree edits, dispatch
audience-doc-authorto fill in the placeholder pages' bodies, route toaudience-identifyif the audience artefact needs thetrack:field added through the canonical methodology, open the PR viapull-request-create, and similar.
Gotchas
- Dirty
docs/tree blocks the operation: if uncommitted changes exist indocs/<lang>/, the audience artefact, ormkdocs.ymlwhen the skill starts, it stops and asks — never assume the tree is clean; always run the precondition check (step 6) before proposing any edits. - Frontmatter race condition when the audience artefact is extended mid-flow: if the audience artefact gains a new audience entry while a
migrateis in progress, pages already proposed with the old mapping may be misclassified — re-read the artefact at the start of each per-page approval step when the session spans multiple turns. - Multilingual symmetry is mandatory: adding
track:to a page in the canonical language tree without patching every counterpart in every other language tree configured inspec/.spec-config.ymlis a spec violation (Hard rule 8); always enumerate all configured languages before writing the first page.
Examples
- Read
examples/01-audit-track-coverage.mdwhen running a read-onlyauditand classifying each Acceptance-Criteria item as pass / missing / drift across a bilingual docs tree. - Read
examples/02-migrate-brownfield-tree.mdwhen runningmigrateon a brownfield tree where most pages lacktrack:frontmatter, under per-file approval and symmetric across languages. - Read
examples/03-patch-audience-track-mismatch.mdwhen runningpatchon a single audience-track mismatch finding and offering the two resolutions before writing.
Resumability
Per spec/claude/resumable-work/, this skill is resumable: true. State is persisted to .resume/docs-audience-tracks-apply/<run-id>.yml after every successful user-approval gate and after each named phase boundary. On re-invocation, scan that directory for files with status: in_progress whose inputs: snapshot matches the current invocation; if one matches, prompt the operator with Resume run <run_id> from phase <phase> (last checkpoint <last_checkpoint_at>)? [resume / start-new / discard]. The state-file envelope (schema_version, run_id, inputs, phase, decisions[], status, ...) and the fail-closed semantics on schema or YAML errors are load-bearing in the spec; don't duplicate those rules here.
Hard rules
- Never author the prose body of a content block. The skill creates the containers (placeholder pages with frontmatter, the H1, and a single-paragraph stub naming the block's purpose), but never the prose. Block authoring belongs to the
audience-doc-authoragent or the human author. - Never invent a
track:value when neither the path noraudiencegives a deterministic mapping. The fallback istrack: # TODO: confirmplus an inline question to the user. - Never rewrite the audience artefact wholesale. Inline patches (adding a
track:field next to an existing entry) are permitted; structural rewrites belong toaudience-identify. - Never modify content outside
docs/<lang>/, the audience artefact, and (when explicitly approved) the Home page's routing paragraph. Theme, palette, nav order, and plugin baseline belong tomkdocs-structure-apply. - Always read the spec at runtime: prefer the target repo's
spec/project/docs-audience-tracks/<canonical_language>.md; fall back to the copy shipped by thenolte-sharedplugin only when the target repo lacks one. Never carry a baked-in copy inside the skill itself. - Always verify the build after every write:
mkdocs build --strictmust run green before the operation ends. A red build stops the operation. - Always preserve existing frontmatter keys when patching
track:onto a page that already hastitle/audience/content_mode/last_updated. Addtrack:in its canonical position (betweencontent_modeandlast_updated) without touching the other keys. - Always apply content-block scaffolds and frontmatter patches symmetrically across every language tree configured in
spec/.spec-config.yml'slanguageslist, perspec/project/docs-multilingual-authoring/§Authoring protocol. Adding atrack:key todocs/<canonical_language>/foo.mdwithout applying the same patch to every counterpart indocs/<other_language>/foo.mdis a violation; scaffolding a placeholder block in one language tree without writing the counterpart in every other configured language tree is a violation.
Sources
spec/project/docs-audience-tracks/— the canonical authoritative spec this skill operationalisesspec/project/mkdocs-structure/— the per-page frontmatter MUST set (title,audience,content_mode,track,last_updated) and the seven-section nav baselinespec/project/audience-identification/— the audience artefact this skill consumes and patchesspec/claude/skill-vs-agent/— the skill-vs-agent decision dimensions that justify this artefact as a skill, not an agent
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

