@softure-ai/skills 0.6.1 → 0.8.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 +4 -2
- package/WORKFLOW.md +22 -9
- package/package.json +1 -1
- package/rules/AGENTS.md +29 -21
- package/scripts/install.mjs +9 -3
- package/skills/softure-init/SKILL.md +7 -5
- package/skills/softure-roadmap/SKILL.md +8 -4
- package/skills/softure-roadmap/references/example-roadmap.md +4 -0
- package/skills/softure-shape/references/question-bank.md +1 -1
- package/skills/softure-worktree/SKILL.md +2 -2
- package/skills/softure-worktree/scripts/wt_config.py +29 -2
- package/skills/softure-worktree-manager/SKILL.md +20 -15
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ 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
|
|
@@ -49,7 +49,9 @@ owner's word: change `mode`, re-run the installer, commit both.
|
|
|
49
49
|
Per-project choices go into `context/workflow.json` → `install` and are applied on every install,
|
|
50
50
|
postinstall included: `"gitignore": false` commits the skills, and `"rules": ["workflow", "conventions"]`
|
|
51
51
|
injects only those sections of the rules block (sections: `language`, `workflow`, `conventions`; default:
|
|
52
|
-
all; the operating-mode section always ships
|
|
52
|
+
all; the operating-mode section always ships, and so does `language` unless `"allowNonEnglishCode": true`
|
|
53
|
+
records the owner's explicit exception). The repository is always English; `chatLanguage` is the language
|
|
54
|
+
of every message to the owner, `language` only the prose of `context/` artifacts. Put project-specific skills in folders without the `softure-` prefix: installed folders are
|
|
53
55
|
overwritten on every install. Uninstall:
|
|
54
56
|
`node node_modules/@softure-ai/skills/scripts/uninstall.mjs`.
|
|
55
57
|
|
package/WORKFLOW.md
CHANGED
|
@@ -44,9 +44,10 @@ or languages.
|
|
|
44
44
|
{
|
|
45
45
|
"mode": "manual", // "manual" (default when absent): the owner checks every step; "autonomous": the agent
|
|
46
46
|
// decides, merges and coordinates on its own. Rules for both: §8 and rules/AGENTS.md
|
|
47
|
-
"language": "en", // ISO code (e.g. "pl"):
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
"language": "en", // ISO code (e.g. "pl"): prose of the workflow artifacts under context/ only.
|
|
48
|
+
// Code, comments, commits and docs are always English (rules/AGENTS.md → Language)
|
|
49
|
+
"chatLanguage": "pl", // language of every message to the owner: chat, questions, thread results, reports;
|
|
50
|
+
// default: `language`. softure-init always writes it
|
|
50
51
|
"timezone": "Europe/Warsaw", // optional IANA zone for every time shown in reports; default: the machine's zone
|
|
51
52
|
"mainBranch": "master",
|
|
52
53
|
"gates": { // run before every implementation commit; all must pass
|
|
@@ -62,7 +63,8 @@ or languages.
|
|
|
62
63
|
"lookup": null, // optional: command printing the stored result for INTEGRATION_SHA (exit 0 green, 1 red, 3 none);
|
|
63
64
|
// wt-integration.sh reuses a green result for the same commit instead of starting a run
|
|
64
65
|
"coveredByRelease": false // true: the release pipeline runs the same full suite on the released commit, so a roadmap
|
|
65
|
-
// 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)
|
|
66
68
|
},
|
|
67
69
|
"migrations": { // optional: lets orchestrators detect collisions between parallel changes
|
|
68
70
|
"dir": "drizzle",
|
|
@@ -81,14 +83,17 @@ or languages.
|
|
|
81
83
|
"source": "roadmap", // "roadmap": items come from roadmap.md; "issues": the forge's open issues are the queue
|
|
82
84
|
"merge": "pr", // "pr": pull request with fresh <main>, merged on the forge after green checks (default);
|
|
83
85
|
// "push": local --no-ff merge, then push <main> through the pre-push hook
|
|
84
|
-
"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
|
|
85
88
|
},
|
|
86
89
|
"research": { // optional: extra knowledge sources softure-research should consult
|
|
87
90
|
"sources": ["docs/", "context/foundation/prd.md"]
|
|
88
91
|
},
|
|
89
92
|
"install": { // optional: read by the installer on every `npm install`
|
|
90
93
|
"gitignore": true, // false: commit the installed skills (e.g. cloud sessions that never run npm install)
|
|
91
|
-
"rules": ["language", "workflow", "conventions"]
|
|
94
|
+
"rules": ["language", "workflow", "conventions"], // sections of rules/AGENTS.md to inject; default: all.
|
|
95
|
+
// "language" ships even when omitted here
|
|
96
|
+
"allowNonEnglishCode": false // true only on the owner's explicit word for a codebase that stays non-English
|
|
92
97
|
}
|
|
93
98
|
}
|
|
94
99
|
```
|
|
@@ -306,9 +311,17 @@ the end", otherwise by the owner). Gates, all checked on `<main>` and reported t
|
|
|
306
311
|
2. `context/changes/` holds only its README, plus the folders of carried rows. Any other folder is archived first
|
|
307
312
|
(`softure-archive`, including work done without a plan), never deleted and never left behind;
|
|
308
313
|
3. when `integration` is configured: one green full run on the final `<main>` (its result line goes into the archive).
|
|
309
|
-
With `integration.coveredByRelease: true` and the order "Release: at the end", that run is the release's
|
|
310
|
-
|
|
311
|
-
|
|
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.
|
|
312
325
|
|
|
313
326
|
Then, in one commit (`docs(roadmap): close <slug>`):
|
|
314
327
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softure-ai/skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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
|
@@ -3,20 +3,24 @@
|
|
|
3
3
|
Installed by `@softure-ai/skills`. Project-specific rules outside this block take precedence,
|
|
4
4
|
except the language rule below (when this block carries it), which always applies.
|
|
5
5
|
|
|
6
|
-
## Language: English in
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
language
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
## Language: English in the repository, `chatLanguage` in the chat (mandatory)
|
|
7
|
+
|
|
8
|
+
Two languages, kept apart in every project, manual and autonomous alike:
|
|
9
|
+
|
|
10
|
+
- **Everything written to the repository is English:** code, identifiers, comments, docstrings, tests
|
|
11
|
+
and test names, commit messages, branch names, pull request titles and bodies, issue texts, script,
|
|
12
|
+
log and error output, file and folder names, configuration keys, README and docs, `AGENTS.md` and
|
|
13
|
+
skill instructions. This holds whatever language the owner writes in.
|
|
14
|
+
- **Everything said to the owner is in `chatLanguage`** from `context/workflow.json` (default:
|
|
15
|
+
`language`): chat replies, questions, thread results, reports. English code is no reason to answer
|
|
16
|
+
the owner in English, and a request in another language still produces English code.
|
|
17
|
+
- **Two narrow exceptions:** user-facing product copy lives in message dictionaries (e.g.
|
|
18
|
+
`messages/pl.ts`), never inline in code; the prose of workflow artifacts under `context/` follows
|
|
19
|
+
`language` (their headings stay English).
|
|
20
|
+
- When you touch a file with non-English code, comments or identifiers, translate them in the same
|
|
21
|
+
change. Translating a whole codebase is a change of its own, never a side effect.
|
|
22
|
+
- Before every commit, scan the diff for non-English text outside message dictionaries and
|
|
23
|
+
`context/` artifacts. Any hit is a failing gate, just like a red test.
|
|
20
24
|
|
|
21
25
|
## How work flows
|
|
22
26
|
|
|
@@ -155,10 +159,13 @@ irreversible action nobody asked for, a secret or access only the owner has, sco
|
|
|
155
159
|
suite runs per `integration.cadence`, never per push.
|
|
156
160
|
|
|
157
161
|
**Roadmap reports** (coordinator, pasted into the main chat, times in `timezone`):
|
|
158
|
-
- When: after every batch of thread starts, and every `autonomy.reports.every`
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
- When: after every batch of thread starts (an ad-hoc post), and every `autonomy.reports.every`
|
|
163
|
+
minutes (default 60) on full hours inside `autonomy.reports.hours`, only while work runs. Routines
|
|
164
|
+
fire at most once an hour, on the full hour, so the schedule is `every` rounded up to a multiple of
|
|
165
|
+
60 (60 → `0 * * * *`, 120 → `0 */2 * * *`; `wt_config.py --report-cron` prints it); a value below 60
|
|
166
|
+
runs hourly. **One recurring routine** drives the reports: the coordinator creates it when work
|
|
167
|
+
starts and deletes it when nothing runs, or on the owner's "stop" or "pause". Never a chain of
|
|
168
|
+
one-off wake-ups. 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
|
|
162
169
|
chat and that thread is closed at once.
|
|
163
170
|
- Shape, the same in every project, nothing else:
|
|
164
171
|
1. title: `Roadmap report <roadmap name>, <HH:MM>`;
|
|
@@ -181,7 +188,7 @@ irreversible action nobody asked for, a secret or access only the owner has, sco
|
|
|
181
188
|
Example, shown in English (roadmap prefix `SA`):
|
|
182
189
|
|
|
183
190
|
```markdown
|
|
184
|
-
**Roadmap report softure-auth, 14:
|
|
191
|
+
**Roadmap report softure-auth, 14:00**
|
|
185
192
|
Done: 47 of 50 on master (latest SA-31, SA-59).
|
|
186
193
|
|
|
187
194
|
| ID | What it does | Stage | Link |
|
|
@@ -194,7 +201,7 @@ irreversible action nobody asked for, a secret or access only the owner has, sco
|
|
|
194
201
|
Times: SA-35 ready to merge around 15:30; next report 15:00.
|
|
195
202
|
```
|
|
196
203
|
|
|
197
|
-
Nothing moved since the last report: one line (`
|
|
204
|
+
Nothing moved since the last report: one line (`15:00, no change: 47 of 50; SA-35 implement 2/3`).
|
|
198
205
|
|
|
199
206
|
**Bugs and gaps in SOFTURE packages.** A well-founded, non-duplicate bug or gap in an `@softure-ai/*`
|
|
200
207
|
package (or in this project's own scope) is filed right away as an issue in the repository that owns
|
|
@@ -219,7 +226,8 @@ through the project's own pipeline (version-bump pull request → merge → the
|
|
|
219
226
|
several threads on one package, the last to merge releases. No manual tags, no moved tags; a failed
|
|
220
227
|
release is fixed forward with a patch bump. A production deploy always needs the owner's separate
|
|
221
228
|
word. Ad-hoc fixes ride the next release instead of getting one of their own, unless the owner says
|
|
222
|
-
otherwise.
|
|
229
|
+
otherwise. A roadmap ordered to be archived is closed before its release, and every release of it
|
|
230
|
+
(retries and redeploys included) reads the archived file (WORKFLOW §5.2).
|
|
223
231
|
|
|
224
232
|
**Stop and limits.** "Stop" or "pause" from the owner stops everything: no new threads, report
|
|
225
233
|
routines removed, open threads finished or stopped at a safe point; record the pause in memory and do
|
package/scripts/install.mjs
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
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
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.
|
|
14
|
+
// section that is always injected, whatever "rules" says. The "language" section is mandatory too:
|
|
15
|
+
// only "allowNonEnglishCode": true (an owner's explicit exception) leaves it out.
|
|
15
16
|
|
|
16
17
|
import fs from "node:fs";
|
|
17
18
|
import path from "node:path";
|
|
@@ -82,13 +83,18 @@ function resolveMode(workflowConfig) {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
function resolveRuleSections(installConfig) {
|
|
85
|
-
|
|
86
|
+
const isLanguageOptional = installConfig.allowNonEnglishCode === true;
|
|
87
|
+
if (installConfig.rules === undefined) {
|
|
88
|
+
return Object.keys(RULE_SECTIONS).filter((key) => key !== "language" || !isLanguageOptional);
|
|
89
|
+
}
|
|
86
90
|
if (!Array.isArray(installConfig.rules)) throw new Error(`${WORKFLOW_CONFIG_PATH}: install.rules must be an array`);
|
|
87
91
|
const unknown = installConfig.rules.filter((key) => !(key in RULE_SECTIONS));
|
|
88
92
|
if (unknown.length > 0) {
|
|
89
93
|
throw new Error(`${WORKFLOW_CONFIG_PATH}: unknown install.rules ${unknown.join(", ")} (known: ${Object.keys(RULE_SECTIONS).join(", ")})`);
|
|
90
94
|
}
|
|
91
|
-
return installConfig.rules;
|
|
95
|
+
if (isLanguageOptional || installConfig.rules.includes("language")) return installConfig.rules;
|
|
96
|
+
// English code is not opt-out by omission: the section ships unless the owner set the exception.
|
|
97
|
+
return ["language", ...installConfig.rules];
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
// Keeps the preamble, the "## " sections whose key is selected and the section of the active mode;
|
|
@@ -61,14 +61,16 @@ start any work: no change, PRD or roadmap is created here.
|
|
|
61
61
|
- `.env` present -> add `cp ../{repo}/.env .env` to `worktree.setup`, after the install command.
|
|
62
62
|
- Knowledge sources: `docs/`, `adr/` or `docs/adr/`, an existing `context/foundation/prd.md`
|
|
63
63
|
-> candidates for `research.sources`.
|
|
64
|
-
3. **Pick the
|
|
64
|
+
3. **Pick the languages.** Code is always English (rules block → Language); two settings remain.
|
|
65
|
+
`chatLanguage`: the language the user writes in (always written; it is what every message to the
|
|
66
|
+
owner uses). `language`, the prose of `context/` artifacts: use `--language` when given. Otherwise use the language of the
|
|
65
67
|
existing docs/README; if mixed, use the language the user is writing in. In `--auto`
|
|
66
68
|
without a signal, use `en`.
|
|
67
69
|
4. **Pick the operating mode** (WORKFLOW §8). Use `--mode` when given, or what the user already
|
|
68
70
|
said ("this project is autonomous", "we run it by hand"). Otherwise, interactive: ask "How is
|
|
69
71
|
this project run?" with the options **manual** (recommended: the owner checks every step,
|
|
70
72
|
commits and merges by hand; client projects) and **autonomous** (the agent decides, merges green
|
|
71
|
-
work, coordinates parallel sessions and reports every
|
|
73
|
+
work, coordinates parallel sessions and reports every hour). In `--auto` without a signal,
|
|
72
74
|
use `manual`. An existing `mode` is never changed here; switching is the owner's explicit call
|
|
73
75
|
(WORKFLOW §8, "Switching mode").
|
|
74
76
|
5. **Show the plan.** Without `--auto`, print the proposed tree and the full `workflow.json`,
|
|
@@ -101,6 +103,7 @@ Required keys and the ones init writes by default:
|
|
|
101
103
|
{
|
|
102
104
|
"mode": "manual",
|
|
103
105
|
"language": "en",
|
|
106
|
+
"chatLanguage": "pl",
|
|
104
107
|
"mainBranch": "main",
|
|
105
108
|
"gates": { "typecheck": null, "lint": null, "test": null },
|
|
106
109
|
"integration": { "local": null, "remote": null },
|
|
@@ -122,14 +125,13 @@ only when it was detected or the user asked for it:
|
|
|
122
125
|
| Key | Default when absent | Init writes it when |
|
|
123
126
|
|---|---|---|
|
|
124
127
|
| `timezone` | the machine's zone | the user names a zone |
|
|
125
|
-
| `chatLanguage` | `language` | the owner talks in another language than the artifacts use (e.g. English repo, Polish owner) |
|
|
126
128
|
| `integration.cadence` | `"change"` (every change runs the suite before archive) | the user wants one run per roadmap (`"roadmap"`) |
|
|
127
129
|
| `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 |
|
|
128
130
|
| `integration.coveredByRelease` | `false` | the release pipeline runs the same full suite on the released commit |
|
|
129
131
|
| `worktree.cloudState` | `"main"` | the user runs cloud sessions that must keep state on the branch (`"branch"`) |
|
|
130
132
|
| `research.sources` | none | step 2 found docs, ADRs or a PRD (interactive: listed in the plan; `--auto`: only paths that exist) |
|
|
131
|
-
| `install` | gitignore the skills, inject all rule sections | the user wants committed skills or fewer rule sections |
|
|
132
|
-
| `autonomy` | roadmap as the work source, merge via pull request, reports every
|
|
133
|
+
| `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 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 |
|
|
133
135
|
|
|
134
136
|
Content of the README files, and a complete worked example (detection, plan, report) for a
|
|
135
137
|
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.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Read this before the interview. It holds what to ask in each phase (greenfield and brownfield
|
|
4
4
|
variants), the option sets to offer, how to push back, and the two anti-pattern scripts. The
|
|
5
|
-
questions are starting points: rephrase them in the user's domain and in `language
|
|
5
|
+
questions are starting points: rephrase them in the user's domain and in `chatLanguage` (default: `language`). Never
|
|
6
6
|
paste a whole phase at once; one question per message.
|
|
7
7
|
|
|
8
8
|
## The loop inside every phase
|
|
@@ -53,7 +53,7 @@ below.
|
|
|
53
53
|
|
|
54
54
|
**Project configuration.** Everything project-specific — the main branch, the
|
|
55
55
|
gates, the integration suite, the migrations folder, the worktree setup, the
|
|
56
|
-
|
|
56
|
+
chat language for reports (`chatLanguage`), whether releases belong to the owner — comes from
|
|
57
57
|
`context/workflow.json` (`WORKFLOW.md` §2). Read it at A0 with
|
|
58
58
|
`python3 <S>/wt_config.py --json`. Below, `<main>` is `mainBranch`, "the gates"
|
|
59
59
|
are every command in `gates`, and reports to the user are written in
|
|
@@ -839,7 +839,7 @@ python3 <S>/wt-roadmap.py ready <change-id>
|
|
|
839
839
|
|
|
840
840
|
### READY — report and stop
|
|
841
841
|
|
|
842
|
-
Write it in
|
|
842
|
+
Write it in `chatLanguage` (default: `language`), for someone who wasn't there:
|
|
843
843
|
|
|
844
844
|
```
|
|
845
845
|
<ID> `<change-id>` — ready to merge.
|
|
@@ -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
|
|
@@ -47,7 +47,7 @@ them, waits, and gives the merge signal itself — one change at a time.
|
|
|
47
47
|
**Project configuration** comes from `context/workflow.json` (`WORKFLOW.md`
|
|
48
48
|
§2): `<main>` is `mainBranch`, the default batch size is
|
|
49
49
|
`worktree.maxParallel`, migration collisions are detected through
|
|
50
|
-
`migrations`, and reports to the owner are written in `language
|
|
50
|
+
`migrations`, and reports to the owner are written in `chatLanguage` (default: `language`). Artifact
|
|
51
51
|
formats are those of `WORKFLOW.md` (§4 change.md, §5 roadmap, §6 plan).
|
|
52
52
|
|
|
53
53
|
Scripts: `<S>` = `<MAIN>/.claude/skills/softure-worktree/scripts` (worker
|
|
@@ -377,9 +377,13 @@ or a machine that slept emits no stage event, so without it the run stalls
|
|
|
377
377
|
silently.
|
|
378
378
|
|
|
379
379
|
**Autonomous mode:** the clock follows `autonomy.reports` instead of the
|
|
380
|
-
default: every `every` minutes (default
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
default: every `every` minutes (default 60) on full hours, inside `hours`
|
|
381
|
+
when set; `every: 0` = off. Build the cron from `every`, never from fixed
|
|
382
|
+
marks: `python3 <S>/wt_config.py --report-cron` prints it (`every` rounded up
|
|
383
|
+
to a multiple of 60, because routines fire at most hourly: 60 → `0 * * * *`,
|
|
384
|
+
120 → `0 */2 * * *`). It is one recurring job for the whole run, created at
|
|
385
|
+
the first launch and deleted at M7 or on the owner's "stop"/"pause"; reports
|
|
386
|
+
never re-arm the next one. An explicit `--status-every` still wins.
|
|
383
387
|
|
|
384
388
|
`--status-every N` changes the period (build the minute list from an
|
|
385
389
|
off-mark offset: N=20 → `7,27,47 * * * *`); `--status-every 0` skips it. Arm
|
|
@@ -550,19 +554,20 @@ could not start.
|
|
|
550
554
|
**Covered by the release** — `integration.coveredByRelease: true` **and** the
|
|
551
555
|
header orders "Release: at the end" (the owner's approval, quoted): the
|
|
552
556
|
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
|
-
|
|
557
|
+
here would test that commit twice. The order is then: **skip the run → close
|
|
558
|
+
the roadmap → hand the release to the owner.** Write in the report:
|
|
559
|
+
`integration <main>: covered by the release on <sha> (coveredByRelease)`.
|
|
560
|
+
The release itself is still the owner's (or follows the project's own rules)
|
|
561
|
+
— this skill never starts it. Its result gates the deploy, not the close; a
|
|
562
|
+
red result is handled as above: each red becomes a row and a worker. Without
|
|
563
|
+
that header order, run the suite here as usual.
|
|
559
564
|
|
|
560
565
|
**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
|
-
|
|
566
|
+
at the end") and the run above is green, or is covered by the release (the
|
|
567
|
+
close never waits for the release; WORKFLOW §5.2): `/softure-roadmap --close
|
|
568
|
+
--auto` (WORKFLOW §5.2). The archived file is what the release reads, so the
|
|
569
|
+
close always comes before the release: tell the owner to release from
|
|
570
|
+
`context/foundation/archive/<date>-roadmap.md`. A failing gate (a leftover folder in `context/changes/`, a
|
|
566
571
|
row not settled) is fixed first — leftovers are archived, unsettled rows go to
|
|
567
572
|
a worker — never forced. The close is a documents-only commit on `<main>`; if a
|
|
568
573
|
push is ordered, push it too (a second, documents-only push, through the hook). No header order → leave the roadmap in
|