Skip to content

Pixel-CLI/pixel / .agents/skills/pixel-retro

pixel-retro

Verified

Mine the last 24 h (or a given window) of pixel usage — every repo's `.pixel/actions.jsonl` plus the agent transcripts indexed by `pixel recall` (claude, codex, pi…) — for frictions pixel actually caused, verify each one against the current binary and code, and propose ranked, evidence-backed improvements (bug fix, error message, flag, agent prompt, rule, doc); for the pixel repo itself, also measure each pull request from first edit to validated CI and where agents sat idle (`lead_time.py`). Suggests only; implements nothing without the user's pick. Use when the user says "/pixel-retro", "retro pixel", "qu'est-ce qui a coincé avec pixel", "améliorations pixel depuis les transcripts", "pixel friction", "où l'agent attend", "bottleneck", "lead time", or asks what to improve in pixel or its development workflow from recent sessions.

FileKindSize
SKILL.mdskill md21.9 KB
adherence.pyscript18.3 KB
lead_time.pyscript22.7 KB
ledger.pyscript1.5 KB
roots.pyscript3.2 KB
slow.pyscript5.6 KB
test_adherence.pyscript9.6 KB
test_lead_time.pyscript17.4 KB
test_slow.pyscript2.4 KB
# SPDX-FileCopyrightText: The Pixel contributors
# SPDX-License-Identifier: MIT

"""Print the repository roots with a .pixel/actions.jsonl among the sessions of a window.

Usage: python3 roots.py <window>   (12h, 7d, 3w, or an ISO date)

`pixel recall sessions` caps --limit at 200, has no offset, filters
`ts_last >= since AND ts_first <= until` and orders by ts_last, so no page
cursor is exact. The window is cut into slices instead: a slice that returns
fewer than 200 sessions is complete, a full one is split in two. A session
spanning several slices is counted once (by id). A full slice whose sessions
all span it (halving cannot shrink it), or a spent query budget, ends the run with exit 1 and an
`incomplete:` line, after printing the roots found so far.
"""
import datetime, json, os, re, subprocess, sys

CAP = 200
UTC = datetime.timezone.utc


def parse_window(arg, now):
    m = re.fullmatch(r"(\d+)([hdw])", arg)
    if m:
        hours = {"h": 1, "d": 24, "w": 168}[m.group(2)] * int(m.group(1))
        return now - datetime.timedelta(hours=hours)
    start = datetime.datetime.fromisoformat(arg)
    return start if start.tzinfo else start.replace(tzinfo=UTC)


def sessions(since, until):
    cmd = ["pixel", "recall", "sessions", "--since", since.isoformat(),
           "--until", until.isoformat(), "--limit", str(CAP), "--subagents",
           "--json", "--metrics", "off"]
    out = subprocess.run(cmd, capture_output=True, text=True, check=True).stdout
    return json.loads(out)["sessions"]


BUDGET = 400  # recall queries; a real 30-day window needed 5


def collect(since, until, seen, incomplete, budget):
    if budget[0] <= 0:
        incomplete.append(since)
        return
    budget[0] -= 1
    page = sessions(since, until)
    seen.update((s["id"], s["cwd"]) for s in page)
    if len(page) < CAP:
        return
    # When every returned session spans the whole slice, both halves return
    # the same 200 again: splitting cannot make progress, so flag and stop.
    lo, hi = since.timestamp() * 1000, until.timestamp() * 1000
    spans_all = all(s["ts_first"] <= lo and s["ts_last"] >= hi for s in page)
    if spans_all or until - since <= datetime.timedelta(seconds=1):
        incomplete.append(since)
        return
    mid = since + (until - since) / 2
    collect(since, mid, seen, incomplete, budget)
    collect(mid, until, seen, incomplete, budget)


now = datetime.datetime.now(UTC)
seen, incomplete = set(), []
budget = [BUDGET]
collect(parse_window(sys.argv[1], now), now, seen, incomplete, budget)
roots = set()
for d in {cwd for _, cwd in seen}:
    r = subprocess.run(["git", "-C", d, "rev-parse", "--show-toplevel"],
                       capture_output=True, text=True)
    top = r.stdout.strip()
    if r.returncode == 0 and os.path.isfile(os.path.join(top, ".pixel", "actions.jsonl")):
        roots.add(top)
print(f"{len(seen)} sessions, {len({c for _, c in seen})} cwds", file=sys.stderr)
print(f"{BUDGET - budget[0]} recall queries", file=sys.stderr)
print("\n".join(sorted(roots)))
if incomplete:
    first = min(incomplete).isoformat()
    sys.exit(f"incomplete: {len(incomplete)} slice(s) still hold {CAP} sessions "
             f"(first at {first}); roots above may miss some repositories")
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: 469kUpdated 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