AGENT SKILL

setup-freeflow

Use when installing, activating or turning off Freeflow in a repository, changing or repairing its repository or personal configuration (.freeflow/config.json, .freeflow/local.json), setting up the Freeflow store that keeps task memory (local only, or local + cloud with a private repository, in a cloud session too) and moving older task records into it, or checking whether the current host is loading Freeflow's guidance and skills.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 5
Forks
0

01 前言 Front Matter

name
setup-freeflow
description
Use when installing, activating or turning off Freeflow in a repository, changing or repairing its repository or personal configuration (.freeflow/config.json, .freeflow/local.json), setting up the Freeflow store that keeps task memory (local only, or local + cloud with a private repository, in a cloud session too) and moving older task records into it, or checking whether the current host is loading Freeflow's guidance and skills.

02 资源文件 3

03 SKILL.md 正文

Setup Freeflow

Create or repair the smallest valid layered setup. Keep repository activation, personal overrides, and host runtime delivery as separate facts.

  • .freeflow/config.json is the shared repository settings file; {} is valid. On Pi, Freeflow shows the setup needed without it; Claude Code and Codex give guidance only where it exists.
  • .freeflow/local.json is an optional per-checkout personal override. "enabled": false in it turns Freeflow off.
  • Runtime delivery depends on the current host's installed and trusted adapter. Configuration does not prove runtime delivery.

Answer setup questions and delivery checks read-only. An explicit action request authorizes the smallest selected setup change under the state rules below. When repository config is missing, first activation authorizes minimal shared config; it does not authorize personal overrides, optional capabilities, replacement of invalid config, or edits to repo-owned host instructions.

Routes

Situation Go to
Activating, or changing shared or personal setup Establish Mutation Authority, then Inspect The Layers, then the section for that layer
Repository config invalid, or conflicting with accepted source truth or repository instructions Discuss Work, before replacing or reinterpreting it
Setting up the Freeflow store for task memory, local only or local + cloud, in a cloud session too; moving a local store to the cloud; moving older records (a repository's .freeflow/tasks/, Pi's former Task Memory) into the store store setup
Whether the host delivers Freeflow, or which host action refreshes it Hosts, below
Changing any setting the user asks for, in a file or for this session only Change A Setting, below
Tool Execution values Change A Setting, only when the user requests them

Establish Mutation Authority

Classify the current state before editing:

  • Unconfigured: no repository config. On Claude Code and Codex no Freeflow guidance is effective here; on Pi the state is setup needed: Freeflow does not run, the Runtime State tells the agent to set it up with this skill, and only this skill is exposed. An explicit setup request may create minimal config when it is missing. A setting a file ignores is not a state: Freeflow stays on, and settings.mjs doctor shows each fix. Replacing a file that is not JSON requires specific authorization and resolving the source conflict.
  • Configured but ineffective: effective enabled is false, from a file or this session. No Freeflow guidance is effective. An explicit request governs the selected enablement, configuration, or repair.
  • Effective: Freeflow core guidance, the Interaction Contract, and base skills are effective; obey them. An explicit setup or repair request may be carried out within its authority; optional capability behavior remains independently gated.

User-operated host settings are direct user actions, not agent-performed config edits. Prefer them when available, do not claim their state changed until the host reports it, and verify the resulting source and effective state afterward.

Inspect The Layers

Before editing:

  1. inspect .freeflow/config.json and .freeflow/local.json independently;
  2. identify which requested values are shared repository state and which are personal overrides;
  3. inspect repo instructions only when a conflict would change setup behavior;
  4. identify the host and available delivery evidence when runtime status matters.

A repository config is the shared settings file; Freeflow runs on Pi where it exists (otherwise the state is setup needed), and on Claude Code and Codex where it exists. A missing local config inherits repository settings. A setting in either file that Freeflow cannot use is ignored and named; the default, or the other file's value, applies to it. Never fall back silently: name it.

Resolve each configurable value in this order:

host session override -> personal override -> repository value -> built-in default

Host session overrides last one session. Pi keeps them in the Pi session; other hosts keep them in the Freeflow home's sessions/<session>/settings.json, which the settings script writes and the session-start hook reads. Effective Freeflow requires session-resolved enabled: true and the prompt files the host delivers (Hosts, below); on Pi, Claude Code and Codex it also requires the repository config to exist.

