Skip to content

yeaight7/agent-powerups / plugins/codebase-intelligence/skills/managed-codebase-context

managed-codebase-context

Verified

Use when connecting to a managed codebase-context MCP/session service, checking stale maps, or safely using MCP-provided repository context.

Managed Codebase Context

When to use

Use when a persistent codebase-context MCP server is available and the task requires broad architectural context, symbol inventory, or cross-file navigation that would be expensive to reconstruct from scratch on each turn.

Requirements / Checks

  • Check MCP transport type: stdio (local, one-off) vs HTTP (requires a running server).
  • Do not run npx -y or start server processes without user approval.
  • Verify server cwd, env variables, timeout, and workspace path scope.
  • Confirm cleanup behavior for spawned stdio processes before starting long-running tasks.

Workflow

  1. Select transport:

    • stdio: suitable for local, ephemeral sessions started per task.
    • HTTP: use only when a local server is already confirmed to be running.
  2. Connect with timeout — set a connection timeout; do not let the agent hang indefinitely if the server never initializes.

  3. Retrieve context — fetch the current codebase map, symbol index, or architectural summary as available.

  4. Validate freshness — a map is stale if any of the following are true:

    • Map timestamp predates the last git commit that touched relevant files.
    • Map references files that no longer exist.
    • Map is missing files present in the current workspace.
    • The user reports recent significant refactoring.
  5. Refresh when stale — trigger a context refresh only when the map is demonstrably stale. Do not refresh on every request — refreshes are expensive.

  6. Use context, then close — read what you need, then close the session. Ensure the client and transport close cleanly. If the server was spawned as a stdio process, kill the process tree if it does not exit within a few seconds.

Staleness Signals

SignalCheck
Map timestampCompare to git log --format="%ci" -1 for recently changed files
Missing filesCross-reference map file list with git ls-files
Stale symbolsCheck if key function/class names in the map exist in current source
User-reportedAccept the user's word; trigger refresh without verification

Safety Constraints

  • Only interact with paths scoped to the current workspace.
  • Do not overwrite existing architectural documents without user confirmation.
  • Do not import user-level or global MCP configs implicitly.
  • Do not leave background server processes running after a failed connection.

Validation / Done Criteria

  • Context retrieved is confirmed to be within the current workspace scope.
  • Freshness was validated or a refresh was triggered with reason.
  • Any spawned MCP process is closed or explicitly left running by user choice.

References

  • references/managed-session-checklist.md
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 468kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 321kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 321kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 321kUpdated Claude CodeCodexVerifiedInstall