Skip to content

実装: DoR (Definition of Ready) 基準を docs/dev/dor.md に明文化する (A1) #72

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: 40
goal_ref: "AI Agent が着手可能と判定するための Definition of Ready (DoR) 基準を docs/dev/dor.md に明文化し、issue-contract-review からの参照を可能にする"
change_kind: docs
allowed_paths:
  - docs/dev/dor.md
  - .claude/skills/issue-contract-review/SKILL.md
acceptance_criteria_count: 4
verification_kind: deterministic

Parent Issue

#40

Parent Goal Ref

  • Goal: GitHub マイルストーン運用(DoR 基準 / state ラベル体系 / Plan Mode スキップルール)をエージェントスキルへ統合し、AI が自律的にマイルストーン進捗を判定・操作できる基盤を整備する
  • Desired Destination: docs/dev/dor.md に DoR 基準が明文化され、issue-contract-review skill がそれを参照している

Current Validated Scope

  • docs/dev/dor.md の新規作成(Implementation Issue の DoR 必須項目定義)
  • .claude/skills/issue-contract-review/SKILL.md への docs/dev/dor.md 参照リンク追加

Remaining Parent Gaps

  • A2: state ラベル体系再定義(state/queued vs state/ready 役割分担)
  • A3: Plan Mode スキップルール策定(.claude/rules/project-constitution.md 更新)
  • B 系(playable outcome milestone, MVP 実装 Issue)は別 parent issue として管理

Outcome

docs/dev/dor.md が新規作成され、Implementation Issue の「AI 着手可能」判定基準(Outcome / AC / VC / Allowed Paths / Stop Conditions / Required Skills の完備条件)が機械可読な形で明文化されている。issue-contract-review SKILL.md から docs/dev/dor.md への参照リンクが追加され、将来 DoR チェック logic を組み込む差し込み口が明示されている。

In Scope

  • docs/dev/dor.md の新規作成
  • .claude/skills/issue-contract-review/SKILL.md への docs/dev/dor.md 参照リンク追加(チェック項目への対応関係を明記)

Out of Scope

  • issue-contract-review の判定 logic 実装(A1 完了後の follow-up Issue で扱う)
  • state ラベル運用との連携(A2 のスコープ)
  • Plan Mode スキップ条件(A3 のスコープ)

