@kontourai/flow-agents 0.1.2 → 0.3.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/dependabot.yml +23 -0
- package/.github/workflows/release-please.yml +31 -0
- package/.github/workflows/runtime-compat.yml +118 -0
- package/CHANGELOG.md +46 -0
- package/CONTRIBUTING.md +4 -0
- package/README.md +80 -18
- package/build/src/cli/flow-kit.js +9 -4
- package/build/src/cli/init.js +215 -5
- package/build/src/cli/runtime-adapter.js +9 -5
- package/build/src/cli/telemetry-doctor.js +4 -1
- package/build/src/cli/utterance-check.js +65 -1
- package/build/src/runtime-adapters.js +34 -0
- package/build/src/tools/build-universal-bundles.js +285 -0
- package/build/src/tools/filter-installed-packs.js +3 -0
- package/build/src/tools/validate-source-tree.js +5 -1
- package/console.telemetry.json +115 -20
- package/context/scripts/telemetry/lib/config.sh +5 -1
- package/context/settings/flow-agents-settings.json +7 -0
- package/docs/_layouts/default.html +2 -0
- package/docs/context-map.md +1 -0
- package/docs/index.md +53 -4
- package/docs/integrations/conformance.md +246 -0
- package/docs/integrations/framework-adapter.md +275 -0
- package/docs/integrations/harness-install.md +213 -0
- package/docs/integrations/index.md +58 -0
- package/docs/integrations/knowledge-kit-live.md +211 -0
- package/docs/kit-authoring-guide.md +169 -0
- package/docs/north-star.md +2 -2
- package/docs/spec/runtime-hook-surface.md +525 -0
- package/docs/survey-utterance-check.md +211 -94
- package/docs/vision.md +45 -0
- package/evals/acceptance/run.sh +13 -2
- package/evals/acceptance/test_knowledge_kit_live.sh +221 -0
- package/evals/acceptance/test_opencode_harness.sh +121 -0
- package/evals/acceptance/test_pi_harness.sh +113 -0
- package/evals/integration/test_bundle_install.sh +226 -1
- package/evals/integration/test_bundle_lifecycle.sh +641 -0
- package/evals/integration/test_runtime_adapter_activation.sh +113 -1
- package/evals/integration/test_utterance_check.sh +291 -44
- package/evals/run.sh +2 -0
- package/evals/static/test_universal_bundles.sh +137 -2
- package/integrations/strands/README.md +256 -0
- package/integrations/strands/example.py +74 -0
- package/integrations/strands/examples/knowledge_kit_live.py +461 -0
- package/integrations/strands/flow_agents_strands/__init__.py +27 -0
- package/integrations/strands/flow_agents_strands/hooks.py +194 -0
- package/integrations/strands/flow_agents_strands/policy.py +348 -0
- package/integrations/strands/flow_agents_strands/steering.py +225 -0
- package/integrations/strands/flow_agents_strands/telemetry.py +238 -0
- package/integrations/strands/pyproject.toml +38 -0
- package/integrations/strands/tests/__init__.py +0 -0
- package/integrations/strands/tests/test_hooks.py +392 -0
- package/integrations/strands/tests/test_policy.py +315 -0
- package/integrations/strands/tests/test_telemetry.py +184 -0
- package/integrations/strands-ts/README.md +224 -0
- package/integrations/strands-ts/bin/conformance-shim.mjs +257 -0
- package/integrations/strands-ts/package.json +53 -0
- package/integrations/strands-ts/src/hooks.ts +312 -0
- package/integrations/strands-ts/src/index.ts +22 -0
- package/integrations/strands-ts/src/policy.ts +345 -0
- package/integrations/strands-ts/src/telemetry.ts +251 -0
- package/integrations/strands-ts/test/test-policy.ts +322 -0
- package/integrations/strands-ts/test/test-steering.ts +159 -0
- package/integrations/strands-ts/test/test-telemetry.ts +226 -0
- package/integrations/strands-ts/tsconfig.json +20 -0
- package/kits/catalog.json +6 -0
- package/kits/knowledge/adapters/default-store/index.js +821 -0
- package/kits/knowledge/adapters/flow-runner/index.js +1179 -0
- package/kits/knowledge/adapters/flow-runner/telemetry.js +174 -0
- package/kits/knowledge/docs/README.md +135 -0
- package/kits/knowledge/docs/store-contract.md +526 -0
- package/kits/knowledge/evals/consolidation/suite.test.js +1234 -0
- package/kits/knowledge/evals/contract-suite/suite.test.js +670 -0
- package/kits/knowledge/evals/ingest-compile/suite.test.js +574 -0
- package/kits/knowledge/evals/synthesis/suite.test.js +909 -0
- package/kits/knowledge/flows/compile.flow.json +60 -0
- package/kits/knowledge/flows/consolidate.flow.json +77 -0
- package/kits/knowledge/flows/ingest.flow.json +60 -0
- package/kits/knowledge/flows/store-contract.flow.json +48 -0
- package/kits/knowledge/flows/synthesize.flow.json +77 -0
- package/kits/knowledge/kit.json +78 -0
- package/package.json +7 -2
- package/packaging/conformance/README.md +142 -0
- package/packaging/conformance/fixtures/config-protection--allow-no-path.json +18 -0
- package/packaging/conformance/fixtures/config-protection--allow-safe-file.json +20 -0
- package/packaging/conformance/fixtures/config-protection--block-biome.json +20 -0
- package/packaging/conformance/fixtures/config-protection--block-eslintrc.json +20 -0
- package/packaging/conformance/fixtures/quality-gate--allow-no-path.json +17 -0
- package/packaging/conformance/fixtures/quality-gate--allow-nonexistent-file.json +19 -0
- package/packaging/conformance/fixtures/stop-goal-fit--allow-clean-cwd.json +17 -0
- package/packaging/conformance/fixtures/stop-goal-fit--block-strict-mode.json +23 -0
- package/packaging/conformance/fixtures/stop-goal-fit--warn-active-delivery.json +21 -0
- package/packaging/conformance/fixtures/workflow-steering--allow-no-state.json +16 -0
- package/packaging/conformance/fixtures/workflow-steering--inject-active-state.json +29 -0
- package/packaging/conformance/fixtures/workflow-steering--inject-subagent-steering.json +25 -0
- package/packaging/conformance/package.json +4 -0
- package/packaging/conformance/run-conformance.js +322 -0
- package/packaging/manifest.json +59 -0
- package/schemas/flow-agents-settings.schema.json +48 -0
- package/scripts/README.md +4 -0
- package/scripts/dogfood.js +16 -0
- package/scripts/hooks/opencode-hook-adapter.js +123 -0
- package/scripts/hooks/opencode-telemetry-hook.js +101 -0
- package/scripts/hooks/pi-hook-adapter.js +123 -0
- package/scripts/hooks/pi-telemetry-hook.js +105 -0
- package/scripts/hooks/run-hook.js +8 -0
- package/scripts/hooks/utterance-check.js +124 -22
- package/scripts/telemetry/lib/config.sh +5 -1
- package/src/cli/flow-kit.ts +10 -4
- package/src/cli/init.ts +219 -6
- package/src/cli/runtime-adapter.ts +10 -5
- package/src/cli/telemetry-doctor.ts +4 -1
- package/src/cli/utterance-check.ts +71 -1
- package/src/runtime-adapters.ts +35 -0
- package/src/tools/build-universal-bundles.ts +283 -0
- package/src/tools/filter-installed-packs.ts +3 -0
- package/src/tools/validate-source-tree.ts +5 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Keeps pinned dependencies current; the runtime-compat workflow separately
|
|
2
|
+
# canaries LATEST runtime binaries and framework SDKs on a weekly cron.
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: npm
|
|
6
|
+
directory: "/"
|
|
7
|
+
schedule:
|
|
8
|
+
interval: weekly
|
|
9
|
+
groups:
|
|
10
|
+
dev-dependencies:
|
|
11
|
+
dependency-type: development
|
|
12
|
+
- package-ecosystem: npm
|
|
13
|
+
directory: "/integrations/strands-ts"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: weekly
|
|
16
|
+
- package-ecosystem: pip
|
|
17
|
+
directory: "/integrations/strands"
|
|
18
|
+
schedule:
|
|
19
|
+
interval: weekly
|
|
20
|
+
- package-ecosystem: github-actions
|
|
21
|
+
directory: "/"
|
|
22
|
+
schedule:
|
|
23
|
+
interval: weekly
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
actions: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
release-please:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Run release-please
|
|
19
|
+
id: release
|
|
20
|
+
uses: googleapis/release-please-action@v4
|
|
21
|
+
with:
|
|
22
|
+
config-file: release-please-config.json
|
|
23
|
+
manifest-file: .release-please-manifest.json
|
|
24
|
+
|
|
25
|
+
# Tags created with GITHUB_TOKEN do not trigger tag-push workflows, so
|
|
26
|
+
# dispatch the existing publish pipeline at the new tag explicitly.
|
|
27
|
+
- name: Dispatch publish workflow
|
|
28
|
+
if: steps.release.outputs.release_created == 'true'
|
|
29
|
+
env:
|
|
30
|
+
GH_TOKEN: ${{ github.token }}
|
|
31
|
+
run: gh workflow run publish-npm.yml --repo "$GITHUB_REPOSITORY" --ref "${{ steps.release.outputs.tag_name }}"
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
name: Runtime Compatibility
|
|
2
|
+
|
|
3
|
+
# Weekly canary against the LATEST released versions of supported host
|
|
4
|
+
# runtimes and framework SDKs. Catches upstream drift (config schema changes,
|
|
5
|
+
# plugin/extension API changes, SDK breaking releases) before users do.
|
|
6
|
+
#
|
|
7
|
+
# Report-only: failures open/refresh a tracking issue; they do not block CI.
|
|
8
|
+
# Live model loops are out of scope here (no provider credentials in CI) —
|
|
9
|
+
# coverage is install + config acceptance + plugin/extension load + the
|
|
10
|
+
# mechanical hook chain, which is where every upstream break found so far
|
|
11
|
+
# (opencode config schema, plugin spawn semantics, pi extension parsing)
|
|
12
|
+
# would have surfaced.
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
schedule:
|
|
16
|
+
- cron: "17 6 * * 1" # Mondays 06:17 UTC
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
issues: write
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
harness-canary:
|
|
25
|
+
name: Harness canary (${{ matrix.runtime }})
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
timeout-minutes: 20
|
|
28
|
+
strategy:
|
|
29
|
+
fail-fast: false
|
|
30
|
+
matrix:
|
|
31
|
+
include:
|
|
32
|
+
- runtime: opencode
|
|
33
|
+
install: npm install -g opencode-ai@latest
|
|
34
|
+
version: opencode --version
|
|
35
|
+
- runtime: pi
|
|
36
|
+
install: npm install -g @earendil-works/pi-coding-agent@latest
|
|
37
|
+
version: pi --version
|
|
38
|
+
steps:
|
|
39
|
+
- name: Checkout
|
|
40
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
41
|
+
|
|
42
|
+
- name: Set up Node.js
|
|
43
|
+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
44
|
+
with:
|
|
45
|
+
node-version: 24
|
|
46
|
+
|
|
47
|
+
- name: Install latest ${{ matrix.runtime }}
|
|
48
|
+
run: |
|
|
49
|
+
${{ matrix.install }}
|
|
50
|
+
${{ matrix.version }}
|
|
51
|
+
|
|
52
|
+
- name: Build bundles
|
|
53
|
+
run: npm run build:bundles
|
|
54
|
+
|
|
55
|
+
- name: Mechanical hook chain (lifecycle suite)
|
|
56
|
+
run: bash evals/integration/test_bundle_lifecycle.sh
|
|
57
|
+
|
|
58
|
+
- name: Live harness (binary-gated, provider assertions skip)
|
|
59
|
+
run: bash evals/acceptance/test_${{ matrix.runtime }}_harness.sh
|
|
60
|
+
|
|
61
|
+
framework-sdk-canary:
|
|
62
|
+
name: Framework SDK canary
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
timeout-minutes: 20
|
|
65
|
+
steps:
|
|
66
|
+
- name: Checkout
|
|
67
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
68
|
+
|
|
69
|
+
- name: Set up Node.js
|
|
70
|
+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
71
|
+
with:
|
|
72
|
+
node-version: 24
|
|
73
|
+
|
|
74
|
+
- name: Set up Python
|
|
75
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
76
|
+
with:
|
|
77
|
+
python-version: "3.12"
|
|
78
|
+
|
|
79
|
+
- name: Root install + build
|
|
80
|
+
run: |
|
|
81
|
+
npm ci
|
|
82
|
+
npm run build
|
|
83
|
+
|
|
84
|
+
- name: Strands TS adapter against latest @strands-agents/sdk
|
|
85
|
+
run: |
|
|
86
|
+
cd integrations/strands-ts
|
|
87
|
+
npm view @strands-agents/sdk version
|
|
88
|
+
npm test
|
|
89
|
+
npm run conformance
|
|
90
|
+
|
|
91
|
+
- name: Strands Python adapter against latest strands-agents
|
|
92
|
+
run: |
|
|
93
|
+
python3 -m venv /tmp/sdk-canary
|
|
94
|
+
/tmp/sdk-canary/bin/pip install -q strands-agents
|
|
95
|
+
/tmp/sdk-canary/bin/pip show strands-agents | head -2
|
|
96
|
+
cd integrations/strands
|
|
97
|
+
/tmp/sdk-canary/bin/python -m unittest discover
|
|
98
|
+
|
|
99
|
+
report:
|
|
100
|
+
name: Open tracking issue on failure
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
needs: [harness-canary, framework-sdk-canary]
|
|
103
|
+
if: failure()
|
|
104
|
+
steps:
|
|
105
|
+
- name: Create or comment on tracking issue
|
|
106
|
+
env:
|
|
107
|
+
GH_TOKEN: ${{ github.token }}
|
|
108
|
+
run: |
|
|
109
|
+
TITLE="Runtime compatibility canary failed ($(date -u +%Y-%m-%d))"
|
|
110
|
+
BODY="The weekly runtime/SDK canary failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
111
|
+
|
|
112
|
+
One or more of: latest opencode, latest pi, latest @strands-agents/sdk, latest strands-agents (Python) broke install, hook-chain, harness, adapter tests, or conformance. Triage the run logs and either fix the adapter or document the gap in the conformance declaration."
|
|
113
|
+
EXISTING=$(gh issue list --repo "${{ github.repository }}" --search "Runtime compatibility canary failed in:title state:open" --json number --jq '.[0].number // empty')
|
|
114
|
+
if [ -n "$EXISTING" ]; then
|
|
115
|
+
gh issue comment "$EXISTING" --repo "${{ github.repository }}" --body "$BODY"
|
|
116
|
+
else
|
|
117
|
+
gh issue create --repo "${{ github.repository }}" --title "$TITLE" --body "$BODY" --label upstream-drift
|
|
118
|
+
fi
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0](https://github.com/kontourai/flow-agents/compare/v0.2.0...v0.3.0) (2026-06-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **knowledge-kit:** concept synthesis with evidence-gated mutations (S3, [#34](https://github.com/kontourai/flow-agents/issues/34)) ([f307165](https://github.com/kontourai/flow-agents/commit/f30716503b22202d8929876b3e0b5d0d4bcbd2cb))
|
|
9
|
+
* **knowledge-kit:** decision-snapshot consolidation, supersede-not-delete (S6, [#36](https://github.com/kontourai/flow-agents/issues/36)) ([7211605](https://github.com/kontourai/flow-agents/commit/7211605fd19a0a332b7816c1fb0e66259771c3ba))
|
|
10
|
+
* **knowledge-kit:** ingest/classify + compile flows with provenance gates (S2, [#33](https://github.com/kontourai/flow-agents/issues/33)) ([07dffd5](https://github.com/kontourai/flow-agents/commit/07dffd5f6c6ab8555fc8c7e029d6432cd854dd05))
|
|
11
|
+
* **knowledge-kit:** keyless live example + acceptance harness (S5, [#35](https://github.com/kontourai/flow-agents/issues/35)) ([9a565aa](https://github.com/kontourai/flow-agents/commit/9a565aaa8deac236f07b63933bb8ce6887ac25f9))
|
|
12
|
+
* **knowledge-kit:** store contract + default reference adapter (S1, [#31](https://github.com/kontourai/flow-agents/issues/31)) ([4ed06ba](https://github.com/kontourai/flow-agents/commit/4ed06ba7cad7865094feddf0bd5ac7f76639b9ed))
|
|
13
|
+
* strands-local kit activation — framework-path kits (S4, [#32](https://github.com/kontourai/flow-agents/issues/32)) ([8dc05ec](https://github.com/kontourai/flow-agents/commit/8dc05ecf810dc3d205046c4773aa2c1e62159acb))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Fixes
|
|
17
|
+
|
|
18
|
+
* dedup pi session.start; document opencode run-mode session.created gap ([4d7e5b1](https://github.com/kontourai/flow-agents/commit/4d7e5b1e2de6573b824852598b04a5da3485adf6))
|
|
19
|
+
* telemetry-doctor reported the workspace parent as the local sink dir ([e15d7b2](https://github.com/kontourai/flow-agents/commit/e15d7b2e922225e4c30a39fceea304ca01e5ac17))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
* Flow Kits authoring guide, README kits section, npx command forms ([a89a86c](https://github.com/kontourai/flow-agents/commit/a89a86cc488abb7f6cd3cd300a67044174afa154))
|
|
25
|
+
|
|
26
|
+
## [0.2.0](https://github.com/kontourai/flow-agents/compare/v0.1.2...v0.2.0) (2026-06-11)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* engine contract 1.0, conformance kit, Strands rebind, integration docs ([fd94f58](https://github.com/kontourai/flow-agents/commit/fd94f583f52c874d901e06da0ee338830b3d469a))
|
|
32
|
+
* install lifecycle tests, dogfood command, collision marker fix ([a0fb2e3](https://github.com/kontourai/flow-agents/commit/a0fb2e31d897426db435801c8a637a9736d99ad1))
|
|
33
|
+
* live acceptance harnesses for opencode and pi ([181382b](https://github.com/kontourai/flow-agents/commit/181382b8dfe05cce41c0471a030e7d795950cd09))
|
|
34
|
+
* Strands TypeScript adapter — first native-import engine consumer ([0f387ab](https://github.com/kontourai/flow-agents/commit/0f387ab8e5a8b7f65e511af2fc33340f51e2d047))
|
|
35
|
+
* weekly runtime/SDK compatibility canary + dependabot ([9a371b1](https://github.com/kontourai/flow-agents/commit/9a371b1af86394fe1f7febebe3a35d3f05321f8e))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Fixes
|
|
39
|
+
|
|
40
|
+
* opencode.json — emit schema-valid config (instructions must be array) ([35a01ec](https://github.com/kontourai/flow-agents/commit/35a01ec508b2f99d4a7bca854e5f09740bac4fb3))
|
|
41
|
+
* opencode/pi hook chain — node resolution, stdin payloads, telemetry escape ([be4e4f8](https://github.com/kontourai/flow-agents/commit/be4e4f8d3b81fc7b67d6e45f4c9c1515407268a7))
|
|
42
|
+
* pi extension template escaping; parse-gate generated hook artifacts ([6fe40c5](https://github.com/kontourai/flow-agents/commit/6fe40c5079b8ee89a58c4dfecd6df2992c46cf59))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Documentation
|
|
46
|
+
|
|
47
|
+
* roadmap rows reflect the shipped utterance evidence-check hook ([#24](https://github.com/kontourai/flow-agents/issues/24)) ([617c755](https://github.com/kontourai/flow-agents/commit/617c75567b692c02564f457577d1ab3c01c1ea8e))
|
|
48
|
+
|
|
3
49
|
## 0.1.2
|
|
4
50
|
|
|
5
51
|
- Source validation resolves the Flow CLI at `dist/cli.js` (with a
|
package/CONTRIBUTING.md
CHANGED
|
@@ -34,6 +34,10 @@ gem install --user-install jekyll -v 3.9.5 jekyll-optional-front-matter \
|
|
|
34
34
|
Set `FLOW_CLI_ROOT` to a Flow checkout or installed `@kontourai/flow` package
|
|
35
35
|
root to enable full Flow Definition validation in `npm run validate:source`.
|
|
36
36
|
|
|
37
|
+
## Releases
|
|
38
|
+
|
|
39
|
+
Releases are automated with release-please: merges to main accumulate into a release PR, and merging it tags the version and dispatches the npm publish workflow. Use conventional commit prefixes (feat:, fix:, docs:, chore:) so version inference works.
|
|
40
|
+
|
|
37
41
|
## Validation
|
|
38
42
|
|
|
39
43
|
- `npm run validate:source` — source-tree integrity (paths, packs, manifests)
|
package/README.md
CHANGED
|
@@ -2,52 +2,94 @@
|
|
|
2
2
|
|
|
3
3
|
# Kontour Flow Agents
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**A portable process-discipline layer for agentic work — canonical policies, evidence, and telemetry that compile to whatever hook surface a host exposes.**
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@kontourai/flow-agents)
|
|
8
8
|
[](https://github.com/kontourai/flow-agents/actions/workflows/ci.yml)
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](package.json)
|
|
11
11
|
|
|
12
|
-
[Documentation](https://kontourai.github.io/flow-agents/) · [Workflow Guide](docs/workflow-usage-guide.md) · [System Guidebook](docs/agent-system-guidebook.md) · [Kontour Flow](https://kontourai.github.io/flow/)
|
|
12
|
+
[Documentation](https://kontourai.github.io/flow-agents/) · [Workflow Guide](docs/workflow-usage-guide.md) · [System Guidebook](docs/agent-system-guidebook.md) · [Runtime Hook Spec](docs/spec/runtime-hook-surface.md) · [Kontour Flow](https://kontourai.github.io/flow/)
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Agents are powerful and forgetful. They plan well, then drift. They skip verification when context gets crowded. They call partial work done, and after a compaction nobody — including the agent — can say where the work actually stands.
|
|
19
19
|
|
|
20
|
-
Flow Agents
|
|
20
|
+
Flow Agents addresses this with a process-discipline layer that sits between the user and the agent: four canonical policy classes (workflow steering, quality gate, stop-goal-fit, config protection), durable sidecar state that survives compaction and handoff, evidence gates before release decisions, and telemetry that feeds corrections back into the system. [Kontour Flow](https://kontourai.github.io/flow/) owns the gate semantics underneath; Flow Agents compiles those policies to whatever hook surface a host exposes — coding-agent harnesses today, agent frameworks next.
|
|
21
21
|
|
|
22
22
|
**You ask for outcomes. The system supplies the path, the state, the checks, and the proof.**
|
|
23
23
|
|
|
24
24
|
## What you get
|
|
25
25
|
|
|
26
|
-
- **One workflow across runtimes** — the same `idea → backlog → plan → build → review → verify → evidence → release → learning` path installs into Codex,
|
|
26
|
+
- **One workflow across runtimes** — the same `idea → backlog → plan → build → review → verify → evidence → release → learning` path installs into Claude Code, Codex, Kiro, opencode, and pi without rewriting it per tool.
|
|
27
27
|
- **Workflow skills** — `idea-to-backlog`, `pull-work`, `plan-work`, `execute-plan`, `review-work`, `verify-work`, `evidence-gate`, `release-readiness`, `learning-review`, and orchestrators like `deliver` and `fix-bug` that chain them.
|
|
28
28
|
- **Durable workflow state** — schema-validated sidecars under `.flow-agents/` record acceptance criteria, evidence, critique, handoff, and learning, so any session can resume from recorded state instead of chat memory.
|
|
29
|
-
- **
|
|
29
|
+
- **Four canonical policies** — workflow steering (phase reminders at each turn), quality gate (per-file checks after edits), stop-goal-fit (evidence check before the agent stops), and config protection (veto writes to linter/formatter configs). Each policy class has a canonical script under `scripts/hooks/` and compiles to the host's native hook format.
|
|
30
30
|
- **Evidence over confidence** — important work ends with tests, browser checks, CI results, review findings, governance reports, or an explicit `NOT_VERIFIED` gap. Optional [Veritas](docs/veritas-integration.md) integration attaches repo-governance evidence without making it mandatory.
|
|
31
|
-
- **Evals that keep the bundle honest** —
|
|
31
|
+
- **Evals that keep the bundle honest** — 77 integration and 36 static bundle assertions validate the skills, contracts, fixtures, and hook influence as the bundle evolves.
|
|
32
|
+
|
|
33
|
+
## Flow Agents as a process-discipline layer
|
|
34
|
+
|
|
35
|
+
The four canonical policy classes are defined in the [Runtime Hook Surface spec](docs/spec/runtime-hook-surface.md) using a runtime-neutral vocabulary. Adapters translate them to whatever hook surface a host exposes:
|
|
36
|
+
|
|
37
|
+
| Policy Class | What it does | Hook trigger |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| Workflow steering | Injects phase-transition reminders so the agent does not lose track of where it is in the delivery pipeline | `userPromptSubmit` |
|
|
40
|
+
| Quality gate | Runs format and lint checks immediately after edit tool calls | `postToolUse` |
|
|
41
|
+
| Stop-goal-fit | Warns (or blocks) when the agent is about to stop but required evidence is missing | `stop` |
|
|
42
|
+
| Config protection | Vetoes writes to linter and formatter configuration files | `preToolUse` |
|
|
43
|
+
|
|
44
|
+
The spec defines three conformance levels: **L0** (telemetry only), **L1** (steering + stop-goal-fit warning), and **L2** (all four policies with blocking). Claude Code and Codex are the current L2 reference implementations.
|
|
45
|
+
|
|
46
|
+
## Runtime and support matrix
|
|
47
|
+
|
|
48
|
+
L2 means all four policy classes with blocking; L1 means steering and stop-goal-fit warning only (no quality gate or blocking config protection). The [Runtime Hook Surface spec](docs/spec/runtime-hook-surface.md) defines the levels and names every hook-surface gap explicitly.
|
|
49
|
+
|
|
50
|
+
**Full support — L2 (all four policies, blocking)**
|
|
51
|
+
|
|
52
|
+
| Runtime | Ships | Tested |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| Claude Code | install + hooks + bundle | 77 integration + 36 static assertions — reference implementation |
|
|
55
|
+
| Codex | install + hooks + bundle | 77 integration + 36 static assertions — reference implementation |
|
|
56
|
+
| Kiro | install + hooks + bundle | included in bundle assertions |
|
|
57
|
+
|
|
58
|
+
**Partial support — L1 (steering + stop-goal-fit warning)**
|
|
59
|
+
|
|
60
|
+
| Runtime | Ships | Gap | Tested |
|
|
61
|
+
| --- | --- | --- | --- |
|
|
62
|
+
| opencode | `.opencode/agents/`, `.opencode/skills/`, `.opencode/plugins/flow-agents.js`, `opencode.json` | No prompt-submit hook; steering wired to `session.created` + `tool.execute.before` | included in bundle assertions |
|
|
63
|
+
| pi | `.pi/extensions/flow-agents.ts`, `.pi/skills/`, `AGENTS.md` | No stop hook; stop-goal-fit unavailable | included in bundle assertions |
|
|
64
|
+
|
|
65
|
+
**Other**
|
|
66
|
+
|
|
67
|
+
| Tier | Runtime | Ships | Tested |
|
|
68
|
+
| --- | --- | --- | --- |
|
|
69
|
+
| Official framework adapter | AWS Strands (Python) | `integrations/strands/` — `flow-agents-strands` PyPI package | 50 unit tests (no Strands SDK required) — spike/preview, see [integrations/strands/README.md](integrations/strands/README.md) |
|
|
70
|
+
| Conformance-certified | Community / third-party | Self-certify using the conformance kit | Conformance kit in development; not yet shipped |
|
|
32
71
|
|
|
33
72
|
## Install
|
|
34
73
|
|
|
35
74
|
```bash
|
|
36
|
-
# guided install into your workspace
|
|
75
|
+
# guided install into your workspace (auto-detects runtime)
|
|
37
76
|
npx @kontourai/flow-agents init --dest /path/to/workspace
|
|
38
77
|
|
|
39
78
|
# headless, for CI or scripts
|
|
40
79
|
npx @kontourai/flow-agents init --dest /path/to/workspace --telemetry-sink local-files --yes
|
|
41
80
|
|
|
42
|
-
#
|
|
81
|
+
# runtime-specific wiring
|
|
82
|
+
npx @kontourai/flow-agents init --runtime claude-code --dest /path/to/workspace --yes
|
|
43
83
|
npx @kontourai/flow-agents init --runtime codex --dest /path/to/workspace --activate-kits --yes
|
|
84
|
+
npx @kontourai/flow-agents init --runtime opencode --dest /path/to/workspace --yes
|
|
85
|
+
npx @kontourai/flow-agents init --runtime pi --dest /path/to/workspace --yes
|
|
44
86
|
```
|
|
45
87
|
|
|
46
|
-
Working from a checkout (for contributors)
|
|
88
|
+
Working from a checkout (for contributors): `npm install && npm run build`, then `node build/src/cli.js init --dest /path/to/workspace`.
|
|
47
89
|
|
|
48
90
|
The installer copies the bundled agents, skills, context, scripts, evals, Flow Kit assets, and the Flow Agents-owned `console.telemetry.json` descriptor into the target workspace. Telemetry writes to local files by default; optional sinks mirror it to a local, hosted, or self-hosted Kontour Console (`--telemetry-sink local-kontour-console | kontour-hosted-console | user-hosted-console --console-url …`).
|
|
49
91
|
|
|
50
|
-
|
|
92
|
+
`bash install.sh` is the low-level option for CI pipelines or scripts that already have a generated bundle checkout (e.g. from a pinned `git clone` of this repo). Prefer `npx @kontourai/flow-agents init` for normal workspace setup — it fetches the latest published bundle and auto-detects the runtime:
|
|
51
93
|
|
|
52
94
|
```bash
|
|
53
95
|
bash install.sh /path/to/workspace --telemetry-sink local-kontour-console
|
|
@@ -61,19 +103,39 @@ After installing, ask the agent for the workflow you want — in plain language:
|
|
|
61
103
|
Use Builder Kit shape for this feature idea and create executable GitHub issues.
|
|
62
104
|
```
|
|
63
105
|
|
|
64
|
-
```text
|
|
65
|
-
Use pull-work, select the next ready issue, and hand it to plan-work.
|
|
66
|
-
```
|
|
67
|
-
|
|
68
106
|
```text
|
|
69
107
|
Use deliver for this issue. Plan it, execute it, verify it, and stop if evidence is missing.
|
|
70
108
|
```
|
|
71
109
|
|
|
72
|
-
|
|
73
|
-
|
|
110
|
+
The [Workflow Usage Guide](docs/workflow-usage-guide.md) has example prompts and expected behavior for every stage — `pull-work`, `plan-work`, `execute-plan`, `review-work`, `verify-work`, `fix-bug`, `release-readiness`, and more. The [Agent System Guidebook](docs/agent-system-guidebook.md) is the plain-language map of how the pieces fit.
|
|
111
|
+
|
|
112
|
+
## Flow Kits
|
|
113
|
+
|
|
114
|
+
A Flow Kit is a portable workflow bundle: a `kit.json` manifest, one or more Flow Definitions, and optional skills, docs, adapters, evals, and assets — all validated and installed as a unit. Kits are the extension model for Flow Agents: they let you package a workflow once and deploy it into any workspace through the same path as the built-in workflows.
|
|
115
|
+
|
|
116
|
+
**Builder Kit** is the first Kontour-authored kit. It ships with `builder.shape` (shape a problem into slices and fileable work items) and `builder.build` (pull ready work through design probing, planning, execution, verification, PR readiness, merge readiness, and learning). Builder Kit is installed automatically by `npx @kontourai/flow-agents init`.
|
|
117
|
+
|
|
118
|
+
Install a local kit:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx @kontourai/flow-agents flow-kit install-local path/to/my-kit --dest /path/to/workspace
|
|
74
122
|
```
|
|
75
123
|
|
|
76
|
-
|
|
124
|
+
- [Kit Authoring Guide](docs/kit-authoring-guide.md) — build your own kit from scratch: directory layout, `kit.json`, a flow file, validation, install, and activation.
|
|
125
|
+
- [Flow Kit Repository Contract](docs/flow-kit-repository-contract.md) — the full validation rules, registry schema, and activation diagnostics.
|
|
126
|
+
|
|
127
|
+
## Framework adapters
|
|
128
|
+
|
|
129
|
+
The same canonical policies that wire into coding-agent harnesses via file-based hook scripts can also wire into agent frameworks as in-process language-native packages.
|
|
130
|
+
|
|
131
|
+
`integrations/strands/` contains `flow-agents-strands`, a Python package implementing a Strands `HookProvider` that:
|
|
132
|
+
- emits the canonical telemetry taxonomy (`agentSpawn`, `preToolUse`, `postToolUse`, `stop`, etc.) to the same JSONL format as the harness adapters
|
|
133
|
+
- enforces config protection via `BeforeToolCallEvent` cancellation (the Strands equivalent of a blocking `preToolUse` hook)
|
|
134
|
+
- injects workflow steering context at agent construction via `steering_context()`
|
|
135
|
+
|
|
136
|
+
This is a spike/preview — 50 unit tests pass without requiring the Strands SDK, and the README documents 7 limitations honestly. It demonstrates that the policy engine is not harness-specific.
|
|
137
|
+
|
|
138
|
+
The [Runtime Hook Surface spec](docs/spec/runtime-hook-surface.md) documents the full framework adapter mapping, including VoltAgent, LangGraph, and OpenAI Agents SDK hook surfaces, and the minimum viable adapter pseudocode.
|
|
77
139
|
|
|
78
140
|
## Where Flow Agents fits
|
|
79
141
|
|
|
@@ -4,7 +4,7 @@ import * as path from "node:path";
|
|
|
4
4
|
import { parseArgs, flagBool, flagString } from "../lib/args.js";
|
|
5
5
|
import { assertPathContained, copyDir, isoNow, readJson, walkFiles, writeJson } from "../lib/fs.js";
|
|
6
6
|
import { assertKitRepository } from "../flow-kit/validate.js";
|
|
7
|
-
import { activateCodexLocal } from "../runtime-adapters.js";
|
|
7
|
+
import { activateCodexLocal, activateStrandsLocal } from "../runtime-adapters.js";
|
|
8
8
|
const REGISTRY_REL = path.join("kits", "local", "installed-kits.json");
|
|
9
9
|
const REPOSITORIES_REL = path.join("kits", "local", "repositories");
|
|
10
10
|
function registryPath(dest) { return path.join(dest, REGISTRY_REL); }
|
|
@@ -108,16 +108,21 @@ function status(argv) {
|
|
|
108
108
|
}
|
|
109
109
|
return 0;
|
|
110
110
|
}
|
|
111
|
+
// Available adapters for the activate subcommand (Issue #32: added strands-local).
|
|
112
|
+
const AVAILABLE_ADAPTERS = ["codex-local", "strands-local"];
|
|
111
113
|
function activate(argv) {
|
|
112
114
|
const args = parseArgs(argv);
|
|
113
115
|
const dest = path.resolve(flagString(args.flags, "dest", ".") ?? ".");
|
|
114
116
|
const sourceRoot = path.resolve(flagString(args.flags, "source-root", path.resolve(path.dirname(process.argv[1]), "..")) ?? ".");
|
|
115
117
|
const adapter = flagString(args.flags, "adapter");
|
|
116
|
-
if (adapter && adapter
|
|
117
|
-
console.log(JSON.stringify({ selected_adapter: null, available_adapters:
|
|
118
|
+
if (adapter && !AVAILABLE_ADAPTERS.includes(adapter)) {
|
|
119
|
+
console.log(JSON.stringify({ selected_adapter: null, available_adapters: AVAILABLE_ADAPTERS, supported_asset_classes: [], generated_runtime_files: [], skipped_assets: [], warnings: [], errors: [`unknown runtime adapter '${adapter}'; available adapters: ${AVAILABLE_ADAPTERS.join(", ")}`] }, null, 2));
|
|
118
120
|
return 2;
|
|
119
121
|
}
|
|
120
|
-
|
|
122
|
+
// Default to codex-local for backward compatibility; strands-local is opt-in via --adapter.
|
|
123
|
+
const result = adapter === "strands-local"
|
|
124
|
+
? activateStrandsLocal(sourceRoot, dest)
|
|
125
|
+
: activateCodexLocal(sourceRoot, dest);
|
|
121
126
|
console.log(JSON.stringify(result, null, 2));
|
|
122
127
|
return Array.isArray(result.errors) && result.errors.length ? 1 : 0;
|
|
123
128
|
}
|