Factory docs, home
Page navigation

Pre-release documentation. Proposed designs are labelled in the page; acceptance evidence is maintained in the build review. Local paths appear as placeholders. Current state: Build review.

Historical qualification: Historical source 7cf4b26e: Core 22/22 and Dashboard 26/26 focused checks passed. Scoped evidence is recorded in the historical local qualification record. Historical source 7cf4b26e passed the 3,286/3,286 full checks and all 36 installed families. Independent bounded local evidence acceptance passed; exact-final-head CI is recorded separately from this frozen local proof.

Candidate only: author installed declaration/import, individual-stage and concert checks passed for the bounded synthetic profile. Historical source 7cf4b26e passed the 3,286/3,286 full checks and all 36 installed families. Independent bounded local evidence acceptance passed; exact-final-head CI is recorded separately from this frozen local proof. This private installed proof establishes no live provider, publication, release or customer outcome.

Supply existing owners

Use Node 26.8.1 or later, ESM and caller-owned private local storage. The current native confined-execution evidence is limited to macOS 27 arm64. Git, native SQLite, compatible runtime/resource pins and the existing module storage/platform requirements still apply. TypeScript applications supply compatible Node declarations. No live model, credential or default commissioning policy is supplied.

Construct genuine Research APIs, ProductGuidance and Knowledge, and qualified semantic/Marketing ports against your own records, identities, clocks, permissions and actual physical exclusion. Supply existing Delivery paths and the native Product registration already recorded in that journal. Supply the original worker program/input byte snapshots and their matching implementation job when that stage is prepared, and the exact already bound Repository identity for sealing. Neither the wrapper nor a caller-written success callback can replace native authority or evidence.

The candidate recipe is passive on import:

import {
  runFactoryWorkflow,
  parseFactoryWorkflowRequest,
  factoryContentDigest,
} from 'software-factory/factory-workflow';

export function runPreparedPrefix(originalRequest, nativeOwners, signal) {
  const request = parseFactoryWorkflowRequest(originalRequest);
  return runFactoryWorkflow(request, nativeOwners, signal);
}

export function originalResearchDigest(semanticResult) {
  return factoryContentDigest({ ...semanticResult, replayed: false });
}

The application supplies the function arguments. Keep the complete canonical request and exact source snapshots in your private caller records before contact. Parsing the whole supplied prefix refuses malformed present suffixes before starting its earlier native stages.

Prepare and resume explicit prefixes

  1. Retain protocol:"sf-factory-workflow/1", one productId and every top-level field: research, researchDigest, guidance, advice, selectedPlan, bind, grant, implementation, integration, marketing. Use null for unprepared nullable inputs. research has originals and semantic; originals retain exact producer/store identities and native collection requests.
  2. Start the native collection prefix. Use the owners' evidence/cite/verify APIs to prepare exact semantic collection and quote bindings. Retain those collection requests unchanged. Unknown exposure stops; do not rename the request to recollect it.
  3. Obtain the actual semantic result and compute originalResearchDigest. Commission the exact prospective Guidance v3 decision through your owner record/fence, including that digest in supporting evidence. A semantic output remains review-required and supplies no feature admission.
  4. Prepare Knowledge advice with the resulting Guidance pin, current native Research quote dependencies, originally reviewed lessons and explicit alternatives. Retain the exact owner-selected alternative ID in selectedPlan; it must agree with the owner's decision. The alternative contains the native plan. Supply explicit bind/grant inputs together for the same Product and grant; advice creates no authority.
  5. After the native Slice is frozen, prepare its exact implementation job, original snapshot bytes, runtime/profile, one-Attempt Budget and deadline. Preserve job/command/Run/dispatch IDs. The native worker proposal, seal and independent proof are carried forward under their existing owners. Supply integration:{action:{id,occurrence},dispatchId} using the original Product/Slice Action and original occurrence; never derive a new occurrence from uncertainty.
  6. Prepare Marketing only from the supported native local assessment. Each observational quantity must match its measured metric, value, unit and population. Its source content digest binds {productId,sliceRef,candidate,proof,assessment} through factoryContentDigest. Retain the original brief/job and qualified Marketing ports. Unsupported availability, release or customer-benefit claims cannot stand in for these facts.

After each requires-input, retain completed native requests and results, append only the newly prepared suffix, and call again. Native historical replay and direct current support checks are separate. Current invalidation or permission withdrawal stops the next effect even when an original receipt exists.

Inspect stopped work

Read outcome, stoppedAt, reason, effect, recovery, stages and currentSupport. requires-input names a preparation boundary; stage-refused records a native refusal; cancelled asks the caller to inspect native cleanup; uncertain with unknown effect preserves the possibility of earlier durable writes or contact. Inspect original module owners and repeat their exact retained inputs to settle uncertainty. The wrapper schedules no retries.

An unfinished D5 integration is checked before any other stage, including an incomplete Marketing prefix. Supply its exact original Action occurrence/dispatch to recover; a changed identity conflicts. A still-unknown original stops all earlier-stage replay/contact. Missing proof witness remains charged rather than recollecting an orphan Verdict.

The profile bounds the request to 1 MiB/depth32, thirteen stage kinds, sixteen returned stage records and a 2 MiB whole JSON result bound (including wrapper overhead), with the tighter 1 MiB limit on each canonical native observation. It permits four Research jobs, sixteen sources/citations, eight Knowledge alternatives/sixteen rules and sixteen Marketing facts/eight blocks. Every tighter native bound still applies; preserve fixed native allowances and deadlines. A caller AbortSignal is cooperative, and numerical bounds are not a universal elapsed-time guarantee for injected ports.

The exact stage and authority reference owns the complete contract. Qualification requires an actual external consumer using only public entries, fresh prepared-prefix completion, exact completed replay with no additional contacts/launches/allowance, substituted collaborators and native failure/unknown/recovery controls. Historical source 7cf4b26e passed the 3,286/3,286 full checks and all 36 installed families. Independent bounded local evidence acceptance passed; exact-final-head CI is recorded separately from this frozen local proof.

Source: docs/how-to/adopt-factory-workflow.md