AI Agent Templates
Conduct v0.1 provides 9 structured agent templates that guide AI agents through spec-run-check workflows with persistent memory integration.
Agent Template Overview
Conduct deploys 9 templates to _conduct/templates/ and copies them to agent-specific directories:
1. conduct-spec - Create Specification
Transform user intent into structured specification.
Features:
- Fetch remote context (GitHub issues, Linear tickets)
- Consult memory (past specs, discovered features)
- Multi-file spec support for complex projects
- Level of effort estimation (simple|medium|complex|epic)
- Generate SQL for memory registration
Output: _conduct/specs/X.vY.spec.md or _conduct/specs/X/
Workflow:
User Intent → conduct-spec
↓
1. Fetch remote sources (GitHub, Linear)
2. Consult memory (conduct list --specs, --features)
3. Create spec file with structured content
4. Generate SQL: _conduct/operations/create-spec-X.sql
↓
Human executes: conduct save operations/create-spec-X.sql2. conduct-design - Create UI Design
Create UI mockups before implementation.
Features:
- Extract project styles automatically
- Generate interactive HTML previews
- Isolated from src/ (no pollution)
- Integration with conduct-run workflow
Output: _conduct/designs/X/mockup.html
Workflow:
User Request → conduct-design
↓
1. Extract styles from existing codebase
2. Generate HTML/CSS mockup
3. Save to _conduct/designs/X/
4. Create preview: conduct-design preview (optional)3. conduct-run - Execute Specification
Implement specification end-to-end.
Features:
- Design-first workflow (checks for designs)
- Memory integration (feature linking)
- Multi-phase execution support
- SQL generation for memory updates
Output: _conduct/runs/X.vY.run.md or _conduct/runs/X/
Workflow:
Spec → conduct-run
↓
1. Check for UI designs (_conduct/designs/X/)
2. Consult memory (conduct list --features)
3. Implement specification
4. Create run file with execution log
5. Generate SQL: _conduct/operations/update-run-X.sql
↓
Human executes: conduct save operations/update-run-X.sql4. conduct-check - Verify Implementation
Verify implementation against specification.
Features:
- Spec vs. run comparison
- Code vs. spec verification
- Gap detection
- Pass/fail/partial reporting
Output: _conduct/checks/X.vY.check.md
Workflow:
Run → conduct-check
↓
1. Load spec from memory
2. Load run from memory
3. Compare spec vs. run (did we do what we said?)
4. Verify code vs. spec (does code match spec?)
5. Detect gaps
6. Generate check file with results
7. Generate SQL: _conduct/operations/create-check-X.sql
↓
Human executes: conduct save operations/create-check-X.sql5. conduct - Lightweight Mode
Quick changes without full ceremony.
Features:
- No spec/run files created
- Still logs to memory database
- Good for bug fixes, small changes
- Faster workflow
Output: Memory updates only
When to Use:
- Bug fixes
- Small refactors
- Quick improvements
- No ceremony needed
6. conduct-index - Discover Features
Scan codebase and discover features.
Features:
- Multi-strategy discovery (directory, exports, package.json)
- Interactive confirmation
- Batch SQL generation
- Package assignment
Output: _conduct/operations/discovered-features.sql
Workflow:
conduct-index
↓
1. Scan codebase for features
2. Use 3 strategies:
- Directory structure analysis
- Export analysis (TypeScript/JavaScript)
- package.json hints
3. Present discovered features
4. Interactive confirmation
5. Generate SQL
↓
Human executes: conduct save operations/discovered-features.sql7. conduct-reconcile - Sync Memory
Keep memory synchronized with codebase reality.
Features:
- Git diff analysis
- Status suggestions (deprecated, removed, moved)
- Interactive confirmation
- Drift detection
Output: _conduct/operations/reconciled-updates.sql
Workflow:
conduct-reconcile
↓
1. Load features from memory
2. Analyze git log (last 7 days by default)
3. Detect changes:
- Deleted files → suggest "removed"
- Renamed files → suggest "renamed"
- Moved files → suggest "moved"
- Large deletions → suggest "deprecated"
4. Calculate confidence scores
5. Interactive confirmation
6. Generate SQL
↓
Human executes: conduct save operations/reconciled-updates.sql8. conduct-dry-run - Plan Only
Generate execution plan without implementing.
Features:
- Review plan before execution
- Estimate time and impact
- Identify risks early
- No code changes
Output: _conduct/runs/X.vY.run.md (plan only)
When to Use:
- Review plan before starting work
- Estimate effort and time
- Identify potential issues
- Get approval before implementation
9. conduct-dry-check - Verify Plan
Verify plan against spec without code check.
Features:
- Plan coverage analysis
- Gap identification
- Pre-execution validation
- No code verification
Output: _conduct/checks/X.vY.check.md (plan verification)
When to Use:
- Verify plan completeness
- Check if plan covers all requirements
- Validate approach before coding
Supported AI Agents
Cursor
Command Location: .cursor/commands/
Cursor commands are available via slash commands (or by referencing the files):
/conduct-spec- Create specification/conduct-design- Create UI design/conduct-run- Execute specification/conduct-check- Verify implementation/conduct- Lightweight mode/conduct-index- Discover features/conduct-reconcile- Sync memory/conduct-dry-run- Plan only/conduct-dry-check- Verify plan
Files Created: .cursor/commands/conduct-*.md (9 files)
Claude
Command Location: .claude/commands/
Claude can reference command files for workflow management:
conduct-spec,conduct-design,conduct-run,conduct-checkconduct,conduct-index,conduct-reconcileconduct-dry-run,conduct-dry-check
Files Created:
.claude/commands/conduct-*.md(9 files)CLAUDE.md- Root-level instructions with managed block
Special Features:
- Claude reads
CLAUDE.mdautomatically on project load - Managed block directs Claude to templates
- Instructions available without manual intervention
Warp
Command Location: .warp/commands/
Warp commands are available in Agent Mode:
- All 9 Conduct templates
- Optimized for terminal-based workflow
Files Created:
.warp/commands/conduct-*.md(9 files)WARP.md- Root-level instructions for Warp Agent Mode
Special Features:
- Warp reads
WARP.mdautomatically in Agent Mode - Commands optimized for terminal workflow
Factory
Command Location: .factory/commands/
Factory commands integrate directly with Factory’s command system:
- All 9 Conduct templates
- Supports Factory’s multi-step command execution
Files Created: .factory/commands/conduct-*.md (9 files)
Template Structure
All agent templates follow a consistent structure:
Header Section
# conduct-TEMPLATE
**Purpose:** Brief description
**When to use:** Scenarios where this template applies
**Prerequisites:** Requirements before usingWorkflow Section
## Workflow
Step-by-step instructions:
1. Memory Consultation
2. Context Gathering
3. Work Execution
4. File Creation
5. SQL GenerationMemory Integration
## Memory Integration
Commands to query memory:
- conduct list --specs
- conduct list --features
- conduct list --runs
SQL generation guidelinesOutput Format
## Output Format
### File Structure
Location and naming conventions
### Content Structure
Required sections and format
### SQL File
Template for SQL generationComplete Workflow Example
Scenario: Build Authentication System
Step 1: Create Specification
# User invokes conduct-spec
Agent: (reads conduct-spec.md template)
1. Consult memory: conduct list --features
2. Check for similar past specs
3. Create _conduct/specs/1.v0.spec.md
4. Generate _conduct/operations/create-spec-1.sql
# Human reviews and executes
cat _conduct/operations/create-spec-1.sql
conduct save _conduct/operations/create-spec-1.sqlStep 2: Create UI Design (Optional)
# User invokes conduct-design
Agent: (reads conduct-design.md template)
1. Extract styles from project
2. Create _conduct/designs/1/mockup.html
3. Generate interactive previewStep 3: Execute Specification
# User invokes conduct-run
Agent: (reads conduct-run.md template)
1. Check for designs: _conduct/designs/1/
2. Consult memory: conduct list --features
3. Link to features (e.g., feature_id: 5, 8)
4. Implement authentication system
5. Create _conduct/runs/1.v0.run.md
6. Generate _conduct/operations/update-run-1.sql
# Human reviews and executes
cat _conduct/operations/update-run-1.sql
conduct save _conduct/operations/update-run-1.sqlStep 4: Verify Implementation
# User invokes conduct-check
Agent: (reads conduct-check.md template)
1. Load spec from memory
2. Load run from memory
3. Compare spec vs. run
4. Verify code vs. spec
5. Create _conduct/checks/1.v0.check.md
6. Generate _conduct/operations/create-check-1.sql
# Human reviews and executes
cat _conduct/operations/create-check-1.sql
conduct save _conduct/operations/create-check-1.sqlStep 5: Query Memory
# See everything in memory
conduct list
# Output:
📋 Specs (1):
spec-1 [completed] Authentication System (simple)
🏃 Runs (1):
1 [completed] spec-1.v0 - Implemented OAuth2 auth
✨ Features (2):
#5 authentication - Authentication System [active]
#8 user-profile - User Profile [active]
✅ Checks (1):
1 [pass] run-1 verificationMemory Integration
Consulting Memory
All templates encourage agents to consult memory before work:
# Query specs
conduct list --specs
# Query features
conduct list --features
# Query runs
conduct list --runs
# Query checks
conduct list --checksSQL Generation
All templates that modify memory generate SQL files:
Pattern:
_conduct/operations/<operation>-<entity>-<id>.sqlExamples:
create-spec-1.sqlupdate-run-1.sqlcreate-check-1.sqldiscovered-features.sqlreconciled-updates.sql
Security Model
Two-step process:
- Agent generates SQL (untrusted)
- Human validates and executes (trusted)
SQL Validation:
- ✅ INSERT, UPDATE allowed
- ❌ DELETE, DROP, ALTER blocked
- ✅ Specific tables only
- ❌ Subqueries blocked
- ❌ SQL injection patterns blocked
Best Practices
For Agents
-
Always consult memory first
conduct list --features conduct list --specs -
Link to discovered features
- Use feature IDs from memory
- Create meaningful run-feature links
-
Generate clean SQL
- Use proper formatting
- Include comments
- Follow naming conventions
-
Create structured outputs
- Follow template formats
- Include all required sections
- Use consistent naming
For Humans
-
Always review SQL before executing
cat _conduct/operations/update-run-1.sql -
Validate SQL with dry-run
conduct save file.sql --dry-run -
Maintain memory health
# Weekly maintenance conduct relevancy --recalculate-all conduct archive -y conduct reconcile -
Discover features regularly
conduct discover -y
Template Customization
Upgrading Templates
Keep templates up to date:
conduct upgradeThis updates all 9 templates in _conduct/templates/ and agent-specific directories.
Manual Customization
You can customize templates in _conduct/templates/:
- Edit template files
- Add project-specific guidelines
- Modify SQL generation patterns
- Add custom validation steps
Note: Running conduct upgrade will overwrite customizations. Use version control to track changes.
Per-Agent Customization
Each agent can have different instructions:
- Edit agent-specific files in
.cursor/commands/, etc. - Add agent-specific requirements
- Maintain consistency for team collaboration
Multi-Agent Workflows
Same Project, Multiple Agents
You can use multiple AI agents in the same project:
- All agents use same templates from
_conduct/templates/ - All agents read/write to same memory database
- Changes made by any agent are compatible
- Specifications remain consistent
Team Collaboration
Local Mode (Solo):
Profile: default
URL: file://_conduct/memory.db
✅ Fast, no network requiredRemote Mode (Team):
Profile: production
URL: libsql://conduct.turso.io
Token: <turso-token>
✅ Shared memory across teamSwitching Between Agents
Seamlessly switch between agents:
- All agents read same memory database
- Templates are equivalent across agents
- No migration needed
Troubleshooting
Templates Not Working
-
Verify templates exist
ls _conduct/templates/ -
Check agent-specific files
ls .cursor/commands/ ls .claude/commands/ -
Upgrade templates
conduct upgrade
Memory Not Updating
-
Check SQL file
cat _conduct/operations/update-run-1.sql -
Validate SQL
conduct save file.sql --dry-run -
Execute SQL
conduct save file.sql -
Verify memory
conduct list --runs
Agent Not Following Template
- Ensure agent can read template files
- Check template syntax
- Verify agent is referencing correct file
- Try different agent invocation method
Advanced Usage
Multi-Phase Runs
For complex implementations, use multi-phase runs:
_conduct/runs/X/
├── index.md # Plan + progress tracker
├── 1-database.md # Phase 1: Database schema
├── 2-api.md # Phase 2: API endpoints
└── 3-frontend.md # Phase 3: UI componentsMulti-File Specs
For large features, use multi-file specs:
_conduct/specs/X/
├── spec.md # Main overview
├── architecture.md # Architecture details
├── database.md # Database schema
└── api.md # API specificationIssue Tracker Integration
Link specs to external issues:
## Links
Source: [GitHub Issue #123](https://github.com/org/repo/issues/123)
Source: [Linear PROJ-456](https://linear.app/company/issue/PROJ-456)Use conduct sync to keep status in sync:
conduct sync --github-token <token>
conduct sync --linear-token <token>Next Steps
- Learn about Architecture
- Read the CLI Reference
- Get started with Quick Start Guide