@skitterbyte/skitterspec-jira 2.3.0 → 2.4.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.
Files changed (57) hide show
  1. package/assets/claude-md-section.md +20 -1
  2. package/assets/core/env.config.json.example +1 -0
  3. package/assets/core/env.config.md +90 -6
  4. package/assets/core/jira.config.md +4 -2
  5. package/assets/hooks/main-guard.cjs +18 -2
  6. package/assets/hooks/review-gate.cjs +19 -2
  7. package/assets/rules/commit-trailers.md +24 -1
  8. package/assets/rules/spec-planning.md +81 -18
  9. package/assets/rules/spec-reports.md +1 -1
  10. package/assets/skills/spec/SKILL.md +55 -2
  11. package/assets/skills/spec-bug/SKILL.md +25 -1
  12. package/assets/skills/spec-cancel/SKILL.md +35 -0
  13. package/assets/skills/spec-complete/SKILL.md +113 -0
  14. package/assets/skills/spec-hotfix/SKILL.md +40 -2
  15. package/assets/skills/spec-incident/SKILL.md +22 -0
  16. package/assets/skills/spec-jira-setup/SKILL.md +23 -1
  17. package/assets/skills/spec-next/SKILL.md +9 -4
  18. package/assets/skills/spec-push/SKILL.md +22 -0
  19. package/assets/skills/spec-review/SKILL.md +32 -0
  20. package/assets/skills/spec-start/SKILL.md +39 -1
  21. package/assets/skills/spec-status/SKILL.md +18 -3
  22. package/assets/skills/spec-sync/SKILL.md +1 -0
  23. package/assets/skills/spec-to-main/SKILL.md +47 -1
  24. package/package.json +1 -1
  25. package/src/cli.js +1091 -39
  26. package/src/env/base.js +104 -0
  27. package/src/env/config.js +75 -3
  28. package/src/env/disposition.js +62 -0
  29. package/src/env/handoff.js +80 -0
  30. package/src/env/host.js +262 -0
  31. package/src/env/hotfix.js +225 -0
  32. package/src/env/hotfixland.js +103 -9
  33. package/src/env/inflight.js +95 -0
  34. package/src/env/integrate.js +130 -4
  35. package/src/env/mainguard.js +6 -0
  36. package/src/env/phases.js +28 -0
  37. package/src/env/provision.js +18 -6
  38. package/src/env/resolve.js +108 -9
  39. package/src/env/serve.js +6 -1
  40. package/src/env/specstate.js +101 -0
  41. package/src/env/teardown.js +42 -0
  42. package/src/vendor/jira/cli-sync.js +45 -3
  43. package/src/vendor/jira/config.js +17 -5
  44. package/src/vendor/provider-kit/index.js +4 -0
  45. package/src/vendor/provider-kit/src/apply.js +49 -4
  46. package/src/vendor/provider-kit/src/assignment.js +78 -1
  47. package/src/vendor/provider-kit/src/config.js +34 -1
  48. package/src/vendor/provider-kit/src/list-rows.js +35 -11
  49. package/src/vendor/provider-kit/src/released.js +14 -1
  50. package/src/vendor/provider-kit/src/specs.js +4 -2
  51. package/src/vendor/provider-kit/src/splice.js +64 -0
  52. package/src/vendor/provider-kit/src/status.js +137 -0
  53. package/src/vendor/sync-core/index.js +14 -1
  54. package/src/vendor/sync-core/src/compare.js +17 -5
  55. package/src/vendor/sync-core/src/normalize.js +50 -7
  56. package/src/vendor/sync-core/src/push.js +26 -2
  57. package/src/vendor/sync-core/src/summary.js +257 -0
@@ -28,6 +28,11 @@ fast-forward leaves `base == branch`, the operation is
28
28
  **idempotent and repeatable**: new commits put the branch ahead of base again,
29
29
  and you can run `/spec-to-main` as many times as you like.
30
30
 
31
+ **In PR mode** (`land.strategy: "pr"` in `env.config.json`) the destination is
32
+ the host, not the local base: this skill becomes *push the branch and open or
33
+ update the DRAFT pull request* — same intent (get the work into CI / the shared
34
+ env), new transport. §4b replaces §4 there; everything else holds unchanged.
35
+
31
36
  ## 0. Preconditions — when this applies
32
37
 
