Skip to content

実装: PR本文 canonical heading の non-prose policy を整合させる #1641

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "LP052 の exact English heading grammar を維持し、PR 本文の canonical heading を日本語 prose 検証から一貫して除外する"
change_kind: workflow

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: PR 本文 validator の fixed grammar と日本語 prose guard が同じ shared heading policy を消費する。
  • Desired Destination: Schema Change Applicability と Schema Consumer Inventory を含む Draft PR 本文が LP052 と日本語検証を同時に通過し、実装: contract snapshot の base SHA freshness を強制する #1635 の Draft PR 起票を再開できる。

Current Validated Scope

  • shared HEADING_POLICY の上記 2 canonical English heading を non-prose canonical entry として明示し、日本語 prose ratio の対象から除外する。
  • LP052 の exact English heading grammar、PR template の heading 表記、LP050 catalog consumer inventory の意味を変更しない。
  • shared policy と open-pr validator consumer に対する正例・負例の regression tests を更新する。

Remaining Parent Gaps

Outcome

shared heading policy と regression tests が、LP052 exact English headings を non-prose canonical entries として扱い、validate_pr_body.py と日本語検証を同時に PASS させる状態。

Background

Draft PR #1635 の本文は LP052 により Schema Change Applicability と Schema Consumer Inventory の exact English heading を要求される一方、日本語検証が同じ heading-only blocks を prose と判定して reject する。英語 grammar を緩和する workaround ではなく、既存 shared heading policy の canonical non-prose inventory を決定論的に補正する。

In Scope

  • .claude/skills/create-issue/scripts/prose_boundary_policy.py の canonical heading inventory を、LP052 required headings の prose exemption が明確になるよう更新する。
  • heading policy regression test に exact English headings と non-canonical English negative case を追加または更新する。
  • open-pr validator の tests で、LP052 exact heading を保つ PR body が日本語検証と共存することを固定する。
  • PR body Japanese repair-plan test で、heading text の日本語化による LP052 grammar bypass を提案しないことを固定する。

Out of Scope

  • .claude/skills/open-pr/scripts/validate_pr_body.py の LP052 grammar、LP050 catalog comparator、PR template の heading text の変更。
  • validate_japanese_content.py の block classifier 再実装、Issue 本文の日本語比率閾値変更、guard bypass。
  • 実装: contract snapshot の base SHA freshness を強制する #1635 の実装・commit・PR review・merge。

Acceptance Criteria

  • AC1: shared heading policy は Schema Change Applicability と Schema Consumer Inventory を canonical non-prose entries として分類し、既存 block-kind public contract を変更しない。
  • AC2: LP052 exact English headings を含む PR body は日本語 prose validation で heading-only block を violation としない。
  • AC3: 非 canonical English heading または English prose は引き続き日本語 prose validation で fail し、exemption surface が 2 headings 以外へ拡大しない。
  • AC4: Japanese repair plan は LP052 heading を日本語表記へ変更する workaround を生成せず、canonical heading policy に従う修復を示す。

Verification Commands

# AC1
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_heading_policy.py

# AC2
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py

# AC3
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_heading_policy.py

# AC4
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_pr_body_japanese_repair_plan.py

Runtime Verification Applicability

  • decision: not_applicable
  • reason: shared policy と PR validator の組合せは、fixture-based pytest で決定論的に検証できる。

Allowed Paths

  • .claude/skills/create-issue/scripts/prose_boundary_policy.py
  • .claude/skills/create-issue/scripts/tests/test_heading_policy.py
  • .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py
  • .claude/skills/open-pr/scripts/tests/test_pr_body_japanese_repair_plan.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • LP052 exact English grammar を緩和するか、shared policy 以外に new prose exemption を追加しなければ AC を満たせない場合

Required Skills

  • Python 3(policy table、Markdown block classification、pytest)

Required Design References

  • docs/dev/agent-skill-boundaries.md
  • docs/dev/workflow.md#Issue contract を作業計画の正本として扱う条件
  • .claude/skills/open-pr/SKILL.md

Scope Delta(任意)

  • source: PR 実装: contract snapshot の base SHA freshness を強制する #1635 Draft PR body validation failure
  • validated_scope_delta: exact English heading grammar を緩和せず、shared heading policy entry と consumer regression tests に限定する。
  • rejected_alternative: heading を日本語化または English prose exemption を広範囲に追加する workaround は LP052 と fail-closed prose policy を壊すため採用しない。

Scope Collision Preflight

