Skip to content

chrs-myrs/msl-specification

Repository files navigation

MSL: The Markdown Specification Language for AI-Powered Development

MSL bridges human intent and AI implementation. Write specifications in markdown that both humans and AI assistants understand perfectly. No more vibe coding—achieve predictable, high-quality AI-generated code.

30-Second Quickstart

# MSL is a specification language - no installation needed!
# Just write markdown with requirements:

# Create your first specification
echo '# Login Feature
## Requirements
- Users authenticate with email/password
- Sessions expire after 24 hours
- Lock account after 5 failed attempts' > login.md

# Validate your specification  
msl-validate login.md

# Give to AI for implementation
# "Claude, implement the login feature from login.md"
# → Receive precise, tested implementation

That's it. You just directed an AI to build exactly what you want.

Why MSL? Because AI Needs Structure

In the age of AI assistants, the bottleneck isn't writing code—it's communicating intent. MSL solves this:

  • 🤖 AI-Native: LLMs understand MSL without training
  • ✅ Validated: Catch AI hallucinations before they become bugs
  • 💾 Persistent Context: Specifications survive session boundaries
  • 🚀 10x Productivity: Stop prompt engineering, start specifying
  • 🔮 Self-Validating: MSL is powerful enough to specify itself

Fun fact: The MSL language specification is written in MSL and validated by MSL. We eat our own dog food!

→ Learn Why MSL is Essential for AI Development

MSL in Action

Level 0: Start Simple

# Payment Processing

## Requirements
- Accept credit cards and PayPal
- Process refunds within 30 days
- Send email receipts

Valid MSL - Just markdown with requirements

Level 1: Add Structure for AI

---
id: payment-v2
version: 1.0
---
# Payment Processing

## Requirements
- REQ-001: Accept credit cards via Stripe API
- REQ-002: Accept PayPal via OAuth integration  
- REQ-003: Process refunds within 30 days with audit log
- REQ-004: Send email receipts within 5 minutes

AI can now track and implement each requirement precisely

Level 2: Scale with Templates

---
id: payment-enterprise
extends: payment-v2
---
# Enterprise Payment Processing

## Requirements
- REQ-001: [OVERRIDE] Accept cards via multiple gateways
- REQ-005: [NEW] Support cryptocurrency payments
- REQ-006: [NEW] Implement PCI compliance logging

AI understands inheritance and generates enterprise-grade code

Real-World AI Workflows

Solo Developer + Claude Code

Morning: Write specification (15 min)
→ AI: Generate implementation (instant)
→ Validate specification (automated)
→ AI: Generate tests (instant)
→ Ship feature (same day)

→ Solo AI Workflow Guide

Team + Multiple AIs

Architect: Define specifications
→ Dev A + ChatGPT: Implement backend
→ Dev B + Claude: Implement frontend
→ Specs ensure perfect integration
→ Automated validation gates

→ Team Collaboration Guide

Enterprise AI Governance

Compliance team: Write security specifications
→ Validation pipelines: Enforce standards
→ Multiple teams + AIs: Parallel development
→ Audit trail: Every requirement traced
→ Risk: Mitigated through validation

→ Enterprise Adoption Guide

Core Features

🤖 AI-Optimized

  • Natural language that LLMs understand natively
  • Token-efficient for context windows
  • Validation prevents hallucinations
  • Templates reduce prompt engineering

✅ Quality Assured

  • Automated validation with quality scores
  • DRY compliance checking
  • Testability verification
  • Architectural analysis

🔄 Git-Native

  • Version with your code
  • Branch specifications with features
  • Review specs like code
  • Merge without conflicts

🚀 Zero Learning Curve

  • It's just markdown
  • Start with Level 0
  • Add complexity only when needed
  • AI helps write specifications

🔮 Self-Referential Architecture

  • MSL is specified in MSL itself - proving its power
  • Core specifications governed by metaspecs written in MSL
  • Self-validating system using its own features
  • Learn about MSL's meta architecture →

For AI Assistants

Quick Start for AI Agents

If you're an AI assistant (Claude, ChatGPT, etc.) helping with an MSL project:

  1. Start here: Read specs/INDEX.md for navigation
  2. Understand purpose: Check specs/msl-purpose-and-limitations.md
  3. Project setup: Follow specs/standards/msl-project-organization.md
  4. Create PURPOSE.md first: Every project needs a PURPOSE specification
  5. Use appropriate level: L0 for simple, L1 for structured, L2 for complex

