@chamba/claude-extras 0.5.0 → 0.5.2

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
@@ -159,13 +159,23 @@ Then, in Claude Code:
159
159
  /ticket TICKET-123
160
160
  ```
161
161
 
162
- `/ticket` runs the full orchestrator-worker flow: create worktrees
163
- `chamba_load_context` → delegate the plan to the **planner** subagent →
164
- `chamba_review_plan` + the **reviewer** subagent → delegate code to **implementer** and
165
- tests to **tester** (all inside the worktrees) → `chamba_summarize_to_vault`. It runs to
166
- the end and stops for your review. It **never commits, merges or pushes** — you review,
167
- commit and send to code review by hand. Each worker runs with the model + effort you
168
- configured above.
162
+ If you already wrote a plan (in plan mode, exported to a `.md`, or by hand), reuse it and
163
+ skip the planning step:
164
+
165
+ ```
166
+ /ticket -p ./plans/TICKET-123.md TICKET-123
167
+ ```
168
+
169
+ `/ticket` runs the full orchestrator-worker flow: `chamba_load_context` → delegate the
170
+ plan to the **planner** subagent (or, with `-p <plan-path>`, read your plan and skip
171
+ this) → `chamba_review_plan` + the **reviewer** subagent → **ask you any open questions
172
+ the plan left unresolved**, fold in your answers → create worktrees only for the repos
173
+ the plan touches → delegate code to **implementer** and tests to **tester** (all inside
174
+ the worktrees) → verify the real diff (referential closure + build/typecheck) →
175
+ `chamba_summarize_to_vault`. It clarifies once up front, then runs to the end and stops
176
+ for your review with an acceptance-criteria checklist. It **never commits, merges or
177
+ pushes** — you review, commit and send to code review by hand. Each worker runs with the
178
+ model + effort you configured above.
169
179
 
170
180
  > **Security:** `copyEnvFiles` copies secrets into the worktree directories. Add your
171
181
  > `worktrees.root` (e.g. `WORKTREES/`) to `.gitignore` so they're never committed. It's
@@ -11,8 +11,15 @@ map + relevant notes). Produce a concrete, reviewable plan — do not write code
11
11
  - State explicit acceptance criteria and how they'll be verified (tests).
12
12
  - Call out risks and any sensitive areas (auth, payments, migrations, data).
13
13
  - Keep it tight and concrete enough that an implementer can execute it without
14
- guessing. If the ticket is ambiguous, state the assumptions you made instead of
15
- inventing scope.
14
+ guessing.
15
+ - Separate what you can decide from what you can't. Assumptions you're confident
16
+ in: state them as assumptions and move on. Genuine forks that change scope or
17
+ behaviour, or product decisions only the human can make: put them under a
18
+ `## Open questions` section, each as a specific question a one-line answer
19
+ resolves. Only list questions that would actually change the plan — not
20
+ implementation details the implementer can settle. Never invent scope to paper
21
+ over them.
16
22
 
17
23
  Return the plan as structured markdown. The orchestrator runs it through
18
- `chamba_review_plan` and the reviewer subagent before any code is written.
24
+ `chamba_review_plan` and the reviewer subagent, then resolves any `## Open
25
+ questions` with the human, before any code is written.
@@ -1,41 +1,64 @@
1
1
  ---
2
2
  description: Resolve a ticket end-to-end in isolated worktrees, delegating to chamba's agents
3
- argument-hint: <ticket> [repo ...]
3
+ argument-hint: "[-p <plan-path>] <ticket> [repo ...]"
4
4
  ---
5
5
 
6
6
  You are orchestrating ticket **$ARGUMENTS** end-to-end. chamba provides context,
7
7
  plan validation, worktrees and vault memory; you delegate the thinking and the
8
- code to the configured subagents. **Run to the end and stop only for my final
9
- review** — do not pause for approval mid-way.
8
+ code to the configured subagents.
10
9
 
