This directory contains automated workflows for the AD Response J7 repository.
Purpose: Ensures every file in the repository has both markdown (.md) and JSON (.json) representations.
When it runs:
- On push to
mainbranch - On pull requests to
mainbranch - Manually via workflow dispatch
What it does:
-
Analysis Phase:
- Scans the repository for all
.mdand.jsonfiles - Identifies missing counterparts (MD files without JSON, JSON files without MD)
- Reports statistics in the job summary
- Scans the repository for all
-
Generation Phase:
- Converts markdown files to structured JSON format with:
- Title extraction
- Section parsing (headings and content)
- Metadata (source file, creation date)
- Converts JSON files to readable markdown format
- Preserves directory structure
- Converts markdown files to structured JSON format with:
-
Validation Phase:
- Commits any newly generated files
- Performs final validation to ensure 100% coverage
- Reports success/failure in job summary
File Structure Generated:
For markdown files, the JSON structure includes:
{
"title": "Document Title",
"source_file": "/path/to/source.md",
"created_at": "ISO datetime",
"file_type": "markdown",
"sections": [
{
"heading": "Section Name",
"level": 2,
"content": "Section content...",
"subsections": [
{
"heading": "Subsection",
"level": 3,
"content": "Subsection content..."
}
]
}
]
}For JSON files, generates readable markdown with proper heading levels and content sections.
Benefits:
- Dual Format Access: Every document accessible in both human-readable (MD) and machine-readable (JSON) formats
- Automated Maintenance: No manual effort required to keep formats in sync
- Structured Data: JSON format enables programmatic analysis and processing
- Documentation Consistency: Ensures all documentation follows the same structural patterns
The original CI workflow has been updated to use the same file representation validation logic. This ensures backward compatibility while providing the new functionality.
The workflows run automatically, but you can also:
-
Trigger manually: Go to Actions tab → Select "File Representation Validator" → Click "Run workflow"
-
Check results: View the job summary for detailed statistics and any issues
-
Local testing: The converter script can be extracted and run locally for testing before committing changes
If the workflow fails:
- Check the job summary for specific error messages
- Verify file permissions and Git configuration
- Ensure no binary files are being processed as text
- Check for JSON parsing errors in existing files
- The workflow automatically commits generated files using the GitHub Actions bot account
- Generated files include metadata comments indicating their automated origin
- The workflow respects
.gitignorepatterns and excludes system directories