@kontourai/flow-agents 3.6.0 → 3.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/CHANGELOG.md +19 -0
- package/build/src/builder-flow-run-adapter.d.ts +22 -2
- package/build/src/builder-flow-run-adapter.js +93 -28
- package/build/src/builder-flow-runtime.d.ts +8 -3
- package/build/src/builder-flow-runtime.js +407 -51
- package/build/src/cli/assignment-provider.d.ts +4 -7
- package/build/src/cli/assignment-provider.js +80 -14
- package/build/src/cli/builder-run.js +14 -18
- package/build/src/cli/workflow-sidecar.d.ts +28 -4
- package/build/src/cli/workflow-sidecar.js +825 -103
- package/build/src/cli/workflow.js +301 -43
- package/build/src/flow-kit/validate.d.ts +17 -0
- package/build/src/flow-kit/validate.js +340 -2
- package/build/src/index.js +5 -5
- package/build/src/lib/observed-command.d.ts +7 -0
- package/build/src/lib/observed-command.js +100 -0
- package/build/src/tools/build-universal-bundles.js +53 -3
- package/build/src/tools/generate-context-map.js +5 -3
- package/context/scripts/hooks/lib/kit-catalog.js +1 -1
- package/context/scripts/hooks/stop-goal-fit.js +78 -9
- package/docs/context-map.md +22 -20
- package/docs/developer-architecture.md +1 -1
- package/docs/getting-started.md +9 -1
- package/docs/public-workflow-cli.md +76 -7
- package/docs/skills-map.md +51 -27
- package/docs/spec/builder-flow-runtime.md +75 -40
- package/docs/workflow-usage-guide.md +109 -42
- package/evals/fixtures/hook-influence/cases.json +2 -2
- package/evals/integration/test_builder_entry_enforcement.sh +52 -41
- package/evals/integration/test_builder_step_producers.sh +330 -6
- package/evals/integration/test_bundle_install.sh +318 -65
- package/evals/integration/test_bundle_lifecycle.sh +4 -6
- package/evals/integration/test_critique_supersession_roundtrip.sh +21 -8
- package/evals/integration/test_current_json_per_actor.sh +12 -0
- package/evals/integration/test_dual_emit_flow_step.sh +62 -43
- package/evals/integration/test_flowdef_session_activation.sh +145 -25
- package/evals/integration/test_flowdef_session_history_preservation.sh +23 -21
- package/evals/integration/test_gate_lockdown.sh +3 -5
- package/evals/integration/test_goal_fit_hook.sh +60 -2
- package/evals/integration/test_install_merge.sh +18 -8
- package/evals/integration/test_liveness_verdict.sh +14 -17
- package/evals/integration/test_phase_map_and_gate_claim.sh +63 -38
- package/evals/integration/test_public_workflow_cli.sh +334 -14
- package/evals/integration/test_pull_work_liveness_preflight.sh +22 -66
- package/evals/integration/test_sidecar_field_preservation.sh +36 -11
- package/evals/integration/test_workflow_sidecar_writer.sh +277 -44
- package/evals/integration/test_workflow_steering_hook.sh +15 -38
- package/evals/run.sh +2 -0
- package/evals/static/test_builder_skill_coherence.sh +247 -0
- package/evals/static/test_library_exports.sh +5 -2
- package/evals/static/test_universal_bundles.sh +44 -1
- package/evals/static/test_workflow_skills.sh +13 -325
- package/kits/builder/flows/build.flow.json +22 -0
- package/kits/builder/flows/shape.flow.json +9 -9
- package/kits/builder/kit.json +70 -16
- package/kits/builder/skills/builder-shape/SKILL.md +75 -75
- package/kits/builder/skills/continue-work/SKILL.md +45 -106
- package/kits/builder/skills/deliver/SKILL.md +96 -442
- package/kits/builder/skills/design-probe/SKILL.md +40 -139
- package/kits/builder/skills/evidence-gate/SKILL.md +59 -201
- package/kits/builder/skills/execute-plan/SKILL.md +54 -125
- package/kits/builder/skills/fix-bug/SKILL.md +42 -132
- package/kits/builder/skills/gate-review/SKILL.md +60 -211
- package/kits/builder/skills/idea-to-backlog/SKILL.md +63 -244
- package/kits/builder/skills/learning-review/SKILL.md +63 -170
- package/kits/builder/skills/pickup-probe/SKILL.md +54 -111
- package/kits/builder/skills/plan-work/SKILL.md +51 -185
- package/kits/builder/skills/pull-work/SKILL.md +136 -485
- package/kits/builder/skills/release-readiness/SKILL.md +66 -107
- package/kits/builder/skills/review-work/SKILL.md +89 -176
- package/kits/builder/skills/tdd-workflow/SKILL.md +53 -147
- package/kits/builder/skills/verify-work/SKILL.md +101 -113
- package/package.json +2 -2
- package/packaging/README.md +1 -1
- package/scripts/README.md +1 -1
- package/scripts/hooks/lib/kit-catalog.js +1 -1
- package/scripts/hooks/stop-goal-fit.js +78 -9
- package/scripts/install-codex-home.sh +63 -23
- package/scripts/install-owned-files.js +18 -2
- package/src/builder-flow-run-adapter.ts +118 -32
- package/src/builder-flow-runtime.ts +426 -64
- package/src/cli/assignment-provider-lock.test.mjs +83 -0
- package/src/cli/assignment-provider.ts +75 -14
- package/src/cli/builder-flow-run-adapter.test.mjs +4 -2
- package/src/cli/builder-flow-runtime.test.mjs +436 -18
- package/src/cli/builder-run.ts +3 -9
- package/src/cli/kit-metadata-security.test.mjs +232 -6
- package/src/cli/public-api.test.mjs +15 -0
- package/src/cli/workflow-sidecar-execution-proof.test.mjs +90 -0
- package/src/cli/workflow-sidecar.ts +746 -103
- package/src/cli/workflow.ts +288 -41
- package/src/flow-kit/validate.ts +320 -2
- package/src/index.ts +6 -5
- package/src/lib/observed-command.ts +96 -0
- package/src/tools/build-universal-bundles.ts +51 -3
- package/src/tools/generate-context-map.ts +5 -3
package/kits/builder/kit.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "builder",
|
|
4
4
|
"name": "Builder Kit",
|
|
5
5
|
"product_name": "Builder Kit",
|
|
6
|
-
"description": "A Flow Kit for shaping work, breaking it down, building changes, verifying evidence, preparing
|
|
6
|
+
"description": "A Flow Kit for shaping provider-backed work, breaking it down, building changes, verifying evidence, preparing provider change records, checking merge readiness, and recording learning.",
|
|
7
7
|
"flows": [
|
|
8
8
|
{
|
|
9
9
|
"id": "builder.shape",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"id": "builder.build",
|
|
15
15
|
"path": "flows/build.flow.json",
|
|
16
|
-
"description": "Pull ready work through design probing, planning, implementation, verification,
|
|
16
|
+
"description": "Pull ready provider-backed work through design probing, planning, implementation, verification, provider change readiness, merge readiness, and learning."
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"id": "builder.publish-learn",
|
|
@@ -48,53 +48,88 @@
|
|
|
48
48
|
{
|
|
49
49
|
"flow_id": "builder.build",
|
|
50
50
|
"step_id": "pull-work",
|
|
51
|
-
"skills": ["pull-work"]
|
|
51
|
+
"skills": ["pull-work"],
|
|
52
|
+
"expectation_ids": ["selected-work"]
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
55
|
"flow_id": "builder.build",
|
|
55
56
|
"step_id": "design-probe",
|
|
56
|
-
"skills": ["pickup-probe"]
|
|
57
|
+
"skills": ["pickup-probe"],
|
|
58
|
+
"expectation_ids": ["pickup-probe-readiness", "probe-decisions-or-accepted-gaps"]
|
|
57
59
|
},
|
|
58
60
|
{
|
|
59
61
|
"flow_id": "builder.build",
|
|
60
62
|
"step_id": "plan",
|
|
61
|
-
"skills": ["plan-work"]
|
|
63
|
+
"skills": ["plan-work"],
|
|
64
|
+
"expectation_ids": ["implementation-plan"]
|
|
62
65
|
},
|
|
63
66
|
{
|
|
64
67
|
"flow_id": "builder.build",
|
|
65
68
|
"step_id": "execute",
|
|
66
|
-
"skills": ["execute-plan"]
|
|
69
|
+
"skills": ["execute-plan"],
|
|
70
|
+
"expectation_ids": ["implementation-scope"]
|
|
67
71
|
},
|
|
68
72
|
{
|
|
69
73
|
"flow_id": "builder.build",
|
|
70
74
|
"step_id": "verify",
|
|
71
|
-
"skills": ["review-work", "verify-work"]
|
|
75
|
+
"skills": ["review-work", "verify-work"],
|
|
76
|
+
"expectation_ids": ["clean-critique", "acceptance-criteria", "tests-evidence", "policy-compliance"]
|
|
72
77
|
},
|
|
73
78
|
{
|
|
74
79
|
"flow_id": "builder.build",
|
|
75
80
|
"step_id": "merge-ready",
|
|
76
|
-
"skills": ["evidence-gate"]
|
|
81
|
+
"skills": ["evidence-gate"],
|
|
82
|
+
"expectation_ids": ["merge-readiness"]
|
|
77
83
|
},
|
|
78
84
|
{
|
|
79
85
|
"flow_id": "builder.build",
|
|
80
86
|
"step_id": "pr-open",
|
|
81
87
|
"skills": [],
|
|
82
|
-
"operations": ["publish-change"]
|
|
88
|
+
"operations": ["publish-change"],
|
|
89
|
+
"expectation_ids": ["pull-request-opened"],
|
|
90
|
+
"artifacts": ["release.json"]
|
|
83
91
|
},
|
|
84
92
|
{
|
|
85
93
|
"flow_id": "builder.build",
|
|
86
94
|
"step_id": "merge-ready-ci",
|
|
87
|
-
"skills": ["release-readiness"]
|
|
95
|
+
"skills": ["release-readiness"],
|
|
96
|
+
"expectation_ids": ["ci-merge-readiness"]
|
|
88
97
|
},
|
|
89
98
|
{
|
|
90
99
|
"flow_id": "builder.build",
|
|
91
100
|
"step_id": "learn",
|
|
92
|
-
"skills": ["learning-review"]
|
|
101
|
+
"skills": ["learning-review"],
|
|
102
|
+
"expectation_ids": ["decision-evidence", "learning-evidence"]
|
|
93
103
|
},
|
|
94
104
|
{
|
|
95
105
|
"flow_id": "builder.build",
|
|
96
106
|
"step_id": "done",
|
|
97
|
-
"skills": []
|
|
107
|
+
"skills": [],
|
|
108
|
+
"expectation_ids": []
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"flow_id": "builder.shape",
|
|
112
|
+
"step_id": "shape",
|
|
113
|
+
"skills": ["idea-to-backlog"],
|
|
114
|
+
"expectation_ids": ["shaped-problem", "shaped-outcome", "shaped-constraints", "shaped-non-goals", "shaped-success", "shaped-risk", "open-decisions"]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"flow_id": "builder.shape",
|
|
118
|
+
"step_id": "breakdown",
|
|
119
|
+
"skills": ["idea-to-backlog"],
|
|
120
|
+
"expectation_ids": ["slices-defined"]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"flow_id": "builder.shape",
|
|
124
|
+
"step_id": "file-issues",
|
|
125
|
+
"skills": ["idea-to-backlog"],
|
|
126
|
+
"expectation_ids": ["work-items-filed"]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"flow_id": "builder.shape",
|
|
130
|
+
"step_id": "shape-done",
|
|
131
|
+
"skills": [],
|
|
132
|
+
"expectation_ids": []
|
|
98
133
|
}
|
|
99
134
|
],
|
|
100
135
|
"hook_influence_expectations": [
|
|
@@ -124,7 +159,7 @@
|
|
|
124
159
|
],
|
|
125
160
|
"must_include_actions": [
|
|
126
161
|
"review-work for report-only critique before verify-work",
|
|
127
|
-
"not count critique
|
|
162
|
+
"not count report-only critique as verification evidence"
|
|
128
163
|
]
|
|
129
164
|
},
|
|
130
165
|
{
|
|
@@ -135,7 +170,7 @@
|
|
|
135
170
|
"must_include_guidance": [
|
|
136
171
|
"KIT WORKFLOW ROUTE",
|
|
137
172
|
"activate `deliver`",
|
|
138
|
-
"
|
|
173
|
+
"public `flow-agents workflow` interface",
|
|
139
174
|
"plan-work -> execute-plan -> review-work -> verify-work",
|
|
140
175
|
"release-readiness and learning-review"
|
|
141
176
|
],
|
|
@@ -147,6 +182,25 @@
|
|
|
147
182
|
]
|
|
148
183
|
}
|
|
149
184
|
],
|
|
185
|
+
"skill_roles": [
|
|
186
|
+
{ "skill_id": "builder.builder-shape", "role": "entrypoint", "flow_id": "builder.shape", "step_ids": [], "artifacts": [], "expectation_ids": [] },
|
|
187
|
+
{ "skill_id": "builder.deliver", "role": "entrypoint", "flow_id": "builder.build", "step_ids": [], "artifacts": [], "expectation_ids": [] },
|
|
188
|
+
{ "skill_id": "builder.fix-bug", "role": "profile", "flow_id": "builder.build", "step_ids": [], "artifacts": [], "expectation_ids": [] },
|
|
189
|
+
{ "skill_id": "builder.tdd-workflow", "role": "profile", "flow_id": "builder.build", "step_ids": [], "artifacts": [], "expectation_ids": [] },
|
|
190
|
+
{ "skill_id": "builder.idea-to-backlog", "role": "step", "flow_id": "builder.shape", "step_ids": ["shape", "breakdown", "file-issues"], "artifacts": ["<slug>--idea-to-backlog.md", "trust.bundle#builder.shape"], "expectation_ids": ["shaped-problem", "shaped-outcome", "shaped-constraints", "shaped-non-goals", "shaped-success", "shaped-risk", "open-decisions", "slices-defined", "work-items-filed"] },
|
|
191
|
+
{ "skill_id": "builder.pull-work", "role": "step", "flow_id": "builder.build", "step_ids": ["pull-work"], "artifacts": ["<slug>--pull-work.md", "trust.bundle#selected-work"], "expectation_ids": ["selected-work"] },
|
|
192
|
+
{ "skill_id": "builder.pickup-probe", "role": "step", "flow_id": "builder.build", "step_ids": ["design-probe"], "artifacts": ["<slug>--pull-work.md", "trust.bundle#pickup-probe"], "expectation_ids": ["pickup-probe-readiness", "probe-decisions-or-accepted-gaps"] },
|
|
193
|
+
{ "skill_id": "builder.plan-work", "role": "step", "flow_id": "builder.build", "step_ids": ["plan"], "artifacts": ["<slug>--plan-work.md", "acceptance.json", "handoff.json", "trust.bundle#implementation-plan"], "expectation_ids": ["implementation-plan"] },
|
|
194
|
+
{ "skill_id": "builder.execute-plan", "role": "step", "flow_id": "builder.build", "step_ids": ["execute"], "artifacts": ["<slug>--deliver.md", "state.json", "trust.bundle#implementation-scope"], "expectation_ids": ["implementation-scope"] },
|
|
195
|
+
{ "skill_id": "builder.review-work", "role": "step", "flow_id": "builder.build", "step_ids": ["verify"], "artifacts": ["trust.bundle#critique"], "expectation_ids": ["clean-critique"] },
|
|
196
|
+
{ "skill_id": "builder.verify-work", "role": "step", "flow_id": "builder.build", "step_ids": ["verify"], "artifacts": ["trust.bundle#acceptance-criteria", "trust.bundle#tests-evidence", "trust.bundle#policy-compliance"], "expectation_ids": ["acceptance-criteria", "tests-evidence", "policy-compliance"] },
|
|
197
|
+
{ "skill_id": "builder.evidence-gate", "role": "step", "flow_id": "builder.build", "step_ids": ["merge-ready"], "artifacts": ["<slug>--evidence-gate.md", "trust.bundle#merge-readiness"], "expectation_ids": ["merge-readiness"] },
|
|
198
|
+
{ "skill_id": "builder.release-readiness", "role": "step", "flow_id": "builder.publish-learn", "step_ids": ["merge-ready-ci"], "artifacts": ["release.json", "trust.bundle#ci-merge-readiness"], "expectation_ids": ["ci-merge-readiness"] },
|
|
199
|
+
{ "skill_id": "builder.learning-review", "role": "step", "flow_id": "builder.publish-learn", "step_ids": ["learn"], "artifacts": ["learning.json", "trust.bundle#decision-evidence", "trust.bundle#learning-evidence"], "expectation_ids": ["decision-evidence", "learning-evidence"] },
|
|
200
|
+
{ "skill_id": "builder.design-probe", "role": "shared-primitive", "step_ids": [], "artifacts": ["ephemeral decision record"], "expectation_ids": [] },
|
|
201
|
+
{ "skill_id": "builder.continue-work", "role": "extension", "step_ids": [], "artifacts": [], "expectation_ids": [] },
|
|
202
|
+
{ "skill_id": "builder.gate-review", "role": "extension", "step_ids": [], "artifacts": ["<slug>--gate-review.md", "gate-review.inquiries.json"], "expectation_ids": [] }
|
|
203
|
+
],
|
|
150
204
|
"skills": [
|
|
151
205
|
{
|
|
152
206
|
"id": "builder.builder-shape",
|
|
@@ -191,7 +245,7 @@
|
|
|
191
245
|
{
|
|
192
246
|
"id": "builder.idea-to-backlog",
|
|
193
247
|
"path": "skills/idea-to-backlog/SKILL.md",
|
|
194
|
-
"description": "Turn raw ideas into shaped, prioritized, executable GitHub
|
|
248
|
+
"description": "Turn raw ideas into shaped, prioritized, executable provider-backed work items; GitHub is an optional adapter."
|
|
195
249
|
},
|
|
196
250
|
{
|
|
197
251
|
"id": "builder.learning-review",
|
|
@@ -211,7 +265,7 @@
|
|
|
211
265
|
{
|
|
212
266
|
"id": "builder.pull-work",
|
|
213
267
|
"path": "skills/pull-work/SKILL.md",
|
|
214
|
-
"description": "Select ready
|
|
268
|
+
"description": "Select ready provider-backed work items from the executable backlog for implementation; GitHub is an optional adapter."
|
|
215
269
|
},
|
|
216
270
|
{
|
|
217
271
|
"id": "builder.release-readiness",
|
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "builder-shape"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Builder Kit shaping entrypoint. Turns a raw idea into a provider-neutral, reviewable backlog proposal and stops before build selection unless the user explicitly continues."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Builder Shape
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Role and Boundary
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Role:** Builder Kit entrypoint for `builder.shape`.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- Compatibility: Direct `idea-to-backlog` usage remains valid and should behave exactly as described in `kits/builder/skills/idea-to-backlog/SKILL.md`.
|
|
23
|
-
- Primitive recovery: if a user invokes `idea-to-backlog` or another primitive with missing shaping context and appears to want the product flow, explain that Builder Kit shape is the entry point and offer to route there.
|
|
12
|
+
Use this surface only when the user explicitly asks to shape an idea with Builder
|
|
13
|
+
Kit, or accepts it after it is offered as an option. It delegates shaping to
|
|
14
|
+
`idea-to-backlog`; it does not implement, select, or deliver work.
|
|
15
|
+
|
|
16
|
+
`builder.shape` is selected for raw ideas, vague outcomes, PRD-like concepts,
|
|
17
|
+
spikes, and prototypes. It is not a generic routing rule for every planning
|
|
18
|
+
request. Direct `idea-to-backlog` remains a valid standalone primitive.
|
|
19
|
+
|
|
20
|
+
This entrypoint owns **no step-gate evidence**. `idea-to-backlog` owns its
|
|
21
|
+
shaping artifact and any evidence required by its own contract.
|
|
24
22
|
|
|
25
23
|
## Model Routing
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- `
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
25
|
+
Resolve `delegate-design` from `.datum/config.json` for shaping and alignment.
|
|
26
|
+
Model choice and reasoning effort follow
|
|
27
|
+
`context/contracts/execution-contract.md`; if the mapping is unavailable,
|
|
28
|
+
inherit the session model and record the fallback.
|
|
29
|
+
|
|
30
|
+
## Inputs and Providers
|
|
31
|
+
|
|
32
|
+
Start from the user's raw idea, notes, or current conversation context. Ask
|
|
33
|
+
one focused alignment question at a time when outcome, constraints, non-goals,
|
|
34
|
+
success signal, risk, or the relationship between ideas is unclear.
|
|
35
|
+
|
|
36
|
+
Describe backlog targets through adapters:
|
|
37
|
+
|
|
38
|
+
- **Work Item adapter:** the proposed buildable unit and its acceptance context.
|
|
39
|
+
- **Board adapter:** the destination queue or backlog, when one is requested.
|
|
40
|
+
- **Repository adapter:** the repository or product boundary affected by the item.
|
|
41
|
+
|
|
42
|
+
No adapter is required merely to shape an idea. A GitHub issue or project may
|
|
43
|
+
be a labeled example of a Work Item or Board adapter, never a required
|
|
44
|
+
contract.
|
|
45
|
+
|
|
46
|
+
## Flow Behavior
|
|
47
|
+
|
|
48
|
+
1. Derive a safe explicit slug from the selected shape title: lowercase ASCII
|
|
49
|
+
words separated by single hyphens. Never interpolate raw request text into a
|
|
50
|
+
shell command, slug, or quoted argument.
|
|
51
|
+
2. Start and inspect the public shape run using the safe slug and a fixed,
|
|
52
|
+
operator-authored summary:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
flow-agents workflow start --flow builder.shape \
|
|
56
|
+
--task-slug <safe-shape-slug> \
|
|
57
|
+
--summary "Shape the selected work into independently actionable slices."
|
|
58
|
+
flow-agents workflow status --session-dir .kontourai/flow-agents/<safe-shape-slug> --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
3. State that this entrypoint selects `builder.shape` and delegates to
|
|
62
|
+
`idea-to-backlog`.
|
|
63
|
+
4. Gather and clarify the idea.
|
|
64
|
+
5. Have `idea-to-backlog` produce its normal shaping result, including
|
|
65
|
+
candidate Work Items, slicing, risks, decisions, and a next-action.
|
|
66
|
+
6. Stop at the backlog decision. Create or synchronize provider records only
|
|
67
|
+
when the user explicitly requests it and the relevant adapters are known.
|
|
68
|
+
|
|
69
|
+
Do not duplicate `idea-to-backlog`'s intake, prioritization, slicing, artifact,
|
|
70
|
+
or gate logic. Do not invoke `pull-work`, `plan-work`, `execute-plan`,
|
|
71
|
+
`review-work`, `verify-work`, or release activities from this entrypoint.
|
|
72
|
+
|
|
73
|
+
## Output Responsibility
|
|
74
|
+
|
|
75
|
+
The produced result is the standard `idea-to-backlog` shaping report. It must
|
|
76
|
+
identify the selected flow (`builder.shape`), the source ideas, candidate Work
|
|
77
|
+
Items, provider-sync status, decisions, open questions, and the backlog
|
|
78
|
+
decision. This entrypoint creates no step evidence; `idea-to-backlog` records
|
|
79
|
+
the owning trust-bundle slices through the public CLI.
|
|
80
|
+
|
|
81
|
+
## Standalone and No-Active-Run Behavior
|
|
82
|
+
|
|
83
|
+
`builder.shape` may run independently of `builder.build`. If a prior shaping
|
|
84
|
+
report exists, use it as context; do not assume it authorizes provider
|
|
85
|
+
synchronization or build execution. If the public shape interface is unavailable,
|
|
86
|
+
report an unsupported-runtime blocker rather than using an internal writer.
|
|
@@ -1,125 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "continue-work"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Explicit Builder Kit continuation extension. Prepares a fresh-context handoff for the next unfinished increment of a multi-slice Work Item."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Continue Work
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Role and Boundary
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Role:** explicit continuation extension outside generic routing.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Use only when the user explicitly asks to advance the next unfinished increment
|
|
13
|
+
of a multi-slice Work Item that has prior completed increments. This extension
|
|
14
|
+
does not select a new flow, resume an interrupted increment, or run build
|
|
15
|
+
steps in-line. It prepares a fresh-context handoff that routes the next
|
|
16
|
+
increment through the normal `builder.build` entrypoint.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
It owns **no step-gate evidence**. `pull-work`, `design-probe`, and the build
|
|
19
|
+
primitives own selection, probe, planning, execution, review, and verification
|
|
20
|
+
evidence.
|
|
18
21
|
|
|
19
|
-
##
|
|
22
|
+
## Inputs and Provider Adapters
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
Use the Work Item adapter for slice status and acceptance context, the Board
|
|
25
|
+
adapter for selection and dependencies, the Repository adapter for local
|
|
26
|
+
history and working agreements, and the Change adapter for prior completed
|
|
27
|
+
increments. GitHub issues and pull requests are optional examples of Work Item
|
|
28
|
+
and Change adapters, not mandatory inputs.
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
Restore durable context when available: prior plans, handoffs, verified
|
|
31
|
+
outcomes, completed changes, and unresolved blockers. If it is unavailable,
|
|
32
|
+
state the gap and rely on the Work Item and repository history without
|
|
33
|
+
inventing missing facts.
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
## Extension Behavior
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
1. Confirm this is the next increment, not a restart of the same interrupted
|
|
38
|
+
increment. Ask one focused question when that boundary is unclear.
|
|
39
|
+
2. Determine the thinnest remaining meaningful slice from the Work Item and
|
|
40
|
+
completed Change-adapter history.
|
|
41
|
+
3. Build a minimal fresh-context handoff containing the next slice, acceptance
|
|
42
|
+
context, repository working agreements, relevant prior changes, known
|
|
43
|
+
blockers, and adapter references.
|
|
44
|
+
4. Hand the new context to `deliver`, which starts or continues `builder.build`
|
|
45
|
+
and routes the item through its canonical primitives.
|
|
29
46
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
derives run identity from the session slug and only loads, validates, and projects;
|
|
34
|
-
never invent or supply a run id or step, and use `builder-run sync` separately only
|
|
35
|
-
when recorded evidence should be attached and evaluated.
|
|
47
|
+
Do not repeat the detailed `pull-work` or `design-probe` procedure, attach
|
|
48
|
+
evidence on their behalf, or treat a continuation request as authority to skip
|
|
49
|
+
selection and probe work.
|
|
36
50
|
|
|
37
|
-
|
|
51
|
+
## Output Responsibility
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
The output is a concise, ephemeral fresh-context handoff delivered to a new
|
|
54
|
+
agent or operator. It creates no persistent artifact, trust slice, or gate
|
|
55
|
+
evidence of its own.
|
|
40
56
|
|
|
41
|
-
|
|
57
|
+
## Standalone and No-Active-Run Behavior
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- `AGENTS.md` "Operating discipline (working agreements)" — the operating agreements that travel with every increment.
|
|
50
|
-
|
|
51
|
-
## Workflow
|
|
52
|
-
|
|
53
|
-
### 1. Restore the durable record (resume surface, #153)
|
|
54
|
-
|
|
55
|
-
Before doing anything else, restore the item's durable record into context through the resume surface (#153) rather than re-deriving it from chat memory: `state.json` lifecycle, `handoff.json` next-steps and blockers, the plan artifact, and a one-line `trust.bundle` summary of what is already verified. This is *restore for context*, not *resume the slice* — continue-work is advancing to the next increment, so already-verified prior slices stay verified and are not re-proven.
|
|
56
|
-
|
|
57
|
-
If no durable record exists for the item, record that gap and rely on the issue body plus merged PRs/commits as the authoritative history.
|
|
58
|
-
|
|
59
|
-
If the item was taken over from a stale incumbent (a `reclaimable` selection resumed via pull-work's **Takeover Protocol**, #294 / ADR 0021 §5), restoring the durable record IS the resumption: the deterministic slug points at the incumbent's existing `.kontourai/flow-agents/<slug>/`, and you continue the incumbent's branch (the `resume_branch` from `takeover-preflight`/the supersede output) — never a new branch, never a restarted plan. Takeover is resumption, not restart.
|
|
60
|
-
|
|
61
|
-
### 2. Determine the next undone slice
|
|
62
|
-
|
|
63
|
-
From the issue body plus the merged PRs and commits referencing the issue, determine which slices have **landed** and which is the **next undone slice**.
|
|
64
|
-
|
|
65
|
-
- Read the issue body for the slice list / acceptance breakdown.
|
|
66
|
-
- List merged PRs and commits referencing the issue (`gh pr list --search <issue>`, `git log --grep`) to see which slices are done.
|
|
67
|
-
- The next undone slice is the thinnest remaining meaningful increment. If the remaining work is ambiguous or no longer matches the issue, route back to `idea-to-backlog` instead of inventing scope.
|
|
68
|
-
|
|
69
|
-
### 3. Route the slice THROUGH pull-work + pickup-probe (the gate, never around it)
|
|
70
|
-
|
|
71
|
-
Hand the chosen next slice to `pull-work`, then `pickup-probe`. **Never bypass this gate.** A continuation instruction ("continue", "pick up the next") may justify inspecting the queue, but it must not skip per-item pickup Probe evidence — see pull-work's Pickup Gate ("A stale broad continuation instruction … may allow queue inspection but must not bypass per-item pickup Probe evidence") and its post-merge rule ("automatic continuation … cannot enter planning or execution for the next work item until a fresh pickup Probe record exists for that newly selected item").
|
|
72
|
-
|
|
73
|
-
- `pull-work` enforces board selection, WIP/shepherding, dependency, grouping, freshness (planned-base drift), and worktree logic for the selected slice, and writes the pull-work artifact.
|
|
74
|
-
- `pickup-probe` then challenges the slice against the repository — scope, acceptance quality, provider state, drift, conflict risks — and records the pickup Probe outcome, planning readiness, decisions, unresolved questions, and accepted gaps.
|
|
75
|
-
- continue-work does **not** reimplement either step's logic. It supplies them the next slice and the precedent (prior slices) and consumes their artifacts. The evidence that the gate ran lives in the pull-work / pickup-probe artifact referenced by the handoff (`probe_status`, `probe_artifact_ref`).
|
|
76
|
-
|
|
77
|
-
Do not enter planning or execution until a fresh pickup Probe record exists for this slice.
|
|
78
|
-
|
|
79
|
-
### 4. Assemble the minimal handoff
|
|
80
|
-
|
|
81
|
-
Once the slice passes the gate, assemble the **minimal handoff** — the smallest durable context a fresh agent needs:
|
|
82
|
-
|
|
83
|
-
- the **slice's spec**: `gh issue view <issue>` (the issue is the spec);
|
|
84
|
-
- the **operating agreements**: `AGENTS.md` "Operating discipline";
|
|
85
|
-
- the **precedent**: the prior slices' merged PRs as the model (`git show` them);
|
|
86
|
-
- the **gate evidence**: the pull-work / pickup-probe artifact ref proving the slice passed the gate.
|
|
87
|
-
|
|
88
|
-
The minimal template it encodes:
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
Implement [slice N of #ISSUE] in <repo> — the <kit>.
|
|
92
|
-
Read first: AGENTS.md 'Operating discipline'; gh issue view ISSUE (your slice's spec);
|
|
93
|
-
the prior slices as your model (PRs … — git show them).
|
|
94
|
-
Then: scope → minimal impl reusing existing ops (consume-never-fork) → tests stay green +
|
|
95
|
-
cover new code → PR referencing #ISSUE, <kit-dir> only. Don't merge; get CI green and report.
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### 5. Execute in a fresh context (ADR 0013)
|
|
99
|
-
|
|
100
|
-
Hand the minimal template off into a **fresh context** — either spawn a sub-agent for the next increment, or hand the prompt to the operator for a fresh session. Per ADR 0013, the new increment rebuilds its context from durable artifacts (the issue, AGENTS.md, prior PRs, the gate artifact), not from this conversation's history. The fresh-handoff is the delivery seam: a sharp window for the new slice, continuity carried by the durable system.
|
|
101
|
-
|
|
102
|
-
The fresh-context agent runs the standard Builder Kit build for its slice (`plan-work` → `execute-plan` → `review-work` → `verify-work`), which it may reach via `deliver`. continue-work does not re-run those primitives in-line; it sets up the handoff and lets the fresh context execute.
|
|
103
|
-
|
|
104
|
-
### 6. Verify and report — do not merge
|
|
105
|
-
|
|
106
|
-
After the slice is built:
|
|
107
|
-
|
|
108
|
-
- Confirm the **boundary held** (only `<kit-dir>` changed) and the **suites are green** (the slice's tests cover the new code and nothing regressed).
|
|
109
|
-
- Report: which slice advanced, the gate evidence (pull-work / pickup-probe artifact), the precedent PRs used, the verification result, and the PR.
|
|
110
|
-
- **Do not merge without authorization.** Get CI green and report back.
|
|
111
|
-
|
|
112
|
-
## Composition Gate
|
|
113
|
-
|
|
114
|
-
continue-work has correctly composed the pieces only when:
|
|
115
|
-
|
|
116
|
-
- the durable record was restored via the resume surface (#153), or a missing-record gap is recorded;
|
|
117
|
-
- the next undone slice was derived from the issue body plus merged PRs/commits, not invented;
|
|
118
|
-
- the slice was routed **through** `pull-work` + `pickup-probe`, with a fresh pickup Probe record (`probe_status`, `probe_artifact_ref`) referenced by the handoff — the gate was not bypassed;
|
|
119
|
-
- the minimal handoff carries the issue spec, `AGENTS.md` operating agreements, and the precedent PRs;
|
|
120
|
-
- the next increment runs in a **fresh context** per ADR 0013;
|
|
121
|
-
- the boundary held, suites are green, and the change is reported without merging.
|
|
122
|
-
|
|
123
|
-
If any item fails, stop and surface the gap rather than proceeding.
|
|
124
|
-
|
|
125
|
-
Refs: #106 (proving ground), #153 (resume surface), #168 / ADR 0013 (context lifecycle), #164 (operating agreements), ADR 0014 (core vs domain-kit boundary).
|
|
59
|
+
This extension may run without an active workflow run because it only prepares
|
|
60
|
+
the next handoff. It does not create, recover, or mutate a run. If an active
|
|
61
|
+
run exists, inspect it only through `flow-agents workflow status --session-dir
|
|
62
|
+
<session-dir>` and do not redirect or advance it. For an interrupted current
|
|
63
|
+
increment, route to the run's public resume behavior instead of using this
|
|
64
|
+
extension.
|