@hassangameryt/freeflow

Feedback-based control system for coding agents.

Packages

Package details

extension

Install @hassangameryt/freeflow from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@hassangameryt/freeflow
Package
@hassangameryt/freeflow
Version
0.8.0
Published
Oct 3, 2026
Downloads
1,071/mo · 234/wk
Author
hassangameryt
License
MIT
Types
extension
Size
6.3 MB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "image": "https://raw.githubusercontent.com/hassan-mohiddin/freeflow/main/assets/freeflow-plugin-icon-transparent.png",
  "skills": [],
  "extensions": [
    "pi-extension/freeflow/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Freeflow

A feedback-based control system for coding agents.

Memory. Context. Compute.

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.

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.

Memory · Context · Compute

Pillar What it provides Status
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.
Context — Context Control Planned source-aware residency, representation, and bounded recovery for admitted context. Planned/in development; unavailable in this release.
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; installed-host and model-behavior evidence remain separate.

The former Freeflow Context (freeflow_context, /freeflow context), Context Virtualization, and Conversation History surfaces are removed as a breaking change. Context Control v2 is planned but unavailable in this release; it does not replace those operations yet. See the Unreleased changelog for the required config-key cleanup.

Selected OpenAI model cache-aware reuse

Freeflow's Pi extension includes cache-aware request history and a qualified effort-history adapter for selected GPT-6 models: gpt-6-astra, gpt-6-luna, and gpt-6-sol.

  • compatible Freeflow-generated state stays at stable historical positions where possible;
  • changed runtime state is appended instead of rewriting earlier generated context;
  • supported OpenAI Responses and OpenAI-Codex Responses routes can retain a request-level effort baseline and insert trusted effort changes at validated historical positions;
  • unsupported or uncertain requests fall back to the untouched native request.

The adapter uses freeflow-openai-effort-v1. Older freeflow-astra-effort-v1 entries remain in native session history but are not replayed; no migration is provided. 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.

Why Freeflow

Coding agents commonly fail at control boundaries:

Pressure Freeflow response
A question or tentative idea becomes an edit. The Interaction Contract distinguishes discussion from authorization.
A prompt conflicts with policy, tests, or accepted behavior. Decision Gate exposes the material conflict before mutation.
New evidence invalidates the chosen approach. Workflow re-enters only the affected owner and preserves valid work.
Every task receives the same heavy process. Workflow scales pressure to consequence, uncertainty, interaction, and reversibility.
A passing command becomes an unsupported completion claim. Verify Work ties the claim to the actual observer and evidence boundary.
Context loss erases decisions and partial work. Track Work restores a complete Working Record and reconciles it with live state.
Expensive models perform routine supporting work. Cognitive Routing can place bounded support and substantive execution on configured profiles.
Models flood their context with whole files and long command output, or lose edits to files that changed behind them. Tool Execution teaches narrow reads and capped output, tracks what the model has read, and adds apply_patch and background commands.
Pi's automatic compaction summarizes work the agent was in the middle of, and the next step drifts. Compaction warns the agent first, so it compacts at a safe point from its own summary, Working Record and carried context.
Request history changes destroy reusable prefixes unnecessarily. RequestHistory and qualified selected-model effort adaptation preserve compatible request structure.

How it works

Freeflow uses one active agent and one adaptive Workflow:

Interaction Lifecycle
└─ Workflow Feedback Loop
   ├─ interpret authority and establish the work agreement
   ├─ choose the narrowest current owner
   ├─ discuss, act, test, or observe
   ├─ determine what the evidence supports
   ├─ self-review the supported result
   └─ continue, correct, diagnose, ask, defer, or stop

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.

On a qualified native Pi host, automatic Cognitive Routing sits inside the current Workflow owner:

Coordinator receives user direction
-> Helper handles normal supporting assignments when enabled
-> Executor handles substantive or consequential assignments
-> assigned worker returns actual work and evidence
-> Coordinator assesses, continues, corrects, or closes

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.

Cognitive Routing modes

The labels describe intended optimization direction and potential, not guarantees.

Mode Positioning Behavior
Helper only Quality-first — maximum performance and output-quality potential Coordinator implements; Helper gathers context, prepares, checks, maintains task memory, and performs settled support.
Executor only Savings-first — maximum savings potential Coordinator directs and assesses; Executor owns delegated environment work.
Both Balanced Helper handles frequent routine support; Executor is commissioned for substantive or consequential work.

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 and the limits on those recommendations.

Availability

Surface Availability
Interaction Contract, Workflow, and 25 base skills Shared supported package surface when Freeflow is effectively activated
Track Work / Working Records Shared skill surface
Context Control v2 Planned/in development; not available in this release
Cognitive Routing Experimental native Pi source candidate
Selected GPT-6 effort history Narrow source/fixture-qualified native Pi route for Astra, Luna, and Sol; provider savings unverified
Tool Execution Experimental native Pi; off by default; native fixtures and live sessions exercise it, its effect on task results is unmeasured
Compaction Experimental native Pi; on by default; native fixtures and live sessions exercise it, summary quality against Pi's summarizer is unmeasured

Configuration or installation alone does not establish runtime delivery.

Host support

Freeflow is one package with different host boundaries:

Host Freeflow support Cognitive Routing
Codex Shared skills and Codex SessionStart hook Not available
Claude Code Shared skills and Claude Code SessionStart hook Not available
Gemini CLI Gemini extension, shared skills, and Gemini SessionStart hook Not available
Cursor Agent Plugins 1.0 skills plus Cursor-specific hook delivery Not available
GitHub Copilot / VS Code Agent Plugins 1.0 skills plus Copilot/VS Code hook delivery Not available
Kiro Agent Plugins 1.0 Power and shared skills Not available; skills-only claim
OpenCode v2 Canonical skills/ through a documented project skill source Not available; skills-only support
Hermes Agent Agent Plugins 1.0 package and canonical skills Not available; skills-only support
Pi Shared skills and the native extension (core prompt, Compaction, Tool Execution) Experimental; native fixtures and live Pi 1.0 sessions on GPT-6 Luna and Sol 6.1

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. Freeflow's PiFlow integration was removed as a breaking change; use native Pi for the Freeflow extension. Freeflow does not change or uninstall a separate PiFlow installation. See the Unreleased changelog.

Quick start

For complete instructions and delivery checks, use Getting Started.

Codex

codex plugin marketplace add https://github.com/hassan-mohiddin/freeflow.git
codex plugin marketplace upgrade freeflow
codex plugin add freeflow@freeflow

Trust the Freeflow hook from /hooks, then start a new session.

Claude Code

/plugin marketplace add hassan-mohiddin/freeflow
/plugin install freeflow
/reload-plugins

Gemini CLI

gemini extensions install https://github.com/hassan-mohiddin/freeflow

Restart Gemini CLI after installation or updates.

Cursor, GitHub Copilot, VS Code, Kiro, OpenCode, and Hermes

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:

copilot plugin install hassan-mohiddin/freeflow

OpenCode can point its skills array at the installed package's skills/ directory. Hermes can install the portable package with:

hermes plugins install hassan-mohiddin/freeflow --no-enable
hermes plugins enable freeflow

See Getting Started for host-specific claims and limits.

Pi

pi install npm:@hassangameryt/freeflow

Or:

pi install git:github.com/hassan-mohiddin/freeflow

Restart Pi or use /reload after installation or updates.

Activate a repository

Run:

/setup-freeflow

This creates the required shared .freeflow/config.json activation boundary. Minimal activation is {}. Optional .freeflow/local.json personal overrides cannot activate Freeflow alone.

Use Freeflow effectively

A clear prompt normally needs:

Outcome: what should be true?
Scope: what may change?
Exclusions: what must not happen?
Sources and constraints: what governs?
Evidence: what should support the result?
User-owned choices: what must come back to me?
Stop and return: where should the agent stop?

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.

Read Using Freeflow Effectively for prompt examples, Workflow management, Track Work, settings, mode selection, preset recommendations, cache/cost boundaries, and troubleshooting.

Commands

Canonical Pi direct calls include:

/discuss
/action-selection
/track-work
/write-spec
/review-artifact
/write-plan
/write-docs
/execute-work
/simplify-code
/migration-work
/diagnose-failure
/verify-work
/review-work
/commit-work
/handoff
/finish-branch
/release-work
/launch-work
/bypass

Contributor calls:

/setup-freeflow
/write-skill
/evaluate-skill

Native Pi controls:

/freeflow
/freeflow status
/freeflow settings
/freeflow settings session
/freeflow settings local
/freeflow settings repo
/freeflow profile coordinator
/freeflow profile helper
/freeflow profile executor
/freeflow profile auto
/freeflow profile history
/freeflow resume
/freeflow compact

Profile changes and resume require an idle host. These commands do not prove installed-host delivery or authorize task work.

Evidence and limits

Freeflow is explicit about what observations prove:

  • deterministic checks can establish source structure, prompt assembly, schemas, package boundaries, and named fixtures;
  • package shape does not prove native host dispatch, trust UI, or marketplace availability;
  • request-prefix compatibility does not prove a provider cache hit;
  • model/profile availability does not prove quality or cost improvement;
  • local release preparation is not publication;
  • publication is not production deployment.

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.

Documentation

For local Pi extension 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.

What Freeflow is not

  • Not a new agent or workflow engine.
  • Not a rigid phase pipeline.
  • Not a permission or enforcement framework.
  • Not a replacement for repository instructions, tests, policies, or review culture.
  • Not proof that a configured model, cache path, or candidate is behaviorally ready.

License

MIT License. Copyright (c) 2026 Hassan Mohiddin.