@hassangameryt/freeflow 0.7.2 → 0.7.3

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.
Files changed (79) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/.cursor-plugin/plugin.json +1 -1
  5. package/README.md +147 -127
  6. package/capabilities/cognitive-routing/SKILL.md +162 -93
  7. package/gemini-extension.json +1 -1
  8. package/package.json +1 -1
  9. package/pi-extension/dist/cognitive-routing-v2/config.js +35 -19
  10. package/pi-extension/dist/cognitive-routing-v2/projection.js +53 -44
  11. package/pi-extension/dist/cognitive-routing-v2/render.js +31 -10
  12. package/pi-extension/dist/cognitive-routing-v2/runtime.js +701 -105
  13. package/pi-extension/dist/cognitive-routing-v2/schemas.js +90 -24
  14. package/pi-extension/dist/cognitive-routing-v2/state.js +243 -27
  15. package/pi-extension/dist/cognitive-routing-v2/tools.js +19 -50
  16. package/pi-extension/dist/cognitive-routing-v2/types.js +5 -1
  17. package/pi-extension/dist/context-virtualization/runtime.js +29 -7
  18. package/pi-extension/dist/freeflow-context/tool.js +7 -6
  19. package/pi-extension/dist/index.js +36 -15
  20. package/pi-extension/dist/provider-support/astra/adapter.js +110 -0
  21. package/pi-extension/dist/provider-support/astra/history.js +125 -0
  22. package/pi-extension/dist/provider-support/astra/index.js +11 -0
  23. package/pi-extension/dist/provider-support/astra/session-state.js +114 -0
  24. package/pi-extension/dist/provider-support/index.js +4 -0
  25. package/pi-extension/dist/runtime/request-history.js +216 -0
  26. package/pi-extension/dist/runtime/runtime-context.js +29 -10
  27. package/pi-extension/dist/session-sources/events.js +22 -0
  28. package/pi-extension/dist/session-sources/provenance.js +32 -0
  29. package/pi-extension/dist/session-sources/sources.js +51 -7
  30. package/pi-extension/dist/settings/settings-ui.js +247 -47
  31. package/pi-extension/src/cognitive-routing-v2/config.ts +49 -19
  32. package/pi-extension/src/cognitive-routing-v2/projection.ts +53 -43
  33. package/pi-extension/src/cognitive-routing-v2/render.ts +31 -10
  34. package/pi-extension/src/cognitive-routing-v2/runtime.ts +712 -105
  35. package/pi-extension/src/cognitive-routing-v2/schemas.ts +95 -24
  36. package/pi-extension/src/cognitive-routing-v2/state.ts +244 -27
  37. package/pi-extension/src/cognitive-routing-v2/tools.ts +19 -50
  38. package/pi-extension/src/cognitive-routing-v2/types.ts +35 -3
  39. package/pi-extension/src/context-virtualization/runtime.ts +30 -8
  40. package/pi-extension/src/freeflow-context/tool.ts +7 -6
  41. package/pi-extension/src/index.ts +36 -14
  42. package/pi-extension/src/provider-support/astra/adapter.ts +108 -0
  43. package/pi-extension/src/provider-support/astra/history.ts +145 -0
  44. package/pi-extension/src/provider-support/astra/index.ts +12 -0
  45. package/pi-extension/src/provider-support/astra/session-state.ts +113 -0
  46. package/pi-extension/src/provider-support/index.ts +5 -0
  47. package/pi-extension/src/runtime/request-history.ts +243 -0
  48. package/pi-extension/src/runtime/runtime-context.ts +32 -10
  49. package/pi-extension/src/session-sources/events.ts +22 -0
  50. package/pi-extension/src/session-sources/provenance.ts +39 -0
  51. package/pi-extension/src/session-sources/sources.ts +77 -6
  52. package/pi-extension/src/settings/settings-ui.ts +276 -46
  53. package/pi-extension/tests/cache-reuse/history.test.js +117 -0
  54. package/pi-extension/tests/cache-reuse/native.test.js +91 -0
  55. package/pi-extension/tests/cache-reuse/settings.test.js +211 -0
  56. package/pi-extension/tests/cognitive-routing-v2/communication.test.js +94 -1
  57. package/pi-extension/tests/cognitive-routing-v2/delegation.test.js +557 -0
  58. package/pi-extension/tests/cognitive-routing-v2/native.test.js +34 -1
  59. package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +55 -0
  60. package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +800 -2
  61. package/pi-extension/tests/cognitive-routing-v2/render.test.js +15 -1
  62. package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +273 -3
  63. package/pi-extension/tests/cognitive-routing-v2/state.test.js +312 -1
  64. package/pi-extension/tests/context-virtualization/extension.test.js +20 -10
  65. package/pi-extension/tests/context-virtualization/runtime.test.js +17 -3
  66. package/pi-extension/tests/fixtures/routing-native.js +4 -1
  67. package/pi-extension/tests/integration/mode-free-core.test.js +4 -3
  68. package/pi-extension/tests/integration/pi-extension.test.js +508 -29
  69. package/pi-extension/tests/integration/prompt-architecture.test.js +56 -40
  70. package/pi-extension/tests/integration/unaffected-regressions.test.js +3 -3
  71. package/pi-extension/tests/provider-support/astra-boundaries.test.js +75 -0
  72. package/pi-extension/tests/provider-support/astra.test.js +306 -0
  73. package/pi-extension/tests/provider-support/cli.test.js +92 -0
  74. package/pi-extension/tests/provider-support/native.test.js +183 -0
  75. package/plugin.json +1 -1
  76. package/runtime/prompts/cognitive-routing.md +4 -4
  77. package/skills/design-for-depth/SKILL.md +1 -1
  78. package/skills/design-for-depth/references/implementation-decisions.md +3 -3
  79. package/skills/discuss/SKILL.md +2 -2
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "name": "freeflow",
12
12
  "description": "Feedback-based control for coding agents.",
