@idea1/cli 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +120 -63
  2. package/dist/cli/named-lists.d.ts +1 -1
  3. package/dist/cli/named-lists.d.ts.map +1 -1
  4. package/dist/cli/named-lists.js +18 -2
  5. package/dist/cli/named-lists.js.map +1 -1
  6. package/dist/cli/parser.d.ts +3 -2
  7. package/dist/cli/parser.d.ts.map +1 -1
  8. package/dist/cli/parser.js +4 -3
  9. package/dist/cli/parser.js.map +1 -1
  10. package/dist/cli/resolver.d.ts +3 -0
  11. package/dist/cli/resolver.d.ts.map +1 -1
  12. package/dist/cli/resolver.js +41 -36
  13. package/dist/cli/resolver.js.map +1 -1
  14. package/dist/cli.d.ts.map +1 -1
  15. package/dist/cli.js +15 -1
  16. package/dist/cli.js.map +1 -1
  17. package/dist/commands/approve-pr.d.ts.map +1 -1
  18. package/dist/commands/approve-pr.js +1 -0
  19. package/dist/commands/approve-pr.js.map +1 -1
  20. package/dist/commands/attach-project-item.d.ts.map +1 -1
  21. package/dist/commands/attach-project-item.js +1 -4
  22. package/dist/commands/attach-project-item.js.map +1 -1
  23. package/dist/commands/help.d.ts.map +1 -1
  24. package/dist/commands/help.js +11 -6
  25. package/dist/commands/help.js.map +1 -1
  26. package/dist/commands/index.d.ts +2 -1
  27. package/dist/commands/index.d.ts.map +1 -1
  28. package/dist/commands/index.js +5 -1
  29. package/dist/commands/index.js.map +1 -1
  30. package/dist/commands/join-project-item.d.ts.map +1 -1
  31. package/dist/commands/join-project-item.js +31 -12
  32. package/dist/commands/join-project-item.js.map +1 -1
  33. package/dist/commands/next-workflow-step.d.ts.map +1 -1
  34. package/dist/commands/next-workflow-step.js +3 -2
  35. package/dist/commands/next-workflow-step.js.map +1 -1
  36. package/dist/commands/ready-for-approval.d.ts.map +1 -1
  37. package/dist/commands/ready-for-approval.js +24 -6
  38. package/dist/commands/ready-for-approval.js.map +1 -1
  39. package/dist/commands/release.d.ts.map +1 -1
  40. package/dist/commands/release.js +2 -1
  41. package/dist/commands/release.js.map +1 -1
  42. package/dist/commands/ship-local-changes.js +1 -1
  43. package/dist/commands/ship-local-changes.js.map +1 -1
  44. package/dist/commands/start-agent-implementation.d.ts.map +1 -1
  45. package/dist/commands/start-agent-implementation.js +4 -1
  46. package/dist/commands/start-agent-implementation.js.map +1 -1
  47. package/dist/commands/start-dev-implementation.d.ts.map +1 -1
  48. package/dist/commands/start-dev-implementation.js +1 -0
  49. package/dist/commands/start-dev-implementation.js.map +1 -1
  50. package/dist/commands/start.d.ts.map +1 -1
  51. package/dist/commands/start.js +6 -3
  52. package/dist/commands/start.js.map +1 -1
  53. package/dist/commands/url-handler.d.ts +5 -0
  54. package/dist/commands/url-handler.d.ts.map +1 -0
  55. package/dist/commands/url-handler.js +38 -0
  56. package/dist/commands/url-handler.js.map +1 -0
  57. package/dist/index.js +0 -0
  58. package/dist/jobs/targets.d.ts +6 -1
  59. package/dist/jobs/targets.d.ts.map +1 -1
  60. package/dist/jobs/targets.js +12 -8
  61. package/dist/jobs/targets.js.map +1 -1
  62. package/dist/lib/claude-options.d.ts +47 -34
  63. package/dist/lib/claude-options.d.ts.map +1 -1
  64. package/dist/lib/claude-options.js +95 -82
  65. package/dist/lib/claude-options.js.map +1 -1
  66. package/dist/lib/claude-sessions.generated.d.ts +25 -0
  67. package/dist/lib/claude-sessions.generated.d.ts.map +1 -0
  68. package/dist/lib/claude-sessions.generated.js +16 -0
  69. package/dist/lib/claude-sessions.generated.js.map +1 -0
  70. package/dist/lib/settings.d.ts +10 -4
  71. package/dist/lib/settings.d.ts.map +1 -1
  72. package/dist/lib/settings.js +45 -15
  73. package/dist/lib/settings.js.map +1 -1
  74. package/dist/prompts/platform-prompts.d.ts +2 -0
  75. package/dist/prompts/platform-prompts.d.ts.map +1 -1
  76. package/dist/prompts/platform-prompts.js +9 -4
  77. package/dist/prompts/platform-prompts.js.map +1 -1
  78. package/dist/prompts/project-item-prompts.d.ts +3 -12
  79. package/dist/prompts/project-item-prompts.d.ts.map +1 -1
  80. package/dist/prompts/project-item-prompts.js +3 -18
  81. package/dist/prompts/project-item-prompts.js.map +1 -1
  82. package/dist/services/claude.d.ts +12 -7
  83. package/dist/services/claude.d.ts.map +1 -1
  84. package/dist/services/claude.js +7 -4
  85. package/dist/services/claude.js.map +1 -1
  86. package/dist/services/config.d.ts +5 -0
  87. package/dist/services/config.d.ts.map +1 -1
  88. package/dist/services/config.js +9 -0
  89. package/dist/services/config.js.map +1 -1
  90. package/dist/services/git.d.ts +5 -0
  91. package/dist/services/git.d.ts.map +1 -1
  92. package/dist/services/git.js +15 -3
  93. package/dist/services/git.js.map +1 -1
  94. package/dist/services/os-launcher.d.ts +29 -0
  95. package/dist/services/os-launcher.d.ts.map +1 -0
  96. package/dist/services/os-launcher.js +104 -0
  97. package/dist/services/os-launcher.js.map +1 -0
  98. package/dist/services/platform.d.ts +17 -3
  99. package/dist/services/platform.d.ts.map +1 -1
  100. package/dist/services/platform.js +79 -7
  101. package/dist/services/platform.js.map +1 -1
  102. package/dist/services/repository-registry.d.ts +11 -0
  103. package/dist/services/repository-registry.d.ts.map +1 -0
  104. package/dist/services/repository-registry.js +43 -0
  105. package/dist/services/repository-registry.js.map +1 -0
  106. package/dist/services/setup.d.ts.map +1 -1
  107. package/dist/services/setup.js +21 -1
  108. package/dist/services/setup.js.map +1 -1
  109. package/dist/services/url-handler.d.ts +23 -0
  110. package/dist/services/url-handler.d.ts.map +1 -0
  111. package/dist/services/url-handler.js +236 -0
  112. package/dist/services/url-handler.js.map +1 -0
  113. package/dist/services/worktree.d.ts +1 -19
  114. package/dist/services/worktree.d.ts.map +1 -1
  115. package/dist/services/worktree.js +0 -34
  116. package/dist/services/worktree.js.map +1 -1
  117. package/dist/types/index.d.ts +27 -25
  118. package/dist/types/index.d.ts.map +1 -1
  119. package/dist/workflow/data/project-item.d.ts +4 -0
  120. package/dist/workflow/data/project-item.d.ts.map +1 -1
  121. package/dist/workflow/data/team-member.d.ts +14 -0
  122. package/dist/workflow/data/team-member.d.ts.map +1 -0
  123. package/dist/workflow/data/team-member.js +2 -0
  124. package/dist/workflow/data/team-member.js.map +1 -0
  125. package/dist/workflow/data/workflow-context.d.ts +1 -1
  126. package/dist/workflow/data/workflow-states.d.ts +11 -2
  127. package/dist/workflow/data/workflow-states.d.ts.map +1 -1
  128. package/dist/workflow/data/workflow-states.generated.d.ts +17 -0
  129. package/dist/workflow/data/workflow-states.generated.d.ts.map +1 -1
  130. package/dist/workflow/data/workflow-states.generated.js +41 -0
  131. package/dist/workflow/data/workflow-states.generated.js.map +1 -1
  132. package/dist/workflow/data/workflow-states.js +21 -1
  133. package/dist/workflow/data/workflow-states.js.map +1 -1
  134. package/dist/workflow/engine/agent-session.d.ts +16 -0
  135. package/dist/workflow/engine/agent-session.d.ts.map +1 -0
  136. package/dist/workflow/engine/agent-session.js +109 -0
  137. package/dist/workflow/engine/agent-session.js.map +1 -0
  138. package/dist/workflow/engine/approval-flow.d.ts +21 -5
  139. package/dist/workflow/engine/approval-flow.d.ts.map +1 -1
  140. package/dist/workflow/engine/approval-flow.js +34 -0
  141. package/dist/workflow/engine/approval-flow.js.map +1 -1
  142. package/dist/workflow/engine/branch-setup.d.ts +8 -2
  143. package/dist/workflow/engine/branch-setup.d.ts.map +1 -1
  144. package/dist/workflow/engine/branch-setup.js +16 -6
  145. package/dist/workflow/engine/branch-setup.js.map +1 -1
  146. package/dist/workflow/engine/handlers/agent-implementation.d.ts +5 -4
  147. package/dist/workflow/engine/handlers/agent-implementation.d.ts.map +1 -1
  148. package/dist/workflow/engine/handlers/agent-implementation.js +13 -19
  149. package/dist/workflow/engine/handlers/agent-implementation.js.map +1 -1
  150. package/dist/workflow/engine/handlers/dev-implementation.js +1 -1
  151. package/dist/workflow/engine/handlers/dev-implementation.js.map +1 -1
  152. package/dist/workflow/engine/handlers/ready-for-approval.d.ts +7 -6
  153. package/dist/workflow/engine/handlers/ready-for-approval.d.ts.map +1 -1
  154. package/dist/workflow/engine/handlers/ready-for-approval.js +17 -19
  155. package/dist/workflow/engine/handlers/ready-for-approval.js.map +1 -1
  156. package/dist/workflow/engine/release-engine.js +1 -1
  157. package/dist/workflow/engine/release-engine.js.map +1 -1
  158. package/dist/workflow/engine/ship-flow.d.ts +8 -6
  159. package/dist/workflow/engine/ship-flow.d.ts.map +1 -1
  160. package/dist/workflow/engine/ship-flow.js +16 -13
  161. package/dist/workflow/engine/ship-flow.js.map +1 -1
  162. package/dist/workflow/engine/workflow-engine.d.ts +52 -16
  163. package/dist/workflow/engine/workflow-engine.d.ts.map +1 -1
  164. package/dist/workflow/engine/workflow-engine.js +146 -31
  165. package/dist/workflow/engine/workflow-engine.js.map +1 -1
  166. package/package.json +1 -1
  167. package/dist/commands/integrate.d.ts +0 -13
  168. package/dist/commands/integrate.d.ts.map +0 -1
  169. package/dist/commands/integrate.js +0 -128
  170. package/dist/commands/integrate.js.map +0 -1
  171. package/dist/commands/start-project-item.d.ts +0 -27
  172. package/dist/commands/start-project-item.d.ts.map +0 -1
  173. package/dist/commands/start-project-item.js +0 -325
  174. package/dist/commands/start-project-item.js.map +0 -1
  175. package/dist/services/hooks.d.ts +0 -8
  176. package/dist/services/hooks.d.ts.map +0 -1
  177. package/dist/services/hooks.js +0 -72
  178. package/dist/services/hooks.js.map +0 -1
  179. package/dist/services/workflow.d.ts +0 -17
  180. package/dist/services/workflow.d.ts.map +0 -1
  181. package/dist/services/workflow.js +0 -39
  182. package/dist/services/workflow.js.map +0 -1
