@dtmd/temper 0.0.6 → 0.0.8

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 (50) hide show
  1. package/README.md +84 -53
  2. package/bin/temper.js +52 -0
  3. package/dist/src/assembly.d.ts +15 -1
  4. package/dist/src/assembly.js +2 -1
  5. package/dist/src/builtins.d.ts +765 -48
  6. package/dist/src/builtins.js +767 -68
  7. package/dist/src/claude-code.d.ts +2 -2
  8. package/dist/src/claude-code.js +1 -1
  9. package/dist/src/contract.d.ts +180 -29
  10. package/dist/src/contract.js +128 -15
  11. package/dist/src/declarations.d.ts +92 -6
  12. package/dist/src/declarations.js +448 -102
  13. package/dist/src/dial.d.ts +75 -0
  14. package/dist/src/dial.js +82 -0
  15. package/dist/src/emit.d.ts +82 -1
  16. package/dist/src/emit.js +402 -56
  17. package/dist/src/generated/AssemblyFactRow.d.ts +2 -2
  18. package/dist/src/generated/BoundRow.d.ts +2 -2
  19. package/dist/src/generated/ClauseRow.d.ts +73 -3
  20. package/dist/src/generated/CollectionAddressRow.d.ts +21 -0
  21. package/dist/src/generated/CollectionAddressRow.js +2 -0
  22. package/dist/src/generated/Declarations.d.ts +17 -0
  23. package/dist/src/generated/EmbeddedMember.d.ts +3 -3
  24. package/dist/src/generated/FeatureValue.d.ts +2 -2
  25. package/dist/src/generated/Features.d.ts +52 -3
  26. package/dist/src/generated/KindFactRow.d.ts +38 -7
  27. package/dist/src/generated/MentionRow.d.ts +5 -3
  28. package/dist/src/generated/NestedMemberRow.d.ts +32 -0
  29. package/dist/src/generated/PayloadMember.d.ts +6 -0
  30. package/dist/src/generated/RegistrationRow.d.ts +35 -0
  31. package/dist/src/generated/RegistrationRow.js +2 -0
  32. package/dist/src/generated/RequirementRow.d.ts +4 -2
  33. package/dist/src/generated/SatisfiesRow.d.ts +2 -1
  34. package/dist/src/generated/SettingsRow.d.ts +25 -0
  35. package/dist/src/generated/SettingsRow.js +2 -0
  36. package/dist/src/generated/Shape.d.ts +15 -0
  37. package/dist/src/generated/Shape.js +2 -0
  38. package/dist/src/generated/TemplateRow.d.ts +24 -0
  39. package/dist/src/generated/TemplateRow.js +2 -0
  40. package/dist/src/generated/ValueType.d.ts +11 -2
  41. package/dist/src/generated/Verifier.d.ts +20 -0
  42. package/dist/src/generated/Verifier.js +2 -0
  43. package/dist/src/generated/index.d.ts +6 -0
  44. package/dist/src/index.d.ts +8 -8
  45. package/dist/src/index.js +3 -3
  46. package/dist/src/kind.d.ts +160 -29
  47. package/dist/src/kind.js +47 -16
  48. package/dist/src/prose.d.ts +81 -25
  49. package/dist/src/prose.js +91 -21
  50. package/package.json +10 -2
@@ -16,38 +16,142 @@ import type { Clause } from "./contract.js";
16
16
  export interface Skill {
17
17
  /**
18
18
  * The description trigger — always in context; the body loads on invocation
19
- * (code.claude.com/docs/en/skills, retrieved 2026-07-02).
19
+ * (code.claude.com/docs/en/skills, retrieved 2026-07-15).
20
20
  */
21
21
  readonly description: string;
22
+ /**
23
+ * Extra trigger context — phrases and example requests appended to
24
+ * `description` in the skill listing, sharing its 1,536-character cap
25
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved
26
+ * 2026-07-15).
27
+ */
28
+ readonly when_to_use?: string;
29
+ /**
30
+ * Autocomplete hint for the arguments the skill expects, e.g. `[issue-number]`
31
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
32
+ */
33
+ readonly "argument-hint"?: string;
34
+ /**
35
+ * Named positional arguments for `$name` substitution in the body — a
36
+ * space-separated string or a YAML list, mapped to positions in order
37
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
38
+ */
39
+ readonly arguments?: readonly string[] | string;
40
+ /**
41
+ * Tools Claude may use without a permission prompt while the skill is active —
42
+ * a space/comma-separated string or a YAML list; it grants, never restricts
43
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
44
+ */
45
+ readonly "allowed-tools"?: readonly string[] | string;
46
+ /**
47
+ * Tools removed from the pool while the skill is active, cleared on your next
48
+ * message — a space/comma-separated string or a YAML list
49
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
50
+ */
51
+ readonly "disallowed-tools"?: readonly string[] | string;
52
+ /**
53
+ * Model for the rest of the turn while the skill is active — a `/model` value
54
+ * or `inherit`; not saved to settings
55
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
56
+ */
57
+ readonly model?: string;
58
+ /**
59
+ * Effort level while the skill is active, overriding the session's; the
60
+ * available levels depend on the model
61
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
62
+ */
63
+ readonly effort?: "low" | "medium" | "high" | "xhigh" | "max";
64
+ /**
65
+ * Set `fork` to run the skill in a forked subagent context, its body the
66
+ * subagent's prompt
67
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
68
+ */
69
+ readonly context?: "fork";
70
+ /**
71
+ * The subagent type a `context: fork` skill runs as — a built-in
72
+ * (`Explore`/`Plan`/`general-purpose`) or a custom agent; defaults to
73
+ * `general-purpose`
74
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
75
+ */
76
+ readonly agent?: string;
77
+ /**
78
+ * Hooks scoped to this skill's lifecycle, in the hooks configuration format
79
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
80
+ */
81
+ readonly hooks?: Readonly<Record<string, unknown>>;
82
+ /**
83
+ * Shell for the skill's `` !`command` `` injections — `bash` (default) or
84
+ * `powershell`
85
+ * (code.claude.com/docs/en/skills, "Frontmatter reference", retrieved 2026-07-15).
86
+ */
87
+ readonly shell?: "bash" | "powershell";
22
88
  /** The optional license field the skill spec carries (agentskills.io/specification). */
23
89
  readonly license?: string;
24
90
  /**
25
91
  * Set `true` to prevent Claude from automatically loading this skill — only
26
92
  * the user-invoked channel stays live (code.claude.com/docs/en/skills,
27
- * "Control who invokes a skill", retrieved 2026-07-07). Default: `false`.
93
+ * "Control who invokes a skill", retrieved 2026-07-15). Default: `false`.
28
94
  */
29
95
  readonly "disable-model-invocation"?: boolean;
30
96
  /**
31
97
  * Set `false` to hide the skill from the `/` menu — only the
32
98
  * description-trigger channel stays live (code.claude.com/docs/en/skills,
33
- * "Control who invokes a skill", retrieved 2026-07-07). Default: `true`.
99
+ * "Control who invokes a skill", retrieved 2026-07-15). Default: `true`.
34
100
  */
35
101
  readonly "user-invocable"?: boolean;
102
+ /**
103
+ * The optional path scope — a channel gate, not a channel of its own. A
104
+ * present list removes the skill from *every* invocation channel — the `/`
105
+ * listing, model invocation, and description-trigger invocation — until
106
+ * Claude reads a file the globs match; an absent one leaves all channels
107
+ * live. Distinct from a rule's `paths`, which registers the path-match as
108
+ * the rule's channel: here the field gates the skill's existing channels
109
+ * rather than being one, so it adds no `paths-match` registration entry
110
+ * (code.claude.com/docs/en/skills, retrieved 2026-07-15; verified against
111
+ * 2.1.210).
112
+ */
113
+ readonly paths?: readonly string[];
36
114
  readonly prose?: Prose;
37
115
  }
