◉ Pulse
Kacep91 avatar
#35 today

Kacep91/orchestration-flow-kit

Python AI GPL-3.0

Portable reference kit for evidence-led AI engineering: packet-first planning, bounded Luna execution, Sol orchestration, parallel behavior packages, deterministic handoffs and diffs, failure-ledger retries, cache-aware context, browser validation, and risk-based review. Adapt it to your Codex host before use.

Last active 3 months ago Created Aug 5, 2026
Stars
8
Today
+8
Forks
0
Quality
95/100
Momentum
20

README

Fetched from GitHub on Nov 7, 2026, 12:56 AM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to Kacep91/orchestration-flow-kit and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. Licensed under GPL-3.0. Copyright / takedown policy.

Portable Orchestration Flow Kit

A small toolkit for bounded development with verifiable evidence.

Russian version

This repository describes a reproducible way to handle development work: collect facts, choose the smallest task contract, change files, run authoritative checks, and review the result. It is a set of local rules and tools, not a hosted service or deployment system.

Problems This Kit Solves

An ordinary task quickly loses its shape: requirements stay in chat, a worker reads the same repository again, unrelated files are touched by accident, and there is no reliable distinction between a passing check and a claim that the work is done. This kit makes ownership boundaries and evidence explicit:

Pain point What the kit does Why it matters
Task context is split between a plan, chat, and several requirement copies. Guarded and strict work uses a human-readable plan.md; exact bounded fast work can use one complete .tasks/<slug>/task.json. The task has one machine-readable contract describing its owner, permitted files, and checks. No second approved copy is needed.
Repository searches are repeated, consume the main model's context, and leave no citations. The Luna explorer performs a bounded evidence pass in advance. Sol receives paths, line numbers, short excerpts, known facts, and gaps. Only disputed or critical places are reread.
Each worker receives context assembled manually and differently. flow_stage.py start validates the task, captures its starting state, and prepares the worker packet. Every worker gets the same boundaries and starting point; preparation does not depend on chat memory.
After the work, it is hard to tell which files really changed or whether someone else's work was touched. The flow keeps a write allowlist, a baseline snapshot, and a computed change inventory. The inventory computed from the starting state is authoritative. Writes outside the allowed scope and path or symlink escapes block acceptance; unrelated new paths remain visible as warnings.
A worker can say that checks passed even when a command failed. flow_stage.py finish executes the declared commands and records exit-code evidence. A failed or timed-out check leaves finish telemetry and cannot publish an accepted result.
A small change gets stuck in a heavy review, while a risky change gets no extra scrutiny. The fast, guarded, and strict modes. Ordinary work takes the short path; extra review is selected by risk or by the owner's explicit request.
A retry forgets why the previous attempt failed and starts the investigation over. Sol records the failure fingerprint, hypothesis, evidence, and reset reason. The same package owner receives only new failure information, not a newly invented task.
A reviewer has to reconstruct the task from chat and the whole repository. A structured handoff packet contains the contract, accepted result, exact diff, and check results. Review covers one concrete task revision instead of guesses about the author's intent.
Dynamic data at the beginning of every request prevents prompt-cache reuse. Stable policy, schemas, and result formats come before task, diff, and evidence data. The same prefix can be reused more often and reduce repeated-call cost. This is cache-prefix hygiene, an optimization rather than proof of correctness.
Computer-specific settings get mixed with the portable project content. .codex/, .pi/, and the shared skills/ directory are separate. Git contains portable roles and policy, not secrets, sessions, absolute paths, or a user's private extensions.

The Fast Path: fast

fast is the default mode for ordinary bounded changes. It needs only one complete task.json, with no plan.md or approval artifact. After the worker and authoritative finish checks, it runs the mandatory Sol Low review through simple-code-reviewer in wire mode simple (the result-exchange format for that lane). The complete path is:

  1. Create one .tasks/<slug>/task.json with task_id, revision, the goal, package, write allowlist, and check commands. flow_mode is optional; omitting it selects fast.
  2. Run flow_stage.py start. It validates the task and package, captures the starting file state, prepares the worker instructions, and returns one JSON context bundle.
  3. After that bundle, batch only the remaining known-independent read-only operations. Dependent operations, writes, and checks remain sequential.
  4. The worker changes only allowed files and returns one ofk.worker-result.v2 result. It may report a declared check as not_run.
  5. Run flow_stage.py finish. It verifies the start contract digest, reruns every declared command from the repository root, and only after success builds the exact diff, computes the actual changed-file inventory, and validates the structured result.
  6. Once the implementation result is accepted, fast-code-review runs. When a check fails, Sol records one hypothesis and gives the same package owner only the new failure information.

