Skip to content

Instantly share code, notes, and snippets.

@numman-ali
Created October 16, 2025 22:43
Show Gist options
  • Save numman-ali/c97fa2ae47d71c53f3a5c955fe9ec609 to your computer and use it in GitHub Desktop.
Save numman-ali/c97fa2ae47d71c53f3a5c955fe9ec609 to your computer and use it in GitHub Desktop.
## Β§8 SESSION START PROTOCOL
**Target:** CLI-capable autonomous agents (Claude Code, Cursor, Codex, Devin)
**Scope:** Hub repository (orchestrator, coordination, APIs)
**Version:** 4.0 Streamlined (Core + Just-in-Time Modules)
**Date:** 2025-10-05
**On session start:**
1. Read this file (AGENTS.md) completely - contains all constitutional and identity content
2. **CHECK Β§0.1 Architecture Status AND Strategic Roadmap Alignment** (CRITICAL)
- Review "What's Under Research πŸ”¬" section
- Review "What's Planned πŸ“‹" section
- **VERIFY STRATEGIC PRIORITIES** (BLOCKING):
a. Read docs/roadmap/*.md to identify Priority 0-5 sequence
b. Check if Priority 0 complete (exists in docs/tasks/done/)
c. If Priority 0 incomplete:
- Verify Priority 0 task exists in docs/tasks/ready/
- If missing from queue β†’ ESCALATE "Priority 0 blocker not in queue but not complete. Cannot proceed to Priority 1+ until Priority 0 resolved."
d. Only proceed to Priority 1+ tasks if Priority 0 complete
- If task involves research-flagged areas, research FIRST before implementation
- Consult docs/specifications/ for current research state
- Flag gaps explicitly before proposing implementation plans
- Apply Override 6 (Assumption β†’ Research) rigorously
2.5. **CHECK RECENT STRATEGIC WORK** (BLOCKING before task selection):
- List files in docs/memory/sessions/ (sorted by modification date, descending)
- List files in docs/memory/decisions/ (sorted by modification date, descending)
- Read most recent file (if modified within last 7 days):
- If M:STRAT ultrathink analysis: Extract priority sequence and next actions
- If strategic decision: Extract conclusions and implications
- If alignment session: Extract task queue changes and blockers
- **IF recent strategic work exists (<7 days old)**:
- Do NOT ask "what should I work on next?"
- Do NOT re-analyze priorities
- Execute conclusions from strategic work immediately
- Evidence: "Reviewed [filename] ([date]). Priority: [identified priority]. Proceeding with [action]."
- **IF no recent strategic work** OR unclear priorities:
- Proceed to task selection via Β§6
- **Purpose**: Prevent redundant strategic analysis and "what's next" confusion
3. Classify intent via Β§5 (M:IMPL | M:DIAG | M:STRAT | startup command)
4. Load phase module based on intent (just-in-time):
**CRITICAL**: Load ONLY the module required for current mode. Pre-session loading violates progressive disclosure.
Context costs: phase-0 (82 lines), phase-1 (145 lines), phase-2a (200 lines), phase-2b (718 lines)
- M:IMPL β†’ `docs/agents/phases/phase-1-setup.md`, then `docs/agents/phases/phase-2b-implementation.md`
- M:DIAG β†’ `docs/agents/phases/phase-2a-diagnostic.md`
- M:STRAT β†’ `docs/agents/phases/phase-0-strategic.md`
Self-monitoring: Every 10 Read calls, verify you loaded only required modules for current phase/mode.
5. Load gate modules when triggered (conditional):
- Vβœ— detected β†’ `docs/agents/reference/error-recovery.md`
- commits β‰₯ 5 β†’ `docs/agents/reference/checkpoint-gate.md`
- blocked β‰₯ 2 attempts β†’ `docs/agents/reference/blocker-protocol.md`
- task complete β†’ `docs/agents/reference/completion-gates.md`
- R:8-10 or C<60% β†’ `docs/agents/reference/escalation.md`
- M:STRAT:RESEARCH β†’ `docs/agents/reference/research-protocol.md`
- Commands/tips needed β†’ `docs/agents/reference/supporting-reference.md`
6. Execute phase workflow with full adherence to identity (Β§2) and constitutional principles (Β§3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment