Project management for AI agents. Markdown files are the source of truth.
npm install -g cairn-work
cairn onboardThis creates a workspace and writes two context files your agent reads automatically:
AGENTS.md— Compact reference for day-to-day operations (statuses, CLI commands, autonomy rules).cairn/planning.md— Full guide for creating projects and tasks with real content
No agent-specific configuration. Any AI agent that can read files is ready to go.
# See what you're working on
cairn my
# Start a task
cairn start implement-auth
# Add notes as you work
cairn note implement-auth "Using passport.js for OAuth"
# Create an artifact (deliverable document, code, etc.)
cairn artifact implement-auth "API Design Doc"
# Mark it done
cairn done implement-auth
# Check workspace status
cairn statusFor complete command reference, see COMMANDS.md.
You and your AI agent share a folder of markdown files. Projects have charters. Tasks have objectives. Status fields track where everything stands — like a kanban board backed by text files.
~/cairn/
AGENTS.md # Agent context (auto-generated)
.cairn/planning.md # Planning guide (auto-generated)
projects/
launch-app/
charter.md # Why, success criteria, context
artifacts/ # Project deliverables
api-design.md
test-plan.md
tasks/
setup-database.md # Individual task
build-api.md
deploy.md
inbox/ # Ideas to triage
-
You create a project — tell your agent what you want to build. It creates the project and tasks using
cairn create, fills in real content (not placeholders), and sets everything topending. -
You manage the board — move tasks to
next_uporin_progresswhen you're ready to start. Or tell your agent "work on the API task" and it picks it up. -
The agent keeps status updated — when it starts a task, it moves to
in_progress. When it finishes, it moves toreview(so you can approve) orcompleted(if you gave it full autonomy). If it gets stuck, it moves toblockedand tells you what it needs. -
Artifacts live with the project — use
cairn artifactto create deliverables like design docs, proposals, or code snippets. They're stored inprojects/{project}/artifacts/and automatically linked to the task. -
You always know where things stand — statuses are the shared language. The agent is accountable for keeping them accurate.
pending · next_up · in_progress · review · blocked · completed
Each task has an autonomy level that controls what the agent can do:
| Level | Agent behavior | Finishes as |
|---|---|---|
propose |
Plans the approach, doesn't do the work | review |
draft |
Does the work, no irreversible actions | review |
execute |
Does everything, including deploy/publish/send | completed |
Default is draft — the agent works but you approve before anything ships.
Set up workspace and write agent context files.
cairn onboard # Interactive setup
cairn onboard --path ./mywork # Non-interactive, specific path
cairn onboard --force # Re-run on existing workspaceCreate projects and tasks. Always pass real content — the CLI enforces --description and --objective.
cairn create project "Launch App" \
--description "Ship the MVP by March" \
--objective "We need to validate the idea with real users" \
--criteria "App live on production, 10 beta signups" \
--context "React Native, Supabase backend, deploy to Vercel"
cairn create task "Set up database" \
--project launch-app \
--description "Configure Supabase tables and RLS policies" \
--objective "Database schema matches the data model, RLS prevents cross-tenant access"Create a project artifact (document, design, proposal) and link it to a task.
cairn artifact implement-auth "API Design Doc"
cairn artifact implement-auth "Test Plan" --description "Test coverage for OAuth flow"
cairn artifact implement-auth "Architecture Diagram" --openThis command:
- Creates
projects/{project}/artifacts/{artifact-name}.md - Automatically links it to the task's frontmatter using a relative path
- Supports optional descriptions in the artifact metadata
- Opens the artifact in your
$EDITORwith the--openflag
Artifact structure:
projects/
launch-app/
artifacts/
api-design-doc.md # Created by cairn artifact
test-plan.md
tasks/
implement-auth.md # Links to ../artifacts/api-design-doc.md
Task frontmatter with artifacts:
---
title: Implement authentication
artifacts:
- path: ../artifacts/api-design-doc.md
description: API Design Doc
- path: ../artifacts/test-plan.md
description: Test Plan
---Show all tasks assigned to you, grouped by status.
cairn myOutput:
📋 My Tasks (pagoda)
🚀 In Progress
implement-auth
launch-app
Build OAuth2 authentication flow
⚠️ Blocked
deploy-api
launch-app
Need production credentials
📝 Review
setup-database
launch-app
Waiting for approval
Start working on a task (sets status to in_progress).
cairn start implement-auth
cairn start build-api --project launch-appAdd a quick note to the task's work log.
cairn note implement-auth "Found OAuth library: passport.js"
cairn note implement-auth "Tests passing locally"Mark task as complete. Status depends on autonomy level:
autonomy: execute→completedautonomy: draft→review(requires approval)
cairn done implement-authMark a task as blocked with an explanation, or resume it.
cairn block implement-auth "Waiting for API credentials from client"
cairn unblock implement-auth "Got credentials"Display full task content.
cairn view implement-authShow all tasks currently in_progress (across all assignees).
cairn activeWorkspace overview with task counts.
cairn statusOutput:
📊 Workspace Status
All Tasks
Pending: 29
In Progress: 5
Blocked: 9
Review: 10
Completed: 1
My Tasks (pagoda)
Pending: 8
In Progress: 4
...
Find tasks by keyword in title, description, or content.
cairn search "authentication"
cairn search "oauth" --project launch-appOpen task in $EDITOR for manual editing.
cairn edit implement-authList and filter tasks.
# Show all in-progress tasks
cairn list tasks --status in_progress
# Show my pending tasks
cairn list tasks --status pending --assignee pagoda
# Show overdue tasks
cairn list tasks --overdue
# Filter by project
cairn list tasks --project launch-app
# Multiple statuses
cairn list tasks --status pending,in_progressAdd a detailed work log entry to a task.
cairn log implement-auth "Implemented OAuth2 flow with GitHub provider"
cairn log implement-auth "Fixed edge case in token refresh" --title "Bug Fix"Add a comment that syncs to the Cairn app (visible in the web UI).
# Status update
cairn comment implement-auth "Started OAuth implementation"
# Ask a question
cairn comment implement-auth "Should we support Google SSO?" --type question
# Worker handoff
cairn comment implement-auth "Ready for code review" --type handoff --author "Engineer"Options:
--type <type>: Comment type (progress,question,handoff,comment)--author <name>: Author name (defaults to$USER)--author-type <type>:workerorhuman(defaults toworker)
Unlike cairn note (which writes to the task file), cairn comment writes to Convex and appears in the Cairn web app. Requires cairnsync authentication.
Update task properties programmatically.
cairn update implement-auth --add-artifact "../artifacts/design-doc.md"
cairn update implement-auth --remove-artifact "../artifacts/old-doc.md"Note: The cairn artifact command is the recommended way to create and link artifacts. Use cairn update for manual adjustments.
Process inbox items interactively — create tasks, delete, or skip.
cairn triageCheck workspace health and diagnose issues.
cairn doctorValidates:
- Workspace structure
- Context files (
AGENTS.md,.cairn/planning.md) - Task frontmatter format
- File organization
Refresh AGENTS.md and .cairn/planning.md with the latest templates (e.g., after a CLI update).
cairn update-skillCheck for a new CLI version and install it.
cairn upgradeShow Cairn system overview and available documentation.
cairn learnAll files use YAML frontmatter + markdown sections.
Charter (charter.md):
---
title: Launch App
status: in_progress
priority: 1
default_autonomy: draft
---
## Why This Matters
## Success Criteria
## Context
## Work LogTask (tasks/setup-database.md):
---
title: Set up database
assignee: agent-name
status: pending
autonomy: draft
artifacts:
- path: ../artifacts/schema-design.md
description: Database schema design
---
## Objective
## Work LogThe agent logs all work in the ## Work Log section with timestamps and its name.
Artifacts are deliverables created during a task: design docs, proposals, diagrams, code snippets, test plans, etc.
Use cairn artifact to create an artifact and link it to a task:
cairn artifact <task-slug> "<artifact-name>"Example:
# Working on a task
cairn start implement-auth
# Create design document
cairn artifact implement-auth "OAuth Design"
# Create test plan
cairn artifact implement-auth "Test Plan" --description "End-to-end OAuth testing"
# Open artifact in editor immediately
cairn artifact implement-auth "Security Review" --openArtifacts are stored in projects/{project}/artifacts/ and referenced using relative paths:
projects/
launch-app/
charter.md
artifacts/
oauth-design.md # Created by: cairn artifact
test-plan.md
security-review.md
tasks/
implement-auth.md # References: ../artifacts/oauth-design.md
Tasks reference artifacts in their frontmatter:
---
title: Implement authentication
artifacts:
- path: ../artifacts/oauth-design.md
description: OAuth Design
- path: ../artifacts/test-plan.md
description: Test Plan
---You can reference artifacts as:
- Simple path:
../artifacts/oauth-design.md - Object with description:
- path: ../artifacts/oauth-design.md description: OAuth Design
Create artifacts when you need:
- Design documents or technical proposals
- Test plans or QA checklists
- Architecture diagrams or flow charts
- Research findings or analysis
- API specifications
- Meeting notes or decision records
- Code snippets or examples
- Any deliverable that complements the task
Artifacts stay with the project, making it easy to reference past decisions and share context across tasks.
# Create the project
cairn create project "Launch App" \
--description "Ship the MVP by March" \
--objective "Validate the idea with real users" \
--criteria "App live on production, 10 beta signups"
# Create initial tasks
cairn create task "Set up database" \
--project launch-app \
--description "Configure Supabase tables" \
--objective "Database schema matches data model"
cairn create task "Build API" \
--project launch-app \
--description "Create REST endpoints" \
--objective "All CRUD operations working"
# Check status
cairn status# Start the task
cairn start implement-auth
# Create design doc
cairn artifact implement-auth "OAuth Design" --open
# [Work on design doc in editor]
# Add progress notes
cairn note implement-auth "Decided on passport.js for OAuth"
cairn note implement-auth "GitHub and Google providers configured"
# Create test plan
cairn artifact implement-auth "Test Plan"
# [Implement the feature]
# Add final log entry
cairn log implement-auth "OAuth flow complete with GitHub and Google. Tests passing."
# Mark as done
cairn done implement-auth# See what you're working on
cairn my
# Check workspace overview
cairn status
# Find related tasks
cairn search "authentication"
# See all active work
cairn active# Block a task
cairn block implement-auth "Waiting for API credentials from client"
# Later, when unblocked
cairn unblock implement-auth "Got credentials"cairn doctor # Diagnose issues
cairn onboard --force # Regenerate context files
cairn update-skill # Refresh templates after CLI update
cairn upgrade # Update to latest CLI versionCommon issues:
"Task not found"
- Check slug format: lowercase, hyphens, no spaces
- Verify task exists:
cairn view <task-slug> - Specify project:
cairn start <task> --project <project>
"Workspace not found"
- Run
cairn onboardto set up workspace - Or run
cairn doctorto check configuration
"Invalid frontmatter"
- Run
cairn doctorto validate all files - Check for proper YAML format (no tabs, correct indentation)
- Let the agent manage statuses — ask it to start tasks (
cairn start), finish them (cairn done), or block them (cairn block) - Review artifacts — when tasks move to
review, check the linked artifacts for deliverables - Use
cairn myto see the agent's current workload - Set autonomy appropriately — use
draftfor code changes,executefor direct actions
- Always update status —
startwhen beginning,donewhen finishing,blockwhen stuck - Use
cairn notefrequently — keep humans informed of progress - Create artifacts for deliverables — design docs, proposals, plans, etc.
- Check
cairn mybefore starting new work — understand your current workload - Never manually edit status — use CLI commands (
cairn start,cairn done, etc.) - Log decisions and blockers — use the work log to explain what happened and why
Cairn is designed to work with any AI agent that can:
- Read files (markdown with YAML frontmatter)
- Execute shell commands (
cairnCLI) - Follow a workflow (statuses, artifacts, logging)
Context files:
AGENTS.md— Quick reference for the agent (statuses, commands, rules).cairn/planning.md— Detailed guide for creating projects and tasks
These files are auto-generated during cairn onboard and updated with cairn update-skill.
Agent workflow:
- Human: "Build an authentication system"
- Agent: Creates project and tasks using
cairn create - Agent: Starts task with
cairn start implement-auth - Agent: Creates design doc with
cairn artifact implement-auth "OAuth Design" - Agent: Works on implementation, logs progress with
cairn note - Agent: Finishes and runs
cairn done implement-auth - Task moves to
review(ifautonomy: draft) orcompleted(ifautonomy: execute) - Human: Reviews artifacts and approves work
- GitHub Discussions — Ask questions, share ideas, show what you're building, and give feedback. This is the best place to connect.
- GitHub Issues — Bug reports only. For feature requests and questions, use Discussions.
- Twitter/X @letcairnwork — Follow for updates, or drop a quick question.
New here? Introduce yourself in Discussions — we'd love to hear what you're working on.
Contributions are welcome! If you have an idea for a feature or improvement, start a discussion first so we can talk through the approach before you invest time in a PR.
Found a bug? Open an issue.
The roadmap is shaped by community feedback. If there's something you'd like to see, request it in Discussions.
MIT
If your workspace includes a workers/ folder with AI worker definitions, you can manage and view them using the cairn worker command:
# List all available workers
cairn worker list
# View a worker's full soul file
cairn worker view engineer
# List skills for a worker
cairn worker skills engineer
# View specific skill content
cairn worker skill engineer typescriptWorker Structure: Workers are expected to follow the nested folder structure:
workers/{name}/{name}.md- Main worker soul file with frontmatterworkers/{name}/skills/*.md- Optional skills folder with specialized knowledge
The CLI will automatically discover workers in:
{workspace}/workers/- Within your workspace{workspace-parent}/workers/- Adjacent to your workspace