Skip to main content

The communication layer for AI agents. Route context between repos, devices, and tools.

Project description

writ

Better instructions. Connected agents.

PyPI Downloads License: MIT Python 3.11+ Tests

The quality and communication layer for AI coding agents. Lint instructions, review plans, check documentation health, and connect agents across repos, devices, and tools.

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 10 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              # AI analysis 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 --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

writ docs check scans your project documentation for problems that degrade AI agent performance:

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)

10 Built-in Skills

writ init auto-installs 10 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

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 Dead reference detection, treeview drift, staleness checks across your project docs.
Multi-format export One instruction, 11 auto-detected IDE formats + legacy opt-in formats.
Personal library + cloud sync writ savewrit 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 10 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: 21 tools including writ_lint_instruction, writ_plan_review, and writ_docs_check.

{"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 10 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-local] Quality score (0-100, 6 dimensions)
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> --json Structured JSON output for agents
writ docs check Documentation health (dead refs, treeview drift, staleness)
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, 21 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                    # 541+ tests
ruff check src/ tests/

License

MIT

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enwrit-0.4.12.tar.gz (7.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enwrit-0.4.12-py3-none-any.whl (7.7 MB view details)

Uploaded Python 3

File details

Details for the file enwrit-0.4.12.tar.gz.

File metadata

  • Download URL: enwrit-0.4.12.tar.gz
  • Upload date:
  • Size: 7.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for enwrit-0.4.12.tar.gz
Algorithm Hash digest
SHA256 3b36b8d2a50d9d3eafd1e72bfec86dbf9c0328dfa726d3616114252112604ae5
MD5 b915833e94362d11142419d0b8c38111
BLAKE2b-256 cb46705fbe38efd96c52dc46f8efd95f1cd856972ac87caa04557df2f151b753

See more details on using hashes here.

Provenance

The following attestation bundles were made for enwrit-0.4.12.tar.gz:

Publisher: publish.yml on enwrit/writ

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file enwrit-0.4.12-py3-none-any.whl.

File metadata

  • Download URL: enwrit-0.4.12-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

Hashes for enwrit-0.4.12-py3-none-any.whl
Algorithm Hash digest
SHA256 792a4f15c30f1f37232dcc2d896f789578335d7e5545dbcc4cc1058b01d85c32
MD5 05fb32080171a33e1ae0325920111a93
BLAKE2b-256 a0d064fc705cf295592ed6f4c5324d892654feda3d462db917d835282f6bec22

See more details on using hashes here.

Provenance

The following attestation bundles were made for enwrit-0.4.12-py3-none-any.whl:

Publisher: publish.yml on enwrit/writ

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page