@skitterbyte/skitterspec 11.0.0 → 13.0.0
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 +15 -4
- package/assets/core/env.config.json.example +3 -0
- package/assets/core/env.config.md +48 -2
- package/assets/rules/spec-planning.md +46 -13
- package/assets/skills/spec-cancel/SKILL.md +5 -0
- package/assets/skills/spec-complete/SKILL.md +61 -11
- package/assets/skills/spec-connect/SKILL.md +6 -0
- package/assets/skills/spec-go/SKILL.md +3 -1
- package/assets/skills/spec-hotfix/SKILL.md +161 -0
- package/assets/skills/spec-init/SKILL.md +8 -0
- package/assets/skills/spec-live/SKILL.md +73 -0
- package/assets/skills/spec-to-main/SKILL.md +99 -0
- package/package.json +1 -1
- package/src/cli.js +647 -32
- package/src/env/config.js +30 -1
- package/src/env/hotfix.js +133 -0
- package/src/env/live.js +357 -0
- package/src/env/provision.js +5 -1
- package/src/env/prune.js +119 -0
- package/src/env/resolve.js +53 -4
- package/src/env/teardown.js +20 -13
- package/src/init.js +241 -6
- package/src/prompts.js +37 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-to-main
|
|
3
|
+
description: Land an in-progress spec's branch onto main WITHOUT finishing it — rebase + fast-forward so the work reaches main (to run it in CI / a shared test env), while the worktree stays and the spec stays In Progress. Repeatable — land again as you commit more. Targets a spec by name (arg) or the spec in context. Use when the user says "/spec-to-main", "land this on main but keep going", "I need this on main to run tests before finishing", or "merge to main without completing the spec".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /spec-to-main — land the branch on main, keep the spec open
|
|
7
|
+
|
|
8
|
+
The **intermediate** landing. `/spec-complete` also lands the branch, but then
|
|
9
|
+
verifies every phase, flips the status to Complete, `git mv`s the spec to
|
|
10
|
+
`complete/`, and tears the environment down. **`/spec-to-main` stops after the
|
|
11
|
+
land**: the worktree stays, the spec stays `In Progress`, and you can land again
|
|
12
|
+
as you add commits.
|
|
13
|
+
|
|
14
|
+
Use it when a later phase can only be done *after* the current work is on `main` —
|
|
15
|
+
e.g. it needs to run in CI, a deploy pipeline, or a shared test environment that
|
|
16
|
+
builds from `main`. Land what you have, run that step, then come back and finish
|
|
17
|
+
the remaining phases with `/spec-go` and eventually `/spec-complete`.
|
|
18
|
+
|
|
19
|
+
It reuses the **same engine** as `/spec-complete`'s landing (`spec-env integrate`
|
|
20
|
+
— rebase + fast-forward), so it produces identical linear history. Because a
|
|
21
|
+
fast-forward leaves `base == branch`, the operation is **idempotent and
|
|
22
|
+
repeatable**: new commits put the branch ahead of base again, and you can run
|
|
23
|
+
`/spec-to-main` as many times as you like.
|
|
24
|
+
|
|
25
|
+
## 0. Preconditions — when this applies
|
|
26
|
+
|
|
27
|
+
- **Isolation must be on** (`specs/.core/env.config.json` exists **and** the spec
|
|
28
|
+
is on a worktree provisioned by `/spec-go`). If isolation is absent, there is
|
|
29
|
+
nothing to land — the spec is authored directly on `main` already. Say so and
|
|
30
|
+
stop.
|
|
31
|
+
- **Feature / Bug specs only.** A **Hotfix** (`Type: Hotfix`) is built on a
|
|
32
|
+
release *tag* and cannot fast-forward onto `main` — refuse it and point the user
|
|
33
|
+
at `/spec-complete` (it lands a hotfix via tag + cherry-pick). Check the header
|
|
34
|
+
`> **Type:**` before proceeding.
|
|
35
|
+
|
|
36
|
+
## 1. Identify the target spec
|
|
37
|
+
|
|
38
|
+
- Use the name/path argument if given, else the spec **in context**. If unclear,
|
|
39
|
+
ask which spec.
|
|
40
|
+
- Locate its folder under `specs/in-progress/`. Entry point is `00-overview.md`;
|
|
41
|
+
confirm `> **Status:**` is `In Progress` and `> **Type:**` is `Feature` or
|
|
42
|
+
`Bug`.
|
|
43
|
+
|
|
44
|
+
## 2. Require a clean worktree
|
|
45
|
+
|
|
46
|
+
The land rebases the branch — it refuses a dirty tree. If the worktree has
|
|
47
|
+
uncommitted changes, offer `/commit` and **stop**; don't auto-commit.
|
|
48
|
+
|
|
49
|
+
**If the spec is live** (you took the running instance with `/spec-live`):
|
|
50
|
+
`integrate` is live-aware — it ends the live session first (releases the branch
|
|
51
|
+
back to base, re-isolates it into its worktree, clears the receipt), then prints
|
|
52
|
+
the landing plan. Commit any live fixes to the branch first; it refuses if the
|
|
53
|
+
primary checkout is dirty, or if a *different* spec holds it (release that one with
|
|
54
|
+
`/spec-live main`).
|
|
55
|
+
|
|
56
|
+
## 3. Tests must be green before landing
|
|
57
|
+
|
|
58
|
+
Don't push red to `main`. Run the project's typecheck and test commands **in the
|
|
59
|
+
worktree**; the suite must be **green**. For a **Bug** spec, confirm the
|
|
60
|
+
originally-failing test now passes. If anything is red, stop and report — landing
|
|
61
|
+
broken code onto `main` defeats the purpose.
|
|
62
|
+
|
|
63
|
+
(Note this is the *worktree* suite. The whole point of this skill is often to run
|
|
64
|
+
a *further* check that only exists on `main` / in CI — that one runs **after** the
|
|
65
|
+
land, in step 5.)
|
|
66
|
+
|
|
67
|
+
## 4. Land — rebase + fast-forward
|
|
68
|
+
|
|
69
|
+
Run `skitterspec spec-env integrate <name>` and run the printed commands **in
|
|
70
|
+
order**:
|
|
71
|
+
|
|
72
|
+
- `git -C <worktree> rebase <base>` — replay the branch onto base.
|
|
73
|
+
- `git -C <mainRepoPath> merge --ff-only <branch>` — fast-forward base.
|
|
74
|
+
|
|
75
|
+
On a **rebase conflict** (non-zero exit), run `git -C <worktree> rebase --abort`,
|
|
76
|
+
relay the conflict, and **stop** — leave the resolution to the user; change
|
|
77
|
+
nothing else.
|
|
78
|
+
|
|
79
|
+
On a **no-op** ("already landed on `<base>` — nothing to integrate"), just say so
|
|
80
|
+
and continue — the branch has no commits base doesn't already have.
|
|
81
|
+
|
|
82
|
+
## 5. Re-test on base, then report
|
|
83
|
+
|
|
84
|
+
- Run the project's test command **from the primary checkout** — base must be
|
|
85
|
+
**green** after the fast-forward.
|
|
86
|
+
- Add a **Changelog** entry to `00-overview.md` recording the intermediate land
|
|
87
|
+
and *why*, e.g.
|
|
88
|
+
`- <YYYY-MM-DD> — Landed intermediate work onto <base> to <run CI / deploy to
|
|
89
|
+
test env / …>; spec stays In Progress.`
|
|
90
|
+
- Do **NOT**: add a State-log row (status doesn't change), flip any phase/status
|
|
91
|
+
to Complete, `git mv` the spec, or tear down the worktree/stack. **The spec
|
|
92
|
+
stays `In Progress` and the worktree stays put.**
|
|
93
|
+
- Report: the base branch, the fast-forward result, and the green base test. It
|
|
94
|
+
**never pushes** — mention the user can `git push` the base branch themselves to
|
|
95
|
+
trigger CI / the shared env.
|
|
96
|
+
- Point the way forward: `/spec-go` to continue the remaining phases (you'll keep
|
|
97
|
+
committing on the same branch and can `/spec-to-main` again), and `/spec-complete`
|
|
98
|
+
when every phase is genuinely done — it will land the final commits, finalise,
|
|
99
|
+
and tear down.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Spec-driven development for Claude Code — a tracker-free filesystem workflow: lifecycle skills and per-spec isolation. For Linear sync, install @skitterbyte/skitterspec-linear instead.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|