116
+ /**
117
+ * A skill's bundled reference document — a supporting file beside its `SKILL.md`,
118
+ * loaded only when the skill's body points Claude at it. Prose and nothing else:
119
+ * the documented shape is a markdown file in the skill's directory with no
120
+ * frontmatter schema of its own (code.claude.com/docs/en/skills, "Add supporting
121
+ * files", retrieved 2026-07-16).
122
+ */
123
+ export interface SupportingDoc {
124
+ readonly prose?: Prose;
125
+ }
126
+ /**
127
+ * `supporting-doc` — a skill's bundled reference document, at the nested-file locus:
128
+ * its path composes from its host skill's unit and the host's template pattern, so it
129
+ * governs no glob of its own. Fields-free and frontmatterless (no `format` — the whole
130
+ * file is body), identity from the filename, and channel-less: a supporting file reaches
131
+ * the world only through the skill whose body references it, never on a channel of its
132
+ * own (code.claude.com/docs/en/skills, "Add supporting files", retrieved 2026-07-16).
133
+ */
134
+ export declare const supportingDoc: KindDefinition<SupportingDoc>;
38
135
  /**
39
136
  * `skill` — `.claude/skills/<name>/SKILL.md`, a directory unit, YAML frontmatter
40
137
  * carrying `name` then `description`; registers on both documented invocation
41
138
  * channels — user-invoked (`/name`) and description-trigger — modulated per
42
139
  * member by the `disable-model-invocation`/`user-invocable` fields
43
140
  * (code.claude.com/docs/en/skills, agentskills.io/specification, retrieved
44
- * 2026-07-07).
141
+ * 2026-07-15).
142
+ *
143
+ * Its one template layer names the bundled reference documents a skill's directory
144
+ * carries: `supporting-doc` children at the directory's own markdown, the documented
145
+ * placement (`my-skill/reference.md` beside `SKILL.md`; same source, "Add supporting
146
+ * files"). The pattern claims the markdown subset the prose-only child kind can hold —
147
+ * a supporting file of another type (the docs' own `scripts/helper.py`) matches nothing
148
+ * and stays unmodeled rather than mis-typed.
45
149
  */
46
150
  export declare const skill: KindDefinition<Skill>;
47
151
  /**
48
152
  * `command` — `.claude/commands/*.md`, the skill surface's legacy file placement
49
153
  * (Claude Code merged commands into skills; code.claude.com/docs/en/skills,
50
- * retrieved 2026-07-07): a lone file (identity from the stem, so no
154
+ * retrieved 2026-07-15): a lone file (identity from the stem, so no
51
155
  * `identityField` — like `rule`), the skill's field schema by import, registering
52
156
  * on the same two documented invocation channels as `skill`.
53
157
  */
@@ -56,9 +160,88 @@ export declare const command: KindDefinition<Skill>;
56
160
  export interface Agent {
57
161
  /**
58
162
  * When Claude should delegate to this subagent — the sole registration
59
- * channel (code.claude.com/docs/en/sub-agents, retrieved 2026-07-07).
163
+ * channel (code.claude.com/docs/en/sub-agents, retrieved 2026-07-15).
60
164
  */
61
165
  readonly description: string;
166
+ /**
167
+ * Tools the subagent may use; inherits all when omitted — a space/comma-separated
168
+ * string or a YAML list
169
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
170
+ */
171
+ readonly tools?: readonly string[] | string;
172
+ /**
173
+ * Tools denied — removed from the inherited or specified pool
174
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
175
+ */
176
+ readonly disallowedTools?: readonly string[] | string;
177
+ /**
178
+ * Model to run as: `sonnet`/`opus`/`haiku`/`fable`, a full model id, or `inherit`
179
+ * (the default)
180
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
181
+ */
182
+ readonly model?: string;
183
+ /**
184
+ * Permission mode the subagent runs under, overriding the inherited one where the
185
+ * parent mode does not take precedence (`manual` aliases `default`)
186
+ * (code.claude.com/docs/en/sub-agents, "Permission modes", retrieved 2026-07-15).
187
+ */
188
+ readonly permissionMode?: "default" | "acceptEdits" | "auto" | "dontAsk" | "bypassPermissions" | "plan" | "manual";
189
+ /**
190
+ * Maximum agentic turns before the subagent stops
191
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
192
+ */
193
+ readonly maxTurns?: number;
194
+ /**
195
+ * Skills preloaded into the subagent's context at startup — full content, not just
196
+ * descriptions
197
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
198
+ */
199
+ readonly skills?: readonly string[] | string;
200
+ /**
201
+ * MCP servers available to the subagent — each entry a configured server's name or
202
+ * an inline `name → config` definition
203
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
204
+ */
205
+ readonly mcpServers?: readonly string[] | Readonly<Record<string, unknown>>;
206
+ /**
207
+ * Lifecycle hooks scoped to this subagent
208
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
209
+ */
210
+ readonly hooks?: Readonly<Record<string, unknown>>;
211
+ /**
212
+ * Persistent memory scope enabling cross-session learning: `user`, `project`, or
213
+ * `local`
214
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
215
+ */
216
+ readonly memory?: "user" | "project" | "local";
217
+ /**
218
+ * Set `true` to always run this subagent as a background task
219
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
220
+ */
221
+ readonly background?: boolean;
222
+ /**
223
+ * Effort level while the subagent is active, overriding the session's; the
224
+ * available levels depend on the model
225
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
226
+ */
227
+ readonly effort?: "low" | "medium" | "high" | "xhigh" | "max";
228
+ /**
229
+ * Set `worktree` to run the subagent in a temporary git worktree — an isolated repo
230
+ * copy, auto-cleaned when it makes no changes
231
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
232
+ */
233
+ readonly isolation?: "worktree";
234
+ /**
235
+ * Display color in the task list and transcript
236
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
237
+ */
238
+ readonly color?: "red" | "blue" | "green" | "yellow" | "purple" | "orange" | "pink" | "cyan";
239
+ /**
240
+ * Auto-submitted first user turn when the agent runs as the main session agent (via
241
+ * `--agent`/the `agent` setting); prepended to any user prompt
242
+ * (code.claude.com/docs/en/sub-agents, "Supported frontmatter fields", retrieved 2026-07-15).
243
+ */
244
+ readonly initialPrompt?: string;
62
245
  readonly prose?: Prose;
63
246
  }
