aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
Agent: Semantic verification advisory — scope and organicity signals
- Dominant language
- TypeScript
- Stars
- 143
- Forks
- 46
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 20
Description
> **Roadmap:** PR scope creep check (pr_review); Tiered validation pipeline Tier 2
> **Priority:** P1
## Component
Agent (Python runtime)
## Describe the feature
Optional post-agent **advisory** step that compares declared task intent (issue/description/PR narrative) to the actual diff and emits structured **scope and organicity** signals. Addresses the "organicity gap" from harness literature: patches can pass tests yet fail maintainer review due to style, architecture, or scope drift.
Non-blocking by default — surfaces guidance in the task record and PR body without failing the task.
## Use case
- **Reviewers** see upfront whether the agent wandered beyond the issue scope.
- **Evaluation pipeline** tracks scope creep as a failure category distinct from test failure.
- **High-risk repos** can later promote the signal to a policy gate via Cedar/workflow config.
## Proposed solution
1. New optional workflow step or post-hook phase: `assess_scope` (behind Blueprint/workflow flag, default off).
2. Structured output on task record:
```json
{
"scope_rating": "within_scope | mild_expansion | significant_expansion | likely_scope_creep",
"confidence": 0.0,
"rationale": "...",
"signals": {
"files_touched": 12,
"unrelated_deps_changed": false,
"api_surface_changed": false,
"config_changed": true
}
}
```
3. Include summary in PR body and `verification_report` (if evidence bundles shipped).
4. Implementation: deterministic diff stats + optional LLM narrative (single turn, budget-capped).
5. Share diff-analysis utilities with future `pr_review` scope check where possible.
### Acceptance criteria
- [ ] Opt-in via workflow or Blueprint flag; default profile unchanged
- [ ] Structured output persisted and API-visible
- [ ] PR body includes human-readable scope summary when enabled
- [ ] Agent tests with fixture diffs (within scope vs creep)
- [ ] Documented in `EVALUATION.md` under failure categories
## Other information
- **Related roadmap:** PR scope creep check (`pr_review`), Tier 2 code quality
- **Paper:** arXiv:2605.18747 — organicity, PatchDiff / maintainer rejection
- **Out of scope for v1:** Blocking PR creation on scope rating
## Acknowledgements
- [ ] I may be able to implement this feature
- [ ] This might be a breaking change
Contributor guide
Research direction
Start by tracing the optional workflow or Blueprint flag path for the proposed assess_scope step, then inspect how task records, verification_report, and PR bodies are populated. Review the pr_review relationship and EVALUATION.md before defining fixture diffs for within-scope and scope-creep cases. Done means opt-in behavior, persisted API-visible structured output, a PR summary, tests, and documentation, without changing the default profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100