Skip to content
Lovelace

Common Workflows

Task-oriented guides for everyday development with Ada CLI

Each workflow below uses four parts of the CLI:

  • ada chat opens an interactive conversation in the terminal. It takes no message argument: start it, then type your questions.
  • ada agents start "<task>" starts an agent on a task in the active workspace. ada agents list and ada agents status <agent-id> track it.
  • ada tasks submit "<description>" queues a task on the local daemon. ada tasks list, ada tasks get <task-id>, and ada tasks monitor <task-id> --follow track it.
  • ada sessions and ada workspaces keep conversation history and group agents and tasks by project.

Daily Development Workflows#

Start of Day#

Pick up where you left off:

bash
# Confirm the active workspace and pull remote changes
ada workspaces current
ada workspaces sync

# Check agents and tasks that ran since yesterday
ada agents list
ada tasks list

# Reopen yesterday's conversation (select it interactively)
ada sessions resume

To plan the day, run ada chat and ask something like "Here is what I finished yesterday and what is still open. What should I focus on first?"

End of Day#

Record where you stopped:

bash
# Find today's session and give it a title you can search for later
ada sessions list
ada sessions update <session-id> --title "Auth refactor: token refresh"

# Check what is still running
ada agents list
ada tasks list

# Push workspace changes
ada workspaces sync

Code Review#

Start an agent on the current changes:

bash
# Start a background agent to review the current changes
ada agents start "Review the current staged changes for security, performance, and best-practice issues"

# Watch it run (grab the agent ID from the list)
ada agents list
ada agents status <agent-id>

For a conversational review, run ada chat, paste the diff, and ask follow-up questions:

  • "Review these changes for potential bugs and edge cases."
  • "Do these changes follow the error handling patterns used elsewhere in the file?"
  • "Suggest improvements for error handling."

Code Quality Workflows#

Codebase Analysis#

Queue an analysis task and follow it to completion:

bash
# Queue an analysis of the whole repository
ada tasks submit "Analyze the codebase structure, dependency graph, and security posture, and list the top three improvements" --tag analysis

# Scope a task to one directory for large codebases
ada tasks submit "Analyze src/services for complexity hot spots and missing error handling" --tag analysis

# Track analysis tasks
ada tasks list --tag analysis
ada tasks monitor <task-id> --follow
ada tasks get <task-id>

Test Generation#

bash
# Generate tests for a single file
ada agents start "Generate comprehensive unit tests for src/user-service.ts and write them to tests/user-service.test.ts"

# Generate missing tests across a directory
ada agents start "Generate missing unit tests for every service under src/services and write them to tests/services"

# Generate integration tests
ada agents start "Create integration tests for the API endpoints under src/api and write them to tests/integration"

When the agents finish, review the generated tests yourself, or open ada chat, paste a test file, and ask which edge cases it misses.

Documentation Generation#

bash
# Generate API documentation
ada agents start "Create API documentation from the JSDoc comments under src/api and write it to docs/api"

# Update the README
ada agents start "Update README.md to describe the recent changes to the authentication system"

# Generate an architecture overview
ada agents start "Create an architecture diagram showing service dependencies from the code under src/ and write it to docs/architecture.md"

See the Documentation Workflow for more.

Security Audit#

bash
# Start a background security audit
ada agents start "Audit the codebase under src/ for security vulnerabilities and write a report to security-audit.md"

# Review dependencies separately
ada agents start "Check package.json dependencies for known security vulnerabilities and list the affected versions"

# Check on the audit agents
ada agents list
ada agents status <agent-id>

Team Collaboration Workflows#

Shared Workspaces#

bash
# Find the team workspace and make it active
ada workspaces list
ada workspaces select --id <workspace-id>

# Sync the latest changes
ada workspaces sync

# See the agents and tasks in that workspace
ada agents list --workspace <workspace-id>
ada tasks list --workspace <workspace-id>

Pull Request Review#

