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.
| # | Call | Cadence | Returns / effect |
|---|---|---|---|
| 1 | pulse_manifest with intent (IDs: intents skill; unscoped = hundreds of KB) | once per intent | operator catalogs, field types, error codes, MCP tool list, skill list, extensions, capability blocks |
| 2 | pulse_cohorts_list (which cohort?) → pulse_inspect | once per cohort | schema (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 |
| 3 | pulse_examples_search | per question | name + summary, by query + intent + tags + category (CLI pulse examples search --intent); or pulse_recommend by intents ID |
| 4 | pulse_examples_get | per candidate | runnable Request JSON (body, _meta stripped). Adapt cohort filename / fields / labels — do not invent |
| 5 | pulse_skills_get | on demand | shape, gotchas, contract; pick via session-skill-routing. Runnable JSON comes from examples, NOT skills |
| 6 | pulse_predict (bare request, or composed, or facet, or chain) | until clean | errors, warnings, data.suggestions, data.defaults_applied, data.streamable, data.streamable_reasons |
| 7 | the 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_lookup | execute | {format_version, data, errors, warnings} + additive data.components; format_version is "1.1"; read via pulse_explain |
| 8 | pulse_errors_lookup | per unique code | canonical 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
| Question | Skill |
|---|---|
Which skill fits an operator prefix, manifest entry, request / response slot or CLI leaf; first read of data.components | session-skill-routing |
Excel / SPSS read flags, parent groups on the managed import path, .sav write flags, --float f32 | session-format-flags |
pulse profile create and pulse synth from-profile flags | session-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 forlookup(). One dir each: any*.jsonthat fails to parse failspulse.New; sidecars skipped.PULSE_POPULATIONS_DIR—*.pulse-population.jsonfiles, 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. Seerequest-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).
Cross-links
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.