Skip to content

code-yeongyu/oh-my-openagent / packages/shared-skills/skills/coding-agent-sessions

coding-agent-sessions

Verified

Finds, reads, and reconstructs coding-agent sessions across Codex, Claude, OpenCode, OMO/Senpi, and other local agent logs. Use when asked to find or search past sessions, transcripts, or subagent runs, or to recover what an earlier session did.

scripts/agent_sessions/pi_family.py

View on GitHub
from __future__ import annotations

from pathlib import Path

from .transcript import env_path, existing, jsonl_parallel, recent, stem_id
from .types import Session

SENPI_CONFIG_DIRS = (".omo", ".senpi", ".pi")
OH_MY_PI_CONFIG_DIRS = (".omp",)
GAJAE_CODE_CONFIG_DIRS = (".gjc",)

__all__ = ["scan_gajae_code", "scan_oh_my_pi", "scan_senpi"]


def scan_senpi(extra_roots: tuple[Path, ...], workers: int) -> list[Session]:
    return _scan_pi_family("senpi", SENPI_CONFIG_DIRS, "senpi", extra_roots, workers)


def scan_oh_my_pi(extra_roots: tuple[Path, ...], workers: int) -> list[Session]:
    return _scan_pi_family("oh-my-pi", OH_MY_PI_CONFIG_DIRS, "omp", extra_roots, workers)


def scan_gajae_code(extra_roots: tuple[Path, ...], workers: int) -> list[Session]:
    return _scan_pi_family("gajae-code", GAJAE_CODE_CONFIG_DIRS, "gjc", extra_roots, workers)


def _scan_pi_family(platform: str, config_dirs: tuple[str, ...], xdg_app: str, extra_roots: tuple[Path, ...], workers: int) -> list[Session]:
    roots = _pi_family_roots(config_dirs, xdg_app, extra_roots)
    paths = [path for root in roots for path in (root / "sessions").rglob("*.jsonl")]
    return jsonl_parallel(recent(paths), workers, platform, lambda path: stem_id(path, "_"))


def _pi_family_roots(config_dirs: tuple[str, ...], xdg_app: str, extra_roots: tuple[Path, ...]) -> list[Path]:
    home = Path.home()
    roots: list[Path] = []
    for config_dir in config_dirs:
        base = home / config_dir
        roots.append(base / "agent")
        roots.extend(sorted(base.glob("profiles/*/agent")))
    xdg_data = env_path("XDG_DATA_HOME")
    if xdg_data is not None:
        app_root = xdg_data / xdg_app
        roots.append(app_root)
        roots.extend(sorted(app_root.glob("profiles/*")))
    roots.extend(extra_roots)
    return existing(roots)
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: 471kUpdated 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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated 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: 322kUpdated Claude CodeCodexVerifiedInstall