If setup is already valid and no change was requested, preserve it and report the effective sources. Do not rewrite config merely to normalize formatting or materialize defaults.

Configure Shared Activation

For a new setup, write the minimal activation boundary:

{}

Missing core keys use the built-in default enabled: true. Add enabled: false only when the user explicitly requests Freeflow to be disabled. Add optional capability configuration only when the user explicitly requests it. Do not add task state, phase, file inventories, plans, version metadata, activation paths, empty optional sections, host instruction copies, or generated workflow text.

These keys are unsupported in either config file; each is ignored and named until removed: defaultMode, interactionContract, contextVirtualization, and conversationHistory. The user deletes them wherever present; setup never migrates or removes them automatically.

Do not create or append Freeflow instructions in AGENTS.md, CLAUDE.md, .claude/rules/, or another host-owned instruction surface, including to compensate for unavailable or unconfirmed delivery. Existing repo instructions remain live source truth within host precedence. They are not activation markers, but they can conflict with Freeflow behavior: name a conflict and ask through Discuss Work before changing setup or behavior when it would alter the next action, rather than overwriting them to make Freeflow appear active. Do not install repo-local hooks, CLI commands, lint rules, global standards, documentation inventories, or state files during setup.

Add Personal Overrides Only When Requested

Use .freeflow/local.json for an explicitly selected per-checkout override of enabled:

{
  "enabled": false
}

Omitted values inherit from repository config and built-in defaults; local precedence is per property, not whole-file replacement.

Before writing local config in a Git checkout, verify it is untracked and ignored. Do not modify shared ignore policy merely to store a personal preference: prefer the host's safe settings path, .git/info/exclude, or an existing ignore rule. Refuse to overwrite a tracked local config.

If local config holds settings Freeflow ignores, report each by name, as the footer and /freeflow status do, with the fix settings.mjs doctor shows. doctor changes nothing without --fix; repair or remove a file's content only with authorization, and never discard it silently.

Change A Setting

When the user asks to change a setting, run settings rather than editing a file; a file with settings Freeflow ignores refuses the write, so doctor shows the fix first: node <setup-freeflow-directory>/scripts/settings.mjs set <key> <value> --scope repository|personal|session; unset <key>, or the value inherit, removes it from that scope, and list and get <key> show each value with the scope that set it (--json for data). It refuses a key or value the settings table does not allow, writes with the rules above (a personal file kept out of Git and refused when tracked, an invalid file never overwritten) and drops a repository value equal to its default. Its output names the Runtime State lines that changed: they hold for you from now on, while prompt text already given stays until the next session start or compaction. The Session scope lasts this session only and needs a host that names its session. The user changes the same settings with /freeflow settings on Pi and on Claude Code.

Set Up The Store

Track Work keeps task memory in the Freeflow store: one private Git repository at FREEFLOW_HOME (default ~/.freeflow), apart from every code repository. When the user asks to set it up, says yes when Track Work asks, or Freeflow's session start says something is missing for it, follow store setup: local only or local + cloud, a cloud session's settings, moving existing records in, and the check that ends it.

Hosts

When Freeflow is effective, host adapters deliver runtime/prompts/core.md, interaction-contract.md and working-method.md, the base Freeflow skill surface, and compact current capability state; on Pi also tool-execution.md while Tool Execution is effective, with its tools. Adapters load context only; they do not enforce policy, block tools, grant permissions, or replace repo instructions. Context Virtualization and Conversation History are removed.

Pi

The Pi extension reads both config layers before each agent turn. When Freeflow is enabled it always delivers the core prompt, Interaction Contract and Working Method together, keeping the existing system prompt. Runtime State is refreshed at session start, after context reconstruction or loss, and when displayed state changes; unchanged state remains in the provider context. Skill and capability bodies stay discoverable rather than delivered as hidden persistent messages.

Settings scopes:

/freeflow settings          personal overrides
/freeflow settings session  temporary Freeflow session controls
/freeflow settings repo     shared repository settings

