Skip to content

Adopt Agentic Workflows as the single AI execution model - #22

Merged
mjrousos merged 2 commits into
mainfrom
adopt-agentic-workflows
Jul 25, 2026
Merged

Adopt Agentic Workflows as the single AI execution model#22
mjrousos merged 2 commits into
mainfrom
adopt-agentic-workflows

Conversation

@mjrousos

Copy link
Copy Markdown
Owner

Summary

Fully adopts GitHub Agentic Workflows (gh-aw) as AutoDev's single AI execution model and removes the Copilot Agent Tasks API. Every AI-assisted state is now either a direct orchestrator Action (Initialization) or a dispatched Agentic Workflow (Research today; Design/SecurityReview/Implementation/CodeReview follow the same pattern).

Code changes

  • Deleted agent-tasks-client.mjs, its test, and autodev-research.agent.md.
  • config.mjs: single AGENTIC_WORKFLOW handler type for all AI states; removed CUSTOM_AGENTS and the dead isExternalExecutionState. A workflow's read-only (e.g. CodeReview) vs producer nature is expressed by its declared safe outputs, not the handler type.
  • handlers/research.mjs: removed the legacy Tasks launcher (buildResearchPrompt/startResearch); kept the live advanceToResearch workflow dispatch.
  • main.mjs / dispatcher.mjs: removed the AgentTasks client and AUTODEV_AGENT_TASKS_TOKEN plumbing. transitions.mjs: only the Initialization inline handoff must keep headSha unchanged. autodev-orchestrator.yml: dropped the Tasks token.

Docs

  • README, .github/copilot-instructions.md, and the plan/requirements/migration docs revised AW-first.
  • Credential model reduced to GITHUB_TOKEN + AUTODEV_CALLBACK_TOKEN; removed the Copilot MCP setup section and the Agent Tasks / MCP secrets.
  • Milestone 3 marked complete (Research validated live end-to-end).

