From Prompt to Production: What an Agentic Workflow Should Look Like for Enterprise Code
The most common failure mode in enterprise AI coding is treating a prompt as a software delivery process.

From Prompt to Production: What an Agentic Workflow Should Look Like for Enterprise Code
The most common failure mode in enterprise AI coding is treating a prompt as a software delivery process.
A prompt can start a model. It cannot define responsibility, risk, quality criteria, tests, deployment, or operations.
The output looks credible. The delivery does not hold.
The thesis
A workable approach in enterprise software engineering clearly splits responsibilities. People and the organization own intent, risk, constraints, and acceptance criteria. The agent helps the team move faster through analysis, planning, implementation, and verification.
AI can accelerate delivery when its work is guided by explicit context and closed by measurable evidence of quality. Without that, agentic coding becomes a faster version of chaos: more code, more changes, more tasks marked done, and a larger review bill.
The shift lives in the operating model. New tools alone will not deliver it.
What the Research Shows
AI coding tools are changing how much developers produce, but not how much actually ships.
A new MIT study of more than 100,000 GitHub developers found that successive generations of AI tools, from autocomplete to autonomous agents, lifted coding activity by as much as 180%. Yet that surge fades along the production chain. The gains drop to roughly 50% for completed projects and just 30% for released software.
The reason is structural. Human bottlenecks and production constraints, not raw output, decide how much code becomes software people can use. Writing more code is the easy part. Shipping it safely remains the hard one.
Source: Demirer, M., Musolff, L., & Yang, L. (2026, May). Writing code vs. shipping code: Productivity effects across generations of AI coding tools (NBER Working Paper No. w35275). SSRN. https://ssrn.com/abstract=6859839
Why does an enterprise need more than a prototype?
A prototype tolerates a lot. Missing requirements, no edge cases, manual setup, no rollback, local tests, and temporary shortcuts.
An enterprise system tolerates almost none of that. It expects traceability, security, auditability, access control, architectural coherence, CI/CD, monitoring, ownership, and repeatable deployment.
The larger the cost of a defect, the less you can rely on a model’s intuition.
That line is where agentic coding earns its place. Generate freely inside a sandbox. Move carefully toward production.
Photo by tribesh kayastha on Unsplash
The Decision Pipeline: agentic workflow as a sequence of gates
Treat agentic coding as a Decision Pipeline rather than a single long session with a model.
A useful Decision Pipeline has 11 stages:
- Business intent
- Functional requirements and acceptance criteria
- Non-functional requirements
- Architectural decisions
- Implementation plan
- Agent execution
- Automated verification
- Human review
- Staging or UAT
- Release decision
- Post-release observation
An agent can act with high autonomy inside a stage. It should not push a change through every risk gate on its own.
That single rule reorganizes how teams design AI tooling. Autonomy stops at the gates. Acceleration happens between them.
Step 1: Specify intent and scope
A good brief is the first thing the agent needs. Without it, the model optimizes for the most probable implementation rather than the right one.
A brief worth running covers:
- The problem you are solving
- The user or system that benefits
- Anything explicitly out of scope
- Acceptance criteria
- Technical constraints
- Known risks
- The signal the team will use to recognize the work as done
If the brief is vague, expect a confident answer that misses the target. The agent will not push back. It will produce.
Step 2: Treat non-functional requirements as first-class input
Performance, security, observability, availability, compliance, data retention, audit logs, rollback, cost limits, and SLO, RTO, or RPO targets should be included in the prompt. They do not belong in a post-mortem.
If non-functional requirements never reach context, the model treats them as invisible. That is where most agentic failures hide. The feature works. The system underneath cannot be operated.
Move non-functional context up front. Make it part of the brief, not a late edit on the pull request.
Step 3: Architecture and responsibility boundaries
Architecture is the set of constraints that shapes every implementation choice. The agent should read it before it writes.
Before execution, the agent should know:
- Where module boundaries sit
- Which API contracts are stable
- How the data model is shaped
- Which dependencies are allowed
- Which areas of the code are off limits
- Which decisions are already made
- Which decisions still need an ADR
Without those boundaries, the agent can produce working code that increases systemic debt. The build is green. The architecture quietly bends.
For non-trivial changes, the Bounded Context still matters. AI rewards strong architectural intent and exposes weak architectural intent faster.
Step 4: Plan before execution
For anything beyond a trivial change, the agent should write a plan before writing code.
A plan worth reading lists:
- Files to change
- The order of changes
- Risks
- Tests to add
- Verification commands
- Effects on data
- Effects on configuration
- Possible rollback points
The plan is the first cheap moment to catch a wrong direction. Reviewing a plan takes minutes. Reviewing a full implementation can take hours.
Make the plan a real artifact. Not a paragraph, the agent rushes past on the way to keystrokes.
Step 5: Execution
Good execution is small, coherent, and reviewable.
It looks like this:
- Small changes
- Coherent commits
- Work done on the current state of the repository
- Tests written alongside the code
- No unjustified refactors
- No demo style shortcuts
- Documentation updated where it matters
The agent should deliver the smallest sensible increment that a human can review and verify.
Speed without small steps is compounding risk.
Step 6: The Verification Loop
“The agent finished” is a status update. Evidence of quality lives somewhere else.
A real Verification Loop covers:
- Unit tests
- Integration tests
- Lint, build, and typecheck
- Acceptance criteria review
- Edge case checks
- Error path validation
- Security checks
- Observability checks
An agentic workflow without a Verification Loop produces output. Only the Verification Loop produces trust.
Bake the loop into the pipeline. Do not leave it to the discipline of a tired developer at 5 pm on a Friday.
Step 7: Human review and accountability
Human review still carries the risk. The model does not.
The reviewer should answer:
- Does the change realize the intent?
- Does it respect the architecture?
- Do the tests carry a real signal?
- Is the security posture correct?
- Is the code maintainable?
- Is the release risk acceptable?
AI can prepare high-quality evidence. It should not accept production risk on behalf of the organization.
That line matters more as autonomy grows. The faster the agent, the firmer the gate.
Where BMAD and GSD fit
Two families of frameworks are worth knowing here. They are complementary.
BMAD acts as upstream governance. It produces the PRD, the architecture document, the epics, the stories, the decision log, and the implementation readiness check.
GSD, “Getting Shit Done,” acts as a downstream execution loop. It runs discuss, plan, execute, verify, UAT, and ship, with atomic commits and fresh context per agent.
Neither, on its own, ships production-ready code.
The strongest model bridges the decision layer and the execution layer through a production-readiness gate. BMAD frames the right work. GSD ships the work safely. The gate decides whether it leaves the pipeline.
That bridge is the operating model most enterprises still lack.