13
- "version": "0.7.2",
13
+ "version": "0.7.3",
14
14
  "category": "development",
15
15
  "source": "./",
16
16
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "freeflow",
3
3
  "description": "Freeflow gives coding agents an Interaction Contract, adaptive Workflow, focused methods, and durable task memory.",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "author": {
6
6
  "name": "Hassan Mohiddin"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freeflow",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Feedback-based control system for coding agents.",
5
5
  "author": {
6
6
  "name": "Hassan Mohiddin"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "freeflow",
3
3
  "description": "Feedback-based control system for coding agents.",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "author": {
6
6
  "name": "Hassan Mohiddin"
7
7
  },
package/README.md CHANGED
@@ -2,9 +2,36 @@
2
2
 
3
3
  **A feedback-based control system for coding agents.**
4
4
 
5
- Freeflow helps coding agents do consequential work without turning every task into a rigid ceremony. It gives the agent a clear Interaction Contract, adaptive Workflow, focused methods, durable task memory, and controlled delivery boundaries.
5
+ **Memory. Context. Compute.**
6
6
 
7
- The host agent still owns tools, permissions, and execution. Freeflow helps it choose the right next action—and know when to stop, ask, verify, or hand work back.
7
+ Freeflow helps coding agents do consequential work without turning every task into a rigid ceremony. It gives the active agent a clear Interaction Contract, one adaptive Workflow, durable task memory, focused engineering methods, and controlled delivery boundaries.
8
+
9
+ The host agent still owns tools, permissions, and execution. Freeflow helps it understand the request, choose the right next action, preserve continuity, use evidence honestly, place compute deliberately, and know when to continue, ask, defer, or stop.
10
+
11
+ - **New to Freeflow?** Read [Using Freeflow Effectively](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/using-freeflow.md).
12
+ - **Installing it?** Start with [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md).
13
+ - **Using Cognitive Routing?** Read the detailed [Cognitive Routing reference](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/cognitive-routing.md).
14
+
15
+ ## Memory · Context · Compute
16
+
17
+ | Pillar | What it provides | Status |
18
+ | --- | --- | --- |
19
+ | **Memory — Track Work** | Working Records that preserve current context, one Current Slice, decisions, evidence limits, future work, and the next useful action. | Available through the shared skill surface. |
20
+ | **Context — Context Control** | Planned source-aware residency, representation, and bounded recovery for admitted context. | Planned/in development; unavailable in this release. |
21
+ | **Compute — Cognitive Routing** | Coordinator, Helper, and Executor profiles in one agent/session, with mode-aware work placement and optional worker-evidence projection. | Experimental native-Pi capability; current PiFlow adapter unavailable. |
22
+
23
+ Current optional **Context Virtualization** and **Conversation History** capabilities remain separate legacy Pi/PiFlow features. They are not Context Control v2, and their transforms are not qualified together with Cognitive Routing projection.
24
+
25
+ ## Astra cache-aware reuse
26
+
27
+ Freeflow's Pi extension includes cache-aware request history and a qualified Astra effort-history adapter:
28
+
29
+ - compatible Freeflow-generated state stays at stable historical positions where possible;
30
+ - changed runtime state is appended instead of rewriting earlier generated context;
31
+ - qualified `gpt-6-astra` routes can retain a request-level effort baseline and insert trusted effort changes at validated historical positions;
32
+ - unsupported or uncertain requests fall back to the untouched native request.
33
+
34
+ This is request-construction and compatibility behavior—not proof of a provider cache hit, billing reduction, model quality improvement, or universal provider support. See the [Pi cache reuse boundaries](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/integrations/pi.md#cache-reuse-boundaries).
8
35
 
9
36
  ## Why Freeflow
10
37
 
@@ -12,85 +39,93 @@ Coding agents commonly fail at control boundaries:
12
39
 
13
40
  | Pressure | Freeflow response |
14
41
  | --- | --- |
15
- | A question or tentative idea becomes an edit. | The Interaction Contract answers first and waits for clear action authority. |
16
- | A prompt conflicts with tests, policy, or accepted behavior. | Decision Gate names the conflict before mutation. |
17
- | New evidence invalidates the plan. | Workflow routes from evidence and preserves unaffected work. |
18
- | Every task receives unnecessary ceremony. | Workflow enters at the narrowest useful owner and scales pressure to risk. |
19
- | A passing command becomes an unsupported completion claim. | Verify Work matches evidence to the exact claim and boundary. |
20
- | Compaction loses task state. | Track Work restores a Working Record and reconciles it with live state. |
21
- | Tool output consumes future context. | Context Virtualization can archive consumed evidence while preserving session history. |
22
-
23
- ## Contents
24
-
25
- - [How it works](#how-it-works)
26
- - [Host support](#host-support)
27
- - [Capabilities](#capabilities)
28
- - [Quick start](#quick-start)
29
- - [Workflow](#workflow)
30
- - [System prompt architecture](#system-prompt-architecture)
31
- - [Evidence and limits](#evidence-and-limits)
32
- - [Commands](#commands)
33
- - [Documentation and development](#documentation-and-development)
34
- - [What Freeflow is not](#what-freeflow-is-not)
42
+ | A question or tentative idea becomes an edit. | The Interaction Contract distinguishes discussion from authorization. |
43
+ | A prompt conflicts with policy, tests, or accepted behavior. | Decision Gate exposes the material conflict before mutation. |
44
+ | New evidence invalidates the chosen approach. | Workflow re-enters only the affected owner and preserves valid work. |
45
+ | Every task receives the same heavy process. | Workflow scales pressure to consequence, uncertainty, interaction, and reversibility. |
46
+ | A passing command becomes an unsupported completion claim. | Verify Work ties the claim to the actual observer and evidence boundary. |
47
+ | Context loss erases decisions and partial work. | Track Work restores a complete Working Record and reconciles it with live state. |
48
+ | Expensive models perform routine supporting work. | Cognitive Routing can place bounded support and substantive execution on configured profiles. |
49
+ | Request history changes destroy reusable prefixes unnecessarily. | RequestHistory and qualified Astra adaptation preserve compatible request structure. |
35
50
 
36
51
  ## How it works
37
52
 
38
- Freeflow uses one active agent, one shared context, and nested feedback loops:
53
+ Freeflow uses one active agent and one adaptive Workflow:
39
54
 
40
55
  ```text
41
56
  Interaction Lifecycle
42
57
  └─ Workflow Feedback Loop
43
- ├─ establishes authority, owner, and slice
44
- └─ Cognitive Routing — experimental, when a qualified host is available
45
- ├─ Coordinator assigns a decision-complete assignment
46
- ├─ Executor performs it and returns an actual report
47
- └─ Coordinator assesses evidence, continues, or closes the unit
48
- └─ Action Selection bounds uncertain environment interactions
58
+ ├─ interpret authority and establish the work agreement
59
+ ├─ choose the narrowest current owner
60
+ ├─ discuss, act, test, or observe
61
+ ├─ determine what the evidence supports
62
+ ├─ self-review the supported result
63
+ └─ continue, correct, diagnose, ask, defer, or stop
49
64
  ```
50
65
 
51
- Under automatic Cognitive Routing control, Coordinator owns new user direction; input reaching an already prepared Executor request requires an interrupted return before task tools. Under manual control, the selected profile runs the ordinary unsplit Workflow. Cognitive Routing changes compute and context placement only. It never changes authority, ownership, task scope, evidence requirements, or review independence.
66
+ Focused methods own different results: Discuss, Track Work, Execute Work, Diagnose Failure, Verify Work, Review Work, Review Artifact, Write Spec, Write Plan, Release Work, and others. They compose when their conditions apply; they are not mandatory phases.
52
67
 
53
- The Workflow owner may be Discuss, Track Work, Execute Work, Verify Work, Review Work, Review Artifact, Diagnose Failure, or another focused method. These methods compose when their conditions apply; they are not a mandatory phase pipeline.
68
+ On a qualified native Pi host, automatic Cognitive Routing sits inside the current Workflow owner:
54
69
 
55
- ## Host support
70
+ ```text
71
+ Coordinator receives user direction
72
+ -> Helper handles normal supporting assignments when enabled
73
+ -> Executor handles substantive or consequential assignments
74
+ -> assigned worker returns actual work and evidence
75
+ -> Coordinator assesses, continues, corrects, or closes
76
+ ```
56
77
 
57
- Freeflow is one package with different host boundaries:
78
+ Only one worker assignment runs at a time. A profile switch is not another agent or independent review. A worker report does not complete a Track Work Slice, task, commit, integration, release, or launch.
58
79
 
59
- | Host | Freeflow support | Cognitive Routing |
80
+ ## Cognitive Routing modes
81
+
82
+ The labels describe intended optimization direction and potential, not guarantees.
83
+
84
+ | Mode | Positioning | Behavior |
60
85
  | --- | --- | --- |
61
- | Codex | Shared skills and Codex `SessionStart` hook | Not available; Pi/PiFlow capabilities are not delivered |
62
- | Claude Code | Shared skills and Claude Code `SessionStart` hook | Not available; Pi/PiFlow capabilities are not delivered |
63
- | Gemini CLI | Gemini extension manifest, shared skills, and Gemini `SessionStart` hook | Not available; Pi/PiFlow capabilities are not delivered |
64
- | Cursor | Agent Plugins 1.0 skills plus Cursor-specific hook delivery | Not available; Pi/PiFlow capabilities are not delivered |
65
- | GitHub Copilot / VS Code | Agent Plugins 1.0 skills plus Copilot-specific hook delivery | Not available; Pi/PiFlow capabilities are not delivered |
66
- | Kiro | Agent Plugins 1.0 Power and shared skills | Not available; no Kiro-specific runtime adapter is claimed |
67
- | OpenCode v2 | Canonical `skills/` through OpenCode’s project skill source | Not available; skills-only support |
68
- | Hermes Agent | Agent Plugins 1.0 package and canonical skills | Not available; skills-only support |
69
- | Pi | Shared skills and the Pi extension source entrypoint | Cognitive Routing is an unreleased experimental candidate; native SDK and bundled-CLI dispatch are exercised by isolated local fixtures; installed-user and model-behavior acceptance remain separate |
70
- | PiFlow | Freeflow package can be hosted by the separate PiFlow distribution | Cognitive Routing is explicitly unavailable in the current source adapter |
86
+ | **Helper only** | Quality-first — maximum performance and output-quality potential | Coordinator implements; Helper gathers context, prepares, checks, maintains task memory, and performs settled support. |
87
+ | **Executor only** | Savings-first — maximum savings potential | Coordinator directs and assesses; Executor owns delegated environment work. |
88
+ | **Both** | Balanced | Helper handles frequent routine support; Executor is commissioned for substantive or consequential work. |
89
+
90
+ A comparatively economical but capable Helper can contribute much of Both mode's potential savings because many routine assignments go through it. The detailed guide includes [recommended OpenAI subscription starting presets](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/using-freeflow.md#recommended-openai-subscription-starting-presets) and the limits on those recommendations.
71
91
 
72
- Freeflow owns workflow policy, portable prompt fragments, the 24-skill distribution kernel, host adapters, capability source, and the Pi extension. Each host owns its launch, package installation, session state, and updates. Native host behavior and model quality require separate installed-host evidence; PiFlow routing is not currently available.
92
+ ## Availability
73
93
 
74
- ## Capabilities
94
+ | Surface | Availability |
95
+ | --- | --- |
96
+ | Interaction Contract, Workflow, and 24 base skills | Shared supported package surface when Freeflow is effectively activated |
97
+ | Track Work / Working Records | Shared skill surface |
98
+ | Context Virtualization | Optional Pi/PiFlow capability; legacy, separately gated |
99
+ | Conversation History | Optional Pi/PiFlow capability; separately gated |
100
+ | Context Control v2 | Planned/in development; not available in this release |
101
+ | Cognitive Routing | Experimental native Pi source candidate |
102
+ | Cognitive Routing on PiFlow | Explicitly unavailable in the current adapter |
103
+ | Astra cache-aware effort history | Narrow source/fixture-qualified native Pi route; provider savings unverified |
75
104
 
76
- ### Workflow and task memory
105
+ Configuration or installation alone does not establish runtime delivery.
77
106
 
78
- - **Workflow** coordinates authority, owner selection, evidence-driven re-entry, and Supported Exit.
79
- - **Action Selection** bounds uncertain or broad Environment Interactions while preserving the current owner.
80
- - **Track Work** maintains a Working Record when decisions, evidence, blockers, or the next action must survive context loss.
81
- - **Verify Work, Review Work, Review Artifact, and Diagnose Failure** separate factual support, judgment, artifact fitness, and unsupported causes.
107
+ ## Host support
82
108
 
83
- ### Optional host capabilities
109
+ Freeflow is one package with different host boundaries:
84
110
 
85
- - **[Cognitive Routing](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/cognitive-routing.md)** places compute between Coordinator and Executor in one agent under automatic control. The current source path is experimental and host availability is not established by installation alone.
86
- - **[Context Virtualization](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/context-virtualization.md)** classifies consumed tool evidence as Full, Retained, or Reference-only for future context while leaving canonical history unchanged.
87
- - **[Conversation History](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/conversation-history.md)** performs bounded retrieval of exact missing prior-conversation evidence from the current active branch.
111
+ | Host | Freeflow support | Cognitive Routing |
112
+ | --- | --- | --- |
113
+ | Codex | Shared skills and Codex `SessionStart` hook | Not available |
114
+ | Claude Code | Shared skills and Claude Code `SessionStart` hook | Not available |
115
+ | Gemini CLI | Gemini extension, shared skills, and Gemini `SessionStart` hook | Not available |
116
+ | Cursor | Agent Plugins 1.0 skills plus Cursor-specific hook delivery | Not available |
117
+ | GitHub Copilot / VS Code | Agent Plugins 1.0 skills plus Copilot/VS Code hook delivery | Not available |
118
+ | Kiro | Agent Plugins 1.0 Power and shared skills | Not available; skills-only claim |
119
+ | OpenCode v2 | Canonical `skills/` through a documented project skill source | Not available; skills-only support |
120
+ | Hermes Agent | Agent Plugins 1.0 package and canonical skills | Not available; skills-only support |
121
+ | Pi | Shared skills and native extension source entrypoint | Experimental source candidate; installed-user and model-behavior evidence remain separate |
122
+ | PiFlow | PiFlow-hosted Freeflow package and shared surface | Explicitly unavailable in the current source adapter |
88
123
 
89
- The three capabilities are individually gated and default-off or unavailable unless their configuration and host conditions are effective. None grants authority or replaces Workflow.
124
+ Freeflow owns workflow policy, portable prompts, skills, capability source, host adapters, and the Pi extension. Each host owns launch, package installation, session state, trust, and updates.
90
125
 
91
126
  ## Quick start
92
127
 
93
- For complete host-specific setup, see [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md).
128
+ For complete instructions and delivery checks, use [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md).
94
129
 
95
130
  ### Codex
96
131
 
@@ -116,17 +151,24 @@ Trust the Freeflow hook from `/hooks`, then start a new session.
116
151
  gemini extensions install https://github.com/hassan-mohiddin/freeflow
117
152
  ```
118
153
 
119
- Restart Gemini CLI after installation or updates. The extension uses the root `gemini-extension.json`, shared `skills/`, and its Gemini-specific `SessionStart` hook adapter.
154
+ Restart Gemini CLI after installation or updates.
120
155
 
121
- ### Cursor, GitHub Copilot, VS Code, Kiro, OpenCode, and Hermes Agent
156
+ ### Cursor, GitHub Copilot, VS Code, Kiro, OpenCode, and Hermes
122
157
 
123
- These hosts consume the root Agent Plugins 1.0 manifest and the same `skills/` directory. Cursor also reads `.cursor-plugin/plugin.json` for its host-specific hook surface; GitHub Copilot and VS Code read the `com.github.copilot/` extension namespace. Install from each host’s documented plugin source or marketplace UI. For Copilot CLI, the direct repository form is:
158
+ These hosts consume the root Agent Plugins 1.0 manifest and canonical `skills/` surface through their documented plugin or skill-source workflows. Copilot CLI can install directly:
124
159
 
125
160
  ```bash
126
161
  copilot plugin install hassan-mohiddin/freeflow
127
162
  ```
128
163
 
129
- VS Code provides **Chat: Install Plugin From Source**. Kiro exposes compatible Agent Plugins as Powers and can import a GitHub source through its Powers UI. OpenCode v2 can add the checkout or package’s `skills/` directory to the documented `skills` array in `opencode.json`; it does not receive a native Freeflow plugin runtime. Hermes can install the root portable package with `hermes plugins install hassan-mohiddin/freeflow --no-enable`, then enable it with `hermes plugins enable freeflow`, or use its documented skills source workflow. A host’s install/trust UI and marketplace availability are external to this repository’s deterministic checks.
164
+ OpenCode can point its `skills` array at the installed package's `skills/` directory. Hermes can install the portable package with:
165
+
166
+ ```bash
167
+ hermes plugins install hassan-mohiddin/freeflow --no-enable
168
+ hermes plugins enable freeflow
169
+ ```
170
+
171
+ See [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md) for host-specific claims and limits.
130
172
 
131
173
  ### Pi
132
174
 
@@ -140,82 +182,48 @@ Or:
140
182
  pi install git:github.com/hassan-mohiddin/freeflow
141
183
  ```
142
184
 
143
- The repository's current development dependency is Pi 0.85.1. The native entrypoint is wired in the source tree, but local fixtures exercise native SDK and bundled-CLI integration without installing this candidate into the user’s host; version-specific host acceptance belongs to separate release evidence.
185
+ Restart Pi or use `/reload` after installation or updates.
144
186
 
145
187
  ### PiFlow
146
188
 
147
- Install PiFlow separately, then install Freeflow into it:
148
-
149
189
  ```bash
150
190
  npm install -g --ignore-scripts @hassangameryt/piflow
151
191
  piflow install npm:@hassangameryt/freeflow
152
192
  ```
153
193
 
154
- For a Git source:
194
+ The current PiFlow adapter does not provide Cognitive Routing.
155
195
 
156
- ```bash
157
- piflow install git:github.com/hassan-mohiddin/freeflow
158
- ```
196
+ ### Activate a repository
159
197
 
160
- The current source entrypoint explicitly marks the redesigned PiFlow Cognitive Routing adapter unavailable. Installing the package still does not establish routing availability.
161
-
162
- In the target repository, run:
198
+ Run:
163
199
 
164
200
  ```text
165
201
  /setup-freeflow
166
202
  ```
167
203
 
168
- Setup creates `.freeflow/config.json`, the required shared activation boundary. Minimal activation is `{}`. `.freeflow/local.json` is an optional personal override and cannot activate Freeflow by itself.
169
-
170
- ## Workflow
171
-
172
- Freeflow always uses one adaptive Workflow. The Interaction Contract interprets the whole user turn; Workflow then chooses the narrowest owner and scales coordination to consequence, uncertainty, interaction, and reversibility.
204
+ This creates the required shared `.freeflow/config.json` activation boundary. Minimal activation is `{}`. Optional `.freeflow/local.json` personal overrides cannot activate Freeflow alone.
173
205
 
174
- A question or tentative idea remains discussion until clear action authority exists. A direct request covers only its bounded outcome and entailed effects. Risk-sensitive work receives stronger decisions, evidence, verification, and checkpoints through the same Workflow rather than through a separate selectable process.
206
+ ## Use Freeflow effectively
175
207
 
176
- Every bounded activity follows the same Feedback Loop:
208
+ A clear prompt normally needs:
177
209
 
178
210
  ```text
179
- orient to accepted intent, task memory, and live evidence
180
- -> use the narrowest owner
181
- -> act, discuss, test, or observe
182
- -> verify what the evidence proves
183
- -> self-review the supported result
184
- -> continue, correct, diagnose, revise, ask, defer, or stop
211
+ Outcome: what should be true?
212
+ Scope: what may change?
213
+ Exclusions: what must not happen?
214
+ Sources and constraints: what governs?
215
+ Evidence: what should support the result?
216
+ User-owned choices: what must come back to me?
217
+ Stop and return: where should the agent stop?
185
218
  ```
186
219
 
187
- ## System prompt architecture
188
-
189
- Freeflow’s model-facing surface has four coordinated parts:
190
-
191
- 1. **Core guidance** in `runtime/prompts/core.md` contains identity, shared terms, loops, Workflow, Action Selection, and Supported Exit cues.
192
- 2. **Interaction Contract** in `runtime/prompts/interaction-contract.md` remains a separate mandatory fragment so its behavior can be revised independently.
193
- 3. **Runtime State** reports current capability availability and v2 Cognitive Routing `Control`/`Profile` at session start, after context reconstruction or loss, and when displayed state changes; unchanged state remains in the current provider context.
194
- 4. **Discoverable skills and tools** provide the 24 base methods and individually gated optional capability operations.
195
-
196
- The core guidance and Interaction Contract are always delivered together when Freeflow is enabled. Optional capability content is omitted and reported unavailable rather than fabricated. One effective-state snapshot determines prompt assembly, discovery, tools, and projection.
220
+ Natural language is preferred. Direct calls such as `/discuss`, `/execute-work`, `/diagnose-failure`, `/verify-work`, `/review-work`, `/track-work`, and `/release-work` are useful when they make the intended method clear. A skill is a method, not an authority grant or required phase.
197
221
 
198
- Read the full [System Prompt Architecture](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/prompt-architecture.md) and [Workflow](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/workflow.md) docs for the complete contract.
199
-
200
- ## Evidence and limits
201
-
202
- Freeflow is explicit about what its checks prove:
203
-
204
- - deterministic checks prove structure, assembly, package boundaries, and selected delivery behavior;
205
- - host-manifest and adapter checks prove the Agent Plugins 1.0, Gemini, Cursor, and Copilot/VS Code package shapes, not native host dispatch;
206
- - OpenCode and Hermes compatibility checks cover the canonical Agent Skills/Agent Plugins package shape, not native host plugin APIs or runtime prompt delivery;
207
- - release evidence is versioned and records source, checks, artifacts, deferred evidence, and limits;
208
- - local installation does not prove remote host installation or registry propagation;
209
- - deterministic skill/runtime checks do not prove model behavior or universal skill readiness;
210
- - Cognitive Routing remains experimental pending behavioral acceptance.
211
-
212
- The deprecated Output Router is removed and no longer available. Its implementation and evidence remain archived under `.deprecated/output-router/`.
213
-
214
- See [Release Process](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/release.md) and [Release Evidence](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/release-evidence/README.md).
222
+ Read [Using Freeflow Effectively](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/using-freeflow.md) for prompt examples, Workflow management, Track Work, settings, mode selection, preset recommendations, cache/cost boundaries, and troubleshooting.
215
223
 
216
224
  ## Commands
217
225
 
218
- Natural language is preferred. Pi registers these canonical direct calls:
226
+ Canonical Pi direct calls include:
219
227
 
220
228
  ```text
221
229
  /discuss
@@ -246,52 +254,64 @@ Contributor calls:
246
254
  /evaluate-skill
247
255
  ```
248
256
 
249
- Cognitive Routing controls on a qualified native host:
257
+ Qualified native-Pi Cognitive Routing controls:
250
258
 
251
259
  ```text
252
260
  /freeflow
261
+ /freeflow status
253
262
  /freeflow settings
254
263
  /freeflow settings session
255
264
  /freeflow settings local
256
265
  /freeflow settings repo
257
266
  /freeflow profile coordinator
267
+ /freeflow profile helper
258
268
  /freeflow profile executor
259
269
  /freeflow profile auto
260
270
  /freeflow profile history
261
271
  /freeflow resume
262
272
  ```
263
273
 
264
- `/freeflow settings` edits personal overrides, `/freeflow settings session` manages temporary core/context overrides, and `/freeflow settings repo` edits shared repository settings. Cognitive Routing configuration is repository/personal configuration, not a session override. Profile changes and resume require an idle host with the required native model-state APIs.
274
+ Profile changes and resume require an idle host. These commands do not prove installed-host delivery or authorize task work.
265
275
 
266
- When the source adapter exposes the native controls and the host is idle:
276
+ ## Evidence and limits
277
+
278
+ Freeflow is explicit about what observations prove:
267
279
 
268
- - `Ctrl+Shift+R` cycles the manual Coordinator/Executor hold.
269
- - `Ctrl+Shift+A` releases a manual hold to automatic Coordinator control; repeating it while already automatic is idempotent.
280
+ - deterministic checks can establish source structure, prompt assembly, schemas, package boundaries, and named fixtures;
281
+ - package shape does not prove native host dispatch, trust UI, or marketplace availability;
282
+ - request-prefix compatibility does not prove a provider cache hit;
283
+ - model/profile availability does not prove quality or cost improvement;
284
+ - local release preparation is not publication;
285
+ - publication is not production deployment.
270
286
 
271
- These commands are host controls, not proof of installed-host delivery or model evaluation.
287
+ Cognitive Routing remains experimental pending broader behavioral acceptance. Context Control v2 remains planned. The deprecated Output Router is removed and archived outside the active runtime.
272
288
 
273
- ## Documentation and development
289
+ ## Documentation
274
290
 
275
- - [Documentation hub](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/README.md)
291
+ - [Using Freeflow Effectively](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/using-freeflow.md)
276
292
  - [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md)
277
- - [Architecture](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/architecture.md)
278
- - [System Prompt Architecture](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/prompt-architecture.md)
279
- - [Capabilities](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/README.md)
293
+ - [Workflow](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/workflow.md)
294
+ - [Cognitive Routing](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/cognitive-routing.md)
295
+ - [Pi integration](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/integrations/pi.md)
280
296
  - [PiFlow integration](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/integrations/piflow.md)
297
+ - [Architecture](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/architecture.md)
298
+ - [System prompt architecture](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/prompt-architecture.md)
281
299
  - [Skill routing](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/skill-routing.md)
282
- - [Release Process](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/release.md)
300
+ - [Capabilities](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/README.md)
301
+ - [Release process](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/release.md)
302
+ - [Release evidence](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/release-evidence/README.md)
283
303
  - [Changelog](CHANGELOG.md)
284
304
  - [Contributing](CONTRIBUTING.md)
285
305
 
286
- For local development, use committed Freeflow snapshots with `npm run snapshot:refresh`. A snapshot identifies a committed Freeflow revision; an installed package is a separate host artifact and identity. Do not treat an uncommitted working tree as a production package source. Snapshot handling does not patch host files, claim `fsync`, or promise exactly-once delivery. PiFlow owns any host development launcher and state synchronization.
306
+ For local Pi/PiFlow development, refresh a development snapshot only from a committed Freeflow revision with `npm run snapshot:refresh`. A snapshot is not a production install or release.
287
307
 
288
308
  ## What Freeflow is not
289
309
 
290
310
  - Not a new agent or workflow engine.
291
311
  - Not a rigid phase pipeline.
292
- - Not a permission or CLI enforcement framework.
312
+ - Not a permission or enforcement framework.
293
313
  - Not a replacement for repository instructions, tests, policies, or review culture.
294
- - Not proof that the current candidate is behaviorally ready.
314
+ - Not proof that a configured model, cache path, or candidate is behaviorally ready.
295
315
 
296
316
  ## License
297
317