@laitszkin/apollo-toolkit 2.14.14 → 2.14.15

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this repository are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [v2.14.15] - 2026-04-11
8
+
9
+ ### Changed
10
+ - Update `merge-changes-from-local-branches` so merge scope is determined from explicit branch names or spec-name mappings, instead of verifying child-branch ancestry from git history.
11
+ - Update `implement-specs-with-worktree` so new worktree branches inherit from the same parent branch as the worktree base, and use the spec-set name as the canonical branch/worktree identifier.
12
+
7
13
  ## [v2.14.14] - 2026-04-11
8
14
 
9
15
  ### Changed
@@ -6,9 +6,10 @@ description: >-
6
6
  plus parent `coordination.md` when present, and implement the approved tasks
7
7
  within an isolated git worktree. Use when the user asks to implement from an
8
8
  existing spec set, execute a spec plan, or work on a feature branch without
9
- affecting the main working tree. If not already in a worktree, create a new
10
- worktree with an independent branch, implement all planned tasks, then commit
11
- the changes to that local branch when complete.
9
+ affecting the parent working tree. If not already in a worktree, create a new
10
+ worktree with a spec-named branch from the same parent branch as the worktree
11
+ base, implement all planned tasks, then commit the changes to that local
12
+ branch when complete.
12
13
  ---
13
14
 
14
15
  # Implement Specs with Worktree
@@ -22,14 +23,14 @@ description: >-
22
23
 
23
24
  ## Standards
24
25
 
25
- - Evidence: Read and understand the complete specs set before starting implementation, and when the requested plan path is missing from the current worktree verify where the authoritative copy actually lives before substituting any nearby spec.
26
- - Execution: Create or use an isolated worktree for implementation, sync the exact approved plan set into that worktree when it is missing there, follow the implementation standards from the dependent skills, and commit to a local branch when done.
26
+ - Evidence: Read and understand the complete specs set before starting implementation, identify the authoritative parent branch that the worktree should inherit from, and when the requested plan path is missing from the current worktree verify where the authoritative copy actually lives before substituting any nearby spec.
27
+ - Execution: Create or use an isolated worktree for implementation, sync the exact approved plan set into that worktree when it is missing there, create the worktree branch from the same parent branch as the worktree base, use the spec-set name as the canonical branch/worktree name, follow the implementation standards from the dependent skills, and commit to a local branch when done.
27
28
  - Quality: Complete all planned tasks, run relevant tests, backfill the spec documents with actual completion status, and avoid dragging unrelated sibling specs into the worktree just because they share a batch directory.
28
29
  - Output: Keep the worktree branch clean with only the intended implementation commits.
29
30
 
30
31
  ## Goal
31
32
 
32
- Implement approved spec planning sets in an isolated git worktree, ensuring main development is never interrupted by in-progress work.
33
+ Implement approved spec planning sets in an isolated git worktree, ensuring the parent working tree is never interrupted by in-progress work.
33
34
 
34
35
  ## Workflow
35
36
 
@@ -58,18 +59,26 @@ Implement approved spec planning sets in an isolated git worktree, ensuring main
58
59
  - Run `git worktree list` to see existing worktrees and branches.
59
60
  - Determine if the current session is already inside a worktree (check `git rev-parse --show-toplevel` and compare with `git worktree list`).
60
61
  - If the current worktree is missing the exact requested plan set, sync that plan into the worktree before coding and re-read the synced files there so implementation happens against the same plan snapshot that will be backfilled later.
62
+ - Determine the authoritative parent branch for the new worktree:
63
+ - if the current checkout already comes from a branch, reuse that branch as the base
64
+ - if the current session is inside a detached worktree, identify the parent branch that owns that worktree before creating another branch from it
65
+ - do not default to `main` unless `main` is actually the parent branch of the worktree you are extending
61
66
 
62
67
  ### 3) Create a new worktree if needed
63
68
 
64
69
  If not already in a worktree, or if the user explicitly requests a fresh worktree:
65
70
 
66
- - Create a new branch for this implementation:
71
+ - Derive the canonical spec name from the requested `change_name` directory.
72
+ - Use that spec name as the shared branch/worktree identifier:
73
+ - branch name: `<type>/<spec-name>` following `references/branch-naming.md`
74
+ - worktree directory name: `<spec-name>`
75
+ - Create a new branch for this implementation from the same parent branch identified in step 2:
67
76
  ```bash
68
- git branch <branch-name> main
77
+ git branch <branch-name> <parent-branch>
69
78
  ```
70
79
  - Add a new worktree:
71
80
  ```bash
72
- git worktree add ../<worktree-name> -b <branch-name>
81
+ git worktree add ../<spec-name> <branch-name>
73
82
  ```
