Best Practices Guide
Patterns and workflows that work well with Workunit. Tips for workunit creation, AI collaboration, context preservation, and team productivity.
Overview
This guide distills insights from teams successfully using Workunit to build products faster with AI collaboration. These patterns help you avoid common pitfalls, maximize AI effectiveness, and maintain context across complex multi-model workflows.
Workunit Creation
Great workunits start with clarity. The effort you invest in creating a well-defined workunit pays dividends throughout the entire lifecycle.
Effective Naming
Names should be clear, concise, and action-oriented. Think of them as headlines that instantly communicate what you're building.
- • "Build JWT Authentication System"
- • "Add Stripe Payment Integration"
- • "Optimize Database Query Performance"
- • "Implement User Profile Editing"
- • "Auth stuff"
- • "Payment feature"
- • "Make it faster"
- • "User things"
Problem Statements That Work
A strong problem statement answers three questions: What's broken? Why does it matter? Who does it affect?
Measurable Success Criteria
Success criteria should be specific, measurable, and testable. Avoid subjective terms like 'better' or 'improved'.
- • "API response time under 200ms for 95th percentile"
- • "All passwords hashed with bcrypt cost factor 12"
- • "Test coverage above 90% for authentication flows"
- • "JWT tokens expire after 24 hours"
- • "System should be fast"
- • "Good security"
- • "Well tested"
- • "Tokens configured properly"
Task Management
Effective task breakdown enables parallel work by both humans and AI models. Good tasks are atomic, independent where possible, and clearly scoped.
Task Breakdown Strategy
Managing Dependencies
Explicitly mark which tasks can run in parallel and which have dependencies. This enables efficient multi-model collaboration.
Consistent Status Updates
Real-time status updates prevent duplicate work and enable effective multi-model collaboration.
- • Mark "In Progress" immediately when starting work
- • Mark "Done" as soon as task is complete and verified
- • Mark "Blocked" if dependencies are missing or issues arise
- • Update estimated completion time if scope changes
Saving Context
Context atoms are your project's living memory. Each atom is a typed, importance-ranked unit of knowledge — decisions, insights, questions, attempts, and progress — that enables future AI models to pick up where previous models left off without losing critical insights.
When to Save Context
progress atom: "We just implemented the JWT authentication flow. Document what we learned about token expiry and refresh patterns."decision atom: "Document why we chose PostgreSQL over MongoDB for user data, including scalability and query pattern considerations."insight or attempt atom: "Document the race condition we found in concurrent webhook processing and how we solved it with idempotency keys."progress atom: "Summarize current state and next steps before moving to the payment integration workunit."What to Include in Context
Format Guidelines
Use the save_context MCP tool to save individual atoms. Each atom should focus on one decision, insight, or update. Prefer multiple focused atoms over a single large blob.
save_context(
workunit_id: "...",
atom_type: "decision",
importance: "high",
title: "Chose JWT over sessions for auth",
content: "JWT chosen for horizontal scaling. 24-hour token
expiry balances security and UX. Refresh tokens
stored in PostgreSQL to enable revocation.",
tags: ["auth", "architecture"]
)save_context(
workunit_id: "...",
atom_type: "attempt",
importance: "normal",
title: "bcrypt cost factor >12 causes login latency",
content: "Tried cost factor 14 for stronger hashing, but
login response exceeded 2s. Settled on cost factor
12 which keeps latency under 200ms while remaining
secure.",
tags: ["auth", "performance"]
)save_context(
workunit_id: "...",
atom_type: "progress",
importance: "normal",
title: "Auth middleware complete, tests passing",
content: "Implemented JWT validation middleware and
integration tests. Next: password reset flow
with time-limited tokens. Rate limiting on auth
endpoints still TODO.",
tags: ["auth", "middleware"]
)supersedes_id when updating a previous atom with new information.Multi-LLM Workflows
The real power of Workunit emerges when you orchestrate multiple AI models, each playing to their strengths on the same workunit.
Choosing the Right Model
- • Initial project planning and task decomposition
- • Architecture design and system design reviews
- • Security audits and compliance analysis
- • Writing comprehensive problem statements
- • Code review requiring deep reasoning
- • Implementing well-defined features rapidly
- • Writing tests and boilerplate code
- • Bug fixing and debugging sessions
- • API endpoint implementation
- • Refactoring and code cleanup
- • Performance profiling and optimization
- • Log analysis and pattern detection
- • Code quality audits at scale
- • Data migration and transformation
- • Visual diagram analysis
Parallel Execution Strategies
- GPT Instance 1: Implements Task 3 (user registration)
- GPT Instance 2: Implements Task 4 (login endpoint)
- Gemini: Works on Task 5 (integration tests)
Smooth Context Handoffs
The key to multi-model success is ensuring each model has full context when they pick up work.
- Update all task statuses to current state
- Save context atoms documenting work completed
- Note any blockers or dependencies discovered
- Document patterns or gotchas for next model
- Explicitly tell next model to read context atoms first
- Point to specific tasks ready for pickup
- Mention any context from linked assets
Team Collaboration
Effective teams treat AI models as team members while maintaining clear human accountability and decision-making authority.
Communication Patterns
Handoff Protocols
Asset Organization
Well-organized assets provide critical context to AI models without cluttering individual workunits.
Strategic Asset Linking
Asset Metadata Best Practices
Rich asset metadata helps AI models understand context without reading entire codebases or documentation.
- • Technology stack and version
- • Repository URLs and paths
- • API documentation links
- • Environment dependencies
- • Key maintainers
- • Document type and purpose
- • Last updated date
- • Authoritative source links
- • Related standards/specs
- • Key decision makers
Context Preservation
Context atoms are how Workunit preserves institutional knowledge. These practices ensure the 'why' behind decisions never gets lost.
Daily Documentation Habits
Trail-of-Thought Practices
Trail-of-thought documentation captures the evolution of understanding, not just the final state.
Productivity Patterns
Learn from common mistakes and proven efficiency patterns to maximize your team's velocity.
Common Anti-Patterns to Avoid
Proven Efficiency Tips
Cloud Execution Tips
Get the most out of Cloud Execution's Explore and Implement modes with these proven practices:
Next Steps
Ready to implement these best practices? Start with these resources:
Create your first workunit following these best practices from the start
Deep dive into multi-LLM collaboration and saving context atoms
Learn how to enable these practices across your entire team
Master asset organization and linking strategies
These practices evolved from real teams building real products. We're here to help you adapt them to your workflow.