@kontourai/flow-agents 3.6.0 → 3.7.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 +7 -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 +308 -47
- package/build/src/cli/assignment-provider.d.ts +4 -7
- package/build/src/cli/assignment-provider.js +67 -13
- 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 +801 -97
- package/build/src/cli/workflow.js +290 -42
- 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/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/public-workflow-cli.md +76 -7
- package/docs/skills-map.md +51 -27
- package/docs/spec/builder-flow-runtime.md +41 -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 +297 -6
- package/evals/integration/test_bundle_install.sh +212 -63
- 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_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 +325 -11
- 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_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/scripts/hooks/lib/kit-catalog.js +1 -1
- package/scripts/hooks/stop-goal-fit.js +78 -9
- package/src/builder-flow-run-adapter.ts +118 -32
- package/src/builder-flow-runtime.ts +331 -61
- package/src/cli/assignment-provider-lock.test.mjs +83 -0
- package/src/cli/assignment-provider.ts +62 -13
- package/src/cli/builder-flow-run-adapter.test.mjs +4 -2
- package/src/cli/builder-flow-runtime.test.mjs +194 -8
- 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 +724 -97
- package/src/cli/workflow.ts +277 -40
- 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/generate-context-map.ts +5 -3
|
@@ -31,7 +31,11 @@ WRITER="workflow-sidecar"
|
|
|
31
31
|
TMPDIR_EVAL="$(mktemp -d)"
|
|
32
32
|
errors=0
|
|
33
33
|
|
|
34
|
-
cleanup() {
|
|
34
|
+
cleanup() {
|
|
35
|
+
local status=$?
|
|
36
|
+
rm -rf "$TMPDIR_EVAL"
|
|
37
|
+
return "$status"
|
|
38
|
+
}
|
|
35
39
|
trap cleanup EXIT
|
|
36
40
|
|
|
37
41
|
_pass() { echo " ✓ $1"; }
|
|
@@ -46,6 +50,7 @@ SESSION_ROOT="$TMPDIR_EVAL/repo/.kontourai/flow-agents"
|
|
|
46
50
|
SLUG="sidecar-field-preservation-sweep"
|
|
47
51
|
SESSION_DIR="$SESSION_ROOT/$SLUG"
|
|
48
52
|
STATE="$SESSION_DIR/state.json"
|
|
53
|
+
DELIVER_ARTIFACT="$SESSION_DIR/$SLUG--deliver.md"
|
|
49
54
|
mkdir -p "$SESSION_ROOT"
|
|
50
55
|
|
|
51
56
|
# ─── Field-identity assertion helpers ────────────────────────────────────────
|
|
@@ -58,7 +63,11 @@ mkdir -p "$SESSION_ROOT"
|
|
|
58
63
|
# persistent field. No fixture forces a synthetic owner value — that would test a code path that
|
|
59
64
|
# does not exist today.
|
|
60
65
|
FIELDS=(branch task_slug repo created_at owner)
|
|
61
|
-
|
|
66
|
+
BASELINE_BRANCH=""
|
|
67
|
+
BASELINE_TASK_SLUG=""
|
|
68
|
+
BASELINE_REPO=""
|
|
69
|
+
BASELINE_CREATED_AT=""
|
|
70
|
+
BASELINE_OWNER=""
|
|
62
71
|
|
|
63
72
|
_field() {
|
|
64
73
|
local file="$1" field="$2"
|
|
@@ -66,19 +75,32 @@ _field() {
|
|
|
66
75
|
}
|
|
67
76
|
|
|
68
77
|
_capture_baseline() {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
BASELINE_BRANCH="$(_field "$STATE" branch)"
|
|
79
|
+
BASELINE_TASK_SLUG="$(_field "$STATE" task_slug)"
|
|
80
|
+
BASELINE_REPO="$(_field "$STATE" repo)"
|
|
81
|
+
BASELINE_CREATED_AT="$(_field "$STATE" created_at)"
|
|
82
|
+
BASELINE_OWNER="$(_field "$STATE" owner)"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
_baseline_field() {
|
|
86
|
+
case "$1" in
|
|
87
|
+
branch) printf '%s' "$BASELINE_BRANCH" ;;
|
|
88
|
+
task_slug) printf '%s' "$BASELINE_TASK_SLUG" ;;
|
|
89
|
+
repo) printf '%s' "$BASELINE_REPO" ;;
|
|
90
|
+
created_at) printf '%s' "$BASELINE_CREATED_AT" ;;
|
|
91
|
+
owner) printf '%s' "$BASELINE_OWNER" ;;
|
|
92
|
+
*) return 1 ;;
|
|
93
|
+
esac
|
|
73
94
|
}
|
|
74
95
|
|
|
75
96
|
_assert_preserved() {
|
|
76
97
|
local label="$1"
|
|
77
|
-
local field actual ok=1
|
|
98
|
+
local field actual expected ok=1
|
|
78
99
|
for field in "${FIELDS[@]}"; do
|
|
79
100
|
actual="$(_field "$STATE" "$field")"
|
|
80
|
-
|
|
81
|
-
|
|
101
|
+
expected="$(_baseline_field "$field")"
|
|
102
|
+
if [[ "$actual" != "$expected" ]]; then
|
|
103
|
+
_fail "$label dropped/changed persistent field '$field': expected '$expected' got '$actual'"
|
|
82
104
|
ok=0
|
|
83
105
|
fi
|
|
84
106
|
done
|
|
@@ -113,8 +135,8 @@ if [[ ! -f "$STATE" ]]; then
|
|
|
113
135
|
fi
|
|
114
136
|
|
|
115
137
|
_capture_baseline
|
|
116
|
-
if [[ "$
|
|
117
|
-
_fail "sweep setup: seeded baseline did not carry the expected branch/created_at/task_slug (branch=$
|
|
138
|
+
if [[ "$BASELINE_BRANCH" != "agent/sweep-actor/$SLUG" || "$BASELINE_CREATED_AT" != "$SEED_TS" || "$BASELINE_TASK_SLUG" != "$SLUG" ]]; then
|
|
139
|
+
_fail "sweep setup: seeded baseline did not carry the expected branch/created_at/task_slug (branch=$BASELINE_BRANCH created_at=$BASELINE_CREATED_AT task_slug=$BASELINE_TASK_SLUG)"
|
|
118
140
|
fi
|
|
119
141
|
|
|
120
142
|
# ─── 1. init-plan, run against a BRANCH-LESS plan artifact ───────────────────────────────────
|
|
@@ -194,6 +216,8 @@ if flow_agents_node "$WRITER" record-critique "$SESSION_DIR" \
|
|
|
194
216
|
--reviewer tool-code-reviewer \
|
|
195
217
|
--verdict pass \
|
|
196
218
|
--summary "No blocking findings." \
|
|
219
|
+
--artifact-ref "$PLAN_ARTIFACT" \
|
|
220
|
+
--lane-json "{\"id\":\"code-review\",\"status\":\"pass\",\"summary\":\"Reviewed the field-preservation plan artifact.\",\"evidence_refs\":[{\"kind\":\"artifact\",\"file\":\"$PLAN_ARTIFACT\",\"summary\":\"Reviewed field-preservation plan artifact.\"}]}" \
|
|
197
221
|
--finding-json '{"id":"sweep-finding","severity":"low","status":"fixed","description":"No blocking issues found during sweep sanity critique."}' \
|
|
198
222
|
--timestamp "2026-06-20T08:25:00Z" >"$TMPDIR_EVAL/critique.out" 2>"$TMPDIR_EVAL/critique.err"; then
|
|
199
223
|
_assert_preserved "record-critique"
|
|
@@ -211,6 +235,7 @@ fi
|
|
|
211
235
|
if flow_agents_node "$WRITER" record-gate-claim "$SESSION_DIR" \
|
|
212
236
|
--status pass \
|
|
213
237
|
--summary "Implementation scope recorded for the sweep fixture." \
|
|
238
|
+
--evidence-ref-json "{\"kind\":\"artifact\",\"file\":\"$DELIVER_ARTIFACT\",\"summary\":\"Durable delivery artifact for the field-preservation implementation scope.\"}" \
|
|
214
239
|
--timestamp "2026-06-20T08:30:00Z" >"$TMPDIR_EVAL/gate-claim.out" 2>"$TMPDIR_EVAL/gate-claim.err"; then
|
|
215
240
|
_assert_preserved "record-gate-claim"
|
|
216
241
|
else
|