diff --git a/examples/manpages/markdown-manpage-schema.json b/examples/manpages/markdown-manpage-schema.json index 8ffe4ecd..b8e308e6 100644 --- a/examples/manpages/markdown-manpage-schema.json +++ b/examples/manpages/markdown-manpage-schema.json @@ -3,6 +3,152 @@ "type": "object", "title": "Markdown Manpage Schema", "description": "JSON schema defining the structure of Unix-style manual pages written in Markdown. Compatible with man(1) section format and conventions.", + "x-markitect-sections": { + "SYNOPSIS": { + "classification": "required", + "heading_level": 2, + "position": "after_title", + "content_instruction": "Brief command syntax showing options and arguments in standard Unix format", + "min_paragraphs": 1, + "max_paragraphs": 5, + "error_message": "SYNOPSIS section is mandatory for all Unix manual pages" + }, + "DESCRIPTION": { + "classification": "required", + "heading_level": 2, + "content_instruction": "Detailed explanation of the command's purpose and functionality", + "min_paragraphs": 2, + "error_message": "DESCRIPTION section is mandatory for all Unix manual pages" + }, + "OPTIONS": { + "classification": "recommended", + "heading_level": 2, + "content_instruction": "Command-line options and flags with descriptions", + "alternatives": ["GLOBAL OPTIONS", "COMMAND OPTIONS", "FLAGS"], + "warning_if_missing": "Documenting command options improves usability" + }, + "EXAMPLES": { + "classification": "recommended", + "heading_level": 2, + "content_instruction": "Practical usage examples demonstrating common use cases", + "min_code_blocks": 2, + "warning_if_missing": "Examples significantly improve manpage usability and comprehension" + }, + "SEE ALSO": { + "classification": "recommended", + "heading_level": 2, + "content_instruction": "Related commands, configuration files, and documentation references", + "warning_if_missing": "Cross-references help users discover related functionality" + }, + "COPYRIGHT": { + "classification": "recommended", + "heading_level": 2, + "content_instruction": "Copyright statement and license information", + "warning_if_missing": "License information should be documented for clarity" + }, + "COMMANDS": { + "classification": "optional", + "heading_level": 2, + "content_instruction": "Subcommands and their brief descriptions" + }, + "CONFIGURATION": { + "classification": "optional", + "heading_level": 2, + "content_instruction": "Configuration file format and options" + }, + "FILES": { + "classification": "optional", + "heading_level": 2, + "content_instruction": "Important files used by the command with their purposes" + }, + "EXIT STATUS": { + "classification": "optional", + "heading_level": 2, + "content_instruction": "Exit codes and their meanings" + }, + "ENVIRONMENT": { + "classification": "optional", + "heading_level": 2, + "content_instruction": "Environment variables used or set by the command" + }, + "BUGS": { + "classification": "optional", + "heading_level": 2, + "content_instruction": "Known issues and bug reporting instructions" + }, + "AUTHORS": { + "classification": "optional", + "heading_level": 2, + "content_instruction": "List of contributors and maintainers" + } + }, + "x-markitect-content-control": { + "synopsis": { + "required_patterns": [ + "\\*\\*[a-z][a-z0-9-]*\\*\\*", + "\\[.*\\]" + ], + "discouraged_patterns": [ + "TODO", + "FIXME" + ], + "content_quality": { + "min_words": 5, + "max_words": 150, + "readability_target": "technical" + }, + "content_instructions": [ + "Show command name in bold: **command**", + "Use brackets [] for optional arguments", + "Use italic *ARG* for required arguments", + "Keep synopsis concise (1-5 lines)", + "Follow man(1) synopsis conventions" + ] + }, + "description": { + "discouraged_patterns": [ + "TODO", + "FIXME", + "\\bWIP\\b", + "TBD" + ], + "forbidden_patterns": [ + "password\\s*=\\s*[\"'].*[\"']", + "api[_-]?key\\s*=\\s*[\"'].*[\"']" + ], + "content_quality": { + "min_words": 50, + "max_words": 1000, + "readability_target": "technical", + "min_sentences": 3 + }, + "content_instructions": [ + "Explain what the command does", + "Describe the primary purpose", + "Mention key features and capabilities", + "Note any prerequisites or dependencies", + "Keep language clear and technical" + ] + }, + "examples": { + "required_patterns": [ + "```", + "#" + ], + "content_quality": { + "min_words": 50, + "max_words": 2000, + "readability_target": "general" + }, + "content_instructions": [ + "Use bash code blocks with syntax highlighting", + "Include comments explaining each example", + "Start with simple examples, progress to complex", + "Show actual output when helpful", + "Cover the most common use cases" + ] + } + }, "properties": { "headings": { "type": "object", @@ -96,31 +242,5 @@ "maxItems": 500 } }, - "required": ["headings", "paragraphs", "code_blocks", "emphasis"], - "x-markitect-required-sections": [ - "SYNOPSIS", - "DESCRIPTION" - ], - "x-markitect-recommended-sections": [ - "OPTIONS", - "EXAMPLES", - "SEE ALSO", - "COPYRIGHT" - ], - "x-markitect-optional-sections": [ - "COMMANDS", - "CONFIGURATION", - "FILES", - "EXIT STATUS", - "ENVIRONMENT", - "BUGS", - "AUTHORS" - ], - "x-markitect-conventions": { - "heading_case": "UPPERCASE for H2 sections", - "command_format": "Bold with **command** for commands and options", - "argument_format": "Italic with *ARG* for arguments and placeholders", - "example_language": "bash for code blocks", - "definition_lists": "Use bold followed by colon for FILES, EXIT STATUS, ENVIRONMENT sections" - } + "required": ["headings", "paragraphs", "code_blocks", "emphasis"] }