agentleFS
jyjeannejyjeanne/dita-skills/ditaval-helper/SKILL.md

ditaval-helper

Skill2 starsChanged 6 months agoMITView on GitHub

Assists with DITAVAL conditional processing files for filtering and flagging DITA content at build time. Use this skill to validate an existing DITAVAL file, generate a new DITAVAL template from a list of conditions, or understand action priority and style-conflict resolution rules. Returns structured JSON for validation or XML output for generation.

The file

Files
SKILL.md

Overview

Two modes: validate an existing DITAVAL file, or generate a new one from conditions.

Usage

# Validate an existing DITAVAL file
python scripts/ditaval_helper.py validate path/to/filter.ditaval

# Generate a DITAVAL template
python scripts/ditaval_helper.py generate \
  --exclude audience=internal \
  --include platform=linux \
  --flag product=enterprise:color=#0055CC \
  --revflag rev=2.1:style=underline

# Pipe a DITAVAL file for validation
cat filter.ditaval | python scripts/ditaval_helper.py validate -

Validation output schema

{
  "is_valid": true,
  "errors": [{ "element": "string", "rule": "string", "message": "string" }],
  "warnings": [{ "element": "string", "rule": "string", "message": "string" }]
}

Rules applied

See references/RULES.md for the full catalogue.

RuleLevel
Root must be <val>Error
<prop> must have att and actionError
action must be include, exclude, flag, or passthroughError
flag with no visual attributes and no <startflag>/<endflag>Warning
Duplicate att+val combinationError
<revprop> must have actionError
<style-conflict> appears more than onceError
imageref path does not exist relative to the DITAVAL fileWarning

Common edge cases

  • A <prop att="audience"> without val sets the default action for all audience values not otherwise listed
  • exclude always wins: if any rule excludes a value, it is excluded regardless of other rules
  • Multiple DITAVAL files in a build are merged; exclude from any file excludes the content

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.