spectx
v2.0.3
Published
Learn the DNA. Generate the Specification. Build with Confidence.
Readme
Spectx
Learn the DNA. Generate the Specification. Build with Confidence.
What it is
Spectx is a repository-intelligence-driven specification platform. It learns the DNA of a codebase — its architecture, naming conventions, testing patterns, error handling, dependency style, and documentation practices — and uses that knowledge to generate specifications and orchestrate AI coding agents that produce implementations consistent with how the repository already works.
It is positioned at the intersection of static analysis, knowledge graph construction, AI-assisted specification, and developer tooling. It is not a code generator. It is not a linter. It is the layer that ensures AI agents understand the repository before they change it.
Core workflow
Repository Analysis
↓
Repository DNA Extraction
↓
Knowledge Graph Construction
↓
Impact Analysis
↓
Specification Generation
↓
Planning
↓
Agent Execution (external)
↓
Quality ValidationInstall
npm install -g spectxQuick start
spectx init
spectx analyze
spectx risk "add payment processing"
spectx spec "add payment processing" --feature payment --risk
spectx plan payment
spectx review payment
spectx implement paymentCore principles
- Repository First — every generated artifact reflects the actual repository
- Works with Existing Projects — brownfield support is a first-class concern, not an afterthought
- Works with New Projects — greenfield is equally supported
- Universal Language Support — no language-specific toolchain required in the target project
- Agent Agnostic — generates context for Claude Code, Cursor, Copilot, Windsurf, or any future agent
- Zero Repository Pollution — all Spectx artifacts live under
.spectx/; source code, build files, and language configuration are never modified
Commands reference
| Command | Description |
| ---------------------------- | ------------------------------------------------------------------------------------- |
| spectx init | Initialise a .spectx/ workspace in the current repository |
| spectx analyze | Traverse the repo, extract Repository DNA, build the knowledge graph |
| spectx graph | Summarise or query the knowledge graph |
| spectx explain <entity> | Explain a file, class, or function and its relationships |
| spectx risk <description> | Compute impact and risk level for a proposed change |
| spectx spec <description> | Generate a specification document for a feature |
| spectx plan <feature> | Decompose a spec into a topologically ordered task plan |
| spectx review <feature> | Run quality gates against a spec and plan |
| spectx implement <feature> | Generate agent context package and write integration files |
| spectx run <description> | Orchestrate the full pipeline in one command (--llm, --no-infer, --package) |
| spectx agents sync | Write slash-command and MCP configuration for coding agents |
| spectx registry | Publish/pull cross-service API surfaces (publish, pull, list, diff, status) |
| spectx llm | Configure and test LLM providers (status, test, providers, mode) |
| spectx config | Show or set configuration values |
Agent integrations
Spectx supports two equivalent integration paths for coding agents:
- Slash commands (zero setup): Run
spectx agents syncto inject workflow instructions into your agent's instruction file. Use/spectx-run "add feature" --feature my-featureto invoke the full pipeline. - MCP server: Install
spectx-mcpfor native tool calls with structured JSON responses. Works with Claude Desktop, Cursor, and VS Code Copilot.
npm install -g spectx-mcpSupported agents: Claude Code, Cursor, GitHub Copilot, Windsurf.
Requirements
- Node.js >= 20.19.0
License
MIT — see LICENSE
Contributing
See CONTRIBUTING.md for how to run tests, submit PRs, and follow the code style.
