Files
NowChess-Frontend/.claude/commands/estimate-issues.md
T
Janis Eccarius a65d748f99 chore(claude): add YouTrack command suite
Port create-defect, create-story, estimate-issues, fix-defect,
implement-feature and split-story commands, adapted for the Angular
frontend (npm build/test, prettier gates, NCWF routing).
implement-feature now walks subtasks, respects blocked-by, and reports
cross-project (NCS/NCI) tasks. Ignore .claude/worktrees.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 14:33:07 +02:00

3.7 KiB
Raw Blame History

Estimate Issue Time in YouTrack

Sprint planning time estimator. Issue ID or empty for full current sprint: $ARGUMENTS

This is the NowChess-Frontend repo. Sprint mode defaults to project NCWF.

Step 1 — Determine Scope

Single-issue mode ($ARGUMENTS set):

  • Call mcp__youtrack__get_issue on $ARGUMENTS.
  • Proceed with that issue only.

Sprint mode ($ARGUMENTS empty):

  • Call mcp__youtrack__search_issues with query project: NCWF Sprints: {current sprint} #Unresolved.
  • If query returns 0 results, use AskUserQuestion to ask for the sprint name, then retry with project: NCWF Sprints: {name}.
  • Collect all returned issues.

Step 2 — Build Issue Tree

For each top-level issue from Step 1:

  1. Fetch full details via mcp__youtrack__get_issue: summary, description, acceptance criteria, Type, existing Zeitschätzung, linked issues.
  2. Identify subtasks from links with relation subtask of (i.e. issues where the fetched issue is the parent).
  3. Recursively fetch subtasks until all leaves are known.
  4. Group into tree: Epic → Story → Task/Subtask.

Leaf node = issue with no subtask children. Parent node = issue that has at least one subtask child.

Step 3 — Estimate Leaf Nodes

For each leaf node:

  1. Read: summary, description, acceptance criteria, implementation notes.
  2. If scope is unclear, search codebase (Grep/Bash) under src/app/ for related files to gauge complexity.
  3. Assign estimate using this scale:
Size Criteria Estimate
Trivial Style tweak, copy change, 1-file tweak 30m
Small 13 files, single component/service, no unknowns 1h2h
Medium 36 files, new component + service wiring, some design 3h5h
Large 6+ files, cross-feature, non-trivial state/routing 1d2d
XL New feature area, major refactor, research spike 3d5d
  1. Record: estimate + one-line reasoning.
  2. Skip leaf if it already has Zeitschätzung set — note it as pre-estimated.

Step 4 — Roll Up for Display

YouTrack auto-sums Zeitschätzung from subtasks up to parents — do not write estimates to parent nodes.

Compute display-only rolled-up totals:

  • Parent total = sum of all descendant leaf estimates (including pre-estimated ones).
  • Flag any branch where some leaves are missing estimates (partial roll-up).

Step 5 — Show Summary + Confirm

Display full tree with estimates. Format:

Epic  NCWF-10: Board UI overhaul             [4h 30m]  ← rolled up
  Story NCWF-11: Drag-and-drop pieces        [2h 30m]  ← rolled up
    Task  NCWF-12: Add drag directive          1h 30m   ← leaf (new)
    Task  NCWF-13: Add component specs          1h       ← leaf (new)
  Story NCWF-14: Move-list panel             [2h]      ← rolled up
    Task  NCWF-15: Render SAN move list        2h       ← leaf (pre-set, skipped)

Legend: [X] = display-only roll-up (not written). Plain = will be written to YouTrack.

If sprint mode, show grand total at bottom:

Sprint total: Xd Yh Zm  (N issues, M leaves to update)

Use AskUserQuestion tool:

  • Does the breakdown look right?
  • Any estimates to adjust before writing to YouTrack?

Incorporate all feedback before proceeding.

Step 6 — Write Estimates

On user approval, write estimates only to leaf nodes (bottom-up order):

  • For each leaf with a new estimate, call mcp__youtrack__update_issue with field Zeitschätzung = approved estimate.
  • YouTrack period format: "30m", "1h 30m", "1d", "2d 4h".
  • Skip leaves already pre-estimated.

Step 7 — Report

List all updated issues with set estimates. Show final rolled-up totals per Epic/Story (read back from YouTrack via mcp__youtrack__get_issue if needed). In sprint mode, show total sprint estimate.