generate¶
Generate standards from templates.
Synopsis¶
mcp-standards generate [options]
mcp-standards generate list-templates
mcp-standards generate template-info <template_name>
mcp-standards generate customize [options]
mcp-standards generate validate <standard_file>
Description¶
The generate
command provides a comprehensive system for creating new standards using pre-defined templates. It supports multiple workflows for standard creation, from simple generation to advanced customization.
Options¶
Main Generate Options¶
--template, -t <name>
¶
Specify the template to use for generation.
--domain, -d <name>
¶
Use a domain-specific template.
--output, -o <path>
¶
Specify the output file path.
--title <title>
¶
Set the standard title.
`--version 1.0.0¶
Set the standard version 1.0.0
--author <name>
¶
Specify the standard author.
--description <desc>
¶
Provide a brief description.
--interactive, -i
¶
Run in interactive mode for guided generation.
--preview, -p
¶
Preview the generated standard without saving.
--validate
¶
Validate the generated standard (default: true).
--config-file <path>
¶
Use a configuration file for generation.
Subcommands¶
list-templates¶
List all available templates.
Output example:
Available Templates:
Base Templates:
- base: General-purpose standard template
- technical: Technical implementation standards
- process: Process and workflow standards
- compliance: Compliance and regulatory standards
- operational: Operations and monitoring standards
Domain Templates:
- ai_ml: AI/ML operations standards
- blockchain: Blockchain/Web3 standards
- gaming: Gaming development standards
- iot: IoT/Edge computing standards
template-info¶
Get detailed information about a specific template.
Output example:
Template: technical
Description: Template for technical implementation standards
Version: 1.2.0
Required Fields:
- title: Standard title
- version: Standard version
- category: Technical category
- domain: Technical domain
Optional Fields:
- frameworks: Applicable frameworks
- languages: Programming languages
- tools: Required tools
customize¶
Create a custom template based on an existing one.
Options:
- --template, -t
: Base template to customize (required)
- --name, -n
: Name for the custom template (required)
- --config
: Configuration file for customization
- --interactive, -i
: Interactive customization mode
validate¶
Validate an existing standard file.
Options:
- --report, -r
: Output validation report to file
Examples¶
Basic Generation¶
Generate a technical standard:
mcp-standards generate \
--template technical \
--title "Python Async Programming Standards" \
--author "John Smith" \
--output ./standards/python-async.md
Interactive Mode¶
Use interactive mode for guided generation:
mcp-standards generate --interactive
? Select template type: technical
? Enter standard title: GraphQL API Standards
? Enter version 1.0.0
? Enter author name: Jane Doe
? Enter description: Best practices for GraphQL API design
? Select category: API Design
? Add frameworks? Yes
? Enter frameworks (comma-separated): Apollo, GraphQL-JS
? Preview before saving? Yes
Using Configuration File¶
Create a configuration file (graphql-standard.yaml
):
template: technical
title: "GraphQL API Standards"
version: "1.0.0"
author: "API Team"
category: "API Design"
domain: "Web Development"
description: "Comprehensive GraphQL API design and implementation standards"
metadata:
frameworks:
- Apollo Server
- GraphQL-JS
languages:
- JavaScript
- TypeScript
compliance:
- "NIST-800-53:AC-2"
- "NIST-800-53:AC-3"
Generate using the config:
Domain-Specific Generation¶
Generate an AI/ML standard:
mcp-standards generate \
--domain ai_ml \
--title "ML Model Deployment Standards" \
--description "Standards for deploying ML models in production"
Preview Mode¶
Preview without saving:
Batch Generation¶
Generate multiple standards using a script:
#!/bin/bash
templates=("technical" "process" "operational")
titles=("API Standards" "Code Review Standards" "Monitoring Standards")
for i in ${!templates[@]}; do
mcp-standards generate \
--template ${templates[$i]} \
--title "${titles[$i]}" \
--output "./standards/${templates[$i]}-standard.md"
done
Template Selection Guide¶
Choose the appropriate template based on your needs:
- base: General standards, custom domains
- technical: Code, APIs, frameworks, languages
- process: Workflows, reviews, methodologies
- compliance: Security, privacy, regulations
- operational: Monitoring, incidents, SRE
Domain-specific templates: - ai_ml: Machine learning pipelines, model management - blockchain: Smart contracts, DeFi, Web3 - gaming: Game engines, multiplayer, performance - iot: Edge computing, device management
Configuration File Format¶
Configuration files support all generation options:
# Template selection
template: technical # or domain template
domain: web_development
# Basic information
title: "Standard Title"
version: "1.0.0"
author: "Author Name"
description: "Brief description"
# Categories and tags
category: "API Design"
tags:
- rest
- graphql
- api
# Metadata
metadata:
frameworks:
- Express.js
- FastAPI
languages:
- JavaScript
- Python
tools:
- Postman
- Swagger
# Compliance mapping
compliance:
- "NIST-800-53:AC-2"
- "ISO-27001:A.9"
# Custom sections
sections:
requirements:
- "Use OpenAPI 3.0 specification"
- "Implement rate limiting"
best_practices:
- title: "API Versioning"
content: "Use semantic versioning in URLs"
- title: "Error Handling"
content: "Return consistent error responses"
Quality Validation¶
Generated standards are automatically validated for:
- Completeness: All required sections present
- Formatting: Proper markdown structure
- Metadata: Valid frontmatter
- References: Working links and citations
- Compliance: Valid NIST control mappings
To skip validation:
To validate existing standards:
Tips¶
- Start with templates: Use existing templates rather than starting from scratch
- Use interactive mode: Helpful for first-time users or complex standards
- Preview first: Always preview before saving, especially for complex standards
- Version control: Commit generated standards to version 1.0.0
- Customize templates: Create custom templates for repeated use
See Also¶
- Template Index
- Creating Standards Guide
- sync - Sync standards from repository