Skip to content

feat(council): Add file-first output and recovery mode#738

Closed
A13xSM wants to merge 2 commits intodanielmiessler:mainfrom
A13xSM:feature/council-file-output-recovery-v3
Closed

feat(council): Add file-first output and recovery mode#738
A13xSM wants to merge 2 commits intodanielmiessler:mainfrom
A13xSM:feature/council-file-output-recovery-v3

Conversation

@A13xSM
Copy link
Copy Markdown

@A13xSM A13xSM commented Feb 19, 2026

Summary

Adds resilient session state to Council debates, rebased from #567 to v3.0 paths.

  • File-First Output — Each round is written to ~/.claude/MEMORY/STATE/council-sessions/{session-id}/ as it completes, surviving context compaction and rate limits
  • Recovery Workflow — New Workflows/Recovery.md supports full and partial rerun modes for interrupted sessions
  • Session Archival — Completed debates archived to ~/.claude/MEMORY/RESEARCH/

What's NOT included (intentionally)

Per maintainer feedback on #567, this PR focuses on infrastructure resilience only. The following from #567 are excluded as separate concerns:

  • Adaptive rounds (separate behavioral change)
  • Model tiering (separate cost optimization)
  • Patchlist mode (filed as separate PR)
  • Config.md (not needed without the above)
  • Version bump / changelog (left to maintainers)

Files Changed

File Change
Releases/v3.0/.claude/skills/Council/SKILL.md Added recovery routing, resilience philosophy, recovery example
Releases/v3.0/.claude/skills/Council/Workflows/Debate.md Added session init (Step 0), file writes per round, archival step, interruption handling
Releases/v3.0/.claude/skills/Council/Workflows/Recovery.md New — Full and partial rerun modes with session ID validation

Test plan

  • Run a council debate and verify files written to ~/.claude/MEMORY/STATE/council-sessions/
  • Interrupt a session mid-round, then use Recovery workflow to resume
  • Verify archived output appears in ~/.claude/MEMORY/RESEARCH/

🤖 Generated with Claude Code

Adds resilient session state to Council debates. Each round is written
to ~/.claude/MEMORY/STATE/council-sessions/{session-id}/ as it completes,
enabling recovery from rate limits, timeouts, and context compaction.

New Recovery workflow supports full and partial rerun modes for
interrupted sessions.

Rebased from PR danielmiessler#567 (v2.5 paths) to v3.0 structure. Intentionally
excludes adaptive rounds, model tiering, patchlist mode, and Config.md
from the original PR as those are separate concerns.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds resilience infrastructure to the Council skill by persisting debate session state to disk, enabling recovery/resume workflows, and archiving completed transcripts for long-running sessions.

Changes:

  • Added a new Recovery workflow documenting full and partial rerun modes with session loading/validation guidance.
  • Updated the Debate workflow to initialize a session directory, write round outputs to disk, and archive the final transcript to ~/.claude/MEMORY/RESEARCH/.
  • Updated Council skill routing/docs to include the Recovery workflow and new resilience guidance.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.

File Description
Releases/v3.0/.claude/skills/Council/Workflows/Recovery.md New recovery workflow describing how to resume interrupted sessions from on-disk state.
Releases/v3.0/.claude/skills/Council/Workflows/Debate.md Adds session initialization, per-round file persistence, and final archival step for debates.
Releases/v3.0/.claude/skills/Council/SKILL.md Routes “recovery” requests to the new workflow and documents the resilience feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Releases/v3.0/.claude/skills/Council/SKILL.md Outdated
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Recovery.md
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Recovery.md Outdated
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Recovery.md Outdated
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Debate.md Outdated
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Debate.md Outdated
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Debate.md
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Debate.md Outdated
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Debate.md Outdated
Comment thread Releases/v3.0/.claude/skills/Council/Workflows/Debate.md Outdated
- Switch round file writes from echo to heredoc for multi-line safety
- Sanitize TOPIC_SLUG to strip path-unsafe characters (a-z0-9 and hyphens only)
- Restrict recovery to session IDs only (no arbitrary directory paths)
- Strengthen session ID validation with base directory constraint
- Document short form "Council recovery: ..." as alias for partial rerun
- Align recovery invocation syntax across SKILL.md, Debate.md, Recovery.md
@danielmiessler
Copy link
Copy Markdown
Owner

Thank you for the council file-first output and recovery mode work! This PR was rebased to v3.0 paths, which were restructured in v4.0.

If you'd like to contribute council improvements for the current architecture, please see Releases/v4.0.2 for the latest codebase and feel free to resubmit. The council skill still exists and these features (file-first output, session recovery) are good ideas. Thanks!

A13xSM added a commit to A13xSM/Personal_AI_Infrastructure that referenced this pull request Mar 2, 2026
Port file-first output and recovery features from v3.0 PR danielmiessler#738 to
v4.0.3 Council skill. Session state now persists to disk after each
round, enabling recovery from rate limits, timeouts, and context
compaction.

- SKILL.md: Add Recovery workflow routing, quick reference, resilience
  philosophy, and recovery example
- Debate.md: Add Step 0 session init, per-round file writes to
  ~/.claude/MEMORY/STATE/council-sessions/, Step 6 archival to
  MEMORY/RESEARCH/, and interruption handling section
- Recovery.md: New file with full/partial rerun modes, diff-only
  optimization, and error handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
A13xSM added a commit to A13xSM/Personal_AI_Infrastructure that referenced this pull request Mar 2, 2026
Port file-first output and recovery features from v3.0 PR danielmiessler#738 to
v4.0.3 Council skill. Session state now persists to disk after each
round, enabling recovery from rate limits, timeouts, and context
compaction.

- SKILL.md: Add Recovery workflow routing, quick reference, resilience
  philosophy, and recovery example
- Debate.md: Add Step 0 session init, per-round file writes to
  ~/.claude/MEMORY/STATE/council-sessions/, Step 6 archival to
  MEMORY/RESEARCH/, and interruption handling section
- Recovery.md: New file with full/partial rerun modes, diff-only
  optimization, and error handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants