10 KiB
Multi-Agent Workflow Integration Summary
This document provides a complete overview of integrating additional agents into your Cline workflow for more autonomous iteration.
Executive Summary
You asked to improve your coding workflow by leveraging additional agents for autonomous iteration on well-defined problems. The goal is to reduce hand-holding of Cline while maintaining oversight and quality control.
Key Outcomes
- Refined Cline guidance - Updated
.clineruleswith agent orchestration patterns - Tool identification - OpenCode (primary), Aider (quick tasks), Playwright (browser tests), E2B (optional sandboxing)
- Progress monitoring - Time estimates, checkpoint reviews, re-think triggers defined
- Proof of Concept ready - LinkdingSync test harness documentation prepared
Tool Evaluation Summary
| Tool | Role | When to Use | Notes |
|---|---|---|---|
| OpenCode | Primary autonomous agent | Test harness iteration, debugging loops, multi-file refactoring | Self-hosted, reads AGENTS.md |
| Aider | Quick task assistant | Simple edits, one-off fixes | Fast, minimal overhead |
| Playwright | Browser automation | E2E testing, API call simulation | Used by OpenCode/Aider |
| E2B | Sandboxed execution | Optional, for safe code running | Consider if needed |
Claude Code was intentionally not recommended as it's Anthropic-specific and you prefer self-hosted models.
Integration Mechanisms
1. .clinerules - Global Guidance
Location: n:\Data\Users\David\MyWorkspace\.clinerules
Purpose: Always-on guidance for all projects
What's included:
- Agent overview and roles
- Handoff protocol (when to delegate)
- Progress monitoring thresholds
- Time estimate guidelines (2x/3x re-think triggers)
- Project file conventions
2. Workflows - Task Templates
Location: Project-specific markdown files
Purpose: Step-by-step task definitions for Cline to orchestrate
Example: task-delegate-to-opencode.md
# task-delegate-to-opencode.md
## Step 1
Gather acceptance criteria from user or task brief
## Step 2
Write or update AGENTS.md with project context
## Step 3
Create task brief in `<root>/task-brief.md`
## Step 4
Launch OpenCode with: `opencode --task task-brief.md`
## Step 5
Review output and approve changes
## Step 6
Mark task as complete in tasks.md
3. Hooks - Pre/Post Action Enforcement
Available in Cline: Yes (via Ghost.io/cine-v3-36-hooks)
Purpose: Run at known workflow moments
Example use cases:
- Detect when task has >3 test failures → Suggest OpenCode handoff
- Inject AGENTS.md content before task launch
- Validate operation before execution
Note: Hook implementation requires Cline extension configuration. Documented in .clinerules as conceptual guidance.
4. Skills - Contextual Expertise
Available in Cline: Yes
Purpose: On-demand knowledge injection
Example use cases:
- Add Playwright expertise before browser test tasks
- Inject API documentation before integration tasks
- Load project architecture notes before major changes
Note: Skill implementation via system prompts or context injection. Documented conceptually in .clinerules.
Project Memory Files
| File | Purpose | Who Writes | Who Reads |
|---|---|---|---|
AGENTS.md |
Project context (build, test, conventions) | Cline | All agents |
task-brief.md |
Current task specification | Cline | OpenCode/Aider |
.clinerules |
Project-specific guidance | Cline | Cline only |
TODOs.txt |
Task tracking | Any | All |
tasks.md |
Detailed task progress | Any | All |
Workflow Diagram
┌─────────────────────────────────────────────────────────────────┐
│ TASK INITIATION (CLINE) │
│ - Define task and acceptance criteria │
│ - Create/update task-brief.md │
│ - Create/update AGENTS.md │
└─────────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ ORCHESTRATION (CLINE) │
│ - Review .clinerules for guidance │
│ - Decide: direct Cline OR delegate to agent │
│ - Record time estimate and checkpoint plan │
└─────────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ AUTONOMOUS ITERATION (OPENCODE/AIDER) │
│ - Read AGENTS.md for project context │
│ - Execute task per task-brief.md │
│ - Run tests repeatedly until stable │
│ - Report on progress or blockers │
└─────────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ CHECKPOINT REVIEW (CLINE) │
│ - Review progress at 50% and 90% of estimate │
│ - Detect stuck loops or blockers │
│ - Decide: continue, re-think, or escalate │
└─────────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────────┐
│ INTEGRATION & APPROVAL (CLINE) │
│ - Review diff from agent work │
│ - Approve/reject changes │
│ - Add final product-level refinements │
│ - Commit and push to git │
└─────────────────────────────────────────────────────────────────┘
Next Steps for Implementation
Phase 1: Setup (Immediate)
-
Install OpenCode:
npm install -g @anthropic-ai/claude-code -
Install Aider:
pip install aider-chat -
Install Playwright:
npm install -D @playwright/test npx playwright install -
Update existing projects:
- Create
AGENTS.mdin Linkding Browser Extension - Document build/test commands
- Add architecture notes
- Create
Phase 2: Test Workflow (Short Term)
-
Create proof of concept task brief:
- Task: "Increase Playwright test coverage for LinkdingSync"
- Document acceptance criteria
- Set time estimate
-
Run OpenCode session:
opencode --task task-brief.md -
Monitor checkpoints:
- Review at 50% of estimated time
- Review at 90% of estimated time
- Re-evaluate if time > 2x estimate
-
Integrate results:
- Review changes in VSCodium
- Approve/reject as needed
- Document lessons in
docs/
Phase 3: Refine & Scale (Medium Term)
- Document what works/doesn't work
- Create reusable task templates
- Add hooks to
.clinerulesif needed - Evaluate E2B for sandboxing use cases
Quick Reference Commands
Launch OpenCode
opencode --task task-brief.md
Launch Aider
aider
Run Playwright Tests
npx playwright test
Check Git Status
git log --oneline -10
git status
Documentation Created
| File | Location | Purpose |
|---|---|---|
.clinerules |
Workspace root | Global agent guidance |
docs/agent-tools-installation.md |
docs/ | Tool installation guide |
docs/agent-evaluation-framework.md |
docs/ | Evaluation & re-think criteria |
docs/multi-agent-workflow-summary.md |
docs/ | This document |
Additional Resources
Key Takeaways
- Cline = Orchestrator (IDE-native, human-in-the-loop)
- OpenCode = Primary autonomous agent (terminal-driven iteration)
- Aider = Quick task assistant (simple edits)
- Playwright = Browser automation (via OpenCode/Aider)
- Shared memory = AGENTS.md for project context
- Progress monitoring = Time estimates with 2x/3x re-think thresholds
- Task briefs = Clear acceptance criteria for agents
Files to Review Before Acting
.clinerules- Updated with agent guidancedocs/agent-tools-installation.md- Installation instructionsdocs/agent-evaluation-framework.md- Evaluation criteriaLinkding Browser Extension/LinkdingSync/AGENTS.md- Create for project contextLinkding Browser Extension/LinkdingSync/task-brief.md- Create for test harness task
Ready to proceed? Toggle to Act mode when you're ready to install tools and begin the proof of concept.