@agentxm/extension-model 0.28.4 → 0.28.7-preview.1788522540.63ba4b89a

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.
@@ -0,0 +1,156 @@
1
+ import * as Schema from "effect/Schema";
2
+ /** @experimental This API is unstable and may change without notice. */
3
+ export declare const STABLE_CHANNEL_SCHEMA = "axm.release-channel/v1";
4
+ /** @experimental This API is unstable and may change without notice. */
5
+ export declare const STABLE_CHANNEL_URL = "https://releases.axm.sh/v1/channels/stable.json";
6
+ /** @experimental This API is unstable and may change without notice. */
7
+ export declare const STABLE_CHANNEL_REPOSITORY = "agentxm/axm";
8
+ /**
9
+ * Public stable-channel document. Exact-version artifacts remain hosted by the
10
+ * immutable GitHub Release coordinate contained in this validated document.
11
+ *
12
+ * @experimental This API is unstable and may change without notice.
13
+ */
14
+ export declare const StableChannelDocumentV1Schema: Schema.Struct<{
15
+ readonly schema: Schema.Literal<"axm.release-channel/v1">;
16
+ readonly channel: Schema.Literal<"stable">;
17
+ readonly revision: Schema.Int;
18
+ readonly version: Schema.String;
19
+ readonly release: Schema.Struct<{
20
+ readonly repository: Schema.Literal<"agentxm/axm">;
21
+ readonly tag: Schema.String;
22
+ readonly commit: Schema.String;
23
+ readonly publishedAt: Schema.String;
24
+ }>;
25
+ readonly artifacts: Schema.Struct<{
26
+ readonly checksumManifest: Schema.Struct<{
27
+ readonly name: Schema.Literal<"SHA256SUMS">;
28
+ readonly url: Schema.String;
29
+ readonly sha256: Schema.String;
30
+ }>;
31
+ readonly binaries: Schema.Tuple<readonly [Schema.Struct<{
32
+ readonly target: Schema.Literal<"darwin-arm64">;
33
+ readonly name: Schema.Literal<"axm-darwin-arm64">;
34
+ readonly url: Schema.String;
35
+ readonly sha256: Schema.String;
36
+ }>, Schema.Struct<{
37
+ readonly target: Schema.Literal<"darwin-x64">;
38
+ readonly name: Schema.Literal<"axm-darwin-x64">;
39
+ readonly url: Schema.String;
40
+ readonly sha256: Schema.String;
41
+ }>, Schema.Struct<{
42
+ readonly target: Schema.Literal<"linux-arm64">;
43
+ readonly name: Schema.Literal<"axm-linux-arm64">;
44
+ readonly url: Schema.String;
45
+ readonly sha256: Schema.String;
46
+ }>, Schema.Struct<{
47
+ readonly target: Schema.Literal<"linux-x64">;
48
+ readonly name: Schema.Literal<"axm-linux-x64">;
49
+ readonly url: Schema.String;
50
+ readonly sha256: Schema.String;
51
+ }>, Schema.Struct<{
52
+ readonly target: Schema.Literal<"windows-x64">;
53
+ readonly name: Schema.Literal<"axm-windows-x64.exe">;
54
+ readonly url: Schema.String;
55
+ readonly sha256: Schema.String;
56
+ }>]>;
57
+ }>;
58
+ readonly promotedAt: Schema.String;
59
+ }>;
60
+ /** @experimental This API is unstable and may change without notice. */
61
+ export type StableChannelDocumentV1 = typeof StableChannelDocumentV1Schema.Type;
62
+ /** @experimental This API is unstable and may change without notice. */
63
+ export declare const decodeStableChannelDocument: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
64
+ readonly schema: "axm.release-channel/v1";
65
+ readonly channel: "stable";
66
+ readonly revision: number;
67
+ readonly version: string;
68
+ readonly release: {
69
+ readonly repository: "agentxm/axm";
70
+ readonly tag: string;
71
+ readonly commit: string;
72
+ readonly publishedAt: string;
73
+ };
74
+ readonly artifacts: {
75
+ readonly checksumManifest: {
76
+ readonly name: "SHA256SUMS";
77
+ readonly url: string;
78
+ readonly sha256: string;
79
+ };
80
+ readonly binaries: readonly [{
81
+ readonly target: "darwin-arm64";
82
+ readonly name: "axm-darwin-arm64";
83
+ readonly url: string;
84
+ readonly sha256: string;
85
+ }, {
86
+ readonly target: "darwin-x64";
87
+ readonly name: "axm-darwin-x64";
88
+ readonly url: string;
89
+ readonly sha256: string;
90
+ }, {
91
+ readonly target: "linux-arm64";
92
+ readonly name: "axm-linux-arm64";
93
+ readonly url: string;
94
+ readonly sha256: string;
95
+ }, {
96
+ readonly target: "linux-x64";
97
+ readonly name: "axm-linux-x64";
98
+ readonly url: string;
99
+ readonly sha256: string;
100
+ }, {
101
+ readonly target: "windows-x64";
102
+ readonly name: "axm-windows-x64.exe";
103
+ readonly url: string;
104
+ readonly sha256: string;
105
+ }];
106
+ };
107
+ readonly promotedAt: string;
108
+ }, Schema.SchemaError, never>;
109
+ /** @experimental This API is unstable and may change without notice. */
110
+ export declare const decodeStableChannelDocumentSync: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => {
111
+ readonly schema: "axm.release-channel/v1";
112
+ readonly channel: "stable";
113
+ readonly revision: number;
114
+ readonly version: string;
115
+ readonly release: {
116
+ readonly repository: "agentxm/axm";
117
+ readonly tag: string;
118
+ readonly commit: string;
119
+ readonly publishedAt: string;
120
+ };
121
+ readonly artifacts: {
122
+ readonly checksumManifest: {
123
+ readonly name: "SHA256SUMS";
124
+ readonly url: string;
125
+ readonly sha256: string;
126
+ };
127
+ readonly binaries: readonly [{
128
+ readonly target: "darwin-arm64";
129
+ readonly name: "axm-darwin-arm64";
130
+ readonly url: string;
131
+ readonly sha256: string;
132
+ }, {
133
+ readonly target: "darwin-x64";
134
+ readonly name: "axm-darwin-x64";
135
+ readonly url: string;
136
+ readonly sha256: string;
137
+ }, {
138
+ readonly target: "linux-arm64";
139
+ readonly name: "axm-linux-arm64";
140
+ readonly url: string;
141
+ readonly sha256: string;
142
+ }, {
143
+ readonly target: "linux-x64";
144
+ readonly name: "axm-linux-x64";
145
+ readonly url: string;
146
+ readonly sha256: string;
147
+ }, {
148
+ readonly target: "windows-x64";
149
+ readonly name: "axm-windows-x64.exe";
150
+ readonly url: string;
151
+ readonly sha256: string;
152
+ }];
153
+ };
154
+ readonly promotedAt: string;
155
+ };
156
+ //# sourceMappingURL=release-channel.d.ts.map
@@ -0,0 +1,92 @@
1
+ import * as Schema from "effect/Schema";
2
+ import * as semver from "semver";
3
+ /** @experimental This API is unstable and may change without notice. */
4
+ export const STABLE_CHANNEL_SCHEMA = "axm.release-channel/v1";
5
+ /** @experimental This API is unstable and may change without notice. */
6
+ export const STABLE_CHANNEL_URL = "https://releases.axm.sh/v1/channels/stable.json";
7
+ /** @experimental This API is unstable and may change without notice. */
8
+ export const STABLE_CHANNEL_REPOSITORY = "agentxm/axm";
9
+ const Sha256Schema = Schema.String.pipe(Schema.check(Schema.isPattern(/^[0-9a-f]{64}$/u, {
10
+ message: "Expected a lowercase SHA-256 digest",
11
+ })));
12
+ const UtcInstantSchema = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => {
13
+ if (!value.endsWith("Z") || Number.isNaN(Date.parse(value))) {
14
+ return "Expected a valid UTC RFC 3339 instant";
15
+ }
16
+ return undefined;
17
+ })));
18
+ const StableVersionSchema = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => {
19
+ const normalized = semver.valid(value);
20
+ return normalized === value && semver.prerelease(value) === null
21
+ ? undefined
22
+ : "Expected a normalized stable semantic version without a leading v";
23
+ })));
24
+ const ReleaseBinarySchema = (target, name) => Schema.Struct({
25
+ target: Schema.Literal(target),
26
+ name: Schema.Literal(name),
27
+ url: Schema.String,
28
+ sha256: Sha256Schema,
29
+ });
30
+ const StableChannelDocumentShape = Schema.Struct({
31
+ schema: Schema.Literal(STABLE_CHANNEL_SCHEMA),
32
+ channel: Schema.Literal("stable"),
33
+ revision: Schema.Int.pipe(Schema.check(Schema.isGreaterThanOrEqualTo(1, { message: "Expected a positive revision" }))),
34
+ version: StableVersionSchema,
35
+ release: Schema.Struct({
36
+ repository: Schema.Literal(STABLE_CHANNEL_REPOSITORY),
37
+ tag: Schema.String,
38
+ commit: Schema.String.pipe(Schema.check(Schema.isPattern(/^[0-9a-f]{40}$/u, {
39
+ message: "Expected a lowercase 40-character Git object ID",
40
+ }))),
41
+ publishedAt: UtcInstantSchema,
42
+ }),
43
+ artifacts: Schema.Struct({
44
+ checksumManifest: Schema.Struct({
45
+ name: Schema.Literal("SHA256SUMS"),
46
+ url: Schema.String,
47
+ sha256: Sha256Schema,
48
+ }),
49
+ binaries: Schema.Tuple([
50
+ ReleaseBinarySchema("darwin-arm64", "axm-darwin-arm64"),
51
+ ReleaseBinarySchema("darwin-x64", "axm-darwin-x64"),
52
+ ReleaseBinarySchema("linux-arm64", "axm-linux-arm64"),
53
+ ReleaseBinarySchema("linux-x64", "axm-linux-x64"),
54
+ ReleaseBinarySchema("windows-x64", "axm-windows-x64.exe"),
55
+ ]),
56
+ }),
57
+ promotedAt: UtcInstantSchema,
58
+ });
59
+ const expectedAssetUrl = (tag, name) => `https://github.com/${STABLE_CHANNEL_REPOSITORY}/releases/download/${tag}/${name}`;
60
+ const validateStableChannelDocument = (document) => {
61
+ const issues = [];
62
+ const expectedTag = `cli-v${document.version}`;
63
+ if (document.release.tag !== expectedTag) {
64
+ issues.push(`release.tag must equal ${expectedTag}`);
65
+ }
66
+ const checksumUrl = expectedAssetUrl(expectedTag, document.artifacts.checksumManifest.name);
67
+ if (document.artifacts.checksumManifest.url !== checksumUrl) {
68
+ issues.push(`artifacts.checksumManifest.url must equal ${checksumUrl}`);
69
+ }
70
+ for (const binary of document.artifacts.binaries) {
71
+ const url = expectedAssetUrl(expectedTag, binary.name);
72
+ if (binary.url !== url) {
73
+ issues.push(`artifact URL for ${binary.name} must equal ${url}`);
74
+ }
75
+ }
76
+ if (Date.parse(document.promotedAt) < Date.parse(document.release.publishedAt)) {
77
+ issues.push("promotedAt must not be earlier than release.publishedAt");
78
+ }
79
+ return issues;
80
+ };
81
+ /**
82
+ * Public stable-channel document. Exact-version artifacts remain hosted by the
83
+ * immutable GitHub Release coordinate contained in this validated document.
84
+ *
85
+ * @experimental This API is unstable and may change without notice.
86
+ */
87
+ export const StableChannelDocumentV1Schema = StableChannelDocumentShape.pipe(Schema.check(Schema.makeFilter(validateStableChannelDocument)));
88
+ /** @experimental This API is unstable and may change without notice. */
89
+ export const decodeStableChannelDocument = Schema.decodeUnknownEffect(StableChannelDocumentV1Schema);
90
+ /** @experimental This API is unstable and may change without notice. */
91
+ export const decodeStableChannelDocumentSync = Schema.decodeUnknownSync(StableChannelDocumentV1Schema);
92
+ //# sourceMappingURL=release-channel.js.map
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Corpus conformance for executable specifications.
3
+ *
4
+ * A pure check over already-decoded metadata: it establishes that a
5
+ * specification corpus has the contract's form and linkage — vocabulary,
6
+ * identity, goal references, boundary rationale, lineage, and product
7
+ * language. A clean result never establishes that the accepted obligations
8
+ * are the right ones; that judgment stays with set review and the acceptance
9
+ * decision.
10
+ *
11
+ * Both repositories run this check over their own corpus. Shared goal
12
+ * identities come from the installed contract, so a specification that names
13
+ * a shared goal the installed release cohort does not register is a dangling
14
+ * cross-repository reference and fails here.
15
+ *
16
+ * @experimental This API is unstable and may change without notice.
17
+ */
18
+ import { type ExecutionBinding, type ProductGoalRegistry, type SpecificationMetadata } from "./contract.js";
19
+ export interface ConformanceIssue {
20
+ readonly severity: "error" | "warning";
21
+ /** Repository-relative source the issue is anchored to. */
22
+ readonly source: string;
23
+ readonly message: string;
24
+ }
25
+ export interface CorpusSpecification {
26
+ /** Repository-relative source path of the specification file. */
27
+ readonly source: string;
28
+ readonly metadata: SpecificationMetadata;
29
+ }
30
+ export interface CorpusExecutionBinding {
31
+ /** Repository-relative source path of the boundary execution. */
32
+ readonly source: string;
33
+ readonly binding: ExecutionBinding;
34
+ }
35
+ export interface CorpusInput {
36
+ readonly specifications: readonly CorpusSpecification[];
37
+ /** The repository's local product-goal registry. */
38
+ readonly localGoals: ProductGoalRegistry;
39
+ /** Source path reported for local-registry issues. */
40
+ readonly localGoalsSource: string;
41
+ /** Shared goals from the installed contract. Defaults to `sharedProductGoals`. */
42
+ readonly sharedGoals?: ProductGoalRegistry;
43
+ readonly executionBindings?: readonly CorpusExecutionBinding[];
44
+ }
45
+ /**
46
+ * Whether at least one declared method produces runner evidence. A method
47
+ * set made only of unverifiable methods is reported as unverified by the
48
+ * harness, never as passing.
49
+ */
50
+ export declare const isExecutableMethodSet: (methods: readonly string[]) => boolean;
51
+ /**
52
+ * Lints a title or statement for implementation vocabulary. Specification
53
+ * text describes conditions and observable results; it never names
54
+ * handlers, services, Layers, private functions, or mock interactions.
55
+ */
56
+ export declare const lintProductLanguage: (text: string) => string | undefined;
57
+ /**
58
+ * Checks one corpus for contract form and linkage. Issues are ordered by
59
+ * discovery; callers decide whether warnings block.
60
+ */
61
+ export declare const checkSpecificationCorpus: (input: CorpusInput) => readonly ConformanceIssue[];
62
+ //# sourceMappingURL=conformance.d.ts.map
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Corpus conformance for executable specifications.
3
+ *
4
+ * A pure check over already-decoded metadata: it establishes that a
5
+ * specification corpus has the contract's form and linkage — vocabulary,
6
+ * identity, goal references, boundary rationale, lineage, and product
7
+ * language. A clean result never establishes that the accepted obligations
8
+ * are the right ones; that judgment stays with set review and the acceptance
9
+ * decision.
10
+ *
11
+ * Both repositories run this check over their own corpus. Shared goal
12
+ * identities come from the installed contract, so a specification that names
13
+ * a shared goal the installed release cohort does not register is a dangling
14
+ * cross-repository reference and fails here.
15
+ *
16
+ * @experimental This API is unstable and may change without notice.
17
+ */
18
+ import { IDENTITY_SEGMENT_PATTERN, UNVERIFIABLE_SPECIFICATION_METHODS, } from "./contract.js";
19
+ import { sharedProductGoals } from "./shared-goals.js";
20
+ /** Words that identify implementation vocabulary leaking into product language. */
21
+ const IMPLEMENTATION_WORDS = new Set([
22
+ "layer",
23
+ "handler",
24
+ "mock",
25
+ "stub",
26
+ "middleware",
27
+ "refactor",
28
+ ]);
29
+ const CAMEL_CASE_TOKEN = /\b[a-z]+[A-Z][A-Za-z]*\b/;
30
+ /**
31
+ * Whether at least one declared method produces runner evidence. A method
32
+ * set made only of unverifiable methods is reported as unverified by the
33
+ * harness, never as passing.
34
+ */
35
+ export const isExecutableMethodSet = (methods) => methods.some((method) => !UNVERIFIABLE_SPECIFICATION_METHODS.some((entry) => entry === method));
36
+ /**
37
+ * Lints a title or statement for implementation vocabulary. Specification
38
+ * text describes conditions and observable results; it never names
39
+ * handlers, services, Layers, private functions, or mock interactions.
40
+ */
41
+ export const lintProductLanguage = (text) => {
42
+ if (CAMEL_CASE_TOKEN.test(text)) {
43
+ return `contains an implementation-style camelCase token: "${text}"`;
44
+ }
45
+ for (const word of text.toLowerCase().split(/[^a-z]+/)) {
46
+ if (IMPLEMENTATION_WORDS.has(word)) {
47
+ return `contains implementation vocabulary ("${word}"): "${text}"`;
48
+ }
49
+ }
50
+ return undefined;
51
+ };
52
+ const error = (source, message) => ({
53
+ severity: "error",
54
+ source,
55
+ message,
56
+ });
57
+ const warning = (source, message) => ({
58
+ severity: "warning",
59
+ source,
60
+ message,
61
+ });
62
+ /**
63
+ * Checks one corpus for contract form and linkage. Issues are ordered by
64
+ * discovery; callers decide whether warnings block.
65
+ */
66
+ export const checkSpecificationCorpus = (input) => {
67
+ const issues = [];
68
+ const sharedGoals = input.sharedGoals ?? sharedProductGoals;
69
+ for (const id of Object.keys(input.localGoals)) {
70
+ if (!IDENTITY_SEGMENT_PATTERN.test(id)) {
71
+ issues.push(error(input.localGoalsSource, `product-goal id \`${id}\` must be a lowercase kebab identifier`));
72
+ }
73
+ if (Object.hasOwn(sharedGoals, id)) {
74
+ issues.push(error(input.localGoalsSource, `product goal \`${id}\` is a shared goal; reference the shared identity instead of redefining it locally`));
75
+ }
76
+ }
77
+ const registeredGoals = new Map();
78
+ for (const registry of [sharedGoals, input.localGoals]) {
79
+ for (const [id, definition] of Object.entries(registry)) {
80
+ registeredGoals.set(id, { status: definition.status ?? "active" });
81
+ }
82
+ }
83
+ const byRequirement = new Map();
84
+ for (const specification of input.specifications) {
85
+ const existing = byRequirement.get(specification.metadata.requirement);
86
+ if (existing !== undefined) {
87
+ issues.push(error(specification.source, `duplicate requirement identity \`${specification.metadata.requirement}\` (also declared in ${existing.source})`));
88
+ continue;
89
+ }
90
+ byRequirement.set(specification.metadata.requirement, specification);
91
+ }
92
+ const referencedGoals = new Set();
93
+ for (const { source, metadata } of input.specifications) {
94
+ for (const goal of metadata.goals) {
95
+ referencedGoals.add(goal);
96
+ const registered = registeredGoals.get(goal);
97
+ if (registered === undefined) {
98
+ issues.push(error(source, `references unregistered product goal \`${goal}\``));
99
+ }
100
+ else if (registered.status === "retired") {
101
+ issues.push(error(source, `references retired product goal \`${goal}\`; the specification is a retirement candidate`));
102
+ }
103
+ }
104
+ for (const superseded of metadata.supersedes) {
105
+ if (byRequirement.has(superseded)) {
106
+ issues.push(error(source, `supersedes \`${superseded}\`, which is still present in the corpus; retire the predecessor in the same change`));
107
+ }
108
+ }
109
+ const titleFinding = lintProductLanguage(metadata.title);
110
+ if (titleFinding !== undefined) {
111
+ issues.push(error(source, `title ${titleFinding}`));
112
+ }
113
+ const statementFinding = lintProductLanguage(metadata.statement);
114
+ if (statementFinding !== undefined) {
115
+ issues.push(error(source, `statement ${statementFinding}`));
116
+ }
117
+ if (!isExecutableMethodSet(metadata.methods)) {
118
+ issues.push(warning(source, `declares only unverifiable methods (${metadata.methods.join(", ")}); the harness reports this specification as unverified`));
119
+ }
120
+ }
121
+ for (const [id, definition] of registeredGoals) {
122
+ if (definition.status === "active" &&
123
+ !referencedGoals.has(id) &&
124
+ input.specifications.length > 0) {
125
+ issues.push(warning(input.localGoalsSource, `active product goal \`${id}\` has no referencing specification (missing coverage or a dead goal)`));
126
+ }
127
+ }
128
+ for (const { source, binding } of input.executionBindings ?? []) {
129
+ for (const requirement of binding.requirements) {
130
+ if (!byRequirement.has(requirement)) {
131
+ issues.push(error(source, `execution binding references unknown requirement \`${requirement}\``));
132
+ }
133
+ }
134
+ }
135
+ return issues;
136
+ };
137
+ //# sourceMappingURL=conformance.js.map
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Shared executable-specification contract.
3
+ *
4
+ * One metadata contract, one classification lens, one set of controlled
5
+ * vocabularies, and one shared product-goal registry for every AgentXM
6
+ * specification corpus. Each repository keeps its own specification files,
7
+ * local product goals, and local placement rules; only this contract and the
8
+ * shared goal identities cross the repository boundary.
9
+ *
10
+ * Metadata is data. Every specification file exports one `specification`
11
+ * constant built with `defineSpecification`: a literal object carrying only
12
+ * the cross-method information that discovery, conformance, and reporting
13
+ * need. It never wraps or replaces native test-framework constructs, and
14
+ * catalog tooling reads it statically without executing the specification.
15
+ *
16
+ * @experimental This API is unstable and may change without notice.
17
+ */
18
+ /**
19
+ * The review lens a specification is classified by. Classification selects
20
+ * the review expertise and quality criteria the obligation most needs; it
21
+ * does not determine priority, acceptance, subject, or verification method.
22
+ *
23
+ * - `functional`: responses, transformations, rules, and observable
24
+ * capabilities;
25
+ * - `quality`: a measurable degree such as performance, reliability,
26
+ * security, or installability, named by `characteristic`;
27
+ * - `constraint`: a genuine restriction on solution, environment,
28
+ * technology, or operation;
29
+ * - `external-conformance`: an obligation adopted from a named law,
30
+ * standard, contract, or interface;
31
+ * - `human-factors`: capabilities and qualities arising from people, tasks,
32
+ * accessibility, ergonomics, or context of use; and
33
+ * - `process`: an obligation on development, delivery, operation, support,
34
+ * migration, or retirement.
35
+ */
36
+ export type SpecificationClass = "functional" | "quality" | "constraint" | "external-conformance" | "human-factors" | "process";
37
+ export declare const SPECIFICATION_CLASSES: readonly SpecificationClass[];
38
+ /**
39
+ * How a specification participates in the product contract and its reading
40
+ * paths. Experience specifications describe tasks in product language,
41
+ * interface specifications state public machine-consumable contracts, and
42
+ * supporting specifications state subordinate system or engineering
43
+ * obligations.
44
+ */
45
+ export type SpecificationRole = "experience" | "interface" | "supporting";
46
+ export declare const SPECIFICATION_ROLES: readonly SpecificationRole[];
47
+ /**
48
+ * Where the specification's default execution observes the system.
49
+ * Additional boundary-specific executions bind their own evidence to the
50
+ * same requirement identity.
51
+ */
52
+ export type ExecutionBoundary = "memory" | "process" | "binary" | "packed-artifact" | "installed" | "platform" | "published-artifact" | "deployed" | "repository";
53
+ export declare const EXECUTION_BOUNDARIES: readonly ExecutionBoundary[];
54
+ /** When this specification's evidence is selected by default. */
55
+ export type ExecutionSelection = "per-change" | "platform-matrix" | "scheduled" | "release-candidate" | "post-deployment";
56
+ export declare const EXECUTION_SELECTIONS: readonly ExecutionSelection[];
57
+ /**
58
+ * Known testing methods. The vocabulary is extensible: a method not listed
59
+ * here is accepted when it is a lowercase kebab identifier, so a new or
60
+ * combined method never needs a contract change before use.
61
+ */
62
+ export declare const KNOWN_SPECIFICATION_METHODS: readonly ["example", "decision-table", "property", "model", "contract", "conformance-matrix", "golden-output", "measurement", "static", "smoke", "manual", "review"];
63
+ export type KnownSpecificationMethod = (typeof KNOWN_SPECIFICATION_METHODS)[number];
64
+ /**
65
+ * Methods whose evidence is produced by a person rather than a runner. A
66
+ * specification whose methods are all unverifiable is reported as unverified
67
+ * by the harness; it is never reported as passing.
68
+ */
69
+ export declare const UNVERIFIABLE_SPECIFICATION_METHODS: readonly KnownSpecificationMethod[];
70
+ /**
71
+ * Known quality characteristics. Required for `quality`-class specifications
72
+ * and permitted elsewhere; extensible under the same identifier rule as
73
+ * methods.
74
+ */
75
+ export declare const KNOWN_QUALITY_CHARACTERISTICS: readonly ["installability", "compatibility", "performance", "security", "privacy", "reliability", "availability", "maintainability", "observability", "accessibility", "usability"];
76
+ export type KnownQualityCharacteristic = (typeof KNOWN_QUALITY_CHARACTERISTICS)[number];
77
+ /** Segments of a requirement identity or product-goal identity. */
78
+ export declare const IDENTITY_SEGMENT_PATTERN: RegExp;
79
+ /** A declared blind spot of one specification and the condition that retires it. */
80
+ export interface SpecificationLimitation {
81
+ /** What the specification's evidence cannot establish, in product language. */
82
+ readonly limitation: string;
83
+ /** The observable condition under which this limitation is removed. */
84
+ readonly retirementCondition: string;
85
+ }
86
+ export interface SpecificationMetadata {
87
+ /**
88
+ * Stable requirement identity: lowercase kebab path segments joined by `/`,
89
+ * for example `cli/install/realizes-direct-intent`. Declared here, not
90
+ * derived from the filesystem; repository policy keeps it equal to the
91
+ * file's path under `specifications/`, so moving or renaming a file is an
92
+ * identity change — a requirements decision.
93
+ */
94
+ readonly requirement: string;
95
+ /** Product-language title, readable without the source. */
96
+ readonly title: string;
97
+ /**
98
+ * The normative statement: obligated subject, condition or trigger, and
99
+ * the required or prohibited outcome, in product language. This sentence
100
+ * is the obligation; native tests are its reportable scenarios.
101
+ */
102
+ readonly statement: string;
103
+ /** The review lens this specification is classified by. */
104
+ readonly class: SpecificationClass;
105
+ /**
106
+ * The quality characteristic a `quality` specification measures, or the
107
+ * human-factors quality a `human-factors` specification names. Required
108
+ * for `quality`; optional otherwise.
109
+ */
110
+ readonly characteristic?: string;
111
+ /** The specification's primary role in the product contract. */
112
+ readonly role: SpecificationRole;
113
+ /**
114
+ * Registered product-goal identities this specification supports. Every
115
+ * entry must exist, active, in the shared registry or the repository's
116
+ * local registry.
117
+ */
118
+ readonly goals: readonly [string, ...string[]];
119
+ /** Observation boundary of the default execution. Defaults to `memory`. */
120
+ readonly boundary?: ExecutionBoundary;
121
+ /**
122
+ * Why this specification observes a boundary other than memory: the
123
+ * evidence that boundary supplies which an in-memory run cannot. Required
124
+ * whenever `boundary` is not `memory`.
125
+ */
126
+ readonly boundaryRationale?: string;
127
+ /** Testing methods the specification actually uses. */
128
+ readonly methods: readonly [string, ...string[]];
129
+ /** Default evidence-selection policy. Defaults to `per-change`. */
130
+ readonly selection?: ExecutionSelection;
131
+ /**
132
+ * Sources this obligation was derived from: predecessor requirement
133
+ * identities, prior specification identities, tests that witnessed the
134
+ * behavior, or surfaces that supplied its conditions. Empty when the
135
+ * specification is an original source.
136
+ */
137
+ readonly derivedFrom: readonly string[];
138
+ /**
139
+ * Identities this specification replaces as authority. A superseded
140
+ * identity is retired in the same change that lands its successor and
141
+ * must not remain present in the corpus.
142
+ */
143
+ readonly supersedes: readonly string[];
144
+ /**
145
+ * Conditions the obligation presumes and its evidence does not establish.
146
+ * An empty list records that none were found after review; `"unknown"`
147
+ * records that assumptions have not been assessed.
148
+ */
149
+ readonly assumptions: readonly string[] | "unknown";
150
+ /**
151
+ * Unresolved questions about the obligation's meaning, scope, or subject.
152
+ * An empty list records that none remain; `"unknown"` records that the
153
+ * specification has not been reviewed for open questions.
154
+ */
155
+ readonly openQuestions: readonly string[] | "unknown";
156
+ /** Declared blind spots of this specification's evidence. */
157
+ readonly limitations?: readonly [SpecificationLimitation, ...SpecificationLimitation[]];
158
+ }
159
+ /**
160
+ * Declares one specification's metadata. Identity function: it exists to type
161
+ * the literal and to give discovery a stable syntactic anchor.
162
+ */
163
+ export declare const defineSpecification: <const M extends SpecificationMetadata>(metadata: M) => M;
164
+ /** One registered product goal. */
165
+ export interface ProductGoalDefinition {
166
+ /** One-sentence statement of the desired outcome this goal names. */
167
+ readonly outcome: string;
168
+ /**
169
+ * Retired goals stay registered so specifications referencing them are
170
+ * flagged as retirement candidates instead of silently orphaned.
171
+ */
172
+ readonly status?: "active" | "retired";
173
+ }
174
+ export type ProductGoalRegistry = Readonly<Record<string, ProductGoalDefinition>>;
175
+ /**
176
+ * Declares a product-goal registry. Identity function with the same
177
+ * literal-only discipline as `defineSpecification`.
178
+ */
179
+ export declare const defineProductGoals: <const R extends ProductGoalRegistry>(registry: R) => R;
180
+ /**
181
+ * Binds a boundary-specific execution (for example an end-to-end test file)
182
+ * to the requirement identities it provides evidence for. The execution is
183
+ * evidence, never a second authority: it must not state new requirements.
184
+ */
185
+ export interface ExecutionBinding {
186
+ /** Requirement identities this execution binds evidence to. */
187
+ readonly requirements: readonly [string, ...string[]];
188
+ /** Observation boundary of this execution. */
189
+ readonly boundary: ExecutionBoundary;
190
+ /**
191
+ * The boundary-specific reason this execution exists beyond the in-memory
192
+ * evidence — required so boundary scenarios never silently duplicate
193
+ * in-memory scenarios.
194
+ */
195
+ readonly rationale: string;
196
+ }
197
+ /** Declares a boundary-specific execution binding. Identity function. */
198
+ export declare const defineExecutionBinding: <const B extends ExecutionBinding>(binding: B) => B;
199
+ /**
200
+ * One static verification gate whose result is bound to the owning
201
+ * specification's requirement identity. Bound evidence supports the owning
202
+ * specification; it never replaces it and never states a new requirement.
203
+ */
204
+ export interface BoundEvidenceGate {
205
+ /** The static gate, named by the verification surface that runs it. */
206
+ readonly gate: string;
207
+ /** What the gate verifies for this requirement, in product language. */
208
+ readonly verifies: string;
209
+ }
210
+ /**
211
+ * Declares the static gates bound to a specification as evidence. Exported
212
+ * as `boundEvidence` beside the `specification` constant. Identity function.
213
+ */
214
+ export declare const defineBoundEvidence: <const E extends readonly [BoundEvidenceGate, ...BoundEvidenceGate[]]>(evidence: E) => E;
215
+ //# sourceMappingURL=contract.d.ts.map