Skip to content

feat(agent-ops): issue-contract-fixer SubAgent を追加し、LLM rewrite 前に deterministic contract repair を完了させる #998

Open

Description

@squne121

背景

現在の issue-author は fail_closed repair、review feedback repair、child materialization など責務が広い。Issue #950 のような純粋な contract hygiene 修正では、LLM が body 全体を再構成し、不要な反復・文脈膨張・checker 差分推理が起きる。

In Scope

  • 新規 SubAgent issue-contract-fixer を追加する(GitHub mutation なしの deterministic repair proposal 生成に限定)
  • 入力: current_body_file / FAIL_CLOSED_REWRITE_CONSTRAINTS_V1 / ISSUE_REVIEW_RESULT_COMPACT_V1 / optional anchor feedback normalized payload
  • 出力: repaired_body_file / body_sha256 / validators_passed / remaining_blockers
  • GitHub update は既存 issue-author が行う
  • issue-author は contract-only repair の場合、まず issue-contract-fixer を呼ぶ

Out of Scope

  • issue-author の廃止
  • LLM rewrite の完全排除

Acceptance Criteria

Allowed Paths

  • .claude/agents/issue-contract-fixer.md
  • .claude/agents/issue-author.md
  • .claude/skills/issue-refinement-loop/SKILL.md
  • .claude/agents/tests/**
  • .claude/skills/issue-refinement-loop/tests/**

Verification Commands

# AC1
# baseline-expect: fail
$ uv run pytest .claude/agents/tests/test_issue_contract_fixer.py -v

# AC2
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-refinement-loop/tests/test_contract_fixer_integration.py -v

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 新規 SubAgent 定義追加。pytest + fixture で完結。

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Parent Issue

none

Parent Goal Ref

  • Goal: issue-author の責務分離
  • Desired Destination: contract-only repair が deterministic fixer で完結する状態

Current Validated Scope

  • issue-contract-fixer SubAgent の新規追加

Remaining Parent Gaps

なし

Outcome

contract-only repair が LLM freeform rewrite なしで deterministic fixer pass により完結する状態。

Activity

  1. added
    enhancement
    on Jun 18, 2026
  2. added 2 commits that reference this issue on Aug 2, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions