aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(agent): in-pipeline build/lint fix-up loop
- Dominant language
- TypeScript
- Stars
- 143
- Forks
- 46
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 20
Description
**Context:** ROADMAP.md → Agent quality → In-pipeline build/lint fix-up loop
**Related:** #301 (per-step gates), tiered validation draft
---
## Component
Agent (Python runtime)
## Describe the feature
When post-change `verify_build` or `verify_lint` fails, loop back into the agent with failure output as extra context—up to a **configurable retry count**—then fail only if fixes are exhausted. Still respect existing `max_turns` and `max_budget_usd`.
Implementable in `pipeline.py` after `run_agent()` on verification failure **without orchestrator changes**.
## Use case
A single lint or compile error currently fails the entire task even when the agent could fix it in one more turn. This wastes operator time and produces noisy failure metrics.
## Proposed solution
1. Blueprint/repo config: `verify_retry_count` (default 0 for backward compat, suggest 2 for new repos).
2. On `verify_build`/`verify_lint` failure: append failure logs to agent context and re-invoke within same task.
3. Emit `agent_milestone` events for each retry (`verify_retry_attempt`, `verify_retry_exhausted`).
4. Unit tests in `agent/tests/` covering success-on-retry and exhaustion paths.
5. Document in `agent/README.md` and workflow YAML docs.
## Other information
- Distinct from **Autonomous feedback loop** (post-PR CI/review).
- Distinct from **Tiered validation pipeline** (Tier 2+ quality analysis).
- Design context: `docs/design/WORKFLOWS.md`, `agent/src/pipeline.py`.
- [ ] This might be a breaking change
Contributor guide
Research direction
Start with agent/src/pipeline.py and docs/design/WORKFLOWS.md to trace run_agent() through verify_build and verify_lint failures. Then inspect the existing configuration, milestone events, agent/tests/, agent/README.md, and workflow YAML docs. Done means configurable retries preserve max_turns and max_budget_usd, emit retry milestones, pass success-on-retry and exhaustion tests, and document the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai-infra-agents
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100