Spec authoring path (ByteOr OSS)
Synced from repo docs
This page is synced from docs/guides/spec-authoring.md via docs/public-docs.json. Edit the owning repo source instead of this generated copy. GitHub source: https://github.com/byteor-systems/byteor/blob/master/docs/guides/spec-authoring.md
This guide records the supported v1 path from author intent to a concrete PipelineSpecV1.
Decision
- OSS has one active public source authoring path.
PipelinePlanV2is the source contract for full SingleRing and LaneGraph parity.
- Lowering lives in
byteor-pipeline-lower.- Input: a source authoring document plus explicit
ExecutionTargetV1. - Output:
PipelineSpecV1::{SingleRing,LaneGraph}.
- Input: a source authoring document plus explicit
- Direct spec authoring remains available for narrow cases where the caller already knows the
exact canonical shape.
SingleRingBuilderandsingle_ring_chain(...)still producePipelineSpecV1::SingleRing(...).
- Lowering remains explicit.
- SingleRing lowering is direct.
- LaneGraph lowering is direct.
Why the source contract changed
- SingleRing is intentionally narrow: single producer, dedicated stage threads, explicit dependencies, and small validation-aligned limits.
- LaneGraph is the whole-plant topology surface for fanout, merge, bridge wiring, and role-based execution.
- The earlier graph-shaped plan was good enough to bootstrap dual-target lowering, but it could not represent full SingleRing dependency-DAG semantics or LaneGraph runtime policy cleanly.
PipelinePlanV2keeps shared catalog metadata in one envelope while allowing target-specific payloads where the execution models genuinely differ.
Practical guidance
- Use
PipelinePlanV2plusbyteor-pipeline-lower::lower_v2(...)when you want the intended full-parity source authoring path. PipelinePlanV2::SingleRing(...)carries explicit dependency-DAG semantics.PipelinePlanV2::LaneGraph(...)carries explicit topology plus runtime policy such ason_full.- Use
SingleRingBuilderorsingle_ring_chain(...)when the runtime shape is already explicitly one sequenced ring and you do not need a model-neutral planning document.
Plan-level versus lowering-level settings
PipelinePlanV2::SingleRing(...)owns the explicit dependency DAG and SingleRing execution constraints.PipelinePlanV2::LaneGraph(...)owns topology, lane intents, andon_full.
Support matrix
PipelineSpecV1::SingleRing- Supports SP execution with
producer=singleandscheduling=dedicated. - Rejects v1 non-goals such as
producer=mpmcandscheduling=work_queue. PipelinePlanV2lowering can encode explicit dependency DAGs within the current validated v1 limits.
- Supports SP execution with
PipelineSpecV1::LaneGraph- Supports whole-plant graphs with endpoints, lanes, and roles.
- Supports SP execution and explicit role-runner execution where the executor implements the validated shape.
PipelinePlanV2carries the LaneGraph source semantics directly, includingon_full.
Auto-fusion posture
Automatic lowering-time fusion is intentionally out of scope for the v1 contract.
- If you want fused behavior in v1, model it explicitly as a stage operation or stage resolver identity.
- Future lowering passes can be added in
byteor-pipeline-lower, but they are not part of the v1 promise today.
Stage identity note
This guide is about how a spec gets produced, not how a stage implementation is resolved.
- SingleRing stage behavior is represented via
StageOpV1. - Resolver-backed stage identities are still cold-path startup decisions, not hot-path dynamic lookups.