The quality and communication layer for AI coding agents. Lint instructions, review plans, check documentation health, and connect agents across repos, devices, and tools.
Project description
writ
Better instructions. Connected agents.
The quality and communication layer for AI coding agents. Lint instructions, review plans, check documentation health, and connect agents across repos, devices, and tools.
Requires Python 3.11+. On macOS,
brew install python@3.12or use pyenv. The default macOS Python (3.9) will show "no matching distribution" on install.
pip install enwrit
writ lint CLAUDE.md # Instant quality score (0-100) for any instruction
writ plan review plan.md # AI-powered plan review before implementation
writ init # Initialize + install 11 built-in skills
writ search "code reviewer" # Find from 6,000+ instructions on the Hub
writ add code-review-agent # Add to project + activate in your IDE
Try the live lint demo -- paste any instruction, get an instant quality score. Or browse the Hub.
Lint Your Instructions
writ lint scores any instruction 0-100 across 6 dimensions: Clarity, Verification, Coverage, Brevity, Structure, Examples. Works on any .md, .mdc, .txt, or YAML file -- no writ init required.
writ lint .cursor/rules/my-rule.mdc
# Score: 34 / 100
# Dimension Score Summary
# Clarity 43 Moderate
# Structure 44 Moderate
# Coverage 31 Needs improvement
# Brevity 51 Moderate
# Examples 15 Critical
# Verification 10 Critical
# Suggestions:
# Replace vague phrases with imperative commands
# Add verification: test/build/lint commands (2-3x quality impact)
# Add 1-2 code examples showing desired patterns
Three tiers depending on your needs:
writ lint CLAUDE.md # Default: ML-powered, local, free (TF-IDF + LightGBM)
writ lint AGENTS.md --deep # Type-aware qualitative review (your IDE's AI)
writ lint AGENTS.md --deep --fix # Review + auto-fix
writ lint AGENTS.md --deep-api # AI scoring via enwrit.com (Gemini)
writ lint AGENTS.md --deep-local # Fully local AI (writ-lint-0.8B, GPU-accelerated)
writ lint rules.mdc --json # Machine-readable output for CI
writ lint --ci --min-score 60 # Exit 1 if score too low (CI gate)
Review Plans Before You Code
writ plan review analyzes implementation plans with AI -- catching technical issues, questioning assumptions, and suggesting alternatives before implementation. Since the AI LLM can call this command by itself, it enables the agent to automatically find problems in the plan through an unbiased objective reviewer with different context, thus improving the plan and reducing the human's cognitive load.
writ plan review plan.md # Review with your configured model
writ plan review plan.md --local # Print review rubric for IDE's AI (no API call)
writ plan review plan.md --json # Structured JSON for agent consumption
writ plan review plan.md --no-context # Skip project context injection
Free tier: writ login gives you 5 daily reviews via Gemini -- zero config needed.
Bring Your Own Model
Configure any LLM provider for plan review and AI-powered features. Full privacy -- local models never send data to enwrit.com.
writ model set openai --api-key sk-...
writ model set anthropic --api-key sk-ant-...
writ model set gemini --api-key AIza...
writ model set local --url http://localhost:1234/v1 # LM Studio, Ollama, etc.
writ model list # Show current config
Works with LM Studio, Ollama, vLLM, or any OpenAI-compatible local server.
Documentation Health
Keep your agent's knowledge base accurate. writ docs provides schema-driven health-checking -- a documentation index tracks what exists, and heuristic scans detect when reality drifts.
writ docs init # Create documentation index (agents populate it)
writ docs check # Heuristic scan: dead refs, treeview drift, staleness
writ docs update # AI-powered fix pass (runs check + instructs your model)
writ query # Show the docs index (agents use this to navigate)
writ status # Activity log + health score at a glance
writ docs check
# Documentation Health: 72/100
# - 3 dead file references in AGENTS.md
# - 2 treeview entries for files that no longer exist
# - 1 stale instruction (last modified 90+ days ago)
The documentation index (writ-docs-index) acts as a schema for your project's knowledge -- agents read it to know what documentation exists and where. writ docs update feeds the health check findings to your IDE's model with a comprehensive instruction to fix issues, update the index, and log a summary of decisions to the writ-log instruction.
11 Built-in Skills
writ init auto-installs 11 battle-tested skills into your IDE's skill directory (.cursor/skills/writ/, .claude/skills/writ/, etc.). Each is generalized from popular open-source repos:
| Skill | What it does | Inspired by |
|---|---|---|
| autoresearch | Autonomous research loop | Karpathy auto-research |
| plan-skill | Structured planning methodology | obra/superpowers (134k stars) |
| verify-skill | Post-implementation verification | obra/superpowers (134k stars) |
| superpower-skill | Brainstorming + systematic debugging | obra/superpowers (134k stars) |
| code-simplifier | Code cleanup patterns | Anthropic Claude Code plugins |
| skill-creator-skill | Meta-skill for creating new skills | Anthropic Claude Code plugins |
| security-scan | Lightweight security audit | Anthropic security review |
| tech-debt-fixer | Technical debt detection | 0xdarkmatter/claude-mods |
| pre-commit-checks | Pre-commit verification | obra + community patterns |
| doc-maintenance | Documentation health | Community patterns |
| doc-health | Schema-driven doc maintenance | Karpathy LLM Wiki |
Works With Your Tools
writ writes to native IDE files -- your editor picks them up automatically. Instructions are routed to rules/, skills/, or agents/ subdirectories based on type.
| Tool | Auto-detected | Rules | Skills | Agents |
|---|---|---|---|---|
| Cursor | Yes | .cursor/rules/ |
.cursor/skills/writ/ |
.cursor/agents/ |
| Claude Code | Yes | .claude/rules/ |
.claude/skills/writ/ |
.claude/agents/ |
| GitHub Copilot | Yes | .github/instructions/ |
.github/skills/writ/ |
.github/agents/ |
| Kiro | Yes | .kiro/steering/ |
.kiro/skills/writ/ |
.kiro/agents/ |
| Windsurf | Yes | .windsurf/rules/ |
.windsurf/skills/writ/ |
.windsurf/agents/ |
| Codex | Yes | .codex/rules/ |
.codex/skills/writ/ |
.codex/agents/ |
| Gemini CLI | Yes | .gemini/rules/ |
.gemini/skills/writ/ |
.gemini/agents/ |
| OpenCode | Yes | .opencode/rules/ |
.opencode/skills/writ/ |
.opencode/agents/ |
| Cline | Yes | .clinerules/ |
.cline/skills/writ/ |
.cline/agents/ |
| Roo Code | Yes | .roo/rules/ |
.roo/skills/writ/ |
.roo/agents/ |
| Amazon Q | Yes | .amazonq/rules/ |
.amazonq/rules/ |
.amazonq/agents/ |
When you run writ add reviewer, the tool composes all relevant context and writes it directly into the files your IDE already reads.
What Makes writ Different
| Capability | What it means |
|---|---|
| Instruction linting | 6-dimension quality scoring (0-100). Code-based, ML-powered, or AI-powered. |
| Plan review | AI analyzes your implementation plans before coding. Local or cloud models. |
| Docs health | Schema-driven knowledge health: docs index, heuristic scan, AI-powered update pass, knowledge log. |
| Multi-format export | One instruction, 11 auto-detected IDE formats + legacy opt-in formats. |
| Personal library + cloud sync | writ save → writ add --lib on any device. Your instructions follow you. |
| Hub with 6,000+ instructions | Semantic search across rules, agents, skills, programs. writ search / writ add. |
| Built-in skills | 11 community-tested skills auto-installed on writ init. |
| Local model support | LM Studio, Ollama, vLLM -- fully private, no data leaves your machine. |
| Agent communication | Structured conversations between agents across repos and devices. |
| MCP server | One config line and any agent can search, lint, and review via MCP. |
Hub: Browse & Install
The enwrit Hub aggregates instructions from multiple sources:
- Rules -- passive context that shapes agent behavior
- Agents -- on-invocation workers (code review, security audit, etc.)
- Programs -- autonomous metric-driven loops
- Skills -- curated skills from popular GitHub repos
writ search "code review" # Semantic search from CLI
writ add code-review-agent # Add to project + activate in your IDE
Context Composition
Each agent's context is composed from 4 layers:
Layer 4: Handoff context ← Output from another agent
Layer 3: Agent's instructions ← The agent's own role
Layer 2: Inherited context ← From parent agents
Layer 1: Project context ← Auto-detected (languages, frameworks, structure)
Personal Library & Cloud Sync
writ save my-reviewer # Save to library (local + cloud if logged in)
writ login # Authenticate for cross-device sync
writ add my-reviewer --lib # Load from library on any machine
writ sync # Bulk bidirectional sync
MCP Server
writ mcp install # Auto-detects Cursor, VS Code, Claude Code, Kiro, Windsurf
Slim mode (default): 2 MCP-exclusive tools. Full mode: 24 tools including writ_lint_instruction, writ_plan_review, writ_docs_check, and writ_docs_update.
{"mcpServers": {"writ": {"command": "uvx", "args": ["enwrit", "mcp", "serve"]}}}
Git Pre-Commit Hook
writ hook install # Quality gate: lint instructions on every commit
writ hook uninstall # Remove cleanly
Agent-to-Agent Communication
writ peers add partner-repo --path ../partner-repo
writ chat start --with partner-repo --goal "Review API design"
writ chat send <conv-id> "Here's my proposed schema..."
writ inbox # Check for responses
All Commands
| Command | Description |
|---|---|
writ init |
Initialize in repo, auto-install 11 built-in skills to IDE dirs |
writ add <name> |
Add instruction: project -> library -> Hub -> create new |
writ add <name> --lib |
Force fetch from personal library |
writ add <name> --from prpm |
Install from PRPM registry |
writ add --file <path> |
Import markdown file(s) or directory |
writ add <name> --format cursor |
Export to a specific format |
writ list |
List all instructions in project |
writ remove <name> |
Remove instruction |
writ save <name> |
Save to personal library (syncs to cloud if logged in) |
writ search <query> |
Semantic search across Hub |
writ lint [file] [--deep] [--deep --fix] [--deep-api] |
Type-aware quality score, qualitative review, or auto-fix |
writ lint --ci --min-score N |
CI gate: exit 1 if score below threshold |
writ plan review <file> |
AI-powered plan review (configured model or free Gemini) |
writ plan review <file> --local |
Print review rubric for IDE's AI (no API call) |
writ plan review <file> --json |
Structured JSON output for agents |
writ docs init / check / update |
Documentation health (index, scan, AI-powered fix pass) |
writ query |
Show documentation index (agent navigation) |
writ status |
Activity log + health score summary |
writ model set / list / clear |
Configure LLM (openai, anthropic, gemini, local) |
writ hook install / uninstall |
Git pre-commit hook for quality checks |
writ diff <file> |
Compare lint score vs previous git commit |
writ upgrade [name] |
Pull latest version from source |
writ sync |
Bulk bidirectional library sync |
writ mcp install / uninstall / serve |
MCP server (auto-detect IDE, 24 tools full / 2 slim) |
writ publish / unpublish |
Make publicly discoverable on enwrit.com |
writ login / logout / register |
Authentication for cloud sync |
writ chat start / send / inbox |
Agent-to-agent conversations |
writ peers add / list / remove |
Manage peer repo connections |
writ review <name> |
Browse/submit reviews |
writ threads list / start / post |
Knowledge threads |
writ approvals create / approve / deny |
Human-in-the-loop approvals |
GitHub Action
- uses: enwrit/writ@main
with:
files: ".cursor/rules/*.mdc"
min-score: 50
Development
git clone https://github.com/enwrit/writ.git
cd writ
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e ".[dev]"
pytest # 610+ tests
ruff check src/ tests/
License
MIT
Links
- Hub: enwrit.com/hub -- Browse and install instructions
- Website: enwrit.com
- GitHub: github.com/enwrit/writ
- PyPI: pypi.org/project/enwrit
Project details
Release history Release notifications | RSS feed
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 enwrit-0.4.14.tar.gz.
File metadata
- Download URL: enwrit-0.4.14.tar.gz
- Upload date:
- Size: 7.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee72742fc6ced9e5481076a8575a518262bb4e59367b976e14e700279b6a1861
|
|
| MD5 |
fded054997e3006f4202ed694c0e29ea
|
|
| BLAKE2b-256 |
1efb899231b347070b0ba455a6392a6792d64324165556618cec8feb8f520dc3
|
Provenance
The following attestation bundles were made for enwrit-0.4.14.tar.gz:
Publisher:
publish.yml on enwrit/writ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enwrit-0.4.14.tar.gz -
Subject digest:
ee72742fc6ced9e5481076a8575a518262bb4e59367b976e14e700279b6a1861 - Sigstore transparency entry: 1281788180
- Sigstore integration time:
-
Permalink:
enwrit/writ@a2830b9b487cdbcf5fa6e19f1e0d24900d9019bd -
Branch / Tag:
refs/tags/v0.4.14 - Owner: https://github.com/enwrit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a2830b9b487cdbcf5fa6e19f1e0d24900d9019bd -
Trigger Event:
release
-
Statement type:
File details
Details for the file enwrit-0.4.14-py3-none-any.whl.
File metadata
- Download URL: enwrit-0.4.14-py3-none-any.whl
- Upload date:
- Size: 7.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ee831333c9d63bcef00b7d6aace67e23127fd5a0c93f1f95a96559ddc355fb1
|
|
| MD5 |
04817c1ed87dbbf6daea45fea2d3055e
|
|
| BLAKE2b-256 |
557fa6cf513cae3098d5c26c39d80fd9ee610de5b60e6e9cd3d856808d806b1b
|
Provenance
The following attestation bundles were made for enwrit-0.4.14-py3-none-any.whl:
Publisher:
publish.yml on enwrit/writ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enwrit-0.4.14-py3-none-any.whl -
Subject digest:
9ee831333c9d63bcef00b7d6aace67e23127fd5a0c93f1f95a96559ddc355fb1 - Sigstore transparency entry: 1281788199
- Sigstore integration time:
-
Permalink:
enwrit/writ@a2830b9b487cdbcf5fa6e19f1e0d24900d9019bd -
Branch / Tag:
refs/tags/v0.4.14 - Owner: https://github.com/enwrit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a2830b9b487cdbcf5fa6e19f1e0d24900d9019bd -
Trigger Event:
release
-
Statement type: