|
| 1 | +# Goal |
| 2 | + |
| 3 | +Goal turns a GitHub issue into a durable agentic workflow. Open an issue with the |
| 4 | +`goal` label, define what "done" means, and the workflow keeps working on the |
| 5 | +same branch and pull request until the evidence satisfies the goal. When it is |
| 6 | +done, the workflow adds `goal-completed` and removes `goal`. |
| 7 | + |
| 8 | +Goal runs on [GitHub Agentic Workflows](https://github.github.com/gh-aw/setup/quick-start/) |
| 9 | +and [GitHub Copilot](https://github.com/features/copilot). |
| 10 | + |
| 11 | +## Quick Start |
| 12 | + |
| 13 | +Paste this into your favorite coding agent session on the repo where you want to |
| 14 | +run Goal: |
| 15 | + |
| 16 | +```text |
| 17 | +Install goal using https://github.com/githubnext/goal/blob/main/install.md |
| 18 | +``` |
| 19 | + |
| 20 | +The agent will install GitHub Agentic Workflows if needed, copy the Goal |
| 21 | +workflow, compile it, create labels and issue templates, and help you turn your |
| 22 | +first rough idea into a concrete goal issue. |
| 23 | + |
| 24 | +## How It Works |
| 25 | + |
| 26 | +1. Create a GitHub issue with the `goal` label. |
| 27 | +2. Describe the outcome, completion contract, verification evidence, scope, and |
| 28 | + blocked stop condition. |
| 29 | +3. On each scheduled run, Goal selects one active issue, reads the issue and new |
| 30 | + comments, and advances the work on the canonical branch `goal/<issue>-<slug>`. |
| 31 | +4. The workflow keeps exactly one draft PR for that issue and updates the PR body |
| 32 | + as evidence changes. |
| 33 | +5. Every run posts a new comment on the goal issue and updates a status comment. |
| 34 | +6. When the completion contract is satisfied by concrete evidence, Goal comments |
| 35 | + with the evidence, adds `goal-completed`, and removes `goal`. |
| 36 | + |
| 37 | +Goal stores durable state in repo-memory on the `memory/goal` branch. The state |
| 38 | +file records the issue, branch, PR, last run, current checkpoint, lessons, |
| 39 | +blockers, and run history. Humans can edit the issue or comment with steering; |
| 40 | +the next run treats that input as part of the active contract. |
| 41 | + |
| 42 | +## Goal Issues |
| 43 | + |
| 44 | +A good goal issue is a compact contract, not a vague backlog item. It should |
| 45 | +answer: |
| 46 | + |
| 47 | +- **Outcome**: what should be true when the work is done. |
| 48 | +- **Evidence**: which commands, tests, files, screenshots, logs, or artifacts |
| 49 | + prove the outcome. |
| 50 | +- **Constraints**: what must not change, regress, or be modified. |
| 51 | +- **Boundaries**: which files, tools, services, or data the workflow may use. |
| 52 | +- **Iteration policy**: how the agent should choose the next action after each |
| 53 | + run. |
| 54 | +- **Blocked stop condition**: when the workflow should stop substantive work and |
| 55 | + report what would unlock progress. |
| 56 | + |
| 57 | +Use the included issue template, or write the sections directly: |
| 58 | + |
| 59 | +````markdown |
| 60 | +## Goal |
| 61 | + |
| 62 | +Ship the new checkout retry path. |
| 63 | + |
| 64 | +## Completion Contract |
| 65 | + |
| 66 | +The retry path is implemented, old checkout behavior still passes its tests, and |
| 67 | +the issue can be closed when the commands below pass on the PR branch. |
| 68 | + |
| 69 | +## Evidence / Verification |
| 70 | + |
| 71 | +```bash |
| 72 | +npm test -- checkout |
| 73 | +npm run lint |
| 74 | +``` |
| 75 | + |
| 76 | +## Scope and Constraints |
| 77 | + |
| 78 | +Allowed files: |
| 79 | +- `src/checkout/**` |
| 80 | +- `tests/checkout/**` |
| 81 | + |
| 82 | +Do not change public API names or payment provider configuration. |
| 83 | + |
| 84 | +## Iteration Policy |
| 85 | + |
| 86 | +Prefer the smallest checkpoint that can be verified in one run. Read new human |
| 87 | +comments before choosing the next checkpoint. |
| 88 | + |
| 89 | +## Blocked Stop Condition |
| 90 | + |
| 91 | +If the tests require credentials or fixtures unavailable to the workflow, stop |
| 92 | +and comment with the missing item and the smallest reproducible evidence. |
| 93 | +```` |
| 94 | + |
| 95 | +## Branches And PRs |
| 96 | + |
| 97 | +Each goal issue owns one long-running branch: |
| 98 | + |
| 99 | +```text |
| 100 | +goal/<issue-number>-<slugified-title> |
| 101 | +``` |
| 102 | + |
| 103 | +Examples: |
| 104 | + |
| 105 | +- `goal/42-fix-checkout-retry` |
| 106 | +- `goal/108-migrate-auth-tests` |
| 107 | + |
| 108 | +Goal always reuses the same branch and the same draft PR for an issue. It never |
| 109 | +creates per-run branch suffixes, run IDs, or random tokens. |
| 110 | + |
| 111 | +## Repository Structure |
| 112 | + |
| 113 | +```text |
| 114 | +goal/ |
| 115 | +|-- install.md |
| 116 | +|-- workflows/ |
| 117 | +| |-- goal.md |
| 118 | +| |-- scripts/ |
| 119 | +| | `-- goal_scheduler.py |
| 120 | +| `-- shared/ |
| 121 | +| `-- reporting.md |
| 122 | +|-- .github/ |
| 123 | +| `-- ISSUE_TEMPLATE/ |
| 124 | +| `-- goal.md |
| 125 | +`-- tests/ |
| 126 | + `-- test_goal_scheduler.py |
| 127 | +``` |
| 128 | + |
| 129 | +## Built On |
| 130 | + |
| 131 | +- [GitHub Agentic Workflows](https://github.com/github/gh-aw) |
| 132 | +- [GitHub Copilot](https://github.com/features/copilot) |
| 133 | +- Goal-command ideas from Codex and Claude Code: durable objectives, explicit |
| 134 | + evidence, scoped continuation, and evidence-based completion. |
0 commit comments