# Command: validate
> **π€ Agent Directive**: If you are reading this file, the command `@acp.validate` has been invoked. Follow the steps below to execute this command.
**Namespace**: acp
**Version**: 1.0.0
**Created**: 2026-02-16
**Last Updated**: 2026-02-16
**Status**: Active
---
**Purpose**: Validate all ACP documents for structure, consistency, and correctness
**Category**: Documentation
**Frequency**: As Needed
---
## What This Command Does
This command validates all ACP documentation to ensure it follows proper structure, maintains consistency, and contains no errors. It checks document formatting, verifies links and references, validates YAML syntax, and ensures all required sections are present.
Use this command before committing documentation changes, after creating new documents, or periodically to ensure documentation quality. It's particularly useful before releases or when onboarding new contributors.
Unlike `@acp.sync` which compares docs to code, `@acp.validate` checks the internal consistency and correctness of the documentation itself.
---
## Prerequisites
- [ ] ACP installed in project
- [ ] Documentation exists in `agent/` directory
- [ ] You want to verify documentation quality
---
## Steps
### 1. Validate Directory Structure
Check that all required directories and files exist.
**Actions**:
- Verify `agent/` directory exists
- Check for `agent/design/`, `agent/milestones/`, `agent/patterns/`, `agent/tasks/`
- Verify `agent/progress.yaml` exists
- Check for `agent/commands/` directory
- Note any missing directories
**Expected Outcome**: Directory structure validated
### 2. Validate progress.yaml
Check YAML syntax and required fields.
**Actions**:
- Parse `agent/progress.yaml` as YAML
- Verify required fields exist (project, milestones, tasks)
- Check field types (strings, numbers, dates)
- Validate date formats (YYYY-MM-DD)
- Verify progress percentages (0-100)
- Check milestone/task references are consistent
- Validate status values (not_started, in_progress, completed)
**Expected Outcome**: progress.yaml is valid
### 3. Validate Design Documents
Check design document structure and content.
**Actions**:
- Read all files in `agent/design/`
- Verify required sections exist (Overview, Problem, Solution)
- Check for proper markdown formatting
- Validate code blocks have language tags
- Verify dates are in correct format
- Check status values are valid
- Ensure no broken internal links
**Expected Outcome**: Design docs are well-formed
### 4. Validate Milestone Documents
Check milestone document structure.
**Actions**:
- Read all files in `agent/milestones/`
- Verify required sections (Overview, Deliverables, Success Criteria)
- Check naming convention (milestone-N-name.md)
- Validate task references exist
- Verify success criteria are checkboxes
- Check for proper formatting
**Expected Outcome**: Milestone docs are valid
### 5. Validate Task Documents
Check task document structure.
**Actions**:
- Read all files in `agent/tasks/`
- Verify required sections (Objective, Steps, Verification)
- Check naming convention (task-N-name.md)
- Validate milestone references
- Verify verification items are checkboxes
- Check for proper formatting
**Expected Outcome**: Task docs are valid
### 6. Validate Pattern Documents
Check pattern document structure.
**Actions**:
- Read all files in `agent/patterns/`
- Verify required sections (Overview, Implementation, Examples)
- Check code examples are properly formatted
- Validate examples have language tags
- Verify no broken links
**Expected Outcome**: Pattern docs are valid
### 7. Validate Command Documents
Check command document structure.
**Actions**:
- Read all files in `agent/commands/`
- Verify required sections (Purpose, Steps, Verification)
- Check agent directive is present
- Validate namespace and version fields
- Verify examples are complete
- Check related commands links work
**Expected Outcome**: Command docs are valid
### 8. Check Cross-References
Validate links between documents.
**Actions**:
- Extract all internal links from documents
- Verify linked files exist
- Check milestone β task references
- Verify task β milestone back-references
- Validate command β command links
- Note any broken links
**Expected Outcome**: All links are valid
### 9. Generate Validation Report
Summarize validation results.
**Actions**:
- Count total documents validated
- List any errors found
- List any warnings
- Provide recommendations
- Suggest fixes for issues
**Expected Outcome**: Validation report generated
---
## Verification
- [ ] All required directories exist
- [ ] progress.yaml is valid YAML
- [ ] progress.yaml has all required fields
- [ ] All design documents are well-formed
- [ ] All milestone documents are valid
- [ ] All task documents are valid
- [ ] All pattern documents are valid
- [ ] All command documents are valid
- [ ] No broken internal links
- [ ] Validation report generated
---
## Expected Output
### Files Modified
None - this is a read-only validation command
### Console Output
```
β Validating ACP Documentation
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Directory Structure:
β agent/ directory exists
β agent/design/ exists (5 files)
β agent/milestones/ exists (2 files)
β agent/patterns/ exists (3 files)
β agent/tasks/ exists (7 files)
β agent/commands/ exists (11 files)
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
progress.yaml:
β Valid YAML syntax
β All required fields present
β Date formats correct
β Progress percentages valid (0-100)
β Status values valid
β Task/milestone references consistent
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Design Documents (5):
β All have required sections
β Markdown formatting correct
β Code blocks properly tagged
β οΈ auth-design.md: Missing "Last Updated" date
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Milestone Documents (2):
β All have required sections
β Naming convention followed
β Task references valid
β Success criteria are checkboxes
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Task Documents (7):
β All have required sections
β Naming convention followed
β Milestone references valid
β Verification items are checkboxes
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Pattern Documents (3):
β All have required sections
β Code examples properly formatted
β No broken links
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Command Documents (11):
β All have required sections
β Agent directives present
β Namespace and version fields valid
β Examples complete
β Related command links valid
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Cross-References:
β All internal links valid
β Milestone β task references correct
β Task β milestone back-references correct
β Command β command links work
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Validation Complete!
Summary:
- Documents validated: 28
- Errors: 0
- Warnings: 1
- Overall: PASS
Warnings:
β οΈ auth-design.md: Missing "Last Updated" date
Recommendations:
- Add "Last Updated" date to auth-design.md
- Consider adding more code examples to patterns
```
### Status Update
- Validation completed
- Issues identified (if any)
- Documentation quality confirmed
---
## Examples
### Example 1: Before Committing Changes
**Context**: Made changes to several docs, want to verify before commit
**Invocation**: `@acp.validate`
**Result**: Validates all docs, finds 2 broken links, reports them, you fix them before committing
### Example 2: After Creating New Documents
**Context**: Created 3 new design documents
**Invocation**: `@acp.validate`
**Result**: Validates new docs, confirms they follow proper structure, identifies missing section in one doc
### Example 3: Periodic Quality Check
**Context**: Monthly documentation review
**Invocation**: `@acp.validate`
**Result**: Validates all 50+ documents, finds minor formatting issues in 3 files, overall quality is good
---
## Related Commands
- [`@acp.sync`](acp.sync.md) - Sync documentation with code (different from validation)
- [`@acp.update`](acp.update.md) - Update progress tracking
- [`@acp.report`](acp.report.md) - Generate comprehensive report including validation results
- [`@acp.init`](acp.init.md) - Can include validation as part of initialization
---
## Troubleshooting
### Issue 1: YAML parsing errors
**Symptom**: progress.yaml fails to parse
**Cause**: Invalid YAML syntax (indentation, special characters)
**Solution**: Use YAML validator, check indentation (2 spaces), quote strings with special characters
### Issue 2: Many broken links reported
**Symptom**: Validation finds numerous broken links
**Cause**: Files were moved or renamed
**Solution**: Update links to reflect new file locations, use relative paths, verify files exist
### Issue 3: Validation takes too long
**Symptom**: Command runs for several minutes
**Cause**: Very large project with many documents
**Solution**: This is normal for large projects, consider validating specific directories only, run less frequently
---
## Security Considerations
### File Access
- **Reads**: All files in `agent/` directory
- **Writes**: None (read-only validation)
- **Executes**: None
### Network Access
- **APIs**: None
- **Repositories**: None
### Sensitive Data
- **Secrets**: Does not access secrets or credentials
- **Credentials**: Does not access credentials files
---
## Notes
- This is a read-only command - it doesn't modify files
- Validation should be fast (< 30 seconds for most projects)
- Run before committing documentation changes
- Integrate into CI/CD pipeline if desired
- Warnings are informational, not failures
- Errors should be fixed before proceeding
- Consider running after major documentation updates
- Can be automated as a pre-commit hook
---
**Namespace**: acp
**Command**: validate
**Version**: 1.0.0
**Created**: 2026-02-16
**Last Updated**: 2026-02-16
**Status**: Active
**Compatibility**: ACP 1.1.0+
**Author**: ACP Project