Sections
On this page
- Flownix Basics
- The hierarchy
- Project memory — read it before work
- Writing project memory
- Project skills
- Status lifecycle
- Project profile and process settings — read them before working
- The ticket is your memory
- Node content schemas — choose by kind
- Shared writing rules
- Markdown for technical text
- project — product context
- epic — a coherent body of capabilities
- feature — observable user value
- bug — a reproducible discrepancy
- plan — implementation decisions and delivery map
- task — one independently checkable result
- group — explicit membership without a feature contract
- release — a bounded delivery checkpoint
- component — responsibility and repository ownership
- doc — the behaviour contract
- Check completeness before saving
- Working efficiently — tokens, planning, delegation
- Scope and verification budget
- Spend fewer tokens
- Plan so the work is cheap to execute
- Delegate to sub-agents — assess first, then pick the cheapest model that fits
- Claude Code: keep implementation in the main conversation
- Model and reasoning map — economy defaults
- Pin the tier → model map in the agent instructions
- Find a skill before improvising
- System components — binding is mandatory
- The rule
- Tools
- MCP tool reference
- Deltas: discard records a decision, delete removes a mistake
- Documents: archive, not delete
- Dependencies: mind the direction
- Slugs and navigation
- RAG — semantic search over the project
- Artifactory — the project's files
- The action log
- Reporting Flownix problems
- Presence
- Harness — multi-agent workflow orchestration
- Concepts
- Build → publish → run
- Template library (harness.library_*)
- Harness tools
- The project config file
- Spec mode and doc deltas
- The approval gate
- Spec-first: the document before the tasks
- The spec format
- Golden rules
flownix-basics
Read FIRST before any Flownix / AI-Flow work over MCP, and before any other flownix-* skill. Use when the request mentions Flownix, AI-Flow, a node slug (AF-TASK-12, ACME-FEAT-3), a ticket/задачу/тикет/эпик/фичу in the tracker, the .flownix
Flownix Basics
Flownix is a hierarchical product-planning system, reached only through the Flownix MCP server. Every other Flownix skill builds on this one.
The hierarchy
Every unit of work is a node, in a strict tree:
project → epic → feature → plan → task
- project — the product/initiative (
create_project). - epic — a large body of work.
- feature — a shippable capability.
- bug — a defect fix. It stands at feature level: its parent is a project, an epic or a group
(never a task or a feature), and it holds only plans, tasks and groups. Its slug is
<KEY>-BUG-N(AF-BUG-1). Use it instead of a feature when the work restores behaviour the spec already describes (see plan-feature). Filter withlist_nodes/rag_querykind=bug. - group — a free-form container for grouping anything with anything. It is not a level
of the hierarchy: it can stand under any node (or at the project root) at any depth and can
hold any nodes, including other groups. Its slug is
<KEY>-GRP-N(AF-GRP-1). It carries no spec or status rules of its own: a task under a group is not gated by a feature's spec. Create one withcreate_nodekind=group, thenmove_nodethe nodes that belong in it. Filter withlist_nodes/rag_querykind=group. - release — a release marker. It stands only at the project root (parent = the project).
Slug
<KEY>-REL-N. Create it withcreate_nodekind=release. - plan — an implementation plan for a feature or a bug.
- task — a concrete executable unit (the leaf where real work happens).
get_tree shows the structure, list_nodes lists by kind/parent, get_node loads one node
with content, comments, tags and dependencies.
Project memory — read it before work
Before planning, decomposing, or changing anything in a project, call get_project_policy
(the project is taken from the session when project_id is omitted) and read its environment
field. It is the project's own answer to "what should I know before I start", and it is cheaper
than reconstructing it from the tree. Policy gates and the environment arrive together on
purpose: it is one first question, not two.
| Field | Meaning |
|---|---|
summary | how the project works, in short |
entries | rules that always apply and pinned entries, in full |
index | the rest, titles only — read one with memory (memory_action: "get") |
proposed | waiting for human approval; not in force |
An empty memory is a normal answer, not an error. stale: true means the entry has not been
verified for 90+ days — confirm it with the user instead of treating it as current.
- Rules bind you.
must— never break it; if the task requires breaking it, stop and ask.should— follow it or say why not.may— advice. - Entries come to you at the right moment.
get_nodeon a task, bug or plan returnsmemorymatching its components and tags; moving it toin_progress,testingordonereturns the entries for that step. - Ask before risky steps. Before committing, deploying or changing a spec call
memorywithmemory_action: "match"andtrigger_events: ["commit" | "deploy" | "spec_change"], addingpathsof the changed files,nodeorcomponents. - Search:
memorylistwithquery(substring), orrag_querywithkind_filter: "memory"(by meaning; open a hit withmemoryget,entry_id=node_id).
Writing project memory
You forget everything between sessions; the project does not. Write memory without waiting to be asked whenever you learn something the next session would need.
| What you learned | entry_kind |
|---|---|
| A constraint, "never / always do X" | rule + strictness must / should / may |
| A decision that outlives its ticket, with the reason | decision |
| A pitfall that cost you time | gotcha |
| A repeatable procedure: deploy order, local setup, release steps | runbook |
| An observation, question or idea that is not yet knowledge | note |
What happened on one task is not memory — write add_comment on its node.
- Check before writing:
memorylistwithquery. Update the existing entry (update,entry_id— fields you omit keep their values) instead of adding a second one. - Say when it applies, otherwise it is noise for everyone:
trigger_events,components,paths,tags. Leave all four empty only for what concerns every piece of work. - Short formulation plus a link (
link_kind/link_ref), not a pasted document. mustneeds a human. Yourmustrule is saved asproposed; you cannot approve it, nor change or archive an activemust(refusalmemory_requires_human). Add a new proposal and tell the user — do not route around the refusal.verified: trueonly when you checked today that the statement still holds.- Archive what is no longer true (
memory_action: "archive"). - The summary is replaced with
memory_action: "summary"andbody; keep what is still true and ask the user before rewriting someone else's summary. - Empty memory in an established project:
memory_action: "draft"proposes entries from the spec and recent[decision]comments. Show them to the user, add only the chosen ones. - Never store secrets or personal data. Tell the user in one line what you saved.
Project skills
list_skills returns the global Flownix skills and, when the session is bound to a project,
project_skills — instructions the team uploaded for this system. Read a project skill with
get_skill (the slug is resolved after the global catalogue; project_id is optional when the
session is bound). Follow project skills after the global ones: they describe the stack,
deployment and domain rules of this project. They are read-only over MCP; people upload them on
the project's Skills page.
Status lifecycle
Drive it explicitly with update_node_status:
backlog → planning → in_progress → testing → regression → done ↘ blocked ↗
- backlog not started · planning being decomposed · in_progress active · testing implemented, under verification · regression verification found issues · done complete and verified · blocked cannot proceed (always explain in a comment).
update_node_progress sets 0..100 for finer tracking on long work.
Project profile and process settings — read them before working
get_project_policy returns more than the spec policy. Read these fields once per session and
follow their *_requirement texts — the server enforces what it can, but finding the rule out
from a refusal wastes the user's turn.
profile—simpleorfull. A simple project is just the node tree and tasks: skip component binding, doc nodes, spec deltas and harness, and do not propose strict mode. The server does not refuse those calls, but the web UI of a simple project hides their results. If the user asks for specs, components or reviews, offer to switch the project tofull(set_project_policy profile=full, with their consent). Strict spec mode requiresfull; combining them is refused withprofile_conflict.execution_order—parallel(default) orsequential. Insequential, a task cannot enterin_progresswhile the previous task of the same parent (tree order) is notdone— refused withworkflow_order. Take tasks in order; if the previous one is waiting for review, stop and tell the user.completion_flow—direct(default) orreview. Inreview, finish a task intestingand tell the user it awaits their check: only a human moves it todone. An agent'sdoneis refused withworkflow_review_required— including closing a feature or plan whose tasks are not yet accepted, because closing a parent closes its children.
The ticket is your memory
You are stateless between sessions. The node IS your durable memory.
- Read before acting —
get_nodefor content and prior comments. Never assume. - Write down what you did —
add_commentafter any meaningful step. - Keep status/progress honest — the board must reflect reality.
Comment prefixes, so logs stay scannable:
[plan] · [progress] · [decision] · [blocker] · [review] · [done]
Node content schemas — choose by kind
Use this section before creating or replacing a node body. These are content requirements,
not new server fields or workflow policies; the project profile and gates above still apply.
component uses the component description and metadata, and doc uses the document body.
Shared writing rules
- Open with a paragraph explaining the subject and why it exists. Do not repeat the title, slug, status or author when their metadata already says it.
- Fill every mandatory section with facts, decisions or checkable outcomes. Section names can
follow the user's language; preserve their meaning. Omit conditional sections when their
condition does not apply; never leave an empty heading,
TBDor template instruction. - Name concrete properties, boundaries and relationships. Keep a small task small: one independently verifiable result, with small steps inside it rather than a ticket per step.
- Keep content as the current description/contract; keep chronology, progress, failed attempts and decision rationale in comments. Reflect an accepted decision in the current content too. Store large logs, reports, research and diffs as artifacts, referenced by verified slug with a short explanation; they do not replace the acceptance criteria.
- Unknowns are explicit: distinguish an observation, a hypothesis and a proven cause. For research, name the question, evidence to collect and expected decision/report instead of inventing an answer, interface or file path.
- Explain what each link contributes. Discover and confirm node/artifact slugs, paths and
contracts before saving; add real relationships with
set_references/dependency tools too. A mention in prose is context, not a replacement for a structured relationship.
Markdown for technical text
Apply these rules to node bodies, comments and written documentation:
- Use inline backticks for literal file names and paths, functions/methods, types, variables,
commands, CLI flags, configuration keys, status values and technical identifiers. For example:
edit
pkg/skills/data/flownix-basics.md, callget_node, setrepo_path, pass--help, or inspect aNodewith statusin_progress. - Use fenced blocks with a language tag for multiline code, commands, configuration and logs:
go,bash,yaml,json, ortextfor plain output. Preserve actual line breaks, indentation and literal characters; do not replace newlines with visible\nsequences or flatten a multiline example into inline code. Give commands and their output separate blocks. - Keep explanatory prose outside code formatting. Use inline code only for the literal token, not an entire sentence, paragraph or acceptance criterion.
- Keep links clickable: use
[description](target)without backticks around the link or its label. Verified node/artifact slugs used for navigation stay plain, such as AF-PLAN-158; use code formatting only when discussing a slug as a literal identifier or syntax example.
Command example:
go test ./pkg/skills/...
git diff --checkConfiguration example:
project_id: d13b9da0-452e-49f6-8352-c9caaaaf80db
spec_mode: strictOutput example:
validation started
validation complete: 0 issuesThe examples below are compact editorial samples based on AI-FLOW work, not instructions to create those nodes or additional product requirements. Group and release examples illustrate how to collect that work; they do not claim an existing group or release. Check current nodes before reusing any sample.
project — product context
Mandatory: Purpose; Goals (outcomes); Boundaries; System composition (responsibilities); Key references (entry points into existing contracts/work). Conditional: Constraints when an agreed constraint affects planning; external integrations when part of the product. Do not fill these with guessed targets or suppliers.
AI-FLOW coordinates product work for people and agents through a shared node tree and MCP.
## Goals
Make work discoverable by hierarchy and component, and retain its decisions between sessions.
## Boundaries
This overview describes the product; individual behaviour contracts live in doc nodes and
implementation steps in plans and tasks.
## System composition
The tracker stores work, system components identify ownership, and Artifactory stores files
referenced by nodes. Shared Go libraries supply validation and skills to services.
## Key references
AF-EPIC-35 describes project file storage. AF-COMP-3 identifies shared libraries; AF-PLAN-158
tracks the consistent node-content instructions supplied to agents.Antipatterns: a marketing slogan without scope; a project body containing every task; unverified roadmap promises presented as current capabilities.
epic — a coherent body of capabilities
Mandatory: What it is; Key properties (concrete capabilities/constraints); Features (named capability slices); Boundaries; Relationships (neighbouring work and real dependencies). Conditional: Decisions when a tradeoff defines the scope. Boundaries may be explained in Features or Relationships rather than repeated. AF-EPIC-35 is the structural reference: its properties explain the system, its features split delivery, and its links explain exclusions.
## What it is
Artifactory stores project files produced by people and agents: reports, logs, diagrams and
attachments. Tasks, documents and harness runs can refer to those files.
## Key properties
A separate artifactory-service owns file metadata; object storage holds file bytes. Files have
project-scoped slugs and descriptions for discovery. Access is scoped to a project's objects.
## Features
- AF-FEAT-167: storage service, MCP access, metadata, quotas and references.
- AF-FEAT-168: the web file browser.
## Boundaries
Project statistics belong to separate tracker work. Existing harness artifact references are
not replaced with a new harness table by this epic.
## Relationships
AF-DOC-73 covers the service and AF-DOC-74 the browser. AF-EPIC-24 owns the paid tariff model;
the free storage quota can operate without billing.Antipatterns: a flat list of tasks with no product meaning; implementation history instead of properties; importing every adjacent capability without explaining the boundary.
feature — observable user value
Mandatory: Problem/value; Observable result; Scenarios and boundaries; Acceptance criteria; Specification and relationships (the contract and affected components). Conditional: Dependencies when another capability blocks delivery; compatibility/migration when existing users or stored data are affected. Apply profile/spec rules without inventing a new document solely to fill this section.
The tracker tree makes it difficult to compare tasks across statuses. A board gives the user
that overview while retaining the tree as the default view.
## Observable result
Users can switch between Tree and Board. The board displays task cards in status columns and
can group them by epic, group or feature.
## Scenarios and boundaries
With grouping selected, each task belongs to its nearest ancestor of that kind; tasks without
one appear in the matching ungrouped bucket. Cards open the existing details. This feature
covers viewing tasks; dragging statuses and assigning executors are outside its scope.
## Acceptance criteria
The tree is the initial view. Changing grouping never duplicates or drops a matching task.
Cards reflect updates from the shared tree and SSE.
## Specification and relationships
AF-DOC-14 covers tracker behaviour and AF-DOC-39 navigation. AF-COMP-11 owns the web change;
AF-FEAT-194 contains the requested scope. Existing tree data supplies the board.Antipatterns: “implement the screen” without observable behaviour; a file checklist posing as acceptance; silently turning a mockup's unrelated controls into requirements.
bug — a reproducible discrepancy
Mandatory: Defect; Reproduction; Expected/actual; Environment and evidence; Cause (explicitly unknown until established); Fix criteria. Conditional: Impact/workaround when known; regression origin when evidence identifies it; contract references when a documented behaviour is being restored. Do not guess a root cause.
The planning skills lack a complete common content schema for every node kind, so an executor
cannot check completeness consistently from the instructions alone.
## Reproduction
1. Read pkg/skills/data/flownix-basics.md and plan-feature.md before the schema fix.
2. Try to select mandatory and conditional sections for all ten kinds.
3. Compare the available instructions against the matrix in AF-PLAN-158.
## Expected / actual
Expected: each kind has a schema, a filled example and antipatterns. Actual: task/spec advice
exists, but the complete matrix and examples do not.
## Environment and evidence
Canonical skills in pkg/skills/data, delivered through MCP and CLI. Reading the instructions
establishes the gap; variation between model outputs has not been measured.
## Cause
The missing common schema is observed; the cause of variation between agents is not established.
## Fix criteria
All ten kinds can be checked without chat history. OpenSpec keeps one owner. Planning entry
points use the schemas and the delivered skill texts contain them. AF-BUG-10 records this gap;
AF-EPIC-35 is the editorial reference, not a node to rewrite.Antipatterns: an assumed cause stated as fact; “doesn't work” without reproduction or expected result; a repair plan that never describes the defect.
plan — implementation decisions and delivery map
Mandatory: Goal; Approach and decisions; Files/responsibilities; Tasks and dependencies; Risks; Verification (commands/checks and expected results); Contract and constraints. Conditional: Interfaces when tasks share inputs/outputs; rollout/migration when deployment or persistent data changes; open questions with an investigation result when unresolved.
Make the node-content instructions executable without chat history, using AF-EPIC-35 as the
editorial reference and AF-PLAN-158 as the scope.
## Approach and decisions
Keep the common schemas in flownix-basics and the sole OpenSpec definition in flownix-write-spec.
Planning skills link to the common rules rather than copy them.
## Files and responsibilities
- pkg/skills/data/flownix-basics.md and flownix-write-spec.md: schemas and examples.
- pkg/skills/data/plan-feature.md and spec-first-change.md: planning entry points.
- cli/scripts/bundle-skills.mjs: existing generated CLI delivery, to verify rather than duplicate.
## Tasks and dependencies
AF-TASK-977 defines schemas; AF-TASK-978 connects creation paths after that text is stable;
AF-TASK-979 verifies examples and MCP/CLI delivery after both.
## Risks
Copied schema text can drift. Use references to its owner; check generated delivery against
canonical sources rather than editing generated copies.
## Verification
Run go test ./pkg/skills/...: all package tests pass. Validate the filled doc example with
validate_spec(body): no issues. Check all ten kinds against the matrix in AF-PLAN-158.
## Contract and constraints
AF-BUG-10 defines the correction. No policy changes, mass rewriting of nodes or global skill sync.Antipatterns: another behaviour spec inside a plan; step-sized tickets that cannot deliver anything alone; ordered tasks without actual dependencies or an explanation of verification.
task — one independently checkable result
Mandatory: Goal/context; Exact files/entry points; Steps; Acceptance; Verification with expected result; Out of scope; Contract references. Conditional: Interfaces with inputs/outputs and compatibility when relevant; investigation question/evidence/result when the task is research. If files are not yet known, make discovery an explicit research deliverable rather than promising guessed edits.
Fill the missing schemas in the base skills so an executor can choose and check a node body
without conversation history. This is the schema unit of AF-PLAN-158.
## Files
pkg/skills/data/flownix-basics.md and pkg/skills/data/flownix-write-spec.md.
## Steps
1. Compare the ten-kind matrix in AF-PLAN-158 with the current instructions.
2. Add mandatory/conditional sections, filled examples and antipatterns for each kind.
3. Keep the doc format and its example in flownix-write-spec; link to it from basics.
## Acceptance
Every kind has a usable schema and substantive example. The epic follows AF-EPIC-35's structure;
unknown facts are explicit, and examples contain no invented slugs or requirements.
## Verification
Run go test ./pkg/skills/... before and after: both runs pass. Run validate_spec(body) on the
complete doc example: zero issues. Manually compare each kind to AF-PLAN-158's matrix.
## Out of scope
Policy changes, existing-node rewrites, delivery transport changes and global skill sync.
## Contract references
AF-BUG-10 defines the gap; AF-PLAN-158 defines the matrix; AF-EPIC-35 supplies the style reference.Antipatterns: “fix as discussed”; acceptance that only repeats steps; fake file paths; mandatory TDD ceremony for an editorial change instead of a meaningful content check.
group — explicit membership without a feature contract
Mandatory: Purpose of grouping; Inclusion rule; Members/references with their role. Conditional: Exclusions when the membership boundary is ambiguous; maintenance rule when membership changes. A group organises existing nodes; do not invent feature acceptance/specs.
Collect the work on consistent node-content instructions so reviewers can find it in one place.
## Inclusion rule
Include the bug and plan that define the content-schema correction; execution tasks stay under
their implementation plan. Membership is based on this correction, not all work tagged skills.
## Members and references
AF-BUG-10 describes the missing standard. AF-PLAN-158 coordinates its schema, adoption and
verification tasks.
## Exclusions
AF-EPIC-35 is a style reference, not delivery work in this group. The board feature AF-FEAT-194
is separate product work and does not qualify for membership.Antipatterns: a group with no inclusion rule; a duplicate feature contract; treating grouped nodes as exempt from their applicable project policies.
release — a bounded delivery checkpoint
Mandatory: Version goal; Included work/references; Release criteria. Conditional: Verification when the release needs release-level checks beyond included tasks; rollout and rollback when deployment/distribution applies; compatibility notes for user impact. Do not invent a version number, release date or successful verification.
This skills release checkpoint delivers consistent node-content instructions to agent clients.
## Included work
AF-PLAN-158: schemas, use in planning paths, and delivery verification. AF-BUG-10 is the defect
this checkpoint resolves.
## Release criteria
All three plan units are accepted; every kind has a filled example; the doc example validates;
MCP and CLI expose the updated canonical texts.
## Verification
Run go test ./pkg/skills/... successfully and compare delivered skills with pkg/skills/data.
Record the actual delivery checks and results in the release comments before release.
## Rollout and rollback
Distribute through the existing skills delivery path after acceptance. If the published text is
incorrect, restore the preceding canonical texts and regenerate delivery through the same path.
This checkpoint does not authorise a global sync to users' local skill directories.Antipatterns: an unbounded backlog called a release; “tests passed” without evidence; a rollback heading with no applicable recovery action.
component — responsibility and repository ownership
Mandatory: Responsibility; Boundaries; Repository path (repo_path metadata); Interfaces
and relationships; Documentation/entry points. Describe the component in its description;
keep machine fields in component metadata rather than replacing them with prose.
Conditional: Parent component when nested; lifecycle rationale for planned/deprecated
components; operational constraints when they affect callers.
shared-libs provides reusable Go code for services, including validation and the skills runtime.
## Boundaries
Shared packages own reusable primitives. Service-specific business workflows belong to services;
node-content examples belong to the canonical skill data rather than independent CLI copies.
## Repository path
repo_path: pkg
## Interfaces and relationships
Services import packages under pkg. The pkg/skills loader reads embedded skill data; MCP/CLI
consume that content. AF-PLAN-158 changes skill instructions within this component (AF-COMP-3).
## Documentation and entry points
pkg/skills/data/flownix-basics.md explains node structure; flownix-write-spec.md in the same
directory owns OpenSpec authoring. pkg/skills tests check loading of the embedded texts.Antipatterns: a component described as a task to finish; an invented repository path; implementation ownership inferred only from a tag; a duplicate doc body in the description.
doc — the behaviour contract
Mandatory/conditional sections, filled example and antipatterns: use flownix-write-spec — Doc content schema and filled example. It is the sole normative owner of the OpenSpec body structure and validation procedure. The example there is the tenth kind's example; do not substitute a plan, report or a freeform Markdown document here. Research reports and large execution evidence belong in artifacts.
Check completeness before saving
Select the kind, check each mandatory section and each applicable conditional one, then read
as an executor who has no chat history. Can that reader identify the subject, scope, links and
checkable result? Verify references and paths, remove empty headings/placeholders, and keep
history/evidence in their proper location. For doc, validate the complete resulting body
using flownix-write-spec before proposing it. These checks do not alter approval policies.
Working efficiently — tokens, planning, delegation
Every skill in this set follows these rules. The operating goal is maximum economy of tokens, model quotas and tool calls while meeting the agreed acceptance criteria. Use the smallest sufficient model, reasoning budget, context and verification set. More agents, more thinking and more checks are costs to justify, not evidence of better work.
Scope and verification budget
- Before work, identify the acceptance criteria and the smallest documented checks that cover them. Use checks named in the task/plan or required by repository instructions; stop when they pass.
- If a necessary check is missing, name its purpose, command and expected result in one short task comment before running it. Record the result once; do not create a separate report or artifact for routine successful output unless the task requires one.
- Repeat or broaden checks only after a relevant change, failure or concrete uncovered risk; record that reason. Do not rerun an executor's successful checks unchanged merely to accept its result. No automatic full-suite/build/lint/browser/audit or multiple reviewer passes.
- During planning, inspect only the code, contracts and prior decisions needed to define scope, interfaces and acceptance. Do not execute the implementation's test suite, benchmark, audit or end-to-end scenarios to write tickets. A bounded probe is appropriate only for an uncertainty that blocks the plan; state the question and stop when answered.
- Handle a small unit directly when delegation would cost more context than it saves. Delegate independent substantive units; do not spawn an agent just to re-read another agent's summary. Separate reviews are for explicit requirements or a concrete risk, not every completed task.
- Keep all required approval, security and repository checks. Economy removes unnecessary work, never acceptance criteria or honest reporting of unverified behaviour.
Spend fewer tokens
- Read once, narrow, by slug. One
get_nodeper node per session; keep what you learned in your working notes instead of re-fetching. Preferrag_context(one assembled block) over fiveget_nodecalls to "get oriented"; useget_nodeto confirm a hit you will act on. - Never list wide.
list_nodes/get_treedefault to 200 rows: passkind,status,parent_slug,component,limit/offset. Ask for the slice you need, not the project. - Batch independent calls in one turn (several
get_node,rag_query,set_node_components). Sequence only what depends on an earlier result. - Write short, write once. A comment is a dense record: marker, what changed, result, next step
— not a transcript. Files, diffs, logs and reports go to the Artifactory and are cited by slug
(
AF-ARTF-12), never pasted into a comment or a handoff. - Hand over references, not content. When you delegate, pass slugs, file paths and the exact question — the receiver reads what it needs. Pasting the ticket, the spec and half a file into a prompt pays for those tokens twice.
- Don't verify with prose. A failing/passing test,
validate_specorharness.validateis cheaper and more reliable than a model reading its own diff. - Keep the main context clean. Exploration that returns "many files, one conclusion" (broad searches, log digging, library research) goes to a sub-agent that returns a short answer; compact or restart the session between unrelated nodes — the ticket is the memory, so nothing is lost.
Plan so the work is cheap to execute
- Size a task to one executor's context. A task is a unit one agent finishes with the task text, a handful of files and its tests — roughly: ≤ 5–6 files to edit, one component, one acceptance check per behaviour. Bigger → split before creating it. A task that needs the whole system in mind is a plan.
- Make every task self-contained: goal, files/entry points, acceptance criteria, how to verify, what is out of scope. An executor that must ask or explore to understand the task costs more than the minute spent writing it.
- Draw dependencies to expose parallelism, not to document order. Independent tasks (different components or files) can run side by side; couple tasks only for a real blocker.
- MUST tag the weight: every task gets exactly one of
tier:light/tier:standard/tier:deepintagswhen it is created, assessed with the four signals below — no other tier names. Also set exactly onereasoning:low|medium|hightag using the defaults below. The executor re-checks both before dispatch, but starts from your call. - Plan once, at the right altitude: spec (what) → plan (how, risks, order) → tasks. Do not
re-plan inside an executing task; a plan that turns out wrong is a
[decision]comment and a corrected node, not a second plan beside it.
Delegate to sub-agents — assess first, then pick the cheapest model that fits
When the client can start sub-agents (execute-task over a plan, run-harness work items, parallel research), do not default every one to your own model. Before each dispatch, assess the unit:
| Signal | 0 | 1 | 2 |
|---|---|---|---|
| Files to change | 1–2 | 3–5 | 6+ or unknown |
| Ambiguity | criteria and approach given | approach open, criteria given | criteria or cause unclear |
| Blast radius | one local unit | shared module / several callers | contract (proto/API), data/migration, auth, concurrency, money |
| Verification | tests exist and run fast | tests must be written | manual / environment-dependent |
Sum 0–2 → light; 3–5 → standard; 6+ or any signal at 2 on blast radius → deep.
Claude Code: keep implementation in the main conversation
For Claude Code, delegate substantial searches to Explore, long logs to log-reader,
and test/build execution to test-runner. Do work needing only 1–3 tool calls yourself.
Keep edits, decisions and reviews in the main conversation. Before editing, check a subagent's
finding at the cited path:line; its summary is a lead, not verified evidence.
This Claude-specific rule takes precedence over generic executor/reviewer delegation below;
it does not replace explicitly requested multi-agent harness roles.
For installation, provider/version checks, agent templates and a smoke search, use claude-code-economy. Do not install agents or edit CLAUDE.md merely because this section was read. Ask global versus project scope, ask which CLAUDE.md, show proposed changes, and obtain an explicit yes before replacing an existing file. Never change model/effort settings as part of setup; present recommendations only.
Model and reasoning map — economy defaults
tier selects capability; reasoning selects the thinking budget independently. Every new task
MUST carry exactly one tier:light|standard|deep and one reasoning:low|medium|high tag.
The human term medium tier maps to the existing tier:standard; do not create tier:medium
(the server accepts only light/standard/deep). Reasoning tags are planning metadata consumed by
executors, not a promise of server-side enforcement or a new API field.
| Tier | Typical unit | Default reasoning |
|---|---|---|
tier:light | mechanical change, known pattern, bounded extraction or formatting | reasoning:medium |
tier:standard (medium) | a feature slice, reproduced bug, covered refactor | reasoning:low; choose medium if uncertainty warrants it |
tier:deep | cross-component decision, sensitive contract, unclear root cause | reasoning:low initially; raise only for a specific unresolved difficulty |
For Claude Code, recommend Opus 5.5 / medium by default, high for difficult work;
Sonnet 5.5 for clear specifications and documents; Fable 5.2 for large migrations, architecture
and long autonomous runs. These recommendations take precedence over the generic tier-based
reasoning defaults above: use reasoning:medium normally and justify reasoning:high. Task
weight does not automatically choose the main conversation model. Present recommendations,
not automatic changes to settings or the active model. Check availability and provider-specific
IDs before suggesting a switch; see claude-code-economy.
For other providers, a well-decomposed task normally needs low or medium reasoning. A deep model does not imply
high reasoning. reasoning:high is an exception with a sentence explaining why lower effort is
insufficient. Never default to xhigh/max/ultra or unbounded thinking.
| Provider / client | light | medium (standard) | deep |
|---|---|---|---|
| OpenAI / ChatGPT / Codex | Luna (gpt-6-luna) | Terra (gpt-6.1-terra) | Sol (gpt-6.1-sol) |
| Anthropic / Claude Code (task-based policy) | haiku for search/log/test helpers; version depends on provider | Sonnet 5.5 for clear specifications and documents | Opus 5.5 for general work; Fable 5.2 for large migrations, architecture and long autonomous runs |
| Google / Gemini | Flash-Lite | Flash | Pro (ordinary Pro, not Deep Think/Ultra) |
| DeepSeek | deepseek-flash, thinking off for mechanical work | deepseek-flash, bounded thinking | deepseek-v4-pro, low effort |
These are project routing defaults, not a claim that providers have equivalent capabilities. OpenAI names above are the user's client model aliases; choose the corresponding ID advertised by the runtime. If unavailable, choose the nearest suitable ordinary model from the configured provider map and record the substitution; never silently fall back to a premium model. For other providers pick an available stable version of that family, rather than blindly choosing the newest or most expensive release. The DeepSeek light row intentionally executes the planned medium budget with thinking disabled for mechanical work: record that mapping. If that task needs actual thinking, use its lowest supported effort first.
For providers other than Claude Code, avoid frontier/premium models for sub-agents: Astra and equivalent flagship/research variants are outside the default escalation ladder, even for deep tasks and reviewers. Do not select those models because they are available, inherited from the parent, or described as "best". Use them only when the user explicitly requests or authorizes that named premium model for this work; ordinary permission to use sub-agents is not such authorization. At the end of the ordinary ladder, split the task, report the remaining limitation or ask for a decision.
Claude Code instead uses the task-based recommendations above; Fable 5.2 is an option for those demanding main-conversation tasks, not a cheap helper model.
Reasoning controls differ by model/client. Translate the planned tag to a supported effort or bounded thinking setting; never send an unsupported parameter or silently let a high provider default override a low tag. If the client cannot control effort, report the actual fixed/default setting once. DeepSeek currently maps medium to high: prefer supported low for a bounded task, and record planned versus actual effort. Do not pretend to have enforced a budget you cannot set.
Provider family/control references (checked 2026-11-09; consult only when selecting an unfamiliar or unavailable model, not on every dispatch): Claude models, Claude effort, Gemini models, Gemini thinking, DeepSeek models, DeepSeek thinking. The routing and reasoning defaults are our cost policy, not provider recommendations.
Rules of dispatch:
- Start with the planner's tier/reasoning and the provider map; select both explicitly where the client permits. If legacy tasks lack tags, assess and add them before dispatch. Change a recommendation only with a brief reason; keep exactly one tag in each family.
- If work fails, check the diagnosis with scoped tests first, then raise effort one supported
level, and only then consider a stronger model. Do not skip effort escalation or raise both
dimensions together. If effort cannot be controlled or is already at its justified ceiling,
report that limitation. In Claude Code, run
/compactbefore changing the model; if you cannot invoke it, ask the user to do it and report the switch as pending. Setup only recommends settings. Stop repeated unsuccessful retries and report the remaining blocker. - Pass only the slug, entry files, acceptance check, scope boundary and commit convention. Request a report in at most eight lines: result, files, commit, checks and open questions.
- Accept with the scoped checks and a short diff check against acceptance. Reuse successful check evidence for the same revision; separate reviewers only when required or justified by a concrete risk and recorded in the verification budget above.
- Independent units may run in parallel; shared-file edits must be sequenced or isolated. Do not delegate human approvals. The orchestrator owns statuses and spec gates.
- Record planned tier/reasoning and actual model/effort once in the task's
[progress]comment, including any fixed-client limitation. Do not invent unsupported capabilities.
Pin the tier → model map in the agent instructions
The tier:* tag on a task is useless to an agent that does not know which real model each tier
means. Keep that answer in the repository's own agent instructions, where every session reads it
before the first call — not in each agent's head.
- Where: the instruction files the agents of this repository read —
AGENTS.mdand/orCLAUDE.mdat the repository root (also.claude/CLAUDE.md, and nested ones in a monorepo only if that is where the team keeps them). For Claude Code, ask which CLAUDE.md to use (including~/.claude/CLAUDE.md); edit only the chosen file after approval, following claude-code-economy. Do not automatically write into all discovered files. - When: check on init (flownix-init does it) and whenever you are about to dispatch
by tier and notice the map is missing. If a file already maps the three tiers to models — inside
the markers below or in its own words — leave it alone: the team's choice wins over these
defaults. If the file exists but has no map, append the block. If no instruction file exists,
create the one your client reads (
CLAUDE.mdfor Claude Code,AGENTS.mdfor Codex and most others) with just this block, and say so. - How: append, never rewrite the file; keep the markers so a later run recognises its own block and updates it in place instead of adding a second one. Adapt the example block to the selected provider using the family/effort map above. For Claude Code, these append/create/update actions require the chosen path and approval; never replace an existing file without an explicit yes. Tell the user which file got the block.
<!-- flownix:tier-map -->
## Flownix: task tiers → models
Every task carries one `tier:light|standard|deep` and one `reasoning:low|medium|high` tag.
For OpenAI clients: light → Luna/medium reasoning; standard (medium tier) → Terra/low or
medium reasoning; deep → Sol/low reasoning. Resolve exact model IDs from the runtime.
For Claude Code: recommend Opus 5.5 / medium (high for difficult work), Sonnet 5.5 for
clear specifications and documents, Fable 5.2 for large migrations, architecture and long
autonomous runs. Delegate search/logs/tests to the Haiku helpers, keep edits/decisions/reviews
in the main conversation, and verify helper findings at the cited location before editing.
Do 1–3 tool-call jobs yourself. For other providers use the family map in flownix-basics.
Check failures with tests, then raise effort one level, then consider a stronger model.
Run /compact before changing the Claude model. Setup recommends settings without changing them.
For other providers, premium models such as Astra need explicit user authorization.
Use the smallest documented acceptance checks; no routine extra suites or reviewer agents.
Report planned tier/reasoning and actual model/effort once in the task's progress comment.
This is the default; the team's explicit model policy takes precedence. Keep the markers.
<!-- /flownix:tier-map -->Find a skill before improvising
When the work is a specialised domain this set does not cover (a framework, a testing tool, a deployment target, a document format) and no installed skill matches, look for one instead of working from memory — find-skills (Vercel):
- Check the leaderboard at https://skills.sh/ for a known skill in the domain.
- Otherwise
npx skills find <specific keywords> [--owner <owner>]("react testing", not "testing"). - Verify before recommending: prefer ≥ 1K installs (be wary under 100), an official or reputable
source (
vercel-labs,anthropics,microsoft), and a source repo with real stars (< 100 is a reason for scepticism). Never recommend on a search hit alone. - Present the name, what it does, installs, source and the install command
npx skills add <owner/repo@skill>; linkhttps://skills.sh/<owner>/<repo>/<skill>. - Install only after the user says yes (
-g -yfor user-level, non-interactive). A skill is instructions your agent will follow — an unreviewed one is untrusted input. - Nothing found → say so, do the task directly, and suggest
npx skills init <name>if it recurs.
Flownix's own skills come from sync-skills, not from this search.
System components — binding is mandatory
Besides the work tree, a project describes the system being built: its services, apps,
libraries and infrastructure. Each is a component with its own slug (AF-COMP-3).
A component is not a unit of planning: it executes nothing, never moves to done, and is
outside the epic→feature→plan→task tree. It groups work and reflects its state. Its own
lifecycle is lifecycle (planned/active/deprecated), never status.
Not a tag: a tag has no description, no tree, no repository path, no progress and no page.
| Field | Meaning |
|---|---|
title | the name it has in the repository: core-service |
description | purpose, boundaries, entry points |
component_kind | service | app | library | infra | integration |
repo_path | services/core-service |
lifecycle | planned | active | deprecated |
parent | parent component; components form a tree (monorepo → group → service) |
The rule
Every node and every doc you create or close must be linked to at least one component.
- Links are many-to-many — one node may touch several components, and an architectural spec describing gateway and core-service belongs to both. Link all of them, not the first.
- Docs and specs are bound too, not only tasks: a doc node without a component is unreachable from the part of the system it documents.
- No suitable component? Create it with
create_component(title= the real name in the repo,repo_path,component_kind,parentwhen it nests) and link to that. Never leave work unlinked because the inventory is incomplete — an unlinked node is invisible in the system view and its progress is counted nowhere. - Never invent a component that does not exist in the repository. If you cannot point at the code it stands for, you are inventing structure — check the repo first.
- The exception is a genuinely cross-cutting node that belongs to no part of the system
(a release checklist, a process ticket). Say so in a
[decision]comment rather than leaving it silently unlinked.
Infrastructure and external services are components too, not tags: postgres,
qdrant, the cluster, the pipeline (infra), the LLM provider, object storage
(integration). Migrations, reindexing, deploy and quota work belongs to them, and that is
what makes "everything we did to the database" a question with an answer. The languages and
libraries a component is written in stay a tag plus a line in its description.
For a first pass over a project that has none — code and stack alike — use map-components.
Tools
| Tool | Purpose |
|---|---|
list_components | Components of a project, flat with parent_id, each with its progress |
get_component | One component with children, linked tasks, docs and reviews |
create_component / update_component | Create and edit (project_id, title, …) |
set_node_components | Replace the set of components a node is linked to |
set_review_components | The same for a review |
list_components({ project_id }) // always check first
create_component({ project_id, title: "core-service", component_kind: "service",
repo_path: "services/core-service" })
create_node({ ..., components: ["AF-COMP-3", "AF-COMP-7"] }) // link at creation
set_node_components({ node: "AF-TASK-12", components: ["AF-COMP-3"] }) // replaces the set
list_nodes({ project_id, component: "AF-COMP-3" }) // direct links only
list_docs({ project_id, component: "none" }) // what is still unsorted
rag_query({ project_id, query: "…", component: "AF-COMP-3" })Two things that are easy to get wrong:
- Lists filter by DIRECT links; progress counts recursively down the component tree —
work on
gatewayshows up inservicesand in the monorepo above it. Deliberate: a list answers "what did I link here", progress answers for a part of the system as a whole. set_node_componentsreplaces the set, it does not add. Pass the existing links too unless you mean to drop them.
Progress is computed, never set. list_components/get_component return percent with
total, done, a status breakdown and counts of linked docs and reviews.
MCP tool reference
Most tools accept node_id or slug. A slug alone is enough — it carries the project key
(MF-TASK-274 → project MF) and is unique across the org, so project_id is optional
wherever a slug is accepted. Prefer slugs.
| Tool | Purpose |
|---|---|
list_organizations / create_organization | List orgs the user belongs to / create one |
list_projects | Projects in an organization (org_id) |
create_project | Create a project (org_id, name, key, spec Markdown) |
get_tree | Full hierarchy of a project (project_id) |
list_nodes | List nodes (project_id, optional kind, parent_id/parent_slug, component, ticket_ref — exact match on an external tracker ticket) |
get_node | One node + content, comments, tags, deps, child_ids; returns commit_hash, ai_model, agent_name, author_email, timestamps |
get_node_by_slug | Same, slug-only (slug, optional project_id) |
create_node | Create epic/feature/bug/group/release/plan/task (project_id, parent_id/parent_slug, kind, title, content, optional tags, components, ai_model, agent_name, ticket_ref) |
update_node_content | Update title/content (optional commit_hash, ticket_ref) |
update_node_status / update_node_progress | Set status / progress 0..100 |
add_comment | Append an agent comment (Markdown body) |
add_tag | Tag a node |
add_dependency / remove_dependency | Edge read as "from_node depends on to_node": to_node is the blocker |
get_dependencies | depends_on (blockers) and blocks (waiters) for one node |
set_references / get_references | Set (overwriting) / read cross-references (ref_ids, ref_slugs; a ref may live in another project) |
add_relation / remove_relation / get_relations | Typed bidirectional relations (relation_type) |
list_components / get_component / create_component / update_component | System components — see above |
set_node_components / set_review_components | Replace a node's / review's component set |
get_project_policy / set_project_policy | Read / set spec_mode (off/strict), require_proposal_approval and spec_first; org members only, never silently |
validate_spec | Check a spec against the OpenSpec format — by doc_slug or by raw body; changes nothing |
propose_doc_delta | Propose the complete next body of a doc, linked to a source task/plan |
update_doc_delta / submit_doc_delta | Edit a draft (or rejected) delta in place with the full body / send a draft to review — the only draft → pending transition |
get_doc_delta | One delta in full, with its round history. The list call does not return rounds |
list_doc_deltas / apply_doc_delta | List revisions (each carries review_status) / apply one with optimistic version checking |
approve_doc_delta / reject_doc_delta | Humans only. A call from an agent session is refused — see The approval gate |
discard_doc_delta / delete_doc_delta | Record a rejected revision / remove a garbage row (applied is refused) |
declare_no_spec_impact | Record why a task/plan changed no documented behaviour |
create_doc_node / update_doc_content / list_docs | Doc nodes |
archive_doc / restore_doc / list_archived_docs | Archive cascades down the subtree; restore returns exactly one doc |
rag_query / rag_context / rag_status | Semantic search, assembled context block, index freshness. Read-only |
artifact_upload_url / artifact_complete_upload | Save a file that is on disk, any size: signed URL + ready curl lines (<FILE> placeholder), then complete; description is required |
artifact_upload | Inline content (text/base64, up to 16 MB) for short text not on disk or for agents without a filesystem; description is required |
artifact_list / artifact_get | Browse a folder, search by name/description/slug, the trash (trash=true); one artifact with "where used" |
artifact_read_text / artifact_download_url | Text up to 1 MB into the answer / a 5-minute download link for anything |
artifact_update / artifact_move / artifact_delete / artifact_folder_create | Rename, describe, tag; move; to the trash (confirm when in use); folders |
artifact_quota | Used / limit / percent, whose quota (owner's account or org pool), warning from 80% |
list_action_events | Project audit trail: who did what, when, through which channel. Read-only |
submit_feedback | Report a Flownix platform problem to the Flownix team (not to the project) — see Reporting Flownix problems |
Deltas: discard records a decision, delete removes a mistake
discard_doc_delta = "we considered this and decided against it" — the row stays, marked
discarded, and the history shows the proposal was handled. This is the normal way to say no.
delete_doc_delta = "this should never have existed": a duplicate, an accidental proposal.
An applied delta cannot be removed at all — it is spec history; propose a new one on top.
Documents: archive, not delete
delete_node on a doc is irreversible and takes its revisions with it. Use archive_doc: the
doc leaves the tree, list_docs and rag_query, but revisions, comments and references stay.
Archiving cascades down the subtree, restoring does not — read the archive response, it names
every slug that went along. A doc missing from list_docs is not proof it was deleted: check
list_archived_docs first.
Dependencies: mind the direction
Always read as "from_node depends on to_node" — to_node is the blocker.
// "Register the skill" can only be done after the skill file exists:
add_dependency(from_slug: "AF-TASK-200", to_slug: "AF-TASK-199")
// ^ waits ^ blocker, done first
get_dependencies(slug: "AF-TASK-200") // → depends_on: [AF-TASK-199], blocks: []The common mistake is calling it in the order the work happens and getting the edge backwards.
Say the sentence out loud: the node you name first is the one that waits.
get_node(...).dependency_ids likewise lists blockers. Dependencies are the ordering
graph; typed relations (add_relation) express semantics — don't duplicate one as the other.
Slugs and navigation
get_node(node_id: "abc123") // all three are equivalent
get_node(slug: "ACME-TASK-1", project_id: "…")
get_node(slug: "ACME-TASK-1")
create_node(parent_slug: "ACME-PLAN-1", kind: "task", title: "…", components: ["AF-COMP-3"])
set_references(slug: "MF-FEAT-68", ref_slugs: ["MF-DOC-7", "AF-TASK-217"])An unresolvable slug returns NotFound naming it — fix that slug rather than hunting for IDs.
get_node returns child_ids, so you can walk the tree without get_tree.
RAG — semantic search over the project
Every project has a semantic index built automatically from node content and comments:
rag_query— ranked hits by meaning (slug,kind,title,content,status,score); narrow withkind_filterorcomponent.rag_context— top chunks pre-assembled into one Markdown block for prompt injection.rag_status—total_chunks,last_indexed_atand the sync breakdown (pending/in_progress/synced/failed/skipped).
Reach for RAG whenever you need to find something. Before planning a feature, before creating any node, when picking up a task whose context you don't hold, when the user names work by description rather than slug, and whenever you are about to guess. Two or three queries with different phrasings routinely prevent a duplicate ticket.
Recall, not truth — hits are leads, possibly seconds stale. Confirm with get_node.
Sync is automatic; there are no indexing tools. A node you just wrote may not be
searchable yet, so never verify your own write with rag_query — use get_node. Empty
results mean "not found right now": check rag_status before concluding something doesn't
exist. On rag-service unavailable, degrade to structural tools and say so.
Query patterns and per-tool arguments: flownix-rag-search.
Artifactory — the project's files
Files that work produces or needs — reports, diffs, logs, benchmarks, diagrams, exports, dumps,
context snapshots, mock-ups — live in the project's Artifactory, not in comments and not on
somebody's laptop. Every file gets a slug <KEY>-ARTF-<N> (AF-ARTF-12) that never changes:
renaming, moving and new versions keep it.
- Save what you produce with a folder (
reports/, created when missing), a name and a description — one or two sentences on what is inside. Search finds files by name and description only; a file without a good description is lost. - File on disk →
artifact_upload_url, any size. The bytes go straight to storage, not through the model. Inlineartifact_uploadis only for short text that is not on disk, or for agents without a filesystem and shell (up to 16 MB; the model must print every byte, so it is slow). Example:shasum -a 256 report.html,wc -c < report.html→artifact_upload_url(folder, name, description,sha256,size_bytes) → runcommands[0]with the path in place of<FILE>→artifact_complete_upload(upload_id). - Refer to it by slug.
AF-ARTF-12in a comment or document becomes a link, and the file shows the task under "where used".set_referencesaccepts artifact slugs too. - Read before you download:
artifact_read_textreturns text up to 1 MB; anything else —artifact_download_url(5 minutes, this one file only). - Find files by meaning with
rag_query(kind_filter: "artifact"), by name withartifact_list(query: …). - Same name = conflict. Re-uploading to a taken name fails unless
new_version: true. - Deleting goes to the trash for 7 days. A file a task refers to is not deleted without
confirm: true— the refusal lists who uses it. - Storage has a quota (
artifact_quota), shared by all free organizations of one owner. Uploads beyond it fail withplan_limit(limit_key: artifact_storage); reading never does.
The action log
Every significant mutation is recorded project-wide, independent of any node's comments.
list_action_events(project_id, limit: 10) — or scoped with entity_id — tells you what
happened recently and who did it. Useful when picking up work another agent left mid-flight.
Comments are the why; the action log is the what/when/how.
Reporting Flownix problems
A Flownix tool misbehaves — errors on correct arguments, returns contradictory data, refuses for
no stated reason, lacks a capability the docs promise, or its error ends with the
"looks like a Flownix platform failure" hint → submit_feedback, not a task in the project.
The user asks you to pass something on to the Flownix developers → submit_feedback with origin: "user".
It works in any project regardless of spec_mode/spec_first; no delta, components or approval.
submit_feedback({ feedback_type: "bug", tool_name: "get_tree", title: "get_tree: Internal on a valid project_id",
body: "get_tree(project_id=…) → Internal: …; expected the tree" })Presence
While connected over MCP you appear in a live presence panel — nothing is required of you:
the session registers on connect, every call keeps it alive, and the task is inferred from the
node_id/slug you pass. One optional call makes the row informative:
session_announce({ agent_name: "Claude Code", ai_model: "Claude Opus 5",
host: "…", cwd: "…", git_branch: "…" })session_report (tokens/cost, normally from a statusLine script) and session_end also exist.
Reads carrying no node (rag_query, get_tree) keep the session alive but don't change which
task you're shown on — searching is not switching.
Harness — multi-agent workflow orchestration
A separate subsystem of reusable multi-agent workflow templates (council, review board,
debate) that you define, publish and run. Its MCP tools use dotted names
(harness.create, work.claim, council.submit_proposal) — distinct from the
underscore-named node tools. workspace_id on harness tools is the Flownix project_id;
there is no separate workspace entity and no FK validating it, so getting it right is on you.
Concepts
- Harness definition (
harness_id) — the named template. Every harness also has a slug<KEY>-HRNS-<n>(e.g.AF-HRNS-1): numbered per project like node slugs, never reused, a clone (in the project or from the library) gets its own.harness.getandharness.start_runacceptharness_slug+workspace_idinstead ofharness_id; a slug of another project is NotFound. - Version (
harness_version_id) — a draft or published snapshot: graph, roles, policies, schemas. Sequential; one published at a time. - Role — objective, system prompt, responsibilities, prohibitions, instance bounds.
Referenced by
keyfrom workflow nodes. - Workflow node — one step;
type∈agent_task,parallel_group,review,debate,vote,judge,human_gate,transform,create_flow_nodes,condition,loop,end. - Policy — category (
tools/data_access/voting/budget/execution/approval/retention/privacy) + effectallow/deny/require_approval;denywins. - Run (
run_id) — one execution; starting it creates work items for agent-needing nodes. - Work item — a claimable unit with a lease.
source_node_ids/result_node_idsare plain JSONB, no join table — if you need the run↔node link discoverable, record it yourself (add_commentwith therun_id, orset_references). - Deliberation — proposals, claims with evidence, critiques (info/minor/major/blocking), revisions, then a ballot or a judgement.
Build → publish → run
harness.list(workspace_id) — check for an existing harness to reuse orharness.cloneharness.create(workspace_id,name,type)harness.create_version(draft)harness.add_role× N,harness.add_workflow_node× N,harness.connect_workflow_nodesharness.set_policy,harness.set_budget,harness.set_context_policy,harness.set_output_schema(optional)harness.validate— missing roles, disconnected nodes, cycles, policy conflictsharness.publishharness.start_run— passsource_node_idsto link it to the task/feature it operates on. To run an existing harness with a prompt and drive it to the end, use the run-harness skill:run-harness AF-HRNS-1 <what to do>.
harness.clone deep-copies a definition as a new draft. harness.export produces a ZIP
(harness.yaml, roles.md, rules.yaml, workflow.json, prompts, README) — URL expires in 1 hour.
Template library (harness.library_*)
A public catalog of harness templates published by Flownix users from any organization, modelled on npm. A package has an immutable title and author; each publish by its author adds the next version — an immutable snapshot of a published harness version (roles, steps, transitions, policies, context policy, schemas). The package does not depend on the source harness, but a harness is linked to its package: a clone to the package and version it came from, a source to the package it was published into.
- Browse:
harness.library_list(query, type,sort: recent | rating | clones) andharness.library_get(card with every published version, the selected version's full composition, yourmy_ratingand stats). Any authenticated user sees the catalog. - Clone:
harness.library_clone({ package_id, workspace_id, number?, name? })→ an independent draft in a project you belong to: version 1 unpublished, you as author, role links to project policies empty, no participants bound. Assign participants,harness.validate,harness.publish. - Publish:
harness.library_preview({ harness_version_id })first — the whole content becomes public and is copied into clones as is — thenharness.library_publishwithsummary(1–280) andconfirm_public: true; omitpackage_idfor a new package (title 1–120, immutable, defaults to the harness name) or pass your package to add a version. - Link:
harness.library_link({ harness_id })→ package, matchingnumber,latest_number,update_available,own. A linked copy of your package publishes only as the next version of that package (never a duplicate); a copy of someone else's package cannot be published (library.foreign_copy) —harness.library_unlinkfirst to make it your own.harness.library_update({ harness_id })puts the latest package version into the harness as a draft (replacing an unpublished latest version); published versions keep serving runs. - Own packages:
harness.library_my_packages,harness.library_unpublish(a version bynumber, or the whole package); clones are never affected. - Rate:
harness.library_rate(1–5, one per user, replaces) /harness.library_unrate; the author cannot rate their own package. - Moderation:
harness.library_set_hidden— platform administrators only.
Errors carry a library.* code in front of the message, identical in REST and MCP:
version_not_published, confirmation_required, title_invalid, summary_invalid,
title_immutable, not_author, rating_invalid, self_rating, sort_invalid,
foreign_copy, linked_package, not_linked, up_to_date,
type_invalid, page_token_invalid, workspace_required, workspace_not_found,
permission_denied, admin_required. Unpublished, hidden and unknown packages all answer
not found.
To build one: harness-blueprint — it checks the library before building from scratch. Once a run is live: flownix-harness-participant
(you hold a role) or flownix-harness-moderator (you hold judge).
Harness tools
| Tool | Purpose |
|---|---|
harness.list | Harnesses of a project with slug, status and current published version number |
harness.create / harness.get | Create a definition / read it with version details — by harness_id or harness_slug + workspace_id |
harness.create_version | Open a new draft version |
harness.add_role / harness.update_role | Add or edit an agent role |
harness.add_workflow_node / harness.connect_workflow_nodes | Build the graph |
harness.set_policy | Add a policy |
harness.set_context_policy | What work.get_context returns: include (run_input/role/predecessors/all_steps), exclude output keys, max_tokens |
harness.set_output_schema | JSON Schema of the final result, enforced on steps leading into end; role output_schema is enforced on every work.complete (output.schema_violation) |
harness.validate / harness.publish | Check a draft / make it active |
harness.clone / harness.export | Deep-copy / export as ZIP |
harness.start_run | Start a run of a published version — by harness_id or harness_slug + workspace_id |
harness.library_list / harness.library_get | Public template catalog (search, type, sort by recent/rating/clones) / package card with versions, composition, your rating and stats |
harness.library_clone | Clone a package version into your project (workspace_id) as an independent draft |
harness.library_preview / harness.library_publish | See exactly what becomes public / publish a published version as a new package or the next version of yours (confirm_public: true) |
harness.library_my_packages / harness.library_unpublish | Your packages with all versions / unpublish a version (number) or the whole package |
harness.library_rate / harness.library_unrate | Rate a package 1–5 (not your own) / remove your rating |
harness.library_set_hidden | Hide or restore a package — platform administrators only |
harness.get_run / harness.list_runs | Read a run with step outputs / find runs by harness, status or Flownix node (slug or UUID) |
harness.list_pending_approvals | Open human_gate approvals of a run or project — read-only, a human answers in the web app |
work.list_available / work.claim / work.heartbeat | Find, lease, extend |
work.get_context | Run input, node, role, input artifacts and predecessor outputs for a work item |
council.get_deliberation | Proposals with claims and evidence, critiques with responses, ballots, decisions |
work.complete / work.fail | Finish with result artifacts / fail with an error |
council.submit_proposal / council.revise_proposal | Submit / supersede a proposal |
council.submit_claim / council.attach_evidence | Attach a claim / evidence |
council.submit_critique / council.respond_to_critique | Critique / accept-reject-revise |
council.cast_vote / council.abstain | Vote on a ballot |
council.submit_judgement | Issue the authoritative decision as judge |
The project config file
Every skill reads project context from .flownix in the working directory, created by
flownix-init:
spec_mode: "off"
org: { id: "<org_id>", name: "<org_name>" }
project: { id: "<project_id>", name: "<name>", key: "<KEY>", spec: "<markdown>" }Read it before any MCP call. The product was renamed, so both names are accepted:
cat .flownix 2>/dev/null || cat .ai-flow.flownixexists → use it (if.ai-flowis also there, say once it is now redundant).- Only
.ai-flow→ use it, and say once: "the config is now.flownix; rename when convenient — the old name keeps working." - Neither → run flownix-init.
Once per session, not per call. Parse the YAML for project_id, org_id, project.key —
never ask the user for IDs. If parsing fails or the project_id no longer resolves, re-run
flownix-init; new files are always written as .flownix.
Spec mode and doc deltas
off keeps the ordinary workflow. In strict, a task or plan reaches done only after an
applied doc delta sourced from that node, or an explicit declare_no_spec_impact with a real
reason. A delta is the complete resulting document, never a patch or excerpt: reread the
doc, preserve everything still true, make the change, propose and apply that full body. That
is what makes the server's revision history and diffs reliable.
The approval gate
Every proposed delta carries a review_status — draft, pending, approved or rejected — separate
from its state (proposed/applied/discarded). state says whether the change reached the
spec; review_status says whether a human looked at it. A delta is routinely proposed and
already approved: that pair is what "you may start now" looks like.
When the project has require_proposal_approval on (get_project_policy tells you, alongside
spec_mode), the server refuses two things until the covering delta is approved:
- moving the covered task or plan into
in_progress, and apply_doc_delta.
Both refusals come back as FailedPrecondition prefixed proposal_not_approved. The gate
looks up the tree: a delta proposed from a feature or plan blocks the tasks underneath it. It
does not require that a proposal exist — it only refuses to let one past review.
draft is the odd one out: it means nobody has been asked yet. It appears only in projects with
spec_first on, it stands in no queue and holds no gate, and it becomes a question to a human
only when submit_doc_delta makes it pending. See Spec-first below.
You cannot approve anything. approve_doc_delta and reject_doc_delta refuse every call
from an agent session with PermissionDenied; the tools are listed so you can name the step you
are waiting on. When a delta is pending, stop and tell the user which delta needs approval,
then wait. Do not re-propose it, do not apply it, do not move the task into in_progress, do
not delete it and start over — a rejected delta can still be approved later. When it comes back
rejected, read review_note, rebuild the spec on that feedback, and propose a new delta.
The full procedure for authoring a change proposal is its own skill: flownix-write-spec.
Spec-first: the document before the tasks
A third policy flag, spec_first, reverses the order of work: the feature's document is written
and accepted before any task is created under it. With it on, two things change.
- A delta is born
review_status: draft— a working copy that asks nobody anything — and reaches a human only throughsubmit_doc_delta. - Creating (or moving) a
taskorplanunder a feature is refused withFailedPreconditionprefixedspec_first_not_approveduntil that feature has an approved delta, or has declared no spec impact. Unlike the entry gate above, here the absence of a proposal is itself the violation.
spec_first only works together with spec_mode: strict and require_proposal_approval; the
server refuses to enable it without them, and refuses to disable either while it is on. It is
off by default, and with it off nothing above applies.
The procedure is its own skill — spec-first-change. It is not described here on purpose: this file is the map, and a second full account of the flow would be the copy that drifts.
The spec format
A doc describes observable behaviour in OpenSpec; implementation steps belong in a plan.
flownix-write-spec is the sole owner of the mandatory/conditional doc sections, the filled
example, validate_spec, propose_doc_delta and the approval procedure. Read its
Doc content schema and filled example
before authoring or changing a doc. Do not create a second format definition in this skill.
Golden rules
- Read
.flownixfirst (falling back to.ai-flow); discover IDs, never invent them. - Link every node and doc to at least one component; create the component if it is missing. See System components above.
- One task = one executable unit. Too big → it is a plan/feature; split it.
- Search before you create and before you guess —
rag_query/rag_contextis the default way to find anything; confirm hits withget_node; if the index is cold (rag_status), say so instead of concluding nothing exists. - Set
ai_modelandagent_nameoncreate_node(e.g."Claude Opus 5","Claude Code"). - Set
commit_hashviaupdate_node_contentafter committing the work. - Write specs as
## Purpose/### Requirement:/#### Scenario:— this format is mandatory, not preferred. Runvalidate_specbefore proposing a delta. See The spec format above, and flownix-write-spec for the whole procedure. - Never start work on a task whose covering delta is not
approvedwhen the project hasrequire_proposal_approvalon. Stop and ask the user; you cannot approve it yourself. See The approval gate. - Never create tasks under a feature before its document is accepted when the project has
spec_firston — the server refuses, and the refusal is not a bug to route around. See Spec-first and spec-first-change. - Set
ticket_refwhenever an external ticket is mentioned (Jira/YouTrack/…), oncreate_nodeorupdate_node_content. Optional in the schema, mandatory in practice — but never invent one.list_nodes(ticket_ref: …)finds everything tied to a ticket. - After finishing a feature or epic, write the doc and link it back in the same step —
create_doc_node, thenset_references(slug: "<FEAT slug>", ref_slugs: ["<DOC slug>"]). Nobody finds a doc by browsing the doc list; they arrive from the feature. Creating the doc and forgetting the reference is the common failure. - Cross-link with
set_references, not with text incontent— references render as clickable links on both nodes. Each call replaces the set, so pass the full list. - Write plans, tickets and docs in the language of the user's prompt. Russian prompt → Russian ticket.
- Spend tokens like a budget: read once and by slug, never list wide, batch independent calls, cite files by Artifactory slug, delegate by reference — see Working efficiently.
- Assess before delegating and pick the cheapest model tier that fits (light / standard / deep); check failures with tests, raise effort first, then consider a stronger model.
- The tier → model map lives in
AGENTS.md/CLAUDE.md— follow Pin the tier → model map. Claude Code asks which file and obtains approval before writing; never overwrite a map the team already wrote without explicit approval. - Harness tools are dotted and take
workspace_id(=project_id) — don't mix namespaces.