@hassangameryt/freeflow 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +3 -2
  3. package/.codex-plugin/plugin.json +5 -6
  4. package/.cursor-plugin/plugin.json +25 -0
  5. package/README.md +66 -56
  6. package/capabilities/cognitive-routing/SKILL.md +288 -130
  7. package/com.github.copilot/hooks/hooks.json +11 -0
  8. package/command-surface.json +0 -24
  9. package/gemini-extension.json +5 -0
  10. package/hooks/adapters/claude-session-start.mjs +16 -0
  11. package/hooks/adapters/codex-session-start.mjs +16 -0
  12. package/hooks/adapters/copilot-session-start.mjs +13 -0
  13. package/hooks/adapters/cursor-session-start.mjs +13 -0
  14. package/hooks/adapters/gemini-session-start.mjs +15 -0
  15. package/hooks/claude/hooks.json +18 -0
  16. package/hooks/codex/hooks.json +18 -0
  17. package/hooks/cursor/hooks.json +9 -0
  18. package/hooks/freeflow-runtime-context.mjs +3 -650
  19. package/hooks/hooks.json +4 -30
  20. package/hooks/shared/runtime-context.mjs +210 -0
  21. package/hooks/tests/check-host-adapters.test.mjs +82 -0
  22. package/hooks/tests/check-runtime-context-hook.sh +140 -320
  23. package/package.json +20 -4
  24. package/pi-extension/dist/cognitive-routing/commands.js +3 -3
  25. package/pi-extension/dist/cognitive-routing/config.js +16 -20
  26. package/pi-extension/dist/cognitive-routing/controller.js +478 -48
  27. package/pi-extension/dist/cognitive-routing/history.js +12 -0
  28. package/pi-extension/dist/cognitive-routing/host.js +74 -12
  29. package/pi-extension/dist/cognitive-routing/pi-routing-session.js +414 -0
  30. package/pi-extension/dist/cognitive-routing/pi-session-control.js +320 -0
  31. package/pi-extension/dist/cognitive-routing/tool.js +1 -0
  32. package/pi-extension/dist/cognitive-routing/types.js +1 -1
  33. package/pi-extension/dist/index.js +236 -219
  34. package/pi-extension/dist/runtime/runtime-context.js +126 -286
  35. package/pi-extension/dist/settings/settings-ui.js +52 -336
  36. package/pi-extension/src/cognitive-routing/commands.ts +15 -5
  37. package/pi-extension/src/cognitive-routing/config.ts +16 -20
  38. package/pi-extension/src/cognitive-routing/controller.ts +561 -51
  39. package/pi-extension/src/cognitive-routing/history.ts +12 -0
  40. package/pi-extension/src/cognitive-routing/host.ts +110 -16
  41. package/pi-extension/src/cognitive-routing/pi-routing-session.ts +538 -0
  42. package/pi-extension/src/cognitive-routing/pi-session-control.ts +444 -0
  43. package/pi-extension/src/cognitive-routing/tool.ts +1 -0
  44. package/pi-extension/src/cognitive-routing/types.ts +1 -1
  45. package/pi-extension/src/index.ts +249 -239
  46. package/pi-extension/src/runtime/runtime-context.ts +129 -305
  47. package/pi-extension/src/settings/settings-ui.ts +53 -371
  48. package/pi-extension/tests/cognitive-routing/commands.test.js +1 -1
  49. package/pi-extension/tests/cognitive-routing/controller.test.js +69 -40
  50. package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +128 -57
  51. package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +434 -0
  52. package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +174 -0
  53. package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +91 -0
  54. package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +47 -4
  55. package/pi-extension/tests/integration/mode-free-core.test.js +218 -0
  56. package/pi-extension/tests/integration/pi-extension.test.js +430 -2478
  57. package/pi-extension/tests/integration/prompt-architecture.test.js +124 -79
  58. package/pi-extension/tests/integration/unaffected-regressions.test.js +411 -0
  59. package/plugin.json +33 -0
  60. package/runtime/prompts/cognitive-routing.md +5 -4
  61. package/runtime/prompts/conversation-history.md +1 -1
  62. package/runtime/prompts/core.md +77 -6
  63. package/runtime/prompts/interaction-contract.md +6 -2
  64. package/skills/action-selection/SKILL.md +93 -44
  65. package/skills/action-selection/references/trajectory-stalls.md +71 -0
  66. package/skills/bypass/SKILL.md +109 -39
  67. package/skills/commit-work/SKILL.md +94 -55
  68. package/skills/commit-work/references/git-state-edges.md +94 -0
  69. package/skills/commit-work/references/simple-push.md +92 -0
  70. package/skills/commit-work/references/staging-decisions.md +79 -46
  71. package/skills/decision-gate/SKILL.md +80 -22
  72. package/skills/design-for-depth/SKILL.md +208 -43
  73. package/skills/design-for-depth/references/design-pressure-signals.md +108 -240
  74. package/skills/design-for-depth/references/interface-design-loop.md +77 -97
  75. package/skills/design-for-depth/references/module-and-dependency-design.md +147 -0
  76. package/skills/design-for-depth/references/software-design-philosophy.md +127 -173
  77. package/skills/design-for-depth/references/state-and-failure-boundaries.md +136 -0
  78. package/skills/diagnose-failure/SKILL.md +198 -52
  79. package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +19 -5
  80. package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +13 -5
  81. package/skills/discuss/SKILL.md +118 -76
  82. package/skills/discuss/references/discussion-continuity.md +84 -32
  83. package/skills/evaluate-skill/SKILL.md +166 -52
  84. package/skills/evaluate-skill/references/evaluation-definition-schema.md +2 -2
  85. package/skills/evaluate-skill/references/evaluation-design.md +56 -30
  86. package/skills/evaluate-skill/references/execution-and-evidence.md +1 -1
  87. package/skills/evaluate-skill/references/review-and-revision.md +62 -21
  88. package/skills/execute-work/SKILL.md +98 -59
  89. package/skills/execute-work/references/code-practices.md +4 -4
  90. package/skills/execute-work/references/execute-work-edges.md +42 -22
  91. package/skills/review-artifact/SKILL.md +132 -71
  92. package/skills/review-artifact/references/adjudicate-artifact-review.md +101 -0
  93. package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +52 -41
  94. package/skills/review-work/SKILL.md +115 -72
  95. package/skills/review-work/references/adjudicate-work-review.md +97 -0
  96. package/skills/review-work/references/independent-work-reviewer-contract.md +40 -35
  97. package/skills/review-work/references/security-risk-lens.md +17 -15
  98. package/skills/setup-freeflow/SKILL.md +14 -17
  99. package/skills/setup-freeflow/references/activation-contract.md +24 -30
  100. package/skills/setup-freeflow/references/host-setup.md +6 -7
  101. package/skills/simplify-code/SKILL.md +97 -39
  102. package/skills/simplify-code/references/simplification-patterns.md +1 -1
  103. package/skills/tdd/SKILL.md +108 -41
  104. package/skills/tdd/references/test-design.md +1 -1
  105. package/skills/track-work/SKILL.md +133 -300
  106. package/skills/track-work/references/working-record-format.md +515 -0
  107. package/skills/track-work/scripts/lib/document.mjs +713 -0
  108. package/skills/track-work/scripts/lib/format.mjs +166 -0
  109. package/skills/track-work/scripts/lib/store.mjs +233 -0
  110. package/skills/track-work/scripts/lib/transitions.mjs +790 -0
  111. package/skills/track-work/scripts/lib/views.mjs +27 -430
  112. package/skills/track-work/scripts/working-record.mjs +292 -98
  113. package/skills/verify-work/SKILL.md +46 -20
  114. package/skills/verify-work/references/browser-runtime-evidence.md +1 -1
  115. package/skills/verify-work/references/integration-evidence.md +1 -7
  116. package/skills/verify-work/references/performance-evidence.md +1 -1
  117. package/skills/workflow/SKILL.md +110 -80
  118. package/skills/workflow/references/domain-skill-composition.md +24 -18
  119. package/skills/write-skill/SKILL.md +218 -62
  120. package/skills/write-skill/references/activation-boundaries.md +63 -21
  121. package/skills/write-skill/references/agent-first-instructions.md +61 -27
  122. package/skills/write-skill/references/progressive-disclosure.md +91 -41
  123. package/skills/write-skill/references/skill-dependency-graphs.md +190 -0
  124. package/runtime/prompts/skills.md +0 -65
  125. package/skills/mode-contract/SKILL.md +0 -104
  126. package/skills/track-work/scripts/lib/codec.mjs +0 -570
  127. package/skills/track-work/scripts/lib/commands.mjs +0 -568
  128. package/skills/track-work/scripts/lib/contract.mjs +0 -303
  129. package/skills/track-work/scripts/lib/model.mjs +0 -506
  130. package/skills/track-work/scripts/lib/operations.mjs +0 -965
  131. package/skills/track-work/scripts/lib/record-store.mjs +0 -264
  132. package/skills/track-work/scripts/lib/result.mjs +0 -37
  133. package/skills/track-work/scripts/lib/rewrites.mjs +0 -740
  134. package/skills/track-work/scripts/lib/schema.mjs +0 -277
  135. package/skills/track-work/scripts/lib/source-inventory.mjs +0 -162
  136. package/skills/track-work/scripts/lib/workspace.mjs +0 -134
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "name": "freeflow",
12
12
  "description": "Feedback-based control for coding agents.",