Session settings can temporarily inherit, enable, or disable Freeflow; one reset action clears them. They persist in the active Pi session branch, never write either config file, and cannot bypass missing or invalid repository activation. The personal settings path uses omission to inherit, refuses to overwrite invalid or tracked local config, and establishes local Git exclusion when needed. These user-operated controls update state before the next model turn and reload Pi resources when supported.

A config written during setup is visible to the adapter on the next agent turn. After first activation, tell the user to run /reload so Pi refreshes skills and resources fully; without it, core runtime context loads on the next turn but resource discovery waits. Confirm automatic delivery through current extension status or runtime evidence.

Codex And Claude Code

The packaged runtime hook reads the same two layers. At supported SessionStart boundaries (startup, resume, clear, fork, and compact) it loads core.md, interaction-contract.md and working-method.md, each unless prompts (core, interactionContract, workingMethod; each a boolean, on by default, personal overriding shared per prompt) turns it off, and emits a compact active Runtime State, with the session's own values over both files. It does not process submitted prompts, inject skill bodies, or inspect Pi-only capabilities.

On Claude Code, Freeflow's mod adds /freeflow settings: it lists the settings Claude Code acts on, and /freeflow settings <key> <value> [--session | --personal | --repository] (Personal by default; inherit removes one) changes one through the settings script, its line reaching you at once. With enabled off, the mod's task menu, notices, compaction, store sync and event log stop too, and its claims read no for every request. /freeflow capabilities lists what Freeflow can do in the session, on Claude Code and Pi.

On Codex, Freeflow's driver answers eleven hook events, and Codex runs each only once the user trusts it: after first-time setup and after each update, tell the user to open /hooks and approve Freeflow's hooks (SessionStart twice, UserPromptSubmit, PreToolUse, PostToolUse, PostModelRequest, PreCompact, PostCompact, SubagentStart, SubagentStop, Stop, SessionEnd); an unapproved hook is skipped silently. Codex compacts on its own, mid-turn once the context reaches its limit, so suggest model_post_turn_compact_threshold_percent in Codex's config.toml (for example 70): Codex then compacts after a turn, once the agent has had its chance to checkpoint. Codex has no /freeflow command; change a setting with the settings script, and the driver takes enabled, events.enabled and the gates (gates.*) up at the next session start.

After first-time setup, tell the user to trigger the least disruptive supported host-native lifecycle boundary: resume, clear, compact, or a new session or startup, as available. Name the exact control the current host supports; do not prescribe Pi's /reload.

What Freeflow Can Do Here

Freeflow's driver for the host (Claude Code's mod, Pi's extension, Codex's driver) writes, at session start, its claims for each request Freeflow knows: yes for what it does here today, possible for what the host offers and Freeflow does not use yet, no for what the host cannot do. Before relying on one, such as Freeflow compacting the session or keeping its event log, run capabilities: node <setup-freeflow-directory>/scripts/capabilities.mjs check <request> exits 0 only for yes and prints how or why not; list gives every request and the event log, --json the claims as data. Never assume a request that is not yes. A host with no driver (Cursor, Copilot, Gemini) has no claims: only the session-start guidance arrives there, and you run Freeflow's scripts yourself.

Establish Same-Turn Context

After successful verification, apply newly effective context directly for the remainder of the setup turn:

These direct reads establish same-turn guidance; they do not prove that a lifecycle adapter ran, and no further adapter invocation has occurred yet. After first activation, name the exact host-native lifecycle action for automatic delivery and resource refresh (Hosts, above), and state what applies before that boundary.

Verify And Report

Verify:

  • repository config parses and is the required activation boundary;
  • local config is missing or valid, personal, untracked, and ignored when applicable;
  • effective enabled, core guidance, and optional capability values have the expected sources;
  • no repo-owned host instructions or unrelated files changed, and running setup again would change nothing.

After verification supports a setup result, silently self-review the final observed or changed state before accepting, reusing, or reporting it. Correct clear local issues within the existing setup authority and re-verify the affected boundary; stop on ambiguity, route change, or an out-of-envelope correction.

Classify automatic runtime delivery from evidence:

  • confirmed: trustworthy evidence shows the current host adapter ran for the current lifecycle;
  • unavailable: the adapter, plugin or hook is absent, disabled, denied, untrusted, or unsupported;
  • unconfirmed: the adapter may be installed and trusted, but the host exposes no trustworthy evidence that it ran. Installed and trusted registration establishes availability for the next lifecycle action, not delivery.