package/README.md CHANGED
@@ -27,14 +27,17 @@ idea1 next --target https://app.idea1.ai/project/items/590 # or just `idea1 ne
27
27
  # Jump straight to Agent Implementation (worktree + Claude) — the "send for implementation" path
28
28
  idea1 start-agent-implementation --target https://app.idea1.ai/project/items/590 # alias: start-project-item
29
29
 
30
+ # Join an item in its current workflow state: its branch checked out, and a Claude session from one of the state's entry points
31
+ idea1 join-project-item --target https://app.idea1.ai/project/items/590 --claude-entry-point launch --entry-point "Review the PR"
32
+
30
33
  # Dedicated transitions (each is one `next` step)
31
34
  idea1 start-dev-implementation # or: idea1 dev
32
35
  idea1 ready-for-approval # or: idea1 rfa
33
36
  idea1 approve-pr # or: idea1 approve
34
37
 
35
38
  # The same two commands on a branch with no project item, e.g. an integration branch:
36
- # open its PR into working/release and name the approver, then (as the approver) merge it
37
- idea1 ready-for-approval --assignee octocat
39
+ # open its PR into working/release and name the approver (a teammate, by email or GitHub login), then (as the approver) merge it
40
+ idea1 ready-for-approval --assignee name@company.com
38
41
  idea1 approve-pr --target working/integration/<name>-main
39
42
 
40
43
  # From working/release: approve several items, branches or PRs at once, each in its own unattended run, in parallel
@@ -78,7 +81,7 @@ With no `--target`, a command works on the current branch when it can be the tar
78
81
 
79
82
  ```bash
80
83
  idea1 approve-pr --target <item url>,<branch>,<PR url> --yes
81
- idea1 ready-for-approval --target <item url>,<item url> --assignee octocat
84
+ idea1 ready-for-approval --target <item url>,<item url> --assignee name@company.com
82
85
  idea1 next --to "Dev Implementation" --target <item url>,<item url>
83
86
  ```
84
87
 
