codebyplan 1.13.64 → 1.13.66
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 +118 -75
- package/dist/__tests__/helpers.d.ts +22 -0
- package/dist/__tests__/helpers.d.ts.map +1 -0
- package/dist/ci-public.d.ts +20 -0
- package/dist/ci-public.d.ts.map +1 -0
- package/dist/ci.js +11 -2
- package/dist/cli/arch-map.d.ts +33 -0
- package/dist/cli/arch-map.d.ts.map +1 -0
- package/dist/cli/branch.d.ts +10 -0
- package/dist/cli/branch.d.ts.map +1 -0
- package/dist/cli/bump.d.ts +12 -0
- package/dist/cli/bump.d.ts.map +1 -0
- package/dist/cli/cd.d.ts +20 -0
- package/dist/cli/cd.d.ts.map +1 -0
- package/dist/cli/check.d.ts +30 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/checkpoint.d.ts +17 -0
- package/dist/cli/checkpoint.d.ts.map +1 -0
- package/dist/cli/ci.d.ts +31 -0
- package/dist/cli/ci.d.ts.map +1 -0
- package/dist/cli/claude/__test-helpers__/expect-manifest.d.ts +7 -0
- package/dist/cli/claude/__test-helpers__/expect-manifest.d.ts.map +1 -0
- package/dist/cli/claude/__test-helpers__/tmp-fixture.d.ts +64 -0
- package/dist/cli/claude/__test-helpers__/tmp-fixture.d.ts.map +1 -0
- package/dist/cli/claude/audit-mode.d.ts +16 -0
- package/dist/cli/claude/audit-mode.d.ts.map +1 -0
- package/dist/cli/claude/generate.d.ts +23 -0
- package/dist/cli/claude/generate.d.ts.map +1 -0
- package/dist/cli/claude/install.d.ts +55 -0
- package/dist/cli/claude/install.d.ts.map +1 -0
- package/dist/cli/claude/migrate-memory.d.ts +117 -0
- package/dist/cli/claude/migrate-memory.d.ts.map +1 -0
- package/dist/cli/claude/readme.d.ts +28 -0
- package/dist/cli/claude/readme.d.ts.map +1 -0
- package/dist/cli/claude/status.d.ts +41 -0
- package/dist/cli/claude/status.d.ts.map +1 -0
- package/dist/cli/claude/uninstall.d.ts +21 -0
- package/dist/cli/claude/uninstall.d.ts.map +1 -0
- package/dist/cli/claude/update.d.ts +25 -0
- package/dist/cli/claude/update.d.ts.map +1 -0
- package/dist/cli/claude/verify-parity.d.ts +25 -0
- package/dist/cli/claude/verify-parity.d.ts.map +1 -0
- package/dist/cli/cleanup-plan-folders.d.ts +21 -0
- package/dist/cli/cleanup-plan-folders.d.ts.map +1 -0
- package/dist/cli/commit.d.ts +25 -0
- package/dist/cli/commit.d.ts.map +1 -0
- package/dist/cli/config.d.ts +50 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/confirm.d.ts +9 -0
- package/dist/cli/confirm.d.ts.map +1 -0
- package/dist/cli/create-org.d.ts +9 -0
- package/dist/cli/create-org.d.ts.map +1 -0
- package/dist/cli/create-project.d.ts +10 -0
- package/dist/cli/create-project.d.ts.map +1 -0
- package/dist/cli/create-repo.d.ts +14 -0
- package/dist/cli/create-repo.d.ts.map +1 -0
- package/dist/cli/docs.d.ts +41 -0
- package/dist/cli/docs.d.ts.map +1 -0
- package/dist/cli/doctor.d.ts +17 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/e2e/verify-round.d.ts +46 -0
- package/dist/cli/e2e/verify-round.d.ts.map +1 -0
- package/dist/cli/e2e.d.ts +11 -0
- package/dist/cli/e2e.d.ts.map +1 -0
- package/dist/cli/eslint.d.ts +20 -0
- package/dist/cli/eslint.d.ts.map +1 -0
- package/dist/cli/export-writer.d.ts +99 -0
- package/dist/cli/export-writer.d.ts.map +1 -0
- package/dist/cli/handoff.d.ts +13 -0
- package/dist/cli/handoff.d.ts.map +1 -0
- package/dist/cli/login.d.ts +10 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/logout.d.ts +2 -0
- package/dist/cli/logout.d.ts.map +1 -0
- package/dist/cli/lsp.d.ts +16 -0
- package/dist/cli/lsp.d.ts.map +1 -0
- package/dist/cli/migration-collisions.d.ts +10 -0
- package/dist/cli/migration-collisions.d.ts.map +1 -0
- package/dist/cli/ports.d.ts +29 -0
- package/dist/cli/ports.d.ts.map +1 -0
- package/dist/cli/process-exit-signal.d.ts +24 -0
- package/dist/cli/process-exit-signal.d.ts.map +1 -0
- package/dist/cli/round.d.ts +79 -0
- package/dist/cli/round.d.ts.map +1 -0
- package/dist/cli/scaffold-publish-workflow.d.ts +16 -0
- package/dist/cli/scaffold-publish-workflow.d.ts.map +1 -0
- package/dist/cli/session/freshness-gate.d.ts +21 -0
- package/dist/cli/session/freshness-gate.d.ts.map +1 -0
- package/dist/cli/session/home-ff.d.ts +16 -0
- package/dist/cli/session/home-ff.d.ts.map +1 -0
- package/dist/cli/session/infra-files.d.ts +21 -0
- package/dist/cli/session/infra-files.d.ts.map +1 -0
- package/dist/cli/session/start.d.ts +70 -0
- package/dist/cli/session/start.d.ts.map +1 -0
- package/dist/cli/session.d.ts +17 -0
- package/dist/cli/session.d.ts.map +1 -0
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/ship.d.ts +16 -0
- package/dist/cli/ship.d.ts.map +1 -0
- package/dist/cli/slug.d.ts +10 -0
- package/dist/cli/slug.d.ts.map +1 -0
- package/dist/cli/standalone-task.d.ts +31 -0
- package/dist/cli/standalone-task.d.ts.map +1 -0
- package/dist/cli/statusline.d.ts +10 -0
- package/dist/cli/statusline.d.ts.map +1 -0
- package/dist/cli/supabase/new-migration.d.ts +24 -0
- package/dist/cli/supabase/new-migration.d.ts.map +1 -0
- package/dist/cli/supabase/preview-check.d.ts +30 -0
- package/dist/cli/supabase/preview-check.d.ts.map +1 -0
- package/dist/cli/supabase/resolve-preview.d.ts +19 -0
- package/dist/cli/supabase/resolve-preview.d.ts.map +1 -0
- package/dist/cli/supabase/teardown-preview.d.ts +22 -0
- package/dist/cli/supabase/teardown-preview.d.ts.map +1 -0
- package/dist/cli/sync.d.ts +13 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/task.d.ts +17 -0
- package/dist/cli/task.d.ts.map +1 -0
- package/dist/cli/tech-stack.d.ts +11 -0
- package/dist/cli/tech-stack.d.ts.map +1 -0
- package/dist/cli/upgrade-auth.d.ts +2 -0
- package/dist/cli/upgrade-auth.d.ts.map +1 -0
- package/dist/cli/upload-e2e-images.d.ts +18 -0
- package/dist/cli/upload-e2e-images.d.ts.map +1 -0
- package/dist/cli/validate-waves.d.ts +22 -0
- package/dist/cli/validate-waves.d.ts.map +1 -0
- package/dist/cli/version-status.d.ts +42 -0
- package/dist/cli/version-status.d.ts.map +1 -0
- package/dist/cli/watch.d.ts +18 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/cli/whoami.d.ts +5 -0
- package/dist/cli/whoami.d.ts.map +1 -0
- package/dist/cli/worktree/add.d.ts +81 -0
- package/dist/cli/worktree/add.d.ts.map +1 -0
- package/dist/cli/worktree/create.d.ts +46 -0
- package/dist/cli/worktree/create.d.ts.map +1 -0
- package/dist/cli/worktree/path.d.ts +19 -0
- package/dist/cli/worktree/path.d.ts.map +1 -0
- package/dist/cli/worktree/remove.d.ts +60 -0
- package/dist/cli/worktree/remove.d.ts.map +1 -0
- package/dist/cli/worktree.d.ts +15 -0
- package/dist/cli/worktree.d.ts.map +1 -0
- package/dist/cli.js +6194 -5429
- package/dist/dispatch.d.ts +64 -0
- package/dist/dispatch.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/agents-generator.d.ts +42 -0
- package/dist/lib/agents-generator.d.ts.map +1 -0
- package/dist/lib/api.d.ts +54 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/atomic-write.d.ts +27 -0
- package/dist/lib/atomic-write.d.ts.map +1 -0
- package/dist/lib/branch-checkout.d.ts +47 -0
- package/dist/lib/branch-checkout.d.ts.map +1 -0
- package/dist/lib/branch-port-resolver.d.ts +58 -0
- package/dist/lib/branch-port-resolver.d.ts.map +1 -0
- package/dist/lib/bump.d.ts +97 -0
- package/dist/lib/bump.d.ts.map +1 -0
- package/dist/lib/cd-init.d.ts +86 -0
- package/dist/lib/cd-init.d.ts.map +1 -0
- package/dist/lib/check-baseline.d.ts +91 -0
- package/dist/lib/check-baseline.d.ts.map +1 -0
- package/dist/lib/check.d.ts +178 -0
- package/dist/lib/check.d.ts.map +1 -0
- package/dist/lib/ci-init.d.ts +106 -0
- package/dist/lib/ci-init.d.ts.map +1 -0
- package/dist/lib/ci-resolve.d.ts +60 -0
- package/dist/lib/ci-resolve.d.ts.map +1 -0
- package/dist/lib/claude-mode-audit.d.ts +41 -0
- package/dist/lib/claude-mode-audit.d.ts.map +1 -0
- package/dist/lib/claude-plan.d.ts +34 -0
- package/dist/lib/claude-plan.d.ts.map +1 -0
- package/dist/lib/commit-scope.d.ts +21 -0
- package/dist/lib/commit-scope.d.ts.map +1 -0
- package/dist/lib/e2e.d.ts +157 -0
- package/dist/lib/e2e.d.ts.map +1 -0
- package/dist/lib/eslint-generator.d.ts +86 -0
- package/dist/lib/eslint-generator.d.ts.map +1 -0
- package/dist/lib/file-lock.d.ts +44 -0
- package/dist/lib/file-lock.d.ts.map +1 -0
- package/dist/lib/flags.d.ts +115 -0
- package/dist/lib/flags.d.ts.map +1 -0
- package/dist/lib/gh-required-checks.d.ts +76 -0
- package/dist/lib/gh-required-checks.d.ts.map +1 -0
- package/dist/lib/git-utils.d.ts +46 -0
- package/dist/lib/git-utils.d.ts.map +1 -0
- package/dist/lib/gitignore-block.d.ts +32 -0
- package/dist/lib/gitignore-block.d.ts.map +1 -0
- package/dist/lib/gitignore-detect.d.ts +117 -0
- package/dist/lib/gitignore-detect.d.ts.map +1 -0
- package/dist/lib/handoff-file.d.ts +63 -0
- package/dist/lib/handoff-file.d.ts.map +1 -0
- package/dist/lib/hash.d.ts +9 -0
- package/dist/lib/hash.d.ts.map +1 -0
- package/dist/lib/lsp-detect.d.ts +42 -0
- package/dist/lib/lsp-detect.d.ts.map +1 -0
- package/dist/lib/manifest.d.ts +88 -0
- package/dist/lib/manifest.d.ts.map +1 -0
- package/dist/lib/mcp-client.d.ts +39 -0
- package/dist/lib/mcp-client.d.ts.map +1 -0
- package/dist/lib/migrate-branch-model.d.ts +34 -0
- package/dist/lib/migrate-branch-model.d.ts.map +1 -0
- package/dist/lib/migrate-local-config.d.ts +39 -0
- package/dist/lib/migrate-local-config.d.ts.map +1 -0
- package/dist/lib/migration-collisions.d.ts +61 -0
- package/dist/lib/migration-collisions.d.ts.map +1 -0
- package/dist/lib/port-verify.d.ts +73 -0
- package/dist/lib/port-verify.d.ts.map +1 -0
- package/dist/lib/prompt.d.ts +41 -0
- package/dist/lib/prompt.d.ts.map +1 -0
- package/dist/lib/readme-generator.d.ts +108 -0
- package/dist/lib/readme-generator.d.ts.map +1 -0
- package/dist/lib/repo-reader.d.ts +59 -0
- package/dist/lib/repo-reader.d.ts.map +1 -0
- package/dist/lib/scaffold-cd-workflow.d.ts +48 -0
- package/dist/lib/scaffold-cd-workflow.d.ts.map +1 -0
- package/dist/lib/scaffold-ci-workflow.d.ts +83 -0
- package/dist/lib/scaffold-ci-workflow.d.ts.map +1 -0
- package/dist/lib/scaffold-publish-workflow.d.ts +48 -0
- package/dist/lib/scaffold-publish-workflow.d.ts.map +1 -0
- package/dist/lib/server-detect.d.ts +20 -0
- package/dist/lib/server-detect.d.ts.map +1 -0
- package/dist/lib/session.d.ts +371 -0
- package/dist/lib/session.d.ts.map +1 -0
- package/dist/lib/settings-merge.d.ts +268 -0
- package/dist/lib/settings-merge.d.ts.map +1 -0
- package/dist/lib/ship.d.ts +84 -0
- package/dist/lib/ship.d.ts.map +1 -0
- package/dist/lib/slug.d.ts +26 -0
- package/dist/lib/slug.d.ts.map +1 -0
- package/dist/lib/spawn.d.ts +12 -0
- package/dist/lib/spawn.d.ts.map +1 -0
- package/dist/lib/state-client.d.ts +54 -0
- package/dist/lib/state-client.d.ts.map +1 -0
- package/dist/lib/state-store.d.ts +153 -0
- package/dist/lib/state-store.d.ts.map +1 -0
- package/dist/lib/state-sync.d.ts +101 -0
- package/dist/lib/state-sync.d.ts.map +1 -0
- package/dist/lib/statusline-config.d.ts +55 -0
- package/dist/lib/statusline-config.d.ts.map +1 -0
- package/dist/lib/structure-generator.d.ts +63 -0
- package/dist/lib/structure-generator.d.ts.map +1 -0
- package/dist/lib/supabase.d.ts +87 -0
- package/dist/lib/supabase.d.ts.map +1 -0
- package/dist/lib/sync-approvals.d.ts +108 -0
- package/dist/lib/sync-approvals.d.ts.map +1 -0
- package/dist/lib/tech-detect.d.ts +77 -0
- package/dist/lib/tech-detect.d.ts.map +1 -0
- package/dist/lib/template-walker.d.ts +26 -0
- package/dist/lib/template-walker.d.ts.map +1 -0
- package/dist/lib/templates-dir.d.ts +25 -0
- package/dist/lib/templates-dir.d.ts.map +1 -0
- package/dist/lib/types.d.ts +843 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/validate-waves.d.ts +38 -0
- package/dist/lib/validate-waves.d.ts.map +1 -0
- package/dist/lib/verify-parity.d.ts +154 -0
- package/dist/lib/verify-parity.d.ts.map +1 -0
- package/dist/lib/version.d.ts +3 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/watch-daemon.d.ts +114 -0
- package/dist/lib/watch-daemon.d.ts.map +1 -0
- package/dist/lib/worktree.d.ts +56 -0
- package/dist/lib/worktree.d.ts.map +1 -0
- package/dist/oauth/browser.d.ts +8 -0
- package/dist/oauth/browser.d.ts.map +1 -0
- package/dist/oauth/client-registration.d.ts +16 -0
- package/dist/oauth/client-registration.d.ts.map +1 -0
- package/dist/oauth/device-flow.d.ts +40 -0
- package/dist/oauth/device-flow.d.ts.map +1 -0
- package/dist/oauth/jwt-decode.d.ts +10 -0
- package/dist/oauth/jwt-decode.d.ts.map +1 -0
- package/dist/oauth/keychain.d.ts +17 -0
- package/dist/oauth/keychain.d.ts.map +1 -0
- package/dist/oauth/token-refresh.d.ts +7 -0
- package/dist/oauth/token-refresh.d.ts.map +1 -0
- package/dist/oauth/types.d.ts +28 -0
- package/dist/oauth/types.d.ts.map +1 -0
- package/dist/oauth/urls.d.ts +16 -0
- package/dist/oauth/urls.d.ts.map +1 -0
- package/package.json +5 -6
- package/templates/agents/cbp-security-agent.md +0 -1
- package/templates/agents/cbp-stripe-agent.md +0 -1
- package/templates/agents/cbp-testing-qa-agent.md +0 -1
- package/templates/github-workflows/ci.yml +5 -0
- package/templates/hooks/cbp-session-id-stamp.sh +67 -0
- package/templates/hooks/cbp-skill-context-guard.sh +0 -1
- package/templates/hooks/cbp-test-hooks.sh +105 -0
- package/templates/hooks/validate-structure-lib.sh +36 -9
- package/templates/rules/handoff-file-convention.md +65 -0
- package/templates/settings.project.base.json +17 -1
- package/templates/skills/cbp-checkpoint-check/SKILL.md +0 -1
- package/templates/skills/cbp-checkpoint-complete/SKILL.md +32 -0
- package/templates/skills/cbp-clear-continue/SKILL.md +23 -2
- package/templates/skills/cbp-clear-prep/SKILL.md +22 -2
- package/templates/skills/cbp-finalize/SKILL.md +36 -0
- package/templates/skills/cbp-session-end/SKILL.md +23 -25
- package/templates/skills/cbp-session-start/SKILL.md +24 -2
- package/templates/skills/cbp-setup-cd/SKILL.md +0 -1
- package/templates/skills/cbp-setup-ci/SKILL.md +0 -1
- package/templates/skills/cbp-standalone-task-complete/SKILL.md +32 -0
- package/templates/skills/cbp-stripe/SKILL.md +0 -1
|
@@ -22,46 +22,44 @@ Always write a session log for this session — **even if empty**. `/cbp-session
|
|
|
22
22
|
2. Pull facts from local state files rather than narrating from memory:
|
|
23
23
|
- Rounds added/completed, tasks advanced/completed during this session (read from `.codebyplan/state/checkpoints/` subtree)
|
|
24
24
|
- Decisions, blockers, or discoveries recorded in checkpoint/task context
|
|
25
|
-
3. Run `codebyplan session update-log --id <log-id> --ended-at <now> --
|
|
25
|
+
3. Run `codebyplan session update-log --id <log-id> --ended-at <now> --git-branch <current-branch>` (CLI write-through: updates `.codebyplan/state/session/current.json` + REST). Break-glass fallback: MCP `update_session_log` when the CLI is unavailable. Fields:
|
|
26
26
|
- `ended_at`: now (maps to the `closed_at` column per TASK-2 alias)
|
|
27
|
-
- `summary`: concise — may be empty if nothing happened
|
|
28
|
-
- `pending`: open items the next session should see first
|
|
29
27
|
- `git_branch`: the current git branch (informational; `git rev-parse --abbrev-ref HEAD`)
|
|
30
|
-
-
|
|
28
|
+
- Carryover notes now go to committed `.codebyplan/handoff/` files (Step 1.3) — not the session log.
|
|
31
29
|
|
|
32
30
|
### Step 1.3: Optional Handoff File (mid-work only)
|
|
33
31
|
|
|
34
32
|
When an active in-progress task or round exists, offer to write a handoff file so the next session can auto-resume. Skip entirely when not mid-work.
|
|
35
33
|
|
|
36
|
-
1. Read `.codebyplan/state/todos.json` (local-first) and check `rows[0]` (queue head, ordered by `sort_order`). If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_todos({ repo_id })` when the state dir is absent and sync fails.
|
|
34
|
+
1. Read `.codebyplan/state/todos.json` (local-first) and check `rows[0]` (queue head, ordered by `sort_order`). If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_todos({ repo_id })` when the state dir is absent and sync fails.
|
|
37
35
|
|
|
38
36
|
2. **If `rows[0]` exists and its `command` is non-empty** (active work in flight):
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
37
|
+
- Resolve the level and number (level is `checkpoint`/`standalone`, NOT `task` — a session-end
|
|
38
|
+
handoff is a checkpoint-scope resume-pointer; `task`-level handoffs are reserved for explicit
|
|
39
|
+
user-deferred scope and gate only `/cbp-finalize`):
|
|
40
|
+
- Checkpoint work: read `.codebyplan/state/checkpoints/<rows[0].checkpoint_id>.json` → `number` (break-glass: MCP `get_checkpoints`). Level: `checkpoint`, number: `<NNN>` (3-digit zero-pad).
|
|
41
|
+
- Standalone work: read the standalone task `number` from local standalone state (break-glass: MCP `get_standalone_tasks`). Level: `standalone`, number: `<N>`.
|
|
42
|
+
- Offer to write:
|
|
43
43
|
```
|
|
44
|
-
Write handoff
|
|
45
|
-
|
|
44
|
+
Write handoff for next session?
|
|
45
|
+
.codebyplan/handoff/<level>/<identifier>.md
|
|
46
46
|
|
|
47
47
|
Reply: yes | no
|
|
48
48
|
```
|
|
49
|
-
- On `yes`: write
|
|
49
|
+
- On `yes`: run `codebyplan handoff write --level <level> --number <N> --content "<content>"` where content is:
|
|
50
50
|
```markdown
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
round_id: <rows[0].round_id or null>
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
<rows[0].instructions — human-readable trigger reason>
|
|
51
|
+
## Session handoff — CHK-<N>
|
|
52
|
+
|
|
53
|
+
Captured: <ISO now>
|
|
54
|
+
Next action: `<rows[0].command>`
|
|
55
|
+
|
|
56
|
+
<rows[0].instructions>
|
|
61
57
|
```
|
|
62
|
-
|
|
58
|
+
(Standalone variant: `## Session handoff — TASK-<N>` heading.)
|
|
59
|
+
- On `no`: skip — do not create an empty file.
|
|
60
|
+
- The committed file is picked up by the Step 1.5 infra-commit offer automatically (it lives under the managed `.gitignore` negation `!.codebyplan/handoff/`).
|
|
63
61
|
|
|
64
|
-
3. **If the queue is empty or `rows[0].command` is empty/idle**: skip
|
|
62
|
+
3. **If the queue is empty or `rows[0].command` is empty/idle**: skip.
|
|
65
63
|
|
|
66
64
|
### Step 1.5: Commit Non-Task Files
|
|
67
65
|
|
|
@@ -146,7 +144,7 @@ You can close this window.
|
|
|
146
144
|
|
|
147
145
|
- **Triggered by**: user invocation (prompted by `/cbp-todo` when no work remains)
|
|
148
146
|
- **Reads**: `.codebyplan/repo.json`; local-first reads (with `npx codebyplan sync` + MCP break-glass): `.codebyplan/state/session/current.json` (Step 1 resolve log), `.codebyplan/state/todos.json` (Step 1.3 mid-work detection + Step 1.5 active-task lookup), `.codebyplan/state/checkpoints/<id>/tasks/<id>/rounds/` (Step 1.5 task-file resolution); `codebyplan session freshness-gate` (Step 1.7 package-freshness gate, without --halt-on-update); `codebyplan session infra-files --json --task-files <csv>` (Step 1.5 infra-file set math)
|
|
149
|
-
- **Writes**: `codebyplan session update-log --id <id> --git-branch <branch
|
|
147
|
+
- **Writes**: `codebyplan session update-log --id <id> --ended-at <now> --git-branch <branch>` (Step 1 finalize — CLI write-through to `.codebyplan/state/session/current.json`; break-glass: MCP `update_session_log`; summary/pending/handoff fields never passed), `codebyplan session create-log` (Step 1 fallback when no log exists; break-glass: MCP `create_session_log`), `codebyplan handoff write --level <checkpoint|standalone> --number <N>` (Step 1.3, mid-work only, committed under `.codebyplan/handoff/`), `codebyplan session update-state --action deactivate` (Step 3 — CLI write-through to `.codebyplan/state/session/state.json`; break-glass: MCP `update_session_state`)
|
|
150
148
|
- **Spawns**: none
|
|
151
149
|
- **Triggers**: none at the skill-contract level. Step 1.5 may invoke `/cbp-git-commit` inline on user approval; Step 1.7 may invoke `/cbp-git-commit` on the `result === 'updated'` path (committing changed `.claude/` and `.codebyplan/` paths).
|
|
152
150
|
- **Paired with**: `/cbp-session-start`
|
|
@@ -78,7 +78,29 @@ The envelope shape:
|
|
|
78
78
|
**Parse and branch**:
|
|
79
79
|
|
|
80
80
|
- `status === 'update_halt'` → print `rendered_block` (the update-halt message) and **STOP**. No further writes, no `/cbp-todo` trigger.
|
|
81
|
-
- Otherwise → print `rendered_block` (the Step 6 output block), then proceed to Step 5.7 and Step 7.
|
|
81
|
+
- Otherwise → print `rendered_block` (the Step 6 output block), then proceed to Step 5.5, Step 5.7, and Step 7.
|
|
82
|
+
|
|
83
|
+
### Step 5.5: Surface Committed Handoff Notes
|
|
84
|
+
|
|
85
|
+
After printing the orchestrator output, surface any committed handoff files from previous sessions. Non-blocking.
|
|
86
|
+
|
|
87
|
+
1. Run `codebyplan handoff status --json` → parse `nonEmpty[]`.
|
|
88
|
+
2. If `nonEmpty` is empty → skip silently.
|
|
89
|
+
3. For each entry in `nonEmpty`, read the content:
|
|
90
|
+
- `repo` → `codebyplan handoff read --level repo`
|
|
91
|
+
- `checkpoint` → `codebyplan handoff read --level checkpoint --number <identifier>`
|
|
92
|
+
- `task` → split identifier `"<NNN>-<T>"` → `codebyplan handoff read --level task --number <NNN> --task <T>`
|
|
93
|
+
- `standalone` → `codebyplan handoff read --level standalone --number <identifier>`
|
|
94
|
+
4. Display:
|
|
95
|
+
```
|
|
96
|
+
Handoff notes from previous session(s):
|
|
97
|
+
|
|
98
|
+
[<level>: <identifier>]
|
|
99
|
+
<content>
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
```
|
|
103
|
+
5. Non-blocking — proceed to Step 5.7 regardless.
|
|
82
104
|
|
|
83
105
|
### Step 5.7: Commit Non-Task Files (Claude-side)
|
|
84
106
|
|
|
@@ -109,7 +131,7 @@ Route from `envelope.next_action`:
|
|
|
109
131
|
## Integration
|
|
110
132
|
|
|
111
133
|
- **Triggered by**: user invocation, `/clear` recovery
|
|
112
|
-
- **Reads**: MCP `health_check` (Step 0 hard gate — stays MCP unconditionally); `codebyplan session start --json` (Steps 1–5.8 — the orchestrator runs `codebyplan whoami --json` for caller identity and reads `.codebyplan/repo.json`, `.codebyplan/git.json`, `.codebyplan/state/session/current.json`, `.codebyplan/state/todos.json`, `.codebyplan/state/checkpoints/` entity files, `scripts/infra-drift.mjs`, `.codebyplan/architecture.json`, `.codebyplan/lsp.json`)
|
|
134
|
+
- **Reads**: MCP `health_check` (Step 0 hard gate — stays MCP unconditionally); `codebyplan session start --json` (Steps 1–5.8 — the orchestrator runs `codebyplan whoami --json` for caller identity and reads `.codebyplan/repo.json`, `.codebyplan/git.json`, `.codebyplan/state/session/current.json`, `.codebyplan/state/todos.json`, `.codebyplan/state/checkpoints/` entity files, `scripts/infra-drift.mjs`, `.codebyplan/architecture.json`, `.codebyplan/lsp.json`); `codebyplan handoff status --json` + `codebyplan handoff read --level <l> ...` (Step 5.5 — committed handoff surfacing)
|
|
113
135
|
- **Writes**: orchestrator calls `codebyplan session update-state --action activate` (Step 7) and `codebyplan session create-log` (Step 8 — user-level; no worktree_id in the body) — both SKIPPED on Step 0 hard-fail and on `status: update_halt`
|
|
114
136
|
- **Spawns**: none
|
|
115
137
|
- **Triggers**: `/cbp-git-commit` (conditional, on user approval at Step 5.7), `envelope.handoff.command` (on `next_action: resume_handoff`), `/cbp-todo` (on `next_action: trigger_todo` or `commit_then_todo`); STOPS with no trigger on `next_action: stop` or `mcp_update_halt`
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
scope: org-shared
|
|
3
2
|
name: cbp-setup-cd
|
|
4
3
|
description: Detect configured CD surfaces, write/update .codebyplan/cd.json via `codebyplan cd init`, scaffold publish.yml and release-desktop.yml GitHub Actions workflows, and walk through environment/approval/OIDC setup. Interactive, idempotent.
|
|
5
4
|
argument-hint: "[--force]"
|
|
@@ -80,6 +80,38 @@ Stop here.
|
|
|
80
80
|
|
|
81
81
|
`task.context.task_testing_output` must exist with `all_passed: true`. If not, surface "Run `/cbp-standalone-task-testing` first" and stop.
|
|
82
82
|
|
|
83
|
+
### Step 2.7: Verify Standalone Task Handoff Is Resolved
|
|
84
|
+
|
|
85
|
+
Run `codebyplan handoff status --json` and parse the output.
|
|
86
|
+
|
|
87
|
+
Check if `nonEmpty[]` contains an entry where `level === 'standalone'` AND `identifier === '{N}'`
|
|
88
|
+
(the bare standalone task number — e.g. `45`).
|
|
89
|
+
|
|
90
|
+
If a matching entry is found, BLOCK with:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
## Cannot Complete Standalone Task — Handoff Unresolved
|
|
94
|
+
|
|
95
|
+
Standalone TASK-[N] has unresolved handoff content at `.codebyplan/handoff/standalone/[N].md`.
|
|
96
|
+
|
|
97
|
+
The handoff file contains scope that has not been resolved. You must clear it before
|
|
98
|
+
completing this task. Three options — pick exactly one:
|
|
99
|
+
|
|
100
|
+
1. **Absorb** — address the pending scope in current work, then clear:
|
|
101
|
+
`codebyplan handoff clear --level standalone --number [N]`
|
|
102
|
+
2. **Defer** — create a new standalone task to cover the scope,
|
|
103
|
+
then clear: `codebyplan handoff clear --level standalone --number [N]`
|
|
104
|
+
3. **Escalate** — move the content to the repo handoff:
|
|
105
|
+
`codebyplan handoff append --level repo --content "<content>"`
|
|
106
|
+
then clear: `codebyplan handoff clear --level standalone --number [N]`
|
|
107
|
+
|
|
108
|
+
Never silently delete handoff content — it represents tracked scope.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
(STOP)
|
|
112
|
+
|
|
113
|
+
If no matching entry: continue to Step 3.
|
|
114
|
+
|
|
83
115
|
### Step 3: Verify QA and File Approval
|
|
84
116
|
|
|
85
117
|
Load `task.qa` and `task.files_changed`:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
scope: org-shared
|
|
3
2
|
name: cbp-stripe
|
|
4
3
|
description: "Stripe integration guidance — load when implementing or reviewing payments, Checkout, subscriptions/billing, webhooks, Connect, Tax, or Treasury. Encodes the API-selection routing table, the no-payment_method_types rule, restricted-key security, and Stripe SDK conventions."
|
|
5
4
|
model: inherit
|