{
  "morphyFlow": 1,
  "name": "Planned feature",
  "tagline": "A spec you approve, two builders in their own copies opening pull requests, and QA that tests both before you merge.",
  "description": "For a feature that wants a plan. A planner reads your repository and writes a short spec split into one or two tasks; you edit and approve it in a review card. Two builders each take a task in their own copy of the repository (git worktrees on their own branches) and open a pull request each. QA waits for both, checks each pull request out, runs the tests, tries the change and leaves its result on GitHub. The pull requests land in a results card for you to merge. Needs git and GitHub CLI (gh), signed in.",
  "kind": "Development",
  "brief": "Changes go through a branch and a pull request, and the user merges. Never push to the main branch, force-push or delete branches.",
  "code": true,
  "mixed": false,
  "start": {
    "split": false,
    "text": "",
    "schedule": {
      "every": "off",
      "at": "09:00",
      "day": 1
    }
  },
  "steps": [
    {
      "ref": "planner",
      "kind": "chat",
      "title": "Planner",
      "job": "Read the request and the repository, then write a short spec: what changes and why, the files it touches, how it will be tested, and what is out of scope. End with the work split into at most two independent tasks, each under its own heading: `## Task 1` and `## Task 2` (one task is fine for a small change).",
      "provider": "",
      "model": "",
      "folder": "repo"
    },
    {
      "ref": "approve",
      "kind": "step",
      "step": "review",
      "title": "Approve the spec"
    },
    {
      "ref": "builder-1",
      "kind": "chat",
      "title": "Builder 1",
      "job": "You get an approved spec. Do only its `## Task 1`, in your own copy of the repository on your own branch: make it, run the tests, commit, `git push -u origin HEAD`, then `gh pr create --fill`. Answer with the pull request’s link and what it does.",
      "provider": "",
      "model": "",
      "folder": "worktree"
    },
    {
      "ref": "builder-2",
      "kind": "chat",
      "title": "Builder 2",
      "job": "You get an approved spec. Do only its `## Task 2`, in your own copy of the repository on your own branch: make it, run the tests, commit, `git push -u origin HEAD`, then `gh pr create --fill`. Answer with the pull request’s link and what it does. If the spec has no `## Task 2`, answer only: No second task.",
      "provider": "",
      "model": "",
      "folder": "worktree"
    },
    {
      "ref": "qa",
      "kind": "chat",
      "title": "QA",
      "job": "You get the builders’ answers. For each pull request: `gh pr checkout <link>` in your copy, run the tests and try the change the way a user would. Leave the result on GitHub (`gh pr review <link> --comment -b \"…\"`). Answer with each link and PASS, or what failed and how to see it.",
      "provider": "",
      "model": "",
      "folder": "worktree"
    },
    {
      "ref": "prs",
      "kind": "step",
      "step": "results",
      "title": "Pull requests"
    }
  ],
  "arrows": [
    {
      "from": "start",
      "to": "planner",
      "mode": "each",
      "ask": false
    },
    {
      "from": "planner",
      "to": "approve",
      "mode": "each",
      "ask": false
    },
    {
      "from": "approve",
      "to": "builder-1",
      "mode": "each",
      "ask": false
    },
    {
      "from": "approve",
      "to": "builder-2",
      "mode": "each",
      "ask": false
    },
    {
      "from": "builder-1",
      "to": "qa",
      "mode": "all",
      "ask": false
    },
    {
      "from": "builder-2",
      "to": "qa",
      "mode": "all",
      "ask": false
    },
    {
      "from": "qa",
      "to": "prs",
      "mode": "each",
      "ask": false
    }
  ]
}
