@hassangameryt/freeflow 0.7.1 → 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 (147) 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 +153 -128
  6. package/capabilities/cognitive-routing/SKILL.md +126 -274
  7. package/command-surface.json +7 -1
  8. package/gemini-extension.json +1 -1
  9. package/package.json +4 -4
  10. package/pi-extension/dist/cognitive-routing-v2/budget.js +42 -0
  11. package/pi-extension/dist/cognitive-routing-v2/config.js +136 -0
  12. package/pi-extension/dist/cognitive-routing-v2/projection.js +330 -0
  13. package/pi-extension/dist/cognitive-routing-v2/render.js +252 -0
  14. package/pi-extension/dist/cognitive-routing-v2/runtime.js +2181 -0
  15. package/pi-extension/dist/cognitive-routing-v2/schemas.js +173 -0
  16. package/pi-extension/dist/cognitive-routing-v2/state.js +828 -0
  17. package/pi-extension/dist/cognitive-routing-v2/tools.js +60 -0
  18. package/pi-extension/dist/cognitive-routing-v2/types.js +48 -0
  19. package/pi-extension/dist/context-virtualization/runtime.js +29 -7
  20. package/pi-extension/dist/freeflow-context/tool.js +12 -6
  21. package/pi-extension/dist/index.js +302 -626
  22. package/pi-extension/dist/provider-support/astra/adapter.js +110 -0
  23. package/pi-extension/dist/provider-support/astra/history.js +125 -0
  24. package/pi-extension/dist/provider-support/astra/index.js +11 -0
  25. package/pi-extension/dist/provider-support/astra/session-state.js +114 -0
  26. package/pi-extension/dist/provider-support/index.js +4 -0
  27. package/pi-extension/dist/runtime/request-history.js +216 -0
  28. package/pi-extension/dist/runtime/runtime-context.js +85 -16
  29. package/pi-extension/dist/session-sources/events.js +217 -0
  30. package/pi-extension/dist/session-sources/provenance.js +32 -0
  31. package/pi-extension/dist/session-sources/read-only-session.js +148 -0
  32. package/pi-extension/dist/session-sources/sources.js +277 -0
  33. package/pi-extension/dist/settings/settings-ui.js +274 -147
  34. package/pi-extension/src/cognitive-routing-v2/budget.ts +42 -0
  35. package/pi-extension/src/cognitive-routing-v2/config.ts +173 -0
  36. package/pi-extension/src/cognitive-routing-v2/projection.ts +375 -0
  37. package/pi-extension/src/cognitive-routing-v2/render.ts +277 -0
  38. package/pi-extension/src/cognitive-routing-v2/runtime.ts +2241 -0
  39. package/pi-extension/src/cognitive-routing-v2/schemas.ts +180 -0
  40. package/pi-extension/src/cognitive-routing-v2/state.ts +839 -0
  41. package/pi-extension/src/cognitive-routing-v2/tools.ts +62 -0
  42. package/pi-extension/src/cognitive-routing-v2/types.ts +254 -0
  43. package/pi-extension/src/context-virtualization/runtime.ts +30 -8
  44. package/pi-extension/src/freeflow-context/tool.ts +12 -6
  45. package/pi-extension/src/index.ts +308 -675
  46. package/pi-extension/src/provider-support/astra/adapter.ts +108 -0
  47. package/pi-extension/src/provider-support/astra/history.ts +145 -0
  48. package/pi-extension/src/provider-support/astra/index.ts +12 -0
  49. package/pi-extension/src/provider-support/astra/session-state.ts +113 -0
  50. package/pi-extension/src/provider-support/index.ts +5 -0
  51. package/pi-extension/src/runtime/request-history.ts +243 -0
  52. package/pi-extension/src/runtime/runtime-context.ts +100 -17
  53. package/pi-extension/src/session-sources/events.ts +230 -0
  54. package/pi-extension/src/session-sources/provenance.ts +39 -0
  55. package/pi-extension/src/session-sources/read-only-session.ts +170 -0
  56. package/pi-extension/src/session-sources/sources.ts +334 -0
  57. package/pi-extension/src/settings/settings-ui.ts +311 -158
  58. package/pi-extension/tests/cache-reuse/history.test.js +117 -0
  59. package/pi-extension/tests/cache-reuse/native.test.js +91 -0
  60. package/pi-extension/tests/cache-reuse/settings.test.js +211 -0
  61. package/pi-extension/tests/cognitive-routing-v2/communication.test.js +577 -0
  62. package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +183 -0
  63. package/pi-extension/tests/cognitive-routing-v2/delegation.test.js +557 -0
  64. package/pi-extension/tests/cognitive-routing-v2/native.test.js +474 -0
  65. package/pi-extension/tests/cognitive-routing-v2/performance.test.js +87 -0
  66. package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +300 -0
  67. package/pi-extension/tests/cognitive-routing-v2/projection.test.js +241 -0
  68. package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +1034 -0
  69. package/pi-extension/tests/cognitive-routing-v2/render.test.js +244 -0
  70. package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +423 -0
  71. package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +521 -0
  72. package/pi-extension/tests/cognitive-routing-v2/state.test.js +586 -0
  73. package/pi-extension/tests/context-virtualization/extension.test.js +33 -7
  74. package/pi-extension/tests/context-virtualization/runtime.test.js +17 -3
  75. package/pi-extension/tests/fixtures/routing-native.js +191 -0
  76. package/pi-extension/tests/integration/mode-free-core.test.js +6 -4
  77. package/pi-extension/tests/integration/pi-extension.test.js +655 -59
  78. package/pi-extension/tests/integration/prompt-architecture.test.js +127 -30
  79. package/pi-extension/tests/integration/unaffected-regressions.test.js +78 -11
  80. package/pi-extension/tests/provider-support/astra-boundaries.test.js +75 -0
  81. package/pi-extension/tests/provider-support/astra.test.js +306 -0
  82. package/pi-extension/tests/provider-support/cli.test.js +92 -0
  83. package/pi-extension/tests/provider-support/native.test.js +183 -0
  84. package/plugin.json +1 -1
  85. package/runtime/prompts/cognitive-routing.md +4 -5
  86. package/runtime/prompts/core.md +51 -45
  87. package/runtime/prompts/interaction-contract.md +5 -5
  88. package/skills/action-selection/SKILL.md +57 -97
  89. package/skills/design-for-depth/SKILL.md +58 -193
  90. package/skills/design-for-depth/references/implementation-decisions.md +76 -0
  91. package/skills/diagnose-failure/SKILL.md +64 -196
  92. package/skills/discuss/SKILL.md +64 -123
  93. package/skills/discuss/references/discussion-continuity.md +7 -3
  94. package/skills/execute-work/SKILL.md +69 -88
  95. package/skills/execute-work/references/execute-work-edges.md +9 -3
  96. package/skills/handoff/SKILL.md +44 -54
  97. package/skills/handoff/references/handoff-templates.md +15 -6
  98. package/skills/review-artifact/SKILL.md +80 -127
  99. package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +1 -1
  100. package/skills/review-work/SKILL.md +65 -115
  101. package/skills/review-work/references/independent-work-reviewer-contract.md +1 -1
  102. package/skills/simplify-code/SKILL.md +47 -100
  103. package/skills/track-work/SKILL.md +128 -119
  104. package/skills/track-work/references/working-record-format.md +14 -2
  105. package/skills/verify-work/SKILL.md +58 -62
  106. package/skills/verify-work/references/integration-evidence.md +4 -2
  107. package/skills/verify-work/references/test-design.md +89 -0
  108. package/skills/workflow/SKILL.md +73 -119
  109. package/skills/write-plan/SKILL.md +46 -77
  110. package/skills/write-plan/references/plan-shapes.md +5 -5
  111. package/skills/write-spec/SKILL.md +51 -63
  112. package/skills/write-spec/references/artifact-standards.md +2 -2
  113. package/skills/write-spec/references/decision-records.md +3 -2
  114. package/skills/write-spec/references/spec-shapes.md +15 -0
  115. package/pi-extension/dist/cognitive-routing/commands.js +0 -96
  116. package/pi-extension/dist/cognitive-routing/config.js +0 -232
  117. package/pi-extension/dist/cognitive-routing/controller.js +0 -1292
  118. package/pi-extension/dist/cognitive-routing/history.js +0 -451
  119. package/pi-extension/dist/cognitive-routing/host.js +0 -188
  120. package/pi-extension/dist/cognitive-routing/pi-routing-session.js +0 -414
  121. package/pi-extension/dist/cognitive-routing/pi-session-control.js +0 -320
  122. package/pi-extension/dist/cognitive-routing/runtime.js +0 -43
  123. package/pi-extension/dist/cognitive-routing/tool.js +0 -212
  124. package/pi-extension/dist/cognitive-routing/types.js +0 -6
  125. package/pi-extension/src/cognitive-routing/commands.ts +0 -129
  126. package/pi-extension/src/cognitive-routing/config.ts +0 -303
  127. package/pi-extension/src/cognitive-routing/controller.ts +0 -1628
  128. package/pi-extension/src/cognitive-routing/history.ts +0 -650
  129. package/pi-extension/src/cognitive-routing/host.ts +0 -266
  130. package/pi-extension/src/cognitive-routing/pi-routing-session.ts +0 -538
  131. package/pi-extension/src/cognitive-routing/pi-session-control.ts +0 -444
  132. package/pi-extension/src/cognitive-routing/runtime.ts +0 -57
  133. package/pi-extension/src/cognitive-routing/tool.ts +0 -273
  134. package/pi-extension/src/cognitive-routing/types.ts +0 -89
  135. package/pi-extension/tests/cognitive-routing/commands.test.js +0 -134
  136. package/pi-extension/tests/cognitive-routing/controller.test.js +0 -1128
  137. package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +0 -1142
  138. package/pi-extension/tests/cognitive-routing/history.test.js +0 -274
  139. package/pi-extension/tests/cognitive-routing/host-identity.test.js +0 -63
  140. package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +0 -434
  141. package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +0 -174
  142. package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +0 -91
  143. package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +0 -279
  144. package/pi-extension/tests/cognitive-routing/tool.test.js +0 -230
  145. package/skills/tdd/SKILL.md +0 -143
  146. package/skills/tdd/references/test-design.md +0 -96
  147. /package/pi-extension/tests/{cognitive-routing/host-fixture.js → fixtures/pi-host.js} +0 -0
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "name": "freeflow",
12
12
  "description": "Feedback-based control for coding agents.",
13
- "version": "0.7.1",
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.1",
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.1",
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.1",
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,87 +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 Execution Routes — automatic control only
45
- ├─ Reasoning chooses one route
46
- │ ├─ YIELD → Standard leads ordinary work → YIELD HANDOFF → Reasoning
47
- │ ├─ DELEGATE → open model-written boundary → Standard executes
48
- │ │ └─ RETURN → Reasoning assesses; boundary remains open until CLOSE
49
- │ └─ TASK ACT → Reasoning performs narrow direct OBSERVE or ACT_BOUNDED
50
- └─ Action Selection guides 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
51
64
  ```
52
65
 
53
- Under automatic Cognitive Routing control, each new user interaction begins in Reasoning. Under manual control, the selected compute profile runs the ordinary unsplit Workflow. Cognitive Routing changes compute 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.
54
67
 
55
- 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:
56
69
 
57
- ## 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
+ ```
58
77
 
59
- 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.
60
79
 
61
- | 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 |
62
85
  | --- | --- | --- |
63
- | Codex | Shared skills and Codex `SessionStart` hook | Not available; Pi/PiFlow capabilities are not delivered |
64
- | Claude Code | Shared skills and Claude Code `SessionStart` hook | Not available; Pi/PiFlow capabilities are not delivered |
65
- | Gemini CLI | Gemini extension manifest, shared skills, and Gemini `SessionStart` hook | Not available; Pi/PiFlow capabilities are not delivered |
66
- | Cursor | Agent Plugins 1.0 skills plus Cursor-specific hook delivery | Not available; Pi/PiFlow capabilities are not delivered |
67
- | GitHub Copilot / VS Code | Agent Plugins 1.0 skills plus Copilot-specific hook delivery | Not available; Pi/PiFlow capabilities are not delivered |
68
- | Kiro | Agent Plugins 1.0 Power and shared skills | Not available; no Kiro-specific runtime adapter is claimed |
69
- | OpenCode v2 | Canonical `skills/` through OpenCode’s project skill source | Not available; skills-only support |
70
- | Hermes Agent | Agent Plugins 1.0 package and canonical skills | Not available; skills-only support |
71
- | Pi | Shared skills, Pi extension, optional context capabilities, and native host controls | Available when configured and the official model-state APIs are present |
72
- | PiFlow | Freeflow package hosted by the separate PiFlow distribution | Available when configured |
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.
73
91
 
