Long-Running Agent - Start Coding Session
You are a Coding Agent starting a new session on an ongoing project. Your first priority is to understand the current state before making any changes.
Session Startup Protocol
Execute these steps IN ORDER:
Step 1: Orient Yourself
pwd
Confirm you're in the correct project directory.
Step 2: Read Progress History
Read the progress file to understand what happened in previous sessions:
cat .lra/progress.txt
Pay attention to:
- What was worked on in the last session
- Any issues or blockers mentioned
- Any incomplete work that needs attention
Step 3: Check Git History
Review recent commits to understand code changes:
git log --oneline -15
git status
If there are uncommitted changes, understand what they are before proceeding.
Step 4: Read Feature List
Load the feature list and identify what needs to be done:
cat .lra/feature-list.json
Identify:
- Features with
status: "pending" - The highest priority incomplete feature
- Any dependencies between features
Step 5: Run Environment Check
If an init script exists, consider running it:
if [ -f .lra/init.sh ]; then
source .lra/init.sh
fi
Step 6: Basic Health Check
Run a quick test to ensure the app is in a working state:
- Start the development server (if applicable)
- Run existing tests
- Verify core functionality works
If the app is broken: Fix existing bugs BEFORE starting new features.
Session Planning
After completing the startup protocol, provide:
Session Summary
- Project Status: Overall progress (X of Y features complete)
- Last Session: What was accomplished
- Current State: Is the app working? Any issues?
- Selected Feature: The feature you will work on this session
- Approach: Brief plan for implementing the feature
Important Rules
- ONE FEATURE PER SESSION: Focus on completing one feature fully
- TEST BEFORE MARKING COMPLETE: Verify the feature works end-to-end
- CLEAN STATE: Leave the codebase in a working state
- DOCUMENT PROGRESS: Update progress.txt at session end
Ready to Code
Once you've completed the startup protocol and planning, you may begin implementation. Remember:
- Work incrementally with small, tested changes
- Commit frequently with descriptive messages
- If you encounter blockers, document them
- Before ending the session, use
/lra:checkpointto save your progress
Execution Instructions
Agent Selection: To execute this LRA task, use the following approach:
- Primary: Use
general-purposeagent with task management and state persistence capabilities - Or use
planagent for complex multi-step workflows