Validation

  • node --test .github/scripts/autodev/test/*.test.mjs -> 71/71 pass.
  • gh aw compile --validate -> clean.

Remove the Copilot Agent Tasks API and make every AI-assisted state a
dispatched GitHub Agentic Workflow (gh-aw).

- Delete agent-tasks-client.mjs, its test, and autodev-research.agent.md.
- config.mjs: collapse handler types to a single AGENTIC_WORKFLOW used by
  Research/Design/SecurityReview/Implementation/CodeReview; a workflow's
  read-only vs producer nature is expressed by its declared safe outputs,
  not the handler type. Remove CUSTOM_AGENTS and dead isExternalExecutionState.
- handlers/research.mjs: drop the legacy buildResearchPrompt/startResearch
  Tasks launcher; keep the live advanceToResearch workflow dispatch.
- main.mjs/dispatcher.mjs: remove AgentTasksClient and AUTODEV_AGENT_TASKS_TOKEN
  plumbing. transitions.mjs: only the Initialization inline handoff must keep
  headSha unchanged. autodev-orchestrator.yml: drop AUTODEV_AGENT_TASKS_TOKEN.
- Docs: README, copilot-instructions, plan/requirements/migration docs revised
  AW-first; credentials reduced to GITHUB_TOKEN + AUTODEV_CALLBACK_TOKEN; the
  Copilot MCP setup section removed. Milestone 3 marked complete.

Tests: 71/71 pass; gh aw compile --validate clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21aed587-7a92-472c-a7cb-5f1d8cf33fd7

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes AutoDev’s migration to GitHub Agentic Workflows (gh-aw) as the single AI execution model by removing the Copilot Agent Tasks API integration and updating state handling, documentation, and tests accordingly.

Changes:

  • Removes the Agent Tasks client/token plumbing and legacy Research task-launch path, standardizing AI execution on gh-aw dispatch + safe outputs + structured callbacks.
  • Updates state/transition semantics so all AI-assisted states share the AGENTIC_WORKFLOW handler type (with workflow safe outputs defining read-only vs producer behavior).
  • Revises repository documentation/plans and updates tests to reflect the new execution model.
Show a summary per file
File Description
README.md Updates setup/auth model to gh-aw + callback PAT, removes Agent Tasks/MCP setup guidance.
.github/workflows/autodev-orchestrator.yml Drops AUTODEV_AGENT_TASKS_TOKEN from orchestrator job env.
.github/scripts/autodev/config.mjs Collapses automated AI states onto AGENTIC_WORKFLOW; removes Agent Tasks handler type and custom-agent mapping.
.github/scripts/autodev/main.mjs Removes Agent Tasks client initialization and AUTODEV_AGENT_TASKS_TOKEN requirement.
.github/scripts/autodev/dispatcher.mjs Removes agentTasks parameter plumbing from dispatch path.
.github/scripts/autodev/handlers/research.mjs Removes legacy Agent Tasks prompt/launcher; keeps gh-aw dispatch path.
.github/scripts/autodev/transitions.mjs Updates transition validation rules for unified gh-aw model (only Initialization handoff is SHA-immutable).
.github/scripts/autodev/test/config.test.mjs Updates expectations to reflect RESEARCH using AGENTIC_WORKFLOW.
.github/scripts/autodev/test/transitions.test.mjs Updates/renames test coverage for CodeReview under unified handler model.
.github/scripts/autodev/test/research.test.mjs Removes tests tied to deleted Agent Tasks prompt/custom agent artifacts.
.github/scripts/autodev/agent-tasks-client.mjs Deleted: Agent Tasks API client removed.
.github/scripts/autodev/test/agent-tasks-client.test.mjs Deleted: tests for removed Agent Tasks client.
.github/agents/autodev-research.agent.md Deleted: custom agent definition removed.
.github/copilot-instructions.md Updates architecture guidance to gh-aw-only execution model.
.github/plans/initial-requirements.md Updates requirements to gh-aw-based execution and callback model.
.github/plans/initial-implementation.plan.md Updates plan to gh-aw-only execution model, milestones, and constraints.
.github/plans/gh-aw-migration.plan.md Marks migration status complete and updates rollback/follow-on narrative.

Review details

  • Files reviewed: 17/17 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread .github/scripts/autodev/test/transitions.test.mjs
Comment thread .github/plans/gh-aw-migration.plan.md Outdated
- transitions.test.mjs: tighten the CodeReview non-success assertion to verify
  the specific error code (invalid-human-state, raised by result-record
  validation) instead of only asserting ContractValidationError.
- gh-aw-migration.plan.md: fix the self-contradictory "Follow-on (completed)"
  section — only the Tasks API removal (item 2) is done; migrating
  Design/SecurityReview/Implementation (items 1, 3) remains open.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 21aed587-7a92-472c-a7cb-5f1d8cf33fd7

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 17/17 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment on lines +81 to +86
// The Initialization handoff runs inline in the orchestrator and does not
// advance the branch head, so its result must reference the recorded head
// SHA. Dispatched Agentic Workflows may advance the head (producers) or
// leave it unchanged (reviews); a review's read-only nature is enforced by
// its workflow safe outputs, not here.
if (isSynchronousHandoff && result.headSha !== currentTask.headSha) {
Comment on lines +172 to +176
// A single AGENTIC_WORKFLOW handler type covers every automated state, so the
// transition validator no longer enforces head-SHA immutability for reviews.
// CodeReview expresses its read-only nature through its workflow safe outputs
// (it declares no push output), not through a distinct handler type. A result
// is accepted whether or not it changes the head SHA.
@mjrousos
mjrousos merged commit 3522c1a into main Jul 25, 2026
1 check passed
@mjrousos
mjrousos deleted the adopt-agentic-workflows branch July 25, 2026 03:09
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.

2 participants