Best Practices
Writing Effective Input
Be Specific About Core Features
❌ “Build a social media app” ✅ “Build a social media app for photographers with portfolio galleries, image tagging, follow system, and commenting”Include Business Context
❌ “Build an e-commerce site” ✅ “Build an e-commerce site for handmade crafts with artist profiles, custom product options, and commission tracking for a marketplace model”Mention Technical Preferences
If you have specific tech stack requirements, mention them: ✅ “Build a real-time chat app using Next.js, Socket.io, and PostgreSQL”Using Current Context
When to Use currentContext
Use the currentContext
parameter when:
- Adding features to an existing codebase
- Expanding on a previous spec
- Building on top of established architecture
How to Provide Context
Choosing Fast vs Deep Spec
See our detailed guide on choosing between Fast and Deep Specs.Managing Your Agent with the Spec
This is the most important section for getting real value from your specifications.
The Spec is a Living Document
Your generated spec isn’t just a planning document—it’s an active management tool for keeping your AI agent on track.Core Principle: You’re the Context Engineer, Agent is the Implementer
With Architect API, you shift from:Prompt engineering→ Context engineeringVibe coding→ Vibe PM’ingManaging code changes→ Managing agent constraints
Why Structured Context Matters
Unstructured context (conversation):⚠️ Critical Best Practices for Agent Management
1. Don’t Be Afraid to Interrupt
Most Important Rule: Actively interrupt your agent to ensure it’s checking off tasks.- Prevents agents from drifting off scope
- Keeps you both aligned on progress
- Makes it immediately obvious if tasks are being skipped
- Forces the agent to acknowledge completion
2. Question Every Skipped Task
If your agent skips a task, always ask why:- “We’re using Clerk which handles token refresh automatically”
- “This was already implemented in the existing codebase”
- “After analysis, this feature isn’t needed for MVP scope”
- “I thought it wasn’t necessary”
- “I’ll come back to it later”
- No clear answer
3. Enforce Acceptance Criteria Checks
Before marking anything complete, make the agent double-check acceptance criteria:4. Triple Check Tests
Both user tests and unit tests are non-negotiable:- Unit tests for core logic
- Integration tests for API endpoints
- E2E tests for critical user flows
5. Know When to Start Fresh
If your agent starts degrading in performance:- Giving vague answers
- Skipping important steps
- Making sloppy mistakes
- Losing context of the spec
Practical Workflow Pattern
Recommended Agent Management Flow:
-
Start of Session
-
Before Starting Each Task
-
During Implementation
- Check in regularly
- Ask agent to summarize what it’s building
- Verify it matches the spec requirements
-
Before Marking Complete
-
Every 5-10 Tasks
Working with Generated Specs
Reading the Output
Specs are organized hierarchically:- Executive Summary - Project overview
- Features - Organized by category
- Milestones - Grouped implementation phases
- User Stories - Detailed requirements with acceptance criteria
- Tasks - Granular checklist items
Opening Specs in Agents
All agents support deep links - click the “Open in [Agent]” button on your spec page. For Cursor:Iterating on Specs
You can regenerate specs with updates:Agent-Specific Tips
Cursor Tips
- Deep Link: Use
cursor://file?url=SPEC_URL
for instant opening - Keep spec panel open while developing
- Reference specific task IDs when asking questions
- Use spec sections as cursor rules
Lovable Tips
- Deep Link:
https://lovable.dev/projects/create?template=SPEC_URL
- Spec automatically loads as project context
- Break large specs into phases
- Focus on one milestone at a time
Bolt Tips
- Use “Open in Bolt” button from spec page
- Works best with smaller, focused feature sets
- Reference spec sections for specific features
Claude Desktop (MCP) Tips
- Spec access is automatic through MCP
- Leverage Claude’s long context window
- Ask for implementation strategy before coding
- Use spec to keep agent aligned
v0 Tips
- Extract UI/component sections from spec
- Use deep link from spec page
- Generate components matching overall design system
Common Pitfalls to Avoid
❌ Treating Spec as Static
Don’t generate once and forget. Actively use it to manage progress.❌ Letting Agent Run Unsupervised
Check in frequently. Agents drift without human oversight.❌ Skipping the “Why” Conversation
If tasks are skipped, understand why. Don’t assume agent knows best.❌ Ignoring Test Requirements
Testing is in the spec for a reason. Don’t let agent skip it.❌ Not Updating Progress
Keep the checklist current. It’s your source of truth.Success Metrics
You’re using the spec effectively when:- ✅ Every task has a clear status marker
- ✅ Agent asks permission before skipping tasks
- ✅ Acceptance criteria are verified before completion
- ✅ Tests exist for all major features
- ✅ You can see progress at a glance
- ✅ Scope creep is caught early
- ✅ Nothing falls through the cracks
Context Engineering Principles
The Spec as Optimal Agent Context
Your generated spec is professionally engineered context that:- Hierarchical Structure - Agents can navigate from high-level (milestones) to granular (subtasks)
- Clear Boundaries - Acceptance criteria define success, task tracking defines scope
- Architectural Grounding - Diagrams prevent agents from inventing non-existent systems
- Progressive Disclosure - Agents receive exactly the context depth they need
- Verifiable Checkpoints - Task completion is objectively verifiable
How to Maximize Context Quality
Load the entire spec at session start:- Full architectural context
- Phase relationships
- Technical constraints
- Success criteria
Context Engineering vs. Prompt Engineering
Prompt Engineering | Context Engineering |
---|---|
Craft perfect prompts | Generate perfect structure |
Iterative refinement | Automated professional quality |
Lost in chat history | Persistent, navigable |
No verification system | Built-in acceptance criteria |
Manual task breakdown | Automatic decomposition |
Tribal knowledge | Documented, shareable |
The Bottom Line
The spec makes you a better context engineer, not a better coder.Your job shifts from:
Writing code→ Engineering agent contextDebugging syntax→ Ensuring requirements are metCrafting prompts→ Managing structured constraintsArchitecture decisions→ Following engineered architectureFeature planning→ Feature verificationCode reviews→ Context quality control