74
- Freeflow owns workflow policy, portable prompt fragments, the 25-skill distribution kernel, host adapters, Pi/PiFlow capabilities, and the Pi extension. Each host owns its launch, package installation, session state, updates, and native model-state control; PiFlow remains a supported host integration.
92
+ ## Availability
75
93
 
76
- ## 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 |
77
104
 
78
- ### Workflow and task memory
105
+ Configuration or installation alone does not establish runtime delivery.
79
106
 
80
- - **Workflow** coordinates authority, owner selection, evidence-driven re-entry, and Supported Exit.
81
- - **Action Selection** bounds uncertain or broad Environment Interactions while preserving the current owner.
82
- - **Track Work** maintains a Working Record when decisions, evidence, blockers, or the next action must survive context loss.
83
- - **Verify Work, Review Work, Review Artifact, and Diagnose Failure** separate factual support, judgment, artifact fitness, and unsupported causes.
107
+ ## Host support
84
108
 
85
- ### Optional host capabilities
109
+ Freeflow is one package with different host boundaries:
86
110
 
87
- - **[Cognitive Routing](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/capabilities/cognitive-routing.md)** places compute between Reasoning and Standard under automatic control in Pi and PiFlow. It remains experimental.
88
- - **[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.
89
- - **[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 |
90
123
 
91
- 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.
92
125
 
93
126
  ## Quick start
94
127
 
95
- 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).
96
129
 
97
130
  ### Codex
98
131
 
@@ -118,17 +151,24 @@ Trust the Freeflow hook from `/hooks`, then start a new session.
118
151
  gemini extensions install https://github.com/hassan-mohiddin/freeflow
119
152
  ```
120
153
 
121
- 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.
122
155
 
123
- ### Cursor, GitHub Copilot, VS Code, Kiro, OpenCode, and Hermes Agent
156
+ ### Cursor, GitHub Copilot, VS Code, Kiro, OpenCode, and Hermes
124
157
 
125
- 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:
126
159
 
127
160
  ```bash
128
161
  copilot plugin install hassan-mohiddin/freeflow
129
162
  ```
130
163
 
131
- 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.
132
172
 
133
173
  ### Pi
134
174
 
@@ -142,80 +182,48 @@ Or:
142
182
  pi install git:github.com/hassan-mohiddin/freeflow
143
183
  ```
144
184
 
145
- The full normal-Pi integration targets Pi 0.84.3 or newer; Pi 0.84.4 is the current Cognitive Routing test target.
185
+ Restart Pi or use `/reload` after installation or updates.
146
186
 
147
187
  ### PiFlow
148
188
 
149
- Install PiFlow separately, then install Freeflow into it:
150
-
151
189
  ```bash
152
190
  npm install -g --ignore-scripts @hassangameryt/piflow
153
191
  piflow install npm:@hassangameryt/freeflow
154
192
  ```
155
193
 
156
- For a Git source:
194
+ The current PiFlow adapter does not provide Cognitive Routing.
157
195
 
158
- ```bash
159
- piflow install git:github.com/hassan-mohiddin/freeflow
160
- ```
196
+ ### Activate a repository
161
197
 
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.
204
+ This creates the required shared `.freeflow/config.json` activation boundary. Minimal activation is `{}`. Optional `.freeflow/local.json` personal overrides cannot activate Freeflow alone.
169
205
 
170
- ## Workflow
206
+ ## Use Freeflow effectively
171
207
 
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.
173
-
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.
175
-
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:
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.
190
221
 
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 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 25 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.
197
-
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,47 +254,64 @@ Contributor calls:
246
254
  /evaluate-skill
247
255
  ```
248
256
 
249
- Pi and PiFlow Cognitive Routing controls:
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
264
+ /freeflow settings local
255
265
  /freeflow settings repo
256
- /freeflow profile standard
257
- /freeflow profile reasoning
266
+ /freeflow profile coordinator
267
+ /freeflow profile helper
268
+ /freeflow profile executor
258
269
  /freeflow profile auto
270
+ /freeflow profile history
271
+ /freeflow resume
259
272
  ```
260
273
 
261
- `/freeflow settings` edits personal overrides, `/freeflow settings session` manages temporary enablement and optional-context overrides, and `/freeflow settings repo` edits shared repository settings. Profile changes require an idle host with the required model-state APIs.
274
+ Profile changes and resume require an idle host. These commands do not prove installed-host delivery or authorize task work.
275
+
276
+ ## Evidence and limits
277
+
278
+ Freeflow is explicit about what observations prove:
262
279
 
263
- In Pi or PiFlow, while the host is idle:
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.
264
286
 
265
- - `Ctrl+Shift+R` cycles the manual standard/reasoning hold.
266
- - `Ctrl+Shift+A` sets automatic control; from a manual hold, it releases the hold and moves to Reasoning when necessary. Repeating it while already automatic is idempotent.
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.
267
288
 
268
- ## Documentation and development
289
+ ## Documentation
269
290
 
270
- - [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)
271
292
  - [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md)
272
- - [Architecture](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/architecture.md)
273
- - [System Prompt Architecture](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/prompt-architecture.md)
274
- - [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)
275
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)
276
299
  - [Skill routing](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/skill-routing.md)
277
- - [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)
278
303
  - [Changelog](CHANGELOG.md)
279
304
  - [Contributing](CONTRIBUTING.md)
280
305
 
281
- For local development, use committed Freeflow snapshots with `npm run snapshot:refresh`. Do not treat an uncommitted working tree as a production package source. PiFlow owns the 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.
282
307
 
283
308
  ## What Freeflow is not
284
309
 
285
310
  - Not a new agent or workflow engine.
286
311
  - Not a rigid phase pipeline.
287
- - Not a permission or CLI enforcement framework.
312
+ - Not a permission or enforcement framework.
288
313
  - Not a replacement for repository instructions, tests, policies, or review culture.
289
- - Not proof that the current candidate is behaviorally ready.
314
+ - Not proof that a configured model, cache path, or candidate is behaviorally ready.
290
315
 
291
316
  ## License
292
317