aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(agent): PR scope creep check in pr_review workflow
- Vorherrschende Sprache
- TypeScript
- Sterne
- 143
- Forks
- 46
- Ø Merge
- 3 T. 10 Std.
- Gemergte PRs (30 T.)
- 24
Beschreibung
**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
Beitragsleitfaden
Rechercherichtung
Beginne mit dem `pr_review`-Workflow in `agent/workflows/` und dem Designkontext in `docs/design/EVALUATION.md` und `docs/design/WORKFLOWS.md`; prüfe, wie der Diff verfügbar wird und wie `TaskEventsTable`-Ereignisse ausgegeben werden. Die Arbeit ist abgeschlossen, wenn Scope-Bewertungen, eine beratende Review-Ausgabe, ein `scope_analysis`-Ereignis, Golden-Boundary-Fixtures und eine dokumentierte Prompt/Schema-Unterstützung den vorgeschlagenen Ablauf unterstützen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github, python
- Bereich
- api, backend, documentation, testing
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100