#CLI experience contract
Jig's CLI serves agency through power under control. People must be able to understand the task, observe progress, interpret the outcome, and take the next safe action without a maintainer translating internal machinery. This specification governs every public Jig command, help screen, approval, notice, diagnostic, progress display, and installed-launcher failure. It makes usable control an observable requirement; project policy retains authority over admission and lifecycle.
#Find the relevant requirement
Project policy owns admission and execution authority. Web display owns browser access and transport requirements.
#Required experience
#Installation compatibility
Known version incompatibility must identify the required and running Jig versions before project code evaluates. Recovery for packaged installations gives bun/npm installation commands for the exact required version. Contributor rebuild guidance requires the executable’s own Jig source installation, independently of the project directory. Unknown evaluation failures must not be reclassified as version incompatibility.
Contributor launchers refuse source or generated output that differs from the successful build. They retain top-level help and version reporting for diagnosis. Development checks cannot interrupt an already-admitted owner continuation. These checks do not contact a registry or update software automatically.
#Contract import
jig import-contract <jig:name|descriptor.json|npm:package> <new-directory> is explicit offline authoring.
It captures and validates one standalone channel descriptor, or an invocation descriptor and its exact channel closure.
The limits are 64 agreements, 256 KiB per file, and 1 MiB of captured bytes.
It preserves bytes and relative paths, then publishes only to an absent destination whose parent already exists.
An exact npm: selector searches node_modules upward from the destination parent for the nearest installed package.
That package must contain FLOW.contract.json. A missing descriptor never causes fallback to another installation.
Direct descriptor paths remain supported.
The importer may resolve the selected source root through an installed-package link, but rejects links within the selected closure.
It does not evaluate package code, fetch dependencies, acquire execution
authority or approve a Run. Cancellation before publication leaves no destination.
Completed publication is not undone. Process loss may leave an unpublished
.jig-contract-* staging directory, not a successfully imported bundle.
jig import-contract --list lists the installed standard agreements and their
purposes without project loading or host acquisition. Exact jig: selectors
cover Agent Run, Project Command, Project Evaluation, HTTP Request, Run Checkpoint, Child Checkpoint, Finite ACP,
ACP public updates and reporting. They copy the bundled canonical descriptor,
referenced agreements and license. Unsupported names fail without a fallback.
The installed catalog checks each exact supported digest. A copied standard agreement is a project-owned snapshot, never a runtime resolver, implementation selection or authority grant. Reporting retains its MPL-2.0 license.
#Collaborator declaration
jig add-use <package-path> <slot> and jig add-use <package-path> <slot>=<source> [--optional] declare one collaborator in an existing Flow.
Run it from the Jig project root with an exact project-relative code package directory.
The package must have one code entrypoint and a regular, standalone FLOW.meta.json.
Jig refuses protected, ambiguous, linked, and nested-project destinations.
Use a new LocalName for the slot.
A bare slot name inserts an empty object at uses.<slot>. It declares an uncontracted slot for explicit target selection.
With =<source>, select an identified single-operation invocation agreement.
Add --optional after slot=source to write "optional": true in the named requirement.
Jig rejects the flag on a bare slot before editing files.
A failed source selection leaves the slot undeclared. Jig refuses agreements without portable identity.
For the named form without --optional, the refusal points to the bare slot form.
Sources follow contract import. Jig reads descriptor paths relative to the project root.
Jig searches from the target slot directory's parent for the nearest installed npm: source.
Jig refuses agreements in protected Jig state and bundles with protected package paths.
When a source is supplied, Jig publishes the complete bundle without replacement under contracts/<slot>.
It then replaces the sidecar with an entry that references the copied descriptor.
An existing slot causes refusal in either form. An existing contract destination causes refusal when copying an agreement.
All forms preserve the other metadata values and their original text.
The command evaluates no project code, installs no dependencies, and changes no Bindings, locks, or approvals.
Edit the caller and configure the target separately. Use jig check to check the working composition.
Existing provider selection rules apply. Check diagnostics identify unresolved slots.
Use ordinary jig review to consider the proposed revision for approval.
Interruption before publication removes staged files when possible.
If the bundle is published and the sidecar edit fails, Jig leaves the bundle and staging information for recovery.
Process loss can leave .jig-add-use-stage in the project root.
Once the edit has stopped, use its intent.json, if present, to inspect the sidecar and any listed bundle.
Keep the bundle if the sidecar refers to it. If publication stopped before the sidecar edit, finish the declaration in source or remove the abandoned bundle. Remove the staging directory after resolving the edit.
#Composition check
jig check [--diff] [--json] checks the working project's complete configuration, including disconnected targets.
It uses the same contained declaration evaluator and linker as working-tree topology inspection.
Declared npm Flows must already be installed. Manifest and lock agreement remains unchecked.
Plain jig check works without a local approval.
The command does not resolve or install dependencies, generate contracts, prepare recipes, or invoke a method or provider. It does not start review, write project state, or update a lock or approval. Success establishes linked working configuration only.
--diff compares that capture to the last locally approved topology through the read-only approved reader.
Jig reads each basis independently.
An absent approval prevents comparison, even when a project lock exists.
The comparison identifies changed targets by selector and slots by caller selector and slot name. It reports additions, removals, and changed selections, including slots of added and removed targets. Settings compare as structural JSON for targets present on both sides. Only changed settings selectors appear. The entrypoint comparison uses its normalized target selector and excludes invocation arguments.
The plain diff adds context when a caller keeps its package and redirects an existing slot to a new Binding.
The original Binding must remain configured, and both Bindings must select the original Flow package.
It shows the changed caller and slot, other caller slots that still select the original Binding, and the original selector.
It includes the direct Flow selector when both configurations expose it for that package.
Ordinary review and --details show the same context from their retained and proposed configurations.
Both commands show context for at most eight changed slots in selector and slot order. Each original Binding shows at most eight retained caller slots in that order. The summary counts omitted context, and review still shows every changed policy record. These rows establish configured selections only. Approval covers the complete exact proposal.
Both projections expose native resource kinds. Grant policy, client identity, and attachment maps remain outside this comparison. Source equality, method behavior, launch readiness, and preserved authority require separate evidence.
On success, --json emits one object with basis: "working-tree" and status: "linked".
With --diff, the object also contains diff with the following fields. Arrays contain only changes.
Exit 0 means the requested check or comparison completed, including a comparison that found changes.
Exit 1 means invalid configuration or an absent baseline for --diff.
An absent baseline reports JIG_CHECK_NO_APPROVAL.
Exit 2 means invalid usage, an unavailable check or baseline, or interruption.
Failures emit a bounded diagnostic on stderr and no success record.
#Flow type declarations
jig types <package-path> selects one exact project-relative package directory containing a FLOW.ts entrypoint.
Jig captures and validates that package through the ordinary source boundary.
It uses portable FLOW.meta.json slot declarations and their referenced package-local contract bundles.
It also uses the package's validated FLOW.contract.json and settings.schema.json when present.
It emits one deterministic TypeScript declaration to stdout for unchanged inputs. It acquires no execution host, evaluates no source, installs no dependencies, and writes no project files or approval. Validation failures report a diagnostic without emitting a declaration.
The declaration exports RunContext and FlowResult using the public FLOW SDK types.
The package's single-operation descriptor supplies a bounded projection of RunContext.input and the FlowResult outcome and output.
Without that descriptor, RunContext.input and FlowResult retain the SDK types.
The SDK's root result artifact field remains available.
Declared slot names constrain call, and their contracts supply a bounded payload projection.
Settings project direct property declarations and required names at the schema root.
Settings retain the broad SDK type without projected fields.
Other Run context members retain their SDK types.
Uncontracted declared slots retain the broad SDK payloads.
The authoring guide owns the projection limits and operator workflow.
#Binding type declarations
jig types --project uses the installed, contained declaration evaluator and the working-tree linker used by jig check.
It captures jig.ts, selected Binding declarations and their local imports, and selected grant definitions.
It reads configured local packages and selected npm Flow dependencies from the existing installation.
It requires a linkable working configuration on a host that supports declaration evaluation.
It requires no prior approval.
Jig emits one deterministic .d.ts module to stdout, limited to 256 KiB.
The module exports BindingInput for ordinary defineBinding inputs, keyed by canonical package values.
Local package paths omit ./, and dependency selections use npm:<package>.
Each branch uses the linked package's slot names and projects fields from its validated settings schema.
The slot map is optional, and each listed slot has the SDK selection type.
Settings are optional unless the schema root lists required property names. Settings with no projected fields retain the SDK's broad object type.
Only project declaration code runs, under the existing evaluator's containment. Jig uses no resolution network access, installs no dependencies, and starts no Flows. It reads no approval and writes no project files, locks, or approvals. A failed capture, evaluation, link, or size check emits no declaration. See the Binding authoring workflow for compiler requirements and limits.
#Progress and observation
The optional reporting profile shares stderr presentation
with host progress and diagnostics. Resolve entrypoint/operator arguments first:
effective --receive retains ordinary stdout channel behavior, --json disables
automatic Flow observation, and operator-only --updates off disables automatic
selection/hints without cancelling explicit reception. Otherwise stderr
can observe one exact optional canonical port, using plain text when redirected.
Stdout keeps its existing envelope.
Application notices retain attribution and bypass trusted heading/success styling.
Activities are transient owned state, cleared on every end; counts and EOF never
establish success. Accepted notice jobs survive ordinary source retirement while
obsolete repaints are superseded. Host stopping/terminal presentation fences late
Flow updates. Exact bounds, separate allocation policy and output failure remain
governed by that profile and channels.
#Display selection
Operator-only --display auto|plain|tui|web controls Run presentation. Auto
selects TUI when stdin, stdout and stderr are terminals, raw input is available,
and TERM is not dumb. Missing native support falls back once to ordinary output;
explicit TUI instead refuses unavailable native support before execution.
Otherwise auto uses a bounded noninteractive inline region on suitable stderr;
it borrows no input and preserves scrollback. Ordinary output uses nonanimated
summaries with plain, NO_COLOR, TERM=dumb or redirected stderr. TUI requires terminal stdin
and stderr, independently of stdout when explicitly selected; otherwise explain
the plain fallback once. It owns one alternate screen only after trusted root
execution admission crosses the dispatch boundary. Initial review, input, file,
output and runtime prerequisite failures remain ordinary diagnostics. Entry does
not depend on application views or updates. NO_COLOR keeps TUI controls without
color. JSON and effective reception retain their exact output and disable
automatic Flow observation and TUI selection. No project entrypoint can choose
display mode.
Jig adapts accepted observations to readonly semantic snapshots from
@jigging/display-model. The independent @jigging/display-tui and
@jigging/display-web packages own presentation and local navigation. Jig retains
admission, actual observed call attribution, captured evidence, terminal IO and
restoration, transport, output accounting and Run lifecycle. A renderer receives
bounded data and excerpt access, never host execution or filesystem authority.
Ordinary Jig installation includes its presentation; Flow declarations remain
display-neutral.
#Browser activation
Explicit web requires terminal stderr, independently of stdin, stdout, TERM and color support. Otherwise use ordinary plain presentation without exposing a private launch link in redirected output. It prepares its local listener before execution, then advertises a browser link only after trusted root dispatch and a readable initial snapshot. It never automatically launches a browser. JSON and effective reception take precedence before preparing a listener. Redirected Run stdout retains exact final JSON while terminal stderr can provide web inspection. The web display contract owns local access, transport bounds, browser navigation and presentation lifetime.
#Project exploration
jig explore [target] opens the approved application's configuration before execution.
An optional exact target selects the initial workflow.
--timeout DURATION and --verification cached|strict|fast retain their ordinary Run meanings.
The command requires terminal stderr for its private link and never opens a browser automatically.
It acquires no execution owner merely to display the project.
The browser presents a workflow chooser, configured map, declared input contract, and explicit Run action.
It distinguishes approved configuration from live observations, without synthetic calls or elapsed time.
An unreviewed project explains how to use jig review.
Selecting a workflow or changing its JSON draft does not start a Run.
Launch validates the supplied input and rechecks the exact approved selection. Each invocation uses the ordinary installed Run command and its existing authority and cleanup boundaries. One owned Run may prepare or execute at a time. The ordinary read-only inspector opens through an explicit link while the explorer retains the draft. Browser launch cannot supply arbitrary command arguments, filesystem paths, grants, or review decisions.
Input or selection refusal explains the required correction without implying execution. A lost response leaves submission unresolved until status establishes its disposition. Refresh and reconnection never resubmit work. Unknown execution prevents another launch in that session. Run settlement does not establish application success.
Close explorer and terminal interruption stop active owned work through ordinary cancellation and wait for cleanup. The browser's close acknowledgment means closure was requested, not that cleanup succeeded. The terminal retains actionable failure and cleanup evidence. Tab unload alone does not cancel work. Ordinary Run inspector Close remains presentation-only.
The web display contract owns transport, capabilities, supported inputs, and fixed exploration allowances.
#Host and application observations
The shell presents host execution, cleanup, delivery and complete known safe causes separately from attributed domain reports. Execution is the actual observed invocation tree; application views compose literal reports, facts, measured progress and typed collections. Calls returning, reported 100%, EOF and view status never imply domain success. Auto/plain commit complete errors and warnings to scrollback. Explicit TUI retains them in bounded Activity and attention, with full causes one action away from every view; leaving restores the screen and commits complete retained essential causes before final stdout. Sticky attention and visible incompleteness survive view retirement. Narrow layouts shrink workspace before hiding the cause and disclose clipping.
#Workspace navigation
The explicit workspace presents root-publisher application pages first. Inspector contains host Execution, Activity, Delivered files and attributed child views. Publisher identity, rather than an authored title, determines the group. A Flow invoked directly owns the root page even if it is also used as a child elsewhere.
For live browser inspection, an Application map may show the Run's admitted composition beside the actual Execution tree. Available connections and exactly matched observations remain distinct under the web display contract. Application pages remain primary.
Saved inspection has exactly one Recorded result, Captured files and Diagnostics destination, supplied by the recorded host adapter. Author-supplied names never select host navigation. A navigation rail is available at 150 columns and 24 rows. Smaller layouts retain the current-view trail.
v opens a grouped chooser that reveals the selected destination within the
viewport. Tab/Shift-Tab cycle the same destinations. View selection preserves
viewer-local filters, sorting and stable record identity.
Application pages compose the supplied summary, sections, reports, facts and progress in order. Reports wrap and facts show their labels and values in place. Reading them does not require expanding an inspector record. Collections use aligned columns, showing as many declared fields as fit. Hidden fields and viewport overflow remain disclosed and every retained field stays reachable through expansion. Keyboard selection, filtering, sorting and typed references continue to work on the composed page.
Inspection lists use dense rows with at most the first three fields. Automatic context requires at least 118 columns and 24 rows and meaningful additional selected content. On an application page it opens for selected collection rows or artifact evidence. Ordinary page blocks do not automatically allocate a second pane.
Generic lifecycle metadata alone never splits the Execution view. Local action feedback remains visible without opening a duplicate pane and without replacing sticky attention. Empty-detail requests explain that fact. Report clipping accounts for prefixes, display cells and encoded bytes.
The complete retained source stays reachable through expansion.
Selection alone never navigates a record/call reference. A selected entry with exactly one distinct typed artifact reference, considering all cells and supplied details, may peek its available immutable text read-only. Entries with multiple distinct references require explicit selection; field labels and project names cannot choose one. Delivered files remains reachable without an application view or automatic update reception. Explicit file selection shows content first, with size, provenance, availability and clipping as secondary metadata. Empty, non-text, unavailable and clipped text have distinct states. Expansion reuses the retained preview, adds space, scrolling and literal search of the retained excerpt, and never claims to search uncaptured bytes. Selection and capture generations fence late completion; busy selection retries only the latest identity.
#Evidence hierarchy
The hierarchy separates list identity and brief observations, selected additional context, and explicitly expanded evidence or invocation identity. Call details retain readable UTC observation time; reviewed slot and original operation identity belong to explicit expansion. Wide Execution rows may show common-scale intervals from first to latest actual observation. Invalid or reversed clocks have no span. These intervals are observations, never inferred execution duration, progress, commands, results or domain verdicts.
#Terminal appearance
Navigation, headings, declared labels, typed values, measured counts and host states have distinct foreground roles. Active calls use an accent, returned calls remain secondary, failed calls use red and uncertain/cancel-requested calls use amber, with explicit state words retained. Returned calls never receive a green application-success verdict. Escaped recorded values may use lexical syntax colors without interpreting their words as status or commands. Color-free presentation preserves every distinction through wording and hierarchy. Large empty panes must not exhaust the encoded frame budget or hide exit controls; actual content overflow still discloses clipping.
#Navigation and inspection lifetime
Narrow layouts keep collapsed rows
and Enter opens full detail. Returned tree branches collapse by default; active,
failed and uncertain branches remain visible, with operator choices retained.
Activity orders recent reports first and folds informational setup history into
one expandable entry. It does not present settled work as current activity.
d opens attributed diagnostic reports from every view. Unknown diagnostic
severity remains unknown; text content never determines severity.
References can resolve current same-publisher
records, actual own calls and verified delivered files. Previews use bounded
immutable capture, never mutable destination reads. Escape dismisses local help,
filter, view/reference selection, attention, preview or detail first. Explicit typed
record/call jumps retain at most 16 return origins with surface, stable record and
scroll identity. Escape then returns through that history, skipping retired
intermediate destinations in one action and repairing removed rows to a preceding
survivor. If all origins retired, it remains in the current valid view with action
feedback. Return navigation checks any
explicit enclosing lifetime before mutation. Tab and chooser destination selection
clear return history. Escape at the top level stays in the TUI. q or keyboard
Ctrl-D asks “Leave the TUI?” with Stay selected; arrows or Tab choose and Enter
confirms, while Escape stays. Repeated q never confirms. Live confirmation explains
that work continues in the terminal; settled confirmation closes read-only
inspection. Cancellation stays available while the prompt is open, and changes
to observed content cannot dismiss or approve it. Confirmed live exit or actual
input EOF restores input and continues inline, without re-entering later. Live Ctrl-C uses
existing cancellation and cleanup. After all execution, cleanup and delivery
settle, an inspector still open shows literal settled facts and read-only results;
if the operator has not navigated, it selects the root publisher's landing view
or first retained root view and its first row when present.
q or keyboard Ctrl-C then asks before closing presentation, without changing the admitted outcome.
No Flow or channel remains alive for inspection. Inspection has no built-in idle
or absolute expiry; it remains open until the operator leaves, input/output fails
or an external interruption closes it. Explicit inherited enclosing command
constraints still apply, and no input or repaint extends them. Eligible interactive
effective TUI commands omit the default enclosing presentation lifetime,
while setup, Run execution, cancellation and cleanup keep their own bounds.
Execution elapsed time freezes at settlement. An expiring explicit presentation
constraint leaves live execution running through its ordinary owner; it never
extends an execution timer. Immutable delivery inspection is selected before
capture/publication even though screen entry waits for dispatch. Every exit releases preview,
input and presentation owners. Auto/plain emit one selected root summary with
ended/incomplete context and exit promptly. Prefer the current root landing view,
otherwise its first retained view in accepted order. Never resurrect retired
views or repeat an unchanged summary merely because observation ended.
#Automatic output
The automatic inline region is a compact work projection, not a reduced interactive workspace. Show target, observed stage/time, the attributed root summary, up to four actual root branches and current activities. Call joins use publisher-scoped operation IDs only; activities without an association remain attributed and visible. Counts are measured reports, not inferred completion percentages. Reserve attention before ordinary work rows, disclose omitted branches/activities and retain a brief selected context after leaving TUI. Do not dump collection row details or every report here. Plain scrollback prints the initial root summary once, meaningful activity transitions, notices and causes, then a changed root summary at settlement. Other views remain available in TUI/web. Final evidence remains independent of optional updates.
#Experience acceptance
-
Task first. Identify the requested task and relevant project or target. Name stages in ordinary language. Internal lifecycle and implementation terms appear only when needed to understand or repair a problem.
-
Stable progress. Acquisition distinguishes Jig runtime verification, preparing operator resource configuration, and opening project state with recovery checks. Native runtime verification occurs only when a target selects an ACP resource; capturing configuration must not imply that a client was verified. These labels describe actual work, not a generic prerequisites wait. Review reports project-source capture, per-package dependency-input capture, dependency preparation or approved reuse, and final recipe/review retention separately. Active elapsed time belongs to the current stage. In animated terminals, completed timed stages retain their duration as secondary text. Ordinary acquisition has one active line with elapsed time; running work can use the bounded inline dashboard above. Explicit TUI retains stages inside its Activity view. Preserve completed stages; never mark a failed or merely departed stage complete. Update waiting time in place, not by appending unchanged messages. Report the known wait reason; never invent percentages, estimated completion times, or internal Flow stages. Finish or suspend the active line before prompts, notices, streamed diagnostics, or results. Await queued progress output before reading any answer so the answer remains beside its question without intervening status output.
-
Consistent visual hierarchy. Use bold task/section headings and final outcomes, green completion, amber warnings, and red failures. Text must carry every meaning independently of color or symbols. Use foreground colors without background fills; provide syntax palettes for light and dark terminals. Actual action commands and examples use standalone
$ jig ...(orcd) lines when enabled; the prompt prefix remains in plain output. Command names use bold syntax accents, flags, placeholders and argument literals have distinct accents, and punctuation is secondary. Help and host command references omit Markdown backticks. Commands never wrap, shell quoting remains exact, and examples with placeholders are labelled templates. Recognize commands only in host prose, never application data. Target readiness retains explicit words, green for ready and amber for unavailable; readiness is not execution. Narrow terminals must retain complete consent and recovery information; only the transient progress label may shorten to fit. Separate major terminal sections with a blank line, a restrained horizontal rule, and a bold heading; keep individual records and their fields grouped beneath that heading. Plain terminal mode preserves these boundaries without escape sequences. Use the terminal's gray for secondary metadata: hashes, diagnostic codes, categories, change counts, completed-stage text, elapsed time, and optional detail notes, executable paths, and unchanged context. Changed-record labels, including their identifiers, use bold amber to draw attention to changed work. Omit review categories with no changes from the ordinary summary. ACP selections are omitted only when matching ready targets prove unchanged runtime identity under identical recipient routes. Identical request, recipe and observation identities provide that proof directly; changed source requires both retained identities to match recomputation under the current authenticated environment. New, changed or unknown environments keep current selections visible;--detailsalways shows them. This presentation comparison neither approves nor authorizes execution. A combined mismatch cannot identify which environment component changed. Keep permission consequences, changed policy values, failures, and next actions at normal or emphasized contrast. Gray never hides content or substitutes for labels, spacing, or explicit status words. A heading must never be less prominent than the details it introduces. Expanded unavailable-client labels use bold amber above normal-contrast setup instructions; compact names-only summaries remain secondary gray. Render structured human values as YAML using the shared standard serializer: mappings, sequences, empty containers and multiline block strings convey types without(object),(list)or(text)labels. Quote strings and keys to preserve exact JSON types and safe text. Preserve whitespace inside block strings, including blank lines; never wrap or interpret their contents as status or headings. Highlight keys, strings, numbers, and literals without changing their escaped bytes. Keep punctuation neutral and hashes secondary.JIG_THEME=one-dark(default),one-light, ormacchiatoselects syntax accents for the terminal background; unknown values fall back to One Dark. Use truecolor whenCOLORTERM=truecoloror24bit, approximate accents forTERMcontaining256color, and basic terminal colors otherwise. Theme selection is a shell preference available before project loading, not ajig.tsauthoring or approval setting. Plain output ignores themes. -
Readable failures. Order the failure summary, relevant location, known explanation/recovery, and diagnostic code. Codes support search and software. They must not replace the explanation. Name known missing prerequisites.
Unknown causes stay unknown, with a bounded diagnostic step rather than a guessed repair or raw exception. Explicitly identify absent diagnostic text and an unretained cause. Never direct users to inspect nonexistent evidence. Show one failure explanation, retaining additional details without repeating the raw status/code/message as a separate result block.
Explain whether work started and whether effects or cleanup are uncertain whenever that affects recovery. Preserve value-free expected/received JSON type facts for schema type errors across planning and execution boundaries. Never echo rejected values or arbitrary worker messages to manufacture a more detailed cause. Schema authoring failures identify the required FLOW Schema/0 root identifier when
$schemais missing or wrong.Invalid JSON, unsupported keywords, references and exceeded limits give bounded corrections and the relevant FLOW specification, without echoing rejected values or compiler exceptions. A stale dependency lock identifies the mismatched manifest and field when known, and the authored lock relative to the reviewed project. Give a shell-safe
bun install --lockfile-only --ignore-scriptscommand selecting the verified lock directory. Explain where to run it. Direct the user to inspect the changed lock before reviewing again. Unsafe terminal characters in the directory require navigation guidance instead of a pasteable path.Explain that
--allow-resolution-networkresolves missing locks and does not update supplied locks. Never silently replace an authored lock. Missing or invalid files in the installed Jig runtime have a closed installation-repair explanation. Raw paths and filesystem exceptions remain private, and a later revalidation failure must not imply that no work started. -
Useful next actions. Successful setup and review identify the next supported action. Failures give a verified command, specific correction, or relevant documentation when available. Never invent commands or recommend bypassing safeguards. Commands containing user values must be shell-safe.
-
Explicit authority. Show consequential permission scope before effects. A supplied grant is acknowledged, not requested again. Dependency resolution notices retain public/private-network access, pre-validation effects, irreversibility, possible rejection, and review-only scope. Emit one notice per review before its first network-enabled dependency preparation, covering all packages; retain per-package progress without repeating the warning. Approval shows every changed public policy record;
--detailsincludes unchanged policy. Show public changes as contextual field diffs with explicit-previous and+proposed markers, preserving exact values and container types. Omit unchanged fields in the ordinary summary; additions/removals retain the complete affected value.--detailsuses the same sectioned diff view, including unchanged records and unchanged fields as context. Change counts and record labels belong outside YAML values. Never dump change bookkeeping or wrap the review incurrent/proposedsnapshots. A detailed changed record must retain enough context to reconstruct both complete public values from its diff. When retained execution or a selected child changes but public target fields do not, identify the changed execution environment, prepared files, or child selection and explain what approval authorizes. Unchanged source, dependencies, settings and permission reassurance appears only in--details. A combined environment fingerprint does not identify individual old components; disclose this limitation rather than inventing a component diff. Never substitute an opaque "retained identity" label or identical before/after blocks for an explanation. Object key order alone is not a change; array order remains meaningful. Presentation must not hide policy behind truncation, decoration, or a pager. A known mismatch between the current execution environment and the approved recipe must requestjig review, not become a generic execution failure. Say no Flow started only when the host established a pre-execution refusal. Agent selection uses ordinary Flow targets and explicit resource grants; see Agent Run. Missing selections identify the unresolved target or resource. Review does not install an Agent, invent a Binding, or choose a client on the operator's behalf. -
Honest completion. Command success follows required cleanup. Execution completion, application outcome, delivery, and cleanup remain separate. After a confirmed terminal and project closure, every display mode retires delivery authority through its authenticated acknowledgment and spent-channel completion before command success, including record-only runs. Plain and machine output request no inspection excerpts. Retirement uses the same finite completion allowance and existing presentation minimum as inspection; later error/finally joins retain the original operation and failure. Without a confirmed terminal or when project closure failed, close presentation and local captures without spending the original recovery authority. Bound those local joins by the existing enclosing presentation end without starting a new completion reserve. Unknown work cannot retain an indefinite inspector. Preserve the primary error and known execution/delivery while reporting local-close uncertainty separately; do not invent a terminal or mask the original cause with a finally error. Cancellation requested is not cancellation complete. Lost work and unknown delivery never invite automatic replay. A declined review is a decision, not a crash; already incurred dependency effects are not undone. Human Run output leads with host-observed execution and application outcome, packet delivery when requested, and unconfirmed cleanup when known. Preserve arbitrary small application output afterward; field names never establish success. When a complete result packet is confirmed written, the terminal may summarize large application output and checkpoint evidence by pointing to
result.jsoninstead of repeating them. An uncertain or failed packet delivery must not cause the terminal to hide result evidence. For a large object with a written packet, retain a bounded view of up to eight top-level scalar fields totaling at most 2048 JSON characters. State that this is a brief view and the full result is stored. Do not interpret field names or text as trusted status, truncate individual values to make them fit, or change machine output. This lets an application provide a concise report alongside large nested evidence without a special summary field or domain adapter. Emphasize failed execution and unconfirmed cleanup in red, uncertain execution or delivery in amber, and completed execution or written delivery in green. Keep the same explicit status words when color is disabled. Application outcomes do not inherit a success verdict from completed execution. -
Progressive detail. Ordinary output supports the next decision. Exact review details, Run JSON/NDJSON, and bounded diagnostics retain their roles; no debug flag is implied. Never hide important failures or authority notices behind an optional mode. Do not expose secrets or private host state.
-
Automation and accessibility. Terminal Run stdout defaults to a readable result and labelled live channels. Join text fragments without invented line breaks; preserve paragraph breaks, non-text values, channel switches and closed/failed endings. Channel closure is not execution success. Application result schemas remain arbitrary; never infer success from text or field names. Summarize captured diagnostics only when the exact text was already streamed; retain unseen diagnostics and truncation information. Escape untrusted controls. Redirected Run stdout or explicit
--jsonremains exact JSON or NDJSON; version stdout remains the version alone. Human status uses stderr. Redirected streams contain no terminal escapes or animation; failures and consequential notices remain readable.NO_COLOR(including an empty value) andTERM=dumbselect plain automatic presentation without animation; an explicitly selected eligible TUI with NO_COLOR uses screen controls without SGR styling. Plain terminal progress reports stage changes once. Do not require Unicode, a pager, cursor hiding, an alternate screen, or interactivity for ordinary output. Explicit dashboard uses an alternate screen and restores prior input/screen ownership. Escape untrusted control and review Unicode characters before presentation. -
Acceptance is required. A CLI-affecting change must check rendered success, failure, long waits, cancellation, and uncertain cleanup, plus redirected output, color disabled, narrow terminals, and light/dark themes. Verify byte-exact machine records, diagnostic safety, complete changed policy, and no premature success. An unfamiliar reader must be able to identify the outcome and next action from the transcript alone.
#Preparation limit diagnostics
PACKAGE_BUN_OUTPUT_LIMIT identifies the complete prepared execution tree, including source and production dependencies.
When bounded numeric evidence exists, report the exhausted dimension, observed lower bound, effective cap, and policy source.
Identify the corresponding project field and environment variable. Explain environment precedence and link to limits and defaults.
Do not expose worker messages or assume production dependencies are misplaced development tools.
PACKAGE_BUN_PROJECT_COUNT_LIMIT identifies the review's allowance for distinct new dependency preparations.
Report the first rejected count as a lower bound, the effective cap, and its source.
Direct the operator to limits.dependencies.maxPreparations or JIG_LIMITS_DEPENDENCIES_MAX_PREPARATIONS within the supported range.
Explain that a larger count preserves the aggregate byte allowance and deadlines.
The reported count does not establish how many preparations the complete library requires.
The SDK diagnostic retains these facts in optional preparationLimit with dimension, observed, maximum, and optional origin.
Dimensions are bytes or files for PACKAGE_BUN_OUTPUT_LIMIT, and preparations for PACKAGE_BUN_PROJECT_COUNT_LIMIT.
Origins are default, project, or environment.
The fixed evaluation output profile additionally carries profile: "evaluation". Its diagnostics never suggest production output overrides.
Preparation counts share the review's selected allowance, including evaluation recipes. Count diagnostics cannot carry the fixed evaluation profile.
Unknown or malformed evidence cannot become a limit diagnosis.
#Installation verification help
Help for review, Run and inspection exposes the operator's
--verification cached|strict|fast argument and names cached as the default.
Precedence is argument, then JIG_VERIFICATION, then cached. Missing, invalid
or repeated argument values are usage errors before host acquisition; a valid
argument overrides even an invalid environment preference. Parse it through
each command grammar, never by scanning values supplied to other options.
Explain fast mode's missing installation-freshness check and initial hashing
on cache misses; never imply that it bypasses approval or containment. Invalid
environment values without an argument override produce JIG_VERIFICATION_INVALID
with accepted settings and no Flow started. Help and initialization remain available without valid verification
configuration. The exact guarantees belong to
installation verification policy.
#Implementation and review ownership
Syntax errors show a bounded explanation and the relevant jig <command> --help
hint, not the complete manual. A close spelling suggestion never changes or
executes the supplied command.
jig run without a target uses the approved project entrypoint and its default
arguments, in terminals and scripts. Explicit options override defaults according
to Project Authoring SDK/1; an explicit target
bypasses them. Show the selected target and effective file paths and duration
before work, without printing input contents. Review shows entrypoint additions,
changes and removal; inspection includes the approved declaration.
Without an entrypoint, interactive jig run presents numbered ready approved targets
and their retained descriptions before execution acquisition. Empty input
cancels; noninteractive invocation requires an exact target. Selection does not
approve visible edits or bypass Run validation. Approval changing between
selection and submission refuses the invocation with RUN_APPROVAL_CHANGED.
jig completion bash|zsh|fish prints shell integration. Its dynamic
jig completion targets [prefix] lookup reads only approved selectors, without
environment checks, source evaluation, state writes, or provider requests.
It emits one ready selector per line. Unavailable targets yield no suggestions.
Static completion offers --agent values codex and claude for review
and init. Review requires one value, and Run has no client option.
Target inspection includes boundReadAttachments, the names of reads already
captured by that Binding. Invocation templates omit those names and explain
that they cannot be overridden; they supply only unbound reads. Inspection
separates approval freshness from retained target availability. An unavailable
default is identified using its normalized selector and is never presented as
a ready bare invocation.
Human inspection supplies invocation guidance from the retained interface:
required fields, file placeholders, and channel requirements. Input examples
are explicitly templates, not invented schema-valid domain data. Required
incoming channels are identified as needing a Flow caller, not a runnable CLI
example. Machine inspection includes the optional approved entrypoint string
and retained agentOverride in both project and target views. Human inspection
explains that retained review-argument origin; current source never supplies it.
jig new <name> [--use slot=source]... creates flows/<name> in the current project, never overwriting
an existing path. It does not evaluate jig.ts, install dependencies, modify
membership, or approve the new Flow. The SDK dependency follows the project's
explicit package manifest declaration when present, otherwise the tested SDK.
Explicit membership arrays must be edited by the author before review.
Optional --use declarations select at most 16 distinct contract slots. Each
source is a jig: standard invocation agreement, a project-relative descriptor path or an exact installed npm: package
name; npm lookup starts in the project and searches its ancestors, nearest first.
Each complete validated bundle is copied unchanged to contracts/<slot>, and
FLOW.meta.json references its descriptor under uses.<slot>. The generated
implementation remains a simple input return: the author decides how to call
collaborators and which optional features to require. No provider, grant, library
dependency or execution authority is inferred from a contract.
Creation with contracts stages the complete source outside flows discovery,
then publishes to an absent destination. Failure or cancellation before publication
removes unpublished source; completed publication is not undone. Process loss
can leave an unpublished .jig-new-* directory in the project root.
#Give one caller slot its own child Binding
jig specialize-slot binding:<caller> --slot <slot> --as <name> --select <child-slot>=<target>
edits a caller Binding and creates a Binding beside its current child.
Run from the project root. Use a new LocalName for --as.
The caller slot must explicitly select a Binding.
The child slot must explicitly select a Flow or Binding.
The replacement must select a different target in the working configuration.
Use an exact flow:, npm:, or binding: selector.
Both declarations must use a standalone export default defineBinding({...})
with a direct @jigging/jig import and literal values.
The literal may use satisfies BindingInput with a separate import type { BindingInput } from a relative .js specifier.
Jig preserves the type-only import and clause in both the edited caller and the copied child, when present.
With discovery, Jig discovers the copy under the same root as the original child.
With explicit membership, Jig appends the copy's path to the literal bindings array in jig.ts.
That file must directly import defineJig from @jigging/jig and export a single defineJig({...}) call as its default.
Jig accepts literal project fields and direct discover(...) calls for flows or grants.
For computed or shared declarations, make the scoped edit in source.
The command changes the two selected target strings and adds the explicit member when needed. It preserves attachment maps, settings, comments, and other selections. The original child stays available to its existing callers and as a direct Run target. The command validates the proposed configuration and reports the source paths and route changes. It leaves grant files, approval, and the project lock untouched.
A name or destination collision, unsupported declaration, or invalid proposal refuses the edit. A repeat with the same new name refuses and preserves the earlier edit.
Jig stages the source edits and publishes the new Binding without replacement. It adds explicit membership before replacing the caller. The caller continues to select the original Binding until Jig replaces its declaration. If publication fails before the caller changes, Jig rolls back confirmed edits in reverse order. If Jig cannot confirm safe rollback, it reports the source paths to inspect.
Abrupt process loss can leave the new Binding on disk, with or without explicit membership.
The .jig-specialize-slot-stage directory can also remain.
Confirm that the edit process has ended before removing its staging directory.
Inspect jig.ts and both Binding declarations before retrying an interrupted edit.
#Diagnostic evidence and interruption
Configuration-evaluator refusals retain the captured declaration location and a closed diagnostic distinguishing installation support, containment launch, envelope validation, cleanup, interruption and protocol response. Human guidance explains the known phase and next safe action; it MUST NOT expose launcher exceptions or infer a particular host or timeout cause from generic launch failure. These planning diagnostics establish that no Flow was started. Enforced evaluator memory, process and wall-clock limits have distinct closed diagnostic codes. A wall-clock refusal does not identify which phase consumed the budget. Generic capture or execution limits retain that uncertainty instead of attributing the failure to host load.
Run reports retain optional runDiagnostics: entries contain the host-assigned
operations call path (empty for the root), stderr, stderrBytes and
stderrTruncated; truncated marks any lost diagnostic evidence. Retention is
bounded to 64 KiB across 32 emitting invocation paths. These are untrusted
diagnostic bytes, not application results. The existing terminal diagnostics
continues to describe root-process stderr only. Live rendering escapes control
characters and identifies changes of emitting invocation.
Human final results count invocation paths whose diagnostic text was already
shown live, without replaying it or creating a result section for that count
alone. Retain any unseen suffix and disclose capture truncation with its path.
Unseen text appears in a separate human diagnostics section, without the machine
capture's byte-count or field-name bookkeeping. Escape it as literal data;
neither command recognition nor prose-based severity inference applies.
Interleaved invocation paths are tracked separately. JSON records and result
packets retain their complete bounded captures independently of this presentation.
Human output omits packet provenance manifests and digests already retained in
result.json; identify that file when delivery is confirmed. When a successful
Run has a confirmed written packet, keep small application output visible but
refer to result.json for large output, patch contents, and full checkpoint
evidence. Show the delivered file count when known. If delivery is uncertain
or failed, keep result evidence visible. Retain unseen diagnostics and failure
details, then end failed Runs with the explanation and next safe action so
evidence does not bury recovery.
Do not repeat delivery and cleanup records already explained by the summary.
Omit a null checkpoint and a zero delivered-file count from human results;
their exact machine values remain unchanged.
Invalid Run requests can involve input values or required channel connections.
Generic INVALID_INPUT failures must not claim an input-schema mismatch without
established provenance. Show only bounded reported constraints, not rejected
values or private paths.
Guide the caller to inspect the approved input and channel declarations.
Explain --input and --receive as corrective choices, not permission to replay
uncertain work. Source edits need jig review. A rejection alone does not
establish outdated approval. Run never inspects or approves live source to guess
freshness.
Native Agent setup failures identify the selected client and a closed cause. Keep corrective guidance separate. Locate the selection at its captured Binding declaration and resource slot when known, not the provider's executable Flow. Never expose private exception text or invent the source location.
When the slot is known, explain selection through its inline or named ACP grant. Explain the required review alongside repairing the selected client. Never select a fallback or approve a changed execution identity implicitly. An ineligible direct child Flow diagnostic explains that its slots or settings need configuration through project defaults or a selected Binding.
After interruption, the command waits for owned cleanup and emits its observed
authoritative terminal when available, with command: {status: 'interrupted'}
and exit 2. Execution status remains unchanged if completion won the race.
Cleanup failure is reported separately. A missing terminal, coordinator loss,
or broken output stream cannot be replaced with a fabricated terminal; consumers
must still handle incomplete output. No reporting path replays execution.
With a packet destination, confirmed settlement after interruption may publish
the terminal record and an already accepted checkpoint. It never exports unfinished final
Flow files. The trusted command's bounded settlement wait does not extend the
Run deadline; forced termination still leaves unavailable evidence unavailable.
#Operation and session-close failures
When project session close fails, JIG_CLEANUP_FAILED MUST identify the operation and close outcomes in one diagnostic.
If the operation also failed, label the classifications Operation failure and Close failure independently.
Each classification MUST use an approved Jig error category or UNCLASSIFIED for an unknown cause.
If the operation returned, label it Operation: completed without implying a successful Flow or application outcome.
Arbitrary exception messages, stacks, nested causes, private paths, credentials and recovery tickets MUST remain private.
An arbitrary object's code or name property cannot establish a public category.
JIG_CLEANUP_FAILED MUST remain visible on writable stderr even when no authoritative terminal or usable stdout remains.
A close failure establishes unconfirmed cleanup, without claiming that processes remain running or that external effects did not occur.
The command exits 2 when session closure fails, including when the operation alone would select another exit code.
Preserve an available execution terminal independently of the command's close failure.
Do not fabricate an execution terminal when none is available.
Combined recovery guidance MUST withhold operation-specific replay instructions while cleanup remains unconfirmed. It MUST direct applications with retained tickets to observe the original attempt. For callers without a usable packet or recovery identity, explain the supported recovery limit and preserve existing evidence. Never invent a recovery command or imply that new work settles the original invocation. The troubleshooting guide owns the procedure and escalation path. These diagnostics do not add a review JSON envelope or change existing machine framing.
#Agent project initialization
jig init [directory] --agent codex|claude optionally authors a declared
Agent dependency, bindings/agent.ts with an inline ACP grant, and a
contract-keyed default in jig.ts. Bare --agent asks for an explicit choice
on a terminal; empty input cancels. Noninteractive use requires the client
argument. Selection
does not inspect or install a client, copy authentication, resolve dependencies,
or approve authority. --bare omits the greeting, not the explicitly requested
Agent configuration. Existing destinations are never overwritten.
#Review client selection
The ordinary ACP source policy omits client. During interactive jig review,
Jig asks the operator to choose codex or claude when at least
one selected ACP resource has no pinned client. A previous approved choice
may be displayed as a suggested answer. It must be explicitly accepted.
Declining or interrupting the prompt records no new approval.
jig review --agent codex|claude supplies that choice without prompting.
Noninteractive reviews and --yes must supply the operand if an unpinned
ACP resource is selected. Otherwise review refuses with
PROJECT_AGENT_SELECTION_REQUIRED and the affected Binding slot.
When all selected clients are already pinned, a matching --agent is an inert
confirmation. Mismatched pinned clients cannot be overridden.
The choice changes only the client of unpinned selected ACP policies. Explicitly pinned clients, models and native retention requirements remain intact. HTTP grants and other Flow routes are unaffected. Review retains the source-versus-effective selection and the operand origin, including a choice made through the prompt. The source closure is never rewritten.
The operator-selected default and every exact effective client become part of the reviewed lock and approval identity. Different pinned Agents may coexist with the default. Runs use those concrete admitted clients and never substitute another Agent automatically. A later review needs its own selection, even when the prior approval has the same client. Ordinary authorization, cancellation, resolution-network restrictions and failure reporting remain in effect. Project policy owns exact linking and lock semantics.
#Agent setup during review
Any observed typed prerequisite refusal for a selected ACP resource stops CLI
review after resource qualification and before avoidable target execution
preparation, apply or an otherwise unchanged success. The same refusal
applies to interactive, noninteractive, redirected and --yes use, even when
unrelated code targets are ready or an input might avoid a selected Agent branch.
An unselected missing client does not block review. Installation and credentials
never break provider ties. SDK per-target readiness and selected-route
propagation remain intact; the CLI decision does not make unrelated feature
qualification failures fatal. Arbitrary failures, interruption, integrity faults
and unconfirmed cleanup retain their existing fatal behavior.
Retain the authoritative typed qualification cause independently of bounded presentation. An incomplete, absent or saturated issue report cannot permit approval. Do not substitute a generic unavailable-target count for an ACP cause.
State that the selected Agent prerequisite stopped project review. Detailed output explains that a ready code entrypoint does not bypass it. Do not claim that skipped or remaining checks completed. Prior admission remains unchanged and never bypasses current Run admission or environment checks. No Flow or model call starts.
Review may already have prepared dependencies or written outputs explicitly
requested with --generate-contracts. No new approval or automatic ACP policy
edit occurs. Other review work may have occurred.
The ordinary error leads with the selected client's known cause and captured policy location. Inline policies identify their Binding file and slot. Named policies identify their JSON file and compactly list affected recipients. Computed or unknown locations retain their uncertainty. An explicit client override distinguishes the effective client from the source client.
Show a short selected-client repair and a complete retry command. For executable failures, an unpinned policy without retention may also show commands for detected alternatives. Label detection as executable discovery, with login and readiness unchecked.
Explain each alternative's scope across native Agent policies, unchanged source and need to repeat the flag. Other policies can refuse that choice. Discovery executes no client and reads no secrets.
Commands preserve the same project and explicitly requested review options.
Alternative commands replace only the client argument. Never add networking,
--yes or --allow-authority-changes to recovery advice. Commands retain a
readable $ prefix and plain fallback. Quote project paths as shell words.
Never replace text inside a quoted project path to construct another command.
An unusable explicit override is not proof of a missing installation. Identify the override name, never its value, and explain that PATH was not used. Other executable repairs name the selected override and PATH. Other setup causes receive their own repair. Unknown failures retain uncertainty. Model pins and retention restrictions remain visible when they prevent a suggested client switch.
Retain the diagnostic code, unavailable-setup exit 2, unchanged prior approval,
and absence of Flow or model execution. Put recovery before report accounting.
Compact output discloses known omissions and unfinished checks. Point to
--details for source provenance, full recipient context, installation rules,
manual source edits and complete retained report accounting. Detailed output
preserves model, retention and turn-limit guidance when relevant.
Use red for the failure heading and amber for the unavailable Agent cause. Emphasize action headings and apply ordinary command syntax colours. Locations, diagnostic codes and the details hint are secondary. Colour never implies an alternative is ready. Plain, redirected and colour-disabled output retain the same facts and commands.
Locations MUST refer to immutable source captured for this candidate. A direct non-overridden declaration or JSON policy may use a syntactically verified client literal/property location. Imports, aliases, spreads and computed values use a verified supplying expression labelled as selection context, or the captured Binding file and logical slot with an explicit statement that no exact client line was located. Equal text or evaluated values do not prove provenance. Never present a comment/string search match as the originating selection or reopen live source for potentially stale coordinates. A snippet contains only the verified selection span and allowlisted policy facts, escaped and clipped as literal data. Do not expose unrelated policy, raw private errors or credentials. The next review captures an edit afresh.
Group observed issues by actual policy/selection, not solely by client. Avoid
repeating all transitive targets. Qualification may stop at its first failing
slot per target; identify incomplete checks without a second qualification pass
solely to exhaust possible failures. Large affected sets use bounded summaries
with known omitted counts and the existing --details route. Details expands
retained observed facts, performs no new checks and cannot recover discarded
facts. Both views disclose their bounds; preserve the primary blocker under
output saturation. Human output remains actionable without color and when
redirected.
No interactive Keep/Cancel/Update-client chooser, automatic source correction,
publication owner or recapture/edit loop exists. --yes never chooses a fallback
or writes ACP policy. jig review --json remains an unknown option; this contract
adds no review JSON envelope or public diagnostic DTO. Run and inspection retain
their existing machine framing and SDK diagnostic contracts. Captured owners,
locks and qualification resources close normally; diagnostics cannot retain
authority or conceal cleanup uncertainty.
#Invocation files and fresh evidence
When an effective invocation omits --out, a retained approved target declaring
a read-write attachment receives a fresh packet destination in canonical
operating-system temporary storage. Result-only targets stay stdout-only;
unknown targets and unreviewed projects follow ordinary refusal handling without
fabricated file requirements. Select the destination before file ownership or
host-delegation reexecution and preserve both output and no-output decisions
through every subsequent owner under the same retained admission.
An explicit --out DIR replaces an entrypoint output default and retains exact
destination semantics. Selection reserves nothing. Ordinary anchored-parent
validation, input-root/protected-path exclusion and no-replace publication remain
required, including for a known unavailable writable target. Invalid temporary
parents refuse before dispatch with actionable --out guidance; there is no
fallback or retry after work. Show the actual destination on stderr in human and
machine modes. Preserve JSON/NDJSON framing, existing delivery fields and the
terminal record's equality with saved result.json when a packet is written.
Explain on the first-run path that operating-system cleanup may remove temporary
packets. --out chooses a retained location; an existing destination is never
overwritten.
Initial file-mapping refusal identifies the missing unbound read names, invalid mapping names, bound overrides and writable names needing a destination. Say no Flow started. If no known fixture/schema path is available, give a clearly labeled command template using those declared names. Do not reopen live source or invent file paths. Checking invocation inputs and admitting the reviewed target precedes workspace entry; invalid input, review, runtime or file prerequisites remain in ordinary output before TUI or browser launch.
jig inspect [flow:path|binding:id] [--json] is read-only inspection of the
current project's last locally approved snapshot. Without a target it lists
exact approved selectors; with one it projects retained package descriptions,
invocation contract, settings schema, configured settings, resolved slots and
resource grants, and attachments. Channels belong to the invocation contract.
It compares each selected target's retained recipe and observation
identities with the current installed runtime, local Agent configuration/support,
and sandbox support, using the same identity calculation and operator-selected
installation verification policy as Run. Fast mode compares cached installation
identities without establishing current byte freshness. A selected
Binding includes its child targets; unrelated targets do not affect an exact
target's result. No target argument checks all approved targets.
The top-level and listed target state is environment-matches,
review-required for a known mismatch, or unchecked when comparison cannot
complete. A known mismatch takes precedence over an unchecked comparison.
Missing local approval reports unreviewed and needs no environment inspection.
A pending/declined review or a portable jig.lock does not substitute for
local approval. Successful snapshot reads return exit 0 even when review is
required; automation must examine state.
Inspection may read operator credentials to construct the same non-secret
provider identity, but never publishes or retains them or sends provider requests.
Ordinary inspection and explicit --flow --approved never evaluate visible source, fetch dependencies, acquire execution
authority, probe namespace execution, recover state, or write project state.
It may run the selected trusted Bubblewrap's bounded --version query.
The display identifies its retained basis: source freshness, launch readiness
and remote availability remain unchecked. Run still revalidates before execution.
Changed or unchecked environments recommend jig review, not jig run.
Unsafe, incompatible or busy state produces a bounded diagnostic without repair.
Ordinary redirected inspection emits JSON. Explicit --json selects JSON, while --flow selects the Markdown presentation below.
jig inspect --flow [target | path | --package PATH | --all] explains supported current source behavior.
Markdown remains literal through pipes.
Use --topology for a configured connection map, --approved for retained approved topology, or --json for configured records.
Each target retains its exact selector, package identity, settings, and resolved caller-local routes.
Separate Bindings remain distinct. Native resources retain their configured caller slots.
--all includes every configured target and connection, including disconnected targets.
It overrides default entrypoint focus and cannot accompany an explicit target.
The declared entrypoint remains identified separately.
It requires --flow and applies equally to current and approved inspection.
Markdown retains its presentation bounds. JSON returns the complete configured records.
--package PATH selects every configured use of the same Flow package and its direct callers.
Supply a project-relative package directory or an exact declared npm: package selector.
An exact package directory as a positional path selects the same scope.
An exact package with no configured use yields an empty list.
The Markdown report lists each configured use, its caller slots, and the settings that differ across uses.
It includes a focused inspection command for each use, retaining --approved when applicable.
Working-tree source analysis adds available call-site locations.
Package scope supports current and approved topology.
With --json, scope.package identifies the package and scope.configuredUses lists the configured selectors.
The target records include those uses and their direct callers.
This scope excludes a target operand, --all, --snapshot, and --compare.
A project-relative file operand must match a file in the selected capture.
A captured Binding declaration path selects that exact Binding in working-tree inspection.
A file in a package with one configured use selects that target.
A file in a package with several uses or no uses selects package scope.
With --approved, file lookup uses the retained package inventory.
An unknown package, file, or target reports how to list the complete topology for the selected basis.
Markdown identifies each Binding's implementing package even when its settings are empty. Working-tree topology links visible Binding selectors to their captured declarations once per Binding. Bidirectional controls in rendered labels and values are shown as visible code points.
Current working-tree capture is the default. It uses the ordinary contained declaration evaluator and linker. It checks the project's exact Jig requirement before declaration evaluation and rechecks captured compatibility metadata before returning. Declared npm Flows use already installed local packages. Manifest and lock agreement remains unchecked.
Inspection never installs dependencies, invokes methods or providers, prepares recipes, generates contracts, updates locks, or writes project state. Invalid declarations and missing dependencies fail without substituting approved bytes. An unpinned ACP resource remains unselected during inspection. Operator client selection remains required for review.
--approved selects retained authorized configuration without declaration evaluation.
The output identifies its basis and revision. Working-tree execution readiness remains unchecked.
Working-tree JSON records and targets remain unreviewed, including an empty inventory. No environment comparison is implied.
Relative Flow selectors accepted by the command grammar are normalized before either current or approved lookup.
An exact target selects contextual topology: its downstream closure, other configured uses of the same package, and their downstream closures. It also includes every upstream caller path and those callers' direct slot targets. Those additional targets are not recursively expanded unless they belong to one of the selected closures. Sharing a package identifies separate configured uses, not calls between them or equivalent behavior. Other slots of a caller do not establish mutually exclusive branches. The focus and declared entrypoint are identified separately.
Without an explicit target, the declared entrypoint selects its downstream closure. Without an entrypoint, the view includes the target inventory. The output counts targets and configured connections outside its scope. For each included target, it identifies incoming and outgoing connections crossing the view boundary. JSON retains each selected target's complete routes, including references outside the graph, with the same scope counts and boundary notices.
Mermaid uses readable identities derived from selectors and caller-local resource slots. Identities remain stable across inventory order and focused views. Name collisions receive exact distinguishing suffixes.
Arrows describe available configured calls, never execution order, conditions, feasibility, or caller reactions. This projection supplies no behavioral interpretation, source bundle, invocation history, or behavioral impact claim. Ordinary target inspection retains its separate contract and environment details.
Markdown refuses graphs beyond fixed target and connection bounds. Inline settings disclose omission, while JSON retains exact settings. The limits reference lists these fixed presentation bounds. Saved packets contain no configured-topology record.
Source behavior uses the same captured working tree and resolved slots as the topology view. Standalone source analysis can use guarantees from the captured input contract. Supported guarantees include required objects, strings, enumerated strings, and bounded integers. An optional integer can use its literal default. Child analysis follows the supplied argument.
The declared entrypoint selects the default focus. Without an entrypoint or a scope selector, plain working-tree Markdown inspection opens a navigation index. It groups targets by package and lists configured slots with a command for each target. Packages containing callers appear first, beginning with those that have a caller without upstream slots. The index uses captured topology and skips source behavior analysis.
When multiple caller slots select the same target, its row puts those slots and its independent Run selector beside its outgoing slots. The index displays up to eight caller slots per target. The row counts additional caller slots. Links open the captured Binding declarations for the target and its displayed callers, where available.
jig inspect --flow --find TEXT looks up a phrase in the working-tree navigation index.
Adding --approved searches the last locally approved configured routes and captured package descriptions.
It reads the same retained revision as approved topology without evaluating current declarations or checking the current environment.
Label that basis and revision, and retain --approved in focused commands and retry hints.
Without local approval, refuse with a command for working-tree lookup.
Compare the phrase without case distinctions against caller slot names, destination selectors, package paths, and captured Flow descriptions. For slot names, selectors, and paths, also match runs of whitespace, ASCII hyphens, and underscores as one separator. Return the exact configured names and paths.
Within each section, show literal name and slot matches first, then literal description matches, then separator matches. Include matching targets with no configured callers. Reserve space for literal matches before adding separator matches. Show up to twelve matches and count omissions.
Require one nonempty phrase of up to 128 characters.
The lookup emits Markdown. It accepts --approved as its only scope or view option.
An empty match list exits successfully and suggests retrying with one word from the request.
Show the matched handoffs and other caller slots that share one of their caller's destinations. Identify the destination's independent Run selector. Show a focused inspection command when available. The working-tree view also links the caller's captured Binding declaration and local entry file. Show up to four single- or double-quoted slot references per handoff from captured local source in that view. Check up to 64 source files of the entry file's language and read up to 256 KiB per caller package.
These locations match quoted slot text. Conditions, order, and execution require separate evidence.
An exact target retains its configured context, including other uses of its implementation and callers. Source behavior links the captured entry file for a local target and for displayed local choices at incoming slots. The application map shows the entry file once per Flow package. Package inspection shows it when a configured use is present. Entry links remain available when source analysis cannot inspect the entry or later behavior.
Focused target and incoming caller sections show the exact Run selector beside its implementation source. For a Binding, show a direct selector for the same package when the capture contains one, including outside the focused scope. Label a package with only Binding selectors as Binding-only in the capture.
For a direct Flow target, show its own required top-level input fields from the captured contract. Modeled direct returns that lack unresolved conditions or assumed call results may appear beside the selector. The caller continuation stays in the caller's context.
Focused source inspection links to the captured Binding declaration and shows the selected values for settings that differ across uses. It identifies peers with the same slot selections and gives the exact peer selections for displayed differences. The default entrypoint view includes other configured uses of its implementation and their callers from the same capture. This configuration summary can include targets outside the analyzed routes. It links captured peer Binding declarations and identifies equal settings.
For a local Flow shared by Bindings, it identifies the package settings schema or its absence. If the schema is absent, it gives the project-relative path to create for a new setting. It names Binding settings as the configuration channel for a change specific to one use. Incoming caller decisions display this information once per shared caller package. Supported direct setting checks link the checked expression to the selected value and Binding declaration. An authored exit can link the same configuration while its reachability remains unresolved.
With --all, the document shows the project entrypoint and includes every configured target within the topology limits.
Focused Binding inspection puts its independent Run selector beside its declaration and configured callers. The caller list links available declarations and explains how to give one caller a separate Binding when several share the configuration.
Focused reports can compare a direct setting check across configured uses of the same implementation. The comparison identifies the selected Binding as the edit site for a change to its setting. Each row links that use's declaration and gives its captured value. When analysis reaches the check, the row shows the analyzed branch and its first handoffs or exits. The comparison can show an alternative setting from another use with the same other settings and slot targets. Both uses must have resolved opposite branches at the same check in the analysis.
Focused reports and configured-use details list the Flow's required slots. These slots still need resolved wiring when a depicted route omits their calls. Local packages link to their captured package interface.
The overview links each target to a Flow chart and to the details for that configured use. Each chart keeps its configured uses separate and shares the same route selections as their details. Direct Flows appear even when no other target calls them. Each contextual call links to its configured child when that target is in the map.
The entrypoint and targets with more configured Flow calls receive route analysis first. Targets beyond the route budget retain supported authored decisions and source references from the captured sources. Coverage notices identify where route analysis stops.
Each analyzed route keeps its own conditions, call results, effects, and continuation. Source references identify the captured implementation and line. Diagrams label conditional edges with their predicates or the result of a direct validation guard. When outgoing edges share an earlier condition, diagrams show the later conditions that distinguish them. Source checks identify evaluated predicates and predicates that remain conditional.
Focused source output puts supported caller decisions beside the configured caller and slot summary. Focused reports and configured-use expansions group these decisions by slot before analyzed routes. It can link a literal slot argument at a local helper call to the corresponding request. Each group can include enclosing branches, differing literal input values, and conditional fields. When grouped slots target the same Flow, show input fields with different authored literals across those slots.
When a field has two literal alternatives, the report pairs both values with the same source predicate. The output flags when a later property may override an authored value. It reports omitted caller sites by slot and shows other slots that use the same Flow.
Caller decisions link the captured slot declaration and Binding wiring once per configured use when available. Multiple sites for a slot appear in one comparison.
In focused reports, each caller section identifies a displayed destination's implementation and available Binding declaration. It shows up to three configured child slots, with known implementations for their selections. Repeat uses in the same section share these details. The application map links decisions and related slots to their existing configured destination sections when present. Those sections include each destination's available Binding declaration.
Focused targets can also show authored decisions from direct callers that select that exact target. These incoming decisions identify the caller, slot, and supported request fields even if route analysis stops earlier. They can also show which configured caller slots select that caller.
An incoming decision can show how the caller returns after its next handoff. The next handoff must have a source result on the same modeled path, with no intervening call before the return. Keep each displayed return tied to the configured path that supports it. Beside the decision, show any local direct Flow entry for its displayed next destinations. Link the captured entry source and identify when the caller selects a Binding of that Flow. The direct entry supplies its own input.
For an incoming slot, show other configured uses of the caller's package even when its source is opaque. Show the selected target or absent selection for each displayed use, even outside the focused topology. Group uses sharing that slot's exact selected target. Link the selected target's Binding declaration when available, beside its implementation source. Keep those uses separate from the callers of the focused callee. Count omissions when the list reaches its bound.
Shared helper request metadata appears in the first relevant slot group, with source links from its call sites. Related slots appear together for each selected Flow implementation.
A spread from a local helper with a fixed object return can retain exact keys without interpreting the property values. Unresolved helper returns keep the possible override visible. An authored conditional between two literal slots links the same call site to both configured targets with its corresponding condition. When both alternatives are displayed, show the authored predicate and the true and false selections together. When only one alternative is displayed, retain its predicate and polarity at the call site.
It identifies authored request metadata at run.call and locates the child input or its identifiable helper argument.
When an argument is directly forwarded, the report names its position and the request field it supplies.
Focused and package reports may show additional authored call references after an analysis cutoff. Focused reports show authored handoffs and the earlier exits that bypass them before the route details. Computed slot expressions remain separate from exact configured routes. Supported strict-equality lookups in literal tables may include their authored rows, key sources, and early returns. These source facts retain their locations and carry no reachability claim.
Flow and configured target links derive from their selectors. An unchanged call retains its link when unrelated lines move around it. Identically spelled calls in one file use their occurrence order. Expanded call cases use their represented input, child effects, result, and caller continuation for their links. Equivalent cases may share a representative child path. Reinspect the working tree after edits to refresh the application map and its revision.
The analyzer covers a subset of local TypeScript. Unsupported operations, opaque dependencies, and analysis bounds leave visible gaps. Routes retain known effects before an opaque continuation and carry inherited assumptions across calls. When alternatives exceed the allowance, the map retains supported continuations and shows the cutoff for omitted paths.
When route analysis stops in a function, inspection can show later authored calls at configured slots. This part shows local branch predicates and result checks with their source locations. An authored result check can link through a local definition, including a protected assignment whose catch exits.
An earlier branch ending in a direct return or throw can identify which later call sites it bypasses in the same block. The bounded list preserves the call sites associated with each retained exit and discloses omitted exits. Reachability, execution order, and returned values remain unresolved there.
Supported read-only file opens and subsequent metadata, read, and close operations appear as attempts. The map shows conditional success and failure, while file contents and runtime metadata remain unknown. These read-only attempts stay in the Flow that performs them and its call expansion. It can show known numeric operands at entry to a comparison. Supported strict UTF-8 decoding and JSON parsing of read bytes retain separate validation failures. Additional source results include distinct throws with a known error type or message when the main diagram omits them.
Supported finite array loops show repeated calls and early stops. Other synchronous collection loops can show repetition with an unknown count. An opaque loop can leave its body or continuation unknown.
If analysis stops before or within a loop, a source view can link its configured call sites to the loop header and nearby control statements. It can show an identifiable loop bound declaration and a later exit in the same block. A transfer inside a catch can link the single statement protected by its try block and nearby checks. A trailing one-sided exit check can show its other branch reaching the iteration boundary. These source locations leave reachability and iteration counts unresolved.
The analyzer follows data-only callbacks on small known arrays, including explicit validation failures. When validation callbacks operate on unresolved contents, the displayed continuation assumes mapping completes.
A later authored file write can remain visible with its destination expression and source location. The caller continuation still depends on the unresolved work.
A focused view can show the first modeled write attempt in the selected Flow for each represented path. It links direct invocation and configured callers to the same source write when their retained paths reach it. The examples retain checks before the write and subsequent checks or actions. Conditional child results keep their labels. Within the display bound, show each represented entry before giving an entry additional input or result variants. Entry labels can share a row when their displayed inputs, exits, checks, destinations, and later actions agree.
The write view can show declared input paths and the writer's result contract. Modeled caller inputs and writer exits remain tied to their represented write cases. It can also show modeled rejections before a write. When no write attempt is modeled, the focused view can show the same declarations with authored write sites and unresolved reachability.
If the same write has both kinds of entries, the view identifies a common place for validation before that write. A focused view also identifies direct inputs separately from its configured call slots. For a configured handoff, it can show an independently callable entry that uses the same Flow implementation. That entry can be outside the focused analysis scope if it is present in the captured project.
Small known scalar sets and literal numeric products can contribute to reported progress. Route consequences give the final requested progress alongside its recorded helper call or update location. For a single evaluated progress block, the report links count and total expressions shared by the represented payloads. When the displayed progress remains unknown, it may link a possible calculation from the payload or its local helper.
The focused view shows when a selected Flow's result reaches a caller's check and next step. Each row identifies which Flow returns the value and which caller acts on it. Conditional checks inside the child have their own column. Caller checks state the selected truth value before the predicate.
The callee view includes supported reactions to hypothetical results at its analyzed caller slots. Source returns and contract alternatives retain separate labels. From the caller's view, distinct results link to their own call expansions. Checks and subsequent calls link to their source locations.
Beside a displayed subsequent call, show earlier forwarded returns that bypass that site on modeled paths. An earlier result from the same source call must reach the displayed call on a separate path. When the destination's Flow also has a direct entry, show that independent input boundary beside the bypasses. Contract alternatives and source returns keep their respective labels.
The callee view can also show a caller returning an earlier child's result without reaching the focused call. This evidence relates retained paths for the same configured caller and earlier call site. Earlier contract alternatives keep their conditional labels and the later source call location.
The continuation lists the outcomes for the child's result and the caller's own result.
It links local captured contract files for both.
When a displayed child outcome is absent from the caller's declarations, the view identifies the outcomes entry needed to forward it.
It also directs the reader to check that the caller's result schema, when present, accepts the returned shape.
The focused report lists the direct Flow targets in scope.
It also names standalone Binding selectors that other targets call in that scope.
The callee view also shows retained paths through intermediate callers to the next configured caller's decision. The intermediate and outer results come from the same modeled call evaluation. An intermediate return labeled as forwarding uses the child result itself. Other intermediate returns retain their own values and represented checks. Hypothetical child outcomes remain conditional at subsequent handoffs. Within each displayed outcome, the view prefers a modeled next call or exit over an unresolved continuation.
The focused callee can lead with source checks and next actions from the retained caller paths. When direct and intermediate routes have the same displayed decision, the view lists their configured paths beside it. When all displayed rows have the same configured paths or intermediate returns, the view states that evidence once above those rows. The summary preserves conditional admissions, intermediate result changes, and represented writes preceding the next action. The detailed continuations retain each call's checks and configuration.
Focused callee inspection analyzes its configured upstream callers before the remaining visible targets. It uses the application inspection allowance for this work and retains the per-target bounds.
The focused view summarizes selected route consequences and evidence. It prioritizes distinct return outcomes and consequential differences before further variants. The main diagram projects supported calls, loops, and file writes within a fixed display bound. Routes join only when their remaining displayed steps and checks agree.
An unresolved check travels with the affected branch, including through a child return. Checks preceding a projected file write appear on its incoming edge. Call links open retained child paths for the displayed caller and configuration, with bounded input facts. Each contextual path identifies the continuation of its own caller. Adding a proved check before the same continuation preserves the call-case link. Unresolved checks and consequential differences can distinguish cases.
Separate details show caller reactions to hypothetical contract outcomes and call failures. The view discloses where bounds omit child paths or call sites. The outcome name alone does not establish an admitted result or a delivered artifact.
Inspection checks known returns against the target's declared outcomes and validates fully known payloads against its result schema. A rejected return retains effects attempted before the rejection. Unresolved values leave the corresponding checks incomplete.
Reporting projections require a recognized local installed implementation. The inspection reports requested publications and supported payload calculations. Proven data-only payload calculations use a local allowance within analysis. An unknown payload can leave the caller continuation visible. It provides no observation of a Run and grants no execution authority.
jig inspect --flow --snapshot emits a machine baseline for the complete working-tree application.
Redirect it to a file before editing.
jig inspect --flow --compare BASELINE captures the current work from the same command context and writes Markdown.
Both forms select the complete application and exclude target and topology options.
The baseline contains represented routes, conditional alternatives, and coverage gaps. Settings are compared by digest.
The baseline follows the JSON transport limits and is read once from a bounded regular file.
The comparison reports changed configured uses, entrypoint, settings, and represented paths. Path comparison preserves the order of unresolved checks, child results, and effects and ignores line number shifts. It shows attempted file operations, requested publications, outcomes, and newly reported gaps.
The default view shows what changed between uniquely corresponding paths with the same ordered captured checks and evidence kind. It groups repeated changes at the same source locations and provides project-relative references to the current source. Unmatched path counts show where correspondence is uncertain. The summary also shows consequential calls, writes, and progress captured on only one side.
For unmatched paths, the summary can show a newly captured order between existing call slots. It counts source paths that contain both calls once in the stated order. When the baseline lacks such a path in either direction, baseline order remains unresolved.
Use --compare BASELINE --all to show every changed path with its ordered checks, effects, and source references.
The comparison is a source inspection. A matching projection establishes agreement for the captured facts.
jig inspect --result <directory> [--display plain|tui|web | --calls] [--json] reads a
saved packet without loading a project, verifying an execution installation,
reading operator configuration or credentials, acquiring execution authority,
or contacting a provider. It rejects target and verification arguments.
Plain is the default. JSON or redirected stdout takes precedence over either inspector.
Saved inspection displays fixed Recorded result, Files and Diagnostics views. Recorded result separates bounded selectable fields, including ordinary output members, from their expanded literal values. No application field name receives special summary or outcome meaning. Complete scalar values need no expansion. Multiline, shortened and nested values retain bounded evidence and explicit excerpt limits. Exact JSON inspection retains the full report.
Every saved value is a recorded local claim, including host-shaped fields. Matching file digests establish consistency with the manifest. Only the selected packet directory supplies files. Recorded destinations and attachment names do not select other paths.
#Saved child calls
jig run --record-calls requests bounded observations in the result's callEvidence field.
The operator supplies this flag on the Run command once.
The flag leaves ordinary output directory selection in effect.
The field binds its runId to the root record and gives the root selector and the admitted candidate digest as revision.
For result-only Runs without a packet, terminal output carries this evidence and its matching runId.
When a packet is written, terminal output includes exactly the call evidence acknowledged by the file owner.
An unavailable observation omits revision.
It has an empty call list and zero omitted events.
The record gives provenance: "recorded-claim", coverage, omittedEvents and calls.
It covers up to 256 calls and 128 KiB of encoded evidence.
Each call gives a packet-local positive integer id, its slot and latest observed state.
It gives parent when its invoking call is known.
An exact admitted match supplies both caller and target as selectors.
A native target uses resource:<kind>.
An observed return gives its validated outcome.
The row number identifies a call within one record. It does not establish execution order.
Call bodies, diagnostic text, original operation names, timestamps and publisher identities stay outside this record.
Recorded child calls cover invocation requests. The host's artifact release protocol operation stays outside the record.
Coverage is complete for a successful settled Run with matching retained calls and no known observation gaps.
A complete empty list records zero calls.
Coverage is incomplete when a Run failed, a match is missing, or observation has a gap.
The omittedEvents count covers events lost at capture limits.
Coverage is unavailable when the host cannot produce the bounded observation.
Evidence that exceeds packet or transport capacity may be absent.
Publication preserves the ordinary execution and delivery record.
For packetless Runs, omitted requested evidence MUST produce a JIG_REPORT_LIMIT diagnostic on writable stderr.
This applies when the combined terminal frame exceeds JSON/0 limits, even without room for an omission field.
Preserve the valid ordinary terminal result, framing, and normal exit status.
The diagnostic explains the omission and that repeating the command starts new work.
Runs without --record-calls retain their existing output.
Use jig inspect --result DIRECTORY --calls for a plain list.
Redirect stdout or add --json for the exact saved call record.
Exit 0 requires complete observation and consistent file capture.
Exit 1 includes incomplete, unavailable, mismatched and absent call evidence.
Incomplete or unavailable records that pass validation remain visible. Standard saved inspection retains its existing exit behavior. The recorded call view does not infer a configuration graph or branch conditions.
jig inspect --result EARLIER --compare LATER reads two explicitly selected
local packets through the same saved inspection boundary.
It prints a bounded plain comparison by default and with redirected stdout.
With terminal stdout, --display web opens the private browser inspector and
prints the plain comparison after it closes. Omit --calls.
Use --json for a machine comparison. It cannot be combined with --display.
Each side retains its recorded Run identity, root selector, approved revision, root result, file verification and call coverage when available.
Compare the recorded canonical JSON input digest and the normalized submitted attachment manifest. Match each port and each relative file path, byte count and digest within the existing supplied-input limits. Report “same recorded identity” or “different recorded identity” for two valid records. If either record is missing or malformed, report “unknown.”
The comparison displays no submitted digests, paths or contents. It draws no conclusions about configured Binding files or other Run conditions. Explorer comparison identities stay private to its live session.
Compare only calls with an exact retained root, ancestor slot and target chain, caller and slot. Compare counts by target, state and observed outcome within each path. Matching observations describe retained evidence only.
A path without a counterpart can say “None observed” only with complete coverage under the same root. An incomplete record can say “No retained match.” A different root and unavailable evidence are distinct. Disclose omitted events, observations without an exact path and clipped output. Packet-local call numbers are used only to resolve ancestry and stay out of comparison output.
JSON writes one object with provenance: "recorded-claim", earlier, later,
submittedIdentity, approvedRevision, rows, rowsOmitted and nonmatchingOmitted.
The input and approved revision relations report same, different or unknown independently.
Each side gives the root if known, terminal status and observed outcome if available,
filesComplete, invalidCalls, callCoverage, callsRecorded, callsOmitted and callsUnplaced.
Run IDs, revision digests, payloads and manifest paths stay outside the JSON comparison.
Each row uses root, ordered ancestors of slot and target pairs, caller and slot
as its exact path. The earlier and later arrays give target, state, optional outcome
and count for every retained variant on that path. matches compares those observations.
An empty array means none were retained for that path on that side.
Only complete coverage under the same root establishes that none were observed.
Use the shared browser bounds of eight whole rows, seven ancestors per row and 5 KiB for the row list. Prefer nonmatching rows. Report all omitted paths and how many of them are nonmatching. Never return part of a row.
Exit 0 requires complete call coverage and consistent file verification for both packets,
with no omissions from the selected output. Observed differences do not change this status.
With --display web, the status still describes the final plain comparison.
Exit 1 covers unavailable or incomplete evidence and output failure.
Exit 2 indicates external interruption. Comparison confers no authority and
retains no new data.
Capture holds a descriptor-confined packet root and opens files/ as its child.
Public relative file paths retain their own path profile before that prefix is
applied. Refuse links, multiple-link files, special files, traversal, duplicate
manifest paths and out-of-profile sizes. Capture admits at most 16 MiB of JSON
value plus the publisher's single framing LF, 64 manifest files and 16 MiB
aggregate file bytes, within ten seconds. File previews use already verified
immutable captures, with at most one active 64 KiB UTF-8 excerpt or bounded
image preview under the shared captured-image profile.
Terminal images use native coloured blocks within the existing 32 KiB frame
ceiling. Colour-free terminals retain image metadata with a colour requirement;
no image overlay process or terminal graphics protocol is launched.
They never reopen a mutable path. One owner releases descriptors and captured buffers on every exit.
Partial file verification preserves the valid report and already verified
captures while disclosing unavailable evidence. It never invents replacement JSON.
Exit 0 means valid report and complete consistent file capture, regardless of the recorded execution outcome; exit 1 means invalid/unavailable report, incomplete file verification or output failure; exit 2 means external interruption. Explicit JSON emits the unchanged decoded report even when file capture is incomplete, with findings on stderr and exit 1. Invalid reports emit no fabricated record. Terminal text is escaped literal data. Saved inspection remains open until q, contextual Escape or keyboard Ctrl-C, subject to explicit inherited presentation constraints and input/output failure or external interruption. It acquires no execution lifetime and has no built-in idle or absolute expiry on any supported host. Web preparation/activation follows valid report decoding and bounded capture; invalid reports stay plain. Partial capture may open with a valid report and explicit unavailable files. Close inspection releases presentation globally and prints the ordinary recorded report; browser disconnection does not close it.
The CLI's shared presentation and progress modules own human formatting; command branches supply facts. Installed-launcher errors follow the same hierarchy even when the application cannot start. Review policy is generated from the same captured records that are approved, and human Run summaries come from the same terminal observations as machine results.
#Retained application view commands
The experimental jig views command inspects explicitly retained application projections without evaluating source or acquiring execution authority.
Retained application views owns its exact formats, evidence rules and finite profile.
list is the default operation and accepts exact definition and instance filters.
--instance requires --definition.
--display accepts plain or web, while --json and redirected stdout take precedence.
Context, receipt, remove and reset emit bounded JSON records.
Context creates presentation storage under an existing owner-only .jig directory when absent.
Receipt lookup requires the original request identity and generation.
Removal requires the current target revision, and reset requires the current generation.
Stale conditions reject instead of silently selecting current material.
Plain listing quotes application data and shows title, instance, summary, edition and completeness. JSON listing returns generation, matching heads, matched and omitted counts, and bounded retained views. Payload scope and length checks precede loading or decoding retained data. A concurrent archive change rejects capture rather than producing a mixed snapshot. Web inspection requires terminal stderr and retains the ordinary authenticated access boundary. It exposes no publish, remove, reset, rerun or domain mutation control.
A retained view carries actual publication attribution independently of its authored target. It shows no invented execution tree, activity history or elapsed execution claim. Missing evidence remains unavailable rather than resolving through a newer file or another publisher. Closing inspection preserves retained material, while external interruption retains exit 2.
The Run option --display-bundle NAME=FILE selects one final file from a declared writable attachment or artifact result.
An approved project entrypoint may select it explicitly, and an operator option replaces that whole selection.
Only verified final delivery can publish the edition after confirmed settlement and project closure.
Publication failure retains known execution and delivery facts, emits a separate actionable diagnostic, and makes command success unavailable.
The original acceptance operation and cleanup remain joined after deadline expiry.
#Installed application execution
jig attempt <prepare|submit|lookup|cancel|reconcile|result|export> --json is the
machine-only application boundary specified by
the execution client contract. Its help remains ordinary
human output and acquires no execution host or stdin lifetime.
Machine requests contain protocolVersion: 1, the selected operation, and
request in one bounded JSON line on stdin. Tickets, captured input and
application data must not be placed in command arguments or diagnostic text.
Validate the complete command grammar before acquiring execution support, and
validate the request before invoking the operation. Invalid requests emit one
closed typed error record, without rejected data or a fabricated execution
terminal. Machine stdout contains only the operation's versioned records.
Completing the request line is not closing the submit connection. The original submit owner retains its finite foreground connection through settlement. Disconnecting it requests cancellation of that Run, not detached execution. Duplicate observers receive the original acceptance without acquiring ownership, and observer disconnection cannot cancel the original Run or another root.
Preparation and lookup never dispatch. Cancellation acknowledgement is not cleanup confirmation. Result availability and export delivery are separate from the immutable execution terminal. Failure advice must direct callers to reconcile the original ticket, never mint replacement work automatically after uncertainty, expiry, lost acknowledgement, or missing retained evidence.
Changes to public output must update this contract when its guarantees change, its owning implementation, and focused acceptance tests together. Adding an ad hoc raw diagnostic or weakening an assertion to accommodate unreadable output is not an acceptable shortcut. Recovery advice remains subject to the troubleshooting guide and exact lifecycle contracts.