Repository navigation
docs(policies): replace three session policies with one falsifiable spec - #308
Merged
Merged
Conversation
The three superseded policies described a system that was never built. Between them they named fourteen scripts -- session-loader.py, auto-save-session.py, session-auto-save-daemon.py, archive-old-sessions.py, session-chain-manager.py, clear-session-handler.py and others -- none of which existed on disk. The real implementation was a different shape entirely: an MCP server and a LangGraph node. Because the spec and the code never described the same system, drift between them was undetectable by construction. Every defect found in the 2026-08 audit was downstream of that. The replacement is written to be falsifiable. Section 7 names real module paths and marks each one's status, so a reader can check the claim rather than trust it, and invariant I6 makes keeping that section honest a rule rather than a courtesy: a component named there must exist at the stated path, or be explicitly marked planned with the phase that delivers it. Also removes the git coupling. session-memory-policy.md carried an entire Git Auto-Commit Integration section that ran git add -A / commit / push from the session layer, and a session schema with repos_committed and commit_hashes fields. Section 3 now makes that a hard architectural boundary, while permitting one-way inbound metadata (issue_id, agent_id, failure reasons) so that "which agent failed in which session" stays answerable without the coupling. 1,876 lines -> 232. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces
session-chaining-policy.md,session-memory-policy.mdandsession-pruning-policy.md(1,876 lines) with a singledocs/policies/session-management-policy.md(204 lines).Why
The three superseded policies described a system that was never built. Between them they named fourteen scripts —
session-loader.py,auto-save-session.py,session-auto-save-daemon.py,archive-old-sessions.py,session-chain-manager.py,clear-session-handler.pyand others. None existed on disk. The real implementation was a different shape entirely: an MCP server and a LangGraph node.Because the spec and the code never described the same system, drift between them was undetectable by construction. Every defect found in the 2026-08 session-management audit was downstream of that.
The replacement is falsifiable by design
Git decoupling
session-memory-policy.mdcarried an entireGit Auto-Commit Integrationsection that rangit add -A/commit/pushfrom the session layer, plusrepos_committedandcommit_hashesschema fields.§3 now makes that a hard architectural boundary — the session layer may never import or call git, GitHub, PR or Jira. One direction remains permitted: the SDLC layer MAY write opaque, inbound, one-way metadata (
issue_id,agent_id, failure reasons) into the session store, which keeps "which agent failed in which session?" answerable without the coupling.Also recorded
Two findings from the audit that constrain any future work in this area:
scripts/tools/create_mcp_repos.pyis destructive — it overwritesserver.pyand replacesbase/in existing repos. All 13 target repos have evolved past their generated state (75 commits, ~29 merged PRs). It must not be run until it is made non-destructive.Scope
Documentation only. No code changes, no behaviour changes. This is Phase 0 of the session-management remediation; the implementation phases follow separately.
🤖 Generated with Claude Code