@kitman-sh/software-engineering 0.13.12 → 0.13.14
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 +30 -18
- package/dist/declarations.json +21 -5
- package/kitman.config.ts +1 -0
- package/package.json +3 -3
- package/src/build.ts +8 -3
- package/src/file-tasks.ts +2 -1
- package/src/plan.ts +22 -7
package/dist/bundle.js
CHANGED
|
@@ -13985,7 +13985,8 @@ var RunWaiting = Union2([
|
|
|
13985
13985
|
position: Int.check(isGreaterThanOrEqualTo2(1)),
|
|
13986
13986
|
reason: String5,
|
|
13987
13987
|
movesUpAt: optionalKey2(String5),
|
|
13988
|
-
unrunnable: optionalKey2(String5)
|
|
13988
|
+
unrunnable: optionalKey2(String5),
|
|
13989
|
+
quotaUntil: optionalKey2(Timestamp)
|
|
13989
13990
|
})
|
|
13990
13991
|
]);
|
|
13991
13992
|
var RunEvidence = Struct({
|
|
@@ -19460,7 +19461,8 @@ var CreateTasksRequest = Struct({
|
|
|
19460
19461
|
tickets: ArraySchema(PlanTicket),
|
|
19461
19462
|
projectId: optionalKey2(String5),
|
|
19462
19463
|
builds: optionalKey2(Boolean3),
|
|
19463
|
-
releases: optionalKey2(Boolean3)
|
|
19464
|
+
releases: optionalKey2(Boolean3),
|
|
19465
|
+
planReviewed: optionalKey2(Boolean3)
|
|
19464
19466
|
});
|
|
19465
19467
|
var CreateTasksResult = Struct({
|
|
19466
19468
|
tasks: ArraySchema(Struct({ key: String5, taskId: String5 }))
|
|
@@ -21046,6 +21048,7 @@ var continuingBrief = (continuing) => [
|
|
|
21046
21048
|
`);
|
|
21047
21049
|
// ../../packages/core/src/plan-review.ts
|
|
21048
21050
|
var PlanApproval = "Approve plan";
|
|
21051
|
+
var UnattendedPlanApproval = "Approve plan, unattended";
|
|
21049
21052
|
var Offset = Int.check(isGreaterThanOrEqualTo2(0));
|
|
21050
21053
|
var PlanReviewComment = Struct({
|
|
21051
21054
|
id: String5,
|
|
@@ -21068,7 +21071,7 @@ var lineAt = (text, offset) => text.slice(0, offset).split(`
|
|
|
21068
21071
|
var PlanReviewAnswer = fromJsonString2(Struct({ planReview: PlanReview }));
|
|
21069
21072
|
var decodeAnswer = decodeUnknownOption2(PlanReviewAnswer);
|
|
21070
21073
|
var encodeAnswer = encodeSync(PlanReviewAnswer);
|
|
21071
|
-
var isPlanApproval = (answer) => answer.trim().toLowerCase() ===
|
|
21074
|
+
var isPlanApproval = (answer) => [PlanApproval, UnattendedPlanApproval].some((approval) => answer.trim().toLowerCase() === approval.toLowerCase());
|
|
21072
21075
|
var placed = (comment, markdown) => {
|
|
21073
21076
|
const { from, to } = comment;
|
|
21074
21077
|
if (from === undefined || to === undefined || from >= to || to > markdown.length) {
|
|
@@ -23296,6 +23299,7 @@ var BuildInput = Struct({
|
|
|
23296
23299
|
reviewed: optional2(String5),
|
|
23297
23300
|
earlier: optional2(ArraySchema(MergedFinding)),
|
|
23298
23301
|
scope: optional2(ReviewedScope),
|
|
23302
|
+
planReviewed: optional2(Boolean3),
|
|
23299
23303
|
...DeliveryFields
|
|
23300
23304
|
});
|
|
23301
23305
|
var CriterionAnswer = Struct({
|
|
@@ -23545,11 +23549,11 @@ var rally = (input) => gen2(function* () {
|
|
|
23545
23549
|
});
|
|
23546
23550
|
var build2 = defineLoop({
|
|
23547
23551
|
id: "build",
|
|
23548
|
-
version: "2.
|
|
23552
|
+
version: "2.12.0",
|
|
23549
23553
|
title: "Build",
|
|
23550
23554
|
input: BuildInput,
|
|
23551
23555
|
output: BuildOutput,
|
|
23552
|
-
agents: { implementer: "implementer" },
|
|
23556
|
+
agents: { implementer: "implementer", "planned-implementer": "planned-implementer" },
|
|
23553
23557
|
checkout: "write",
|
|
23554
23558
|
offers: [
|
|
23555
23559
|
{ id: "shepherd", title: "Shepherd it to merge", loop: "shepherd", from: "next" },
|
|
@@ -23587,7 +23591,7 @@ var build2 = defineLoop({
|
|
|
23587
23591
|
extra: [reproduced.check]
|
|
23588
23592
|
}) : outcome === "refactor" ? yield* verify("verify:base", {}) : undefined;
|
|
23589
23593
|
const implemented = yield* agentWorkOnce("implement", {
|
|
23590
|
-
agent: "implementer",
|
|
23594
|
+
agent: input.planReviewed === true ? "planned-implementer" : "implementer",
|
|
23591
23595
|
skill: "implement",
|
|
23592
23596
|
prompt: implementPrompt(task, outcome, input.continuing),
|
|
23593
23597
|
output: Implemented
|
|
@@ -23988,7 +23992,7 @@ var Output5 = Struct({
|
|
|
23988
23992
|
});
|
|
23989
23993
|
var file_tasks_default = defineLoop({
|
|
23990
23994
|
id: "file-tasks",
|
|
23991
|
-
version: "2.
|
|
23995
|
+
version: "2.1.0",
|
|
23992
23996
|
title: "File Tasks",
|
|
23993
23997
|
input: FileTasksInput,
|
|
23994
23998
|
output: Output5,
|
|
@@ -24003,6 +24007,7 @@ var file_tasks_default = defineLoop({
|
|
|
24003
24007
|
return { tasks: [], concerns };
|
|
24004
24008
|
const { tasks } = yield* createTasks("tasks", {
|
|
24005
24009
|
tickets,
|
|
24010
|
+
planReviewed: true,
|
|
24006
24011
|
...projectId === undefined ? undefined : { projectId }
|
|
24007
24012
|
});
|
|
24008
24013
|
return { tasks, concerns };
|
|
@@ -24845,10 +24850,11 @@ var deliveryBody = (plan, results) => {
|
|
|
24845
24850
|
|
|
24846
24851
|
`);
|
|
24847
24852
|
};
|
|
24848
|
-
var implement = (input, plan, revision, filed) => gen2(function* () {
|
|
24853
|
+
var implement = (input, plan, revision, planReviewed, filed) => gen2(function* () {
|
|
24849
24854
|
const tasks = filed?.revision === revision ? filed.tasks : (yield* createTasks("tasks", {
|
|
24850
24855
|
tickets: plan.tickets,
|
|
24851
24856
|
builds: true,
|
|
24857
|
+
planReviewed,
|
|
24852
24858
|
...input.projectId === undefined ? undefined : { projectId: input.projectId }
|
|
24853
24859
|
})).tasks;
|
|
24854
24860
|
const taskOf = new Map(tasks.map((task) => [task.key, task.taskId]));
|
|
@@ -24920,7 +24926,7 @@ var implement = (input, plan, revision, filed) => gen2(function* () {
|
|
|
24920
24926
|
});
|
|
24921
24927
|
var plan_default = defineLoop({
|
|
24922
24928
|
id: "plan",
|
|
24923
|
-
version: "3.
|
|
24929
|
+
version: "3.1.0",
|
|
24924
24930
|
title: "Plan",
|
|
24925
24931
|
input: Input7,
|
|
24926
24932
|
output: Output8,
|
|
@@ -24951,12 +24957,13 @@ var plan_default = defineLoop({
|
|
|
24951
24957
|
const asked = [input.words];
|
|
24952
24958
|
let { plan, rejected, disputed } = yield* checked({ plan: drafted }, revision, asked);
|
|
24953
24959
|
let filed;
|
|
24960
|
+
let planReviewed = false;
|
|
24954
24961
|
yield* storePlan({ plan, disputed }, "", revision);
|
|
24955
24962
|
const project = input.projectId === undefined ? undefined : { projectId: input.projectId };
|
|
24956
24963
|
const held = new Map;
|
|
24957
24964
|
let implementing = false;
|
|
24958
24965
|
const file = (step) => gen2(function* () {
|
|
24959
|
-
const made = yield* createTasks(step, { tickets: plan.tickets, builds: true, ...project });
|
|
24966
|
+
const made = yield* createTasks(step, { tickets: plan.tickets, builds: true, planReviewed, ...project });
|
|
24960
24967
|
for (const ticket of plan.tickets)
|
|
24961
24968
|
held.set(ticket.key, ticket);
|
|
24962
24969
|
filed = { revision, tasks: made.tasks };
|
|
@@ -24989,11 +24996,13 @@ var plan_default = defineLoop({
|
|
|
24989
24996
|
freeText: true,
|
|
24990
24997
|
recommended: PlanApproval,
|
|
24991
24998
|
recommendationReason: "Approve it once the plan reads right; until then the Run waits for you.",
|
|
24992
|
-
...input.implement === true ? { default:
|
|
24993
|
-
unattendedAuto:
|
|
24999
|
+
...input.implement === true ? { default: UnattendedPlanApproval, timeout: "1 hour" } : { default: null },
|
|
25000
|
+
unattendedAuto: UnattendedPlanApproval
|
|
24994
25001
|
});
|
|
24995
|
-
if (isPlanApproval(answer))
|
|
25002
|
+
if (isPlanApproval(answer)) {
|
|
25003
|
+
planReviewed = disputed.length === 0 || answer !== UnattendedPlanApproval;
|
|
24996
25004
|
return;
|
|
25005
|
+
}
|
|
24997
25006
|
const review = readPlanReview(answer, revision, documentText(plan, disputed));
|
|
24998
25007
|
const revised = yield* agentWorkOnce(`revise-plan:${revision}`, {
|
|
24999
25008
|
agent: "planner",
|
|
@@ -25036,7 +25045,7 @@ var plan_default = defineLoop({
|
|
|
25036
25045
|
case "Implement now": {
|
|
25037
25046
|
implementing = true;
|
|
25038
25047
|
yield* release(plan.tickets);
|
|
25039
|
-
const delivered = yield* implement(input, plan, revision, filed);
|
|
25048
|
+
const delivered = yield* implement(input, plan, revision, planReviewed, filed);
|
|
25040
25049
|
return { ...ended({ implemented: true }), ...delivered };
|
|
25041
25050
|
}
|
|
25042
25051
|
case "File as Tasks":
|
|
@@ -26001,6 +26010,7 @@ var kitman_config_default = defineKit({
|
|
|
26001
26010
|
skills: ["tdd", "diagnosing-bugs"],
|
|
26002
26011
|
instructions: { file: "agents/implementer.md" }
|
|
26003
26012
|
},
|
|
26013
|
+
"planned-implementer": { extends: "implementer", effort: "low" },
|
|
26004
26014
|
reviewer: { ...reviewer, effort: "high", instructions: { file: "agents/reviewer.md" } },
|
|
26005
26015
|
"code-reviewer": { extends: "reviewer", skills: ["code-review"] },
|
|
26006
26016
|
"quality-reviewer": {
|
|
@@ -28985,6 +28995,7 @@ class RunnerCapabilityRpcs extends make31(make30("PutQuestion", {
|
|
|
28985
28995
|
projectId: optionalKey2(String5),
|
|
28986
28996
|
builds: optionalKey2(Boolean3),
|
|
28987
28997
|
releases: optionalKey2(Boolean3),
|
|
28998
|
+
planReviewed: optionalKey2(Boolean3),
|
|
28988
28999
|
tickets: ArraySchema(Struct({
|
|
28989
29000
|
key: String5,
|
|
28990
29001
|
title: String5,
|
|
@@ -29391,7 +29402,8 @@ var runnerActivities = (capabilities, services) => ({
|
|
|
29391
29402
|
createTasks: {
|
|
29392
29403
|
run: (request, step) => requested(step, map8(capabilities.createPlanTasks(request.tickets, request.projectId, {
|
|
29393
29404
|
...request.builds === undefined ? undefined : { builds: request.builds },
|
|
29394
|
-
...request.releases === undefined ? undefined : { releases: request.releases }
|
|
29405
|
+
...request.releases === undefined ? undefined : { releases: request.releases },
|
|
29406
|
+
...request.planReviewed === undefined ? undefined : { planReviewed: request.planReviewed }
|
|
29395
29407
|
}), (tasks) => ({ tasks })))
|
|
29396
29408
|
},
|
|
29397
29409
|
alertTask: { run: (request, step) => requested(step, capabilities.alertTask({ step, ...request })) },
|
|
@@ -29525,10 +29537,10 @@ var rpcProgramPorts = (rpc, work) => {
|
|
|
29525
29537
|
...rpcRunFiles(rpc, lease),
|
|
29526
29538
|
recordNote: (note) => rpc.recordNote({ lease, ...note }),
|
|
29527
29539
|
performHostEffect: (request) => rpc.performHostEffect({ lease, ...request, waitsWhenUnconfirmed: true }),
|
|
29528
|
-
createPlanTasks: (tickets, projectId,
|
|
29540
|
+
createPlanTasks: (tickets, projectId, options) => rpc.createPlanTasks({
|
|
29529
29541
|
lease,
|
|
29530
29542
|
...projectId === undefined ? undefined : { projectId },
|
|
29531
|
-
...
|
|
29543
|
+
...options,
|
|
29532
29544
|
tickets: tickets.map((ticket) => ({
|
|
29533
29545
|
key: ticket.key,
|
|
29534
29546
|
title: ticket.title,
|
|
@@ -31813,4 +31825,4 @@ var runKit = (config, identity, packages) => {
|
|
|
31813
31825
|
runMain2(program.pipe(flatMap3((code) => sync2(() => process.exit(code)))));
|
|
31814
31826
|
};
|
|
31815
31827
|
// .kitman-build-entry.ts
|
|
31816
|
-
runKit(kitman_config_default, { name: "@kitman-sh/software-engineering", version: "0.13.
|
|
31828
|
+
runKit(kitman_config_default, { name: "@kitman-sh/software-engineering", version: "0.13.14" }, []);
|
package/dist/declarations.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{
|
|
4
4
|
"id": "build",
|
|
5
5
|
"title": "Build",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.12.0",
|
|
7
7
|
"input": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
@@ -312,6 +312,16 @@
|
|
|
312
312
|
}
|
|
313
313
|
]
|
|
314
314
|
},
|
|
315
|
+
"planReviewed": {
|
|
316
|
+
"anyOf": [
|
|
317
|
+
{
|
|
318
|
+
"type": "boolean"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"type": "null"
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
},
|
|
315
325
|
"deliveryTarget": {
|
|
316
326
|
"anyOf": [
|
|
317
327
|
{
|
|
@@ -1078,7 +1088,8 @@
|
|
|
1078
1088
|
"$defs": {}
|
|
1079
1089
|
},
|
|
1080
1090
|
"agents": {
|
|
1081
|
-
"implementer": "implementer"
|
|
1091
|
+
"implementer": "implementer",
|
|
1092
|
+
"planned-implementer": "planned-implementer"
|
|
1082
1093
|
},
|
|
1083
1094
|
"checkout": "write",
|
|
1084
1095
|
"when": [],
|
|
@@ -1265,7 +1276,7 @@
|
|
|
1265
1276
|
{
|
|
1266
1277
|
"id": "file-tasks",
|
|
1267
1278
|
"title": "File Tasks",
|
|
1268
|
-
"version": "2.
|
|
1279
|
+
"version": "2.1.0",
|
|
1269
1280
|
"input": {
|
|
1270
1281
|
"type": "object",
|
|
1271
1282
|
"properties": {
|
|
@@ -1855,7 +1866,7 @@
|
|
|
1855
1866
|
{
|
|
1856
1867
|
"id": "plan",
|
|
1857
1868
|
"title": "Plan",
|
|
1858
|
-
"version": "3.
|
|
1869
|
+
"version": "3.1.0",
|
|
1859
1870
|
"input": {
|
|
1860
1871
|
"type": "object",
|
|
1861
1872
|
"properties": {
|
|
@@ -5768,6 +5779,10 @@
|
|
|
5768
5779
|
"diagnosing-bugs"
|
|
5769
5780
|
]
|
|
5770
5781
|
},
|
|
5782
|
+
"planned-implementer": {
|
|
5783
|
+
"extends": "implementer",
|
|
5784
|
+
"effort": "low"
|
|
5785
|
+
},
|
|
5771
5786
|
"reviewer": {
|
|
5772
5787
|
"instructions": "You are a reviewer. You report; you do not fix.\n\n## Scope\n\n- Review only the change: the diff between the base and the head you are given, and the code around it that the change touches. Read the change and that code before judging it.\n- Judge it against the standards this repository documents and against what the Task or plan asked for, including its Acceptance Criteria. When there is no spec, say so rather than inventing one.\n\n## Skills\n\nYour seat's review skill, when it has one, is listed. If the brief says it is not installed, follow the review prompt, which holds the fallback.\n\n## One pass\n\n- Review exhaustively the first time. Each round a finding waits for costs a fix round.\n- For each rule or check the change adds or alters, trace it through every caller and every input it can get before you report: each kind of actor, each visibility, Team and Project scope, and ids the caller gives.\n- Report every finding of every severity in that one pass, grouped by the rule it breaks. Do not stop at the first serious finding in an area, and hold none back for a later round.\n- For each finding, name the sibling cases of its rule you checked and found fine, so the next round does not explore them again.\n- In a later round, after a fix, review the fix and the code it touches. Raise a new problem outside that only if it is a `blocker`; report anything less there as a `minor`, which does not block landing.\n\n## Findings\n\n- Report only what you can defend with a concrete failure or a named rule. No style opinions this codebase does not hold, and no speculation.\n- Give every finding a file and a line.\n- Severity is exactly one of `blocker` (wrong, unsafe, or breaks a contract), `major` (will bite us) or `minor` (worth fixing, not worth blocking). Only `minor` lets a change ship without another fix.\n- Missing required scope is a `blocker`, however large the work: a spec the change does not meet is not a follow-up.\n- One finding per problem.\n- Finding nothing is a real answer: submit an empty list of findings.\n\n## Rebuttals\n\n- Judge each rebuttal on its merits, not on who wrote it.\n- Raise a rebutted finding again only if you can answer the implementer's reason, and answer it when you do. If you cannot, leave it: a disputed blocker or major finding goes to the human, and raising it again only costs a round.\n\n## Branch\n\n- Do not edit files, commit, push or merge. The Run owns the branch.\n- Never `git stash`, and flag any `git stash` a change adds to a script, a workflow or the docs: the stash stack is shared with every other worktree of the repository. To look at a clean tree, make a throwaway checkout with `git worktree add` and remove it after.\n\n## Code comments\n\nCode should explain itself. For each comment the change adds or alters, check that it is necessary and uses the fewest words possible. Group unnecessary or verbose comments into one `minor` finding with examples; leave untouched comments alone.\n\n## Output\n\nSubmit your Output with the Kitman MCP `submit_output` tool, in the shape the brief's Output schema gives. A test result you report is a claim; Kitman's evidence gate runs the approved verifications itself.",
|
|
5773
5788
|
"harness": "pi",
|
|
@@ -5891,7 +5906,7 @@
|
|
|
5891
5906
|
"carried": [
|
|
5892
5907
|
{
|
|
5893
5908
|
"name": "@kitman-sh/software-engineering",
|
|
5894
|
-
"version": "0.13.
|
|
5909
|
+
"version": "0.13.14",
|
|
5895
5910
|
"setup": "2a237548a69b0cd53ec3be7f687cfa8c2128335b3a655d34e185f2abce6a3c37",
|
|
5896
5911
|
"loops": [
|
|
5897
5912
|
"build",
|
|
@@ -5912,6 +5927,7 @@
|
|
|
5912
5927
|
],
|
|
5913
5928
|
"agents": [
|
|
5914
5929
|
"implementer",
|
|
5930
|
+
"planned-implementer",
|
|
5915
5931
|
"reviewer",
|
|
5916
5932
|
"code-reviewer",
|
|
5917
5933
|
"quality-reviewer",
|
package/kitman.config.ts
CHANGED
|
@@ -62,6 +62,7 @@ export default defineKit({
|
|
|
62
62
|
skills: ['tdd', 'diagnosing-bugs'],
|
|
63
63
|
instructions: { file: 'agents/implementer.md' }
|
|
64
64
|
},
|
|
65
|
+
'planned-implementer': { extends: 'implementer', effort: 'low' },
|
|
65
66
|
reviewer: { ...reviewer, effort: 'high', instructions: { file: 'agents/reviewer.md' } },
|
|
66
67
|
'code-reviewer': { extends: 'reviewer', skills: ['code-review'] },
|
|
67
68
|
'quality-reviewer': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitman-sh/software-engineering",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.14",
|
|
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": "UNLICENSED",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"tsconfig.json"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@kitman-sh/sdk": "0.13.
|
|
20
|
+
"@kitman-sh/sdk": "0.13.14",
|
|
21
21
|
"effect": "^4.1.2"
|
|
22
22
|
},
|
|
23
23
|
"kitman": {
|
|
24
24
|
"bundle": "dist/bundle.js",
|
|
25
|
-
"digest": "
|
|
25
|
+
"digest": "c278dd4d4d8fc4f253e4b34d9467268da4bc08abb038d204e4559a68f7e67cf6",
|
|
26
26
|
"protocolVersion": 5,
|
|
27
27
|
"declarations": "dist/declarations.json",
|
|
28
28
|
"setup": {
|
package/src/build.ts
CHANGED
|
@@ -85,6 +85,11 @@ export const BuildInput = Schema.Struct({
|
|
|
85
85
|
earlier: Schema.optional(Schema.Array(MergedFinding)),
|
|
86
86
|
/** That review's scope judgement, whose unmet items this Build's first review judges again. */
|
|
87
87
|
scope: Schema.optional(ReviewedScope),
|
|
88
|
+
/**
|
|
89
|
+
* Plan review passed the Task, and this is its first implementation, which the `planned-implementer` makes; Kitman
|
|
90
|
+
* sets it when the Run starts.
|
|
91
|
+
*/
|
|
92
|
+
planReviewed: Schema.optional(Schema.Boolean),
|
|
88
93
|
...DeliveryFields
|
|
89
94
|
})
|
|
90
95
|
|
|
@@ -471,11 +476,11 @@ const rally = (input: {
|
|
|
471
476
|
*/
|
|
472
477
|
const build = defineLoop({
|
|
473
478
|
id: 'build',
|
|
474
|
-
version: '2.
|
|
479
|
+
version: '2.12.0',
|
|
475
480
|
title: 'Build',
|
|
476
481
|
input: BuildInput,
|
|
477
482
|
output: BuildOutput,
|
|
478
|
-
agents: { implementer: 'implementer' },
|
|
483
|
+
agents: { implementer: 'implementer', 'planned-implementer': 'planned-implementer' },
|
|
479
484
|
checkout: 'write',
|
|
480
485
|
offers: [
|
|
481
486
|
{ id: 'shepherd', title: 'Shepherd it to merge', loop: 'shepherd', from: 'next' },
|
|
@@ -534,7 +539,7 @@ const build = defineLoop({
|
|
|
534
539
|
: undefined
|
|
535
540
|
|
|
536
541
|
const implemented = yield* agentWorkOnce('implement', {
|
|
537
|
-
agent: 'implementer',
|
|
542
|
+
agent: input.planReviewed === true ? 'planned-implementer' : 'implementer',
|
|
538
543
|
skill: 'implement',
|
|
539
544
|
prompt: implementPrompt(task, outcome, input.continuing),
|
|
540
545
|
output: Implemented
|
package/src/file-tasks.ts
CHANGED
|
@@ -24,7 +24,7 @@ const Output = Schema.Struct({
|
|
|
24
24
|
*/
|
|
25
25
|
export default defineLoop({
|
|
26
26
|
id: 'file-tasks',
|
|
27
|
-
version: '2.
|
|
27
|
+
version: '2.1.0',
|
|
28
28
|
title: 'File Tasks',
|
|
29
29
|
input: FileTasksInput,
|
|
30
30
|
output: Output,
|
|
@@ -46,6 +46,7 @@ export default defineLoop({
|
|
|
46
46
|
|
|
47
47
|
const { tasks } = yield* createTasks('tasks', {
|
|
48
48
|
tickets,
|
|
49
|
+
planReviewed: true,
|
|
49
50
|
...(projectId === undefined ? undefined : { projectId })
|
|
50
51
|
})
|
|
51
52
|
|
package/src/plan.ts
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
type PlanTicket,
|
|
21
21
|
readPlanReview,
|
|
22
22
|
planWaves,
|
|
23
|
+
UnattendedPlanApproval,
|
|
23
24
|
type IntegrationBranch
|
|
24
25
|
} from '@kitman-sh/sdk/loop'
|
|
25
26
|
import * as Effect from 'effect/Effect'
|
|
@@ -545,7 +546,13 @@ type Filed = { readonly revision: number; readonly tasks: typeof CreateTasksResu
|
|
|
545
546
|
* merged, so each Build contains its blockers' code. A failed ticket asks: retry it with a person's steer, skip it and
|
|
546
547
|
* its dependents (the default), or stop. Finally one ChangeRequest per repository delivers the integration branch.
|
|
547
548
|
*/
|
|
548
|
-
const implement = (
|
|
549
|
+
const implement = (
|
|
550
|
+
input: typeof Input.Type,
|
|
551
|
+
plan: Plan,
|
|
552
|
+
revision: number,
|
|
553
|
+
planReviewed: boolean,
|
|
554
|
+
filed: Filed | undefined
|
|
555
|
+
) =>
|
|
549
556
|
Effect.gen(function* () {
|
|
550
557
|
const tasks =
|
|
551
558
|
filed?.revision === revision
|
|
@@ -553,6 +560,7 @@ const implement = (input: typeof Input.Type, plan: Plan, revision: number, filed
|
|
|
553
560
|
: (yield* createTasks('tasks', {
|
|
554
561
|
tickets: plan.tickets,
|
|
555
562
|
builds: true,
|
|
563
|
+
planReviewed,
|
|
556
564
|
...(input.projectId === undefined ? undefined : { projectId: input.projectId })
|
|
557
565
|
})).tasks
|
|
558
566
|
|
|
@@ -670,7 +678,7 @@ const implement = (input: typeof Input.Type, plan: Plan, revision: number, filed
|
|
|
670
678
|
*/
|
|
671
679
|
export default defineLoop({
|
|
672
680
|
id: 'plan',
|
|
673
|
-
version: '3.
|
|
681
|
+
version: '3.1.0',
|
|
674
682
|
title: 'Plan',
|
|
675
683
|
input: Input,
|
|
676
684
|
output: Output,
|
|
@@ -708,6 +716,7 @@ export default defineLoop({
|
|
|
708
716
|
const asked = [input.words]
|
|
709
717
|
let { plan, rejected, disputed } = yield* checked({ plan: drafted }, revision, asked)
|
|
710
718
|
let filed: Filed | undefined
|
|
719
|
+
let planReviewed = false
|
|
711
720
|
|
|
712
721
|
yield* storePlan({ plan, disputed }, '', revision)
|
|
713
722
|
|
|
@@ -719,7 +728,7 @@ export default defineLoop({
|
|
|
719
728
|
|
|
720
729
|
const file = (step: string) =>
|
|
721
730
|
Effect.gen(function* () {
|
|
722
|
-
const made = yield* createTasks(step, { tickets: plan.tickets, builds: true, ...project })
|
|
731
|
+
const made = yield* createTasks(step, { tickets: plan.tickets, builds: true, planReviewed, ...project })
|
|
723
732
|
|
|
724
733
|
for (const ticket of plan.tickets) held.set(ticket.key, ticket)
|
|
725
734
|
filed = { revision, tasks: made.tasks }
|
|
@@ -764,11 +773,17 @@ export default defineLoop({
|
|
|
764
773
|
freeText: true,
|
|
765
774
|
recommended: PlanApproval,
|
|
766
775
|
recommendationReason: 'Approve it once the plan reads right; until then the Run waits for you.',
|
|
767
|
-
...(input.implement === true
|
|
768
|
-
|
|
776
|
+
...(input.implement === true
|
|
777
|
+
? { default: UnattendedPlanApproval, timeout: '1 hour' }
|
|
778
|
+
: { default: null }),
|
|
779
|
+
unattendedAuto: UnattendedPlanApproval
|
|
769
780
|
})
|
|
770
781
|
|
|
771
|
-
if (isPlanApproval(answer))
|
|
782
|
+
if (isPlanApproval(answer)) {
|
|
783
|
+
planReviewed = disputed.length === 0 || answer !== UnattendedPlanApproval
|
|
784
|
+
|
|
785
|
+
return
|
|
786
|
+
}
|
|
772
787
|
|
|
773
788
|
const review = readPlanReview(answer, revision, documentText(plan, disputed))
|
|
774
789
|
|
|
@@ -830,7 +845,7 @@ export default defineLoop({
|
|
|
830
845
|
implementing = true
|
|
831
846
|
yield* release(plan.tickets)
|
|
832
847
|
|
|
833
|
-
const delivered = yield* implement(input, plan, revision, filed)
|
|
848
|
+
const delivered = yield* implement(input, plan, revision, planReviewed, filed)
|
|
834
849
|
|
|
835
850
|
return { ...ended({ implemented: true }), ...delivered }
|
|
836
851
|
}
|