refactor: architecture cleanup — OCP-compliant CSS, data-driven nav, test suite#85
Merged
Merged
Conversation
…test suite Architectural changes: - CSS: Replace ~90 per-type/per-stage selectors with 6 generic variable-driven rules (--stage-color, --doctype-color, --badge-color, --cat-color) for Open/Closed Principle compliance - Navigation: Extract _data/navigation.yml as single source of truth for categories and draft stages; header, footer, and home page all consume it - Config: Remove dead 'documents' collection, add proper excludes for _archive/, spec/, _data/schemas/ - Layouts: doc-type layout supports stage_filter_name for data-driven filtering Quality assurance: - Add JSON Schema (documents.schema.json) for aggregated document data contract - Add RSpec suite: 26 examples covering config, rake tasks, schema validation, data integrity, and template references - Add json_schemer gem for schema validation, rspec for test framework Cleanup: - Archive unused layouts (toc.html, toc-type.html, document.html) and includes (toc-*, disqus_comments, feedback, script, find-doc) - Remove generated relaton.css from public/ - Update .gitignore to exclude entire public/ directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Architecture cleanup implementing all 8 recommendations from the code quality audit.
Changes
OCP-compliant CSS (~90 selectors → 6 generic rules)
--stage-color,--doctype-color,--badge-color,--cat-color)Data-driven navigation
_data/navigation.ymlas single source of truth for categories and draft stagesstage_filter_name: draft_stagesinstead of hardcoded stage listJSON Schema for data contract
_data/schemas/documents.schema.jsondefining the expected shape of aggregated document datarake validate_schemavalidates_data/documents.jsonagainst the schemaRSpec test suite (26 examples)
config_spec— Jekyll config structure, excludes, keep_filesrake_spec— all Rake tasks definedschema_spec— document data satisfies JSON Schema, field assertionsdata_integrity_spec— navigation ↔ data consistency, document ID uniquenesstemplate_spec— no references to archived layouts/includes, data-driven nav wired correctlyCleanup
toc.html,toc-type.html,document.html) and includes (toc-*,disqus_comments,feedback,script,find-doc) to_archive/documentscollection from_config.yml.gitignoreto exclude entirepublic/directorypublic/assets/relaton.cssVerification
rake buildsucceeds (aggregate → Vite → Jekyll)