issue-size-estimation

takemo101's avatarfrom takemo101

Issue粒度判定とコード行数見積もりの基準、サイズラベル、分割判定ロジックを定義

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill optimizes software development workflows by defining standardized criteria for issue granularity and code volume estimation. It provides a systematic logic for calculating expected lines of code, assigning size labels (from XS to XL), and determining when complex tasks should be decomposed into smaller subtasks. By enforcing a 200-line implementation limit, it ensures that coding tasks remain manageable, testable, and compatible with AI-driven development cycles.

Use Cases

  • Automated Issue Triage: Automatically analyze new feature requests or bug reports to assign size labels based on keywords and architectural impact.
  • Workflow Guardrails: Prevent implementation failures by identifying 'Large' or 'Extra Large' issues that exceed the 200-line threshold and triggering a decomposition process.
  • Development Planning: Estimate the technical debt and effort required for a sprint by evaluating the complexity and single-responsibility status of assigned issues.
  • AI Agent Optimization: Provide clear logic for agentic workflows to decide whether to proceed with direct implementation (/implement-issues) or subtask breakdown (/decompose-issue).
nameissue-size-estimation
descriptionIssue粒度判定とコード行数見積もりの基準、サイズラベル、分割判定ロジックを定義

Issue粒度判定 & コード行数見積もり

参照元: implement-issues.md から分離されたIssue粒度判定ロジック


概要

/implement-issues は200行以下のIssueを対象とする。 大きなIssueは事前に /decompose-issue で分解してから実行すること。


粒度判定基準

粒度 対応コマンド
200行以下 /implement-issues で直接実装
200行超 /decompose-issue で分割してから実装
新規設計 /detailed-design-workflow で設計時に適切な粒度でIssue作成

粒度ルール

項目 基準
コード量 200行以下
ファイル数 1-3ファイル
責務 単一責務(1つの機能・1つの目的)
テスト可能性 独立してテスト可能
所要時間目安 10-15分で実装完了

サイズラベル

プロジェクトで以下のラベルを使用することを推奨:

ラベル 目安行数 対応
size/xs ~50行 直接実装
size/s ~100行 直接実装
size/m ~200行 直接実装(境界)
size/l ~400行 要分割
size/xl ~800行以上 要分割

行数見積もり方法

優先順位:

  1. Issue labelsから推定(size/* ラベル)
  2. 設計書のコードブロックから推定
  3. Issueタイトル・本文のキーワードから推定

キーワードベース推定:

キーワード 推定行数
fix ~50行
update ~80行
add ~100行
refactor ~150行
create ~150行
implement ~200行

分割判定

def should_decompose(issue_id: int) -> bool:
    """分割が必要かどうか判定"""
    estimated = estimate_code_lines(issue_id)
    return estimated > 200

大きなIssueを見つけた場合

# 1. まず分解コマンドを実行
/decompose-issue 8

# 2. 作成されたSubtaskを実装
/implement-issues 25 26 27

リトライポリシー

条件 アクション
Issue失敗(1-2回目) 同一環境でリトライ
Issue失敗(3回目) Draft PRを作成、ユーザーに報告
複数Issue並列時 失敗したIssueのみ報告、他は継続