@@ -101,7 +104,7 @@ The state names and their order are defined once, in `shared-config/workflow-sta
101
104
 
102
105
  ### How the workflow engine works
103
106
 
104
- An item **under workflow management** has a *workflow context* on idea1.ai: its workflow status together with the one branch on origin that carries its work — the repository and branch name, the PR target (base) branch, the dev workflow type and any stack or integration branch. An item with no context is outside workflow management and has no status. The CLI reads and records the context through the platform's MCP tools (`get_item_summary_for_branch`, `get_item_summary`, `upsert_item_workflow_context`) and, having run a transition's automation itself, records the state it reached directly with `update_item`'s `workflowStatus`; the web client works on the same context, so the two always agree, and any clone resolves a branch to its item from the platform. Locally, each clone remembers the item URL a branch was last resolved to in its git config, so ordinary branches are recognized as unmanaged instantly.
107
+ An item **under workflow management** has a *workflow context* on idea1.ai: its workflow status together with the one branch on origin that carries its work — the repository and branch name, the PR target (base) branch, the dev workflow type and any stack or integration branch. An item with no context is outside workflow management and has no status. The CLI reads and records the context through the platform's MCP tools (`get_item_summary_for_branch`, `get_item_summary`, `upsert_item_workflow_context`) and, having run a transition's automation itself, records the state it reached directly with `update_item`'s `workflowStatus` (and `assignedToEmail`, when the state takes a teammate assignment; the team's members come from `list_team_members`); the web client works on the same context, so the two always agree, and any clone resolves a branch to its item from the platform. The branching decisions the context records (dev workflow type, stack and integration branch, branch name) are made once, when the item's branch is created, and are never asked again for an item that has one. Locally, each clone remembers the item URL a branch was last resolved to in its git config, so ordinary branches are recognized as unmanaged instantly.
105
108
 
106
109
  The branch itself carries the work. A branch's PR is therefore gated on a CI/CD run of exactly what merges, and `approve-pr` merges that run's head. When a branch is deleted on GitHub the context keeps its name and records whether the work merged; a context whose branch is gone without merging gets a new branch the next time the item enters a pre-merge state, while merged work stays merged. Branches put under workflow before the platform kept contexts carry a legacy `.idea1/<branch>.json` file, which the CLI removes from the branch before the approval gate.
107
110
 
@@ -109,22 +112,24 @@ A transition is "enter state X". Entering a state runs that state's automation (
109
112
 
110
113
  | Entering | Automation |
111
114
  |----------|-----------|
112
- | Build Spec in Progress … Ready for Agent Implementation | none — status only |
113
- | **Agent Implementation** | ensures the branch is checked out locally (worktree or main repo) — the one step that creates a checkout when the branch has none — then **launches Claude** to implement the item. This is the only transition that starts code-writing automation |
115
+ | Build Spec in Progress … Ready for Agent Implementation | none — status only. Build Spec in Progress, Refinement - Implementation and Ready for Agent Implementation take an optional teammate assignment (see below) |
116
+ | **Agent Implementation** | ensures the branch is checked out locally (worktree or main repo) — the one step that creates a checkout when the branch has none — then **starts a Claude session** to implement the item, from one of the state's [entry points](#prompts). This is the only transition that starts code-writing automation |
114
117
  | **Dev Implementation** | commits and pushes the agent's work from the branch's checkout (a branch with no checkout here has its work on origin), creates the PR, removes the worktree if `removeWorktreeAtState` says so |
115
- | **Needs Approval for Release** | requires the PR, sets its assignee (required — the approver of record) and any requested reviewers, removes a legacy workflow context file if the branch still carries one (its final commit), and removes the worktree if configured. From here on the branch stays as it is |
118
+ | **Needs Approval for Release** | takes a required teammate assignment: the item is assigned to the teammate, who approves the PR, so the PR is assigned to their linked GitHub account. Requires the PR, sets its assignee and any requested reviewers, removes a legacy workflow context file if the branch still carries one (its final commit), and removes the worktree if configured. From here on the branch stays as it is |
116
119
  | **Approved and Merged** | verifies you are the assignee, refuses a PR that conflicts with its base, waits for the CI/CD suite, merges the PR as it stands — the merge is the approval — then deletes the branch and worktree and fast-forwards your base branch checkout |
117
120
  | Released | none — normally set by GitHub automation when the work merges to `main` |
118
121
 
119
122
  `start` begins state management, `next` advances one state, `start-agent-implementation` jumps to Agent Implementation, and `ship-local-changes` takes uncommitted base-branch work all the way to Approved and Merged — all three reduce to the same engine, so branches and items always end up consistent with the state they are in. The engine and its layers are described in `src/workflow/README.md`.
120
123
 
124
+ **Teammate assignment.** Some states take a teammate assignment for the item on the way in (`assignmentOnEntry` in `shared-config/workflow-states.json`): optional for Build Spec in Progress, Refinement - Implementation and Ready for Agent Implementation, required for Needs Approval for Release. A transition that enters any of them asks once, before anything else happens, for the teammate (`--assignee`, one of the team's members named by their email or linked GitHub login): an optional assignment offers **None**, the default, which keeps the current assignee; the required one offers the members alone, preselecting the current assignee, and the chosen teammate must have a linked GitHub account, since they are assigned the PR. The assignment is recorded with the first such state the run enters. An item out of scope (in no project) has no assignee: an optional assignment is skipped, and entering Needs Approval for Release is refused until the item is assigned to a project. A run on several targets asks for the teammate once, for all of them.
125
+
121
126
  ### Who approves what
122
127
 
123
128
  A change reaches production through two merges, and **each merge is its approval**.
124
129
 
125
- **Into `working/release`** — the PR's **assignee** (required) is its approver. They review the code and approve it by running `idea1 approve-pr`, which waits for the full CI/CD suite and then **merges** the PR. That is not the GitHub "Approve" button, which only leaves a review behind and merges nothing. A red or unfinished suite stops the merge, and there is no override at this stage. `approve-pr` checks that the person merging is the assignee; anyone else has to confirm explicitly, and the evidence report lists that merge as an exception. Requested reviewers are optional and record nothing. GitHub records the approval as `merged_by`, with its timestamp and merge commit.
130
+ **Into `working/release`** — the PR's **assignee** (required) is its approver: the teammate the project item is assigned to on the way into Needs Approval for Release, through their linked GitHub account. They review the code and approve it by running `idea1 approve-pr`, which waits for the full CI/CD suite and then **merges** the PR. That is not the GitHub "Approve" button, which only leaves a review behind and merges nothing. A red or unfinished suite stops the merge, and there is no override at this stage. `approve-pr` checks that the person merging is the assignee; anyone else has to confirm explicitly, and the evidence report lists that merge as an exception. Requested reviewers are optional and record nothing. GitHub records the approval as `merged_by`, with its timestamp and merge commit.
126
131
 
127
- **Any other branch into `working/release`** — a branch with no project item takes the same gate. `idea1 ready-for-approval` opens its PR (with the approval chain of what the branch carries as the body) and names its assignee; `idea1 approve-pr` merges it once the suite passes, with the same no-override rule, and then deletes the branch. Only the idea1.ai status writes are absent. Integration branches work this way: work items PR into `working/integration/<name>-main` and are approved there exactly as above, then the integration branch itself is carried into `working/release` with these two commands — its PR body lists every work-item PR and who approved it, and `approve-pr` refuses while any PR still targets the integration branch.
132
+ **Any other branch into `working/release`** — a branch with no project item takes the same gate. `idea1 ready-for-approval` opens its PR (with the approval chain of what the branch carries as the body) and names its assignee — a teammate, assigned through their linked GitHub account, with no item to assign; `idea1 approve-pr` merges it once the suite passes, with the same no-override rule, and then deletes the branch. Only the idea1.ai status writes are absent. Integration branches work this way: work items PR into `working/integration/<name>-main` and are approved there exactly as above, then the integration branch itself is carried into `working/release` with these two commands — its PR body lists every work-item PR and who approved it, and `approve-pr` refuses while any PR still targets the integration branch.
128
133
 
129
134
  **Into `main`** — `idea1 release` opens the release PR **assigned to whoever ran it**: the releaser is the approver, and their merge is the recorded approval. No review is required — every change in the release was already approved above, and the release PR body lists each contained PR with who approved it. What this stage gates is the build: the required CI/CD checks must pass first. In the default `create` mode the releaser merges the PR in GitHub once the checks are green; in `merge` mode (and with `idea1 release --approve`) the CLI turns on GitHub's auto-merge as the releaser, so GitHub merges once the checks pass and records the releaser as `merged_by`, or waits for the checks with `gh` and merges here where GitHub can't auto-merge. A release approved in the Idea1 web app is merged by the Idea1 GitHub App instead; the app first posts an approval comment naming the releaser, who is the PR's assignee, and that comment is the approval of record. An emergency admin override past a red check needs an explicit confirmation and a stated reason, and is recorded as a comment on the PR before the merge.
130
135
 
@@ -145,14 +150,15 @@ idea1 s --target <url>
145
150
  - `-t, --title <title>` - Title for the new project item (only when no target is given).
146
151
  - `-P, --project <name>` - The Project to create the new item in, chosen from the team's live Projects (only when no target is given; always asked, never defaulted).
147
152
  - `-p, --source-path <path>` - Path to source directory.
148
- - `-n, --branch-name <name>` - Branch name (auto-generated from the item description if not provided).
153
+ - `-n, --branch-name <name>` - Branch name (auto-generated from the item description if not provided). Asked, blank to generate one, only when the item has no branch yet.
149
154
  - `-b, --base-branch <branch>` - Base branch / PR target (default: `working/release`).
150
- - `-w, --workflow-type <type>` - `independent` or `integration`; you also choose any stack branch and (for integration) the integration branch. Not asked when carrying local changes, which go onto an independent branch.
155
+ - `-w, --workflow-type <type>` - `independent` or `integration`; you also choose any stack branch and (for integration) the integration branch. These are asked only when the command gives the item its branch, never for an item whose workflow context already holds one, and an option given on the command line is not asked. Carried local changes go onto an independent branch.
151
156
  - `-c, --carry-local-changes` - Make the uncommitted changes of your base branch checkout the item's work. See [Carrying local changes](#carrying-local-changes).
152
157
  - `--approve-and-merge` - Advance the item through every state up to **Approved and Merged** without prompting. See [Carrying local changes](#carrying-local-changes).
153
158
  - `-M, --commit-message <message>` - Commit message for carried changes (default: the new item's title).
154
159
  - `-iso, --isolation <mode>` - Where to work on the branch, when changes are carried or the item is approved and merged. See [Isolation mode](#isolation-mode).
155
160
  - `-r, --reviewers <user1,user2>` - Reviewers to request on the PR with `--approve-and-merge` (never asked; optional).
161
+ - `-a, --assignee <email or GitHub login>` - Teammate to assign the item to as it enters Build Spec in Progress (optional; asked, with **None** preselected, when the command gives the item its branch). See [Teammate assignment](#how-the-workflow-engine-works).
156
162
 
157
163
  ### Carrying local changes
158
164
 
@@ -162,11 +168,11 @@ Work sometimes starts before its project item does: you make changes in your `wo
162
168
  2. Every uncommitted change — staged or not, plus untracked files that are not ignored — is committed on top of the checkout's commit without touching the checkout, and that commit becomes the tip of the item's branch on origin. For an item with no branch, the branch is created at that commit and recorded as the item's; an item whose branch exists takes the changes only while that branch has no commits of its own and no local checkout. The base branch itself is never committed to or pushed.
