/jerry:astfrom jerry
Provides structured markdown AST operations for Jerry documents: parse, query frontmatter, modify fields, validate nav tables, render, and extract reinject directives via the jerry ast CLI.
Ships in jerry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Version: 1.1.0 Framework: Jerry Framework v0.9.0 Layer: CLI adapter (single entry point to domain layer)
| Section | Purpose |
|---|---|
| Overview | What this skill does and why |
| When to Use This Skill | Triggers and use cases |
| Operations Reference | All available CLI commands |
| Quick Reference | Copy-paste examples for common tasks |
| Routing Disambiguation | When this skill is the wrong choice |
| Constitutional Compliance | Principle mapping with consequences |
| Architecture Notes | Layer compliance and design |
The AST skill provides structured markdown operations for Claude agents working
within the Jerry Framework. All operations are exposed via the jerry ast CLI
namespace, which is the single adapter between agents and the
src.domain.markdown_ast domain layer.
> **Key:** Value fields as a JSON object.Invoke /ast when you need to:
NEVER invoke this skill when:
See Routing Disambiguation for full exclusion conditions with consequences.
All operations are invoked via jerry ast <command>. In agent context, use the
--directory prefix:
uv run --directory "${CLAUDE_PLUGIN_ROOT}" jerry ast <command> [args]
jerry ast parse <file>
Parse a markdown file and output the full AST as JSON (tokens + tree).
Exit codes: 0 success, 2 file error.
jerry ast frontmatter <file>
Extract all blockquote frontmatter fields as a JSON object.
Output: {"Type": "story", "Status": "pending", ...} or {} if no frontmatter.
Exit codes: 0 success, 2 file error.
jerry ast modify <file> --key <KEY> --value <VALUE>
Modify one frontmatter field and write the updated content back to disk.
Output: {"file": "...", "key": "...", "value": "...", "status": "modified"}
Exit codes: 0 success, 1 key not found, 2 file error.
jerry ast validate <file> [--schema <type>] [--nav]
Validate file structure against H-23/H-24 nav table rules and optionally against an entity schema.
Without --schema: Returns JSON with nav table validation results.
With --schema <type>: Validates against entity schema (epic, feature,
story, enabler, task, bug). Returns JSON with both nav table and schema results.
With --nav: Includes detailed nav table entries in the output
(section_name, anchor, description, line_number).
Output JSON keys:
| Key | Type | Description |
|---|---|---|
is_valid | bool | True only when nav and schema are both valid |
nav_table_valid | bool | True if nav table exists and covers all ## headings |
missing_nav_entries | list | Heading texts absent from nav table |
orphaned_nav_entries | list | Nav entries with no matching heading |
schema_valid | bool | True when schema passes or no schema provided |
schema_violations | list | Violation dicts (with --schema only) |
nav_entries | list | Detailed entries (with --nav only) |
Exit codes: 0 success, 1 validation failure, 2 file/schema error.
jerry ast render <file>
Parse a file and output normalized (mdformat) markdown to stdout.
Exit codes: 0 success, 2 file error.
jerry ast reinject <file>
Extract all L2-REINJECT directives from a markdown file as a JSON list.
Output: List of dicts with rank, tokens, content, line_number.
Exit codes: 0 success, 2 file error.
jerry ast query <file> <selector>
Query AST nodes by type (e.g., heading, blockquote, paragraph).
Output: {"selector": "...", "count": N, "nodes": [...]}
Exit codes: 0 success, 2 file error.
uv run jerry ast frontmatter projects/PROJ-005-markdown-ast/work/EPIC-001-markdown-ast/FEAT-001-ast-strategy/ST-005-ast-skill/ST-005-ast-skill.md
uv run jerry ast modify projects/PROJ-005-markdown-ast/work/EPIC-001-markdown-ast/FEAT-001-ast-strategy/ST-005-ast-skill/ST-005-ast-skill.md --key Status --value in-progress
uv run jerry ast validate --nav .context/rules/quality-enforcement.md
uv run jerry ast reinject .context/rules/quality-enforcement.md
uv run jerry ast parse .context/rules/quality-enforcement.md
uv run jerry ast validate --schema story projects/PROJ-005-markdown-ast/work/EPIC-001-markdown-ast/FEAT-001-ast-strategy/ST-005-ast-skill/ST-005-ast-skill.md
When this skill is the wrong choice and what happens if misrouted.
| Condition | Use Instead | Consequence of Misrouting |
|---|---|---|
| Reading raw file content without structural parsing | Read tool directly | AST parsing overhead applied to simple file reads wastes CLI invocation cost; JSON output format adds unnecessary complexity for content retrieval |
| Writing arbitrary content to files | Write/Edit tools directly | AST modify is scoped to frontmatter field updates only; arbitrary content writes require direct file tools |
| General text processing on non-entity markdown | Read/Write/Edit tools directly | AST validation schema applied to non-entity markdown produces false-positive structural errors; entity schema enforcement rejects valid non-worktracker files |
| Research, analysis, or investigation tasks | /problem-solving | AST provides structural parsing only; no analytical methodology, no research capability, no root cause investigation |
| Validating content quality or adversarial review | /adversary | AST validates structural compliance (H-23/H-24 nav tables, entity schemas), not content quality; no S-014 scoring rubric |
All operations adhere to the Jerry Constitution v1.0:
| Principle | Requirement | Consequence of Violation |
|---|---|---|
| P-003 | NEVER spawn recursive subagents -- max 1 level | Agent hierarchy violation; uncontrolled token consumption |
| P-020 | NEVER override user intent -- ask before destructive ops | Unauthorized action; trust erosion |
| P-022 | NEVER deceive about actions, capabilities, or confidence | Governance undermined; quality assessment invalidated |
The jerry ast CLI namespace (src/interface/cli/ast_commands.py) is the
single adapter between agents and the domain layer. There is no separate
skill script — the CLI is the adapter:
jerry ast <command> <- CLI (interface layer)
-> src.domain.markdown_ast <- domain layer
The domain layer (src/domain/markdown_ast/) does NOT import back into the
interface layer (H-07 enforced by architecture boundary tests).
| Topic | Location |
|---|---|
| Domain layer exports | src/domain/markdown_ast/__init__.py |
| CLI commands | src/interface/cli/ast_commands.py |
| CLI parser | src/interface/cli/parser.py |
| Unit tests | tests/unit/interface/cli/test_ast_commands.py |
| Integration tests | tests/integration/cli/test_ast_subprocess.py |
| H-23/H-24 rules | .context/rules/markdown-navigation-standards.md |
| Quality enforcement | .context/rules/quality-enforcement.md |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub geekatron/jerry --plugin jerry32 skills in this plugin
/adversaryOn-demand adversarial quality reviews using strategy templates. Selects strategies by criticality level, executes adversarial templates against deliverables, and scores quality using LLM-as-Judge rubric. Integrates with quality-enforcement.md SSOT./architectureThis skill should be used when the user asks to "design system", "create ADR", "review architecture", or mentions architectural decisions./bootstrapThis skill should be used when the user says "bootstrap", "set up Jerry", "configure guardrails", "initialize Jerry", or asks how to get started with Jerry. Sets up Jerry's context distribution by syncing behavioral rules and patterns.Other plugins' skills for the same job