levi-qiao/longgraph-skill / skills/loop-graph
loop-graph
FlaggedUse only when the user explicitly invokes /loop-graph or names this skill. Compiles a custom loop-graph run. Do not use unless named. Existing runtime nodes are self-contained.
examples/add-tests-to-cli/README.md
View on GitHub# Example: harden a CLI's date parser
A fully worked, **generic** example — no real project, no secrets. It shows what loop-graph generates from an interview and what the ledger looks like a few rounds in.
## The scenario
`taskcat` is a fictional to-do CLI. Its natural-language date parser (`"next fri"`, `"in 3 days"`, `"2026-07-31"`) is the buggy, under-tested part. The goal:
> Bring `taskcat`'s date parser to green: a test for every documented input form, all passing, no regressions elsewhere.
Single goal, no milestones. The user authorized **local commits** (no push), and wanted the **supervisor node** every 30 minutes.
## What the interview produced
- **Repo/branch:** `taskcat` on `feature/date-parser-tests`. Never touch `main`.
- **North Star:** every input form in `docs/date-formats.md` has a passing test; `pytest` green; no other suite regresses.
- **Gate:** `pytest -q` (full) and `pytest tests/test_dates.py -q` (narrow).
- **Red lines:** no push; no reformatting untouched code; a change that reddens any previously-green test is reverted the same round.
- **Commit auth:** executor implements + verifies; the supervisor node commits clean green rounds locally.
- **Supervisor:** yes, every 30 min — a fresh clean context each tick.
The generated `executor.md` and `ledger.md` are in this folder (in a real run they'd land in `.longgraph/<date-slug>/` at the repo root — they sit here for readability). The ledger shows three rounds already run — including a **register-then-defer** in Round 2 (a timezone bug found while writing a test, logged as `GAP-002` instead of fixed on the spot) and that gap being picked up in Round 3.
## The point
Notice what the executor *didn't* do: it didn't add a config system for date formats, didn't refactor the parser "while it was in there", and didn't fix the timezone bug the instant it saw it. It logged it, finished the item in front of it, and scheduled the fix. That restraint is the whole game — and the clean-context supervisor node is what would catch it if the executor ever forgot.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 469k | Updated | Claude CodeCodex | Verified | Install |
| 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: 321k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |