aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(agent): PR scope creep check in pr_review workflow

オープン
#475 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
agent-runtime enhancement
主要言語
TypeScript
スター
143
フォーク
46
平均マージ
3日 10時間
マージ済み PR(30日)
24

説明

**Context:** ROADMAP.md → Agent quality → PR scope creep check (`pr_review`)
**Related:** pr-risk-classifier draft, #425

---

## Component

Agent (Python runtime)

## Describe the feature

Advisory-first scope analysis in `coding/pr-review-v1` comparing **declared intent** (task description / issue / PR narrative) to the **actual diff** and touched areas.

Structured output:

| Field | Values / content |
|-------|------------------|
| `scope_rating` | `within_scope`, `mild_expansion`, `significant_expansion`, `likely_scope_creep` |
| `confidence` | numeric or enum |
| `rationale` | files touched, API/schema/config changes, unrelated dependency churn |

**Rollout:** non-blocking reviewer guidance first; optional policy gates for high-risk repos later.

## Use case

Agents often expand beyond the stated task. Reviewers need early signal before deep review. Teams want consistent scope discipline without blocking low-risk expansions by default.

## Proposed solution

1. Extend `pr_review` workflow step to invoke scope analysis after diff is available.
2. Post structured comment via GitHub Reviews API (advisory section).
3. Emit `scope_analysis` event to `TaskEventsTable`.
4. Unit tests with golden fixtures for rating boundaries.
5. Document prompt and output schema in `docs/design/WORKFLOWS.md`.

## Other information

- Design context: `docs/design/EVALUATION.md`, `agent/workflows/`.

- [ ] This might be a breaking change

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

`agent/workflows/` の `pr_review` workflow と、`docs/design/EVALUATION.md` および `docs/design/WORKFLOWS.md` の設計コンテキストから始め、diff が利用可能になる仕組みと `TaskEventsTable` イベントが発行される仕組みを確認します。完了条件は、スコープ評価、アドバイザリーレビュー出力、`scope_analysis` イベント、golden boundary fixture、および提案されたフローをサポートする文書化された prompt/schema サポートが揃うことです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, python
領域
api, backend, documentation, testing
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。