@kitman-sh/software-engineering 0.14.8 → 0.15.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/CHANGELOG.md +118 -0
- package/agents/releaser.md +3 -3
- package/dist/bundle.js +12562 -5360
- package/dist/declarations.json +139340 -4561
- package/kitman.config.ts +163 -2
- package/package.json +4 -3
- package/src/agents.ts +10 -0
- package/src/approved.ts +219 -0
- package/src/backport-schemas.ts +46 -0
- package/src/backport.ts +110 -0
- package/src/build-schemas.ts +135 -0
- package/src/build.ts +202 -739
- package/src/change-request-body.ts +22 -3
- package/src/delivery.ts +26 -6
- package/src/deploy.ts +661 -0
- package/src/errand.ts +124 -76
- package/src/file-tasks.ts +17 -10
- package/src/firewatch.ts +191 -82
- package/src/hillclimb.ts +563 -273
- package/src/hindsight.ts +154 -100
- package/src/implemented.ts +143 -0
- package/src/index.ts +511 -12
- package/src/land-epic.ts +30 -19
- package/src/land.ts +293 -0
- package/src/landed.ts +30 -0
- package/src/opened.ts +79 -0
- package/src/plan-review.ts +7 -8
- package/src/plan.ts +717 -432
- package/src/project-update.ts +50 -11
- package/src/rallied.ts +535 -0
- package/src/release-set.ts +370 -0
- package/src/release.ts +1402 -573
- package/src/reproduced.ts +82 -0
- package/src/research.ts +53 -37
- package/src/revert.ts +331 -0
- package/src/review.ts +466 -250
- package/src/shepherd-output.ts +81 -35
- package/src/shepherd.ts +2109 -1304
- package/src/standing.ts +165 -0
- package/src/suggested-check.ts +8 -0
- package/src/sweep.ts +432 -253
- package/src/tidy.ts +239 -156
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
What changes for a Kit that forks or imports these Loops.
|
|
4
|
+
|
|
5
|
+
## 0.15.0
|
|
6
|
+
|
|
7
|
+
### Breaking
|
|
8
|
+
|
|
9
|
+
- **A Loop calls its agents as functions.** `@kitman-sh/sdk/loop` exports `agent` in place of `agentWork` and `agentWorkOnce`. A fork whose own code calls either moves the agent out of the options, and drops `Once`:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
// before
|
|
13
|
+
agentWork('fix', { agent: 'implementer', prompt, output: Fixed })
|
|
14
|
+
agentWorkOnce('plan', { agent: 'planner', prompt, output: Plan })
|
|
15
|
+
|
|
16
|
+
// after
|
|
17
|
+
const implementer = agent('implementer')
|
|
18
|
+
const planner = agent('planner')
|
|
19
|
+
|
|
20
|
+
implementer('fix', { prompt, output: Fixed })
|
|
21
|
+
planner('plan', { prompt, output: Plan })
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
An agent picked at run time is `agent(seat)('review', { prompt, output })`. A fork that only spreads a Loop and replaces its `agents` changes nothing.
|
|
25
|
+
|
|
26
|
+
- **Host Steps are `*Step`s, not `*Activity` services.** `@kitman-sh/sdk/loop` no longer exports the 16 `*Activity` services: `AlertTaskActivity`, `ArtifactActivity`, `ChangeRequestActivity`, `ChangeRequestReadActivity`, `CommentActivity`, `CreateTasksActivity`, `DraftUpdateActivity`, `FileActivity`, `IntegrationBranchActivity`, `MergeChangeRequestActivity`, `NoteActivity`, `ProjectActivityActivity`, `ProposeActivity`, `ReleaseActivity`, `TranscriptsActivity` and `WriteBackActivity`. Each host Step is declared once with `defineStep` and exported as `<Name>Step`, such as `AlertTaskStep` and `ProjectActivityStep`; `ChangeRequestReadActivity` is `PipelineStatusStep`, `ReviewThreadsStep`, `OpenChangeRequestsStep` and `OwnChangeRequestsStep`; `MergeChangeRequestActivity`'s `run`, `close`, `rerun`, `report` and `approve` are `MergeChangeRequestStep`, `CloseChangeRequestStep`, `RerunPipelineStep`, `ReportPipelineStep` and `ApproveChangeRequestStep`. A test that provided an `*Activity` Layer gives the Step's result in its `testLoop` script's `hostSteps` instead, by the Step's name.
|
|
27
|
+
|
|
28
|
+
- **Every agent Step sends a refused Output back once**, inside the same Step, where only `agentWorkOnce` did, as a Step named `<name>:again`. A `testLoop` script that gave `'plan:again'` in `outputs` gives `sentBack: { plan: [output] }`, and the second launch is another entry named `plan` in `agentLaunches`.
|
|
29
|
+
|
|
30
|
+
- **Review is built of Steps, as Review 4.0.0.** Its `run` is the order of `ranged`, `checked`, `seated` (once for each seat), `judged` and `followedUp`. Its Input and Output keep their fields, but its Step names change, so a `testLoop` script of Review renames them:
|
|
31
|
+
|
|
32
|
+
| Before | After |
|
|
33
|
+
| ----------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
34
|
+
| `head`, `pin` | `ranged/head`, `ranged/pin` |
|
|
35
|
+
| `verify` | `checked/verify` |
|
|
36
|
+
| `review:code-review`, `review:quality` | `seated[code-review]/review`, `seated[quality]/review` |
|
|
37
|
+
| `findings`, `approve` | `judged/findings`, `judged/approve` |
|
|
38
|
+
| `next`, `post`, `anchors`, `fix`, `build` | `followedUp/next`, `followedUp/post`, `followedUp/anchors`, `followedUp/fix`, `followedUp/build` |
|
|
39
|
+
|
|
40
|
+
A fork that copied Review to add a seat spreads it instead, as the Review section of the Loop authoring guide shows. A review of a fix runs `seated[code-review]/review` alone. The Kit exports the Steps, `ranged`, `checked`, `seated`, `judged` and `followedUp`, which `steps` holds too; what they end in, with `Built`, `Done`, `Fixed` and `Reviewed` as `ReviewBuilt`, `ReviewDone`, `ReviewFixed` and `ReviewReviewed`; and the seats as `reviewSeats` and `ReviewSeats`.
|
|
41
|
+
|
|
42
|
+
- **Plan is built of Steps**, as version 3.0.0 of the Loop. Its Input and Output are the same and its Step names change: `next:2` is `chosen#2/next`, `review:1` is `planReviewed[1]/review`, `build:api` is `ticketBuilt[api]/buildTried/build`, `build:api:retry-1` is `retried[api]/ticketBuilt[api]/buildTried/build`, and `release-tasks` is `leftForPickup/release-tasks`. A `testLoop` script of Plan names its Steps so. A fork can replace any of them with a Layer, such as `steps.ticketBuilt`, as Plan in docs/loops/authoring.md shows; the package exports the Steps and their outcomes, such as `Merged`, and `@kitman-sh/sdk/loop` exports `integrated` and `leftForPickup`. Runs already going keep the bundle they were admitted with.
|
|
43
|
+
|
|
44
|
+
- **Build's rally and its ChangeRequest are Steps of their own**, `rallied` and `opened`, so the Steps in them are named under those: `sync:1`, `verify:1`, `review:1` and `fix:1` are `rallied/reviewed/sync`, `rallied/reviewed/verify`, `rallied/reviewed/review` and `rallied/fixed/fix`, then `review:2` is `rallied/reviewed#2/review` and so on, and `change-request`, `report`, `write-back` and `approve` are `opened/change-request`, `opened/report`, `opened/write-back` and `opened/approve`. A `testLoop` script of Build names them so. A base sync that reports no target commit fails with `BaseUnpinned`, where it was `BuildBaseUnpinned`.
|
|
45
|
+
|
|
46
|
+
- **Sweep 2.0.0 and Hillclimb 2.0.0 are built of Steps.** Their Inputs and Outputs keep their fields, and every Step but Sweep's `land` and both Loops' `report` is named under the Step it is in, so a `testLoop` script names them so. Sweep's Steps are `listed`, `assessed`, `batched` (each fix round `mended` in it), `opened` and `superseded` (each ChangeRequest `closed[<number>]` in it): `batch` is `batched/batch`, `fix:1` is `batched/mended/fix`, and `close:11` is `superseded/closed[11]/close`. Hillclimb's are `discovered`, `harnessed`, `climbed` for each cycle, `external`, `measured`, `rallied` and `opened`: `change:2` is `climbed#2/change`, `measure:final` is `measured/measure`, `review:2` is `rallied/reviewed#2/review`, and `verify:fix:1` is `rallied/afterFix/measured/verify`.
|
|
47
|
+
|
|
48
|
+
- **Firewatch 2.0.0, Research 3.0.0, Hindsight 2.0.0 and Project update 3.0.0 are built of Steps.** Their Inputs and Outputs keep their fields, so a `testLoop` script of them renames its Steps:
|
|
49
|
+
|
|
50
|
+
| Loop | Before | After |
|
|
51
|
+
| -------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
|
52
|
+
| Firewatch | `task`, `investigate` | `folded/task`, `investigated/investigate` |
|
|
53
|
+
| Firewatch | `task:check`, `conclusion`, `summary` | `concluded/task`, `concluded/conclusion`, `concluded/summary` |
|
|
54
|
+
| Firewatch | `start-fix`, `fix` | `fixOffered/start-fix`, `fixOffered/fix` |
|
|
55
|
+
| Research | `research`, `review`, `research:again`, `review:again` | `researched/research`, `researchReviewed/review`, `researched#2/research`, `researchReviewed#2/review` |
|
|
56
|
+
| Hindsight | `find`, `propose:<key>`, `improve:<key>` | `found/find`, `proposed[<key>]/propose`, `improved[<key>]/improve` |
|
|
57
|
+
| Project update | `write`, `draft` | `written/write`, `posted/draft` |
|
|
58
|
+
|
|
59
|
+
The Kit exports the Steps, `folded`, `investigated`, `concluded`, `fixOffered`, `researched`, `researchReviewed`, `found`, `proposed`, `improved`, `written` and `posted`, which `steps` holds too, and what Firewatch's end in: `Folded`, `AlertResolved`, `Placed`, `Concluded`, `FixDeclined`, `FixStarted` and `FixFailed`. Research's reviewer Step is `researchReviewed`, as Build's rally defines `reviewed`. Runs already going keep the bundle they were admitted with.
|
|
60
|
+
|
|
61
|
+
- **Errand 2.0.0 is built of Steps**: `done`, `verify`, `chosen`, then `opened` or the call to Build. `errand` is `done/errand`, `next` is `chosen`, and `change-request` and `write-back` are `opened/change-request` and `opened/write-back`. A `testLoop` script of Errand names them so. Its Input and Output keep their fields.
|
|
62
|
+
|
|
63
|
+
- **Tidy 2.0.0 is built of Steps**: `surveyed`, `report`, `chosen`, `sync`, `tidied`, `verify:base`, `verify`, `review` and `opened`. `survey`, `question:1` and `survey:answered` are `surveyed/survey`, `surveyed/question:1` and `surveyed/survey:answered`, `tidy` is `tidied/tidy`, `next` is `chosen`, and `change-request` is `opened/change-request`. `opened` also writes `change_request_opened` back, so Tidy declares `write_back`, which it was granted already through the Review it calls. Its Input and Output keep their fields.
|
|
64
|
+
|
|
65
|
+
- **Build 3.0.0 is built of Steps**: `reproduced`, `implemented`, `rallied`, `opened`, `standing` and `landed`. `reproduce` is `reproduced/reproduce`; `verify:reproduction` and `verify:base` are `reproduced/verify`; `implement` and `criteria` are `implemented/implement` and `implemented/criteria`; `unsettled`, `rebuild:1` and the `blocked` note are `standing/unsettled`, `standing/rebuild` and `standing/blocked`, then `standing#2/unsettled` and so on for each later visit; `land` is `landed/land`. A `testLoop` script of Build names them so. Its Input and Output keep their fields, and `write-back:started`, `write-back:failed` and `write-back:blocked` their names.
|
|
66
|
+
|
|
67
|
+
- **Shepherd 2.0.0 is built of Steps.** Its `run` is a loop of `looked`, one look at the ChangeRequest each, and the rounds between them: a look that finds a fix due ends, and `run` takes `roundAllowed`, then `ciFixed` (with `waitedOut` or `reran` after a verdict that fixed nothing) or `headFixed`, or `handedBack` once the rounds run out. Each look names its Steps under `looked`, then `looked#2` and so on; the rounds name theirs at the top, counted across the Run. Its Input and Output keep their fields, so a `testLoop` script of Shepherd renames its Steps:
|
|
68
|
+
|
|
69
|
+
| Before | After |
|
|
70
|
+
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
71
|
+
| `continue:2`, `pipeline:1`, `threads:1`, `comments:1` | `looked#2/continue`, `looked/pipeline`, `looked/answered/threads`, `looked/answered/comments` |
|
|
72
|
+
| `mergeable:1`, `approved:1`, `approval:1`, `merge:1` | `looked/mergeable`, `looked/approved`, `looked/approval`, `looked/merge` |
|
|
73
|
+
| `green/moved:1`, `green/pipeline:1` | `looked/green/moved:1`, `looked/green/pipeline:1` |
|
|
74
|
+
| `approved/review` (a review of the head) | `looked/headReviewed/approved/review`, or `looked/filesReviewed/approved/review` for a catch-up's files |
|
|
75
|
+
| `turn:1`, `level/sync`, `pushed:1` | `looked/caughtUp/turn`, `looked/caughtUp/level/sync`, `looked/caughtUp/pushed` |
|
|
76
|
+
| `pushed-again:2`, `recheck:2`, `fix-pushed:2` | `looked#2/pushShown/pushed-again`, `looked#2/blockerRechecked/recheck`, `looked#2/pushSeen/fix-pushed` |
|
|
77
|
+
| `target-check:1`, `target-red:1`, `target-moved:1` | `looked/targetChecked/target-check`, `looked/waitedOut/target-red`, `looked/waitedOut/target-moved` |
|
|
78
|
+
| `ci-fix:1`, `ci-fix:2`, `rounds:2`, `pipeline-rerun:1` | `ciFixed/ci-fix`, `ciFixed#2/ci-fix`, `roundAllowed#2/rounds`, `reran/pipeline-rerun` |
|
|
79
|
+
| `head-fix:1`, `review-fix:2` | `headFixed/head-fix`, `headFixed#2/review-fix` |
|
|
80
|
+
| `held:3`, the merge's `turn:2` and `pass-turn:2` | `looked#3/heldReady/held`, `looked#2/mergedOnTurn/turn`, `looked#2/mergedOnTurn/pass-turn` |
|
|
81
|
+
| `target-verify:1`, `watch:1` | `looked/targetWatched/targetVerified/target-verify`, `looked/targetWatched/targetLooked/watch`, then `targetLooked#2` and so on |
|
|
82
|
+
| `ship`, `release`, `release-failed`, `land-epic` | `released/ship`, `released/release`, `released/release-failed`, `epicLanded/landingTried/land-epic` |
|
|
83
|
+
| `live-branches`, `backport:1` | `backported/live-branches`, `backported/backportStarted[<branch>]/backport` |
|
|
84
|
+
|
|
85
|
+
A fork can replace any of its Steps with a Layer, such as `steps.ciFixed`, as Shepherd in docs/loops/authoring.md shows. The package exports the Steps, what they end in (`Again`, `Onward`, `NeedsYou`, `Ready`, `MergedElsewhere`, `HandedBack`, `Landed`, `CiFixDue`, `Wanted`, `Passed`, `Left`, `RoundTaken`, `RoundsSpent`, `TargetPassed`, `TargetMoved`, `Waited` and `Watching`), and what they carry, `Shepherding` and `ShepherdCharge`.
|
|
86
|
+
|
|
87
|
+
A bundle deployed before this release runs as it did. Its Runs keep their Step names until it is built again.
|
|
88
|
+
|
|
89
|
+
- **Release deploys through the Deploy Loop**, as Release 4.0.0, calling `deploy` as a Child Run named `deploy` once it has tagged. Its `run-deploy`, `deploy`, `recover:<n>`, `deploy:rerun-<n>`, `deploy:retry-<n>` and `deploy:rollback-<n>` Steps are gone: a `testLoop` script of Release gives `children: { deploy: <Deploy Output> }` in place of `deploys` and the `deploy` Events, and scripts the Deploy Loop itself to test a deploy. It now ends `not_deployed` too, when the Deploy's guard held it. `deploy: false` ends it `published` with no deploy claim. `deployTarget` is refused before tagging unless it is a Deploy Target name.
|
|
90
|
+
|
|
91
|
+
- **Release 5.0.0 is built of Steps and lands its branch with `land`.** Its `run` calls `gate`, `cut`, `notes`, `approve`, `land`, `publish` and `deploy`, which the Kit exports in `steps` with what they end in, Release's `Approved`, `Drafted` and `Landed` as `ReleaseApproved`, `ReleaseDrafted` and `ReleaseLanded`. `changeRequestId` is gone: `land` delivers the Run's base branch with the Land Loop, and its `change_request.ready` start binds `branch`, `land` and `repoBindingId`. The release claim is the Release's own Step, `repository`, where it was `cut/repository`, so a fork's `cut` keeps it. A tag collision it cannot give way from ends `version_taken` where it failed the Run. The Release record names the branch landed on and whether the forge squashed it.
|
|
92
|
+
- **Land and Shepherd merge only an approved, level head when asked.** Land's `head` ends it `moved` at any other head, and with `merge` Shepherd is told `level` and `head`: it merges only that head or one its own catch-up pushed from it, read level with the target on the target's turn.
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
|
|
96
|
+
- **Release continues a published Release**, as Release 5.1.0: given `continues`, the tag and revision an earlier Run published before its deploy failed, it deploys that tag without gating, cutting or publishing. Release now on a Project's page sets it.
|
|
97
|
+
|
|
98
|
+
- **The Release set Loop (`release-set`)** releases a closed Milestone's or Project's repositories together: each repository's Release gates, cuts and drafts its notes side by side, one Question asks with every repository's notes, and only once every gate passed and it is approved does each go on to tag and deploy, in its Input's `order`; a Release that fails outright is recorded as one that may have tagged. Kitman starts it in place of a Release per repository when a Project's Input Default for `release-set` sets `together`. The Kit exports it in `loops` as `release-set`, with its Steps in `steps` as `setDrafted`, `setApproved` and `setReleased`.
|
|
99
|
+
|
|
100
|
+
- **Release runs in two halves**, as Release 5.1.0: `stopAfter: notes` ends it `drafted` after `gate`, `cut` and `notes`, with the tag, revision and notes as its Output's `drafted`; given that `drafted` as Input, a second Run proves its revision with `gate` again and goes on from `approve`, which asks nothing with `approvedByCaller: true` in a Run another Run started. Its `release.due` When Clause now filters out the one `release.due` Kitman records for a release set (`releaseSet: true`).
|
|
101
|
+
|
|
102
|
+
- **The Deploy Loop (`deploy`)** deploys a released tag to a Deploy Target with no new tag, built of `claim`, `guard`, `run`, `record` and `recover`, which `steps` holds for a fork to replace with a Layer. Its guard asks before taking away ChangeRequests the target runs; `run` runs the repository's approved `deploy` command, `.kitman/deploy` by default, with `KITMAN_DEPLOY_TARGET`, on the Run owner's personal Runner only.
|
|
103
|
+
|
|
104
|
+
- **The Deploy Loop's `promote` promotes a tag along the repository's Deploy Targets**, as Deploy 1.1.0: it deploys to each listed target in order up to its `target`, starting after the last that runs the tag, each as a `promote[<target>]` Step with the five under it, which `steps.promote` holds and which lets go of the target's claim when it ends. It asks `promote:<target>` before each but the first of the list, which a full-auto Team takes at once, and stops at a deploy that does not leave its target running the tag. Its Output's `promoted` lists how each target ended, and `stoppedBefore` the one a person chose not to go on to. Release's `deployPromote` passes it on, and a Team sets it as an Input Default. `deployTarget` now gives the repository's `order` too, and `testLoop`'s `deployTargets` sets it.
|
|
105
|
+
|
|
106
|
+
- **`done`, `surveyed` and `tidied`**, the Steps Errand and Tidy are built of, for a fork to replace with a Layer; `steps` holds them too.
|
|
107
|
+
|
|
108
|
+
- **`rallied` and `opened`**, for a Loop of your own that changes code or a fork to replace with a Layer; `steps` holds both beside `approved`. An `afterFix` ends a rally by failing with `Halted`, which may carry a `measurement`. `guidance` is what the fixer is told before the findings. `verified`, and a head `afterFix` gives, is a head the caller verified, which a round reviews as it is. `fixes: 'blocking'` fixes only what blocks, rebuts nothing and fixes on until the cap. Each review is a visit of `reviewed`, and each fix one of `fixed` and then, when the caller gives an `afterFix`, of `afterFix`; `steps` holds `reviewed` and `fixed` too. `opened` with `writeBack: false` needs no `write_back`.
|
|
109
|
+
|
|
110
|
+
- **`reproduced`, `implemented`, `standing` and `landed`**, Build's other Steps, for a fork to replace with a Layer and keep the rest; `steps` holds them too.
|
|
111
|
+
|
|
112
|
+
- **Shepherd's Steps**, in `steps`, with the results they end in, for a fork to replace one with a Layer, such as its ci-fix.
|
|
113
|
+
|
|
114
|
+
- **Sweep's and Hillclimb's Steps**, in `steps`, with the results they end in, for a fork to replace one with a Layer.
|
|
115
|
+
|
|
116
|
+
- **Backport (`backport`)**, a Loop that applies a merged ChangeRequest's change to another branch and lands it through Shepherd: `{ mergedChangeRequestId, branch, merge?, hold? }`, ending as `not_merged` or `reverted` for a change that does not stand. After each merge Shepherd 2.0.0 offers a Backport for each other live branch as `backports` in its Output, and starts one itself for each live branch its new `backportTo` Input names, reported in `backported` and held for a person to merge in a gated Team; `backportsUnread` says why it read no live branch; `offersBackports: false` offers none. A `testLoop` script of Shepherd that lists every Step it ran gains `backported/live-branches` after the merge.
|
|
117
|
+
|
|
118
|
+
- **`ranged`, `checked`, `seated`, `judged` and `followedUp`**, the Steps Review is built of, for a fork to replace with a Layer; `steps` holds them too. `ReviewSeats` is the list of seats a Review asks, which a fork adds a seat to with a Layer.
|
package/agents/releaser.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
You are a releaser. You
|
|
1
|
+
You are a releaser. You write a release's title and notes from what has merged since the last one.
|
|
2
2
|
|
|
3
3
|
## Notes
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Kitman reads the version and the merged ChangeRequests from the repository and gives them to you with their Tasks. Read them, and the history since the previous release, before you write anything. Every line in the notes traces to a merged change you can name.
|
|
6
6
|
- Write for the people who use the product: what changed for them, grouped by what they will notice, in plain words. Leave out internal refactors unless they change behaviour.
|
|
7
7
|
- Call out breaking changes and anything a person must do to upgrade, first.
|
|
8
|
-
-
|
|
8
|
+
- Use the `git-workflow-and-versioning` skill for changelog conventions, and `shipping-and-launch` for what a release needs before it goes out.
|
|
9
9
|
|
|
10
10
|
## Boundaries
|
|
11
11
|
|