Skip to content

feat: split agent-code-review Hard Stop into judgment/approval contracts - #131

Open
akane-cat[bot] wants to merge 1 commit into
mainfrom
fix/hard-stop-contract-split
Open

feat: split agent-code-review Hard Stop into judgment/approval contracts #131
akane-cat[bot] wants to merge 1 commit into
mainfrom
fix/hard-stop-contract-split

Conversation

@akane-cat

@akane-cat akane-cat Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

agent-code-review スキルの Step 4 / Step 5-6 の Hard Stop を、専用 contract ファイル(judgment-contract.md / approval-contract.md)へ分離する。突入時は contract の全文 Read を必須とし、protocol / loop 等の詳細参照は条件付き Read に変更してコンテキストを削減しつつ、不変条件(J1–J13 / A1–A13)のトレーサビリティを維持する。

Changes

  • judgment-contract.md.template / approval-contract.md.template を新設(Hard Stop 正 + 常駐不変条件 + 追加 Read トリガー)
  • SKILL.md.template の Step Gate Matrix / Step 4 / Step 5-6 / 関連ドキュメント表を contract 参照へ切替
  • judgment-protocol.md / approval-loop.md / checklist.md / mode-b-reminder.md を「条件付き詳細 SoT」へ位置づけ更新
  • foundation manifest に contract 出力定義と required_sections 検証を追加
  • test_contract_loop5/7/8.py で foundation profile 時の pnpm 系チェックを SKIP

Test plan

  • bin/foundation-gate generate で contract 生成物が manifest 定義どおり出力される
  • bin/foundation-gate self が PASS する
  • 生成された agent-code-review/SKILL.md の Step 4 / 5-6 Hard Stop が contract 参照になっている
  • judgment-contract.md / approval-contract.md に J1–J13 / A1–A13 が含まれる

Summary by CodeRabbit

  • 改善

    • コードレビューの判定・承認手順を契約文書として整理し、必須確認事項や記録要件を明確化しました。
    • 判定、承認、保留、異議申し立ての各フローをより一貫して運用できるよう改善しました。
  • テスト

    • Foundation プロファイルで不要な pnpm 関連チェックを適切にスキップし、検証を安定化しました。

- Introduced `judgment-contract.md` and `approval-contract.md` templates to define hard stop requirements for steps 4 and 5-6, respectively.
- Updated `manifest.yaml` to include references to the new contract templates, ensuring proper validation and documentation of the review process.
- Enhanced existing templates and checklists to reflect the new hard stop conditions and required reads, improving clarity and compliance in the workflow.
- Modified test scripts to skip certain checks for contracts classified as "foundation," ensuring appropriate handling of specific profiles.

This update aims to formalize the review process within the agentic workflow, enhancing the structure and clarity of approval and judgment requirements.
@mapserver2007

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b0bc2c85-ad12-4d2c-b0fa-05928c1409eb

📥 Commits

Reviewing files that changed from the base of the PR and between d0711b8 and 007f6d1.

📒 Files selected for processing (11)
  • .cursor/skills/agentic-workflow-foundation/manifest.yaml
  • .cursor/skills/agentic-workflow-foundation/scripts/test_contract_loop5.py
  • .cursor/skills/agentic-workflow-foundation/scripts/test_contract_loop7.py
  • .cursor/skills/agentic-workflow-foundation/scripts/test_contract_loop8.py
  • .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/SKILL.md.template
  • .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/approval-contract.md.template
  • .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/approval-loop.md.template
  • .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/checklist.md.template
  • .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/judgment-contract.md.template
  • .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/judgment-protocol.md.template
  • .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/mode-b-reminder.md.template

📝 Walkthrough

Walkthrough

判定契約と承認契約を追加しました。agent-code-review の必須参照先を更新しました。foundation プロファイルでは、root manifest と pnpm 関連の検証をスキップします。

Changes

コードレビュー契約フロー

Layer / File(s) Summary
判定・承認契約の追加
.cursor/skills/agentic-workflow-foundation/manifest.yaml, .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/judgment-contract.md.template, .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/approval-contract.md.template
判定契約と承認契約を生成対象に追加しました。Hard Stop、必須セクション、読み込み確認、判定・承認ルールを定義しました。
レビュー手順と参照フローの更新
.cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/SKILL.md.template, .cursor/skills/agentic-workflow-foundation/templates/skills/agent-code-review/references/{checklist.md.template,judgment-protocol.md.template,approval-loop.md.template,mode-b-reminder.md.template}
Step 4 と Step 5-6 の必須参照先を契約文書へ変更しました。詳細手順を条件付き参照へ分離しました。
foundation プロファイル検証の分岐
.cursor/skills/agentic-workflow-foundation/scripts/test_contract_loop5.py, .cursor/skills/agentic-workflow-foundation/scripts/test_contract_loop7.py, .cursor/skills/agentic-workflow-foundation/scripts/test_contract_loop8.py
foundation プロファイルでは root manifest と pnpm 関連の検証をスキップし、成功を返すようにしました。

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: mapserver2007

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、Step 4 と Steps 5–6 の Hard Stop を judgment と approval の契約へ分割する主要変更を明確かつ簡潔に示しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hard-stop-contract-split

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant