Sections
On this page
plan-feature
Use when a new feature, epic or body of work has to be planned and tracked in Flownix — triggers on "plan a feature", "decompose this", "break this into tasks", "создай план", "распланируй фичу", "разбей на задачи", "заведи эпик", or any re
Plan a Feature
Turn a feature idea into a tracked, well-structured plan inside Flownix. Prerequisite: flownix-basics (hierarchy, statuses, components, "ticket is memory").
0. Load project context
cat .flownix 2>/dev/null || cat .ai-flowParse the YAML for project_id / org_id. Neither file exists → run flownix-init.
Then read the project's policy — before creating anything:
get_project_policy({ project_id })If spec_first is on, this skill is not the one you want. In that mode the order of work is
reversed: the feature's document is written and approved first, and the server refuses to create
a task or plan under a feature whose delta is not approved. Hand over to spec-first-change
and follow it instead — everything below assumes decomposition may happen now.
Everything else in this skill is for spec_first: false, which is the default and covers every
project that has not deliberately switched over.
1. Orient
- A scoped tree/list slice for the relevant branch (full
get_treeonly when needed), andlist_components({ project_id })for the shape of the system. - Search semantically before creating anything — the tree shows titles, not meaning:
shell rag_query({ project_id, query: "<the request in one sentence>", k: 8 }) rag_context({ project_id, query: "<domain area> — prior decisions and conventions" })get_nodethe plausible hits and decide explicitly: extend an existing node, depend on it, or create new. Record that decision in the[plan]comment (step 4). Empty results are not proof of absence — checkrag_status. See flownix-rag-search.
2. Decompose
Before every create or content update, read the applicable kind in
flownix-basics — Node content schemas,
including Shared writing rules, Markdown for technical text and Check completeness before
saving. Draft and check the complete body before create_node or update_node_content;
for component descriptions apply the component schema before create_component or
update_component. Docs use the sole schema and validation procedure in
flownix-write-spec.
These checks apply to extending existing nodes as well as creating new ones, in both project
profiles; they do not add specs or components to a simple project.
Feature or bug? If the request restores behaviour the spec already describes (it is
broken, not missing), create a bug under the project or the epic, not a feature. A bug
takes plans and tasks right away: no spec document has to be written or approved first, and the
spec-first gate does not apply to it. If the request adds or changes described behaviour, it is a
feature, as below. The closing gate still applies to the bug's tasks (see execute-task).
Give the bug content as steps to reproduce, expected and actual behaviour, environment and links
(logs and screenshots live in the Artifactory); severity goes in a tag such as severity:high.
Top-down, shallowest tree that fits — don't over-nest:
- epic only for a genuinely large body of work.
- feature — the shippable capability (
create_node, kindfeature). - plan under the feature — implementation decisions and delivery map, using the
planschema in flownix-basics. - task per concrete executable unit, under the plan, using the
taskschema there so an executor can work without chat history. - doc node for the feature's durable specification (
create_doc_node) — the intended behaviour and contract after it ships, not a repeat of the task checklist. Thenset_referenceson each task with this doc, so executors and the strict close gate have an explicit task → spec link. ticket_ref— if the request names an external tracker ticket (Jira/YouTrack/…), set it on every node you create for it (create_node,ticket_ref: "PROJ-123"). Optional in the schema, mandatory whenever a ticket is mentioned.
Size and weigh every task for the agent that will run it (see flownix-basics → Working efficiently):
- One task = one executor's context: one component, roughly ≤ 5–6 files, one verifiable result. If you cannot write its acceptance check in two or three lines, it is still a plan — split it.
- Write the
contentso a cheap model can execute it cold: goal, the files/entry points to start from, the pattern to copy (point at an existing example), acceptance criteria, how to verify, what is out of scope. - MUST tag the weight: every task you create gets exactly one of
tier:light,tier:standard,tier:deepin thetagsofcreate_node, chosen with the four signals in flownix-basics → Working efficiently (light: mechanical, pattern exists; standard: a slice in one component; deep: contracts, migrations, security, concurrency, unclear cause). A plan with an untagged task is not done. Also set exactly onereasoning:low|medium|hightag using the base map (light → medium, standard → low or medium, deep → low by default); justify high.mediumas a model tier meanstier:standard, nevertier:medium. Put the hard decisions into the plan and feature doc so the tasks beneath them can be light. - Draw dependencies so that independent tasks stay independent — that is what lets the executor
run a wave in parallel. Split a
deeptask into a deep design step and light implementation steps whenever the decision can be made once, up front.
2b. Planning self-review — before saving
Use this same review for ordinary planning, approved spec-first decomposition, and work generated by a harness. It applies the schemas above; it does not define another body format.
Before cutting tasks, map real files to responsibilities and the planned change (create,
modify or verify). Check existing entry points and patterns in the repository; a new file must
have a justified location and owner. For tasks sharing a contract, settle inputs, outputs,
type/field names, method signatures and compatibility once in the plan, with an explicit
producer and consumer. Point each task at that contract and the relevant spec requirement or
scenario. In simple projects use the feature's acceptance criteria; for no-impact work name
the existing contract and constraint. Do not invent a spec to fill a field.
Keep small actions as steps inside an independently checkable task. Give enough concrete instructions to execute each step: actual paths and identifiers, the expected behaviour and error/boundary cases, plus a precise verification command and expected result for technical work. Research must instead state the question, evidence and decision/report to deliver when files or interfaces are unknown. Editorial work can use a substantive comparison/checklist; do not manufacture code, failing tests or a ticket for each edit to imitate a coding workflow.
Review the complete draft yourself before each create/update, and the assembled decomposition before finishing:
- Coverage: map every in-scope requirement/scenario or acceptance criterion to a task and its check. Resolve omissions; ensure dependencies reflect real blockers and scope fits one executor. A checklist of actions without a verifiable outcome is not a task.
- No placeholders: remove empty headings,
TBD, “as discussed”, “similar to task N”, “add validation” and “test the above” without concrete inputs, rules and expected results. A reference provides a contract, not missing task instructions. Make unresolved facts a bounded investigation rather than guessed file names or implementation details. - Consistency: compare file responsibilities and all shared names, signatures and payloads across producer/consumer tasks and the spec. Fix incompatible interfaces and references to symbols that no existing file or task defines.
- Cost and checks: confirm each task has one tier and reasoning tag, an economical model from the base map, and scoped verification commands with expected outcomes. Do not add precautionary audits, full suites, multiple reviewers or out-of-scope investigation. A required broad integration check belongs once at the plan boundary, not repeated in every child.
- Body and formatting: run the selected schema's completeness check and the linked Markdown rules on the full body; verify paths and references, and keep progress in comments. Check substance, not just the presence of a heading or keyword. Fix findings before saving.
3. Bind to system components — mandatory
Simple projects are the exception. When get_project_policy returns profile: simple, the
project is just a tree of tasks: skip this step and step 5 (spec doc, deltas), and decompose into
epic/feature/plan/task only. Offer the user to switch to full if they want specs or components.
Every node and the spec doc must be linked to at least one component. Nothing you create in step 2 is finished until it is bound.
list_components({ project_id }) // what the system already knows about itself
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- Several components are normal. A feature touching the API and the web app is linked to both; link every part it actually touches, not just the first one that fits.
- The doc/spec is bound too — same call, same rule. An unbound spec is unreachable from the service it describes.
- No suitable component? Create it —
create_component(\{ project_id, title, repo_path, component_kind, parent \})with the name it really has in the repository, then link. Read the repo before naming it; never invent a component that no code corresponds to. - If the project has no components at all, inventory the repository first with map-components, then plan — planning into a system nobody has described produces work that lands nowhere.
- The only exception is a truly cross-cutting node (release checklist, process ticket). Say so
in the
[plan]comment instead of leaving it silently unlinked.
4. Enrich
add_tagper node (backend,frontend,db,infra) so work can be filtered and routed.add_dependencyfor real ordering only. The edge reads "from_nodedepends onto_node":from_nodewaits,to_nodeis the blocker finished first. Verify withget_dependencies(depends_on= blockers,blocks= waiters). Don't over-couple.
5. Write the feature's spec, then STOP for approval
A feature ships a contract, and that contract lives in a doc node the feature references. The plan holds the how; the spec holds the what.
The procedure is its own skill — read flownix-write-spec and follow it. It owns the OpenSpec
format, validate_spec, propose_doc_delta and the approval gate. It is not repeated here on
purpose: the format used to be restated in three skills, and three copies drift.
Mock-ups, sample data, research notes and other material the proposal rests on go to the
Artifactory (artifact_upload with a description) and are referred to by slug in the feature's
content or the delta's reason — not pasted inline and not linked to a laptop.
Two things this step must not get wrong:
- The OpenSpec format is the only accepted way to record behaviour.
## Purpose,### Requirement: <name>with a RFC 2119 keyword,#### Scenario:with GIVEN/WHEN/THEN. Freeform prose in a doc node is a defect, not a style choice. - When the project has
require_proposal_approvalon (get_project_policy), planning ends at the proposal. Propose the delta, tell the user it is waiting forapprove_doc_delta, and do not move any task of this feature intoin_progressuntillist_doc_deltasshowsreview_status: approved. The server refuses those transitions anyway — but a plan that walks into the refusal wastes the user's turn instead of handing them the decision.
With spec_first: false — that is, in this skill's mode — decomposing the tree (steps 2–4)
is fine before approval: it is the implementation that waits, not the planning. What must not
happen is code, or a task claimed as started, on a contract nobody agreed to.
That sentence is about this mode only, and it used to be written as a general rule. It is not
one: with spec_first on, decomposing before approval is exactly what is forbidden, and the
server enforces it. If you got here without reading step 0, go back and read it.
Plan once with the lowest model/effort sufficient to settle the decisions. Routine decomposition can use standard; architecture can use deep. Follow the Claude-specific recommendations in flownix-basics (normally medium effort; Fable 5.2 for architecture), or the existing family/effort defaults for other providers. Setup presents recommendations without changing settings. Keep planning research within the question being decided; do not run implementation tests, browser suites, audits or benchmarks just to create a plan. Document a bounded probe only if it resolves a specific planning blocker. Existing repository-mandated checks still apply.
6. Record the plan as memory
add_commenton the plan/feature with[plan]: the decomposition rationale, trade-offs, what you deliberately deferred, and which components you bound to and why.- Run the assembled decomposition through the planning self-review in step 2b. Every task has
exactly one
tier:*and onereasoning:*tag, plus the smallest acceptance checks; infullprojects check component binding and applicable spec references too (simpleskips components and specs as above). - Leave new nodes in
backlog— planning records intent; execute-task moves them forward.
7. Write so the plan can be found later
Content and comments are indexed for semantic search. Name the subject explicitly in the title
and first paragraph, use the domain words a future searcher would use (including alternatives
you rejected), and record the why as a [decision] comment. Indexing is automatic and
eventually consistent — never verify your own write with rag_query, use get_node.