Start a new work session for a feature, bug, or chore. Gathers requirements, creates an optimized session plan broken into context-efficient phases, and guides implementation.
This skill initiates a new work session by gathering requirements and creating an optimized session plan that fits within context window constraints.
Creates a structured session plan in .agent/sessions/ that includes:
Create a todo list for all tasks in this workflow and work through them one by one.
Check that project initialization has been completed:
if [ ! -d ".agent/context" ]; then
echo "⚠️ Project not initialized. Please run /init-project first."
exit 1
fi
Check for existing active session:
if [ -f ".agent/sessions/active-session.md" ]; then
echo "⚠️ Active session already exists. Would you like to:"
echo "1. Resume the existing session"
echo "2. Archive it and start a new session"
# Ask user what to do
fi
Use the AskUserQuestion tool to gather detailed information about the work:
Work Type:
User Story/Description:
Acceptance Criteria:
Scope & Context:
Constraints:
Testing:
Based on the user's input, use the Explore agent to:
Create a comprehensive session plan with phases optimized for context windows:
.agent/sessions/active-session.md:
# Active Session
**Created:** [Timestamp]
**Type:** [Feature/Bug/Chore]
**Status:** Phase 1 - Planning
---
## User Story
[User story or description of the work]
### Business Value
[Why this work matters]
---
## Acceptance Criteria
- [ ] [Criterion 1]
- [ ] [Criterion 2]
- [ ] [Criterion 3]
---
## Affected Components
### Primary
- [Component/Module]: [Why it's affected]
### Secondary
- [Component/Module]: [Why it's affected]
---
## Key Files
- `path/to/file.ts` - [Purpose and what will change]
- `path/to/test.spec.ts` - [Test file for above]
---
## Dependencies & Prerequisites
- [Dependency or prerequisite to be aware of]
---
## Constraints
### Technical
- [Technical constraint]
### Breaking Changes to Avoid
- [Potential breaking change to watch for]
---
## Implementation Plan
### Phase 1: [Phase Name] (Planning/Setup)
**Estimated Scope:** [Small/Medium/Large - for context estimation]
**Objectives:**
- [Objective 1]
- [Objective 2]
**Tasks:**
- [ ] [Task 1]
- [ ] [Task 2]
**Files to modify:**
- [Files for this phase]
**Success Criteria:**
- [How to know this phase is done]
---
### Phase 2: [Phase Name] (Core Implementation)
**Estimated Scope:** [Small/Medium/Large]
**Objectives:**
- [Objective 1]
**Tasks:**
- [ ] [Task 1]
- [ ] [Task 2]
**Files to modify:**
- [Files for this phase]
**Success Criteria:**
- [How to know this phase is done]
---
### Phase 3: [Phase Name] (Testing & Validation)
**Estimated Scope:** [Small/Medium/Large]
**Objectives:**
- [Objective 1]
**Tasks:**
- [ ] [Task 1]
- [ ] [Task 2]
**Success Criteria:**
- [How to know this phase is done]
---
## Testing Strategy
### Unit Tests
- [Test 1 description]
- [Test 2 description]
### Integration Tests
- [Test 1 description]
### E2E Tests (if applicable)
- [Test 1 description]
### Manual Testing
- [ ] [Manual test scenario 1]
- [ ] [Manual test scenario 2]
---
## Edge Cases & Considerations
- [Edge case 1]
- [Edge case 2]
---
## Progress Tracking
**Current Phase:** 1
**Completed Phases:** []
**Remaining Phases:** [1, 2, 3]
**Phase 1 Progress:**
- Status: Not Started
- Completed Tasks: 0/[total]
---
## Notes
[Space for additional notes during implementation]
When breaking work into phases, consider:
Context Window Optimization:
Logical Grouping:
Common Phase Patterns:
Review the generated session plan to ensure:
Present the session plan to the user and ask if they're ready to begin:
✅ Session plan created!
## Summary
- **Type:** [Feature/Bug/Chore]
- **Phases:** [Number] phases
- **Affected Components:** [List]
## Plan Overview
Phase 1: [Name] - [Brief description]
Phase 2: [Name] - [Brief description]
Phase 3: [Name] - [Brief description]
The detailed plan is saved in .agent/sessions/active-session.md
Ready to begin Phase 1?
If the user is ready, use the TodoWrite tool to create todos for Phase 1 and begin execution.
If resuming an existing session:
.agent/sessions/active-session.md📋 Resuming session...
**Type:** [Feature/Bug/Chore]
**Current Phase:** [N] - [Phase Name]
**Progress:** [X]/[Y] tasks completed
Continuing with remaining tasks in Phase [N].
When a phase is completed:
Update the Progress Tracking section:
Summarize phase completion:
✅ Phase [N] completed!
**Completed:**
- [Task 1]
- [Task 2]
**Next Phase:** [N+1] - [Phase Name]
[Brief description of what's next]
Ready to continue?