Execute tracks

From JetBrains/youtrackdb · View interactive version

Execute tracks is an AI agent skill from the GitHub repository JetBrains/youtrackdb. Execute the implementation plan: autonomous plan review (Phase 2) on first invocation, then track-by-track execution (Phase A review + decomposition, Phase B implementation, Phase C code review). Use after /create-plan to implement the planned work.

How to use this skill

Skill file

Reading workflow files (TOC protocol)

When you Read any file under .claude/workflow/ or .claude/skills/, follow the protocol in conventions.md §1.8:

  1. Read the TOC region: from <!--Document index start--> to <!--Document index end--> (read to the closing delimiter, not a fixed line count). If the file has no TOC region (a file whose only ## heading is this bootstrap block carries none, per §1.8(d)), read the file in full.
  2. Match TOC rows where Roles contains any of your roles (or your role is any, or the row's Roles is any) AND Phases contains any of your phases (or your phase is any, or the row's Phases is any).
  3. Use Read(offset, limit) to read only matched sections; if no row matches your role/phase, the file holds nothing for you — do not read further.

Your role: orchestrator.

Your phase: determined by the auto-resume State in workflow.md § Startup Protocol.

Inline refs you find inside workflow files carry the same name:roles:phases suffix; apply file-level filtering before opening: a ref matches when any of your roles is in its roles and any of your phases is in its phases, your own any on either axis matches every ref on that axis, and a ref whose own roles or phases is any matches you. Backtick-wrapped refs carry no suffix; open or skip them at your discretion.

Read and follow the workflow for Phase 3 (Execution).

House style for chat-scale prose. User-facing prose produced from this file (status updates, escalation prompts, replanning summaries, review-mode loop turns, handoff notes, whichever apply) follows the AI-tell subset of house-style.md: ## Banned sentence patterns, ## Banned analysis patterns, ## Orientation, and ## Plain language. Structural rules (§ BLUF lead, § Structural rules for the ≤200-word section cap, § Document-shape rules (design / ADR-specific)) do not apply to chat-scale prose. See conventions.md:orchestrator:2,3A,3B,3C,4 §1.5 for the workflow-level anchor and tier mapping.

Read these workflow documents in order before starting:

  1. .claude/workflow/conventions.md — shared formats,

glossary, plan file structure, scope indicators, review iteration protocol

  1. .claude/workflow/conventions-execution.md — execution-specific:

episode formats, commit format, code review, complexity tiers,

checklist decomposition rules, track file content

  1. .claude/workflow/workflow.md — session lifecycle,

startup protocol (auto-resume), Track Pre-Flight gate, cross-track

impact monitoring, session boundary rules, failure handling, inline

replanning (ESCALATE), track completion protocol

After determining which phase to execute, load the phase-specific document:

(also load design-document-rules.md — Phase 4 writes design-final.md)

Do NOT load phase documents you won't use this session. Prompt files

(in .claude/workflow/prompts/) are read only when spawning the specific

sub-agent that needs them — create-final-design.md is the one exception

because Phase 4 is main-agent work rather than a sub-agent spawn.

implementation-review.md is loaded only when State 0 fires; non-

State-0 sessions never read it.

On-demand reference documents (load only when the situation arises):

Plan directory name: if "$ARGUMENTS" is non-empty, use it as the directory

name. Otherwise, default to the current git branch name

(git branch --show-current).

The implementation plan is at:

docs/adr/<dir-name>/_workflow/implementation-plan.md

(every workflow file lives under _workflow/; the directory is

removed in the Phase 4 cleanup commit before merge — see

conventions.md §1.2 and workflow.md § Final Artifacts).

Run the startup protocol in workflow.md:orchestrator:2,3A,3B,3C,4

§ Startup Protocol (Auto-Resume). That section is the single

detection-and-routing home: it runs

.claude/scripts/workflow-startup-precheck.sh --mode full once at

turn 1 and routes on its JSON over branch divergence, workflow-SHA

drift (and the one autonomous normalization commit), pending

handoffs, and the resume state (the state.phase / state.substate

routing for State 0 / A / C / D / Done). Follow that dispatch

verbatim — do not re-derive the gates or the state routing here.

The phase-doc-loading map above and the self-improvement-reflection

step below are this SKILL's own additions on top of that protocol.

Once the protocol resolves a resume state, inform the user of the

decision (override allowed; by default proceed without confirmation),

then load the phase-specific workflow document from the map above and

execute that one phase only.

Each session handles exactly ONE PHASE of one track (or Phase 4 / State 0):

User interaction happens at specific points:

Everything within a phase executes autonomously: Phase A runs reviews

(as sub-agents), decomposes steps, and assigns each step a risk tag

(low / medium / high) per risk-tagging.md. Phase B implements

steps and produces episodes; the step-level dimensional review loop

(the step-level baseline review-bugs always, plus review-concurrency

when the concurrency category is present, subject to the

baseline-skip override, plus conditional agents and the step-level

workflow reviewers hook-safety/prompt-design; full rules in

review-agent-selection.md §Step-level vs track-level routing) fires

only on steps tagged

risk: high —

medium and low steps proceed directly from commit to episode,

relying on tests plus the always-on track-level review. Phase C runs

track-level dimensional review (same selection rules) against the

cumulative track diff and treats medium and high step ranges as

focal points.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.