Describe the problem clearly, and half of it is already solved.
— Kidlin's Law
Cliplin is a framework that enables Feature-centric Spec-Driven Development in your projects, taking human-AI collaboration to the next level.
Spec-Driven Development is a software development methodology where specifications are the source of truth, not code. It's similar to approaches like SpecKit, but taken to a practical operational level.
In modern enterprise environments, AI tools fail not because models are weak, but because:
- ❌ Context is implicit, fragmented, or inconsistent
- ❌ Technical decisions get lost in conversations or outdated documentation
- ❌ There's no single source of truth about what, how, and why to build
- ❌ AI lacks structured access to project decisions and rules
In Spec-Driven Development:
- ✅ Specifications are versioned and live in the repository
- ✅ Code is an output of the system, not its source of truth
- ✅ AI only acts on well-defined specifications
- ✅ Every change is traceable to a specification
Cliplin is not just a CLI tool. It's a complete operational framework that implements Spec-Driven Development in real projects, with real teams and real constraints.
Cliplin organizes specifications into four complementary pillars, each with a precise responsibility:
Defines WHAT the system must do and WHY
- Specifications written in Gherkin (Given-When-Then)
- Express business behavior and rules
- They are the source of truth of the system
- Key principle: If a feature doesn't exist, the functionality doesn't exist
Defines HOW the system expresses intent to users
- Describe screens, components, roles, and responsibilities
- Focus on intent, not pixels
- Allow AI to generate UI code without guessing UX decisions
Defines HOW software must be implemented
- Markdown files with YAML frontmatter; act as a technical contract
- Include: coding conventions, naming rules, validation strategies
- Key principle: Doesn't describe WHAT to build, defines HOW to build it correctly
- Location:
docs/tdrs/*.md(seedocs/business/tdr.mdfor format)
Preserves WHY technical decisions were made
- Architectural choices, trade-offs, constraints
- Prevents AI (and humans) from reopening closed decisions
# Install Cliplin from GitHub (recommended)
uv tool install git+https://github.com/Rodrigonavarro23/cliplin.git
# One-time execution without installing
uvx cliplin init --ai cursorCliplin automatically creates the directory structure and configures everything needed:
.
├── cliplin.yaml # Cliplin config (ai_tool, knowledge, etc.)
├── docs/
│ ├── adrs/ # Project Architecture Decision Records (user-created)
│ ├── business/ # Business documentation
│ ├── features/ # Feature files (Gherkin)
│ ├── tdrs/ # Technical Decision Records (TDR)
│ └── ui-intent/ # UI specifications
└── .cliplin/
├── data/context/ # Context store (project context store)
└── knowledge/
└── cliplin-framework/ # Built-in framework ADRs (hidden, updated on init)
Init creates a built-in framework package at .cliplin/knowledge/cliplin-framework/ with framework ADRs (Cliplin overview, TDR format, UI Intent format, knowledge packages) so the AI and tools have visibility of available commands and conventions. This package is hidden (not in cliplin.yaml) and is updated on every init. The framework context is indexed automatically — no need to run cliplin reindex after init.
Note: Cliplin tools (SPAs) are part of the Cliplin package installation, not your project directory.
Feature File (docs/features/authentication.feature):
Feature: User Authentication
As a user
I want to log in
So that I can access my account
Scenario: Successful login
Given I have valid credentials
When I enter my email and password
Then I should be authenticated
And I should be redirected to the dashboardTDR File (docs/tdrs/input-validation.md):
---
tdr: "1.0"
id: "input-validation"
title: "Input Validation"
summary: "Validate data at controllers; internal services assume validity"
---
# rules
- Avoid repeating validations in internal services
- Provide clear errors with 4xx HTTP status codes
code_refs:
- "handlers/user.py"
- "validators/*.py"# Index all specifications
cliplin reindex
# Index a specific type
cliplin reindex --type tdr
# Preview changes
cliplin reindex --dry-runCliplin uses the Cliplin MCP (context store) to semantically index and search all your specifications, enabling AI to access relevant context in real-time.
For proprietary libraries and SDKs, generate structured prompts that guide AI to create technical ADRs:
# From a local repository
cliplin adr generate ./vendor/my-proprietary-sdk
# From a remote repository (GitHub, GitLab, etc.)
cliplin adr generate https://github.com/company/proprietary-sdkThe command generates a structured prompt with step-by-step instructions for AI to analyze the repository and create a consistent, precise ADR following Cliplin framework standards.
Cliplin includes built-in Single Page Applications (SPAs) that you can open directly from the CLI:
# List available tools
cliplin tool --list
# Open a tool
cliplin tool ui-intentNote: Tools are part of the Cliplin package installation, not your project. They are provided by Cliplin and available in any project where Cliplin is installed.
You can install knowledge packages: external repos with ADRs, TDRs, features, etc. They are installed under .cliplin/knowledge/ and indexed in the same context store as your project specs.
cliplin knowledge list
cliplin knowledge add aws github:org/cliplin-knowledge main
cliplin knowledge show aws
cliplin knowledge update aws
cliplin knowledge remove awsPackages are declared in cliplin.yaml under the knowledge key. In multi-package repos (one repo with several top-level folders like aws/, commons/), the package name selects which folder to install. See docs/business/knowledge-packages.md for full usage, config format, and conventions.
With Cliplin configured, you can tell your AI assistant:
"Implement the authentication feature"
And the AI will:
- ✅ Automatically load context from the Cliplin MCP server (context store)
- ✅ Consider or update the feature spec first if the request implies new or changed behavior (feature-first flow)
- ✅ Read the feature file and related specifications
- ✅ Apply technical rules defined in TDRs
- ✅ Respect architectural decisions in ADRs
- ✅ Generate code aligned with your specifications
Tip — reinforce the feature-first flow in your prompts
Even when the feature-first flow is explicitly defined in the Cliplin rules loaded by your AI, assistants can still skip updating specs and jump straight to code — especially on quick or familiar requests. This is a known AI behavior, not a Cliplin limitation.
When it matters, add a short reminder to your prompt:
- "Follow the feature-first flow"
- "Update the feature file first, then implement"
- "Check and update the spec before touching any code"
This works with any AI (Claude, Cursor, Gemini, etc.) and keeps specs in sync with implementation.
- Faster onboarding: New members understand the project through clear specifications
- Safe parallelization: Specifications prevent conflicts and confusion
- Auditable decisions: Every change is traceable to a specification
- Preserved knowledge: ADRs prevent reopening closed decisions
- Predictable behavior: AI acts on specifications, not guessing
- Structured context: The Cliplin MCP provides semantic search of specifications via the context store
- Guaranteed consistency: Technical rules (TDR) ensure uniform code
- Fewer iterations: Clear specifications reduce misunderstandings
- Reduced ambiguity: Clear specifications = fewer interpretation errors
- Complete traceability: Every line of code traceable to a feature
- Safer changes: Specifications prevent unwanted changes
- Living documentation: Specifications are code, not obsolete documentation
# Initialize project
cliplin init --ai cursor # For Cursor AI
cliplin init --ai claude-code # For Claude Code (also: --ai claude-desktop)
cliplin init --ai gemini # For Gemini CLI
# Validate structure
cliplin validate
# Index specifications
cliplin reindex # All
cliplin reindex docs/features/*.feature # Specific
cliplin reindex --type tdr # By type
cliplin reindex --directory docs/business # By directory
cliplin reindex --dry-run # Preview
# Generate implementation prompt
cliplin feature apply docs/features/my-feature.feature
# Generate ADR prompt from repository
cliplin adr generate ./vendor/my-proprietary-sdk # Local repository
cliplin adr generate https://github.com/company/sdk # Remote repository
# Knowledge packages (optional)
cliplin knowledge list # List packages
cliplin knowledge add <name> <source> <v> # Add and index
cliplin knowledge show <name> # Show details
cliplin knowledge update <name> # Update and reindex
cliplin knowledge remove <name> # Remove and purge from context store
# Open tools (SPAs)
cliplin tool ui-intent # Open a specific tool
cliplin tool --list # List all available tools- Python 3.10 or higher (Python 3.11 may have compatibility issues with the context store backend on Windows)
- uv (Astral UV) — recommended for installation from GitHub:
uv tool install git+https://github.com/Rodrigonavarro23/cliplin.git - A compatible AI assistant (Cursor, Claude Code, Gemini CLI, etc.)
- Cursor:
cliplin init --ai cursor- Creates
.cursor/mcp.jsonwith acliplin-contextMCP server (uv run cliplin mcp) and rules under.cursor/rules/*.mdc.
- Creates
- Claude Code:
cliplin init --ai claude-code(alias:--ai claude-desktop)- Creates
.mcp.jsonat project root withcliplin-contextMCP server and rules under.claude/rules/, plus consolidated instructions in.claude/instructions.md.
- Creates
- Gemini CLI:
cliplin init --ai gemini- Creates
.gemini/settings.jsonwithmcpServers.cliplin-context(command: "uv",args: ["run", "cliplin", "mcp"]) and aGEMINI.mdcontext file at project root that Gemini CLI loads as hierarchical instructional context.
- Creates
If you're installing Cliplin on Windows, you'll need:
-
Microsoft Visual C++ Build Tools (Required for the context store backend dependency
hnswlib)- Download and install from: https://visualstudio.microsoft.com/visual-cpp-build-tools/
- Requires Microsoft Visual C++ 14.0 or greater
- Without this, you'll see an error:
error: Microsoft Visual C++ 14.0 or greater is required - Important: Install this BEFORE installing Cliplin
-
Python Version Compatibility
- Recommended: Python 3.10 (most stable with the context store backend on Windows)
- Python 3.11 may have compatibility issues with the context store backend
- Verify your Python version:
python --version
-
Path Considerations
- Cliplin automatically handles Windows path compatibility
- Use absolute paths when possible for better reliability
- Ensure your project directory has write permissions
Cliplin doesn't try to make AI smarter.
It makes the problem smaller, clearer, and executable.
When problems are described correctly, both humans and AI perform better.
That's the essence of Cliplin.
Step 1: Install Prerequisites
-
Install Microsoft Visual C++ Build Tools (if not already installed):
- Download from: https://visualstudio.microsoft.com/visual-cpp-build-tools/
- Run the installer and select "C++ build tools"
- This is required for the context store backend's
hnswlibdependency
-
Verify Python Installation:
python --version # Should show Python 3.10.x (3.11 may have issues)
-
Install uv (if not already installed):
# With pip pip install uv # Or with PowerShell (recommended) powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Step 2: Install Cliplin
Choose one of the installation methods below (same as other platforms).
Recommended: Install from GitHub with uv
This is the default way to get Cliplin. It always installs the latest version from the repository.
# Install from main branch
uv tool install git+https://github.com/Rodrigonavarro23/cliplin.git
# Install from a specific branch (optional)
uv tool install git+https://github.com/Rodrigonavarro23/cliplin.git@mainAlternative: Install from PyPI or local (when available)
Use uv tool install cliplin only when the package is published on PyPI or you want to run a local/dev build (e.g. after cloning and uv pip install -e .). For most users, prefer the GitHub command above.
# From PyPI (when the package is published)
uv tool install cliplinOther options
# With pip from GitHub
pip install git+https://github.com/Rodrigonavarro23/cliplin.gitDevelopment / local debugging
git clone https://github.com/Rodrigonavarro23/cliplin.git
cd cliplin
uv pip install -e .
# or: pip install -e .If you encounter issues during installation:
-
"Microsoft Visual C++ 14.0 or greater is required"
- Install Microsoft Visual C++ Build Tools (see Step 1 above)
- Restart your terminal/PowerShell after installation
-
Encoding errors when creating templates
- Set environment variable:
$env:PYTHONIOENCODING="utf-8"in PowerShell - Or ensure your system locale supports UTF-8
- Set environment variable:
-
Context store indexing fails
- Ensure you have write permissions in your project directory
- Try running PowerShell/Command Prompt as Administrator
- Check that the path length is reasonable (<260 characters recommended)
-
Python version issues
- Use Python 3.10 if you encounter compatibility problems
- Create a virtual environment:
python -m venv .venv - Activate it:
.venv\Scripts\activate(PowerShell) or.venv\Scripts\activate.bat(CMD)
After installation, initialize Cliplin in your project:
cliplin init --ai cursorIf you're using Claude Desktop, Cliplin creates rule files in .claude/rules/ and MCP config at project root in .mcp.json. To use these rules:
Step 1: Load Instructions at the Start of Each Conversation
At the beginning of each conversation in Claude Desktop, copy and paste the contents of .claude/instructions.md into the chat. This file contains all project rules consolidated in one place.
Quick Steps:
- Open
.claude/instructions.mdin your editor - Copy the entire contents (Cmd/Ctrl + A, then Cmd/Ctrl + C)
- Paste it into Claude Desktop at the start of your conversation
- Claude will now follow all project rules and protocols
Why This is Important:
- Ensures Claude loads context from the Cliplin MCP server (context store) before any task
- Applies all technical rules and architectural constraints
- Prevents wasted tokens and misaligned code
- Maintains consistency with project specifications
Alternative: Create a Claude Skill (Advanced)
You can also create a Claude Skill from the .claude/ directory for automatic rule loading:
- Zip the
.claude/directory (MCP config is at project root in.mcp.json, not inside.claude/) - In Claude Desktop: Settings > Extensions
- Click "Advanced Settings" > "Extension Developer"
- Click "Install Extension..." and select the ZIP file
- Claude will automatically apply these rules in relevant contexts
Cliplin doesn't replace engineers, tools, or processes.
It replaces ambiguity.
MIT
Contributions, issues, and feature requests are welcome. Help us make Spec-Driven Development accessible to everyone!
Questions? Open an issue or check the documentation:
- Landing page (GitHub Pages): pages/ — source for the project site; see pages/README.md for how to publish.
- Framework and pillars: docs/business/framework.md
- Knowledge packages: docs/business/knowledge-packages.md