Overview
/debrief is a production command in the Session category of the Prismatic Platform that provides comprehensive session debriefing with platform state analysis, changelog detection, session history summarization, and interactive next-steps selection. The command automatically executes at the start of every Claude Code session as part of the Automatic Startup Context Protocol, ensuring that every development session begins with full situational awareness of the platform's current state.
In a platform with 90+ applications, 400+ agents, and continuous evolution across multiple development sessions, context loss between sessions is a critical productivity risk. The /debrief command systematically addresses this by analyzing five dimensions of platform state: current quality metrics, recent git activity, session history with achievements and deliverables, recommended next steps, and interactive action selection. The result is a concise briefing that restores full context in under 30 seconds.
This command operates under the L2+ authority level and is executed by the session-debrief-specialist agent. It is part of the platform's 216-command slash command registry, built on the AIAD (Autonomous Intelligence Agent Design) standard. Version 2.0.0 introduced changelog detection through git log analysis, an interactive next-steps selector using the AskUserQuestion tool, and a recommendation engine that cross-references platform state with session history to suggest optimal next actions.
The debrief system treats session continuity as a first-class engineering concern. Without systematic debriefing, developers waste 10-15 minutes at the start of each session manually reconstructing context. With /debrief, this is reduced to a 30-second automated briefing followed by an interactive action selector.
Architecture
The debrief system uses a five-phase analysis pipeline that aggregates data from multiple platform subsystems into a unified situational awareness report.
Session Start
|
v
PHASE 1: Platform State Analysis (10s)
|-- Compilation status
|-- Quality gate scores
|-- Test suite status
|-- File/agent/command counts
|
PHASE 2: Changelog Detection (5s)
|-- Git log analysis (configurable days)
|-- Conventional commit categorization
|-- Notable commit highlighting
|-- Staged change detection
|
PHASE 3: Session Context Loading (5s)
|-- Find recent session files
|-- Extract missions and achievements
|-- Identify deliverables
|-- Summarize key decisions
|
PHASE 4: Recommendation Engine (5s)
|-- Analyze uncommitted changes
|-- Check quality violations
|-- Review pending TODOs
|-- Cross-reference session history
|
PHASE 5: Interactive Selection (user-driven)
|-- Present prioritized action list
|-- Await user decision
|-- Execute selected actionDebrief Scopes
| Scope | Content | Duration | Best For |
|---|---|---|---|
| full | All five phases | 30-45 seconds | Session start (default) |
| quick | Platform state only | ~10 seconds | Mid-session sanity check |
| changelog | Git activity focus | ~15 seconds | After pulling changes |
| context | Session history focus | ~15 seconds | Context recovery |
| suggest | Recommendations focus | ~15 seconds | Decision support |
Usage
Standard Debrief
# Full debrief (default, auto-executed at session start)
/debrief
# Quick status check
/debrief quick
# Changelog focus (last 14 days)
/debrief changelog --days 14
# Session context (last 10 sessions)
/debrief context --sessions 10
# Recommendations with interactive selector
/debrief suggestAdvanced Options
# Specific session file analysis
/debrief 2025-12-11-archer-supreme-session.md
# Full details without interactive prompt
/debrief full --interactive false
# Minimal output mode
/debrief full --quiet
# Extended changelog analysis
/debrief changelog --days 30 --fullOptions & Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
scope | string | full | Scope: full, quick, changelog, context, suggest |
--days | integer | 7 | Days for changelog analysis |
--sessions | integer | 5 | Number of recent sessions to summarize |
--interactive | boolean | true | Enable interactive next-steps selector |
--full | boolean | false | Show full session details |
--quiet | boolean | false | Minimal output mode |
Output Sections
1. Platform State
PLATFORM STATE
Quality Score: 100/100 (ABSOLUTE PERFECTION)
Compilation: 0 warnings
Tests: All passing
Credo: 0 violations
| Metric | Value | Change |
|--------------|--------|--------|
| Files | 6,652 | +15 |
| Agents | 404 | +5 |
| Commands | 210 | +2 |
| Apps | 90 | - |
| Quality | 13/13 | PERFECT|2. Changelog (Git Activity)
RECENT CHANGES (Last 7 Days)
Commits by Category:
| Type | Count | Description |
|----------|-------|-------------------|
| feat | 12 | New features |
| fix | 8 | Bug fixes |
| refactor | 5 | Code improvements |
| docs | 3 | Documentation |
| test | 2 | Test additions |
Notable Commits:
1. bcb6bc90c feat(issues): Add colored CLI output and extended filtering
2. 38424db59 feat(aiad): Implement AIAD-enforced GitLab sync
3. bd9aa00a6 fix(osint): Email Intelligence rate-limited adapter fixes
Staged Changes (Not Committed):
- 16 staged files (presales app integration)
- 4 modified tracked files3. Session History
RECENT SESSIONS (Last 5)
1. 2025-12-13 - ARCHER SUPREME Orchestrator Self-Improvement
Mission: ML-enhanced LearningSystem for orchestration
Key Achievement: First AI meta-orchestration self-improvement
Deliverables: LearningSystem GenServer (500+ LOC)
2. 2025-12-13 - MCP Service Rock-Solid Completion
Mission: MCP service stability
Key Achievement: 100% service reliability via launchd
3. 2025-12-11 - ARCHER SUPREME Phase 3 Absolute Perfection
Mission: 100/100 quality score achievement
Key Achievement: LEGENDARY - First platform with perfect quality4. Recommendations
RECOMMENDED NEXT STEPS
High Priority:
1. Commit staged presales files - 16 files ready for commit
2. Run full test suite - Verify after recent LearningSystem changes
Medium Priority:
3. Update LATEST_SESSION.md - Current state not documented
4. Run /evolve - Propagate patterns from recent changes
Low Priority:
5. Review GitLab sync - Verify bidirectional sync working
6. Clean up memory files - Temporary files in root5. Interactive Selector
What would you like to do next?
[1] Commit staged presales changes (16 files ready)
[2] Run full test suite
[3] Execute /evolve for pattern propagation
[4] Continue previous session work
[5] Start new taskExecution Flow
PHASE 1: PLATFORM STATE ANALYSIS (10s)
|-- mix compile status (warnings count)
|-- mix quality.gates (quality score)
|-- mix test --dry-run (test count)
|-- mix credo --strict (violation count)
|-- File/agent/command counts via git ls-tree
|
PHASE 2: CHANGELOG DETECTION (5s)
|-- git log --oneline --since="N days ago"
|-- Categorize by conventional commit type
|-- Identify notable commits (significant changes)
|-- git status (staged/unstaged changes)
|
PHASE 3: SESSION CONTEXT LOADING (5s)
|-- ls -t .claude/session-context/*.md
|-- Parse top N session files
|-- Extract mission, achievements, deliverables
|-- Identify key decisions and patterns
|
PHASE 4: RECOMMENDATION ENGINE (5s)
|-- Analyze git status for uncommitted work
|-- Check for quality violations
|-- Review TODO items
|-- Cross-reference with session priorities
|-- Generate prioritized action list
|
PHASE 5: INTERACTIVE SELECTION (if --interactive)
|-- Present options via AskUserQuestion
|-- Parse user selection
|-- Execute selected actionIntegration Points
| Component | Relationship | Details |
|---|---|---|
| Prismatic Agents | Executed by session-debrief-specialist | Primary debrief agent |
| AIAD Registry | Command specification and discovery | Standard AIAD interface |
| Quality Gates | Platform state assessment | Gate results for scoring |
| Telemetry | Command execution metrics | Debrief event tracking |
| Git Integration | Changelog detection | git log, git status, git diff |
| Session Context | History loading | .claude/session-context/ files |
| AIAD Bootstrap | Auto-execution | Phase 6 (Activation) integration |
| AskUserQuestion | Interactive selection | User action selector tool |
Auto-Execution Protocol
The /debrief command is automatically executed at the start of every Claude Code session as part of the Automatic Startup Context Protocol defined in CLAUDE.md:
- Execute
mix autoheal.baseline - Check
.claude/session-context/for latest session - Load most recent session context
- Execute
/debrief(ormix autoevolve status --brief) - Display brief debrief (200-300 words)
- Recommend 3-5 next steps
- Wait for user directive
Best Practices
-
Use Full Debrief at Session Start: Always begin sessions with
/debrief fullfor complete situational awareness. The 30-second investment prevents much larger context-recovery costs. -
Check Changelog After Pulls: After pulling remote changes, run
/debrief changelogto understand what teammates have contributed since your last session. -
Use Interactive Mode for Decision Support: When unsure what to work on next,
/debrief suggestprovides prioritized recommendations based on platform state analysis. -
Review Session History for Continuity: Before continuing previous work, use
/debrief contextto review what was accomplished and what was planned as next steps. -
Quick Check Mid-Session: Use
/debrief quickfor rapid platform health verification without the overhead of full analysis. -
Save Session Context Before Ending: The debrief system is only as good as the session context it reads. Always save session context at session end.
Error Handling
| Error | Cause | Resolution |
|---|---|---|
NO_SESSION_FILES | No session context files found | Normal for first session |
GIT_LOG_EMPTY | No commits in specified timeframe | Increase --days parameter |
QUALITY_GATES_ERROR | Mix task compilation failure | Run mix compile first |
CONTEXT_PARSE_ERROR | Malformed session context file | Regenerate session context |
INTERACTIVE_UNAVAILABLE | AskUserQuestion tool not available | Use --interactive false |
Performance
| Metric | Value | Notes |
|---|---|---|
| Full Debrief | 25-45 seconds | All 5 phases |
| Quick Debrief | ~10 seconds | Platform state only |
| Changelog | ~15 seconds | Git analysis |
| Context Loading | ~15 seconds | Session file parsing |
| Interactive Selection | User-dependent | Awaits input |
Doctrine Compliance
All commands operate under the NO MERCY, NO DOUBTS doctrine:
- NO MERCY: Zero tolerance for context loss between sessions. Every session must begin with full situational awareness. Session context must be saved at session end without exception.
- NO DOUBTS: Full investigation of platform state before action. The debrief provides evidence-based situational awareness across five dimensions before any development work begins.
Related Commands
- /rebrief - Retrospective analysis of development activity across multiple sessions
- /session-compress - Advanced session context compression with multi-session pattern detection
- /session-track - Session tracking actions for GitLab integration and progress monitoring
- /check - Verification and integrity checking command
- /commit - Smart commit with quality gates and conventional format
- /chronic - Chronic documentation scan and technical hygiene maintenance
- /compress - Intelligent document compression with 4-level ratios
Connect & Contribute
Created by Tomáš Korcak (korczis) | Open Source under GHL