SuperAPIAI Directory

trailhead

github.com · AI coding

Runs a large project as a map of decision tickets on GitHub Issues, resolved one at a time via a discuss→plan→execute→verify engine with atomic commits, an optional cross-AI plan review, and throwaway UI prototypes. Works with Claude Code and Codex; needs only an authenticated gh CLI. Open source, f

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

trailhead is a project orchestration skill for coding agents, run from the same source on both Claude Code and Codex CLI. Its core idea is: put a large, vague idea onto GitHub Issues to form a map made of decision tickets, then resolve them one by one until the path to the destination is clear.

Purpose and positioning trailhead targets two pain points in agent-driven project work: first, "startup"—turning loose ideas into a shared decision map, with a visible frontier and "fog of war," where parts that are not yet clear enough to plan are explicitly marked; second, "execution"—using a reliable discuss→plan→execute→verify loop, atomic commits, and zero-friction capture to complete the actual build. trailhead unifies both onto the Issue Tracker, no longer using a local .planning/ directory; the repository stores only code, and the plan is always visible to all repository members.

Main capabilities • Organize projects as a map: the map is a GitHub Issue tagged trailhead:map, containing the Destination, standing Notes, Decisions made, what is not yet clear (fog), and Out of scope. • Ticket system: each ticket is a sub-Issue with a type label and a single-question body. The frontier is the set of tickets that are "open, unassigned, and have all blockers closed," i.e., the work that can currently be claimed. • Claiming is locking: assigning a ticket to yourself completes the claim; if a conflict occurs, it stops and asks rather than overwriting someone else's work. The claimer is responsible from start to finish and closes the ticket, with no separate approver. • One ticket per session: resolving one ticket ends the session, keeping work at a reviewable single-ticket granularity. • Concurrency isolation: the isolation convention defaults to auto, and at the start of each ticket asks whether you are handling multiple at the same time, then chooses git worktree (ordinary repositories) or a full clone (path-bound applications or repositories containing submodules, where worktree cannot isolate safely) based on the repository shape; non-overlapping Scope: lines can run in parallel, and only true overlap is serialized. • Pause, resume, split: any ticket can be paused with a checkpoint comment and resumed by someone else, or split into sub-tickets when it exceeds one session's capacity,and re-point the blocking relationship. • Multiple maps in parallel: one repository can carry multiple active maps (parallel milestones or features) at the same time, each with its own independent frontier. • External Issues and trust: Issues created by others are converted in place into tickets via the inbox while preserving the original author; a trust and provenance guard isolates Issues from untrusted sources bearing the trailhead:* label until a maintainer adopts them, backed by a repository-side label-guard workflow. • Built-in technical protocols: grilling, TDD, systematic debugging, codebase mapping, code review, etc. are all built in as inline protocols, and the core does not invoke other skills. Each engine technique is dispatched to Trailhead's own trailhead-* agents (trailhead-executor, trailhead-plan, trailhead-research, trailhead-code-review, trailhead-debug, trailhead-fix, trailhead-codebase-map, etc.), which are committed once as agents/trailhead-.md and then projected to each host (Codex generates ~/.codex/agents/trailhead-.toml). Agents are thin (identity + tool policy + config-driven model, with technical protocols injected at generation time) and run on the host's native subagent toolset (Claude Code's built-in Agent tool, or Codex's multi_agent toolset).

Repository-level anchor issues Knowledge that does not belong to a single map but belongs to the repository is placed in repository-level anchor issues, created once and shared by all maps: • trailhead:codebase: the distilled codebase map (architecture, tech stack, conventions, risks, tests/build), written once at adopt time and refreshed only on major drift. • trailhead:conventions: how the project works, readable by everyone; the machine-readable small header (git: main|pr, release: command|auto, isolation: auto|none|worktree|clone) is honored by the engine, with human text below. /trailhead:adopt and :new will ask in advanceit.

How to use Install as a Claude Code plugin (managed by /plugin); update with /plugin update trailhead, remove with /plugin uninstall trailhead. It can also be installed via npm into the agent configuration directory. On install it will: on Claude Code, copy skills (including references/), /trailhead:* commands, hooks (registered into settings.json, including a SessionStart update check), label-guard and status bar templates, executed idempotently; on Codex CLI (--codex), project a native skill invoked as $trailhead ($trailhead work, $trailhead new "idea", etc.), with one thin skill per verb for discoverability, six guards as native Codex hooks (~/.codex/hooks.json, requires features.hooks to be enabled; the four Bash guards share one process and a single registration; the search guard exists only in Claude Code and is not projected to Codex), and pin the per-technique subagent models from models.codex.* into ~/.codex/agents/. Codex requires 0.145.0+ (the installer checks codex --version). The artifacts prototype mode (Claude Code's Artifact tool) is unavailable on Codex; the cross-host design: stitch mode (Google Stitch MCP) is a hosted option on Codex, with local disk as fallback. After installation, restart or reload the agent, run /trailhead to enter the smart entry point, or use /trailhead:new "<idea>" to draw a map. On Codex the equivalents are $trailhead, $trailhead new "<idea>", or the per-verb $trailhead-<verb> skills. Note: after installation the commit guard hook runs on every git commit (enforcing Conventional Commits and blocking Co-Authored-By); if you do not want it, you can disDisable plugin hooks in ttings.

Applicable scenarios and limitations Applicable: an effort too large to complete in a single session and with open questions—such as a milestone (a release, a version, a v2 dashboard), or a feature that must be decided before it can be built (where the data goes, which library to use, what exactly the interface does). Not applicable: single, clearly defined work with no open questions that can be completed in one session—that is just a ticket, and you can build it directly with /trailhead:work. Rule of thumb: decisions to make or more than one sitting → map; "just do X" → single work. Limitations: requires an authenticated gh CLI and a GitHub repository; the npm path requires Node 18+; Codex requires 0.145.0+. trailhead has zero external plugin dependencies and is self-contained, but it does install hooks. All state for maps and tickets lives in GitHub Issues.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools