@@ -17,13 +17,14 @@ Aditi is a complete reboot of asciidoc-dita-toolkit, designed as a CLI tool to p
1717- GitHub CLI (` gh ` ) if GitHub support is needed
1818
1919### Key Dependencies
20- - Container image: ` docker.io/jdkato/vale:latest ` (Official Vale linter)
21- - AsciiDocDITA styles: Downloaded automatically via Vale's package system
22- - Typer: Modern CLI framework with type hints
23- - Rich: Enhanced console output with progress bars
24- - Jekyll with Just the Docs theme for documentation
25- - GitHub Actions for automated workflows
26- - PyPI for distribution
20+ - ** Container image** : ` docker.io/jdkato/vale:latest ` (Official Vale linter)
21+ - ** AsciiDocDITA styles** : Downloaded automatically via Vale's package system
22+ - ** Python CLI** : Typer framework with Rich progress indicators
23+ - ** Documentation** : Jekyll with Just the Docs theme
24+ - ** Testing** : pytest with PyYAML for front matter validation
25+ - ** CI/CD** : GitHub Actions for deployment and validation workflows
26+ - ** Quality Assurance** : Comprehensive blog post validation test suite
27+ - ** Distribution** : PyPI packaging with modern pyproject.toml
2728
2829## Architecture
2930
@@ -50,19 +51,26 @@ Rules are grouped by dependencies - ContentType must run before rules that depen
5051- Test AsciiDocDITA rules: ` python test_asciidocdita_rules.py `
5152- Initialize project with Vale: ` aditi init ` (when CLI is built)
5253
54+ ### Blog Post Management
55+ - ** Validate blog posts** : ` python tests/test_blog_post_validation.py `
56+ - ** Run specific validation tests** : ` python -m pytest tests/test_blog_post_validation.py -v `
57+ - ** Create new post** : Follow filename pattern ` YYYY-MM-DD-HHMM-title.md `
58+ - ** Check front matter** : Ensure all required fields are present
59+
5360### GitHub Pages Development
54- - Local development: ` cd docs && bundle exec jekyll serve `
55- - The site uses Just the Docs theme with custom styling
56- - Images automatically get drop shadows via custom CSS
57- - Recent commits section auto-updates via GitHub Actions
61+ - ** Local development** : ` cd docs && bundle exec jekyll serve `
62+ - ** Validation URL** : ` http://localhost:4000/aditi/ `
63+ - ** Theme** : Just the Docs with custom styling and drop shadows
64+ - ** Auto-updates** : Recent commits section via GitHub Actions
65+ - ** Link testing** : Verify ` /aditi/ ` prefix for internal links
5866
5967### Python Development
60- Current implementation includes:
61- - Vale container integration with Podman/Docker support
62- - Typer CLI framework with Rich progress indicators
63- - AsciiDocDITA rule downloading via Vale's package system
64- - Comprehensive test scripts for validation
65- - Standard Python packaging tools for building and distribution
68+ - ** Package management ** : Modern pyproject.toml with development dependencies
69+ - ** CLI framework ** : Typer with Rich progress indicators
70+ - ** Container integration ** : Podman/Docker support for Vale
71+ - ** Test suite ** : Unit, integration, and blog post validation tests
72+ - ** Quality assurance ** : Blog post validation prevents Jekyll deployment failures
73+ - ** Dependencies ** : PyYAML added for YAML parsing in tests
6674
6775## Important Rules
6876
@@ -122,6 +130,14 @@ User configuration stored in `~/aditi-data/config.json`:
122130- ✅ Package structure with proper exports
123131- ✅ Working CLI with placeholder commands
124132
133+ ### Completed (Documentation & Quality Assurance)
134+ - ✅ Jekyll front matter standardization across all blog posts
135+ - ✅ Blog post validation test suite with regression prevention
136+ - ✅ GitHub Actions workflow for automated blog post validation
137+ - ✅ Comprehensive documentation with test README
138+ - ✅ Template file safety and exclusion management
139+ - ✅ GitHub Pages deployment reliability improvements
140+
125141### Next Phases
126142- ** Phase 2** : Rule Engine Implementation (parsing Vale output, applying fixes)
127143- ** Phase 3** : CLI Experience (journey command, interactive workflows)
@@ -143,7 +159,18 @@ src/aditi/
143159tests/
144160├── unit/ # Unit tests for all modules
145161├── integration/ # CLI integration tests
162+ ├── test_blog_post_validation.py # Jekyll front matter validation
163+ ├── README.md # Test documentation
146164└── conftest.py # Shared test fixtures
165+ docs/
166+ ├── _posts/ # Blog posts with standardized front matter
167+ ├── _config.yml # Jekyll config with proper exclusions
168+ ├── post-template.md # Safe template file
169+ └── assets/ # Blog assets and images
170+ .github/workflows/
171+ ├── jekyll-gh-pages.yml # GitHub Pages deployment
172+ ├── update-commits.yml # Recent commits automation
173+ └── validate-blog-posts.yml # Blog post validation CI
147174```
148175
149176## Role and Capabilities
@@ -192,26 +219,94 @@ permalink: /design/document-name/
192219
193220## Post Writing Guidelines
194221
195- ### Automated Blog Post Creation
196- Use the helper script for consistent filenames and timestamps:
197- ``` bash
198- ./scripts/new-blog-post.sh " Your Blog Post Title"
222+ ### Standardized Front Matter Format
223+ ** CRITICAL** : All blog posts must use this exact front matter structure to prevent Jekyll build failures:
224+
225+ ``` yaml
226+ ---
227+ layout : post
228+ title : " Your Blog Post Title Here"
229+ date : YYYY-MM-DD HH:MM:SS -0400
230+ author : Author Name
231+ tags : [tag1, tag2, tag3]
232+ summary : " Brief 1-2 sentence summary for listings"
233+ ---
199234```
200235
201- This automatically creates:
202- - Correct filename: ` YYYY-MM-DD-HHMM-post-title.md `
203- - Proper timestamp in front matter with current timezone
204- - Template content based on ` docs/_posts/YYYY-MM-DD-post-template.md `
236+ ### Blog Post Validation
237+ A comprehensive test suite prevents Jekyll deployment failures:
238+ - ** Automated validation** : ` python tests/test_blog_post_validation.py `
239+ - ** GitHub Actions** : Validates all posts on push/PR
240+ - ** Catches issues** : Missing fields, invalid dates, placeholder content
241+ - ** Template safety** : Ensures template files are excluded from processing
205242
206243### Manual Blog Post Creation
207- If creating manually:
2082441 . ** Filename Format** : ` YYYY-MM-DD-HHMM-post-title.md `
209245 - Get timestamp: ` date '+%Y-%m-%d-%H%M' `
210- - Example: ` 2025-07-27-1423-implementing-new-feature.md `
211-
212- 2 . ** Front Matter Timestamp** : ` YYYY-MM-DD HH:MM:SS -0400 `
213- - Get timestamp: ` date '+%Y-%m-%d %H:%M:%S %z' `
214- - Example: ` 2025-07-27 14:23:45 -0400 `
215-
216- 3 . ** Always use** ` docs/_posts/YYYY-MM-DD-post-template.md ` as template
217- 4 . ** IMPORTANT** : Follow the link guidelines above when creating internal links in blog posts
246+ - Example: ` 2025-07-29-1400-implementing-new-feature.md `
247+
248+ 2 . ** Front Matter Requirements** :
249+ - ** layout** : Must be ` post `
250+ - ** title** : In quotes, descriptive
251+ - ** date** : ` YYYY-MM-DD HH:MM:SS -0400 ` format (get with ` date '+%Y-%m-%d %H:%M:%S %z' ` )
252+ - ** author** : Full name or team
253+ - ** tags** : Array format ` [tag1, tag2, tag3] `
254+ - ** summary** : Brief description for blog listings
255+
256+ 3 . ** Template Usage** : Use ` docs/_posts/post-template.md ` as reference
257+ 4 . ** Link Guidelines** : Follow ` /aditi/ ` prefix rules for internal links
258+ 5 . ** Validation** : Run ` python tests/test_blog_post_validation.py ` before committing
259+
260+ ## Recent Development Focus (July 2025)
261+
262+ ### Jekyll Front Matter Crisis & Resolution
263+ ** Problem** : GitHub Pages deployment failures due to inconsistent blog post front matter and template files with placeholder dates.
264+
265+ ** Root Cause Analysis** :
266+ - Template files contained ` date: YYYY-MM-DD HH:MM:SS -0400 ` causing Jekyll parsing errors
267+ - Inconsistent front matter formats across posts (some missing ` layout: post ` )
268+ - Mixed usage of ` categories ` vs ` tags ` fields
269+ - Hidden draft files not excluded from Jekyll processing
270+
271+ ** Solution Implementation** :
272+ 1 . ** Standardized all blog posts** to consistent front matter format
273+ 2 . ** Created comprehensive validation suite** (` tests/test_blog_post_validation.py ` )
274+ 3 . ** Implemented GitHub Actions workflow** for automated validation
275+ 4 . ** Updated Jekyll configuration** with proper exclusion rules
276+ 5 . ** Fixed template management** with safe placeholder handling
277+
278+ ** Key Lessons Learned** :
279+ - Jekyll is strict about date formats - even template placeholders break builds
280+ - Front matter consistency prevents subtle deployment issues
281+ - Automated validation catches regressions before they reach production
282+ - Template files need explicit exclusion from Jekyll processing
283+ - Comprehensive testing prevents recurring issues
284+
285+ ### Blog Post Validation Test Suite
286+ ** Prevents these regression issues** :
287+ - ❌ Invalid date parsing from placeholder templates
288+ - ❌ Missing required front matter fields
289+ - ❌ Inconsistent front matter structure
290+ - ❌ Dangerous template files in processing pipeline
291+ - ❌ Filename convention violations
292+ - ❌ Date consistency mismatches
293+
294+ ** Validation Coverage** :
295+ - Front matter structure and required fields
296+ - Date format validation (` YYYY-MM-DD HH:MM:SS ±HHMM ` )
297+ - Filename conventions (` YYYY-MM-DD-HHMM-title.md ` )
298+ - Jekyll configuration safety
299+ - Template and draft file exclusions
300+
301+ ### Impact on Development Workflow
302+ - ** Reliable deployments** : GitHub Pages builds consistently succeed
303+ - ** Quality assurance** : Blog posts follow standardized conventions
304+ - ** Developer confidence** : Validation catches issues before deployment
305+ - ** Documentation consistency** : All posts use uniform front matter
306+ - ** Regression prevention** : Test suite prevents recurring Jekyll issues
307+
308+ # important-instruction-reminders
309+ Do what has been asked; nothing more, nothing less.
310+ NEVER create files unless they're absolutely necessary for achieving your goal.
311+ ALWAYS prefer editing an existing file to creating a new one.
312+ NEVER proactively create documentation files (* .md) or README files. Only create documentation files if explicitly requested by the User.
0 commit comments