intentlayer
v0.2.0
Published
Intent-driven governance for agent-assisted development
Readme
IntentLayer CLI
Command-line tool for IntentLayer — intent-driven governance for agent-assisted development.
Install
npx intentlayer <command>Or install globally:
npm install -g intentlayerCommands
intentlayer attach
Attach IntentLayer governance to the current git repository.
npx intentlayer attachThis creates:
INTENTS.md— intent registry (or appends IntentLayer section to existing)AGENTS.md— agent guidance contractintentlayer/signals/— for recording confidence signalsintentlayer/audits/— for audit writeups.agent/skills/— git submodule with IntentLayer skills
Safe to run multiple times (idempotent). Existing files with content are never overwritten.
intentlayer check
Validate IntentLayer configuration and intent registry integrity.
npx intentlayer check # informational (exits 1 on fatal)
npx intentlayer check --strict # also exits 1 on warnings
npx intentlayer check --json # machine-readable JSON outputRuns 10 checks across 3 categories:
Intent Registry Integrity (fatal)
INTENTS.mdexists- At least one intent registered (
## I-NNN:headings) - Health states present per intent
- No duplicate intent IDs
- Required sections: Goal, Success Criteria, Risk Signals, Current Health (warning)
Agent Environment (fatal)
6. AGENTS.md exists with content
7. .agent/skills submodule installed
Repository Alignment (warning)
8. intentlayer/signals/ directory exists
9. intentlayer/audits/ directory exists
10. Recent commits reference intent IDs (with coverage %)
Exit codes
| Situation | Default | --strict |
|-----------|---------|------------|
| Clean | 0 | 0 |
| Warnings only | 0 | 1 |
| Fatal problems | 1 | 1 |
JSON output
npx intentlayer check --json{
"status": "ok",
"intents": 6,
"warnings": [],
"fatals": [],
"commitCoverage": { "referenced": 5, "total": 20, "percent": 25 }
}What is IntentLayer?
When humans code, intent lives in their heads. When agents code, intent must live in the repository.
IntentLayer introduces:
- INTENTS.md — human-owned, durable system intents
- Skills — reusable reasoning disciplines applied by agents
- Signals & Audits — explicit confidence management over time
Learn more: intentlayer-skills
Requirements
- Node.js >= 18
- Git
License
CC0-1.0 — use freely, adapt carefully.
