CLI Reference
Complete reference for all Conduct v0.1 CLI commands. Conduct provides 11 commands for complete memory management and orchestration.
Core Commands
conduct init
Initialize Conduct in your project with database setup and agent templates.
Usage:
conduct initInteractive Prompts:
- Database Mode: Choose local (embedded libSQL) or remote (Turso)
- Profile Configuration: Set up database credentials
- Directory Creation: Initialize
_conduct/structure - Agent Templates: Deploy 9 agent command templates
What It Creates:
_conduct/directory structure with subdirectoriesconduct.jsonconfiguration fileconduct.track.jsonlocal tracker~/.conduct/credentialsglobal profile- Agent templates in
.cursor/,.claude/,.warp/,.factory/ memory.dblocal database (if local mode)
Example:
$ conduct init
? Database mode: Local (embedded libSQL)
✅ Created _conduct/ directory
✅ Initialized memory.db
✅ Deployed 9 agent templates
✅ Configuration saved to conduct.jsonconduct save
Execute SQL operations from file with validation.
Usage:
conduct save <file> [options]Options:
-y, --yes- Skip confirmation prompt--dry-run- Validate without executing
Features:
- Validates SQL syntax and security
- Whitelists INSERT/UPDATE only
- Blocks DELETE, DROP, ALTER
- Prevents SQL injection
- Shows statement count before execution
Example:
$ conduct save _conduct/operations/update-run-1.sql
📝 SQL File: _conduct/operations/update-run-1.sql
✓ Validated 4 statements
- 1 INSERT into run
- 2 INSERT into run_feature
- 1 UPDATE to run
? Execute SQL? (y/N) y
✅ Executed successfully
✅ 4 statements completedconduct list
Query memory database and display all entities.
Usage:
conduct list [options]Options:
-s, --specs- Show only specs-r, --runs- Show only runs-c, --checks- Show only checks-f, --features- Show only features-p, --packages- Show only packages-a, --all- Show everything (default)--json- Output as JSON--status <status>- Filter by status--limit <n>- Limit results (default: 20)
Example:
$ conduct list --specs --limit 5
📋 Specs (3):
spec-1 [completed] Authentication System (simple)
Location: _conduct/specs/1.v0.spec.md
Agent: claude | LOE: simple
spec-2 [in-progress] Dashboard UI (medium)
Location: _conduct/specs/2/
Agent: cursor | LOE: medium
spec-3 [pending] API Integration (complex)
Location: _conduct/specs/3.v0.spec.md
Source: github#123conduct health
Check system health and configuration.
Usage:
conduct healthChecks:
- Database connection status
- Configuration file validity
- Schema version
- Memory statistics
- Credential profile
Example:
$ conduct health
🏥 Conduct Health Check
✅ Database: Connected
Profile: default
URL: file://_conduct/memory.db
✅ Configuration: Valid
File: conduct.json
Version: 0.1.0
✅ Schema: Up to date
Version: 1.0.0
📊 Memory Statistics:
Features: 15
Specs: 8
Runs: 12
Checks: 10conduct upgrade
Upgrade Conduct instructions and templates to latest version.
Usage:
conduct upgradeWhat It Updates:
_conduct/AGENTS.mdmaster instruction file- Root-level agent instructions (
CLAUDE.md,WARP.md,GEMINI.md) - All 9 agent templates in
_conduct/templates/ - Agent-specific command files in
.cursor/,.claude/,.warp/,.factory/,.opencode/ - Preserves custom content outside managed blocks
Example:
$ conduct upgrade
🔄 Upgrading Conduct...
✅ Updated _conduct/AGENTS.md
✅ Updated CLAUDE.md
✅ Updated WARP.md
✅ Updated GEMINI.md
✅ Updated 36 template(s) in agent directories
✨ Upgrade complete! All instructions and templates are up to date.Integration Commands
conduct sync
Sync with external issue trackers (GitHub, Linear).
Usage:
conduct sync [options]Options:
--github-token <token>- GitHub API token--linear-token <token>- Linear API token
Features:
- Fetches issues from GitHub/Linear
- Updates
issue_connectiontable - Syncs spec/run status
- Links entities to issues
Example:
$ conduct sync --github-token ghp_xxxxx
🔄 Syncing with GitHub...
✅ Fetched 15 issues
✅ Updated 8 connections
✅ Synced 3 spec statuses
📊 Summary:
New connections: 5
Updated connections: 3
Failed: 0conduct config
Manage configuration, database profiles, and issue tracker integration.
Usage:
conduct config [action] [subaction]Commands:
# Profile management
conduct config profile list # List all profiles
conduct config profile add <name> # Add new profile
conduct config profile switch <name> # Switch active profile
# Database operations
conduct config db test # Test connection
conduct config db info # Show connection details
# Issue tracker integration
conduct config tracker add # Add GitHub or Linear
conduct config tracker remove # Remove tracker config
conduct config tracker enable # Enable a tracker
conduct config tracker disable # Disable a tracker
conduct config tracker list # Show configured trackersExample - Profile Management:
$ conduct config profile list
📋 Database Profiles:
* default (active)
URL: file://_conduct/memory.db
Type: local
production
URL: libsql://conduct.turso.io
Type: remote
$ conduct config profile switch production
✅ Switched to profile: productionExample - Issue Tracker Integration:
$ conduct config tracker add
? Select tracker: GitHub
? Enable immediately? Yes
? Enable automatic sync? No
? Default repository: 21nOrg/conduct
✅ GitHub tracker configured
Set GitHub token with:
export GITHUB_TOKEN="your-token"
$ conduct config tracker list
⚙️ Issue Tracker Configuration
GitHub:
Status: enabled
Auto-sync: no
Default repo: 21nOrg/conduct
Linear:
Status: disabledDiscovery & Maintenance Commands
conduct discover
Automatically discover features in codebase.
Usage:
conduct discover [options]Options:
--root-dir <dir>- Root directory to scan (default: current)--package <name>- Package name to assign features to--min-confidence <n>- Minimum confidence threshold 0-1 (default: 0.5)-y, --yes- Auto-approve all discovered features--json- Output as JSON
Strategies:
- Directory structure analysis (confidence: 0.8)
- Export analysis for TypeScript/JavaScript (confidence: 0.7)
- package.json hints (confidence: 0.9)
Example:
$ conduct discover --min-confidence 0.7
🔍 Discovering features...
📦 Discovered Features (8):
authentication [90%]
Paths: src/auth, lib/auth
Strategy: directory + exports
user-profile [85%]
Paths: src/profile
Strategy: directory
dashboard [75%]
Paths: src/dashboard
Strategy: directory
? Save 8 features to memory? (y/N) y
✅ Generated SQL: _conduct/operations/discovered-features.sql
💡 Run: conduct save _conduct/operations/discovered-features.sqlconduct reconcile
Detect drift between memory and codebase reality.
Usage:
conduct reconcile [options]Options:
--root-dir <dir>- Root directory to scan (default: current)--since-days <n>- Check changes from N days ago (default: 7)--since-commit <hash>- Check changes since specific commit-y, --yes- Auto-approve all suggested updates--dry-run- Show suggestions without applying--json- Output as JSON
Detection Methods:
- File existence verification
- Git log analysis
- Git rename detection
- Heuristic analysis
Example:
$ conduct reconcile --since-days 30
🔄 Analyzing changes since 30 days ago...
✓ Loaded 45 features
✓ Analyzed 127 commits
✓ Detected 3 changes
🔄 Suggested Updates:
old-auth (active) → removed [95%]
All feature paths deleted
user-profile (active) → renamed [90%]
Feature renamed: src/profile -> src/user-profile
legacy-api (active) → deprecated [60%]
Significant code removal (350 lines deleted)
? Apply 3 suggested updates? (y/N) y
✅ Generated SQL: _conduct/operations/reconciled-updates.sql
💡 Run: conduct save _conduct/operations/reconciled-updates.sqlconduct relevancy
Calculate and manage relevancy scores for runs.
Usage:
conduct relevancy [options]Options:
--run-id <id>- Calculate for specific run--show-archivable- Show runs that should be archived--recalculate-all- Recalculate scores for all runs--json- Output as JSON
Formula:
score = baseScore * e^(-days/halfLife) * (1 + boost * references)Parameters (configurable in conduct.json):
halfLife: 180 days (default)referenceBoost: 0.1 (10% per reference)archiveThreshold: 0.1 (10%)
Example:
$ conduct relevancy --show-archivable
📊 Run Relevancy Scores:
run-1 [98%] active
2 days old, 0 references
run-2 [145%] active
30 days old, 5 references (50% boost)
run-3 [8%] 📦 archivable
730 days old, 0 references
run-4 [5%] 📦 archivable
1095 days old, 0 references
💡 2 runs below archive threshold (10%)
💡 Run: conduct archive -yconduct archive
Archive old runs based on relevancy score.
Usage:
conduct archive [options]Options:
--threshold <n>- Archive threshold 0-1 (default: 0.1)-y, --yes- Auto-approve archiving--dry-run- Show what would be archived--json- Output as JSON
Example:
$ conduct archive --dry-run
📦 Archivable Runs (score < 10%):
run-3 - spec-123 [8%]
730 days old, 0 references
Location: _conduct/runs/3.v0.run.md
run-4 - spec-456 [5%]
1095 days old, 0 references
Location: _conduct/runs/4/
? Archive 2 runs? (y/N) y
✅ Archived 2 runs
✅ Updated relevancy scores
✅ Run IDs archived: 3, 4Configuration Files
conduct.json
Project configuration file with JSON schema support:
{
"$schema": "https://docs.conduct.run/schema/conduct.json",
"version": "0.1.0",
"memory": {
"profile": "default",
"relevancy": {
"enabled": true,
"halfLife": 180,
"referenceBoost": 0.1,
"maxBoost": 1.0,
"archiveThreshold": 0.1
}
},
"trackers": {
"github": {
"enabled": true,
"autoSync": false,
"defaultRepo": "21nOrg/conduct"
},
"linear": {
"enabled": false,
"autoSync": false,
"workspace": "acme-corp"
}
}
}Schema Features:
- IDE autocomplete and validation
- Real-time error detection
- Property documentation on hover
- Available at
https://docs.conduct.run/schema/conduct.json
~/.conduct/credentials
Global credentials file (INI format):
[default]
url = file://_conduct/memory.db
token =
[production]
url = libsql://conduct.turso.io
token = eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9...
[staging]
url = libsql://conduct-staging.turso.io
token = eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9...conduct.track.json
Fast local tracker for quick lookups with JSON schema support:
{
"$schema": "https://docs.conduct.run/schema/track.json",
"specs": [
{
"id": "1",
"location": "_conduct/specs/1.spec.md",
"status": "completed",
"version": 0
}
],
"runs": [
{
"id": "1",
"spec_id": "1",
"location": "_conduct/runs/1.run.md",
"status": "completed"
}
],
"checks": [],
"last_updated": "2025-11-03T10:00:00Z"
}Schema Features:
- IDE autocomplete for all fields
- Validation for status enums
- ISO 8601 date-time validation
- Available at
https://docs.conduct.run/schema/track.json
Agent Templates
Conduct provides 9 agent command templates deployed to _conduct/templates/:
- conduct-spec.md - Create specification
- conduct-design.md - Create UI design
- conduct-run.md - Execute specification
- conduct-check.md - Verify implementation
- conduct.md - Lightweight mode (no ceremony)
- conduct-index.md - Discover features
- conduct-reconcile.md - Sync memory with codebase
- conduct-dry-run.md - Plan without implementing
- conduct-dry-check.md - Verify plan without code check
These templates are copied to agent-specific directories (.cursor/commands/, .claude/commands/, etc.) during initialization.
Memory Update Workflow
Security by Separation
Conduct uses a two-step process for memory updates:
- Agent generates SQL (untrusted)
- Human validates and executes (trusted)
Example Workflow
# Step 1: Agent generates SQL during run
_conduct/operations/update-run-1.sql
# Step 2: Human reviews
cat _conduct/operations/update-run-1.sql
# Step 3: Human validates and executes
conduct save _conduct/operations/update-run-1.sql
# Step 4: Verify
conduct list --runsSQL Validation
The validator whitelists:
- ✅ INSERT statements
- ✅ UPDATE statements
- ✅ Specific tables only
- ❌ DELETE, DROP, ALTER blocked
- ❌ Subqueries blocked
- ❌ Function calls blocked
- ❌ SQL injection patterns blocked
Best Practices
Daily Workflow
# Morning: Check system health
conduct health
# During work: Use agent templates
# - conduct-spec for new features
# - conduct-run for implementation
# - conduct-check for verification
# After each run: Save to memory
conduct save _conduct/operations/update-run-X.sql
# End of day: Review memory
conduct listWeekly Maintenance
# Update relevancy scores
conduct relevancy --recalculate-all
# Archive old runs
conduct archive -y
# Check for drift
conduct reconcile
# Verify health
conduct healthMonthly Maintenance
# Full reconciliation
conduct reconcile --since-days 30 -y
# Discover new features
conduct discover -y
# Aggressive archiving
conduct archive --threshold 0.15 -y
# Sync with issue trackers
conduct sync --github-token $GITHUB_TOKEN