pi-graphite 0.3.5 → 0.4.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@ Opinionated pi tools + skill that wrap the [Graphite](https://graphite.com)
5
5
 
6
6
  ```
7
7
  graphite_status → (graphite_setup if needed) → graphite_sync → graphite_navigate
8
- → graphite_change → graphite_submit_stack (dry-run) → graphite_submit_stack (apply)
8
+ → graphite_change → graphite_submit (dry-run) → graphite_submit (apply)
9
9
  ```
10
10
 
11
11
  The extension wraps `gt` only. It deliberately does **not** call `gh`, edit
@@ -48,7 +48,7 @@ agent loads it on demand.
48
48
  | `graphite_sync` | Start-of-day / after-merge cleanup + restack | `gt sync` |
49
49
  | `graphite_navigate` | Move around the stack | `gt checkout`, `gt up`/`down`/`top`/`bottom` |
50
50
  | `graphite_change` | Create / amend a stacked branch | `gt create -am`, `gt modify -am`, `gt modify --into`, `gt absorb` |
51
- | `graphite_submit_stack` | Push the entire stack and open/update PRs (dry-run by default) | `gt submit --stack --no-edit --no-ai` |
51
+ | `graphite_submit` | Push the entire stack and open/update PRs (dry-run by default) | `gt submit --stack --no-edit --no-ai` |
52
52
  | `graphite_recover` | Continue / abort / undo | `gt continue`, `gt abort`, `gt undo` |
53
53
 
54
54
  ## Golden path
@@ -60,8 +60,8 @@ graphite_sync # at session start, or after merges
60
60
  graphite_navigate action=checkout branch=… # move to the target PR / parent
61
61
  # user edits files
62
62
  graphite_change action=create message="…" # or action=amend
63
- graphite_submit_stack apply=false # review the dry-run plan
64
- graphite_submit_stack apply=true confirmRemote=true
63
+ graphite_submit apply=false # review the dry-run plan
64
+ graphite_submit apply=true confirmRemote=true
65
65
  ```
66
66
 
67
67
  Conflict path:
@@ -86,7 +86,7 @@ dependent branches.
86
86
  - `graphite_setup action=track_branch` requires explicit `branch`, explicit
87
87
  `parent`, and `confirmParent:true`; do not guess parent if unclear.
88
88
  - `graphite_setup action=init_repo reset:true` needs `confirmDestructive:true`.
89
- - `graphite_submit_stack` defaults to `--dry-run`; `apply:true` also needs
89
+ - `graphite_submit` defaults to `--dry-run`; `apply:true` also needs
90
90
  `confirmRemote:true`. `--force` push also requires `confirmRemote:true`.
91
91
  - `graphite_sync` with `force` or `deleteAll` needs `confirmDestructive:true`.
92
92
  - `graphite_recover action=continue` refuses to proceed if tracked files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-graphite",
3
- "version": "0.3.5",
3
+ "version": "0.4.0",
4
4
  "description": "Opinionated pi tools + skill for stacked PR workflows with the Graphite (gt) CLI.",
5
5
  "keywords": [
6
6
  "pi",
@@ -42,7 +42,7 @@ The extension registers seven tools. Prefer them over `gt`/`git`/`gh` in bash.
42
42
  | `graphite_sync` | `gt sync` — pull trunk, drop merged branches, restack |
43
43
  | `graphite_navigate` | `gt checkout` / `up` / `down` / `top` / `bottom` / trunk |
44
44
  | `graphite_change` | `gt create` / `gt modify` / `gt modify --into` / `gt absorb` |
45
- | `graphite_submit_stack` | `gt submit --stack --no-edit` (dry-run by default) |
45
+ | `graphite_submit` | `gt submit --stack --no-edit` (dry-run by default) |
46
46
  | `graphite_recover` | `gt continue` / `gt abort` / `gt undo` |
47
47
 
48
48
  All tools require an absolute `cwd`.
@@ -60,9 +60,9 @@ graphite_navigate (move to the branch you want to mutate)
60
60
 
61
61
  graphite_change (create or amend)
62
62
 
63
- graphite_submit_stack apply=false (review dry-run plan)
63
+ graphite_submit apply=false (review dry-run plan)
64
64
 
65
- graphite_submit_stack apply=true (push, with confirmRemote=true)
65
+ graphite_submit apply=true (push, with confirmRemote=true)
66
66
  confirmRemote=true
67
67
  ```
68
68
 
@@ -129,9 +129,9 @@ graphite_status({ cwd }) # confirm state
129
129
  graphite_status({ cwd }) # confirm position
130
130
  # ... user makes code changes ...
131
131
  graphite_change({ cwd, action: "create", message: "..." })
132
- graphite_submit_stack({ cwd, apply: false })
132
+ graphite_submit({ cwd, apply: false })
133
133
  # review plan with user; then:
134
- graphite_submit_stack({ cwd, apply: true, confirmRemote: true })
134
+ graphite_submit({ cwd, apply: true, confirmRemote: true })
135
135
  ```
136
136
 
137
137
  ### Update an existing PR
@@ -141,8 +141,8 @@ graphite_status({ cwd })
141
141
  graphite_navigate({ cwd, action: "checkout", branch: "<pr-branch>" })
142
142
  # ... user makes code changes ...
143
143
  graphite_change({ cwd, action: "amend", message: "..." })
144
- graphite_submit_stack({ cwd, apply: false })
145
- graphite_submit_stack({ cwd, apply: true, confirmRemote: true })
144
+ graphite_submit({ cwd, apply: false })
145
+ graphite_submit({ cwd, apply: true, confirmRemote: true })
146
146
  ```
147
147
 
148
148
  ### Add a child PR off a specific parent
@@ -151,7 +151,7 @@ graphite_submit_stack({ cwd, apply: true, confirmRemote: true })
151
151
  graphite_navigate({ cwd, action: "checkout", branch: "<parent-branch>" })
152
152
  # ... changes ...
153
153
  graphite_change({ cwd, action: "create", message: "..." })
154
- graphite_submit_stack({ cwd, apply: false })
154
+ graphite_submit({ cwd, apply: false })
155
155
  ```
156
156
 
157
157
  ### Land changes into a downstack branch
@@ -160,7 +160,7 @@ graphite_submit_stack({ cwd, apply: false })
160
160
  # Make the change locally (working tree dirty).
161
161
  graphite_change({ cwd, action: "amend_into", into: "<downstack-branch>", message: "..." })
162
162
  graphite_status({ cwd })
163
- graphite_submit_stack({ cwd, apply: false })
163
+ graphite_submit({ cwd, apply: false })
164
164
  ```
165
165
 
166
166
  For larger reshuffles touching several downstack commits, prefer `absorb`:
@@ -199,7 +199,7 @@ graphite_recover({ cwd, action: "undo" })
199
199
 
200
200
  ## Rules
201
201
 
202
- - **Submit stacks, not branches.** `graphite_submit_stack` always passes
202
+ - **Submit stacks, not branches.** `graphite_submit` always passes
203
203
  `--stack`. There is no safe single-branch submit path in this extension.
204
204
  If the user truly needs to push only one branch, ask them to run
205
205
  `gt submit --branch=<name>` themselves in their own terminal — do not
@@ -213,7 +213,7 @@ graphite_recover({ cwd, action: "undo" })
213
213
  - **Prefer `graphite_sync` over manual restack.** The extension does not
214
214
  expose a standalone restack tool. Sync covers both pull + restack.
215
215
  - **Always dry-run first.** Show the user the dry-run plan from
216
- `graphite_submit_stack apply=false` before pushing.
216
+ `graphite_submit apply=false` before pushing.
217
217
  - **`apply:true` requires `confirmRemote:true`.** The tool will refuse
218
218
  otherwise. This is intentional friction.
219
219
  - **Destructive sync flags require `confirmDestructive:true`** (`force`,
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@ import { registerSetup } from "./tools/setup";
5
5
  import { registerSync } from "./tools/sync";
6
6
  import { registerNavigate } from "./tools/navigate";
7
7
  import { registerChange } from "./tools/change";
8
- import { registerSubmitStack } from "./tools/submit";
8
+ import { registerSubmit } from "./tools/submit";
9
9
  import { registerRecover } from "./tools/recover";
10
10
 
11
11
  /**
@@ -18,12 +18,12 @@ import { registerRecover } from "./tools/recover";
18
18
  * graphite_sync — start-of-day / after-merge cleanup + restack
19
19
  * graphite_navigate — move to the branch / PR you want to mutate
20
20
  * graphite_change — create or amend a stacked branch
21
- * graphite_submit_stack — push the whole stack and open/update PRs
21
+ * graphite_submit — push the whole stack and open/update PRs
22
22
  * graphite_recover — continue / abort / undo after conflicts or mistakes
23
23
  *
24
24
  * Golden path:
25
25
  *
26
- * status → (setup if needed) → sync → navigate → change → submit_stack(dry-run) → submit_stack(apply)
26
+ * status → (setup if needed) → sync → navigate → change → submit(dry-run) → submit(apply)
27
27
  *
28
28
  * Conflict path:
29
29
  *
@@ -34,7 +34,7 @@ import { registerRecover } from "./tools/recover";
34
34
  * - `gt` is invoked with --cwd <cwd> --no-interactive by default; tools that support AI metadata pass --no-ai.
35
35
  * - Editor / pager / browser env is forced safe; interactive editor / hunk /
36
36
  * browser flows are not exposed.
37
- * - graphite_submit_stack defaults to --dry-run; apply requires
37
+ * - graphite_submit defaults to --dry-run; apply requires
38
38
  * `apply:true` AND `confirmRemote:true`.
39
39
  * - graphite_sync with force / deleteAll requires `confirmDestructive:true`.
40
40
  * - This extension wraps `gt` only. It deliberately does not call `gh`,
@@ -47,6 +47,6 @@ export default function (pi: ExtensionAPI) {
47
47
  registerSync(pi);
48
48
  registerNavigate(pi);
49
49
  registerChange(pi);
50
- registerSubmitStack(pi);
50
+ registerSubmit(pi);
51
51
  registerRecover(pi);
52
52
  }
@@ -10,7 +10,7 @@ import {
10
10
  } from "../lib/schema";
11
11
 
12
12
  /**
13
- * graphite_submit_stack — the only blessed submit path.
13
+ * graphite_submit — the only blessed submit path.
14
14
  *
15
15
  * Wraps `gt submit --stack --no-edit --no-ai`. Defaults to --dry-run so the
16
16
  * caller can review the plan. Actually pushing requires `apply:true` AND
@@ -20,16 +20,16 @@ import {
20
20
  * current-branch-only submit. The skill calls out that the correct workflow
21
21
  * is always to submit the entire stack.
22
22
  */
23
- export function registerSubmitStack(pi: ExtensionAPI) {
23
+ export function registerSubmit(pi: ExtensionAPI) {
24
24
  pi.registerTool({
25
- name: "graphite_submit_stack",
25
+ name: "graphite_submit",
26
26
  label: "Graphite: submit stack",
27
27
  description:
28
28
  "Push the entire current stack and create/update PRs via `gt submit --stack --no-edit`. Defaults to a dry-run plan; pass apply:true with confirmRemote:true to actually push. PR title/body editing is intentionally not exposed.",
29
29
  promptSnippet:
30
- "graphite_submit_stack: plan or apply `gt submit --stack` for the full stack",
30
+ "graphite_submit: plan or apply `gt submit --stack` for the full stack",
31
31
  promptGuidelines: [
32
- "Always call graphite_submit_stack with apply:false (default) first to review the dry-run plan, then call again with apply:true and confirmRemote:true to actually push.",
32
+ "Always call graphite_submit with apply:false (default) first to review the dry-run plan, then call again with apply:true and confirmRemote:true to actually push.",
33
33
  "This extension does not edit PR titles/bodies. If you need to set them, do it outside this extension after the push.",
34
34
  ],
35
35
  parameters: Type.Object({