Agentic Claude Code Workflow with Linear Integration
A structured workflow for using Claude Code with Linear task management, featuring custom commands, agent guidelines, and human review checkpoints. This methodology helps maintain context window efficiency while ensuring code quality through systematic task execution.
Tools & Prerequisites
Required Tools
Step-by-Step Guide
Setup Custom Commands
Create two files in .claude/commands/ directory to establish the workflow foundation
Code Example
# context_prime.md
Review all documents in docs/agent_guidelines/
These documents outline information you need for your tasks.
# work_task.md
This document outlines the standard development workflow for the Void Champion Heroes project.
Pro Tip
These commands will be the primary interface for initiating development sessions
Create Agent Guidelines
Set up three markdown files in docs/agent_guidelines/ to define project standards
Code Example
docs/agent_guidelines/
├── BRANCHING_STRATEGY.md
├── CODING_STANDARDS.md
└── LOGGING_GUIDE.md
Pro Tip
Customize these files to match your specific project requirements and team standards
Configure Linear Tasks
Create tasks in Linear using a standardized template that includes Scope, Test Cases, References, Dependencies, and Acceptance Criteria
Pro Tip
References are particularly important - Claude Code uses these to build the full context needed for the work
Task Retrieval and Analysis
The workflow begins by retrieving a task from Linear using the Linear MCP tool, reviewing task details, and moving it to 'In Progress' status
Prompt Template
/context_prime
/work_task <LINEAR_ID>
Pro Tip
Always start with a clean context window for best results
Planning Phase with Human Review
Claude develops an implementation plan with clear steps, identifies challenges and solutions, then presents the plan for human approval
Pro Tip
Wait for explicit approval before proceeding - this is a critical checkpoint
Implementation Phase
Write code according to the approved plan, following project coding standards and patterns, with appropriate documentation
Pro Tip
Claude should follow the standards defined in your agent guidelines automatically
Implementation Review
Present completed implementation to human collaborator, demonstrate functionality and test results, wait for approval
Pro Tip
Nine times out of ten, Claude follows the rules perfectly, but keep an eye out for skipped verification steps
PR Creation and Merge
Once acceptance criteria are met, create a pull request and let CI/CD integration run. If successful, merge back to develop branch
Pro Tip
Manage task size to fit within a single context window for best results
Agentic Claude Code Workflow
This workflow was developed after months of experimentation with various agentic coding tools including Roo Code, boomerang overlays, aider, Augment Code, and Claude Code. The main challenge addressed is keeping models within context windows while preventing unwanted modifications.
Core Principles
- Context Management: Prevent context window overflow through structured task sizing
- Human Verification: Built-in checkpoints for human review at critical stages
- Task Integration: Seamless integration with Linear for task management
- Standards Enforcement: Consistent coding standards through agent guidelines
Workflow Structure
The workflow consists of two main custom commands and supporting documentation:
Custom Commands (.claude/commands/)
- context_prime.md: Reviews all documents in docs/agent_guidelines/ to establish project context
- work_task.md: Defines the standard development workflow with explicit steps and human review points
Agent Guidelines (docs/agent_guidelines/)
- BRANCHING_STRATEGY.md: Git branching conventions (main, develop, feature branches)
- CODING_STANDARDS.md: Naming conventions, formatting, and code structure
- LOGGING_GUIDE.md: Logging system standards and implementation
Linear Task Template
Tasks in Linear should include:
- Scope: Clear boundaries of the task
- Test Cases: Expected test scenarios
- References: Critical for Claude to build full context
- Dependencies: Related components and requirements
- Acceptance Criteria: Definition of done
Execution Process
- Start with a clean context window (
/clear
if needed) - Run
/context_prime
to load project guidelines - Run
/work_task <LINEAR_ID>
to begin task execution - Monitor for human verification points
- Create PR upon acceptance criteria completion
- Let CI/CD handle integration
Best Practices
- Task Sizing: Keep tasks within a single context window
- Monitoring: Watch for skipped human verification steps
- Context Management: Auto-compaction works but requires closer attention
- Documentation: Maintain clear references in Linear tasks
Discussion (0)
Comments coming soon!