33
38
  - **Isolation must be on** (`specs/.core/env.config.json` exists **and** the spec
@@ -87,6 +92,19 @@ nothing else.
87
92
  On a **no-op** ("already landed on `<base>` — nothing to integrate"), just say so
88
93
  and continue — the branch has no commits base doesn't already have.
89
94
 
95
+ **Under a rolling base** (`baseBranchPattern` in `env.config.json`) the plan
96
+ can carry two more things, and both are the engine's to say:
97
+ - a `git -C <mainRepoPath> switch <base>` (or `switch -c … --track`) **first**,
98
+ when the primary checkout still has an older release candidate out — run it
99
+ in order with the rest;
100
+ - a `retarget: forked from <old> · landing onto <new>` line, when the rc
101
+ rolled while this spec was in flight. It is the land working, not a fault:
102
+ relay it verbatim in the `Landed` row so the reader sees where the work went.
103
+
104
+ A refusal naming `no branch matches <pattern>` means no release candidate is
105
+ visible — usually not fetched. Relay it, stop with `⏸`, and name
106
+ `skitterspec spec-env base` (it fetches and lists) as the next step.
107
+
90
108
  **Then run the after-land commands.** Where the plan ends with a
91
109
  `then, in the primary checkout (<path>), run:` section — the project's
92
110
  `afterLand`, such as a data migration — run those commands in that directory,
@@ -99,6 +117,28 @@ land made elsewhere leaves them pending here.
99
117
  that failed and the ones that did not run, and it **never undoes the land**.
100
118
  No section, nothing to run, and nothing to say about it.
101
119
 
120
+ ## 4b. PR mode — push the branch, keep the PR a draft
121
+
122
+ When the plan's heading reads `(pr)`, run
123
+ `skitterspec spec-env integrate <name> --draft` instead and run what it prints:
124
+ a fetch, a rebase onto `<remote>/<base>`, and — this is the consent gate — the
125
+ push and PR-create under its own `with your consent` section.
126
+ **Ask before pushing**: ask once, plainly, naming the remote and that the PR
127
+ opens as a draft. On a yes, re-run with `--push` added and run the single printed list; on
128
+ a no, relay the held commands and stop — the work is rebased and ready, and the
129
+ user can push it themselves.
130
+
131
+ - **The draft is the point.** A draft cannot be merged and the tracker's
132
+ automations read it as in-progress, so nothing downstream can close the
133
+ ticket early. `/spec-complete` is what flips it to ready.
134
+ - A `pr:` line saying the PR is already open means the push updates it —
135
+ nothing more to create, and that is the repeatable case.
136
+ - **No after-land commands run here.** The plan defers them ("after-land
137
+ commands are deferred: base moves when the host merges") — the completion run
138
+ that follows the merge owns them. §5's re-test on base does not apply either:
139
+ base has not moved; CI on the PR is the check this land exists for.
140
+ - A **rebase conflict** aborts and stops exactly as §4.
141
+
102
142
  ## 5. Re-test on base, then report
103
143
 
104
144
  - Run the project's test command **from the primary checkout** — base must be
@@ -111,7 +151,9 @@ No section, nothing to run, and nothing to say about it.
111
151
  to Complete, `git mv` the spec, or tear down the worktree/stack.
112
152
  **The spec stays `In Progress` and the worktree stays put.**
113
153
  - It **never pushes** — say the user can `git push` the base branch themselves to
114
- trigger CI / the shared env.
154
+ trigger CI / the shared env. (PR mode is not an exception to the stance but to
155
+ the mechanics: there the push *is* the land, and it runs only behind §4b's
156
+ explicit consent — never silently.)
115
157
  - `Next` points the way forward: `/spec-next` to continue the remaining phases
116
158
  (you'll keep committing on the same branch and can `/spec-to-main` again), and
117
159
  `/spec-complete` when every phase is genuinely done — it will land the final
@@ -135,6 +177,10 @@ the shape; this section carries only what is specific here.
135
177
  skipped because the land matched no `when` — or the one that failed and the ones that did not run. Nothing about it when none are
136
178
  configured.
137
179
 
180
+ `Landed` in PR mode names the host, not the base: `PR #14 (draft) opened` or
181
+ `PR #14 (draft) updated` — and `held — not pushed` when §4b's consent was
182
+ declined, because an unpushed rebase is a true outcome, not a failure.
183
+
138
184
  **No `Spec` field, deliberately.** This skill changes no status and moves no
139
185
  folder, and a `Spec` line here would read as though it had. The spec stays
140
186
  `In Progress` and the worktree stays standing — if that needs saying, the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skitterbyte/skitterspec-jira",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Spec-driven development for Claude Code, with one-way Jira Cloud sync — a superset of @skitterbyte/skitterspec: the base filesystem workflow plus /spec-status · /spec-push and the spec-sync CLI. The repo is canonical; Jira is a generated mirror. Install this OR the base OR the Linear superset — exactly one.",
5
5
  "keywords": [
6
6
  "claude",