codebyplan 1.10.0 → 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/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ var VERSION, PACKAGE_NAME;
14
14
  var init_version = __esm({
15
15
  "src/lib/version.ts"() {
16
16
  "use strict";
17
- VERSION = "1.10.0";
17
+ VERSION = "1.10.1";
18
18
  PACKAGE_NAME = "codebyplan";
19
19
  }
20
20
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebyplan",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "CLI for CodeByPlan — AI-powered development planning and tracking",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,12 +10,12 @@ effort: high
10
10
 
11
11
  Codifies the long-lived-branch-integration auto-memory rule (`[[feedback_long-lived-branch-integration]]`): when working on a feat branch that has diverged from main, merge main INTO the feat branch (not the reverse), resolve conflicts with the user, run a scoped QA pass, then return control to the caller — never rebase, never force-push, never push automatically.
12
12
 
13
- Triggered by `/cbp-task-start` (Step 3.6, optional stale-check), `/cbp-task-complete` (Step 4.5, mandatory pre-complete), and `/cbp-checkpoint-end` (Step 0, mandatory pre-shipment). User can also invoke manually at any time.
13
+ Triggered by `/cbp-task-start` (Step 3.6, optional stale-check), `/cbp-task-complete` (Step 5.5, mandatory pre-push — runs after the task commit on a clean tree), and `/cbp-checkpoint-end` (Step 0, mandatory pre-shipment). User can also invoke manually at any time.
14
14
 
15
15
  ## When to Use
16
16
 
17
17
  - **Auto-trigger (optional)**: `/cbp-task-start` Step 3.6 detects the feat branch is >10 commits behind `origin/{BASE}` OR the last fetch is >24h old.
18
- - **Auto-trigger (mandatory)**: `/cbp-task-complete` Step 4.5 — always run before marking a task complete to ensure the feat branch includes the latest main work.
18
+ - **Auto-trigger (mandatory)**: `/cbp-task-complete` Step 5.5 — mandatory pre-push, after the task commit; runs on a clean tree to ensure the feat branch includes the latest main work before the single trailing push.
19
19
  - **Auto-trigger (mandatory)**: `/cbp-checkpoint-end` Step 0 — always run before shipment to ensure no main drift reaches production.
20
20
  - **Manual invocation**: user runs `/cbp-merge-main` directly when they know main has advanced and want to pull it in immediately.
21
21
 
@@ -219,7 +219,7 @@ Return control to the caller. **This skill NEVER pushes** — the caller decides
219
219
 
220
220
  - **Triggered by**:
221
221
  - `/cbp-task-start` Step 3.6 (optional stale-check: >10 commits behind OR >24h fetch age)
222
- - `/cbp-task-complete` Step 4.5 (mandatory pre-complete)
222
+ - `/cbp-task-complete` Step 5.5 (mandatory pre-push, after task commit)
223
223
  - `/cbp-checkpoint-end` Step 0 (mandatory pre-shipment)
224
224
  - User-invocable manually
225
225
  - **Reads**: `.codebyplan/git.json`, MCP `get_checkpoints`, MCP `get_tasks`, git state
@@ -102,26 +102,34 @@ Load `task.qa` and `task.files_changed`:
102
102
 
103
103
  Collect all files_changed from task. Deduplicate (latest action wins).
104
104
 
105
- ### Step 4.5: Merge Production Branch Before Commit (mandatory)
105
+ ### Step 5: Git Commit (no push)
106
106
 
107
- Before committing task work, ensure the feat branch is current with the latest production (main) work. This prevents shipping a stale PR and surfaces conflicts at task-complete time rather than at PR review.
107
+ Commit the task work FIRST, so the merge in Step 5.5 runs against a clean tree. `/cbp-merge-main` must never run before the task commit.
108
108
 
109
- 1. Trigger `/cbp-merge-main`.
110
- 2. If the skill exits with failure (offline, unresolved conflicts, user-aborted): surface the failure and STOP — do NOT proceed to Step 5 (commit). The user resolves and re-invokes `/cbp-task-complete`.
111
- 3. If the skill exits with QA warnings the user chose to commit-as-is: continue to Step 5; surface a soft warning in the Step 9 output (`⚠ Merged with QA failures pending fix in follow-up`).
112
- 4. On clean success: continue to Step 5.
109
+ **Zero-file guard**: if `aggregated_files` is empty (investigative or DB-only tasks), skip the commit. Record "No git commit: zero files changed" in the Step 9 summary, then continue to Step 5.5 (the branch may still need a main sync).
110
+
111
+ **Already-committed guard**: if the aggregated files are already committed (working tree clean for them — e.g. a re-invoke after a Step 5.5 merge failure), skip the commit and continue to Step 5.5; the prior run's task commit still stands.
112
+
113
+ Otherwise: invoke `/cbp-git-commit` to stage approved files and create the commit. Claude does NOT git add directly. Do NOT push here — the push in Step 5.7 carries both this commit and the merge commit.
113
114
 
114
- ### Step 5: Git Commit and Push
115
+ ### Step 5.5: Merge Production Branch (mandatory)
116
+
117
+ Now that task work is committed, ensure the feat branch is current with the latest production (main) work. Running the merge AFTER the commit means `/cbp-merge-main` resolves conflicts against committed work on a clean tree — no dirty-tree interleave, no Step-0 dirty-tree prompt for the task files. This still prevents shipping a stale PR and surfaces conflicts at task-complete time rather than at PR review.
118
+
119
+ 1. Trigger `/cbp-merge-main`.
120
+ 2. If the skill exits with failure (offline, unresolved conflicts, user-aborted): surface the failure and STOP — do NOT proceed to Step 5.7 (push) or Step 7 (complete). The task commit from Step 5 persists; the user resolves and re-invokes `/cbp-task-complete`, which re-runs the merge on the now-clean tree.
121
+ 3. If the skill exits with QA warnings the user chose to commit-as-is: continue to Step 5.7; surface a soft warning in the Step 9 output (`⚠ Merged with QA failures pending fix in follow-up`).
122
+ 4. On clean success: continue to Step 5.7.
115
123
 
116
- **Zero-file guard**: if `aggregated_files` is empty (investigative or DB-only tasks), skip commit and push. Record "No git commit: zero files changed" in the Step 9 summary.
124
+ ### Step 5.7: Push
117
125
 
118
- Otherwise: invoke `/cbp-git-commit` to stage approved files and create the commit. Claude does NOT git add directly. After commit:
126
+ Push once, carrying BOTH the task commit (Step 5) and the merge commit (Step 5.5):
119
127
 
120
128
  ```bash
121
129
  git push origin $(git branch --show-current)
122
130
  ```
123
131
 
124
- If push fails, investigate and fix per migration-infrastructure rule — never skip.
132
+ Skip the push only when nothing was committed in Step 5 AND `/cbp-merge-main` reported already-up-to-date (nothing to push). If push fails, investigate and fix per migration-infrastructure rule — never skip.
125
133
 
126
134
  ### Step 6: Update Task Files
127
135