Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

name: session-bootstrap
description: Canonical MCP session order — manifest once, then examples → predict → process → errors_lookup. Skill-name derivation from operator names. Use first on every new MCP session.
type: guide
kind: design
applies_to: process, compose, sample, facet, inspect, predict, manifest
covers: [pulse_manifest, pulse_cohorts_list, pulse_examples_search, pulse_examples_get, pulse_skills_list, pulse_skills_get, pulse_inspect, pulse_predict, pulse_errors_lookup]

Session bootstrap

Steps 1–2 cached; re-enter at step 3 per question.

#CallCadenceReturns / effect
1pulse_manifest with intent (IDs: intents skill; unscoped = hundreds of KB)once per intentoperator catalogs, field types, error codes, MCP tool list, skill list, extensions, capability blocks
2pulse_cohorts_list (which cohort?) → pulse_inspectonce per cohortschema (fields, types, descriptions, dictionaries). Side-effect: binds schema-aware enums into the field-name arguments of pulse_predict / pulse_process / pulse_compose / pulse_sample / pulse_facet, constraining them to schema-resident values
3pulse_examples_searchper questionname + summary, by query + intent + tags + category (CLI pulse examples search --intent); or pulse_recommend by intents ID
4pulse_examples_getper candidaterunnable Request JSON (body, _meta stripped). Adapt cohort filename / fields / labels — do not invent
5pulse_skills_geton demandshape, gotchas, contract; pick via session-skill-routing. Runnable JSON comes from examples, NOT skills
6pulse_predict (bare request, or composed, or facet, or chain)until cleanerrors, warnings, data.suggestions, data.defaults_applied, data.streamable, data.streamable_reasons
7the execute tool the manifest’s mcp_tools lists for the operation — pulse_process / pulse_compose / pulse_process_chain / pulse_facet / pulse_facet_schema / pulse_sample / pulse_lookupexecute{format_version, data, errors, warnings} + additive data.components; format_version is "1.1"; read via pulse_explain
8pulse_errors_lookupper unique codecanonical message + structured fixups[]. Authoritative — never paraphrase from memory

Step 7 Compose return shape. pulse_compose’s data is a ComposedResponse {responses[], overlays[]}, not a bare array. Per-slot Components ride each responses[i]; overlay diagnostics ride overlays[i].warnings.

Which skill answers what

QuestionSkill
Which skill fits an operator prefix, manifest entry, request / response slot or CLI leaf; first read of data.componentssession-skill-routing
Excel / SPSS read flags, parent groups on the managed import path, .sav write flags, --float f32session-format-flags
pulse profile create and pulse synth from-profile flagssession-synth-flags

Authoring layers

Manifest = the contract. pulse_inspect = field names + values. pulse_examples_* = runnable JSON. Skills = gotchas, slot-key naming, rationale. pulse_errors_lookup = per-code prose. Prompts:

  • pulse-bootstrap: this order.
  • pulse-author-request: question → intent prompt, tool or request.
  • pulse-<intent> (per analytic intent): inspect, recommend, confirm, process, explain.

On failure

Read every errors[] / warnings[] entry ({code, message, details}) → pulse_errors_lookup each unique code (cache) → apply fixups[] → re-pulse_predict → re-execute only when predict is clean. An unknown key (any depth) is PULSE_REQUEST_UNKNOWN_FIELD: fix details.path.

CLI exit status (all but pulse mcp): 0 ok, warnings ok; 1 fatal (errors under --json, --strict escalations too); 2 usage error, no envelope. shard add --rewrite never appends in place.

Environment

Roots auto-loaded at pulse.New:

  • PULSE_LABEL_TABLES_DIR / PULSE_RANGE_TABLES_DIR / PULSE_LOOKUP_TABLES_DIR — label maps, {label,start,end} ranges, {key: number} maps for lookup(). One dir each: any *.json that fails to parse fails pulse.New; sidecars skipped.
  • PULSE_POPULATIONS_DIR — *.pulse-population.json files, bound in every request by stem.
  • PULSE_TEMPLATES_DIR — parameterised request templates; os.PathListSeparator-separated roots in precedence order, first root wins. Render (RenderTemplate / RenderTemplateRequest), then predict. See request-templating.

A name on disk and in code: PULSE_EXTENSION_DUPLICATE.

Managed imports (PULSE_IMPORTS_DIR) keep each handle’s read settings in a sidecar (format, source_path, ttl_seconds, column_type_overrides, source_tz, column_source_tz, source_tz_field, dst_policy, zone_field, --vector folds); a handle never changes zone — re-import with overwrite: true. See time-zones.

Server-side (pulse mcp / an embedder’s mcpserve): PULSE_MCP_NO_COHORT_SCAN (flag --no-cohort-scan) skips listing pulse://<path> resources at startup. There an empty resources/list is not evidence of no cohorts — pulse_cohorts_list, pulse_inspect and resources/read pulse://<path> still work. Tool responses default to the standard preset (no components; host flag --return); send "return": {"preset": "full"} for everything — see response-shaping. The host caps resources (--limit name=value, every CLI leaf); plan within manifest.limits (-1 = none), re-fetch it on a new limits_digest; a breach is PULSE_LIMIT_EXCEEDED. Host flags (--log-level, --metrics-addr, OTLP OTEL_*, worker caps, --memory-limit) never reach tool responses.

Both table kinds surface under manifest.extensions.{label_tables,range_tables}. Templates are NOT manifest-projected; enumerate with ListTemplates (Summary.Broken: now malformed).

request-envelope (envelope, slot keys, defaults, streamability) · cohort-union (several cohorts read as one) · synthetic-data (synth modes, models, correlations, determinism) · synth-structural-rules (rules[] / constraints[]: gating, masking, derived fields) · response-components · response-shaping (return: trim a response, cap float digits) · tool-* (one per MCP tool, full argument shape) · docs/src/internals/debugging-predict.md · docs/src/getting-started/ (cold start) · spss-cohorts.