Skip to main content
command

pac-validate — Claude Code command: PAC validation

Validate a Product as Code project’s structure, YAML files, and links between epics and tickets. Use it to check compliance with the PAC specification.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command project-management/pac-validate
Open on GitHub

What pac-validate does

pac-validate checks PAC directories and required files, configuration format, and YAML syntax and fields for epics and tickets. It also checks references, dependencies, timestamps, status changes, and ID uniqueness. Pass a scope, file, or epic to narrow the check, or validate the whole PAC structure.

The command returns a report with compliance status, issues, and suggested fixes. Use --fix to resolve common problems automatically. It relies on Read and Bash and looks for project state under .pac/. Exit code 0 means the project is valid, 1 reports errors, and 2 indicates configuration issues.

What it helps with

  • check PAC directories and required files
  • find YAML errors in epics and tickets
  • verify epic-ticket references and dependencies
  • detect duplicate IDs and inconsistent status data
  • fix common PAC issues with --fix

Example prompts for the agent

  • Validate the whole PAC project and list specification violations.
  • Check this epic and verify its linked tickets.
  • Validate PAC before committing and fix common issues.

How to install pac-validate

1claude-code-templates

npx claude-code-templates@latest --command project-management/pac-validate

2Manually: put the files in place

.claude/commands/pac-validate.md

Call it with /pac-validate. For all projects use ~/.claude/commands/

Questions about pac-validate

How do I install pac-validate in Claude Code?

Run npx claude-code-templates@latest --command project-management/pac-validate, then save the command to .claude/commands/pac-validate.md.

What does pac-validate do?

It checks PAC structure, configuration, and epic and ticket YAML files. It also verifies references, dependencies, and data consistency.

What does the --fix option do?

It can automatically resolve common issues. The report includes compliance status, detected problems, and suggested fixes.

Source text

pac-validate.md · MIT
---
allowed-tools: Read, Bash
argument-hint: "[scope] | --file | --epic | --fix | --pre-commit"
description: Validate Product as Code project structure and files for PAC specification compliance
---

# Validate PAC Structure

Validate Product as Code project structure and files for PAC specification compliance: **$ARGUMENTS**

## Current PAC State

- PAC directory: !`ls -la .pac/ 2>/dev/null || echo "No .pac directory found"`
- Configuration: @.pac/pac.config.yaml (if exists)
- Epic count: !`find .pac/epics/ -name "*.yaml" 2>/dev/null | wc -l`
- Ticket count: !`find .pac/tickets/ -name "*.yaml" 2>/dev/null | wc -l`

## Task

Comprehensive validation of PAC project structure and specification compliance:

**Validation Scope**: Use $ARGUMENTS for specific files/epics or validate entire PAC structure

**Validation Checks**:
1. **Structure Validation** - Directory structure and required files
2. **Configuration Compliance** - PAC config file format and values
3. **Epic Validation** - YAML syntax, required fields, and spec compliance
4. **Ticket Validation** - Format, metadata, and epic references
5. **Cross-Reference Integrity** - Epic-ticket relationships and dependencies
6. **Data Consistency** - Timestamps, status transitions, and ID uniqueness

**Output**: Detailed validation report with compliance status, issues found, and specific recommendations for fixes. Use --fix to automatically resolve common issues.

**Exit Codes**: 0 (valid), 1 (errors found), 2 (configuration issues)

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Testing and QA →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor