agentleFS
jyjeannejyjeanne/dita-skills/.github/copilot-instructions.md

dita-skills

Copilot instructions2 starsChanged 6 months agoMITView on GitHub

This repository defines AI-powered skills for DITA XML authoring, targeting DITA writers and XSLT developers. The primary artifact is specification.md, which is the authoritative source for all skill definitions, validation rules, and templates. validate-dita-topic/scripts/validate_dita_topic.py — Python 3.9+, stdlib only (xml.etree.ElementTree). Full rule catalogue: validate-dita-topic/references/RULES.md The project is a specification-driven skill library built around DITA 1.3. Each skill maps to a discrete capability: Skills follow a consistent Input → Parse → Validate/Generate → Structured Output workflow (see §6 of specification.md). Validation…

The file

We split this copilot-instructions.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    IDs: must be unique within a document.

    line 41
  2. Very specific:

    Reuse-first: prefer conref/keyref over duplicating content.

    line 42
  3. Distinctive:

    All skills operate under this system prompt context (§4):

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions

Project Purpose

This repository defines AI-powered skills for DITA XML authoring, targeting DITA writers and XSLT developers. The primary artifact is specification.md, which is the authoritative source for all skill definitions, validation rules, and templates.

Scripts

validate-dita-topic/scripts/validate_dita_topic.py — Python 3.9+, stdlib only (xml.etree.ElementTree).

python validate-dita-topic/scripts/validate_dita_topic.py <file.dita> [topic_type]
# topic_type: topic | concept | task | reference | troubleshooting | glossentry
# Exit 0 = valid, 1 = invalid. Output: JSON { is_valid, errors[], warnings[] }

Full rule catalogue: validate-dita-topic/references/RULES.md

The project is a specification-driven skill library built around DITA 1.3. Each skill maps to a discrete capability:

SkillType
validate-dita-topicValidation
validate-ditamapValidation
validate-bookmapValidation
generate-dita-topicGeneration
generate-ditamapGeneration
generate-bookmapGeneration
dita-best-practicesAnalysis
refactor-dita-contentRefactoring
xslt-dita-helperTransformation

Skills follow a consistent Input → Parse → Validate/Generate → Structured Output workflow (see §6 of specification.md).

DITA 1.3 Conventions

  • Topic types and required body elements: concept → <conbody>, task → <taskbody>, reference → <refbody>, generic topic → <body>
  • Every topic must have <title> and the correct body element; <shortdesc> is recommended
  • Maps: <topicref> must always carry either href or keyref
  • Bookmap hierarchy (in order): booktitle?, bookmeta?, frontmatter?, chapter+, appendix*, backmatter? — at least one <chapter> is required
  • IDs must be unique within a document; validate conref and keyref targets are resolvable
  • Reuse-first: prefer conref/keyref over duplicating content; flag redundant content in best-practices checks

Skill Output Schema

Validation skills return:

{ "is_valid": true|false, "errors": [], "warnings": [] }

Generation skills return well-formed XML using the canonical templates defined in §3 of specification.md. Template placeholders use {{double_braces}} (e.g., {{title}}).

System Prompt Baseline

All skills operate under this system prompt context (§4):

You are a DITA XML expert based on DITA 1.3 specification. Enforce strict XML validity, follow DITA specialization rules, suggest improvements, and promote reusable structured content.

Extensibility

Planned future skills (do not implement without spec entry): Schematron rule generator, DITA specialization assistant, translation readiness checker, content reuse analyzer.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.