Report separately:

  1. shared repository activation;
  2. personal override state and effective sources;
  3. effective Freeflow core guidance, Interaction Contract, base skills, and optional capability state;
  4. same-turn direct context reads;
  5. automatic runtime delivery as confirmed, unavailable, or unconfirmed.

04 同仓库更多 Skills

hassan-mohiddin
hassan-mohiddin/freeflow

write-skill

Use when creating, revising, merging or splitting a skill or any other text an agent acts on: a SKILL.md and its description, the references and scripts in a skill, AGENTS.md, CLAUDE.md, system or runtime prompts, tool descriptions, subagent briefs or judge prompts. Also use when deciding where an instruction should live, and when a skill is read at the wrong time, not read at all, or read but not followed.

★ 5
hassan-mohiddin
hassan-mohiddin/freeflow

verify-work

Use whenever you need to know whether something works or a claim is true: running tests, builds, linters or type checks; reproducing a bug or checking a fix; trying the real path in the running software, a browser or a CLI; measuring performance; and reading what the output actually shows, including failures and conflicting results. Read it before saying a change works, is fixed or is done, and to check your own change or document before reporting it done. Also use when writing, designing or changing a test, fixture or regression check; when a claim depends on an integration, host lifecycle, an installed package, rendered UI or browser behavior, or performance; and when setting up, following or updating a project's saved steps for launching its software and trying each feature as a user would, or rechecking them after the software changed.

★ 5
hassan-mohiddin
hassan-mohiddin/freeflow

research-work

Use when a question has to be answered from evidence gathered and checked first: an in-depth report on a codebase, library, agent harness or tool; a survey, literature or systematic review of papers, docs or prior work; finding out what sources say before relying on them, and rechecking a published study's numbers; a study or experiment whose plan is fixed before the data, or a quick check on about twenty tasks of whether a change helped; writing a paper from results with its figures, references and PDF, and answering its reviewers. Also use when citing code at a pinned commit, deciding how strong a claim's evidence is, checking that each number traces to its log and each citation supports its claim, designing a measurement or a model judge, and computing statistics for a result (intervals, paired comparisons, clustered runs, rater agreement, pass@k, multiple comparisons, power, meta-analysis). Comparing options from facts already in hand is Discuss Work's; checking whether a change works is Verify Work's.

★ 5
hassan-mohiddin
hassan-mohiddin/freeflow

execute-work

Use for any task that uses tools: reading or searching a repository, running commands, diagnosing, and any work that changes code, files or settings: implementing a feature, fixing a bug, adding or changing behavior, configuring, prototyping, refactoring, simplifying or cleaning up code, deleting dead code, or maintaining a project. Also use when something fails, breaks, regresses or slows down and the cause is unknown, or a fix did not hold; when migrating users, data, a schema, a service or traffic to a replacement and removing the old path; when adding edge-case handling or code comments; and when handing work to subagents or parallel workers, or working from another agent's brief. Read it before your first tool call on a task, even a small or read-only one: it reads the request for its asks and implied requirements, finds what the change touches before you edit, and reports the result.

★ 5
hassan-mohiddin
hassan-mohiddin/freeflow

evaluate-behavior

Use when testing, evaluating or comparing how an agent behaves: whether a skill triggers, whether a change to a prompt, skill, model, setting or extension changes outcomes, measuring a reviewer or checker, or benchmarking agents on coding tasks, conversations or pipelines. Also use when writing or checking an eval's JSON files, running an eval and reading its results, and deciding what a result can claim, how many cases and trials it needs and what it costs.

★ 5
hassan-mohiddin
hassan-mohiddin/freeflow

deliver-work

Use whenever work leaves your working tree: staging and committing, writing a commit message, pushing, opening, updating or merging a pull request, finishing, keeping or deleting a branch or worktree; preparing or publishing a release (version bump, changelog, release notes, tag, package publish); and deploying, rolling out, rolling back or restoring production. Read it before running git commit, git push, a merge, a tag or a publish command, even when the user only says commit or ship. It checks the branch, the staged files and the remote before each step, and exactly what each step includes.

★ 5