64
247
  /**
@@ -67,14 +250,14 @@ export interface Agent {
67
250
  * `name` then `description`; identity is the `name` field (never the filename),
68
251
  * the named-field mode; registers on the description-trigger channel only — no
69
252
  * user-invoked slash command (code.claude.com/docs/en/sub-agents, retrieved
70
- * 2026-07-07).
253
+ * 2026-07-15).
71
254
  */
72
255
  export declare const agent: KindDefinition<Agent>;
73
256
  /** A Claude Code rule — a flat markdown file with an optional `paths` scope. */
74
257
  export interface Rule {
75
258
  /**
76
259
  * The path scope — a present list matching zero files is a dead edge; an absent
77
- * one loads unconditionally (code.claude.com/docs/en/memory, retrieved 2026-07-02).
260
+ * one loads unconditionally (code.claude.com/docs/en/memory, retrieved 2026-07-15).
78
261
  */
79
262
  readonly paths?: readonly string[];
80
263
  readonly prose?: Prose;
@@ -82,7 +265,7 @@ export interface Rule {
82
265
  /**
83
266
  * `rule` — `.claude/rules/<name>.md`, a lone file (identity from the stem), YAML
84
267
  * frontmatter; registers a path scope (code.claude.com/docs/en/memory, retrieved
85
- * 2026-07-02).
268
+ * 2026-07-15).
86
269
  */
87
270
  export declare const rule: KindDefinition<Rule>;
88
271
  /** A Claude Code memory file — `CLAUDE.md`, loaded in full at launch, no frontmatter. */
@@ -92,16 +275,522 @@ export interface Memory {
92
275
  /**
93
276
  * `memory` — a root `<name>.md` (`CLAUDE.md`, `AGENTS.md`), a lone file loaded
94
277
  * unconditionally, with **no frontmatter** (code.claude.com/docs/en/memory,
95
- * retrieved 2026-07-02): the whole file is the body, so the kind declares no
96
- * `format`. Its discovery locus is any-depth (a `CLAUDE.md` at any directory);
97
- * a module-carried memory projects the root file.
278
+ * retrieved 2026-07-15): the whole file is the body, so the kind declares no
279
+ * `format`. A project `CLAUDE.md` may sit at either `./CLAUDE.md` or
280
+ * `./.claude/CLAUDE.md` — equal documented locations (same source) — and the
281
+ * any-depth locus (a `CLAUDE.md` at any directory) covers both; a
282
+ * module-carried memory projects the root file.
98
283
  */
99
284
  export declare const memory: KindDefinition<Memory>;
285
+ /**
286
+ * A Claude Code hook — a fields-only registration member surfacing inside
287
+ * `settings.json`, keyed under its lifecycle event. It owns no artifact of its own; a
288
+ * handler names how it fires (`command`/`http`/`mcp_tool`/`prompt`/`agent`) plus the
289
+ * documented common fields (code.claude.com/docs/en/hooks, retrieved 2026-07-15).
290
+ * Authoring `hook(...)` builds a member whose typed fields fold into its manifest entry;
291
+ * emit erases it into a registration write fact (`emit.ts`).
292
+ */
293
+ export interface Hook {
294
+ /** The handler kind — how the hook fires when its event matches. */
295
+ readonly type?: "command" | "http" | "mcp_tool" | "prompt" | "agent";
296
+ /** The shell command or executable a `command` handler runs. */
297
+ readonly command?: string;
298
+ /** Seconds before the handler is canceled. */
299
+ readonly timeout?: number;
300
+ /** The tool-name filter a tool-scoped event fires on (`"*"`/`""`/absent = all). */
301
+ readonly matcher?: string;
302
+ }
303
+ /**
304
+ * `hook` — a `settings.json` `hooks.<Event>` registration member: a fields-only kind (no
305
+ * body slot), its members discovered off the `.claude/settings.json` manifest at the
306
+ * `hooks.<Event>` collection address, keyed by lifecycle event; registers on the `event`
307
+ * channel (code.claude.com/docs/en/hooks, retrieved 2026-07-15). The first manifest kind
308
+ * temper ships — the read side of 0021's manifest-authoring surface.
309
+ */
310
+ export declare const hook: KindDefinition<Hook>;
311
+ /**
312
+ * A Claude Code MCP server — a fields-only registration member surfacing inside
313
+ * `.mcp.json`, keyed by name under `mcpServers`. It owns no artifact of its own; its
314
+ * `type` names the transport (`stdio` default, or `http`/`streamable-http`/`sse`/`ws`),
315
+ * and each transport reads a different field set — `command`/`args`/`env` for a local
316
+ * stdio process, `url`/`headers` for a remote connection
317
+ * (code.claude.com/docs/en/mcp, retrieved 2026-07-15). Authoring `mcpServer(...)` builds a
318
+ * member whose typed fields fold into its `mcpServers.*` entry; emit erases it into a
319
+ * registration write fact (`emit.ts`).
320
+ */
321
+ export interface McpServer {
322
+ /**
323
+ * The transport. Absent reads as `stdio`, so an entry that carries a `url` but no
324
+ * `type` is a configuration error — Claude Code treats it as a stdio server and skips
325
+ * it. `streamable-http` is an alias for `http`.
326
+ */
327
+ readonly type?: "stdio" | "http" | "streamable-http" | "sse" | "ws";
328
+ /** The executable a stdio server runs. */
329
+ readonly command?: string;
330
+ /** The arguments passed to a stdio server's `command`. */
331
+ readonly args?: readonly string[];
332
+ /** Environment variables set in a stdio server's process. */
333
+ readonly env?: Readonly<Record<string, string>>;
334
+ /** The endpoint a remote (`http`/`sse`/`ws`) server connects to. */
335
+ readonly url?: string;
336
+ /** Static headers sent to a remote server. */
337
+ readonly headers?: Readonly<Record<string, string>>;
338
+ /** Milliseconds before a tool call to this server aborts. */
339
+ readonly timeout?: number;
340
+ }
341
+ /**
342
+ * `mcpServer` — a `.mcp.json` `mcpServers.*` registration member: a fields-only kind (no
343
+ * body slot), its members discovered off the `.mcp.json` manifest at the `mcpServers.*`
344
+ * collection address, keyed by server name; registers on the `connection` channel
345
+ * (code.claude.com/docs/en/mcp, retrieved 2026-07-15). The second manifest kind temper
346
+ * ships, and the first whose entries are objects — each server's fields fold into the
347
+ * member the read surfaces.
348
+ */
349
+ export declare const mcpServer: KindDefinition<McpServer>;
350
+ /**
351
+ * A Claude Code installed plugin — a fields-only registration member surfacing inside
352
+ * `.claude/settings.json`, keyed by its `<plugin>@<marketplace>` identity
353
+ * (`formatter@my-marketplace`). It owns no artifact of its own, and unlike a hook (array
354
+ * value) or an MCP server (object value) its entry's value is a bare scalar, so the
355
+ * member carries exactly one field (code.claude.com/docs/en/plugins-reference, retrieved
356
+ * 2026-07-16).
357
+ *
358
+ * The members a plugin *contributes* — its skills, agents, hooks, MCP servers — live in
359
+ * the plugin cache, outside the corpus. Their reach is unmodeled and named as such: this
360
+ * kind types the enablement entry, never the plugin's own surface.
361
+ */
362
+ export interface InstalledPlugin {
363
+ /**
364
+ * Whether the harness loads the plugin. Claude Code writes `true` at install or enable
365
+ * time; `false` is a plugin left installed but not loaded, and its documented semantics
366
+ * gate the member off its one channel — the gate rides this field, never a second
367
+ * registration entry.
368
+ */
369
+ readonly enabled: boolean;
370
+ }
371
+ /**
372
+ * `installedPlugin` — a `settings.json` `enabledPlugins` registration member: a
373
+ * fields-only kind (no body slot), its members discovered off the `.claude/settings.json`
374
+ * manifest at the `enabledPlugins.*` collection address, keyed by plugin identity;
375
+ * registers on the `enablement` channel — the entry's own presence is the registration
376
+ * (code.claude.com/docs/en/plugins-reference, retrieved 2026-07-16). The third manifest
377
+ * kind temper ships, and the first whose entries are scalars.
378
+ */
379
+ export declare const installedPlugin: KindDefinition<InstalledPlugin>;
380
+ /**
381
+ * The default contract for `installed-plugin` — **deliberately empty**. The format
382
+ * documents almost no contract, so it earns an almost-empty default: the honest encoding,
383
+ * not a gap.
384
+ *
385
+ * A charset clause on the `<plugin>@<marketplace>` key has nothing decidable to range
386
+ * over: the key is the member's identity, and the two sources that describe it do not
387
+ * settle a charset — the plugins-reference documents the identity as
388
+ * `formatter@my-marketplace` and schemastore's `claude-code-settings.json` constrains its
389
+ * `enabledPlugins` keys with no `propertyNames` pattern at all (both retrieved
390
+ * 2026-07-16), so a clause against either spelling would forge findings on valid harnesses.
391
+ * The marketplace half of the key is not un-typed, though: it is a declared edge to the
392
+ * `known-marketplace` member it names, resolved on the reference graph rather than by a
393
+ * contract clause — an enablement naming a marketplace no registration declares is a
394
+ * dangling-edge finding, never a convention (decision 0039).
395
+ *
396
+ * `enabled` needs no `required` clause: the type already holds it, and a member that
397
+ * omits it projects the `true` Claude Code itself writes.
398
+ */
399
+ export declare const installedPluginDefaultContract: readonly Clause[];
400
+ /**
401
+ * A Claude Code known marketplace — the consumer half of the plugin-distribution graph, a
402
+ * fields-only registration member surfacing inside `.claude/settings.json` under
403
+ * `extraKnownMarketplaces`, keyed by the marketplace name a user has registered. Distinct
404
+ * from the publisher-side {@link Marketplace} catalog: that document is a marketplace's own
405
+ * `.claude-plugin/marketplace.json`, this entry is one consumer's record that they have
406
+ * added it — two documents, two owners. The product stores the same registry per-user in
407
+ * `known_marketplaces.json`; `extraKnownMarketplaces` is the committable, project-scoped
408
+ * spelling temper types (code.claude.com/docs/en/plugin-marketplaces, retrieved 2026-07-17).
409
+ *
410
+ * Its value is an object (unlike an installed plugin's bare boolean), so the member folds
411
+ * the object's fields: where to fetch the marketplace from, and whether the harness keeps it
412
+ * up to date.
413
+ */
414
+ export interface KnownMarketplace {
415
+ /**
416
+ * Where the harness fetches this marketplace from — the same documented `source` union a
417
+ * marketplace lists its plugins by ({@link MarketplaceSource}): a `./`-relative path, or an
418
+ * object naming `github`, `url`, `git-subdir`, or `npm`
419
+ * (code.claude.com/docs/en/plugin-marketplaces, retrieved 2026-07-17).
420
+ */
421
+ readonly source: MarketplaceSource;
422
+ /**
423
+ * Whether the harness re-fetches the marketplace catalog on its own. Omitting it leaves the
424
+ * harness's default in force; the field only pins the choice
425
+ * (code.claude.com/docs/en/plugin-marketplaces, retrieved 2026-07-17).
426
+ */
427
+ readonly autoUpdate?: boolean;
428
+ }
429
+ /**
430
+ * `knownMarketplace` — a `settings.json` `extraKnownMarketplaces` registration member: a
431
+ * fields-only kind (no body slot), its members discovered off the `.claude/settings.json`
432
+ * manifest at the `extraKnownMarketplaces.*` collection address, keyed by marketplace name;
433
+ * registers on the `registry` channel — the entry's own presence is the registration, and
434
+ * whether the marketplace it names actually resolves is a fetch-time fact temper cannot
435
+ * decide, so the channel is never provably dead (code.claude.com/docs/en/plugin-marketplaces,
436
+ * retrieved 2026-07-17). The fourth registration member temper ships.
437
+ */
438
+ export declare const knownMarketplace: KindDefinition<KnownMarketplace>;
439
+ /**
440
+ * The default contract for `known-marketplace` — **deliberately empty**. The format
441
+ * documents no decidable schema beyond the shape the {@link KnownMarketplace} type already
442
+ * holds: `source` is the same union {@link Marketplace} carries and reuses its typing,
443
+ * `autoUpdate` is a bare optional boolean, and the key is the member's identity (a
444
+ * marketplace name) rather than a declared field a clause could range over. Nothing decidable
445
+ * survives that the type does not already enforce, so the honest encoding is the empty
446
+ * contract, not a forged clause — the `installedPluginDefaultContract` precedent.
447
+ */
448
+ export declare const knownMarketplaceDefaultContract: readonly Clause[];
449
+ /**
450
+ * A Claude Code plugin manifest — `.claude-plugin/plugin.json`, the pack's identity and
451
+ * the metadata a marketplace lists it by. The manifest itself is optional (Claude Code
452
+ * auto-discovers components in their default locations and derives the name from the
453
+ * directory); once written, `name` is the only field it must carry
454
+ * (code.claude.com/docs/en/plugins-reference, retrieved 2026-07-16).
455
+ *
456
+ * Every other field is optional and typed. The component path fields do not describe the
457
+ * plugin — they *relocate* its components, adding to or replacing the default scan, so a
458
+ * wrong type on one is a load error rather than bad metadata (same source).
459
+ */
460
+ export interface PluginManifest {
461
+ /**
462
+ * The pack's unique identifier — kebab-case, no spaces — and the namespace its
463
+ * components surface under (`plugin-dev:agent-creator`). When a marketplace entry lists
464
+ * the plugin under a different name, the marketplace entry's name is what `enabledPlugins`
465
+ * keys and `/plugin` shows.
466
+ */
467
+ readonly name: string;
468
+ /** JSON Schema URL for editor autocomplete; Claude Code ignores it at load time. */
469
+ readonly $schema?: string;
470
+ /**
471
+ * Human-readable name for the `/plugin` picker, falling back to `name`. May carry spaces
472
+ * and any casing; never used for namespacing or lookup. Requires Claude Code v2.1.143+.
473
+ */
474
+ readonly displayName?: string;
475
+ /**
476
+ * Semantic version. Setting it pins the plugin to that string, so users see an update
477
+ * only when it is bumped; omitting it falls back to the git commit SHA, making every
478
+ * commit a new version. Set in both places, `plugin.json` wins over the marketplace entry.
479
+ */
480
+ readonly version?: string;
481
+ /** Brief explanation of the plugin's purpose. */
482
+ readonly description?: string;
483
+ readonly author?: Readonly<{
484
+ name?: string;
485
+ email?: string;
486
+ url?: string;
487
+ }>;
488
+ /** Documentation URL. */
489
+ readonly homepage?: string;
490
+ /** Source code URL. */
491
+ readonly repository?: string;
492
+ /** License identifier (`MIT`, `Apache-2.0`). */
493
+ readonly license?: string;
494
+ /** Discovery tags. */
495
+ readonly keywords?: readonly string[];
496
+ /**
497
+ * Whether the plugin starts enabled when the user has not set a state; defaults to
498
+ * `true`. A `enabledPlugins` entry at any settings scope and a dependency requirement
499
+ * each take precedence over it, as does the marketplace entry's own copy of the field.
500
+ * Requires Claude Code v2.1.154+.
501
+ */
502
+ readonly defaultEnabled?: boolean;
503
+ /** Custom skill directories holding `<name>/SKILL.md`; adds to the default `skills/` scan. */
504
+ readonly skills?: readonly string[] | string;
505
+ /** Custom flat `.md` skill files or directories; replaces the default `commands/` scan. */
506
+ readonly commands?: readonly string[] | string;
507
+ /** Custom agent files; replaces the default `agents/` scan. */
508
+ readonly agents?: readonly string[] | string;
509
+ /** Hook config paths, or the hook config inline. */
510
+ readonly hooks?: readonly string[] | string | Readonly<Record<string, unknown>>;
511
+ /** MCP config paths, or the server config inline. */
512
+ readonly mcpServers?: readonly string[] | string | Readonly<Record<string, unknown>>;
513
+ /** Custom output style files/directories; replaces the default `output-styles/` scan. */
514
+ readonly outputStyles?: readonly string[] | string;
515
+ /** Language Server Protocol configs powering code intelligence. */
516
+ readonly lspServers?: readonly string[] | string | Readonly<Record<string, unknown>>;
517
+ /**
518
+ * The components whose manifest schema may still change between releases. Declaring
519
+ * `themes`/`monitors` at the top level instead still works today, but `claude plugin
520
+ * validate` warns and a future release will require them here.
521
+ */
522
+ readonly experimental?: Readonly<{
523
+ themes?: readonly string[] | string;
524
+ monitors?: readonly string[] | string;
525
+ }>;
526
+ /** User-configurable values Claude Code prompts for when the plugin is enabled. */
527
+ readonly userConfig?: Readonly<Record<string, unknown>>;
528
+ /** Channel declarations for message injection. */
529
+ readonly channels?: readonly unknown[];
530
+ /** Other plugins this one requires, optionally with semver constraints. */
531
+ readonly dependencies?: readonly (string | Readonly<{
532
+ name: string;
533
+ version?: string;
534
+ }>)[];
535
+ }
536
+ /**
537
+ * `plugin-manifest` — `.claude-plugin/plugin.json`, a whole-file JSON document (never
538
+ * frontmatter) whose top-level keys are its fields; identity is read from `name`, the
539
+ * named-field mode, because the file's stem is `plugin` for every manifest ever written.
540
+ * It owns its file, so it carries no collection address, and it is channel-less: a
541
+ * manifest carries distribution metadata rather than session content, so it reaches the
542
+ * model on no channel of its own — what it reaches is the installer
543
+ * (code.claude.com/docs/en/plugins-reference, retrieved 2026-07-16).
544
+ */
545
+ export declare const pluginManifest: KindDefinition<PluginManifest>;
546
+ /**
547
+ * The default contract for `plugin-manifest` — the documented profile of `claude plugin
548
+ * validate --strict`, which is the portable bar: Claude Code's own runtime is deliberately
549
+ * forgiving of unrecognized fields, `--strict` is the CI bar that catches them, and where
550
+ * the two diverge each clause's guidance says so (all facts
551
+ * code.claude.com/docs/en/plugins-reference, retrieved 2026-07-16).
552
+ *
553
+ * The whole profile ships: every documented rule the vocabulary can decide is a clause
554
+ * below, and nothing decidable is held.
555
+ *
556
+ * **Unrecognized top-level fields** — the substance of `--strict` — are the `closedKeys()`
557
+ * clause at the end, over the `required`/`optional` rows above it: Claude Code ignores a
558
+ * key it does not recognize so a manifest doubling as a `package.json` still loads, and
559
+ * `claude plugin validate` warns rather than fails, but `--strict` turns those warnings
560
+ * into the CI errors this contract is the profile of. The declared key set is the union of
561
+ * the two documented sources — the reference's own field tables and the published schema
562
+ * — because a key *either* one recognizes is a key no clause may indict.
563
+ *
564
+ * The component-path fields are gated below rather than held: `type` declares a *set* of
565
+ * lattice kinds, so a field documented `string|array` is checked as the union it is. Each
566
+ * clause declares the widest union its documentation states — a narrower set would reject
567
+ * a documented form, which is a false positive no clause may produce, and the strictest
568
+ * *documented* profile of a union-typed field is the union.
569
+ *
570
+ * Deliberately absent as undecidable: whether the `description` reads well, whether
571
+ * `keywords` aid discovery, whether `name` names the pack aptly.
572
+ *
573
+ * Authoring notes the clauses cannot carry: leave `version` unset while iterating, so the
574
+ * commit SHA drives updates and users are not stranded on a stale pin; set it once the
575
+ * plugin has a release cycle, and bump it every time — pushing commits without bumping is
576
+ * a no-op. Reach for `defaultEnabled: false` when the plugin costs money or scope on load.
577
+ */
578
+ export declare const pluginManifestDefaultContract: readonly Clause[];
579
+ /**
580
+ * Where a marketplace fetches one listed plugin from — the documented `source` union
581
+ * (code.claude.com/docs/en/plugin-marketplaces, "Plugin sources", retrieved 2026-07-16).
582
+ *
583
+ * A relative-path string is the local form: it must start with `./` and resolves against
584
+ * the *marketplace root* — the directory containing `.claude-plugin/` — never against
585
+ * `.claude-plugin/` itself. The object forms carry a `source` discriminator naming the
586
+ * fetch mechanism.
587
+ *
588
+ * On the three git-based forms (`github`, `url`, `git-subdir`), `ref` names a branch or
589
+ * tag and `sha` an exact commit; when both are set the `sha` is the effective pin.
590
+ */
591
+ export type MarketplaceSource = string | Readonly<{
592
+ source: "github";
593
+ repo: string;
594
+ ref?: string;
595
+ sha?: string;
596
+ }> | Readonly<{
597
+ source: "url";
598
+ url: string;
599
+ ref?: string;
600
+ sha?: string;
601
+ }> | Readonly<{
602
+ source: "git-subdir";
603
+ url: string;
604
+ path: string;
605
+ ref?: string;
606
+ sha?: string;
607
+ }> | Readonly<{
608
+ source: "npm";
609
+ package: string;
610
+ version?: string;
611
+ registry?: string;
612
+ }>;
613
+ /**
614
+ * One entry in a marketplace's `plugins` array: `name` and `source` are required, and
615
+ * every field of the plugin manifest schema may be restated here alongside the
616
+ * marketplace-specific `source`, `category`, `tags`, `strict`, and `relevance`
617
+ * (code.claude.com/docs/en/plugin-marketplaces, "Plugin entries", retrieved 2026-07-16).
618
+ */
619
+ export interface MarketplacePlugin extends Omit<PluginManifest, "name"> {
620
+ /** The public-facing plugin identifier users type: `/plugin install <name>@<market>`. */
621
+ readonly name: string;
622
+ /** Where to fetch this plugin from. */
623
+ readonly source: MarketplaceSource;
624
+ /** Category for organization in the picker. */
625
+ readonly category?: string;
626
+ /** Tags for searchability. */
627
+ readonly tags?: readonly string[];
628
+ /**
629
+ * Whether `plugin.json` is the authority for component definitions (default `true`).
630
+ */
631
+ readonly strict?: boolean;
632
+ /**
633
+ * Signals telling Claude Code when to suggest this plugin. Takes effect only for
634
+ * marketplaces an administrator allowlists in managed settings. Requires v2.1.152+.
635
+ */
636
+ readonly relevance?: Readonly<Record<string, unknown>>;
637
+ }
638
+ /**
639
+ * `.claude-plugin/marketplace.json` — the distribution catalog
640
+ * (code.claude.com/docs/en/plugin-marketplaces, "Marketplace schema", retrieved
641
+ * 2026-07-16).
642
+ */
643
+ export interface Marketplace {
644
+ /**
645
+ * The marketplace identifier (kebab-case, no spaces), public-facing: users see it when
646
+ * installing (`/plugin install my-tool@your-marketplace`). Each user registers only one
647
+ * marketplace per name — adding a second under the same name replaces the first — and
648
+ * the name is checked against a reserved deny list.
649
+ */
650
+ readonly name: string;
651
+ /** The maintainer: `name` required, `email` optional. */
652
+ readonly owner: Readonly<{
653
+ name: string;
654
+ email?: string;
655
+ }>;
656
+ /** The catalog itself — every plugin this marketplace distributes. */
657
+ readonly plugins: readonly MarketplacePlugin[];
658
+ /** JSON Schema URL for editor autocomplete. Claude Code ignores it at load time. */
659
+ readonly $schema?: string;
660
+ /** Brief marketplace description. */
661
+ readonly description?: string;
662
+ /** Marketplace manifest version. */
663
+ readonly version?: string;
664
+ /**
665
+ * `pluginRoot` is a base directory prepended to relative plugin source paths, so
666
+ * `"source": "formatter"` resolves under it. `description`/`version` are also accepted
667
+ * here for backward compatibility.
668
+ */
669
+ readonly metadata?: Readonly<{
670
+ pluginRoot?: string;
671
+ description?: string;
672
+ version?: string;
673
+ }>;
674
+ /**
675
+ * Other marketplaces whose plugins this marketplace's plugins may depend on. A
676
+ * dependency on a marketplace absent from this list is blocked at install.
677
+ */
678
+ readonly allowCrossMarketplaceDependenciesOn?: readonly string[];
679
+ /**
680
+ * Map from a former plugin `name` to its current name, or to `null` if it was removed —
681
+ * how existing users migrate across a rename. Requires Claude Code v2.1.193 or later.
682
+ */
683
+ readonly renames?: Readonly<Record<string, string | null>>;
684
+ }
685
+ /**
686
+ * `marketplace` — `.claude-plugin/marketplace.json`, a whole-file JSON document whose
687
+ * top-level keys are its fields; identity from `name`, the named-field mode, because the
688
+ * stem is `marketplace` for every catalog ever written. Like its `plugin-manifest`
689
+ * sibling it owns its file (no collection address) and is channel-less: a catalog is read
690
+ * by the installer, never surfaced to the model
691
+ * (code.claude.com/docs/en/plugin-marketplaces, retrieved 2026-07-16).
692
+ */
693
+ export declare const marketplace: KindDefinition<Marketplace>;
694
+ /**
695
+ * The default contract for `marketplace` — the strictest documented profile of the catalog
696
+ * format (all facts code.claude.com/docs/en/plugin-marketplaces, retrieved 2026-07-16).
697
+ *
698
+ * The reserved-names clause is the load-bearing one, and it gates a *loud* failure: Claude
699
+ * Code re-checks reserved names on every load, not only on `/plugin marketplace add`, so a
700
+ * catalog published under a name that later becomes reserved stops loading for every user
701
+ * who already added it. That is the one clause here worth more than a lint.
702
+ *
703
+ * The `source` union's per-form required fields are now gated via `when` clauses: decision
704
+ * 0041's Rust implementation shipped in src/contract.rs (Predicate::When, src/engine.rs:1207
705
+ * decide logic), and the SDK's `when()` export has been available since 884a704 — both well
706
+ * before these comments were last touched. The per-source-form requirements now hold via guarded
707
+ * clauses at `plugins[*].source`: the string form needs `leading-dot-slash` shape; each object
708
+ * form (`github`, `url`, `git-subdir`, `npm`) needs its required fields.
709
+ *
710
+ * Deliberately absent as undecidable, and never a clause (`specs/intent.md`, invariant 2):
711
+ * the docs *also* block names that "impersonate official marketplaces" (`official-claude-plugins`,
712
+ * `anthropic-plugins-v2` are the page's own examples). Impersonation is semantic judgment —
713
+ * there is no predicate that decides it, and a clause that guessed would fire on true
714
+ * negatives. The enumerated deny list is the decidable subset; the impersonation rule rides
715
+ * as guidance below.
716
+ *
717
+ * Authoring notes the clauses cannot carry: a relative-path `source` resolves against a
718
+ * *local copy* of the marketplace, so it silently fails to resolve for users who added the
719
+ * marketplace by direct URL to `marketplace.json` — only that one file is downloaded. Reach
720
+ * for `github`, `url`, or `npm` when the catalog is distributed by URL. Where a git source
721
+ * pins both `ref` and `sha`, the `sha` is the effective pin. A marketplace entry's
722
+ * `defaultEnabled` beats the same field in the plugin's own `plugin.json`, while `version`
723
+ * runs the other way — `plugin.json` wins.
724
+ */
725
+ export declare const marketplaceDefaultContract: readonly Clause[];
726
+ /**
727
+ * A Claude Code local settings overlay — `.claude/settings.local.json`, the machine's own
728
+ * per-project settings at the **local** scope: personal overrides not checked in. Claude
729
+ * Code gitignores the file when it creates it, and one written by hand belongs in
730
+ * `.gitignore` too (code.claude.com/docs/en/settings, "Settings files", retrieved
731
+ * 2026-07-16).
732
+ *
733
+ * Only the documented top-level keys a local overlay commonly carries are typed here; the
734
+ * settings schema is large and version-evolving, and every key not named below survives as
735
+ * opaque residue named as such — the partial-governance posture 0036 settles. This is
736
+ * *fields*, not members: a hook registered under `hooks` or a plugin enablement under
737
+ * `enabledPlugins` here stays part of that field's opaque value, never a modeled `hook`/
738
+ * `installed-plugin` member of its own (those kinds read the committed `settings.json`,
739
+ * not this uncommitted overlay).
740
+ */
741
+ export interface SettingsLocal {
742
+ /** JSON Schema URL for editor autocomplete; Claude Code ignores it at load time. */
743
+ readonly $schema?: string;
744
+ /** Tool-permission rules: `{ allow, ask, deny }`, each an array of rule strings. */
745
+ readonly permissions?: Readonly<Record<string, unknown>>;
746
+ /** Environment variables applied to every session, a map of string to string. */
747
+ readonly env?: Readonly<Record<string, string>>;
748
+ /** Event hook handlers, keyed by lifecycle event — the hooks-configuration object. */
749
+ readonly hooks?: Readonly<Record<string, unknown>>;
750
+ /** The model this project runs as. */
751
+ readonly model?: string;
752
+ /** Whether project MCP servers from `.mcp.json` are auto-approved. */
753
+ readonly enableAllProjectMcpServers?: boolean;
754
+ /** MCP servers from `.mcp.json` to approve. */
755
+ readonly enabledMcpjsonServers?: readonly string[];
756
+ /** MCP servers from `.mcp.json` to reject. */
757
+ readonly disabledMcpjsonServers?: readonly string[];
758
+ /** Whether to add a Claude co-author trailer to git commits. */
759
+ readonly includeCoAuthoredBy?: boolean;
760
+ /** The output rendering style. */
761
+ readonly outputStyle?: string;
762
+ }
763
+ /**
764
+ * `settings-local` — `.claude/settings.local.json`, a whole-file JSON document at the
765
+ * **local** commitment class: read in place at check and gated, never an `emit` input or
766
+ * target, its rows derived at read time and no row of it ever landing in the lock. Its
767
+ * top-level keys are its fields; identity is the fixed singleton stem `settings.local` (the
768
+ * `file` unit shape — every machine's overlay is the one file at this path, so no declared
769
+ * key names it). Channel-less: machine configuration read by the harness, never surfaced to
770
+ * the model (code.claude.com/docs/en/settings, retrieved 2026-07-16; decisions
771
+ * 0032/0034/0036).
772
+ */
773
+ export declare const settingsLocal: KindDefinition<SettingsLocal>;
774
+ /**
775
+ * The default contract for `settings-local` — deliberately near-empty. The settings format
776
+ * documents a large, version-evolving key set (many keys managed-scope-only, most of them
777
+ * scalar preferences), so a `closedKeys()` allow-list would strand every valid local
778
+ * overlay the moment upstream adds a key: 0036 settles the residue *opaque*, not indicted.
779
+ * What stays decidable is the shape of the few structural container keys a local overlay
780
+ * carries — `permissions`, `env`, and `hooks` are each a documented JSON *object*, and a
781
+ * value that is not one cannot be applied — so each is gated as a `map` and everything else
782
+ * rides opaque. (All facts code.claude.com/docs/en/settings, retrieved 2026-07-16.)
783
+ *
784
+ * Deliberately absent as undecidable: whether a permission rule reads correctly, whether an
785
+ * env var is one this machine needs, whether the chosen `model` exists — semantic judgment,
786
+ * never a gate clause.
787
+ */
788
+ export declare const settingsLocalDefaultContract: readonly Clause[];
100
789
  /**
101
790
  * The default contract for `skill` — Anthropic's documented skill contract: the Agent
102
791
  * Skills open standard (agentskills.io), Anthropic's platform upload
103
792
  * validation, and Claude Code's own docs.
104
- * All sources retrieved 2026-07-09.
793
+ * All sources retrieved 2026-07-15.
105
794
  *
106
795
  * Checks the strictest documented profile: the spec and upload validation are
107
796
  * hard, Claude Code's runtime is deliberately forgiving ("All fields are
@@ -111,11 +800,9 @@ export declare const memory: KindDefinition<Memory>;
111
800
  *
112
801
  * Deliberately absent — undecidable, so never gate clauses: whether the
113
802
  * description actually triggers well or reads third-person (semantic);
114
- * vagueness/no-op detection (semantic); gerund naming (judgment). Two
115
- * decidable spec rules are also absent, pending a vocabulary addition (a
116
- * narrow shape predicate governs additions): the name
117
- * must not start/end with a hyphen or contain consecutive hyphens; likewise
118
- * the platform's "no XML tags in the description."
803
+ * vagueness/no-op detection (semantic); gerund naming (judgment). Nothing
804
+ * decidable is held: the name's hyphen placement and the platform's "no XML
805
+ * tags in the description" are the two `shape` clauses below.
119
806
  *
120
807
  * Authoring notes the clauses cannot carry: prefer gerund or noun-phrase
121
808
  * names (`processing-pdfs`, `pdf-processing`) over vague ones (`helper`,
@@ -125,18 +812,35 @@ export declare const memory: KindDefinition<Memory>;
125
812
  * there is no top-level `version` field.
126
813
  */
127
814
  export declare const skillDefaultContract: readonly Clause[];
815
+ /**
816
+ * The default contract for `supporting-doc` — one clause, because the format documents
817
+ * exactly one thing about a supporting file that is decidable, and it is not a fact
818
+ * about the file's own contents: a supporting file is prose Claude reads when the
819
+ * skill's body points at it, so an unreferenced one is never read at all
820
+ * (code.claude.com/docs/en/skills, "Add supporting files", retrieved 2026-07-16). The
821
+ * format carries no frontmatter schema, no required field and no cap of its own, so
822
+ * nothing else joins it — an almost-empty format gets an almost-empty contract, and
823
+ * manufacturing a second clause would fake a check the format does not carry.
824
+ *
825
+ * The reach bound is a property of the file's *place in the graph*, not its bytes, and
826
+ * the fact holds of every supporting document — so it is spelled as the by-kind
827
+ * universal binding at the `each` grain (`model/contract.md`, "selection"), never as a
828
+ * requirement: a requirement is the opt-in selector, and routing a vendor fact through
829
+ * one would make the harness's own truth a consumer's ceremony.
830
+ */
831
+ export declare const supportingDocDefaultContract: readonly Clause[];
128
832
  /**
129
833
  * The default contract for `command` — `skillDefaultContract`'s clauses minus `nameMatchesDir`: a
130
834
  * command is a lone file with no parent directory to match, so the one clause
131
835
  * that ranges over the directory relationship does not apply; every other
132
836
  * documented skill-schema recommendation, name-requiredness included, still
133
837
  * governs a command by the same import (code.claude.com/docs/en/skills,
134
- * retrieved 2026-07-07).
838
+ * retrieved 2026-07-15).
135
839
  */
136
840
  export declare const commandDefaultContract: readonly Clause[];
137
841
  /**
138
842
  * The default contract for `agent` — Anthropic's documented subagent contract
139
- * (code.claude.com/docs/en/sub-agents, retrieved 2026-07-07): `name` and
843
+ * (code.claude.com/docs/en/sub-agents, retrieved 2026-07-15): `name` and
140
844
  * `description` are the only required fields, `name` is a "unique identifier
141
845
  * using lowercase letters and hyphens" (no digits, unlike a skill's `name`), and
142
846
  * "keep `name` values unique across the whole tree" — a same-scope collision
@@ -150,8 +854,7 @@ export declare const agentDefaultContract: readonly Clause[];
150
854
  /**
151
855
  * The default contract for `rule` — Anthropic's documented contract for a Claude Code
152
856
  * rules file, sourced from the memory docs (`.claude/rules/` landed in
153
- * v2.0.64; `packages/rule.anthropic/PACKAGE.md`, the curated authoring
154
- * reference this migrates verbatim). All sources retrieved 2026-07-09.
857
+ * v2.0.64). All sources retrieved 2026-07-15.
155
858
  *
156
859
  * `paths` is the one documented frontmatter key for rules: glob patterns
157
860
  * (brace expansion supported) that scope the rule to matching files. Rules
@@ -161,7 +864,7 @@ export declare const agentDefaultContract: readonly Clause[];
161
864
  * optional field asserts nothing decidable, so it carries no clause of its
162
865
  * own: `required` is the one
163
866
  * presence predicate, and its absence is not itself a predicate.)
164
- * https://code.claude.com/docs/en/memory#path-specific-rules (retrieved 2026-07-09)
867
+ * https://code.claude.com/docs/en/memory#path-specific-rules (retrieved 2026-07-15)
165
868
  *
166
869
  * What the clauses cannot carry, as guidance: keep a rule to facts Claude
167
870
  * should hold whenever the rule is in scope — concrete enough to verify ("use
@@ -176,12 +879,11 @@ export declare const agentDefaultContract: readonly Clause[];
176
879
  export declare const ruleDefaultContract: readonly Clause[];
177
880
  /**
178
881
  * The default contract for the qualified `claude-code.memory` kind — Anthropic's
179
- * documented contract for a project `CLAUDE.md` (`packages/memory.anthropic/PACKAGE.md`,
180
- * the curated authoring reference this migrates verbatim). Retrieved 2026-07-09.
882
+ * documented contract for a project `CLAUDE.md`. Retrieved 2026-07-15.
181
883
  *
182
884
  * Deliberately near-empty, because the format is: `CLAUDE.md` is plain
183
885
  * markdown with no documented frontmatter and no required fields
184
- * (code.claude.com/docs/en/memory, retrieved 2026-07-09), so there is no
886
+ * (code.claude.com/docs/en/memory, retrieved 2026-07-15), so there is no
185
887
  * schema to gate — manufacturing a required field or a forbidden-key list
186
888
  * would fake a check the format does not carry. The single clause is a context-cost
187
889
  * budget; everything else the contract could say is guidance.
@@ -203,25 +905,40 @@ export declare const ruleDefaultContract: readonly Clause[];
203
905
  */
204
906
  export declare const memoryAnthropicDefaultContract: readonly Clause[];
205
907
  /**
206
- * The default contract for the qualified `agents-md.memory` kind — the AGENTS.md
207
- * standard's contract for a memory file, which is that there is almost none
208
- * (`packages/memory.agents-md/PACKAGE.md`, the curated authoring reference
209
- * this migrates). Guidance-only, and that is the honest encoding: `AGENTS.md`
210
- * "is just standard Markdown" with no required fields, no sections, and no
211
- * frontmatter (agents.md, retrieved 2026-07-09); the format deliberately
212
- * constrains nothing. A default contract that manufactured a required field, a size
213
- * gate, or a forbidden-key list would assert a contract the standard
214
- * disclaims. Even the tempting size
215
- * number is a *tool's* rule, not the format's: agents read the closest
216
- * `AGENTS.md` in the tree (nested, nearest-wins; agents.md, retrieved
217
- * 2026-07-09); Codex concatenates the chain root-to-cwd and stops once
218
- * combined size hits a byte budget, not a per-file line count
219
- * (`project_doc_max_bytes`, 32 KiB default;
220
- * developers.openai.com/codex/guides/agents-md, retrieved 2026-07-09);
221
- * Gemini CLI reads `GEMINI.md` by default and only treats `AGENTS.md` as an
222
- * alias when configured via `context.fileName` (geminicli.com/docs/cli/gemini-md,
223
- * retrieved 2026-07-09); Claude Code does not read `AGENTS.md` natively —
224
- * bridge it with a `CLAUDE.md` that `@AGENTS.md`-imports it
225
- * (code.claude.com/docs/en/memory, retrieved 2026-07-09).
226
- */
227
- export declare const memoryAgentsMdDefaultContract: readonly Clause[];
908
+ * The default contract for `hook` — Anthropic's documented hooks contract
909
+ * (code.claude.com/docs/en/hooks, retrieved 2026-07-15). A hook surfaces at
910
+ * `hooks.<Event>`, so the member the gate reads is the lifecycle event itself, its name
911
+ * carried as the `event` field off the collection key. The one decidable, cited property
912
+ * of that member is its event: a key outside the documented set is dead configuration —
913
+ * Claude Code silently never fires a hook under an unrecognized event, so the strictest
914
+ * documented profile is that the event is one temper's cited docs name.
915
+ *
916
+ * **Re-examined against decision 0041's widened vocabulary and confirmed to still hold**:
917
+ * The handler's own schema (`type`/`command`/`url`/`timeout`, the matcher grammar) lives
918
+ * one array level deeper than `hooks.<Event>`, inside each event's matcher-group list. The
919
+ * collection address `hooks.<Event>` does not walk into arrays, and even with the guard
920
+ * vocabulary's when/enumOf/type extensions, addressing still cannot spell a path into the
921
+ * handler array (e.g., `hooks.<Event>[0].type`). A clause over it would range over a field
922
+ * the read never surfaces, so it is no clause at all — the addressing-reach gap remains.
923
+ * What the clauses cannot carry, as guidance: keep a handler's `type` among
924
+ * `command`/`http`/`mcp_tool`/`prompt`/`agent`; a `command` handler needs a `command`, an
925
+ * `http` handler a `url`; the `matcher` filters tool-scoped events and is inert on events
926
+ * that carry no tool (`UserPromptSubmit`, `Stop`, and their siblings).
927
+ */
928
+ export declare const hookDefaultContract: readonly Clause[];
929
+ /**
930
+ * The default contract for `mcpServer` — Anthropic's documented `.mcp.json` contract
931
+ * (code.claude.com/docs/en/mcp, retrieved 2026-07-15). A server surfaces at `mcpServers.*`,
932
+ * keyed by name, its transport-specific fields folded into the member. The one decidable,
933
+ * cited property that holds across every transport is `type`: a value outside the
934
+ * documented set is a transport Claude Code cannot honor, so the strictest documented
935
+ * profile is that a present `type` names one temper's cited docs carry. An absent `type`
936
+ * passes — Claude Code reads it as `stdio`, the documented default.
937
+ *
938
+ * The per-transport requirements are now gated via `when` clauses: a stdio server (type
939
+ * absent or `stdio`) needs a `command`, and a remote server (type `http`, `streamable-http`,
940
+ * `sse`, or `ws`) needs a `url`. Decision 0041's Rust implementation shipped in
941
+ * src/contract.rs and the SDK's `when()` export has been available since 884a704 — both
942
+ * well before these comments were last written.
943
+ */
944
+ export declare const mcpServerDefaultContract: readonly Clause[];