Getting Started
From zero to acceptance in just three steps.
Installation
npm install -g speclorePrerequisites
SpecLore requires Node.js 18+ and any of pnpm / npm / yarn package managers.
Initialize Your Project
cd your-project && speclore setupspeclore setup will:
- Detect AI tools: Automatically scan for Cursor / Claude Code / Qoder in your project
- Write MCP config: Generate MCP configuration files for detected AI tools
- Generate rules: Create
.speclore/config.yamlcore configuration
✔ Detected AI tools: Cursor, Qoder
✔ Written .cursor/mcp.json
✔ Written .qoder-cn/mcp.json
✔ Generated .speclore/config.yamlGenerate Acceptance Criteria
Generate standard BDD .feature files from any requirement source format:
# From a Markdown file
speclore spec requirements.md
# From plain text
speclore spec "Patient registration requires phone verification and WeChat login"
# From a Word document
speclore spec design.docx
# From a URL
speclore spec https://jira.example.com/issue/PROJ-123Example output:
✔ Generated specs/patient/register.feature
Scenario 1: Register with valid phone number
Scenario 2: Reject invalid phone format
Scenario 3: Warn on duplicate phone numberGenerate AI Coding Constraints
speclore codeAutomatically generates constraint files in the correct format for detected AI tools:
| AI Tool | Constraint File |
|---|---|
| Cursor | .cursor/rules/speclore.mdc |
| Claude Code | .claude/rules/speclore.md |
| Qoder | .qoder/rules/speclore.md |
Also generates test scaffolding files (e.g., tests/patient/register.test.ts) with it.skip test cases mapped to .feature scenarios.
Code & Acceptance
Code normally in your AI client. The AI will automatically read the constraint rules while you fill in the it.skip test scaffolding.
When ready, run acceptance:
speclore verifyExample output:
✔ 3/3 scenarios passed (100%)
specs/patient/register.feature
✓ Register with valid phone number → passed
✓ Reject invalid phone format → passed
✓ Warn on duplicate phone number → passed
✅ Acceptance passedUsing in AI Clients
speclore setup has already configured MCP automatically. You can use natural language in your AI client to complete the entire workflow:
You: Help me implement patient registration with phone verification
AI: Generated specs/patient/register.feature with 3 acceptance scenarios...
AI: Generated coding constraints and test scaffolding...
You: OK, I'll implement the code and tests
You: Run acceptance
AI: ✅ 3/3 scenarios passed (100%)
Next Steps
- Learn the full Workflow
- Check the Configuration Reference
- Explore MCP Tools in detail