Skip to content

refactor: define agent steps as yaml list - #974

Merged
skevetter merged 1 commit into
agent-no-ci-wait-after-prfrom
agent-steps-from-yaml
Aug 9, 2026
Merged

skevetter merged 1 commit into
agent-no-ci-wait-after-prfrom
agent-steps-from-yaml

Conversation

@devsy-app

@devsy-app devsy-app Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Refactor the automation prompt generator so each agent's numbered steps are
authored as an ordered steps: list in agents.yaml, with step numbers assigned
automatically by list position. This removes the manual commit_step_number /
pr_step_number / hardcoded "STEP N" strings inside the review_steps blob that
had to be renumbered by hand whenever a step was inserted or reordered.

Step kinds:

  • install: toolchain install block (title from YAML, body from toolchain)
  • verify: CI-equivalent verify block; verify_extras adds extra bullets
  • commit: app-signed commit instructions (scaffolded)
  • pr: open-PR instructions (scaffolded)
  • note: verbatim preamble, no "STEP N — " prefix, no number consumed
  • (none): plain step; body is the full text rendered after "STEP N — "

template.md.tmpl is now thin scaffolding around four pre-rendered, auto-numbered
blocks ({{.InstallStep}}, {{.ReviewSteps}}, {{.CommitStep}}, {{.PRStep}}). The
shared scaffold (frontmatter, intro, scope, open-PR guard, formatting gate,
completion note, constraints, self-improvement) stays in the template.

The generated agent.md files are byte-identical to the previous state
(go run ./hack/automations -check is clean, 0 diff vs the prior generated
output), so this is a pure generator refactor with no prompt changes and no
cloud re-sync required.

Verified: go test ./hack/automations ok, -check exit 0, golangci-lint 0 issues,
-sync -dry-run reports 14/14 up to date.

This PR was created by an AI agent as part of an automated templating refactor.

Refactor the automation prompt generator so each agent's numbered steps are
authored as an ordered `steps:` list in agents.yaml, with step numbers assigned
automatically by list position. This removes the manual `commit_step_number` /
`pr_step_number` / hardcoded "STEP N" strings inside the review_steps blob that
had to be renumbered by hand whenever a step was inserted or reordered.

Step kinds:
- install: toolchain install block (title from YAML, body from `toolchain`)
- verify:  CI-equivalent verify block; `verify_extras` adds extra bullets
- commit:  app-signed commit instructions (scaffolded)
- pr:      open-PR instructions (scaffolded)
- note:    verbatim preamble, no "STEP N — " prefix, no number consumed
- (none):  plain step; `body` is the full text rendered after "STEP N — "

template.md.tmpl is now thin scaffolding around four pre-rendered, auto-numbered
blocks (, , , ). The
shared scaffold (frontmatter, intro, scope, open-PR guard, formatting gate,
completion note, constraints, self-improvement) stays in the template.

The generated agent.md files are byte-identical to the previous state
(`go run ./hack/automations -check` is clean, 0 diff vs the prior generated
output), so this is a pure generator refactor with no prompt changes and no
cloud re-sync required.

Verified: go test ./hack/automations ok, -check exit 0, golangci-lint 0 issues,
-sync -dry-run reports 14/14 up to date.

This PR was created by an AI agent as part of an automated templating refactor.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 22 complexity · 0 duplication

Metric Results
Complexity 22
Duplication 0

View in Codacy

AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@skevetter
skevetter marked this pull request as ready for review August 9, 2026 23:42
@skevetter
skevetter merged commit 351c09d into agent-no-ci-wait-after-pr Aug 9, 2026
14 checks passed
@skevetter
skevetter deleted the agent-steps-from-yaml branch August 9, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant