Spec-as-Source Framework: AI-driven development where specifications are the source of truth.
Project description
SpecSoloist
SpecSoloist is a "Spec-as-Source" AI coding framework. It treats rigorous, SRS-style specifications as the source of truth and uses LLMs to compile them into executable code.
Why SpecSoloist?
Code is often messy, poorly documented, and prone to drift from original requirements. SpecSoloist flips the script:
- Write Specs: You write high-level, human-readable specifications (Markdown).
- Compile to Code: SpecSoloist uses LLMs (Gemini/Claude) to implement the spec.
- Self-Healing: If tests fail, SpecSoloist analyzes the failure and patches the code or tests automatically.
Installation
pip install specsoloist
Quick Start
-
Clone the repository (or create a new folder):
git clone https://github.com/symbolfarm/specsoloist.git cd specsoloist
-
Set your API Key (Gemini or Anthropic):
export GEMINI_API_KEY="your_key_here" # or export ANTHROPIC_API_KEY="your_key_here"
-
Create a new specification:
sp create calculator "A simple calculator with add and multiply"
This creates
src/calculator.spec.md. -
Compile it to code:
sp compile calculator
This generates
build/calculator.pyandbuild/test_calculator.py. -
Run the tests:
sp test calculator
-
(Optional) If tests fail, try auto-fix:
sp fix calculator
The Workflow
SpecSoloist isn't just a code generator; it's an architecture tool.
- Edit Spec ->
sp compile->sp test. - Failure? ->
sp fix(Let the AI patch the code). - Architecture Change? -> Edit
src/*.spec.md.
CLI Reference
| Command | Description |
|---|---|
sp list |
List all specs in src/ |
sp create <name> <desc> |
Create a new spec from template |
sp validate <name> |
Check spec structure |
sp compile <name> |
Compile spec to code + tests |
sp test <name> |
Run tests for a spec |
sp fix <name> |
Auto-fix failing tests |
sp build |
Compile all specs in dependency order |
Configuration
You can configure SpecSoloist via environment variables or a .env file:
export SPECSOLOIST_LLM_PROVIDER="gemini" # or "anthropic"
export SPEC_LLM_MODEL="gemini-2.0-flash" # optional
For Anthropic:
export SPECSOLOIST_LLM_PROVIDER="anthropic"
export ANTHROPIC_API_KEY="your_key_here"
export SPECSOLOIST_LLM_MODEL="claude-sonnet-4-20250514" # optional
Agent Integration (MCP)
SpecSoloist can run as an MCP server for Claude Desktop or other AI agents:
Add to your claude_desktop_config.json:
{
"mcpServers": {
"specsoloist": {
"command": "uv",
"args": ["run", "specsoloist-mcp"],
"env": {
"GEMINI_API_KEY": "..."
}
}
}
}
Or use the CLI: sp mcp
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file specsoloist-0.2.0.tar.gz.
File metadata
- Download URL: specsoloist-0.2.0.tar.gz
- Upload date:
- Size: 130.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ba2ca961d2fc152dedfe13e9a805a5221ed722760f15981b2861b4e315b08b
|
|
| MD5 |
35adba971042d09d654ad3ba891e13f7
|
|
| BLAKE2b-256 |
9fc7de6e25f9718524354464bd282316a8a22b5e0c285120c7aeca465a58e4ee
|
File details
Details for the file specsoloist-0.2.0-py3-none-any.whl.
File metadata
- Download URL: specsoloist-0.2.0-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e38189cd5f30b62b95037ebe03e35107e1ce700520fddcc03622a6d94dfaf48
|
|
| MD5 |
d91f5a688092af0ee48bb0325ed80ae6
|
|
| BLAKE2b-256 |
736f0305351d752784ceaf36f5dcc92c426621958e6f8db384276c9751700f81
|