Runtime control plane for AI-assisted software development.
Seshflow is not a generic project board. It keeps planning state, active-task context, runtime logs, process records, transition events, and recovery hints in one workspace so an AI can resume engineering work without re-deriving the entire repo state.
Use Seshflow when you want an AI assistant to work like a consistent engineering collaborator instead of a stateless chat window.
What it gives you:
- task state that survives across chats
- explicit "what should I do now" context through
seshflow ncfr - recoverable runtime history: commands, logs, artifacts, background processes, transition events
- contract-first planning when API, RPC, or message agreements must be established before implementation
- contract bundles can be imported from a JSON array or JSONL file
- controlled contract extension fields through
metadataandextensions - thin CLI, Web, and RPC seams over the same workspace truth
Seshflow is 100% AI-oriented, but the documentation and command flow should still be readable and operable by humans.
v1.4.4is the current release line.v1.3.xestablished the contract-first execution core: contract bindings, explicit AI context priority, hook/RPC seams, workspace index, and boundary best practices.v1.4.0adds delegated git worktree handoff as the next completion layer on top of that core.- contract-first design details remain documented in
docs/apifirst-mode.md.
npm install -g @seshflow/cli
# or
pnpm add -g @seshflow/cli
# or
yarn global add @seshflow/cliThe executable remains seshflow.
- AI-first workspace bootstrap:
seshflow initseshflow ncfrseshflow next
- managed planning:
- single-task add/edit flows
- batch Markdown planning with stable task ids and
import --update
- execution recovery:
start,suspend,donerecordfor commands, logs, output roots, artifactsprocess add/listfor background jobs- persisted runtime events and announcements
- dependency control:
- explicit dependency mutation
- blocker derivation and dependency views
query --text/--contractfor lightweight handoff candidate lookup without a search-engine layer
- contract-first mode:
- contract registry
- single-file or batch contract import
- task/Markdown/file binding
- drift reminders
- contract-first context and explicit
contextPriority
- integration seams:
- hook taxonomy and result kinds
- RPC shell payloads
- workspace index and mode capabilities
workspaces list/currentcan surface active handoff and delegated-task summaries
- delegated handoff foundation (
v1.4.0):- parent-managed handoff records
- delegated git worktree creation
handoff createpreflights the parent workspace and returns an actionable hint if the repository still has no initial git commit- execution-surface manifests and bounded handoff bundles without creating a second task truth
- delegated tasks are skipped by
nextand guarded bystartunless explicitly reclaimed with--force handoff submit/pause/reclaim/abandon/closecontrol only handoff lifecycle, not source task completionadd/edit --expect-artifactcan declare expected task deliverables;doneandhandoff submitemit lightweight existence warnings without blocking flowhandoff list/showrecover handoff state without guessing worktree paths or branch nameshandoff closeandhandoff showsurface cleanup guidance for delegated worktrees without taking over merge or deletion semantics
If you are driving Seshflow manually and do not want JSON on screen, use:
seshflow ncfr --pretty
seshflow next --compact
seshflow show <taskId> --prettyYou can also opt out globally:
SESHFLOW_OUTPUT=prettyDefault JSON remains the correct mode for AI, automation, and tool integrations.
Use --full cautiously on inspection commands. It is intentionally high-context output and should be reserved for focused deep inspection.
Integration-facing commands such as rpc shell, workspace index inspection, and magic are hidden from the default help surface. Use seshflow --help --advanced when you explicitly need those seams.
seshflow init
seshflow ncfr
seshflow nextUse this path when the workspace is still ordinary task/execution management and no explicit API, RPC, or message contract has become the main coordination truth yet.
Recommended sequence:
- run
seshflow initonce per workspace - start each new AI conversation with
seshflow ncfr - follow the returned focus into planning, inspection, or execution
AI-facing commands now default to structured JSON, so ncfr already returns the minimal workspace snapshot needed to decide what to do next.
What the three core commands return:
seshflow init- creates
.seshflow/config.json,.seshflow/tasks.json, and starter planning templates - prints the resolved workspace location and the mode that was initialized
- creates
seshflow ncfr- returns the current workspace snapshot
- tells AI whether there is an active task, a next ready task, or no immediate focus
- in
contractfirst, it also returnscurrentContract,contractReminderSummary, andcontextPriority currentContractonly includes non-empty fields
seshflow next- returns the next actionable task, or the currently active task if one is already running
- includes blocker information and workspace mode metadata
- in
contractfirst, it also carries the primary contract context for that task - high-frequency commands like
ncfr,next,start, anddoneomit empty sections by default and keep--fullfor larger inspection payloads
seshflow init contractfirst
seshflow contracts import .seshflow/contracts/contracts.bundle.json
seshflow contracts import .seshflow/contracts/contracts.bundle.jsonl
seshflow contracts add .seshflow/contracts/contract.user-service.create-user.json
seshflow contracts add .seshflow/contracts/contract.board-service.move-card.json
seshflow validate .seshflow/plans/api-planning.md
seshflow import .seshflow/plans/api-planning.md --update
seshflow contracts checkUse this mode as soon as API, RPC, or message contracts become the thing multiple tasks or agents must agree on before implementation.
For an existing workspace, migrate instead of re-initializing:
seshflow mode set contractfirstThat preserves the current task/runtime state and upgrades the workspace into contract-first operation.
Accepted mode names today:
apifirstcontractfirstcontract-first
This mode is not limited to classic frontend/backend coding. Use it whenever multiple tasks or agents must align on a declared contract before execution.
Contract authoring rules today:
- one contract per JSON file still works well for small workspaces
- batch contract bootstrap is supported through
seshflow contracts import <file> - recommended batch formats:
.jsonwith a JSON array of contracts.jsonlwith one contract per line
- supported import bundle formats:
- JSON object
- JSON array
- JSONL
- batch import examples:
seshflow contracts import .seshflow/contracts/contracts.bundle.jsonseshflow contracts import .seshflow/contracts/contracts.bundle.jsonl
- Seshflow only depends on a small set of core fields for binding, reminders, and context recovery:
idversionkindprotocolname
- broader protocol content can live in:
payloadmetadataextensions
kindandprotocolare descriptive inv1.3.x; custom values such asevent-streamare stored as-iscurrentContractandcontracts showomit empty fields by default
Where contract linkage comes from:
- contract truth is stored in
.seshflow/contracts/<contractId>.json - contract-first planning is usually authored in
.seshflow/plans/api-planning.md - task-to-contract linkage is created by:
## Contract: <contractId>groups in managed Markdown[contracts:<contractId>]metadata on specific Markdown tasks- explicit task fields such as
contractIds,contractRole, andboundFiles
ncfr,next, andshowread that binding data and decide which contract to surface first
For one-off tasks:
seshflow add "Implement runtime event retention" --priority P1For batch planning and revisions:
seshflow validate tasks.md
seshflow import tasks.md
seshflow import tasks.md --updateManaged Markdown example:
- [ ] Design data model [id:task_design] [P1] [2h]
- [ ] Build API [id:task_api] [priority:P1] [estimate:6h] [dependency:task_design]
- [ ] Add list endpointManaged Markdown is the planning surface. .seshflow/tasks.json remains the runtime state store.
For humans, the practical rule is:
- use
addfor one-offs - use Markdown for large plans and repeated revisions
- keep runtime state in Seshflow, not in free-form notes
seshflow start <taskId>
seshflow record --command "pnpm test" --cwd packages/cli
seshflow process add --pid 12345 --command "vite dev"
seshflow done <taskId>
seshflow done --start-nextKey AI-facing commands:
seshflow ncfrseshflow nextseshflow show <taskId>seshflow listseshflow queryseshflow start <taskId>seshflow suspendseshflow done <taskId>seshflow done --start-nextseshflow add-dep <taskId> <dependsOnTaskId>seshflow remove-dep <taskId> <dependsOnTaskId>seshflow contracts listseshflow contracts show <contractId>seshflow mode show
Human-readable examples:
seshflow list --pretty
seshflow show <taskId> --pretty
seshflow stats --compactThe web package is a lightweight, read-only runtime surface over the same workspace data. It shows current focus, task summaries, runtime records, process summaries, and recent runtime events. State mutation remains CLI-first until the API mode is expanded.
Seshflow stops at the development kernel:
- tasks, dependencies, runtime context, contracts, hooks, and modes
- thin CLI/Web/RPC seams over the same domain rules
Seshflow does not aim to become the full Agent product. Future Agent-specific concerns such as model routing, long-running autonomous loops, prompt policy, and cross-tool orchestration should live in the Agent project and integrate through Seshflow's RPC/API/hooks.
For package-consumption and scope decisions, use docs/best-practices.md.
- default: structured JSON for AI/tooling
--compact: low-noise text--pretty: human-readable text--no-json: explicit text fallback for commands that default to JSON
Defaults:
- AI-facing commands:
json - opt out per call with
--pretty,--compact, or--no-json - override globally with
SESHFLOW_OUTPUT=json|compact|pretty
docs/CLI.mddocs/skills/seshflow-light/SKILL.mddocs/skills/INSTALL.md
Skill guidance follows the same boundary:
- start with
seshflow initfor ordinary task work - switch immediately to contract-first mode with
seshflow init contractfirstorseshflow mode set contractfirstonce API/RPC coordination becomes part of the work
Stable convenience aliases:
seshflow contract ...forseshflow contracts ...seshflow workspace ...forseshflow workspaces ...seshflow proc ...forseshflow process ...seshflow pauseforseshflow suspendseshflow rm <taskId>forseshflow delete <taskId>
MIT