@kitman-sh/software-engineering 0.44.0 → 0.46.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/dist/bundle.js +363 -48
- package/dist/declarations.json +195 -195
- package/kitman.config.ts +1 -1
- package/package.json +3 -3
- package/src/plan.ts +14 -15
- package/src/release.ts +2 -2
- package/src/tidy.ts +1 -1
package/kitman.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitman-sh/software-engineering",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "Everything for building software: Loops, their Agents, the skills they use and the Ponytail plugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"LICENSE.md"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@kitman-sh/sdk": "0.
|
|
22
|
+
"@kitman-sh/sdk": "0.46.0",
|
|
23
23
|
"effect": "^4.1.2"
|
|
24
24
|
},
|
|
25
25
|
"kitman": {
|
|
26
26
|
"bundle": "dist/bundle.js",
|
|
27
|
-
"digest": "
|
|
27
|
+
"digest": "ceee0206b331b790ea5e430b20ddcf171ca23f2e75447ae5788c4725c1233f69",
|
|
28
28
|
"protocolVersion": 5,
|
|
29
29
|
"declarations": "dist/declarations.json",
|
|
30
30
|
"setup": {
|
package/src/plan.ts
CHANGED
|
@@ -10,19 +10,18 @@ import {
|
|
|
10
10
|
CreateTasksResult,
|
|
11
11
|
defineLoop,
|
|
12
12
|
integrated,
|
|
13
|
-
isPlanApproval,
|
|
14
13
|
leftForPickup,
|
|
15
14
|
mergeChangeRequest,
|
|
16
15
|
PlanAddressed,
|
|
17
16
|
PlanApproval,
|
|
18
17
|
PlanDeclined,
|
|
18
|
+
planReviewDecision,
|
|
19
19
|
type PlanReview,
|
|
20
20
|
readPlanReview,
|
|
21
21
|
planWaves,
|
|
22
22
|
IntegrationBranch,
|
|
23
23
|
PlanTicket,
|
|
24
|
-
step
|
|
25
|
-
UnattendedPlanApproval
|
|
24
|
+
step
|
|
26
25
|
} from '@kitman-sh/sdk/loop'
|
|
27
26
|
import * as Effect from 'effect/Effect'
|
|
28
27
|
import * as Schema from 'effect/Schema'
|
|
@@ -449,7 +448,7 @@ export const planReviewed = step('planReviewed', {
|
|
|
449
448
|
key: ({ draft }) => String(draft.revision),
|
|
450
449
|
run: ({ draft: { plan, revision, disputed, asked }, implement }) =>
|
|
451
450
|
Effect.gen(function* () {
|
|
452
|
-
const answer = yield* ask('review', {
|
|
451
|
+
const { answer: decision, by } = yield* ask('review', {
|
|
453
452
|
prompt: [
|
|
454
453
|
`Review revision ${revision} of the plan "${plan.title}": approve it, or request changes by commenting on what should change.`,
|
|
455
454
|
...(disputed.length === 0
|
|
@@ -458,17 +457,17 @@ export const planReviewed = step('planReviewed', {
|
|
|
458
457
|
`The plan reviewer still disputes ${disputed.length} point${disputed.length === 1 ? '' : 's'}, listed at the end of the plan.`
|
|
459
458
|
])
|
|
460
459
|
].join(' '),
|
|
461
|
-
|
|
460
|
+
answer: planReviewDecision(revision),
|
|
462
461
|
recommended: PlanApproval,
|
|
463
462
|
recommendationReason: 'Approve it once the plan reads right; until then the Run waits for you.',
|
|
464
|
-
...(implement ? { default:
|
|
465
|
-
unattendedAuto:
|
|
463
|
+
...(implement ? { default: PlanApproval, timeout: '1 hour' } : { default: null }),
|
|
464
|
+
unattendedAuto: PlanApproval
|
|
466
465
|
})
|
|
467
466
|
|
|
468
|
-
if (
|
|
469
|
-
return new PlanApproved({ revision, reviewed: disputed.length === 0 ||
|
|
467
|
+
if ('approve' in decision)
|
|
468
|
+
return new PlanApproved({ revision, reviewed: disputed.length === 0 || by === 'person' })
|
|
470
469
|
|
|
471
|
-
const review = readPlanReview(
|
|
470
|
+
const review = readPlanReview(decision.planReview, documentText(plan, disputed))
|
|
472
471
|
|
|
473
472
|
const revised = yield* planner('revise-plan', {
|
|
474
473
|
prompt: revisePrompt(documentText(plan, disputed), review),
|
|
@@ -558,18 +557,18 @@ export const refined = step('refined', {
|
|
|
558
557
|
})
|
|
559
558
|
|
|
560
559
|
const changed = yield* planner('refine-plan', {
|
|
561
|
-
prompt: refinePrompt(documentText(plan, disputed), words),
|
|
560
|
+
prompt: refinePrompt(documentText(plan, disputed), words.text),
|
|
562
561
|
output: Plan
|
|
563
562
|
})
|
|
564
563
|
|
|
565
|
-
const askedNow = [...asked, words]
|
|
564
|
+
const askedNow = [...asked, words.text]
|
|
566
565
|
const after = yield* checked({ plan: changed }, askedNow)
|
|
567
566
|
|
|
568
567
|
yield* storePlan(after, revision + 1)
|
|
569
568
|
yield* artifact('changes', {
|
|
570
569
|
kind: 'plan_changes',
|
|
571
570
|
title: `Revision ${revision + 1} of ${after.plan.title}`,
|
|
572
|
-
text: changelog(plan, after.plan, words)
|
|
571
|
+
text: changelog(plan, after.plan, words.text)
|
|
573
572
|
})
|
|
574
573
|
|
|
575
574
|
return new Drafted({
|
|
@@ -870,7 +869,7 @@ export const failureAnswered = step('failureAnswered', {
|
|
|
870
869
|
default: null
|
|
871
870
|
})
|
|
872
871
|
|
|
873
|
-
return new Steer({ words })
|
|
872
|
+
return new Steer({ words: words.text })
|
|
874
873
|
})
|
|
875
874
|
})
|
|
876
875
|
|
|
@@ -1101,7 +1100,7 @@ const outputOfPlan = ({ plan, rejected }: Drafted, docs: Drafted['docs'], asTask
|
|
|
1101
1100
|
*/
|
|
1102
1101
|
export default defineLoop({
|
|
1103
1102
|
id: 'plan',
|
|
1104
|
-
version: '
|
|
1103
|
+
version: '5.0.0',
|
|
1105
1104
|
title: 'Plan',
|
|
1106
1105
|
description: 'Plans a goal into reviewed tickets and a spec, then builds them or files them as Tasks.',
|
|
1107
1106
|
input: Input,
|
package/src/release.ts
CHANGED
|
@@ -817,7 +817,7 @@ export const approve = step('approve', {
|
|
|
817
817
|
timeout: '1 day'
|
|
818
818
|
})
|
|
819
819
|
|
|
820
|
-
return yield* new Rejected({ reason: why })
|
|
820
|
+
return yield* new Rejected({ reason: why.text })
|
|
821
821
|
}
|
|
822
822
|
|
|
823
823
|
const edit = yield* ask(round === 1 ? 'edit' : `edit:${round}`, {
|
|
@@ -829,7 +829,7 @@ export const approve = step('approve', {
|
|
|
829
829
|
timeout: '1 day'
|
|
830
830
|
})
|
|
831
831
|
|
|
832
|
-
if (edit.
|
|
832
|
+
if (!edit.blank) return new Edit({ edit: edit.text })
|
|
833
833
|
}
|
|
834
834
|
})
|
|
835
835
|
})
|
package/src/tidy.ts
CHANGED