Skip to content

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

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

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>
@obra obra added enhancement New feature or request skills Skill system, development, and individual skills no-obvious-human-review Submission shows no evidence of human review needs-rebase-to-dev-branch PR targets main but should target dev labels May 23, 2026
@obra
Copy link
Copy Markdown
Owner

obra commented May 23, 2026

Closing — this doesn't seem like a fit for core Superpowers.

Thank you for the honest first-person writeup; the multi-domain isolation pattern is interesting. But the skill as designed is shaped around your specific multi-domain workflow ("work + side projects + personal", session-locked domain selection, keyword-based auto-loading of per-project context files). That's a configuration system, not a general-purpose skill that benefits all Superpowers users regardless of project.

Skills for specific domains, specific tools, or specific workflows belong in their own standalone plugin. Ask yourself: "Would this be useful to someone working on a completely different kind of project than yours?" If not, publish it separately.

This would make a great standalone plugin (e.g. context-management) — you can publish it to the marketplace and users who want this exact workflow can install it alongside Superpowers. The plugin development docs explain how. Cross-session memory is a real problem; I just don't think the answer belongs in core.

@obra obra closed this May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-rebase-to-dev-branch PR targets main but should target dev no-obvious-human-review Submission shows no evidence of human review skills Skill system, development, and individual skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants