@kontourai/flow-agents 0.1.1
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/.githooks/pre-push +11 -0
- package/.github/workflows/ci.yml +210 -0
- package/.github/workflows/docs-pages.yml +52 -0
- package/.github/workflows/publish-npm.yml +104 -0
- package/AGENTS.md +26 -0
- package/CHANGELOG.md +66 -0
- package/CODE_OF_CONDUCT.md +25 -0
- package/CONTEXT.md +300 -0
- package/CONTRIBUTING.md +44 -0
- package/LICENSE +201 -0
- package/README.md +129 -0
- package/SECURITY.md +33 -0
- package/agent-cards/dev.json +19 -0
- package/agents/dev.json +127 -0
- package/agents/tool-code-reviewer.json +61 -0
- package/agents/tool-dependencies-updater.json +118 -0
- package/agents/tool-explore-config.json +92 -0
- package/agents/tool-explore-deps.json +92 -0
- package/agents/tool-explore-entry.json +92 -0
- package/agents/tool-explore-patterns.json +92 -0
- package/agents/tool-explore-structure.json +92 -0
- package/agents/tool-explore-tests.json +92 -0
- package/agents/tool-planner.json +57 -0
- package/agents/tool-playwright.json +145 -0
- package/agents/tool-security-reviewer.json +56 -0
- package/agents/tool-verifier.json +61 -0
- package/agents/tool-worker.json +58 -0
- package/build/src/cli/console-learning-projection.js +123 -0
- package/build/src/cli/docs-preview.js +39 -0
- package/build/src/cli/effective-backlog-settings.js +102 -0
- package/build/src/cli/export-bookmarks.js +38 -0
- package/build/src/cli/fixture-retirement-audit.js +140 -0
- package/build/src/cli/flow-kit.js +138 -0
- package/build/src/cli/import-bookmarks.js +50 -0
- package/build/src/cli/init.js +239 -0
- package/build/src/cli/instinct-cli.js +93 -0
- package/build/src/cli/promote-workflow-artifact.js +63 -0
- package/build/src/cli/publish-change-helper.js +154 -0
- package/build/src/cli/pull-work-provider.js +469 -0
- package/build/src/cli/runtime-adapter.js +23 -0
- package/build/src/cli/telemetry-doctor.js +221 -0
- package/build/src/cli/usage-feedback.js +443 -0
- package/build/src/cli/validate-hook-influence.js +152 -0
- package/build/src/cli/validate-source-tree.js +31 -0
- package/build/src/cli/validate-workflow-artifacts.js +486 -0
- package/build/src/cli/veritas-governance.js +262 -0
- package/build/src/cli/workflow-artifact-cleanup-audit.js +272 -0
- package/build/src/cli/workflow-sidecar.js +816 -0
- package/build/src/cli.js +89 -0
- package/build/src/flow-kit/validate.js +75 -0
- package/build/src/lib/args.js +45 -0
- package/build/src/lib/fs.js +62 -0
- package/build/src/lib/workflow-learning-projection.js +334 -0
- package/build/src/runtime-adapters.js +146 -0
- package/build/src/tools/build-universal-bundles.js +397 -0
- package/build/src/tools/common.js +56 -0
- package/build/src/tools/filter-installed-packs.js +132 -0
- package/build/src/tools/generate-context-map.js +198 -0
- package/build/src/tools/validate-package.js +64 -0
- package/build/src/tools/validate-source-tree.js +622 -0
- package/console.telemetry.json +176 -0
- package/context/base-rules.md +17 -0
- package/context/code-review-standards.md +62 -0
- package/context/coding-standards.md +42 -0
- package/context/common/orchestrators.md +12 -0
- package/context/common/subagents.md +28 -0
- package/context/contracts/artifact-contract.md +182 -0
- package/context/contracts/builder-kit-workflow-state-contract.md +319 -0
- package/context/contracts/delivery-contract.md +69 -0
- package/context/contracts/execution-contract.md +53 -0
- package/context/contracts/governance-adapter-contract.md +67 -0
- package/context/contracts/planning-contract.md +85 -0
- package/context/contracts/review-contract.md +104 -0
- package/context/contracts/sandbox-policy.md +52 -0
- package/context/contracts/verification-contract.md +134 -0
- package/context/contracts/work-item-contract.md +215 -0
- package/context/deferred/demo-mode.md +33 -0
- package/context/deferred/languages/go.md +31 -0
- package/context/deferred/languages/python.md +31 -0
- package/context/deferred/languages/typescript.md +34 -0
- package/context/deferred/parallelization.md +35 -0
- package/context/deferred/worktree-isolation.md +24 -0
- package/context/development-workflow.md +50 -0
- package/context/scripts/context-budget/budget-scan.sh +166 -0
- package/context/scripts/detect-tools.sh +3 -0
- package/context/scripts/discover-agents.sh +28 -0
- package/context/scripts/git-status.sh +49 -0
- package/context/scripts/hooks/config-protection.js +79 -0
- package/context/scripts/hooks/desktop-notify.sh +39 -0
- package/context/scripts/hooks/governance-audit.sh +135 -0
- package/context/scripts/hooks/lib/audit-transport.sh +40 -0
- package/context/scripts/hooks/lib/hook-flags.js +49 -0
- package/context/scripts/hooks/lib/patterns.sh +57 -0
- package/context/scripts/hooks/lib/resolve-formatter.js +80 -0
- package/context/scripts/hooks/post-edit-accumulator.js +66 -0
- package/context/scripts/hooks/pre-commit-quality.js +194 -0
- package/context/scripts/hooks/quality-gate.js +93 -0
- package/context/scripts/hooks/report-only-guard.js +21 -0
- package/context/scripts/hooks/run-hook.js +136 -0
- package/context/scripts/hooks/stop-format-typecheck.js +141 -0
- package/context/scripts/hooks/stop-goal-fit.js +337 -0
- package/context/scripts/hooks/workflow-steering.js +250 -0
- package/context/scripts/telemetry/console-presets.sh +14 -0
- package/context/scripts/telemetry/install-console-config.sh +214 -0
- package/context/scripts/telemetry/lib/config.sh +85 -0
- package/context/scripts/telemetry/lib/enrich.sh +115 -0
- package/context/scripts/telemetry/lib/redact.sh +22 -0
- package/context/scripts/telemetry/lib/session.sh +63 -0
- package/context/scripts/telemetry/lib/transport.sh +183 -0
- package/context/scripts/telemetry/lib/usage.sh +29 -0
- package/context/scripts/telemetry/sync-agents.sh +173 -0
- package/context/scripts/telemetry/telemetry.conf +23 -0
- package/context/scripts/telemetry/telemetry.sh +387 -0
- package/context/scripts/validate-package.sh +89 -0
- package/context/settings/backlog-provider-settings.json +54 -0
- package/context/templates/core/identity.md +26 -0
- package/context/templates/core/user.md +15 -0
- package/docs/_config.yml +15 -0
- package/docs/_layouts/default.html +87 -0
- package/docs/adr/0001-flow-agents-consumes-flow.md +77 -0
- package/docs/adr/0002-flow-kits-as-extension-unit.md +13 -0
- package/docs/adr/0003-flow-agents-coordinates-kits-and-adapters.md +13 -0
- package/docs/adr/0004-gates-expect-surface-claims.md +15 -0
- package/docs/adr/0005-kubernetes-inspired-resource-contracts.md +48 -0
- package/docs/adr/0006-typescript-first-source-policy.md +98 -0
- package/docs/agent-system-guidebook.md +391 -0
- package/docs/agent-usage-feedback-loop.md +351 -0
- package/docs/assets/favicon.svg +13 -0
- package/docs/assets/og-image.png +0 -0
- package/docs/assets/site.css +774 -0
- package/docs/assets/site.js +139 -0
- package/docs/configurable-workflow-routing.md +174 -0
- package/docs/context-map.md +145 -0
- package/docs/developer-architecture.md +145 -0
- package/docs/developer-hook-setup.md +61 -0
- package/docs/fixture-ownership.md +44 -0
- package/docs/flow-kit-repository-contract.md +180 -0
- package/docs/index.md +129 -0
- package/docs/kontour-resource-contract.md +358 -0
- package/docs/migrations.md +64 -0
- package/docs/north-star.md +322 -0
- package/docs/operating-layers.md +110 -0
- package/docs/repository-structure.md +132 -0
- package/docs/sandbox-policy.md +56 -0
- package/docs/skills-map.md +203 -0
- package/docs/standards-register.md +96 -0
- package/docs/veritas-integration.md +165 -0
- package/docs/work-item-adapters.md +72 -0
- package/docs/workflow-artifact-lifecycle.md +141 -0
- package/docs/workflow-eval-strategy.md +295 -0
- package/docs/workflow-shared-contracts.md +51 -0
- package/docs/workflow-usage-guide.md +443 -0
- package/evals/ARCHITECTURE.md +143 -0
- package/evals/CONVENTIONS.md +58 -0
- package/evals/README.md +128 -0
- package/evals/acceptance/run.sh +29 -0
- package/evals/acceptance/test_claude_harness.sh +242 -0
- package/evals/acceptance/test_codex_harness.sh +108 -0
- package/evals/acceptance/test_kiro_harness.sh +128 -0
- package/evals/cases/dev/404.html +97 -0
- package/evals/cases/dev/code-review.yaml +44 -0
- package/evals/cases/dev/dashboard.html +300 -0
- package/evals/cases/dev/deliver.yaml +66 -0
- package/evals/cases/dev/dependency-update.yaml +16 -0
- package/evals/cases/dev/explore.yaml +20 -0
- package/evals/cases/dev/index.html +370 -0
- package/evals/cases/dev/package-lock.json +28 -0
- package/evals/cases/dev/package.json +16 -0
- package/evals/cases/dev/plan-work.yaml +20 -0
- package/evals/cases/dev/promptfooconfig.yaml +666 -0
- package/evals/cases/dev/search-first.yaml +20 -0
- package/evals/cases/dev/tdd-workflow.yaml +48 -0
- package/evals/cases/dev/verify-work.yaml +44 -0
- package/evals/cases/dev/workflow.yaml +34 -0
- package/evals/ci/run-baseline.sh +283 -0
- package/evals/fixtures/backlog-provider-settings/global-default.json +44 -0
- package/evals/fixtures/backlog-provider-settings/project-override.json +53 -0
- package/evals/fixtures/builder-kit-workflow-state/baseline-freshness-resolution-hint.json +139 -0
- package/evals/fixtures/builder-kit-workflow-state/direct-primitive-stop.json +59 -0
- package/evals/fixtures/builder-kit-workflow-state/empty-board-route-shape.json +55 -0
- package/evals/fixtures/builder-kit-workflow-state/happy-path.json +71 -0
- package/evals/fixtures/builder-kit-workflow-state/mid-work-resume.json +80 -0
- package/evals/fixtures/builder-kit-workflow-state/missing-prestep-recovery.json +65 -0
- package/evals/fixtures/builder-kit-workflow-state/product-build-chaining.json +60 -0
- package/evals/fixtures/builder-kit-workflow-state/stale-continuation-requires-new-probe.json +57 -0
- package/evals/fixtures/console-learning-projection/artifacts/console-learning-correction/learning.json +50 -0
- package/evals/fixtures/console-learning-projection/artifacts/console-learning-open-route/learning.json +41 -0
- package/evals/fixtures/flow-kit-repository/invalid-absolute-path/kit.json +8 -0
- package/evals/fixtures/flow-kit-repository/invalid-asset-section/flows/review.flow.json +6 -0
- package/evals/fixtures/flow-kit-repository/invalid-asset-section/kit.json +11 -0
- package/evals/fixtures/flow-kit-repository/invalid-duplicate-flow/flows/review.flow.json +6 -0
- package/evals/fixtures/flow-kit-repository/invalid-duplicate-flow/kit.json +9 -0
- package/evals/fixtures/flow-kit-repository/invalid-id/flows/review.flow.json +6 -0
- package/evals/fixtures/flow-kit-repository/invalid-id/kit.json +8 -0
- package/evals/fixtures/flow-kit-repository/invalid-malformed-json/kit.json +8 -0
- package/evals/fixtures/flow-kit-repository/invalid-missing-flow/kit.json +8 -0
- package/evals/fixtures/flow-kit-repository/invalid-missing-id/flows/review.flow.json +6 -0
- package/evals/fixtures/flow-kit-repository/invalid-missing-id/kit.json +7 -0
- package/evals/fixtures/flow-kit-repository/invalid-missing-schema-version/flows/review.flow.json +6 -0
- package/evals/fixtures/flow-kit-repository/invalid-missing-schema-version/kit.json +7 -0
- package/evals/fixtures/flow-kit-repository/invalid-name/flows/review.flow.json +6 -0
- package/evals/fixtures/flow-kit-repository/invalid-name/kit.json +8 -0
- package/evals/fixtures/flow-kit-repository/invalid-schema-version/flows/review.flow.json +6 -0
- package/evals/fixtures/flow-kit-repository/invalid-schema-version/kit.json +8 -0
- package/evals/fixtures/flow-kit-repository/invalid-traversal/kit.json +8 -0
- package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/adapters/example.json +3 -0
- package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/assets/example.txt +1 -0
- package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/docs/README.md +3 -0
- package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/flows/runtime.flow.json +26 -0
- package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/kit-evals/example.json +3 -0
- package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/kit-skills/mixed/SKILL.md +3 -0
- package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/kit.json +44 -0
- package/evals/fixtures/flow-kit-repository/valid-local-kit/docs/README.md +3 -0
- package/evals/fixtures/flow-kit-repository/valid-local-kit/flows/review.flow.json +26 -0
- package/evals/fixtures/flow-kit-repository/valid-local-kit/kit.json +20 -0
- package/evals/fixtures/hook-influence/cases.json +336 -0
- package/evals/fixtures/pull-work-provider/github-issues.json +170 -0
- package/evals/fixtures/pull-work-wip-shepherding/global-wip-informs.json +43 -0
- package/evals/fixtures/pull-work-wip-shepherding/personal-wip-blocks.json +42 -0
- package/evals/fixtures/surface-trust/accepted-claim-trust-report.json +31 -0
- package/evals/fixtures/surface-trust/artifact-absent.json +19 -0
- package/evals/fixtures/surface-trust/integrity-mismatch-trust-report.json +32 -0
- package/evals/fixtures/surface-trust/missing-authority-trust-report.json +27 -0
- package/evals/fixtures/surface-trust/provider-absent.json +19 -0
- package/evals/fixtures/surface-trust/rejected-claim-trust-report.json +30 -0
- package/evals/fixtures/surface-trust/stale-claim-trust-snapshot.json +31 -0
- package/evals/fixtures/usage-feedback/sample-full.jsonl +11 -0
- package/evals/fixtures/usage-feedback/sample-outcomes.jsonl +1 -0
- package/evals/fixtures/veritas-governance-adapter/fake-veritas-pass.sh +18 -0
- package/evals/fixtures/veritas-governance-adapter/fake-veritas-secret-fail.sh +10 -0
- package/evals/fixtures/veritas-governance-adapter/fake-veritas-unconfigured.sh +4 -0
- package/evals/integration/test_bundle_install.sh +541 -0
- package/evals/integration/test_console_learning_projection.sh +192 -0
- package/evals/integration/test_context_map.sh +65 -0
- package/evals/integration/test_effective_backlog_settings.sh +58 -0
- package/evals/integration/test_fixture_retirement_audit.sh +58 -0
- package/evals/integration/test_flow_agents_statusline.sh +93 -0
- package/evals/integration/test_flow_kit_repository.sh +90 -0
- package/evals/integration/test_goal_fit_hook.sh +482 -0
- package/evals/integration/test_hook_category_behaviors.sh +190 -0
- package/evals/integration/test_hook_influence_cases.sh +69 -0
- package/evals/integration/test_local_flow_kit_install.sh +145 -0
- package/evals/integration/test_publish_change_helper.sh +176 -0
- package/evals/integration/test_pull_work_provider.sh +140 -0
- package/evals/integration/test_runtime_adapter_activation.sh +106 -0
- package/evals/integration/test_telemetry.sh +485 -0
- package/evals/integration/test_telemetry_doctor.sh +193 -0
- package/evals/integration/test_usage_feedback_dashboard.sh +169 -0
- package/evals/integration/test_usage_feedback_global.sh +117 -0
- package/evals/integration/test_usage_feedback_import.sh +227 -0
- package/evals/integration/test_usage_feedback_outcomes.sh +165 -0
- package/evals/integration/test_usage_feedback_report.sh +263 -0
- package/evals/integration/test_veritas_governance_adapter.sh +235 -0
- package/evals/integration/test_workflow_artifact_cleanup_audit.sh +287 -0
- package/evals/integration/test_workflow_artifacts.sh +1247 -0
- package/evals/integration/test_workflow_sidecar_writer.sh +2112 -0
- package/evals/integration/test_workflow_steering_hook.sh +337 -0
- package/evals/lib/assertions/delegated-to.js +40 -0
- package/evals/lib/assertions/max-tool-calls.js +15 -0
- package/evals/lib/assertions/no-write-tools.js +27 -0
- package/evals/lib/assertions/pass-at-k.js +39 -0
- package/evals/lib/assertions/telemetry-utils.js +105 -0
- package/evals/lib/assertions/tool-called.js +39 -0
- package/evals/lib/assertions/verify-after-fix.js +61 -0
- package/evals/lib/claude-judge.sh +40 -0
- package/evals/lib/claude-provider.sh +74 -0
- package/evals/lib/codex-judge.sh +39 -0
- package/evals/lib/codex-provider.sh +81 -0
- package/evals/lib/eval-dev.sh +5 -0
- package/evals/lib/eval-judge.sh +22 -0
- package/evals/lib/eval-provider.sh +26 -0
- package/evals/lib/eval-report.sh +73 -0
- package/evals/lib/kiro-dev.sh +4 -0
- package/evals/lib/kiro-judge.sh +17 -0
- package/evals/lib/kiro-provider.sh +62 -0
- package/evals/lib/node.sh +111 -0
- package/evals/promptfooconfig.yaml +70 -0
- package/evals/run.sh +309 -0
- package/evals/static/test_evidence_refs.sh +141 -0
- package/evals/static/test_package.sh +407 -0
- package/evals/static/test_repo_hooks.sh +68 -0
- package/evals/static/test_universal_bundles.sh +274 -0
- package/evals/static/test_workflow_skills.sh +1207 -0
- package/install.sh +64 -0
- package/integrations/veritas/flow-agents.adapter.json +138 -0
- package/integrations/veritas/flow-agents.authority-settings.json +26 -0
- package/integrations/veritas/flow-agents.repo-standards.json +82 -0
- package/kits/builder/flows/build.flow.json +218 -0
- package/kits/builder/flows/shape.flow.json +127 -0
- package/kits/builder/kit.json +19 -0
- package/kits/catalog.json +11 -0
- package/package.json +130 -0
- package/packaging/README.md +60 -0
- package/packaging/manifest.json +173 -0
- package/packaging/packs.json +69 -0
- package/powers/dependency-checker/POWER.md +20 -0
- package/powers/dependency-checker/mcp.json +20 -0
- package/powers/playwright/POWER.md +25 -0
- package/powers/playwright/mcp.json +12 -0
- package/prompts/code-audit.md +123 -0
- package/prompts/kcommit.md +88 -0
- package/schemas/backlog-provider-settings.schema.json +138 -0
- package/schemas/workflow-acceptance.schema.json +216 -0
- package/schemas/workflow-critique.schema.json +113 -0
- package/schemas/workflow-evidence.schema.json +357 -0
- package/schemas/workflow-handoff.schema.json +52 -0
- package/schemas/workflow-learning.schema.json +223 -0
- package/schemas/workflow-release.schema.json +172 -0
- package/schemas/workflow-state.schema.json +80 -0
- package/scripts/README.md +111 -0
- package/scripts/build-universal-bundles.js +3 -0
- package/scripts/check-content-boundary.cjs +99 -0
- package/scripts/context-budget/budget-scan.sh +166 -0
- package/scripts/detect-tools.sh +3 -0
- package/scripts/discover-agents.sh +28 -0
- package/scripts/effective-backlog-settings.js +2 -0
- package/scripts/filter-installed-packs.js +2 -0
- package/scripts/flow-kit.js +2 -0
- package/scripts/generate-context-map.js +2 -0
- package/scripts/git-status.sh +49 -0
- package/scripts/hooks/claude-hook-adapter.js +174 -0
- package/scripts/hooks/claude-telemetry-hook.js +115 -0
- package/scripts/hooks/codex-hook-adapter.js +176 -0
- package/scripts/hooks/codex-telemetry-hook.js +95 -0
- package/scripts/hooks/config-protection.js +79 -0
- package/scripts/hooks/desktop-notify.sh +39 -0
- package/scripts/hooks/governance-audit.sh +135 -0
- package/scripts/hooks/lib/audit-transport.sh +40 -0
- package/scripts/hooks/lib/hook-flags.js +49 -0
- package/scripts/hooks/lib/patterns.sh +57 -0
- package/scripts/hooks/lib/resolve-formatter.js +80 -0
- package/scripts/hooks/post-edit-accumulator.js +66 -0
- package/scripts/hooks/pre-commit-quality.js +194 -0
- package/scripts/hooks/quality-gate.js +93 -0
- package/scripts/hooks/report-only-guard.js +21 -0
- package/scripts/hooks/run-hook.js +136 -0
- package/scripts/hooks/stop-format-typecheck.js +141 -0
- package/scripts/hooks/stop-goal-fit.js +337 -0
- package/scripts/hooks/workflow-steering.js +250 -0
- package/scripts/install-codex-home.sh +106 -0
- package/scripts/package.json +3 -0
- package/scripts/promote-workflow-artifact.js +2 -0
- package/scripts/publish-change-helper.js +2 -0
- package/scripts/pull-work-provider.js +2 -0
- package/scripts/setup-repo-hooks.sh +8 -0
- package/scripts/statusline/flow-agents-statusline.js +157 -0
- package/scripts/telemetry/console-presets.sh +14 -0
- package/scripts/telemetry/install-console-config.sh +214 -0
- package/scripts/telemetry/lib/config.sh +85 -0
- package/scripts/telemetry/lib/enrich.sh +115 -0
- package/scripts/telemetry/lib/redact.sh +22 -0
- package/scripts/telemetry/lib/session.sh +63 -0
- package/scripts/telemetry/lib/transport.sh +183 -0
- package/scripts/telemetry/lib/usage.sh +29 -0
- package/scripts/telemetry/sync-agents.sh +173 -0
- package/scripts/telemetry/telemetry.conf +23 -0
- package/scripts/telemetry/telemetry.sh +387 -0
- package/scripts/usage-feedback.js +2 -0
- package/scripts/validate-hook-influence-cases.js +2 -0
- package/scripts/validate-package.sh +89 -0
- package/scripts/validate-source-tree.js +9 -0
- package/skills/agentic-engineering/SKILL.md +62 -0
- package/skills/browser-test/SKILL.md +51 -0
- package/skills/builder-shape/SKILL.md +76 -0
- package/skills/context-budget/SKILL.md +40 -0
- package/skills/deliver/SKILL.md +241 -0
- package/skills/dependency-update/SKILL.md +68 -0
- package/skills/design-probe/SKILL.md +107 -0
- package/skills/eval-rebuild/SKILL.md +39 -0
- package/skills/evidence-gate/SKILL.md +186 -0
- package/skills/execute-plan/SKILL.md +110 -0
- package/skills/explore/SKILL.md +137 -0
- package/skills/feedback-loop/SKILL.md +87 -0
- package/skills/fix-bug/SKILL.md +133 -0
- package/skills/frontend-design/SKILL.md +80 -0
- package/skills/github-cli/SKILL.md +63 -0
- package/skills/idea-to-backlog/SKILL.md +267 -0
- package/skills/knowledge-capture/SKILL.md +55 -0
- package/skills/learning-review/SKILL.md +115 -0
- package/skills/pickup-probe/SKILL.md +114 -0
- package/skills/plan-work/SKILL.md +176 -0
- package/skills/pull-work/SKILL.md +309 -0
- package/skills/release-readiness/SKILL.md +121 -0
- package/skills/review-work/SKILL.md +161 -0
- package/skills/search-first/SKILL.md +66 -0
- package/skills/tdd-workflow/SKILL.md +140 -0
- package/skills/verify-work/SKILL.md +109 -0
- package/src/cli/console-learning-projection.ts +140 -0
- package/src/cli/effective-backlog-settings.ts +99 -0
- package/src/cli/fixture-retirement-audit.ts +154 -0
- package/src/cli/flow-kit.ts +139 -0
- package/src/cli/init.ts +248 -0
- package/src/cli/promote-workflow-artifact.ts +64 -0
- package/src/cli/publish-change-helper.ts +143 -0
- package/src/cli/pull-work-provider.ts +481 -0
- package/src/cli/runtime-adapter.ts +24 -0
- package/src/cli/telemetry-doctor.ts +243 -0
- package/src/cli/usage-feedback.ts +418 -0
- package/src/cli/validate-hook-influence.ts +119 -0
- package/src/cli/validate-source-tree.ts +30 -0
- package/src/cli/validate-workflow-artifacts.ts +411 -0
- package/src/cli/veritas-governance.ts +322 -0
- package/src/cli/workflow-artifact-cleanup-audit.ts +281 -0
- package/src/cli/workflow-sidecar.ts +676 -0
- package/src/cli.ts +95 -0
- package/src/flow-kit/validate.ts +74 -0
- package/src/lib/args.ts +43 -0
- package/src/lib/fs.ts +62 -0
- package/src/lib/workflow-learning-projection.ts +491 -0
- package/src/runtime-adapters.ts +154 -0
- package/src/tools/build-universal-bundles.ts +366 -0
- package/src/tools/common.ts +61 -0
- package/src/tools/filter-installed-packs.ts +129 -0
- package/src/tools/generate-context-map.ts +199 -0
- package/src/tools/validate-package.ts +57 -0
- package/src/tools/validate-source-tree.ts +488 -0
- package/tsconfig.json +19 -0
- package/veritas.claims.json +6 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# test_console_learning_projection.sh - Console learning projection contract and non-mutation guard
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
|
|
5
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
6
|
+
source "$ROOT/evals/lib/node.sh"
|
|
7
|
+
|
|
8
|
+
FIXTURE_DIR="$ROOT/evals/fixtures/console-learning-projection"
|
|
9
|
+
TMPDIR_EVAL="$(mktemp -d /private/tmp/eval-console-learning-projection.XXXXXX)"
|
|
10
|
+
ARTIFACT_ROOT="$TMPDIR_EVAL/artifacts"
|
|
11
|
+
KONTOUR_ROOT="$TMPDIR_EVAL/.kontour"
|
|
12
|
+
GENERATED_AT="2026-06-06T20:00:00Z"
|
|
13
|
+
PROJECTION="$KONTOUR_ROOT/projections/flow-agents-learning/repo-fixture-repo.json"
|
|
14
|
+
pass=0
|
|
15
|
+
fail=0
|
|
16
|
+
|
|
17
|
+
cleanup() {
|
|
18
|
+
rm -rf "$TMPDIR_EVAL"
|
|
19
|
+
}
|
|
20
|
+
trap cleanup EXIT
|
|
21
|
+
|
|
22
|
+
_pass() { echo " ✓ $1"; pass=$((pass + 1)); }
|
|
23
|
+
_fail() { echo " ✗ $1"; fail=$((fail + 1)); }
|
|
24
|
+
|
|
25
|
+
echo "=== Layer 2: Console Learning Projection ==="
|
|
26
|
+
echo ""
|
|
27
|
+
|
|
28
|
+
mkdir -p "$ARTIFACT_ROOT"
|
|
29
|
+
cp -R "$FIXTURE_DIR/artifacts/." "$ARTIFACT_ROOT/"
|
|
30
|
+
|
|
31
|
+
if flow_agents_build_ts 2>"$TMPDIR_EVAL/build.err"; then
|
|
32
|
+
_pass "TypeScript CLI build is available"
|
|
33
|
+
else
|
|
34
|
+
_fail "TypeScript CLI build failed: $(cat "$TMPDIR_EVAL/build.err" 2>/dev/null)"
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
find "$ARTIFACT_ROOT" -name learning.json -type f -print0 | sort -z | xargs -0 shasum -a 256 >"$TMPDIR_EVAL/before.sha"
|
|
38
|
+
|
|
39
|
+
cp "$PROJECTION" "$TMPDIR_EVAL/projection-first.json" 2>/dev/null || true
|
|
40
|
+
if node "$ROOT/build/src/cli.js" console-learning-projection \
|
|
41
|
+
--artifact-root "$ARTIFACT_ROOT" \
|
|
42
|
+
--kontour-root "$KONTOUR_ROOT" \
|
|
43
|
+
--scope fixture-repo \
|
|
44
|
+
--scope-kind repo \
|
|
45
|
+
--producer flow-agents-learning \
|
|
46
|
+
--generated-at "$GENERATED_AT" \
|
|
47
|
+
--json >"$TMPDIR_EVAL/run.json" 2>"$TMPDIR_EVAL/run.err"; then
|
|
48
|
+
_pass "CLI writes projection from fixture artifact root"
|
|
49
|
+
else
|
|
50
|
+
_fail "CLI failed: $(cat "$TMPDIR_EVAL/run.err" 2>/dev/null)"
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
if [[ -f "$PROJECTION" ]]; then
|
|
54
|
+
_pass "projection file exists at expected producer and scope path"
|
|
55
|
+
else
|
|
56
|
+
_fail "projection file missing at $PROJECTION"
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
if jq -e --arg path "$PROJECTION" \
|
|
60
|
+
'.scanned_learning_file_count == 2 and .emitted_learning_count == 2 and .destination == $path and .producer == "flow-agents-learning" and .scope == {"kind":"repo","id":"fixture-repo"} and .dry_run == false' \
|
|
61
|
+
"$TMPDIR_EVAL/run.json" >/dev/null 2>&1; then
|
|
62
|
+
_pass "JSON summary reports scanned files, emitted learnings, scope, producer, and destination"
|
|
63
|
+
else
|
|
64
|
+
_fail "JSON summary missing expected command result"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
cp "$PROJECTION" "$TMPDIR_EVAL/projection-first.json" 2>/dev/null || true
|
|
68
|
+
if node "$ROOT/build/src/cli.js" console-learning-projection \
|
|
69
|
+
--artifact-root "$ARTIFACT_ROOT" \
|
|
70
|
+
--kontour-root "$KONTOUR_ROOT" \
|
|
71
|
+
--scope fixture-repo \
|
|
72
|
+
--scope-kind repo \
|
|
73
|
+
--producer flow-agents-learning \
|
|
74
|
+
--generated-at "$GENERATED_AT" \
|
|
75
|
+
--json >"$TMPDIR_EVAL/run-second.json" 2>"$TMPDIR_EVAL/run-second.err"; then
|
|
76
|
+
if cmp -s "$TMPDIR_EVAL/projection-first.json" "$PROJECTION"; then
|
|
77
|
+
_pass "projection output is byte-stable with fixed generated-at"
|
|
78
|
+
else
|
|
79
|
+
_fail "projection output changed across fixed-timestamp runs"
|
|
80
|
+
fi
|
|
81
|
+
else
|
|
82
|
+
_fail "second deterministic run failed: $(cat "$TMPDIR_EVAL/run-second.err" 2>/dev/null)"
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
find "$ARTIFACT_ROOT" -name learning.json -type f -print0 | sort -z | xargs -0 shasum -a 256 >"$TMPDIR_EVAL/after.sha"
|
|
86
|
+
if cmp -s "$TMPDIR_EVAL/before.sha" "$TMPDIR_EVAL/after.sha"; then
|
|
87
|
+
_pass "source learning.json files are byte-for-byte unchanged"
|
|
88
|
+
else
|
|
89
|
+
_fail "source learning.json checksum changed after projection command"
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
echo ""
|
|
93
|
+
echo "--- Projection Contract ---"
|
|
94
|
+
|
|
95
|
+
if jq -e --arg generated "$GENERATED_AT" '
|
|
96
|
+
.schema == "kontour.console.projection" and
|
|
97
|
+
.version == "0.1" and
|
|
98
|
+
.generatedAt == $generated and
|
|
99
|
+
.scope == {"kind":"repo","id":"fixture-repo"} and
|
|
100
|
+
.producer == {"id":"flow-agents-learning","product":"flow-agents"} and
|
|
101
|
+
.derivedFrom.mode == "direct_snapshot" and
|
|
102
|
+
.derivedFrom.eventHistory == "unavailable" and
|
|
103
|
+
.derivedFrom.directSnapshot.emittedAt == $generated and
|
|
104
|
+
.derivedFrom.directSnapshot.producer == {"id":"flow-agents-learning","product":"flow-agents"} and
|
|
105
|
+
.derivedFrom.directSnapshot.sourceRef == {"product":"flow-agents","kind":"workflow-learning","id":".flow-agents/*/learning.json","label":"Local workflow learning sidecars"} and
|
|
106
|
+
(.learnings | length) == 2
|
|
107
|
+
' "$PROJECTION" >/dev/null 2>&1; then
|
|
108
|
+
_pass "projection envelope includes Console schema, scope, producer, and direct snapshot provenance"
|
|
109
|
+
else
|
|
110
|
+
_fail "projection envelope is missing required Console contract fields"
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
if jq -e '
|
|
114
|
+
all(.learnings[]; .family == "workflow" and .nonAuthority == true) and
|
|
115
|
+
([paths(scalars) | map(tostring) | join(".") | select(test("(^|\\.)(claims|gates|decisions|actions)(\\.|$)"))] | length) == 0 and
|
|
116
|
+
(has("refs") | not) and
|
|
117
|
+
(has("links") | not)
|
|
118
|
+
' "$PROJECTION" >/dev/null 2>&1; then
|
|
119
|
+
_pass "learnings are inert and output has no authoritative fields or invalid top-level refs/links"
|
|
120
|
+
else
|
|
121
|
+
_fail "projection contains authority fields, invalid refs/links, or non-inert learnings"
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
if jq -e '
|
|
125
|
+
.learnings as $learnings |
|
|
126
|
+
($learnings | map(.id) | unique | length) == 2 and
|
|
127
|
+
all($learnings[]; (.id | test("^learning\\.workflow\\.")) and (.subjectRef.product == "flow-agents") and (.subjectRef.kind == "workflow") and (.sourceRef.product == "flow-agents") and (.sourceRef.kind == "workflow-learning") and (.summary | length > 0)) and
|
|
128
|
+
all($learnings[]; .sourceRef.id != .extensions["flow-agents"].record_id) and
|
|
129
|
+
any($learnings[]; .subjectRef.id == "console-learning-correction" and .sourceRef.id == "console-learning-correction/record-correction-needed" and .sourceRef.label == "console-learning-correction/record-correction-needed" and .extensions["flow-agents"].record_id == "record-correction-needed") and
|
|
130
|
+
any($learnings[]; .subjectRef.id == "console-learning-open-route" and .sourceRef.id == "console-learning-open-route/record-open-route" and .sourceRef.label == "console-learning-open-route/record-open-route" and .extensions["flow-agents"].record_id == "record-open-route")
|
|
131
|
+
' "$PROJECTION" >/dev/null 2>&1; then
|
|
132
|
+
_pass "learning ids and subject/source refs include task context while preserving raw record ids"
|
|
133
|
+
else
|
|
134
|
+
_fail "learning ids or subject/source refs do not correlate to source records"
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
if jq -e '
|
|
138
|
+
.learnings[] | select(.sourceRef.id == "console-learning-correction/record-correction-needed") |
|
|
139
|
+
.extensions["flow-agents"] as $ext |
|
|
140
|
+
$ext.task_slug == "console-learning-correction" and
|
|
141
|
+
$ext.record_id == "record-correction-needed" and
|
|
142
|
+
$ext.source_path == "console-learning-correction/learning.json" and
|
|
143
|
+
$ext.source_refs == ["critique.json#/critiques/0/findings/0", "evals/integration/test_console_learning_projection.sh"] and
|
|
144
|
+
$ext.routing.count == 2 and
|
|
145
|
+
$ext.routing.open == 1 and
|
|
146
|
+
$ext.routing.deferred == 1 and
|
|
147
|
+
($ext.routing.targets | sort) == ["eval", "skill"] and
|
|
148
|
+
($ext.routing.statuses | sort) == ["deferred", "open"] and
|
|
149
|
+
($ext.routing.refs | sort) == ["github:kontourai/flow-agents#96", "skills/learning-review/SKILL.md"] and
|
|
150
|
+
$ext.correction.needed == true and
|
|
151
|
+
$ext.correction.type == "workflow" and
|
|
152
|
+
$ext.correction.recurrence_key == "console-learning-projection.recurrence-metadata" and
|
|
153
|
+
$ext.correction.prevention == {"target":"eval","status":"open","ref":"evals/integration/test_console_learning_projection.sh"} and
|
|
154
|
+
$ext.outcome == "mixed" and
|
|
155
|
+
$ext.learning_status == "followup_required"
|
|
156
|
+
' "$PROJECTION" >/dev/null 2>&1; then
|
|
157
|
+
_pass "correction-needed extension carries routing, correction, recurrence, and source path details"
|
|
158
|
+
else
|
|
159
|
+
_fail "correction-needed extension missing required Flow Agents details"
|
|
160
|
+
fi
|
|
161
|
+
|
|
162
|
+
if jq -e '
|
|
163
|
+
.learnings[] | select(.sourceRef.id == "console-learning-open-route/record-open-route") |
|
|
164
|
+
.extensions["flow-agents"] as $ext |
|
|
165
|
+
$ext.task_slug == "console-learning-open-route" and
|
|
166
|
+
$ext.record_id == "record-open-route" and
|
|
167
|
+
$ext.source_path == "console-learning-open-route/learning.json" and
|
|
168
|
+
$ext.routing.count == 2 and
|
|
169
|
+
$ext.routing.open == 1 and
|
|
170
|
+
$ext.routing.accepted == 1 and
|
|
171
|
+
($ext.routing.targets | sort) == ["backlog", "doc"] and
|
|
172
|
+
($ext.routing.statuses | sort) == ["accepted", "open"] and
|
|
173
|
+
$ext.correction == {"needed":false} and
|
|
174
|
+
$ext.outcome == "success" and
|
|
175
|
+
$ext.learning_status == "learned"
|
|
176
|
+
' "$PROJECTION" >/dev/null 2>&1; then
|
|
177
|
+
_pass "non-correction open-route extension carries routing and correction state"
|
|
178
|
+
else
|
|
179
|
+
_fail "non-correction open-route extension missing required Flow Agents details"
|
|
180
|
+
fi
|
|
181
|
+
|
|
182
|
+
if git diff --quiet -- schemas/workflow-learning.schema.json; then
|
|
183
|
+
_pass "workflow-learning source schema is unchanged"
|
|
184
|
+
else
|
|
185
|
+
_fail "schemas/workflow-learning.schema.json has unexpected diff"
|
|
186
|
+
fi
|
|
187
|
+
|
|
188
|
+
echo ""
|
|
189
|
+
echo "Result: $pass passed, $fail failed"
|
|
190
|
+
if [[ "$fail" -gt 0 ]]; then
|
|
191
|
+
exit 1
|
|
192
|
+
fi
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# test_context_map.sh — Generated context map drift and content checks
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
|
|
5
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
6
|
+
MAP="$ROOT/docs/context-map.md"
|
|
7
|
+
TMPDIR_EVAL="$(mktemp -d)"
|
|
8
|
+
trap 'rm -rf "$TMPDIR_EVAL"' EXIT
|
|
9
|
+
|
|
10
|
+
errors=0
|
|
11
|
+
_pass() { echo " ✓ $1"; }
|
|
12
|
+
_fail() { echo " ✗ $1"; errors=$((errors + 1)); }
|
|
13
|
+
|
|
14
|
+
if (cd "$ROOT" && npm run context-map:check) >"$TMPDIR_EVAL/check.out" 2>"$TMPDIR_EVAL/check.err"; then
|
|
15
|
+
_pass "context map is current"
|
|
16
|
+
else
|
|
17
|
+
_fail "context map is stale: $(cat "$TMPDIR_EVAL/check.out" "$TMPDIR_EVAL/check.err")"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
if (cd "$ROOT" && npm run context-map -- --output "$TMPDIR_EVAL/context-map.md") >"$TMPDIR_EVAL/generate.out" 2>"$TMPDIR_EVAL/generate.err" && cmp -s "$MAP" "$TMPDIR_EVAL/context-map.md"; then
|
|
21
|
+
_pass "context map generation is deterministic"
|
|
22
|
+
else
|
|
23
|
+
_fail "context map generation is not deterministic"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if (cd "$ROOT" && npm run context-map -- --include-runtime --output "$TMPDIR_EVAL/runtime-context-map.md") >"$TMPDIR_EVAL/runtime.out" 2>"$TMPDIR_EVAL/runtime.err" &&
|
|
27
|
+
rg -q 'Current Workflow State' "$TMPDIR_EVAL/runtime-context-map.md"; then
|
|
28
|
+
_pass "context map supports optional runtime workflow state"
|
|
29
|
+
else
|
|
30
|
+
_fail "runtime context map generation failed"
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
for expected in \
|
|
34
|
+
'Repository Shape' \
|
|
35
|
+
'Core Commands' \
|
|
36
|
+
'Workflow Sidecars' \
|
|
37
|
+
'Workflow Skills' \
|
|
38
|
+
'Support Skills' \
|
|
39
|
+
'Agents' \
|
|
40
|
+
'Optional Powers' \
|
|
41
|
+
'Packs' \
|
|
42
|
+
'Context Loading Rules' \
|
|
43
|
+
'npm run context-map:check' \
|
|
44
|
+
'packaging/packs.json' \
|
|
45
|
+
'workflow-release.schema.json' \
|
|
46
|
+
'workflow-learning.schema.json' \
|
|
47
|
+
'plan-work' \
|
|
48
|
+
'tool-planner' \
|
|
49
|
+
'Eval-first execution' \
|
|
50
|
+
'Research-before-coding workflow' \
|
|
51
|
+
'Save durable knowledge'; do
|
|
52
|
+
if rg -q "$expected" "$MAP"; then
|
|
53
|
+
_pass "context map includes $expected"
|
|
54
|
+
else
|
|
55
|
+
_fail "context map missing $expected"
|
|
56
|
+
fi
|
|
57
|
+
done
|
|
58
|
+
|
|
59
|
+
if [[ "$errors" -eq 0 ]]; then
|
|
60
|
+
echo "Context map integration passed."
|
|
61
|
+
exit 0
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
echo "Context map integration failed: $errors issue(s)."
|
|
65
|
+
exit 1
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -uo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
5
|
+
SCRIPT="$ROOT/scripts/effective-backlog-settings.js"
|
|
6
|
+
PROJECT="$ROOT/context/settings/backlog-provider-settings.json"
|
|
7
|
+
GLOBAL="$ROOT/evals/fixtures/backlog-provider-settings/global-default.json"
|
|
8
|
+
OVERRIDE="$ROOT/evals/fixtures/backlog-provider-settings/project-override.json"
|
|
9
|
+
EMPTY="$(mktemp)"
|
|
10
|
+
trap 'rm -f "$EMPTY"' EXIT
|
|
11
|
+
printf '{"schema_version":"1.0","projects":[]}\n' > "$EMPTY"
|
|
12
|
+
|
|
13
|
+
errors=0
|
|
14
|
+
pass() { echo " ✓ $1"; }
|
|
15
|
+
fail() { echo " ✗ $1"; errors=$((errors + 1)); }
|
|
16
|
+
|
|
17
|
+
json_value() {
|
|
18
|
+
node -e 'const fs=require("fs"); let cur=JSON.parse(fs.readFileSync(0,"utf8")); for (const part of process.argv[1].split(".")) cur=Array.isArray(cur) ? cur[Number(part)] : cur[part]; console.log(cur);' "$1"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
echo "=== Effective Backlog Settings ==="
|
|
22
|
+
|
|
23
|
+
default_result="$(cd "$ROOT" && npm run --silent effective-backlog-settings -- --repo-path . --json)"
|
|
24
|
+
[[ "$(printf '%s' "$default_result" | json_value status)" == "configured" ]] && pass "default project settings resolve through npm command" || fail "default project settings resolve through npm command"
|
|
25
|
+
[[ "$(printf '%s' "$default_result" | json_value settings.work_item_provider.kind)" == "github" ]] && pass "default provider kind is github" || fail "default provider kind is github"
|
|
26
|
+
[[ "$(printf '%s' "$default_result" | json_value settings.work_item_provider.repo.owner)" == "kontourai" ]] && pass "default repo owner is kontourai" || fail "default repo owner is kontourai"
|
|
27
|
+
[[ "$(printf '%s' "$default_result" | json_value settings.work_item_provider.repo.name)" == "flow-agents" ]] && pass "default repo name is flow-agents" || fail "default repo name is flow-agents"
|
|
28
|
+
[[ "$(printf '%s' "$default_result" | json_value settings.board_provider.board.number)" == "1" ]] && pass "default project number is 1" || fail "default project number is 1"
|
|
29
|
+
! printf '%s' "$default_result" | rg -q '/build/context/settings/backlog-provider-settings.json' && pass "default settings path is not build-relative" || fail "default settings path is not build-relative"
|
|
30
|
+
|
|
31
|
+
configured="$(node "$SCRIPT" --repo-path "$ROOT" --project-settings "$PROJECT" --global-settings "$EMPTY" --json)"
|
|
32
|
+
[[ "$(printf '%s' "$configured" | json_value status)" == "configured" ]] && pass "configured repo resolves" || fail "configured repo resolves"
|
|
33
|
+
[[ "$(printf '%s' "$configured" | json_value settings.work_item_provider.kind)" == "github" ]] && pass "provider kind is github" || fail "provider kind is github"
|
|
34
|
+
[[ "$(printf '%s' "$configured" | json_value settings.work_item_provider.repo.owner)" == "kontourai" ]] && pass "repo owner is kontourai" || fail "repo owner is kontourai"
|
|
35
|
+
[[ "$(printf '%s' "$configured" | json_value settings.work_item_provider.repo.name)" == "flow-agents" ]] && pass "repo name is flow-agents" || fail "repo name is flow-agents"
|
|
36
|
+
[[ "$(printf '%s' "$configured" | json_value settings.board_provider.board.number)" == "1" ]] && pass "project number is 1" || fail "project number is 1"
|
|
37
|
+
printf '%s' "$configured" | rg -F -q '"ready_statuses": [' && pass "filters include ready statuses" || fail "filters include ready statuses"
|
|
38
|
+
printf '%s' "$configured" | rg -F -q '"include_labels": []' && pass "filters do not require labels by default" || fail "filters do not require labels by default"
|
|
39
|
+
printf '%s' "$configured" | rg -q '"prefer_finishing_active_work": true' && pass "WIP policy prefers finishing active work" || fail "WIP policy prefers finishing active work"
|
|
40
|
+
|
|
41
|
+
override_result="$(node "$SCRIPT" --repo-path "$ROOT" --project-settings "$OVERRIDE" --global-settings "$GLOBAL" --json)"
|
|
42
|
+
[[ "$(printf '%s' "$override_result" | json_value source)" == "project" ]] && pass "project settings override global defaults" || fail "project settings override global defaults"
|
|
43
|
+
[[ "$(printf '%s' "$override_result" | json_value settings.board_provider.board.number)" == "1" ]] && pass "project override keeps Project 1" || fail "project override keeps Project 1"
|
|
44
|
+
! printf '%s' "$override_result" | rg -q 'global-ready' && pass "project override replaces global filters" || fail "project override replaces global filters"
|
|
45
|
+
|
|
46
|
+
missing_output="$(node "$SCRIPT" --repo-path "$ROOT" --project-settings "$EMPTY" --global-settings "$EMPTY" --json 2>/dev/null)"
|
|
47
|
+
missing_status=$?
|
|
48
|
+
[[ "$missing_status" -eq 2 ]] && pass "missing settings exits with ask-user status" || fail "missing settings exits with ask-user status"
|
|
49
|
+
[[ "$(printf '%s' "$missing_output" | json_value status)" == "ask_user" ]] && pass "missing settings reports ask_user" || fail "missing settings reports ask_user"
|
|
50
|
+
printf '%s' "$missing_output" | rg -q 'WorkItemProvider and BoardProvider' && pass "missing settings names provider roles" || fail "missing settings names provider roles"
|
|
51
|
+
|
|
52
|
+
if [[ "$errors" -eq 0 ]]; then
|
|
53
|
+
echo "Effective backlog settings checks passed"
|
|
54
|
+
else
|
|
55
|
+
echo "Effective backlog settings checks failed: $errors"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
exit "$errors"
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
TMPDIR_EVAL="$(mktemp -d)"
|
|
8
|
+
trap 'rm -rf "$TMPDIR_EVAL"' EXIT
|
|
9
|
+
|
|
10
|
+
errors=0
|
|
11
|
+
pass() { echo " ✓ $1"; }
|
|
12
|
+
fail() { echo " ✗ $1"; errors=$((errors + 1)); }
|
|
13
|
+
|
|
14
|
+
echo "=== Fixture Retirement Audit ==="
|
|
15
|
+
|
|
16
|
+
flow_agents_node fixture-retirement-audit --json > "$TMPDIR_EVAL/audit.json"
|
|
17
|
+
status=$?
|
|
18
|
+
[[ "$status" -eq 0 ]] && pass "fixture audit exits successfully" || fail "fixture audit exits successfully"
|
|
19
|
+
|
|
20
|
+
json_query() {
|
|
21
|
+
node -e 'const fs=require("fs"); let cur=JSON.parse(fs.readFileSync(process.argv[1],"utf8")); for (const part of process.argv[2].split(".")) cur=Array.isArray(cur) ? cur[Number(part)] : cur[part]; console.log(cur);' "$1" "$2"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[[ "$(json_query "$TMPDIR_EVAL/audit.json" "totals.scanned")" == "10" ]] && pass "audit scans all fixture groups" || fail "audit scans all fixture groups"
|
|
25
|
+
[[ "$(json_query "$TMPDIR_EVAL/audit.json" "totals.retire_candidates")" == "0" ]] && pass "audit finds no unowned retire candidates" || fail "audit finds no unowned retire candidates"
|
|
26
|
+
[[ "$(json_query "$TMPDIR_EVAL/audit.json" "totals.kept")" == "10" ]] && pass "audit keeps all owned fixture groups" || fail "audit keeps all owned fixture groups"
|
|
27
|
+
|
|
28
|
+
node - "$TMPDIR_EVAL/audit.json" <<'NODE'
|
|
29
|
+
const fs = require("node:fs");
|
|
30
|
+
const audit = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
|
31
|
+
for (const item of audit.fixtures) {
|
|
32
|
+
if (item.classification !== "kept") throw new Error(`${item.fixture} should be kept`);
|
|
33
|
+
if (!item.owners.length) throw new Error(`${item.fixture} has no owners`);
|
|
34
|
+
if (!item.direct_refs.length) throw new Error(`${item.fixture} has no direct refs`);
|
|
35
|
+
if (!item.reasons.includes("owned fixture with live eval/script references")) throw new Error(`${item.fixture} missing keep reason`);
|
|
36
|
+
}
|
|
37
|
+
NODE
|
|
38
|
+
status=$?
|
|
39
|
+
[[ "$status" -eq 0 ]] && pass "all kept fixtures have owners and live refs" || fail "all kept fixtures have owners and live refs"
|
|
40
|
+
|
|
41
|
+
flow_agents_node fixture-retirement-audit > "$TMPDIR_EVAL/audit.txt"
|
|
42
|
+
grep -q "Retire candidates: 0" "$TMPDIR_EVAL/audit.txt" && pass "text audit reports zero retire candidates" || fail "text audit reports zero retire candidates"
|
|
43
|
+
grep -q "kept: evals/fixtures/hook-influence" "$TMPDIR_EVAL/audit.txt" && pass "text audit lists kept hook influence fixture" || fail "text audit lists kept hook influence fixture"
|
|
44
|
+
|
|
45
|
+
flow_agents_node fixture-retirement-audit --help > "$TMPDIR_EVAL/help.txt"
|
|
46
|
+
if grep -Eq -- "--(apply|delete|archive)" "$TMPDIR_EVAL/help.txt"; then
|
|
47
|
+
fail "help does not advertise destructive fixture actions"
|
|
48
|
+
else
|
|
49
|
+
pass "help does not advertise destructive fixture actions"
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
if [[ "$errors" -eq 0 ]]; then
|
|
53
|
+
echo "Fixture retirement audit checks passed"
|
|
54
|
+
else
|
|
55
|
+
echo "Fixture retirement audit checks failed: $errors"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
exit "$errors"
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
5
|
+
TMPDIR_EVAL="$(mktemp -d /tmp/flow-agents-statusline.XXXXXX)"
|
|
6
|
+
pass=0
|
|
7
|
+
fail=0
|
|
8
|
+
|
|
9
|
+
cleanup() {
|
|
10
|
+
rm -rf "$TMPDIR_EVAL"
|
|
11
|
+
}
|
|
12
|
+
trap cleanup EXIT
|
|
13
|
+
|
|
14
|
+
_pass() { echo " ✓ $1"; pass=$((pass + 1)); }
|
|
15
|
+
_fail() { echo " ✗ $1"; fail=$((fail + 1)); }
|
|
16
|
+
|
|
17
|
+
echo "=== Layer 2: Flow Agents Statusline ==="
|
|
18
|
+
echo ""
|
|
19
|
+
|
|
20
|
+
WORKSPACE="$TMPDIR_EVAL/workspace"
|
|
21
|
+
TASK_DIR="$WORKSPACE/.flow-agents/status-demo"
|
|
22
|
+
mkdir -p "$TASK_DIR"
|
|
23
|
+
|
|
24
|
+
cat >"$WORKSPACE/.flow-agents/current.json" <<'JSON'
|
|
25
|
+
{
|
|
26
|
+
"schema_version": "1.0",
|
|
27
|
+
"active_slug": "status-demo",
|
|
28
|
+
"artifact_dir": "status-demo",
|
|
29
|
+
"owner": "codex",
|
|
30
|
+
"updated_at": "2026-05-25T00:00:00Z",
|
|
31
|
+
"source": "test"
|
|
32
|
+
}
|
|
33
|
+
JSON
|
|
34
|
+
|
|
35
|
+
cat >"$TASK_DIR/state.json" <<'JSON'
|
|
36
|
+
{
|
|
37
|
+
"schema_version": "1.0",
|
|
38
|
+
"task_slug": "status-demo",
|
|
39
|
+
"status": "needs_decision",
|
|
40
|
+
"phase": "evidence",
|
|
41
|
+
"updated_at": "2026-05-25T00:01:00Z",
|
|
42
|
+
"next_action": {
|
|
43
|
+
"status": "needs_user",
|
|
44
|
+
"summary": "Review the release hold and decide whether the missing approval is accepted.",
|
|
45
|
+
"target_phase": "release"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
JSON
|
|
49
|
+
|
|
50
|
+
cat >"$TASK_DIR/acceptance.json" <<'JSON'
|
|
51
|
+
{
|
|
52
|
+
"schema_version": "1.0",
|
|
53
|
+
"task_slug": "status-demo",
|
|
54
|
+
"criteria": [
|
|
55
|
+
{"id": "one", "description": "First criterion", "status": "pass"},
|
|
56
|
+
{"id": "two", "description": "Second criterion", "status": "pending"},
|
|
57
|
+
{"id": "three", "description": "Third criterion", "status": "accepted_gap"}
|
|
58
|
+
],
|
|
59
|
+
"goal_fit": {"status": "pending", "summary": "Pending"}
|
|
60
|
+
}
|
|
61
|
+
JSON
|
|
62
|
+
|
|
63
|
+
if output="$(cd "$WORKSPACE" && node "$ROOT_DIR/scripts/statusline/flow-agents-statusline.js" <<JSON
|
|
64
|
+
{"cwd":"$WORKSPACE"}
|
|
65
|
+
JSON
|
|
66
|
+
)"; then
|
|
67
|
+
if [[ "$output" == *"Flow Agents: status-demo"* && "$output" == *"evidence/needs_decision"* && "$output" == *"2/3 AC"* && "$output" == *"next:"* ]]; then
|
|
68
|
+
_pass "statusline renders active workflow, phase/status, progress, and next action"
|
|
69
|
+
else
|
|
70
|
+
_fail "statusline output missing expected fields: $output"
|
|
71
|
+
fi
|
|
72
|
+
else
|
|
73
|
+
_fail "statusline command failed"
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
EMPTY="$TMPDIR_EVAL/empty"
|
|
77
|
+
mkdir -p "$EMPTY"
|
|
78
|
+
if output="$(cd "$EMPTY" && node "$ROOT_DIR/scripts/statusline/flow-agents-statusline.js" <<JSON
|
|
79
|
+
{"cwd":"$EMPTY"}
|
|
80
|
+
JSON
|
|
81
|
+
)"; then
|
|
82
|
+
if [[ "$output" == "Flow Agents: no active workflow" ]]; then
|
|
83
|
+
_pass "statusline handles workspaces without workflow state"
|
|
84
|
+
else
|
|
85
|
+
_fail "statusline empty-workspace output was unexpected: $output"
|
|
86
|
+
fi
|
|
87
|
+
else
|
|
88
|
+
_fail "statusline empty-workspace command failed"
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
echo ""
|
|
92
|
+
echo "Statusline results: $pass passed, $fail failed"
|
|
93
|
+
[[ $fail -eq 0 ]]
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# test_flow_kit_repository.sh — Validate local Flow Kit repository fixtures and diagnostics.
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
|
|
5
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
6
|
+
source "$ROOT/evals/lib/node.sh"
|
|
7
|
+
|
|
8
|
+
errors=0
|
|
9
|
+
TMP_DIR="$(mktemp -d)"
|
|
10
|
+
trap 'rm -rf "$TMP_DIR"' EXIT
|
|
11
|
+
|
|
12
|
+
pass() { echo " ✓ $1"; }
|
|
13
|
+
fail() { echo " ✗ $1"; errors=$((errors + 1)); }
|
|
14
|
+
|
|
15
|
+
run_validator() {
|
|
16
|
+
local fixture="$1"
|
|
17
|
+
local output="$2"
|
|
18
|
+
flow_agents_node "$ROOT/scripts/validate-source-tree.js" --kit "$ROOT/evals/fixtures/flow-kit-repository/$fixture" >"$output" 2>&1
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
expect_pass() {
|
|
22
|
+
local fixture="$1"
|
|
23
|
+
local output="$TMP_DIR/$fixture.out"
|
|
24
|
+
if run_validator "$fixture" "$output"; then
|
|
25
|
+
if rg -q 'Flow Kit repository validation passed' "$output"; then
|
|
26
|
+
pass "$fixture passes local kit repository validation"
|
|
27
|
+
else
|
|
28
|
+
fail "$fixture did not print pass diagnostic"
|
|
29
|
+
sed -n '1,120p' "$output"
|
|
30
|
+
fi
|
|
31
|
+
else
|
|
32
|
+
fail "$fixture should pass local kit repository validation"
|
|
33
|
+
sed -n '1,120p' "$output"
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
expect_fail() {
|
|
38
|
+
local fixture="$1"
|
|
39
|
+
local pattern="$2"
|
|
40
|
+
local output="$TMP_DIR/$fixture.out"
|
|
41
|
+
if run_validator "$fixture" "$output"; then
|
|
42
|
+
fail "$fixture should fail local kit repository validation"
|
|
43
|
+
sed -n '1,120p' "$output"
|
|
44
|
+
return
|
|
45
|
+
fi
|
|
46
|
+
if rg -q "$pattern" "$output"; then
|
|
47
|
+
pass "$fixture fails with actionable diagnostic"
|
|
48
|
+
else
|
|
49
|
+
fail "$fixture diagnostic missing pattern: $pattern"
|
|
50
|
+
sed -n '1,160p' "$output"
|
|
51
|
+
fi
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
echo "=== Flow Kit Repository Fixture Checks ==="
|
|
55
|
+
expect_pass "valid-local-kit"
|
|
56
|
+
expect_fail "invalid-schema-version" '\.schema_version must be "1\.0"'
|
|
57
|
+
expect_fail "invalid-missing-schema-version" '\.schema_version must be "1\.0"'
|
|
58
|
+
expect_fail "invalid-id" '\.id must be a stable kebab-case string'
|
|
59
|
+
expect_fail "invalid-missing-id" '\.id must be a stable kebab-case string'
|
|
60
|
+
expect_fail "invalid-name" '\.name must be a non-empty string'
|
|
61
|
+
expect_fail "invalid-missing-flow" 'flows\[0\]\.path points at missing Flow Definition'
|
|
62
|
+
expect_fail "invalid-absolute-path" 'flows\[0\]\.path must be relative'
|
|
63
|
+
expect_fail "invalid-traversal" "flows\\[0\\]\\.path must stay inside the kit directory"
|
|
64
|
+
expect_fail "invalid-malformed-json" 'invalid JSON'
|
|
65
|
+
expect_fail "invalid-asset-section" '\.docs must be a list'
|
|
66
|
+
expect_fail "invalid-duplicate-flow" "flows\\[1\\]\\.id duplicates"
|
|
67
|
+
|
|
68
|
+
echo ""
|
|
69
|
+
echo "=== Builder Kit Shared Validation Check ==="
|
|
70
|
+
builder_output="$TMP_DIR/source-tree.out"
|
|
71
|
+
if flow_agents_node "$ROOT/scripts/validate-source-tree.js" >"$builder_output" 2>&1; then
|
|
72
|
+
if rg -q 'Source tree validation passed' "$builder_output"; then
|
|
73
|
+
pass "source-tree validation keeps Builder Kit on shared validation path"
|
|
74
|
+
else
|
|
75
|
+
fail "source-tree validation did not print pass diagnostic"
|
|
76
|
+
sed -n '1,160p' "$builder_output"
|
|
77
|
+
fi
|
|
78
|
+
else
|
|
79
|
+
fail "source-tree validation failed while checking Builder Kit"
|
|
80
|
+
sed -n '1,220p' "$builder_output"
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
echo ""
|
|
84
|
+
if [[ "$errors" -eq 0 ]]; then
|
|
85
|
+
echo "Flow Kit repository fixture checks passed."
|
|
86
|
+
exit 0
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
echo "Flow Kit repository fixture checks failed: $errors issue(s)."
|
|
90
|
+
exit 1
|