feat: add terminology schema example and improve schema-list command
This commit completes Phase 2 of schema evolution work and establishes a new example demonstrating schema usage for terminology documents. ## New Features ### Terminology Validation Example (examples/terminology/) - Complete example terminology document with proper structure - JSON schema with MarkiTect extensions for validation - Demonstrates schema usage beyond manpages (glossaries, lexicons) - Validates term structure: Definition, Synonyms, Related Terms, Examples - Includes content control and quality validation rules - Full documentation with usage examples and best practices ### Schema Registration System - Registered terminology schema in markitect database - Created schema catalog (markitect/schemas/schema-catalog.yaml) - Copied schema to official location (markitect/schemas/) - Provides metadata, features, and usage info for all schemas ### Improved schema-list Command - Now displays creation timestamps in default output - Table format includes Created/Updated columns - Cleaner timestamp formatting (removed microseconds) - Better visibility into when schemas were added ## Files Changed Added: - examples/terminology/README.md - Complete documentation - examples/terminology/terminology-example.md - Example glossary - examples/terminology/terminology-schema.json - Validation schema - markitect/schemas/terminology-schema.json - Registered schema - markitect/schemas/schema-catalog.yaml - Schema registry Modified: - markitect/cli.py - Enhanced schema-list with timestamps - TODO.md - Documented Phase 2 completion and new example Moved: - SCHEMA_EVOLUTION_WORKPLAN.md → todo/ directory ## Schema Features Demonstrated - Heading hierarchy validation (H1 → H2 → H3) - Term structure validation with required/optional fields - Content quality metrics (word counts, readability targets) - MarkiTect extensions (x-markitect-sections, x-markitect-content-control) - Classification system (required/recommended/optional/discouraged/improper) ## Usage ```bash # List schemas with timestamps markitect schema-list # Validate terminology document markitect validate glossary.md --schema terminology-schema.json # View in table format markitect schema-list --format table ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
77
markitect/schemas/schema-catalog.yaml
Normal file
77
markitect/schemas/schema-catalog.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
# MarkiTect Schema Catalog
|
||||
#
|
||||
# This catalog provides metadata about available schemas for markdown document validation.
|
||||
# Schemas can be referenced by name or loaded from their file path.
|
||||
|
||||
version: "1.0"
|
||||
description: "Catalog of registered MarkiTect schemas for document validation"
|
||||
|
||||
schemas:
|
||||
- id: "markitect-metaschema"
|
||||
name: "MarkiTect Metaschema"
|
||||
file: "markitect-metaschema.json"
|
||||
version: "1.0"
|
||||
description: "Metaschema for validating MarkiTect schema extensions"
|
||||
type: "metaschema"
|
||||
usage: "Used internally to validate schema files with MarkiTect-specific extensions"
|
||||
tags:
|
||||
- internal
|
||||
- validation
|
||||
- metaschema
|
||||
|
||||
- id: "terminology-v1"
|
||||
name: "Terminology Document Schema"
|
||||
file: "terminology-schema.json"
|
||||
version: "1.0"
|
||||
description: "Schema for validating terminology and glossary documents"
|
||||
type: "document-schema"
|
||||
usage: "Validates technical glossaries, terminology documents, and definition lists"
|
||||
document_types:
|
||||
- glossary
|
||||
- terminology
|
||||
- lexicon
|
||||
- dictionary
|
||||
features:
|
||||
- Heading hierarchy validation (H1 → H2 → H3)
|
||||
- Term structure validation (Definition, Synonyms, Related Terms, etc.)
|
||||
- Content quality metrics (word counts, readability)
|
||||
- MarkiTect extensions (x-markitect-sections, x-markitect-content-control)
|
||||
- Classification system (required/recommended/optional)
|
||||
example: "examples/terminology/terminology-example.md"
|
||||
tags:
|
||||
- documentation
|
||||
- glossary
|
||||
- terminology
|
||||
- definitions
|
||||
related_schemas: []
|
||||
author: "MarkiTect Project"
|
||||
created: "2026-01-04"
|
||||
updated: "2026-01-04"
|
||||
|
||||
# Future schemas to add:
|
||||
#
|
||||
# - id: "manpage-v1"
|
||||
# name: "Unix Manual Page Schema"
|
||||
# description: "Schema for Unix/Linux manual page documentation"
|
||||
#
|
||||
# - id: "api-reference-v1"
|
||||
# name: "API Reference Schema"
|
||||
# description: "Schema for API endpoint documentation"
|
||||
#
|
||||
# - id: "arc42-v1"
|
||||
# name: "arc42 Architecture Documentation Schema"
|
||||
# description: "Schema for arc42 architecture documentation template"
|
||||
#
|
||||
# - id: "adr-v1"
|
||||
# name: "Architecture Decision Record Schema"
|
||||
# description: "Schema for ADR (Architecture Decision Record) documents"
|
||||
#
|
||||
# - id: "rfc-v1"
|
||||
# name: "RFC/Specification Schema"
|
||||
# description: "Schema for RFC-style specification documents"
|
||||
|
||||
# Schema discovery paths:
|
||||
# - Built-in: markitect/schemas/*.json
|
||||
# - User-defined: ~/.markitect/schemas/*.json
|
||||
# - Project-specific: .markitect/schemas/*.json
|
||||
# - Custom paths via MARKITECT_SCHEMA_PATH environment variable
|
||||
Reference in New Issue
Block a user