In guarded, a human plan.md and already-given approval are recorded before implementation, and the Sol High and DeepSeek V4 Pro Max group runs in wire mode ordinary after the checks. strict is enabled only by a direct user request: code review uses Sol High, DeepSeek V4 Pro Max, and GLM 5.2 Max in wire mode strong, while strict pre-mortem remains a separate Sol and DeepSeek group. If an external reviewer is unavailable or returns incomplete evidence, the status is incomplete, not accepted.

Who Does What

  • Sol chooses the route, orders the work, and decides which questions go to the explorer. Sol resolves conflicts, checks the integrated state, and owns the record of repeated failures. Only Sol may change task boundaries.
  • The Luna explorer reads the repository and collects facts for nontrivial tasks. When the exact evidence is already known, it does not search again. deepseek-explorer is not automatic and is used only when explicitly requested by the user.
  • luna-worker owns one bounded package of changes. It reads the necessary context, changes only allowed files, may run focused checks, and returns a structured result. finish supplies authoritative check evidence. It cannot delegate further or change the task contract.
  • A reviewer receives a prepared packet, is read-only, and returns concrete findings. A finding produces needs_changes; a reviewer or provider failure produces incomplete.

Main Artifacts

  • .tasks/<slug>/plan.md is required for guarded and strict work; it explains the goal, assumptions, scope, criteria, and checks. Exact bounded fast work can use only its complete task contract.
  • .tasks/<slug>/task.json is for tools: it is the only task contract, with identity, revision, allowed files, checks, and flow_mode.
  • A baseline is the state of the allowed files before work begins. The exact diff and real changed-file list are computed from it.
  • A worker packet is the instructions for one worker: owner, boundaries, steps, source facts, and checks. A retry adds only the latest failure details; it does not replace the packet.
  • ofk.worker-result.v2 is the worker result format. Its claimed actual_changed_files field cannot replace the inventory computed from the baseline.
  • A reviewer packet contains the current task revision, the complete diff within its boundaries, check results, relevant contracts, browser evidence or NOT APPLICABLE, and remaining risks.

Boundary Guarantees And Recovery

Acceptance is blocked by identity mismatches, a start/finish contract digest mismatch, path or symlink escapes beyond the permitted boundaries, writes outside the allowlist, a false passed status, failed or timed-out declared checks, or an unapproved destructive operation, data-loss risk, or security violation. Unrelated new paths and HEAD movement are advisory telemetry. If a worker only gets its claimed file list wrong, the flow emits a warning but keeps the baseline-computed inventory as the source of truth.

After context compaction, a restart, or an interrupted continuation, reread the current plan and task/result state before the next write. Then reconcile Git status, the diff, the NUL-delimited changed-file inventory, and the active package. This is a one-time resume check, not a continuously running reconciliation service.

An owner override may explicitly waive a local review step, but the record must say SKIPPED_BY_OWNER or OWNER_OVERRIDE, never PASS. It does not waive system limits, actual tool state, or consent required for a dangerous operation.

The normalized task contract is hashed at start and the same digest is required at finish. Repository-root validation prefers the contract's worktree and falls back to the invocation directory only when no Git root is available. A Pi timeout terminates its whole process group and leaves prior accepted output untouched.

Config Topology

Layer What is tracked in Git How it is used on the host
Codex .codex/config.toml, .codex/AGENTS.md, .codex/agents/*.toml Merge these files into CODEX_HOME; the project does not load them automatically.
Pi .pi/settings.json, .pi/subagents.json, .pi/agents/, .pi/skills/ A trusted Pi project loads the package, runtime tuning, roles, and guidance.
Shared skills/ Shared scripts, schemas, validators, and guidance for Codex and Pi.

.codex/ is portable source material for CODEX_HOME, not project-local auto-loading configuration. .pi/ contains project settings, runtime tuning, roles, and native guidance. The shared skills/ directory remains the only source for scripts, schemas, and validators. Authentication data, provider keys, MCP endpoints, plugin state, sessions, memories, absolute paths, and private skills are not stored in the repository. See Codex integration and Pi integration.

Overall Flow

flowchart TD
    REQUEST["Request"] --> KIND{"Lookup or change?"}
    KIND -->|Lookup| ATOMIC{"One exact source?"}
    ATOMIC -->|Yes| ANSWER["Answer without changes"]
    ATOMIC -->|No| LOOKUP_EXPLORER["explorer\npaths, lines, excerpts"]
    LOOKUP_EXPLORER --> SYNTH["Sol composes the answer\nand checks only critical points"]
    SYNTH --> ANSWER
    KIND -->|Change or failure| DISCOVERY{"Nontrivial task?"}
    DISCOVERY -->|Yes: default prepass| CHANGE_EXPLORER["explorer\nbounded evidence packet"]
    CHANGE_EXPLORER --> PLAN{"Plan required?"}
    DISCOVERY -->|No: fast-safe| PLAN
    PLAN -->|Yes: guarded/strict| HUMANPLAN["Human plan\n.tasks/<slug>/plan.md"]
    PLAN -->|No: exact fast| TASK["One task JSON\n.tasks/<slug>/task.json"]
    HUMANPLAN --> PRECHECK{"Strict pre-mortem\nselected?"}
    PRECHECK -->|No| TASK
    PRECHECK -->|Yes| PREMORTEM["strict-premortem\nSol + DeepSeek"]
    PREMORTEM --> PREVERDICT{"Pre-mortem verdict"}
    PREVERDICT -->|BLOCK| STOP["Stop and resolve the blocker"]
    PREVERDICT -->|REVISE| PLAN
    PREVERDICT -->|PASS| TASK

    TASK --> MODE{"flow_mode"}
    MODE -->|fast| START["flow_stage start\ncontext + baseline + packet"]
    MODE -->|guarded| APPROVAL["Approval required"]
    MODE -->|strict| APPROVAL
    APPROVAL -->|Pending| WAIT["Wait for recorded approval"]
    APPROVAL -->|APPROVED| START
    WAIT --> APPROVAL

    START --> BATCH["Batch independent\nread-only operations"]
    BATCH --> DISPATCH["Dispatch luna-worker"]
    DISPATCH --> WORKER["Bounded package\nallowlist only"]
    WORKER --> RESULT["Worker result\nofk.worker-result.v2"]
    RESULT --> FINISH["flow_stage finish\ndigest + checks + diff + inventory + validation"]
    FINISH -->|Failure| DEBUG["One hypothesis\nretry with new data"]
    DEBUG --> WORKER
    FINISH -->|Success| INTEGRATE["Integration"]

    INTEGRATE --> REVIEW{"Review required?"}
    REVIEW -->|fast: Sol Low| FASTREVIEW["fast-code-review\nSol Low simple"]
    REVIEW -->|guarded: Sol + DeepSeek| GUARDED["guarded-code-review\nordinary"]
    REVIEW -->|strict: Sol + DeepSeek + GLM| STRICT["strict-code-review\nstrong"]
    FASTREVIEW --> GROUP
    GUARDED --> GROUP["Group validator"]
    STRICT --> GROUP
    GROUP -->|accepted| DONE
    GROUP -->|needs_changes| DISPOSITION{"Does the fix stay\nwithin approved scope?"}
    DISPOSITION -->|Yes| REMEDIATE["Fix and recheck"]
    DISPOSITION -->|No / owner override| DONE
    GROUP -->|incomplete| STRICTGATE{"Explicit strict --gate?"}
    STRICTGATE -->|Yes| STOP
    STRICTGATE -->|No: warning| DONE
    REMEDIATE --> INTEGRATE

    classDef artifact fill:#e8eef7,stroke:#41658a,color:#16202a;
    classDef control fill:#f4ead7,stroke:#9b6b22,color:#16202a;
    classDef worker fill:#e4f1e8,stroke:#39734a,color:#16202a;
    classDef review fill:#f4e5e5,stroke:#914348,color:#16202a;
    classDef stop fill:#f7dddd,stroke:#a13e3e,color:#16202a;
    class PLAN,TASK,START,RESULT,FINISH artifact;
    class KIND,ATOMIC,DISCOVERY,PRECHECK,PREVERDICT,MODE,APPROVAL,REVIEW,DISPOSITION,STRICTGATE control;
    class LOOKUP_EXPLORER,CHANGE_EXPLORER,BATCH,DISPATCH,WORKER,INTEGRATE,DEBUG,REMEDIATE worker;
    class PREMORTEM,FASTREVIEW,GUARDED,STRICT,GROUP review;
    class STOP stop;
Loading

Commands

Run commands from the repository root. For the normal flow:

python3 -B skills/writing-plans/scripts/flow_stage.py start \
  --contract .tasks/<slug>/task.json --package-id P1 --stage implement \
  --baseline .tasks/<slug>/baseline.json \
  --packet .tasks/<slug>/worker.P1.md \
  --telemetry .tasks/<slug>/stage.jsonl

python3 -B skills/writing-plans/scripts/flow_stage.py finish \
  --contract .tasks/<slug>/task.json --package-id P1 --stage implement \
  --baseline .tasks/<slug>/baseline.json \
  --diff .tasks/<slug>/current.diff \
  --actual-files0 .tasks/<slug>/actual-files0 \
  --result result.json --telemetry .tasks/<slug>/stage.jsonl \
  --emit .tasks/<slug>/accepted.json

After flow_stage.py finish succeeds, build the handoff with one structured command:

python3 skills/handoff/scripts/update_review_packet.py \
  --packet .tasks/<slug>/reviewer.task.md --structured \
  --contract .tasks/<slug>/task.json \
  --worker-result .tasks/<slug>/accepted.json \
  --diff .tasks/<slug>/current.diff

flow_stage.py finish runs the declared checks before producing the final diff, inventory, and accepted result. render_worker_packet.py and validate_worker_result.py are internal parts of flow_stage.py; the normal flow does not call them separately. skills/handoff/scripts/no_git_diff.py is used separately for explicitly declared UTF-8 files outside Git: it captures their baseline and publishes the exact diff and changed-file inventory. The handoff updater preserves document structure, fenced diffs, and unchanged sections, and replaces the file atomically.

Declared Checks

For a quick documentation-oriented check from the repository root:

python3 -B tests/test_pi_overlay.py
python3 -B tests/test_manifest.py
git diff --check

The full repository check set is:

PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s skills/writing-plans/scripts -p 'test_*.py' -v
PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s skills/handoff/scripts -p 'test_*.py' -v
PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s skills/code-reviewer/scripts -p 'test_*.py' -v
PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s skills/pi-worker/scripts -p 'test_*.py' -v
PYTHONDONTWRITEBYTECODE=1 python3 -B -m unittest discover -s tests -p 'test_*.py' -v
PYTHONDONTWRITEBYTECODE=1 python3 -B tests/test_manifest.py

These checks cover deterministic scripts, policy structure, and the manifest. They do not prove that a browser check or a real external Pi model invocation was run separately. The kit intentionally contains no lease service, deployment recovery system, or bidirectional host-state synchronization.

Detailed references: orchestration flow, code review, the Russian decision record, and the Russian README.

Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Aug 6, 2026

first spotted on the list

Best rank

#35

highest position reached

Appearances

1

times on the trending list

Quality score

95

out of 100

Momentum

20

trend strength indicator

Star velocity

0.09

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot

Not enough snapshots yet — check back soon.

Rank history

position on trending · lower is better

Not enough snapshots yet — check back soon.

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/Kacep91/orchestration-flow-kit" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="Kacep91/orchestration-flow-kit — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

Kacep91/orchestration-flow-kit stars badge
Markdown
[![Kacep91/orchestration-flow-kit](https://www.notionpulse.cc/api/badge/Kacep91/orchestration-flow-kit.svg)](https://www.notionpulse.cc/repo/Kacep91/orchestration-flow-kit)
HTML
<a href="https://www.notionpulse.cc/repo/Kacep91/orchestration-flow-kit"><img src="https://www.notionpulse.cc/api/badge/Kacep91/orchestration-flow-kit.svg" alt="Kacep91/orchestration-flow-kit stars badge" /></a>

Repository of the Day

#35 Repository of the Day

Repository of the Week

#35 Repository of the Week

Repository of the Month

#35 Repository of the Month