Most of the work in a data engineering story is predictable. You read the ask, figure out which job changes, write tests, write the code, check it against team standards, open a merge request, and wait for review. Each step is well understood, yet each one still takes a person's time.
So I asked: what if a Jira story could walk itself most of the way to a merge request?
I built an agentic pipeline that does exactly that for AWS Glue (PySpark) jobs. You move a story to Ready for Agent, and five agents carry it through analysis, test-first development, a standards review, and an AI code review. The result is a GitLab merge request waiting for a human.
The five agents
Each agent is built with Strands Agents on Amazon Bedrock (Claude Sonnet) and has one clearly scoped job:
- Analyst: reads the story and produces a structured technical spec. If the story is too vague to build, it posts clarifying questions to Jira and stops the pipeline instead of guessing.
- Test engineer: writes unit tests from the spec before any code exists, simulating the input data and expected output the tests need.
- Developer: changes the Glue job until ruff and pytest pass.
- Standards reviewer: checks the diff against the team's
engineering-standards.md, rule by rule, and returns findings tagged with rule IDs and a severity. - Code reviewer: an independent agent that leaves inline comments on the merge request, the way a teammate would.
Keeping each agent narrow made them far easier to prompt, test, and trust than one large agent trying to do everything.
Every agent also returns structured output defined as Pydantic models: a spec, a test report, a list of findings. That means the pipeline never has to parse free text to decide what happens next. It reads fields like ready_for_development or a finding's severity directly.
How it runs on AWS
A Jira Automation rule fires when a story moves to Ready for Agent and calls API Gateway. That starts a Step Functions state machine with four steps, each with its own Catch so a failure stops cleanly instead of cascading. Every step runs as a CodeBuild build that clones the repos and runs that step's script. Run state and artifacts are stored in S3, and the Jira and GitLab tokens live in Secrets Manager.
One CloudFormation template creates all 17 resources, so the whole setup can be deployed or torn down in a few minutes. For local demos, a single run_pipeline.py command runs the same steps end to end, with a --pause flag to stop between steps and show what each agent produced.
The stack is deliberately plain: Python 3.11 and PySpark 3.5.3 to match AWS Glue 5.0, ruff for linting, pytest for tests, boto3 for AWS, and reportlab for the test evidence PDF.
What a run looks like
The repo includes two demo stories that show both sides of the pipeline.
The first is a well-defined story: add an email_domain column to the customer ingest job, with clear rules and acceptance criteria. The Analyst writes a spec and moves the story to In Progress. The Test engineer writes failing tests. The Developer iterates until those tests and the linter pass, and the pipeline commits the change to a feature branch. The Standards reviewer finds no blockers, so the branch is pushed and a merge request opens, linked to the story. Finally, the Code reviewer leaves its inline comments, and a human takes it from there.
The second is deliberately vague: "Improve customer data quality," with no specific columns, rules, or acceptance criteria. The Analyst doesn't guess. It posts questions to the story (which columns, what rules, which downstream teams, what counts as done) and the state machine ends at a red "needs clarification" state. No branch is created and nothing reaches GitLab.
That second demo matters as much as the first. An agent that knows when to stop is more useful than one that confidently builds the wrong thing.
The design rules that made it work
The agents were the easy part. Making them reliable came down to a handful of rules:
- Agents think, code acts. Agents read and reason. Plain Python runs the checks, commits, pushes, and opens the MR, because code does the same thing every time and an agent might skip a step or report success that didn't happen.
- Verdicts are computed, not claimed. The pipeline re-runs every check itself. Pass/fail and severity are calculated in code from the agent's structured output, and rule IDs are validated against the real standards document.
- Boundaries are enforced, not requested. The Test engineer can only write under
tests/and the Developer only underglue_jobs/. This is enforced through path resolution in the workspace tools, not just in the prompt. - Reviewers stay independent. The Standards agent reads the standards from
main, not from the branch under review, so a change can't quietly rewrite the rules it's judged against. The Code reviewer never sees the Developer's reasoning. - Humans stay in control. A person decides when agents start, reviews the MR, and merges it. Agents never approve or merge.
The lesson I didn't plan for
During one run, the Developer agent hit a Python/PySpark version incompatibility in my local environment. Rather than report it, the agent monkey-patched PySpark inside glue_jobs/__init__.py. The tests passed, but for the wrong reason.
That single incident led to several guardrails: protected files the agents can't touch (conftest.py, __init__.py), an environment_issue field so the agent can report a broken environment instead of working around it, a pre-flight Spark smoke test before any agent runs, and explicit rules against patching libraries.
The takeaway: if you give an agent a goal like "make the tests pass," it will find paths you didn't anticipate. Guardrails belong in code, where they can't be reasoned around.
Traceability
Every run leaves a trail linked from the Jira story: the spec, the test and developer reports, the standards review, the code review, and a test evidence PDF tied to the exact commit. When someone asks "why does this code look like this?", the answer is one click away.
The demo uses a fictional bank, Northwind Community Bank, and all of its code and data are fictional.
What's next
The current version runs on CodeBuild and Step Functions. Next, I plan to build a version on Amazon Bedrock AgentCore Runtime and extend the pipeline beyond Glue to Lambda functions.
Read the full article
The architecture diagrams, a walkthrough of each agent, CloudFormation deployment steps, and both demo stories are in the repo:

