Skip to content

feat(context-keeper): Add session context persistence power#122

Open
logesh4v wants to merge 1 commit into
kirodotdev:mainfrom
logesh4v:add-context-keeper-power
Open

feat(context-keeper): Add session context persistence power#122
logesh4v wants to merge 1 commit into
kirodotdev:mainfrom
logesh4v:add-context-keeper-power

Conversation

@logesh4v
Copy link
Copy Markdown

Summary

Adds Context Keeper — a Knowledge Base Power that preserves session context across Kiro chat windows using hooks and steering files.

What it does

  • Auto-captures structured session summaries on agentStop (7-section format: decisions, files modified, patterns, preferences, next steps)
  • Auto-restores prior context on promptSubmit (branch-aware, with fallback)
  • Manual snapshot and compression via userTriggered hooks
  • Persistent project memory that accumulates long-term knowledge across all sessions
  • Branch-scoped context — restores prefer same-branch summaries
  • 20-file rolling window with automatic cleanup

Structure

context-keeper/
├── POWER.md                        # Power metadata + onboarding
├── hooks/
│   ├── capture-context.kiro.hook   # agentStop → save session summary
│   ├── restore-context.kiro.hook   # promptSubmit → load prior context
│   ├── snapshot-context.kiro.hook  # userTriggered → manual save
│   └── compress-context.kiro.hook  # userTriggered → consolidate old summaries
└── steering/
    ├── capture-context.md
    ├── restore-context.md
    ├── snapshot-context.md
    ├── project-memory-update.md
    └── compress-context.md
  • Pattern C (Knowledge Base Power) — no MCP server
  • 4 hooks + 5 steering files
  • Zero external dependencies

Testing

Why this power?

Context loss between sessions is one of the most reported pain points for Kiro users (see issues #5479, #1279, #2431). This power solves it with zero configuration — install and forget.

Adds Context Keeper — a Knowledge Base Power that preserves session context across Kiro chat windows using hooks and steering files.

- Auto-captures structured session summaries on agentStop

- Auto-restores prior context on promptSubmit (branch-aware)

- Manual snapshot and compression via userTriggered hooks

- Maintains persistent project memory across all sessions

- Zero external dependencies, pure hooks + steering architecture
@github-actions
Copy link
Copy Markdown

Hi @logesh4v, thank you for your contribution!

Please note that if you haven't already, you would also need to submit your power officially at kiro.dev/powers/submit so it can be reviewed for listing in the Kiro powers registry.

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.

1 participant