Repository navigation
Closed
Labels
agent/implementerAI implementer agentdocsDocumentation changesenhancementNew feature or requestphase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "issue-scoped PR が差分外の docs lint baseline failure で false block されないようにし、`tests/fixtures/issue-body/vc_unlabeled_fence.md` の intentional negative fixture 意図を保ったまま `pnpm run lint:docs` を main baseline で green に戻す"
change_kind: docsParent Issue
none(単独改善)
Parent Goal Ref
- Goal:
pnpm run lint:docsの既存 baseline failure を解消し、Issue scoped docs PR が Allowed Paths 外の既存 failure で止まらない状態にする - Desired Destination:
tests/fixtures/issue-body/vc_unlabeled_fence.mdが unlabeled fence の negative fixture としての意味を保ったまま、fixture-local な MD040 抑止でpnpm run lint:docsを通せる状態
Current Validated Scope
tests/fixtures/issue-body/vc_unlabeled_fence.mdの opening fence は unlabeled のまま維持するtests/fixtures/issue-body/vc_unlabeled_fence.mdに fixture 意図を明示するコメントと、opening fence 直前の局所MD040抑止コメントを追加するpnpm run lint:docsが clean checkout baseline で pass することを検証する
Remaining Parent Gaps
- 実装: M3 完了を docs に反映し M3/M4/M5 milestone-boundary SSOT の不整合を解消する #1094 / PR docs: sync milestone SSOT for M4 (#1094) #1102 の milestone docs sync 差分は別 PR のままとする
- docs lint 全体の大規模再設計はこの Issue では扱わない
- config-level exclusion が必要なら scope を改めて見直す
Outcome
pnpm run lint:docs が main baseline で pass し、issue-scoped docs PR が差分外の既存 fixture failure で false block されない。あわせて tests/fixtures/issue-body/vc_unlabeled_fence.md は intentional negative VC fixture としての unlabeled fence を維持している。
In Scope
tests/fixtures/issue-body/vc_unlabeled_fence.mdに fixture intent コメントを追加する- opening fence 直前に fixture-local な
markdownlintMD040抑止コメントを追加する - opening fence を unlabeled のまま維持したうえで
pnpm run lint:docs,pnpm typecheck,pnpm lint,pnpm test,pnpm buildの実行と結果確認を行う
Out of Scope
- 実装: M3 完了を docs に反映し M3/M4/M5 milestone-boundary SSOT の不整合を解消する #1094 / PR docs: sync milestone SSOT for M4 (#1094) #1102 の docs milestone sync 差分
- M4 milestone rename / close 判断
- docs lint ルールセット全体の大規模再設計
.markdownlintignore,.textlintignore,package.json,.markdownlint-cli2.yamlを使った config-level remediation
Acceptance Criteria
- AC1:
pnpm run lint:docsが clean checkout の main 相当で pass する - AC2:
tests/fixtures/issue-body/vc_unlabeled_fence.mdに intentional negative VC fixture であることを示す説明コメントが存在する - AC3:
tests/fixtures/issue-body/vc_unlabeled_fence.mdにmarkdownlint-disable-next-line MD040が存在する - AC4:
tests/fixtures/issue-body/vc_unlabeled_fence.mdの該当 excerpt で、fixture intent コメントとmarkdownlint-disable-next-line MD040の直後に unlabeled opening fence が残っている - AC5: 実装: issue-scoped PR を既存 lint:docs baseline で止めない #1103 の実装差分が
tests/fixtures/issue-body/vc_unlabeled_fence.mdのみに収まっている - AC6:
pnpm typecheckが pass する - AC7:
pnpm lintが pass する - AC8:
pnpm testが pass する - AC9:
pnpm buildが pass する
Verification Commands
# AC1
# preflight-scope: pr_review_only
$ pnpm run lint:docs# AC2
# baseline-expect: pass
# preflight-scope: pr_review_only
$ rg -n "Intentional negative VC fixture" tests/fixtures/issue-body/vc_unlabeled_fence.md# AC3
# baseline-expect: pass
# preflight-scope: pr_review_only
$ rg -n "markdownlint-disable-next-line MD040" tests/fixtures/issue-body/vc_unlabeled_fence.md# AC4
# baseline-expect: pass
# preflight-scope: pr_review_only
$ sed -n '13,22p' tests/fixtures/issue-body/vc_unlabeled_fence.md# AC5
# baseline-expect: pass
# preflight-scope: pr_review_only
$ git diff --name-only origin/main...HEAD# AC6
$ pnpm typecheck# AC7
$ pnpm lint# AC8
$ pnpm test# AC9
$ pnpm buildAllowed Paths
tests/fixtures/issue-body/vc_unlabeled_fence.md
Runtime Verification Applicability
- decision: not_applicable
- reason: docs lint / fixture-only issue であり、runtime surface や preview / manual play evidence を変更しない
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
.markdownlintignore,.textlintignore,package.json,.markdownlint-cli2.yamlなど config-level remediation が必要と判明した場合- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR。worktree で作業する。Draft PR で開始し、AC 全件 PASS 後に ready for review にする。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentdocsDocumentation changesenhancementNew feature or requestphase/implementationImplementation phase
Activity
squne121 commentedon Jun 21, 2026
Contract Review Result
squne121 commentedon Jun 21, 2026
結論
Issue #1103 の問題設定は正しいです。PR #1102 は #1094 の milestone docs sync だけを扱う PR で、
pnpm run lint:docsが既存 baseline のtests/fixtures/issue-body/vc_unlabeled_fence.md:15/MD040/fenced-code-languageにより失敗した、と PR 本文で明示しています。これは PR #1102 の Allowed Paths 外であり、#1103 として分離する判断は妥当です。ただし、#1103 のまま実装させると 誤修正に寄るリスクが高いです。特に
.markdownlintignoreが Allowed Paths に入っている点は危険です。現在の repo はmarkdownlint-cli2を使っており、lint:mdはmarkdownlint-cli2 '**/*.md' ...で実行されています。 markdownlint-cli2 公式 README は.markdownlintignoreをサポートしないと明記しているため、.markdownlintignoreを追加してもこの失敗は直らない可能性が高いです。([GitHub]1)敵対的レビュー
Blocker 1:
.markdownlintignoreは修正先として不適切#1103 の Allowed Paths に
.markdownlintignoreが含まれていますが、現在の実体は.markdownlint-cli2.yamlとpackage.jsonのlint:mdscript です。.markdownlint-cli2.yamlではdocs/**,.github/**,.claude/**などは ignore されていますが、tests/**は ignore されていません。 さらに MD040 は明示的に有効化されています。したがって、設定で直すなら本来は
.markdownlint-cli2.yamlかpackage.jsonを触るべきです。ただし.markdownlint-cli2.yamlは #1103 の Allowed Paths に入っていません。現 Issue のまま進めるなら、設定変更ではなく fixture 側の局所抑止が最も安全です。Blocker 2: fence を
bashに直すと fixture の意味を壊すvc_unlabeled_fence.mdは名前どおり「unlabeled fence VC format の非 canonical fixture」です。実際にVerification Commandsの fence は言語指定なしの triple backtick です。外部仕様上、MD040 は「fenced code block に language がない」場合に発火し、通常の修正は
```bashなどの language specifier 追加です。([GitHub]2) しかし、この repo の VC grammar は unlabeled fence を明示的に拒否する設計で、vc_contract_syntax.pyも「unlabeled fences are rejected」と述べ、parser は unlabeled fence をunlabeled_fenceerror として記録します。既存テストも「unlabeled fence は C4 fail / LP011 fail / preflight static blocked」として固定しています。 そのため
```を```bashにする修正は baseline green にはなっても、fixture の目的を破壊します。High: AC3 の検証が弱い
#1103 の AC3 は
gh pr list --search "#1094"ですが、これは #1094 / PR #1102 が存在することの確認に近く、#1103 の PR が #1094 / #1102 の docs 差分と混ざっていないことを保証しません。#1094 の scope はdocs/dev/current-focus.md,docs/product/requirements.md,docs/product/playable-roadmap.mdの milestone sync であり、#1103 とは明確に別です。([GitHub]3) PR #1102 もそれら docs とCLAUDE.md,.claude/rules/project-constitution.mdを M4 前提へ同期する内容です。AC3 は
git diff --name-only origin/main...HEADまたはgh pr diff --name-onlyで、#1103 PR の変更ファイルが fixture-local か lint 設定だけに収まっていることを直接検査するべきです。Medium: PR #1102 preview comment はこの Issue の証跡に使わない
PR #1102 には GitHub Pages preview comment がありますが、asset-level live check 未検証、Pages source 設定後に有効化、という注記付きです。 #1103 は docs lint baseline の Issue なので、preview URL や Pages runtime は AC 証跡に含めない方がよいです。
推奨修正方針
最善は fixture 内で MD040 だけを局所抑止し、unlabeled fence は維持することです。markdownlint は HTML comment で rule を disable-next-line できます。([GitHub]4)
tests/fixtures/issue-body/vc_unlabeled_fence.mdの opening fence 直前に以下を入れるのがよいです。その直後の fence は 絶対に
```bashにしない。```のままにします。この方式なら、
markdownlint-cli2の MD040 だけを当該行で抑止し、VC parser / review-issue / create-issue 系の「unlabeled fence を拒否する」仕様は保てます。lint:proseはそもそもtests/**/*.mdを対象にしていないため、.textlintignoreを触る必要もありません。Issue #1103 に入れるべき修正コメント案
Expected changed files should be limited to
tests/fixtures/issue-body/vc_unlabeled_fence.mdunless the Issue contract is explicitly amended.追加で、fixture の意味が壊れていないことを確認するなら次も入れるべきです。
判定としては、#1103 は GO だが、
.markdownlintignore誘導と AC3 の弱さを修正してから実装させるべきです。squne121 commentedon Jun 21, 2026
issue-refinement-loop 完了(approved / 人間承認不要モード)
anchor comment(https://github.com/squne121/loop-protocol/issues/1103#issuecomment-4761528600)を一次ソースとして、Issue #1103 の contract を live rewrite しました。
反映した hardening
.markdownlintignore/.textlintignore/package.json/.markdownlint-cli2.yamlを remediation 候補から外し、fixture-local 修正へ scope を限定tests/fixtures/issue-body/vc_unlabeled_fence.mdの unlabeled fence を維持する方針をCurrent Validated Scope/In Scope/Outcome/ AC に明記markdownlint-disable-next-line MD040と fixture intent コメントの確認へ寄せ、AC3 の弱い PR 存在確認を実 diff 検証へ差し替えnot_applicableとして追加preflight-scope: pr_review_onlyに正規化し、baseline preflight false blocker を解消検証
contract_readiness_check.py --mode preflight-static --body-file .tmp_issue_1103_body.md→status: gocheck_issue_contract.py --file .tmp_issue_1103_body.md --json→verdict: approvecheck_vc_scope.py --issue-body-file .tmp_issue_1103_body.md→STATUS: PASSrun_contract_review_once.py --issue-number 1103 --repo squne121/loop-protocol --mode execute --skip-idempotency-check→status: go次アクション:
issue-contract-reviewgate は通過済みなので、この Issue はimpl-review-loopへ handoff 可能です。squne121 commentedon Jun 21, 2026
Contract Review Result
squne121 commentedon Jun 21, 2026
implement-issue: 実装完了 (2026-06-21T09:54:45Z)
.claude/worktrees/issue-1103-issue-scoped-pr-lint-docs-baselineworktree-issue-1103-issue-scoped-pr-lint-docs-baselinepnpm run lint:docsPASSpnpm typecheckPASSpnpm lintPASSpnpm testPASSpnpm buildPASStests/fixtures/issue-body/vc_unlabeled_fence.mdsqune121 commentedon Jun 21, 2026
impl-review-loop: 完了 (2026-06-21T12:45:00Z)
docs: suppress MD040 on unlabeled VC fixture (#1103) (#1107)