Skip to content

実装: agent preflight bundle と task packet generator を追加する #790

Closed as not planned

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "impl-review-loop intake の重複読解を deterministic packet に集約し、subagent へ渡す context を固定する単独改善"
change_kind: workflow

Parent Issue

none

Parent Goal Ref

  • Goal: impl-review-loop 開始時に issue / PR / contract / related issue / MUST_READ / DO_NOT_READ を 1 回で固定し、main と subagent が同じ GitHub comment / SSOT / CI 状態を繰り返し読まない状態にする。
  • Desired Destination: 単独改善。後続の contract snapshot locator、hook guard、PR evidence digest は別 Issue で扱う。

Current Validated Scope

  • scripts/agent_ops/agent_preflight_bundle.py を追加し、Issue / PR / contract snapshot の入口情報を短い stdout と JSON artifact に正規化する。
  • scripts/agent_ops/generate_task_packet.py を追加し、role 別の task_packet.md/json を生成できるようにする。
  • tests/agent_ops/test_agent_preflight_bundle.py を追加し、offline fixture で missing contract snapshot と packet 生成の挙動を検証する。
  • .claude/skills/impl-review-loop/SKILL.md を最小限更新し、入口で preflight bundle と task packet を読む運用へ誘導する。
  • AGENTS.md と CLAUDE.md に task packet 優先の context intake を短く追記する。

Remaining Parent Gaps

  • contract snapshot locator の専用化は別 Issue で扱う。
  • VC hygiene fixer の実装は別 Issue で扱う。
  • PreToolUse guard の説明改善と false-positive handling は別 Issue で扱う。
  • PR evidence digest / review comment triage は別 Issue で扱う。
  • SKILL.md / agent definition 全体の縮約は別 Issue で扱う。
  • context budget report による before/after 測定は別 Issue で扱う。

Outcome

agent_preflight_bundle.py と generate_task_packet.py、対応する unit test、入口 docs 更新が 1 PR で追加され、offline fixture で missing contract snapshot 時に raw issue comments を stdout へ出さず NEXT_ACTION: run issue-contract-review を返せる状態。

In Scope

  • agent_preflight_bundle.py に STATUS, SUMMARY, NEXT_ACTION, MUST_READ, DO_NOT_READ, COMMANDS, EVIDENCE, BLOCKERS, ARTIFACT_JSON を含む compact stdout を実装する。
  • agent_preflight_bundle.py に JSON artifact を artifacts/agent-preflight/ へ保存する処理を実装する。
  • agent_preflight_bundle.py に offline fixture 入力を追加し、GitHub API なしで missing contract snapshot の判定を再現可能にする。
  • generate_task_packet.py に implementation-worker, test-runner, pr-reviewer 向け packet 生成を実装する。
  • impl-review-loop/SKILL.md に preflight bundle の実行と、packet に列挙された MUST_READ だけを読む方針を短く追記する。
  • AGENTS.md と CLAUDE.md に task packet 優先の context intake を追加し、raw comments / broad docs / PR logs の再読を抑制する。
  • offline fixture と unit test を追加し、stdout が compact であることと artifact path が返ることを検証する。

Out of Scope

  • issue-contract-review の自動投稿や CONTRACT_REVIEW_RESULT_V1 の自動 materialize。
  • contract snapshot locator 専用 script の実装。
  • VC baseline blocker の自動修正。
  • PreToolUse guard / scripts/check-codex-agents.mjs の block 判定変更。
  • PR checks / CI logs / TEST_VERDICT digest の実装。
  • subagent 数の削減そのもの。
  • assets/ または LICENSES/ の変更。

Acceptance Criteria

  • AC1: agent_preflight_bundle.py --offline-fixture が missing CONTRACT_REVIEW_RESULT_V1 status: go を STATUS: blocked と NEXT_ACTION: run issue-contract-review で返す。
  • AC2: preflight stdout は raw issue comment body や PR log body を含まず、routing-critical field と artifact path のみを返す。
  • AC3: preflight JSON artifact に MUST_READ, DO_NOT_READ, COMMANDS, EVIDENCE, BLOCKERS が保存される。
  • AC4: generate_task_packet.py が implementation-worker, test-runner, pr-reviewer の role 別 packet を offline fixture から生成できる。
  • AC5: impl-review-loop/SKILL.md, AGENTS.md, CLAUDE.md が preflight bundle と task packet 優先の入口方針を参照する。
  • AC6: 追加 unit test が PASS し、既存の agent / Codex config check が regression していない。

Verification Commands

rtk python3 scripts/agent_ops/agent_preflight_bundle.py --issue 770 --offline-fixture tests/fixtures/agent_ops/issue770-missing-contract.json
# AC1

rtk python3 scripts/agent_ops/agent_preflight_bundle.py --issue 770 --offline-fixture tests/fixtures/agent_ops/issue770-missing-contract.json --assert-compact-stdout
# AC2

rtk python3 scripts/agent_ops/agent_preflight_bundle.py --issue 770 --offline-fixture tests/fixtures/agent_ops/issue770-missing-contract.json --assert-artifact-schema
# AC3

rtk python3 scripts/agent_ops/generate_task_packet.py --issue 770 --offline-fixture tests/fixtures/agent_ops/issue770-preflight.json --role implementation-worker
# AC4

rtk python3 -m pytest tests/agent_ops/test_agent_preflight_bundle.py -q
# AC5

rtk python3 -m pytest tests/agent_ops/test_agent_preflight_bundle.py -q
# AC6

Allowed Paths

  • scripts/agent_ops/agent_preflight_bundle.py
  • scripts/agent_ops/generate_task_packet.py
  • tests/agent_ops/test_agent_preflight_bundle.py
  • tests/fixtures/agent_ops/issue770-missing-contract.json
  • tests/fixtures/agent_ops/issue770-preflight.json
  • .claude/skills/impl-review-loop/SKILL.md
  • AGENTS.md
  • CLAUDE.md

Runtime Verification Applicability

decision: not_applicable
reason: "workflow script / docs / unit test 追加であり、ブラウザ runtime の手動確認対象ではない"

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • contract snapshot locator、VC hygiene fixer、hook guard、PR digest のいずれかを同じ PR に含める必要が出た場合

Required Skills

なし

Scope Delta(任意)

N/A

Delivery Rule

  • 1 Issue = 1 PR で完了する。
  • Draft PR を既定とする。
  • implementation 着手前に issue-contract-review で CONTRACT_REVIEW_RESULT_V1 status: go を materialize する。
  • 同じ Allowed Paths を扱う open issue が後から見つかった場合は、実装開始前に scope collision として停止する。

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    workflow
    area/ai-ops
    on Jun 10, 2026
  2. squne121 commented on Jul 28, 2026

    @squne121
    OwnerAuthor

    [create-issue / #1833 parent tracker] 本 Issue のスコープは #1837「実装: digest-bound subagent task packet を追加し #790 を統合する」に統合(supersede)する形で再設計しました。

    close 判断は人間へ委ねます。#1837 のマージをもって本 Issue を重複クローズする運用を提案します。

  3. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    Child 4 (#1837) の digest-bound subagent task packet に統合されたため、本 Issue はクローズします。詳細は #1837 および先のコメントを参照してください。

  4. squne121 commented on Aug 1, 2026

    @squne121
    OwnerAuthor

    close reason 訂正: not planned

    以前の completed は実装完了を意味せず、#1837へのsupersessionを理由に付けられたものでした。しかし #1837 の成果物は実装されず、今回 not planned とします。

    original #790 の missing contract snapshot による block や deterministic packet authority もminimal harness方針では採用しません。独立して再開するscopeはありません。履歴訂正のためのclose reason変更であり、reopenのまま残しません。

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/implementerarea/ai-opsenhancementphase/implementationworkflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions