Workflow chains
AuraScore 81/100

Automated AST Migration and Verification Pipeline Specification

Specify an automated multi-agent workflow chain for codebase refactoring, static analysis, and regression testing.

Use this template when establishing an automated pipeline of specialized agents tasked with transforming legacy source code and validating functional parity. It produces a comprehensive engineering specification for agent routing, static verification gates, and pull request issuance.

Template

Role: Staff Software Quality Engineer specializing in automated developer tooling, AST code transformations, and CI/CD verification chains.

Context

  • Source Repository & Language: {{source_repository}}
  • Target Migration Standard: {{target_framework_version}}
  • Test Verification Harness: {{verification_test_suite}}
  • Agent Router Architecture: {{llm_router_config}}
  • Human Review Gate: {{human_review_gate}}
  • Pull Request Policy: {{pull_request_policy}}

Task

Produce an Engineering Pipeline Specification for an autonomous multi-agent refactoring workflow chain that ingests {{source_repository}}, performs syntactically valid upgrades to {{target_framework_version}}, validates output against {{verification_test_suite}}, and adheres to {{pull_request_policy}}.

Method

  1. Establish file discovery and partitioning logic to chunk the codebase within {{source_repository}} by dependency graph order.
  2. Define prompt and tool-call contracts for the Analyzer Agent to identify deprecated APIs and incompatible syntax.
  3. Define the Transformation Agent spec, detailing AST-aware patch generation targetting {{target_framework_version}}.
  4. Design the Linter and Static Analysis Agent step that executes local compile checks before test running.
  5. Specify the Test Runner Agent protocol that executes {{verification_test_suite}} and feeds stack traces back on failure.
  6. Detail an automated self-healing loop permitting a maximum of 3 localized remediation cycles on test failure.
  7. Define the boundary conditions where {{human_review_gate}} is triggered versus automated PR submission under {{pull_request_policy}}.

Constraints

  • MUST NOT permit any transformed code to bypass {{verification_test_suite}} prior to PR generation.
  • Generated code patches MUST maintain byte-level deterministic formatting matching repository lint rules.
  • The self-healing loop MUST abort and trigger {{human_review_gate}} if the same test fails consecutively twice.
  • All agent token budgets and execution timeouts must be bounded per file.

Output format

  1. Multi-Agent Pipeline Topology (Workflow diagram, step dependencies, and tool execution boundaries)
  2. Agent Node Specifications (Individual agent inputs, outputs, system prompt constraints, and allowed tool calls)
  3. Self-Correction & Feedback Loop Protocol (Stack trace parsing, prompt injection format, and backoff limits)
  4. Quality Gate & PR Lifecycle Policy (Criteria for mergeability, diff size limits, and {{human_review_gate}} escalation rules)

Self-review

  • Ensure dependency-ordered processing prevents circular refactoring conflicts.
  • Verify self-healing loop has a deterministic exit condition to prevent infinite LLM token spend.
  • Check that {{target_framework_version}} and {{verification_test_suite}} constraints are strictly enforced in the quality gates.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

ai-agents
agents-workflows
software-engineering-debugging
code-refactoring
ast-migration
ci-cd-agents