163
169
  3. The branch is checked out per the isolation mode: with `main-repo`, the checkout that held the changes switches to the branch with its working tree untouched (it is the branch's tip, so the checkout is clean); with `worktree`, the branch gets a worktree and the carried changes are removed from the base branch checkout.
164
170
 
165
- With `--approve-and-merge`, the item is then advanced through every workflow state up to **Approved and Merged** with nothing asked on the way: no Claude session is launched at Agent Implementation, the PR is created and assigned to **you** (the person who merges is the approver of record), the CLI waits for the required CI/CD checks — the same no-override gate as `approve-pr` — and merges, then brings your local base branch up to date with the merge. On a new item it needs changes to carry. A run that stops (failing checks, say) leaves the item at the last state it reached; fix the branch and run `idea1 approve-pr`, or run the command again with `--target`, to continue.
171
+ With `--approve-and-merge`, the item is then advanced through every workflow state up to **Approved and Merged** with nothing asked on the way: no Claude session is launched at Agent Implementation, the item and its PR are assigned to **you** — the team member whose linked GitHub account `gh` is signed in as (the person who merges is the approver of record), the CLI waits for the required CI/CD checks — the same no-override gate as `approve-pr` — and merges, then brings your local base branch up to date with the merge. On a new item it needs changes to carry. A run that stops (failing checks, say) leaves the item at the last state it reached; fix the branch and run `idea1 approve-pr`, or run the command again with `--target`, to continue.
166
172
 
167
173
  ### ship-local-changes
168
174
 
169
- `start --carry-local-changes --approve-and-merge` as one unattended command: create a project item, cut its branch from `working/release`, commit and push your uncommitted changes there, advance it to Needs Approval for Release with a PR assigned to you, wait for the PR's checks and merge it into `working/release`. You end on `working/release`, clean, with your changes merged. The only questions are the ones a new item needs (its title and Project) when they are not supplied.
175
+ `start --carry-local-changes --approve-and-merge` as one unattended command: create a project item, cut its branch from `working/release`, commit and push your uncommitted changes there, advance it to Needs Approval for Release assigned to you, with a PR assigned to you, wait for the PR's checks and merge it into `working/release`. You end on `working/release`, clean, with your changes merged. The only questions are the ones a new item needs (its title and Project) when they are not supplied.
170
176
 
171
177
  ```bash
172
178
  idea1 ship-local-changes --title "Release prep" --project "Omega"
@@ -194,7 +200,7 @@ With `--to <state>` the item advances through every state up to that one in a si
194
200
  idea1 next # on the item's branch
195
201
  idea1 next --target <url> # from anywhere in the repository
196
202
  idea1 next --to "Dev Implementation" # several states at once
197
- idea1 next --to "Needs Approval for Release" --target <url>,<url> --assignee octocat # several items in parallel
203
+ idea1 next --to "Needs Approval for Release" --target <url>,<url> --assignee name@company.com # several items in parallel
198
204
  idea1 n
199
205
  ```
200
206
 
@@ -202,7 +208,8 @@ idea1 n
202
208
  - `--target <url | branch | PR url>[,...]` - The project item(s) (default: the current branch, when it is an item's).
203
209
  - `--to <state>` - Workflow state to advance to (default: the next state).
204
210
  - `-p, --source-path <path>` - Path to source directory.
205
- - Any option of the state being entered (for example `--model`/`--effort` for Agent Implementation, `--assignee`/`--reviewers` for Needs Approval for Release). Options that were not supplied are prompted for when that state is reached.
211
+ - `-a, --assignee <email or GitHub login>` - Teammate to assign the item to, when a state entered takes an assignment (asked otherwise; see [Teammate assignment](#how-the-workflow-engine-works)).
212
+ - Any option of the state being entered (for example `--model`/`--effort` for Agent Implementation, `--reviewers` for Needs Approval for Release). Options that were not supplied are prompted for when that state is reached.
206
213
 
207
214
  **What it does:**
208
215
  1. Reads the item's workflow context from idea1.ai (picking up changes made in the web client) and fast-forwards the local checkout to origin when it is behind.
@@ -214,25 +221,35 @@ The automation is idempotent, so re-running a transition after the item was move
214
221
 
215
222
  ### start-agent-implementation
216
223
 
217
- Start implementing a project item: put it under workflow management if needed, move it to **Agent Implementation** (through any intermediate states, which have no automation), set up the working environment and launch Claude Code with the implementation prompt — the repository's `prompts.agentImplementation` setting (see [Prompts](#prompts)), the built-in default, or a prompt you supply with `--entry-point-prompt`. This is the command behind "Send for Implementation" in the web client; `start-project-item` remains an alias so existing team command templates keep working.
224
+ Start implementing a project item: put it under workflow management if needed, move it to **Agent Implementation** (through any intermediate states, which have no automation), set up the working environment and start a Claude Code session from one of the state's [entry point prompts](#prompts), a prompt you supply with `--entry-point-prompt`, or no prompt. This is the command behind "Send for Implementation" in the web client; `start-project-item` remains an alias so existing team command templates keep working.
218
225
 
219
226
  ```bash
220
227
  idea1 start-agent-implementation --target <url> [options]
221
- idea1 implement --target <url>
228
+ idea1 implement --target <url> --entry-point Implement
222
229
  idea1 start-project-item --target <url> # alias
223
230
  idea1 implement --target <url> --entry-point-prompt "Read the spec in docs/spec.md and implement step 3"
224
231
  ```
225
232
 
226
- **Options:** all `start` options, plus the Agent Implementation options:
233
+ **Options:** all `start` options, plus the Agent Implementation options, which are the [Claude session options](#claude-session-options) with `--claude-entry-point` defaulting to `launch`, and:
227
234
  - `-iso, --isolation <mode>` - Where to work on the branch (default: `worktree`). See [Isolation mode](#isolation-mode).
228
- - `-pm, --permission-mode <mode>` - Claude permission mode (default: `plan`). Valid values: `acceptEdits`, `bypassPermissions`, `default`, `delegate`, `dontAsk`, `plan`
229
- - `-m, --model <model>` - Claude model for the implementation session (default: `opus`). Valid values: `fable`, `opus`, `sonnet`, `haiku`
230
- - `-e, --effort <level>` - Claude effort level (default: `high`). Valid values: `low`, `medium`, `high`, `xhigh`, `max`
231
- - `-im, --claude-entry-point <mode>` - How Claude is invoked once the environment is ready (default: `launch`). Valid values: `launch` (start a new Claude session), `inline` (output a structured prompt for an already-running Claude session), `none` (do not invoke Claude)
232
- - `-udp, --use-default-prompt <yes|no>` - Whether to launch Claude with the repository's implementation prompt, or the built-in one when the repository sets none (default: `yes`). Answering `no` asks for the prompt to use instead.
233
- - `-epp, --entry-point-prompt <prompt>` - The prompt to launch Claude with, replacing the implementation prompt. Supplying it skips the "Use default prompt?" question. It is a Handlebars template like the repository's prompt, so it can use the same [variables](#prompts).
235
+ - `-a, --assignee <email or GitHub login>` - Teammate to assign the item to on the way (optional; asked, with **None** preselected, when a state entered takes an assignment).
234
236
 
235
- An item already in Agent Implementation is not transitioned again: the working environment is set up (or reused) and Claude is launched. With `--claude-entry-point none` the session options (permission mode, model, effort, prompt) are not asked.
237
+ An item already in Agent Implementation is not transitioned again: the working environment is set up (or reused) and the session is started.
238
+
239
+ ### Claude session options
240
+
241
+ The commands that start a Claude session on an item's branch (`start-agent-implementation`, `next` entering Agent Implementation, `join-project-item`) share these options. The model, effort and permission mode choices are defined once, in `shared-config/claude-sessions.json`, and shared with the web client. With `--claude-entry-point none` none of the others are asked.
242
+
243
+ - `-im, --claude-entry-point <mode>` - How Claude is invoked once the environment is ready:
244
+ - `launch` - start a new Claude session in this terminal.
245
+ - `desktop` - start the session in Claude Desktop. With no `--model` and no `--effort`, Desktop opens a new local session on the working directory with the prompt, using Desktop's own model and effort; these two are not asked for a Desktop session. With either given, Desktop is brought up and the session runs in this terminal with that model and effort (the other one at its default), set to show in Desktop through remote control.
246
+ - `inline` - output the prompt as structured output for the Claude session that ran the CLI.
247
+ - `none` - do not invoke Claude.
248
+ - `-ep, --entry-point <name|none>` - The entry point prompt to start with: the name of one of the workflow state's entry points (offered as a choice), or `none` to start Claude with no prompt.
249
+ - `-epp, --entry-point-prompt <template>` - A prompt to start with instead of an entry point, for this session alone. It is a Handlebars template like the repository's entry points, so it can use the same [variables](#prompts). `--entry-point` and `--entry-point-prompt` are alternatives: give one, or pick which to answer when asked.
250
+ - `-pm, --permission-mode <mode>` - Claude permission mode (default: `plan`; not used for a Desktop session). Valid values: `acceptEdits`, `bypassPermissions`, `default`, `delegate`, `dontAsk`, `plan`
251
+ - `-m, --model <model>` - Claude model (default: `opus`). Valid values: `fable`, `opus`, `sonnet`, `haiku`
252
+ - `-e, --effort <level>` - Claude effort level (default: `high`). Valid values: `low`, `medium`, `high`, `xhigh`, `max`
236
253
 
237
254
  ### Isolation mode
238
255
 
@@ -245,27 +262,31 @@ Supply `-iso worktree` or `-iso main-repo` on the command line to skip the promp
245
262
 
246
263
  ### join-project-item
247
264
 
248
- Join an **in-progress** project item by setting up a working environment on its existing branch — for picking up work started elsewhere (e.g. on another machine, by another developer, or from the web client). It does not change the workflow state and never launches a Claude implementation session.
265
+ Join a project item where it is: set up a working environment on its branch and, when asked, start a Claude session in the item's **current workflow state**, from one of that state's [entry point prompts](#prompts). For picking up work started elsewhere (on another machine, by another developer, or from the web client) and for working on an item at any step: writing its spec, implementing it, reviewing its PR. It does not change the workflow state. The web client's **Join** action builds this command, or opens it through an [`idea1://` link](#idea1-links).
249
266
 
250
267
  ```bash
251
268
  idea1 join-project-item --target <url>
269
+ idea1 join-project-item --target <url> --isolation worktree --claude-entry-point launch --entry-point "Review the PR" --model opus --effort high --permission-mode plan
270
+ idea1 join-project-item --target <url> --isolation main-repo --claude-entry-point desktop --entry-point none
252
271
  idea1 join-project-item --target <branch>
253
- idea1 join-project-item --target <pr url>
254
- idea1 j --target <branch>
272
+ idea1 j --target <pr url>
255
273
  ```
256
274
 
257
275
  **Options:**
258
276
  - `--target <url | branch | PR url>` - **Required.** The project item (its branch is discovered automatically), the branch to join (its project item is discovered automatically), or a GitHub PR (its head branch is joined). One target only.
259
277
  - `-p, --source-path <path>` - Path to source directory.
260
278
  - `-iso, --isolation <mode>` - Where to work on the branch (default: `worktree`). See [Isolation mode](#isolation-mode).
279
+ - The [Claude session options](#claude-session-options), with `--claude-entry-point` defaulting to `none`. The entry points offered are those of the item's current state.
280
+ - `-a, --assignee <email or GitHub login>` - Teammate to assign the item to, when joining starts an item that has no branch yet (optional; asked then, with **None** preselected).
261
281
 
262
282
  **What it does:**
263
283
  1. Resolves the branch from the URL (or the URL from the branch) through the item's workflow context on idea1.ai.
264
284
  2. Reuses the checkout that already holds the branch, or sets one up — a git worktree, or the branch checked out in the main repository (creating a local tracking branch if it only exists on origin).
265
- 3. Reports the item the branch implements and its state. A branch outside workflow management is joined as plain git work; `attach-project-item` puts it under workflow.
285
+ 3. Reports the item the branch implements and its state. A branch outside workflow management is joined as plain git work, with no session; `attach-project-item` puts it under workflow.
266
286
  4. Runs any setup hooks defined in `.idea1/settings.json` (newly created worktrees only).
287
+ 5. Starts the Claude session asked for, from the chosen entry point of the item's state, rendered against the item's branch context.
267
288
 
268
- If a project item URL is supplied but no branch exists for it yet, `join-project-item` puts the item under workflow management first (as `start` does) and then sets up the environment.
289
+ If a project item URL is supplied but no branch exists for it yet, `join-project-item` puts the item under workflow management first (as `start` does, asking the branching choices) and then sets up the environment; the session starts in **Build Spec in Progress**.
269
290
 
270
291
  ### attach-project-item
271
292
 
@@ -284,7 +305,7 @@ idea1 a --target <url>
284
305
  - `-t, --title <title>` - Title for the new project item (only when no target is given).
285
306
  - `-p, --source-path <path>` - Path to source directory.
286
307
  - `-b, --base-branch <branch>` - Base branch / PR target for an independent feature (default: `working/release`).
287
- - `-w, --workflow-type <type>` - Development workflow type: `independent` or `integration`. You also choose any stack branch and (for integration) the integration branch.
308
+ - `-w, --workflow-type <type>` - Development workflow type: `independent` or `integration`. You also choose any stack branch and (for integration) the integration branch. Asked here because attaching records a new branch on the item; an option given on the command line is not asked.
288
309
  - `-c, --carry-local-changes`, `--approve-and-merge`, `-n, --branch-name`, `-M, --commit-message`, `-iso, --isolation`, `-r, --reviewers` - As for `start`.
289
310
 
290
311
  **What it does:**
@@ -316,36 +337,36 @@ idea1 dev --target <url>,<url>
316
337
 
317
338
  ### ready-for-approval
318
339
 
319
- For a project item, advance the item to **Needs Approval for Release** — the same as `next --to "Needs Approval for Release"`: from an earlier state, every state in between is entered first, each with its own automation (PR creation on the way into Dev Implementation, for one), and an item already at or past it is left as it is. For any other branch (an integration branch, a branch with no project item), open the branch's PR into the base branch when it has none. Either way its job is to name the **assignee**, who will approve the change by merging it. Several targets run in parallel.
340
+ For a project item, advance the item to **Needs Approval for Release** — the same as `next --to "Needs Approval for Release"`: from an earlier state, every state in between is entered first, each with its own automation (PR creation on the way into Dev Implementation, for one), an item already in it enters it again, so its PR gets the assignee (and reviewers) named now, and an item past it is left as it is. For any other branch (an integration branch, a branch with no project item), open the branch's PR into the base branch when it has none. Either way its job is to name the **assignee** — a teammate, by email or GitHub login — who will approve the change by merging it: a project item is assigned to that teammate, and the PR to their linked GitHub account. Several targets run in parallel.
320
341
 
321
342
  ```bash
322
343
  idea1 ready-for-approval [options]
323
- idea1 rfa --assignee octocat
324
- idea1 rfa --assignee octocat # on working/integration/<name>-main: opens the PR into working/release
325
- idea1 rfa --assignee octocat -b working/release # a branch with no project item, naming the PR target
326
- idea1 rfa --assignee octocat --target <url>,<branch> # from working/release, in parallel
344
+ idea1 rfa --assignee name@company.com
345
+ idea1 rfa --assignee name@company.com # on working/integration/<name>-main: opens the PR into working/release
346
+ idea1 rfa --assignee name@company.com -b working/release # a branch with no project item, naming the PR target
347
+ idea1 rfa --assignee name@company.com --target <url>,<branch> # from working/release, in parallel
327
348
  ```
328
349
 
329
350
  **Options:**
330
351
  - `--target <url | branch | PR url>[,...]` - The project item(s) or branch(es) (default: the current branch; asked for on the base branch)
331
- - `-a, --assignee <username>` - **Required.** Who approves the PR by merging it (prompted from the repository's assignable users when omitted)
352
+ - `-a, --assignee <email or GitHub login>` - **Required.** The teammate who approves the PR by merging it, one of the team's members with a linked GitHub account (asked when omitted: for a project item, preselecting its current assignee)
332
353
  - `-r, --reviewers <user1,user2>` - Who to request a review from (multi-select when omitted). Optional, and separate from approval — the assignee is the approver
333
354
  - `-b, --base-branch <branch>` - Branches with no project item only: the branch the PR targets (default: the open PR's base, else `baseBranch`, then `working/release`)
334
355
  - `--title <title>` - Branches with no project item only: PR title when the PR has to be created (default: `Integration <name> <YYYY-MM-DD>` for an integration branch, else the branch name; prompted when omitted)
335
356
 
336
357
  **What it does for a project item:**
337
- 1. Enters every state before Needs Approval for Release the item has yet to reach (after syncing from origin)
358
+ 1. Resolves the teammate (refusing an item out of scope, which has no assignee, and a teammate with no linked GitHub account), then enters every state before Needs Approval for Release the item has yet to reach (after syncing from origin)
338
359
  2. Ensures no uncommitted or unpushed changes in the local checkout
339
- 3. Requires the PR to exist, then sets the assignee (the transition refuses to proceed without one) and requests any reviewers
360
+ 3. Requires the PR to exist, then sets its assignee to the teammate's GitHub login and requests any reviewers
340
361
  4. Legacy branches only: removes the `.idea1/<branch>.json` workflow context file the branch still carries and pushes — the branch's final commit, so the CI/CD suite runs once more on exactly what will merge and the target branch receives the work alone
341
- 5. Records "Needs Approval for Release" on Idea1.ai. From here on the branch stays as it is
362
+ 5. Records "Needs Approval for Release" on Idea1.ai, assigning the item to the teammate. From here on the branch stays as it is
342
363
  6. If in a worktree and `removeWorktreeAtState` is `Needs Approval for Release` (the default) or earlier, removes the worktree
343
364
 
344
365
  **What it does for a branch with no project item:**
345
366
  1. Requires the branch on origin and, when it is checked out here, nothing uncommitted, unpushed or behind origin in that checkout; refuses the base branch itself and refuses a PR straight into `main` (that is `idea1 release`)
346
367
  2. Reuses the branch's open PR (and its base) when one exists; otherwise creates the PR into the base branch with the approval chain of what the branch carries as its body — every PR merged into the branch with its author and approver, and commits pushed straight to the branch listed as the change under review (they are not an exception: this PR is their stage-1 approval)
347
- 3. Sets the assignee and requests any reviewers
348
- 4. Records no workflow status — there is no project item
368
+ 3. Sets the assignee (the teammate's GitHub login) and requests any reviewers
369
+ 4. Records no workflow status and assigns no item — there is no project item
349
370
 
350
371
  ### approve-pr
351
372
 
@@ -431,6 +452,29 @@ In interactive mode the whole sequence runs as a background job (see `/jobs`); o
431
452
  - checks still running — enables auto-merge, or waits for the checks and merges where GitHub can't auto-merge
432
453
  - a check failed — stops, unless a repository admin confirms the admin override, gives a reason, and has it recorded on the PR before the merge
433
454
 
455
+ ### idea1 links
456
+
457
+ The web client's **Join** action for Claude Desktop opens an `idea1://join` link, which the CLI handles on macOS and Windows. Running any `idea1` command registers the CLI as this computer's handler of `idea1://` links, for the current user — on macOS an applet at `~/Applications/Idea1 URL Handler.app`, on Windows the `HKCU\Software\Classes\idea1` key. Registration is idempotent and is redone when the CLI's version, Node or install location changes.
458
+
459
+ ```bash
460
+ idea1 register-url-handler # register now
461
+ idea1 unregister-url-handler # remove it, and stop registering it automatically until register-url-handler
462
+ idea1 open-url --url "idea1://join?target=...&repo=owner/name&isolation=worktree&app=desktop&entryPoint=none"
463
+ ```
464
+
465
+ `open-url` is what the handler runs. It accepts only `idea1://join` links, with exactly these parameters, and refuses any other:
466
+
467
+ | Parameter | Value |
468
+ |-----------|-------|
469
+ | `target` | **Required.** A project item URL of the Idea1 app |
470
+ | `repo` | **Required.** The GitHub repository the item's work is in, as `owner/name` |
471
+ | `isolation` | **Required.** `worktree` or `main-repo` |
472
+ | `app` | **Required.** `desktop` |
473
+ | `entryPoint` | **Required.** An entry point name, or `none`. Only ever a name: prompt text is never accepted |
474
+ | `model`, `effort` | Optional. A model and an effort level, as for `--model` and `--effort`; absent is Desktop's own |
475
+
476
+ It opens a new terminal (Terminal on macOS, Windows Terminal or a console on Windows) in the repository's local clone, running `idea1 join-project-item --target ... --isolation ... --claude-entry-point desktop --entry-point ...` with the link's values. The clone is found in `~/.idea1/repositories.json`, which every CLI run inside a GitHub repository's clone records; for a repository the CLI has not run in yet, the terminal asks where its clone is.
477
+
434
478
  ## Configuration
435
479
 
436
480
  ### Configuration Hierarchy
@@ -455,7 +499,11 @@ Create `.idea1/settings.json` in your repository root to configure repo-specific
455
499
  "setup-worktree": "dev/workflow/setup-worktree.sh"
456
500
  },
457
501
  "prompts": {
458
- "agentImplementation": "Implement {{projectItemUrl}} on {{branchName}}."
502
+ "entryPoints": {
503
+ "Agent Implementation": [
504
+ { "name": "Implement", "template": "Implement {{projectItemUrl}} on {{branchName}}." }
505
+ ]
506
+ }
459
507
  },
460
508
  "defaults": {
461
509
  "branchPrefix": "working/agent",
@@ -469,7 +517,7 @@ Create `.idea1/settings.json` in your repository root to configure repo-specific
469
517
  - `setup-worktree` - Script to run after creating a new worktree (e.g., install dependencies)
470
518
 
471
519
  **Prompts:**
472
- - `agentImplementation` - The prompt an Agent Implementation session starts with. See [Prompts](#prompts).
520
+ - `entryPoints` - The entry point prompts a Claude session can start with, by workflow state. See [Prompts](#prompts).
473
521
 
474
522
  **Release:** see [Release Settings](#release-settings).
475
523
 
@@ -502,7 +550,8 @@ The optional `release` section declares the repository folders `idea1 release` (
502
550
  `settings.json`. Anything it defines overrides the committed settings for that clone
503
551
  only, which keeps developer-specific preferences out of the shared configuration.
504
552
  `hooks`, `prompts`, `defaults` and `release` are merged section by section, so overriding one
505
- value leaves the rest of the committed settings in place.
553
+ value leaves the rest of the committed settings in place; `prompts.entryPoints` is merged state
554
+ by state.
506
555
 
507
556
  ```json
508
557
  {
@@ -518,37 +567,45 @@ Every prompt the CLI gives Claude is a [Handlebars](https://handlebarsjs.com/) t
518
567
  rendered against a data model, so a repository can replace a prompt with its own template
519
568
  using the full Handlebars syntax (`{{#if}}`, `{{#each}}`, `{{else}}`, ...).
520
569
 
521
- `prompts.agentImplementation` is the prompt an Agent Implementation session starts with
522
- (`start-agent-implementation`, or `next` entering Agent Implementation). It is either the
523
- template itself or the file that holds it, relative to the repository root:
570
+ A Claude session on a project item's branch (`start-agent-implementation`, `next` entering
571
+ Agent Implementation, `join-project-item`) starts from one of the **entry point prompts** of the
572
+ item's workflow state, chosen by name with `--entry-point`. Every state has built-in entry
573
+ points (defined in `shared-config/workflow-states.json`, shared with the web client); for
574
+ example, Needs Approval for Release offers "Review the PR" and "Address PR feedback".
524
575
 
525
- ```json
526
- {
527
- "prompts": {
528
- "agentImplementation": "/df-implement-project-item {{projectItemUrl}}"
529
- }
530
- }
531
- ```
576
+ `prompts.entryPoints` gives a repository its own entry points, keyed by workflow state name.
577
+ A state's entries replace that state's built-in ones; states the setting does not name keep
578
+ theirs. Each entry has a `name`, unique within its state (and other than `none`), and either
579
+ the template itself or the file that holds it, relative to the repository root:
532
580
 
533
581
  ```json
534
582
  {
535
583
  "prompts": {
536
- "agentImplementation": { "templateFile": ".idea1/prompts/agent-implementation.md" }
584
+ "entryPoints": {
585
+ "Agent Implementation": [
586
+ { "name": "Implement", "template": "/df-implement-project-item {{projectItemUrl}}" }
587
+ ],
588
+ "Needs Approval for Release": [
589
+ { "name": "Review the PR", "templateFile": ".idea1/prompts/review.md" }
590
+ ]
591
+ }
537
592
  }
538
593
  }
539
594
  ```
540
595
 
541
- Without the setting, the built-in prompt asks Claude to implement the item from its Idea1
542
- context. `--entry-point-prompt` replaces both for one session and is rendered the same way.
543
- The settings are read from the main repository, so an override in its
544
- `settings.local.json` applies in worktrees too.
596
+ State names are matched as the platform's statuses are (case-insensitively, earlier state names
597
+ included); a key that names no workflow state is an error. `--entry-point-prompt` replaces the
598
+ entry point for one session and is rendered the same way. The settings are read from the main
599
+ repository, so an override in its `settings.local.json` applies in worktrees too. The Idea1
600
+ web app reads the same setting from the repository on GitHub to offer the entry points in its
601
+ Join action.
545
602
 
546
603
  The template renders against the item and its branch:
547
604
 
548
605
  | Variable | Value |
549
606
  |----------|-------|
550
607
  | `projectItemUrl` | The project item's URL |
551
- | `workflowStatus` | The item's workflow state (`Agent Implementation`) |
608
+ | `workflowStatus` | The item's workflow state, e.g. `Agent Implementation` |
552
609
  | `repositoryFullName` | The repository, as `owner/name` |
553
610
  | `branchName` | The item's branch |
554
611
  | `baseBranch` | The branch the item's PR targets (the integration branch for integration work) |
@@ -593,9 +650,9 @@ its `.idea1/settings.json`.
593
650
 
594
651
  ## How the CLI uses Claude
595
652
 
596
- Every use of Claude Code goes through `src/services/claude.ts`, the only module that spawns `claude`. It always passes `--model` and `--effort`: a caller that states neither gets the documented defaults (`opus`, `high` — the same defaults the implementation session offers), so a run never inherits whatever was last picked in an interactive session.
653
+ Every use of Claude Code goes through `src/services/claude.ts`, the only module that spawns `claude`. It always passes `--model` and `--effort`: a caller that states neither gets the documented defaults (`opus`, `high` — the same defaults a Claude session on an item offers), so a run never inherits whatever was last picked in an interactive session.
597
654
 
598
- Access to the Idea1 cloud platform — reading a project item's summary (by item or by the branch it implements), recording the item's workflow context, setting its workflow status, creating items, listing Projects, generating a branch name — goes through `src/services/platform.ts`. Its prompts are Handlebars templates in `src/prompts/`, rendered by `src/services/template-renderer.ts` like every other prompt. Today it drives the Idea1 MCP tools through Claude on `sonnet` at `medium` effort (these are simple tool calls, not implementation sessions); that transport is the module's implementation detail and may become direct calls to the platform API. The implementation session launched on entering Agent Implementation is the one place the model and effort are the user's choice (`--model`, `--effort`).
655
+ Access to the Idea1 cloud platform — reading a project item's summary (by item or by the branch it implements), recording the item's workflow context, setting its workflow status, creating items, listing Projects, generating a branch name — goes through `src/services/platform.ts`. Its prompts are Handlebars templates in `src/prompts/`, rendered by `src/services/template-renderer.ts` like every other prompt. Today it drives the Idea1 MCP tools through Claude on `sonnet` at `medium` effort (these are simple tool calls, not implementation sessions); that transport is the module's implementation detail and may become direct calls to the platform API. A Claude session started on an item's branch (entering Agent Implementation, or joining an item) is the one place the model and effort are the user's choice (`--model`, `--effort`); a Claude Desktop session that names neither runs with Desktop's own. Opening URLs (Claude Desktop's `claude://` links) and terminal windows goes through `src/services/os-launcher.ts`, which uses only the tools macOS and Windows provide.
599
656
 
600
657
  ## Requirements
601
658
 
@@ -2,7 +2,7 @@
2
2
  * Resolve a named choice list to its current choices.
3
3
  * Throws if the name is not registered or the list is empty.
4
4
  */
5
- export declare function resolveNamedList(name: string): Promise<Array<{
5
+ export declare function resolveNamedList(name: string, resolved: Record<string, string>): Promise<Array<{
6
6
  label: string;
7
7
  value: string;
8
8
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"named-lists.d.ts","sourceRoot":"","sources":["../../src/cli/named-lists.ts"],"names":[],"mappings":"AA0BA;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAYrG"}
1
+ {"version":3,"file":"named-lists.d.ts","sourceRoot":"","sources":["../../src/cli/named-lists.ts"],"names":[],"mappings":"AA0CA;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAYvI"}
@@ -1,5 +1,9 @@
1
1
  import * as github from '../services/github.js';
2
2
  import * as platform from '../services/platform.js';
3
+ import { WorkflowStates } from '../workflow/data/workflow-states.js';
4
+ import { entryPointChoices } from '../workflow/engine/agent-session.js';
5
+ import { readTarget } from '../workflow/engine/workflow-engine.js';
6
+ import { TARGET_OPTION_NAME } from '../jobs/targets.js';
3
7
  /**
4
8
  * Registry of named choice lists. Options reference these by name via
5
9
  * CommandOption.choices, letting multiple options share the same
@@ -13,18 +17,30 @@ const registry = {
13
17
  'idea1-projects': async () => {
14
18
  const projects = await platform.listProjects();
15
19
  return projects.map(name => ({ label: name, value: name }));
20
+ },
21
+ // The entry points of a session started on entering Agent Implementation.
22
+ 'agent-implementation-entry-points': async () => entryPointChoices(WorkflowStates.AgentImplementation),
23
+ // The entry points of a session started in the workflow state of the item named by --target: an
24
+ // item yet to be started is started in the first state.
25
+ 'target-state-entry-points': async (resolved) => {
26
+ const { item } = await readTarget(resolved[TARGET_OPTION_NAME]);
27
+ return entryPointChoices(item?.currentState ?? WorkflowStates.BuildSpecInProgress);
28
+ },
29
+ 'team-members': async () => {
30
+ const members = await platform.listTeamMembers();
31
+ return members.map(member => ({ label: member.email, value: member.email }));
16
32
  }
17
33
  };
18
34
  /**
19
35
  * Resolve a named choice list to its current choices.
20
36
  * Throws if the name is not registered or the list is empty.
21
37
  */
22
- export async function resolveNamedList(name) {
38
+ export async function resolveNamedList(name, resolved) {
23
39
  const provider = registry[name];
24
40
  if (!provider) {
25
41
  throw new Error(`Unknown choice list: '${name}'`);
26
42
  }
27
- const choices = await provider();
43
+ const choices = await provider(resolved);
28
44
  if (choices.length === 0) {
29
45
  throw new Error(`Choice list '${name}' returned no options`);
30
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"named-lists.js","sourceRoot":"","sources":["../../src/cli/named-lists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AASpD;;;;GAIG;AACH,MAAM,QAAQ,GAAmC;IAC/C,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAClD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC3B,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;QAC/C,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAY;IACjD,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,GAAG,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,QAAQ,EAAE,CAAC;IACjC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,gBAAgB,IAAI,uBAAuB,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"named-lists.js","sourceRoot":"","sources":["../../src/cli/named-lists.ts"],"names":[],"mappings":"AAAA,OAAO,KA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,EAAE;QACzB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,eAAe,EAAE,CAAC;QACjD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC/E,CAAC;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAY,EAAE,QAAgC;IACnF,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,GAAG,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,gBAAgB,IAAI,uBAAuB,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import type { Command, CommandOption } from '../types/index.js';
2
2
  /**
3
- * Resolve the default value of an option (handles static and dynamic defaults)
3
+ * Resolve the default value of an option (handles static and dynamic defaults). A dynamic default
4
+ * reads the values resolved so far; help output has none.
4
5
  */
5
- export declare function resolveDefault(option: CommandOption): string | undefined;
6
+ export declare function resolveDefault(option: CommandOption, resolved?: Record<string, string>): string | undefined;
6
7
  /**
7
8
  * Parse command line arguments for a given command.
8
9
  * All arguments must be named: --longName value or -shortName value.
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGhE;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAGxE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCzF;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAsBjC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0CxD"}
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGhE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,GAAG,SAAS,CAG/G;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCzF;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAsBjC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0CxD"}
@@ -1,12 +1,13 @@
1
1
  import chalk from 'chalk';
2
2
  import { getAllCommands } from '../commands/index.js';
3
3
  /**
4
- * Resolve the default value of an option (handles static and dynamic defaults)
4
+ * Resolve the default value of an option (handles static and dynamic defaults). A dynamic default
5
+ * reads the values resolved so far; help output has none.
5
6
  */
6
- export function resolveDefault(option) {
7
+ export function resolveDefault(option, resolved = {}) {
7
8
  if (option.defaultValue === undefined)
8
9
  return undefined;
9
- return typeof option.defaultValue === 'function' ? option.defaultValue() : option.defaultValue;
10
+ return typeof option.defaultValue === 'function' ? option.defaultValue(resolved) : option.defaultValue;
10
11
  }
11
12
  /**
12
13
  * Parse command line arguments for a given command.
@@ -1 +1 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAqB;IAClD,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxD,OAAO,OAAO,MAAM,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;AACjG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAc,EAAE,OAAgB;IAC/D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IACtC,MAAM,MAAM,GAA2B,EAAE,CAAC;IAE1C,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEpB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,6DAA6D,CAAC,CAAC;QAC5G,CAAC;QAED,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CACrC,GAAG,KAAK,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,CACxE,CAAC;QAEF,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK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AAS,EAAE,CAAC;oBAC3B,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,cAAc,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1D,CAAC;qBAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;oBAC3B,kEAAkE;oBAClE,8DAA8D;oBAC9D,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,aAAa,CAAC;gBAC/E,CAAC;YACH,CAAC;YAED,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,WAAW,GAAG,WAAW,EAAE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC"}
@@ -10,6 +10,9 @@ import type { Command } from '../types/index.js';
10
10
  * For each option (in order):
11
11
  * 0. Skip if dependsOn is defined and returns false — the option is not
12
12
  * applicable, so it is neither prompted nor required and left unset.
13
+ * 0a. For a member of a mutually-exclusive group, skip it unless it is the
14
+ * group's active member: the one supplied on the CLI, else the applicable
15
+ * member chosen when the group is first reached.
13
16
  * 1. Skip if isFlag — flags are never prompted
14
17
  * 2. Skip if already in parsed — value was provided on CLI
15
18
  * 2a. If resolveValue exists: let it resolve the value (it may ask), and use that
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/cli/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,mBAAmB,CAAC;AAKhE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA6GjC"}
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/cli/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,mBAAmB,CAAC;AAKhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAoHjC"}