codebyplan 1.13.58 → 1.13.60
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/package.json
CHANGED
|
@@ -253,7 +253,9 @@
|
|
|
253
253
|
"Bash(codebyplan ci:*)",
|
|
254
254
|
"Bash(npx codebyplan ci:*)",
|
|
255
255
|
"Bash(codebyplan cd:*)",
|
|
256
|
-
"Bash(npx codebyplan cd:*)"
|
|
256
|
+
"Bash(npx codebyplan cd:*)",
|
|
257
|
+
"Bash(codebyplan cleanup-plan-folders:*)",
|
|
258
|
+
"Bash(npx codebyplan cleanup-plan-folders:*)"
|
|
257
259
|
]
|
|
258
260
|
},
|
|
259
261
|
"attribution": {
|
|
@@ -68,6 +68,51 @@ Check that the base branch exists remotely:
|
|
|
68
68
|
|--------|----------|------------|
|
|
69
69
|
| BASE | Yes | **STOP** — cannot ship without production branch |
|
|
70
70
|
|
|
71
|
+
### Step 4.5: Export + Plan-Folder Cleanup
|
|
72
|
+
|
|
73
|
+
Before shipping, export the checkpoint's workflow data and remove the generated
|
|
74
|
+
plan-folder trees from the git index. This step is **best-effort** — a failure
|
|
75
|
+
here MUST NOT block shipment. Warn and continue on any error.
|
|
76
|
+
|
|
77
|
+
1. Run export (capture result for Step 10 summary):
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx codebyplan checkpoint export --id <CHECKPOINT_ID>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- On exit 0: parse JSON stdout → `EXPORT_RESULT` (`{ exported, path, last_exported_at }`).
|
|
84
|
+
- On non-zero exit: emit a warning, set `EXPORT_RESULT = { exported: false, error: "<stderr summary>" }`, continue.
|
|
85
|
+
|
|
86
|
+
2. Stage the export artifacts:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git add .codebyplan/exports/
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
3. Run plan-folder cleanup:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npx codebyplan cleanup-plan-folders
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- On exit 0: parse JSON stdout → `CLEANUP_RESULT` (`{ removed, skipped }`).
|
|
99
|
+
- On non-zero exit: emit a warning, set `CLEANUP_RESULT = { removed: [], error: "<stderr summary>" }`, continue.
|
|
100
|
+
|
|
101
|
+
4. Commit if anything was staged:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
git diff --cached --name-only
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
If the output is non-empty, commit with:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
git commit -m "feat: export CHK-<N> and remove plan-folder docs"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Use the checkpoint number for `<N>`. Do NOT include any mention of AI tooling
|
|
114
|
+
in the commit message.
|
|
115
|
+
|
|
71
116
|
### Step 5: Ship to Production
|
|
72
117
|
|
|
73
118
|
If `auto_push_enabled` is true, run `/cbp-ship-main`.
|
|
@@ -242,6 +287,11 @@ Present summary:
|
|
|
242
287
|
### Branch Promotion
|
|
243
288
|
- **feat -> [BASE]**: [PR URL] (merged)
|
|
244
289
|
|
|
290
|
+
### Export
|
|
291
|
+
- **Workflow export**: [EXPORT_RESULT.path from Step 4.5, or "skipped: <reason>"]
|
|
292
|
+
- **Plan folders removed**: [.codebyplan/checkpoint + standalone, or "none"]
|
|
293
|
+
(From Step 4.5. Omit this section if no export was attempted.)
|
|
294
|
+
|
|
245
295
|
### Version Bumps
|
|
246
296
|
- [package]: [currentVersion] → [nextVersion]
|
|
247
297
|
(From `context.shipment.version_bumps[]` — committed as `chore(release): bump versions`; publishes on merge. Omit this section if no packages were bumped.)
|
|
@@ -103,6 +103,14 @@ Sizing: with a 1M-token context, tasks can be large — group by coherent purpos
|
|
|
103
103
|
|
|
104
104
|
For each task use `codebyplan task create --checkpoint-id <id> --number <n> --title <title> --requirements <json> --context <json>` (CLI write-through; break-glass: MCP `create_task`). **Additive mode:** create only tasks for steps not already covered by an existing task; never delete in-flight tasks. **Coverage check** — a plan step counts as covered only when an existing task's requirements address its full scope; when uncertain, create the task and note in its requirements `may overlap with TASK-N — review before executing`.
|
|
105
105
|
|
|
106
|
+
After creating tasks, seed the three git-first editable plan-field docs into the checkpoint plan folder (NNN = checkpoint number zero-padded to 3 digits):
|
|
107
|
+
|
|
108
|
+
- `.codebyplan/checkpoint/{NNN}/idea.md` — seeded from the captured idea content (the `ideas[0].description` and any multi-idea summary).
|
|
109
|
+
- `.codebyplan/checkpoint/{NNN}/requirements.md` — seeded from the combined `ideas[].requirements` items.
|
|
110
|
+
- `.codebyplan/checkpoint/{NNN}/research.md` — seeded from `checkpoint.research` (may be empty for level-0/1 checkpoints; write the file regardless so the push webhook can ingest it).
|
|
111
|
+
|
|
112
|
+
These files are the git-first source of truth for their respective plan fields. The DB `plan_documents` rows are a projection ingested via the push-webhook round-trip after the branch push. Write the files with `Write` (create-or-overwrite); skip if the file already has content and this is an additive re-plan (do not overwrite user-edited content).
|
|
113
|
+
|
|
106
114
|
### Step 10: Persist Full Context
|
|
107
115
|
|
|
108
116
|
Final write of the complete `checkpoint.context` JSONB via `codebyplan checkpoint update --id <id> --context <json>` (CLI write-through; break-glass: MCP `update_checkpoint`). Honor the **context-replaces-not-merges** contract: read the current context, merge your additions in memory, write the FULL object (`decisions` + `discoveries` + `dependencies` + `constraints` + `qa_answers` + `alternatives`). A partial write clobbers sibling keys. Phrase any database-verb words as prose in payloads (WAF gate).
|
|
@@ -111,6 +111,45 @@ Ensure the feat branch is current with the latest production work.
|
|
|
111
111
|
3. If QA warnings the user chose to commit-as-is: continue to Step 5.7 with a soft warning.
|
|
112
112
|
4. On clean success: continue to Step 5.7.
|
|
113
113
|
|
|
114
|
+
### Step 5.6: Export + Plan-Folder Cleanup
|
|
115
|
+
|
|
116
|
+
Export the standalone task's workflow data and remove the generated plan-folder
|
|
117
|
+
trees from the git index. This step is **best-effort** — a failure here MUST
|
|
118
|
+
NOT block push or ship. Warn and continue on any error.
|
|
119
|
+
|
|
120
|
+
1. Run export (capture result for Step 9 summary):
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx codebyplan standalone-task export --id <STANDALONE_TASK_ID>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- On exit 0: parse JSON stdout → `EXPORT_RESULT` (`{ exported, path }`).
|
|
127
|
+
- On non-zero exit: emit a warning, set `EXPORT_RESULT = { exported: false, error: "<stderr summary>" }`, continue.
|
|
128
|
+
|
|
129
|
+
2. Stage the export artifacts and run plan-folder cleanup:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
git add .codebyplan/exports/
|
|
133
|
+
npx codebyplan cleanup-plan-folders
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
- On cleanup non-zero exit: emit a warning, continue.
|
|
137
|
+
|
|
138
|
+
3. Commit if anything was staged:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
git diff --cached --name-only
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
If the output is non-empty, commit with:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
git commit -m "feat: export standalone TASK-<N> and remove plan-folder docs"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Use the standalone task number for `<N>`. Do NOT include any mention of AI
|
|
151
|
+
tooling in the commit message.
|
|
152
|
+
|
|
114
153
|
### Step 5.7: Push
|
|
115
154
|
|
|
116
155
|
Push once, carrying both the task commit and the merge commit:
|
|
@@ -208,6 +247,7 @@ Apply the `cleanup` skill inline to remove orphan references to deleted/modified
|
|
|
208
247
|
**Merge commit**: [merge_commit]
|
|
209
248
|
**Branch deleted**: [branch_deleted]
|
|
210
249
|
**Version bumps**: [<name>: <current> → <next> per package, or "none"]
|
|
250
|
+
**Export**: [EXPORT_RESULT.path from Step 5.6, or "skipped: <reason>"]
|
|
211
251
|
**Warnings**: [any QA / file-approval warnings from Step 3, or "none"]
|
|
212
252
|
```
|
|
213
253
|
|