@kontourai/flow-agents 4.0.0 → 4.2.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/workflows/ci.yml +8 -0
- package/CHANGELOG.md +34 -0
- package/CONTEXT.md +5 -0
- package/agents/tool-security-reviewer.json +1 -1
- package/build/src/cli/init.js +35 -3
- package/build/src/cli/kit.js +95 -2
- package/build/src/cli/pull-work-provider.js +7 -1
- package/build/src/cli/validate-workflow-artifacts.js +53 -0
- package/build/src/cli/workflow.js +5 -1
- package/build/src/flow-kit/provision.d.ts +23 -0
- package/build/src/flow-kit/provision.js +99 -0
- package/build/src/flow-kit/validate.d.ts +52 -0
- package/build/src/flow-kit/validate.js +214 -9
- package/build/src/runtime-adapters.js +1 -1
- package/context/contracts/execution-contract.md +30 -1
- package/context/contracts/review-contract.md +4 -0
- package/context/contracts/trigger-guards.md +73 -0
- package/context/scripts/telemetry/lib/config.sh +29 -0
- package/context/settings/backlog-provider-settings.json +1 -1
- package/context/settings/workspace-backlog-provider-settings.example.json +1 -1
- package/dist/base/build/package.json +1 -1
- package/dist/base/build/src/cli/init.js +35 -3
- package/dist/base/build/src/cli/kit.js +95 -2
- package/dist/base/build/src/cli/pull-work-provider.js +7 -1
- package/dist/base/build/src/cli/validate-workflow-artifacts.js +53 -0
- package/dist/base/build/src/cli/workflow.js +5 -1
- package/dist/base/build/src/flow-kit/provision.d.ts +23 -0
- package/dist/base/build/src/flow-kit/provision.js +99 -0
- package/dist/base/build/src/flow-kit/validate.d.ts +52 -0
- package/dist/base/build/src/flow-kit/validate.js +214 -9
- package/dist/base/build/src/runtime-adapters.js +1 -1
- package/dist/base/context/contracts/execution-contract.md +30 -1
- package/dist/base/context/contracts/review-contract.md +4 -0
- package/dist/base/context/contracts/trigger-guards.md +73 -0
- package/dist/base/context/scripts/telemetry/lib/config.sh +29 -0
- package/dist/base/context/settings/backlog-provider-settings.json +1 -1
- package/dist/base/context/settings/workspace-backlog-provider-settings.example.json +1 -1
- package/dist/base/docs/adr/0023-kit-provisioning.md +47 -0
- package/dist/base/docs/adr/index.md +1 -0
- package/dist/base/docs/architecture-engine-and-kits.md +17 -0
- package/dist/base/docs/context-map.md +3 -0
- package/dist/base/docs/decisions/backlog-readiness-source.md +89 -0
- package/dist/base/docs/decisions/index.md +1 -0
- package/dist/base/docs/developer-architecture.md +3 -3
- package/dist/base/docs/flow-kit-repository-contract.md +34 -3
- package/dist/base/docs/kit-authoring-guide.md +1 -1
- package/dist/base/docs/veritas-integration.md +12 -0
- package/dist/base/evals/ci/run-baseline.sh +4 -0
- package/dist/base/evals/integration/test_kit_provisioning.sh +112 -0
- package/dist/base/evals/integration/test_liveness_console_relay.sh +91 -1
- package/dist/base/evals/integration/test_liveness_heartbeat.sh +66 -0
- package/dist/base/evals/integration/test_pull_work_provider.sh +18 -0
- package/dist/base/evals/integration/test_veritas_governance_kit.sh +256 -0
- package/dist/base/evals/integration/test_workflow_artifacts.sh +257 -0
- package/dist/base/evals/static/test_package.sh +6 -0
- package/dist/base/evals/static/test_workflow_skills.sh +16 -0
- package/dist/base/install.sh +1 -1
- package/dist/base/kits/builder/flows/publish-learn.flow.json +9 -1
- package/dist/base/kits/builder/skills/execute-plan/SKILL.md +4 -3
- package/dist/base/kits/builder/skills/pull-work/SKILL.md +12 -0
- package/dist/base/kits/builder/skills/review-work/SKILL.md +11 -0
- package/dist/base/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +19 -20
- package/dist/base/kits/veritas-governance/assets/starter-hooks/githooks/post-commit +13 -0
- package/dist/base/kits/veritas-governance/assets/starter-hooks/githooks/pre-push +13 -0
- package/dist/base/kits/veritas-governance/assets/starter-standards/veritas/GOVERNANCE.md +23 -0
- package/dist/base/kits/veritas-governance/assets/starter-standards/veritas/README.md +58 -0
- package/dist/base/kits/veritas-governance/assets/starter-standards/veritas/authority/default.authority-settings.json +30 -0
- package/dist/base/kits/veritas-governance/assets/starter-standards/veritas/repo-map.json +115 -0
- package/dist/base/kits/veritas-governance/assets/starter-standards/veritas/repo-standards/default.repo-standards.json +54 -0
- package/dist/base/kits/veritas-governance/assets/starter-standards/veritas.claims.json +179 -0
- package/dist/base/kits/veritas-governance/docs/README.md +141 -10
- package/dist/base/kits/veritas-governance/fixtures/standards-authoring/approved.trust-bundle.json +74 -0
- package/dist/base/kits/veritas-governance/fixtures/standards-authoring/not-approved.trust-bundle.json +74 -0
- package/dist/base/kits/veritas-governance/flows/standards-authoring.flow.json +35 -0
- package/dist/base/kits/veritas-governance/kit.json +65 -0
- package/dist/base/kits/veritas-governance/skills/consult-standards/SKILL.md +73 -0
- package/dist/base/kits/veritas-governance/skills/standards-authoring/SKILL.md +87 -0
- package/dist/base/schemas/backlog-provider-settings.schema.json +1 -1
- package/dist/base/schemas/workflow-waves.schema.json +347 -0
- package/dist/base/scripts/check-layer-boundary.mjs +98 -0
- package/dist/base/scripts/hooks/claude-telemetry-hook.js +6 -0
- package/dist/base/scripts/hooks/lib/liveness-heartbeat.js +42 -1
- package/dist/base/scripts/hooks/lib/liveness-write.js +109 -9
- package/dist/base/scripts/liveness/relay.sh +23 -11
- package/dist/base/scripts/telemetry/lib/config.sh +29 -0
- package/dist/catalog.json +2 -0
- package/dist/claude-code/.claude/agents/tool-security-reviewer.md +2 -1
- package/dist/claude-code/.claude/skills/consult-standards/SKILL.md +73 -0
- package/dist/claude-code/.claude/skills/execute-plan/SKILL.md +4 -3
- package/dist/claude-code/.claude/skills/pull-work/SKILL.md +12 -0
- package/dist/claude-code/.claude/skills/review-work/SKILL.md +11 -0
- package/dist/claude-code/.claude/skills/standards-authoring/SKILL.md +87 -0
- package/dist/claude-code/build/package.json +1 -1
- package/dist/claude-code/build/src/cli/init.js +35 -3
- package/dist/claude-code/build/src/cli/kit.js +95 -2
- package/dist/claude-code/build/src/cli/pull-work-provider.js +7 -1
- package/dist/claude-code/build/src/cli/validate-workflow-artifacts.js +53 -0
- package/dist/claude-code/build/src/cli/workflow.js +5 -1
- package/dist/claude-code/build/src/flow-kit/provision.d.ts +23 -0
- package/dist/claude-code/build/src/flow-kit/provision.js +99 -0
- package/dist/claude-code/build/src/flow-kit/validate.d.ts +52 -0
- package/dist/claude-code/build/src/flow-kit/validate.js +214 -9
- package/dist/claude-code/build/src/runtime-adapters.js +1 -1
- package/dist/claude-code/context/contracts/execution-contract.md +30 -1
- package/dist/claude-code/context/contracts/review-contract.md +4 -0
- package/dist/claude-code/context/contracts/trigger-guards.md +73 -0
- package/dist/claude-code/context/scripts/telemetry/lib/config.sh +29 -0
- package/dist/claude-code/context/settings/backlog-provider-settings.json +1 -1
- package/dist/claude-code/context/settings/workspace-backlog-provider-settings.example.json +1 -1
- package/dist/claude-code/docs/adr/0023-kit-provisioning.md +47 -0
- package/dist/claude-code/docs/adr/index.md +1 -0
- package/dist/claude-code/docs/architecture-engine-and-kits.md +17 -0
- package/dist/claude-code/docs/context-map.md +3 -0
- package/dist/claude-code/docs/decisions/backlog-readiness-source.md +89 -0
- package/dist/claude-code/docs/decisions/index.md +1 -0
- package/dist/claude-code/docs/developer-architecture.md +3 -3
- package/dist/claude-code/docs/flow-kit-repository-contract.md +34 -3
- package/dist/claude-code/docs/kit-authoring-guide.md +1 -1
- package/dist/claude-code/docs/veritas-integration.md +12 -0
- package/dist/claude-code/evals/ci/run-baseline.sh +4 -0
- package/dist/claude-code/evals/integration/test_kit_provisioning.sh +112 -0
- package/dist/claude-code/evals/integration/test_liveness_console_relay.sh +91 -1
- package/dist/claude-code/evals/integration/test_liveness_heartbeat.sh +66 -0
- package/dist/claude-code/evals/integration/test_pull_work_provider.sh +18 -0
- package/dist/claude-code/evals/integration/test_veritas_governance_kit.sh +256 -0
- package/dist/claude-code/evals/integration/test_workflow_artifacts.sh +257 -0
- package/dist/claude-code/evals/static/test_package.sh +6 -0
- package/dist/claude-code/evals/static/test_workflow_skills.sh +16 -0
- package/dist/claude-code/install.sh +1 -1
- package/dist/claude-code/kits/builder/flows/publish-learn.flow.json +9 -1
- package/dist/claude-code/kits/builder/skills/execute-plan/SKILL.md +4 -3
- package/dist/claude-code/kits/builder/skills/pull-work/SKILL.md +12 -0
- package/dist/claude-code/kits/builder/skills/review-work/SKILL.md +11 -0
- package/dist/claude-code/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +19 -20
- package/dist/claude-code/kits/veritas-governance/assets/starter-hooks/githooks/post-commit +13 -0
- package/dist/claude-code/kits/veritas-governance/assets/starter-hooks/githooks/pre-push +13 -0
- package/dist/claude-code/kits/veritas-governance/assets/starter-standards/veritas/GOVERNANCE.md +23 -0
- package/dist/claude-code/kits/veritas-governance/assets/starter-standards/veritas/README.md +58 -0
- package/dist/claude-code/kits/veritas-governance/assets/starter-standards/veritas/authority/default.authority-settings.json +30 -0
- package/dist/claude-code/kits/veritas-governance/assets/starter-standards/veritas/repo-map.json +115 -0
- package/dist/claude-code/kits/veritas-governance/assets/starter-standards/veritas/repo-standards/default.repo-standards.json +54 -0
- package/dist/claude-code/kits/veritas-governance/assets/starter-standards/veritas.claims.json +179 -0
- package/dist/claude-code/kits/veritas-governance/docs/README.md +141 -10
- package/dist/claude-code/kits/veritas-governance/fixtures/standards-authoring/approved.trust-bundle.json +74 -0
- package/dist/claude-code/kits/veritas-governance/fixtures/standards-authoring/not-approved.trust-bundle.json +74 -0
- package/dist/claude-code/kits/veritas-governance/flows/standards-authoring.flow.json +35 -0
- package/dist/claude-code/kits/veritas-governance/kit.json +65 -0
- package/dist/claude-code/kits/veritas-governance/skills/consult-standards/SKILL.md +73 -0
- package/dist/claude-code/kits/veritas-governance/skills/standards-authoring/SKILL.md +87 -0
- package/dist/claude-code/schemas/backlog-provider-settings.schema.json +1 -1
- package/dist/claude-code/schemas/workflow-waves.schema.json +347 -0
- package/dist/claude-code/scripts/check-layer-boundary.mjs +98 -0
- package/dist/claude-code/scripts/hooks/claude-telemetry-hook.js +6 -0
- package/dist/claude-code/scripts/hooks/lib/liveness-heartbeat.js +42 -1
- package/dist/claude-code/scripts/hooks/lib/liveness-write.js +109 -9
- package/dist/claude-code/scripts/liveness/relay.sh +23 -11
- package/dist/claude-code/scripts/telemetry/lib/config.sh +29 -0
- package/dist/codex/.agents/skills/builder-shape/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/consult-standards/SKILL.md +73 -0
- package/dist/codex/.agents/skills/deliver/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/design-probe/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/execute-plan/SKILL.md +4 -3
- package/dist/codex/.agents/skills/execute-plan/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/fix-bug/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/idea-to-backlog/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/plan-work/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/pull-work/SKILL.md +12 -0
- package/dist/codex/.agents/skills/pull-work/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/review-work/SKILL.md +11 -0
- package/dist/codex/.agents/skills/review-work/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/standards-authoring/SKILL.md +87 -0
- package/dist/codex/.agents/skills/tdd-workflow/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.agents/skills/verify-work/context/contracts/execution-contract.md +30 -1
- package/dist/codex/.codex/agents/tool-security-reviewer.toml +1 -1
- package/dist/codex/build/package.json +1 -1
- package/dist/codex/build/src/cli/init.js +35 -3
- package/dist/codex/build/src/cli/kit.js +95 -2
- package/dist/codex/build/src/cli/pull-work-provider.js +7 -1
- package/dist/codex/build/src/cli/validate-workflow-artifacts.js +53 -0
- package/dist/codex/build/src/cli/workflow.js +5 -1
- package/dist/codex/build/src/flow-kit/provision.d.ts +23 -0
- package/dist/codex/build/src/flow-kit/provision.js +99 -0
- package/dist/codex/build/src/flow-kit/validate.d.ts +52 -0
- package/dist/codex/build/src/flow-kit/validate.js +214 -9
- package/dist/codex/build/src/runtime-adapters.js +1 -1
- package/dist/codex/context/contracts/execution-contract.md +30 -1
- package/dist/codex/context/contracts/review-contract.md +4 -0
- package/dist/codex/context/contracts/trigger-guards.md +73 -0
- package/dist/codex/context/scripts/telemetry/lib/config.sh +29 -0
- package/dist/codex/context/settings/backlog-provider-settings.json +1 -1
- package/dist/codex/context/settings/workspace-backlog-provider-settings.example.json +1 -1
- package/dist/codex/docs/adr/0023-kit-provisioning.md +47 -0
- package/dist/codex/docs/adr/index.md +1 -0
- package/dist/codex/docs/architecture-engine-and-kits.md +17 -0
- package/dist/codex/docs/context-map.md +3 -0
- package/dist/codex/docs/decisions/backlog-readiness-source.md +89 -0
- package/dist/codex/docs/decisions/index.md +1 -0
- package/dist/codex/docs/developer-architecture.md +3 -3
- package/dist/codex/docs/flow-kit-repository-contract.md +34 -3
- package/dist/codex/docs/kit-authoring-guide.md +1 -1
- package/dist/codex/docs/veritas-integration.md +12 -0
- package/dist/codex/evals/ci/run-baseline.sh +4 -0
- package/dist/codex/evals/integration/test_kit_provisioning.sh +112 -0
- package/dist/codex/evals/integration/test_liveness_console_relay.sh +91 -1
- package/dist/codex/evals/integration/test_liveness_heartbeat.sh +66 -0
- package/dist/codex/evals/integration/test_pull_work_provider.sh +18 -0
- package/dist/codex/evals/integration/test_veritas_governance_kit.sh +256 -0
- package/dist/codex/evals/integration/test_workflow_artifacts.sh +257 -0
- package/dist/codex/evals/static/test_package.sh +6 -0
- package/dist/codex/evals/static/test_workflow_skills.sh +16 -0
- package/dist/codex/install.sh +1 -1
- package/dist/codex/kits/builder/flows/publish-learn.flow.json +9 -1
- package/dist/codex/kits/builder/skills/execute-plan/SKILL.md +4 -3
- package/dist/codex/kits/builder/skills/pull-work/SKILL.md +12 -0
- package/dist/codex/kits/builder/skills/review-work/SKILL.md +11 -0
- package/dist/codex/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +19 -20
- package/dist/codex/kits/veritas-governance/assets/starter-hooks/githooks/post-commit +13 -0
- package/dist/codex/kits/veritas-governance/assets/starter-hooks/githooks/pre-push +13 -0
- package/dist/codex/kits/veritas-governance/assets/starter-standards/veritas/GOVERNANCE.md +23 -0
- package/dist/codex/kits/veritas-governance/assets/starter-standards/veritas/README.md +58 -0
- package/dist/codex/kits/veritas-governance/assets/starter-standards/veritas/authority/default.authority-settings.json +30 -0
- package/dist/codex/kits/veritas-governance/assets/starter-standards/veritas/repo-map.json +115 -0
- package/dist/codex/kits/veritas-governance/assets/starter-standards/veritas/repo-standards/default.repo-standards.json +54 -0
- package/dist/codex/kits/veritas-governance/assets/starter-standards/veritas.claims.json +179 -0
- package/dist/codex/kits/veritas-governance/docs/README.md +141 -10
- package/dist/codex/kits/veritas-governance/fixtures/standards-authoring/approved.trust-bundle.json +74 -0
- package/dist/codex/kits/veritas-governance/fixtures/standards-authoring/not-approved.trust-bundle.json +74 -0
- package/dist/codex/kits/veritas-governance/flows/standards-authoring.flow.json +35 -0
- package/dist/codex/kits/veritas-governance/kit.json +65 -0
- package/dist/codex/kits/veritas-governance/skills/consult-standards/SKILL.md +73 -0
- package/dist/codex/kits/veritas-governance/skills/standards-authoring/SKILL.md +87 -0
- package/dist/codex/schemas/backlog-provider-settings.schema.json +1 -1
- package/dist/codex/schemas/workflow-waves.schema.json +347 -0
- package/dist/codex/scripts/check-layer-boundary.mjs +98 -0
- package/dist/codex/scripts/hooks/claude-telemetry-hook.js +6 -0
- package/dist/codex/scripts/hooks/lib/liveness-heartbeat.js +42 -1
- package/dist/codex/scripts/hooks/lib/liveness-write.js +109 -9
- package/dist/codex/scripts/liveness/relay.sh +23 -11
- package/dist/codex/scripts/telemetry/lib/config.sh +29 -0
- package/dist/kiro/agents/tool-security-reviewer.json +1 -1
- package/dist/kiro/build/package.json +1 -1
- package/dist/kiro/build/src/cli/init.js +35 -3
- package/dist/kiro/build/src/cli/kit.js +95 -2
- package/dist/kiro/build/src/cli/pull-work-provider.js +7 -1
- package/dist/kiro/build/src/cli/validate-workflow-artifacts.js +53 -0
- package/dist/kiro/build/src/cli/workflow.js +5 -1
- package/dist/kiro/build/src/flow-kit/provision.d.ts +23 -0
- package/dist/kiro/build/src/flow-kit/provision.js +99 -0
- package/dist/kiro/build/src/flow-kit/validate.d.ts +52 -0
- package/dist/kiro/build/src/flow-kit/validate.js +214 -9
- package/dist/kiro/build/src/runtime-adapters.js +1 -1
- package/dist/kiro/context/contracts/execution-contract.md +30 -1
- package/dist/kiro/context/contracts/review-contract.md +4 -0
- package/dist/kiro/context/contracts/trigger-guards.md +73 -0
- package/dist/kiro/context/scripts/telemetry/lib/config.sh +29 -0
- package/dist/kiro/context/settings/backlog-provider-settings.json +1 -1
- package/dist/kiro/context/settings/workspace-backlog-provider-settings.example.json +1 -1
- package/dist/kiro/docs/adr/0023-kit-provisioning.md +47 -0
- package/dist/kiro/docs/adr/index.md +1 -0
- package/dist/kiro/docs/architecture-engine-and-kits.md +17 -0
- package/dist/kiro/docs/context-map.md +3 -0
- package/dist/kiro/docs/decisions/backlog-readiness-source.md +89 -0
- package/dist/kiro/docs/decisions/index.md +1 -0
- package/dist/kiro/docs/developer-architecture.md +3 -3
- package/dist/kiro/docs/flow-kit-repository-contract.md +34 -3
- package/dist/kiro/docs/kit-authoring-guide.md +1 -1
- package/dist/kiro/docs/veritas-integration.md +12 -0
- package/dist/kiro/evals/ci/run-baseline.sh +4 -0
- package/dist/kiro/evals/integration/test_kit_provisioning.sh +112 -0
- package/dist/kiro/evals/integration/test_liveness_console_relay.sh +91 -1
- package/dist/kiro/evals/integration/test_liveness_heartbeat.sh +66 -0
- package/dist/kiro/evals/integration/test_pull_work_provider.sh +18 -0
- package/dist/kiro/evals/integration/test_veritas_governance_kit.sh +256 -0
- package/dist/kiro/evals/integration/test_workflow_artifacts.sh +257 -0
- package/dist/kiro/evals/static/test_package.sh +6 -0
- package/dist/kiro/evals/static/test_workflow_skills.sh +16 -0
- package/dist/kiro/install.sh +1 -1
- package/dist/kiro/kits/builder/flows/publish-learn.flow.json +9 -1
- package/dist/kiro/kits/builder/skills/execute-plan/SKILL.md +4 -3
- package/dist/kiro/kits/builder/skills/pull-work/SKILL.md +12 -0
- package/dist/kiro/kits/builder/skills/review-work/SKILL.md +11 -0
- package/dist/kiro/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +19 -20
- package/dist/kiro/kits/veritas-governance/assets/starter-hooks/githooks/post-commit +13 -0
- package/dist/kiro/kits/veritas-governance/assets/starter-hooks/githooks/pre-push +13 -0
- package/dist/kiro/kits/veritas-governance/assets/starter-standards/veritas/GOVERNANCE.md +23 -0
- package/dist/kiro/kits/veritas-governance/assets/starter-standards/veritas/README.md +58 -0
- package/dist/kiro/kits/veritas-governance/assets/starter-standards/veritas/authority/default.authority-settings.json +30 -0
- package/dist/kiro/kits/veritas-governance/assets/starter-standards/veritas/repo-map.json +115 -0
- package/dist/kiro/kits/veritas-governance/assets/starter-standards/veritas/repo-standards/default.repo-standards.json +54 -0
- package/dist/kiro/kits/veritas-governance/assets/starter-standards/veritas.claims.json +179 -0
- package/dist/kiro/kits/veritas-governance/docs/README.md +141 -10
- package/dist/kiro/kits/veritas-governance/fixtures/standards-authoring/approved.trust-bundle.json +74 -0
- package/dist/kiro/kits/veritas-governance/fixtures/standards-authoring/not-approved.trust-bundle.json +74 -0
- package/dist/kiro/kits/veritas-governance/flows/standards-authoring.flow.json +35 -0
- package/dist/kiro/kits/veritas-governance/kit.json +65 -0
- package/dist/kiro/kits/veritas-governance/skills/consult-standards/SKILL.md +73 -0
- package/dist/kiro/kits/veritas-governance/skills/standards-authoring/SKILL.md +87 -0
- package/dist/kiro/schemas/backlog-provider-settings.schema.json +1 -1
- package/dist/kiro/schemas/workflow-waves.schema.json +347 -0
- package/dist/kiro/scripts/check-layer-boundary.mjs +98 -0
- package/dist/kiro/scripts/hooks/claude-telemetry-hook.js +6 -0
- package/dist/kiro/scripts/hooks/lib/liveness-heartbeat.js +42 -1
- package/dist/kiro/scripts/hooks/lib/liveness-write.js +109 -9
- package/dist/kiro/scripts/liveness/relay.sh +23 -11
- package/dist/kiro/scripts/telemetry/lib/config.sh +29 -0
- package/dist/opencode/.opencode/agents/tool-security-reviewer.md +2 -1
- package/dist/opencode/.opencode/skills/consult-standards/SKILL.md +73 -0
- package/dist/opencode/.opencode/skills/execute-plan/SKILL.md +4 -3
- package/dist/opencode/.opencode/skills/pull-work/SKILL.md +12 -0
- package/dist/opencode/.opencode/skills/review-work/SKILL.md +11 -0
- package/dist/opencode/.opencode/skills/standards-authoring/SKILL.md +87 -0
- package/dist/opencode/build/package.json +1 -1
- package/dist/opencode/build/src/cli/init.js +35 -3
- package/dist/opencode/build/src/cli/kit.js +95 -2
- package/dist/opencode/build/src/cli/pull-work-provider.js +7 -1
- package/dist/opencode/build/src/cli/validate-workflow-artifacts.js +53 -0
- package/dist/opencode/build/src/cli/workflow.js +5 -1
- package/dist/opencode/build/src/flow-kit/provision.d.ts +23 -0
- package/dist/opencode/build/src/flow-kit/provision.js +99 -0
- package/dist/opencode/build/src/flow-kit/validate.d.ts +52 -0
- package/dist/opencode/build/src/flow-kit/validate.js +214 -9
- package/dist/opencode/build/src/runtime-adapters.js +1 -1
- package/dist/opencode/context/contracts/execution-contract.md +30 -1
- package/dist/opencode/context/contracts/review-contract.md +4 -0
- package/dist/opencode/context/contracts/trigger-guards.md +73 -0
- package/dist/opencode/context/scripts/telemetry/lib/config.sh +29 -0
- package/dist/opencode/context/settings/backlog-provider-settings.json +1 -1
- package/dist/opencode/context/settings/workspace-backlog-provider-settings.example.json +1 -1
- package/dist/opencode/docs/adr/0023-kit-provisioning.md +47 -0
- package/dist/opencode/docs/adr/index.md +1 -0
- package/dist/opencode/docs/architecture-engine-and-kits.md +17 -0
- package/dist/opencode/docs/context-map.md +3 -0
- package/dist/opencode/docs/decisions/backlog-readiness-source.md +89 -0
- package/dist/opencode/docs/decisions/index.md +1 -0
- package/dist/opencode/docs/developer-architecture.md +3 -3
- package/dist/opencode/docs/flow-kit-repository-contract.md +34 -3
- package/dist/opencode/docs/kit-authoring-guide.md +1 -1
- package/dist/opencode/docs/veritas-integration.md +12 -0
- package/dist/opencode/evals/ci/run-baseline.sh +4 -0
- package/dist/opencode/evals/integration/test_kit_provisioning.sh +112 -0
- package/dist/opencode/evals/integration/test_liveness_console_relay.sh +91 -1
- package/dist/opencode/evals/integration/test_liveness_heartbeat.sh +66 -0
- package/dist/opencode/evals/integration/test_pull_work_provider.sh +18 -0
- package/dist/opencode/evals/integration/test_veritas_governance_kit.sh +256 -0
- package/dist/opencode/evals/integration/test_workflow_artifacts.sh +257 -0
- package/dist/opencode/evals/static/test_package.sh +6 -0
- package/dist/opencode/evals/static/test_workflow_skills.sh +16 -0
- package/dist/opencode/install.sh +1 -1
- package/dist/opencode/kits/builder/flows/publish-learn.flow.json +9 -1
- package/dist/opencode/kits/builder/skills/execute-plan/SKILL.md +4 -3
- package/dist/opencode/kits/builder/skills/pull-work/SKILL.md +12 -0
- package/dist/opencode/kits/builder/skills/review-work/SKILL.md +11 -0
- package/dist/opencode/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +19 -20
- package/dist/opencode/kits/veritas-governance/assets/starter-hooks/githooks/post-commit +13 -0
- package/dist/opencode/kits/veritas-governance/assets/starter-hooks/githooks/pre-push +13 -0
- package/dist/opencode/kits/veritas-governance/assets/starter-standards/veritas/GOVERNANCE.md +23 -0
- package/dist/opencode/kits/veritas-governance/assets/starter-standards/veritas/README.md +58 -0
- package/dist/opencode/kits/veritas-governance/assets/starter-standards/veritas/authority/default.authority-settings.json +30 -0
- package/dist/opencode/kits/veritas-governance/assets/starter-standards/veritas/repo-map.json +115 -0
- package/dist/opencode/kits/veritas-governance/assets/starter-standards/veritas/repo-standards/default.repo-standards.json +54 -0
- package/dist/opencode/kits/veritas-governance/assets/starter-standards/veritas.claims.json +179 -0
- package/dist/opencode/kits/veritas-governance/docs/README.md +141 -10
- package/dist/opencode/kits/veritas-governance/fixtures/standards-authoring/approved.trust-bundle.json +74 -0
- package/dist/opencode/kits/veritas-governance/fixtures/standards-authoring/not-approved.trust-bundle.json +74 -0
- package/dist/opencode/kits/veritas-governance/flows/standards-authoring.flow.json +35 -0
- package/dist/opencode/kits/veritas-governance/kit.json +65 -0
- package/dist/opencode/kits/veritas-governance/skills/consult-standards/SKILL.md +73 -0
- package/dist/opencode/kits/veritas-governance/skills/standards-authoring/SKILL.md +87 -0
- package/dist/opencode/schemas/backlog-provider-settings.schema.json +1 -1
- package/dist/opencode/schemas/workflow-waves.schema.json +347 -0
- package/dist/opencode/scripts/check-layer-boundary.mjs +98 -0
- package/dist/opencode/scripts/hooks/claude-telemetry-hook.js +6 -0
- package/dist/opencode/scripts/hooks/lib/liveness-heartbeat.js +42 -1
- package/dist/opencode/scripts/hooks/lib/liveness-write.js +109 -9
- package/dist/opencode/scripts/liveness/relay.sh +23 -11
- package/dist/opencode/scripts/telemetry/lib/config.sh +29 -0
- package/dist/pi/.pi/skills/consult-standards/SKILL.md +73 -0
- package/dist/pi/.pi/skills/execute-plan/SKILL.md +4 -3
- package/dist/pi/.pi/skills/pull-work/SKILL.md +12 -0
- package/dist/pi/.pi/skills/review-work/SKILL.md +11 -0
- package/dist/pi/.pi/skills/standards-authoring/SKILL.md +87 -0
- package/dist/pi/build/package.json +1 -1
- package/dist/pi/build/src/cli/init.js +35 -3
- package/dist/pi/build/src/cli/kit.js +95 -2
- package/dist/pi/build/src/cli/pull-work-provider.js +7 -1
- package/dist/pi/build/src/cli/validate-workflow-artifacts.js +53 -0
- package/dist/pi/build/src/cli/workflow.js +5 -1
- package/dist/pi/build/src/flow-kit/provision.d.ts +23 -0
- package/dist/pi/build/src/flow-kit/provision.js +99 -0
- package/dist/pi/build/src/flow-kit/validate.d.ts +52 -0
- package/dist/pi/build/src/flow-kit/validate.js +214 -9
- package/dist/pi/build/src/runtime-adapters.js +1 -1
- package/dist/pi/context/contracts/execution-contract.md +30 -1
- package/dist/pi/context/contracts/review-contract.md +4 -0
- package/dist/pi/context/contracts/trigger-guards.md +73 -0
- package/dist/pi/context/scripts/telemetry/lib/config.sh +29 -0
- package/dist/pi/context/settings/backlog-provider-settings.json +1 -1
- package/dist/pi/context/settings/workspace-backlog-provider-settings.example.json +1 -1
- package/dist/pi/docs/adr/0023-kit-provisioning.md +47 -0
- package/dist/pi/docs/adr/index.md +1 -0
- package/dist/pi/docs/architecture-engine-and-kits.md +17 -0
- package/dist/pi/docs/context-map.md +3 -0
- package/dist/pi/docs/decisions/backlog-readiness-source.md +89 -0
- package/dist/pi/docs/decisions/index.md +1 -0
- package/dist/pi/docs/developer-architecture.md +3 -3
- package/dist/pi/docs/flow-kit-repository-contract.md +34 -3
- package/dist/pi/docs/kit-authoring-guide.md +1 -1
- package/dist/pi/docs/veritas-integration.md +12 -0
- package/dist/pi/evals/ci/run-baseline.sh +4 -0
- package/dist/pi/evals/integration/test_kit_provisioning.sh +112 -0
- package/dist/pi/evals/integration/test_liveness_console_relay.sh +91 -1
- package/dist/pi/evals/integration/test_liveness_heartbeat.sh +66 -0
- package/dist/pi/evals/integration/test_pull_work_provider.sh +18 -0
- package/dist/pi/evals/integration/test_veritas_governance_kit.sh +256 -0
- package/dist/pi/evals/integration/test_workflow_artifacts.sh +257 -0
- package/dist/pi/evals/static/test_package.sh +6 -0
- package/dist/pi/evals/static/test_workflow_skills.sh +16 -0
- package/dist/pi/install.sh +1 -1
- package/dist/pi/kits/builder/flows/publish-learn.flow.json +9 -1
- package/dist/pi/kits/builder/skills/execute-plan/SKILL.md +4 -3
- package/dist/pi/kits/builder/skills/pull-work/SKILL.md +12 -0
- package/dist/pi/kits/builder/skills/review-work/SKILL.md +11 -0
- package/dist/pi/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +19 -20
- package/dist/pi/kits/veritas-governance/assets/starter-hooks/githooks/post-commit +13 -0
- package/dist/pi/kits/veritas-governance/assets/starter-hooks/githooks/pre-push +13 -0
- package/dist/pi/kits/veritas-governance/assets/starter-standards/veritas/GOVERNANCE.md +23 -0
- package/dist/pi/kits/veritas-governance/assets/starter-standards/veritas/README.md +58 -0
- package/dist/pi/kits/veritas-governance/assets/starter-standards/veritas/authority/default.authority-settings.json +30 -0
- package/dist/pi/kits/veritas-governance/assets/starter-standards/veritas/repo-map.json +115 -0
- package/dist/pi/kits/veritas-governance/assets/starter-standards/veritas/repo-standards/default.repo-standards.json +54 -0
- package/dist/pi/kits/veritas-governance/assets/starter-standards/veritas.claims.json +179 -0
- package/dist/pi/kits/veritas-governance/docs/README.md +141 -10
- package/dist/pi/kits/veritas-governance/fixtures/standards-authoring/approved.trust-bundle.json +74 -0
- package/dist/pi/kits/veritas-governance/fixtures/standards-authoring/not-approved.trust-bundle.json +74 -0
- package/dist/pi/kits/veritas-governance/flows/standards-authoring.flow.json +35 -0
- package/dist/pi/kits/veritas-governance/kit.json +65 -0
- package/dist/pi/kits/veritas-governance/skills/consult-standards/SKILL.md +73 -0
- package/dist/pi/kits/veritas-governance/skills/standards-authoring/SKILL.md +87 -0
- package/dist/pi/schemas/backlog-provider-settings.schema.json +1 -1
- package/dist/pi/schemas/workflow-waves.schema.json +347 -0
- package/dist/pi/scripts/check-layer-boundary.mjs +98 -0
- package/dist/pi/scripts/hooks/claude-telemetry-hook.js +6 -0
- package/dist/pi/scripts/hooks/lib/liveness-heartbeat.js +42 -1
- package/dist/pi/scripts/hooks/lib/liveness-write.js +109 -9
- package/dist/pi/scripts/liveness/relay.sh +23 -11
- package/dist/pi/scripts/telemetry/lib/config.sh +29 -0
- package/docs/adr/0023-kit-provisioning.md +47 -0
- package/docs/adr/index.md +1 -0
- package/docs/architecture-engine-and-kits.md +17 -0
- package/docs/context-map.md +3 -0
- package/docs/decisions/backlog-readiness-source.md +89 -0
- package/docs/decisions/index.md +1 -0
- package/docs/developer-architecture.md +3 -3
- package/docs/flow-kit-repository-contract.md +34 -3
- package/docs/kit-authoring-guide.md +1 -1
- package/docs/veritas-integration.md +12 -0
- package/evals/ci/run-baseline.sh +4 -0
- package/evals/integration/test_kit_provisioning.sh +112 -0
- package/evals/integration/test_liveness_console_relay.sh +91 -1
- package/evals/integration/test_liveness_heartbeat.sh +66 -0
- package/evals/integration/test_pull_work_provider.sh +18 -0
- package/evals/integration/test_veritas_governance_kit.sh +256 -0
- package/evals/integration/test_workflow_artifacts.sh +257 -0
- package/evals/static/test_package.sh +6 -0
- package/evals/static/test_workflow_skills.sh +16 -0
- package/kits/builder/flows/publish-learn.flow.json +9 -1
- package/kits/builder/skills/execute-plan/SKILL.md +4 -3
- package/kits/builder/skills/pull-work/SKILL.md +12 -0
- package/kits/builder/skills/review-work/SKILL.md +11 -0
- package/kits/veritas-governance/adapter/readiness-to-trust-bundle.mjs +19 -20
- package/kits/veritas-governance/assets/starter-hooks/githooks/post-commit +13 -0
- package/kits/veritas-governance/assets/starter-hooks/githooks/pre-push +13 -0
- package/kits/veritas-governance/assets/starter-standards/veritas/GOVERNANCE.md +23 -0
- package/kits/veritas-governance/assets/starter-standards/veritas/README.md +58 -0
- package/kits/veritas-governance/assets/starter-standards/veritas/authority/default.authority-settings.json +30 -0
- package/kits/veritas-governance/assets/starter-standards/veritas/repo-map.json +115 -0
- package/kits/veritas-governance/assets/starter-standards/veritas/repo-standards/default.repo-standards.json +54 -0
- package/kits/veritas-governance/assets/starter-standards/veritas.claims.json +179 -0
- package/kits/veritas-governance/docs/README.md +141 -10
- package/kits/veritas-governance/fixtures/standards-authoring/approved.trust-bundle.json +74 -0
- package/kits/veritas-governance/fixtures/standards-authoring/not-approved.trust-bundle.json +74 -0
- package/kits/veritas-governance/flows/standards-authoring.flow.json +35 -0
- package/kits/veritas-governance/kit.json +65 -0
- package/kits/veritas-governance/skills/consult-standards/SKILL.md +73 -0
- package/kits/veritas-governance/skills/standards-authoring/SKILL.md +87 -0
- package/package.json +2 -1
- package/schemas/backlog-provider-settings.schema.json +1 -1
- package/schemas/workflow-waves.schema.json +347 -0
- package/scripts/check-layer-boundary.mjs +98 -0
- package/scripts/hooks/claude-telemetry-hook.js +6 -0
- package/scripts/hooks/lib/liveness-heartbeat.js +42 -1
- package/scripts/hooks/lib/liveness-write.js +109 -9
- package/scripts/liveness/relay.sh +23 -11
- package/scripts/telemetry/lib/config.sh +29 -0
- package/src/cli/builder-flow-runtime.test.mjs +86 -0
- package/src/cli/flow-resolver-composition.test.mjs +20 -1
- package/src/cli/init.ts +31 -3
- package/src/cli/kit-metadata-security.test.mjs +163 -1
- package/src/cli/kit-provisioning.test.mjs +122 -0
- package/src/cli/kit.ts +83 -2
- package/src/cli/pull-work-provider.ts +7 -1
- package/src/cli/validate-waves.test.mjs +134 -0
- package/src/cli/validate-workflow-artifacts.ts +47 -0
- package/src/cli/workflow.ts +7 -1
- package/src/flow-kit/provision.ts +118 -0
- package/src/flow-kit/validate.ts +233 -10
- package/src/runtime-adapters.ts +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Trigger-Spawned Agent Run Guards Contract
|
|
2
|
+
|
|
3
|
+
> Read [`context/contracts/standing-directives.md`](standing-directives.md) — ratified owner directives that override default engineering conservatism.
|
|
4
|
+
|
|
5
|
+
Any kit, hook, or integration that spawns an agent run from a trigger MUST declare, before it ships, how that spawn surface is guarded against runaway amplification. A trigger with no dedup, cooldown, cap, or concurrency guard converts one flapping upstream signal into an unbounded stream of agent runs — each of which may hold permissions, spend budget, and mutate state without a human turn in the loop. A 2026-07 field near-miss made this concrete: an on-failure escalation wired without these guards would have spawned a continuous stream of permission-skipping agent runs from a single flapping check. This contract makes the guard requirements standing suite policy so the next trigger-driven feature inherits them by default instead of rediscovering them in an incident.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
A **trigger-spawned agent run** is any agent execution started by an event rather than by a human request in an interactive session: a check or CI failure escalation, a schedule firing, a watcher or automation trigger, or any other perimeter event that launches headless agent work.
|
|
10
|
+
|
|
11
|
+
Out of scope:
|
|
12
|
+
|
|
13
|
+
- `workflow_triggers` in kit.json — in-session workflow steering for an already-running interactive session. Steering routes an existing session; it does not spawn a run.
|
|
14
|
+
- Subagent delegation inside an active, human-initiated session — the session itself is the supervision boundary.
|
|
15
|
+
|
|
16
|
+
No flow-agents hook spawns agent runs today (all four hook policy classes are advisory/steering), but the suite's perimeter already does, and in-repo consumers are planned (see "Future consumers" below). The contract applies the moment a surface CAN spawn a run, not the moment it misbehaves.
|
|
17
|
+
|
|
18
|
+
## Required Guard Declarations
|
|
19
|
+
|
|
20
|
+
Every trigger surface that spawns agent runs declares all four guards, with explicit values. The defaults below are the starting point when the feature has no measured reason to differ; declaring a weaker value than the default requires a recorded rationale on the owning work item.
|
|
21
|
+
|
|
22
|
+
| Guard | Field | Meaning | Default |
|
|
23
|
+
| --- | --- | --- | --- |
|
|
24
|
+
| Dedup | `dedup_key` | The trigger-signature expression used to suppress duplicate spawns while an equivalent run is pending or was recently spawned. For failure escalations: subject plus normalized failure signature (e.g. `check-name+failure-signature`), so a repeat of the same failure does not spawn a second run. | subject + trigger signature |
|
|
25
|
+
| Cooldown | `cooldown_seconds` | Minimum seconds between spawns for the same subject, regardless of signature churn. | `900` |
|
|
26
|
+
| Daily cap | `daily_cap` | Maximum spawns per trigger surface per day; the surface goes quiet (with a visible, non-silent skip) once reached. | `20` |
|
|
27
|
+
| Concurrency lock | `max_concurrent` | Maximum runs from this surface allowed to exist simultaneously, expressed as a limit; `1` is a mutual-exclusion lock. | `1` |
|
|
28
|
+
|
|
29
|
+
A skipped spawn (dedup hit, cooldown window, cap reached, lock held) must be observable — logged or counted, never silently dropped — so a guard absorbing real signal is diagnosable.
|
|
30
|
+
|
|
31
|
+
## Kit Declaration: `agent_spawn_triggers`
|
|
32
|
+
|
|
33
|
+
Kits declare agent-spawning trigger surfaces in kit.json through the optional `agent_spawn_triggers` extension field (Flow Agents extension-layer metadata, like `dependencies` and `workflow_triggers`):
|
|
34
|
+
|
|
35
|
+
```jsonc
|
|
36
|
+
"agent_spawn_triggers": [
|
|
37
|
+
{
|
|
38
|
+
"id": "on-check-failure",
|
|
39
|
+
"description": "Escalates failing checks to a headless agent run.",
|
|
40
|
+
"spawns_agent_runs": true,
|
|
41
|
+
"guards": {
|
|
42
|
+
"dedup_key": "check-name+failure-signature",
|
|
43
|
+
"cooldown_seconds": 900,
|
|
44
|
+
"daily_cap": 20,
|
|
45
|
+
"max_concurrent": 1
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- `id`: unique identifier (`^[a-z0-9]+(?:[.-][a-z0-9]+)*$`).
|
|
52
|
+
- `description`: non-empty human-readable purpose of the surface.
|
|
53
|
+
- `spawns_agent_runs`: required boolean. `false` documents a trigger surface that fires without spawning agent runs (e.g. notification-only); such entries need no guards.
|
|
54
|
+
- `guards`: required-complete when `spawns_agent_runs` is `true` — all four fields, `dedup_key` a non-empty string, the three numeric guards integers >= 1.
|
|
55
|
+
|
|
56
|
+
Hooks and integrations that live outside a kit manifest declare the same four guards, with the same vocabulary, in their own configuration or design artifact.
|
|
57
|
+
|
|
58
|
+
## Enforcement
|
|
59
|
+
|
|
60
|
+
Kit repository validation emits a **WARNING** (not an error) when an `agent_spawn_triggers` entry has `spawns_agent_runs: true` and missing or incomplete `guards`. Malformed declarations (wrong types, duplicate ids, non-positive limits) are shape ERRORS like every other extension field.
|
|
61
|
+
|
|
62
|
+
Warning-level enforcement is deliberate, declaration-first rollout: the declaration is new and optional, and no in-repo surface spawns runs yet. When the first in-repo trigger-spawned runner ships, its surface must declare complete guards, and enforcement for spawning surfaces hardens with it (validation error and/or runtime refusal). Runtime guard enforcement is explicitly NOT part of this contract's first iteration — no spawning or guard machinery exists in this repo yet, and per standing directive 4 (standalone-first), the enforcement runtime belongs with the first real spawner.
|
|
63
|
+
|
|
64
|
+
## Conforming Examples
|
|
65
|
+
|
|
66
|
+
- **kontourai/plumb#1** — check-failure escalation to a headless agent with per-subject cooldown, failure-signature dedup, and a max-concurrent cap: the direct antecedent of this contract's `cooldown_seconds`, `dedup_key`, and `max_concurrent` guards.
|
|
67
|
+
- **ephemeris** — trigger firing that is coalesced per claim, idempotent, and rate-limited: dedup and cap expressed as coalescing plus rate limits, showing the guards generalize beyond failure escalation.
|
|
68
|
+
|
|
69
|
+
Both are cited as reference implementations of the guard vocabulary; consult their current sources when implementing a new surface.
|
|
70
|
+
|
|
71
|
+
## Future Consumers
|
|
72
|
+
|
|
73
|
+
The autonomy epic's background-review fork — kontourai/flow-agents#252, under epic #250 — will spawn agent runs from a trigger. Any implementation of #252 MUST declare its guard configuration under this contract (an `agent_spawn_triggers` entry with complete `guards`, or the equivalent declaration in its owning design artifact) before it ships.
|
|
@@ -109,6 +109,13 @@ FLOW_AGENTS_CONSOLE_ECONOMICS_ENDPOINT_URL="${FLOW_AGENTS_CONSOLE_ECONOMICS_ENDP
|
|
|
109
109
|
# Set (non-empty) only when the config file carries an explicit console_economics_relay key —
|
|
110
110
|
# distinguishes "operator said 0/1" from "key absent" for the default-on rule below.
|
|
111
111
|
console_economics_relay_raw=""
|
|
112
|
+
# Liveness relay (#567): same conf-driven, opt-out-not-silent-off shape as economics (#469) so an
|
|
113
|
+
# operator enables the hosted liveness mirror via console_liveness_relay=1 in the conf, NOT an env
|
|
114
|
+
# var/.profile. A caller-pre-set env var is the starting point; the config key overrides it; absent
|
|
115
|
+
# any key the default-on rule below turns it on once a console telemetry sink resolves.
|
|
116
|
+
FLOW_AGENTS_CONSOLE_LIVENESS_RELAY="${FLOW_AGENTS_CONSOLE_LIVENESS_RELAY:-}"
|
|
117
|
+
FLOW_AGENTS_CONSOLE_LIVENESS_ENDPOINT_URL="${FLOW_AGENTS_CONSOLE_LIVENESS_ENDPOINT_URL:-}"
|
|
118
|
+
console_liveness_relay_raw=""
|
|
112
119
|
# Pricing registry source (consumed by lib/pricing.sh). Explicit file/URL win;
|
|
113
120
|
# otherwise lib/pricing.sh uses the bundled pricing.json offline.
|
|
114
121
|
TELEMETRY_PRICING_FILE="${TELEMETRY_PRICING_FILE:-${FLOW_AGENTS_PRICING_FILE:-}}"
|
|
@@ -164,6 +171,17 @@ if [[ -f "$TELEMETRY_CONFIG_FILE" ]]; then
|
|
|
164
171
|
esac
|
|
165
172
|
;;
|
|
166
173
|
console_economics_endpoint_url) FLOW_AGENTS_CONSOLE_ECONOMICS_ENDPOINT_URL="$value" ;;
|
|
174
|
+
console_liveness_relay)
|
|
175
|
+
case "$(echo "$value" | tr '[:upper:]' '[:lower:]')" in
|
|
176
|
+
1|true|yes|on) console_liveness_relay_raw="1" ;;
|
|
177
|
+
0|false|no|off) console_liveness_relay_raw="0" ;;
|
|
178
|
+
*)
|
|
179
|
+
printf 'warning: config.sh: unrecognized console_liveness_relay value %q; treating as off\n' "$value" >&2
|
|
180
|
+
console_liveness_relay_raw="$value"
|
|
181
|
+
;;
|
|
182
|
+
esac
|
|
183
|
+
;;
|
|
184
|
+
console_liveness_endpoint_url) FLOW_AGENTS_CONSOLE_LIVENESS_ENDPOINT_URL="$value" ;;
|
|
167
185
|
console_pricing_url) TELEMETRY_PRICING_URL="$value" ;;
|
|
168
186
|
pricing_url) TELEMETRY_PRICING_URL="$value" ;;
|
|
169
187
|
pricing_file) TELEMETRY_PRICING_FILE="$value" ;;
|
|
@@ -186,6 +204,17 @@ elif [[ -z "$FLOW_AGENTS_CONSOLE_ECONOMICS_RELAY" \
|
|
|
186
204
|
FLOW_AGENTS_CONSOLE_ECONOMICS_RELAY=1
|
|
187
205
|
fi
|
|
188
206
|
|
|
207
|
+
# Liveness relay default-on rule (#567), identical shape to economics above: an explicit
|
|
208
|
+
# console_liveness_relay config key always wins; otherwise, once a console telemetry sink resolves,
|
|
209
|
+
# the relay defaults ON unless a caller already pre-set FLOW_AGENTS_CONSOLE_LIVENESS_RELAY in the
|
|
210
|
+
# environment. relay.sh's own opt-in gate reads this exact variable.
|
|
211
|
+
if [[ -n "$console_liveness_relay_raw" ]]; then
|
|
212
|
+
FLOW_AGENTS_CONSOLE_LIVENESS_RELAY="$console_liveness_relay_raw"
|
|
213
|
+
elif [[ -z "$FLOW_AGENTS_CONSOLE_LIVENESS_RELAY" \
|
|
214
|
+
&& ( -n "${CONSOLE_TELEMETRY_URL:-}" || -n "${CONSOLE_TELEMETRY_ENDPOINT_URL:-}" ) ]]; then
|
|
215
|
+
FLOW_AGENTS_CONSOLE_LIVENESS_RELAY=1
|
|
216
|
+
fi
|
|
217
|
+
|
|
189
218
|
# Pricing URL is explicit-only (env or config). Do not derive the console
|
|
190
219
|
# pricing endpoint by default; the bundled registry is the reliable offline floor.
|
|
191
220
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"issue_state": "open",
|
|
42
42
|
"include_labels": [],
|
|
43
43
|
"ready_statuses": ["ready"],
|
|
44
|
-
"exclude_statuses": ["in_progress", "blocked", "review", "verification", "done"]
|
|
44
|
+
"exclude_statuses": ["triage", "in_progress", "blocked", "review", "verification", "done"]
|
|
45
45
|
},
|
|
46
46
|
"wip_policy": {
|
|
47
47
|
"prefer_finishing_active_work": true,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"issue_state": "open",
|
|
37
37
|
"include_labels": [],
|
|
38
38
|
"ready_statuses": ["ready"],
|
|
39
|
-
"exclude_statuses": ["in_progress", "blocked", "review", "verification", "done"]
|
|
39
|
+
"exclude_statuses": ["triage", "in_progress", "blocked", "review", "verification", "done"]
|
|
40
40
|
},
|
|
41
41
|
"wip_policy": {
|
|
42
42
|
"prefer_finishing_active_work": true,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ADR 0023: Declarative Kit Provisioning"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# ADR 0023: Declarative Kit Provisioning
|
|
6
|
+
|
|
7
|
+
**Date:** 2026-07-16
|
|
8
|
+
**Status:** Accepted (owner-ratified Option A in flow-agents#647)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
Kits sometimes need to supply repository-owned configuration or policy files in addition to runtime projections. The motivating `veritas-governance` follow-up needs this capability, but embedding kit-specific copy logic in Flow Agents would violate the kit boundary. Runtime activation is also the wrong mechanism: its projection directory is regenerable adapter state, while these files must become normal files in the consumer repository.
|
|
15
|
+
|
|
16
|
+
## Decision
|
|
17
|
+
|
|
18
|
+
A kit may declare a `provisions` list in `kit.json`. Each entry is inert data naming an id, a source file inside the kit, and a consumer-repository-relative target. Provision declarations are never executed.
|
|
19
|
+
|
|
20
|
+
The Flow Agents engine performs agent-blind file copying through an explicit `kit provision` operation. It validates source and target containment, preflights every destination, and creates files only when no declared destination already exists. An explicit `--force` option may replace declared destination files; the default never silently overwrites an anchor-owned or consumer-owned file. `--dry-run` reports the plan without writing.
|
|
21
|
+
|
|
22
|
+
`flow-agents init --activate-kit` invokes the same engine after activation with create-only semantics. Existing destinations are reported as skipped warnings so init remains safe to rerun. Provisioning remains separate from runtime activation and its projection directory.
|
|
23
|
+
|
|
24
|
+
The engine records successful copies under `.kontourai/flow-agents/provisions/<kit-id>.json`. This manifest is bookkeeping and may be replaced on a later successful provisioning operation. Enforcement policy and ownership of protected paths remain anchor-side; a kit declaration does not grant permission to overwrite them.
|
|
25
|
+
|
|
26
|
+
## Consequences
|
|
27
|
+
|
|
28
|
+
- Kits can ship repository files without executable installers or kit-specific engine behavior.
|
|
29
|
+
- Create-only defaults preserve consumer and anchor ownership; replacement requires an explicit user operation.
|
|
30
|
+
- Provisioned files belong to the consumer repository once written. Uninstalling or deactivating a kit never removes or reverts them.
|
|
31
|
+
- Runtime adapters continue to activate only their supported projection assets and report provisions as explicitly skipped.
|
|
32
|
+
- Consumers that need stronger protected-path policy enforce it at their anchor; the generic engine remains deliberately dumb and kit-neutral.
|
|
33
|
+
|
|
34
|
+
## Accepted residuals
|
|
35
|
+
|
|
36
|
+
- **Copy is best-effort against concurrent interposition (both ends).** The checks and the copy
|
|
37
|
+
are separate steps (check-then-act): a file created into a declared destination between the
|
|
38
|
+
conflict preflight and the write can still be overwritten, and a source re-pointed to a link
|
|
39
|
+
between its containment check and its read could resolve elsewhere. Provisioning targets a
|
|
40
|
+
developer/CI working tree, not a hostile multi-writer path, so both TOCTOU windows are accepted
|
|
41
|
+
rather than closed with exclusive-create / open-then-fstat plumbing. The static guarantees are
|
|
42
|
+
enforced up front: reserved-directory (`.git`, the provision manifest namespace), source and
|
|
43
|
+
destination containment (link-resolved), and case-fold collision rejection; concurrent
|
|
44
|
+
interposition on either end is out of scope.
|
|
45
|
+
- **Target case-folding assumes the common single-case-family repo.** Collision and reserved-path
|
|
46
|
+
checks case-fold targets so case-insensitive filesystems are safe; a genuinely case-sensitive
|
|
47
|
+
repo that intends two targets differing only in case is rejected as a portability hazard.
|
|
@@ -32,3 +32,4 @@ Numbered ADRs below are FROZEN immutable history (see the banner on each file).
|
|
|
32
32
|
| 0020 | Trust-Reconcile Manifest, Claim Classification, and Waivers | unknown | [0020-trust-reconcile-manifest-and-claim-classification.md](./0020-trust-reconcile-manifest-and-claim-classification.md) |
|
|
33
33
|
| 0021 | Assignment Leases and Stale-Claim Takeover | 2026-07-02 | [0021-assignment-leases-and-stale-claim-takeover.md](./0021-assignment-leases-and-stale-claim-takeover.md) |
|
|
34
34
|
| 0022 | Fail-Closed Delivery Reconciliation with Governed Exemptions | 2026-07-02 | [0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md](./0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md) |
|
|
35
|
+
| 0023 | Declarative Kit Provisioning | 2026-07-16 | [0023-kit-provisioning.md](./0023-kit-provisioning.md) |
|
|
@@ -102,9 +102,26 @@ Kit trust is orthogonal to engine privilege. A marketplace may call a kit offici
|
|
|
102
102
|
|
|
103
103
|
The answer is determined by validation, activation, and gate evidence, not by a privileged kit list.
|
|
104
104
|
|
|
105
|
+
## The Portfolio Layer Doctrine
|
|
106
|
+
|
|
107
|
+
The engine/kits split here is Flow Agents' instance of the portfolio-wide **Layer Doctrine**
|
|
108
|
+
([surface/docs/architecture/portfolio-layer-doctrine.md](https://github.com/kontourai/surface/blob/main/docs/architecture/portfolio-layer-doctrine.md)):
|
|
109
|
+
dependency direction is one-way up the stack (open trust format → building-block tools → Surface →
|
|
110
|
+
products), and no layer reaches sideways into a peer. A product engine (e.g. `@kontourai/veritas`)
|
|
111
|
+
never depends on the platform, and a **kit consumes an engine only through its CLI + recorded
|
|
112
|
+
artifacts, never as an npm library import** — the whole point of the manifest/catalog model above.
|
|
113
|
+
Both edges are now enforced executably: veritas-side by `check-no-flow-agents-dep.mjs` (the engine
|
|
114
|
+
declares no flow-agents dependency) and here by [`scripts/check-layer-boundary.mjs`](../scripts/check-layer-boundary.mjs)
|
|
115
|
+
(no kit imports the veritas engine as a library). See veritas's
|
|
116
|
+
[Engine / Surface Seam](https://github.com/kontourai/veritas/blob/main/docs/architecture/engine-surface-seam.md)
|
|
117
|
+
for the canonical engine-vs-kit capability inventory that the Veritas Governance Kit row above
|
|
118
|
+
builds on.
|
|
119
|
+
|
|
105
120
|
## Related docs
|
|
106
121
|
|
|
107
122
|
- [Flow Kit Authoring Guide](kit-authoring-guide.md)
|
|
108
123
|
- [Flow Kit Repository Contract](flow-kit-repository-contract.md)
|
|
109
124
|
- [Runtime Hook Surface spec](spec/runtime-hook-surface.md)
|
|
110
125
|
- [Verifiable Trust](verifiable-trust.md)
|
|
126
|
+
- [Veritas Engine / Surface Seam](https://github.com/kontourai/veritas/blob/main/docs/architecture/engine-surface-seam.md) — how `@kontourai/veritas` splits into an engine library + the kit-owned product surface
|
|
127
|
+
- [Portfolio Layer Doctrine](https://github.com/kontourai/surface/blob/main/docs/architecture/portfolio-layer-doctrine.md)
|
|
@@ -71,6 +71,7 @@ Machine-readable workflow state lives beside Markdown artifacts in `.kontourai/f
|
|
|
71
71
|
| workflow-learning.schema.json | Flow Agents Workflow Learning | https://flow-agents.dev/schemas/workflow-learning.schema.json |
|
|
72
72
|
| workflow-release.schema.json | Flow Agents Workflow Release Readiness | https://flow-agents.dev/schemas/workflow-release.schema.json |
|
|
73
73
|
| workflow-state.schema.json | Flow Agents Workflow State | https://flow-agents.dev/schemas/workflow-state.schema.json |
|
|
74
|
+
| workflow-waves.schema.json | Flow Agents Workflow Waves | https://flow-agents.dev/schemas/workflow-waves.schema.json |
|
|
74
75
|
|
|
75
76
|
Primary tools: public `flow-agents workflow`, `trust.bundle`, artifact validation, `scripts/hooks/stop-goal-fit.js`, and `scripts/hooks/workflow-steering.js`. The package-internal writer is not an agent or consumer interface.
|
|
76
77
|
|
|
@@ -100,6 +101,7 @@ Primary tools: public `flow-agents workflow`, `trust.bundle`, artifact validatio
|
|
|
100
101
|
| agentic-engineering | skills/agentic-engineering/SKILL.md | Eval-first execution, task decomposition, and cost-aware model routing for AI-driven development workflows. |
|
|
101
102
|
| browser-test | skills/browser-test/SKILL.md | Headless browser automation via Playwright — screenshots, accessibility checks, form filling, UI testing, DOM inspection. |
|
|
102
103
|
| builder-shape | kits/builder/skills/builder-shape/SKILL.md | 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. |
|
|
104
|
+
| consult-standards | kits/veritas-governance/skills/consult-standards/SKILL.md | Get just-in-time Veritas governance guidance for a file or work area before editing it: run `veritas explain --file <path>` (or `--work-area <id>`) to see the governance excerpt, the Repo Standards rules that apply, their do/don't/exampl... |
|
|
103
105
|
| dependency-update | skills/dependency-update/SKILL.md | Analyze and upgrade project dependencies — latest versions, security vulnerabilities, actionable update plan across all package managers. |
|
|
104
106
|
| design-probe | kits/builder/skills/design-probe/SKILL.md | Generic one-question-at-a-time design probe for turning unclear goals, designs, and handoffs into shared understanding. |
|
|
105
107
|
| eval-rebuild | skills/eval-rebuild/SKILL.md | Project-specific build and install commands for the eval feedback loop. Injected into eval-builder agent. Replace this skill for different build systems. |
|
|
@@ -108,6 +110,7 @@ Primary tools: public `flow-agents workflow`, `trust.bundle`, artifact validatio
|
|
|
108
110
|
| knowledge-capture | kits/knowledge/skills/knowledge-capture/SKILL.md | Save durable knowledge, lightweight pointers, user corrections, decisions, lessons, relationship context, or source references into the knowledge base. Use when the user says save, remember, capture, file this, bookmark context, or when... |
|
|
109
111
|
| pickup-probe | kits/builder/skills/pickup-probe/SKILL.md | Provider-grounded pickup probe used at the Builder design-probe step before planning. |
|
|
110
112
|
| search-first | skills/search-first/SKILL.md | Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. |
|
|
113
|
+
| standards-authoring | kits/veritas-governance/skills/standards-authoring/SKILL.md | Author or update a repo's Veritas Repo Standards through the kit's standards-authoring flow: run `veritas init --explore`/`--guided` to derive a proposed starter set (project name, repo-shape-adaptive Repo Map nodes, evidence-check infer... |
|
|
111
114
|
|
|
112
115
|
## Agents
|
|
113
116
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: current
|
|
3
|
+
subject: Backlog Readiness Source
|
|
4
|
+
decided: 2026-07-16
|
|
5
|
+
evidence:
|
|
6
|
+
- kind: issue
|
|
7
|
+
ref: https://github.com/kontourai/flow-agents/issues/441
|
|
8
|
+
- kind: pr
|
|
9
|
+
ref: https://github.com/kontourai/flow-agents/pull/449
|
|
10
|
+
- kind: commit
|
|
11
|
+
ref: c19c3e64a214be7d5b2585004fd3c4f2597781e5
|
|
12
|
+
- kind: url
|
|
13
|
+
ref: https://claude.ai/code/session_01SmQYjiUo1aDSXgEKyiye7M
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Backlog Readiness Source
|
|
17
|
+
|
|
18
|
+
Which signal marks a Work Item intentionally ready for pickup, and what
|
|
19
|
+
`pull-work` is allowed to do when that signal yields nothing.
|
|
20
|
+
|
|
21
|
+
## Decision
|
|
22
|
+
|
|
23
|
+
- **The org project board is the readiness source.** The configured
|
|
24
|
+
BoardProvider — org GitHub Project `kontourai/1` ("Flow Agents Builder
|
|
25
|
+
Platform") — carries readiness as board Status. `ready_statuses=["ready"]`
|
|
26
|
+
is the pickup filter; the board's `Priority` field ranks the cross-repo
|
|
27
|
+
ready queue.
|
|
28
|
+
- **Triage is the automated intake status.** Every new `kontourai/*` issue is
|
|
29
|
+
added to the board with Status=Triage by the shared reusable workflow
|
|
30
|
+
(`kontourai/.github` `add-issue-to-project.yml`, called per-repo from
|
|
31
|
+
`.github/workflows/add-to-project.yml`); closing an issue moves it to Done.
|
|
32
|
+
Nothing reaches Ready automatically.
|
|
33
|
+
- **The Triage → Ready move is the intentionality act.** Moving an item to
|
|
34
|
+
Ready (and setting Priority) is the triage responsibility that makes work
|
|
35
|
+
eligible for agent pickup. This is a deliberate human/triage-pass decision,
|
|
36
|
+
not automation.
|
|
37
|
+
- **A configured readiness source that yields nothing is a surfaced warning,
|
|
38
|
+
never a silent fallback.** The board reader emits `zero_ready_items` when
|
|
39
|
+
the configured board produces an empty ready queue (landed with PR #449),
|
|
40
|
+
and the issue-listing path emits `board_provider_bypassed` whenever a
|
|
41
|
+
BoardProvider is configured but issue-level listing is used instead.
|
|
42
|
+
`pull-work` must carry these warnings into its artifact and route to
|
|
43
|
+
triage/intake rather than silently substituting unranked issue listing.
|
|
44
|
+
- The settings contract declares the real board taxonomy: the schema's
|
|
45
|
+
`exclude_statuses` vocabulary includes `triage`, and this repo's settings
|
|
46
|
+
exclude `triage` explicitly. `verification` remains in the schema vocabulary
|
|
47
|
+
for provider-neutral shapes even though this board has no such column.
|
|
48
|
+
|
|
49
|
+
## Evidence basis (re-verified live, 2026-07-16)
|
|
50
|
+
|
|
51
|
+
Issue #441 was shaped on 2026-07-06 evidence that the board was dead (15
|
|
52
|
+
items, all Done, no automation). That premise is now false:
|
|
53
|
+
|
|
54
|
+
- The kontourai org has exactly **one** ProjectV2: `kontourai/1`, open, **468
|
|
55
|
+
items** (306 Triage / 14 Ready / 148 Done) spanning 13 repos; 169 of 171
|
|
56
|
+
open flow-agents issues are on it.
|
|
57
|
+
- The auto-add workflow targets exactly this project
|
|
58
|
+
(`PVT_kwDOEJYCKs4BYzgP`), Status field options: Triage, Ready, In Progress,
|
|
59
|
+
Blocked, Review, Done.
|
|
60
|
+
- A live board-driven `pull-work` read returns a **14-item priority-ranked
|
|
61
|
+
cross-repo ready queue** with zero warnings and zero intake gaps.
|
|
62
|
+
- The agent-path `gh` token carries the `project` scope, so the read:project
|
|
63
|
+
friction recorded in #441 no longer holds.
|
|
64
|
+
|
|
65
|
+
## Rejected alternative
|
|
66
|
+
|
|
67
|
+
**Label-based readiness (per-repo `ready`/`blocked`/`in-progress` labels).**
|
|
68
|
+
Recommended by #441 when the board was dead, because it needed no board
|
|
69
|
+
maintenance and no extra token scope. Both advantages evaporated once the
|
|
70
|
+
auto-add automation went live org-wide and the agent token gained `project`
|
|
71
|
+
scope — and labels cannot express cross-repo priority ranking without
|
|
72
|
+
inventing a parallel convention per repo. Revisit trigger: if the auto-add
|
|
73
|
+
workflow or `project` token scope regresses for agent environments, reopen
|
|
74
|
+
this subject rather than quietly re-deriving readiness from labels.
|
|
75
|
+
|
|
76
|
+
## Follow-ups (owned elsewhere, not absorbed here)
|
|
77
|
+
|
|
78
|
+
- **One-time triage sweep** of the ~306 Triage items (and any open issues
|
|
79
|
+
missing from the board) to assign Ready/Priority intentionally — owned by
|
|
80
|
+
the triage pass in #443 item 2. Not executed with this decision: the Ready
|
|
81
|
+
set was already non-empty (14 items), and bulk-moving 300+ items without
|
|
82
|
+
the accepted mechanism would manufacture fake intentionality.
|
|
83
|
+
- **Board maintenance as flow responsibility** (intake adds, claim → In
|
|
84
|
+
Progress, completion Done assertion): #443.
|
|
85
|
+
- **Doctor board-health checks** (configured-but-unfed board, dead readiness
|
|
86
|
+
source, missing token scope): #443 item 5 / #321. Until that surface
|
|
87
|
+
exists, the warnings live in `pull-work` provider output and the
|
|
88
|
+
`pull-work` skill contract only.
|
|
89
|
+
- **Workspace-scoped pull-work** across multiple repos: #444.
|
|
@@ -12,6 +12,7 @@ Numbered ADRs under `docs/adr/` are frozen history and are not listed here.
|
|
|
12
12
|
| --- | --- | --- |
|
|
13
13
|
| [agent-coordination](./agent-coordination.md) | current | Agent coordination |
|
|
14
14
|
| [anti-gaming-trust-security](./anti-gaming-trust-security.md) | needs-decision | Anti-gaming trust security |
|
|
15
|
+
| [backlog-readiness-source](./backlog-readiness-source.md) | current | Backlog Readiness Source |
|
|
15
16
|
| [context-lifecycle](./context-lifecycle.md) | needs-decision | Context lifecycle |
|
|
16
17
|
| [core-domain-kit-boundary](./core-domain-kit-boundary.md) | needs-decision | Core vs domain kit boundary |
|
|
17
18
|
| [decision-records](./decision-records.md) | current | Decision records |
|
|
@@ -22,7 +22,7 @@ Use these local references when you need more detail:
|
|
|
22
22
|
- [ADR 0005](adr/0005-kubernetes-inspired-resource-contracts.md) records the Kontour Resource Contract direction.
|
|
23
23
|
- [Kontour Resource Contract](kontour-resource-contract.md) documents the shared durable record shape.
|
|
24
24
|
- [Flow Kit Repository Contract](flow-kit-repository-contract.md) documents local kit validation and activation boundaries.
|
|
25
|
-
- [Veritas Integration Boundary](veritas-integration.md)
|
|
25
|
+
- [Veritas Integration Boundary](veritas-integration.md) records the early integration rationale; the shipped path is the **Veritas Governance Kit** (`kits/veritas-governance`) — see its [README](../kits/veritas-governance/docs/README.md) and [Engine and kits](architecture-engine-and-kits.md).
|
|
26
26
|
|
|
27
27
|
## Coordination Map
|
|
28
28
|
|
|
@@ -63,10 +63,10 @@ flowchart LR
|
|
|
63
63
|
| Flow Agents | Agent-facing workflow bundles, skills, sidecars, artifact contracts, evals, runtime export, provider wiring, and local-first docs. | Does not become the core workflow engine for all Kontour products and should not copy product-native rule models into this repo. |
|
|
64
64
|
| Flow | Generic workflow semantics, Flow Definitions, gate transitions, attempts, route-back behavior, Flow Runs, and Flow Reports. | Flow Agents may consume or project Flow concepts, but Flow owns enforcement semantics once the Flow surface is available. |
|
|
65
65
|
| Builder Kit | The first Kontour-authored Flow Kit for build work: shaping, pickup probes, planning, execution, review, verification, publication, release readiness, and learning workflows. | Flow Agents validates, installs, activates, and routes Builder Kit assets; it does not make every Builder Kit specialization a core Flow Agents concept. |
|
|
66
|
-
| Veritas |
|
|
66
|
+
| Veritas | The repo-local governance **evaluation engine** (`@kontourai/veritas`): repo standards, authority settings, policy/rule checks, merge-readiness, and native governance reports. | Flow Agents ships the **Veritas Governance Kit** (`kits/veritas-governance`), which owns the repo-installed governance surface (standards scaffold, hooks, authoring, agent guidance) and gates a real `veritas readiness` verdict as a `software-readiness-verdict` trust.bundle claim — wrapping the engine's CLI, never importing or reimplementing it. The kit is optional; the engine it wraps is a standalone library. |
|
|
67
67
|
| Surface | Portable trust state, claims, TrustReports, Trust Snapshots, and user-facing trust surfaces. | Flow Agents can reference Surface-shaped claims for gates, but Surface owns claim models and trust presentation. |
|
|
68
68
|
|
|
69
|
-
**Current state:** Builder Kit is the first proof point for extracting out-of-the-box behavior into normal Flow Kits. Veritas
|
|
69
|
+
**Current state:** Builder Kit is the first proof point for extracting out-of-the-box behavior into normal Flow Kits. Veritas is consumed through the **Veritas Governance Kit** (`kits/veritas-governance`) — an agentless kit that wraps the `veritas` CLI and projects its recorded readiness verdict into a trust.bundle gate; it owns the repo-installed governance surface, while veritas stays the standalone evaluation engine. Surface references appear as a trust-state boundary in local Veritas and Builder Kit evidence docs.
|
|
70
70
|
|
|
71
71
|
**Future direction:** Flow Agents should support more runtime adapters, provider adapters, and Flow Kits without forcing all users to install Builder Kit, Veritas, Surface, or a specific hosted provider.
|
|
72
72
|
|
|
@@ -72,7 +72,7 @@ codex-local
|
|
|
72
72
|
|
|
73
73
|
Unknown adapter ids fail with JSON diagnostics that include the available adapters. No Claude, Kiro, framework, API, npm module extraction, or remote install adapters are implemented by this activation surface.
|
|
74
74
|
|
|
75
|
-
The `codex-local` adapter supports
|
|
75
|
+
The `codex-local` adapter supports assets declared in `flows`, `skills`, and `docs`. It activates the built-in Builder Kit Flow Definitions, including `builder.shape` and `builder.build`, plus supported assets from locally installed kit copies under:
|
|
76
76
|
|
|
77
77
|
```text
|
|
78
78
|
<dest>/kits/local/repositories/<kit-id>/
|
|
@@ -91,13 +91,13 @@ Flow Definition copies are placed under `flows/<kit-id>/<flow-id>.flow.json`, an
|
|
|
91
91
|
The stable activation diagnostics include:
|
|
92
92
|
|
|
93
93
|
- `selected_adapter`: selected adapter id, currently `codex-local`.
|
|
94
|
-
- `supported_asset_classes`: asset classes the selected adapter activates, currently `["flows"]`.
|
|
94
|
+
- `supported_asset_classes`: asset classes the selected adapter activates, currently `["flows", "skills", "docs"]`.
|
|
95
95
|
- `generated_runtime_files`: generated runtime-local files with asset class, path, kit id, asset id, and source path.
|
|
96
96
|
- `skipped_assets`: unsupported declared assets with asset class, path, kit id, asset id when present, and reason.
|
|
97
97
|
- `warnings`: recoverable catalog, registry, or asset discovery problems.
|
|
98
98
|
- `errors`: blocking discovery or activation problems.
|
|
99
99
|
|
|
100
|
-
Declared `skills
|
|
100
|
+
Declared `skills` and `docs` are copied into the runtime projection alongside flows. Declared `adapters`, `evals`, generic `assets`, and `provisions` are diagnostic-only for this adapter. They are skipped with explicit `skipped_assets` entries; they are not copied, installed, invoked, or treated as active runtime behavior.
|
|
101
101
|
|
|
102
102
|
## Root Manifest
|
|
103
103
|
|
|
@@ -122,6 +122,14 @@ Declared `skills`, `docs`, `adapters`, `evals`, and generic `assets` are diagnos
|
|
|
122
122
|
"id": "example.readme",
|
|
123
123
|
"path": "docs/README.md"
|
|
124
124
|
}
|
|
125
|
+
],
|
|
126
|
+
"provisions": [
|
|
127
|
+
{
|
|
128
|
+
"id": "example-kit.editor-policy",
|
|
129
|
+
"path": "provisions/editor-policy.json",
|
|
130
|
+
"target": ".editor/policy.json",
|
|
131
|
+
"description": "Initial repository policy."
|
|
132
|
+
}
|
|
125
133
|
]
|
|
126
134
|
}
|
|
127
135
|
```
|
|
@@ -138,6 +146,29 @@ Optional fields:
|
|
|
138
146
|
- `product_name`: non-empty display name when the product name differs from `name`.
|
|
139
147
|
- `description`: non-empty summary.
|
|
140
148
|
- `skills`, `docs`, `adapters`, `evals`, `assets`: lists of relative asset paths or objects with `id`, `path`, and optional `description`.
|
|
149
|
+
- `provisions`: a list of objects with kit-id-prefixed `id`, source `path`, consumer-repository-relative `target`, and optional `description`.
|
|
150
|
+
|
|
151
|
+
## Repository Provisioning
|
|
152
|
+
|
|
153
|
+
Provision entries declare inert files; kits do not execute installer code. Source paths follow the other extension-asset rules: they must be relative, stay inside the kit directory, and name an existing regular file. Targets must be non-empty relative paths, must not contain traversal segments or resolve outside the consumer repository, must not be inside `.git`, and must be unique after normalization.
|
|
154
|
+
|
|
155
|
+
Provision a catalog kit, an installed-registry kit, or a kit at a direct local path with:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
flow-agents kit provision <kit-id-or-path> [--target <consumer-repo>] [--force] [--dry-run]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
`--target` defaults to the current working directory and must already be a directory. The engine resolves the real path of the deepest existing destination ancestor before writing, so a symlink cannot redirect a provision outside the target repository. It preflights the whole declaration: by default, any existing destination reports every conflict, exits nonzero, and writes none of the provisioned files. `--force` replaces declared destination files. `--dry-run` prints every source-to-target mapping and writes nothing.
|
|
162
|
+
|
|
163
|
+
After a successful non-dry-run copy, Flow Agents writes or replaces this bookkeeping manifest:
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
<target>/.kontourai/flow-agents/provisions/<kit-id>.json
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The schema is `{ schema_version: "1.0", kit_id, kit_hash, provisioned_at, files: [{ id, target }] }`. Provisioned files become consumer-repository content; uninstalling or deactivating the kit does not remove them.
|
|
170
|
+
|
|
171
|
+
When `flow-agents init --activate-kit <id>` successfully activates a selected kit, init invokes the same provisioning engine against its destination with create-only semantics. Existing destinations are reported as skipped warnings and do not fail an init rerun. Provisions never enter the runtime projection directory.
|
|
141
172
|
|
|
142
173
|
## Path Rules
|
|
143
174
|
|
|
@@ -54,7 +54,7 @@ Required fields:
|
|
|
54
54
|
| `name` | Non-empty display name |
|
|
55
55
|
| `flows` | Non-empty list; each entry must have `id` and `path` |
|
|
56
56
|
|
|
57
|
-
Optional fields: `product_name`, `description`, `skills`, `docs`, `adapters`, `evals`, `assets`, `dependencies` (cross-kit dependency declarations; see [Cross-kit dependencies](#cross-kit-dependencies)), `workflow_triggers` (structured workflow steering keyed by engine trigger names such as `implementation-work-detected`), `hook_influence_expectations` (kit-owned required hook-influence fixture expectations), and `first_party` (legacy catalog/marketplace metadata; no runtime privilege). Optional asset fields list relative asset paths or objects with `id`, `path`, and optional `description`. `skills` and `docs` assets are activated by both adapters alongside flows. `adapters`, `evals`, and `assets` appear in diagnostics as `skipped_assets` (see the Activate section for the full per-adapter table).
|
|
57
|
+
Optional fields: `product_name`, `description`, `skills`, `docs`, `adapters`, `evals`, `assets`, `dependencies` (cross-kit dependency declarations; see [Cross-kit dependencies](#cross-kit-dependencies)), `workflow_triggers` (structured workflow steering keyed by engine trigger names such as `implementation-work-detected`), `hook_influence_expectations` (kit-owned required hook-influence fixture expectations), `agent_spawn_triggers` (perimeter trigger surfaces that spawn agent runs plus their dedup/cooldown/cap/concurrency guard config; validation warns when a spawning surface lacks complete guards — see `context/contracts/trigger-guards.md`), and `first_party` (legacy catalog/marketplace metadata; no runtime privilege). Optional asset fields list relative asset paths or objects with `id`, `path`, and optional `description`. `skills` and `docs` assets are activated by both adapters alongside flows. `adapters`, `evals`, and `assets` appear in diagnostics as `skipped_assets` (see the Activate section for the full per-adapter table).
|
|
58
58
|
|
|
59
59
|
## Minimal flow file
|
|
60
60
|
|
|
@@ -4,6 +4,18 @@ title: Veritas Integration Boundary
|
|
|
4
4
|
|
|
5
5
|
# Veritas Integration Boundary
|
|
6
6
|
|
|
7
|
+
> **Superseded by the shipped kit.** This doc records the early rationale for how Flow Agents
|
|
8
|
+
> should integrate Veritas. That decision has since been made and shipped as the **Veritas
|
|
9
|
+
> Governance Kit** (`kits/veritas-governance`): an agentless kit that wraps the `veritas` CLI and
|
|
10
|
+
> projects its recorded readiness verdict into a `software-readiness-verdict` trust.bundle gate,
|
|
11
|
+
> and that owns the repo-installed governance surface (standards scaffold, hooks, standards
|
|
12
|
+
> authoring, just-in-time agent guidance). For the current integration, read the
|
|
13
|
+
> [kit README](../kits/veritas-governance/docs/README.md), [Engine and kits](architecture-engine-and-kits.md),
|
|
14
|
+
> and veritas's [Engine / Surface Seam](https://github.com/kontourai/veritas/blob/main/docs/architecture/engine-surface-seam.md).
|
|
15
|
+
> The boundary principle below still holds — Veritas is the evaluation engine; the kit wraps it,
|
|
16
|
+
> never reimplements it — but the concrete adapter shape described here predates and is replaced by
|
|
17
|
+
> the kit's flows + trust.bundle adapter.
|
|
18
|
+
|
|
7
19
|
Veritas is a strong fit for Flow Agents' development evidence and governance layer, but it should stay optional and adapter-driven.
|
|
8
20
|
|
|
9
21
|
The guiding rule is simple: Flow owns generic process enforcement, Flow Agents projects Flow-backed workflows into agent harnesses, and Veritas owns repo-local standards, authority, and evidence-check semantics.
|
|
@@ -11,6 +11,7 @@ mkdir -p "$LOG_DIR"
|
|
|
11
11
|
|
|
12
12
|
CHECKS=(
|
|
13
13
|
"Content boundary|npm run check:content-boundary --"
|
|
14
|
+
"Layer boundary|npm run check:layer-boundary --"
|
|
14
15
|
"Hachure boundary|npm run check:hachure-boundary --"
|
|
15
16
|
"Decision registry|npm run check:decisions --"
|
|
16
17
|
"Source tree validation|npm run validate:source --"
|
|
@@ -52,6 +53,7 @@ CHECKS=(
|
|
|
52
53
|
"Workflow steering hook integration|bash evals/integration/test_workflow_steering_hook.sh"
|
|
53
54
|
"Hook influence contract integration|bash evals/integration/test_hook_influence_cases.sh"
|
|
54
55
|
"Flow Kit repository integration|bash evals/integration/test_flow_kit_repository.sh"
|
|
56
|
+
"Kit provisioning integration|bash evals/integration/test_kit_provisioning.sh"
|
|
55
57
|
"Runtime adapter activation integration|bash evals/integration/test_runtime_adapter_activation.sh"
|
|
56
58
|
"Bundle install integration|bash evals/integration/test_bundle_install.sh"
|
|
57
59
|
"Published Codex install integration|bash evals/integration/test_published_codex_install.sh"
|
|
@@ -119,6 +121,7 @@ CHECKS=(
|
|
|
119
121
|
|
|
120
122
|
LANE_SOURCE_AND_STATIC=(
|
|
121
123
|
"Content boundary"
|
|
124
|
+
"Layer boundary"
|
|
122
125
|
"Hachure boundary"
|
|
123
126
|
"Decision registry"
|
|
124
127
|
"Source tree validation"
|
|
@@ -169,6 +172,7 @@ LANE_RUNTIME_AND_KIT=(
|
|
|
169
172
|
"Workflow steering hook integration"
|
|
170
173
|
"Hook influence contract integration"
|
|
171
174
|
"Flow Kit repository integration"
|
|
175
|
+
"Kit provisioning integration"
|
|
172
176
|
"Runtime adapter activation integration"
|
|
173
177
|
"Bundle install integration"
|
|
174
178
|
"Published Codex install integration"
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -uo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
5
|
+
source "$ROOT/evals/lib/node.sh"
|
|
6
|
+
|
|
7
|
+
errors=0
|
|
8
|
+
TMP_DIR="$(mktemp -d)"
|
|
9
|
+
trap 'rm -rf "$TMP_DIR"' EXIT
|
|
10
|
+
pass() { echo " ✓ $1"; }
|
|
11
|
+
fail() { echo " ✗ $1"; errors=$((errors + 1)); }
|
|
12
|
+
|
|
13
|
+
CLI="$ROOT/build/src/cli.js"
|
|
14
|
+
KIT="$TMP_DIR/fixture-kit"
|
|
15
|
+
mkdir -p "$KIT/flows" "$KIT/payload"
|
|
16
|
+
cp "$ROOT/kits/release-evidence/flows/release-evidence.flow.json" "$KIT/flows/review.flow.json"
|
|
17
|
+
printf 'alpha from kit\n' >"$KIT/payload/alpha.txt"
|
|
18
|
+
printf 'beta from kit\n' >"$KIT/payload/beta.txt"
|
|
19
|
+
cat >"$KIT/kit.json" <<'JSON'
|
|
20
|
+
{
|
|
21
|
+
"schema_version": "1.0",
|
|
22
|
+
"id": "fixture-kit",
|
|
23
|
+
"name": "Provision Fixture Kit",
|
|
24
|
+
"flows": [{"id":"release-evidence","path":"flows/review.flow.json"}],
|
|
25
|
+
"provisions": [
|
|
26
|
+
{"id":"fixture-kit.alpha","path":"payload/alpha.txt","target":"docs/alpha.txt"},
|
|
27
|
+
{"id":"fixture-kit.beta","path":"payload/beta.txt","target":"config/beta.txt","description":"fixture"}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
JSON
|
|
31
|
+
|
|
32
|
+
echo "=== Kit provisioning integration ==="
|
|
33
|
+
npm run build --silent >/dev/null || { fail "build failed"; exit 1; }
|
|
34
|
+
|
|
35
|
+
if node "$CLI" kit validate "$KIT" >"$TMP_DIR/validate.out" 2>&1; then
|
|
36
|
+
pass "kit validate accepts declared provisions"
|
|
37
|
+
else
|
|
38
|
+
fail "kit validate rejected valid provisions"; sed -n '1,80p' "$TMP_DIR/validate.out"
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
TARGET="$TMP_DIR/consumer"
|
|
42
|
+
mkdir -p "$TARGET"
|
|
43
|
+
if node "$CLI" kit provision "$KIT" --target "$TARGET" >"$TMP_DIR/provision.out" 2>&1 \
|
|
44
|
+
&& cmp -s "$KIT/payload/alpha.txt" "$TARGET/docs/alpha.txt" \
|
|
45
|
+
&& cmp -s "$KIT/payload/beta.txt" "$TARGET/config/beta.txt" \
|
|
46
|
+
&& node -e 'const m=require(process.argv[1]); if(m.schema_version!=="1.0"||m.kit_id!=="fixture-kit"||m.files.length!==2)process.exit(1)' "$TARGET/.kontourai/flow-agents/provisions/fixture-kit.json"; then
|
|
47
|
+
pass "provision copies exact content and writes the two-entry manifest"
|
|
48
|
+
else
|
|
49
|
+
fail "positive provision failed"; sed -n '1,100p' "$TMP_DIR/provision.out"
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
printf 'consumer-owned alpha\n' >"$TARGET/docs/alpha.txt"
|
|
53
|
+
printf 'changed source beta\n' >"$KIT/payload/beta.txt"
|
|
54
|
+
if node "$CLI" kit provision "$KIT" --target "$TARGET" >"$TMP_DIR/conflict.out" 2>&1; then
|
|
55
|
+
fail "create-only conflict unexpectedly succeeded"
|
|
56
|
+
elif [[ "$(cat "$TARGET/docs/alpha.txt")" == "consumer-owned alpha" ]] \
|
|
57
|
+
&& [[ "$(cat "$TARGET/config/beta.txt")" == "beta from kit" ]] \
|
|
58
|
+
&& rg -q 'docs/alpha.txt' "$TMP_DIR/conflict.out" \
|
|
59
|
+
&& rg -q 'config/beta.txt' "$TMP_DIR/conflict.out"; then
|
|
60
|
+
pass "conflict is nonzero, names all conflicts, and overwrites nothing"
|
|
61
|
+
else
|
|
62
|
+
fail "conflict handling was not atomic or diagnostic"; sed -n '1,100p' "$TMP_DIR/conflict.out"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
if node "$CLI" kit provision "$KIT" --target "$TARGET" --force >"$TMP_DIR/force.out" 2>&1 \
|
|
66
|
+
&& cmp -s "$KIT/payload/alpha.txt" "$TARGET/docs/alpha.txt" \
|
|
67
|
+
&& cmp -s "$KIT/payload/beta.txt" "$TARGET/config/beta.txt"; then
|
|
68
|
+
pass "--force overwrites declared destinations"
|
|
69
|
+
else
|
|
70
|
+
fail "--force did not overwrite"; sed -n '1,100p' "$TMP_DIR/force.out"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
DRY="$TMP_DIR/dry-consumer"
|
|
74
|
+
mkdir -p "$DRY"
|
|
75
|
+
if node "$CLI" kit provision "$KIT" --target "$DRY" --dry-run >"$TMP_DIR/dry.out" 2>&1 \
|
|
76
|
+
&& [[ ! -e "$DRY/docs/alpha.txt" && ! -e "$DRY/.kontourai" ]] \
|
|
77
|
+
&& rg -q 'would provision' "$TMP_DIR/dry.out"; then
|
|
78
|
+
pass "--dry-run prints the plan and writes nothing"
|
|
79
|
+
else
|
|
80
|
+
fail "--dry-run wrote state or omitted its plan"; sed -n '1,100p' "$TMP_DIR/dry.out"
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
INVALID="$TMP_DIR/invalid-kit"
|
|
84
|
+
cp -R "$KIT" "$INVALID"
|
|
85
|
+
node -e 'const fs=require("fs"),p=process.argv[1],m=JSON.parse(fs.readFileSync(p));m.provisions[0].target="../escape.txt";m.provisions[1].target="/absolute.txt";fs.writeFileSync(p,JSON.stringify(m,null,2))' "$INVALID/kit.json"
|
|
86
|
+
if node "$CLI" kit validate "$INVALID" >"$TMP_DIR/invalid-validate.out" 2>&1; then
|
|
87
|
+
fail "kit validate accepted traversal and absolute targets"
|
|
88
|
+
elif node "$CLI" kit provision "$INVALID" --target "$DRY" >"$TMP_DIR/invalid-provision.out" 2>&1; then
|
|
89
|
+
fail "kit provision accepted an invalid kit"
|
|
90
|
+
elif rg -q 'traversal' "$TMP_DIR/invalid-validate.out" && rg -q 'must be relative' "$TMP_DIR/invalid-validate.out"; then
|
|
91
|
+
pass "validation and provisioning refuse traversal and absolute targets"
|
|
92
|
+
else
|
|
93
|
+
fail "unsafe target diagnostics were incomplete"; sed -n '1,100p' "$TMP_DIR/invalid-validate.out"
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
HOME_FIXTURE="$TMP_DIR/kit-home"
|
|
97
|
+
mkdir -p "$HOME_FIXTURE"
|
|
98
|
+
if node "$CLI" kit install "$KIT" --dest "$HOME_FIXTURE" >"$TMP_DIR/install.out" 2>&1 \
|
|
99
|
+
&& node "$CLI" kit activate --dest "$HOME_FIXTURE" --source-root "$ROOT" >"$TMP_DIR/activate.out" 2>&1 \
|
|
100
|
+
&& node -e 'const r=JSON.parse(require("fs").readFileSync(process.argv[1],"utf8"));if(!r.skipped_assets.some(x=>x.asset_class==="provisions"&&/not activated/.test(x.reason)))process.exit(1)' "$TMP_DIR/activate.out"; then
|
|
101
|
+
pass "codex-local activation explicitly skips provisions"
|
|
102
|
+
else
|
|
103
|
+
fail "activation did not report provisions as skipped"; sed -n '1,120p' "$TMP_DIR/activate.out"
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
echo ""
|
|
107
|
+
if [[ "$errors" -eq 0 ]]; then
|
|
108
|
+
echo "Kit provisioning integration passed."
|
|
109
|
+
exit 0
|
|
110
|
+
fi
|
|
111
|
+
echo "Kit provisioning integration failed with $errors error(s)."
|
|
112
|
+
exit 1
|