Skip to content

feat: add context-management skill with domain isolation#1571

Open
hanle1 wants to merge 1 commit into
obra:mainfrom
hanle1:feat/context-management
Open

feat: add context-management skill with domain isolation#1571
hanle1 wants to merge 1 commit into
obra:mainfrom
hanle1:feat/context-management

Conversation

@hanle1
Copy link
Copy Markdown

@hanle1 hanle1 commented May 17, 2026

What

Adds a new context-management skill for persistent context that survives across sessions.

Features

  • Init Flow: Auto-detects user identity (git config, cloud CLI, GitHub) and generates context.md
  • Add Flow: Creates per-project context files with keyword-based auto-loading
  • Load Flow: Loads global context every session, project context on keyword match
  • Maintenance: Update, prune, archive flows to keep context clean
  • Domain Isolation (advanced): Multi-context architecture for users with distinct roles (e.g., work + side projects + personal). Each domain gets its own sub-context file with session-locked isolation — no cross-domain leakage.

Background

I have been using this context management system daily for several months across 3 isolated domains (work, innovation, personal) on Copilot CLI. The domain isolation pattern emerged from a real need — I wanted work context (on-call runbooks, team info) to never leak into personal sessions, and vice versa. The keyword-based auto-loading and session-locked domains have been stable and practical in daily use.

Why this belongs in superpowers

Context management is one of the most common pain points with AI coding agents — every session starts from zero. This skill provides a structured, agent-agnostic approach that works across Claude Code, Copilot CLI, Cursor, and any tool that supports instruction files.

The domain isolation feature is unique — existing agent memory tools (AgentMemory, claude-memory-mcp, etc.) all use a single memory pool with no privacy-preserving domain separation.

Files

  • skills/context-management/SKILL.md — Full skill spec (init, add, load, update, prune, archive, domain isolation)
  • skills/context-management/templates.md — Global and project context templates

Add a new skill for persistent context that survives across sessions.

Key features:
- Auto-detect user identity and generate context.md
- Per-project context files with keyword-based auto-loading
- Domain isolation for users with multiple roles (work/side-projects/personal)
- Session-locked domains prevent cross-domain context leakage
- Maintenance flows: update, prune, archive with lesson extraction
- Templates for global, project, and domain router context files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

2 participants