@softure-ai/skills 0.3.0 → 0.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.
package/WORKFLOW.md CHANGED
@@ -47,8 +47,12 @@ or languages.
47
47
  "integration": { // optional: the slow, full suite
48
48
  "local": "npm run test:integration:full",
49
49
  "remote": null, // e.g. a script that runs the suite on CI and waits: "bash scripts/ci-integration.sh"
50
- "cadence": "change" // "change": every change runs it before archive (default);
50
+ "cadence": "change", // "change": every change runs it before archive (default);
51
51
  // "roadmap": once on the main branch when the roadmap is realised (softure-worktree-manager M7)
52
+ "lookup": null, // optional: command printing the stored result for INTEGRATION_SHA (exit 0 green, 1 red, 3 none);
53
+ // wt-integration.sh reuses a green result for the same commit instead of starting a run
54
+ "coveredByRelease": false // true: the release pipeline runs the same full suite on the released commit, so a roadmap
55
+ // whose header orders "Release: at the end" gets no separate run at M7 (§5.2)
52
56
  },
53
57
  "migrations": { // optional: lets orchestrators detect collisions between parallel changes
54
58
  "dir": "drizzle",
@@ -76,6 +80,21 @@ Every key beyond `language`, `mainBranch` and `gates` is optional, and a missing
76
80
  behaviour described where the key is used. A project adopts a convention by setting its key; nothing here
77
81
  forces one on a project that already has its own.
78
82
 
83
+ ### CI minutes
84
+
85
+ Parallel sessions push often, and every push can start the project's CI. The skills keep their share small:
86
+
87
+ - a session branch is pushed at READY (and again only to sync with `<main>` before the merge), never per phase
88
+ or per commit;
89
+ - the full integration suite runs once per item (`cadence: "change"`) or once per roadmap (`"roadmap"`), never
90
+ twice on the same commit: `integration.lookup` lets `wt-integration.sh` reuse a stored green result, and
91
+ `integration.coveredByRelease` hands the roadmap's run to the release pipeline when a release follows anyway;
92
+ - a "finish" item does not start a run of its own under `cadence: "roadmap"`.
93
+
94
+ The project's side: when the git hooks already run the gates (`pre-commit`, `pre-push`), CI does not need to
95
+ repeat them on every pushed branch. Run CI on pull requests, on the main branch or on demand, skip changes
96
+ that touch only documents, and cancel superseded runs (`concurrency`).
97
+
79
98
  ## 3. Artifacts
80
99
 
81
100
  ```
@@ -179,6 +198,7 @@ updated: 2026-10-01
179
198
  > Run-wide orders, read by orchestrators (not parsed):
180
199
  > - Push main branch: no | at the end
181
200
  > - Archive roadmap: no | at the end
201
+ > - Release: no | at the end (the owner's approval, quoted; skills still never release)
182
202
  > - Parallelism: up to 4 at once
183
203
 
184
204
  ## At a glance
@@ -269,6 +289,9 @@ the end", otherwise by the owner). Gates, all checked on `<main>` and reported t
269
289
  2. `context/changes/` holds only its README, plus the folders of carried rows. Any other folder is archived first
270
290
  (`softure-archive`, including work done without a plan), never deleted and never left behind;
271
291
  3. when `integration` is configured: one green full run on the final `<main>` (its result line goes into the archive).
292
+ With `integration.coveredByRelease: true` and the order "Release: at the end", that run is the release's: the
293
+ gate reads the green result the release pipeline stored for the final `<main>` commit (`integration.lookup`).
294
+ Until the release has run, the close waits and the report names it as the step after the release.
272
295
 
273
296
  Then, in one commit (`docs(roadmap): close <slug>`):
274
297
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softure-ai/skills",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "SOFTURE agent skills: a spec-driven delivery workflow (shape → prd → roadmap → plan → implement → review) plus parallel worktree orchestration",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -112,6 +112,8 @@ only when it was detected or the user asked for it:
112
112
  |---|---|---|
113
113
  | `timezone` | the machine's zone | the user names a zone |
114
114
  | `integration.cadence` | `"change"` (every change runs the suite before archive) | the user wants one run per roadmap (`"roadmap"`) |
115
+ | `integration.lookup` | every call starts a run | the project stores results per commit (e.g. a git note) and has a command that prints one |
116
+ | `integration.coveredByRelease` | `false` | the release pipeline runs the same full suite on the released commit |
115
117
  | `worktree.cloudState` | `"main"` | the user runs cloud sessions that must keep state on the branch (`"branch"`) |
116
118
  | `research.sources` | none | step 2 found docs, ADRs or a PRD (interactive: listed in the plan; `--auto`: only paths that exist) |
117
119
  | `install` | gitignore the skills, inject all rule sections | the user wants committed skills or fewer rule sections |
@@ -165,6 +165,8 @@ Overwriting a roadmap without archiving it is never an option. In `--auto`: revi
165
165
  - Do not choose an order that prejudges an open owner question; the items it decides are
166
166
  `blocked (<question>)` until it is answered.
167
167
  - Put a "finish" item last when the theme needs a final measurement or review across items.
168
+ With `integration.cadence: "roadmap"` it does not start the full integration suite of its own:
169
+ the coordinator's run on `<main>` (M7), or the release when it covers the roadmap, is that run.
168
170
 
169
171
  8. **Unknowns and blockers.** Per item, `- <question> (owner: research | <person>; blocks: yes | no)`.
170
172
  One with `blocks: yes` makes the row `blocked (<question, short>)`. External dependencies the
@@ -191,7 +193,9 @@ Overwriting a roadmap without archiving it is never an option. In `--auto`: revi
191
193
  11. **Header and `## Order`.**
192
194
  - frontmatter: `prd_version` = the PRD `version`;
193
195
  - run-wide orders in the quote block: push main or not; archive the roadmap at the end or not;
194
- parallelism (default: `workflow.json` → `worktree.maxParallel`); which items need the owner
196
+ release at the end or not (only with the owner's approval, quoted: it tells the coordinator a release
197
+ follows, and with `integration.coveredByRelease` the release's suite is the roadmap's run; skills
198
+ still never release); parallelism (default: `workflow.json` → `worktree.maxParallel`); which items need the owner
195
199
  at the keyboard (`Mode: owner`);
196
200
  - `## Order` opens with the framing (optimising for, first proof, main risk, depth), then the
197
201
  reasoning for the order, `### Starting point` (the confirmed baseline, one line per layer
@@ -192,7 +192,9 @@ branch at least at READY (`git push -u origin HEAD`) — the container is
192
192
  reclaimed after inactivity, and a pushed branch is the copy that survives it.
193
193
  `<main>` still changes only by the merge on the owner's signal (point 7). The
194
194
  first push of a ref without an upstream may run the pre-push hook's full suite
195
- — minutes of silence, expected; never bypass it.
195
+ — minutes of silence, expected; never bypass it. Every push may also start the
196
+ project's CI on origin: push at READY and to sync before the merge, **never per
197
+ phase or per commit** (WORKFLOW §2, CI minutes).
196
198
 
197
199
  **6. READY.** A3.8 runs before A4, as locally (unless the cadence defers it).
198
200
  A5 merges `origin/<main>` (after `git fetch origin <main>`), not the local one.
@@ -674,7 +676,9 @@ the review file with every finding decided.
674
676
  #### A3.8 — Full integration suite
675
677
 
676
678
  **`integration.cadence: "roadmap"`** → skip this step: no stage `integration`,
677
- no run. READY says `integration: deferred to the roadmap run (cadence:
679
+ no run — a "finish" item (the roadmap's last, cross-item one) included: the
680
+ coordinator's M7 run, or the release when it covers the roadmap, is the
681
+ measurement. READY says `integration: deferred to the roadmap run (cadence:
678
682
  roadmap)`. The touched files' own integration tests still run if the project
679
683
  can run them cheaply; their result goes into READY as `own tests:`.
680
684
 
@@ -695,9 +699,13 @@ first). Output lines and exit codes:
695
699
  | --- | --- | --- |
696
700
  | `0` | green (flaky tests that passed on retry are listed as `flaky:`) | on to A3.9. A flaky test in a file your change touched is yours: remove the cause, don't raise retries |
697
701
  | `1` | red — or the run could not start | **`new-red:` lines are yours** (reds absent from `<main>`'s latest result). Fix them before READY (see it red first — the run itself is the red), commit `fix(<change-id>): integration — <what>` after full gates, run A3.8 again with the same name. **Reds already on `<main>`** (`red:` but not `new-red:`) are not the item's to fix: report them in READY; the coordinator queues them as their own row. When the command cannot tell new from old, treat every red as yours unless you show it red on `<main>` (scratchpad worktree detached at `origin/<main>`, the same script with name `<change-id>-baseline`) |
698
- | `75` | no result in time | nothing is lost — the run continues. Follow the printed link, wait for it to finish, read its result. Running A3.8 again starts a **new** run — do that only when the run itself failed to start or died. Never report READY without a result |
702
+ | `75` | no result in time | nothing is lost — the run continues. Follow the printed link, wait for it to finish, read its result. Running A3.8 again starts a **new** run — do that only when the run itself failed to start or died (`--fresh`). Never report READY without a result |
699
703
  | `78` | integration not configured | READY says `integration: not configured`; suggest configuring it in the report |
700
704
 
705
+ With `integration.lookup` configured, a green result already stored for the
706
+ same HEAD is reused (`stored green result reused`): the same commit is the
707
+ same code, so it is never tested twice.
708
+
701
709
  **Only documentation in the whole change** (the docs-only case, no test gate
702
710
  either) → no integration run; READY says `integration: n/a — documentation
703
711
  only`.
@@ -2,10 +2,15 @@
2
2
  # Run the project's full integration suite for the current HEAD, as configured in
3
3
  # context/workflow.json (`integration.remote`, else `integration.local`).
4
4
  #
5
- # wt-integration.sh <name> [--wait <minutes>] # default 30
5
+ # wt-integration.sh <name> [--wait <minutes>] [--fresh] # wait default 30
6
6
  #
7
7
  # Run it from inside the tree to test (cd <WT> && bash …/wt-integration.sh <change-id>).
8
8
  #
9
+ # `integration.lookup` (optional) — a project command that prints the stored result for
10
+ # INTEGRATION_SHA (same stdout lines as below) and exits 0 green · 1 red · 3 no result.
11
+ # A stored green result for the very commit is reused: no new run (the same commit is the
12
+ # same code). `--fresh` skips the lookup — for a run that died or could not start.
13
+ #
9
14
  # `integration.remote` — a project command that runs the suite elsewhere (CI) for the
10
15
  # committed HEAD and waits for the result. It receives INTEGRATION_NAME, INTEGRATION_SHA and
11
16
  # INTEGRATION_WAIT_MINUTES in the environment and must follow this contract:
@@ -25,20 +30,39 @@ SCRIPTS="$(cd "$(dirname "$0")" && pwd)"
25
30
  CFG() { python3 "$SCRIPTS/wt_config.py" "$@"; }
26
31
 
27
32
  NAME="${1:-}"
28
- [ -n "$NAME" ] || { sed -n '2,24p' "$0"; exit 2; }
33
+ [ -n "$NAME" ] || { sed -n '2,26p' "$0"; exit 2; }
29
34
  shift
30
35
  WAIT=30
31
- [ "${1:-}" = "--wait" ] && { WAIT="$2"; shift 2; }
36
+ FRESH=0
37
+ while [ $# -gt 0 ]; do
38
+ case "$1" in
39
+ --wait) WAIT="${2:-}"; shift 2 ;;
40
+ --fresh) FRESH=1; shift ;;
41
+ *) echo "unknown argument: $1" >&2; exit 2 ;;
42
+ esac
43
+ done
44
+ case "$WAIT" in ''|*[!0-9]*) echo "--wait: minutes as a number" >&2; exit 2 ;; esac
32
45
  case "$NAME" in *[!a-zA-Z0-9._/-]*) echo "name: letters, digits, . _ - / only" >&2; exit 2 ;; esac
33
46
 
34
47
  ROOT="$(git rev-parse --show-toplevel)"
35
48
  SHA="$(git rev-parse HEAD)"
36
49
  REMOTE="$(CFG integration.remote)"
37
50
  LOCAL="$(CFG integration.local)"
51
+ LOOKUP="$(CFG integration.lookup)"
38
52
 
39
53
  [ -z "$(git status --porcelain --untracked-files=no)" ] \
40
54
  || echo "⚠ uncommitted changes are NOT part of the run — commit ${SHA:0:8} is what gets tested" >&2
41
55
 
56
+ if [ -n "$LOOKUP" ] && [ "$FRESH" = 0 ] && { [ -n "$REMOTE" ] || [ -n "$LOCAL" ]; }; then
57
+ STORED="$( cd "$ROOT" && INTEGRATION_NAME="$NAME" INTEGRATION_SHA="$SHA" bash -c "$LOOKUP" 2>/dev/null )"
58
+ if [ $? = 0 ]; then
59
+ echo "▸ integration for ${SHA:0:8}: stored green result reused, no new run (integration.lookup)"
60
+ printf '%s\n' "$STORED"
61
+ echo "commit: $SHA"
62
+ exit 0
63
+ fi
64
+ fi
65
+
42
66
  if [ -n "$REMOTE" ]; then
43
67
  echo "▸ integration (remote) for ${SHA:0:8} as '$NAME': $REMOTE"
44
68
  ( cd "$ROOT" && INTEGRATION_NAME="$NAME" INTEGRATION_SHA="$SHA" INTEGRATION_WAIT_MINUTES="$WAIT" bash -c "$REMOTE" )
@@ -354,7 +354,7 @@ job), then:
354
354
  CronCreate(
355
355
  cron: "4,19,34,49 * * * *", # every 15 min, off the :00/:30 marks
356
356
  recurring: true,
357
- prompt: "Status for the owner + loop heartbeat (/softure-worktree-manager). If several of these fired while busy, do one. 1) bash <M>/wm-resume.sh + the latest commits of the worker branches. 2) Report as the status table (format under 'The report itself'); nothing moved → one line. 3) Resume the loop by the wm-resume actions (M0.1 table): MERGE → M5 and M6; NUDGE → SendMessage 'continue' (usage limit: after its reset time); RELAUNCH → claude stop + wm-launch.sh; wm-watch Monitor expired → re-arm with the IDs in flight; free slot and a ready item without collision → M1–M3. Work until the roadmap is done / done_code. 4) End → M7 (integration suite on <main>; close the roadmap and push <main> only if the roadmap header orders it; tag, release and deploy never — those are the owner's) and CronDelete this job. Write the report in the language and the times in the timezone from context/workflow.json.")
357
+ prompt: "Status for the owner + loop heartbeat (/softure-worktree-manager). If several of these fired while busy, do one. 1) bash <M>/wm-resume.sh + the latest commits of the worker branches. 2) Report as the status table (format under 'The report itself'); nothing moved → one line. 3) Resume the loop by the wm-resume actions (M0.1 table): MERGE → M5 and M6; NUDGE → SendMessage 'continue' (usage limit: after its reset time); RELAUNCH → claude stop + wm-launch.sh; wm-watch Monitor expired → re-arm with the IDs in flight; free slot and a ready item without collision → M1–M3. Work until the roadmap is done / done_code. 4) End → M7 (integration suite on <main>, unless the release covers it; close the roadmap and push <main> only if the roadmap header orders it; tag, release and deploy never — those are the owner's) and CronDelete this job. Write the report in the language and the times in the timezone from context/workflow.json.")
358
358
  ```
359
359
 
360
360
  This prompt is also the run's **heartbeat**: a worker stuck on a usage limit
@@ -516,8 +516,27 @@ don't start a new run over a moving one. With `integration.cadence:
516
516
  "roadmap"` this is the roadmap's only full run, so its reds are measured
517
517
  against the previous result on `<main>`, not per change.
518
518
 
519
+ **One run per commit, not more.** With `integration.lookup` configured, the
520
+ script reuses a green result already stored for the same `<main>` commit (for
521
+ example a run a worker or the release made on it) instead of starting a new
522
+ one — the same commit is the same code. `--fresh` only when a run died or
523
+ could not start.
524
+
525
+ **Covered by the release** — `integration.coveredByRelease: true` **and** the
526
+ header orders "Release: at the end" (the owner's approval, quoted): the
527
+ release pipeline runs the same full suite on the released commit, so a run
528
+ here would test that commit twice. Skip the run and write in the report:
529
+ `integration <main>: covered by the release pipeline on <sha>
530
+ (coveredByRelease)`. The release itself is still the owner's (or follows the
531
+ project's own rules) — this skill never starts it. Its red result is handled
532
+ as above: each red becomes a row and a worker. Without that header order, run
533
+ the suite here as usual.
534
+
519
535
  **Then close the roadmap — only when the header orders it** ("Archive roadmap:
520
- at the end") and the run above is green: `/softure-roadmap --close --auto`
536
+ at the end") and the run above is green (covered by the release → the gate
537
+ reads the release's stored green result for the final `<main>` commit,
538
+ WORKFLOW §5.2; no result yet → leave the close as the step after the release
539
+ and say so): `/softure-roadmap --close --auto`
521
540
  (WORKFLOW §5.2). A failing gate (a leftover folder in `context/changes/`, a
522
541
  row not settled) is fixed first — leftovers are archived, unsettled rows go to
523
542
  a worker — never forced. The close is a documents-only commit on `<main>`; if a
@@ -576,5 +595,6 @@ Everything else is decided and written into the report.
576
595
  anything is in flight (unless `--status-every 0`) and deleted at M7.
577
596
  - **No tag, no release, no deploy, ever** (while `release.owner` is true).
578
597
  **No push of `<main>`** — except the single push at M7 that the roadmap
579
- header orders; the full integration suite on `<main>` follows it and goes
580
- into the final report.
598
+ header orders; the full integration suite on `<main>` follows it (or the
599
+ release covers it, `integration.coveredByRelease`) and goes into the final
600
+ report.