@idea1/cli 1.9.1 → 1.10.1
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.
- package/README.md +123 -66
- package/dist/cli/named-lists.d.ts +1 -1
- package/dist/cli/named-lists.d.ts.map +1 -1
- package/dist/cli/named-lists.js +18 -2
- package/dist/cli/named-lists.js.map +1 -1
- package/dist/cli/parser.d.ts +3 -2
- package/dist/cli/parser.d.ts.map +1 -1
- package/dist/cli/parser.js +4 -3
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/resolver.d.ts +3 -0
- package/dist/cli/resolver.d.ts.map +1 -1
- package/dist/cli/resolver.js +41 -36
- package/dist/cli/resolver.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +15 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/approve-pr.d.ts.map +1 -1
- package/dist/commands/approve-pr.js +2 -54
- package/dist/commands/approve-pr.js.map +1 -1
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +11 -6
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +5 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/join-project-item.d.ts.map +1 -1
- package/dist/commands/join-project-item.js +31 -12
- package/dist/commands/join-project-item.js.map +1 -1
- package/dist/commands/next-workflow-step.d.ts.map +1 -1
- package/dist/commands/next-workflow-step.js +1 -0
- package/dist/commands/next-workflow-step.js.map +1 -1
- package/dist/commands/ready-for-approval.d.ts.map +1 -1
- package/dist/commands/ready-for-approval.js +7 -67
- package/dist/commands/ready-for-approval.js.map +1 -1
- package/dist/commands/release.d.ts.map +1 -1
- package/dist/commands/release.js +7 -9
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/ship-local-changes.d.ts +2 -0
- package/dist/commands/ship-local-changes.d.ts.map +1 -1
- package/dist/commands/ship-local-changes.js +30 -5
- package/dist/commands/ship-local-changes.js.map +1 -1
- package/dist/commands/start-agent-implementation.d.ts.map +1 -1
- package/dist/commands/start-agent-implementation.js +4 -1
- package/dist/commands/start-agent-implementation.js.map +1 -1
- package/dist/commands/start-dev-implementation.d.ts.map +1 -1
- package/dist/commands/start-dev-implementation.js +1 -0
- package/dist/commands/start-dev-implementation.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +6 -3
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/url-handler.d.ts +5 -0
- package/dist/commands/url-handler.d.ts.map +1 -0
- package/dist/commands/url-handler.js +38 -0
- package/dist/commands/url-handler.js.map +1 -0
- package/dist/jobs/targets.d.ts +6 -1
- package/dist/jobs/targets.d.ts.map +1 -1
- package/dist/jobs/targets.js +12 -8
- package/dist/jobs/targets.js.map +1 -1
- package/dist/lib/claude-options.d.ts +47 -34
- package/dist/lib/claude-options.d.ts.map +1 -1
- package/dist/lib/claude-options.js +95 -82
- package/dist/lib/claude-options.js.map +1 -1
- package/dist/lib/claude-sessions.generated.d.ts +25 -0
- package/dist/lib/claude-sessions.generated.d.ts.map +1 -0
- package/dist/lib/claude-sessions.generated.js +16 -0
- package/dist/lib/claude-sessions.generated.js.map +1 -0
- package/dist/lib/settings.d.ts +10 -4
- package/dist/lib/settings.d.ts.map +1 -1
- package/dist/lib/settings.js +45 -15
- package/dist/lib/settings.js.map +1 -1
- package/dist/prompts/platform-prompts.d.ts +2 -0
- package/dist/prompts/platform-prompts.d.ts.map +1 -1
- package/dist/prompts/platform-prompts.js +9 -4
- package/dist/prompts/platform-prompts.js.map +1 -1
- package/dist/prompts/project-item-prompts.d.ts +3 -12
- package/dist/prompts/project-item-prompts.d.ts.map +1 -1
- package/dist/prompts/project-item-prompts.js +3 -18
- package/dist/prompts/project-item-prompts.js.map +1 -1
- package/dist/services/claude.d.ts +12 -7
- package/dist/services/claude.d.ts.map +1 -1
- package/dist/services/claude.js +7 -4
- package/dist/services/claude.js.map +1 -1
- package/dist/services/config.d.ts +5 -0
- package/dist/services/config.d.ts.map +1 -1
- package/dist/services/config.js +9 -0
- package/dist/services/config.js.map +1 -1
- package/dist/services/git.d.ts +5 -0
- package/dist/services/git.d.ts.map +1 -1
- package/dist/services/git.js +15 -3
- package/dist/services/git.js.map +1 -1
- package/dist/services/github.d.ts +25 -7
- package/dist/services/github.d.ts.map +1 -1
- package/dist/services/github.js +23 -9
- package/dist/services/github.js.map +1 -1
- package/dist/services/os-launcher.d.ts +29 -0
- package/dist/services/os-launcher.d.ts.map +1 -0
- package/dist/services/os-launcher.js +104 -0
- package/dist/services/os-launcher.js.map +1 -0
- package/dist/services/platform.d.ts +17 -3
- package/dist/services/platform.d.ts.map +1 -1
- package/dist/services/platform.js +79 -7
- package/dist/services/platform.js.map +1 -1
- package/dist/services/repository-registry.d.ts +11 -0
- package/dist/services/repository-registry.d.ts.map +1 -0
- package/dist/services/repository-registry.js +43 -0
- package/dist/services/repository-registry.js.map +1 -0
- package/dist/services/setup.d.ts.map +1 -1
- package/dist/services/setup.js +21 -1
- package/dist/services/setup.js.map +1 -1
- package/dist/services/url-handler.d.ts +23 -0
- package/dist/services/url-handler.d.ts.map +1 -0
- package/dist/services/url-handler.js +236 -0
- package/dist/services/url-handler.js.map +1 -0
- package/dist/services/worktree.d.ts +1 -19
- package/dist/services/worktree.d.ts.map +1 -1
- package/dist/services/worktree.js +0 -34
- package/dist/services/worktree.js.map +1 -1
- package/dist/types/index.d.ts +27 -25
- package/dist/types/index.d.ts.map +1 -1
- package/dist/workflow/data/project-item.d.ts +4 -0
- package/dist/workflow/data/project-item.d.ts.map +1 -1
- package/dist/workflow/data/team-member.d.ts +14 -0
- package/dist/workflow/data/team-member.d.ts.map +1 -0
- package/dist/workflow/data/team-member.js +2 -0
- package/dist/workflow/data/team-member.js.map +1 -0
- package/dist/workflow/data/workflow-context.d.ts +1 -1
- package/dist/workflow/data/workflow-states.d.ts +11 -2
- package/dist/workflow/data/workflow-states.d.ts.map +1 -1
- package/dist/workflow/data/workflow-states.generated.d.ts +17 -0
- package/dist/workflow/data/workflow-states.generated.d.ts.map +1 -1
- package/dist/workflow/data/workflow-states.generated.js +41 -0
- package/dist/workflow/data/workflow-states.generated.js.map +1 -1
- package/dist/workflow/data/workflow-states.js +21 -1
- package/dist/workflow/data/workflow-states.js.map +1 -1
- package/dist/workflow/engine/agent-session.d.ts +16 -0
- package/dist/workflow/engine/agent-session.d.ts.map +1 -0
- package/dist/workflow/engine/agent-session.js +109 -0
- package/dist/workflow/engine/agent-session.js.map +1 -0
- package/dist/workflow/engine/approval-flow.d.ts +39 -5
- package/dist/workflow/engine/approval-flow.d.ts.map +1 -1
- package/dist/workflow/engine/approval-flow.js +156 -2
- package/dist/workflow/engine/approval-flow.js.map +1 -1
- package/dist/workflow/engine/handlers/agent-implementation.d.ts +5 -4
- package/dist/workflow/engine/handlers/agent-implementation.d.ts.map +1 -1
- package/dist/workflow/engine/handlers/agent-implementation.js +13 -19
- package/dist/workflow/engine/handlers/agent-implementation.js.map +1 -1
- package/dist/workflow/engine/handlers/dev-implementation.js +1 -1
- package/dist/workflow/engine/handlers/dev-implementation.js.map +1 -1
- package/dist/workflow/engine/handlers/ready-for-approval.d.ts +7 -6
- package/dist/workflow/engine/handlers/ready-for-approval.d.ts.map +1 -1
- package/dist/workflow/engine/handlers/ready-for-approval.js +17 -19
- package/dist/workflow/engine/handlers/ready-for-approval.js.map +1 -1
- package/dist/workflow/engine/release-engine.d.ts +16 -5
- package/dist/workflow/engine/release-engine.d.ts.map +1 -1
- package/dist/workflow/engine/release-engine.js +81 -9
- package/dist/workflow/engine/release-engine.js.map +1 -1
- package/dist/workflow/engine/ship-flow.d.ts +15 -4
- package/dist/workflow/engine/ship-flow.d.ts.map +1 -1
- package/dist/workflow/engine/ship-flow.js +80 -21
- package/dist/workflow/engine/ship-flow.js.map +1 -1
- package/dist/workflow/engine/workflow-engine.d.ts +52 -16
- package/dist/workflow/engine/workflow-engine.d.ts.map +1 -1
- package/dist/workflow/engine/workflow-engine.js +146 -31
- package/dist/workflow/engine/workflow-engine.js.map +1 -1
- package/package.json +1 -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
|
|
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
|
|
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
|
|
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 **
|
|
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** |
|
|
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
|
|
|
@@ -153,6 +158,7 @@ idea1 s --target <url>
|
|
|
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
|
|
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. Leaving the title blank ships with no project item: the changes go onto a branch that gets a PR assigned to you, which merges once its checks pass, exactly as `ready-for-approval` and `approve-pr` treat a branch with no item, and no workflow status is recorded.
|
|
170
176
|
|
|
171
177
|
```bash
|
|
172
178
|
idea1 ship-local-changes --title "Release prep" --project "Omega"
|
|
@@ -177,10 +183,10 @@ idea1 ship --target <url> # an existing item whose branch has no commit
|
|
|
177
183
|
|
|
178
184
|
**Options:**
|
|
179
185
|
- `--target <url | branch | PR url>` - An existing project item (default: create a new one).
|
|
180
|
-
- `-t, --title <title>`, `-P, --project <name>` - The new item's title and Project (asked when
|
|
186
|
+
- `-t, --title <title>`, `-P, --project <name>` - The new item's title and Project (asked when no target is given; a blank title skips the item and the Project).
|
|
181
187
|
- `-n, --branch-name <name>` - Branch name under the branch prefix (default: derived from the item).
|
|
182
188
|
- `-b, --base-branch <branch>` - The branch your checkout is on, which the item's branch is cut from and merges into (default: `baseBranch`).
|
|
183
|
-
- `-M, --commit-message <message>` - Commit message (default: the item's title).
|
|
189
|
+
- `-M, --commit-message <message>` - Commit message (default: the item's title; with no item, a generic message naming the base branch).
|
|
184
190
|
- `-iso, --isolation <mode>` - `worktree` (default, never asked) works on the branch in a worktree while it is shipped and leaves your checkout on `working/release`; `main-repo` switches your checkout to the branch until the merge, then back.
|
|
185
191
|
- `-r, --reviewers <user1,user2>` - Reviewers to request on the PR (optional).
|
|
186
192
|
|
|
@@ -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
|
|
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
|
-
-
|
|
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
|
|
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
|
-
- `-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
@@ -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),
|
|
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
|
|
324
|
-
idea1 rfa --assignee
|
|
325
|
-
idea1 rfa --assignee
|
|
326
|
-
idea1 rfa --assignee
|
|
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 <
|
|
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.
|
|
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
|
|
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
|
|
|
@@ -399,8 +420,8 @@ idea1 r
|
|
|
399
420
|
- `-y, --yes` - In `merge` mode, merge without asking for confirmation; with `--target`, also start the approvals without asking. The required checks still gate every merge
|
|
400
421
|
|
|
401
422
|
**What it does:**
|
|
402
|
-
1. Requires you to be on the release branch with nothing uncommitted, unpushed or behind origin
|
|
403
|
-
2. Bumps versions, when the repository's `.idea1/settings.json` has a `release` section (see [Release Settings](#release-settings)). A versioned package needs a bump when its folder differs between the release branch and the target and its `package.json` version is still the same on both — so a release re-run after a bump never bumps twice. You pick `patch`, `minor` or `major` for each such package (or give them with `--bumps`), and are asked nothing when no package changed. The CLI makes the bump itself, in your checkout, with no script or workflow: it sets the new version in each package's `package.json` and in the lockfiles at or above the package's folder that record it (the same files `npm version` touches, edited in place so nothing else changes), commits them as one `chore: bump <package> <version>, ...` commit and pushes it to the release branch. Only plain `major.minor.patch` versions are bumped. The bump lands before the PR is opened, so its commit is the PR's head and the suite runs once, on the release as it will merge.
|
|
423
|
+
1. Requires you to be on the release branch with nothing uncommitted, unpushed or behind origin, and to have write access to the repository. Refuses when a PR from the release branch into the target is already open: one that does not follow the release workflow (it has no assignee, or its description carries no approval chain) has to be fixed in GitHub or closed, and a release PR is approved with `--approve` instead. The Idea1 web app refuses a release on the same terms
|
|
424
|
+
2. Bumps versions, when the repository's `.idea1/settings.json` has a `release` section (see [Release Settings](#release-settings)). A versioned package needs a bump when its folder differs between the release branch and the target and its `package.json` version is still the same on both — so a release re-run after a bump never bumps twice. You pick `patch`, `minor` or `major` for each such package (or give them with `--bumps`), and are asked nothing when no package changed. The CLI makes the bump itself, in your checkout, with no script or workflow: it sets the new version in each package's `package.json` and in the lockfiles at or above the package's folder that record it (the same files `npm version` touches, edited in place so nothing else changes), commits them as one `chore: bump <package> <version>, ...` commit and pushes it to the release branch. Only plain `major.minor.patch` versions are bumped. The bump lands before the PR is opened, so its commit is the PR's head and the suite runs once, on the release as it will merge. The Idea1 web app's release view makes the same bump through the GitHub API
|
|
404
425
|
3. Creates the release PR assigned to you, whose body is the release's approval chain: every contained PR — attributed by GitHub's commit association, so squash and rebase merges are covered — with its author and the assignee who approved it by merging. Commits with no PR are listed separately, split in two: the version bumps (a commit with no PR that changes only version files, meaning the `package.json` of a declared package and the lockfiles above it, whatever its name or author), which are release automation and not an exception, and genuine direct commits, which are exceptions under change-management-policy.md clause 2, explained at the quarterly review
|
|
405
426
|
4. Refuses the release when nothing in it came through a merged PR. A repository admin can override that — an explicit confirmation and a required reason — and the exception is recorded as a comment on the PR naming the admin, the reason and every commit that had no PR, as well as in the PR body. Anyone who is not a repository admin just gets the refusal
|
|
406
427
|
5. In `merge` mode, enables auto-merge, or waits for the required CI/CD checks and merges normally. Checks that fail, never start or never finish stop the release; an admin override is available but takes an explicit confirmation and a required reason, and the exception is recorded as a comment on the PR before anything is merged
|
|
@@ -410,7 +431,7 @@ idea1 r
|
|
|
410
431
|
|
|
411
432
|
`idea1 release --target <items, branches or PRs>` releases the release branch once the given targets are approved into it, as one unattended sequence:
|
|
412
433
|
|
|
413
|
-
1. **Checks:** your checkout must be on the release branch, clean and level with origin. Then every target is resolved exactly as `approve-pr` resolves several targets.
|
|
434
|
+
1. **Checks:** your checkout must be on the release branch, clean and level with origin, and the release must be one that can be created (see step 1 above). Then every target is resolved exactly as `approve-pr` resolves several targets.
|
|
414
435
|
2. **Questions, all asked up front:**
|
|
415
436
|
- the options the targets' workflow states need, then one confirmation of the approvals;
|
|
416
437
|
- the version bump of every versioned package changed on the release branch or on any target's branch;
|
|
@@ -426,11 +447,34 @@ In interactive mode the whole sequence runs as a background job (see `/jobs`); o
|
|
|
426
447
|
|
|
427
448
|
#### Approving an open release
|
|
428
449
|
|
|
429
|
-
`idea1 release --approve` finds the open release PR from the release branch into the target and merges it as its approver,
|
|
450
|
+
`idea1 release --approve` finds the open release PR from the release branch into the target and merges it as its approver, on the same terms as the Idea1 web app: you need write access to the repository, the PR must follow the release workflow (an assignee, and the approval chain as its description), and you must be one of its assignees — anyone else is refused, and the PR is reassigned in GitHub or approved by its assignee. Then:
|
|
430
451
|
- every check passed — merges now
|
|
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
|
-
"
|
|
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
|
-
- `
|
|
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
|
-
|
|
522
|
-
|
|
523
|
-
|
|
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
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
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
|
-
"
|
|
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
|
-
|
|
542
|
-
|
|
543
|
-
The settings are read from the main
|
|
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
|
|
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
|
|
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.
|
|
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":"
|
|
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"}
|
package/dist/cli/named-lists.js
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"named-lists.js","sourceRoot":"","sources":["../../src/cli/named-lists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD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M,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"}
|
package/dist/cli/parser.d.ts
CHANGED
|
@@ -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.
|
package/dist/cli/parser.d.ts.map
CHANGED
|
@@ -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
|
|
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"}
|
package/dist/cli/parser.js
CHANGED
|
@@ -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.
|
package/dist/cli/parser.js.map
CHANGED
|
@@ -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
|
|
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;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,WAAmC,EAAE;IACzF,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxD,OAAO,OAAO,MAAM,CAAC,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;AACzG,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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dist/cli/resolver.d.ts
CHANGED
|
@@ -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
|
|
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"}
|