@softure-ai/skills 0.7.0 → 0.9.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 +11 -3
- package/WORKFLOW.md +63 -10
- package/package.json +1 -1
- package/rules/AGENTS.md +44 -14
- package/skills/softure-init/SKILL.md +5 -3
- package/skills/softure-roadmap/SKILL.md +8 -4
- package/skills/softure-roadmap/references/example-roadmap.md +4 -0
- package/skills/softure-worktree/SKILL.md +7 -0
- package/skills/softure-worktree/scripts/wt_config.py +29 -2
- package/skills/softure-worktree-manager/SKILL.md +48 -16
- package/skills/softure-worktree-manager/references/report-routine.md +48 -0
package/README.md
CHANGED
|
@@ -36,14 +36,17 @@ installer injects only that mode's section into the rules block:
|
|
|
36
36
|
| who decides | the owner, step by step; skills ask | the agent takes the recommended option and records it |
|
|
37
37
|
| implementation | one phase per run, commit on the owner's approval | all phases, one commit per phase |
|
|
38
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
|
|
39
|
+
| parallel sessions, reports | only when the owner starts them | coordinator + one session per change, report every 60 min |
|
|
40
40
|
| release | the owner | the owner while `release.owner` is true; production deploy always the owner |
|
|
41
41
|
|
|
42
42
|
The autonomous standard (roles of the coordinator and its threads, results always sent to the main
|
|
43
43
|
chat, condensed messages with the decision first, the coordinator's go on green PRs, threads closed only
|
|
44
44
|
after the merge, the report table `ID | What it does | Stage | Link` with the `X of N` counter, issues
|
|
45
|
-
for SOFTURE package bugs) lives in the rules block, so every session
|
|
46
|
-
|
|
45
|
+
for SOFTURE package bugs and for gaps in these skills) lives in the rules block, so every session that
|
|
46
|
+
runs in a checkout, cloud ones included, reads it from `AGENTS.md` without being told. A hosted
|
|
47
|
+
project's coordinator (for example a claude.ai project's main chat) is started outside the checkout:
|
|
48
|
+
paste the one-paragraph pointer from WORKFLOW §8.5 (`softure-init` prints it) into the project
|
|
49
|
+
instructions, and it starts the run by itself. Tune it with `autonomy` (WORKFLOW §2). Switch modes only on the
|
|
47
50
|
owner's word: change `mode`, re-run the installer, commit both.
|
|
48
51
|
|
|
49
52
|
Per-project choices go into `context/workflow.json` → `install` and are applied on every install,
|
|
@@ -96,6 +99,11 @@ npm version patch # or minor / major: bumps package.json and creates ta
|
|
|
96
99
|
git push --follow-tags
|
|
97
100
|
```
|
|
98
101
|
|
|
102
|
+
Where a tag cannot be pushed (a cloud agent session's git proxy lets only branches through), bump the
|
|
103
|
+
version without a tag (`npm version minor --no-git-tag-version`), commit and push it to `master`, then
|
|
104
|
+
run the **auto-release** workflow (Actions → auto-release → Run workflow, on `master`). It creates
|
|
105
|
+
`vX.Y.Z` on `master`'s head and starts `release.yml` on that tag, the same path as a pushed tag.
|
|
106
|
+
|
|
99
107
|
The `v*.*.*` tag runs `.github/workflows/release.yml`, which:
|
|
100
108
|
1. validates and test-installs the package, and checks that the tag matches `package.json`;
|
|
101
109
|
2. publishes `@softure-ai/skills` to **npmjs.com** through trusted publishing (OIDC, provenance,
|
package/WORKFLOW.md
CHANGED
|
@@ -63,7 +63,8 @@ or languages.
|
|
|
63
63
|
"lookup": null, // optional: command printing the stored result for INTEGRATION_SHA (exit 0 green, 1 red, 3 none);
|
|
64
64
|
// wt-integration.sh reuses a green result for the same commit instead of starting a run
|
|
65
65
|
"coveredByRelease": false // true: the release pipeline runs the same full suite on the released commit, so a roadmap
|
|
66
|
-
// whose header orders "Release: at the end" gets no separate run at M7
|
|
66
|
+
// whose header orders "Release: at the end" gets no separate run at M7 and closes
|
|
67
|
+
// without waiting for the release (§5.2)
|
|
67
68
|
},
|
|
68
69
|
"migrations": { // optional: lets orchestrators detect collisions between parallel changes
|
|
69
70
|
"dir": "drizzle",
|
|
@@ -82,7 +83,8 @@ or languages.
|
|
|
82
83
|
"source": "roadmap", // "roadmap": items come from roadmap.md; "issues": the forge's open issues are the queue
|
|
83
84
|
"merge": "pr", // "pr": pull request with fresh <main>, merged on the forge after green checks (default);
|
|
84
85
|
// "push": local --no-ff merge, then push <main> through the pre-push hook
|
|
85
|
-
"reports": { "every":
|
|
86
|
+
"reports": { "every": 60, "hours": null } // coordinator status reports: minutes (default 60, 0 = off), optional "10:00-22:30"
|
|
87
|
+
// window; one recurring routine on full hours, `every` rounded up to a multiple of 60
|
|
86
88
|
},
|
|
87
89
|
"research": { // optional: extra knowledge sources softure-research should consult
|
|
88
90
|
"sources": ["docs/", "context/foundation/prd.md"]
|
|
@@ -309,9 +311,17 @@ the end", otherwise by the owner). Gates, all checked on `<main>` and reported t
|
|
|
309
311
|
2. `context/changes/` holds only its README, plus the folders of carried rows. Any other folder is archived first
|
|
310
312
|
(`softure-archive`, including work done without a plan), never deleted and never left behind;
|
|
311
313
|
3. when `integration` is configured: one green full run on the final `<main>` (its result line goes into the archive).
|
|
312
|
-
With `integration.coveredByRelease: true` and the order "Release: at the end", that run is the release's
|
|
313
|
-
|
|
314
|
-
|
|
314
|
+
With `integration.coveredByRelease: true` and the order "Release: at the end", that run is the release's, and
|
|
315
|
+
the close **does not wait for it**: a green `integration.lookup` result for the final `<main>` commit is used
|
|
316
|
+
when one exists; otherwise the summary records `integration: covered by the release on <sha>
|
|
317
|
+
(coveredByRelease)`. The release's integration result gates the deploy, not the archive; its reds become new
|
|
318
|
+
roadmap rows as usual.
|
|
319
|
+
|
|
320
|
+
**Close before the release.** The release reads the roadmap to list what ships, so the archived file is the single
|
|
321
|
+
stable input for every release of that roadmap: the first attempt, a retry after a failed release, a redeploy or a
|
|
322
|
+
rollback re-run. A release that comes after the close passes it explicitly
|
|
323
|
+
(`softure-deploy release-notes --roadmap context/foundation/archive/<YYYY-MM-DD>-roadmap.md`). Rows that wait for
|
|
324
|
+
the release keep `done_code` in the archived `## At a glance`, so the release still lists them.
|
|
315
325
|
|
|
316
326
|
Then, in one commit (`docs(roadmap): close <slug>`):
|
|
317
327
|
|
|
@@ -396,9 +406,11 @@ the owner: `softure-init` asks for it, and a missing key means `"manual"`.
|
|
|
396
406
|
The behavioural rules of each mode live in the project's `AGENTS.md` (the managed block from
|
|
397
407
|
`rules/AGENTS.md`). The installer injects **only the section of the active mode**
|
|
398
408
|
(`## Operating mode: manual` or `## Operating mode: autonomous`), whatever `install.rules` says, so a
|
|
399
|
-
manual project never carries autonomous instructions and every session
|
|
400
|
-
its mode's rules without being told.
|
|
401
|
-
|
|
409
|
+
manual project never carries autonomous instructions and every session that runs in a checkout,
|
|
410
|
+
cloud ones included, reads its mode's rules without being told. A hosted project's coordinator,
|
|
411
|
+
started by the harness outside the checkout, gets one pointer to them in the project instructions
|
|
412
|
+
(§8.5). That block is the source of truth for §8.3 and §8.4; this section defines the contract
|
|
413
|
+
skills rely on.
|
|
402
414
|
|
|
403
415
|
**Switching mode** (only on the owner's explicit word): set `mode` in `context/workflow.json`, re-run
|
|
404
416
|
the installer (`npx softure-skills`, or `npm install`) so the `AGENTS.md` block follows, and commit both
|
|
@@ -441,11 +453,52 @@ leaves the working tree without the owner's word, approvals never carry over to
|
|
|
441
453
|
### 8.4 Autonomous mode
|
|
442
454
|
|
|
443
455
|
Defined in `rules/AGENTS.md` → `## Operating mode: autonomous`: the standing consent, the
|
|
444
|
-
coordinator and its sessions, the merge queue, reports, issues as the work
|
|
445
|
-
the stop rules. `autonomy` in `workflow.json` (§2) tunes it per project. Project-specific standing
|
|
456
|
+
coordinator and its sessions, the start of a run, the merge queue, reports, issues as the work
|
|
457
|
+
source, filing gaps in SOFTURE packages, releases, and the stop rules. `autonomy` in `workflow.json` (§2) tunes it per project. Project-specific standing
|
|
446
458
|
orders (a repo that is read-only, an extra label, a test that must not run per push) belong in the
|
|
447
459
|
project's own `AGENTS.md`, outside the managed block, not in a session's memory.
|
|
448
460
|
|
|
461
|
+
### 8.5 Hosted projects
|
|
462
|
+
|
|
463
|
+
A hosted multi-session project (for example a claude.ai project) has a **main-chat session** that
|
|
464
|
+
the owner talks to and that starts **thread sessions**. The main-chat session is the coordinator;
|
|
465
|
+
each thread carries one change. They differ from a local run in three ways: the coordinator has no
|
|
466
|
+
shell over the threads, each thread is a cloud session in its own container on a branch the harness
|
|
467
|
+
assigns, and the coordinator is started by the harness, not inside a checkout.
|
|
468
|
+
|
|
469
|
+
**Bootstrap.** The coordinator never loads the repository's `AGENTS.md` by itself, so the project
|
|
470
|
+
instructions carry one pointer to it. `softure-init` prints it for autonomous projects; paste it
|
|
471
|
+
into the hosted project's instructions:
|
|
472
|
+
|
|
473
|
+
```text
|
|
474
|
+
This project runs the SOFTURE workflow from <owner>/<repo>. Before anything else, read its
|
|
475
|
+
AGENTS.md (the managed SOFTURE block) and context/workflow.json from the main branch. You are the
|
|
476
|
+
coordinator described there: follow "Operating mode: autonomous", starting with "Start of a run".
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
Nothing else needs saying: the rules, the roadmap and the owner's standing orders live in the
|
|
480
|
+
repository (§8.4). Thread briefs still name "follow AGENTS.md → Operating mode: autonomous"; a thread
|
|
481
|
+
runs in a checkout and reads the block itself.
|
|
482
|
+
|
|
483
|
+
**Mapping.** Each step of `softure-worktree-manager` and `softure-worktree` in a hosted project:
|
|
484
|
+
|
|
485
|
+
| step | local | hosted project |
|
|
486
|
+
| --- | --- | --- |
|
|
487
|
+
| launch (M3) | `wm-launch.sh` | start a thread session with the standard brief (item ID, change-id, outcome, base, owned files, waits for, merge path, report-to, "follow AGENTS.md → Operating mode: autonomous") |
|
|
488
|
+
| in-flight state (M0.1) | `wm-resume.sh` | roadmap rows on `origin/<main>` (with `cloudState: "branch"` they show only at merge, so also memory), the harness's thread list, open pull requests |
|
|
489
|
+
| watch (M4) | `wm-watch.sh` Monitor | thread messages and the report routine; no polling |
|
|
490
|
+
| READY / merged report | `SendMessage` | cross-session message to the coordinator's session, never a reply in the thread |
|
|
491
|
+
| go | a signal in the conversation | coordinator-to-thread message |
|
|
492
|
+
| branch | `<change-id>` in a worktree | the branch the harness assigns; the change-id lives in `context/changes/` and `change.md` → `branch:` |
|
|
493
|
+
| Phase A | `wt-open.sh` + worktree | in the thread's own checkout, no `git worktree add` (`softure-worktree` → Cloud session) |
|
|
494
|
+
| reports / heartbeat | `CronCreate` | a recurring routine; without a scheduling tool, a setup thread creates it from `softure-worktree-manager/references/report-routine.md` |
|
|
495
|
+
| close | `claude stop` + worktree removal | resolve the thread after its pull request is merged |
|
|
496
|
+
|
|
497
|
+
`worktree.cloudState` (§2) and `install.gitignore: false` (for containers that never run
|
|
498
|
+
`npm install`) apply to the threads as to any cloud session. Forge access in a hosted session is often
|
|
499
|
+
scoped to the project's own repository: attach a repository the run needs (for example SOFTURE/SKILLS
|
|
500
|
+
to file a gap) before deciding it is out of reach.
|
|
501
|
+
|
|
449
502
|
## 9. Commits
|
|
450
503
|
|
|
451
504
|
- 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.9.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
|
@@ -84,7 +84,9 @@ resolving conflicts, closing the issues the work solves, filing issues, starting
|
|
|
84
84
|
sessions (threads), giving threads their go, and running report routines. It lives in the repository,
|
|
85
85
|
so every session reads it here itself; it is not consent relayed by another session. A brief points
|
|
86
86
|
to this section instead of quoting chat messages. **Only a production deploy or release waits for the
|
|
87
|
-
owner's word** (see Releases). Nothing in this section needs to be told to a fresh session again
|
|
87
|
+
owner's word** (see Releases). Nothing in this section needs to be told to a fresh session again;
|
|
88
|
+
a hosted project's coordinator that does not run inside a checkout gets one pointer to it in the
|
|
89
|
+
project instructions (WORKFLOW §8.5).
|
|
88
90
|
|
|
89
91
|
**Decide, don't ask.** Take the recommended option and record it under `## Decisions (auto)` in the
|
|
90
92
|
artifact. Small product decisions are yours: the owner trusts the recommendation and corrects it
|
|
@@ -102,6 +104,17 @@ irreversible action nobody asked for, a secret or access only the owner has, sco
|
|
|
102
104
|
AGENTS.md → Operating mode: autonomous"). It carries one change and talks only to the coordinator.
|
|
103
105
|
- A session started by the owner directly, with no coordinator, does both jobs itself.
|
|
104
106
|
|
|
107
|
+
**Start of a run.** A coordinator that wakes with no run in flight (a fresh or cleared session, or a
|
|
108
|
+
hosted project's main-chat session on its first message) starts the run itself, without waiting for
|
|
109
|
+
the owner's "go":
|
|
110
|
+
1. read `context/workflow.json` and the roadmap (or the issue queue) on the main branch; outside a
|
|
111
|
+
checkout, read them, and this block, from the repository first;
|
|
112
|
+
2. adopt what is already in flight: roadmap rows `in_progress` or `ready_to_merge`, the harness's open
|
|
113
|
+
threads, open pull requests (`softure-worktree-manager` M0.1); give the go to every READY thread;
|
|
114
|
+
3. start a thread for every ready, parallel-safe item;
|
|
115
|
+
4. create the report routine and post the first roadmap report.
|
|
116
|
+
Only a "stop" or "pause" from the owner, recorded in memory, holds it back.
|
|
117
|
+
|
|
105
118
|
**Messages to the owner and between sessions:**
|
|
106
119
|
- In `chatLanguage` (default: `language`), whatever language the artifacts use.
|
|
107
120
|
- **Condensed: the decision first, then what was done.** First line: `Decision: <what the owner has to
|
|
@@ -159,10 +172,17 @@ irreversible action nobody asked for, a secret or access only the owner has, sco
|
|
|
159
172
|
suite runs per `integration.cadence`, never per push.
|
|
160
173
|
|
|
161
174
|
**Roadmap reports** (coordinator, pasted into the main chat, times in `timezone`):
|
|
162
|
-
- When: after every batch of thread starts, and every `autonomy.reports.every`
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
175
|
+
- When: after every batch of thread starts (an ad-hoc post), and every `autonomy.reports.every`
|
|
176
|
+
minutes (default 60) on full hours inside `autonomy.reports.hours`, only while work runs. Routines
|
|
177
|
+
fire at most once an hour, on the full hour, so the schedule is `every` rounded up to a multiple of
|
|
178
|
+
60 (60 → `0 * * * *`, 120 → `0 */2 * * *`; `wt_config.py --report-cron` prints it); a value below 60
|
|
179
|
+
runs hourly. **One recurring routine** drives the reports: the coordinator creates it when work
|
|
180
|
+
starts and deletes it when nothing runs, or on the owner's "stop" or "pause". Never a chain of
|
|
181
|
+
one-off wake-ups. **A coordinator without a scheduling tool** (a hosted project's main-chat session)
|
|
182
|
+
starts one short setup thread whose only job is to create that routine from the template
|
|
183
|
+
`softure-worktree-manager/references/report-routine.md` and send its id back; the setup thread is
|
|
184
|
+
then closed. The coordinator records the id in memory and, at the end of the run or on "stop" or
|
|
185
|
+
"pause", has a thread delete the routine by that id. Missing tools never mean skipped reports. After a pause (usage limit) name the reports that were skipped. A report produced in a thread of its own (a scheduled routine) is pasted into the main
|
|
166
186
|
chat and that thread is closed at once.
|
|
167
187
|
- Shape, the same in every project, nothing else:
|
|
168
188
|
1. title: `Roadmap report <roadmap name>, <HH:MM>`;
|
|
@@ -185,7 +205,7 @@ irreversible action nobody asked for, a secret or access only the owner has, sco
|
|
|
185
205
|
Example, shown in English (roadmap prefix `SA`):
|
|
186
206
|
|
|
187
207
|
```markdown
|
|
188
|
-
**Roadmap report softure-auth, 14:
|
|
208
|
+
**Roadmap report softure-auth, 14:00**
|
|
189
209
|
Done: 47 of 50 on master (latest SA-31, SA-59).
|
|
190
210
|
|
|
191
211
|
| ID | What it does | Stage | Link |
|
|
@@ -198,12 +218,18 @@ irreversible action nobody asked for, a secret or access only the owner has, sco
|
|
|
198
218
|
Times: SA-35 ready to merge around 15:30; next report 15:00.
|
|
199
219
|
```
|
|
200
220
|
|
|
201
|
-
Nothing moved since the last report: one line (`
|
|
221
|
+
Nothing moved since the last report: one line (`15:00, no change: 47 of 50; SA-35 implement 2/3`).
|
|
222
|
+
|
|
223
|
+
**Bugs and gaps in SOFTURE packages.** A well-founded, non-duplicate bug or gap is filed right away as
|
|
224
|
+
an issue, without asking, in the repository that owns it:
|
|
225
|
+
- `@softure-ai/skills` (the skills, this managed block, `WORKFLOW.md`) → **SOFTURE/SKILLS**;
|
|
226
|
+
- every other `@softure-ai/*` package → **SOFTURE/AI**;
|
|
227
|
+
- this project's own scope → this project's repository.
|
|
202
228
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
the
|
|
206
|
-
fix is `blocked (<repo>#<N>)`.
|
|
229
|
+
Search the target for a duplicate first. When the harness scopes forge access to this project, attach
|
|
230
|
+
the owning repository first (read and issues) and only then decide you cannot file; if it is still out
|
|
231
|
+
of reach, put the issue text in the main chat for the owner. The work goes on around it; the item that
|
|
232
|
+
needs the fix is `blocked (<repo>#<N>)`.
|
|
207
233
|
|
|
208
234
|
**Issues as the work source** (`autonomy.source: "issues"`, no roadmap):
|
|
209
235
|
- The coordinator lists open issues (through a thread when it has no forge access). Not well-founded:
|
|
@@ -223,7 +249,8 @@ through the project's own pipeline (version-bump pull request → merge → the
|
|
|
223
249
|
several threads on one package, the last to merge releases. No manual tags, no moved tags; a failed
|
|
224
250
|
release is fixed forward with a patch bump. A production deploy always needs the owner's separate
|
|
225
251
|
word. Ad-hoc fixes ride the next release instead of getting one of their own, unless the owner says
|
|
226
|
-
otherwise.
|
|
252
|
+
otherwise. A roadmap ordered to be archived is closed before its release, and every release of it
|
|
253
|
+
(retries and redeploys included) reads the archived file (WORKFLOW §5.2).
|
|
227
254
|
|
|
228
255
|
**Stop and limits.** "Stop" or "pause" from the owner stops everything: no new threads, report
|
|
229
256
|
routines removed, open threads finished or stopped at a safe point; record the pause in memory and do
|
|
@@ -233,8 +260,11 @@ push, merge or publish this section covers, cite this section and `mode` once; i
|
|
|
233
260
|
ask the owner for a word in that session and keep the other work going.
|
|
234
261
|
|
|
235
262
|
**Memory** holds only project state (queue, IDs, counters, the owner's specific orders and decisions).
|
|
236
|
-
The rules above are not memory material
|
|
237
|
-
|
|
263
|
+
The rules above are not memory material. **When the owner has to explain or correct how the process
|
|
264
|
+
runs** (a step that should have happened by itself, a rule that is missing or wrong), that is a gap in
|
|
265
|
+
these skills: the session that received it checks SOFTURE/SKILLS for a duplicate, files an issue right
|
|
266
|
+
away (neutral text, "an adopting app") and posts the link in the main chat. Memory keeps only the
|
|
267
|
+
project-specific order itself.
|
|
238
268
|
|
|
239
269
|
## Conventions
|
|
240
270
|
|
|
@@ -70,7 +70,7 @@ start any work: no change, PRD or roadmap is created here.
|
|
|
70
70
|
said ("this project is autonomous", "we run it by hand"). Otherwise, interactive: ask "How is
|
|
71
71
|
this project run?" with the options **manual** (recommended: the owner checks every step,
|
|
72
72
|
commits and merges by hand; client projects) and **autonomous** (the agent decides, merges green
|
|
73
|
-
work, coordinates parallel sessions and reports every
|
|
73
|
+
work, coordinates parallel sessions and reports every hour). In `--auto` without a signal,
|
|
74
74
|
use `manual`. An existing `mode` is never changed here; switching is the owner's explicit call
|
|
75
75
|
(WORKFLOW §8, "Switching mode").
|
|
76
76
|
5. **Show the plan.** Without `--auto`, print the proposed tree and the full `workflow.json`,
|
|
@@ -93,7 +93,9 @@ start any work: no change, PRD or roadmap is created here.
|
|
|
93
93
|
detection must now produce no new writes.
|
|
94
94
|
8. **Report** a status block, one line per artifact (`created`, `present` or `merged: <keys>`),
|
|
95
95
|
then the unresolved values the owner should fill in, every inferred value with its reason,
|
|
96
|
-
and the next step.
|
|
96
|
+
and the next step. With `mode: "autonomous"`, end it with the project-instructions snippet
|
|
97
|
+
for hosted projects (WORKFLOW §8.5), `<owner>/<repo>` filled in from `origin`, ready to paste.
|
|
98
|
+
Then stop: do not chain into other skills.
|
|
97
99
|
|
|
98
100
|
## `workflow.json`
|
|
99
101
|
|
|
@@ -131,7 +133,7 @@ only when it was detected or the user asked for it:
|
|
|
131
133
|
| `worktree.cloudState` | `"main"` | the user runs cloud sessions that must keep state on the branch (`"branch"`) |
|
|
132
134
|
| `research.sources` | none | step 2 found docs, ADRs or a PRD (interactive: listed in the plan; `--auto`: only paths that exist) |
|
|
133
135
|
| `install` | gitignore the skills, inject all rule sections | the user wants committed skills or fewer rule sections (the language section always ships; `allowNonEnglishCode: true` only on the owner's explicit word) |
|
|
134
|
-
| `autonomy` | roadmap as the work source, merge via pull request, reports every
|
|
136
|
+
| `autonomy` | roadmap as the work source, merge via pull request, reports every 60 min (`reports.every`; routines fire at most hourly) | `mode` is `autonomous` and the user names issues as the queue, merges by push, or another report cadence |
|
|
135
137
|
|
|
136
138
|
Content of the README files, and a complete worked example (detection, plan, report) for a
|
|
137
139
|
fictional repo: read `references/templates.md` **when writing the READMEs** and
|
|
@@ -77,8 +77,12 @@ Read the PRD in full, not in excerpts.
|
|
|
77
77
|
Then write `## Summary` (`| ID | Item | What changed | Merge |`, the merge SHA from
|
|
78
78
|
`git log --merges --grep "<change-id>"` on `<main>`, plus the integration line), move the file to
|
|
79
79
|
`foundation/archive/<YYYY-MM-DD>-roadmap.md`, clean up the promoted roadmap's backlog folder and
|
|
80
|
-
index row, and commit.
|
|
81
|
-
|
|
80
|
+
index row, and commit. With `integration.coveredByRelease` and "Release: at the end" the close does not
|
|
81
|
+
wait for the release: the integration line reads `covered by the release on <sha> (coveredByRelease)`
|
|
82
|
+
unless a green stored result exists. The archived file is what the release notes read (every release
|
|
83
|
+
of this roadmap, retries and redeploys included); rows waiting for the release keep `done_code`, so
|
|
84
|
+
the release still lists them. Name the archived path in the report. Do not promote the next roadmap
|
|
85
|
+
in the same step: that is `--promote`, the owner's call. In `--auto`, a failing gate stops the close and is reported; it is never forced.
|
|
82
86
|
A sample `## Summary` is at the end of [references/example-roadmap.md](references/example-roadmap.md).
|
|
83
87
|
|
|
84
88
|
## Existing roadmap
|
|
@@ -194,8 +198,8 @@ Overwriting a roadmap without archiving it is never an option. In `--auto`: revi
|
|
|
194
198
|
- frontmatter: `prd_version` = the PRD `version`;
|
|
195
199
|
- run-wide orders in the quote block: push main or not; archive the roadmap at the end or not;
|
|
196
200
|
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;
|
|
198
|
-
still never release); parallelism (default: `workflow.json` → `worktree.maxParallel`); which items need the owner
|
|
201
|
+
follows, and with `integration.coveredByRelease` the release's suite is the roadmap's run; the roadmap
|
|
202
|
+
is archived before the release, which reads the archived file; skills still never release); parallelism (default: `workflow.json` → `worktree.maxParallel`); which items need the owner
|
|
199
203
|
at the keyboard (`Mode: owner`);
|
|
200
204
|
- `## Order` opens with the framing (optimising for, first proof, main risk, depth), then the
|
|
201
205
|
reasoning for the order, `### Starting point` (the confirmed baseline, one line per layer
|
|
@@ -201,3 +201,7 @@ Waiting on you: the cancellation window (unblocks BK-3), the payment provider (B
|
|
|
201
201
|
Carried over: BK-6 (owner: payment provider) → `roadmaps/roadmap-payments.md`.
|
|
202
202
|
Integration: green 212/212 on e9f1c03.
|
|
203
203
|
```
|
|
204
|
+
|
|
205
|
+
With `integration.coveredByRelease` and "Release: at the end" the close runs before the release, so the last
|
|
206
|
+
line reads `Integration: covered by the release on e9f1c03 (coveredByRelease).` and the release that follows
|
|
207
|
+
lists BK-1 to BK-7 from this archived file.
|
|
@@ -150,6 +150,13 @@ branch, and the *other* sessions are other containers that see **only
|
|
|
150
150
|
`origin`** — a stage written to a local `<main>` is invisible to them, so two
|
|
151
151
|
cloud sessions could take the same item.
|
|
152
152
|
|
|
153
|
+
**A thread of a hosted project** (a coordinator in the project's main chat
|
|
154
|
+
starts one session per change; WORKFLOW §8.5) is such a cloud session: Phase A
|
|
155
|
+
runs in its own checkout on the branch the harness assigned (no `git worktree
|
|
156
|
+
add`), the change-id lives in `context/changes/`, the READY and merge reports
|
|
157
|
+
go to the coordinator's session by cross-session message, the go comes back
|
|
158
|
+
the same way, and the thread is resolved only after its pull request is merged.
|
|
159
|
+
|
|
153
160
|
**`worktree.cloudState: "branch"`** changes points 1 and 6: the claim and every
|
|
154
161
|
stage are committed **on the session branch only** (`wt-roadmap.py` does it by
|
|
155
162
|
itself in that mode) and nothing goes to `origin/<main>` before the merge. Use
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
wt_config.py <dotted.key> # scalar -> one line; list -> one item per line; missing/null -> nothing
|
|
5
5
|
wt_config.py --root # absolute path of the main worktree
|
|
6
6
|
wt_config.py --json # the whole resolved config as JSON
|
|
7
|
+
wt_config.py --report-cron # cron of the autonomous report routine (nothing when reports are off)
|
|
7
8
|
|
|
8
9
|
Always reads the config of the MAIN worktree (first entry of `git worktree list`), so every
|
|
9
10
|
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"; `mode` to "manual"
|
|
11
|
+
"main"; `worktree.maxParallel` to 4; `language` to "en"; `mode` to "manual";
|
|
12
|
+
`autonomy.reports.every` to 60.
|
|
11
13
|
|
|
12
14
|
Importable: `from wt_config import load_config, main_root, main_branch`.
|
|
13
15
|
"""
|
|
@@ -19,7 +21,13 @@ import subprocess
|
|
|
19
21
|
import sys
|
|
20
22
|
|
|
21
23
|
CONFIG_PATH = os.path.join("context", "workflow.json")
|
|
22
|
-
DEFAULTS = {
|
|
24
|
+
DEFAULTS = {
|
|
25
|
+
"mode": "manual",
|
|
26
|
+
"language": "en",
|
|
27
|
+
"worktree": {"maxParallel": 4, "setup": []},
|
|
28
|
+
"release": {"owner": True},
|
|
29
|
+
"autonomy": {"reports": {"every": 60, "hours": None}},
|
|
30
|
+
}
|
|
23
31
|
|
|
24
32
|
|
|
25
33
|
def main_root() -> str:
|
|
@@ -78,6 +86,20 @@ def lookup(config: dict, dotted: str):
|
|
|
78
86
|
return node
|
|
79
87
|
|
|
80
88
|
|
|
89
|
+
def report_cron(config: dict) -> str | None:
|
|
90
|
+
"""Cron for the report routine: `every` rounded up to whole hours (routines fire at most hourly)."""
|
|
91
|
+
every = lookup(config, "autonomy.reports.every")
|
|
92
|
+
if not every:
|
|
93
|
+
return None
|
|
94
|
+
if every < 60:
|
|
95
|
+
print(f"autonomy.reports.every={every} is below 60; routines run hourly at most, using 60",
|
|
96
|
+
file=sys.stderr)
|
|
97
|
+
hours = max(1, -(-int(every) // 60))
|
|
98
|
+
if hours >= 24:
|
|
99
|
+
return "0 0 * * *"
|
|
100
|
+
return "0 * * * *" if hours == 1 else f"0 */{hours} * * *"
|
|
101
|
+
|
|
102
|
+
|
|
81
103
|
def main() -> None:
|
|
82
104
|
if len(sys.argv) != 2:
|
|
83
105
|
sys.exit(__doc__)
|
|
@@ -86,6 +108,11 @@ def main() -> None:
|
|
|
86
108
|
print(main_root())
|
|
87
109
|
return
|
|
88
110
|
config = load_config()
|
|
111
|
+
if arg == "--report-cron":
|
|
112
|
+
cron = report_cron(config)
|
|
113
|
+
if cron:
|
|
114
|
+
print(cron)
|
|
115
|
+
return
|
|
89
116
|
if arg == "--json":
|
|
90
117
|
print(json.dumps(config, indent=2, ensure_ascii=False))
|
|
91
118
|
return
|
|
@@ -105,6 +105,24 @@ Read `mode` at M0 (`python3 <S>/wt_config.py mode`; WORKFLOW §8):
|
|
|
105
105
|
the owner asks for one (`--status-every N`). Conflict resolution inside an
|
|
106
106
|
approved merge stays this skill's job.
|
|
107
107
|
|
|
108
|
+
### Hosted projects
|
|
109
|
+
|
|
110
|
+
In a hosted multi-session project (WORKFLOW §8.5) the coordinator is the
|
|
111
|
+
project's main-chat session: no shell over the workers, no `claude agents`, no
|
|
112
|
+
`Monitor`. The loop below stays; its tools map like this:
|
|
113
|
+
|
|
114
|
+
| step | here | hosted project |
|
|
115
|
+
| --- | --- | --- |
|
|
116
|
+
| M0.1 adopt | `wm-resume.sh` | roadmap rows on `origin/<main>`, the thread list, open pull requests |
|
|
117
|
+
| M3 launch | `wm-launch.sh` | start a thread with the standard brief (`AGENTS.md` → Coordinator duties) |
|
|
118
|
+
| M4 watch | `wm-watch.sh` | thread messages and the report routine |
|
|
119
|
+
| M4 status | `CronCreate` | a recurring routine; no scheduling tool → setup thread with `references/report-routine.md` |
|
|
120
|
+
| READY, go | `SendMessage` | cross-session messages, both ways |
|
|
121
|
+
| M5 cleanup | `claude stop` + worktree removal | the thread resolves itself after its pull request is merged |
|
|
122
|
+
|
|
123
|
+
A fresh main-chat session starts the run by itself (`AGENTS.md` → Start of a
|
|
124
|
+
run); it does not wait for this skill to be invoked.
|
|
125
|
+
|
|
108
126
|
## The coordinator does not fix — it commissions
|
|
109
127
|
|
|
110
128
|
**Every code change goes to a worker.** A red test on `<main>`, a regression,
|
|
@@ -377,9 +395,21 @@ or a machine that slept emits no stage event, so without it the run stalls
|
|
|
377
395
|
silently.
|
|
378
396
|
|
|
379
397
|
**Autonomous mode:** the clock follows `autonomy.reports` instead of the
|
|
380
|
-
default: every `every` minutes (default
|
|
381
|
-
|
|
382
|
-
|
|
398
|
+
default: every `every` minutes (default 60) on full hours, inside `hours`
|
|
399
|
+
when set; `every: 0` = off. Build the cron from `every`, never from fixed
|
|
400
|
+
marks: `python3 <S>/wt_config.py --report-cron` prints it (`every` rounded up
|
|
401
|
+
to a multiple of 60, because routines fire at most hourly: 60 → `0 * * * *`,
|
|
402
|
+
120 → `0 */2 * * *`). It is one recurring job for the whole run, created at
|
|
403
|
+
the first launch and deleted at M7 or on the owner's "stop"/"pause"; reports
|
|
404
|
+
never re-arm the next one. An explicit `--status-every` still wins.
|
|
405
|
+
|
|
406
|
+
**No scheduling tool in this session** (a hosted project's main-chat
|
|
407
|
+
session): start one setup thread with the brief in
|
|
408
|
+
`references/report-routine.md`; it creates the routine (bound to this session
|
|
409
|
+
when the harness allows, else a fresh session per firing), sends back its id
|
|
410
|
+
and is closed. Record the id in memory; at M7 or on "stop"/"pause" have a
|
|
411
|
+
thread delete the routine by that id. Never skip the reports, never chain
|
|
412
|
+
one-off wake-ups instead.
|
|
383
413
|
|
|
384
414
|
`--status-every N` changes the period (build the minute list from an
|
|
385
415
|
off-mark offset: N=20 → `7,27,47 * * * *`); `--status-every 0` skips it. Arm
|
|
@@ -550,19 +580,20 @@ could not start.
|
|
|
550
580
|
**Covered by the release** — `integration.coveredByRelease: true` **and** the
|
|
551
581
|
header orders "Release: at the end" (the owner's approval, quoted): the
|
|
552
582
|
release pipeline runs the same full suite on the released commit, so a run
|
|
553
|
-
here would test that commit twice.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
583
|
+
here would test that commit twice. The order is then: **skip the run → close
|
|
584
|
+
the roadmap → hand the release to the owner.** Write in the report:
|
|
585
|
+
`integration <main>: covered by the release on <sha> (coveredByRelease)`.
|
|
586
|
+
The release itself is still the owner's (or follows the project's own rules)
|
|
587
|
+
— this skill never starts it. Its result gates the deploy, not the close; a
|
|
588
|
+
red result is handled as above: each red becomes a row and a worker. Without
|
|
589
|
+
that header order, run the suite here as usual.
|
|
559
590
|
|
|
560
591
|
**Then close the roadmap — only when the header orders it** ("Archive roadmap:
|
|
561
|
-
at the end") and the run above is green
|
|
562
|
-
|
|
563
|
-
WORKFLOW §5.2
|
|
564
|
-
|
|
565
|
-
|
|
592
|
+
at the end") and the run above is green, or is covered by the release (the
|
|
593
|
+
close never waits for the release; WORKFLOW §5.2): `/softure-roadmap --close
|
|
594
|
+
--auto` (WORKFLOW §5.2). The archived file is what the release reads, so the
|
|
595
|
+
close always comes before the release: tell the owner to release from
|
|
596
|
+
`context/foundation/archive/<date>-roadmap.md`. A failing gate (a leftover folder in `context/changes/`, a
|
|
566
597
|
row not settled) is fixed first — leftovers are archived, unsettled rows go to
|
|
567
598
|
a worker — never forced. The close is a documents-only commit on `<main>`; if a
|
|
568
599
|
push is ordered, push it too (a second, documents-only push, through the hook). No header order → leave the roadmap in
|
|
@@ -616,8 +647,9 @@ Everything else is decided and written into the report.
|
|
|
616
647
|
before its worktree is removed.
|
|
617
648
|
- **The run ends only when the roadmap is realised** (M7) — never after one
|
|
618
649
|
item, never after one batch.
|
|
619
|
-
- **The owner hears from the run on a clock** — a status cron
|
|
620
|
-
|
|
650
|
+
- **The owner hears from the run on a clock** — a status cron (or, without a
|
|
651
|
+
scheduling tool, the routine from `references/report-routine.md`) is armed
|
|
652
|
+
while anything is in flight (unless `--status-every 0`) and deleted at M7.
|
|
621
653
|
- **No tag, no release, no deploy, ever** (while `release.owner` is true).
|
|
622
654
|
**No push of `<main>`** — except the single push at M7 that the roadmap
|
|
623
655
|
header orders; the full integration suite on `<main>` follows it (or the
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Report routine: template for coordinators without a scheduling tool
|
|
2
|
+
|
|
3
|
+
Used when the coordinator cannot create a recurring routine itself (a hosted project's main-chat
|
|
4
|
+
session; `rules/AGENTS.md` → Roadmap reports). The coordinator starts one short **setup thread**
|
|
5
|
+
with the brief below. Every project gets the same routine, so every project gets the same report.
|
|
6
|
+
|
|
7
|
+
## Brief for the setup thread
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Setup thread: create the roadmap report routine (SOFTURE workflow, autonomous mode).
|
|
11
|
+
Coordinator session: <coordinator session id>.
|
|
12
|
+
1. Read the cron: `python3 .claude/skills/softure-worktree/scripts/wt_config.py --report-cron`
|
|
13
|
+
(or the same script under node_modules/@softure-ai/skills/skills/), and `timezone` from
|
|
14
|
+
context/workflow.json.
|
|
15
|
+
2. Create ONE recurring routine named "Roadmap report <roadmap name>", with that cron in that
|
|
16
|
+
timezone and the routine prompt from softure-worktree-manager/references/report-routine.md,
|
|
17
|
+
"Routine prompt", with the placeholders filled in. Bind it, in this order of preference:
|
|
18
|
+
a) to the coordinator's session (the routine wakes the coordinator);
|
|
19
|
+
b) otherwise to a fresh session per firing.
|
|
20
|
+
Never bind it to this thread: this thread is closed next.
|
|
21
|
+
3. Send the routine id and its first fire time to the coordinator's session, then close this
|
|
22
|
+
thread. Write no code, open no pull request.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Routine prompt
|
|
26
|
+
|
|
27
|
+
Fill in `<roadmap name>`, `<coordinator session id>` and `<owner/repo>`.
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
Roadmap report for <roadmap name> (SOFTURE workflow, AGENTS.md → Operating mode: autonomous → Roadmap reports).
|
|
31
|
+
If several firings queued up while busy, do one.
|
|
32
|
+
- Running as the coordinator: post the roadmap report in the main chat in the standard shape
|
|
33
|
+
(title, "X of N on <main>", the four-column table of the items not done yet, Decision, times),
|
|
34
|
+
in chatLanguage, times in timezone. Then run the heartbeat: give the go to every READY thread,
|
|
35
|
+
nudge stalled ones, start every item a merge unblocked. Nothing moved: one line.
|
|
36
|
+
- Running in a session of its own: read <owner/repo> on the main branch (context/foundation/roadmap.md,
|
|
37
|
+
open pull requests and their checks), send the coordinator's session <coordinator session id> the
|
|
38
|
+
facts in one message ("Report due <HH:MM>: X of N on <main>; <ID> <stage> (PR #N, checks); ...")
|
|
39
|
+
and ask it to post the report and run its heartbeat. Then end this session. Change nothing in
|
|
40
|
+
the repository.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Removing it
|
|
44
|
+
|
|
45
|
+
At the end of the run, or on the owner's "stop" or "pause", the coordinator asks a thread (the setup
|
|
46
|
+
thread's successor or any running thread) to delete the routine by its id, and clears the id from
|
|
47
|
+
memory once the thread confirms. A fresh coordinator finds the id in memory; without one, it asks a
|
|
48
|
+
thread to list the account's routines and delete the one named after the roadmap.
|