@kontourai/flow-agents 2.2.0 → 2.4.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/.github/CODEOWNERS +8 -0
- package/.github/workflows/ci.yml +32 -0
- package/AGENTS.md +4 -4
- package/CHANGELOG.md +46 -0
- package/CONTEXT.md +14 -0
- package/README.md +9 -3
- package/agents/dev.json +1 -1
- package/agents/tool-code-reviewer.json +1 -1
- package/agents/tool-planner.json +3 -3
- package/agents/tool-verifier.json +3 -3
- package/build/src/cli/console-learning-projection.js +3 -2
- package/build/src/cli/init.js +104 -21
- package/build/src/cli/kit.js +37 -6
- package/build/src/cli/pull-work-provider.js +1 -1
- package/build/src/cli/usage-feedback.js +3 -3
- package/build/src/cli/validate-hook-influence.js +1 -0
- package/build/src/cli/validate-workflow-artifacts.js +22 -6
- package/build/src/cli/workflow-artifact-cleanup-audit.js +36 -2
- package/build/src/cli/workflow-sidecar.d.ts +14 -7
- package/build/src/cli/workflow-sidecar.js +792 -69
- package/build/src/flow-kit/validate.d.ts +23 -0
- package/build/src/flow-kit/validate.js +67 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +1 -1
- package/build/src/lib/flow-resolver.d.ts +6 -4
- package/build/src/lib/flow-resolver.js +125 -58
- package/build/src/lib/local-artifact-root.d.ts +14 -2
- package/build/src/lib/local-artifact-root.js +22 -5
- package/build/src/lib/workflow-learning-projection.js +2 -2
- package/build/src/runtime-adapters.d.ts +12 -0
- package/build/src/runtime-adapters.js +56 -16
- package/build/src/tools/build-universal-bundles.js +49 -16
- package/build/src/tools/generate-context-map.js +10 -8
- package/build/src/tools/validate-source-tree.js +23 -1
- package/console.telemetry.json +22 -0
- package/context/contracts/artifact-contract.md +38 -7
- package/context/contracts/builder-kit-workflow-state-contract.md +3 -2
- package/context/contracts/decision-registry-contract.md +263 -0
- package/context/contracts/delivery-contract.md +1 -1
- package/context/contracts/planning-contract.md +2 -1
- package/context/contracts/review-contract.md +5 -3
- package/context/contracts/verification-contract.md +9 -1
- package/context/contracts/work-item-contract.md +1 -1
- package/context/deferred/parallelization.md +1 -1
- package/context/gate-awareness.md +4 -4
- package/context/scripts/git-status.sh +2 -2
- package/context/scripts/hooks/config-protection.js +502 -2
- package/context/scripts/hooks/lib/config-protection-remedies.js +69 -0
- package/context/scripts/hooks/run-hook.js +14 -1
- package/context/scripts/hooks/stop-goal-fit.js +1140 -99
- package/context/scripts/hooks/workflow-steering.js +212 -6
- package/docs/adr/0007-flow-skill-kit-tool-boundary.md +2 -0
- package/docs/adr/0015-flow-flow-agents-boundary-reconciliation.md +35 -0
- package/docs/adr/0019-kit-dependency-ownership.md +62 -0
- package/docs/adr/0020-trust-reconcile-manifest-and-claim-classification.md +290 -0
- package/docs/adr/0021-assignment-leases-and-stale-claim-takeover.md +221 -0
- package/docs/adr/0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md +283 -0
- package/docs/agent-system-guidebook.md +3 -3
- package/docs/agent-usage-feedback-loop.md +6 -6
- package/docs/context-map.md +9 -7
- package/docs/decisions/decision-records.md +57 -0
- package/docs/decisions/index.md +14 -0
- package/docs/decisions/promotion-gate.md +52 -0
- package/docs/developer-architecture.md +1 -1
- package/docs/fixture-ownership.md +3 -0
- package/docs/flow-kit-repository-contract.md +5 -5
- package/docs/getting-started.md +12 -2
- package/docs/integrations/harness-install.md +2 -1
- package/docs/kit-authoring-guide.md +64 -5
- package/docs/knowledge-kit.md +5 -1
- package/docs/learnings/2026-07-improvement-program.md +203 -0
- package/docs/migrations.md +6 -5
- package/docs/north-star.md +2 -2
- package/docs/operating-layers.md +4 -3
- package/docs/repository-structure.md +5 -5
- package/docs/skills-map.md +8 -8
- package/docs/spec/runtime-hook-surface.md +19 -15
- package/docs/spikes/graph-provider-2026-07.md +155 -0
- package/docs/standards-register.md +7 -7
- package/docs/trust-anchor-adoption.md +105 -4
- package/docs/work-item-adapters.md +1 -1
- package/docs/workflow-artifact-lifecycle.md +72 -9
- package/docs/workflow-eval-strategy.md +3 -3
- package/docs/workflow-shared-contracts.md +1 -1
- package/docs/workflow-usage-guide.md +254 -21
- package/evals/acceptance/DEMO-false-completion.md +20 -11
- package/evals/acceptance/prove-capture-teeth-declared.sh +15 -15
- package/evals/acceptance/prove-capture-teeth.sh +11 -11
- package/evals/acceptance/test_kiro_harness.sh +1 -1
- package/evals/ci/antigaming-suite.sh +5 -0
- package/evals/ci/run-baseline.sh +65 -1
- package/evals/fixtures/flow-kit-repository/invalid-bad-dependency/flows/review.flow.json +26 -0
- package/evals/fixtures/flow-kit-repository/invalid-bad-dependency/kit.json +13 -0
- package/evals/fixtures/flow-kit-repository/valid-with-dependency/flows/review.flow.json +26 -0
- package/evals/fixtures/flow-kit-repository/valid-with-dependency/kit.json +13 -0
- package/evals/fixtures/hook-influence/cases.json +32 -0
- package/evals/fixtures/pull-work-provider/github-issues.json +6 -6
- package/evals/fixtures/trust-reconcile-exploits/fabricated-attestation.json +59 -0
- package/evals/fixtures/trust-reconcile-exploits/no-label-bypass.json +36 -0
- package/evals/fixtures/trust-reconcile-exploits/skip-assumed-bypass.json +59 -0
- package/evals/fixtures/trust-reconcile-exploits/status-misassertion.json +48 -0
- package/evals/fixtures/trust-reconcile-exploits/waived-command-check.json +44 -0
- package/evals/fixtures/trust-reconcile-mixed-bundle/mixed-bundle.json +159 -0
- package/evals/fixtures/trust-reconcile-ws3/ws3-bundle.json +920 -0
- package/evals/integration/test_actor_identity.sh +254 -0
- package/evals/integration/test_builder_step_producers.sh +33 -23
- package/evals/integration/test_bundle_install.sh +22 -16
- package/evals/integration/test_bundle_lifecycle.sh +11 -11
- package/evals/integration/test_captured_fail_reconciliation.sh +50 -50
- package/evals/integration/test_checkpoint_signing.sh +43 -0
- package/evals/integration/test_claim_lookup.sh +4 -4
- package/evals/integration/test_codex_hook_resolution.sh +114 -0
- package/evals/integration/test_command_log_concurrency.sh +8 -8
- package/evals/integration/test_command_log_fork_classification.sh +3 -3
- package/evals/integration/test_command_log_integrity.sh +16 -16
- package/evals/integration/test_console_learning_projection.sh +1 -1
- package/evals/integration/test_dual_emit_flow_step.sh +145 -0
- package/evals/integration/test_enforcer_expects_driven.sh +12 -12
- package/evals/integration/test_evidence_capture_hook.sh +14 -13
- package/evals/integration/test_fixture_retirement_audit.sh +2 -2
- package/evals/integration/test_flow_agents_statusline.sh +2 -2
- package/evals/integration/test_flow_kit_install_git.sh +52 -0
- package/evals/integration/test_flow_kit_repository.sh +2 -0
- package/evals/integration/test_flowdef_session_activation.sh +6 -6
- package/evals/integration/test_flowdef_union_floor_regression.sh +429 -0
- package/evals/integration/test_gate_bypass_chain.sh +52 -40
- package/evals/integration/test_gate_lockdown.sh +97 -73
- package/evals/integration/test_gate_review_inquiry_records.sh +3 -3
- package/evals/integration/test_goal_fit_escape_hatch.sh +10 -10
- package/evals/integration/test_goal_fit_ghost_session.sh +104 -0
- package/evals/integration/test_goal_fit_hook.sh +32 -32
- package/evals/integration/test_goal_fit_rederive.sh +9 -9
- package/evals/integration/test_hook_category_behaviors.sh +103 -0
- package/evals/integration/test_hook_influence_cases.sh +1 -0
- package/evals/integration/test_install_merge.sh +262 -1
- package/evals/integration/test_kit_identity_trust.sh +6 -6
- package/evals/integration/test_liveness_conflict_injection.sh +587 -0
- package/evals/integration/test_liveness_heartbeat.sh +677 -0
- package/evals/integration/test_liveness_verdict.sh +394 -0
- package/evals/integration/test_local_flow_kit_install.sh +15 -0
- package/evals/integration/test_phase_map_and_gate_claim.sh +63 -11
- package/evals/integration/test_promote_gate.sh +178 -0
- package/evals/integration/test_publish_delivery.sh +2 -2
- package/evals/integration/test_pull_work_liveness_preflight.sh +386 -0
- package/evals/integration/test_pull_work_provider.sh +2 -2
- package/evals/integration/test_reconcile_soundness.sh +4 -4
- package/evals/integration/test_resolvefirststep_security.sh +22 -0
- package/evals/integration/test_runtime_adapter_activation.sh +87 -18
- package/evals/integration/test_session_resume_roundtrip.sh +147 -0
- package/evals/integration/test_sidecar_field_preservation.sh +249 -0
- package/evals/integration/test_trust_reconcile.sh +2 -2
- package/evals/integration/test_trust_reconcile_manifest.sh +79 -0
- package/evals/integration/test_trust_reconcile_mixed_bundle.sh +96 -0
- package/evals/integration/test_trust_reconcile_negatives.sh +151 -0
- package/evals/integration/test_usage_feedback_global.sh +5 -5
- package/evals/integration/test_validate_artifacts_portability.sh +60 -0
- package/evals/integration/test_verify_cli.sh +2 -2
- package/evals/integration/test_veritas_governance_kit.sh +117 -0
- package/evals/integration/test_workflow_artifact_cleanup_audit.sh +26 -1
- package/evals/integration/test_workflow_artifacts.sh +33 -0
- package/evals/integration/test_workflow_sidecar_writer.sh +723 -74
- package/evals/integration/test_workflow_steering_hook.sh +175 -5
- package/evals/lib/codex-provider.sh +1 -1
- package/evals/lib/node.sh +19 -1
- package/evals/run.sh +22 -0
- package/evals/static/test_decisions.sh +150 -0
- package/evals/static/test_flowdef_codeowners_coverage.sh +56 -0
- package/evals/static/test_package.sh +19 -10
- package/evals/static/test_universal_bundles.sh +48 -3
- package/evals/static/test_workflow_skills.sh +41 -8
- package/kits/builder/flows/build.flow.json +3 -74
- package/kits/builder/flows/publish-learn.flow.json +90 -0
- package/kits/builder/kit.json +11 -0
- package/kits/builder/skills/builder-shape/SKILL.md +1 -1
- package/kits/builder/skills/deliver/SKILL.md +13 -11
- package/kits/builder/skills/design-probe/SKILL.md +4 -4
- package/kits/builder/skills/evidence-gate/SKILL.md +26 -1
- package/kits/builder/skills/execute-plan/SKILL.md +2 -2
- package/kits/builder/skills/fix-bug/SKILL.md +2 -0
- package/kits/builder/skills/gate-review/SKILL.md +6 -6
- package/kits/builder/skills/idea-to-backlog/SKILL.md +1 -1
- package/kits/builder/skills/learning-review/SKILL.md +7 -7
- package/kits/builder/skills/pickup-probe/SKILL.md +5 -4
- package/kits/builder/skills/plan-work/SKILL.md +27 -5
- package/kits/builder/skills/pull-work/SKILL.md +80 -5
- package/kits/builder/skills/release-readiness/SKILL.md +4 -4
- package/kits/builder/skills/review-work/SKILL.md +24 -1
- package/kits/builder/skills/tdd-workflow/SKILL.md +2 -0
- package/kits/builder/skills/verify-work/SKILL.md +8 -1
- package/kits/catalog.json +6 -0
- package/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +178 -0
- package/kits/veritas-governance/docs/README.md +75 -0
- package/kits/veritas-governance/fixtures/readiness/not-ready.readiness-report.json +4645 -0
- package/kits/veritas-governance/fixtures/readiness/ready.readiness-report.json +4403 -0
- package/kits/veritas-governance/flows/readiness-check.flow.json +35 -0
- package/kits/veritas-governance/kit.json +16 -0
- package/package.json +8 -4
- package/packaging/README.md +2 -2
- package/packaging/conformance/fixtures/config-protection--allow-read-state-json.json +20 -0
- package/packaging/conformance/fixtures/config-protection--block-write-state-json.json +20 -0
- package/packaging/conformance/fixtures/stop-goal-fit--block-bundle-disputed-claim.json +1 -1
- package/packaging/conformance/fixtures/stop-goal-fit--block-capture-contradicts-claimed-pass.json +1 -1
- package/packaging/manifest.json +9 -10
- package/schemas/decision-record.schema.json +109 -0
- package/schemas/workflow-evidence.schema.json +1 -1
- package/schemas/workflow-state.schema.json +5 -0
- package/scripts/README.md +8 -3
- package/scripts/check-content-boundary.cjs +1 -1
- package/scripts/check-decisions.cjs +356 -0
- package/scripts/ci/derive-claim-status.mjs +74 -0
- package/scripts/ci/trust-reconcile.js +436 -79
- package/scripts/git-status.sh +2 -2
- package/scripts/hooks/claude-telemetry-hook.js +37 -3
- package/scripts/hooks/codex-telemetry-hook.js +36 -2
- package/scripts/hooks/config-protection.js +102 -30
- package/scripts/hooks/evidence-capture.js +3 -3
- package/scripts/hooks/lib/actor-identity.js +368 -0
- package/scripts/hooks/lib/config-protection-remedies.js +69 -0
- package/scripts/hooks/lib/liveness-heartbeat.js +361 -0
- package/scripts/hooks/lib/liveness-policy.js +127 -0
- package/scripts/hooks/lib/liveness-read.js +105 -12
- package/scripts/hooks/lib/liveness-write.js +46 -0
- package/scripts/hooks/lib/local-artifact-paths.js +12 -6
- package/scripts/hooks/opencode-telemetry-hook.js +27 -1
- package/scripts/hooks/pi-telemetry-hook.js +27 -1
- package/scripts/hooks/stop-goal-fit.js +157 -26
- package/scripts/hooks/workflow-steering.js +77 -3
- package/scripts/install-codex-home.sh +138 -38
- package/scripts/statusline/flow-agents-statusline.js +2 -2
- package/src/cli/console-learning-projection.ts +3 -2
- package/src/cli/init.ts +101 -21
- package/src/cli/kit.ts +37 -6
- package/src/cli/public-api.test.mjs +58 -6
- package/src/cli/pull-work-provider.ts +1 -1
- package/src/cli/trust-bundle-policy-order.test.mjs +87 -0
- package/src/cli/usage-feedback.ts +3 -3
- package/src/cli/validate-hook-influence.ts +1 -0
- package/src/cli/validate-workflow-artifacts.ts +22 -6
- package/src/cli/veritas-readiness-adapter.test.mjs +267 -0
- package/src/cli/workflow-artifact-cleanup-audit.ts +35 -2
- package/src/cli/workflow-sidecar.ts +795 -71
- package/src/flow-kit/validate.ts +74 -1
- package/src/index.ts +6 -2
- package/src/lib/flow-resolver.ts +123 -55
- package/src/lib/local-artifact-root.ts +24 -5
- package/src/lib/workflow-learning-projection.ts +2 -2
- package/src/runtime-adapters.ts +61 -15
- package/src/tools/build-universal-bundles.ts +49 -16
- package/src/tools/generate-context-map.ts +10 -8
- package/src/tools/validate-source-tree.ts +23 -1
|
@@ -10,7 +10,7 @@ pass=0
|
|
|
10
10
|
fail=0
|
|
11
11
|
|
|
12
12
|
cleanup() {
|
|
13
|
-
rm -rf "$REPRO_FIRST_DIR" "$REPRO_SECOND_DIR"
|
|
13
|
+
rm -rf "$REPRO_FIRST_DIR" "$REPRO_SECOND_DIR" "$ROOT_DIR/kits/zzz-collision-eval-probe"
|
|
14
14
|
}
|
|
15
15
|
trap cleanup EXIT
|
|
16
16
|
|
|
@@ -172,11 +172,15 @@ if node - "$DIST_DIR/codex/.codex" <<'NODE'
|
|
|
172
172
|
const fs = require("node:fs");
|
|
173
173
|
const path = require("node:path");
|
|
174
174
|
const root = process.argv[2];
|
|
175
|
-
const expected = ["
|
|
175
|
+
const expected = ["builder", "personal"];
|
|
176
176
|
const missingFiles = expected.filter((name) => !fs.existsSync(path.join(root, `${name}.config.toml`)));
|
|
177
177
|
if (missingFiles.length) throw new Error(`profile-v2 config files missing: ${missingFiles.join(", ")}`);
|
|
178
|
+
const extra = fs.readdirSync(root).filter((name) => name.endsWith(".config.toml") && !expected.includes(name.replace(/\.config\.toml$/, "")));
|
|
179
|
+
if (extra.length) throw new Error(`unexpected generated profile files: ${extra.join(", ")}`);
|
|
178
180
|
const missing = expected.filter((name) => !fs.readFileSync(path.join(root, `${name}.config.toml`), "utf8").includes('approvals_reviewer = "auto_review"'));
|
|
179
181
|
if (missing.length) throw new Error(`profile auto-review approval reviewer missing: ${missing.join(", ")}`);
|
|
182
|
+
const personal = fs.readFileSync(path.join(root, "personal.config.toml"), "utf8");
|
|
183
|
+
if (!personal.includes("Flow Agents Personal mode") || !personal.includes("knowledge-capture")) throw new Error("personal profile does not carry knowledge-work instructions");
|
|
180
184
|
console.log("ok");
|
|
181
185
|
NODE
|
|
182
186
|
then
|
|
@@ -373,7 +377,7 @@ fi
|
|
|
373
377
|
|
|
374
378
|
echo ""
|
|
375
379
|
echo "--- Shared Task Dirs ---"
|
|
376
|
-
for dir in "$DIST_DIR/claude-code/.flow-agents" "$DIST_DIR/codex/.flow-agents" "$DIST_DIR/opencode/.flow-agents" "$DIST_DIR/pi/.flow-agents"; do
|
|
380
|
+
for dir in "$DIST_DIR/claude-code/.kontourai/flow-agents" "$DIST_DIR/codex/.kontourai/flow-agents" "$DIST_DIR/opencode/.kontourai/flow-agents" "$DIST_DIR/pi/.kontourai/flow-agents"; do
|
|
377
381
|
if [[ -d "$dir" ]]; then
|
|
378
382
|
_pass "$(realpath "$dir" 2>/dev/null || echo "$dir") exists"
|
|
379
383
|
else
|
|
@@ -426,6 +430,47 @@ else
|
|
|
426
430
|
_fail "pi adapter block path dropped the policy reason"
|
|
427
431
|
fi
|
|
428
432
|
|
|
433
|
+
echo ""
|
|
434
|
+
echo "--- Skill collision detector (AC6) ---"
|
|
435
|
+
# Positive: the real skill set across skills/ and kits/*/kit.json builds with no collision.
|
|
436
|
+
if (cd "$ROOT_DIR" && FLOW_AGENTS_DIST_DIR="$(mktemp -d)" node build/src/cli.js build-bundles) >/tmp/universal-bundle-collision-clean.txt 2>&1; then
|
|
437
|
+
_pass "build succeeds with the current (collision-free) skill set"
|
|
438
|
+
else
|
|
439
|
+
_fail "clean build unexpectedly failed"
|
|
440
|
+
sed -n '1,60p' /tmp/universal-bundle-collision-clean.txt
|
|
441
|
+
fi
|
|
442
|
+
|
|
443
|
+
# Negative: a synthetic kit re-using an existing skill directory name (deliver) must FAIL
|
|
444
|
+
# the build with a diagnostic naming both source kits.
|
|
445
|
+
COLLIDE_KIT="$ROOT_DIR/kits/zzz-collision-eval-probe"
|
|
446
|
+
rm -rf "$COLLIDE_KIT"
|
|
447
|
+
mkdir -p "$COLLIDE_KIT/skills/deliver"
|
|
448
|
+
cat > "$COLLIDE_KIT/kit.json" <<'KITJSON'
|
|
449
|
+
{
|
|
450
|
+
"schema_version": "1.0",
|
|
451
|
+
"id": "zzz-collision-eval-probe",
|
|
452
|
+
"name": "Collision Eval Probe",
|
|
453
|
+
"flows": [],
|
|
454
|
+
"skills": [
|
|
455
|
+
{ "id": "zzz.deliver", "path": "skills/deliver/SKILL.md" }
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
KITJSON
|
|
459
|
+
printf '# collision probe skill\n' > "$COLLIDE_KIT/skills/deliver/SKILL.md"
|
|
460
|
+
if (cd "$ROOT_DIR" && FLOW_AGENTS_DIST_DIR="$(mktemp -d)" node build/src/cli.js build-bundles) >/tmp/universal-bundle-collision.txt 2>&1; then
|
|
461
|
+
_fail "build should FAIL when two kits declare the same skill directory name"
|
|
462
|
+
else
|
|
463
|
+
if grep -q "skill name collision" /tmp/universal-bundle-collision.txt \
|
|
464
|
+
&& grep -q "kits/builder" /tmp/universal-bundle-collision.txt \
|
|
465
|
+
&& grep -q "zzz-collision-eval-probe" /tmp/universal-bundle-collision.txt; then
|
|
466
|
+
_pass "build fails with a clear collision diagnostic naming both source kits"
|
|
467
|
+
else
|
|
468
|
+
_fail "collision diagnostic missing expected text"
|
|
469
|
+
sed -n '1,60p' /tmp/universal-bundle-collision.txt
|
|
470
|
+
fi
|
|
471
|
+
fi
|
|
472
|
+
rm -rf "$COLLIDE_KIT"
|
|
473
|
+
|
|
429
474
|
echo ""
|
|
430
475
|
echo "==========================="
|
|
431
476
|
total=$((pass + fail))
|
|
@@ -77,6 +77,7 @@ OPERATING_LAYERS_DOC="$ROOT/docs/operating-layers.md"
|
|
|
77
77
|
DEVELOPER_ARCHITECTURE_DOC="$ROOT/docs/developer-architecture.md"
|
|
78
78
|
GITIGNORE="$ROOT/.gitignore"
|
|
79
79
|
BUILDER_BUILD_FLOW="$ROOT/kits/builder/flows/build.flow.json"
|
|
80
|
+
BUILDER_PUBLISH_LEARN_FLOW="$ROOT/kits/builder/flows/publish-learn.flow.json"
|
|
80
81
|
FLOW_AGENTS_FLOW_ADR="$ROOT/docs/adr/0001-flow-agents-consumes-flow.md"
|
|
81
82
|
ARTIFACT_CONTRACT="$ROOT/context/contracts/artifact-contract.md"
|
|
82
83
|
PLANNING_CONTRACT="$ROOT/context/contracts/planning-contract.md"
|
|
@@ -180,6 +181,7 @@ require_file "$ARTIFACT_LIFECYCLE_DOC" "workflow artifact lifecycle doc"
|
|
|
180
181
|
require_file "$OPERATING_LAYERS_DOC" "operating layers doc"
|
|
181
182
|
require_file "$DEVELOPER_ARCHITECTURE_DOC" "developer architecture doc"
|
|
182
183
|
require_file "$BUILDER_BUILD_FLOW" "Builder Kit build Flow Definition"
|
|
184
|
+
require_file "$BUILDER_PUBLISH_LEARN_FLOW" "Builder Kit publish-learn Flow Definition"
|
|
183
185
|
require_file "$FLOW_AGENTS_FLOW_ADR" "Flow Agents Flow boundary ADR"
|
|
184
186
|
require_file "$ARTIFACT_CONTRACT" "artifact contract"
|
|
185
187
|
require_file "$PLANNING_CONTRACT" "planning contract"
|
|
@@ -294,7 +296,7 @@ require_text "$DELIVERY_CONTRACT" 'Final Acceptance' "delivery contract defines
|
|
|
294
296
|
require_text "$DELIVERY_CONTRACT" 'Publish verified changes before release readiness' "delivery contract requires publish-change before release readiness"
|
|
295
297
|
require_text "$DELIVERY_CONTRACT" 'verified diff committed and pushed' "final acceptance requires committed and pushed diff"
|
|
296
298
|
require_text "$DELIVERY_CONTRACT" 'provider change record created or updated' "final acceptance requires provider change or explicit no-provider-change reason"
|
|
297
|
-
require_text "$DELIVERY_CONTRACT" 'local `\.flow-agents/` runtime artifacts remain untracked' "final acceptance requires runtime artifacts stay untracked"
|
|
299
|
+
require_text "$DELIVERY_CONTRACT" 'local `\.kontourai/flow-agents/` runtime artifacts remain untracked' "final acceptance requires runtime artifacts stay untracked"
|
|
298
300
|
require_text "$DELIVERY_CONTRACT" 'GitHub PRs are the first `ChangeProvider` adapter example' "delivery contract keeps GitHub PR as adapter example"
|
|
299
301
|
require_text "$DELIVERY_CONTRACT" 'Delegation Gates' "delivery contract defines delegation gates"
|
|
300
302
|
require_text "$DELIVERY_CONTRACT" 'Do not replace the delegate gate with a local summary' "delivery contract forbids local gate substitution"
|
|
@@ -307,7 +309,7 @@ require_text "$ARTIFACT_LIFECYCLE_DOC" 'Runtime state remains ignored' "artifact
|
|
|
307
309
|
require_text "$ARTIFACT_LIFECYCLE_DOC" 'Durable closeout content' "artifact lifecycle doc requires closeout"
|
|
308
310
|
require_text "$ARTIFACT_LIFECYCLE_DOC" 'durable planning, decisions, evidence pointers, and acceptance notes' "artifact lifecycle doc requires durable promotion"
|
|
309
311
|
require_text "$ARTIFACT_LIFECYCLE_DOC" 'Promote by ownership' "artifact lifecycle doc defines promotion targets"
|
|
310
|
-
require_text "$ARTIFACT_CONTRACT" 'Do not commit local workflow runtime roots such as `\.flow-agents/<slug>/`' "artifact contract forbids committing runtime workspaces"
|
|
312
|
+
require_text "$ARTIFACT_CONTRACT" 'Do not commit local workflow runtime roots such as `\.kontourai/flow-agents/<slug>/`' "artifact contract forbids committing runtime workspaces"
|
|
311
313
|
require_text "$OPERATING_LAYERS_DOC" 'workflow-artifact-lifecycle.md' "operating layers links artifact lifecycle"
|
|
312
314
|
require_text "$PAGES_INDEX" 'workflow-artifact-lifecycle.html' "docs index links artifact lifecycle"
|
|
313
315
|
require_text "$PAGES_INDEX" 'developer-architecture.html' "docs index links developer architecture"
|
|
@@ -385,6 +387,8 @@ require_text "$KIT_REPOSITORY_DOC" 'schema_version' "kit repository doc defines
|
|
|
385
387
|
require_text "$KIT_REPOSITORY_DOC" 'flows' "kit repository doc defines declared Flow Definitions"
|
|
386
388
|
require_text "$KIT_REPOSITORY_DOC" '[Aa]bsolute paths are rejected' "kit repository doc defines path safety"
|
|
387
389
|
require_text "$KIT_REPOSITORY_DOC" 'does not install remote kits' "kit repository doc states remote install non-goal"
|
|
390
|
+
require_text "$ROOT/docs/kit-authoring-guide.md" 'uses_flow' "kit authoring guide documents Flow Definition composition"
|
|
391
|
+
require_text "$ROOT/docs/kit-authoring-guide.md" 'builder.publish-learn' "kit authoring guide documents composed publish-learn example"
|
|
388
392
|
require_text "$PAGES_INDEX" 'Quick Start' "docs index presents product quick start"
|
|
389
393
|
require_text "$KIT_REPOSITORY_INTEGRATION" 'valid-local-kit' "kit repository integration covers valid fixture"
|
|
390
394
|
require_text "$KIT_REPOSITORY_INTEGRATION" 'invalid-schema-version' "kit repository integration covers invalid schema version"
|
|
@@ -426,10 +430,10 @@ require_text "$TOOL_WORKER" 'docs/context-map.md' "tool-worker uses context map"
|
|
|
426
430
|
require_text "$TOOL_VERIFIER" 'docs/context-map.md' "tool-verifier uses context map"
|
|
427
431
|
require_text "$TOOL_VERIFIER" 'Report only' "tool-verifier keeps report-only role"
|
|
428
432
|
require_text "$DEV_PROMPTFOO" 'deep-context contract persistence' "dev evals include deep-context contract persistence case"
|
|
429
|
-
require_text "$PACKAGE_MANIFEST" 'plan-work must delegate to tool-planner' "Codex
|
|
430
|
-
require_text "$PACKAGE_MANIFEST" 'verify-work to tool-verifier' "Codex
|
|
431
|
-
require_text "$PACKAGE_MANIFEST" 'instead of replacing it with a local summary' "Codex
|
|
432
|
-
require_text "$PACKAGE_MANIFEST" 'name exact delegate ids' "Codex
|
|
433
|
+
require_text "$PACKAGE_MANIFEST" 'plan-work must delegate to tool-planner' "Codex builder profile requires planner delegation"
|
|
434
|
+
require_text "$PACKAGE_MANIFEST" 'verify-work to tool-verifier' "Codex builder profile requires verifier delegation"
|
|
435
|
+
require_text "$PACKAGE_MANIFEST" 'instead of replacing it with a local summary' "Codex builder profile preserves blocked delegation gates"
|
|
436
|
+
require_text "$PACKAGE_MANIFEST" 'name exact delegate ids' "Codex builder profile requires auditable delegate names"
|
|
433
437
|
|
|
434
438
|
echo ""
|
|
435
439
|
echo "--- delivery goal fit ---"
|
|
@@ -441,7 +445,8 @@ require_text "$DELIVER" 'Final Acceptance' "deliver requires Final Acceptance"
|
|
|
441
445
|
require_text "$DELIVER" 'Required Preflight' "deliver defines pull/pickup preflight"
|
|
442
446
|
require_text "$DELIVER" 'pull-work -> pickup-probe' "deliver routes missing pickup evidence through pull-work and pickup-probe"
|
|
443
447
|
require_text "$DELIVER" 'continue automatically to execution' "deliver can proceed autonomously after planning"
|
|
444
|
-
require_text "$DELIVER" '\.flow-agents/<slug>/archive' "deliver archives working artifacts"
|
|
448
|
+
require_text "$DELIVER" '\.kontourai/flow-agents/<slug>/archive' "deliver archives working artifacts"
|
|
449
|
+
require_text "$DELIVER" 'Do not skip learning just because the delivery looked clean' "deliver always routes terminal closeout through learning-review"
|
|
445
450
|
require_text "$DELIVER" 'Sidecar Writer Adoption' "deliver owns sidecar writer adoption"
|
|
446
451
|
require_text "$DELIVER" 'record-critique|import-critique' "deliver records critique through sidecar writer"
|
|
447
452
|
require_text "$VERIFY_WORK" 'Goal Fit' "verify-work reports Goal Fit"
|
|
@@ -542,6 +547,11 @@ require_text "$CONTEXT_MAP_INTEGRATION" 'context map generation is deterministic
|
|
|
542
547
|
require_text "$WORKFLOW_STEERING_INTEGRATION" 'workflow steering hook neutralizes multiline critique findings' "workflow steering integration covers critique sanitization"
|
|
543
548
|
require_text "$WORKFLOW_STEERING_INTEGRATION" 'workflow steering hook appends context-map recovery guidance' "workflow steering integration covers context-map guidance"
|
|
544
549
|
require_text "$WORKFLOW_STEERING_INTEGRATION" 'workflow steering hook emits ambient state guidance at user prompt submit' "workflow steering integration covers ambient state guidance"
|
|
550
|
+
require_text "$WORKFLOW_STEERING_INTEGRATION" 'Claude hook adapter surfaces Builder workflow route for coding prompts' "workflow steering integration covers Claude Builder-route prompt guidance"
|
|
551
|
+
require_text "$WORKFLOW_STEERING_INTEGRATION" 'publish/release-readiness and learning-review' "workflow steering integration covers full Builder lifecycle guidance"
|
|
552
|
+
require_text "$WORKFLOW_STEERING_INTEGRATION" 'does not route explicit review-only prompts into Builder workflow' "workflow steering integration covers review-only prompt suppression"
|
|
553
|
+
require_text "$WORKFLOW_STEERING_INTEGRATION" 'does not route explicit validation-only prompts into Builder workflow' "workflow steering integration covers validation-only prompt suppression"
|
|
554
|
+
require_text "$WORKFLOW_STEERING_INTEGRATION" 'does not route question-only test prompts into Builder workflow' "workflow steering integration covers question-only test prompt suppression"
|
|
545
555
|
require_text "$ROOT/evals/integration/test_goal_fit_hook.sh" 'goal-fit hook reports actionable sidecar guidance' "goal-fit integration covers specific sidecar guidance"
|
|
546
556
|
require_text "$HOOK_INFLUENCE_CASES" 'agent_must_do' "hook influence cases define expected agent behavior"
|
|
547
557
|
require_text "$HOOK_INFLUENCE_CASES" 'live-acceptance' "hook influence cases include live acceptance evidence"
|
|
@@ -1068,6 +1078,11 @@ require_text "$BUILDER_BUILD_FLOW" 'Planning is blocked until pickup Probe decis
|
|
|
1068
1078
|
require_text "$BUILDER_BUILD_FLOW" 'probe_status' "Builder build flow names probe status"
|
|
1069
1079
|
require_text "$BUILDER_BUILD_FLOW" 'probe_artifact_ref' "Builder build flow names probe artifact ref"
|
|
1070
1080
|
require_text "$BUILDER_BUILD_FLOW" 'Stale broad continuation language after a merge is not sufficient' "Builder build flow blocks stale broad continuation"
|
|
1081
|
+
require_text "$BUILDER_BUILD_FLOW" '"uses_flow": "builder.publish-learn"' "Builder build flow composes publish-learn extension"
|
|
1082
|
+
require_text "$BUILDER_PUBLISH_LEARN_FLOW" '"builder.pr-open.pull-request"' "Builder publish-learn flow exports PR-open evidence"
|
|
1083
|
+
require_text "$BUILDER_PUBLISH_LEARN_FLOW" '"builder.merge-ready-ci.readiness"' "Builder publish-learn flow exports CI merge readiness evidence"
|
|
1084
|
+
require_text "$BUILDER_PUBLISH_LEARN_FLOW" '"builder.learn.evidence"' "Builder publish-learn flow exports learning evidence"
|
|
1085
|
+
require_text "$BUILDER_PUBLISH_LEARN_FLOW" '"exports"' "Builder publish-learn flow declares exported claims"
|
|
1071
1086
|
if node - "$BUILDER_BUILD_FLOW" <<'NODE'; then
|
|
1072
1087
|
const fs = require("node:fs");
|
|
1073
1088
|
const flow = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
|
@@ -1086,6 +1101,24 @@ NODE
|
|
|
1086
1101
|
else
|
|
1087
1102
|
fail "Builder build flow keeps provider-neutral trust.bundle expectations"
|
|
1088
1103
|
fi
|
|
1104
|
+
if node - "$BUILDER_BUILD_FLOW" "$BUILDER_PUBLISH_LEARN_FLOW" <<'NODE'; then
|
|
1105
|
+
const fs = require("node:fs");
|
|
1106
|
+
const parent = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
|
1107
|
+
const child = JSON.parse(fs.readFileSync(process.argv[3], "utf8"));
|
|
1108
|
+
for (const stepId of ["pr-open", "merge-ready-ci", "learn"]) {
|
|
1109
|
+
const step = (parent.steps || []).find((item) => item.id === stepId);
|
|
1110
|
+
if (step?.uses_flow !== "builder.publish-learn") throw new Error(`${stepId} should use builder.publish-learn`);
|
|
1111
|
+
const childGate = Object.values(child.gates || {}).find((gate) => gate.step === stepId);
|
|
1112
|
+
if (!childGate) throw new Error(`builder.publish-learn missing gate for ${stepId}`);
|
|
1113
|
+
for (const expectation of childGate.expects || []) {
|
|
1114
|
+
if (expectation.kind !== "trust.bundle") throw new Error(`${expectation.id || "<unknown>"} is not a trust.bundle expectation`);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
NODE
|
|
1118
|
+
pass "Builder publish-learn composition resolves PR, CI, and learning gates"
|
|
1119
|
+
else
|
|
1120
|
+
fail "Builder publish-learn composition resolves PR, CI, and learning gates"
|
|
1121
|
+
fi
|
|
1089
1122
|
require_text "$MAP" 'pull-work' "map includes pull-work"
|
|
1090
1123
|
require_text "$MAP" 'pickup Probe before planning' "map documents pickup Probe before planning"
|
|
1091
1124
|
require_text "$MAP" 'review-work' "map includes review-work"
|
|
@@ -1115,7 +1148,7 @@ require_text "$LEARNING" 'dogfood-pass' "learning-review skill adopts dogfood-pa
|
|
|
1115
1148
|
require_text "$EVAL_STRATEGY" 'Activation-only behavioral evals' "eval strategy distinguishes activation evals"
|
|
1116
1149
|
require_text "$EVAL_STRATEGY" 'Artifact-quality evals' "eval strategy distinguishes artifact evals"
|
|
1117
1150
|
require_text "$EVAL_STRATEGY" 'Hook-influence behavioral cases' "eval strategy documents hook influence cases"
|
|
1118
|
-
require_text "$EVAL_STRATEGY" 'controlled writes to `.flow-agents/<slug>/\*\.md`' "artifact evals allow controlled todo writes"
|
|
1151
|
+
require_text "$EVAL_STRATEGY" 'controlled writes to `.kontourai/flow-agents/<slug>/\*\.md`' "artifact evals allow controlled todo writes"
|
|
1119
1152
|
require_text "$EVAL_STRATEGY" 'test_workflow_artifacts.sh' "eval strategy documents artifact E2E integration"
|
|
1120
1153
|
require_text "$EVAL_STRATEGY" 'HOLD' "eval strategy uses release-readiness HOLD decision"
|
|
1121
1154
|
require_text "$SHARED_CONTRACTS_DOC" 'Codex, Kiro, Claude Code' "shared contracts doc captures cross-distribution scope"
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
{ "id": "execute", "next": "verify" },
|
|
19
19
|
{ "id": "verify", "next": "merge-ready" },
|
|
20
20
|
{ "id": "merge-ready", "next": "pr-open" },
|
|
21
|
-
{ "id": "pr-open", "next": "merge-ready-ci" },
|
|
22
|
-
{ "id": "merge-ready-ci", "next": "learn" },
|
|
23
|
-
{ "id": "learn", "next": "done" },
|
|
21
|
+
{ "id": "pr-open", "next": "merge-ready-ci", "uses_flow": "builder.publish-learn" },
|
|
22
|
+
{ "id": "merge-ready-ci", "next": "learn", "uses_flow": "builder.publish-learn" },
|
|
23
|
+
{ "id": "learn", "next": "done", "uses_flow": "builder.publish-learn" },
|
|
24
24
|
{ "id": "done", "next": null }
|
|
25
25
|
],
|
|
26
26
|
"gates": {
|
|
@@ -189,77 +189,6 @@
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
]
|
|
192
|
-
},
|
|
193
|
-
"pr-open-gate": {
|
|
194
|
-
"step": "pr-open",
|
|
195
|
-
"expects": [
|
|
196
|
-
{
|
|
197
|
-
"id": "pull-request-opened",
|
|
198
|
-
"kind": "trust.bundle",
|
|
199
|
-
"required": true,
|
|
200
|
-
"description": "A pull request exists with linked work, implementation summary, and verification evidence.",
|
|
201
|
-
"bundle_claim": {
|
|
202
|
-
"claimType": "builder.pr-open.pull-request",
|
|
203
|
-
"subjectType": "pull-request",
|
|
204
|
-
"accepted_statuses": [
|
|
205
|
-
"trusted",
|
|
206
|
-
"accepted"
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
]
|
|
211
|
-
},
|
|
212
|
-
"merge-ready-ci-gate": {
|
|
213
|
-
"step": "merge-ready-ci",
|
|
214
|
-
"expects": [
|
|
215
|
-
{
|
|
216
|
-
"id": "ci-merge-readiness",
|
|
217
|
-
"kind": "trust.bundle",
|
|
218
|
-
"required": true,
|
|
219
|
-
"description": "CI and review status support a merge-ready decision.",
|
|
220
|
-
"bundle_claim": {
|
|
221
|
-
"claimType": "builder.merge-ready-ci.readiness",
|
|
222
|
-
"subjectType": "pull-request",
|
|
223
|
-
"accepted_statuses": [
|
|
224
|
-
"trusted",
|
|
225
|
-
"accepted"
|
|
226
|
-
]
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
]
|
|
230
|
-
},
|
|
231
|
-
"learn-gate": {
|
|
232
|
-
"step": "learn",
|
|
233
|
-
"expects": [
|
|
234
|
-
{
|
|
235
|
-
"id": "decision-evidence",
|
|
236
|
-
"kind": "trust.bundle",
|
|
237
|
-
"required": true,
|
|
238
|
-
"description": "Durable decision evidence from the build is recorded.",
|
|
239
|
-
"bundle_claim": {
|
|
240
|
-
"claimType": "builder.learn.decisions",
|
|
241
|
-
"subjectType": "decision",
|
|
242
|
-
"accepted_statuses": [
|
|
243
|
-
"trusted",
|
|
244
|
-
"accepted"
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
"id": "learning-evidence",
|
|
250
|
-
"kind": "trust.bundle",
|
|
251
|
-
"required": true,
|
|
252
|
-
"description": "Learning evidence from delivery is recorded for future work.",
|
|
253
|
-
"bundle_claim": {
|
|
254
|
-
"claimType": "builder.learn.evidence",
|
|
255
|
-
"subjectType": "release",
|
|
256
|
-
"accepted_statuses": [
|
|
257
|
-
"trusted",
|
|
258
|
-
"accepted"
|
|
259
|
-
]
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
]
|
|
263
192
|
}
|
|
264
193
|
}
|
|
265
194
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "builder.publish-learn",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"description": "Reusable delivery closeout extension: publish the verified change, confirm merge readiness from provider/CI evidence, and record learning feedback.",
|
|
5
|
+
"steps": [
|
|
6
|
+
{ "id": "pr-open", "next": "merge-ready-ci" },
|
|
7
|
+
{ "id": "merge-ready-ci", "next": "learn" },
|
|
8
|
+
{ "id": "learn", "next": "done" },
|
|
9
|
+
{ "id": "done", "next": null }
|
|
10
|
+
],
|
|
11
|
+
"exports": [
|
|
12
|
+
"builder.pr-open.pull-request",
|
|
13
|
+
"builder.merge-ready-ci.readiness",
|
|
14
|
+
"builder.learn.decisions",
|
|
15
|
+
"builder.learn.evidence"
|
|
16
|
+
],
|
|
17
|
+
"gates": {
|
|
18
|
+
"pr-open-gate": {
|
|
19
|
+
"step": "pr-open",
|
|
20
|
+
"expects": [
|
|
21
|
+
{
|
|
22
|
+
"id": "pull-request-opened",
|
|
23
|
+
"kind": "trust.bundle",
|
|
24
|
+
"required": true,
|
|
25
|
+
"description": "A pull request exists with linked work, implementation summary, and verification evidence.",
|
|
26
|
+
"bundle_claim": {
|
|
27
|
+
"claimType": "builder.pr-open.pull-request",
|
|
28
|
+
"subjectType": "pull-request",
|
|
29
|
+
"accepted_statuses": [
|
|
30
|
+
"trusted",
|
|
31
|
+
"accepted"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"merge-ready-ci-gate": {
|
|
38
|
+
"step": "merge-ready-ci",
|
|
39
|
+
"expects": [
|
|
40
|
+
{
|
|
41
|
+
"id": "ci-merge-readiness",
|
|
42
|
+
"kind": "trust.bundle",
|
|
43
|
+
"required": true,
|
|
44
|
+
"description": "CI and review status support a merge-ready decision.",
|
|
45
|
+
"bundle_claim": {
|
|
46
|
+
"claimType": "builder.merge-ready-ci.readiness",
|
|
47
|
+
"subjectType": "pull-request",
|
|
48
|
+
"accepted_statuses": [
|
|
49
|
+
"trusted",
|
|
50
|
+
"accepted"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"learn-gate": {
|
|
57
|
+
"step": "learn",
|
|
58
|
+
"expects": [
|
|
59
|
+
{
|
|
60
|
+
"id": "decision-evidence",
|
|
61
|
+
"kind": "trust.bundle",
|
|
62
|
+
"required": true,
|
|
63
|
+
"description": "Durable decision evidence from the build is recorded.",
|
|
64
|
+
"bundle_claim": {
|
|
65
|
+
"claimType": "builder.learn.decisions",
|
|
66
|
+
"subjectType": "decision",
|
|
67
|
+
"accepted_statuses": [
|
|
68
|
+
"trusted",
|
|
69
|
+
"accepted"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "learning-evidence",
|
|
75
|
+
"kind": "trust.bundle",
|
|
76
|
+
"required": true,
|
|
77
|
+
"description": "Learning evidence from delivery is recorded for future work.",
|
|
78
|
+
"bundle_claim": {
|
|
79
|
+
"claimType": "builder.learn.evidence",
|
|
80
|
+
"subjectType": "release",
|
|
81
|
+
"accepted_statuses": [
|
|
82
|
+
"trusted",
|
|
83
|
+
"accepted"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
package/kits/builder/kit.json
CHANGED
|
@@ -14,6 +14,17 @@
|
|
|
14
14
|
"id": "builder.build",
|
|
15
15
|
"path": "flows/build.flow.json",
|
|
16
16
|
"description": "Pull ready work through design probing, planning, implementation, verification, pull request readiness, merge readiness, and learning."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "builder.publish-learn",
|
|
20
|
+
"path": "flows/publish-learn.flow.json",
|
|
21
|
+
"description": "Reusable delivery closeout extension for publish, provider/CI merge readiness, and learning feedback gates."
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"dependencies": [
|
|
25
|
+
{
|
|
26
|
+
"kit_id": "knowledge",
|
|
27
|
+
"reason": "learning-review invokes knowledge-capture (kits/knowledge/skills/knowledge-capture/SKILL.md) for durable knowledge storage"
|
|
17
28
|
}
|
|
18
29
|
],
|
|
19
30
|
"skills": [
|
|
@@ -37,7 +37,7 @@ When activated:
|
|
|
37
37
|
2. State that Builder Kit shape delegates to `idea-to-backlog` and uses `kits/builder/flows/shape.flow.json`.
|
|
38
38
|
3. Gather the raw idea or current conversation context.
|
|
39
39
|
4. If needed, use `design-probe`: ask one Probe/alignment question at a time before shaping. Prefer questions that clarify user outcome, constraints, non-goals, success criteria, risk, or whether bundled ideas truly belong together.
|
|
40
|
-
5. Create or update the standard `.flow-agents/<slug>/<slug>--idea-to-backlog.md` artifact using the `idea-to-backlog` artifact contract.
|
|
40
|
+
5. Create or update the standard `.kontourai/flow-agents/<slug>/<slug>--idea-to-backlog.md` artifact using the `idea-to-backlog` artifact contract.
|
|
41
41
|
6. Add a `builder_kit_shape` or equivalent note in the artifact that links to `kits/builder/flows/shape.flow.json` and records that the product-level Builder Kit shape surface was used.
|
|
42
42
|
7. Stop at `next_gate: Backlog Gate` unless the user explicitly requested GitHub issue sync.
|
|
43
43
|
8. If the user asked for guided Builder Kit continuation, record the expected next step as `pull-work` after issue sync or backlog approval; otherwise record manual mode and stop.
|
|
@@ -22,7 +22,7 @@ Inherited from primitives:
|
|
|
22
22
|
|
|
23
23
|
## Orchestrator Rule
|
|
24
24
|
|
|
25
|
-
You never use `read`, `glob`, `grep`, or `code` on source files. You only read/write the session file and artifact files in `.flow-agents/<slug>/`.
|
|
25
|
+
You never use `read`, `glob`, `grep`, or `code` on source files. You only read/write the session file and artifact files in `.kontourai/flow-agents/<slug>/`.
|
|
26
26
|
|
|
27
27
|
## Shared Contracts
|
|
28
28
|
|
|
@@ -52,9 +52,9 @@ When the repository provides `npm run workflow:sidecar --`, use it for routine w
|
|
|
52
52
|
- `record-learning` for learning-review outcomes
|
|
53
53
|
- `dogfood-pass` for Flow Agents repo changes that should record evidence, critique, optional learning, state, and handoff in one validated pass
|
|
54
54
|
|
|
55
|
-
After writer updates, run `npm run workflow:validate-artifacts -- --require-sidecars .flow-agents/<slug>` when local validation is available. If the writer or validation is unavailable or blocked by sandbox policy, record the exact gap in the session artifact as `NOT_VERIFIED` instead of pretending structured state exists.
|
|
55
|
+
After writer updates, run `npm run workflow:validate-artifacts -- --require-sidecars .kontourai/flow-agents/<slug>` when local validation is available. If the writer or validation is unavailable or blocked by sandbox policy, record the exact gap in the session artifact as `NOT_VERIFIED` instead of pretending structured state exists.
|
|
56
56
|
|
|
57
|
-
`ensure-session` maintains `.flow-agents/current.json`. The orchestrator
|
|
57
|
+
`ensure-session` maintains `.kontourai/flow-agents/current.json`. The orchestrator is responsible for keeping root `state.json` and `handoff.json` current, but performs every such update **exclusively** through the sidecar writer (`npm run workflow:sidecar -- advance-state` for state transitions, `init-plan` for the initial plan write) — never through a direct Write/Edit tool call against the sidecar path. `config-protection.js` blocks direct tool-mediated writes to `state.json` by design; that block is expected and correct, not a bug to route around. Delegated agents must be given the workflow artifact root and should append events under `agents/<agent-id>/events.jsonl` through `record-agent-event` instead of guessing the slug or rewriting root state.
|
|
58
58
|
|
|
59
59
|
## Input
|
|
60
60
|
|
|
@@ -80,7 +80,7 @@ Direct ad hoc implementation requests that are not provider-backed backlog picku
|
|
|
80
80
|
|
|
81
81
|
## Session File
|
|
82
82
|
|
|
83
|
-
Path: `.flow-agents/<slug>/<slug>--deliver.md`
|
|
83
|
+
Path: `.kontourai/flow-agents/<slug>/<slug>--deliver.md`
|
|
84
84
|
|
|
85
85
|
```markdown
|
|
86
86
|
# <Goal one-liner>
|
|
@@ -100,8 +100,8 @@ iteration: 0
|
|
|
100
100
|
- Loop exits only after the Goal Fit Gate is fully checked or explicitly accepted
|
|
101
101
|
- CRITICAL/HIGH → re-plan → execute → review → verify
|
|
102
102
|
- MEDIUM/FAIL → execute fix pass → review → verify
|
|
103
|
-
- Temporary planning and execution artifacts live in `.flow-agents/<slug>/`; durable feature documentation is promoted after CI/merge
|
|
104
|
-
- Local runtime work stays under `.flow-agents/` and remains untracked; durable outcomes must be promoted before merge to `main`
|
|
103
|
+
- Temporary planning and execution artifacts live in `.kontourai/flow-agents/<slug>/`; durable feature documentation is promoted after CI/merge
|
|
104
|
+
- Local runtime work stays under `.kontourai/flow-agents/` and remains untracked; durable outcomes must be promoted before merge to `main`
|
|
105
105
|
|
|
106
106
|
## Plan
|
|
107
107
|
|
|
@@ -133,6 +133,8 @@ Use the Final Acceptance checklist from `context/contracts/delivery-contract.md`
|
|
|
133
133
|
- iteration 2: pass — all acceptance criteria met
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
+
`<branch>` is the branch recorded in `state.json`'s `branch` field (`ensure-session` derives `agent/<actor>/<slug>`; an explicit `--branch` flag overrides on a new session). `ensure-session` only records the name — creating and checking out the actual git branch/worktree remains this skill's responsibility.
|
|
137
|
+
|
|
136
138
|
The `status:` values in this Markdown session file are human-readable delivery progress labels. They are not the machine-readable `state.phase` enum; structured workflow sidecars must use the canonical lifecycle values from `context/contracts/artifact-contract.md`. In particular, review-work records critique through the critique artifact/sink while the sidecar lifecycle remains in a canonical phase such as `execution`, not a `review` phase.
|
|
137
139
|
|
|
138
140
|
## Workflow
|
|
@@ -218,7 +220,7 @@ After review, verification, evidence, and Goal Fit are clean for the same diff:
|
|
|
218
220
|
2. Publish the session trust bundle to `delivery/` so the CI trust-reconcile job can verify what the agent claimed. `record-release` (via the sidecar writer) does this automatically (best-effort). To publish or re-publish explicitly:
|
|
219
221
|
|
|
220
222
|
```bash
|
|
221
|
-
npm run workflow:sidecar -- publish-delivery .flow-agents/<slug>
|
|
223
|
+
npm run workflow:sidecar -- publish-delivery .kontourai/flow-agents/<slug>
|
|
222
224
|
```
|
|
223
225
|
|
|
224
226
|
Then force-stage the trust artifacts for the delivery commit. They are gitignored
|
|
@@ -237,7 +239,7 @@ After review, verification, evidence, and Goal Fit are clean for the same diff:
|
|
|
237
239
|
7. Record the gate claim for the Builder Kit `pr-open` step immediately after the PR is opened or updated:
|
|
238
240
|
|
|
239
241
|
```bash
|
|
240
|
-
npm run workflow:sidecar -- record-gate-claim .flow-agents/<slug> \
|
|
242
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
241
243
|
--expectation pull-request-opened \
|
|
242
244
|
--status pass \
|
|
243
245
|
--summary "PR opened: <pr-url>. Linked to <work-item-ref>, implementation summary and verification evidence attached." \
|
|
@@ -253,13 +255,13 @@ Do not invoke `release-readiness` before this gate unless the user explicitly ac
|
|
|
253
255
|
After CI passes and the work is merged or otherwise accepted:
|
|
254
256
|
|
|
255
257
|
1. Update `## Final Acceptance` in the session file.
|
|
256
|
-
2. Archive the working artifacts under `.flow-agents/<slug>/archive/` or keep a stable link to them.
|
|
258
|
+
2. Archive the working artifacts under `.kontourai/flow-agents/<slug>/archive/` or keep a stable link to them.
|
|
257
259
|
3. Record provider records, verification evidence, durable docs targets, accepted gaps, and follow-up routing in durable docs or provider records.
|
|
258
260
|
4. Promote the relevant plan, decision, evidence, and usage notes into long-lived docs such as `docs/`, `README.md`, or a project decision record.
|
|
259
261
|
5. Link the long-lived doc back to the provider record, archived plan artifact, or accepted evidence when useful so future readers can see why and how the feature was built.
|
|
260
|
-
6. Confirm `.flow-agents/` runtime artifacts remain untracked before merge to `main`.
|
|
262
|
+
6. Confirm `.kontourai/flow-agents/` runtime artifacts remain untracked before merge to `main`.
|
|
261
263
|
7. **Clean up the workspace once the merge is confirmed.** First verify the merge actually happened from the provider's own record (a merge commit / `mergedAt`) — not a green check or a watcher's exit code. Then honor the `worktree_lifecycle` recorded by `pull-work` (`retain_until: pr_merged`): remove the isolated worktree (`git worktree remove <path>`) and delete the now-merged branch locally and on the remote. Never delete a branch or worktree before the merge is confirmed — a closed-but-unmerged PR or a prematurely deleted branch loses work. The task is not done while it leaves a stale worktree or merged branch behind.
|
|
262
|
-
8. Hand off to `learning-review`
|
|
264
|
+
8. Hand off to `learning-review` for terminal closeout. Clean runs record a lightweight no-correction-needed learning record (`correction.needed: false`, closed routing such as `target: "none"`); mismatches, friction, missing docs, failed gates, incidents, or product follow-up record `correction.needed: true` or `FOLLOWUP_REQUIRED` with routed prevention/follow-up. Do not skip learning just because the delivery looked clean.
|
|
263
265
|
|
|
264
266
|
### 11. Deliver
|
|
265
267
|
|
|
@@ -107,21 +107,21 @@ This applies whether the probe is run directly (generic) or as part of a Builder
|
|
|
107
107
|
**Claim 1 — Pickup readiness** (probe passed, goal fit and scope confirmed):
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
|
-
npm run workflow:sidecar -- record-gate-claim .flow-agents/<slug> \
|
|
110
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
111
111
|
--expectation pickup-probe-readiness \
|
|
112
112
|
--status pass \
|
|
113
113
|
--summary "Design probe passed: goal fit confirmed, scope aligned, planning readiness verified." \
|
|
114
|
-
--evidence-ref-json '{"kind":"artifact","file":".flow-agents/<slug>/<slug>--<artifact>.md","summary":"Design-probe artifact with decisions, accepted gaps, and planning readiness."}'
|
|
114
|
+
--evidence-ref-json '{"kind":"artifact","file":".kontourai/flow-agents/<slug>/<slug>--<artifact>.md","summary":"Design-probe artifact with decisions, accepted gaps, and planning readiness."}'
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
**Claim 2 — Probe decisions captured**:
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
|
-
npm run workflow:sidecar -- record-gate-claim .flow-agents/<slug> \
|
|
120
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
121
121
|
--expectation probe-decisions-or-accepted-gaps \
|
|
122
122
|
--status pass \
|
|
123
123
|
--summary "Probe decisions recorded: decisions made, unresolved questions explicit, planning readiness confirmed." \
|
|
124
|
-
--evidence-ref-json '{"kind":"artifact","file":".flow-agents/<slug>/<slug>--<artifact>.md","summary":"Design-probe artifact with decisions and accepted gaps."}'
|
|
124
|
+
--evidence-ref-json '{"kind":"artifact","file":".kontourai/flow-agents/<slug>/<slug>--<artifact>.md","summary":"Design-probe artifact with decisions and accepted gaps."}'
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
Record both claims when shared understanding exists and the next action is `plan-work` or equivalent. Use `--status fail` when stopping due to an unresolved blocker. Skip these claims entirely when `design-probe` is used outside a Builder Kit flow (no active `builder.build` flow step in `current.json`).
|
|
@@ -28,10 +28,13 @@ Evidence Gate is not Release Readiness. It asks whether completed work has enoug
|
|
|
28
28
|
- Provider change / branch / check run links when available.
|
|
29
29
|
- Changed-file summary.
|
|
30
30
|
- Active TODOs, issue links, and release/rollback notes.
|
|
31
|
+
- Cross-repo dependency/provider coverage matrix when work spans multiple
|
|
32
|
+
products, package-manager roots, generated artifact locations, install
|
|
33
|
+
scripts, CI, or shared workflow guidance.
|
|
31
34
|
|
|
32
35
|
## Artifact Contract
|
|
33
36
|
|
|
34
|
-
Write or update `.flow-agents/<slug>/<slug>--evidence-gate.md` with:
|
|
37
|
+
Write or update `.kontourai/flow-agents/<slug>/<slug>--evidence-gate.md` with:
|
|
35
38
|
|
|
36
39
|
- `intent`: issue/brief, acceptance criteria, non-goals, risk class
|
|
37
40
|
- `evidence_manifest`: command/check name, source, timestamp, result, link/output pointer
|
|
@@ -102,6 +105,13 @@ Check for process gaming or accidental drift:
|
|
|
102
105
|
|
|
103
106
|
Sensitive areas include auth, security middleware, data migrations, CI config, deployment scripts, feature flags, test helpers, lint/type config, payment, crypto, and filesystem/network operations.
|
|
104
107
|
|
|
108
|
+
For multi-repo or cross-product changes, require an explicit coverage matrix
|
|
109
|
+
before a clean pass. The matrix must list every affected product/repo root and
|
|
110
|
+
the status of build/test evidence, dependency/security review, provider/CI
|
|
111
|
+
evidence, and any accepted gaps. A clean evidence verdict requires every
|
|
112
|
+
applicable root to be covered or a human-accepted gap recorded with the reason.
|
|
113
|
+
Do not infer cross-product coverage from a passing subset.
|
|
114
|
+
|
|
105
115
|
### 4. CI And Flake Assessment
|
|
106
116
|
|
|
107
117
|
Use `github-cli` / `gh` when available.
|
|
@@ -179,6 +189,21 @@ Use `git` and the active `ChangeProvider` adapter when available to:
|
|
|
179
189
|
|
|
180
190
|
If commit, push, provider change publication, or provider checks are blocked, keep the release path at `NOT_VERIFIED` or `HOLD` until the blocker is resolved or explicitly accepted by the user.
|
|
181
191
|
|
|
192
|
+
### 8. Dependency And External-Audit Coverage
|
|
193
|
+
|
|
194
|
+
When dependency review is in scope, evidence-gate must preserve both local
|
|
195
|
+
inventory evidence and external advisory/audit evidence separately. External
|
|
196
|
+
audit commands and registry/advisory lookups may disclose private dependency
|
|
197
|
+
metadata; if the execution policy rejects the command or the user has not
|
|
198
|
+
explicitly approved that disclosure, record the affected roots as
|
|
199
|
+
`NOT_VERIFIED` for external audit and name the privacy/approval blocker.
|
|
200
|
+
|
|
201
|
+
For cross-product work, a dependency/security lane can pass only when every
|
|
202
|
+
applicable package-manager root has one of these recorded outcomes: `pass`,
|
|
203
|
+
`fail`, `skip_no_manifest`, or an accepted `not_verified` gap. Existing
|
|
204
|
+
vulnerabilities are still `FAIL` for the dependency lane unless the user
|
|
205
|
+
explicitly accepts them as unrelated residual risk.
|
|
206
|
+
|
|
182
207
|
## Gate
|
|
183
208
|
|
|
184
209
|
Evidence passes only when acceptance criteria, scope integrity, CI/runtime evidence, and residual risk are sufficient for the risk class.
|
|
@@ -29,7 +29,7 @@ This skill owns orchestration between waves. The contracts own artifact continui
|
|
|
29
29
|
|
|
30
30
|
## Input
|
|
31
31
|
|
|
32
|
-
- **Plan artifact path**: path to the `-plan.md` file in `.flow-agents/<slug>/`
|
|
32
|
+
- **Plan artifact path**: path to the `-plan.md` file in `.kontourai/flow-agents/<slug>/`
|
|
33
33
|
- **Session file path**: the session file to update with progress
|
|
34
34
|
|
|
35
35
|
## Workflow
|
|
@@ -67,7 +67,7 @@ This skill owns orchestration between waves. The contracts own artifact continui
|
|
|
67
67
|
- Record worker progress with `npm run workflow:sidecar -- record-agent-event --artifact-dir <artifact-dir> --agent-id <worker-id> --kind evidence --status active|done --summary ...`
|
|
68
68
|
9. After all waves: set session file `status: executed` and update `state.json` / `handoff.json` with `advance-state`
|
|
69
69
|
|
|
70
|
-
The orchestrator
|
|
70
|
+
The orchestrator is responsible for keeping root `state.json` current, and performs that update **exclusively** through `npm run workflow:sidecar -- advance-state` — never through a direct Write/Edit tool call against the sidecar path. `config-protection.js` blocks direct tool-mediated writes to `state.json` by design; that block is expected and correct, not a bug to route around. Workers should receive the workflow artifact root explicitly and append agent events under that root instead of inferring the slug or rewriting shared sidecars.
|
|
71
71
|
|
|
72
72
|
## Pre-Fan-Out Freshness Re-Check
|
|
73
73
|
|
|
@@ -70,6 +70,8 @@ Root cause from tool-planner.
|
|
|
70
70
|
- iteration 2: pass — bug fixed, no regressions
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
`<branch>` is the branch recorded in `state.json`'s `branch` field (`ensure-session` derives `agent/<actor>/<slug>`; an explicit `--branch` flag overrides on a new session). `ensure-session` only records the name — creating and checking out the actual git branch/worktree remains this skill's responsibility.
|
|
74
|
+
|
|
73
75
|
## Workflow
|
|
74
76
|
|
|
75
77
|
### 1. Create session file
|