AI Agent Best Practices

  • Always create PURPOSE.md as the first file in new projects
  • Organize specifications in /specs directory structure
  • Start with the simplest MSL level that meets requirements
  • Use validation tools to ensure specification quality
  • Reference this repository via context7 MCP when available

Documentation

Getting Started

Comprehensive Guides

Workflows

Claude Code Agents

MSL includes intelligent agents for specification management:

MSL Validation Agent

Analyzes specifications for quality, suggests improvements, ensures AI readability.

@claude validate my payment specification for AI implementation
→ Receives quality score, improvements, and AI-readiness assessment

MSL Batch Validator

Processes entire specification suites, identifies patterns, generates reports.

@claude analyze all specifications in /specs directory
→ Receives complete analysis with template opportunities

→ Claude Code Agent Documentation

Using MSL

MSL is just enhanced markdown - no installation needed! Write your specifications anywhere using the patterns shown in the examples above.

# Your Project Specification

## Requirements
- REQ-001: Clear requirement statement
- REQ-002: Another requirement

That's it! Give your MSL specifications to AI assistants like Claude for implementation.

CI/CD Integration

# GitHub Actions
- name: Validate Specifications
  run: |
    npx msl-validate ./specs --min-score 85
    echo "✅ Specifications ready for AI implementation"

→ Complete Installation Guide

The MSL Advantage

Challenge Without MSL With MSL
AI Understanding Vague prompts → Guessed implementation Precise specs → Exact implementation
Consistency Every session different Specifications persist
Quality Hope AI gets it right Validated before implementation
Collaboration AIs work in isolation AIs work from same specs
Maintenance Context lost over time Specifications are documentation

Quick Examples

API Endpoint Specification

---
id: user-api
---
# User Management API

## Requirements
- REQ-001: GET /users returns paginated user list
- REQ-002: GET /users/{id} returns single user or 404
- REQ-003: POST /users creates user, returns 201 with location
- REQ-004: All endpoints require Bearer token authentication
- REQ-005: Responses use JSON with consistent error format

AI implements complete REST API with error handling

Database Schema Specification

# User Database

## Requirements
- REQ-001: Users table with id (UUID), email (unique), created_at
- REQ-002: Email must be lowercase, validated format
- REQ-003: Soft deletes via deleted_at timestamp
- REQ-004: Index on email for login performance

AI generates migration scripts and models

React Component Specification

# Login Form Component

## Requirements
- REQ-001: Email and password inputs with validation
- REQ-002: Show inline errors on blur
- REQ-003: Disable submit during API call
- REQ-004: Redirect to dashboard on success
- REQ-005: Display API errors below form

AI creates complete component with tests

Start Your AI-Powered Journey

Option 1: Try It Now (2 minutes)

# Create a spec
cat > todo-app.md << 'EOF'
# Todo App
## Requirements
- Add todos with enter key
- Mark todos complete
- Filter by status
- Persist to localStorage
EOF

# Give to your AI assistant
# "Implement this todo app: [paste todo-app.md]"

Option 2: Learn First (15 minutes)

  1. Read Why MSL? - Understand the AI revolution
  2. Follow Getting Started - Create your first spec
  3. Explore AI Workflows - Master AI collaboration

Option 3: Jump In (30 minutes)

  1. Install MSL tools
  2. Write specifications for your current project
  3. Let AI implement them
  4. Experience 10x productivity

MSL Ecosystem

LiveSpec - Specification Governance Framework

LiveSpec uses MSL to manage its own methodology specifications. A governance framework with 51 MSL specifications demonstrating:

  • Scale: Complex self-referential specification systems
  • Metaspecs: Specs about specs (framework governance)
  • Domain extensions: Traceability patterns for governance frameworks
  • Dogfooding: Framework built using its own methodology

A valuable reference for large specification suites and framework development.

Community & Support

The Future is Structured

As AI becomes more powerful, the need for structured specifications becomes more critical. MSL is the foundation for the next decade of software development.

Join thousands of developers who've stopped fighting with AI prompts and started shipping with MSL specifications.


→ Get Started Now | → Why MSL? | → AI Workflows

MSL: Where human intent meets AI implementation.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors