@hassangameryt/freeflow 0.7.1 → 0.7.2

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 (122) 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 +28 -23
  6. package/capabilities/cognitive-routing/SKILL.md +94 -311
  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 +120 -0
  12. package/pi-extension/dist/cognitive-routing-v2/projection.js +321 -0
  13. package/pi-extension/dist/cognitive-routing-v2/render.js +231 -0
  14. package/pi-extension/dist/cognitive-routing-v2/runtime.js +1585 -0
  15. package/pi-extension/dist/cognitive-routing-v2/schemas.js +107 -0
  16. package/pi-extension/dist/cognitive-routing-v2/state.js +612 -0
  17. package/pi-extension/dist/cognitive-routing-v2/tools.js +91 -0
  18. package/pi-extension/dist/cognitive-routing-v2/types.js +44 -0
  19. package/pi-extension/dist/freeflow-context/tool.js +5 -0
  20. package/pi-extension/dist/index.js +279 -624
  21. package/pi-extension/dist/runtime/runtime-context.js +63 -13
  22. package/pi-extension/dist/session-sources/events.js +195 -0
  23. package/pi-extension/dist/session-sources/read-only-session.js +148 -0
  24. package/pi-extension/dist/session-sources/sources.js +233 -0
  25. package/pi-extension/dist/settings/settings-ui.js +44 -117
  26. package/pi-extension/src/cognitive-routing-v2/budget.ts +42 -0
  27. package/pi-extension/src/cognitive-routing-v2/config.ts +143 -0
  28. package/pi-extension/src/cognitive-routing-v2/projection.ts +365 -0
  29. package/pi-extension/src/cognitive-routing-v2/render.ts +256 -0
  30. package/pi-extension/src/cognitive-routing-v2/runtime.ts +1634 -0
  31. package/pi-extension/src/cognitive-routing-v2/schemas.ts +109 -0
  32. package/pi-extension/src/cognitive-routing-v2/state.ts +622 -0
  33. package/pi-extension/src/cognitive-routing-v2/tools.ts +93 -0
  34. package/pi-extension/src/cognitive-routing-v2/types.ts +222 -0
  35. package/pi-extension/src/freeflow-context/tool.ts +5 -0
  36. package/pi-extension/src/index.ts +285 -674
  37. package/pi-extension/src/runtime/runtime-context.ts +75 -14
  38. package/pi-extension/src/session-sources/events.ts +208 -0
  39. package/pi-extension/src/session-sources/read-only-session.ts +170 -0
  40. package/pi-extension/src/session-sources/sources.ts +263 -0
  41. package/pi-extension/src/settings/settings-ui.ts +54 -131
  42. package/pi-extension/tests/cognitive-routing-v2/communication.test.js +484 -0
  43. package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +183 -0
  44. package/pi-extension/tests/cognitive-routing-v2/native.test.js +441 -0
  45. package/pi-extension/tests/cognitive-routing-v2/performance.test.js +87 -0
  46. package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +245 -0
  47. package/pi-extension/tests/cognitive-routing-v2/projection.test.js +241 -0
  48. package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +236 -0
  49. package/pi-extension/tests/cognitive-routing-v2/render.test.js +230 -0
  50. package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +153 -0
  51. package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +521 -0
  52. package/pi-extension/tests/cognitive-routing-v2/state.test.js +275 -0
  53. package/pi-extension/tests/context-virtualization/extension.test.js +16 -0
  54. package/pi-extension/tests/fixtures/routing-native.js +188 -0
  55. package/pi-extension/tests/integration/mode-free-core.test.js +3 -2
  56. package/pi-extension/tests/integration/pi-extension.test.js +154 -37
  57. package/pi-extension/tests/integration/prompt-architecture.test.js +87 -6
  58. package/pi-extension/tests/integration/unaffected-regressions.test.js +77 -10
  59. package/plugin.json +1 -1
  60. package/runtime/prompts/cognitive-routing.md +4 -5
  61. package/runtime/prompts/core.md +51 -45
  62. package/runtime/prompts/interaction-contract.md +5 -5
  63. package/skills/action-selection/SKILL.md +57 -97
  64. package/skills/design-for-depth/SKILL.md +58 -193
  65. package/skills/design-for-depth/references/implementation-decisions.md +76 -0
  66. package/skills/diagnose-failure/SKILL.md +64 -196
  67. package/skills/discuss/SKILL.md +64 -123
  68. package/skills/discuss/references/discussion-continuity.md +7 -3
  69. package/skills/execute-work/SKILL.md +69 -88
  70. package/skills/execute-work/references/execute-work-edges.md +9 -3
  71. package/skills/handoff/SKILL.md +44 -54
  72. package/skills/handoff/references/handoff-templates.md +15 -6
  73. package/skills/review-artifact/SKILL.md +80 -127
  74. package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +1 -1
  75. package/skills/review-work/SKILL.md +65 -115
  76. package/skills/review-work/references/independent-work-reviewer-contract.md +1 -1
  77. package/skills/simplify-code/SKILL.md +47 -100
  78. package/skills/track-work/SKILL.md +128 -119
  79. package/skills/track-work/references/working-record-format.md +14 -2
  80. package/skills/verify-work/SKILL.md +58 -62
  81. package/skills/verify-work/references/integration-evidence.md +4 -2
  82. package/skills/verify-work/references/test-design.md +89 -0
  83. package/skills/workflow/SKILL.md +73 -119
  84. package/skills/write-plan/SKILL.md +46 -77
  85. package/skills/write-plan/references/plan-shapes.md +5 -5
  86. package/skills/write-spec/SKILL.md +51 -63
  87. package/skills/write-spec/references/artifact-standards.md +2 -2
  88. package/skills/write-spec/references/decision-records.md +3 -2
  89. package/skills/write-spec/references/spec-shapes.md +15 -0
  90. package/pi-extension/dist/cognitive-routing/commands.js +0 -96
  91. package/pi-extension/dist/cognitive-routing/config.js +0 -232
  92. package/pi-extension/dist/cognitive-routing/controller.js +0 -1292
  93. package/pi-extension/dist/cognitive-routing/history.js +0 -451
  94. package/pi-extension/dist/cognitive-routing/host.js +0 -188
  95. package/pi-extension/dist/cognitive-routing/pi-routing-session.js +0 -414
  96. package/pi-extension/dist/cognitive-routing/pi-session-control.js +0 -320
  97. package/pi-extension/dist/cognitive-routing/runtime.js +0 -43
  98. package/pi-extension/dist/cognitive-routing/tool.js +0 -212
  99. package/pi-extension/dist/cognitive-routing/types.js +0 -6
  100. package/pi-extension/src/cognitive-routing/commands.ts +0 -129
  101. package/pi-extension/src/cognitive-routing/config.ts +0 -303
  102. package/pi-extension/src/cognitive-routing/controller.ts +0 -1628
  103. package/pi-extension/src/cognitive-routing/history.ts +0 -650
  104. package/pi-extension/src/cognitive-routing/host.ts +0 -266
  105. package/pi-extension/src/cognitive-routing/pi-routing-session.ts +0 -538
  106. package/pi-extension/src/cognitive-routing/pi-session-control.ts +0 -444
  107. package/pi-extension/src/cognitive-routing/runtime.ts +0 -57
  108. package/pi-extension/src/cognitive-routing/tool.ts +0 -273
  109. package/pi-extension/src/cognitive-routing/types.ts +0 -89
  110. package/pi-extension/tests/cognitive-routing/commands.test.js +0 -134
  111. package/pi-extension/tests/cognitive-routing/controller.test.js +0 -1128
  112. package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +0 -1142
  113. package/pi-extension/tests/cognitive-routing/history.test.js +0 -274
  114. package/pi-extension/tests/cognitive-routing/host-identity.test.js +0 -63
  115. package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +0 -434
  116. package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +0 -174
  117. package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +0 -91
  118. package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +0 -279
  119. package/pi-extension/tests/cognitive-routing/tool.test.js +0 -230
  120. package/skills/tdd/SKILL.md +0 -143
  121. package/skills/tdd/references/test-design.md +0 -96
  122. /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.2",
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.2",
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.2",
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.2",
5
5
  "author": {
6
6
  "name": "Hassan Mohiddin"
7
7
  },
package/README.md CHANGED
@@ -41,16 +41,14 @@ 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 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
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
51
49
  ```
52
50
 
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.
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.
54
52
 
55
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.
56
54
 
@@ -68,10 +66,10 @@ Freeflow is one package with different host boundaries:
68
66
  | Kiro | Agent Plugins 1.0 Power and shared skills | Not available; no Kiro-specific runtime adapter is claimed |
69
67
  | OpenCode v2 | Canonical `skills/` through OpenCode’s project skill source | Not available; skills-only support |
70
68
  | 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 |
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 |
73
71
 
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.
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.
75
73
 
76
74
  ## Capabilities
77
75
 
@@ -84,7 +82,7 @@ Freeflow owns workflow policy, portable prompt fragments, the 25-skill distribut
84
82
 
85
83
  ### Optional host capabilities
86
84
 
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.
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.
88
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.
89
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.
90
88
 
@@ -142,7 +140,7 @@ Or:
142
140
  pi install git:github.com/hassan-mohiddin/freeflow
143
141
  ```
144
142
 
145
- The full normal-Pi integration targets Pi 0.84.3 or newer; Pi 0.84.4 is the current Cognitive Routing test target.
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.
146
144
 
147
145
  ### PiFlow
148
146
 
@@ -159,6 +157,8 @@ For a Git source:
159
157
  piflow install git:github.com/hassan-mohiddin/freeflow
160
158
  ```
161
159
 
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
162
  In the target repository, run:
163
163
 
164
164
  ```text
@@ -190,8 +190,8 @@ Freeflow’s model-facing surface has four coordinated parts:
190
190
 
191
191
  1. **Core guidance** in `runtime/prompts/core.md` contains identity, shared terms, loops, Workflow, Action Selection, and Supported Exit cues.
192
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.
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
195
 
196
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
197
 
@@ -246,24 +246,29 @@ Contributor calls:
246
246
  /evaluate-skill
247
247
  ```
248
248
 
249
- Pi and PiFlow Cognitive Routing controls:
249
+ Cognitive Routing controls on a qualified native host:
250
250
 
251
251
  ```text
252
252
  /freeflow
253
253
  /freeflow settings
254
254
  /freeflow settings session
255
+ /freeflow settings local
255
256
  /freeflow settings repo
256
- /freeflow profile standard
257
- /freeflow profile reasoning
257
+ /freeflow profile coordinator
258
+ /freeflow profile executor
258
259
  /freeflow profile auto
260
+ /freeflow profile history
261
+ /freeflow resume
259
262
  ```
260
263
 
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.
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.
265
+
266
+ When the source adapter exposes the native controls and the host is idle:
262
267
 
263
- In Pi or PiFlow, while the host is idle:
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.
264
270
 
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.
271
+ These commands are host controls, not proof of installed-host delivery or model evaluation.
267
272
 
268
273
  ## Documentation and development
269
274
 
@@ -278,7 +283,7 @@ In Pi or PiFlow, while the host is idle:
278
283
  - [Changelog](CHANGELOG.md)
279
284
  - [Contributing](CONTRIBUTING.md)
280
285
 
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.
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.
282
287
 
283
288
  ## What Freeflow is not
284
289