Metadata-Version: 2.4
Name: specpass
Version: 1.0.0
Summary: Verification-First Code Generation Platform. From spec to verified code in 4 languages.
Home-page: https://github.com/WootWooty/specpass
Author: WoOty
Author-email: wooty@specpass.dev
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.5; extra == "mcp"
Provides-Extra: yaml
Requires-Dist: pyyaml>=6.0; extra == "yaml"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary

# specpass

**Verification-First Code Generation Platform.**  
From a Markdown spec → verified code in **Python, TypeScript, Rust, or Go** — one command, $0.0002.

```bash
pip install specpass
specpass run spec.md --out build/
specpass run --desc "Flask REST API with JWT auth" --lang ts
specpass verify build/ --spec spec.md
```

## Why specpass?

Every other AI code generator produces code that *looks right* but breaks at runtime.  
specpass is **verification-first**: it runs 5 deterministic gates against every generated file:

| Gate | What it checks |
|------|---------------|
| 🔌 Import | Can every module be imported? |
| 📐 Static | Are there syntax/type errors? (mypy/tsc/cargo check/go vet) |
| 📋 Contract | Do function signatures match the spec? |
| ⚡ Runtime | Do all tests pass? (pytest/jest/cargo test/go test) |
| 🔗 Dependencies | Do all imports resolve? |

Plus **12 cheat patterns** (hardcoded answers, empty tests, config leaks)  
and **Clover-level consistency** between code, docstrings, and contracts.

## Quick Start

```bash
# 1. Write a spec
cat > my-tool.md << 'EOF'
# My Tool
## Contracts
- `greet(name: str) -> str`
- `add(a: int, b: int) -> int`
## Language
- py
EOF

# 2. Generate and verify
specpass run my-tool.md --out build/

# 3. Use the code
python3 -c "from simple_calculator.add import add; print(add(2, 3))"
```

## Self-Spec (NL → Code)

Don't want to write a spec? Just describe what you need:

```bash
specpass run --desc "a Rust CLI tool that reads a CSV file and outputs JSON" --lang rs
```

This auto-generates the spec → plans the architecture → generates 10+ files → verifies everything → done.

## Delta Specs

Update an existing spec with changes:

```bash
specpass diff my-tool.md --desc "Add divide function that handles division by zero" --out my-tool-v2.md
specpass run my-tool-v2.md
```

## Brownfield Scan

Analyze an existing codebase and generate a spec from it:

```bash
specpass scan ./my-project/
specpass run spec.md --out build-v2/
```

## MCP Server

specpass works as an MCP (Model Context Protocol) server — use it from Claude Code, Cursor, or any MCP client:

```bash
specpass mcp
# Tools: generate, verify, scan, delta, stats
```

## Language Support

| Language | Code | Static Check | Test Runner | Ext |
|----------|------|-------------|-------------|-----|
| Python | py | mypy / ast.parse | pytest | .py |
| TypeScript | ts | tsc --noEmit --strict | jest | .ts |
| Rust | rs | cargo check | cargo test | .rs |
| Go | go | go vet | go test | .go |

Add a new language by extending the `LANGUAGES` dict.

## Architecture

```
Spec (Markdown/YAML) → Architecture Plan → Code Gen (4× parallel)
→ 5 Verification Gates → Cheat Detection → Consistency Check
→ (if fail) Repair Loop with Claude fallback → Done
```

Each step is deterministic. No "vibe coding" — every file is verified before you see it.

## Pricing

| Task | Cost | Time |
|------|------|------|
| 3-function Python module | $0.0002 | 5s |
| 20-function Flask API | $0.14 | 25s |
| Rust CLI tool (self-spec) | $0.05 | 30s |

~2000× cheaper than Claude Code Dynamic Workflows.

## License

MIT
