@kitman-sh/software-engineering 0.13.13 → 0.13.15
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 +29 -18
- package/dist/declarations.json +22 -10
- package/kitman.config.ts +3 -1
- 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
|
@@ -19461,7 +19461,8 @@ var CreateTasksRequest = Struct({
|
|
|
19461
19461
|
tickets: ArraySchema(PlanTicket),
|
|
19462
19462
|
projectId: optionalKey2(String5),
|
|
19463
19463
|
builds: optionalKey2(Boolean3),
|
|
19464
|
-
releases: optionalKey2(Boolean3)
|
|
19464
|
+
releases: optionalKey2(Boolean3),
|
|
19465
|
+
planReviewed: optionalKey2(Boolean3)
|
|
19465
19466
|
});
|
|
19466
19467
|
var CreateTasksResult = Struct({
|
|
19467
19468
|
tasks: ArraySchema(Struct({ key: String5, taskId: String5 }))
|
|
@@ -21047,6 +21048,7 @@ var continuingBrief = (continuing) => [
|
|
|
21047
21048
|
`);
|
|
21048
21049
|
// ../../packages/core/src/plan-review.ts
|
|
21049
21050
|
var PlanApproval = "Approve plan";
|
|
21051
|
+
var UnattendedPlanApproval = "Approve plan, unattended";
|
|
21050
21052
|
var Offset = Int.check(isGreaterThanOrEqualTo2(0));
|
|
21051
21053
|
var PlanReviewComment = Struct({
|
|
21052
21054
|
id: String5,
|
|
@@ -21069,7 +21071,7 @@ var lineAt = (text, offset) => text.slice(0, offset).split(`
|
|
|
21069
21071
|
var PlanReviewAnswer = fromJsonString2(Struct({ planReview: PlanReview }));
|
|
21070
21072
|
var decodeAnswer = decodeUnknownOption2(PlanReviewAnswer);
|
|
21071
21073
|
var encodeAnswer = encodeSync(PlanReviewAnswer);
|
|
21072
|
-
var isPlanApproval = (answer) => answer.trim().toLowerCase() ===
|
|
21074
|
+
var isPlanApproval = (answer) => [PlanApproval, UnattendedPlanApproval].some((approval) => answer.trim().toLowerCase() === approval.toLowerCase());
|
|
21073
21075
|
var placed = (comment, markdown) => {
|
|
21074
21076
|
const { from, to } = comment;
|
|
21075
21077
|
if (from === undefined || to === undefined || from >= to || to > markdown.length) {
|
|
@@ -23297,6 +23299,7 @@ var BuildInput = Struct({
|
|
|
23297
23299
|
reviewed: optional2(String5),
|
|
23298
23300
|
earlier: optional2(ArraySchema(MergedFinding)),
|
|
23299
23301
|
scope: optional2(ReviewedScope),
|
|
23302
|
+
planReviewed: optional2(Boolean3),
|
|
23300
23303
|
...DeliveryFields
|
|
23301
23304
|
});
|
|
23302
23305
|
var CriterionAnswer = Struct({
|
|
@@ -23546,11 +23549,11 @@ var rally = (input) => gen2(function* () {
|
|
|
23546
23549
|
});
|
|
23547
23550
|
var build2 = defineLoop({
|
|
23548
23551
|
id: "build",
|
|
23549
|
-
version: "2.
|
|
23552
|
+
version: "2.12.0",
|
|
23550
23553
|
title: "Build",
|
|
23551
23554
|
input: BuildInput,
|
|
23552
23555
|
output: BuildOutput,
|
|
23553
|
-
agents: { implementer: "implementer" },
|
|
23556
|
+
agents: { implementer: "implementer", "planned-implementer": "planned-implementer" },
|
|
23554
23557
|
checkout: "write",
|
|
23555
23558
|
offers: [
|
|
23556
23559
|
{ id: "shepherd", title: "Shepherd it to merge", loop: "shepherd", from: "next" },
|
|
@@ -23588,7 +23591,7 @@ var build2 = defineLoop({
|
|
|
23588
23591
|
extra: [reproduced.check]
|
|
23589
23592
|
}) : outcome === "refactor" ? yield* verify("verify:base", {}) : undefined;
|
|
23590
23593
|
const implemented = yield* agentWorkOnce("implement", {
|
|
23591
|
-
agent: "implementer",
|
|
23594
|
+
agent: input.planReviewed === true ? "planned-implementer" : "implementer",
|
|
23592
23595
|
skill: "implement",
|
|
23593
23596
|
prompt: implementPrompt(task, outcome, input.continuing),
|
|
23594
23597
|
output: Implemented
|
|
@@ -23989,7 +23992,7 @@ var Output5 = Struct({
|
|
|
23989
23992
|
});
|
|
23990
23993
|
var file_tasks_default = defineLoop({
|
|
23991
23994
|
id: "file-tasks",
|
|
23992
|
-
version: "2.
|
|
23995
|
+
version: "2.1.0",
|
|
23993
23996
|
title: "File Tasks",
|
|
23994
23997
|
input: FileTasksInput,
|
|
23995
23998
|
output: Output5,
|
|
@@ -24004,6 +24007,7 @@ var file_tasks_default = defineLoop({
|
|
|
24004
24007
|
return { tasks: [], concerns };
|
|
24005
24008
|
const { tasks } = yield* createTasks("tasks", {
|
|
24006
24009
|
tickets,
|
|
24010
|
+
planReviewed: true,
|
|
24007
24011
|
...projectId === undefined ? undefined : { projectId }
|
|
24008
24012
|
});
|
|
24009
24013
|
return { tasks, concerns };
|
|
@@ -24846,10 +24850,11 @@ var deliveryBody = (plan, results) => {
|
|
|
24846
24850
|
|
|
24847
24851
|
`);
|
|
24848
24852
|
};
|
|
24849
|
-
var implement = (input, plan, revision, filed) => gen2(function* () {
|
|
24853
|
+
var implement = (input, plan, revision, planReviewed, filed) => gen2(function* () {
|
|
24850
24854
|
const tasks = filed?.revision === revision ? filed.tasks : (yield* createTasks("tasks", {
|
|
24851
24855
|
tickets: plan.tickets,
|
|
24852
24856
|
builds: true,
|
|
24857
|
+
planReviewed,
|
|
24853
24858
|
...input.projectId === undefined ? undefined : { projectId: input.projectId }
|
|
24854
24859
|
})).tasks;
|
|
24855
24860
|
const taskOf = new Map(tasks.map((task) => [task.key, task.taskId]));
|
|
@@ -24921,7 +24926,7 @@ var implement = (input, plan, revision, filed) => gen2(function* () {
|
|
|
24921
24926
|
});
|
|
24922
24927
|
var plan_default = defineLoop({
|
|
24923
24928
|
id: "plan",
|
|
24924
|
-
version: "3.
|
|
24929
|
+
version: "3.1.0",
|
|
24925
24930
|
title: "Plan",
|
|
24926
24931
|
input: Input7,
|
|
24927
24932
|
output: Output8,
|
|
@@ -24952,12 +24957,13 @@ var plan_default = defineLoop({
|
|
|
24952
24957
|
const asked = [input.words];
|
|
24953
24958
|
let { plan, rejected, disputed } = yield* checked({ plan: drafted }, revision, asked);
|
|
24954
24959
|
let filed;
|
|
24960
|
+
let planReviewed = false;
|
|
24955
24961
|
yield* storePlan({ plan, disputed }, "", revision);
|
|
24956
24962
|
const project = input.projectId === undefined ? undefined : { projectId: input.projectId };
|
|
24957
24963
|
const held = new Map;
|
|
24958
24964
|
let implementing = false;
|
|
24959
24965
|
const file = (step) => gen2(function* () {
|
|
24960
|
-
const made = yield* createTasks(step, { tickets: plan.tickets, builds: true, ...project });
|
|
24966
|
+
const made = yield* createTasks(step, { tickets: plan.tickets, builds: true, planReviewed, ...project });
|
|
24961
24967
|
for (const ticket of plan.tickets)
|
|
24962
24968
|
held.set(ticket.key, ticket);
|
|
24963
24969
|
filed = { revision, tasks: made.tasks };
|
|
@@ -24990,11 +24996,13 @@ var plan_default = defineLoop({
|
|
|
24990
24996
|
freeText: true,
|
|
24991
24997
|
recommended: PlanApproval,
|
|
24992
24998
|
recommendationReason: "Approve it once the plan reads right; until then the Run waits for you.",
|
|
24993
|
-
...input.implement === true ? { default:
|
|
24994
|
-
unattendedAuto:
|
|
24999
|
+
...input.implement === true ? { default: UnattendedPlanApproval, timeout: "1 hour" } : { default: null },
|
|
25000
|
+
unattendedAuto: UnattendedPlanApproval
|
|
24995
25001
|
});
|
|
24996
|
-
if (isPlanApproval(answer))
|
|
25002
|
+
if (isPlanApproval(answer)) {
|
|
25003
|
+
planReviewed = disputed.length === 0 || answer !== UnattendedPlanApproval;
|
|
24997
25004
|
return;
|
|
25005
|
+
}
|
|
24998
25006
|
const review = readPlanReview(answer, revision, documentText(plan, disputed));
|
|
24999
25007
|
const revised = yield* agentWorkOnce(`revise-plan:${revision}`, {
|
|
25000
25008
|
agent: "planner",
|
|
@@ -25037,7 +25045,7 @@ var plan_default = defineLoop({
|
|
|
25037
25045
|
case "Implement now": {
|
|
25038
25046
|
implementing = true;
|
|
25039
25047
|
yield* release(plan.tickets);
|
|
25040
|
-
const delivered = yield* implement(input, plan, revision, filed);
|
|
25048
|
+
const delivered = yield* implement(input, plan, revision, planReviewed, filed);
|
|
25041
25049
|
return { ...ended({ implemented: true }), ...delivered };
|
|
25042
25050
|
}
|
|
25043
25051
|
case "File as Tasks":
|
|
@@ -25997,11 +26005,12 @@ var kitman_config_default = defineKit({
|
|
|
25997
26005
|
],
|
|
25998
26006
|
agents: {
|
|
25999
26007
|
implementer: {
|
|
26008
|
+
harness: "claude",
|
|
26000
26009
|
effort: "medium",
|
|
26001
|
-
fallbacks,
|
|
26002
26010
|
skills: ["tdd", "diagnosing-bugs"],
|
|
26003
26011
|
instructions: { file: "agents/implementer.md" }
|
|
26004
26012
|
},
|
|
26013
|
+
"planned-implementer": { extends: "implementer", effort: "low" },
|
|
26005
26014
|
reviewer: { ...reviewer, effort: "high", instructions: { file: "agents/reviewer.md" } },
|
|
26006
26015
|
"code-reviewer": { extends: "reviewer", skills: ["code-review"] },
|
|
26007
26016
|
"quality-reviewer": {
|
|
@@ -28986,6 +28995,7 @@ class RunnerCapabilityRpcs extends make31(make30("PutQuestion", {
|
|
|
28986
28995
|
projectId: optionalKey2(String5),
|
|
28987
28996
|
builds: optionalKey2(Boolean3),
|
|
28988
28997
|
releases: optionalKey2(Boolean3),
|
|
28998
|
+
planReviewed: optionalKey2(Boolean3),
|
|
28989
28999
|
tickets: ArraySchema(Struct({
|
|
28990
29000
|
key: String5,
|
|
28991
29001
|
title: String5,
|
|
@@ -29392,7 +29402,8 @@ var runnerActivities = (capabilities, services) => ({
|
|
|
29392
29402
|
createTasks: {
|
|
29393
29403
|
run: (request, step) => requested(step, map8(capabilities.createPlanTasks(request.tickets, request.projectId, {
|
|
29394
29404
|
...request.builds === undefined ? undefined : { builds: request.builds },
|
|
29395
|
-
...request.releases === undefined ? undefined : { releases: request.releases }
|
|
29405
|
+
...request.releases === undefined ? undefined : { releases: request.releases },
|
|
29406
|
+
...request.planReviewed === undefined ? undefined : { planReviewed: request.planReviewed }
|
|
29396
29407
|
}), (tasks) => ({ tasks })))
|
|
29397
29408
|
},
|
|
29398
29409
|
alertTask: { run: (request, step) => requested(step, capabilities.alertTask({ step, ...request })) },
|
|
@@ -29526,10 +29537,10 @@ var rpcProgramPorts = (rpc, work) => {
|
|
|
29526
29537
|
...rpcRunFiles(rpc, lease),
|
|
29527
29538
|
recordNote: (note) => rpc.recordNote({ lease, ...note }),
|
|
29528
29539
|
performHostEffect: (request) => rpc.performHostEffect({ lease, ...request, waitsWhenUnconfirmed: true }),
|
|
29529
|
-
createPlanTasks: (tickets, projectId,
|
|
29540
|
+
createPlanTasks: (tickets, projectId, options) => rpc.createPlanTasks({
|
|
29530
29541
|
lease,
|
|
29531
29542
|
...projectId === undefined ? undefined : { projectId },
|
|
29532
|
-
...
|
|
29543
|
+
...options,
|
|
29533
29544
|
tickets: tickets.map((ticket) => ({
|
|
29534
29545
|
key: ticket.key,
|
|
29535
29546
|
title: ticket.title,
|
|
@@ -31814,4 +31825,4 @@ var runKit = (config, identity, packages) => {
|
|
|
31814
31825
|
runMain2(program.pipe(flatMap3((code) => sync2(() => process.exit(code)))));
|
|
31815
31826
|
};
|
|
31816
31827
|
// .kitman-build-entry.ts
|
|
31817
|
-
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.15" }, []);
|
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": {
|
|
@@ -5757,17 +5768,17 @@
|
|
|
5757
5768
|
"agents": {
|
|
5758
5769
|
"implementer": {
|
|
5759
5770
|
"instructions": "You are an implementer. You build the Step you are given from its brief, its Task and the plan behind it.\n\n## Scope\n\n- Follow the plan, all of it. Everything the brief and its Acceptance Criteria ask for is yours to build before you submit; a required piece left out is neither a follow-up nor a dispute.\n- If the plan is wrong, say so with the Kitman MCP `ask` tool before you deviate from it.\n- Touch only what the Task needs. Do not reformat, rename or refactor around it.\n- When a decision comes up that the plan does not cover, ask with `ask` if the answer changes what you build. Otherwise decide, and record the decision and why in your Output.\n- Every Question recommends an answer: set `recommended` and say why in `recommendationReason`, in one or two sentences. Keep the prompt to the context and the decision, and put each option's trade-off in its `description`.\n\n## Skills\n\n- A skill your Step runs comes first in your brief. Follow it within the Run's rules: the Run owns the branch, and the Review run reviews the change.\n- `tdd`: build test-first at the seams the brief and its plan name.\n- `diagnosing-bugs`: when the Task is a bug, reproduce it before you change anything.\n\n## Evidence\n\n- Run the codebase's own tests, linters and typechecks, and report what they actually said, not what they should have said.\n- A test result written in your Output is a claim. Kitman's evidence gate runs the approved verifications itself and judges the change on what they say. List what you believe but Kitman has not checked as claims.\n\n## Branch\n\n- The Run owns the branch. Commit nothing yourself, never push and never merge: Kitman pushes what you leave in the workspace, and a human decides what merges.\n- Never `git stash`. The stash stack belongs to the whole repository and is shared with every other worktree of it. To look at a clean tree, make a throwaway checkout with `git worktree add` and remove it when you are done.\n\n## Review findings\n\n- Fix each finding you agree with. Rebut each one you do not, with your reason. Never drop one silently, and never both fix and rebut the same one.\n- Your reason settles a minor finding. A disputed blocker or major finding goes to the human.\n- A finding that answers one of your reasons has to be dealt with, not rebutted again on the same ground.\n\n## Code comments\n\n- Write self-explanatory code. Improve names and structure before adding a comment.\n- Comment only when an essential fact cannot be expressed in the code and leaving it out would risk an incorrect change.\n- Use the fewest words possible, normally one short sentence beside the code. Delete unnecessary comments you added before you submit.\n\n## Output\n\nSubmit your Output with the Kitman MCP `submit_output` tool, in the shape the brief's Output schema gives. Record milestones with `session_update`, so a retry on another Runner starts from them.",
|
|
5771
|
+
"harness": "claude",
|
|
5760
5772
|
"effort": "medium",
|
|
5761
|
-
"fallbacks": [
|
|
5762
|
-
{
|
|
5763
|
-
"harness": "pi"
|
|
5764
|
-
}
|
|
5765
|
-
],
|
|
5766
5773
|
"skills": [
|
|
5767
5774
|
"tdd",
|
|
5768
5775
|
"diagnosing-bugs"
|
|
5769
5776
|
]
|
|
5770
5777
|
},
|
|
5778
|
+
"planned-implementer": {
|
|
5779
|
+
"extends": "implementer",
|
|
5780
|
+
"effort": "low"
|
|
5781
|
+
},
|
|
5771
5782
|
"reviewer": {
|
|
5772
5783
|
"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
5784
|
"harness": "pi",
|
|
@@ -5891,7 +5902,7 @@
|
|
|
5891
5902
|
"carried": [
|
|
5892
5903
|
{
|
|
5893
5904
|
"name": "@kitman-sh/software-engineering",
|
|
5894
|
-
"version": "0.13.
|
|
5905
|
+
"version": "0.13.15",
|
|
5895
5906
|
"setup": "2a237548a69b0cd53ec3be7f687cfa8c2128335b3a655d34e185f2abce6a3c37",
|
|
5896
5907
|
"loops": [
|
|
5897
5908
|
"build",
|
|
@@ -5912,6 +5923,7 @@
|
|
|
5912
5923
|
],
|
|
5913
5924
|
"agents": [
|
|
5914
5925
|
"implementer",
|
|
5926
|
+
"planned-implementer",
|
|
5915
5927
|
"reviewer",
|
|
5916
5928
|
"code-reviewer",
|
|
5917
5929
|
"quality-reviewer",
|
package/kitman.config.ts
CHANGED
|
@@ -56,12 +56,14 @@ export default defineKit({
|
|
|
56
56
|
// Each Agent lists the skills its role uses and opts into the tools it needs; the Run's other Kit skills it loads by
|
|
57
57
|
// name. A Step whose Kits lack a listed skill is told so, and the shipped prompts keep their fallbacks.
|
|
58
58
|
agents: {
|
|
59
|
+
// Implementers run on Claude Code alone: out of quota, the Step waits for its known reset rather than run on Pi.
|
|
59
60
|
implementer: {
|
|
61
|
+
harness: 'claude',
|
|
60
62
|
effort: 'medium',
|
|
61
|
-
fallbacks,
|
|
62
63
|
skills: ['tdd', 'diagnosing-bugs'],
|
|
63
64
|
instructions: { file: 'agents/implementer.md' }
|
|
64
65
|
},
|
|
66
|
+
'planned-implementer': { extends: 'implementer', effort: 'low' },
|
|
65
67
|
reviewer: { ...reviewer, effort: 'high', instructions: { file: 'agents/reviewer.md' } },
|
|
66
68
|
'code-reviewer': { extends: 'reviewer', skills: ['code-review'] },
|
|
67
69
|
'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.15",
|
|
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.15",
|
|
21
21
|
"effect": "^4.1.2"
|
|
22
22
|
},
|
|
23
23
|
"kitman": {
|
|
24
24
|
"bundle": "dist/bundle.js",
|
|
25
|
-
"digest": "
|
|
25
|
+
"digest": "cd8f075a275d96ea2e553110ac439dbd542f6e992e1326201a53eff715a7d7f3",
|
|
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
|
}
|