This repository provides an opinionated workflow designed to enhance the performace of teams working with coding agents, such as OpenAI Codex, Claude Code, Google Jules, GitHub Copilot, Goose, OpenHands and others.
The workflow standardizes how tasks are defined, and tracked, leveraging your VCS (e.g. git) as the primary driving interface.
The primary goal of this workflow is to:
-
Use git as the primary interface for driving Codex:
Provides a convenient way to assign tasks to Codex right from your command-line.
-
Maintain a transparent history:
All task descriptions are committed to Git, creating an auditable trail and a knowledge base demonstrating how tasks are approached and solved.
This allows team members to learn from each other's practices and makes
git blame
an effective tool for understanding the intention behind all code. The workflow injects instructions that teach the agents how to leverage this. -
Deal with the current limitations around internet connectivity:
By pre-fetching internet resources mentioned in the task descriptions, agents such as Codex are more successful at dealing with problems that require information that is not part of the codebase.
-
Simplify the agents workspace setup:
The
.agents/codex-setup
script is stored in your repository, simplifying the maintainance of the workspace.
-
Starting a Task (Developer):
When a developer needs to assign a task to the agent, they run the
agent-task
command. If a branch name is provided it starts a new branch, otherwise it appends a follow-up task on the current branch.agent-task [branch-name]
This script will:
- When a branch name is supplied, create the branch first and abort early with the VCS error message if the name is invalid.
- Prompt the developer to enter the task description in an editor.
- Commit the task description to a file within a
.agents/tasks/
directory on the new branch or append it as a follow-up task if no branch was given. - Push the branch to the default remote.
The command accepts a few options for non-interactive use:
--push-to-remote=BOOL
– automatically push to the default remote without prompting.--prompt=STRING
– useSTRING
as the task description instead of launching an editor.--prompt-file=FILE
– read the task description fromFILE
.--devshell=NAME
(-s
) – record the given Nix dev shell in the initial commit message.
The command also provides a
setup
subcommand that prints the versions ofcodex
andgoose
available in the currentPATH
. -
Retrieving a Task (Coding Agent):
Once the developer has set up the task, they instruct the agent to switch to the right branch and retrieve its instructions. A typical prompt for an agent would be:
Run the `get-task` command and follow the provided instructions.
The
get-task
script will print the task description for the agent, along with instructions for accessing the downloaded internet resources and working with the git history.
This workflow supports setup for multiple AI coding agent systems:
- Codex - OpenAI's code generation model
- Jules - AI pair programming assistant
- Goose - AI-powered development tool
- Open Hands - Open-source AI coding assistant
- GitHub Copilot - GitHub's AI pair programmer
Each agent system has a dedicated setup script (e.g., codex-setup
, jules-setup
) that follows a three-phase setup process:
.agents/common-pre-setup
runs first (if it exists in your project).agents/{agent}-setup
runs for agent-specific configuration (if it exists).agents/common-post-setup
runs last for finalization tasks (if it exists)
This architecture allows you to share common setup logic across all agent systems while customizing setup for specific agents when needed.
In your Codex environment's Advanced settings, enter the following setup script:
git clone https://github.com/metacraft-labs/agents-workflow
agents-workflow/codex-setup
In the Jules web-interface, select a codebase in the left-hand-side panel, click "Configuration" and enter the following Initial Script:
git clone https://github.com/metacraft-labs/agents-workflow
agents-workflow/codex-setup
TBD - Usage instructions for Goose will be added once integration is tested.
TBD - Usage instructions for Open Hands will be added once integration is tested.
TBD - Usage instructions for GitHub Copilot will be added once integration is tested.
NIX=1
- Set this to enable Nix installation during common-pre-setup
The scripts can be installed as a gem for easier reuse:
gem install --local agents-workflow.gem
This will provide the agent-task
, get-task
, and download-internet-resources
executables in your PATH
.
To enable bash completion for agent-task
, source the script scripts/agent-task-completion.bash
in your shell profile.
This repository also provides a Nix flake. The default package installs the agent-task
binary with codex
and goose
available in its PATH
. An additional agent-utils
package bundles the get-task
and start-work
binaries.
nix run github:metacraft-labs/agents-workflow
Or install the utilities package:
nix profile install github:metacraft-labs/agents-workflow#agent-utils
The core components include:
codex-setup
: A script to initialize the workspace, download necessary internet resources, and run project-specific setup.agent-task
: A script for developers to begin a new task, automatically creating a dedicated branch and storing the task description.agent-task setup
: Prints the versions ofcodex
andgoose
available inPATH
.get-task
: A script for the coding agent to retrieve its current task instructions.start-work
: A helper that configures a freshly checked-out repository for development.download-internet-resources
: A helper script that scans task descriptions for URLs and downloads them (or clones Git repositories) for offline access.
We envision that the manual step of prompting the agent to run get-task
could be automated in the future through:
- An API integration with Codex.
- (interim) A browser extension that drives the Codex WebUI.