11
- **One exception to running autonomously:** the plan itself may mark an item as
12
- needing my approval (scope expansion beyond the ticket, a destructive or
13
- irreversible change, a product decision you can't make). You do NOT act on those.
14
- You complete everything else and surface them at the final gate. Autonomy is
15
- bounded by the plan's gates it must never silently drop an acceptance criterion.
10
+ **Clarify once, up front; then run to the end.** There is exactly one point where
11
+ you may pause: once the plan is ready, if it has unresolved open questions or
12
+ decisions only I can make, ask me, fold my answers into the plan, and continue.
13
+ After that, run to the end and stop only for my final review do not pause again
14
+ mid-way. You never resolve a flagged decision on your own and never silently drop
15
+ an acceptance criterion.
16
16
 
17
- The first token of the arguments is the ticket id; any further tokens are repos I
18
- named explicitly. Analyze first, create worktrees only for the repos actually
19
- touched do not create a worktree for every repo in the workspace.
17
+ Parse the arguments first. If they start with `-p` or `--plan`, the next token is
18
+ the path to a plan I already wrote (relative to the workspace root, or absolute) —
19
+ read it and skip planning (see step 2). The first non-flag token is the ticket id;
20
+ any tokens after it are repos I named explicitly. Analyze first, create worktrees
21
+ only for the repos actually touched — do not create a worktree for every repo in
22
+ the workspace.
20
23
 
21
24
  1. Call `chamba_load_context` with the ticket to pull the workspace map (all repos
22
25
  and what each one is) + relevant Obsidian notes + each repo's coding rules.
23
- 2. Delegate to the **planner** subagent to produce the plan. The plan MUST state
24
- **which repos the ticket touches and why**, with subtasks grouped per repo, and
25
- it MUST map **every acceptance criterion of the ticket** to a subtask. If an AC
26
- needs a decision you can't make autonomously, the plan marks it
27
- **needs-approval** that is a hard gate, not something to resolve on your own.
28
- If I named repos in the arguments, use exactly those; otherwise infer the set
29
- from the ticket + the workspace map. List ambiguities as assumptionsdo not
30
- invent scope.
31
- 3. Run the plan through `chamba_review_plan` and have the **reviewer** subagent
32
- audit it. Fix and re-review until approved (max 3 rounds). Do NOT stop to ask me.
33
- 4. Create isolated worktrees ONLY for the repos the plan identified: call
26
+ 2. Obtain the plan:
27
+ - **If I passed `-p <plan-path>` and the file exists:** read it and use it as
28
+ THE plan do NOT delegate to the planner. Run it through `chamba_review_plan`
29
+ to sanity-check structure and surface issues, but do NOT bring in the reviewer
30
+ subagent to rewrite it (I already approved this plan). If the plan doesn't
31
+ cover a ticket acceptance criterion, or fails to mark a risky item
32
+ **needs-approval**, note it as a gap and carry it to the final report don't
33
+ invent scope to fill it. Then continue to the clarification gate (step 4).
34
+ - **If `-p` was given but the file does not exist:** tell me you couldn't find
35
+ it, then fall back to generating the plan (next bullet).
36
+ - **Otherwise (no `-p`):** delegate to the **planner** subagent to produce the
37
+ plan, then continue to step 3.
38
+ Either way the plan MUST state **which repos the ticket touches and why**, with
39
+ subtasks grouped per repo, and map **every acceptance criterion of the ticket**
40
+ to a subtask. Items needing a decision you can't make autonomously are marked
41
+ **needs-approval** — a hard gate, not something to resolve on your own. If I
42
+ named repos in the arguments, use exactly those; otherwise infer the set from
43
+ the plan + the workspace map. State confident assumptions as assumptions and put
44
+ genuine forks under **Open questions** — do not invent scope.
45
+ 3. (Skip when the plan came from `-p` — already checked in step 2.) Run the plan
46
+ through `chamba_review_plan` and have the **reviewer** subagent audit it. Fix
47
+ and re-review until approved (max 3 rounds). Do NOT stop to ask me.
48
+ 4. **Clarification gate.** Before creating any worktree, check the plan for
49
+ unresolved **Open questions** and any item marked **needs-approval**;
50
+ `chamba_review_plan` flags these as `unresolved-open-questions`. If there are
51
+ any: ask me all of them in one concise batch, wait for my answers, fold them
52
+ into the plan (adjust scope, subtasks and acceptance criteria as needed), and
53
+ only then continue. If the plan has none, proceed without pausing. This is the
54
+ only place you stop before the final review — it applies whether the plan came
55
+ from the planner or from `-p`.
56
+ 5. Create isolated worktrees ONLY for the repos the plan identified: call
34
57
  `chamba_create_worktrees` with the ticket and that repo list. ALL work happens
35
58
  inside these worktrees — never edit the main checkouts.
36
- 5. For each subtask/repo, delegate implementation to the **implementer** subagent
59
+ 6. For each subtask/repo, delegate implementation to the **implementer** subagent
37
60
  (in that repo's worktree) and the tests to the **tester** subagent; run them.
38
- 6. **Verify against the real diff** (not the plan). For each touched repo: have the
61
+ 7. **Verify against the real diff** (not the plan). For each touched repo: have the
39
62
  **reviewer** subagent audit the actual diff for correctness, missing tests, and
40
63
  **referential closure** — anything the change deleted must leave no orphaned
41
64
  callers and no now-unused exports. Then run that repo's build / typecheck / lint,
@@ -43,8 +66,8 @@ touched — do not create a worktree for every repo in the workspace.
43
66
  misses orphans whose name doesn't contain the deleted symbol — rely on the
44
67
  build/typechecker/dead-code tool, not just grep. Fix what comes back, then
45
68
  re-verify (max 3 rounds).
46
- 7. Call `chamba_summarize_to_vault` with a summary of what changed.
47
- 8. STOP and report for my review. The report MUST include:
69
+ 8. Call `chamba_summarize_to_vault` with a summary of what changed.
70
+ 9. STOP and report for my review. The report MUST include:
48
71
  - the repos touched and why;
49
72
  - per repo, what changed and the test + verify results;
50
73
  - an **acceptance-criteria checklist**: every AC of the ticket marked
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chamba/claude-extras",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Optional Claude Code extras for chamba: slash commands, subagents and hooks installer",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@inquirer/prompts": "^7.0.0",
34
- "@chamba/adapters": "0.5.0",
35
- "@chamba/core": "0.5.0"
34
+ "@chamba/core": "0.5.2",
35
+ "@chamba/adapters": "0.5.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.0.0",