@softure-ai/skills 0.3.0 → 0.5.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 +19 -3
- package/WORKFLOW.md +93 -5
- package/package.json +1 -1
- package/rules/AGENTS.md +162 -0
- package/scripts/install.mjs +31 -7
- package/skills/softure-archive/SKILL.md +2 -0
- package/skills/softure-code-review/SKILL.md +2 -0
- package/skills/softure-frame/SKILL.md +2 -0
- package/skills/softure-impl-review/SKILL.md +3 -1
- package/skills/softure-implement/SKILL.md +22 -1
- package/skills/softure-init/SKILL.md +22 -6
- package/skills/softure-lesson/SKILL.md +2 -0
- package/skills/softure-new/SKILL.md +2 -0
- package/skills/softure-plan/SKILL.md +2 -0
- package/skills/softure-plan-review/SKILL.md +2 -0
- package/skills/softure-prd/SKILL.md +2 -0
- package/skills/softure-research/SKILL.md +2 -0
- package/skills/softure-roadmap/SKILL.md +7 -1
- package/skills/softure-rule-review/SKILL.md +2 -0
- package/skills/softure-shape/SKILL.md +2 -0
- package/skills/softure-worktree/SKILL.md +54 -7
- package/skills/softure-worktree/scripts/wt-integration.sh +27 -3
- package/skills/softure-worktree/scripts/wt_config.py +2 -2
- package/skills/softure-worktree-manager/SKILL.md +57 -13
package/README.md
CHANGED
|
@@ -28,17 +28,33 @@ What the installer does (idempotent; re-run on every `npm install`):
|
|
|
28
28
|
It never overwrites a skill folder it did not install. Flags: `--dry-run`, `--target <dir>`,
|
|
29
29
|
`--no-gitignore` (commit the skills instead).
|
|
30
30
|
|
|
31
|
+
**Operating mode.** `context/workflow.json` → `mode` is `"manual"` (default) or `"autonomous"`, and the
|
|
32
|
+
installer injects only that mode's section into the rules block:
|
|
33
|
+
|
|
34
|
+
| | manual | autonomous |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| who decides | the owner, step by step; skills ask | the agent takes the recommended option and records it |
|
|
37
|
+
| implementation | one phase per run, commit on the owner's approval | all phases, one commit per phase |
|
|
38
|
+
| merge into the main branch | on the owner's signal | standing consent: serial merge queue, via PR (`autonomy.merge`) |
|
|
39
|
+
| parallel sessions, reports | only when the owner starts them | coordinator + one session per change, report every 30 min |
|
|
40
|
+
| release | the owner | the owner while `release.owner` is true; production deploy always the owner |
|
|
41
|
+
|
|
42
|
+
The autonomous standard (session hygiene, merge queue, report table `ID | What it does | Stage | Link`,
|
|
43
|
+
issues as the queue) lives in the rules block, so every session, cloud ones included, reads it from
|
|
44
|
+
`AGENTS.md` without being told. Tune it with `autonomy` (WORKFLOW §2). Switch modes only on the
|
|
45
|
+
owner's word: change `mode`, re-run the installer, commit both.
|
|
46
|
+
|
|
31
47
|
Per-project choices go into `context/workflow.json` → `install` and are applied on every install,
|
|
32
48
|
postinstall included: `"gitignore": false` commits the skills, and `"rules": ["workflow", "conventions"]`
|
|
33
49
|
injects only those sections of the rules block (sections: `language`, `workflow`, `conventions`; default:
|
|
34
|
-
all). Put project-specific skills in folders without the `softure-` prefix: installed folders are
|
|
50
|
+
all; the operating-mode section always ships). Put project-specific skills in folders without the `softure-` prefix: installed folders are
|
|
35
51
|
overwritten on every install. Uninstall:
|
|
36
52
|
`node node_modules/@softure-ai/skills/scripts/uninstall.mjs`.
|
|
37
53
|
|
|
38
54
|
## The chain
|
|
39
55
|
|
|
40
56
|
See [WORKFLOW.md](WORKFLOW.md) for the full contract: artifacts, statuses, formats and
|
|
41
|
-
|
|
57
|
+
operating modes.
|
|
42
58
|
|
|
43
59
|
| Stage | Skill | Produces |
|
|
44
60
|
|---|---|---|
|
|
@@ -61,7 +77,7 @@ autonomous mode.
|
|
|
61
77
|
| | `softure-rule-review` | audit of AGENTS.md / CLAUDE.md / skills |
|
|
62
78
|
|
|
63
79
|
Every interactive skill accepts `--auto`: it decides instead of asking and records each
|
|
64
|
-
decision in the artifact. The orchestrators always use it.
|
|
80
|
+
decision in the artifact. The orchestrators always use it, and `mode: "autonomous"` implies it.
|
|
65
81
|
|
|
66
82
|
Each `SKILL.md` stays scannable: the procedure, the questions it asks and its quality bar.
|
|
67
83
|
Long material (question banks, rubrics, templates, complete worked examples, good and bad)
|
package/WORKFLOW.md
CHANGED
|
@@ -29,6 +29,12 @@ hygiene (any time)
|
|
|
29
29
|
Each step produces a durable artifact the next step reads. A step never starts without its
|
|
30
30
|
upstream artifact. When the artifact is missing, the skill says which skill produces it and stops.
|
|
31
31
|
|
|
32
|
+
**Every change goes through the delivery chain**, however small: a one-line fix reported in chat is a
|
|
33
|
+
change too (`roadmap_item: null`). Mandatory steps: `new`, `plan`, `plan-review`, `implement`,
|
|
34
|
+
`impl-review`, `archive`. `research` and `frame` are optional; skipping one needs a one-line reason
|
|
35
|
+
under `## Notes` in change.md. The planning artifacts exist before the first edit of source code.
|
|
36
|
+
In manual mode (§8.3) the owner may waive this for one named change; in autonomous mode nobody does.
|
|
37
|
+
|
|
32
38
|
## 2. Project configuration: `context/workflow.json`
|
|
33
39
|
|
|
34
40
|
`softure-init` creates it. Every skill reads it. No skill hard-codes commands, branch names
|
|
@@ -36,6 +42,8 @@ or languages.
|
|
|
36
42
|
|
|
37
43
|
```jsonc
|
|
38
44
|
{
|
|
45
|
+
"mode": "manual", // "manual" (default when absent): the owner checks every step; "autonomous": the agent
|
|
46
|
+
// decides, merges and coordinates on its own. Rules for both: §8 and rules/AGENTS.md
|
|
39
47
|
"language": "en", // ISO code (e.g. "pl"): language of artifacts and reports (skills themselves are English)
|
|
40
48
|
"timezone": "Europe/Warsaw", // optional IANA zone for every time shown in reports; default: the machine's zone
|
|
41
49
|
"mainBranch": "master",
|
|
@@ -47,8 +55,12 @@ or languages.
|
|
|
47
55
|
"integration": { // optional: the slow, full suite
|
|
48
56
|
"local": "npm run test:integration:full",
|
|
49
57
|
"remote": null, // e.g. a script that runs the suite on CI and waits: "bash scripts/ci-integration.sh"
|
|
50
|
-
"cadence": "change"
|
|
58
|
+
"cadence": "change", // "change": every change runs it before archive (default);
|
|
51
59
|
// "roadmap": once on the main branch when the roadmap is realised (softure-worktree-manager M7)
|
|
60
|
+
"lookup": null, // optional: command printing the stored result for INTEGRATION_SHA (exit 0 green, 1 red, 3 none);
|
|
61
|
+
// wt-integration.sh reuses a green result for the same commit instead of starting a run
|
|
62
|
+
"coveredByRelease": false // true: the release pipeline runs the same full suite on the released commit, so a roadmap
|
|
63
|
+
// whose header orders "Release: at the end" gets no separate run at M7 (§5.2)
|
|
52
64
|
},
|
|
53
65
|
"migrations": { // optional: lets orchestrators detect collisions between parallel changes
|
|
54
66
|
"dir": "drizzle",
|
|
@@ -61,7 +73,14 @@ or languages.
|
|
|
61
73
|
"cloudState": "main" // cloud sessions: "main" pushes the claim and every stage to origin/<main> at once (default);
|
|
62
74
|
// "branch" commits them on the session branch only, <main> changes only by the merge
|
|
63
75
|
},
|
|
64
|
-
"release": { "owner": true }, // releases and deploys are never done by skills when true
|
|
76
|
+
"release": { "owner": true }, // releases and deploys are never done by skills when true; false lets an autonomous
|
|
77
|
+
// project release through its own pipeline (never a production deploy, §8.4)
|
|
78
|
+
"autonomy": { // optional, read only when mode is "autonomous" (§8.4)
|
|
79
|
+
"source": "roadmap", // "roadmap": items come from roadmap.md; "issues": the forge's open issues are the queue
|
|
80
|
+
"merge": "pr", // "pr": pull request with fresh <main>, merged on the forge after green checks (default);
|
|
81
|
+
// "push": local --no-ff merge, then push <main> through the pre-push hook
|
|
82
|
+
"reports": { "every": 30, "hours": null } // coordinator status reports: minutes (0 = off), optional "10:00-22:30" window
|
|
83
|
+
},
|
|
65
84
|
"research": { // optional: extra knowledge sources softure-research should consult
|
|
66
85
|
"sources": ["docs/", "context/foundation/prd.md"]
|
|
67
86
|
},
|
|
@@ -72,10 +91,25 @@ or languages.
|
|
|
72
91
|
}
|
|
73
92
|
```
|
|
74
93
|
|
|
75
|
-
Every key beyond `language`, `mainBranch` and `gates` is optional, and a missing key means the default
|
|
94
|
+
Every key beyond `language`, `mainBranch` and `gates` is optional (`mode` included: absent means `"manual"`), and a missing key means the default
|
|
76
95
|
behaviour described where the key is used. A project adopts a convention by setting its key; nothing here
|
|
77
96
|
forces one on a project that already has its own.
|
|
78
97
|
|
|
98
|
+
### CI minutes
|
|
99
|
+
|
|
100
|
+
Parallel sessions push often, and every push can start the project's CI. The skills keep their share small:
|
|
101
|
+
|
|
102
|
+
- a session branch is pushed at READY (and again only to sync with `<main>` before the merge), never per phase
|
|
103
|
+
or per commit;
|
|
104
|
+
- the full integration suite runs once per item (`cadence: "change"`) or once per roadmap (`"roadmap"`), never
|
|
105
|
+
twice on the same commit: `integration.lookup` lets `wt-integration.sh` reuse a stored green result, and
|
|
106
|
+
`integration.coveredByRelease` hands the roadmap's run to the release pipeline when a release follows anyway;
|
|
107
|
+
- a "finish" item does not start a run of its own under `cadence: "roadmap"`.
|
|
108
|
+
|
|
109
|
+
The project's side: when the git hooks already run the gates (`pre-commit`, `pre-push`), CI does not need to
|
|
110
|
+
repeat them on every pushed branch. Run CI on pull requests, on the main branch or on demand, skip changes
|
|
111
|
+
that touch only documents, and cancel superseded runs (`concurrency`).
|
|
112
|
+
|
|
79
113
|
## 3. Artifacts
|
|
80
114
|
|
|
81
115
|
```
|
|
@@ -179,6 +213,7 @@ updated: 2026-10-01
|
|
|
179
213
|
> Run-wide orders, read by orchestrators (not parsed):
|
|
180
214
|
> - Push main branch: no | at the end
|
|
181
215
|
> - Archive roadmap: no | at the end
|
|
216
|
+
> - Release: no | at the end (the owner's approval, quoted; skills still never release)
|
|
182
217
|
> - Parallelism: up to 4 at once
|
|
183
218
|
|
|
184
219
|
## At a glance
|
|
@@ -269,6 +304,9 @@ the end", otherwise by the owner). Gates, all checked on `<main>` and reported t
|
|
|
269
304
|
2. `context/changes/` holds only its README, plus the folders of carried rows. Any other folder is archived first
|
|
270
305
|
(`softure-archive`, including work done without a plan), never deleted and never left behind;
|
|
271
306
|
3. when `integration` is configured: one green full run on the final `<main>` (its result line goes into the archive).
|
|
307
|
+
With `integration.coveredByRelease: true` and the order "Release: at the end", that run is the release's: the
|
|
308
|
+
gate reads the green result the release pipeline stored for the final `<main>` commit (`integration.lookup`).
|
|
309
|
+
Until the release has run, the close waits and the report names it as the step after the release.
|
|
272
310
|
|
|
273
311
|
Then, in one commit (`docs(roadmap): close <slug>`):
|
|
274
312
|
|
|
@@ -340,9 +378,35 @@ Rules:
|
|
|
340
378
|
Numbers are never reused. Under parallel work, the next number is the maximum over the main
|
|
341
379
|
branch and all worktrees, plus one.
|
|
342
380
|
|
|
343
|
-
## 8.
|
|
381
|
+
## 8. Operating modes: manual and autonomous
|
|
382
|
+
|
|
383
|
+
`mode` in `context/workflow.json` says who drives a project. It is a property of the project, set by
|
|
384
|
+
the owner: `softure-init` asks for it, and a missing key means `"manual"`.
|
|
385
|
+
|
|
386
|
+
- **manual**: the owner works through the chain with the agent and checks every step: each skill
|
|
387
|
+
separately, each implementation phase separately, every commit, merge and push on the owner's word.
|
|
388
|
+
- **autonomous**: the owner sets the goal and is away. The agent decides, commits, merges green work,
|
|
389
|
+
coordinates parallel sessions and reports on a clock, without asking.
|
|
390
|
+
|
|
391
|
+
The behavioural rules of each mode live in the project's `AGENTS.md` (the managed block from
|
|
392
|
+
`rules/AGENTS.md`). The installer injects **only the section of the active mode**
|
|
393
|
+
(`## Operating mode: manual` or `## Operating mode: autonomous`), whatever `install.rules` says, so a
|
|
394
|
+
manual project never carries autonomous instructions and every session, cloud ones included, reads
|
|
395
|
+
its mode's rules without being told. That block is the source of truth for §8.3 and §8.4; this
|
|
396
|
+
section defines the contract skills rely on.
|
|
397
|
+
|
|
398
|
+
**Switching mode** (only on the owner's explicit word): set `mode` in `context/workflow.json`, re-run
|
|
399
|
+
the installer (`npx softure-skills`, or `npm install`) so the `AGENTS.md` block follows, and commit both
|
|
400
|
+
as `docs(rules): switch to <mode> mode`.
|
|
344
401
|
|
|
345
|
-
|
|
402
|
+
**Precedence:** an explicit instruction of the owner in the conversation beats `mode` for that one
|
|
403
|
+
task. A flag passed to a skill beats `mode` for that invocation. Nothing from another project's
|
|
404
|
+
session, a memory or a coordinator's message widens what `mode` allows.
|
|
405
|
+
|
|
406
|
+
### 8.1 `--auto`
|
|
407
|
+
|
|
408
|
+
Every interactive skill accepts `--auto` (orchestrators always pass it; `mode: "autonomous"` implies
|
|
409
|
+
it for every skill). In `--auto`:
|
|
346
410
|
- never ask the user;
|
|
347
411
|
- take the recommended option;
|
|
348
412
|
- choose the safer option when risk is unclear;
|
|
@@ -353,6 +417,30 @@ Every interactive skill accepts `--auto` (orchestrators always pass it). In `--a
|
|
|
353
417
|
2. scope that contradicts change.md;
|
|
354
418
|
3. a missing secret or access the agent cannot obtain.
|
|
355
419
|
|
|
420
|
+
### 8.2 What skills read from `mode`
|
|
421
|
+
|
|
422
|
+
| | manual | autonomous |
|
|
423
|
+
|---|---|---|
|
|
424
|
+
| chain skills | interactive; `--auto` only when the owner passes it | `--auto` implied |
|
|
425
|
+
| after a skill finishes | name the next skill, stop | run the next step of the chain |
|
|
426
|
+
| `softure-implement` | one phase per run; commit only on the owner's approval of that phase | all phases, one commit per phase |
|
|
427
|
+
| `softure-worktree` READY | stop, merge on the owner's signal | merge (queue slot from the coordinator, if any) |
|
|
428
|
+
| `softure-worktree-manager` | owner confirms the batch and every merge | launches, merges, refills, reports by itself |
|
|
429
|
+
| push / PR / issue close / release | only on the owner's word for that action | §8.4 rules |
|
|
430
|
+
|
|
431
|
+
### 8.3 Manual mode
|
|
432
|
+
|
|
433
|
+
Defined in `rules/AGENTS.md` → `## Operating mode: manual`. In short: one step at a time, nothing
|
|
434
|
+
leaves the working tree without the owner's word, approvals never carry over to the next step.
|
|
435
|
+
|
|
436
|
+
### 8.4 Autonomous mode
|
|
437
|
+
|
|
438
|
+
Defined in `rules/AGENTS.md` → `## Operating mode: autonomous`: the standing consent, the
|
|
439
|
+
coordinator and its sessions, the merge queue, reports, issues as the work source, releases, and
|
|
440
|
+
the stop rules. `autonomy` in `workflow.json` (§2) tunes it per project. Project-specific standing
|
|
441
|
+
orders (a repo that is read-only, an extra label, a test that must not run per push) belong in the
|
|
442
|
+
project's own `AGENTS.md`, outside the managed block, not in a session's memory.
|
|
443
|
+
|
|
356
444
|
## 9. Commits
|
|
357
445
|
|
|
358
446
|
- Implementation: `<type>(<change-id>): <phase title> (p<N>)`. Type is `feat`, `fix`, `refactor`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softure-ai/skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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": {
|
package/rules/AGENTS.md
CHANGED
|
@@ -31,11 +31,173 @@ The full contract is in `node_modules/@softure-ai/skills/WORKFLOW.md`.
|
|
|
31
31
|
`softure-worktree-manager` runs several at once and merges them.
|
|
32
32
|
- **Any time:** `softure-code-review`, `softure-rule-review`, `softure-lesson`.
|
|
33
33
|
|
|
34
|
+
**Every change goes through the chain, however small.** A one-line fix reported in chat is a change
|
|
35
|
+
too (`roadmap_item: null`). `new`, `plan`, `plan-review`, `implement`, `impl-review` and `archive` are
|
|
36
|
+
never skipped. `research` and `frame` may be skipped only with a one-line reason under `## Notes` in
|
|
37
|
+
`change.md`. `research.md`, `plan.md` and `reviews/plan-review.md` exist before the first edit of
|
|
38
|
+
source code. Only the owner can waive this, for one named change, and only in manual mode.
|
|
39
|
+
|
|
40
|
+
**The project's operating mode** is `mode` in `context/workflow.json`: `manual` (also when the key is
|
|
41
|
+
missing) or `autonomous`. Its rules are the `## Operating mode` section below; it is the only mode
|
|
42
|
+
section in this block. Switch modes only on the owner's explicit word: set `mode`, re-run the installer
|
|
43
|
+
(`npx softure-skills`) so this block follows, commit both as `docs(rules): switch to <mode> mode`.
|
|
44
|
+
|
|
34
45
|
Execution state lives only in the `## Progress` section of `plan.md`. Commands, the main branch
|
|
35
46
|
and the artifact language come from `context/workflow.json`. Before building anything generic
|
|
36
47
|
(auth, mail, feature switches, billing, GDPR, analytics, UI primitives), check the
|
|
37
48
|
`@softure-ai/*` modules.
|
|
38
49
|
|
|
50
|
+
## Operating mode: manual
|
|
51
|
+
|
|
52
|
+
The owner checks every step. Go slowly and stop often: a step done without the owner's look is a
|
|
53
|
+
step the owner has to undo.
|
|
54
|
+
|
|
55
|
+
- **One skill per request.** Finish its artifact, show the result and name the next skill. Do not
|
|
56
|
+
start it. Chain skills ask their own questions; use `--auto` only when the owner passes it in this
|
|
57
|
+
request.
|
|
58
|
+
- **One implementation phase at a time.** After each phase show what passed, what to check, the
|
|
59
|
+
diff summary and the proposed commit message, then wait. Commit only when the owner approves this
|
|
60
|
+
phase's commit; the owner may also commit by hand (`softure-implement` records the SHA on the next
|
|
61
|
+
run). Never chain into the next phase or into a review on your own.
|
|
62
|
+
- **Nothing leaves the working tree without the owner's word for that exact action:** no merge into
|
|
63
|
+
the main branch, no push, no pull request, no closing of issues, no tag, release or deploy.
|
|
64
|
+
An approval covers one action. It never carries over to the next step or the next change.
|
|
65
|
+
- **No automation on your own:** no background sessions or threads, no scheduled routines, no
|
|
66
|
+
periodic reports, no parallel worktrees, unless the owner starts them. `softure-worktree` and
|
|
67
|
+
`softure-worktree-manager` run only when the owner invokes them, and then the manager shows its
|
|
68
|
+
batch before launching and asks before every merge.
|
|
69
|
+
- **Questions are welcome.** When a decision is the owner's (scope, product behaviour, naming, a
|
|
70
|
+
trade-off), ask with a recommendation instead of deciding silently.
|
|
71
|
+
- Rules of autonomous projects (standing merge consent, coordinators, report cadences) do not apply
|
|
72
|
+
here, even when a memory or another session suggests them.
|
|
73
|
+
|
|
74
|
+
## Operating mode: autonomous
|
|
75
|
+
|
|
76
|
+
The owner sets the goal and is away. **`mode: "autonomous"` in the committed project config is the
|
|
77
|
+
owner's standing consent** for everything below: deciding every question the chain asks (`--auto` is
|
|
78
|
+
implied for every skill), committing, pushing session branches, opening and merging pull requests,
|
|
79
|
+
resolving conflicts, closing the issues the work solves, starting and resolving sessions (threads),
|
|
80
|
+
and running report routines. It lives in the repository, so every session reads it here itself; it
|
|
81
|
+
is not consent relayed by another session. A coordinator's brief points to this section instead of
|
|
82
|
+
quoting chat messages. A production deploy is never covered (see Releases).
|
|
83
|
+
|
|
84
|
+
**Decide, don't ask.** Take the recommended option and record it under `## Decisions (auto)` in the
|
|
85
|
+
artifact. Small product decisions are yours: the owner trusts the recommendation and corrects it
|
|
86
|
+
later. Prefer the simplest solution that meets the intent. No decision cards, no "shall I…?", no
|
|
87
|
+
"waiting for the owner" for anything this section covers. Escalate only for: a destructive or
|
|
88
|
+
irreversible action nobody asked for, a secret or access only the owner has, scope that contradicts
|
|
89
|
+
`change.md`, a measurement that refutes the item's premise, or an idea for a new product or package
|
|
90
|
+
(tell the owner in the project chat to plan it together; file nothing).
|
|
91
|
+
|
|
92
|
+
**Coordinator and sessions.** When work runs in parallel (a cloud project chat with threads, or
|
|
93
|
+
`softure-worktree-manager` locally), one session coordinates:
|
|
94
|
+
- The coordinator plans, writes briefs, starts sessions, owns the merge queue and reports. It writes
|
|
95
|
+
no code: every fix, even one line, becomes a change in its own session.
|
|
96
|
+
- One session = one change (one issue). Very similar tiny items may share a session; items that touch
|
|
97
|
+
the same files go to the same session or wait. A planning session hands its result to the
|
|
98
|
+
coordinator and is closed. Before starting a session, check that the item has none yet.
|
|
99
|
+
- Run as many sessions as are parallel-safe; `worktree.maxParallel` is a soft default.
|
|
100
|
+
- **The roadmap keeps rolling:** the moment a merge unblocks an item, start its session. Never wait
|
|
101
|
+
for the rest of the wave.
|
|
102
|
+
- A brief names the item ID and change-id, the outcome, the base branch, the files it owns, what it
|
|
103
|
+
waits for, the merge path below, what to report back, and "follow AGENTS.md → Operating mode:
|
|
104
|
+
autonomous". Project-specific standing orders are appended.
|
|
105
|
+
- **Session hygiene:** a session whose change is merged and archived is marked resolved at once
|
|
106
|
+
(`set_thread_resolved` or the harness's equivalent). No standing sessions: the board shows only
|
|
107
|
+
live work. A session stays open only while an owner action gates its result. Stalled sessions
|
|
108
|
+
(waiting on CI, stopped by a usage limit) are nudged on every report.
|
|
109
|
+
- A new question about the roadmap goes to a new session; the old one is closed.
|
|
110
|
+
- After every finished session the coordinator states the concrete result in the project chat: what
|
|
111
|
+
changed, the pull request, the merge SHA, the released version if any.
|
|
112
|
+
|
|
113
|
+
**Merging.**
|
|
114
|
+
- A session reports READY to the coordinator and waits for its go. Merges are serial, first ready
|
|
115
|
+
first merged. Without a coordinator the session merges itself at READY. A ready merge never waits
|
|
116
|
+
for the owner, and no report says "waiting for the owner's merge".
|
|
117
|
+
- Right before merging, merge the fresh main branch into the branch and resolve conflicts yourself.
|
|
118
|
+
The main branch is the source of truth: what it has and the branch lacks is pulled in and wired.
|
|
119
|
+
- `autonomy.merge: "pr"` (default): open a pull request (`Closes #N` when it solves an issue), wait for
|
|
120
|
+
green checks, merge it on the forge; the forge deletes the head branch. `"push"`: `git merge --no-ff`
|
|
121
|
+
locally, then push the main branch through the pre-push hook.
|
|
122
|
+
- When one session has had to chase the main branch several times, the coordinator tells the others
|
|
123
|
+
to hold their merges until it lands.
|
|
124
|
+
- Hooks stay on: never `--no-verify`, never force-push, never disable or loosen a test to get green.
|
|
125
|
+
Long hooks run in the background with the longest timeout; a hung one is killed by its PID and
|
|
126
|
+
re-run.
|
|
127
|
+
- The main branch is already tested: do not re-run gates on it to review it. The full integration
|
|
128
|
+
suite runs per `integration.cadence`, never per push.
|
|
129
|
+
|
|
130
|
+
**Reports** (coordinator, in the project chat, in `language` and `timezone`):
|
|
131
|
+
- when: after every batch of session starts, and every `autonomy.reports.every` minutes (default 30)
|
|
132
|
+
at fixed marks (:00, :30) inside `autonomy.reports.hours`, only while work runs. Each report
|
|
133
|
+
schedules the next one; stop the chain when nothing runs. After a pause (usage limit) name the
|
|
134
|
+
reports that were skipped.
|
|
135
|
+
- shape, the same in every project: a title line, a progress line, **one table with every item of
|
|
136
|
+
the roadmap or issue wave** (not only the running ones), then three short lines. Columns, always
|
|
137
|
+
these four, in this order (headers in `language`, e.g. Polish `ID | Co robi | Etap | Link`):
|
|
138
|
+
- **ID**: the roadmap item ID, an uppercase prefix of two or three letters plus a number (`FC-5`,
|
|
139
|
+
`SA-12`, `CMP-3`); in issue mode the issue number (`#42`). Bold, nothing else in the cell.
|
|
140
|
+
- **What it does**: the outcome in a few words, for someone who did not read the roadmap.
|
|
141
|
+
- **Stage**: one of `waiting for <IDs>`, `research`, `frame`, `plan`, `plan-review`,
|
|
142
|
+
`implement N/M`, `impl-review`, `integration`, `archive`, `ready to merge (PR #N)`,
|
|
143
|
+
`merging (PR #N)`, `on <main> @ <sha>`, `released <version>`, `blocked (<why>)`; add `stalled`
|
|
144
|
+
when the session has not moved since the last report.
|
|
145
|
+
- **Link**: a markdown link to the session (thread) that carries the item, `[session](<url>)`;
|
|
146
|
+
`—` when it has none. Never a forge URL: the PR number lives in Stage.
|
|
147
|
+
- example (every 30 minutes, coordinator of a project with roadmap prefix `SA`):
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
**Roadmap report softure-auth, 14:30 (Europe/Warsaw)**
|
|
151
|
+
Progress: 3 of 6 on master, 2 running, 1 waiting
|
|
152
|
+
|
|
153
|
+
| ID | What it does | Stage | Link |
|
|
154
|
+
| --- | --- | --- | --- |
|
|
155
|
+
| **SA-1** | Shared core and database layer | on master @ `4f2c1ab` | — |
|
|
156
|
+
| **SA-2** | Health checks from the ops module | on master @ `9d0e771` | — |
|
|
157
|
+
| **SA-3** | UI theme tokens from the package | on master @ `b81c0de` | — |
|
|
158
|
+
| **SA-4** | Security headers and rate limits | implement 2/3 | [session](https://claude.ai/code/session_01AbC) |
|
|
159
|
+
| **SA-5** | Login and sessions from the auth module | ready to merge (PR #36) | [session](https://claude.ai/code/session_01DeF) |
|
|
160
|
+
| **SA-6** | Registration switch through feature switches | waiting for SA-5 | — |
|
|
161
|
+
|
|
162
|
+
Merged since the last report: SA-3 (PR #35, `b81c0de`).
|
|
163
|
+
Next to merge: SA-5, then SA-4. SA-6 starts right after SA-5 lands.
|
|
164
|
+
Next report: 15:00.
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Nothing moved since the last report: one line (`14:30, no change: SA-4 implement 2/3, SA-5 ready
|
|
168
|
+
to merge`).
|
|
169
|
+
|
|
170
|
+
**Issues as the work source** (`autonomy.source: "issues"`, no roadmap):
|
|
171
|
+
- The coordinator lists open issues (through a session when it has no forge access). Not well-founded:
|
|
172
|
+
comment why, label `invalid`, close. Well-founded: one change, one session.
|
|
173
|
+
- Label `status: in progress` at start and `status: blocked` when blocked; remove them on close.
|
|
174
|
+
- After the merge, comment point by point (what changed, PR, merge SHA, `context/archive/<date>-<id>/`,
|
|
175
|
+
the version or "next release") and close the issue as completed. A partly solved issue gets a
|
|
176
|
+
comment listing what is done and what stays open, and stays open.
|
|
177
|
+
- Before starting new work, look for open issues that earlier merges already solved.
|
|
178
|
+
- A well-founded, non-duplicate gap found while working (here, or in an upstream `@softure-ai/*`
|
|
179
|
+
module) is filed as an issue right away.
|
|
180
|
+
- Public text (issues, pull requests, commits, docs) stays neutral: no personal references, no names
|
|
181
|
+
of private projects (write "an adopting app").
|
|
182
|
+
|
|
183
|
+
**Releases.** With `release.owner: true` nothing is tagged, published or deployed: work ends
|
|
184
|
+
`done_code` with the owner's steps under `## Before the next release`, and a release follows only the
|
|
185
|
+
owner's word for that release. With `release.owner: false` the coordinator releases once per wave
|
|
186
|
+
through the project's own pipeline (version-bump pull request → merge → the pipeline publishes); with
|
|
187
|
+
several sessions on one package, the last to merge releases. No manual tags, no moved tags; a failed
|
|
188
|
+
release is fixed forward with a patch bump. A production deploy always needs the owner's separate word. Ad-hoc fixes
|
|
189
|
+
ride the next release instead of getting one of their own, unless the owner says otherwise.
|
|
190
|
+
|
|
191
|
+
**Stop and limits.** "Stop" or "pause" from the owner stops everything: no new sessions, report
|
|
192
|
+
routines removed, open sessions finished or stopped at a safe point; record the pause in memory and do
|
|
193
|
+
not resume until the owner says so. After a usage limit, verify the real state first (main branch,
|
|
194
|
+
pull requests, CI, releases, issues), then nudge the interrupted sessions. If the harness refuses a
|
|
195
|
+
push, merge or publish this section covers, cite this section and `mode` once; if it still refuses,
|
|
196
|
+
ask the owner for a word in that session and keep the other work going.
|
|
197
|
+
|
|
198
|
+
**Memory** holds only project state (queue, IDs, the owner's specific orders and decisions). The rules
|
|
199
|
+
above are not memory material.
|
|
200
|
+
|
|
39
201
|
## Conventions
|
|
40
202
|
|
|
41
203
|
**Code**
|
package/scripts/install.mjs
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
// Per-project choices live in context/workflow.json -> "install" (all optional):
|
|
11
11
|
// "gitignore": false commit the installed skills instead of ignoring them
|
|
12
12
|
// "rules": ["workflow", ...] rule sections to inject; default: every section in RULE_SECTIONS
|
|
13
|
+
// The top-level "mode" ("manual" by default, or "autonomous") picks the one "## Operating mode: <mode>"
|
|
14
|
+
// section that is always injected, whatever "rules" says.
|
|
13
15
|
|
|
14
16
|
import fs from "node:fs";
|
|
15
17
|
import path from "node:path";
|
|
@@ -25,6 +27,10 @@ const GITIGNORE_END = "# softure-skills:end";
|
|
|
25
27
|
const WORKFLOW_CONFIG_PATH = path.join("context", "workflow.json");
|
|
26
28
|
// Section key -> heading prefix in rules/AGENTS.md. The text before the first section always ships.
|
|
27
29
|
const RULE_SECTIONS = { language: "## Language", workflow: "## How work flows", conventions: "## Conventions" };
|
|
30
|
+
// Mode sections: exactly one of them ships, chosen by workflow.json -> "mode".
|
|
31
|
+
const MODE_HEADING = "## Operating mode: ";
|
|
32
|
+
const MODES = ["manual", "autonomous"];
|
|
33
|
+
const DEFAULT_MODE = "manual";
|
|
28
34
|
|
|
29
35
|
function parseArgs(argv) {
|
|
30
36
|
const options = { isPostinstall: false, isDryRun: false, target: null, shouldIgnore: true };
|
|
@@ -51,17 +57,30 @@ function readManifest(projectRoot) {
|
|
|
51
57
|
return JSON.parse(fs.readFileSync(file, "utf8"));
|
|
52
58
|
}
|
|
53
59
|
|
|
54
|
-
function
|
|
60
|
+
function readWorkflowConfig(projectRoot) {
|
|
55
61
|
const file = path.join(projectRoot, WORKFLOW_CONFIG_PATH);
|
|
56
62
|
if (!fs.existsSync(file)) return {};
|
|
57
63
|
try {
|
|
58
64
|
const config = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
59
|
-
return config && typeof config
|
|
65
|
+
return config && typeof config === "object" ? config : {};
|
|
60
66
|
} catch (error) {
|
|
61
67
|
throw new Error(`cannot parse ${WORKFLOW_CONFIG_PATH}: ${error instanceof Error ? error.message : String(error)}`);
|
|
62
68
|
}
|
|
63
69
|
}
|
|
64
70
|
|
|
71
|
+
function getInstallConfig(workflowConfig) {
|
|
72
|
+
const { install } = workflowConfig;
|
|
73
|
+
return typeof install === "object" && install !== null ? install : {};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function resolveMode(workflowConfig) {
|
|
77
|
+
if (workflowConfig.mode === undefined || workflowConfig.mode === null) return DEFAULT_MODE;
|
|
78
|
+
if (!MODES.includes(workflowConfig.mode)) {
|
|
79
|
+
throw new Error(`${WORKFLOW_CONFIG_PATH}: unknown mode "${workflowConfig.mode}" (known: ${MODES.join(", ")})`);
|
|
80
|
+
}
|
|
81
|
+
return workflowConfig.mode;
|
|
82
|
+
}
|
|
83
|
+
|
|
65
84
|
function resolveRuleSections(installConfig) {
|
|
66
85
|
if (installConfig.rules === undefined) return Object.keys(RULE_SECTIONS);
|
|
67
86
|
if (!Array.isArray(installConfig.rules)) throw new Error(`${WORKFLOW_CONFIG_PATH}: install.rules must be an array`);
|
|
@@ -72,11 +91,13 @@ function resolveRuleSections(installConfig) {
|
|
|
72
91
|
return installConfig.rules;
|
|
73
92
|
}
|
|
74
93
|
|
|
75
|
-
// Keeps the preamble
|
|
76
|
-
|
|
94
|
+
// Keeps the preamble, the "## " sections whose key is selected and the section of the active mode;
|
|
95
|
+
// drops the rest.
|
|
96
|
+
function selectRuleSections(rules, selectedKeys, mode = DEFAULT_MODE) {
|
|
77
97
|
const parts = rules.split(/\n(?=## )/);
|
|
78
98
|
const kept = parts.filter((part, index) => {
|
|
79
99
|
if (index === 0 && !part.startsWith("## ")) return true;
|
|
100
|
+
if (part.startsWith(MODE_HEADING)) return part.startsWith(`${MODE_HEADING}${mode}`);
|
|
80
101
|
const key = Object.keys(RULE_SECTIONS).find((candidate) => part.startsWith(RULE_SECTIONS[candidate]));
|
|
81
102
|
return key === undefined || selectedKeys.includes(key);
|
|
82
103
|
});
|
|
@@ -113,8 +134,10 @@ function install(options) {
|
|
|
113
134
|
}
|
|
114
135
|
|
|
115
136
|
const previous = readManifest(projectRoot);
|
|
116
|
-
const
|
|
137
|
+
const workflowConfig = readWorkflowConfig(projectRoot);
|
|
138
|
+
const installConfig = getInstallConfig(workflowConfig);
|
|
117
139
|
const ruleSections = resolveRuleSections(installConfig);
|
|
140
|
+
const mode = resolveMode(workflowConfig);
|
|
118
141
|
const shouldIgnore = options.shouldIgnore && installConfig.gitignore !== false;
|
|
119
142
|
const skills = listPackageSkills();
|
|
120
143
|
const skillsRoot = path.join(projectRoot, ".claude", "skills");
|
|
@@ -144,10 +167,10 @@ function install(options) {
|
|
|
144
167
|
const claudeFile = path.join(projectRoot, "CLAUDE.md");
|
|
145
168
|
const rulesTarget = fs.existsSync(agentsFile) || !fs.existsSync(claudeFile) ? agentsFile : claudeFile;
|
|
146
169
|
if (fs.existsSync(rulesSource)) {
|
|
147
|
-
actions.push(`rules block (${ruleSections.join(", ")}) -> ${path.relative(projectRoot, rulesTarget)}`);
|
|
170
|
+
actions.push(`rules block (${ruleSections.join(", ")}; mode: ${mode}) -> ${path.relative(projectRoot, rulesTarget)}`);
|
|
148
171
|
if (!options.isDryRun) {
|
|
149
172
|
const existing = fs.existsSync(rulesTarget) ? fs.readFileSync(rulesTarget, "utf8") : "";
|
|
150
|
-
const rules = selectRuleSections(fs.readFileSync(rulesSource, "utf8"), ruleSections);
|
|
173
|
+
const rules = selectRuleSections(fs.readFileSync(rulesSource, "utf8"), ruleSections, mode);
|
|
151
174
|
fs.writeFileSync(rulesTarget, replaceManagedBlock(existing, BLOCK_BEGIN, BLOCK_END, rules));
|
|
152
175
|
}
|
|
153
176
|
}
|
|
@@ -178,6 +201,7 @@ function install(options) {
|
|
|
178
201
|
skills: installed,
|
|
179
202
|
rulesTarget: path.relative(projectRoot, rulesTarget),
|
|
180
203
|
rules: ruleSections,
|
|
204
|
+
mode,
|
|
181
205
|
gitignore: shouldIgnore,
|
|
182
206
|
};
|
|
183
207
|
// A re-install that changes nothing keeps the old timestamp, so a committed manifest
|
|
@@ -131,6 +131,8 @@ to every orchestrator and blocks closing the roadmap. When there is no `plan.md`
|
|
|
131
131
|
|
|
132
132
|
## --auto
|
|
133
133
|
|
|
134
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
135
|
+
|
|
134
136
|
Proceed on soft warnings. Record each one in the archive commit body and in the roadmap owner
|
|
135
137
|
checks. Pick `done_code` whenever any Manual item is open or the change affects deployment
|
|
136
138
|
(migrations, env vars, infrastructure). Hard stops stay stops: report them all and end.
|
|
@@ -148,6 +148,8 @@ Print the report in the chat. When a change-id is given, also write it to `revie
|
|
|
148
148
|
|
|
149
149
|
## --auto
|
|
150
150
|
|
|
151
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
152
|
+
|
|
151
153
|
Behave as with `--fix`: apply every violation (Critical or Warning) that has a local, mechanical
|
|
152
154
|
fix, leave Suggestions unapplied, and record what was applied and what was left in `## Fixes
|
|
153
155
|
applied`. Ask nothing. A NEEDS DISCUSSION question is answered with the safer option and recorded
|
|
@@ -166,6 +166,8 @@ read `references/examples.md` **before writing your first frame.md in a repo**.
|
|
|
166
166
|
|
|
167
167
|
## `--auto`
|
|
168
168
|
|
|
169
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
170
|
+
|
|
169
171
|
- No questions at any step. Narrowing questions are answered from evidence; the decision
|
|
170
172
|
question takes the recommendation. Record each under `## Decisions (auto)`.
|
|
171
173
|
- Choose the smallest option that still meets change.md's `## Intent`.
|
|
@@ -170,6 +170,8 @@ Files: planned and changed N · unplanned N (…) · planned, not changed N (…
|
|
|
170
170
|
|
|
171
171
|
## --auto
|
|
172
172
|
|
|
173
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
174
|
+
|
|
173
175
|
- CRITICAL and WARNING findings that have a clear local fix: `fix now` (the recommended option).
|
|
174
176
|
- Fixes that need a product decision: `defer` to the roadmap "Owner decisions and checks"
|
|
175
177
|
list, with the finding ID.
|
|
@@ -178,7 +180,7 @@ Files: planned and changed N · unplanned N (…) · planned, not changed N (…
|
|
|
178
180
|
also `record as lesson`.
|
|
179
181
|
- No questions, no before/after confirmation. Each decision also goes under `## Decisions (auto)`.
|
|
180
182
|
- If a CRITICAL cannot be fixed without leaving the change's scope, stop and escalate
|
|
181
|
-
(WORKFLOW §8.
|
|
183
|
+
(WORKFLOW §8.1).
|
|
182
184
|
|
|
183
185
|
`--no-fix` (either mode): write the report with recommended decisions as
|
|
184
186
|
`**Decision:** pending (recommended: …)`, apply nothing, leave the status unchanged. Resume with
|
|
@@ -137,7 +137,8 @@ mandatory; stop with an error.
|
|
|
137
137
|
without this option.
|
|
138
138
|
|
|
139
139
|
When the user asked for several phases at once, skip the question between them. `--auto`:
|
|
140
|
-
continue until all phases are done or an escalation is hit.
|
|
140
|
+
continue until all phases are done or an escalation is hit. Manual mode: stop after the phase
|
|
141
|
+
(see "Manual mode" below).
|
|
141
142
|
|
|
142
143
|
10. **Finish.** When every Automated item is ticked:
|
|
143
144
|
- re-scan Progress and list any open item as `N.M text`, grouped Automated / Manual. An open
|
|
@@ -165,8 +166,28 @@ Use the format in `softure-plan/references/progress-format.md`:
|
|
|
165
166
|
- `plan_reviewed` → `implementing` at the start of the first phase.
|
|
166
167
|
- `implementing` → `implemented` once every Automated item is ticked.
|
|
167
168
|
|
|
169
|
+
## Manual mode (`mode: "manual"` or no key, and no `--auto`)
|
|
170
|
+
|
|
171
|
+
The owner checks every phase separately and commits by hand or on an explicit word. This narrows
|
|
172
|
+
steps 7 to 9:
|
|
173
|
+
|
|
174
|
+
- **One phase per run**, even when more remain, unless the owner names several phases in this
|
|
175
|
+
request.
|
|
176
|
+
- **The gate always shows**, with or without open Manual items: what passed, what you verified and
|
|
177
|
+
how, what the owner should check, `git diff --stat` of the touched-file set, and the proposed commit
|
|
178
|
+
message. Options: "Commit" / "I'll commit it myself" / "Change something".
|
|
179
|
+
- **Commit only on "Commit" for this phase.** An approval of an earlier phase or a general "go ahead"
|
|
180
|
+
does not cover this one. "I'll commit it myself": stage the touched-file set by path, so the owner sees
|
|
181
|
+
exactly what belongs to the phase, and stop; the next run's resume check (`references/phase-commit.md`) finds the commit
|
|
182
|
+
and writes its SHA into Progress.
|
|
183
|
+
- **After the phase: stop.** Report the phase and name the next step (`softure-implement <change-id>
|
|
184
|
+
next` or `softure-impl-review <change-id> phase N`). Do not start it.
|
|
185
|
+
- Never push, never open a pull request.
|
|
186
|
+
|
|
168
187
|
## `--auto`
|
|
169
188
|
|
|
189
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
190
|
+
|
|
170
191
|
- Never ask. Run all remaining phases in order, with no manual gate and no question between phases.
|
|
171
192
|
- Apply small drift and record it under `## Decisions (auto)` in plan.md.
|
|
172
193
|
- Stage only files you touched for this change. A dirty path the phase's own commands produced
|
|
@@ -8,7 +8,7 @@ description: >
|
|
|
8
8
|
keys. Use once per repo before any other softure-* skill, or when a skill reports a missing
|
|
9
9
|
`context/workflow.json`. Triggers: "init the workflow", "set up context", "softure init",
|
|
10
10
|
"prepare the repo for the skills".
|
|
11
|
-
argument-hint: "[--language pl|en] [--dry-run] [--auto]"
|
|
11
|
+
argument-hint: "[--language pl|en] [--mode manual|autonomous] [--dry-run] [--auto]"
|
|
12
12
|
allowed-tools:
|
|
13
13
|
- Read
|
|
14
14
|
- Glob
|
|
@@ -37,7 +37,7 @@ start any work: no change, PRD or roadmap is created here.
|
|
|
37
37
|
|
|
38
38
|
1. **Inventory what exists.** List `context/` recursively, if present. Record each file that
|
|
39
39
|
already exists. You will not touch these, apart from adding missing keys to
|
|
40
|
-
`workflow.json` (step
|
|
40
|
+
`workflow.json` (step 6). Unknown keys in an existing `workflow.json` are kept as they are.
|
|
41
41
|
2. **Detect the stack.** Read these, and only these, to fill the config:
|
|
42
42
|
- `package.json` -> `scripts`. Map the gates:
|
|
43
43
|
- typecheck: the script that runs `tsc`, otherwise `npx tsc --noEmit` when `tsconfig.json` exists.
|
|
@@ -64,12 +64,19 @@ start any work: no change, PRD or roadmap is created here.
|
|
|
64
64
|
3. **Pick the language.** Use `--language` when given. Otherwise use the language of the
|
|
65
65
|
existing docs/README; if mixed, use the language the user is writing in. In `--auto`
|
|
66
66
|
without a signal, use `en`.
|
|
67
|
-
4. **
|
|
67
|
+
4. **Pick the operating mode** (WORKFLOW §8). Use `--mode` when given, or what the user already
|
|
68
|
+
said ("this project is autonomous", "we run it by hand"). Otherwise, interactive: ask "How is
|
|
69
|
+
this project run?" with the options **manual** (recommended: the owner checks every step,
|
|
70
|
+
commits and merges by hand; client projects) and **autonomous** (the agent decides, merges green
|
|
71
|
+
work, coordinates parallel sessions and reports every 30 minutes). In `--auto` without a signal,
|
|
72
|
+
use `manual`. An existing `mode` is never changed here; switching is the owner's explicit call
|
|
73
|
+
(WORKFLOW §8, "Switching mode").
|
|
74
|
+
5. **Show the plan.** Without `--auto`, print the proposed tree and the full `workflow.json`,
|
|
68
75
|
marking each value as *read* (found literally) or *inferred* (derived), then ask one
|
|
69
76
|
question: "Create this? (Recommended: yes)". Offer the options yes / edit a value / cancel.
|
|
70
77
|
Name applicable optional keys (below) in one line, without asking about each. `--auto`
|
|
71
78
|
skips the question; `--dry-run` stops here in both modes.
|
|
72
|
-
|
|
79
|
+
6. **Write only what is missing:**
|
|
73
80
|
- `context/workflow.json`: new file, or only the missing keys merged into an existing one.
|
|
74
81
|
Never change an existing value.
|
|
75
82
|
- `context/foundation/README.md` and an empty `context/foundation/lessons.md` (`# Lessons` +
|
|
@@ -78,11 +85,11 @@ start any work: no change, PRD or roadmap is created here.
|
|
|
78
85
|
(templates in `references/templates.md`).
|
|
79
86
|
- Do **not** create `shape-notes.md`, `prd.md`, `roadmap.md`, `roadmaps/`, change folders
|
|
80
87
|
or empty directories. Their skills create them on first use.
|
|
81
|
-
|
|
88
|
+
7. **Verify.** Re-read `workflow.json` and check that it parses as JSON. For every gate
|
|
82
89
|
command, check that the referenced script exists in `package.json` (or that the binary is
|
|
83
90
|
on PATH). Mark any gate you could not resolve as `null`, never as a guess. Re-running the
|
|
84
91
|
detection must now produce no new writes.
|
|
85
|
-
|
|
92
|
+
8. **Report** a status block, one line per artifact (`created`, `present` or `merged: <keys>`),
|
|
86
93
|
then the unresolved values the owner should fill in, every inferred value with its reason,
|
|
87
94
|
and the next step. Then stop: do not chain into other skills.
|
|
88
95
|
|
|
@@ -92,6 +99,7 @@ Required keys and the ones init writes by default:
|
|
|
92
99
|
|
|
93
100
|
```json
|
|
94
101
|
{
|
|
102
|
+
"mode": "manual",
|
|
95
103
|
"language": "en",
|
|
96
104
|
"mainBranch": "main",
|
|
97
105
|
"gates": { "typecheck": null, "lint": null, "test": null },
|
|
@@ -102,6 +110,9 @@ Required keys and the ones init writes by default:
|
|
|
102
110
|
}
|
|
103
111
|
```
|
|
104
112
|
|
|
113
|
+
`mode` is `"manual"` or `"autonomous"` (step 4). After writing it, run the installer once
|
|
114
|
+
(`npx softure-skills`, or `node node_modules/@softure-ai/skills/scripts/install.mjs` when the package
|
|
115
|
+
is installed) so the `AGENTS.md` block carries that mode's rules, and list it in the report.
|
|
105
116
|
`migrations` is either `null` or `{ "dir", "pattern", "regenerate" }`. Keep `release.owner: true`
|
|
106
117
|
unless the user explicitly says otherwise. Skills never release or deploy on their own.
|
|
107
118
|
|
|
@@ -112,9 +123,12 @@ only when it was detected or the user asked for it:
|
|
|
112
123
|
|---|---|---|
|
|
113
124
|
| `timezone` | the machine's zone | the user names a zone |
|
|
114
125
|
| `integration.cadence` | `"change"` (every change runs the suite before archive) | the user wants one run per roadmap (`"roadmap"`) |
|
|
126
|
+
| `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 |
|
|
127
|
+
| `integration.coveredByRelease` | `false` | the release pipeline runs the same full suite on the released commit |
|
|
115
128
|
| `worktree.cloudState` | `"main"` | the user runs cloud sessions that must keep state on the branch (`"branch"`) |
|
|
116
129
|
| `research.sources` | none | step 2 found docs, ADRs or a PRD (interactive: listed in the plan; `--auto`: only paths that exist) |
|
|
117
130
|
| `install` | gitignore the skills, inject all rule sections | the user wants committed skills or fewer rule sections |
|
|
131
|
+
| `autonomy` | roadmap as the work source, merge via pull request, reports every 30 min | `mode` is `autonomous` and the user names issues as the queue, merges by push, or another report cadence |
|
|
118
132
|
|
|
119
133
|
Content of the README files, and a complete worked example (detection, plan, report) for a
|
|
120
134
|
fictional repo: read `references/templates.md` **when writing the READMEs** and
|
|
@@ -122,6 +136,8 @@ fictional repo: read `references/templates.md` **when writing the READMEs** and
|
|
|
122
136
|
|
|
123
137
|
## `--auto`
|
|
124
138
|
|
|
139
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
140
|
+
|
|
125
141
|
Detect, write and report without asking. Record every value you inferred (rather than read
|
|
126
142
|
directly) in the report, e.g. `- mainBranch -> master (origin/HEAD missing; local master exists)`.
|
|
127
143
|
Optional keys other than `research.sources` are never written in `--auto`.
|
|
@@ -98,6 +98,8 @@ the Applies to is specific enough**.
|
|
|
98
98
|
|
|
99
99
|
## --auto
|
|
100
100
|
|
|
101
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
102
|
+
|
|
101
103
|
- No questions and no confirmation: take the facts from the review finding or the caller's draft.
|
|
102
104
|
- Skip writing when step "What qualifies" fails, and report the skip in one line.
|
|
103
105
|
- On a number collision found later (merge with another worktree), renumber the newer lesson,
|
|
@@ -171,6 +171,8 @@ Dates come from `date +%Y-%m-%d` (in `workflow.json` → `timezone` when set). I
|
|
|
171
171
|
|
|
172
172
|
## `--auto`
|
|
173
173
|
|
|
174
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
175
|
+
|
|
174
176
|
- Never ask. Derive the id from the roadmap item or the description.
|
|
175
177
|
- If the id clashes, append the first free numeric suffix (`-2`, `-3`, …) and record the choice
|
|
176
178
|
under `## Notes` as `- Decision (auto): id <x> taken → <y>`.
|
|
@@ -246,6 +246,8 @@ them, never an extra `##` heading.
|
|
|
246
246
|
|
|
247
247
|
## `--auto`
|
|
248
248
|
|
|
249
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
250
|
+
|
|
249
251
|
- Skip every confirmation (complexity, approach, outline, final iteration). Take the
|
|
250
252
|
recommended option for every probing question and record it under `## Decisions (auto)` as
|
|
251
253
|
`- <question> → <choice> (<reason>)`.
|
|
@@ -235,6 +235,8 @@ Allowed decisions: `Fix now (applied[, Fix A|B])`, `Accept risk`, `Defer`, `Dism
|
|
|
235
235
|
|
|
236
236
|
## `--auto`
|
|
237
237
|
|
|
238
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
239
|
+
|
|
238
240
|
- Do not ask; never save for later. Decide each finding yourself:
|
|
239
241
|
- CRITICAL and WARNING findings with a clear fix → **Fix now**; with two fixes, the
|
|
240
242
|
recommended one;
|
|
@@ -148,6 +148,8 @@ this ASCII form whatever the language.
|
|
|
148
148
|
|
|
149
149
|
## `--auto`
|
|
150
150
|
|
|
151
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
152
|
+
|
|
151
153
|
Write only what the input supports, and never ask:
|
|
152
154
|
- draft shape notes or a low input-check score: proceed, record it under
|
|
153
155
|
`## Decisions (auto)`;
|
|
@@ -171,6 +171,8 @@ unsure how much detail a section needs.
|
|
|
171
171
|
|
|
172
172
|
## `--auto`
|
|
173
173
|
|
|
174
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
175
|
+
|
|
174
176
|
- No scope question (step 2). Choose the depth from the risk profile. Use `deep` whenever money,
|
|
175
177
|
data migration, auth or deletion is involved.
|
|
176
178
|
- Resolve questions by evidence first, then by the safer option. Record each choice under
|
|
@@ -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
|
-
|
|
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
|
|
@@ -246,6 +250,8 @@ table header in English, because scripts parse them.
|
|
|
246
250
|
|
|
247
251
|
## `--auto`
|
|
248
252
|
|
|
253
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
254
|
+
|
|
249
255
|
Never ask. In place of each question:
|
|
250
256
|
- thin PRD → proceed as `status: draft`, thin items `blocked (PRD gap: …)`;
|
|
251
257
|
- baseline → use the probes unconfirmed;
|
|
@@ -150,6 +150,8 @@ in a repo**.
|
|
|
150
150
|
|
|
151
151
|
## --auto
|
|
152
152
|
|
|
153
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
154
|
+
|
|
153
155
|
Apply only edits that cannot change behaviour:
|
|
154
156
|
- fixing stale paths to their verified current location;
|
|
155
157
|
- removing exact duplicates and leaving a pointer;
|
|
@@ -196,6 +196,8 @@ read `references/example-shape-notes.md` before drafting.
|
|
|
196
196
|
|
|
197
197
|
## `--auto`
|
|
198
198
|
|
|
199
|
+
`mode: "autonomous"` in `context/workflow.json` implies `--auto` for every run of this skill; `mode: "manual"` (or no key) never does (WORKFLOW §8).
|
|
200
|
+
|
|
199
201
|
Without a user to ask, shape only from the inputs:
|
|
200
202
|
- context type: the detected one; resume: always continue a draft;
|
|
201
203
|
- every section the inputs do not support gets `UNKNOWN: <what would answer it>` instead of
|
|
@@ -104,6 +104,38 @@ coordinator); a push of `<main>` only as Phase B or the roadmap header says.
|
|
|
104
104
|
> explicit signal in the conversation or the goal text itself saying "merge
|
|
105
105
|
> without asking". Do not let a stop hook push you into phase B.
|
|
106
106
|
|
|
107
|
+
## Operating mode — who gives the merge signal
|
|
108
|
+
|
|
109
|
+
Read `mode` at A0 (`python3 <S>/wt_config.py mode`; WORKFLOW §8, the project's
|
|
110
|
+
`AGENTS.md` → `## Operating mode`). Phase A is the same in both modes. The gate is not:
|
|
111
|
+
|
|
112
|
+
- **`manual`** (or no key): everything in this file as written. READY ends the
|
|
113
|
+
turn; Phase B only on the owner's explicit signal in this conversation; no
|
|
114
|
+
push of `<main>` unless the owner asks for it.
|
|
115
|
+
- **`autonomous`**: the committed `mode` is the owner's **standing merge
|
|
116
|
+
signal**. It lives in the repository, so it is not consent relayed by another
|
|
117
|
+
session. At READY:
|
|
118
|
+
1. launched by a coordinator (the prompt or the brief names one): send the
|
|
119
|
+
READY report to the coordinator and wait for its go. The go is your slot in
|
|
120
|
+
the serial merge queue, not the consent. Keep the session alive meanwhile;
|
|
121
|
+
2. no coordinator: go straight on;
|
|
122
|
+
3. then Phase B by `autonomy.merge`:
|
|
123
|
+
- `"pr"` (default): `git fetch origin <main>`, merge `origin/<main>` into the
|
|
124
|
+
branch (A5 again if it moved), push the branch, open a pull request
|
|
125
|
+
(`Closes #N` when the change solves an issue), wait for green checks, merge
|
|
126
|
+
it on the forge (`gh pr merge <N> --merge`; the forge deletes the head
|
|
127
|
+
branch), confirm `origin/<main>` contains it, then the local cleanup of
|
|
128
|
+
step 5. A red check is fixed on the branch, never bypassed;
|
|
129
|
+
- `"push"`: Phase B as written, then push `<main>` through the pre-push hook
|
|
130
|
+
(step 6's "no push" does not apply). A rejected push → fetch, merge
|
|
131
|
+
`origin/<main>`, push again;
|
|
132
|
+
4. report the merge (SHA, PR) to the coordinator or the project chat, and
|
|
133
|
+
close the session's thread when the harness has one.
|
|
134
|
+
|
|
135
|
+
Still never, in this mode too: `--no-verify`, a force push, a tag or release
|
|
136
|
+
while `release.owner` is true, a production deploy, merging a branch that is
|
|
137
|
+
not this run's change.
|
|
138
|
+
|
|
107
139
|
## Cloud session (Claude Code on the web) — branch instead of worktree
|
|
108
140
|
|
|
109
141
|
**Detect it first, in A0:** `[ "$CLAUDE_CODE_REMOTE" = true ]`. When it holds,
|
|
@@ -192,7 +224,9 @@ branch at least at READY (`git push -u origin HEAD`) — the container is
|
|
|
192
224
|
reclaimed after inactivity, and a pushed branch is the copy that survives it.
|
|
193
225
|
`<main>` still changes only by the merge on the owner's signal (point 7). The
|
|
194
226
|
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.
|
|
227
|
+
— minutes of silence, expected; never bypass it. Every push may also start the
|
|
228
|
+
project's CI on origin: push at READY and to sync before the merge, **never per
|
|
229
|
+
phase or per commit** (WORKFLOW §2, CI minutes).
|
|
196
230
|
|
|
197
231
|
**6. READY.** A3.8 runs before A4, as locally (unless the cadence defers it).
|
|
198
232
|
A5 merges `origin/<main>` (after `git fetch origin <main>`), not the local one.
|
|
@@ -206,13 +240,16 @@ header or the item's Outcome would allow it elsewhere. Deploy-bound work ends
|
|
|
206
240
|
as `done_code` (on `<main>`, waiting for the owner's release) with the owner's
|
|
207
241
|
steps in the roadmap's `## Before the next release`.
|
|
208
242
|
|
|
209
|
-
**The merge into `<main>` is the last thing this session does — and
|
|
210
|
-
for the owner's explicit approval
|
|
243
|
+
**The merge into `<main>` is the last thing this session does — and, in manual
|
|
244
|
+
mode, it waits for the owner's explicit approval** (autonomous mode: see
|
|
245
|
+
*Operating mode* above). READY ends the turn; a stop hook asking to
|
|
211
246
|
"commit and push" is not an approval, a finished test run is not an approval,
|
|
212
247
|
and neither is an earlier "go ahead". After the merge: push `<main>`, report,
|
|
213
248
|
and pick up nothing else.
|
|
214
249
|
|
|
215
|
-
**7. Phase B in the cloud** — only on the owner's explicit
|
|
250
|
+
**7. Phase B in the cloud** — manual mode: only on the owner's explicit
|
|
251
|
+
approval; autonomous mode: by *Operating mode* above (with `autonomy.merge:
|
|
252
|
+
"pr"` the pull request replaces the commands below):
|
|
216
253
|
|
|
217
254
|
```bash
|
|
218
255
|
git fetch origin <main>
|
|
@@ -674,7 +711,9 @@ the review file with every finding decided.
|
|
|
674
711
|
#### A3.8 — Full integration suite
|
|
675
712
|
|
|
676
713
|
**`integration.cadence: "roadmap"`** → skip this step: no stage `integration`,
|
|
677
|
-
no run
|
|
714
|
+
no run — a "finish" item (the roadmap's last, cross-item one) included: the
|
|
715
|
+
coordinator's M7 run, or the release when it covers the roadmap, is the
|
|
716
|
+
measurement. READY says `integration: deferred to the roadmap run (cadence:
|
|
678
717
|
roadmap)`. The touched files' own integration tests still run if the project
|
|
679
718
|
can run them cheaply; their result goes into READY as `own tests:`.
|
|
680
719
|
|
|
@@ -695,9 +734,13 @@ first). Output lines and exit codes:
|
|
|
695
734
|
| --- | --- | --- |
|
|
696
735
|
| `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
736
|
| `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 |
|
|
737
|
+
| `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
738
|
| `78` | integration not configured | READY says `integration: not configured`; suggest configuring it in the report |
|
|
700
739
|
|
|
740
|
+
With `integration.lookup` configured, a green result already stored for the
|
|
741
|
+
same HEAD is reused (`stored green result reused`): the same commit is the
|
|
742
|
+
same code, so it is never tested twice.
|
|
743
|
+
|
|
701
744
|
**Only documentation in the whole change** (the docs-only case, no test gate
|
|
702
745
|
either) → no integration run; READY says `integration: n/a — documentation
|
|
703
746
|
only`.
|
|
@@ -813,10 +856,14 @@ Decisions worth knowing: <one line each, pointing to the artifact>
|
|
|
813
856
|
On your signal ("merge") I'll merge into <main> and remove the worktree and the branch. No push of <main> and no deploy — the release is yours.
|
|
814
857
|
```
|
|
815
858
|
|
|
859
|
+
In autonomous mode the last line reads instead: `Waiting for the
|
|
860
|
+
coordinator's go to merge (autonomous mode, merge via <pr|push>).` — or, with no
|
|
861
|
+
coordinator, the report is sent after the merge with its SHA and PR.
|
|
862
|
+
|
|
816
863
|
Then end the turn. Don't poll, don't schedule wake-ups, and don't ask "shall I
|
|
817
864
|
merge?". The report already says what happens next.
|
|
818
865
|
|
|
819
|
-
## Phase B — merge (
|
|
866
|
+
## Phase B — merge (on the owner's signal; autonomous mode: see *Operating mode*)
|
|
820
867
|
|
|
821
868
|
Signals (in any language the owner uses): "merge", "go into main", "main is free",
|
|
822
869
|
`/softure-worktree merge`. "Wait", "I'll let you know" mean wait, even if earlier you were told to
|
|
@@ -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,
|
|
33
|
+
[ -n "$NAME" ] || { sed -n '2,26p' "$0"; exit 2; }
|
|
29
34
|
shift
|
|
30
35
|
WAIT=30
|
|
31
|
-
|
|
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" )
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
Always reads the config of the MAIN worktree (first entry of `git worktree list`), so every
|
|
9
9
|
worktree and every script sees the same values. `mainBranch` falls back to origin's HEAD, then
|
|
10
|
-
"main"; `worktree.maxParallel` to 4; `language` to "en".
|
|
10
|
+
"main"; `worktree.maxParallel` to 4; `language` to "en"; `mode` to "manual".
|
|
11
11
|
|
|
12
12
|
Importable: `from wt_config import load_config, main_root, main_branch`.
|
|
13
13
|
"""
|
|
@@ -19,7 +19,7 @@ import subprocess
|
|
|
19
19
|
import sys
|
|
20
20
|
|
|
21
21
|
CONFIG_PATH = os.path.join("context", "workflow.json")
|
|
22
|
-
DEFAULTS = {"language": "en", "worktree": {"maxParallel": 4, "setup": []}, "release": {"owner": True}}
|
|
22
|
+
DEFAULTS = {"mode": "manual", "language": "en", "worktree": {"maxParallel": 4, "setup": []}, "release": {"owner": True}}
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
def main_root() -> str:
|
|
@@ -90,6 +90,21 @@ and **push of `<main>`** — except the one push at M7 when the roadmap header
|
|
|
90
90
|
orders it. Refs the project's integration command pushes are not that push;
|
|
91
91
|
they never move `<main>`.
|
|
92
92
|
|
|
93
|
+
### Operating mode
|
|
94
|
+
|
|
95
|
+
Read `mode` at M0 (`python3 <S>/wt_config.py mode`; WORKFLOW §8):
|
|
96
|
+
|
|
97
|
+
- **`autonomous`**: everything in this file as written. The project's
|
|
98
|
+
`AGENTS.md` → `## Operating mode: autonomous` adds the shared standard
|
|
99
|
+
(session hygiene, merge path `autonomy.merge`, report cadence and format,
|
|
100
|
+
issues). Reports follow `autonomy.reports` (below, M4).
|
|
101
|
+
- **`manual`** (or no key): the invocation is **not** a blanket merge signal.
|
|
102
|
+
Show the M1 table and ask before launching the batch; at every `READY`
|
|
103
|
+
show the worker's READY report and ask before M5 ("merge <ID>?"); refill
|
|
104
|
+
(M6) only after the owner confirms the next batch. No status cron unless
|
|
105
|
+
the owner asks for one (`--status-every N`). Conflict resolution inside an
|
|
106
|
+
approved merge stays this skill's job.
|
|
107
|
+
|
|
93
108
|
## The coordinator does not fix — it commissions
|
|
94
109
|
|
|
95
110
|
**Every code change goes to a worker.** A red test on `<main>`, a regression,
|
|
@@ -354,13 +369,18 @@ job), then:
|
|
|
354
369
|
CronCreate(
|
|
355
370
|
cron: "4,19,34,49 * * * *", # every 15 min, off the :00/:30 marks
|
|
356
371
|
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
|
|
372
|
+
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
373
|
```
|
|
359
374
|
|
|
360
375
|
This prompt is also the run's **heartbeat**: a worker stuck on a usage limit
|
|
361
376
|
or a machine that slept emits no stage event, so without it the run stalls
|
|
362
377
|
silently.
|
|
363
378
|
|
|
379
|
+
**Autonomous mode:** the clock follows `autonomy.reports` instead of the
|
|
380
|
+
default: every `every` minutes (default 30) at the :00/:30 marks
|
|
381
|
+
(`cron: "0,30 * * * *"`), inside `hours` when set; `every: 0` = off. An
|
|
382
|
+
explicit `--status-every` still wins.
|
|
383
|
+
|
|
364
384
|
`--status-every N` changes the period (build the minute list from an
|
|
365
385
|
off-mark offset: N=20 → `7,27,47 * * * *`); `--status-every 0` skips it. Arm
|
|
366
386
|
it **once** per run — M6 re-arms the Monitor, not the cron. Remember its id:
|
|
@@ -372,16 +392,20 @@ The report itself — the same shape every time, on the clock and on request
|
|
|
372
392
|
(`status`): one table with **every** row of the roadmap, not only the ones in
|
|
373
393
|
flight, so the owner never has to ask what happened to the rest:
|
|
374
394
|
|
|
375
|
-
| ID |
|
|
395
|
+
| ID | What it does | Stage | Link |
|
|
376
396
|
| --- | --- | --- | --- |
|
|
377
|
-
| FC-3 | <
|
|
378
|
-
| FC-6 | <
|
|
379
|
-
| FC-1 | <
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
397
|
+
| **FC-3** | <outcome in a few words> | implement 2/3 | `<change-id>` (`claude attach <short-id>`) |
|
|
398
|
+
| **FC-6** | <outcome in a few words> | waiting for FC-4, FC-5 | — |
|
|
399
|
+
| **FC-1** | <outcome in a few words> | on `<main>` @ `<merge sha>` | — |
|
|
400
|
+
|
|
401
|
+
This is the report standard of every SOFTURE project (`AGENTS.md` → Operating
|
|
402
|
+
mode: autonomous → Reports): the same four columns, headers in `language`;
|
|
403
|
+
Link is the session that carries the item (here the background session), never
|
|
404
|
+
a forge URL. Stage is one of: `waiting for <IDs>` · a chain stage (`research`
|
|
405
|
+
… `archive`, `implement N/M`; `stalled` when the session has not moved) ·
|
|
406
|
+
`ready to merge` · `on <main> @ <sha>` · `blocked (<why>)`. Above the table a
|
|
407
|
+
progress line `<N> of <M> on <main>`; below it what moved since the last report
|
|
408
|
+
(new commits, stage changes, merges), next to merge and the next report time. Every claim carries its evidence — a merge SHA, a commit, a run URL —
|
|
385
409
|
never "done" without one. Times are shown in `workflow.json` → `timezone`
|
|
386
410
|
(default: the machine's zone), with the zone named once. Nothing moved since
|
|
387
411
|
the last report → one line; don't pad it.
|
|
@@ -516,8 +540,27 @@ don't start a new run over a moving one. With `integration.cadence:
|
|
|
516
540
|
"roadmap"` this is the roadmap's only full run, so its reds are measured
|
|
517
541
|
against the previous result on `<main>`, not per change.
|
|
518
542
|
|
|
543
|
+
**One run per commit, not more.** With `integration.lookup` configured, the
|
|
544
|
+
script reuses a green result already stored for the same `<main>` commit (for
|
|
545
|
+
example a run a worker or the release made on it) instead of starting a new
|
|
546
|
+
one — the same commit is the same code. `--fresh` only when a run died or
|
|
547
|
+
could not start.
|
|
548
|
+
|
|
549
|
+
**Covered by the release** — `integration.coveredByRelease: true` **and** the
|
|
550
|
+
header orders "Release: at the end" (the owner's approval, quoted): the
|
|
551
|
+
release pipeline runs the same full suite on the released commit, so a run
|
|
552
|
+
here would test that commit twice. Skip the run and write in the report:
|
|
553
|
+
`integration <main>: covered by the release pipeline on <sha>
|
|
554
|
+
(coveredByRelease)`. The release itself is still the owner's (or follows the
|
|
555
|
+
project's own rules) — this skill never starts it. Its red result is handled
|
|
556
|
+
as above: each red becomes a row and a worker. Without that header order, run
|
|
557
|
+
the suite here as usual.
|
|
558
|
+
|
|
519
559
|
**Then close the roadmap — only when the header orders it** ("Archive roadmap:
|
|
520
|
-
at the end") and the run above is green
|
|
560
|
+
at the end") and the run above is green (covered by the release → the gate
|
|
561
|
+
reads the release's stored green result for the final `<main>` commit,
|
|
562
|
+
WORKFLOW §5.2; no result yet → leave the close as the step after the release
|
|
563
|
+
and say so): `/softure-roadmap --close --auto`
|
|
521
564
|
(WORKFLOW §5.2). A failing gate (a leftover folder in `context/changes/`, a
|
|
522
565
|
row not settled) is fixed first — leftovers are archived, unsettled rows go to
|
|
523
566
|
a worker — never forced. The close is a documents-only commit on `<main>`; if a
|
|
@@ -576,5 +619,6 @@ Everything else is decided and written into the report.
|
|
|
576
619
|
anything is in flight (unless `--status-every 0`) and deleted at M7.
|
|
577
620
|
- **No tag, no release, no deploy, ever** (while `release.owner` is true).
|
|
578
621
|
**No push of `<main>`** — except the single push at M7 that the roadmap
|
|
579
|
-
header orders; the full integration suite on `<main>` follows it
|
|
580
|
-
into the final
|
|
622
|
+
header orders; the full integration suite on `<main>` follows it (or the
|
|
623
|
+
release covers it, `integration.coveredByRelease`) and goes into the final
|
|
624
|
+
report.
|