Production Readiness as a separate gate
Production readiness is not a vibe. It is a state confirmed by tests, security checks, observability, deployment, rollback, ownership, and operations.
A useful Production Readiness Checklist closes the pipeline. It asks operational questions, not coding questions.
A minimal Production Readiness Checklist covers seven areas:
- Functional readiness: acceptance criteria, happy path, edge cases, error paths
- Test readiness: unit, integration, regression, smoke tests passing in CI
- Security readiness: input validation, authorization, secrets, dependency scan
- Data readiness: safe migrations, backward compatibility, rollback or forward fix plan
- Observability readiness: logs, metrics, alerting, dashboards
- Deployment readiness: environments, feature flags, rollback plan, pipeline green
- Ownership readiness: an owner, a runbook, and documented failure modes
You can map levels of readiness onto a clean ladder: demo-ready, dev-ready, review-ready, staging-ready, release-candidate, and finally production-ready.

BMAD and GSD usually deliver to review-ready or staging-ready. The last steps belong to the engineering organization, not to the agent.
A sample operating model
A working Decision Pipeline can be adopted without restructuring everything.
- Product or engineering defines the goal and acceptance criteria.
- An architect or senior engineer defines constraints and risks.
- The agent drafts an implementation plan.
- A human approves the direction.
- The agent executes the change and writes tests.
- CI/CD runs the Verification Loop.
- A senior reviews the change.
- The team applies the Production Readiness Checklist.
- The change moves to staging or UAT.
- The owner makes the release or no-release decision.
Each step has an owner. Each step produces an artifact. The agent works on steps three, five, and part of six. Humans own the gates.

That is the difference between accelerated delivery and accelerated drift.
Risks and guardrails when running agentic workflows
Every opportunity in this stack comes with a paired risk.
High autonomy plus weak intent ships the wrong outcome faster. Counter it with a strict brief and a plan gate before execution.
Parallel execution waves cut delivery time and the cognitive surface for review. Counter it with atomic commits and short pull requests.
Fresh context per subagent reduces context rot and raises the chance of duplicated logic across subagents. Counter it with shared architectural notes and a code reviewer who reads the whole change set.
Agent-generated tests look comprehensive. They often hit the happy path and miss the operational edges. Contrast it with mutation thinking: ask whether the test would have caught the last incident in this module.
Local verification passes do not equal production behavior. This should be contrasted with staging signals, canary releases, and an explicit rollback plan.
Each guardrail is cheap when designed up front. It becomes expensive after the first incident.
If your AI writes the code, who guarantees the release?
Agentic coding is embedded within the delivery process. A good agentic workflow makes that process faster, more precise, and better documented.
In the enterprise, the winners are the teams that change a production system safely, repeatedly, and on schedule. The volume of generated code does not decide that.
First, build the structure. Add autonomy in areas where the gates can be supported.
메타데이터
- post_id
- c633f802aafe
- slug
- from-prompt-to-production-what-an-agentic-workflow-should-look-like-for-enterprise-code-c633f802aafe
- url
- https://medium.com/@pjpiotrowski/from-prompt-to-production-what-an-agentic-workflow-should-look-like-for-enterprise-code-c633f802aafe
- canonical_url
- https://medium.com/@pjpiotrowski/from-prompt-to-production-what-an-agentic-workflow-should-look-like-for-enterprise-code-c633f802aafe
- author_url
- https://medium.com/@pjpiotrowski
- status
- ok
- fetched_at
- 2026-06-26 06:47:43