bash
# Check out the PR branch
git fetch origin pull/123/head:pr-123
git checkout pr-123

# Start a background agent to review the checked-out PR branch
ada agents start "Review the changes on this branch (PR #123) for code quality, security, and best practices"

For an interactive review, run ada chat, paste the diff, and ask:

  • "What are the main changes in this PR?"
  • "Are there any potential breaking changes?"
  • "Which new code paths have no tests?"
  • "Write a review comment summarizing these findings."

Issue Triage#

If your issue tracker is connected as an MCP server (see MCP Integration), list its tools and call them directly:

bash
# List configured servers and the tools they expose
ada mcp servers
ada mcp tools

# Call a tool by its server-qualified name
ada mcp exec "<server>:<tool>" --args '<json>'

Then run ada chat, paste the issue list, and ask which issue to work on first.

DevOps and Automation Workflows#

CI/CD Integration#

CI runners have no browser or interactive terminal, so pipelines configure the local Lattice runtime with a provider API key and queue work with ada tasks submit. See CI/CD Integration for complete pipeline examples.

Infrastructure Review#

bash
# Review infrastructure code for best practices
ada agents start "Review the Terraform code under infrastructure/ for best practices and write findings to infrastructure-review.md"

# Check for security misconfigurations
ada agents start "Audit the infrastructure code under infrastructure/ for security misconfigurations"

Deployment Validation#

bash
# Pre-deployment check
ada agents start "Validate readiness of the production deployment"

# Review a deployment script
ada agents start "Check scripts/deploy.sh for failure modes and missing rollback steps"

AI Agent Workflows#

Running Agents for Specific Tasks#

Start an agent on a task and manage its lifecycle:

bash
# Start an agent on a task (see `ada agents start --help` for options)
ada agents start "Refactor the auth module to use the shared error types"

# Watch its progress (grab the agent ID from the list)
ada agents list
ada agents status <agent-id>

# Stop it
ada agents stop <agent-id>

Long-Running Background Work#

bash
# Start a long-running analysis in the background
ada agents start "Perform a comprehensive analysis of the code under src/: complexity metrics, dependency graphs, and an architecture review"

# Continue working, then check progress
ada agents list
ada agents status <agent-id>

Running Several Agents at Once#

bash
# Start one agent per concern
ada agents start "Run a security audit of the code under src/"
ada agents start "Review the code under src/ for quality issues"
ada agents start "Analyze test coverage for the code under tests/"

# Watch them all from one place
ada agents list

# Drill into any one of them
ada agents status <agent-id>

To group related tasks, submit subtasks under a parent task and view the tree:

bash
ada tasks submit "Prepare the 2.0 release" --tag release
ada tasks submit "Update the migration guide for 2.0" --parent <task-id>
ada tasks tree <task-id>

Best Practices#

Write Specific Task Descriptions#

Agents and tasks work from the description you give them. Name the files, the goal, and where the output goes.

bash
# Vague
ada agents start "Fix this code"

# Specific
ada agents start "Review the authentication logic in src/user-service.ts for SQL injection and replace string-built queries with parameterized ones"

The same applies in ada chat: paste the relevant code, state the constraint, and narrow the question as the conversation goes.

Session Management#

bash
# List sessions and show details of the most recent one
ada sessions list
ada sessions info --last

# Title a session so it is easy to find later
ada sessions update <session-id> --title "Rate limiting design"

# Resume a session, or start chat on it directly
ada sessions resume <session-id>
ada chat --session <session-id>

Workspace Organization#

Use one workspace per project or client:

bash
# Create workspaces
ada workspaces create --name personal-experiments
ada workspaces create --name client-project --description "Client engagement"

# Switch between them
ada workspaces list
ada workspaces select --id <workspace-id>
ada workspaces current

Keep them in sync and remove the ones you no longer need:

bash
ada workspaces sync
ada sync status
ada sync conflicts
ada workspaces delete --id <workspace-id>

Next Steps#