Delivery Rule

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    on Jul 19, 2026
  2. squne121 commented on Jul 19, 2026

    @squne121
    OwnerAuthor

    Scope Collision (C1) 証跡

  3. squne121 commented on Jul 19, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-19T09:48:56Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1641
      body_sha256: "sha256:103f94b0b3ff648ad83249b4c247eca6455718c413326857a2fc82f74cfe7912"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:103f94b0b3ff648ad83249b4c247eca6455718c413326857a2fc82f74cfe7912","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":3,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_heading_policy.py","command_hash":"sha256:4f290cffad73c0605dee39d9e3fe882f0ab025e32dd935c43a3148aa872369e3","execution_key_hash":"sha256:4c351accc2629f873e2c803f568d49c6e967e90578449c9b648b81d27a83b355","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 69 items",".claude/skills/create-issue/scripts/tests/test_heading_policy.py ....... [ 10%]","..............................................................           [100%]","============================== 69 passed in 0.08s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":319,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC2","line":7,"raw_command":"uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_validate_pr_body.py","command_hash":"sha256:23d0067a88ad07f490d15827c57d28be1c17f9f12b3315e9a1174e82b81cca20","execution_key_hash":"sha256:5557a2d0cb98116449b3ebfd0b55e75abecf764053277df9169eb14666247e07","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 29 items",".claude/skills/open-pr/scripts/tests/test_validate_pr_body.py .......... [ 34%]","...................                                                      [100%]","============================== 29 passed in 0.21s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":414,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":6,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC3","line":11,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_heading_policy.py","command_hash":"sha256:4f290cffad73c0605dee39d9e3fe882f0ab025e32dd935c43a3148aa872369e3","execution_key_hash":"sha256:81a30d2e463b61fb03c330c087efe494b7d9fa26023b0b22b728933138caa859","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 69 items",".claude/skills/create-issue/scripts/tests/test_heading_policy.py ....... [ 10%]","..............................................................           [100%]","============================== 69 passed in 0.09s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":713,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":10,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC4","line":15,"raw_command":"uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_pr_body_japanese_repair_plan.py","command_hash":"sha256:35ff8b17475da1f2aebc86802511ee3c3c65a8f0b4016e858d1044cc7b82d1d2","execution_key_hash":"sha256:88a0f581468c3be95ff2d1a2769f83ea336508f3cb228711283fc6aa333c0519","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/open-pr/scripts/tests/test_pr_body_japanese_repair_plan.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 1.04s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":1258,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":14,"raw":"# baseline-expect: pass"},"strict":null,"repair":null}]
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1641,"contract_source_kind":"issue_comment","contract_source_id":"5015261684","contract_body_sha256":"sha256:103f94b0b3ff648ad83249b4c247eca6455718c413326857a2fc82f74cfe7912","allowed_paths_normalized_sha256":"4ff7cd94ddf06d733d626ec3f199a9bc058d90da7efaa669e137dc7e30f5d2bc","base_ref":"main","base_sha_at_snapshot":"7a458860d742fe5040d5fea244109efd5f0d4b03"}
  4. squne121 commented on Jul 19, 2026

    @squne121
    OwnerAuthor
    HUMAN_C1_DECISION_V1:
      candidate_issue_number: 30
      decision: C1/non-conflict
      current_body_sha256: sha256:103f94b0b3ff648ad83249b4c247eca6455718c413326857a2fc82f74cfe7912
      candidate_body_sha256: sha256:24bd91c85bb8f7fe92f900f417f75c84fc3d991b2f2cd486eb449f208e978ead

    #30 は defer 提案の Issue 起票手順を所有し、LP052 heading の prose 境界には変更を加えないため、owner 承認により C1/non-conflict と判断する。

  5. squne121 commented on Jul 19, 2026

    @squne121
    OwnerAuthor
    HUMAN_C1_DECISION_V1:
      candidate_issue_number: 1396
      decision: C1/non-conflict
      current_body_sha256: sha256:103f94b0b3ff648ad83249b4c247eca6455718c413326857a2fc82f74cfe7912
      candidate_body_sha256: sha256:334d991b2f1ccb6280543069a488276716316bcc09f7b7d6c91a2f97b5ed8af

    #1396 は implementation Issue の MRC key 検証を所有する。#1641 は MRC key や contract schema を変更しないため、owner 承認により C1/non-conflict と判断する。

  6. squne121 commented on Jul 19, 2026

    @squne121
    OwnerAuthor
    HUMAN_C1_DECISION_V1:
      candidate_issue_number: 519
      decision: C1/non-conflict
      current_body_sha256: sha256:103f94b0b3ff648ad83249b4c247eca6455718c413326857a2fc82f74cfe7912
      candidate_body_sha256: sha256:5196e9db0a3309293f5c3def956f89d613d5cfee2e40c55baaa768911b6d1b41

    #519 は LP050 catalog consumer 照合を所有する。#1641 は validator 本体を変更せず LP052 heading の日本語 prose 除外を固定するため、owner 承認により C1/non-conflict と判断する。

  7. squne121 commented on Jul 19, 2026

    @squne121
    OwnerAuthor
    HUMAN_C1_DECISION_V1:
      candidate_issue_number: 1396
      decision: C1/non-conflict
      current_body_sha256: sha256:103f94b0b3ff648ad83249b4c247eca6455718c413326857a2fc82f74cfe7912
      candidate_body_sha256: sha256:334d9919a0f1ccb6280543069a488276716316bcc09f7b7d6c91a2f97b5ed8af

    #1396 は implementation Issue の MRC key 検証を所有する。#1641 は MRC key や contract schema を変更しないため、owner 承認により C1/non-conflict と判断する。

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/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions