@haystackeditor/cli 0.25.1 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +39 -455
  2. package/dist/capture/app-config.js +25 -1
  3. package/dist/commands/capture-brief.js +41 -32
  4. package/dist/commands/feedback.js +66 -0
  5. package/dist/commands/init-telemetry.js +53 -7
  6. package/dist/commands/init.js +7 -2
  7. package/dist/commands/lockfile-pin.js +307 -0
  8. package/dist/commands/verify.js +68 -13
  9. package/dist/index.js +27 -923
  10. package/dist/schema.js +4 -10
  11. package/dist/utils/haystack-api.js +0 -36
  12. package/package.json +1 -5
  13. package/schemas/feedback.v1.json +13 -0
  14. package/schemas/pre-verify.v2.json +240 -0
  15. package/schemas/verify-raw.v1.json +1132 -0
  16. package/schemas/verify.v2.json +655 -0
  17. package/dist/assets/hooks/agent-context/detect.ts +0 -316
  18. package/dist/assets/hooks/agent-context/format.ts +0 -100
  19. package/dist/assets/hooks/agent-context/index.ts +0 -41
  20. package/dist/assets/hooks/agent-context/parsers/claude.ts +0 -262
  21. package/dist/assets/hooks/agent-context/parsers/codex.ts +0 -416
  22. package/dist/assets/hooks/agent-context/parsers/gemini.ts +0 -155
  23. package/dist/assets/hooks/agent-context/parsers/opencode.ts +0 -174
  24. package/dist/assets/hooks/agent-context/tsconfig.json +0 -14
  25. package/dist/assets/hooks/agent-context/types.ts +0 -58
  26. package/dist/assets/hooks/llm-rules-template.md +0 -59
  27. package/dist/assets/hooks/package-lock.json +0 -598
  28. package/dist/assets/hooks/package.json +0 -12
  29. package/dist/assets/hooks/scripts/commit-msg.sh +0 -5
  30. package/dist/assets/hooks/scripts/post-commit.sh +0 -5
  31. package/dist/assets/hooks/scripts/pre-commit.sh +0 -175
  32. package/dist/assets/hooks/scripts/pre-push.sh +0 -25
  33. package/dist/assets/hooks/scripts/prepare-commit-msg.sh +0 -5
  34. package/dist/assets/hooks/truncation-checker/ast-analyzer.ts +0 -528
  35. package/dist/assets/hooks/truncation-checker/index.ts +0 -595
  36. package/dist/assets/hooks/truncation-checker/tsconfig.json +0 -13
  37. package/dist/assets/skills/map-cloud-verifier-universe/SKILL.md +0 -2051
  38. package/dist/assets/skills/map-cloud-verifier-universe/agents/openai.yaml +0 -4
  39. package/dist/assets/skills/map-cloud-verifier-universe/references/output-contract.md +0 -3411
  40. package/dist/assets/skills/map-your-system.md +0 -143
  41. package/dist/assets/skills/submit.md +0 -200
  42. package/dist/commands/ask.js +0 -20
  43. package/dist/commands/cloud-verifier-behaviors.js +0 -218
  44. package/dist/commands/cloud-verifier-data-store-census.js +0 -539
  45. package/dist/commands/cloud-verifier-data-store-drift.js +0 -158
  46. package/dist/commands/cloud-verifier-identity-census.js +0 -4060
  47. package/dist/commands/cloud-verifier-materialization.js +0 -704
  48. package/dist/commands/cloud-verifier-pascal-selector-census.js +0 -1382
  49. package/dist/commands/cloud-verifier-python-manifest-selector-census.js +0 -2015
  50. package/dist/commands/cloud-verifier-specialized-operational-census.js +0 -11432
  51. package/dist/commands/cloud-verifier-universe.js +0 -10178
  52. package/dist/commands/config.js +0 -549
  53. package/dist/commands/design-verify.js +0 -311
  54. package/dist/commands/dismiss.js +0 -159
  55. package/dist/commands/hooks.js +0 -226
  56. package/dist/commands/inbox.js +0 -137
  57. package/dist/commands/mcp.js +0 -201
  58. package/dist/commands/policy.js +0 -371
  59. package/dist/commands/pr-status.js +0 -207
  60. package/dist/commands/pr.js +0 -105
  61. package/dist/commands/prepare-universe-review.js +0 -1092
  62. package/dist/commands/production-source-deny-policy.js +0 -100
  63. package/dist/commands/request-review.js +0 -74
  64. package/dist/commands/review.js +0 -191
  65. package/dist/commands/rules.js +0 -98
  66. package/dist/commands/scaffold-provisional-universe.js +0 -806
  67. package/dist/commands/setup.js +0 -1170
  68. package/dist/commands/skills.js +0 -447
  69. package/dist/commands/submit.js +0 -745
  70. package/dist/commands/system-map.js +0 -228
  71. package/dist/commands/triage.js +0 -598
  72. package/dist/commands/webhooks.js +0 -241
  73. package/dist/states.js +0 -46
  74. package/dist/tools/detect.js +0 -832
  75. package/dist/triage/astra.js +0 -202
  76. package/dist/triage/prompts.js +0 -188
  77. package/dist/triage/runner.js +0 -200
  78. package/dist/triage/types.js +0 -7
  79. package/dist/utils/action-output.js +0 -26
  80. package/dist/utils/analysis-api.js +0 -416
  81. package/dist/utils/design-verifier-api.js +0 -294
  82. package/dist/utils/design-verifier-history.js +0 -79
  83. package/dist/utils/design-verifier-result.js +0 -424
  84. package/dist/utils/github-api.js +0 -324
  85. package/dist/utils/pending-state.js +0 -86
  86. package/dist/utils/pr-ref.js +0 -56
  87. package/dist/utils/prompter.js +0 -328
  88. package/schemas/action.v1.json +0 -22
  89. package/schemas/ask.v1.json +0 -40
  90. package/schemas/inbox.v1.json +0 -27
  91. package/schemas/pr-status.v1.json +0 -61
  92. package/schemas/pr.v1.json +0 -97
  93. package/schemas/pr.v3.json +0 -45
  94. package/schemas/setup.v1.json +0 -75
  95. package/schemas/submit.v1.json +0 -90
  96. package/schemas/triage.v1.json +0 -103
  97. package/schemas/triage.v2.json +0 -64
@@ -1,2051 +0,0 @@
1
- ---
2
- name: map-cloud-verifier-universe
3
- description: Discover, document, and update the production-derived hermetic universe that Haystack Cloud Verifier needs for an application. Use when onboarding or repairing a repository for on-demand Cloud Verifier, mapping runtime services and stateful or external dependencies, or reviewing whether an existing universe map is complete. Produce a stable-ID universe plan and evidence map, and require an independent, bounded, read-only reviewer subagent spawned by the customer's coding CLI before declaring the map complete.
4
- ---
5
-
6
- # Map a Cloud Verifier Universe
7
-
8
- Map how Haystack can reproduce the application as a production-derived,
9
- disposable universe. Cloud Verifier generates change-specific test cases and
10
- runs them across many isolated universes. Do not discover or select existing
11
- tests.
12
-
13
- Read [references/output-contract.md](references/output-contract.md) completely
14
- before producing artifacts.
15
-
16
- ## Rev39 non-negotiable recall floor
17
-
18
- This section has precedence if later guidance appears narrower. Source identity
19
- coverage and downstream semantic closure are separate decisions.
20
-
21
- 1. Before manual discovery, run `haystack skills census-universe --json` twice
22
- against the retained repository. The two `record_digest` values must match.
23
- The census deliberately excludes `.haystack/`; generated maps are verifier
24
- outputs, not retained application source. If the isolated source view omits
25
- Git metadata and reports `source_commit: null`, copy the already pinned
26
- `map_revision.source_commit` into the receipt while preserving every census
27
- digest, count, and ID byte-for-byte.
28
- Persist the exact receipt under `coverage.deterministic_identity_census` and
29
- reconcile every presumptive runtime-role, stateful-resource, and
30
- external-dependency record
31
- exactly once through a candidate's `source_census_record_ids`. A candidate
32
- is mapped or receives an exact evidence-backed exclusion; it is never
33
- silently dropped. A presumptive discovery lead may be excluded only as
34
- `parent-runtime-unreachable`, with atomic repository evidence bound to the
35
- exact census source path and tokens. Generic build/test/internal/duplicate/
36
- non-independent relabeling cannot close it. Repeat both runs after any
37
- retained-source change.
38
- 2. `termination.phase: inventory-complete` or `final-receipt` is valid only after the operational
39
- and selector censuses are `complete`, every operational frontier receipt is
40
- `complete`, and two full retained-source sweeps over the same manifest add no
41
- runtime, state, external-operation, selector-family, or selector-entry
42
- identities. Bind both sweeps to the same `source_manifest_digest` and bind
43
- `census_record_digest` to the deterministic receipt's final
44
- `second_record_digest`. Broad
45
- `uncovered` prose is not a census. Missing production
46
- authority may defer activation, comparison, and review; it never permits a
47
- partial source identity census to terminate. No candidate may remain
48
- `pending` at `inventory-complete`: finish its exact identity as a mapped
49
- final or give it an exact evidence-backed exclusion. Carry activation,
50
- reachability, backing-state, and other downstream semantic uncertainty on
51
- the admitted final instead of using it to defer identity admission.
52
- 3. The verifier-owned census is mandatory at every repository size. For a
53
- retained source with at least 100 production files or any selector family
54
- with at least 25 keys, supplement it with batched language-aware extraction.
55
- Feed both the complete retained-source manifest. Search entrypoints and
56
- process launches; listeners and routes; file,
57
- object, keychain, defaults, generated, build, install, and packaging writes;
58
- network/SDK/subprocess/browser/host operations; and selector-to-
59
- implementation dispatch. The extractor may write to stdout or private
60
- scratch and must derive stable IDs from exact path, owner, operation, and
61
- structured key. Never encode a repository name or a holdout-specific answer.
62
- 4. A user- or operator-launched command that stays alive is an
63
- `operator-launched-longrun`. A child with its own spawn/stop/restart handle is
64
- an `application-supervised-process`. Map both as runtime roles when exact
65
- source proves their lifecycle and entrypoint. A host-managed browser or
66
- desktop application remains its own runtime role.
67
- A production-reachable script with an exact `__main__` guard is also a
68
- separately executable `direct-batch-entrypoint`, even when it exits after a
69
- finite batch. Duration is not an exclusion basis. Keep a workflow job and
70
- the batch script it invokes as separate roles because their controllers are
71
- distinct stable identities.
72
- 5. Enumerate exact inbound and outbound operations one-for-one by method/message
73
- plus route,
74
- topic, command, or protocol operation. Keep the listener as a separate
75
- boundary when it has its own address. Emit each exact inbound operation as a
76
- `required-inbound-operation`; do not collapse routes into one HTTP listener.
77
- Also retain exact HTTP/RPC/socket operations between mapped runtime roles as
78
- `mapped-role-operation`; being inside one proposed universe affects routing,
79
- not source operation identity.
80
- 6. Treat the census `proof_status` as authoritative. Project every
81
- `proof-complete` identity exactly once in every one of its six typed
82
- projections. Repeat its exact `source_census_record_id`,
83
- `semantic_identity_id`, optional `execution_identity_id`, and ordered typed
84
- `identity_components` tuple on the final. A `discovery-lead` is presumptive
85
- operational inventory and must also be reconciled exactly once. It may map
86
- only after exact source proof fills its missing identity fields; the final
87
- repeats its `source_census_record_id` and preserves every component the lead
88
- already established. Its final evidence cites the exact census source path
89
- and every material census token visible in that source anchor. A
90
- `non-inventory` observation cannot justify a final. Unknown
91
- activation or downstream semantics may keep closure partial, but cannot
92
- erase or group a proof-complete identity.
93
- 7. Every discovered operational surface creates a stable candidate or an exact
94
- evidenced non-inventory decision immediately. Every discovered selector
95
- owner creates a discovery root and surface immediately, and every exact
96
- selector-to-implementation pair creates an identity-complete registry entry
97
- with `trace_status: identity-complete` while discovery remains partial. At
98
- `inventory-complete`, an
99
- identity-complete registry row may retain explicit `category_projections`
100
- and semantic debt after its exact family, entry, and edge identities are
101
- closed. At `final-receipt`, every entry must instead have all three
102
- `category_links` and an explicit child-registry or leaf decision. Omission,
103
- `entries: []`, and false leaf declarations are never substitutes for census
104
- identities.
105
- 8. Treat independently keyed process memory and installed runtime mutations as
106
- state: queues, caches, registries, sessions, configuration objects,
107
- interpreter patches, host callbacks, production distributions, executable
108
- entrypoints, and generated wrappers. Exclude ordinary locals, unkeyed
109
- scratch buffers, temporary-directory contents, tests, dev-only installs, and
110
- editable developer checkouts. A lockfile or raw manifest is source input,
111
- not reproduced state by itself. Preserve each production lock entry by its
112
- exact install location and artifact identity, including nested locations;
113
- exclude `dev: true` entries. Split methods, routes, grant types, formats,
114
- signals, messages, and package identities into exact rows; grouped variants
115
- do not satisfy recall or precision.
116
- 9. A deterministic census record with `package_artifact_url`,
117
- `package_artifact_hash`, `package_artifact_filename`, and
118
- `package_artifact_kind` is already an exact proof-complete identity. Map its
119
- state record to one installed-distribution-variant final and its pull record
120
- to one external artifact-pull final. Never group artifacts by package name,
121
- version, platform, wheel/sdist class, or installation command, and never map
122
- two artifact census IDs to one final subject. Preserve the URL, full hash,
123
- filename, version, artifact kind, and installation stage in structured
124
- identity and evidence.
125
- 10. Treat the base Python installation and each production-capability extra as
126
- separate installation-profile state. Exclude dev, test, docs, lint, typing,
127
- benchmark, CI, and release-only groups. An extra such as `all`, `save`, a
128
- database/backend integration, or another runtime capability remains in
129
- scope; do not run or describe installs as `--all-extras` when that would
130
- pull developer-only groups.
131
- 11. A generic census call signature is a presumptive discovery lead, not
132
- permission to invent a generic final or leave it pending at inventory
133
- completion. Before mapping it, resolve the exact source owner,
134
- method or message, route/address/object, stage, and receiver boundary. Map
135
- exact browser-model, SDK, host, file/stream, module-loader, resource-pull,
136
- callback-registration, and imported-package calls one-for-one. Exclude a
137
- workflow or developer-tool call unless exact source proves it belongs to
138
- the selected build or runtime path.
139
- 12. An `exact-operation-matrix-member` is proof-complete. Map every record to
140
- exactly one final external subject, preserve `source_census_record_id`,
141
- `operation_identity_key`, and ordered `matrix_axis_item_identity_keys`, and
142
- never replace its members with plural destination/object variant arrays.
143
- Finite destination, nameserver, object, method, stage, or port axes multiply
144
- identities; retry and attempt counts remain metadata on one identity.
145
- A `python-executable-entrypoint-role`,
146
- `workflow-controlled-runtime-unit`, embedded configuration, or embedded
147
- template is instead a deterministic candidate: map it only when exact
148
- production provenance establishes the category, and otherwise record the
149
- exact evidenced exclusion. This keeps admin/build/test scripts and ordinary
150
- code constants from becoming fabricated finals.
151
- 13. Treat each production requirements manifest as one installation profile and
152
- each requirement line as a profile-scoped variant. The same normalized
153
- package in two profiles is two state identities. Emit an external install
154
- operation only when executable source actually runs that command. Optional
155
- imports, exception messages, logs, comments, and documentation never prove
156
- installed state or an install boundary. If no command exists, use the exact
157
- `manifest-derived:<manifest-path>` reproduction token and
158
- `reproduction_operation_kind: manifest-derived`; do not substitute a raw
159
- version or requirement fragment.
160
-
161
- ## Keep the boundary clear
162
-
163
- - Map repository-proven logical runtime roles, config, stores, streams, queues,
164
- caches, object storage, flags, identity, RPC, scheduled work, and third-party
165
- APIs that affect the selected application. A logical runtime role is never a
166
- production IAM role or credential.
167
- - Mark every resource and external dependency `activation: active` or
168
- `activation: optional`. For a resource, ask whether the application starts
169
- without the store, not whether its data looks important: an analytics sink or
170
- secondary audit store the app boots without is `optional`. Classify its state
171
- honestly regardless; a store can be both
172
- `canonical-durable` and `optional`, and downgrading it to
173
- `derived-rebuildable` to justify the marking asserts a rebuild path nothing
174
- can evidence.
175
- - Prove `activation: active` at the call site before claiming it. A default
176
- endpoint constant is not proof: follow the call and check whether it returns
177
- early without a key, sits behind a flag that defaults off, or runs only under
178
- an admin-guarded path. Persist an `activation_basis` with exact evidence for
179
- every resource and external dependency. Default-on code reached on startup,
180
- in a background loop, or through a fixed ordinary request path is `active`;
181
- a concrete profile, credential, feature, driver, administrator, tenant-state,
182
- artifact, or user-supplied-destination gate makes it `optional`. Invoking an
183
- already-enabled fixed capability is not a gate, but creating a webhook,
184
- remote, subscription, provider record, or URL-backed integration is: the
185
- destination does not exist until that state is supplied. Do not transfer the
186
- resource boot test to external calls: a store the application can boot
187
- without is optional, while a fixed external destination reached by a default
188
- request path can be active even when the request happens after boot. A
189
- default-selected local engine, mount, or cache is active even when ordinary
190
- use populates it only after boot. When one grouped entry includes both a
191
- default-reachable variant and gated variants, split it so each activation
192
- decision remains truthful. A wrong `active` makes a materializer stand up
193
- something the application never reaches; an unsupported `optional` silently
194
- drops default behavior.
195
- Before calling anything optional, inspect the selected artifact's baked and
196
- default configuration. A default selected there is active even when an
197
- operator can override it later. Name the proximate selecting gate:
198
- `operator-configuration` for an operator URI or implementation enum,
199
- `driver-selection` for a driver choice, and `user-supplied-destination` only
200
- when an end user or tenant actually supplies the destination. Do not use
201
- `credential` merely because an already selected path later authenticates.
202
- - Resolve reachability separately for every consuming runtime role. Each
203
- resource and external dependency keeps `runtime_role_ids` as its compact
204
- index and emits one matching `consumer_edges` row per role, with that edge's
205
- activation and proximate basis. Cite atomic `role-reachability` evidence whose
206
- exact subjects are `[inventory-subject-id, runtime-role-id]` and whose
207
- repository sources use `inspection_scope: role-call-path`. Its
208
- `role_call_path` names the role and two distinct source indexes: a role module
209
- or entrypoint and the concrete consumer use site. For
210
- `registration-dispatch` or `configuration-dispatch`, it also names a third,
211
- distinct `dispatch_source_index` at the actual registration or selection gate;
212
- omit that index only for `direct`. All sources use distinct typed, locatable
213
- string anchors; repeating or padding one locator at two indexes or relabelling
214
- its locator kind is invalid. Build a role-by-subject matrix from each role's
215
- entrypoint. Never copy a service-level `depends_on` set onto every role.
216
- Packaging, registration, a plugin factory, or shared
217
- configuration vocabulary does not prove that a role can reach the
218
- capability. If a role-specific gate rejects a capability, omit
219
- that positive consumer edge instead of copying another role's edge. Aggregate
220
- activation is active when any consumer edge is active and optional only when
221
- all consumer edges are optional.
222
- - Resolve `activation` against the deployment profile you selected, not against
223
- source defaults alone. Three things decide it, in this order: what that
224
- profile's shipped configuration actually sets, whether that profile's image
225
- or package even contains the runtime needed to reach it, and only then the
226
- code default. A checked-in compose or chart that enables a feature makes it
227
- `active` even when the code default is off; a provider that loads only under
228
- a profile you did not select is `optional`; and a registry or integration
229
- whose interpreter, driver, or client is absent from the selected image is
230
- `optional` no matter what the source says.
231
- - Selection gates never erase supported inventory. If a packaged or
232
- repository-loadable registry entry creates a real resource or outbound
233
- interaction, map it once and mark it `optional` when a profile, default,
234
- configuration key, feature flag, credential, driver, or artifact choice gates
235
- it. Do not resolve that candidate as excluded merely because the selected
236
- profile leaves it inactive. For a candidate referenced by a structured
237
- registry, the only permitted exclusion is `duplicate-inventory`, joined to
238
- exact `equivalent_subject_ids`. Its evidence includes a decision-grade atomic
239
- `duplicate-inventory-equivalence` claim whose exact subjects are the candidate
240
- ID plus those equivalent inventory IDs and whose source inspects the
241
- implementation body. Everything else is either mapped optional inventory or
242
- was never category-applicable and belongs in the category link.
243
- - Preserve every independently keyed logical state owner even when several
244
- owners share one physical copy, reset, or restore action. Logical inventory
245
- identity and materialization identity are separate: distinct databases,
246
- schemas, queues, streams, buckets, namespaces, persisted identities, and
247
- generated outputs remain distinct resource rows, while shared
248
- `physical_binding_id` and reproduction/consistency groups tell the
249
- materializer to perform one physical action. Do not separately map an
250
- unaddressed table inside an already mapped logical database, an in-process
251
- boot cache, a scratch child, or immutable bytes already covered by an
252
- artifact. The stable structured state key—not similar text and not physical
253
- co-location—decides logical identity.
254
- Every resource also carries `state_owner` with an atomic
255
- `state-owner-boundary` claim for that exact resource. The claim names one
256
- typed ownership operation: an application open/read/write boundary, a
257
- repository-declared mutable namespace, operator-provisioned writable
258
- capacity, immutable digest/version identity, or an exact repository-proven
259
- named remote read/write operation. A client, endpoint, plugin registration,
260
- provider name, API response, or discovery target group is not state-owner
261
- proof. For `derived-rebuildable`, give one atomic
262
- `rebuild-source-reachability` claim per exact source-resource edge.
263
- A live authoritative catalog may instead prove an
264
- `authoritative-catalog-state-owner`; that evidence uses
265
- `authority: authoritative` and keeps the catalog reference opaque.
266
- - Prefer a production fork or snapshot. Use capture/replay or an isolated
267
- equivalent only when the dependency cannot be copied and the capability is
268
- evidenced.
269
- - Treat the universe as writable and disposable. Haystack must later prove
270
- that it cannot reach or mutate production.
271
- - Record config and secret names, never values. Do not change infrastructure
272
- or invent production identifiers.
273
- - Read the repository and nothing else. Do not call provider APIs, cloud CLIs,
274
- production endpoints, or any control plane, and do not ask for production
275
- credentials, IAM roles, connection strings, or deletion handles. Haystack
276
- operates the replicas under access the customer grants it directly; that
277
- access is never routed through this skill.
278
- - Never persist raw provider IDs, endpoints, or secret values in checked-in
279
- artifacts. Record stable IDs, config and secret *names*, and opaque catalog
280
- handles.
281
- - Ask the user only to select the stable application ID, environment ID, and
282
- replica destination policy or approval. Do not ask them to inventory their
283
- system or design its reproduction: describing the system is your job, and
284
- reproducing it is Haystack's.
285
-
286
- ## Current implementation status
287
-
288
- - Haystack builds and operates the replicas. The customer's coding agent
289
- produces the map and nothing else: it does not implement drivers, package an
290
- adapter, or run a replication process.
291
- - Treat every map as a proposal. Nothing here has been materialized or probed,
292
- so keep readiness at `proposal` or `blocked` unless direct current probes
293
- prove more, and never claim hermeticity, isolation, or materialization
294
- readiness from repository evidence alone.
295
- - Provider discovery and end-to-end materialization are Haystack-side work.
296
- Do not describe them as customer deliverables or block the map on them.
297
-
298
- ## Produce exactly four artifacts
299
-
300
- Create or update:
301
-
302
- 1. `.haystack/cloud-verifier/universe.yml` — the logical production universe.
303
- 2. `.haystack/cloud-verifier/evidence.yml` — evidence for every claim.
304
- 3. `.haystack/cloud-verifier/review.yml` — the independent review receipt.
305
- 4. `.haystack/cloud-verifier/behaviors.yml` — each meaningful customer action,
306
- its exact handler identity, and the customer-relevant boundaries that a
307
- replay can observe.
308
-
309
- The behavior map is finer-grained than the universe map. A single HTTP server
310
- interface may own many actions such as `POST /orders` and `GET /orders/:id`.
311
- Derive actions from route registration, event handlers, jobs, CLI dispatch,
312
- and UI action registration. Join to universe interfaces and evidence only by
313
- exact stable ID. Derive action, symbol, and boundary IDs with the installed
314
- validator; never make them from display prose or source line numbers.
315
-
316
- Treat them as a proposal until Haystack materializes and probes it. Review can
317
- check inventory coverage; it cannot prove hermeticity.
318
-
319
- Keep each artifact below 33554432 UTF-8 bytes. Do not use cyclic or expansion-heavy
320
- YAML aliases. Reuse `evidence_sources` and `evidence_profiles` by exact stable ID
321
- instead of repeating identical source and quality mappings across atomic claims.
322
- Follow validator contract revision `39` from the output contract. Behavior
323
- validation accepts the same 33554432-byte artifact envelope and runs from the
324
- current source directory when a sealed archive intentionally omits Git metadata.
325
-
326
- ## Run the rev39 identity-admission gate first
327
-
328
- Run the verifier-owned census before the four semantic passes and again after
329
- them:
330
-
331
- ```bash
332
- haystack skills census-universe --json
333
- haystack skills census-universe --json
334
- ```
335
-
336
- The command is repository-generic and read-only. Copy its schema and contract
337
- revision, pinned `source_commit`, separate source-manifest digest and file
338
- counts, total and presumptive counts,
339
- and identical first/second record digests into
340
- `coverage.deterministic_identity_census`. Copy the sorted IDs for every
341
- `presumptive_inventory: true` record projected to `runtime_roles`,
342
- `stateful_resources`, `external_dependencies`, `registry_families`,
343
- `registry_entries`, or `registry_edges` into the corresponding
344
- `projection_record_ids` list. Never put the manifest digest in the commit
345
- field.
346
- For each category, attach every listed ID to exactly one closure candidate using
347
- `source_census_record_ids`. Then trace that exact record to a final subject or
348
- an evidenced exclusion. Do not create a blanket candidate or exclusion for a
349
- whole file, method family, package group, registry, signal family, message
350
- family, or endpoint family. The validator recomputes the census from the current
351
- repository and rejects changed digests, missing IDs, extra IDs, and duplicate
352
- reconciliation.
353
-
354
- The rev39 census returns typed `registry_families`, `registry_entries`,
355
- and `registry_edges`. Preserve each entry's `selector_family_record_id` and each
356
- edge's exact parent-entry and child-family record IDs while building structured
357
- registries. Do not merge families by similar labels, move an entry to another
358
- owner, or use leaf evidence to override a verifier-emitted child edge. Qualified
359
- documentation, sample, fixture, and benchmark module roots are outside the
360
- production census even when they contain manifests or lockfiles.
361
-
362
- For large registries, use `source_census_record_id` plus
363
- `census_rehydration: exact` on a family or entry instead of duplicating its
364
- typed identity and source evidence. This also upgrades a discovery registry
365
- lead after source-wide proof, but it must preserve the exact census family
366
- owner and each entry's selector and implementation keys, with atomic evidence
367
- for the exact census source path and material tokens. The validator
368
- recomputes and rehydrates that exact record. Keep semantic category projections
369
- and child-registry decisions explicit. Every selector surface joins its family
370
- with `source_census_record_id`; use only the contract's fixed
371
- `non_registry_reason` enum for a non-registry surface.
372
-
373
- Finish these four deterministic source-wide passes before tracing activation or
374
- reproduction semantics. Record each pass under
375
- `coverage.operational_surface_census.frontier_receipts`; a complete receipt
376
- lists the exact surface IDs it produced or gives evidence-backed absence.
377
-
378
- 1. **Deployment runtime units.** Enumerate every independently started,
379
- stopped, or restarted steady-state service, process, scheduled workload,
380
- supervisor child, database, cache, broker, proxy, and host-managed unit in
381
- production-capable deployment and packaging sources. Merge setup, init,
382
- migration, configuration, and start commands that prepare the same deployed
383
- unit; they are not extra runtime roles unless they launch independently and
384
- remain alive. Give every final role an exact
385
- `deployment_unit_identity_key`, `deployment_control_kind`, and
386
- `deployment_control_token`. Admit a child process, thread, or sidecar only
387
- when exact deployment source proves its own lifecycle controller can restart
388
- it independently; a process name or internal supervisor restart loop is not
389
- that controller. A separately launched database or cache is
390
- both a runtime role (its launch unit) and a resource (its state); do not let
391
- one category erase the other.
392
- Treat a shipped browser application as a `host-managed-unit` when exact
393
- source proves its document/build entrypoint and production serving or
394
- packaging path. The browser host owns that lifecycle boundary; a missing
395
- compiled bundle in the retained source does not erase the source-proven
396
- browser role.
397
- 2. **State materialization identities.** Enumerate every independently
398
- reproduced logical database, database schema, cache namespace, queue or
399
- stream, credential/trust/TLS file, object bucket or prefix, persistent
400
- volume or directory, portable snapshot, installed or packaged layout,
401
- generated host state, immutable packaged asset, and other repository-proven
402
- independent object. Include application-created data roots, generated source
403
- or declaration files, installed executables, and embedded shipped assets.
404
- When a portable root and one or more children each have distinct exact
405
- content-reproduction operations, retain both only when the root itself has
406
- an independently preserved content identity. A `VOLUME`, mount, or directory
407
- declaration proves writable parent capacity, not canonical durable content;
408
- do not promote that parent over exact child identities. Physical containment
409
- does not erase an independent reproduction identity. Tables,
410
- projections, fields, indexes, and records inside
411
- an already copied database are not separate final units unless the repository
412
- proves an independent address and preserve/copy/rebuild/reset/restore action.
413
- Every final resource declares an allowed `state_unit_kind`, exact
414
- `address_token`, exact `reproduction_token`, and typed
415
- `reproduction_operation_kind`. The reproduction token must be an actual
416
- copy, restore, rebuild, reset, preserve, provision, mount, install, write,
417
- initialize, build, embed, generate, migrate, or pin operation and must differ
418
- from the address and materialization-root
419
- tokens. For identity admission, reproduction is the exact source operation
420
- that creates or restores this exact addressed unit: application writes such
421
- as `setItem`, `WriteFile`, or a named object `Put`; deterministic generation,
422
- build, embed, copy, install, initialization, or migration all qualify when
423
- tied to the exact address. A separate cross-environment backup/restore plan
424
- is materialization readiness, not a prerequisite for recording the logical
425
- state identity. A URL, environment variable, namespace name, declaration,
426
- generic parent mount, or generic CRUD interface without the exact addressed
427
- child does not prove independent reproduction. Enumerate nested tables,
428
- records, indexes, projections, cache
429
- keys, and provider objects in the census, then keep them out of final
430
- resources unless source proves a separate reproduction operation for that
431
- exact child.
432
- 3. **Outbound and host operation contracts.** Starting from each runtime role,
433
- shipped browser/client surface, packaged one-shot command, and artifact
434
- build/install/generation path, enumerate
435
- exact reachable SDK, HTTP/RPC, storage, identity, telemetry, proxy,
436
- subprocess, and host-service call sites. Start at concrete production
437
- consumers and trace inward to the leaf boundary; never start from generic
438
- HTTP helpers, shared SDK wrappers, imports, constructors, factories, local
439
- handles, or client method definitions and emit those definitions as rows.
440
- Admit one final row per exact
441
- outside-universe boundary operation, with a stable `operation_identity_key`,
442
- exact `operation_token`, and allowed `boundary_contract_kind`. Merge provider
443
- variants, OS branches, wrappers, or consumers sharing the same semantic call
444
- identity; exclude calls between mapped runtime roles. Split distinct calls
445
- within one client or user flow—for example authorize, exchange, fetch, list,
446
- read, write, copy, and delete—when they cross the boundary independently.
447
- Record `boundary_trace.kind: direct` when the application call is the leaf
448
- effect, or `wrapper-resolved` with the concrete application
449
- `callsite_identity_key`, `callsite_token`, every `wrapper_token`, and the
450
- final `boundary_token`. Batch-enumerate concrete call sites first, resolve
451
- wrappers second, then deduplicate only by exact structured operation
452
- identity. Sweep every effectful leaf inside each reached wrapper: filesystem
453
- methods, transaction stages, object-store methods, mail-protocol commands,
454
- browser/host APIs, build downloads, package fetches, generators, and install
455
- commands are separate operations when the leaf effect differs. Build-time
456
- and install-time boundaries required to reproduce shipped artifacts remain
457
- external dependencies even though they are not steady-state runtime egress.
458
- The operation token is the effectful call or listener, never a client
459
- constructor, import, factory, configuration setter, local handle, helper
460
- definition, quoted command argument, or flow label. For subprocesses, cite
461
- the spawn/exec invocation and full command identity rather than one array
462
- element. A reachable
463
- provider interface method is an operational dependency, not merely a
464
- selector-registry entry.
465
- 4. **Required inbound and pull contracts.** Enumerate independently reproduced
466
- listeners and service interfaces whose production behavior requires an
467
- ingress, browser/client, controller, puller, registry, or other outside
468
- actor. Keep the top-level listener or pull boundary, group routes and protocol
469
- variants behind it, and do not omit the listener merely because application
470
- code did not open the first connection.
471
-
472
- Final arrays are exact identity conclusions, not claims that every downstream
473
- semantic is closed. Admit a runtime role as soon as its independent controller,
474
- controller token, and entrypoint token are proved. Admit a resource as soon as
475
- its exact owner, address, typed reproduction operation, and distinct
476
- reproduction token are proved. Admit an external dependency as soon as its
477
- exact callsite, boundary leaf, operation identity, and destination/scope are
478
- proved. Missing hosted authority, selected activation, role reachability,
479
- backing-state classification, cross-environment materialization, or closure
480
- review must stay explicit and keep the category partial, but none may strand a
481
- proof-complete identity as a pending candidate. Use the contract's honest
482
- unknown/optional fields and empty consumer edges where necessary.
483
-
484
- `disposition: pending` is reserved only for a missing exact identity component:
485
- runtime-unit/controller kind/controller token/entrypoint; state-unit/owner/
486
- address/reproduction kind/reproduction token; or external operation key/
487
- callsite/callsite token/boundary token/destination/wrapper trace. Never put
488
- activation, runtime consumer, hosted authority, materialization strategy,
489
- backing state, reproduction readiness, or downstream closure in `unresolved`.
490
- Missing hosted-production authority may defer comparison, but it never relaxes
491
- or blocks source-only identity admission.
492
-
493
- When consumer or activation tracing is still open, represent the exact final
494
- resource or external identity with `activation: optional`,
495
- `activation_basis.kind: unknown-production-state`, `runtime_role_ids: []`, and
496
- `consumer_edges: []`; keep the matching category partial. For unresolved remote
497
- ownership, use the contract's `backing_state` unresolved form. These are honest
498
- downstream unknowns, not claims that the identity is inactive or stateless.
499
-
500
- For every full runtime role, resource, external dependency, registry family,
501
- and registry entry, reopen the cited exact snippet or line span before closure.
502
- Repository evidence for a material identity uses `supporting_tokens`; each
503
- token must occur inside that exact locator. A comment, shebang, import,
504
- declaration header, adjacent line, or closing brace cannot support a launch,
505
- owner/root, operation, or dispatch identity unless that exact token-bearing
506
- text is the claim. Keep material line spans at 80 lines or fewer.
507
-
508
- A registry is a concrete finite selection gate: a map lookup, switch dispatch,
509
- factory registration, manifest entrypoint, command dispatch, generated
510
- dispatch, or configuration dispatch. An interface or abstract method set is
511
- not a registry. Every registry records `selection_gate` with its exact owner,
512
- selector, and dispatch tokens and cites atomic `registry-selection-gate`
513
- evidence. The gate must declare `dispatch_semantics: selective-dispatch`, its
514
- exact production `runtime_consumer_token`, and whether its source is
515
- `application-owned` or `generated`. Generated parser, codec, protocol, schema,
516
- or framework tables are not registries unless a distinct application-owned
517
- production gate selects among their entries; record that gate as
518
- `application_gate_token`. Ordered migrations, exhaustive lifecycle pipelines,
519
- and hook lists that execute every member are not registries because no selector
520
- chooses one implementation. Every entry cites atomic `registry-entry-identity` evidence for its
521
- exact selector and implementation tokens. The selector literal, enum value,
522
- manifest key, or command `Use` token must be distinct from the selected
523
- constructor, handler, class, or implementation token. Trace and emit every
524
- parent-entry-to-child-registry edge; an enum, interface method set, route list,
525
- or constant collection with no concrete dispatch is not a registry.
526
-
527
- ## Preserve census breadth before proving semantics
528
-
529
- Inventory recall comes before semantic closure. First retain every exact
530
- repository-proven launch surface, state candidate, egress candidate, and
531
- structured-registry entry by stable ID. Then trace activation, ownership,
532
- consumer roles, backing state, nested registries, and reproduction semantics.
533
- Never make the candidate disappear because the second pass is unfinished.
534
-
535
- For a partial resource or dependency category, an evidenced inventory subject
536
- may honestly use `runtime_role_ids: []`, `consumer_edges: []`,
537
- `activation: optional`, and `activation_basis.kind: unknown-production-state`
538
- until its role call path is resolved. An external dependency may likewise use
539
- `backing_state.basis: remote-ownership-unproven`. Keep the category partial and
540
- name those IDs in `uncovered`. Unresolved role or ownership semantics are not
541
- evidence that the capability does not exist.
542
-
543
- When an exact identity component is not yet defensible, retain the observation
544
- in `coverage.operational_surface_census` and retain its stable closure candidate
545
- with `disposition: pending`. Its `unresolved` values must use only the exact
546
- identity-gap names allowed by rev39. Cite atomic census evidence, keep the
547
- category partial, name the candidate in `uncovered` and an aggregate blocker,
548
- and continue the source trace. Once the category-specific identity tuple is
549
- proved, project it to final inventory immediately; carry unresolved activation,
550
- reachability, backing, and materialization semantics on that final row and in
551
- closure blockers.
552
-
553
- When a registry is too large to trace entry-by-entry in one pass, retain every
554
- enumerated exact key in `coverage.selector_surface_census` with exact census
555
- evidence. Keep the registry partial and name the implementation and nested-
556
- registry traces in `semantic_trace_blocker`; do not create a final registry
557
- `entries[]` row until the exact selector-to-implementation dispatch and child-
558
- registry decision are proved. Apply structured per-entry category discriminators to create closure
559
- candidates, but keep unresolved projections in coverage rather than final
560
- inventory. Free-text names and summaries are not discriminators. Do not sample
561
- a registry, claim it empty, or omit its tail to save output space.
562
-
563
- A registry ledger is not a substitute for top-level inventory. When the
564
- registry schema establishes that every member belongs to a category—such as a
565
- worker registry or storage-backend registry—create a closure candidate for
566
- every real entry, then project only semantically closed candidates into full
567
- top-level rows.
568
- For a mixed integration, plugin, or manifest index, apply a structured per-entry
569
- discriminator such as an I/O class, transport declaration, client declaration,
570
- or endpoint declaration. Project every positive entry and record every
571
- structured negative as `not-applicable`; use `undetermined` only for entries
572
- whose exact structured metadata has no category discriminator, then prioritize
573
- their batched implementation trace. Never decide by fuzzy text. Generate
574
- exact selector-census and candidate claims while reusing the same
575
- evidence-source/profile IDs.
576
-
577
- ## Use command outputs as checkpoints
578
-
579
- Drive the workflow through the customer's CLI. Keep each command's exact
580
- machine-readable output in private scratch; prose is not a checkpoint. Use:
581
-
582
- 1. `haystack skills scaffold-provisional-universe --input <scratch-input.json>`
583
- only when production authority is missing **and** the topology-presence
584
- census proves the repository contains no production-capable topology;
585
- 2. `haystack skills prepare-universe-review --json` before an authorized review;
586
- 3. the customer CLI's real subagent-spawn and resume records; and
587
- 4. `haystack skills validate-universe --json` before publishing.
588
- 5. `haystack skills validate-behaviors --json` before publishing.
589
-
590
- Stop for unavailable, nonzero, stale, or wrong-schema output. Never infer that a
591
- missing command passed or promote an unsupported capability because it seems likely.
592
-
593
- ## Workflow
594
-
595
- ### 1. Check production authority first
596
-
597
- Default the target to the hosted production application. Choose one application
598
- and deployment scope. In a monorepo with confirmed authority, include only roles
599
- in that scope. If authority is missing and no selection is available, use the
600
- repository-defined product boundary: inventory every independently shipped,
601
- production-capable component as a role, capability, or compact alternative
602
- profile. Exclude unrelated development, test, documentation, and example
603
- packages. This is not permission to map the whole monorepo. Record one precise
604
- scope blocker instead of arbitrarily narrowing the product to one plausible
605
- package.
606
-
607
- Before deciding that the compact zero-inventory path applies, run one batched
608
- repository topology-presence census inside the authority-gate budget. Inspect
609
- tracked production entrypoints, package/workspace manifests, container and
610
- deployment descriptors, and structured plugin/provider/integration indexes.
611
- The absence of hosted deployment authority is never evidence that repository
612
- topology is absent. If this census finds any production-capable runtime,
613
- resource, client, plugin, provider, or integration surface, the compact path is
614
- forbidden: continue through inventory discovery even though scope remains
615
- provisional.
616
-
617
- The compact scaffold requires the canonical five `inspectedSurfaceKinds`,
618
- `productionCapableSurfaceCount: 0`, and exact decision-grade
619
- `claimKind: topology-presence-census` evidence for the census subject. It
620
- refuses a missing or nonzero census. Never declare zero after finding a surface;
621
- do not call the scaffold in that case.
622
-
623
- Before broad discovery, spend at most 6 repository-inspection calls and 60
624
- seconds checking deployment manifests, artifact pipelines, and repository
625
- documentation for a source that controls or resolves the live hosted
626
- deployment. This tells you how much the repository can prove; it does not
627
- confirm the hosted scope. Nothing you can call resolves which deployment is
628
- really production, so leave `application.scope_status: provisional` and let
629
- Haystack confirm the scope on its side. Never call provider APIs or accept
630
- direct production access. Executable source and production-intended or
631
- self-host config may describe a provisional topology, but cannot confirm the
632
- hosted scope.
633
-
634
- If hosted deployment authority lives elsewhere or remains missing, the hosted
635
- *scope* stays unconfirmed, but the map still owes Haystack an inventory. Do not
636
- stop discovery. Deployment commonly lives in a separate private repository, and
637
- that fact alone says nothing about what the system is made of. Continue through
638
- the normal budget and record every runtime role, stateful resource, external
639
- dependency, and edge the repository itself evidences. Then set
640
- `termination.reason: missing-production-authority` at the `inventory-complete`
641
- phase.
642
-
643
- What is withheld on this path is confirmation, never content. Keep
644
- `application.scope_status: provisional`, `selected_production_scope: null`, the
645
- production reviewer deferred, `review.status: blocked` on the authority blocker, and
646
- exactly one `production_basis.access_request`. Never promote a repository-proven
647
- topology to a confirmed hosted scope, and never claim hermeticity,
648
- materialization readiness, or isolation without authority. Record what the
649
- repository proves and mark it as exactly that.
650
-
651
- Do not launch the production-scope reviewer or run its comparison and revision
652
- phases: that review requires authority. The repository-only inventory-closure
653
- audit is separate and does not require production authority. Run it whenever
654
- the repository closure is otherwise complete. If no independent subagent or
655
- isolated source snapshot is available, keep the affected closure categories
656
- `partial` and set `inventory_closure_audit.status: deferred`; never preserve a
657
- `complete` claim that nobody independently challenged. Include only
658
- authority/access blockers, plus an honestly linked budget blocker if a limit
659
- was exceeded. Do not turn a deferred repository-only audit into a production
660
- authority or reviewer-isolation blocker.
661
-
662
- Use the compact receipt only when the repository evidences no topology at all,
663
- meaning not one runtime role, stateful resource, or external dependency. In that
664
- single case, terminate at the `authority-gate` phase, and within 60 seconds
665
- write the strict provisional JSON input from the output contract into private
666
- scratch, then run:
667
-
668
- ```bash
669
- haystack skills scaffold-provisional-universe --input <scratch-input.json>
670
- ```
671
-
672
- The command deterministically creates and validates the compact three-artifact
673
- receipt. Do not hand-author repetitive empty inventory or reviewer sections. An
674
- empty inventory is a claim that the repository shows nothing, so do not emit one
675
- to avoid the work of discovery.
676
-
677
- The map records repository-proven boundaries and exactly one
678
- `production_basis.access_request`. That request is a statement of what Haystack
679
- still needs, not a call you make. Ask the customer to make the application,
680
- environment, and replica-destination selection locally; Haystack resolves the
681
- remaining groups through its own access:
682
-
683
- 1. selected application ID and environment ID;
684
- 2. approved replica destination policy and opaque approval reference;
685
- 3. resource kinds, opaque catalog handles, and dependency edges;
686
- 4. artifact/runtime and non-secret config opaque catalog references;
687
- 5. external integration kinds and secret-reference names;
688
- 6. replica capabilities, strategies, consistency, freshness, latency, and cost
689
- bounds, including provider fork/snapshot/copy/capture capabilities; and
690
- 7. the replica-only golden-descriptor and lease-reference contract.
691
-
692
- The last group defines replica-only sandbox identity bootstrap; it grants no
693
- production identity or access.
694
-
695
- Never request production roles, credentials, raw provider IDs, endpoints, or
696
- direct connectivity for the checked-in access request. Exact stable identities
697
- that Haystack resolves later are transient validation inputs, not artifact
698
- fields. Never invent a hypothetical hosted
699
- scope, resource, or activation state. Use the compact profile in the output
700
- contract; do not instantiate the full reviewer schema.
701
-
702
- After continuing beyond the authority gate, record `budget.primary_discovery`
703
- with a 48-call baseline and a 1800-second total, plus a nested `authority_gate`
704
- with the 6-call/60-second limit. The scaffold-generated compact authority-gate
705
- receipt retains its fixed 48-call/900-second profile because discovery stopped
706
- at that gate.
707
- Calls 48, 96, and 192 are reporting checkpoints, not terminal ceilings. When a
708
- recorded allowed `extension_triggers` value identifies unresolved structured
709
- registries, launch surfaces, state providers, egress clients, retained-source
710
- scale, omitted production source, or a closure contradiction, extend the
711
- selected call limit in 48-call waves and target the open frontier. Stop only
712
- after two consecutive source-wide identity sweeps add no new exact operational
713
- identity or selector family. Semantic uncertainty may keep downstream closure
714
- partial, but it cannot shorten the census. A passing receipt must stay within
715
- the selected limit and elapsed ceiling. A blocked receipt that records an
716
- overrun links a `kind: budget-exhausted` blocker to the exact `budget_path`.
717
-
718
- Never substitute a local, dev, example, hobby, or self-host topology for hosted
719
- production. Keep it as a compact alternative unless the user explicitly
720
- selects it. Do not expand inactive or optional profiles into provider-by-provider
721
- topology variants, but still record every repository-proven logical role,
722
- resource, and optional capability once. Provisional scope is not permission to
723
- discard a repository-proven launch surface: attach it to the compact
724
- repository-proven topology or an alternative profile and record the uncertainty.
725
-
726
- On updates, preserve IDs by exact existing ID or structured source identity,
727
- never fuzzy text. Do not collapse roles, profiles, logical databases, buckets,
728
- topics, streams, queues, or keyspaces because their names or technologies look
729
- similar. Merge only when authoritative evidence proves the same structured
730
- logical identity; a shared physical binding and reproduction action only groups
731
- materialization.
732
-
733
- Record a `map_revision.source_commit` baseline. On rerun, inspect the source
734
- diff plus reverse dependencies and evidence whose anchors changed. Tombstone or
735
- remove an object only with evidence that it is no longer active. Have the
736
- reviewer inspect changed scope blindly before seeing the semantic delta. Fall
737
- back to a full bounded scan when deployment roots, service catalogs, selected
738
- scope, or topology sources changed. Treat this as required protocol, not a
739
- claim that update determinism has already been validated.
740
-
741
- ### 2. Enforce the inspection boundary before independent repository review
742
-
743
- Apply this section whenever an independent repository-only closure audit or the
744
- full production review will run. Skip it only for a compact or partial receipt
745
- whose `inventory_closure_audit` is honestly deferred. Omit the
746
- `inspection_policy` block from `evidence.yml` only on that deferred path; a map
747
- must not claim a reviewer snapshot that was never prepared.
748
-
749
- Apply the exact denied components, conditional component rules, and typed
750
- basename globs from the output contract to every primary and reviewer search,
751
- listing, read, and context-building operation.
752
-
753
- Match globs against normalized repository-relative POSIX paths. For the
754
- primary, use path-aware exclusions on every tool call. Before any deep scan,
755
- detect retained source files containing language/framework inline-test
756
- declarations. The detector may emit only paths and counts, not matching test
757
- text. If tests are co-located with production source and cannot be removed by a
758
- syntax-aware filter, stop rather than expose them. Never use a substring rule
759
- such as `*test*`; it incorrectly matches names such as `latest`, `contest`, and
760
- `attestation`.
761
-
762
- For the reviewer, create a tracked-files-only filtered snapshot outside the
763
- repository, excluding every denylisted path and `.git`. Confine the reviewer
764
- filesystem to that snapshot and disable network access. Enumerate symlinks
765
- before launch: reject targets outside the retained tree or into excluded paths,
766
- and materialize safe internal targets as regular files. Audit the snapshot for
767
- denylist matches and inline tests before launch. A working directory or prompt
768
- saying “ignore tests” is not enforcement.
769
-
770
- Create and audit that source view with:
771
-
772
- ```bash
773
- haystack skills prepare-universe-review --json
774
- ```
775
-
776
- Record its returned snapshot path and manifest digest in private scratch. The
777
- command must return `status: ready-for-confinement`; a `blocked` result stops
778
- review.
779
-
780
- A first run commonly blocks on tracked gitlinks, because a submodule's contents
781
- cannot be inspected and approving its omission has to be deliberate. That is an
782
- expected step, not a dead end: take the exact paths from the receipt's
783
- `submodules_omitted`, pass each back as a separate
784
- `--exclude-inactive-submodule <path>` option, and re-run. The receipt then
785
- records them under `approved_inactive_submodule_omissions`.
786
-
787
- Symlinks whose target is not a retained tracked file are omitted from the
788
- snapshot rather than blocking it, and the receipt lists them under
789
- `omitted_symlinks`; the resolver never materializes them, so nothing is exposed.
790
-
791
- A retained production file that carries an inline-test declaration, or a text
792
- file too large to scan, blocks by default: the contract will not silently hand
793
- the reviewer a file that might contain tests. When that is the only thing left
794
- blocking, re-run with `--omit-unscannable-files`. Those files are then left out
795
- of the snapshot entirely and listed under `omitted_unscannable`, which satisfies
796
- the same guarantee — the reviewer still never sees a test — while letting the
797
- review proceed. Carry both counts into `evidence.yml` and the coverage ledger,
798
- because they are scope the reviewer did not see. The command prepares the view; the customer's CLI must still confine
799
- reviewer filesystem access to that path and disable reviewer network access.
800
- In the receipt, record this as the structured executable and arguments from the
801
- output contract, plus the exact normalized paths passed through
802
- `--exclude-inactive-submodule`; do not record a shell command string.
803
-
804
- Record the mechanism, exact activated component rules and typed globs, symlink
805
- result, inline-test detector, and audit result in `evidence.yml` and
806
- `review.yml`. If the primary cannot enforce the boundary, stop with
807
- `test-path-isolation-unavailable`. If the reviewer CLI cannot enforce it, stop
808
- with `reviewer-test-path-isolation-unavailable`; do not launch an unrestricted
809
- reviewer. Never copy `.haystack/**` into a reviewer's source view.
810
-
811
- Before final validation, lint every `evidence.sources[].path` against the same
812
- normalized policy. A denied evidence path is a blocker, even if it was read
813
- before the policy was installed.
814
-
815
- ### 3. Create a recoverable private draft
816
-
817
- Create a task-specific directory outside the repository under the OS temporary
818
- directory, keyed by a deterministic repository identifier and restricted to
819
- the current user. Print its path for recovery, but never reveal it to the
820
- reviewer.
821
-
822
- Create every planned scratch subdirectory before the first extractor command.
823
- Run one no-output preflight against a single retained production file and
824
- verify that the expected output file or record count exists before launching a
825
- batch. A command that fails before opening repository source because its script,
826
- scratch directory, dependency, quoting, or output path is broken is a setup
827
- failure, not a repository-inspection call: repair it and retry once without
828
- charging the discovery budget. Record the failed preflight separately. Once a
829
- command opens source, it consumes the call even if later processing fails.
830
-
831
- After each phase, save candidate artifacts, a progress ledger, and compact
832
- reviewer projections there. Do not write the candidate under `.haystack/`
833
- while a review is still expected to run. Save the reviewer session ID immediately
834
- after spawn, and append each reviewer response to a separate scratch file. Never
835
- depend on one final output file or message. Delete scratch only after final
836
- artifacts are safely written; preserve and report it if interrupted or blocked.
837
-
838
- Once review has terminated — passed, or blocked on `reviewer-subagent-unavailable`,
839
- `reviewer-session-not-resumable`, `reviewer-quota-exhausted`, or a reviewer
840
- isolation blocker — write the four complete-map artifacts under `.haystack/cloud-verifier/`
841
- and validate them there. A terminally blocked review still produces a validated
842
- blocked receipt; it does not mean withholding the artifacts. Reading those
843
- artifacts back on a later update is likewise expected and is not a denylist
844
- violation.
845
-
846
- For the compact provisional authority path, save the strict scaffold input and
847
- ledger, defer the repository-only closure audit because closure is partial,
848
- skip full-review projections, and let the scaffold command atomically write and
849
- validate the three artifacts within the 60-second synthesis target.
850
-
851
- ### 4. Discover primary sources within an adaptive budget
852
-
853
- The primary baseline is 48 repository-inspection calls, including the authority
854
- gate. Suggested allocation: 6 authority calls, 14 launch-surface and structured-
855
- registry census calls, 18 state/egress implementation calls, 6 clone-injection
856
- calls, and 4 final closure checks. Batch related reads. Calls 48, 96, and 192 are
857
- reporting checkpoints, not terminal ceilings. At each checkpoint, record the
858
- exact generic extension trigger and continue in 48-call waves while any retained
859
- source, boundary leaf, state identity, browser/host surface, or selector family
860
- remains uninspected. Stop only after two consecutive source-wide identity sweeps
861
- add no new exact operational identity or selector family. At termination, mark
862
- remaining downstream semantic closure partial and add a blocker; semantic
863
- uncertainty is never a reason to stop the identity census.
864
-
865
- Do not record `termination.phase: inventory-complete` with partial inventory
866
- before completing and recording the two no-new-identity stabilization sweeps.
867
- Missing hosted-production authority defers the review and production comparison;
868
- it does not end repository discovery. Likewise, `undetermined` is an
869
- intermediate census disposition, not a reason to stop early. Continue
870
- deterministic batched implementation tracing until exact identity discovery has
871
- stabilized, even when downstream semantic decisions remain partial.
872
-
873
- Spend the allocation. Calls are the budget, and stopping early is not thrift: an
874
- under-spent budget shows up as missing inventory or an unanswered injection
875
- category, both of which block the map. The injection allocation is additional to
876
- the inventory allocation, not carved out of it — do not drop resources, external
877
- dependencies or edges in order to answer the injection categories.
878
-
879
- Budget repository inspections, not files. A deterministic extractor that
880
- walks the already-enumerated retained file list is one inspection call; never
881
- spawn one tool call per file when a single read-only batch can emit stable
882
- path/symbol records. Pre-create its output directory, preflight one file, then
883
- run the source-wide batch. At a cutoff, every exact identity already discovered
884
- must be retained in the relevant census and closure-candidate ledger; every
885
- semantically closed identity must also be emitted as a full final row.
886
- `uncovered` may name an uninspected range or unresolved dynamic key source; it
887
- may not hide already-discovered selector owners, state roots, or egress calls
888
- that were omitted from the census.
889
-
890
- `budget.primary_discovery.elapsed_seconds` records repository tool-execution
891
- time, not your own wall clock; model latency is not a property of the map. Its
892
- 1800-second ceiling is a backstop, not a target.
893
-
894
- Before deep implementation reads, census all structured discovery surfaces:
895
- arrays, maps, factories, manifests, generated tables and their inputs, feature
896
- enums, module indexes, CLI command registries, package entrypoints, and launch
897
- registries. A surface becomes a structured-registry ledger only when exact
898
- registration, factory, dispatch, manifest, or entrypoint evidence proves that
899
- its keys select distinct production behavior or implementation identities.
900
- Inventory-category relevance is not an admission condition: a registry whose
901
- entries all link `not-applicable` to runtime, state, and external inventory still
902
- belongs in the registry census. Command dispatch, UI component/render dispatch,
903
- parser and formatter factories, field/entity factories, protocol-operation
904
- dispatch, migration/template dispatch, feature-behavior gates, and constant maps
905
- that select concrete implementations are registries. Plain enums, lists, route
906
- declarations, metrics, constants, and feature flags with no concrete dispatch
907
- are not registries merely because they are structured collections.
908
- Batch-enumerate every exact key of each proven registry first, then trace
909
- implementations. Do not spend the final closure
910
- allocation while a known registry still lacks a stable-ID entry ledger. An
911
- optional profile or unselected default does not justify sampling or omitting
912
- provider entries.
913
-
914
- Freeze `selector_surface_census.discovery_roots` during this first pass. Add one
915
- row immediately for every exact typed selector field, registration owner,
916
- command tree, static dispatch map, switch/if dispatch, generated table, decoder,
917
- or lifecycle selector before enumerating its entries. Give it the exact owner,
918
- selector domain, source identity, and eventual selector-surface ID. Every known
919
- root becomes exactly one selector surface even if its final entries remain
920
- empty under partial closure; never leave a discovered root only in `uncovered`.
921
- A partial family with no semantically resolved key yet uses `entries: []`,
922
- `fallback_default: none-proven`, and either an `entry_enumeration_blocker` with
923
- exact evidence naming the dynamic-key or uninspected-source boundary, or a
924
- `semantic_trace_blocker` when observed keys await implementation, category-link,
925
- or nested-registry closure. Remove the enumeration blocker as soon as the first
926
- key is observed; remove the semantic blocker only after every observed key is
927
- admitted or evidenced non-registry.
928
-
929
- Join a discovered source record to a root only by its exact normalized path and
930
- enclosing declaration identity. Never assign records by scan order, nearest
931
- line, shared vocabulary, family label, or a path-only bucket. A comment,
932
- generated helper, parser support call, lock, cache, or getter inside the same
933
- file is not owned by a registry merely because it is nearby. If the enclosing
934
- owner does not equal the root's `source_identity_key`, keep the source record
935
- unjoined until its exact owner is emitted, or record an exact non-registry
936
- decision. Before generation, assert that every mapped raw selector record lies
937
- inside the full source region of its mapped owner and that no record is reused
938
- across unrelated owner facets.
939
-
940
- Treat 25 or more entries, 100 or more candidate modules/manifests, or a retained
941
- source tree too large to enumerate reliably by hand as scale mode. In scale
942
- mode, use a deterministic read-only extraction script in private scratch to
943
- enumerate tracked structured keys and source paths into stable-ID-sorted data.
944
- Generate repetitive candidate and artifact rows from that data, then validate
945
- the generated YAML. Do not manually transcribe, sample, summarize to one family
946
- record, or spend one tool call per entry. The extractor must derive from generic
947
- repository structure; never encode repository names or a sealed holdout answer
948
- key.
949
-
950
- The scale extractor must preserve the decision-bearing gate. It may use broad
951
- syntax scans to *find* candidate collections, but it must not emit each literal
952
- list or mapping as a registry. For every emitted registry, retain exact evidence
953
- of the selection/dispatch relationship and derive a semantic stable ID from that
954
- relationship. An opaque hash is not a substitute for identifying what production
955
- implementation choice the registry makes.
956
-
957
- Do not flatten a global registration table into one family when production
958
- lookup sites constrain distinct namespaces, typed fields, subcommands, config
959
- blocks, or lifecycle stages. The physical table is one discovery source, but
960
- each independently consumed owner-plus-selector-domain is its own logical
961
- registry family. Reuse exact implementation keys across those families when the
962
- same leaf is selectable in several domains. For each entry whose selected
963
- implementation owns another selector root, emit the exact parent-entry to child-
964
- family edge; partial semantic tracing does not justify dropping a structurally
965
- proven edge.
966
-
967
- Do not let one dominant manifest, plugin, or provider index stand in for the
968
- surface census. Before artifact generation, separately resolve every discovered
969
- package executable or entrypoint map, dynamic module-import selector, registered
970
- factory or provider interface, and configuration-driven implementation dispatch
971
- table. Emit each genuine inventory registry or preserve an exact evidenced
972
- non-registry decision. Finding and exhaustively enumerating the largest registry
973
- does not close the smaller root-selector frontier.
974
-
975
- In scale mode, emit both the selector census and every category-known closure
976
- candidate in the same deterministic generation pass. For a mixed registry,
977
- retain an exact non-applicable decision for every key excluded by a per-entry
978
- category discriminator and an unresolved candidate only where exact structured
979
- metadata cannot decide. Stable-ID sort both outputs and generate their paired
980
- atomic census evidence; do not finish after producing only the selector ledger.
981
-
982
- A positive structured discriminator is authoritative for census breadth until
983
- contradicted by stronger exact evidence. Implementation tracing refines
984
- activation, consumers, ownership, and padding; the absence of a direct import,
985
- literal host, or client constructor does not erase a positive manifest or
986
- registration decision because transport may be transitive. In particular, a
987
- structured I/O declaration is an external-interaction positive whether it says
988
- local/device polling, local/device push, cloud polling, or cloud push. `local`
989
- describes destination placement, not an in-process internal link. Project the
990
- entry first, then exclude only with exact evidence that it is calculated,
991
- in-process plumbing, dead/removal-only code, or duplicate reproduction identity.
992
- Before final generation, apply those exact counterevidence decisions across the
993
- whole extracted set; do not leave an entry as an external census positive when
994
- its reachable production body proves that it is only a tombstone, migration or
995
- error shim, or process-internal transformation with no boundary crossing.
996
-
997
- Before leaving a scale registry with `undetermined` projections, exhaust generic
998
- read-only signature passes over the retained production sources. Derive exact
999
- identities from syntax and structured keys—not names or summaries—and batch at
1000
- least these surfaces when the repository's languages expose them: executable
1001
- and worker registrations; configuration schemas and connection fields; client,
1002
- SDK, transport, producer, and consumer construction; URL, host, endpoint, topic,
1003
- bucket, and namespace constants; migration and schema roots; storage adapters
1004
- and durable read/write calls; backup providers; and generated registry inputs.
1005
- Every exact positive becomes a category candidate even when activation,
1006
- consumer, or backing-state semantics remain unresolved. It becomes a final
1007
- top-level row only after those semantics close.
1008
-
1009
- Make that surface pass language-aware instead of relying on broad vocabulary.
1010
- For Java or Kotlin, batch `META-INF/services`, service-loader calls,
1011
- reflection/class-name construction, factory/provider maps, configuration fields
1012
- that carry implementation classes or type keys, annotation-driven command or
1013
- plugin dispatch, and the transitive concrete subtype closure of every selected
1014
- provider interface or abstract base. Follow subclasses of subclasses; do not
1015
- stop at direct implementers, configured defaults, or example values. Retain
1016
- configuration aliases and sentinel/default selectors as exact entries even when
1017
- they resolve to a class already present under another key. Treat behavior-
1018
- selecting enum constants as a registry family, not as ordinary constants.
1019
- Annotation closure includes annotated abstract bases and command-group nodes as
1020
- well as concrete leaves: addressability comes from the dispatch annotation, not
1021
- from class concreteness. A packaged executable remains an entry in an
1022
- executable registry even when the same launcher is also the mapped long-running
1023
- runtime role. Treat a
1024
- packaged command table, command annotation index, or executable dispatch map as
1025
- a registry when exact keys select distinct production-capable implementations,
1026
- even when every implementation is a finite batch that is also a runtime role.
1027
- For Go, batch `init` registration calls,
1028
- factory maps, blank-import plugin sets, and interface-backed config selectors.
1029
- For Rust, batch enum dispatch plus `inventory`, `typetag`, feature-gated module
1030
- registrations, and trait-object constructors. For Python, batch packaging entry
1031
- points, import-string selectors, plugin managers, command groups, and provider
1032
- dictionaries. For JavaScript or TypeScript, batch package entrypoints, command
1033
- and adapter maps, dependency-injection tokens, and exact dynamic-import tables.
1034
- Equivalent mechanisms in other languages receive the same treatment. Record
1035
- each positive surface as an emitted registry or an evidenced non-registry
1036
- decision before declaring the root-selector frontier closed.
1037
-
1038
- Prioritize production IaC, deployment manifests, checked-in deployment or
1039
- service catalog descriptors, container builds, artifact pipelines, entry points, client
1040
- construction, connection config names, migrations, schemas, producers,
1041
- consumers, workers, scheduled jobs, routes, RPC, messages, browser entry points,
1042
- observable outputs, and declared network destinations. Do not use cloud CLIs,
1043
- provider discovery APIs, production endpoints, or production credentials.
1044
-
1045
- Config-declared destinations are the easy half. Sweep for the ones reached from
1046
- code before closing discovery, because a destination named nowhere in
1047
- configuration is the one most often missed:
1048
-
1049
- - host literals and URLs written in source rather than in config or env defaults;
1050
- - client or SDK constructors carrying a vendor default endpoint used when no
1051
- override is set;
1052
- - assets fetched at startup or on first use, such as model weights, geo
1053
- databases, word lists, or template and font bundles;
1054
- - authentication strategy and identity-provider registrations, which name a
1055
- destination the customer supplies rather than a fixed host; and
1056
- - telemetry exporters constructed in code, including one handed a
1057
- caller-supplied endpoint.
1058
-
1059
- A destination that appears only in code is still an external dependency. When a
1060
- flag or feature gate selects it, record it once with `activation: optional`
1061
- rather than dropping it because no configuration names it.
1062
-
1063
- Before synthesis, build `evidence.yml`'s topology closure ledger, keyed only by
1064
- stable candidate and subject IDs. Enumerate every long-running launch surface
1065
- from Compose services, Kubernetes workloads, Helm templates, systemd units,
1066
- Procfiles, process-manager and supervisor configuration, container `CMD` and
1067
- `ENTRYPOINT`, package scripts, shell launchers, and application service
1068
- metadata. Follow wrappers to the executable entrypoint. Resolve every
1069
- discovered command or process to either a runtime role ID or an explicit
1070
- exclusion with exact evidence and a reason such as build-only, test-only, or
1071
- non-production-only. A finite production-reachable CLI, admin command,
1072
- migration, or batch is a runtime role; duration and normal exit are not
1073
- exclusion bases. Keep every exact wrapper or entrypoint identity separate, and
1074
- never summarize multiple launchers with a family exclusion. The deterministic
1075
- launcher census binds each wrapper to its own role candidate. A runtime mapping
1076
- never substitutes for registry census. Follow
1077
- nested command groups and annotation-driven subcommands even though their
1078
- top-level category projections are all `not-applicable`.
1079
- Do not finish while a launch surface is unaccounted for.
1080
-
1081
- Resolve at independently restartable deployment-unit granularity, not merely
1082
- container, command, or profile granularity. A PID 1 supervisor that stays alive
1083
- and manages multiple named longruns is one runtime role, and each child that is
1084
- independently started/stopped and remains alive is another, even when they share
1085
- one image. Do not split setup/init/migration commands, an inseparable
1086
- master/worker pool, or a web/static facet served by an already-recorded process.
1087
- A separately launched database, cache, broker, or search-engine process is
1088
- also a pinned-infrastructure runtime role even when its application purpose
1089
- is to realize a mapped stateful resource; preserve both its launch unit and
1090
- its state concern. A Compose service,
1091
- alternative-profile label, interface, or external-dependency entry cannot close
1092
- a launch surface; the ledger must point to an exact
1093
- `services[].runtime_roles[]` ID. Include concrete optional companions from
1094
- production-intended or supported self-host recipes. Exclude a companion whose
1095
- only launch evidence is local development, test, CI, an example, or a worktree
1096
- helper.
1097
-
1098
- Use this long-running role checklist to challenge the ledger, even when a role
1099
- is implemented in the same repository or image as the main application:
1100
-
1101
- - edge proxy, static server, reverse proxy, and load balancer;
1102
- - web, API, realtime, and WebSocket server;
1103
- - queue consumer, task processor, search or full-text indexer;
1104
- - scheduler, cron runner, and asynchronous task worker;
1105
- - lifecycle, expiry, retention, compaction, and garbage-collection daemon;
1106
- - process supervisor, watchdog, and auto-heal process;
1107
- - SSH daemon, monitoring server or exporter, and managed backend-plugin child;
1108
- - network relay, privacy proxy, tunnel, or other separately launched egress helper;
1109
- - mount, block-device, filesystem, network-namespace, DNS, or virtual-machine helper;
1110
- - replication, mirroring, synchronization, import, or export process;
1111
- - cluster application coordinator or separately launched control process;
1112
- - sandbox, agent, code runner, or other isolated execution runtime; and
1113
- - a separately launched documentation or static-site server that is inside the
1114
- selected application boundary.
1115
-
1116
- A separately executable production-capable proxy, gateway, worker, or helper is
1117
- an optional runtime role even when the default container, packaging manifest,
1118
- or selected hosted profile does not launch it. Exclude it only with evidence
1119
- that it is build-only, test-only, documentation-only, or outside the selected
1120
- application boundary; “not the default artifact” is not an exclusion.
1121
-
1122
- Also resolve exact execution facets inside a packaged executable. Distinct
1123
- server, worker, scheduler, consumer, maintenance-daemon, and watch modes are
1124
- separate runtime roles only when each is independently deployed or restarted
1125
- and stays alive, even if they share a binary and artifact. Scheduled, injected,
1126
- sidecar, and host-managed long-running production processes receive the same
1127
- treatment. An init or setup command that prepares another unit is not an extra
1128
- role. Preserve the exact mode, task, schedule, and a unique
1129
- `deployment_unit_identity_key` in `structured_identity`.
1130
-
1131
- Close state in the same way. Enumerate databases and logical databases, search
1132
- indexes, caches, brokers, queues and streams, object-storage buckets, backups,
1133
- embedded databases, remote filesystems, and mounted storage. Resolve each
1134
- candidate by exact structured identity to one resource ID or to an evidenced
1135
- exclusion; never merge or suppress it by similar text.
1136
-
1137
- Admit only independent reproduction units. `structured_identity.state_unit_kind`
1138
- is one of `logical-database`, `database-schema`, `cache-namespace`,
1139
- `search-index`, `queue-or-stream`, `credential-file`, `trust-material-file`, `tls-keypair`,
1140
- `object-bucket-or-prefix`, `persistent-volume-or-directory`,
1141
- `portable-snapshot`, `installed-artifact`, `packaged-installation-layout`,
1142
- `generated-host-state`, `immutable-packaged-asset`, or
1143
- `repository-proven-independent-object`. It also records an exact unique
1144
- `address_token` and exact `reproduction_token`, both supported by the atomic
1145
- state-owner evidence. Neither token may be a placeholder. A final row may use
1146
- `reproduction.strategy: unresolved` only while the matching category remains
1147
- partial and names that exact reproduction frontier; it can never support
1148
- complete closure. Include a portable container and a contained
1149
- file, database, generated artifact, installed binary, or packaged asset when
1150
- each has its own exact address and reproduction operation. Do not promote an
1151
- unaddressed table, projection, index,
1152
- field, or record inside an already copied database, nor a remote import object,
1153
- provider option, operator-supplied input, or discovery response. A finer-grained
1154
- child becomes a resource only when exact repository evidence proves that it is
1155
- independently addressed and independently preserved, copied, rebuilt, reset,
1156
- restored, installed, replaced, or launched.
1157
-
1158
- Network location does not decide the category. A database, directory, broker,
1159
- queue, stream, object store, registry, secret store, model store, or search/log
1160
- index that owns application-relevant state is a `resource` even when a managed
1161
- provider hosts it. When a runtime reaches that resource over a network protocol
1162
- or API, also map the service interaction as an `external_dependency`; routing,
1163
- emulation, and production-isolation control are a separate reproduction action.
1164
- Link both concerns. A local, embedded, in-process, or file-backed resource stays
1165
- resource-only unless it has separate application egress. Every external entry
1166
- must state whether `backing_state` is
1167
- `none` or `covered-by-resources`; the latter links exact resource IDs so a
1168
- network API cannot silently replace its state reproduction concern. Its
1169
- `evidence_ids` must include one decision-grade atomic evidence record whose
1170
- exact `subject_ids` jointly name that dependency and every linked resource.
1171
- Use `state-boundary-link` for `covered-by-resources`,
1172
- `external-interaction-boundary` for `interaction-only`, or
1173
- `external-ownership-unresolved` for `remote-ownership-unproven`; its
1174
- `external_backing_basis` and `external_operation` repeat the final decision,
1175
- and named state also repeats `remote_state_identity_key`. Evidence that mentions
1176
- only the client or only the store does not prove their boundary. Also
1177
- record `basis: interaction-only` or `remote-ownership-unproven` with `none`, and
1178
- use `repository-declared-state-owner`, `repository-proven-remote-state`, or
1179
- `authoritative-catalog-state-owner` with `covered-by-resources`. A configured
1180
- endpoint, constructed SDK client, or provider name alone does not establish a
1181
- state owner. Exact implementation evidence that performs a typed durable
1182
- operation on a named remote namespace does; record it as
1183
- `repository-proven-remote-state` with `named-remote-read` or
1184
- `named-remote-write`.
1185
-
1186
- A named remote read establishes a state resource only when repository evidence
1187
- also proves an exact application-owned provision, preserve, reset, restore,
1188
- replace, or recreate operation for the addressed object. Provider metadata,
1189
- discovery records, identity documents, signing-key documents, downloaded user
1190
- content, and operator-supplied remote inputs remain external interactions when
1191
- the application only consumes them. Do not invent ownership merely because a
1192
- response affects behavior. If state ownership or independent identity is
1193
- unresolved, retain the observation and pending candidate, keep state closure
1194
- partial, and do not emit a final state row. If only the materialization strategy
1195
- is unresolved, the exact final identity may remain while closure stays partial.
1196
-
1197
- Classify the exact operation before choosing the backing-state disposition.
1198
- Every external dependency records `operation` as `named-remote-read`,
1199
- `named-remote-write`, `named-remote-read-write`, `stateless-exchange`, or
1200
- `unresolved`. A named operation also records an exact
1201
- `remote_state_identity_key` for the addressed object, namespace, or provider
1202
- contract and must use `covered-by-resources`. `stateless-exchange` is the only
1203
- operation compatible with proven `interaction-only`; uncertainty uses
1204
- `unresolved` with `remote-ownership-unproven`. The boundary evidence repeats
1205
- both the operation and remote-state identity key. This decision order prevents
1206
- a discovered service client from hiding the state payload it reads.
1207
-
1208
- Inventory remote reads and writes at exact boundary-operation identity.
1209
- Distinct effectful methods remain distinct external contracts even when one
1210
- client, provider, or user flow owns them. Conversely, provider, scheme, OS,
1211
- wrapper, and consumer variants of the same semantic operation are one top-level
1212
- operational subject, with variants retained in evidence or selector registries.
1213
- Emit a resource/external pair only when the addressed object also passes the
1214
- independent application-owned reproduction test; otherwise emit only the
1215
- external operation. Never use one broad flow row for several calls or split one
1216
- call by provider or consumer.
1217
-
1218
- Before projecting an external candidate, reopen the selected implementation
1219
- body and prove the exact boundary-crossing call. Constructors, authentication
1220
- and client-configuration modes, retry or polling timers, protocol selectors,
1221
- and wrappers that only build or call child handlers are not separate external
1222
- operations. Keep those choices in their selector registries and mark their
1223
- external category projection not applicable unless the branch itself performs
1224
- a distinct addressed operation. Group candidate call sites by exact operation,
1225
- object identity, and destination contract; if two candidates differ only by
1226
- scheme, transport, client-construction mode, or wrapper strategy, retain one
1227
- top-level dependency and never manufacture variant-specific subjects merely to
1228
- make category candidates unique.
1229
-
1230
- Apply that test at registry-contract granularity as well as per implementation.
1231
- When an exact provider interface or factory contract exposes durable
1232
- create/read/write/delete/list operations over backups, objects, buckets,
1233
- collections, topics, streams, tables, indexes, identities, policies, keys, or
1234
- other named namespaces, the contract is a positive state discriminator for each
1235
- reachable provider entry. Create a state candidate for every provider keyed by
1236
- its exact registry identity; do not wait for a provider-specific host literal or
1237
- duplicate the same interface trace in every implementation. If the provider is
1238
- reached through a network protocol or service API, also create its external-
1239
- interaction candidate. Close the concrete namespace, consumer, and reproduction
1240
- strategy before admitting either candidate to final inventory.
1241
-
1242
- When that same exact provider contract is network- or API-backed, join its state
1243
- and interaction candidates by stable ID in the same deterministic generation
1244
- pass. Once both are semantically closed, emit `backing_state:
1245
- covered-by-resources` on the external row, link the exact provider-derived
1246
- resource ID, and add one joint `state-boundary-link` atomic record whose subject
1247
- set contains both IDs. A partial closure may retain the joined candidates, but
1248
- it may not emit either as an unresolved final row.
1249
-
1250
- `remote-ownership-unproven` is an unresolved state-boundary result, not proof
1251
- that no state exists. If any external dependency retains that basis, mark
1252
- stateful-resource closure `partial` and name the unresolved dependency IDs.
1253
- Only `interaction-only` may support a complete state ledger with
1254
- `backing_state: none`.
1255
-
1256
- Judge ownership from interaction semantics as well as location. Repository
1257
- declarations that select mutable tables, objects, topics, schemas, catalog
1258
- metadata, directory identities/groups, authorization policies, tenant/client
1259
- registrations, or encryption keys establish a state-owner concern even when
1260
- the bytes live behind a remote protocol. Map that concern as a resource and
1261
- link the service interaction with `covered-by-resources`. A stateless inference
1262
- call, webhook receiver, credential exchange, or arbitrary URL still uses
1263
- `backing_state: none` only when implementation evidence proves the exchange has
1264
- no retained state relevant to reproduction. Persistent telemetry/log/metrics
1265
- destinations, broker topics, object namespaces, identity/policy/key sets, and
1266
- catalog namespaces are resources when exact typed durable operations are proven.
1267
- If ownership remains ambiguous, use `remote-ownership-unproven` and keep state
1268
- closure partial; do not default it to `interaction-only`. `none` here describes
1269
- only backing state: a reachable token,
1270
- credential, identity, telemetry, webhook, inference, or URL call is still an
1271
- `external_dependency` and must not be excluded from egress inventory.
1272
-
1273
- Close state on two axes: every persisted mount or path, and every supported
1274
- engine or provider selected behind it. A broad filesystem or application-data
1275
- volume does not cover an embedded database, persistent queue, or on-disk search
1276
- index inside it unless the resource entry explicitly names that engine, state
1277
- semantics, and reproduction action. Enumerate the default local engine and each
1278
- supported mutually exclusive engine; one polymorphic resource may cover them
1279
- only when its kind, strategy, and evidence explicitly span every variant.
1280
- Separately mounted model, cache, metrics, and dashboard data count when they
1281
- require their own provision, bind, rebuild, or reset action, even if
1282
- rebuildable. Continue excluding in-memory boot caches, unmounted scratch, and
1283
- state already reproduced by an identical parent action.
1284
-
1285
- Provisioned writable capacity counts when a selected feature requires a
1286
- separate mount, directory, or reset action even if spill/cache contents may
1287
- start empty. Process-local state counts when required behavior needs an
1288
- explicit reload or seed action after launch. Do not promote a scratch or lock
1289
- file that is merely a child of already provisioned capacity, and do not turn a
1290
- remote service client into local state.
1291
-
1292
- As a separate state-frontier pass, enumerate every production configuration
1293
- field that names a writable directory, database, queue/topic, archive/export or
1294
- restore command, key/trust/password file, or generated log/output destination.
1295
- Trace the consumer for each exact field. Keep independently provisioned paths
1296
- and independently invoked command hooks as distinct candidates even when they
1297
- serve one feature; merge them only through the exact reproduction-action test
1298
- below. Disabled-by-default audit, query-log, backup, export, and restore paths
1299
- remain optional inventory rather than disappearing from the census.
1300
-
1301
- In the same batched pass, enumerate mutable production roots that survive one
1302
- request, event, or callback: module/global registries, maps, sets, keyed slices,
1303
- atomics, counters, metric vectors, listener/connection pools, buffer or writer
1304
- pools, caches, session/ticket/key rings, subscription tables, in-flight
1305
- coordination, timers/schedules, locks and leases, generated identities, and
1306
- nested child collections. Retain each exact owner/root/key identity first;
1307
- semantic tracing may later exclude a truly request-local temporary, but a broad
1308
- parent container or shared physical file may not erase independently keyed
1309
- children.
1310
-
1311
- Write this pass into
1312
- `stateful_resources.state_surface_discovery` before synthesizing resources.
1313
- Include exact configured keys, persisted entity declarations, installed
1314
- artifacts, scheduled state, host-persistent state, remote loaders, writable
1315
- paths, generated outputs, and identity-material slots. Give every exact surface
1316
- its own ID. Mark it `candidate` only when it establishes an independently
1317
- preserved logical identity; otherwise retain it as `non-resource` with the
1318
- implementation-based reason. Generic config roots, loader directories,
1319
- selector values, WAL children, mount plumbing, and ambient metadata are not
1320
- automatically resources. Multiple true surfaces may resolve through one
1321
- candidate only with exact `shared_binding_evidence_ids`.
1322
-
1323
- Then write `stateful_resources.logical_state_census`. Do not stop at the
1324
- physical database, bucket, table, directory, topic, prefix, volume, or remote
1325
- namespace. Starting from every persistent write, update, delete, append,
1326
- install, snapshot, export, restore, registration, and lease operation,
1327
- enumerate the exact logical identity it mutates. Record its materialization
1328
- root separately from its independently keyed identity, the exact source owner,
1329
- all key/discriminator/prefix/path components, mutation operations, and the
1330
- state-surface rows that led to it. A bucket name, table name, namespace root,
1331
- or key prefix cannot stand in for records addressed by a member ID, user/role
1332
- name, object key, tenant, lease, contender, candidate, registration, version,
1333
- or other record component.
1334
-
1335
- Give every logical row exactly one state candidate. Physical containers remain
1336
- separate `materialization-container` rows when reproducing the container is an
1337
- independent action. Each container must either enumerate all of its keyed child
1338
- rows, prove from exact implementation evidence that it has no independently
1339
- keyed children, or keep logical-state and stateful-resource closure partial.
1340
- Never use `none-proven` merely because the bytes share one database file or
1341
- snapshot action. Shared physical copy actions belong in materialization
1342
- grouping; they do not merge logical resource identities.
1343
-
1344
- Treat portable snapshot/export files and packaged installation layouts as
1345
- explicit state frontiers. If production-capable code can create, save, export,
1346
- restore, import, install, unpack, or launch from a durable artifact or layout,
1347
- emit the exact `portable-snapshot` or `installed-layout` logical identity and
1348
- its source surface. A generated snapshot is not covered only by the live
1349
- database it captured, and an installed executable/config/unit layout is not
1350
- covered only by its build artifact or container descriptor.
1351
-
1352
- Apply the independent-reproduction-unit test before promoting physical state.
1353
- A full resource needs both an independently addressed stable logical key and an
1354
- independent preserve, copy, rebuild, reset, restore, install, replace, or launch
1355
- action. Physical blocks, indexes, rotation generations, transport files,
1356
- temporary staging IDs, memory-only variants, and implementation leaves copied
1357
- or reset only with their logical parent stay non-resource rows. Represent
1358
- storage engines, encodings, and file-versus-memory choices in selector
1359
- registries instead of splitting one logical identity into backend-specific
1360
- resources.
1361
-
1362
- Expand installed layouts to each independently installable, replaceable, or
1363
- launchable shipped identity: executable, service/unit definition, container
1364
- image, host registration, or equivalent. A directory or package family is not
1365
- one logical identity when those members can be installed or replaced
1366
- separately. Give portable snapshots and exports a content digest, version,
1367
- manifest, or other durable content identity; never key them by an invocation,
1368
- temporary path, staging token, or generated run ID.
1369
-
1370
- For every logical-state row—not only a materialization container—inspect the
1371
- serialized value and every nested map, set, repeated child, session member,
1372
- binding, or record collection. Set `contained_identity_disposition` to
1373
- `enumerated` and list every independently keyed child, `none-proven` with exact
1374
- implementation evidence, or `unresolved` while closure is partial. A record
1375
- that serializes a keyed child collection is itself a container boundary for
1376
- this check even when its `logical_kind` is not `materialization-container`.
1377
-
1378
- Repeat each mapped logical row's exact `source_owner_identity_key`,
1379
- `materialization_root_identity_key`, and `key_components` in its top-level
1380
- resource `structured_identity`. These fields must match mechanically. This
1381
- prevents a broad resource label from surviving after the census discovered a
1382
- more precise owner, root, or record key.
1383
-
1384
- Resolve `source_owner_identity_key` to the real declaration or mutator present
1385
- in source; never synthesize a convenient method name or point at a registry,
1386
- schema, comment, or caller that does not own the state operation. Except when
1387
- the materialization root is itself the complete independently reproducible
1388
- identity, `key_components` must include a semantic discriminator beyond that
1389
- root: filename, document/object key, provider namespace, certificate role,
1390
- plugin/module version, log stream, account, or equivalent exact identity.
1391
- Before closure, challenge every row whose components contain only the root and
1392
- every owner symbol that the language-aware declaration census cannot resolve.
1393
-
1394
- Use exact logical identity as the inventory deduplication gate and physical
1395
- reproduction identity as the materialization grouping gate. Keep separately
1396
- keyed logical queues, databases, namespaces, indexes, installed material,
1397
- outputs, and persisted identities as separate resources even when their
1398
- `physical_binding_id`, state cut, and copy/rebuild/reset action are identical.
1399
- Collapse only exact aliases of the same logical identity. Similar consumers,
1400
- semantic labels, paths, providers, or physical co-location do not prove an
1401
- alias.
1402
-
1403
- Close egress from call sites, not configuration vocabulary. Trace constructed
1404
- HTTP, RPC, SDK, telemetry, error-reporting, update, status, push, certificate,
1405
- and authentication clients. A config name or URL constant without a reachable
1406
- client call is only a candidate and must not become an entry. Conversely, a
1407
- reachable default endpoint with no concrete gate belongs in the inventory even
1408
- when no deployment file names it. Reconcile the result against each subject's
1409
- persisted `activation_basis` before classifying activation.
1410
-
1411
- Record both the caller and interaction direction for every external candidate
1412
- in `structured_identity.interaction_direction`: `outbound`,
1413
- `inbound-required`, `bidirectional`, or `host-mediated`. Required inbound
1414
- clients, pull consumers, registries/discovery services, and host services are
1415
- external reproduction interactions even when application code does not open
1416
- the first connection. A route by itself, a destination handed to an unrelated
1417
- actor, or a browser-facing URL rewrite is not enough; require source or topology
1418
- evidence that the external actor is necessary for the selected application.
1419
- Record a configured outbound proxy when selected application calls traverse it.
1420
- Do not let a broad remote, plugin, or provider-family entry cover a distinct API
1421
- client unless their call path, transport semantics, and reproduction action are
1422
- the same. A passive hyperlink or rendered URL is not a dependency merely because
1423
- navigation may leave the application. Code that invokes an OS/browser launcher
1424
- is a host-mediated operation; an authorization redirect whose callback is
1425
- consumed is an outbound operation plus the separately opened inbound listener.
1426
- Traffic to another incarnation of the same mapped runtime role that jointly
1427
- realizes the same in-universe service or state resource is an internal runtime
1428
- link, not an external dependency. Map it externally only when exact topology
1429
- evidence selects a separate outside-universe service or cluster.
1430
-
1431
- Do not create one external dependency per route or count same-universe cluster
1432
- peers, configuration/environment/filesystem reads, signals, ordinary DNS
1433
- resolution, or process-local system calls. Do retain each independently
1434
- reproduced listener or service interface when production behavior requires an
1435
- outside ingress, browser/client, controller, puller, registry, or peer at that
1436
- boundary; the listener is an `inbound-required` contract even though
1437
- application code accepts rather than opens the connection. Runtime-invoked
1438
- executables and persistent host services remain external interactions. Keep one
1439
- row for the top-level listener or pull contract, not its routes, upgrade modes,
1440
- or protocol variants. Group provider/configuration variants that share one
1441
- call-site identity and exclude calls whose target is another mapped runtime
1442
- role. Every external structured identity records a unique exact
1443
- `operation_identity_key`, exact source owner, exact `operation_token`, direction,
1444
- allowed `boundary_contract_kind` (`outbound-operation-family`,
1445
- `host-operation`, `required-inbound-listener`, `required-pull-listener`, or
1446
- `bidirectional-operation-family`), and nonempty destination or scope key
1447
- components. A protocol, provider, or client-family label is not enough.
1448
-
1449
- Apply operation granularity consistently. Object stores and similar SDKs expose
1450
- list, head/metadata, get/download, put/upload, copy, and delete as distinct
1451
- contracts when those calls are reachable. Authentication or identity clients
1452
- may independently redirect, exchange tokens, fetch user information, fetch
1453
- supplemental data or signing keys, and download content. Merge the same call
1454
- across providers and consumers; do not bundle these distinct effects into one
1455
- storage, OAuth, host, or browser “operations” row. A separately opened redirect
1456
- or callback listener is its own required inbound contract. Host-operation rows
1457
- likewise represent one semantic effect family, not an arbitrary bundle of
1458
- filesystem, environment, process, and subprocess capabilities.
1459
-
1460
- If a source manifest, registration record, client constructor, or implementation
1461
- body proves a real optional interaction but the exact consuming role is not yet
1462
- traced, keep the dependency in `external_dependencies` with empty role and edge
1463
- lists and unknown-production-state activation. If remote ownership is unclear,
1464
- use `remote-ownership-unproven` and keep state closure partial. Never drop the
1465
- interaction while waiting for those semantic decisions.
1466
-
1467
- Sweep runtime-invoked executables as external interactions too. A subprocess,
1468
- shell command, package tool, credential helper, media converter, or other
1469
- one-shot executable invoked by a mapped role is an external dependency when it
1470
- crosses the application runtime boundary, even though the executable itself is
1471
- not a long-running runtime role. Keep managed child RPC that remains inside one
1472
- mapped runtime internal; distinguish the two with exact call-path and lifecycle
1473
- evidence.
1474
-
1475
- At the start of discovery, build
1476
- `coverage.selector_surface_census` from exact source owners before synthesizing
1477
- registries. Census executable dispatch, plugin/provider factories,
1478
- persistence/schema/snapshot dispatch, lifecycle pipelines, behavior enums and
1479
- allow-lists, configuration selectors, dynamic modules, packaging entry points,
1480
- and generated inputs. Each source-owner row records its exact construct kind,
1481
- owner identity, enumeration method, availability predicates, and either one
1482
- emitted registry ID or an evidenced `non-registry` decision. Do not use `*`,
1483
- "all", family prose, or a sampled member as a substitute for enumerating exact
1484
- structured selector values. Every emitted registry family must resolve from
1485
- exactly one selector-owner row.
1486
-
1487
- The census begins with the append-only `discovery_roots` ledger. Every root has
1488
- an exact owner identity, selector domain, repository path-plus-symbol source
1489
- identity, evidence, and one surface ID. Every surface has exactly one root. A
1490
- known typed field or switch cannot be deferred as prose: emit the family and
1491
- retain every observed key on its selector surface. As soon as an exact key maps
1492
- to an exact implementation, also emit an `entries[]` row with
1493
- `trace_status: identity-complete` while discovery remains partial; category-link
1494
- or child-registry uncertainty does not erase it. Final receipt upgrades that row
1495
- to full category links and a child-registry decision. Zero known keys require the family's exact
1496
- `entry_enumeration_blocker`; the blocker is not a substitute for already known
1497
- keys.
1498
-
1499
- Run this as a deterministic source-wide pass, including fixed scalar config
1500
- keys, enum/tag decoders, switch dispatch, build/platform selectors, generated
1501
- tables, command keys, type selectors, defaults, and fallbacks that choose
1502
- production implementations, commands, or lifecycle paths. Record exact
1503
- `observed_selector_keys` and distinct `observed_implementation_keys` on every
1504
- surface. A `non-registry` decision is valid only when exact source structure
1505
- selects at most one production implementation. Free-text explanation cannot
1506
- hide a multi-implementation decision family.
1507
-
1508
- Then inventory each category's structured registry surfaces. Look
1509
- for arrays, maps, generated tables, module indexes, provider or plugin
1510
- registrations, factory dispatch, driver catalogs, manifest lists, and code
1511
- generation inputs that enumerate implementations. Record each surface under
1512
- that category's `structured_registry_discovery.registries` with a stable ID,
1513
- exact evidence, enumeration status, and the exact entries it produced.
1514
- Enumerate entries from structure, never by fuzzy matching names or summaries.
1515
- A complete empty registry needs an evidenced `empty_reason`; a category with no
1516
- registry surfaces needs an evidenced `absence_reason`. If a generated file,
1517
- dynamic loader, submodule, build input, or budget boundary prevents exhaustive
1518
- enumeration, mark both registry discovery and the category `partial` and name
1519
- the uncovered scope. One broad “plugin system” candidate never closes a
1520
- registry containing independently selectable integrations. Under every
1521
- registry, emit one final `entries[]` record per semantically traced structured
1522
- key, symbol, module, or manifest entry. Give it a stable ID, exact unique
1523
- `selector_key`, exact `selector_token`, exact `selection_predicate`, exact
1524
- `implementation_key`, distinct exact `implementation_token`, and evidence.
1525
- Untraced observed keys remain on the selector surface and keep the registry
1526
- partial. Registry
1527
- families also retain the exact source-owner identity, selector domain,
1528
- enumeration method, and fallback/default. Preserve aliases as separate selector
1529
- entries even when several keys resolve to one implementation; implementation
1530
- keys therefore may repeat, while selector keys may not.
1531
- Executable and command dispatch are a deliberate case: shipped wrapper maps,
1532
- command tables, command annotations, and nested subcommand indexes are
1533
- registries when their exact keys dispatch distinct production-capable command
1534
- implementations. Retain them alongside exact runtime-role candidates for every
1535
- finite production-reachable command; the registry and runtime identities do
1536
- not replace one another.
1537
- A configuration-provided entry map that is empty does not make its registry
1538
- empty when the factory instantiates a built-in default or fallback; enumerate
1539
- that exact fallback as an entry. A complete `empty_reason` must prove that no
1540
- configured, registered, generated, default, or fallback implementation can be
1541
- selected—it must never cite the existence of a default implementation as the
1542
- reason for zero entries.
1543
- When the census is complete but semantic tracing is not, retain the observed
1544
- selector and implementation keys on the selector surface, record the exact
1545
- implementation, category-link, or nested-registry gap in
1546
- `semantic_trace_blocker`, and keep the
1547
- registry partial. Do not emit a compact census-only final entry. Upgrade the
1548
- observation to the full form only after exact identity evidence, all three
1549
- `category_links`, and either `child_registry_ids` or evidenced
1550
- `child_registry_absence` are complete.
1551
- Reconcile every entry
1552
- against all three inventory categories under `category_links`: use
1553
- `disposition: candidate` with one exact category candidate, or
1554
- `disposition: not-applicable` with evidence and a category-specific reason.
1555
- This means a connector or storage driver commonly produces both a state
1556
- candidate and a separate service-interaction candidate; mapping the store does
1557
- not erase its network dependency. Within one registry and category, two
1558
- entries may not reuse the same candidate or resolve to the same inventory
1559
- subject. Preserve separate candidates and subjects for independently
1560
- selectable systems; do not replace a concrete connector list with one family
1561
- record. If two registrations truly are aliases for one logical inventory
1562
- identity, link each to its own evidenced excluded candidate instead of hiding
1563
- both behind one mapped candidate.
1564
-
1565
- Make every category decision atomic. A `not-applicable` link carries exactly
1566
- the fixed basis for its category: `no-independent-long-running-runtime`,
1567
- `no-independent-persistent-state-identity`, or
1568
- `no-external-reproduction-interaction`. Every link,
1569
- candidate or not-applicable, cites `registry-category-decision` evidence whose
1570
- only subject is the exact derived `<entry-id>-link-<kebab-category>` ID and whose
1571
- repository source uses `inspection_scope: implementation-body`. A registry or
1572
- installer declaration cannot prove that an implementation has no state action,
1573
- egress, or long-running child.
1574
-
1575
- Registry closure is recursive. Mark top-level surfaces with `root: true` and
1576
- nested surfaces with `root: false`. For each entry, inspect its implementation
1577
- for another structured selector—transport, provider, authentication mode,
1578
- catalog type, schema supplier, key manager, or equivalent. Link every such
1579
- surface through `child_registry_ids`; otherwise provide an evidenced
1580
- `child_registry_absence` mapping with a specific `reason` and nonempty exact
1581
- `evidence_ids` from the implementation/configuration body inspected for nested
1582
- selection. At least one record uses `claim_kind: registry-leaf-inspection`, has
1583
- exactly `[entry-id]` as `subject_ids`, and cites a repository source with
1584
- `inspection_scope: implementation-body`. Evidence shared across several entry
1585
- IDs is not atomic leaf proof. A registry-entry declaration alone does not prove
1586
- leafhood. Every
1587
- non-root registry must be linked by a
1588
- parent entry, roots may not be children, and the graph must be acyclic and
1589
- reachable from roots. Do not stop at a parent plugin merely because it already
1590
- has a candidate: its independently selectable child implementations require
1591
- their own entries and three-way category reconciliation.
1592
-
1593
- Before claiming any category complete, write
1594
- `coverage.operational_surface_census`. Enumerate exact execution facets,
1595
- persistent logical entities and configured leaves, remote operations, network
1596
- or SDK interactions, runtime-invoked commands, host-service interactions, and
1597
- required inbound or pull interactions. Each source surface has a stable ID,
1598
- category, kind, exact `identity_key`, and exact
1599
- `operational-surface-census` evidence. Resolve it to one closure candidate or
1600
- retain an evidenced `non-inventory` decision. Every closure candidate must be
1601
- derived from at least one exact source-surface row; broad family prose cannot
1602
- close this ledger.
1603
- For state, operational surfaces and `logical_state_census` must agree
1604
- one-for-one on candidate identities. Include explicit
1605
- `portable-snapshot-artifact` and `packaged-installation-layout` surfaces; a
1606
- container root, selector family, or prefix-only row cannot close a keyed record
1607
- frontier.
1608
-
1609
- State-operation closure uses the same exact-owner rule. Map an operation only
1610
- to the resource whose stable source identity names the operation's enclosing
1611
- state owner or exact logical leaf. Do not distribute operations by array order,
1612
- path prefix, resource family, or a nearby getter. When an operation proves a
1613
- new durable logical owner, retain a new closure candidate rather than joining
1614
- it to an unrelated existing resource; admit it only when its independent state
1615
- unit identity is closed. Exclude comments, synchronization locks,
1616
- ephemeral caches, and generic support code with their own exact stable IDs and
1617
- structured reasons. Run an exact post-join audit that reopens every mapped
1618
- operation's full source region and proves its target resource identity.
1619
-
1620
- Spend all remaining calls on these closure ledgers. For all three categories,
1621
- write every candidate to `coverage.inventory_closure` as either `mapped` to
1622
- exact inventory IDs or `excluded` with evidence and a reason. Stopping below the
1623
- selected call limit is valid only when every candidate is resolved, every
1624
- category is `complete`, every structured registry is exhaustively enumerated,
1625
- and the repository-only closure audit below is completed; otherwise use the next
1626
- allowed extension when a trigger applies, or set the affected category to
1627
- `partial`, record its uncovered scope, and add the exact blocker.
1628
-
1629
- Every excluded candidate also records a structured `exclusion_basis`: one of
1630
- `build-only`, `test-only`, `non-production-only`,
1631
- `outside-application-boundary`, `parent-runtime-unreachable`,
1632
- `not-independent-reproduction-unit`, `internal-runtime-link`, or
1633
- `duplicate-inventory`. Only the last basis carries nonempty exact
1634
- `equivalent_subject_ids` and exact `duplicate-inventory-equivalence` evidence.
1635
- The corresponding candidate audit row must cite that same atomic equivalence
1636
- claim. For a candidate referenced by a structured registry, only
1637
- `duplicate-inventory` is valid; a profile/default/configuration gate is an
1638
- optional activation basis on mapped inventory, never an exclusion basis.
1639
-
1640
- After primary discovery, run one bounded independent repository-only closure
1641
- audit before declaring any category complete. This audit is permitted even
1642
- when hosted-production authority is absent because it reads only the isolated
1643
- repository snapshot and makes no production claim. Use a real read-only
1644
- customer-CLI subagent, hide the primary candidate during its blind inventory,
1645
- disable network, allow no descendants, and keep it within 48 repository calls
1646
- and 10 elapsed minutes. Challenge root discovery, every declared leaf, recursive
1647
- registry edges, and all three category links before launch
1648
- surfaces, state engines/providers, egress direction, and external
1649
- `backing_state` edges. Reveal only compact stable-ID projections after blind
1650
- inventory. If it finds a correction, keep closure partial, reconcile the final
1651
- artifacts, and run one new blind audit in a fresh independent session. Never let
1652
- the correcting session certify the revision it influenced.
1653
-
1654
- Record the receipt as `review.yml.inventory_closure_audit`. A completed audit
1655
- must cover exactly all three category names, every closure candidate ID, and
1656
- every structured-registry and registry-entry ID, every derived entry-category
1657
- link ID, and every parent-child registry edge ID. A completed final receipt sets
1658
- `final_artifacts_unchanged_since_blind_inventory: true`, contains only
1659
- `confirmed` decision rows, and has an empty `findings` list. Corrections and
1660
- historical resolved findings belong to the superseded audit kept in private
1661
- scratch, never the clean final receipt. The auditor reopens and reviews the
1662
- final generated inventory, registry, reproduction, and closure artifacts, not
1663
- only the earlier source census. Artifact immutability never converts an
1664
- unreviewed or discrepant final row into a confirmed one. Any pending candidate,
1665
- partial selector family, unresolved reproduction, uncovered range, corrected
1666
- verdict, or remaining finding keeps the matching category partial. Challenge
1667
- every `not-applicable` category link, especially stateful connectors marked as
1668
- non-egress and remote identity,
1669
- policy, schema, catalog, or key services marked as stateless. During the state
1670
- challenge, do not promote configuration files already handled by clone
1671
- injection, generated logs or outputs, scratch/lock files, or replaceable assets
1672
- into resources unless their initial contents require a separate
1673
- copy/rebuild/reset action. During the backing-state challenge, reject remote
1674
- ownership inferred only from an endpoint or client.
1675
-
1676
- The receipt is decision-bearing: emit exactly one `candidate_reviews` row per
1677
- candidate, one `state_owner_reviews` row per resource, and one
1678
- `external_backing_state_reviews` row per external dependency.
1679
- Each row repeats the final declared disposition (and backing-state basis where
1680
- applicable), records the independent verdict, and gives an evidence-backed
1681
- reason. A `corrected` verdict invalidates that pass and requires reconciliation
1682
- plus a fresh audit; only `confirmed` appears in the final completed receipt. An
1683
- exact-ID checklist without those decisions does not establish an audit. For
1684
- every `remote-ownership-unproven` edge, the only honest results are
1685
- a correction to `interaction-only` or `covered-by-resources`, or partial state
1686
- closure.
1687
-
1688
- Also emit exactly one `registry_entry_category_link_reviews` row for every
1689
- derived entry-category link, one `registry_leaf_reviews` row for every declared
1690
- leaf entry, and one `consumer_edge_reviews` row for every exact
1691
- inventory-subject/runtime-role pair. Link rows repeat the final disposition,
1692
- candidate ID or not-applicable basis; consumer rows repeat the edge activation.
1693
- Each verdict cites the same atomic claim kind, exact subject set, and
1694
- implementation-body or role-call-path inspection scope required by the final
1695
- declaration. Exact-ID checklist coverage without these decisions cannot support
1696
- complete closure.
1697
-
1698
- Atomic closure claims are decision-grade: `authority` is `authoritative` or
1699
- `indicative`, `confidence` is `proven` or `strong`, and `environment_scope` is
1700
- `hosted-production`, `production-reference`, or `self-host-reference`. A
1701
- `tentative`, `non-production`, local, example, or unknown record cannot support
1702
- an equivalence, registry link, leaf, consumer edge, or complete external scope.
1703
-
1704
- If the audit is unavailable or cannot cover the exact sets, record a
1705
- short deferred reason and downgrade at least one affected category to
1706
- `partial`. Never use production authority as the reason to defer this
1707
- repository-only audit.
1708
-
1709
- Classify every topology source by environment and authority. Local/dev,
1710
- example, and self-host material proves only itself. Record the topology's
1711
- fidelity ceiling and any missing production authority. Enumerate every
1712
- repository-supported provider, connector, client, and backend capability once,
1713
- including capabilities gated off by the selected profile. Use role reachability
1714
- to assign `consumer_edges` and activation; do not use it to erase supported
1715
- capabilities. Avoid expanding deployment/topology permutations, but never
1716
- collapse distinct structured-registry entries or provider implementations.
1717
-
1718
- For every selected artifact, prove two separate claims:
1719
-
1720
- 1. How the exact source commit is mounted or built.
1721
- 2. Whether that build uses the production build recipe.
1722
-
1723
- Building the checked-out commit does not prove production-recipe equivalence.
1724
- A fixed infrastructure binary may be exempt from source incorporation only
1725
- when it is explicitly classified as `verification_subject:
1726
- pinned-infrastructure` and its immutable artifact identity and configuration
1727
- source are proven. Application artifacts use `source-changeable` and cannot
1728
- claim this exemption.
1729
- Otherwise add a blocker.
1730
-
1731
- Give every object a durable lowercase kebab-case ID. Link only by exact ID.
1732
- Cite paths and structured anchors such as manifest keys, Terraform addresses,
1733
- symbols, and config names. Record scanned roots and exclusions.
1734
-
1735
- Spend part of the runtime/state budget on the clone-injection surface, not only
1736
- on the inventory. Knowing a Postgres exists does not let anyone start a copy of
1737
- it. For the selected scope, answer all eight `clone_injection` categories from
1738
- the output contract: config slots, DNS identity, TLS, filesystem mounts,
1739
- secret-derived material, protocol metadata, runtime-generated configuration, and
1740
- build-time configuration. Each is either declared with entries or marked `none`
1741
- with a reason; leaving one out is invalid.
1742
-
1743
- Give every injection entry a `materiality`: `boot-required`,
1744
- `binds-copied-state`, `isolation-control`, `behavioural`, or `informational`. Ask
1745
- of each one what actually happens to the replica if a materializer does not know
1746
- it. Answer honestly — `informational` is a legitimate answer and a better one
1747
- than inflating an entry's class. A long list of real-but-inert settings is not a
1748
- better map than a short list of load-bearing ones, and the validator reports the
1749
- mix, so padding shows up rather than scoring.
1750
-
1751
- The validator ties injection to inventory: every `binding_names` value on a
1752
- resource must also be a `config_slots` entry, every runtime role must be named by
1753
- at least one config slot, and an `activation: active` deployment profile must run
1754
- at least one role. Work outward from the inventory you built — for each resource,
1755
- declare the variables that point the application at it; for each role, declare
1756
- what it needs to start.
1757
-
1758
- Two of these are routinely missed and are worth a deliberate pass. First, trace
1759
- every application secret to what depends on it: if a value encrypts or signs
1760
- anything that lives in copied state, it is `seal-with-golden` or
1761
- `scrub-and-reset` and must name the resources it is bound to. A materializer
1762
- that mints a fresh value for such a secret makes the copied data unreadable, and
1763
- the resulting failures look like application bugs. If an exact stable key,
1764
- certificate, salt, or identity must survive to preserve authentication,
1765
- decryption, or signature behavior, map that durable or immutable identity as a
1766
- resource as well. Clone injection records how its value is delivered; it does
1767
- not replace the inventory concern. Use `rotate-freely` only when no copied
1768
- behavior depends on the exact value. Second, follow the process
1769
- entrypoint to see how configuration actually arrives: a mounted file, a rendered
1770
- template, a value baked into an artifact at build time, or a setting read from
1771
- the database at boot. Record the mechanism, not just the variable name.
1772
-
1773
- Classify each resource as `canonical-durable`, `derived-rebuildable`,
1774
- `ephemeral-coordination`, `in-flight-work`, or
1775
- `immutable-external-asset`. Also record its action: copy canonical state;
1776
- rebuild derived state from named source IDs; reset coordination state; preserve,
1777
- drain, or discard in-flight work with a rationale; or pin an immutable asset by
1778
- opaque immutable reference. Do not treat queues, caches, derived indexes, and
1779
- immutable assets as interchangeable durable databases.
1780
-
1781
- ### 5. Separate cold preparation from the on-demand path
1782
-
1783
- Omit `materialization_plan` entirely while authority is missing: every field in
1784
- it would have to be invented, and an invented plan is worse than an absent one.
1785
- When authority exists, add the top-level `materialization_plan` from the output
1786
- contract. Treat the
1787
- user's verifier SLO as the end-to-end budget for case generation, launch,
1788
- execution, and aggregation. Give hot launch its own smaller allocation and
1789
- reserve the remainder for the actual verification work. Select
1790
- `generated_case_fanout.target_n` for the application and set an explicit
1791
- `hard_max_n` no greater than 64; do not hardcode one universal fanout.
1792
-
1793
- Model cold preparation as a stable-ID DAG that Haystack runs before a
1794
- verification request. You describe it; you never execute any part of it. The
1795
- preparation may seed, quiesce, scrub, and snapshot production-derived state,
1796
- and it yields bounded plan summaries, exact stable source and replica
1797
- identities for alias and isolation validation, and opaque replica catalog
1798
- references for checked-in bindings. Deletion handles and provider operations
1799
- stay with Haystack and never appear in these artifacts.
1800
- Resolve every prepared state's workload profile and compatibility group to
1801
- declared stable-ID records. Bind it to the exact template catalog reference and
1802
- resource size, durable snapshot, production cut, and artifact and config
1803
- digests. Require its evidence to name the prepared-state ID explicitly. Add a
1804
- refresh strategy, maximum age, and freshness evidence so a stale prepared state
1805
- cannot silently enter the hot path.
1806
-
1807
- Model hot launch as a second stable-ID DAG that consumes an exact prepared
1808
- state through short-lived replica-only leases. Reopen it once with production
1809
- egress denied, inject the arbitrary verification commit with the
1810
- production-equivalent recipe, then create one fresh writable universe for each
1811
- pertinent generated case. Key every run by the exact `generatedCaseId`,
1812
- `sandboxId`, and `universeIncarnationId`. Fork, attach, and execute the bounded
1813
- N cases in parallel. On any partial failure, release every attempted attachment
1814
- before revoking every attempted lease, under one absolute deadline.
1815
-
1816
- Record integer typical and high planning durations per step. Compute each
1817
- phase's planning path by summing serial dependencies and taking the longest
1818
- parallel path. Never label either result as a true expected makespan, observed
1819
- p95, or statistical p95 bound. Only declare `hot-path-proven` when an
1820
- authoritative, scope-compatible, typed probe record links the measured
1821
- end-to-end hot p95, achieved generated-case fanout, exact case/sandbox/universe
1822
- identity triples, exercised verification commit, fresh-universe isolation,
1823
- parallel phases, parent protection, and complete ordered cleanup.
1824
- Real-production readiness requires hosted-production probe evidence;
1825
- repository-local or synthetic evidence cannot qualify it.
1826
-
1827
- Before declaring `hot-path-proven`, take the exact-ID union of every cold and
1828
- hot step's `subject_ids`. It must cover every mapped artifact, runtime role,
1829
- resource, and external dependency. Every artifact must have a proven
1830
- verification-commit route, and every resource or external dependency must use a
1831
- concrete replication, rebuild, or emulation strategy; physical copy strategies
1832
- must also resolve their opaque binding. A measured partial launch is not a
1833
- proof of the mapped universe. Do not apply this coverage gate to `proposal`:
1834
- inventory review may pass while materialization readiness remains a proposal.
1835
-
1836
- Use `proposal`, `cold-preparable`, `hot-path-proven`, or `blocked` independently
1837
- of inventory review status. A review may pass while launch readiness remains a
1838
- proposal. Mark capability evidence `declared`, `adapter-verified`, or
1839
- `materialization-probed`, and latency `assumed` or `measured`. Synthetic
1840
- qualification uses synthetic scope and never proves real-production readiness.
1841
-
1842
- ### 6. Continue with the full production review after authority is confirmed
1843
-
1844
- Never enter this phase for a provisional authority receipt. This is distinct
1845
- from the repository-only closure audit, which runs before this gate whenever
1846
- closure would otherwise be complete.
1847
-
1848
- Use the customer's coding CLI subagent mechanism. Do not use a Haystack-side
1849
- review agent, simulate the review, or allow descendants. If no real subagent
1850
- exists, write a blocked receipt with `reviewer-subagent-unavailable`.
1851
-
1852
- Create one durable, resumable reviewer session and reuse it for all phases.
1853
- Record its session ID in private scratch. Forbid ephemeral mode, including CLI
1854
- flags such as `--ephemeral`. If the CLI cannot resume it, stop with
1855
- `reviewer-session-not-resumable`; do not create a replacement.
1856
-
1857
- Use read-only permissions. Enforce the test and `.haystack/**` denylist before
1858
- launch. Hide the candidate, scratch path, and prior conclusions during blind
1859
- inventory. Instruct the reviewer to make no edits, commits, network writes, or
1860
- infrastructure changes. If the CLI reports a quota, usage, or context limit,
1861
- preserve completed checkpoints, set `reviewer-quota-exhausted`, and stop. Do
1862
- not replace the reviewer.
1863
-
1864
- Use this task:
1865
-
1866
- ```text
1867
- Independently inventory this repository for the production behavior needed by
1868
- a production-derived isolated universe for one selected hosted-production
1869
- application. Your source view mechanically excludes .haystack/** and the
1870
- declared test-path denylist; do not bypass it. Cite exact evidence. Do not
1871
- substitute self-host, hobby, local/dev, or example topology for production.
1872
- Check source-commit incorporation separately from production build-recipe
1873
- equivalence. Preserve structured resource identities and classify state.
1874
-
1875
- Omission is not the cure for padding. An in-tree integration that a
1876
- configuration switch, feature flag, or provider module can turn on is a type of
1877
- thing Haystack may have to reproduce, so record it once with
1878
- `activation: optional` and say what selects it. Dropping it because it is not
1879
- active in the profile you selected is a recall failure, not restraint. Suppress
1880
- duplication by exact structured identity instead: retain separately keyed
1881
- logical state owners even when they share one physical binding and reproduction
1882
- action, and collapse only proven aliases of the same logical identity. Do not
1883
- promote generic roots, loaders, selector values, or physical plumbing into
1884
- inventory merely because they configure or contain a real resource.
1885
-
1886
- Challenge every positive consumer edge at the exact runtime-role call path;
1887
- shared packaging is not reachability. Challenge every registry category link
1888
- and leaf from the implementation body, not from the installer, manifest, or
1889
- registration table. A profile or default that leaves a supported provider
1890
- inactive makes it optional inventory; it does not justify excluding the
1891
- registry candidate.
1892
-
1893
- Audit these seven failure classes explicitly:
1894
-
1895
- 1. optional or default backends selected without authoritative runtime evidence;
1896
- 2. one physical resource split, or distinct resources merged, without exact structured identity;
1897
- 3. missing consumers, dependency edges, consistency groups, or clone material;
1898
- 4. raw-TCP, fork, multi-endpoint, protocol, or readiness claims without direct evidence;
1899
- 5. external dependencies asserted from weak, broad-token, or empty evidence;
1900
- 6. semantic labels used where repository-qualified structured source IDs are required; and
1901
- 7. omitted blockers for the full under-one-minute result target, mutable images,
1902
- DNS/TLS, privileged surfaces, or build-time/runtime-generated configuration.
1903
-
1904
- Then perform three closure challenges: independently running supervisors and
1905
- support processes hidden inside one service or image; embedded or alternate
1906
- state engines hidden by a broad volume or provider abstraction; and dependency
1907
- direction, including inbound clients and work delegated to a separate actor.
1908
- For activation, distinguish invoking a fixed default-on path from first
1909
- supplying tenant state or a destination. The former is reachable default
1910
- behavior; the latter is an optional gate.
1911
-
1912
- Independently rebuild four exact-ID frontiers before comparing the candidate:
1913
- all steady-state deployment units (including separately launched databases and
1914
- caches), all state materialization identities (including per-service TLS,
1915
- secret/credential, config-layout, cache/database-namespace, and destination
1916
- objects), all reachable boundary-crossing operation contracts, and all required
1917
- inbound/pull interfaces. Compare those sets one-to-one with the candidate's
1918
- frontier receipts. Treat reachable provider/interface methods as operations,
1919
- not registry families. Accept a registry only when a concrete lookup, switch,
1920
- registration, entrypoint, or configuration dispatch selects implementations.
1921
-
1922
- For each retained material identity, reopen the cited exact snippet or line
1923
- span and verify every declared `supporting_tokens` value occurs inside it.
1924
- Reject adjacent comments, shebangs, imports, declarations, and closing braces
1925
- that merely sit near the real operation.
1926
-
1927
- Independently census exact source-owned selector families—command dispatch,
1928
- factories, schemas, lifecycle pipelines, behavior enums, allow-lists, and
1929
- dynamic module tables—and compare that census to the emitted registry IDs.
1930
- Reject wildcard or family placeholders as enumeration.
1931
-
1932
- Block every unsupported claim. Preserve one stable blind observation ID and one
1933
- exact structured source identity for every join; never correlate by prose.
1934
-
1935
- Use 24 repository-inspection tool calls and 4 elapsed minutes as the first blind
1936
- inventory wave: 6 for deployment/artifacts, 10 for runtime/state/dependency
1937
- edges, 4 for interfaces/egress, and 4 for gap checks. Do not spawn subagents. At
1938
- the end of each bucket, immediately return one compact checkpoint with the
1939
- bucket, stable observation IDs, subject IDs, assertions, source anchors,
1940
- uncovered scope, calls used, and elapsed time. Label observations
1941
- blind_observations; the candidate is hidden, so do not make comparison findings.
1942
- If an exact frontier remains open, persist the checkpoint and continue in
1943
- 24-call waves. Finish only after two consecutive source-wide blind sweeps add no
1944
- new exact identity. Keep each checkpoint under 24 KiB; if it does not fit, split
1945
- the stable-ID-sorted observations across checkpoints instead of dropping them.
1946
- ```
1947
-
1948
- The reported call usage includes shell, search, read, and repository-inspection
1949
- calls, even when no evidence is found. The CLI must enforce the selected wave
1950
- limit and elapsed backstop; a prompt is not a timer. Append each checkpoint to
1951
- scratch before sending the next bucket. Do not wait for one large answer or
1952
- request a long no-tools synthesis pass.
1953
-
1954
- ### 7. Compare compact projections and reconcile once
1955
-
1956
- Always compare after blind checkpoints. Do not send full candidate YAML. Build
1957
- a compact projection grouped by the same four buckets. Include only stable IDs,
1958
- kinds, structured identities, edges, state classes and actions, reproduction and physical
1959
- binding claims, evidence IDs with source anchors, scope/authority claims, and
1960
- unresolved IDs. Send one bucket at a time to the same reviewer and capture a
1961
- compact semantic delta before sending the next. Keep projections and deltas in
1962
- private scratch; final output remains exactly four artifacts for a complete
1963
- map. A deliberately blocked provisional scaffold may retain its existing
1964
- three-file missing-authority receipt until repository behavior synthesis runs.
1965
-
1966
- Keep each projection and delta under 24 KiB. If a bucket does not fit, split it
1967
- into stable-ID-sorted chunks while staying inside the same aggregate time and
1968
- call budget. Never send the full YAML as a fallback.
1969
-
1970
- Allow 10 targeted repository-inspection calls and 2 elapsed minutes total for
1971
- comparison. Require separately labeled `comparison_findings` for omitted or
1972
- phantom objects and edges; missing consistency groups; promoted non-production
1973
- or optional topology; missing authority or overstated fidelity; commit or
1974
- recipe gaps; collapsed identities; unbounded integrations; and weak,
1975
- conflicting, stale, or unstable evidence. Also require findings for every one of
1976
- the seven explicit failure classes from the blind inventory task. An unsupported
1977
- transport, provider fork, external dependency, or readiness claim is blocking;
1978
- the reviewer must not rewrite it into a plausible implementation.
1979
-
1980
- Reconcile every finding by stable ID as `accepted`, `rejected` with stronger
1981
- evidence, or `unresolved`. Partial blind coverage can still reveal candidate
1982
- defects; retain its gaps.
1983
-
1984
- Send one compact material-revision delta back to the reviewer. Allow 4 targeted
1985
- inspection calls and 1 elapsed minute. Then request one final structured
1986
- receipt with tools disabled, based only on captured checkpoints, comparison
1987
- deltas, and the revision delta. Use the lowest reasoning setting supported for
1988
- this formatting-only receipt and allow at most one minute. Never loop.
1989
-
1990
- If a phase exceeds budget, retain partial work, set
1991
- `termination.reason: review-budget-exhausted`, and block on material uncovered
1992
- scope. Keep `blind_observations` separate from `comparison_findings`.
1993
-
1994
- ### 8. Write and validate artifacts
1995
-
1996
- Copy the reconciled artifacts from scratch to the repository. Run:
1997
-
1998
- ```bash
1999
- haystack skills validate-universe --json
2000
- haystack skills validate-behaviors --json
2001
- ```
2002
-
2003
- This uses a YAML parser and checks stable IDs, references, and required semantic
2004
- claims. A visual read or regex is not a substitute. Fix every error and rerun
2005
- until it exits zero. Every receipt, including a deferred provisional receipt,
2006
- records `validation.command: haystack skills validate-universe --json`,
2007
- `validation.status: passed`, and a `validator_contract_revision` matching the
2008
- JSON result; a missing, failed, or stale tuple is not a valid receipt. Preserve
2009
- scratch on failure. A zero exit proves contract consistency, not inventory
2010
- completeness or isolation.
2011
-
2012
- Before reporting completion, check that:
2013
-
2014
- - no final inventory or registry entry has `trace_status: census-only`;
2015
- - every runtime role is one independently restartable deployment unit, with no
2016
- setup/init/start padding, a unique `deployment_unit_identity_key`, and exact
2017
- independently controlling deployment token;
2018
- - every resource is an allowed independent state unit, with exact owner, root,
2019
- address, typed reproduction operation, and distinct reproduction token, and no database-internal or configuration-
2020
- input padding;
2021
- - every external dependency is one exact outside-universe operation or listener
2022
- contract traced from a concrete production call site through every wrapper to
2023
- the leaf effect, with provider variants, internal role calls, routes, generic
2024
- helper definitions, and protocol variants merged or excluded;
2025
- - every registry has a concrete decision-bearing gate, distinct exact selector
2026
- and implementation tokens, selective dispatch, a production consumer,
2027
- complete category links, and every proven nested edge; enum/interface/route,
2028
- exhaustive pipeline, and generated-table-only collections are excluded;
2029
- - all IDs and references are exact and evidence-backed;
2030
- - structured roles, profiles, databases, buckets, topics, queues, and keyspaces
2031
- remain distinct;
2032
- - each artifact separately proves source incorporation and production-recipe
2033
- equivalence, or a valid pinned-infrastructure exemption;
2034
- - provider forks and restores reference an opaque catalog binding plus
2035
- replication capability evidence, never a raw provider ID;
2036
- - the cold and hot DAGs are acyclic, their planning paths are reproducible, and
2037
- prepared-state identity and freshness are explicit;
2038
- - any `hot-path-proven` DAG covers every mapped artifact, runtime role,
2039
- resource, and external dependency by exact `subject_ids`, with no unresolved
2040
- reproduction route;
2041
- - any `hot-path-proven` claim has measured end-to-end hot p95 and fanout proof
2042
- within its hot-launch allocation;
2043
- - every resource has one state classification;
2044
- - no production role, credential, deletion handle, raw provider ID, direct
2045
- endpoint, or secret value appears in a checked-in artifact;
2046
- - every finding is resolved or blocking; and
2047
- - review is `pass` only after independent review with no blocker.
2048
-
2049
- Summarize scope, fidelity, reviewer corrections, uncovered scope, and only the
2050
- irreducible user question. Do not claim readiness until Haystack materializes
2051
- the universe and proves isolation.