74
83
  - Move into the new worktree directory and begin work there.
75
84
 
@@ -117,12 +126,14 @@ After implementation and testing:
117
126
  ### 7) Report completion
118
127
 
119
128
  - Summarize what was implemented.
120
- - Note the branch name and worktree location.
121
- - Confirm that main remains unaffected.
129
+ - Note the spec-derived branch name and worktree location.
130
+ - Confirm that the parent branch remains unaffected.
122
131
 
123
132
  ## Working Rules
124
133
 
125
- - Always work in an isolated worktree to keep main clean.
134
+ - Always work in an isolated worktree to keep the parent checkout clean.
135
+ - Keep the new branch based on the same parent branch as the worktree base; do not silently rebase the workflow onto a different branch.
136
+ - Use the spec-set name as the canonical identifier for the branch and worktree unless the user explicitly asks for a different naming scheme.
126
137
  - Complete all planned tasks before committing; do not stop with partial work.
127
138
  - Treat the specs as the source of truth for scope — do not deviate without user approval.
128
139
  - When `coordination.md` exists, treat it as the source of truth for batch-level ownership and cutover direction.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Implement Specs with Worktree"
3
3
  short_description: "Implement an approved spec set inside an isolated git worktree"
4
- default_prompt: "Use $implement-specs-with-worktree to read the full plan set under docs/plans, including parent coordination.md when the spec belongs to a parallel batch, create or reuse an isolated git worktree, implement all approved tasks within the shared ownership and replacement-direction constraints, backfill completion status into the planning docs, and commit the result to the local worktree branch without affecting main."
4
+ default_prompt: "Use $implement-specs-with-worktree to read the full plan set under docs/plans, including parent coordination.md when the spec belongs to a parallel batch, identify the parent branch that the worktree should inherit from, create or reuse an isolated git worktree whose branch and directory names are derived from the spec name, implement all approved tasks within the shared ownership and replacement-direction constraints, backfill completion status into the planning docs, and commit the result to the local worktree branch without affecting the parent branch."
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: merge-changes-from-local-branches
3
3
  description: >-
4
- Read changes from local child branches that forked from the current local
5
- branch and merge them back into that same branch. When conflicts arise,
6
- auto-resolve them by keeping correct functionality (preferring the more recent
7
- change on the same line, or the change that preserves working behavior). Run
8
- `archive-specs` after merge verification so completed plan sets are archived
9
- and durable project docs are synchronized, then hand the current branch state
10
- to `commit-and-push` so the final submit workflow commits and pushes on that
11
- same local branch. Use when the user asks to consolidate child-branch work,
12
- merge branches branched from the current branch, or prepare the current branch
13
- for integration.
4
+ Read changes from local branches identified by branch name and merge them back
5
+ into the current local branch. When conflicts arise, auto-resolve them by
6
+ keeping correct functionality (preferring the more recent change on the same
7
+ line, or the change that preserves working behavior). Run `archive-specs`
8
+ after merge verification so completed plan sets are archived and durable
9
+ project docs are synchronized, then hand the current branch state to
10
+ `commit-and-push` so the final submit workflow commits and pushes on that same
11
+ local branch. Use when the user asks to consolidate local branch work, merge
12
+ named branches into the current branch, or prepare the current branch for
13
+ integration.
14
14
  ---
15
15
 
16
16
  # Merge Changes from Local Branches
@@ -24,41 +24,43 @@ description: >-
24
24
 
25
25
  ## Standards
26
26
 
27
- - Evidence: Inspect the original current branch, local branches, ahead/behind status, verified child-branch ancestry, actual conflicting files, and any active batch-spec `coordination.md` merge-order guidance before deciding what to merge.
28
- - Execution: Merge only the relevant child branches that verifiably forked from the original current branch back into that same branch, read any active batch-spec `coordination.md` and honor its documented merge order when present, resolve conflicts by reading both sides and editing the merged result to preserve shipped behavior, verify the merged state, delete each successfully merged child branch and its detached worktree only after the merged result is confirmed, run `archive-specs` so completed plan sets are archived and durable docs are synchronized, then hand the final current-branch state to `commit-and-push` so changelog/readiness/commit/push work happens through the shared submission workflow on the same branch.
29
- - Quality: Never use blanket timestamp rules or default `-X ours/theirs` conflict resolution as the primary merge strategy, never infer branch parentage without git evidence, and do not declare success until the final current-branch state has been checked, verified, and cleared for post-merge archival/doc-sync work.
30
- - Output: Produce a clean current branch with all relevant child-branch changes integrated and ready for the shared submit workflow.
27
+ - Evidence: Inspect the original current branch, local branches, branch-name matches provided by the user or active spec names, actual conflicting files, and any active batch-spec `coordination.md` merge-order guidance before deciding what to merge.
28
+ - Execution: Merge only the relevant named branches back into the original current branch, read any active batch-spec `coordination.md` and honor its documented merge order when present, resolve conflicts by reading both sides and editing the merged result to preserve shipped behavior, verify the merged state, delete each successfully merged source branch and its detached worktree only after the merged result is confirmed, run `archive-specs` so completed plan sets are archived and durable docs are synchronized, then hand the final current-branch state to `commit-and-push` so changelog/readiness/commit/push work happens through the shared submission workflow on the same branch.
29
+ - Quality: Never use blanket timestamp rules or default `-X ours/theirs` conflict resolution as the primary merge strategy, never infer in-scope branches from ancestry heuristics when branch names already define the target set, and do not declare success until the final current-branch state has been checked, verified, and cleared for post-merge archival/doc-sync work.
30
+ - Output: Produce a clean current branch with all relevant named-branch changes integrated and ready for the shared submit workflow.
31
31
 
32
32
  ## Goal
33
33
 
34
- Consolidate verified child-branch changes back into the original current branch with automatic conflict resolution that preserves correct functionality.
34
+ Consolidate the intended named local branches back into the original current branch with automatic conflict resolution that preserves correct functionality.
35
35
 
36
36
  ## Workflow
37
37
 
38
- ### 1) Inventory the current branch and in-scope child branches
38
+ ### 1) Inventory the current branch and in-scope named branches
39
39
 
40
40
  - Run `git branch` to list all local branches.
41
41
  - Check the current branch with `git branch --show-current` and capture `git status -sb`.
42
42
  - Inspect active planning artifacts under `docs/plans/` and look for batch roots that still contain live spec sets plus a `coordination.md`.
43
43
  - When an active batch is present, read its `coordination.md` before deciding merge order.
44
44
  - Treat the original current branch as the authoritative merge target for the whole workflow; do not silently switch that target to `main`.
45
- - Determine whether each candidate branch is a child branch of the current branch by using git evidence such as `git merge-base --fork-point <current-branch> <candidate>`, `git merge-base <current-branch> <candidate>`, and branch reflog/history when needed.
46
- - Accept a branch as in scope only when the evidence shows it actually forked from the current branch; skip parent branches, sibling branches, and unrelated local branches.
47
- - If child-branch ancestry is ambiguous, stop and report the ambiguity instead of guessing.
45
+ - Determine the in-scope branches directly from branch names:
46
+ - prefer the exact branch names the user provided
47
+ - otherwise map active spec-set names or documented merge-order entries to branch names
48
+ - otherwise stop and report the missing branch-name target instead of inferring from ancestry
49
+ - Accept a branch as in scope only when its branch name can be matched unambiguously to the requested merge set; skip unrelated local branches.
48
50
  - Compare each in-scope candidate branch against the current branch with `git log --oneline <current-branch>..<candidate>`, `git diff --stat <current-branch>...<candidate>`, or equivalent evidence so empty or already-merged branches are skipped.
49
51
  - For each branch, note:
50
52
  - Branch name
51
- - Verified fork-point evidence from the current branch
53
+ - How the branch name was matched to the requested merge set
52
54
  - Commits ahead of the current branch
53
55
  - Last commit message (via `git log -1 --oneline`)
54
56
 
55
57
  ### 1.5) Resolve merge order from active batch specs
56
58
 
57
59
  - Treat active batch specs as authoritative merge-order guidance when they include a concrete `Merge order / landing order` entry in `coordination.md`.
58
- - Map branch names to the corresponding spec sets or worktrees using the batch folder names, spec-set names, and current git evidence; do not guess when the mapping is ambiguous.
59
- - Merge only the in-scope child branches in the documented order when that order is explicit.
60
+ - Map branch names to the corresponding spec sets or worktrees using the batch folder names, spec-set names, and documented merge-order entries; do not guess when the mapping is ambiguous.
61
+ - Merge only the in-scope named branches in the documented order when that order is explicit.
60
62
  - If multiple active batches exist, reconcile their merge-order guidance before merging; if the orders conflict or the branch-to-spec mapping is unclear, stop and report the ambiguity instead of choosing an arbitrary sequence.
61
- - If no active batch spec provides an explicit merge order, fall back to the normal branch inventory evidence and merge the relevant branches sequentially based on the safest verified order.
63
+ - If no active batch spec provides an explicit merge order, fall back to the requested branch-name list and merge the relevant branches sequentially in that explicit name order.
62
64
 
