This prompt guides you, a coding agent, to install Goal in a repository. Goal is an agentic workflow that works labeled GitHub issues until their completion contract is satisfied by evidence.
Set up Goal in this repository by:
- Installing the
gh-awCLI extension. - Initializing the repository for GitHub Agentic Workflows.
- Copying Goal workflow files and the issue template.
- Compiling the workflow.
- Creating the
goalandgoal-completedlabels. - Adding agent instructions so generated workflow files stay fresh.
- Creating a branch, committing, and opening a pull request.
- Helping the user create their first strong goal issue.
Install the extension directly through GitHub CLI:
gh extension install github/gh-awVerify installation:
gh aw versionIf this fails, check that gh is installed and authenticated:
gh --version
gh auth statusgh aw initThis configures the repository for Agentic Workflows.
Download the Goal source as a zip and copy the workflow files into this repository.
curl -fL https://github.com/githubnext/goal/archive/refs/heads/main.zip -o /tmp/goal.zip
unzip -q /tmp/goal.zip -d /tmp/goal_extract
mkdir -p .github/workflows .github/ISSUE_TEMPLATE
cp -R /tmp/goal_extract/goal-main/workflows/. .github/workflows/
cp -R /tmp/goal_extract/goal-main/.github/ISSUE_TEMPLATE/. .github/ISSUE_TEMPLATE/
rm -rf /tmp/goal.zip /tmp/goal_extractIf unzip is not available, replace the unzip line with:
mkdir -p /tmp/goal_extract && tar -xf /tmp/goal.zip -C /tmp/goal_extractInvoke-WebRequest -Uri "https://github.com/githubnext/goal/archive/refs/heads/main.zip" -OutFile "$env:TEMP\goal.zip"
Expand-Archive -Path "$env:TEMP\goal.zip" -DestinationPath "$env:TEMP\goal_extract" -Force
New-Item -ItemType Directory -Force -Path ".github/workflows", ".github/ISSUE_TEMPLATE" | Out-Null
Copy-Item -Path "$env:TEMP\goal_extract\goal-main\workflows\*" -Destination ".github/workflows/" -Recurse -Force
Copy-Item -Path "$env:TEMP\goal_extract\goal-main\.github\ISSUE_TEMPLATE\*" -Destination ".github\ISSUE_TEMPLATE\" -Recurse -Force
Remove-Item -Path "$env:TEMP\goal.zip", "$env:TEMP\goal_extract" -Recurse -ForceTo pin a version, replace refs/heads/main with refs/tags/<tag> and replace
goal-main with goal-<tag>.
gh aw compile goalThis generates .github/workflows/goal.lock.yml from
.github/workflows/goal.md.
Create the labels used by the workflow. If a label already exists, leave it in place.
gh label create goal --color 0969da --description "Agentic goal workflow should continue working this issue" || true
gh label create goal-completed --color 1a7f37 --description "Agentic goal workflow completed this issue" || trueAdd or update AGENTS.md with:
## Agentic Workflows
After modifying any `.md` workflow file under `.github/workflows/`, always
recompile and commit the generated workflow files with the source change:
```bash
gh aw compile
apm compile
```
For Goal issues, keep the completion contract evidence-based. A goal is complete
only when the issue's stated verification evidence supports it.If the repository uses CLAUDE.md, COPILOT.md, or another agent instruction
file, add the same note there too.
git checkout -b install-goal
git add .
git commit -m "Install Goal workflow"
git push -u origin install-goal
gh pr create --title "Install Goal workflow" --body "Set up the Goal agentic workflow and issue template."Report the pull request link to the user.
Before opening or labeling a goal issue, work with the user to make the goal very actionable. Do not settle for "fix this", "improve this", or "make it better" if the issue does not define how completion will be proven.
Use this shaping protocol:
- Restate the desired outcome in one sentence.
- Ask only for missing details that cannot be discovered from the repository.
- Turn the answer into a goal issue with these sections:
GoalCompletion ContractEvidence / VerificationScope and ConstraintsIteration PolicyBlocked Stop Condition
- Review the draft with the user before adding the
goallabel. - Once the user agrees, create the issue and apply the
goallabel.
The distilled pattern is:
Complete <desired end state>, verified by <specific evidence>, while preserving
<constraints>. Use <allowed files, tools, data, and boundaries>. Between runs,
choose the next smallest checkpoint based on the latest evidence and human
comments. If blocked or no defensible path remains, stop substantive work and
report <what failed, what is known, and what would unlock progress>.
A strong issue tells the workflow what "done", "not done yet", and "blocked" mean. It should include at least one concrete verification surface: a test command, build command, benchmark, screenshot requirement, artifact review, log check, or source-of-truth document.
## Goal
Migrate the authentication tests from the legacy helper to `createTestSession`.
## Completion Contract
Every authentication test uses `createTestSession`, the legacy helper has no
remaining call sites in `tests/auth`, and the auth test suite and lint pass.
## Evidence / Verification
```bash
rg "legacyAuthHelper" tests/auth
npm test -- tests/auth
npm run lint
```
Completion requires `rg` to find no call sites and both commands to exit 0.
## Scope and Constraints
Allowed files:
- `tests/auth/**`
- `test/helpers/auth.ts`
Do not change production authentication behavior.
## Iteration Policy
Migrate one coherent test group at a time. After each run, execute the smallest
relevant test command before broadening to the whole auth suite.
## Blocked Stop Condition
If the tests need unavailable secrets or services, stop and comment with the
exact missing dependency, the command output, and the smallest next action for a
maintainer.- Confirm
.github/workflows/goal.mdexists. - Confirm
.github/workflows/scripts/goal_scheduler.pyexists. - Run
gh aw compile goal --verbose.
- Confirm the issue is open.
- Confirm the issue has the exact
goallabel. - Confirm it has not already been relabeled
goal-completed. - Check the workflow run log for
/tmp/gh-aw/goal.json.
- Goal repository: https://github.com/githubnext/goal
- GitHub Agentic Workflows: https://github.github.com/gh-aw/