Prompt file imported from ThomasRohde/copilot-experiment (
.github/prompts/session-start.prompt.md). Copyright stays with the author.
Goal
Execute the standardized startup routine for a long-running agent session, ensuring you have full context before making any changes.
Context
This prompt implements the "Getting up to speed" phase from Anthropic's long-running agent research. Every coding session should start with this routine to:
- Understand current project state
- Identify what was done recently
- Verify the environment works
- Choose the right next task
Instructions
1. Orient Yourself
# Confirm working directory
pwd # or Get-Location on Windows
# Check project structure
ls -la # or Get-ChildItem
2. Read Progress Artifacts
Read these files in order:
-
agent-progress.md- Recent session summaries- What was the last session working on?
- Are there any documented blockers?
- What were the recommended next steps?
-
features.json- Feature completion status- How many features are passing vs pending?
- What's the highest priority incomplete feature?
- Are there any features marked as
in-progressorblocked?
-
Git history - Recent changes
git log --oneline -15 git status git diff --stat HEAD~3 # What changed recently
3. Artifact Integrity Checks (MANDATORY)
Before proceeding, validate:
features.json:
- File is valid JSON
-
metadata.totalFeatures== actual feature count -
metadata.passingFeatures== count wherepasses: true - All features have required fields:
id,description,acceptanceCriteria,passes - No features from previous session are missing (compare with
agent-progress.mdif noted)
agent-progress.md:
- Session numbers are sequential (no gaps or duplicates)
- Previous session entries are intact (not deleted/modified)
If any check fails:
- Document the inconsistency in output
- Fix immediately before any coding work
- If unfixable, invoke
/recover-from-failure
4. Start the Environment
IMPORTANT: The init script performs health checks. If they fail, do NOT proceed.
# Run the init script (it handles server startup and health checks)
./init.sh # or .\init.ps1 on Windows
The init script will:
- Kill any stale dev servers on the target port
- Install dependencies if missing
- Run type check, lint, and tests
- Start dev server in background
- Wait for port to be ready (health check)
- Run a minimal smoke test
If init script fails:
- STOP - Do not start new features
- Document the failure
- Invoke
/recover-from-failureto diagnose and fix - Only continue after init passes completely
5. Smoke Test
Before implementing new features, verify basic functionality:
- For web apps: Navigate to main page, perform core action
- For APIs: Hit health endpoint, test one main endpoint
- For CLI tools: Run help command, execute basic operation
- For libraries: Run test suite, import main module
If smoke test fails:
- STOP - Do not start new features
- Investigate and fix the existing issue first
- Document what was broken in progress file
6. Create Session Plan
Before starting work, create a plan with 3-6 concrete steps:
#### Session Plan
| # | Task | Status |
|---|------|--------|
| 1 | <specific task> | in-progress |
| 2 | <specific task> | not-started |
| 3 | <specific task> | not-started |
Status values: not-started, in-progress, blocked, done
Rules:
- Only ONE task
in-progressat a time - Update status as you complete each task
- If blocked, note the reason and move to next task
- At session end, all tasks must be
doneor explicitlyblockedwith owner/next-step
7. Select Next Task
Based on your review:
- If environment is broken → Fix it first
- If there are incomplete in-progress features → Complete them
- Otherwise → Pick highest priority feature from
features.json
8. Announce Your Plan and Begin
Before making changes, state:
- Which feature you'll work on (by ID and description)
- Your approach in 2-3 sentences
- Any risks or dependencies you've identified
Then immediately begin implementation. Do not wait for user confirmation—the purpose of this prompt is to get up to speed AND start working.
Output Format
After completing the startup routine, provide a brief status report and begin coding immediately:
## Session Start Report
**Timestamp**: <current time>
**Working Directory**: <path>
### Artifact Integrity
- [x] features.json valid (X features, Y passing)
- [x] Metadata counts match actual
- [x] agent-progress.md sessions sequential
- [x] No missing features detected
### Environment Status
- [x] Init script executed
- [x] Health checks passed
- [x] Smoke test passed
### Project Status
- **Total Features**: X
- **Passing**: Y (Z%)
- **In-Progress**: N
- **Blocked**: M
- **Last Session**: <date> - <summary>
### Session Plan
| # | Task | Status |
|---|------|--------|
| 1 | <task> | in-progress |
| 2 | <task> | not-started |
| 3 | <task> | not-started |
### Current Task
**Target Feature**: F00X - <description>
**Approach**: <brief plan>
**Estimated Scope**: <small/medium/large>
### Risks/Dependencies
- <any concerns>
After the Report
Immediately proceed to implement the selected feature. Do not ask "Ready to proceed?" or wait for confirmation. The user invoked this prompt to start a productive coding session, so begin working right away.