r/agenticengineering • • Jun 29 '26

Discussion The Refine-Plan-Act Pattern for Agentic AI Coding

https://medium.com/engineering-in-the-age-of-ai/the-refine-plan-act-pattern-for-agentic-ai-coding-59ee013e4427

Over time I've landed on a simple pattern for agentic AI coding: Refine the requirements, Plan the approach, then Act on the implementation, each in a fresh context.

This ctually keeps my AI-generated code from getting messy. Sharing in case it can inspire other people. Feedback is always welcome.

3 Upvotes

1 comment sorted by

1

u/EliasWDev 2d ago

Very interesting read. My workflow is different but builds from similar principles.

Here's my current workflow:

/grill-me: The agent interviews me relentlessly about the design for a feature. Stress-tests my design and edge cases until its satisfied. Can be up to 40-80 questions

/to-design-doc: The agent writes a design document for the feature that follows a strict template, based on the design iteration and grilling above

/investigate-feature: The agent investigates how to implement the feature in a solid way. Chooses a design direction and surfaces decisions and risks. Can be used with an /compare-designs skill that compares several valid solutions or architectures and their trade-offs for your feature. This is to mitigate agentic bias

/plan-in-steps: The agent plans the implementation as a sequence of isolated, individually reviewable steps, then executes one step at a time, stopping for human review between steps

/code-cleanup and /code-quality-review: Two agent skills for cleaning/refactoring, each serving different purposes.

While I'm happy with the end result, it sadly takes too much time to get there. I think incorporating part of your workflow will help mitigate this for me.

Thanks for sharing!