spec driven development tools
To run the commands, you will need an NPM package executor like npx. We recommend bunx: https://bun.sh/.
This README aliases bunx @stringsync/spec with spec. I recommend you add the same alias to your shell profile, unless you plan to work on the @stringsync/spec repo itself (see the Dev section).
Declare
calculator.spec.md
# calculator
## calculator.add
It adds two numbers.Tag
class Calculator {
// spec(calculator.add): Optional tag body.
add(a: number, b: number) {
return a + b;
}
}Scan
spec scanYou can generate prompts for various workflows using the @stringsync/spec CLI. If you have the @stringsync/spec MCP server installed on your agent, you can access the same prompts through your MCP application (if it's supported).
To see an interactive list of available prompts, run:
spec promptTo see what flags are required, run:
spec prompt <name> -hTo copy the output to the clipboard, pipe the output to pbcopy:
spec prompt <name> | pbcopy...or pipe it directly to a coding agent!
spec prompt <name> | gemini -pspec prompt <name> | claude -pYou can combine the prompts in any order, but here are some recommendations.
Create a Module
- create foo.spec.md
spec prompt audit --selector foospec prompt plan --selector foospec prompt build --selector foo
Update a Spec
- update foo.spec.md (or a tagged implementation)
spec prompt audit --selector foo.barspec prompt plan --selector foo.barspec prompt build --selector foo.bar
Delete a Module
- delete foo.spec.md
spec prompt audit --selector foo
To run the @stringsync/spec MCP server, run:
spec mcpRead your agent's documentation to run the MCP server. For example, Cline's configuration will look like this:
{
"mcpServers": {
"spec": {
"type": "stdio",
"command": "bunx",
"args": ["-y", "@stringsync/spec", "mcp"]
}
}
}Note
The -y flag skips confirmation to download packages.
Note
Claude Desktop must use npx, since the paths aren't configurable.
To run the MCP inspector, run:
bunx @modelcontextprotocol/inspector bunx @stringsync/spec mcpTo verify that spec is not installed, run:
speccommand not found: spec
To install the project dependencies, run:
bun installTo install the spec CLI, run:
bun setupTo run dev mode, run:
bun devTo verify the installation, run:
specTo uninstall the spec CLI, run:
bun teardownInstall the official GitHub CLI at https://github.com/cli/cli.
To bump the version and release it, run:
bun run release [alpha|beta|rc|patch|minor|major]