Skip to content

AgentSpec is a comprehensive toolkit that enables AI agents to follow best practices through structured specifications, intelligent context detection, and automated validation. Transform your AI development workflow with modular instruction systems and enterprise-ready architecture.

License

Notifications You must be signed in to change notification settings

keyurgolani/AgentSpec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentSpec

Tests Coverage PyPI version Python 3.8+

Transform AI coding assistants into professional development partners with comprehensive instruction guides that ensure production-ready, secure, and maintainable code.

Quick Start

# Install
pip install agentspec

# Generate instructions for your project
agentspec generate --template react_app --output instructions.md

# Share instructions.md with your AI assistant and start coding!

Result: Your AI assistant now follows professional standards and produces production-ready code.

Features

  • 250+ Proven Instructions: Coding guidelines organized by technology and domain
  • 15 Project Templates: Ready-made instruction sets for common scenarios
  • Smart Analysis: Automatically detects your tech stack and suggests relevant instructions
  • AI-Optimized: Instructions designed specifically for AI coding assistants
  • Security & Quality: Built-in best practices for production-ready code
  • Comprehensive Coverage Integration: Advanced code coverage measurement, reporting, and enforcement with CI/CD integration

How It Works

  1. Choose a template or let AgentSpec analyze your project
  2. Generate instructions tailored to your technology stack
  3. Share with your AI assistant (ChatGPT, Copilot, Claude, etc.)
  4. Get professional-grade code that follows industry standards

Available Templates

Technology: react_app, python-api, nodejs-api, vue-frontend, mobile-app

Domain: saas-application, ecommerce-application, fintech-application, healthcare-application, data-science-application

Architecture: web-application, enterprise-web-application, microservice

Methodology: ai-assisted-development, security-focused-development

Usage Examples

# Generate instructions for different project types
agentspec generate --template react_app --output instructions.md
agentspec generate --template python-api --output instructions.md
agentspec generate --template ecommerce-application --output instructions.md

# Analyze existing projects
agentspec analyze ./my-project
agentspec generate --project-path ./my-project --tags auto --output instructions.md

# Interactive mode
agentspec interactive

# Browse available options
agentspec list-templates
agentspec list-tags

# Search for specific instructions
agentspec search "testing framework"
agentspec search "security best practices" --category infrastructure
agentspec search "api design" --format json

# Coverage analysis and reporting
make coverage                    # Run comprehensive coverage analysis
make coverage-report            # Generate enhanced coverage reports
make coverage-check             # Check coverage thresholds
python scripts/coverage_check.py --threshold 80
python scripts/upload_coverage.py --all

Fuzzy Search

AgentSpec includes powerful fuzzy search capabilities to help you discover relevant instructions quickly:

# Search across all instruction attributes
agentspec search "testing framework"

# Search with filters
agentspec search "security" --category infrastructure --tags security
agentspec search "react" --max-results 10

# Search specific attributes
agentspec search "tag:testing"
agentspec search "category:frontend"

Programmatic Search:

from agentspec import InstructionDatabase, SearchEngineFactory

# Create search engine
db = InstructionDatabase()
engine = SearchEngineFactory.create_default_engine(db)

# Search for instructions
results = engine.search("testing framework")
for match in results.matches:
    print(f"{match.instruction.id}: {match.overall_score:.2f}")

# Search with filters
from agentspec import SearchFilters
filters = SearchFilters(categories=["testing"], min_confidence=0.5)
results = engine.search("unit tests", filters)

Example

Without AgentSpec:

You: "Create a React login form"
AI: Basic form with no validation, security issues, no tests

With AgentSpec:

You: "Create a React login form" + AgentSpec instructions
AI: Production-ready form with validation, security, accessibility, tests, and documentation

Documentation

Who Should Use AgentSpec?

  • Developers using AI assistants (GitHub Copilot, ChatGPT, Claude, etc.)
  • Teams wanting consistent coding standards
  • Anyone building production applications with AI assistance

Getting Started

  1. Install: pip install agentspec
  2. Generate instructions: agentspec generate --template react_app --output instructions.md
  3. Share with AI: Copy instructions.md content to your AI assistant
  4. Start coding: Ask AI to build features following the instructions

For detailed guides, see the documentation.

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

About

AgentSpec is a comprehensive toolkit that enables AI agents to follow best practices through structured specifications, intelligent context detection, and automated validation. Transform your AI development workflow with modular instruction systems and enterprise-ready architecture.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages