@hassangameryt/freeflow 0.4.0 → 0.6.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -1
- package/.codex-plugin/plugin.json +2 -1
- package/README.md +150 -155
- package/capabilities/cognitive-routing/SKILL.md +229 -0
- package/capabilities/context-virtualization/SKILL.md +103 -0
- package/capabilities/conversation-history/SKILL.md +53 -0
- package/command-surface.json +17 -13
- package/hooks/freeflow-runtime-context.mjs +393 -159
- package/hooks/hooks.json +26 -1
- package/hooks/tests/check-runtime-context-hook.sh +223 -54
- package/package.json +25 -16
- package/pi-extension/dist/cognitive-routing/commands.js +96 -0
- package/pi-extension/dist/cognitive-routing/config.js +236 -0
- package/pi-extension/dist/cognitive-routing/controller.js +862 -0
- package/pi-extension/dist/cognitive-routing/history.js +439 -0
- package/pi-extension/dist/cognitive-routing/host.js +126 -0
- package/pi-extension/dist/cognitive-routing/runtime.js +43 -0
- package/pi-extension/dist/cognitive-routing/tool.js +211 -0
- package/pi-extension/dist/cognitive-routing/types.js +6 -0
- package/pi-extension/dist/context-virtualization/commands.js +89 -0
- package/pi-extension/dist/context-virtualization/projector.js +42 -0
- package/pi-extension/dist/context-virtualization/runtime.js +356 -0
- package/pi-extension/dist/context-virtualization/state.js +57 -0
- package/pi-extension/dist/context-virtualization/types.js +10 -0
- package/pi-extension/dist/conversation-history/passages.js +66 -0
- package/pi-extension/dist/conversation-history/ranking.js +105 -0
- package/pi-extension/dist/conversation-history/runtime.js +226 -0
- package/pi-extension/dist/conversation-history/search.js +56 -0
- package/pi-extension/dist/conversation-history/types.js +1 -0
- package/pi-extension/dist/freeflow-context/resolver.js +120 -0
- package/pi-extension/dist/freeflow-context/runtime.js +80 -0
- package/pi-extension/dist/freeflow-context/source-projector.js +95 -0
- package/pi-extension/dist/freeflow-context/tool.js +308 -0
- package/pi-extension/dist/freeflow-context/types.js +12 -0
- package/pi-extension/dist/freeflow-context/visibility.js +28 -0
- package/pi-extension/dist/index.js +516 -98
- package/pi-extension/dist/runtime/runtime-context.js +318 -271
- package/pi-extension/dist/runtime/runtime-identity.js +5 -0
- package/pi-extension/dist/settings/settings-tui.js +78 -0
- package/pi-extension/dist/settings/settings-ui.js +593 -563
- package/pi-extension/dist/ui/text-component.js +57 -0
- package/pi-extension/src/cognitive-routing/commands.ts +119 -0
- package/pi-extension/src/cognitive-routing/config.ts +307 -0
- package/pi-extension/src/cognitive-routing/controller.ts +1118 -0
- package/pi-extension/src/cognitive-routing/history.ts +638 -0
- package/pi-extension/src/cognitive-routing/host.ts +172 -0
- package/pi-extension/src/cognitive-routing/runtime.ts +57 -0
- package/pi-extension/src/cognitive-routing/tool.ts +272 -0
- package/pi-extension/src/cognitive-routing/types.ts +89 -0
- package/pi-extension/src/context-virtualization/commands.ts +111 -0
- package/pi-extension/src/context-virtualization/projector.ts +62 -0
- package/pi-extension/src/context-virtualization/runtime.ts +406 -0
- package/pi-extension/src/context-virtualization/state.ts +79 -0
- package/pi-extension/src/context-virtualization/types.ts +92 -0
- package/pi-extension/src/conversation-history/passages.ts +81 -0
- package/pi-extension/src/conversation-history/ranking.ts +155 -0
- package/pi-extension/src/conversation-history/runtime.ts +250 -0
- package/pi-extension/src/conversation-history/search.ts +79 -0
- package/pi-extension/src/conversation-history/types.ts +31 -0
- package/pi-extension/src/freeflow-context/resolver.ts +139 -0
- package/pi-extension/src/freeflow-context/runtime.ts +100 -0
- package/pi-extension/src/freeflow-context/source-projector.ts +106 -0
- package/pi-extension/src/freeflow-context/tool.ts +360 -0
- package/pi-extension/src/freeflow-context/types.ts +70 -0
- package/pi-extension/src/freeflow-context/visibility.ts +53 -0
- package/pi-extension/src/index.ts +553 -101
- package/pi-extension/src/runtime/runtime-context.ts +339 -281
- package/pi-extension/src/runtime/runtime-identity.ts +8 -0
- package/pi-extension/src/settings/settings-tui.ts +93 -0
- package/pi-extension/src/settings/settings-ui.ts +700 -613
- package/pi-extension/src/ui/text-component.ts +66 -0
- package/pi-extension/tests/cognitive-routing/commands.test.js +134 -0
- package/pi-extension/tests/cognitive-routing/controller.test.js +1099 -0
- package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +1071 -0
- package/pi-extension/tests/cognitive-routing/history.test.js +274 -0
- package/pi-extension/tests/cognitive-routing/host-fixture.js +4 -0
- package/pi-extension/tests/cognitive-routing/host-identity.test.js +63 -0
- package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +236 -0
- package/pi-extension/tests/cognitive-routing/tool.test.js +230 -0
- package/pi-extension/tests/context-virtualization/extension.test.js +749 -0
- package/pi-extension/tests/context-virtualization/projector.test.js +110 -0
- package/pi-extension/tests/context-virtualization/runtime.test.js +216 -0
- package/pi-extension/tests/conversation-history/runtime.test.js +98 -0
- package/pi-extension/tests/conversation-history/search.test.js +97 -0
- package/pi-extension/tests/integration/pi-extension.test.js +928 -2047
- package/pi-extension/tests/integration/prompt-architecture.test.js +305 -0
- package/runtime/prompts/cognitive-routing.md +9 -0
- package/runtime/prompts/context-virtualization.md +3 -0
- package/runtime/prompts/conversation-history.md +3 -0
- package/runtime/prompts/core.md +13 -0
- package/runtime/prompts/interaction-contract.md +7 -0
- package/runtime/prompts/skills.md +65 -0
- package/skills/action-selection/SKILL.md +91 -0
- package/skills/bypass/SKILL.md +3 -2
- package/skills/commit-work/SKILL.md +1 -1
- package/skills/commit-work/references/staging-decisions.md +1 -1
- package/skills/decision-gate/SKILL.md +1 -1
- package/skills/design-for-depth/SKILL.md +14 -33
- package/skills/design-for-depth/references/design-pressure-signals.md +1 -1
- package/skills/design-for-depth/references/interface-design-loop.md +1 -1
- package/skills/design-for-depth/references/software-design-philosophy.md +1 -1
- package/skills/diagnose-failure/SKILL.md +20 -14
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +1 -3
- package/skills/diagnose-failure/references/{flaky-and-performance.md → flaky-and-performance-diagnosis.md} +1 -1
- package/skills/discuss/SKILL.md +34 -22
- package/skills/discuss/references/discussion-continuity.md +71 -0
- package/skills/evaluate-skill/SKILL.md +5 -5
- package/skills/evaluate-skill/references/{definition-schema.md → evaluation-definition-schema.md} +42 -2
- package/skills/evaluate-skill/references/execution-and-evidence.md +8 -3
- package/skills/evaluate-skill/scripts/lib/definitions.mjs +114 -3
- package/skills/evaluate-skill/scripts/lib/grade-interaction.mjs +156 -1
- package/skills/evaluate-skill/scripts/lib/grade.mjs +9 -1
- package/skills/evaluate-skill/scripts/lib/pi.mjs +147 -32
- package/skills/evaluate-skill/scripts/lib/rpc.mjs +4 -4
- package/skills/evaluate-skill/scripts/lib/runner.mjs +36 -14
- package/skills/evaluate-skill/scripts/lib/sandbox.mjs +92 -0
- package/skills/evaluate-skill/scripts/pi-guard.mjs +1 -1
- package/skills/evaluate-skill/scripts/pi-observer.mjs +66 -0
- package/skills/evaluate-skill/scripts/skill-eval.mjs +6 -5
- package/skills/execute-work/SKILL.md +18 -15
- package/skills/execute-work/references/code-practices.md +1 -1
- package/skills/execute-work/references/execute-work-edges.md +42 -0
- package/skills/finish-branch/SKILL.md +2 -2
- package/skills/finish-branch/references/integration-options.md +1 -1
- package/skills/handoff/SKILL.md +3 -3
- package/skills/launch-work/SKILL.md +1 -1
- package/skills/launch-work/references/launch-readiness.md +2 -2
- package/skills/migration-work/SKILL.md +2 -2
- package/skills/migration-work/references/migration-lifecycle.md +1 -1
- package/skills/mode-contract/SKILL.md +32 -10
- package/skills/release-work/SKILL.md +1 -1
- package/skills/release-work/references/release-evidence.md +1 -1
- package/skills/review-artifact/SKILL.md +28 -26
- package/skills/review-work/SKILL.md +28 -26
- package/skills/review-work/references/{reviewer-prompt.md → independent-work-reviewer-contract.md} +1 -1
- package/skills/review-work/references/security-risk-lens.md +1 -1
- package/skills/setup-freeflow/SKILL.md +6 -10
- package/skills/setup-freeflow/references/activation-contract.md +5 -10
- package/skills/setup-freeflow/references/host-setup.md +3 -7
- package/skills/simplify-code/SKILL.md +1 -1
- package/skills/simplify-code/references/simplification-patterns.md +1 -1
- package/skills/tdd/SKILL.md +18 -38
- package/skills/tdd/references/test-design.md +2 -2
- package/skills/track-work/SKILL.md +362 -58
- package/skills/track-work/scripts/lib/codec.mjs +570 -0
- package/skills/track-work/scripts/lib/commands.mjs +568 -0
- package/skills/track-work/scripts/lib/contract.mjs +303 -0
- package/skills/track-work/scripts/lib/model.mjs +506 -0
- package/skills/track-work/scripts/lib/operations.mjs +965 -0
- package/skills/track-work/scripts/lib/record-store.mjs +264 -0
- package/skills/track-work/scripts/lib/result.mjs +37 -0
- package/skills/track-work/scripts/lib/rewrites.mjs +740 -0
- package/skills/track-work/scripts/lib/schema.mjs +277 -0
- package/skills/track-work/scripts/lib/source-inventory.mjs +162 -0
- package/skills/track-work/scripts/lib/views.mjs +443 -0
- package/skills/track-work/scripts/lib/workspace.mjs +134 -0
- package/skills/track-work/scripts/working-record.mjs +122 -0
- package/skills/verify-work/SKILL.md +14 -2
- package/skills/verify-work/references/browser-runtime-evidence.md +1 -1
- package/skills/verify-work/references/integration-evidence.md +1 -1
- package/skills/verify-work/references/performance-evidence.md +1 -1
- package/skills/workflow/SKILL.md +105 -53
- package/skills/workflow/references/domain-skill-composition.md +22 -42
- package/skills/write-plan/SKILL.md +1 -1
- package/skills/write-skill/SKILL.md +3 -2
- package/skills/write-skill/references/progressive-disclosure.md +17 -3
- package/pi-extension/dist/output-router/host-producer-identification.js +0 -232
- package/pi-extension/dist/output-router/native-safety-net.js +0 -216
- package/pi-extension/dist/output-router/observed-tool-routing.js +0 -122
- package/pi-extension/dist/output-router/renderers.js +0 -1023
- package/pi-extension/dist/output-router/router-tools.js +0 -554
- package/pi-extension/dist/output-router/schemas.js +0 -383
- package/pi-extension/dist/output-router/status.js +0 -744
- package/pi-extension/dist/output-router/utils.js +0 -502
- package/pi-extension/src/output-router/host-producer-identification.ts +0 -256
- package/pi-extension/src/output-router/native-safety-net.ts +0 -248
- package/pi-extension/src/output-router/observed-tool-routing.ts +0 -134
- package/pi-extension/src/output-router/renderers.ts +0 -1108
- package/pi-extension/src/output-router/router-tools.ts +0 -579
- package/pi-extension/src/output-router/schemas.ts +0 -387
- package/pi-extension/src/output-router/status.ts +0 -791
- package/pi-extension/src/output-router/utils.ts +0 -554
- package/pi-extension/tests/output-router/observed-producers.test.js +0 -132
- package/pi-extension/tests/output-router/search.test.js +0 -722
- package/router/dist/benchmarks/benchmark-harness.d.ts +0 -35
- package/router/dist/benchmarks/benchmark-harness.js +0 -92
- package/router/dist/benchmarks/benchmarks.d.ts +0 -109
- package/router/dist/benchmarks/benchmarks.js +0 -979
- package/router/dist/benchmarks/codex-qa-benchmarks.d.ts +0 -95
- package/router/dist/benchmarks/codex-qa-benchmarks.js +0 -500
- package/router/dist/benchmarks/command-benchmarks.d.ts +0 -143
- package/router/dist/benchmarks/command-benchmarks.js +0 -698
- package/router/dist/benchmarks/context-mode-normalized-benchmarks.d.ts +0 -82
- package/router/dist/benchmarks/context-mode-normalized-benchmarks.js +0 -773
- package/router/dist/benchmarks/context-mode-real-deep-benchmark.d.ts +0 -132
- package/router/dist/benchmarks/context-mode-real-deep-benchmark.js +0 -1380
- package/router/dist/benchmarks/context-saving-baseline.d.ts +0 -60
- package/router/dist/benchmarks/context-saving-baseline.js +0 -470
- package/router/dist/benchmarks/index-benchmarks.d.ts +0 -103
- package/router/dist/benchmarks/index-benchmarks.js +0 -862
- package/router/dist/benchmarks/storage-policy-benchmarks.d.ts +0 -101
- package/router/dist/benchmarks/storage-policy-benchmarks.js +0 -618
- package/router/dist/benchmarks/vault-index-benchmarks.d.ts +0 -56
- package/router/dist/benchmarks/vault-index-benchmarks.js +0 -322
- package/router/dist/config/config.d.ts +0 -103
- package/router/dist/config/config.js +0 -632
- package/router/dist/config/router-contract.d.ts +0 -10
- package/router/dist/config/router-contract.js +0 -54
- package/router/dist/config/schema.d.ts +0 -27
- package/router/dist/config/schema.js +0 -648
- package/router/dist/config/types.d.ts +0 -573
- package/router/dist/config/types.js +0 -41
- package/router/dist/evidence/bounded-evidence.d.ts +0 -40
- package/router/dist/evidence/bounded-evidence.js +0 -323
- package/router/dist/evidence/evidence-range-selector.d.ts +0 -24
- package/router/dist/evidence/evidence-range-selector.js +0 -232
- package/router/dist/evidence/evidence-search.d.ts +0 -27
- package/router/dist/evidence/evidence-search.js +0 -490
- package/router/dist/evidence/evidence.d.ts +0 -38
- package/router/dist/evidence/evidence.js +0 -200
- package/router/dist/evidence/failure-contracts.d.ts +0 -37
- package/router/dist/evidence/failure-contracts.js +0 -166
- package/router/dist/evidence/line-ranges.d.ts +0 -24
- package/router/dist/evidence/line-ranges.js +0 -22
- package/router/dist/experiments/local-index.d.ts +0 -64
- package/router/dist/experiments/local-index.js +0 -581
- package/router/dist/index.d.ts +0 -30
- package/router/dist/index.js +0 -32
- package/router/dist/local/local-traversal.d.ts +0 -18
- package/router/dist/local/local-traversal.js +0 -334
- package/router/dist/processing/engine.d.ts +0 -132
- package/router/dist/processing/engine.js +0 -533
- package/router/dist/processing/reducers.d.ts +0 -280
- package/router/dist/processing/reducers.js +0 -1673
- package/router/dist/processing/renderers.d.ts +0 -31
- package/router/dist/processing/renderers.js +0 -195
- package/router/dist/processing/scripts.d.ts +0 -91
- package/router/dist/processing/scripts.js +0 -386
- package/router/dist/repo/repo-traversal.d.ts +0 -18
- package/router/dist/repo/repo-traversal.js +0 -245
- package/router/dist/routing/observed-reducers.d.ts +0 -41
- package/router/dist/routing/observed-reducers.js +0 -661
- package/router/dist/routing/observed-routing.d.ts +0 -26
- package/router/dist/routing/observed-routing.js +0 -378
- package/router/dist/routing/parsers.d.ts +0 -16
- package/router/dist/routing/parsers.js +0 -521
- package/router/dist/routing/run-filters.d.ts +0 -60
- package/router/dist/routing/run-filters.js +0 -238
- package/router/dist/routing/run-reducers.d.ts +0 -49
- package/router/dist/routing/run-reducers.js +0 -122
- package/router/dist/sandbox/adapter-roots.d.ts +0 -46
- package/router/dist/sandbox/adapter-roots.js +0 -66
- package/router/dist/sandbox/eryx-python-adapter.d.ts +0 -13
- package/router/dist/sandbox/eryx-python-adapter.js +0 -868
- package/router/dist/sandbox/jq-wasm-adapter.d.ts +0 -9
- package/router/dist/sandbox/jq-wasm-adapter.js +0 -429
- package/router/dist/sandbox/quickjs-wasi-adapter.d.ts +0 -13
- package/router/dist/sandbox/quickjs-wasi-adapter.js +0 -384
- package/router/dist/sandbox/script-sandbox.d.ts +0 -134
- package/router/dist/sandbox/script-sandbox.js +0 -337
- package/router/dist/setup/script-transform-adapters.d.ts +0 -32
- package/router/dist/setup/script-transform-adapters.js +0 -278
- package/router/dist/tools/batch.d.ts +0 -33
- package/router/dist/tools/batch.js +0 -586
- package/router/dist/tools/run.d.ts +0 -62
- package/router/dist/tools/run.js +0 -1304
- package/router/dist/tools/search.d.ts +0 -66
- package/router/dist/tools/search.js +0 -1364
- package/router/dist/transform/engine.d.ts +0 -168
- package/router/dist/transform/engine.js +0 -2072
- package/router/dist/vault/vault-index.d.ts +0 -125
- package/router/dist/vault/vault-index.js +0 -416
- package/router/dist/vault/vault.d.ts +0 -138
- package/router/dist/vault/vault.js +0 -630
- package/runtime/interaction-contract.md +0 -16
- package/skills/discuss/references/checkpoints.md +0 -66
- package/skills/execute-work/references/execution-loop.md +0 -77
- package/skills/output-router/SKILL.md +0 -206
- package/skills/output-router/references/safety-policy.md +0 -40
- package/skills/setup-freeflow/references/output-router-setup.md +0 -110
- package/skills/track-work/references/working-record-schema.md +0 -378
- package/skills/workflow/references/workflow-loop.md +0 -92
- /package/skills/handoff/references/{templates.md → handoff-templates.md} +0 -0
- /package/skills/review-artifact/references/{reviewer-prompt.md → independent-artifact-reviewer-contract.md} +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Execute Work Loop
|
|
2
|
-
|
|
3
|
-
Read this when execution spans multiple bounded actions or slices, resumes from prior state, needs a specialized method, reaches a selected checkpoint, or reveals follow-on work. [Execute Work](../SKILL.md) owns the normal method; this reference expands its directed routes.
|
|
4
|
-
|
|
5
|
-
## Directed Execution Graph
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
[Requested or approved concrete work; effective mode permits mutation]
|
|
9
|
-
-> [Orient]
|
|
10
|
-
source + authority + live state + current slice + stop conditions
|
|
11
|
-
-> [Choose one bounded action]
|
|
12
|
-
-> [Load one needed method or reference]
|
|
13
|
-
-> [Execute]
|
|
14
|
-
-> [Test or observe]
|
|
15
|
-
-> [Verify the claim at its required boundary]
|
|
16
|
-
-> clear local defect
|
|
17
|
-
-> [Correct within authority]
|
|
18
|
-
-> [Test or observe]
|
|
19
|
-
-> unclear or repeated failure
|
|
20
|
-
-> [Diagnose Failure]
|
|
21
|
-
-> [Workflow routes from the cause]
|
|
22
|
-
-> contradicted, inconclusive, or route-changing evidence
|
|
23
|
-
-> [Workflow]
|
|
24
|
-
-> supported
|
|
25
|
-
-> [Silent self-review]
|
|
26
|
-
-> [Correct clear local issue and re-verify, or freeze]
|
|
27
|
-
-> [Route from the supported state]
|
|
28
|
-
-> more accepted work for the same coherent result
|
|
29
|
-
-> [Choose the next bounded action]
|
|
30
|
-
-> accepted extension to result / scope / authority / evidence / stop conditions
|
|
31
|
-
-> [Record write-ahead when a Working Record exists]
|
|
32
|
-
-> [Choose the next bounded action]
|
|
33
|
-
-> distinct result, authority, or independently useful evidence boundary
|
|
34
|
-
-> [Workflow establishes current slice outcome]
|
|
35
|
-
-> [Select a new authorized slice; use Track Work when present]
|
|
36
|
-
-> approved checkpoint due
|
|
37
|
-
-> [Use checkpoint owner]
|
|
38
|
-
-> [Return its result to Workflow]
|
|
39
|
-
-> unapproved follow-on work
|
|
40
|
-
-> [Recommend exact scope and wait]
|
|
41
|
-
-> supported pause or exit
|
|
42
|
-
-> [Preserve state and report]
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The graph may recur many times inside one Track Work slice. An action, verification run, self-review, review report, or owning-skill call does not create or close a slice by itself.
|
|
46
|
-
|
|
47
|
-
## Select A Method For The Action
|
|
48
|
-
|
|
49
|
-
Use only the method needed by the concrete boundary:
|
|
50
|
-
|
|
51
|
-
- Use [TDD](../../tdd/SKILL.md) for test-first behavior work. Read [Test Design](../../tdd/references/test-design.md) when the test seam, oracle, double, or composed failure is unclear.
|
|
52
|
-
- Use [Simplify Code](../../simplify-code/SKILL.md) for behavior-preserving simplification. Read [Simplification Patterns](../../simplify-code/references/simplification-patterns.md) when choosing or judging a transformation.
|
|
53
|
-
- Use [Design for Depth](../../design-for-depth/SKILL.md) when direct evidence shows design-bearing ownership, interface, state, failure-unit, or coordination pressure. Read [Design Pressure Signals](../../design-for-depth/references/design-pressure-signals.md) or the [Interface Design Loop](../../design-for-depth/references/interface-design-loop.md) only when their deeper branch applies.
|
|
54
|
-
- Use [Diagnose Failure](../../diagnose-failure/SKILL.md) when a failure lacks a supported cause. Read the [Diagnostic Loop Catalog](../../diagnose-failure/references/diagnostic-loop-catalog.md) when choosing a reproduction or distinguishing observation, or [Flaky and Performance Diagnosis](../../diagnose-failure/references/flaky-and-performance.md) for those failure types.
|
|
55
|
-
|
|
56
|
-
Do not stack methods because several descriptions match. Keep one execution owner and add only the lenses or evidence methods the current action requires.
|
|
57
|
-
|
|
58
|
-
## Route Selected Checkpoints
|
|
59
|
-
|
|
60
|
-
A user-approved Plan or explicit discussion may select review, local commit, user-decision, or continuity checkpoints. When one becomes due, do not begin the next bounded action first. Use its owner and return the result to Workflow. If its conditions no longer hold, return the deviation rather than forcing the checkpoint.
|
|
61
|
-
|
|
62
|
-
Use these separately controlled routes only when already requested or approved:
|
|
63
|
-
|
|
64
|
-
- [Commit Work](../../commit-work/SKILL.md), with [Staging Decisions](../../commit-work/references/staging-decisions.md) for mixed changed state;
|
|
65
|
-
- [Migration Work](../../migration-work/SKILL.md), with the [Migration Lifecycle](../../migration-work/references/migration-lifecycle.md) for migration units, compatibility, cutover, recovery, or removal proof;
|
|
66
|
-
- [Finish Branch](../../finish-branch/SKILL.md), with [Integration Options](../../finish-branch/references/integration-options.md) for merge, pull request, preservation, or discard;
|
|
67
|
-
- [Release Work](../../release-work/SKILL.md), with [Release Evidence](../../release-work/references/release-evidence.md) for source, version, artifact, tag, publication, or consumer identity;
|
|
68
|
-
- [Launch Work](../../launch-work/SKILL.md), with [Launch Readiness](../../launch-work/references/launch-readiness.md) for production evidence, rollout, signals, or recovery;
|
|
69
|
-
- [Handoff](../../handoff/SKILL.md), with [Handoff Templates](../../handoff/references/templates.md) after destination and purpose are clear.
|
|
70
|
-
|
|
71
|
-
A checkpoint result may support continuation, correction, another route, deferment, or stopping. It does not authorize the next lifecycle stage automatically.
|
|
72
|
-
|
|
73
|
-
## Resume Or Return
|
|
74
|
-
|
|
75
|
-
When resuming, reopen the source that established the work and inspect live state. If a Working Record exists, read its complete current context and slice through [Track Work](../../track-work/SKILL.md); do not reconstruct authority or progress from a summary alone.
|
|
76
|
-
|
|
77
|
-
Continue only while accepted authority and evidence support the execution basis. Return to [Workflow](../../workflow/SKILL.md) when direction, authority, scope, source truth, strategy, or the intended result changes, or when no worthwhile safe continuation remains.
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: output-router
|
|
3
|
-
description: Use after the Workflow, Decision Gate, or Discuss route is clear when choosing between native tools and Freeflow routed tools, retrieving repo/local/vault evidence, transforming bounded evidence, handling unknown-size or broad output, running likely-large/noisy commands, recovering vaulted output, tuning outputRouter/observedRouting/scriptTransform after setup, or handling optional native read/bash safety-net routing.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Output Router
|
|
7
|
-
|
|
8
|
-
Choose how evidence moves into context.
|
|
9
|
-
|
|
10
|
-
Freeflow tools are the safe first choice for unknown-size, exploratory, repo-wide, generated/log-adjacent, structured, or likely noisy output, including broad `rg`/`find`/`git`/help/docs scans. Native tools stay direct for known-small, exact, intentionally raw, or mutating work. A post-hoc cap such as `head`, `sed -n`, `tail`, or `wc` does not make a broad producer known-small.
|
|
11
|
-
|
|
12
|
-
Output Router does not classify the task. Workflow, Decision Gate, or Discuss decides whether to answer, ask, explore, plan, or stop. Output Router starts after that route is clear.
|
|
13
|
-
|
|
14
|
-
## First Decision
|
|
15
|
-
|
|
16
|
-
Ask what kind of data you need:
|
|
17
|
-
|
|
18
|
-
- Existing repo, explicit local, or vault data: use `freeflow_search`.
|
|
19
|
-
- New command or script-produced output: use `freeflow_run`.
|
|
20
|
-
- Several independent Freeflow operations: use `freeflow_batch`.
|
|
21
|
-
- Config/status/vault/script-adapter facts: use `freeflow_status`.
|
|
22
|
-
- Enabled MCP/web/fetch/code-search output: call the host tool directly; Pi observed routing runs after the host result when configured.
|
|
23
|
-
- Known whole file, intentionally exact shell behavior, cmux/Pi control probes, explicit fallback after a routed-source limitation, or edits: use native `read`, `bash`, `edit`, or `write`.
|
|
24
|
-
|
|
25
|
-
When unsure how much output will return, use Freeflow first. Bound the producer before using native tools; do not rely on trimming the output after a broad command runs.
|
|
26
|
-
|
|
27
|
-
## `freeflow_search`: Existing Data
|
|
28
|
-
|
|
29
|
-
Use `freeflow_search` for repo files, explicit external local files, and vaulted output that already exists.
|
|
30
|
-
|
|
31
|
-
Actions:
|
|
32
|
-
|
|
33
|
-
- `locate`: find likely paths/output ids first. Use before reading when you only need candidates.
|
|
34
|
-
- `query`: return the best focused evidence packets for a search question.
|
|
35
|
-
- `get`: user gave exact-ish text/code/snippet or asks “where is this?” Find the best match and return source coordinates plus matched content.
|
|
36
|
-
- `retrieve`: you already know the path/outputId and line range. Return those exact lines. Do not use this as search.
|
|
37
|
-
- `expand`: widen a previous evidence packet.
|
|
38
|
-
- `explain`: explain a previous routed decision or vault output/recoverability.
|
|
39
|
-
- `transform`: compute facts or deterministic subsets from repo/local/vault/file/output data.
|
|
40
|
-
|
|
41
|
-
Use `source.kind="repo"` for the current checkout. Use `source.kind="local"` for external local docs/files with an explicit absolute `root` and optional relative `path`; do not put local roots in shared config. Use `source.kind="vault"` for previous Freeflow outputs.
|
|
42
|
-
|
|
43
|
-
Vault search patterns:
|
|
44
|
-
|
|
45
|
-
- Unknown output id: `source.kind="vault"` without `outputId`, plus `query` and optional `filters`.
|
|
46
|
-
- Known output id and unknown line: `action="query"` or `get` with `source.outputId`.
|
|
47
|
-
- Known output id and known line range: `action="retrieve"` with `lineRange`.
|
|
48
|
-
- Metadata-only result: use `action="explain"`; do not claim raw recovery.
|
|
49
|
-
|
|
50
|
-
Use `preserve="full"` only when exact fidelity matters. It still means exact-under-caps, not unlimited context injection.
|
|
51
|
-
|
|
52
|
-
## `freeflow_search action=transform`: Processing Existing Data
|
|
53
|
-
|
|
54
|
-
Use transform when raw data is too large/structured and you need computed facts.
|
|
55
|
-
|
|
56
|
-
Good transform cases:
|
|
57
|
-
|
|
58
|
-
- logs: status counts, error rates, slow examples,
|
|
59
|
-
- JSON/CSV: counts, groupings, top values, extracted fields,
|
|
60
|
-
- test/build/typecheck output already in the vault,
|
|
61
|
-
- MCP/web/fetch/code-search payloads already routed into the vault,
|
|
62
|
-
- deterministic regex filtering, match counts, grouping, dedupe, topN, URL/citation extraction, line/size stats.
|
|
63
|
-
|
|
64
|
-
Prefer deterministic operations when enough:
|
|
65
|
-
|
|
66
|
-
- `regexFilter`, `countMatches`, `jsonExtract`, `groupByRegex`, `dedupe`, `topN`, `extractUrls`, `extractCitations`, `lineStats`, `sizeStats`.
|
|
67
|
-
|
|
68
|
-
Use scripts only when deterministic operations cannot express the fact:
|
|
69
|
-
|
|
70
|
-
- `operation.kind="script"` runs a sandboxed transform over vault sources.
|
|
71
|
-
- `script` without `operation` runs the processing-engine script path over repo/local/vault sources.
|
|
72
|
-
- Sandboxed scripts require `scriptTransform.enabled=true` and a proof-backed adapter.
|
|
73
|
-
- Raw script code is not persisted; metadata stores hashes/labels/limits.
|
|
74
|
-
- No sandboxed script path may silently fall back to host shell execution.
|
|
75
|
-
|
|
76
|
-
Unsafe unsandboxed processing is local-only, explicit per call, and only through the processing script policy. It must say `unsafe/unsandboxed`. Never put that opt-in in shared config.
|
|
77
|
-
|
|
78
|
-
## `freeflow_run`: New Output
|
|
79
|
-
|
|
80
|
-
Use `freeflow_run` when the producer creates new output and routed evidence is enough.
|
|
81
|
-
|
|
82
|
-
Base producers are mutually exclusive:
|
|
83
|
-
|
|
84
|
-
- `command`: shell command through the host-approved runner.
|
|
85
|
-
- `script`: sandboxed code-as-producer with no repo/home/env/network/vault access.
|
|
86
|
-
|
|
87
|
-
Use `command` for:
|
|
88
|
-
|
|
89
|
-
- tests, builds, lint, typecheck, CI-like checks,
|
|
90
|
-
- broad shell search with unknown output size,
|
|
91
|
-
- commands likely to print logs, JSON, status, or diagnostics,
|
|
92
|
-
- commands whose exact raw output may need recovery.
|
|
93
|
-
|
|
94
|
-
Use `script` for:
|
|
95
|
-
|
|
96
|
-
- generating data with code when no repo/home/env/network access is needed,
|
|
97
|
-
- safe code-as-producer execution through the same sandbox engine as transforms,
|
|
98
|
-
- stdout/stderr capture that should route like command output.
|
|
99
|
-
|
|
100
|
-
Do not use `freeflow_run script` when the code needs repo files, environment variables, network, package imports, or host filesystem access. Use a host command intentionally, or transform an explicitly captured source.
|
|
101
|
-
|
|
102
|
-
Run modifiers:
|
|
103
|
-
|
|
104
|
-
- `goal`: tell the router why the run exists, e.g. `verification`, `diagnosis`, `build`, `log analysis`.
|
|
105
|
-
- `filters`: deterministic line filtering over captured stdout/stderr/combined.
|
|
106
|
-
- `scriptFilter`: sandboxed script over already captured stdout/stderr/combined. It never reruns the base producer.
|
|
107
|
-
- `preserve="full"`: request exact output under caps with vault recovery over cap.
|
|
108
|
-
|
|
109
|
-
Run storage:
|
|
110
|
-
|
|
111
|
-
- Default `hybrid-dedupe` stores exact output when exactness-sensitive and metadata-only for small non-sensitive successes.
|
|
112
|
-
- Failures, verification/test/build/typecheck/diagnosis output, `preserve="full"`, filters, script filters, reducers, script producers, and large/noisy output are exactness-sensitive.
|
|
113
|
-
- Exact duplicates may store current metadata pointing to a previous exact `outputId`.
|
|
114
|
-
- Plain metadata-only records get rerun guidance, not exact recovery claims.
|
|
115
|
-
|
|
116
|
-
## `freeflow_batch`: Independent Freeflow Work
|
|
117
|
-
|
|
118
|
-
Use `freeflow_batch` when several Freeflow-owned `run` or `search` steps can happen independently.
|
|
119
|
-
|
|
120
|
-
Good batch cases:
|
|
121
|
-
|
|
122
|
-
- run several bounded searches in parallel,
|
|
123
|
-
- run independent checks and ask `queries[]` to extract facts from child evidence,
|
|
124
|
-
- gather multiple repo/local/vault facts without injecting every child result.
|
|
125
|
-
|
|
126
|
-
Do not use batch for:
|
|
127
|
-
|
|
128
|
-
- sequenced workflows,
|
|
129
|
-
- arbitrary external tool orchestration,
|
|
130
|
-
- mutating work,
|
|
131
|
-
- steps where one child needs another child’s output.
|
|
132
|
-
|
|
133
|
-
Child outputs remain in `details.result.steps`; exact child run output remains recoverable by child `outputId`.
|
|
134
|
-
|
|
135
|
-
## Native Tools
|
|
136
|
-
|
|
137
|
-
Use native tools when direct behavior is the point:
|
|
138
|
-
|
|
139
|
-
- `read`: known whole file or exact direct file content is intended.
|
|
140
|
-
- `bash`: expected-small exact shell behavior, host access, cmux/Pi control probes, or bounded producer behavior is intentionally needed.
|
|
141
|
-
- `edit` / `write`: mutations.
|
|
142
|
-
|
|
143
|
-
Native `bash`/`read` remain valid for known-small exact checks, cmux/Pi control probes, exact file reads, or explicit fallback after a routed-source limitation; name the limitation and keep the fallback narrow.
|
|
144
|
-
|
|
145
|
-
Do not run broad native commands just to see what comes back. `head`, `sed -n`, `tail`, `wc`, or similar output caps bound visible text, not producer scope or relevance. Likely-large native commands include repo-wide `rg`, `grep -R`, `find`, package scans, generated-artifact scans, docs/help scans, logs, broad `git diff/log`, full tests/builds/lints/typechecks, and one-off scripts with unknown output size.
|
|
146
|
-
|
|
147
|
-
If native read/bash safety net is enabled, large/noisy native output may be replaced with labeled Freeflow-routed output. It must include an `outputId` and recovery instructions. If safety-net routing fails, native output passes through with a warning.
|
|
148
|
-
|
|
149
|
-
## Observed Routing
|
|
150
|
-
|
|
151
|
-
For enabled Pi MCP/web/fetch/code-search producers, call the host tool directly. Freeflow observes the completed result after host execution.
|
|
152
|
-
|
|
153
|
-
Observed routing:
|
|
154
|
-
|
|
155
|
-
- is off by default,
|
|
156
|
-
- is explicit per producer/server,
|
|
157
|
-
- does not grant permissions or block host tools,
|
|
158
|
-
- can persist exact output, metadata-only, or nothing depending on config,
|
|
159
|
-
- fails open with original host output if routing fails.
|
|
160
|
-
|
|
161
|
-
Mutating MCP/tool calls still require normal workflow/interview judgment before the host call. Observed routing is not permission approval.
|
|
162
|
-
|
|
163
|
-
## Hard Rules
|
|
164
|
-
|
|
165
|
-
- Do not pretend routed output is native output.
|
|
166
|
-
- Do not silently shorten native output.
|
|
167
|
-
- Capture raw output before transforming it.
|
|
168
|
-
- Keep raw source recovery separate from transformed/reduced output recovery.
|
|
169
|
-
- Treat `preserve="full"` as exact fidelity under caps, not unlimited context injection.
|
|
170
|
-
- Preserve exact failure and verification evidence lines.
|
|
171
|
-
- Keep `toolStatus`, `execution.status`, and `routing.status` separate.
|
|
172
|
-
- Metadata-only records must never claim exact raw recovery.
|
|
173
|
-
- Freeflow mode changes guidance strength only. It must not enable `postToolRouting`.
|
|
174
|
-
- Do not write removed `capture` or `providers` config.
|
|
175
|
-
- Do not offer `redacted`; it is future-only.
|
|
176
|
-
|
|
177
|
-
## Recovery Pattern
|
|
178
|
-
|
|
179
|
-
For routed run/native/observed/transform output, recover exact text with:
|
|
180
|
-
|
|
181
|
-
```json
|
|
182
|
-
{
|
|
183
|
-
"action": "retrieve",
|
|
184
|
-
"source": { "kind": "vault", "outputId": "ffout_...", "stream": "stdout|stderr|combined|raw" },
|
|
185
|
-
"lineRange": { "start": 1, "end": 20 },
|
|
186
|
-
"preserve": "full"
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
When line numbers are unknown, use `query` or `get` first. Use `expand` when a returned evidence packet is too narrow. Use `explain` when recoverability is unclear.
|
|
191
|
-
|
|
192
|
-
## Config
|
|
193
|
-
|
|
194
|
-
Use `freeflow_status` to inspect effective config, vault writability/index state, script adapters, observed routing, and migration recommendations.
|
|
195
|
-
|
|
196
|
-
Use `../setup-freeflow/SKILL.md` for installation, invalid-config repair, or the initial optional-capabilities branch. After valid setup, Output Router owns explicit operational tuning requested through its capability surface.
|
|
197
|
-
|
|
198
|
-
Persist operational config only after an explicit tuning request or a previously accepted setup branch:
|
|
199
|
-
|
|
200
|
-
- `outputRouter`: `enabled`, `profile`, `postToolRouting`, `storagePolicy`, thresholds, vault root/retention, generated paths, noisy command hints.
|
|
201
|
-
- `outputRouter.observedRouting`: explicit MCP servers and web/fetch/codeSearch producer persistence.
|
|
202
|
-
- `outputRouter.scriptTransform`: enabled flag, languages, sandbox/network/limits/raw-script persistence.
|
|
203
|
-
|
|
204
|
-
Minimal setup stays only `defaultMode`. Missing optional sections mean built-in defaults.
|
|
205
|
-
|
|
206
|
-
Read [the safety policy](references/safety-policy.md) before changing routing policy, reviewing router behavior, or handling exactness-sensitive output.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Output Router Safety Policy
|
|
2
|
-
|
|
3
|
-
Reference-only policy for exactness-sensitive output routing. Pi runtime context does not load this whole file by default; the active `output-router` skill carries the compact rules. Read this file before changing routing policy, reviewing router behavior, or handling a new exactness-sensitive output class.
|
|
4
|
-
|
|
5
|
-
## Main Rule
|
|
6
|
-
|
|
7
|
-
Do not silently summarize, compress, or replace exactness-sensitive output.
|
|
8
|
-
|
|
9
|
-
Exactness-sensitive output includes:
|
|
10
|
-
|
|
11
|
-
- user-requested exact/full output,
|
|
12
|
-
- small native outputs where direct output is expected,
|
|
13
|
-
- verification output needed for completion claims,
|
|
14
|
-
- failure evidence needed for diagnosis,
|
|
15
|
-
- source-truth conflict evidence,
|
|
16
|
-
- security, privacy, billing, data-loss, permissions, or public API evidence,
|
|
17
|
-
- failed, timed-out, or cancelled run output,
|
|
18
|
-
- script-producer output,
|
|
19
|
-
- filtered, script-filtered, reduced, or transformed output where raw source matters,
|
|
20
|
-
- anything marked `preserve: full`.
|
|
21
|
-
|
|
22
|
-
## Required Behavior
|
|
23
|
-
|
|
24
|
-
- Capture raw evidence before transformation whenever output is routed.
|
|
25
|
-
- Label every transformed native or observed result as Freeflow-routed output.
|
|
26
|
-
- Include an `outputId` and exact recovery instructions when exact recovery exists.
|
|
27
|
-
- Preserve exact failure and verification evidence lines; do not paraphrase them.
|
|
28
|
-
- Pass small native outputs through unchanged unless explicit config and thresholds route them.
|
|
29
|
-
- For huge exactness-sensitive output, use vaulting and exact chunk retrieval instead of lossy summarization.
|
|
30
|
-
- If post-tool native safety-net routing fails, fail open: return the native output unchanged when possible and include a warning.
|
|
31
|
-
- Keep raw source recovery separate from transformed/reduced output recovery.
|
|
32
|
-
- Metadata-only records must never claim exact raw recovery. Duplicate metadata may point to a prior exact `outputId`; plain metadata-only records get rerun or explanation guidance.
|
|
33
|
-
|
|
34
|
-
## Non-Goals
|
|
35
|
-
|
|
36
|
-
- This policy does not enable post-tool routing by itself.
|
|
37
|
-
- This policy does not authorize model-assisted summarization inside the router runtime.
|
|
38
|
-
- This policy does not authorize unsandboxed script execution.
|
|
39
|
-
- This policy does not require Pi runtime context to inject the full reference every turn.
|
|
40
|
-
- This policy does not replace host permissions, sandboxing, approvals, or workflow/decision gates.
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Output Router Setup
|
|
2
|
-
|
|
3
|
-
Use this only when repository setup or repair explicitly includes Output Router, observed routing, generated-path hints, native safety-net routing, vault, thresholds, script-transform adapters, or script-transform repository config.
|
|
4
|
-
|
|
5
|
-
## Defaults
|
|
6
|
-
|
|
7
|
-
- Minimal `/setup-freeflow` writes only repository `defaultMode`. `.freeflow/config.json` remains required for activation; a local override cannot activate Freeflow.
|
|
8
|
-
- Output Router is repository-owned and disabled by default.
|
|
9
|
-
- Missing optional sections mean built-in defaults, not setup failure.
|
|
10
|
-
- Normal setup does not ask a generic capability question. If Output Router was not explicitly requested, do not write `outputRouter` config or install script adapters.
|
|
11
|
-
- If the user explicitly opts into Output Router during setup, write `outputRouter.enabled: true` directly. Do not make them run another command afterward.
|
|
12
|
-
- Observed routing is opt-in per producer/server. The user must choose persistence for each enabled entry before setup writes config.
|
|
13
|
-
- Preserve unrelated valid repository and personal settings. Do not copy Output Router config into `.freeflow/local.json`; only documented local-only processing settings belong there.
|
|
14
|
-
- Do not create a separate `setup-output-router` skill.
|
|
15
|
-
|
|
16
|
-
If the user says only “set up the output router” with no requested knobs, explain that enabling Output Router is enough for the router tools/guidance, then ask which optional subfeatures, if any, they want persisted. Recommend no subfeature config unless they need observed routing, repo-specific hints, script transform setup, or native safety-net behavior.
|
|
17
|
-
|
|
18
|
-
## Config Shape
|
|
19
|
-
|
|
20
|
-
Write only keys the user explicitly requests. Do not dump defaults and do not create empty optional objects. Output-router-related config lives under `outputRouter`. Do not write removed `capture` or `providers` config.
|
|
21
|
-
|
|
22
|
-
Supported shape:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"defaultMode": "workflow",
|
|
27
|
-
"outputRouter": {
|
|
28
|
-
"enabled": true,
|
|
29
|
-
"postToolRouting": "safety-net",
|
|
30
|
-
"thresholds": {
|
|
31
|
-
"largeOutputBytes": 64000,
|
|
32
|
-
"largeOutputLines": 2000
|
|
33
|
-
},
|
|
34
|
-
"vault": {
|
|
35
|
-
"root": "~/.cache/freeflow-router/vault",
|
|
36
|
-
"retention": { "strategy": "ttl", "ttlDays": 7 }
|
|
37
|
-
},
|
|
38
|
-
"hints": {
|
|
39
|
-
"generatedPathGlobs": ["graphify-out/**"],
|
|
40
|
-
"noisyCommandPatterns": ["npm test"]
|
|
41
|
-
},
|
|
42
|
-
"observedRouting": {
|
|
43
|
-
"enabled": true,
|
|
44
|
-
"onRoutingFailure": "fail-open",
|
|
45
|
-
"mcp": {
|
|
46
|
-
"servers": {
|
|
47
|
-
"github": { "enabled": true, "persistence": "exact" },
|
|
48
|
-
"gmail": { "enabled": true, "persistence": "metadata-only" }
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"web": { "enabled": true, "persistence": "exact" },
|
|
52
|
-
"fetch": { "enabled": true, "persistence": "exact" },
|
|
53
|
-
"codeSearch": { "enabled": true, "persistence": "exact" }
|
|
54
|
-
},
|
|
55
|
-
"scriptTransform": {
|
|
56
|
-
"enabled": true,
|
|
57
|
-
"sandbox": "auto",
|
|
58
|
-
"languages": ["javascript", "python", "jq"],
|
|
59
|
-
"network": "off",
|
|
60
|
-
"limits": {
|
|
61
|
-
"timeoutMs": 5000,
|
|
62
|
-
"maxInputBytes": 1048576,
|
|
63
|
-
"maxOutputBytes": 65536
|
|
64
|
-
},
|
|
65
|
-
"rawScriptPersistence": "disabled"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Rules:
|
|
72
|
-
|
|
73
|
-
- Top-level `enabled` and `skills.enabled` default to true after setup; write them only when the user explicitly wants to disable Freeflow or the skills layer.
|
|
74
|
-
- `outputRouter.enabled` defaults to `false`; write `true` only when the user chooses Output Router.
|
|
75
|
-
- `postToolRouting` defaults to `off`. Do not write `off`; use `safety-net` only when explicitly requested. Treat `strict` as reserved; ask before writing it.
|
|
76
|
-
- `thresholds.largeOutputBytes`, `thresholds.largeOutputLines`, and `vault.retention.ttlDays` must be positive integers.
|
|
77
|
-
- `vault.root` must be a non-empty string. Repo-local storage requires explicit user choice.
|
|
78
|
-
- `hints.generatedPathGlobs` are broad-scan generated-path hints. Explicit file or directory retrieval must remain available.
|
|
79
|
-
- `hints.noisyCommandPatterns` is parsed as hint config. Do not add it unless the user explicitly asks for command-pattern hints.
|
|
80
|
-
- `observedRouting.enabled` defaults to `false`; write it only when the user chooses observed routing.
|
|
81
|
-
- `observedRouting.onRoutingFailure` currently supports `fail-open`; omit it unless a caller needs an explicit non-default once supported.
|
|
82
|
-
- `observedRouting.mcp.servers` must contain explicit server entries only. Setup may discover configured servers for selection, but must not persist a volatile inventory of every installed tool.
|
|
83
|
-
- `observedRouting.web`, `observedRouting.fetch`, and `observedRouting.codeSearch` are Pi observed-routing producers. Enable only the producers the user chose.
|
|
84
|
-
- Every enabled observed-routing entry needs a user-chosen persistence mode: `exact`, `metadata-only`, or `none`.
|
|
85
|
-
- Recommend `exact` for public-ish evidence producers such as GitHub, web, fetch, and code search. Recommend `metadata-only` for sensitive or unknown producers such as Gmail, Slack, private customer systems, or likely-secret outputs.
|
|
86
|
-
- Do not offer or write `redacted`; it is reserved for future work and currently falls back to `metadata-only` with a warning if hand-edited.
|
|
87
|
-
- Pi public `freeflow_capture` and the separate `providers` setup surface have been removed. Do not write removed `capture` or `providers` config.
|
|
88
|
-
- `scriptTransform.enabled` defaults to `false`; write `true` only after an explicit script-execution opt-in.
|
|
89
|
-
- If the user opts into script transform setup and adapters are missing or unavailable, recommend installing global adapters. On consent, resolve `../../router/dist/setup/script-transform-adapters.js` relative to `skills/setup-freeflow/SKILL.md` and run `node <plugin-root>/router/dist/setup/script-transform-adapters.js install --config .freeflow/config.json`.
|
|
90
|
-
- The installer uses `~/.cache/freeflow-script-adapters` by default, or `FREEFLOW_SCRIPT_TRANSFORM_ADAPTERS_HOME` when set. It installs `quickjs-wasi@3.0.1`, `jq-wasm@1.2.0-jq-1.8.2`, `@bsull/eryx@0.5.0`, and `node@24` for the Python JSPI child runner, writes `freeflow-adapter-env.sh`, probes sandbox proofs, and updates `outputRouter.scriptTransform.languages` with only proof-passing languages.
|
|
91
|
-
- Freeflow auto-discovers adapters from that global cache. The explicit roots `FREEFLOW_QUICKJS_WASI_ROOT`, `FREEFLOW_JQ_WASM_ROOT`, and `FREEFLOW_ERYX_ROOT` remain overrides for custom installs.
|
|
92
|
-
- Python/Eryx is installed by setup and uses the setup-installed child Node process launched with `--experimental-wasm-jspi` when the host process lacks JSPI. It must not be marked available unless that child runner passes the required sandbox probes.
|
|
93
|
-
- `scriptTransform.languages` supports `javascript`, `python`, and `jq`; enable only languages whose adapters passed sandbox proofs.
|
|
94
|
-
- `scriptTransform.sandbox` currently supports `auto`, `network` supports only `off`, and `rawScriptPersistence` supports only `disabled`.
|
|
95
|
-
- `scriptTransform.limits.timeoutMs`, `maxInputBytes`, and `maxOutputBytes` must be positive integers within product caps. Per-call script limits may only tighten configured values.
|
|
96
|
-
|
|
97
|
-
## Verify
|
|
98
|
-
|
|
99
|
-
After writing optional capability config, use `freeflow_status` or equivalent direct inspection to verify:
|
|
100
|
-
|
|
101
|
-
- JSON parses.
|
|
102
|
-
- `defaultMode` is valid.
|
|
103
|
-
- A minimal shared setup with no optional settings contains only `defaultMode`.
|
|
104
|
-
- Newly added `enabled`, `interactionContract`, `skills.enabled`, `outputRouter`, `outputRouter.observedRouting`, and `outputRouter.scriptTransform` keys were requested; preserved valid settings remain unchanged.
|
|
105
|
-
- Invalid router, observed-routing, or script-transform values are not written.
|
|
106
|
-
- Output Router, observed routing, native safety-net routing, and script transform are not enabled unless explicitly requested.
|
|
107
|
-
- If script transform setup was accepted, global adapter install completed or a clear install/probe failure was reported, and enabled languages match proof-passing adapters.
|
|
108
|
-
- No observed-routing entry uses `redacted`, and every enabled entry has explicit persistence.
|
|
109
|
-
- `freeflow_status` shows effective defaults and migration recommendations without rewriting config.
|
|
110
|
-
- No repo-local hooks, skill files, setup-output-router skill, docs inventories, or repo-local storage directories were created.
|