63
65
  ### 2) Ensure clean state on the original current branch
64
66
 
@@ -69,7 +71,7 @@ Consolidate verified child-branch changes back into the original current branch
69
71
 
70
72
  ### 3) Merge branches sequentially in the resolved order
71
73
 
72
- For each in-scope child branch:
74
+ For each in-scope named branch:
73
75
 
74
76
  1. Check out the original current branch:
75
77
  ```bash
@@ -124,7 +126,7 @@ For each in-scope child branch:
124
126
 
125
127
  ### 6) Hand off the merged result for shared submission handling
126
128
 
127
- - After a child branch has been merged successfully and the merged current-branch state has been verified, remove the source branch worktree if one exists:
129
+ - After a source branch has been merged successfully and the merged current-branch state has been verified, remove the source branch worktree if one exists:
128
130
  ```bash
129
131
  git worktree list
130
132
  git worktree remove <worktree-path>
@@ -148,7 +150,7 @@ For each in-scope child branch:
148
150
 
149
151
  ### 7) Report completion
150
152
 
151
- - List all child branches that were merged.
153
+ - List all named branches that were merged.
152
154
  - List any branches intentionally skipped because they were already merged, empty, or out of scope.
153
155
  - Confirm the original current branch is updated with all merged changes.
154
156
  - Note any conflicts that were resolved and the rationale.
@@ -161,13 +163,13 @@ For each in-scope child branch:
161
163
  - Never force-push; use only merge or rebase with merge.
162
164
  - Prefer preserving functionality over keeping either branch's exact changes.
163
165
  - Do not push to remote from this skill directly; let `commit-and-push` own any later publish step only when the user explicitly requests it.
164
- - Never merge parent branches, sibling branches, or unverified branches into the current branch; merge only branches whose child relationship to the original current branch is supported by git evidence.
166
+ - Never merge unrelated or ambiguously matched branches into the current branch; merge only branches whose names are explicitly requested or can be matched unambiguously from the active spec context.
165
167
  - If a branch contains no meaningful changes (empty merge), skip it.
166
168
  - Keep the current branch history clean and readable.
167
169
  - If a branch's merge breaks tests, resolve the conflict differently before committing.
168
170
  - Do not stash or discard unrelated work automatically; stop when the working tree state makes the merge ambiguous.
169
171
  - Delete merged source branches and their detached worktrees only after the merge commit and verification both succeed.
170
- - When active batch specs provide merge-order guidance for in-scope child branches, follow that order unless new evidence proves the plan is stale or inapplicable; if so, stop and report the mismatch instead of silently overriding the batch plan.
172
+ - When active batch specs provide merge-order guidance for in-scope named branches, follow that order unless new evidence proves the plan is stale or inapplicable; if so, stop and report the mismatch instead of silently overriding the batch plan.
171
173
 
172
174
  ## Conflict Resolution Examples
173
175
 
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Merge Changes from Local Branches"
3
- short_description: "Merge verified child branches back into the current branch with checked conflict resolution"
4
- default_prompt: "Use $merge-changes-from-local-branches to inventory the current branch plus any local child branches that verifiably forked from it, inspect active batch-spec `coordination.md` files under `docs/plans/` and follow their documented merge order when present, merge only those in-scope child branches back into the same current branch, resolve conflicts by reading and composing the correct behavior instead of relying on blanket merge strategies, run targeted verification after conflictful merges, run `archive-specs` so completed plan sets are archived and durable docs are synchronized before the final submit step, delete successfully merged source branches and detached worktrees only after verification succeeds, and leave remote publication to `commit-and-push`."
3
+ short_description: "Merge named local branches back into the current branch with checked conflict resolution"
4
+ default_prompt: "Use $merge-changes-from-local-branches to inventory the current branch plus the named local branches that should be merged, inspect active batch-spec `coordination.md` files under `docs/plans/` and follow their documented merge order when present, match the merge scope by branch name instead of branch ancestry, merge only those in-scope branches back into the same current branch, resolve conflicts by reading and composing the correct behavior instead of relying on blanket merge strategies, run targeted verification after conflictful merges, run `archive-specs` so completed plan sets are archived and durable docs are synchronized before the final submit step, delete successfully merged source branches and detached worktrees only after verification succeeds, and leave remote publication to `commit-and-push`."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laitszkin/apollo-toolkit",
3
- "version": "2.14.14",
3
+ "version": "2.14.15",
4
4
  "description": "Apollo Toolkit npm installer for managed skill copying across Codex, OpenClaw, and Trae.",
5
5
  "license": "MIT",
6
6
  "author": "LaiTszKin",