13
- "version": "0.6.0",
13
+ "version": "0.7.1",
14
14
  "category": "development",
15
15
  "source": "./",
16
16
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "freeflow",
3
- "description": "Freeflow gives coding agents an Interaction Contract, evidence-driven Workflow, focused methods, and durable task memory across conversation, workflow, and strict-workflow modes.",
4
- "version": "0.6.0",
3
+ "description": "Freeflow gives coding agents an Interaction Contract, adaptive Workflow, focused methods, and durable task memory.",
4
+ "version": "0.7.1",
5
5
  "author": {
6
6
  "name": "Hassan Mohiddin"
7
7
  },
@@ -9,6 +9,7 @@
9
9
  "repository": "https://github.com/hassan-mohiddin/freeflow",
10
10
  "license": "MIT",
11
11
  "skills": "./skills/",
12
+ "hooks": "./hooks/claude/hooks.json",
12
13
  "keywords": [
13
14
  "workflow",
14
15
  "skills",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freeflow",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Feedback-based control system for coding agents.",
5
5
  "author": {
6
6
  "name": "Hassan Mohiddin"
@@ -21,18 +21,17 @@
21
21
  "claude"
22
22
  ],
23
23
  "skills": "./skills/",
24
- "hooks": "./hooks/hooks.json",
24
+ "hooks": "./hooks/codex/hooks.json",
25
25
  "interface": {
26
26
  "displayName": "Freeflow",
27
27
  "shortDescription": "Feedback-based control for coding agents.",
28
- "longDescription": "Freeflow gives coding agents an Interaction Contract, evidence-driven Workflow, focused methods, and durable task memory across conversation, workflow, and strict-workflow modes.",
28
+ "longDescription": "Freeflow gives coding agents an Interaction Contract, adaptive Workflow, focused methods, and durable task memory.",
29
29
  "developerName": "Hassan Mohiddin",
30
30
  "category": "Coding",
31
31
  "capabilities": ["Interactive", "Read", "Write"],
32
32
  "defaultPrompt": [
33
- "Use Freeflow workflow mode for this task.",
34
- "Keep this in conversation mode.",
35
- "Use strict-workflow for this risky change."
33
+ "Use Freeflow's adaptive Workflow for this task.",
34
+ "Respect the Interaction Contract and ask before going beyond the requested scope."
36
35
  ],
37
36
  "websiteURL": "https://github.com/hassan-mohiddin/freeflow",
38
37
  "privacyPolicyURL": "https://github.com/hassan-mohiddin/freeflow/blob/main/README.md",
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "freeflow",
3
+ "description": "Feedback-based control system for coding agents.",
4
+ "version": "0.7.1",
5
+ "author": {
6
+ "name": "Hassan Mohiddin"
7
+ },
8
+ "homepage": "https://github.com/hassan-mohiddin/freeflow",
9
+ "repository": "https://github.com/hassan-mohiddin/freeflow",
10
+ "license": "MIT",
11
+ "skills": "./skills/",
12
+ "hooks": "./hooks/cursor/hooks.json",
13
+ "logo": "assets/freeflow-plugin-icon-transparent.png",
14
+ "keywords": [
15
+ "workflow",
16
+ "skills",
17
+ "agents",
18
+ "feedback-loop",
19
+ "task-memory",
20
+ "planning",
21
+ "verification",
22
+ "review",
23
+ "cursor"
24
+ ]
25
+ }
package/README.md CHANGED
@@ -2,7 +2,7 @@
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, evidence-driven Workflow, focused methods, durable task memory, and controlled delivery boundaries.
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.
6
6
 
7
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.
8
8
 
@@ -15,7 +15,7 @@ Coding agents commonly fail at control boundaries:
15
15
  | A question or tentative idea becomes an edit. | The Interaction Contract answers first and waits for clear action authority. |
16
16
  | A prompt conflicts with tests, policy, or accepted behavior. | Decision Gate names the conflict before mutation. |
17
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. |
18
+ | Every task receives unnecessary ceremony. | Workflow enters at the narrowest useful owner and scales pressure to risk. |
19
19
  | A passing command becomes an unsupported completion claim. | Verify Work matches evidence to the exact claim and boundary. |
20
20
  | Compaction loses task state. | Track Work restores a Working Record and reconciles it with live state. |
21
21
  | Tool output consumes future context. | Context Virtualization can archive consumed evidence while preserving session history. |
@@ -26,7 +26,7 @@ Coding agents commonly fail at control boundaries:
26
26
  - [Host support](#host-support)
27
27
  - [Capabilities](#capabilities)
28
28
  - [Quick start](#quick-start)
29
- - [Modes and workflow](#modes-and-workflow)
29
+ - [Workflow](#workflow)
30
30
  - [System prompt architecture](#system-prompt-architecture)
31
31
  - [Evidence and limits](#evidence-and-limits)
32
32
  - [Commands](#commands)
@@ -41,21 +41,16 @@ Freeflow uses one active agent, one shared context, and nested feedback loops:
41
41
  Interaction Lifecycle
42
42
  └─ Workflow Feedback Loop
43
43
  ├─ establishes authority, owner, and slice
44
- └─ Cognitive Execution Loop — automatic control only
45
- ├─ Reasoning establishes the governing execution contract
46
- ├─ DELEGATE to Standard
47
- │ └─ Environment Interaction Loop
48
- │ ├─ select and bound the next action
49
- │ ├─ use Action Selection when uncertain or broad
50
- │ ├─ take the obvious fast path when mechanical
51
- │ ├─ execute and observe
52
- │ └─ repeat within the delegation contract
53
- ├─ RETURN evidence to Reasoning
54
- ├─ Reasoning self-reviews
55
- └─ close, delegate correction, or return to Workflow
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
56
51
  ```
57
52
 
58
- Under manual profile control, the Cognitive Execution Loop is not used; the held profile runs the ordinary unsplit Workflow. Cognitive Routing changes compute placement only. It never changes authority, ownership, mode, task scope, evidence requirements, or review independence.
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.
59
54
 
60
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.
61
56
 
@@ -65,12 +60,18 @@ Freeflow is one package with different host boundaries:
65
60
 
66
61
  | Host | Freeflow support | Cognitive Routing |
67
62
  | --- | --- | --- |
68
- | Codex | Shared skills and lifecycle hook | Not available; Pi-only capabilities are not delivered |
69
- | Claude Code | Shared skills and lifecycle hook | Not available; Pi-only capabilities are not delivered |
70
- | Pi | Shared skills, Pi extension, and optional context capabilities | Configuration is inspectable but execution is disabled |
71
- | PiFlow | Freeflow package hosted by the separate PiFlow distribution | Available when host controls, Skills, and profiles are configured |
72
-
73
- Freeflow owns workflow policy, prompt fragments, skills, capabilities, and the Pi extension. PiFlow owns host launch, package installation, session state, updates, and the model-state control required by Cognitive Routing.
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 |
73
+
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.
74
75
 
75
76
  ## Capabilities
76
77
 
@@ -78,20 +79,20 @@ Freeflow owns workflow policy, prompt fragments, skills, capabilities, and the P
78
79
 
79
80
  - **Workflow** coordinates authority, owner selection, evidence-driven re-entry, and Supported Exit.
80
81
  - **Action Selection** bounds uncertain or broad Environment Interactions while preserving the current owner.
81
- - **Track Work** maintains one Working Record when decisions, evidence, blockers, or the next action must survive context loss.
82
+ - **Track Work** maintains a Working Record when decisions, evidence, blockers, or the next action must survive context loss.
82
83
  - **Verify Work, Review Work, Review Artifact, and Diagnose Failure** separate factual support, judgment, artifact fitness, and unsupported causes.
83
84
 
84
85
  ### Optional host capabilities
85
86
 
86
- - **[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. It is PiFlow-only and experimental.
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.
87
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.
88
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.
89
90
 
90
- All three capabilities are Skills-gated and default-off or unavailable unless their configuration and host conditions are effective. None of them grants authority or replaces Workflow.
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.
91
92
 
92
93
  ## Quick start
93
94
 
94
- For the complete host-specific setup, see [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md).
95
+ For complete host-specific setup, see [Getting Started](https://github.com/hassan-mohiddin/freeflow/blob/main/plugin-docs/getting-started.md).
95
96
 
96
97
  ### Codex
97
98
 
@@ -111,6 +112,24 @@ Trust the Freeflow hook from `/hooks`, then start a new session.
111
112
  /reload-plugins
112
113
  ```
113
114
 
115
+ ### Gemini CLI
116
+
117
+ ```bash
118
+ gemini extensions install https://github.com/hassan-mohiddin/freeflow
119
+ ```
120
+
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.
122
+
123
+ ### Cursor, GitHub Copilot, VS Code, Kiro, OpenCode, and Hermes Agent
124
+
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:
126
+
127
+ ```bash
128
+ copilot plugin install hassan-mohiddin/freeflow
129
+ ```
130
+
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.
132
+
114
133
  ### Pi
115
134
 
116
135
  ```bash
@@ -123,6 +142,8 @@ Or:
123
142
  pi install git:github.com/hassan-mohiddin/freeflow
124
143
  ```
125
144
 
145
+ The full normal-Pi integration targets Pi 0.84.3 or newer; Pi 0.84.4 is the current Cognitive Routing test target.
146
+
126
147
  ### PiFlow
127
148
 
128
149
  Install PiFlow separately, then install Freeflow into it:
@@ -144,19 +165,13 @@ In the target repository, run:
144
165
  /setup-freeflow
145
166
  ```
146
167
 
147
- Setup creates `.freeflow/config.json`, the required shared activation boundary. `.freeflow/local.json` is an optional personal override and cannot activate Freeflow by itself.
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.
148
169
 
149
- ## Modes and workflow
170
+ ## Workflow
150
171
 
151
- Freeflow has exactly three modes:
152
-
153
- | Mode | Use for |
154
- | --- | --- |
155
- | `conversation` | Discussion, critique, explanation, and passive inspection |
156
- | `workflow` | Active evidence generation and normal consequential work |
157
- | `strict-workflow` | High-risk or hard-to-reverse work |
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.
158
173
 
159
- Mode changes do not authorize work. A direct request, still-valid approval, or accepted task contract establishes the authority envelope; mode, skill selection, usefulness, and new evidence do not widen it.
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.
160
175
 
161
176
  Every bounded activity follows the same Feedback Loop:
162
177
 
@@ -171,13 +186,14 @@ orient to accepted intent, task memory, and live evidence
171
186
 
172
187
  ## System prompt architecture
173
188
 
174
- Freeflow’s model-facing surface has three layers:
189
+ Freeflow’s model-facing surface has four coordinated parts:
175
190
 
176
- 1. **Stable prompt fragments** under `runtime/prompts/` provide compact guidance and conditional capability cues.
177
- 2. **Runtime State** reports current mode, capability availability, and Cognitive Routing `Control`/`Profile` before every provider request.
178
- 3. **Discoverable skills and tools** provide complete methods and operations when effective gates apply.
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.
179
195
 
180
- One effective-state snapshot determines all three surfaces. The Interaction Contract is prompt-only. Skills gates Cognitive Routing, Context Virtualization, and Conversation History. Missing optional capability content is omitted and reported unavailable rather than fabricated.
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.
181
197
 
182
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.
183
199
 
@@ -186,6 +202,8 @@ Read the full [System Prompt Architecture](https://github.com/hassan-mohiddin/fr
186
202
  Freeflow is explicit about what its checks prove:
187
203
 
188
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;
189
207
  - release evidence is versioned and records source, checks, artifacts, deferred evidence, and limits;
190
208
  - local installation does not prove remote host installation or registry propagation;
191
209
  - deterministic skill/runtime checks do not prove model behavior or universal skill readiness;
@@ -228,32 +246,24 @@ Contributor calls:
228
246
  /evaluate-skill
229
247
  ```
230
248
 
231
- Mode controls:
232
-
233
- ```text
234
- /freeflow mode conversation
235
- /freeflow mode workflow
236
- /freeflow mode strict-workflow
237
- /freeflow mode reset
238
- ```
239
-
240
- Pi settings and PiFlow-only Cognitive Routing controls:
249
+ Pi and PiFlow Cognitive Routing controls:
241
250
 
242
251
  ```text
243
252
  /freeflow
253
+ /freeflow settings
254
+ /freeflow settings session
255
+ /freeflow settings repo
244
256
  /freeflow profile standard
245
257
  /freeflow profile reasoning
246
258
  /freeflow profile auto
247
259
  ```
248
260
 
249
- Pi `/freeflow settings` edits personal overrides, `/freeflow settings session` manages temporary session overrides, and `/freeflow settings repo` edits shared repository settings. Profile changes require PiFlow and an idle host.
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.
250
262
 
251
- In PiFlow, while the host is idle:
263
+ In Pi or PiFlow, while the host is idle:
252
264
 
253
265
  - `Ctrl+Shift+R` cycles the manual standard/reasoning hold.
254
- - `Ctrl+Shift+A` cycles the automatic standard/reasoning profile; from a manual hold, its first press returns to automatic control without forcing a profile transition.
255
-
256
- Normal Pi does not register these Cognitive Routing shortcuts.
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.
257
267
 
258
268
  ## Documentation and development
259
269