Acceptance Criteria

  • AC1: docs/dev/dor.md が新規作成され、Implementation Issue の DoR 必須項目(Outcome / Acceptance Criteria / Verification Commands / Allowed Paths / Stop Conditions / Required Skills)が定義されている
  • AC2: 各 DoR 項目に「機械判定可能な条件」と「人間判断が必要な条件」が分離記述されている
  • AC3: .claude/skills/issue-contract-review/SKILL.md に docs/dev/dor.md への参照リンクが追加されている
  • AC4: ChatGPT 回答 (導入: Issue contract / DoR / dependency 判定による AI 実装前提基盤の整備 (parent) #40 issuecomment-4489127733) の引用元(GitHub Docs / Anthropic engineering blog / Qiita / 知乎)のうち、docs/dev/dor.md で根拠として引用するものは URL と引用日を明記している

Verification Commands

# AC1
test -f docs/dev/dor.md
grep -E '^##\s+(Outcome|Acceptance Criteria|Verification Commands|Allowed Paths|Stop Conditions|Required Skills)' docs/dev/dor.md

# AC2
grep -E '機械判定|人間判断' docs/dev/dor.md

# AC3
grep -E 'docs/dev/dor\.md' .claude/skills/issue-contract-review/SKILL.md

# AC4
grep -E 'https?://' docs/dev/dor.md

# Standard gates
pnpm typecheck
pnpm lint
pnpm test
pnpm build

Allowed Paths

  • docs/dev/dor.md
  • .claude/skills/issue-contract-review/SKILL.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • docs/dev/dor.md 内容が既存 issue-contract-review SKILL.md の C1-C8 と矛盾する記述になりそうな場合は停止し、ADR を起こす
  • DoR 項目を増やしすぎて「実装着手の摩擦」になりそうな場合は人間判断へエスカレート
  • state/ready ラベル運用への参照を追加する必要が出た場合は A2 完了待ち(本 Issue では言及のみ)
  • Plan Mode スキップ条件への言及が必要になった場合は A3 完了待ち
  • issue-contract-review の判定 logic を本 PR で変更しそうになった場合は停止(Out of Scope)
  • AC が docs/dev/dor.md の存在確認以外の機能テストを要求し始めた場合は仕様分離が崩れているので人間判断へ

Required Skills

なし

Scope Delta(任意)

N/A

Delivery Rule

Refs #40

Activity

  1. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    create-issue transaction partial-failure

    Issue: #72
    Failure stage: label-apply
    Message: label-apply failed

    Requested:

    Failure context: command=gh issue edit --repo squne121/loop-protocol 72 --add-label enhancement,phase/docs,state/queued
    output=failed to update #72: 'phase/docs' not found
    failed to update 1 issue
    matching_issue_numbers=[72]
    issue_number=72

    Recovery hint: stage 'label-apply' encountered an unexpected failure.
    Generic guidance: verify the issue state manually and re-run the transaction if safe.
    gh issue view 72 --repo squne121/loop-protocol --json number,title,labels,state
    idempotent re-run: depends on the specific failure

    Please recover deterministically before re-running the create issue transaction.

  2. added
    enhancement
    state/queued
    phase/implementation
    on May 19, 2026
  3. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-20T00:00:00Z)

    • Outcome: docs/dev/dor.md 新規作成 + issue-contract-review SKILL.md からの参照リンク追加
    • Acceptance Criteria:
      • AC1: DoR 必須項目(Outcome / AC / VC / Allowed Paths / Stop Conditions / Required Skills)が定義
      • AC2: 「機械判定可能」/「人間判断が必要」の分離記述
      • AC3: SKILL.md に docs/dev/dor.md 参照リンク
      • AC4: 引用元 URL と引用日の明記
    • Verification Commands: test -f / grep -E × 4 + 標準ゲート (pnpm typecheck/lint/test/build)
    • Allowed Paths:
      • docs/dev/dor.md
      • .claude/skills/issue-contract-review/SKILL.md
    • Worktree: .claude/worktrees/issue-72-dor-spec
    • Branch: worktree-issue-72-dor-spec
    • VC preflight: baseline fail = 4, 想定外 pass = 0, 実行不可 = 0

    CONTRACT_REVIEW_RESULT_V1

    status: go
    checks:
      template_compliance: pass
      state_label: pass
      allowed_paths_present: pass
      vc_present: pass
      stop_conditions_complete: pass
      vc_preflight:
        passed: true
        vc_failed_as_expected: 4
        vc_passed_unexpectedly: 0
        vc_unrunnable: 0
      ac_verifiability: pass
      worktree_branch_collision: clear
    next_action: implement_issue
    blocked_reasons: []
    warnings:
      - "Allowed Paths が `.claude/skills/issue-contract-review/SKILL.md` を含むため、同ファイルを Allowed Paths とする他 Issue (#43) と並行作業時はマージコンフリクトに注意(Delivery Rule で直列化を推奨済み)"
  4. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-20T07:16:45Z)

    • PR: docs: add DoR baseline to docs/dev/dor.md (#72) #80
    • Worktree: .claude/worktrees/issue-72-dor-spec
    • Branch: worktree-issue-72-dor-spec
    • Verification: 4/4 AC PASS + 標準ゲート全 PASS (typecheck / lint / test 5件 / build / pytest 21件)
    • Allowed Paths 準拠: true

    AC 検証結果

    AC コマンド 結果
    AC1 test -f docs/dev/dor.md + 6 section grep PASS
    AC2 grep -E '機械判定|人間判断' PASS
    AC3 grep -E 'docs/dev/dor\.md' SKILL.md PASS
    AC4 grep -E 'https?://' (4 URL) PASS

    後続

    PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup

  5. squne121 commented on May 19, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-05-20)

    工程

    Step SubAgent 結果
    0: contract preflight (main) issue-contract-review go (VC baseline fail × 4, worktree clear)
    1: implementation implementation-worker dor.md 新規 + SKILL.md 参照追加 / Draft PR #80
    2: verification test-runner AC1-4 PASS / typecheck・lint・test・build・pytest PASS / MERGEABLE CLEAN
    4: PR review pr-reviewer (pr-review-judge) APPROVE (verdict コメント記録済み)
    5: termination (main) PR Ready for Review + 改善メモ PR 本文へ追記

    観察された改善候補(PR 本文に詳細記載)

    ID 対象 種別 本 PR で fix
    NOTE-1 dor.md 対応表 軽微 fix 候補 人間判断
    NOTE-2 dor.md frontmatter 軽微 fix 候補 人間判断
    NOTE-3 pr-review-judge SKILL.md workflow improvement follow-up Issue 候補
    NOTE-4 impl-review-loop SKILL.md / test-runner agent workflow improvement follow-up Issue 候補
    NOTE-5 dor.md AC4 ガイドライン化 guideline dor.md 追記 or follow-up
    NOTE-6 create_issue_txn.py readback 既追跡 Issue #79
    NOTE-7 #43 と SKILL.md Allowed Paths 重複 順序考慮 Delivery Rule 済

    Next Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementphase/implementationstate/queued

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions