Skip to content

実装: ssot-discovery 出力に SSOT lifecycle status (draft/accepted) を含める #405

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "ssot-discovery の出力に SSOT lifecycle status (draft/accepted) を含め、draft spec を normative source として誤読しない構造にする"
change_kind: workflow

Parent Issue

なし(単独改善 / PR #400 の post-merge follow-up)

Parent Goal Ref

  • Goal: ssot-discovery skill 出力で SSOT の lifecycle status を提示し、AI agent が draft spec を accepted 同等の implementation normative source と誤読しないようにする
  • Desired Destination: .claude/skills/ssot-discovery/ 配下のみ(docs/ 側の status 表記は PR docs: add MVP scope product spec #400 で対応済み)

Current Validated Scope

  • .claude/skills/ssot-discovery/scripts/match-ssot.sh が docs/dev/ssot-registry.md の各エントリから status:(および同等のライフサイクル指標)を抽出する
  • .claude/skills/ssot-discovery/references/output-contract.md の SSOT_DISCOVERY_RESULT_V1.matched_documents[*] schema に lifecycle_status フィールドを追加する(enum: draft / accepted / unknown)
  • .claude/skills/ssot-discovery/SKILL.md に「draft の SSOT は discovery 用であり implementation normative ではない」旨の出力解釈ガイダンスを追記する
  • .claude/skills/ssot-discovery/tests/ で draft / accepted 両方のフィクスチャに対し lifecycle_status が正しく出力されることを検証

Remaining Parent Gaps

  • なし(PR docs: add MVP scope product spec #400 で docs/dev/ssot-registry.md / docs/dev/workflow.md 側の表記は既に修正済み。本 Issue は skill 側の出力 schema 拡張のみが残作業)

Outcome

.claude/skills/ssot-discovery/scripts/match-ssot.sh の出力 (SSOT_DISCOVERY_RESULT_V1) に lifecycle_status フィールドが含まれ、docs/product/mvp-scope.md のような status: draft の SSOT を discover した呼び出し側が draft / accepted を機械的に区別できる状態。新規テストが PASS し、既存テストが破壊されていない。

In Scope

  • match-ssot.sh が registry エントリの status を抽出する処理を追加
  • output-contract.md schema に lifecycle_status: draft | accepted | unknown を追加
  • SKILL.md の Output 節に「draft の解釈ルール」を追記
  • 既存テストへの draft / accepted フィクスチャ追加

Out of Scope

  • docs/dev/ssot-registry.md / docs/dev/workflow.md の表記変更(PR docs: add MVP scope product spec #400 で対応済み)
  • 他 skill(issue-contract-review / implement-issue 等)が lifecycle_status を消費する側の実装
  • registry に status: draft 以外のライフサイクル状態(deprecated 等)を新規導入すること

Acceptance Criteria

  • AC1: .claude/skills/ssot-discovery/references/output-contract.md の SSOT_DISCOVERY_RESULT_V1.matched_documents[*] schema に lifecycle_status フィールドが定義されている(enum 値を明記)
  • AC2: match-ssot.sh の出力が lifecycle_status を含む(docs/product/mvp-scope.md を入力した場合 draft、docs/product/requirements.md を入力した場合 accepted または unknown)
  • AC3: .claude/skills/ssot-discovery/SKILL.md の Output 節に draft / accepted 区別の解釈ガイダンスが記載されている
  • AC4: .claude/skills/ssot-discovery/tests/ 配下に draft / accepted いずれの SSOT に対しても lifecycle_status を検証するテストケースがある
  • AC5: 既存テスト・lint・typecheck・build が破壊されていない

Verification Commands

# AC1
test -f .claude/skills/ssot-discovery/references/output-contract.md && rg -q "lifecycle_status" .claude/skills/ssot-discovery/references/output-contract.md

# AC2
.claude/skills/ssot-discovery/scripts/match-ssot.sh --paths "docs/product/mvp-scope.md" | rg -q "lifecycle_status:\s*draft"

# AC3
rg -q "lifecycle_status|draft|accepted" .claude/skills/ssot-discovery/SKILL.md

# AC4
rg -q "lifecycle_status" .claude/skills/ssot-discovery/tests/

# AC5
pnpm typecheck && pnpm lint && pnpm test && pnpm build

Allowed Paths

  • .claude/skills/ssot-discovery/SKILL.md
  • .claude/skills/ssot-discovery/scripts/match-ssot.sh
  • .claude/skills/ssot-discovery/references/output-contract.md
  • .claude/skills/ssot-discovery/tests/

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • docs/dev/ssot-registry.md の YAML 形式に status: 相当の field が存在せず schema 拡張が必要になった場合

Required Skills

  • Bash / shell スクリプト
  • YAML schema 設計
  • Bats / shell test

Scope Delta(任意)

N/A

Source

Notes for Reviewer

  • docs/dev/ssot-registry.md の YAML エントリ形式が status 表現を持つかを実装着手前に再確認すること。現状の registry は description 文字列内で「status: accepted になるまでは normative ではない」を表現しているため、機械可読な status: field の有無で実装方針(regex 抽出 / schema 追加)が変わる

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    triage-required
    on May 25, 2026
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

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions