@deftai/directive-types 0.65.0 → 0.66.1

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.
@@ -1,16 +1,24 @@
1
- /** Canonical vBRIEF schema version exported for downstream contract imports. */
2
- export declare const VBRIEF_VERSION: "0.6";
1
+ /** Canonical xBRIEF schema version exported for downstream contract imports. */
2
+ export declare const VBRIEF_VERSION: "0.8";
3
3
  export type VBriefVersion = typeof VBRIEF_VERSION;
4
+ /** Legacy v0.6 envelope version still accepted by the validator (additive back-compat). */
5
+ export declare const LEGACY_VBRIEF_VERSION: "0.6";
6
+ /** All `*BRIEFInfo.version` values the engine accepts at validation time. */
7
+ export declare const ACCEPTED_VBRIEF_VERSIONS: readonly ["0.6", "0.8"];
4
8
  /** npm package identity constant (stable across releases). */
5
9
  export declare const TYPES_PACKAGE: "@deftai/directive-types";
6
10
  /**
7
- * vBRIEF#12 extension namespace — keys matching this pattern round-trip preserve-verbatim.
8
- * Namespaced form: `x-<namespace>/<rest>` (e.g. `x-directive/trace`, `x-vbrief/context`).
11
+ * xBRIEF#12 extension namespace — keys matching this pattern round-trip preserve-verbatim.
12
+ * Namespaced form: `x-<namespace>/<rest>` (e.g. `x-directive/trace`, `x-xbrief/context`).
9
13
  * @see https://github.com/deftai/vBRIEF/issues/12
10
14
  */
11
15
  export declare const EXTENSION_KEY_PATTERN: RegExp;
12
- /** Prefix for schema-conformant vBRIEF reference `type` values. */
16
+ /** Legacy prefix for schema-conformant v0.6 reference `type` values (still accepted). */
13
17
  export declare const VBRIEF_REFERENCE_PREFIX: "x-vbrief/";
14
- /** JSON Schema `$id` for the v0.6 core document (published npm artifact). */
15
- export declare const VBRIEF_CORE_SCHEMA_ID: "https://vbrief.dev/schemas/vbrief-core-0.6.schema.json";
18
+ /** Canonical prefix for schema-conformant v0.8 reference `type` values. */
19
+ export declare const XBRIEF_REFERENCE_PREFIX: "x-xbrief/";
20
+ /** JSON Schema `$id` for the v0.6 core document (legacy npm artifact). */
21
+ export declare const LEGACY_VBRIEF_CORE_SCHEMA_ID: "https://vbrief.dev/schemas/vbrief-core-0.6.schema.json";
22
+ /** JSON Schema `$id` for the v0.8 core document (published npm artifact). */
23
+ export declare const VBRIEF_CORE_SCHEMA_ID: "https://xbrief.dev/schemas/xbrief-core-0.8.schema.json";
16
24
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -1,15 +1,23 @@
1
- /** Canonical vBRIEF schema version exported for downstream contract imports. */
2
- export const VBRIEF_VERSION = "0.6";
1
+ /** Canonical xBRIEF schema version exported for downstream contract imports. */
2
+ export const VBRIEF_VERSION = "0.8";
3
+ /** Legacy v0.6 envelope version still accepted by the validator (additive back-compat). */
4
+ export const LEGACY_VBRIEF_VERSION = "0.6";
5
+ /** All `*BRIEFInfo.version` values the engine accepts at validation time. */
6
+ export const ACCEPTED_VBRIEF_VERSIONS = [LEGACY_VBRIEF_VERSION, VBRIEF_VERSION];
3
7
  /** npm package identity constant (stable across releases). */
4
8
  export const TYPES_PACKAGE = "@deftai/directive-types";
5
9
  /**
6
- * vBRIEF#12 extension namespace — keys matching this pattern round-trip preserve-verbatim.
7
- * Namespaced form: `x-<namespace>/<rest>` (e.g. `x-directive/trace`, `x-vbrief/context`).
10
+ * xBRIEF#12 extension namespace — keys matching this pattern round-trip preserve-verbatim.
11
+ * Namespaced form: `x-<namespace>/<rest>` (e.g. `x-directive/trace`, `x-xbrief/context`).
8
12
  * @see https://github.com/deftai/vBRIEF/issues/12
9
13
  */
10
14
  export const EXTENSION_KEY_PATTERN = /^x-[a-z0-9-]+\//;
11
- /** Prefix for schema-conformant vBRIEF reference `type` values. */
15
+ /** Legacy prefix for schema-conformant v0.6 reference `type` values (still accepted). */
12
16
  export const VBRIEF_REFERENCE_PREFIX = "x-vbrief/";
13
- /** JSON Schema `$id` for the v0.6 core document (published npm artifact). */
14
- export const VBRIEF_CORE_SCHEMA_ID = "https://vbrief.dev/schemas/vbrief-core-0.6.schema.json";
17
+ /** Canonical prefix for schema-conformant v0.8 reference `type` values. */
18
+ export const XBRIEF_REFERENCE_PREFIX = "x-xbrief/";
19
+ /** JSON Schema `$id` for the v0.6 core document (legacy npm artifact). */
20
+ export const LEGACY_VBRIEF_CORE_SCHEMA_ID = "https://vbrief.dev/schemas/vbrief-core-0.6.schema.json";
21
+ /** JSON Schema `$id` for the v0.8 core document (published npm artifact). */
22
+ export const VBRIEF_CORE_SCHEMA_ID = "https://xbrief.dev/schemas/xbrief-core-0.8.schema.json";
15
23
  //# sourceMappingURL=constants.js.map
package/dist/index.d.ts CHANGED
@@ -1,18 +1,16 @@
1
- /**
2
- * `@deftai/directive-types` — canonical vBRIEF/policy contract for downstream consumers (#1799).
3
- *
4
- * Supported public API: this package and its published JSON Schema subpaths.
5
- * Behavior access remains via the `deft` / `directive` CLI — not `@deftai/directive-core`.
6
- */
7
- export { EXTENSION_KEY_PATTERN, TYPES_PACKAGE, VBRIEF_CORE_SCHEMA_ID, VBRIEF_REFERENCE_PREFIX, VBRIEF_VERSION, type VBriefVersion, } from "./constants.js";
1
+ export { ACCEPTED_VBRIEF_VERSIONS, EXTENSION_KEY_PATTERN, LEGACY_VBRIEF_CORE_SCHEMA_ID, LEGACY_VBRIEF_VERSION, TYPES_PACKAGE, VBRIEF_CORE_SCHEMA_ID, VBRIEF_REFERENCE_PREFIX, VBRIEF_VERSION, type VBriefVersion, XBRIEF_REFERENCE_PREFIX, } from "./constants.js";
8
2
  export type { EngineInfo, Plan, PlanArchitecture, PlanItem, VBriefDocument, VBriefInfo, } from "./document.js";
9
3
  export { collectExtensionProperties, type ExtensionKey, isExtensionKey, } from "./extension.js";
10
4
  export { GATE_EXIT_CONFIG_ERROR, GATE_EXIT_OK, GATE_EXIT_VIOLATION, type GateExitCode, type GateResult, } from "./gate.js";
11
5
  export { type PlanPolicy, type ProjectionProviderExpectation, type ProjectionProviderPolicy, REGISTERED_POLICY_FIELD_NAMES, type TriageScopeRule, } from "./policy.js";
12
- export { isVBriefReferenceType, KNOWN_REFERENCE_TYPES, type KnownReferenceType, type TrustLevel, type VBriefReference, } from "./reference.js";
6
+ export { isVBriefReferenceType, KNOWN_REFERENCE_TYPES, type KnownReferenceType, referenceTypeMatches, type TrustLevel, type VBriefReference, } from "./reference.js";
13
7
  export { FOLDER_ALLOWED_STATUSES, type Status, VALID_STATUSES, } from "./status.js";
14
8
  /** Relative path to the published v0.6 core JSON Schema inside the npm package. */
15
9
  export declare const PUBLISHED_VBRIEF_CORE_SCHEMA_PATH: "schemas/vbrief-core-0.6.schema.json";
10
+ /** Relative path to the published v0.8 core JSON Schema inside the npm package. */
11
+ export declare const PUBLISHED_XBRIEF_CORE_SCHEMA_PATH: "schemas/xbrief-core-0.8.schema.json";
16
12
  /** npm subpath export for the v0.6 core JSON Schema artifact. */
17
13
  export declare const VBRIEF_CORE_SCHEMA_EXPORT: "./schemas/vbrief-core-0.6.schema.json";
14
+ /** npm subpath export for the v0.8 core JSON Schema artifact. */
15
+ export declare const XBRIEF_CORE_SCHEMA_EXPORT: "./schemas/xbrief-core-0.8.schema.json";
18
16
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,17 +1,15 @@
1
- /**
2
- * `@deftai/directive-types` — canonical vBRIEF/policy contract for downstream consumers (#1799).
3
- *
4
- * Supported public API: this package and its published JSON Schema subpaths.
5
- * Behavior access remains via the `deft` / `directive` CLI — not `@deftai/directive-core`.
6
- */
7
- export { EXTENSION_KEY_PATTERN, TYPES_PACKAGE, VBRIEF_CORE_SCHEMA_ID, VBRIEF_REFERENCE_PREFIX, VBRIEF_VERSION, } from "./constants.js";
1
+ export { ACCEPTED_VBRIEF_VERSIONS, EXTENSION_KEY_PATTERN, LEGACY_VBRIEF_CORE_SCHEMA_ID, LEGACY_VBRIEF_VERSION, TYPES_PACKAGE, VBRIEF_CORE_SCHEMA_ID, VBRIEF_REFERENCE_PREFIX, VBRIEF_VERSION, XBRIEF_REFERENCE_PREFIX, } from "./constants.js";
8
2
  export { collectExtensionProperties, isExtensionKey, } from "./extension.js";
9
3
  export { GATE_EXIT_CONFIG_ERROR, GATE_EXIT_OK, GATE_EXIT_VIOLATION, } from "./gate.js";
10
4
  export { REGISTERED_POLICY_FIELD_NAMES, } from "./policy.js";
11
- export { isVBriefReferenceType, KNOWN_REFERENCE_TYPES, } from "./reference.js";
5
+ export { isVBriefReferenceType, KNOWN_REFERENCE_TYPES, referenceTypeMatches, } from "./reference.js";
12
6
  export { FOLDER_ALLOWED_STATUSES, VALID_STATUSES, } from "./status.js";
13
7
  /** Relative path to the published v0.6 core JSON Schema inside the npm package. */
14
8
  export const PUBLISHED_VBRIEF_CORE_SCHEMA_PATH = "schemas/vbrief-core-0.6.schema.json";
9
+ /** Relative path to the published v0.8 core JSON Schema inside the npm package. */
10
+ export const PUBLISHED_XBRIEF_CORE_SCHEMA_PATH = "schemas/xbrief-core-0.8.schema.json";
15
11
  /** npm subpath export for the v0.6 core JSON Schema artifact. */
16
12
  export const VBRIEF_CORE_SCHEMA_EXPORT = "./schemas/vbrief-core-0.6.schema.json";
13
+ /** npm subpath export for the v0.8 core JSON Schema artifact. */
14
+ export const XBRIEF_CORE_SCHEMA_EXPORT = "./schemas/xbrief-core-0.8.schema.json";
17
15
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,12 @@
1
- import { VBRIEF_REFERENCE_PREFIX } from "./constants.js";
1
+ import { VBRIEF_REFERENCE_PREFIX, XBRIEF_REFERENCE_PREFIX } from "./constants.js";
2
2
  /** Canonical reference types from conventions/references.md (non-exhaustive). */
3
- export declare const KNOWN_REFERENCE_TYPES: readonly ["x-vbrief/plan", "x-vbrief/github-issue", "x-vbrief/github-pr", "x-vbrief/jira-ticket", "x-vbrief/user-request", "x-vbrief/spec-section", "x-vbrief/context", "x-vbrief/research"];
3
+ export declare const KNOWN_REFERENCE_TYPES: readonly ["x-vbrief/plan", "x-vbrief/github-issue", "x-vbrief/github-pr", "x-vbrief/jira-ticket", "x-vbrief/user-request", "x-vbrief/spec-section", "x-vbrief/context", "x-vbrief/research", "x-xbrief/plan", "x-xbrief/github-issue", "x-xbrief/github-pr", "x-xbrief/jira-ticket", "x-xbrief/user-request", "x-xbrief/spec-section", "x-xbrief/commit", "x-xbrief/context", "x-xbrief/external", "x-xbrief/research", "x-xbrief/adr"];
4
4
  export type KnownReferenceType = (typeof KNOWN_REFERENCE_TYPES)[number];
5
5
  export type TrustLevel = "internal" | "external";
6
- /** Schema-conformant vBRIEF reference (`VBriefReference` in vbrief-core.schema.json). */
6
+ /** Schema-conformant vBRIEF/xBRIEF reference (`VBriefReference` in core schema). */
7
7
  export interface VBriefReference {
8
8
  readonly uri: string;
9
- readonly type: `${typeof VBRIEF_REFERENCE_PREFIX}${string}` | KnownReferenceType;
9
+ readonly type: `${typeof VBRIEF_REFERENCE_PREFIX}${string}` | `${typeof XBRIEF_REFERENCE_PREFIX}${string}` | KnownReferenceType;
10
10
  readonly title?: string;
11
11
  readonly description?: string;
12
12
  readonly tags?: readonly string[];
@@ -14,6 +14,13 @@ export interface VBriefReference {
14
14
  readonly TrustLevel?: TrustLevel;
15
15
  readonly [key: `x-${string}`]: unknown;
16
16
  }
17
- /** Return true when `type` is a schema-conformant `x-vbrief/*` reference type. */
17
+ /** Return true when `type` is a schema-conformant `x-vbrief/*` or `x-xbrief/*` reference type. */
18
18
  export declare function isVBriefReferenceType(type: string): boolean;
19
+ /**
20
+ * Return true when `value` matches either the legacy `x-vbrief/<bareType>` or
21
+ * the canonical `x-xbrief/<bareType>` form. Use this for all reader/matcher
22
+ * comparisons so that both namespaces are accepted during the transition
23
+ * period while `x-vbrief/` remains read-accepted for consumer back-compat.
24
+ */
25
+ export declare function referenceTypeMatches(value: string, bareType: string): boolean;
19
26
  //# sourceMappingURL=reference.d.ts.map
package/dist/reference.js CHANGED
@@ -1,4 +1,4 @@
1
- import { VBRIEF_REFERENCE_PREFIX } from "./constants.js";
1
+ import { VBRIEF_REFERENCE_PREFIX, XBRIEF_REFERENCE_PREFIX } from "./constants.js";
2
2
  /** Canonical reference types from conventions/references.md (non-exhaustive). */
3
3
  export const KNOWN_REFERENCE_TYPES = [
4
4
  "x-vbrief/plan",
@@ -9,9 +9,30 @@ export const KNOWN_REFERENCE_TYPES = [
9
9
  "x-vbrief/spec-section",
10
10
  "x-vbrief/context",
11
11
  "x-vbrief/research",
12
+ "x-xbrief/plan",
13
+ "x-xbrief/github-issue",
14
+ "x-xbrief/github-pr",
15
+ "x-xbrief/jira-ticket",
16
+ "x-xbrief/user-request",
17
+ "x-xbrief/spec-section",
18
+ "x-xbrief/commit",
19
+ "x-xbrief/context",
20
+ "x-xbrief/external",
21
+ "x-xbrief/research",
22
+ "x-xbrief/adr",
12
23
  ];
13
- /** Return true when `type` is a schema-conformant `x-vbrief/*` reference type. */
24
+ /** Return true when `type` is a schema-conformant `x-vbrief/*` or `x-xbrief/*` reference type. */
14
25
  export function isVBriefReferenceType(type) {
15
- return type.startsWith(VBRIEF_REFERENCE_PREFIX);
26
+ return type.startsWith(VBRIEF_REFERENCE_PREFIX) || type.startsWith(XBRIEF_REFERENCE_PREFIX);
27
+ }
28
+ /**
29
+ * Return true when `value` matches either the legacy `x-vbrief/<bareType>` or
30
+ * the canonical `x-xbrief/<bareType>` form. Use this for all reader/matcher
31
+ * comparisons so that both namespaces are accepted during the transition
32
+ * period while `x-vbrief/` remains read-accepted for consumer back-compat.
33
+ */
34
+ export function referenceTypeMatches(value, bareType) {
35
+ return (value === `${VBRIEF_REFERENCE_PREFIX}${bareType}` ||
36
+ value === `${XBRIEF_REFERENCE_PREFIX}${bareType}`);
16
37
  }
17
38
  //# sourceMappingURL=reference.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive-types",
3
- "version": "0.65.0",
3
+ "version": "0.66.1",
4
4
  "description": "Shared TypeScript types for the Directive framework engine.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,7 +10,8 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "default": "./dist/index.js"
12
12
  },
13
- "./schemas/vbrief-core-0.6.schema.json": "./schemas/vbrief-core-0.6.schema.json"
13
+ "./schemas/vbrief-core-0.6.schema.json": "./schemas/vbrief-core-0.6.schema.json",
14
+ "./schemas/xbrief-core-0.8.schema.json": "./schemas/xbrief-core-0.8.schema.json"
14
15
  },
15
16
  "files": [
16
17
  "dist/**/*.js",
@@ -0,0 +1,786 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://xbrief.dev/schemas/xbrief-core-0.8.schema.json",
4
+ "title": "xBRIEF Core Schema v0.8",
5
+ "description": "JSON Schema for xBRIEF core document structure (v0.8). Adds PlanItem type (task/group/milestone/epic), summary, planRefs, extension property namespace (x-<consumer>/), Source/Confidence narrative keys, and reference type registry.",
6
+ "type": "object",
7
+ "required": [
8
+ "xBRIEFInfo",
9
+ "plan"
10
+ ],
11
+ "properties": {
12
+ "xBRIEFInfo": {
13
+ "$ref": "#/$defs/xBRIEFInfo"
14
+ },
15
+ "plan": {
16
+ "$ref": "#/$defs/Plan"
17
+ }
18
+ },
19
+ "additionalProperties": true,
20
+ "patternProperties": {
21
+ "^x-[a-z0-9-]+/": {
22
+ "description": "Extension property. Consumer-scoped; MUST be preserved verbatim on round-trip."
23
+ }
24
+ },
25
+ "not": {
26
+ "anyOf": [
27
+ {
28
+ "required": [
29
+ "todoList"
30
+ ]
31
+ },
32
+ {
33
+ "required": [
34
+ "playbook"
35
+ ]
36
+ }
37
+ ]
38
+ },
39
+ "$defs": {
40
+ "xBRIEFInfo": {
41
+ "type": "object",
42
+ "required": [
43
+ "version"
44
+ ],
45
+ "properties": {
46
+ "version": {
47
+ "type": "string",
48
+ "const": "0.8"
49
+ },
50
+ "author": {
51
+ "type": "string"
52
+ },
53
+ "description": {
54
+ "type": "string"
55
+ },
56
+ "metadata": {
57
+ "type": "object"
58
+ },
59
+ "created": {
60
+ "$ref": "#/$defs/dateTime"
61
+ },
62
+ "updated": {
63
+ "$ref": "#/$defs/dateTime"
64
+ },
65
+ "timezone": {
66
+ "type": "string"
67
+ }
68
+ },
69
+ "additionalProperties": true,
70
+ "patternProperties": {
71
+ "^x-[a-z0-9-]+/": {}
72
+ }
73
+ },
74
+ "Plan": {
75
+ "type": "object",
76
+ "required": [
77
+ "title",
78
+ "status",
79
+ "items"
80
+ ],
81
+ "properties": {
82
+ "id": {
83
+ "type": "string",
84
+ "pattern": "^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$"
85
+ },
86
+ "uid": {
87
+ "type": "string"
88
+ },
89
+ "title": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "status": {
94
+ "$ref": "#/$defs/PlanStatus"
95
+ },
96
+ "items": {
97
+ "type": "array",
98
+ "items": {
99
+ "$ref": "#/$defs/PlanItem"
100
+ }
101
+ },
102
+ "narratives": {
103
+ "type": "object",
104
+ "properties": {
105
+ "Proposal": {
106
+ "type": "string"
107
+ },
108
+ "Overview": {
109
+ "type": "string"
110
+ },
111
+ "Background": {
112
+ "type": "string"
113
+ },
114
+ "Problem": {
115
+ "type": "string"
116
+ },
117
+ "Constraint": {
118
+ "type": "string"
119
+ },
120
+ "Hypothesis": {
121
+ "type": "string"
122
+ },
123
+ "Alternative": {
124
+ "type": "string"
125
+ },
126
+ "Risk": {
127
+ "type": "string"
128
+ },
129
+ "Test": {
130
+ "type": "string"
131
+ },
132
+ "Action": {
133
+ "type": "string"
134
+ },
135
+ "Observation": {
136
+ "type": "string"
137
+ },
138
+ "Result": {
139
+ "type": "string"
140
+ },
141
+ "Reflection": {
142
+ "type": "string"
143
+ },
144
+ "Outcome": {
145
+ "type": "string"
146
+ },
147
+ "Strengths": {
148
+ "type": "string"
149
+ },
150
+ "Weaknesses": {
151
+ "type": "string"
152
+ },
153
+ "Lessons": {
154
+ "type": "string"
155
+ },
156
+ "Source": {
157
+ "type": "string",
158
+ "description": "How a fact was established. Recommended values: verified:<method>, observed:<method>, inferred:<reason>, assumed."
159
+ },
160
+ "Confidence": {
161
+ "type": "string",
162
+ "description": "Agent certainty level. Recommended values: high, medium, low."
163
+ }
164
+ },
165
+ "additionalProperties": {
166
+ "type": "string"
167
+ }
168
+ },
169
+ "edges": {
170
+ "type": "array",
171
+ "items": {
172
+ "$ref": "#/$defs/Edge"
173
+ }
174
+ },
175
+ "tags": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "string"
179
+ }
180
+ },
181
+ "metadata": {
182
+ "type": "object"
183
+ },
184
+ "created": {
185
+ "$ref": "#/$defs/dateTime"
186
+ },
187
+ "updated": {
188
+ "$ref": "#/$defs/dateTime"
189
+ },
190
+ "author": {
191
+ "type": "string"
192
+ },
193
+ "reviewers": {
194
+ "type": "array",
195
+ "items": {
196
+ "type": "string"
197
+ }
198
+ },
199
+ "uris": {
200
+ "type": "array",
201
+ "items": {
202
+ "$ref": "#/$defs/URI"
203
+ }
204
+ },
205
+ "references": {
206
+ "type": "array",
207
+ "items": {
208
+ "$ref": "#/$defs/VBriefReference"
209
+ }
210
+ },
211
+ "timezone": {
212
+ "type": "string"
213
+ },
214
+ "agent": {
215
+ "$ref": "#/$defs/Agent"
216
+ },
217
+ "lastModifiedBy": {
218
+ "$ref": "#/$defs/Agent"
219
+ },
220
+ "changeLog": {
221
+ "type": "array",
222
+ "items": {
223
+ "$ref": "#/$defs/Change"
224
+ }
225
+ },
226
+ "sequence": {
227
+ "type": "integer",
228
+ "minimum": 0
229
+ },
230
+ "fork": {
231
+ "$ref": "#/$defs/Fork"
232
+ }
233
+ },
234
+ "additionalProperties": true,
235
+ "patternProperties": {
236
+ "^x-[a-z0-9-]+/": {}
237
+ }
238
+ },
239
+ "PlanItem": {
240
+ "type": "object",
241
+ "required": [
242
+ "title",
243
+ "status"
244
+ ],
245
+ "properties": {
246
+ "id": {
247
+ "type": "string",
248
+ "pattern": "^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$"
249
+ },
250
+ "uid": {
251
+ "type": "string"
252
+ },
253
+ "type": {
254
+ "type": "string",
255
+ "enum": ["task", "group", "milestone", "epic"],
256
+ "default": "task",
257
+ "description": "Item type. Containers (group, milestone, epic) support status rollup."
258
+ },
259
+ "summary": {
260
+ "type": "string",
261
+ "description": "Single-sentence shorthand description. Equivalent to narrative.Overview when narrative is absent."
262
+ },
263
+ "title": {
264
+ "type": "string",
265
+ "minLength": 1
266
+ },
267
+ "status": {
268
+ "$ref": "#/$defs/PlanItemStatus"
269
+ },
270
+ "narrative": {
271
+ "type": "object",
272
+ "additionalProperties": {
273
+ "type": "string"
274
+ }
275
+ },
276
+ "subItems": {
277
+ "type": "array",
278
+ "description": "Deprecated legacy alias for items; retained for compatibility.",
279
+ "items": {
280
+ "$ref": "#/$defs/PlanItem"
281
+ }
282
+ },
283
+ "planRef": {
284
+ "type": "string",
285
+ "pattern": "^(#[a-zA-Z0-9_.-]+|file://.*|https://.*)$"
286
+ },
287
+ "planRefs": {
288
+ "type": "array",
289
+ "description": "Array of plan reference URIs for container items aggregating multiple external xBRIEFs.",
290
+ "items": {
291
+ "type": "string",
292
+ "pattern": "^(#[a-zA-Z0-9_.-]+|file://.*|https://.*)$"
293
+ }
294
+ },
295
+ "tags": {
296
+ "type": "array",
297
+ "items": {
298
+ "type": "string"
299
+ }
300
+ },
301
+ "metadata": {
302
+ "type": "object"
303
+ },
304
+ "created": {
305
+ "$ref": "#/$defs/dateTime"
306
+ },
307
+ "updated": {
308
+ "$ref": "#/$defs/dateTime"
309
+ },
310
+ "completed": {
311
+ "$ref": "#/$defs/dateTime"
312
+ },
313
+ "priority": {
314
+ "enum": [
315
+ "low",
316
+ "medium",
317
+ "high",
318
+ "critical"
319
+ ]
320
+ },
321
+ "dueDate": {
322
+ "$ref": "#/$defs/dateTime"
323
+ },
324
+ "startDate": {
325
+ "$ref": "#/$defs/dateTime"
326
+ },
327
+ "endDate": {
328
+ "$ref": "#/$defs/dateTime"
329
+ },
330
+ "percentComplete": {
331
+ "type": "number",
332
+ "minimum": 0,
333
+ "maximum": 100
334
+ },
335
+ "participants": {
336
+ "type": "array",
337
+ "items": {
338
+ "$ref": "#/$defs/Participant"
339
+ }
340
+ },
341
+ "location": {
342
+ "$ref": "#/$defs/Location"
343
+ },
344
+ "uris": {
345
+ "type": "array",
346
+ "items": {
347
+ "$ref": "#/$defs/URI"
348
+ }
349
+ },
350
+ "recurrence": {
351
+ "$ref": "#/$defs/RecurrenceRule"
352
+ },
353
+ "reminders": {
354
+ "type": "array",
355
+ "items": {
356
+ "$ref": "#/$defs/Reminder"
357
+ }
358
+ },
359
+ "classification": {
360
+ "enum": [
361
+ "public",
362
+ "private",
363
+ "confidential"
364
+ ]
365
+ },
366
+ "relatedComments": {
367
+ "type": "array",
368
+ "items": {
369
+ "type": "string"
370
+ }
371
+ },
372
+ "timezone": {
373
+ "type": "string"
374
+ },
375
+ "sequence": {
376
+ "type": "integer",
377
+ "minimum": 0
378
+ },
379
+ "lastModifiedBy": {
380
+ "$ref": "#/$defs/Agent"
381
+ },
382
+ "lockedBy": {
383
+ "$ref": "#/$defs/Lock"
384
+ },
385
+ "items": {
386
+ "type": "array",
387
+ "description": "Preferred v0.6 nested PlanItem field.",
388
+ "items": {
389
+ "$ref": "#/$defs/PlanItem"
390
+ }
391
+ }
392
+ },
393
+ "additionalProperties": true,
394
+ "patternProperties": {
395
+ "^x-[a-z0-9-]+/": {}
396
+ }
397
+ },
398
+ "PlanStatus": {
399
+ "enum": [
400
+ "draft",
401
+ "proposed",
402
+ "approved",
403
+ "pending",
404
+ "running",
405
+ "completed",
406
+ "blocked",
407
+ "failed",
408
+ "cancelled"
409
+ ],
410
+ "description": "Status values valid at plan level. 'auto' is excluded — it is only valid on container PlanItems with children."
411
+ },
412
+ "PlanItemStatus": {
413
+ "enum": [
414
+ "draft",
415
+ "proposed",
416
+ "approved",
417
+ "pending",
418
+ "running",
419
+ "completed",
420
+ "blocked",
421
+ "failed",
422
+ "cancelled",
423
+ "auto"
424
+ ],
425
+ "description": "Status values valid on PlanItems. 'auto' rolls up from children and is valid only on container items (group/milestone/epic) with children."
426
+ },
427
+ "Edge": {
428
+ "type": "object",
429
+ "required": [
430
+ "from",
431
+ "to",
432
+ "type"
433
+ ],
434
+ "properties": {
435
+ "from": {
436
+ "type": "string",
437
+ "pattern": "^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$"
438
+ },
439
+ "to": {
440
+ "type": "string",
441
+ "pattern": "^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$"
442
+ },
443
+ "type": {
444
+ "type": "string",
445
+ "description": "Core types: blocks, informs, invalidates, suggests. Custom types allowed."
446
+ }
447
+ },
448
+ "additionalProperties": true
449
+ },
450
+ "Participant": {
451
+ "type": "object",
452
+ "required": [
453
+ "id",
454
+ "role"
455
+ ],
456
+ "properties": {
457
+ "id": {
458
+ "type": "string"
459
+ },
460
+ "name": {
461
+ "type": "string"
462
+ },
463
+ "email": {
464
+ "type": "string"
465
+ },
466
+ "role": {
467
+ "enum": [
468
+ "owner",
469
+ "assignee",
470
+ "reviewer",
471
+ "observer",
472
+ "contributor"
473
+ ]
474
+ },
475
+ "status": {
476
+ "enum": [
477
+ "accepted",
478
+ "declined",
479
+ "tentative",
480
+ "needsAction"
481
+ ]
482
+ }
483
+ },
484
+ "additionalProperties": true
485
+ },
486
+ "URI": {
487
+ "type": "object",
488
+ "required": [
489
+ "uri"
490
+ ],
491
+ "properties": {
492
+ "uri": {
493
+ "type": "string"
494
+ },
495
+ "description": {
496
+ "type": "string"
497
+ },
498
+ "type": {
499
+ "type": "string"
500
+ },
501
+ "title": {
502
+ "type": "string"
503
+ },
504
+ "tags": {
505
+ "type": "array",
506
+ "items": {
507
+ "type": "string"
508
+ }
509
+ }
510
+ },
511
+ "additionalProperties": true
512
+ },
513
+ "VBriefReference": {
514
+ "allOf": [
515
+ {
516
+ "$ref": "#/$defs/URI"
517
+ },
518
+ {
519
+ "type": "object",
520
+ "required": [
521
+ "uri",
522
+ "type"
523
+ ],
524
+ "properties": {
525
+ "type": {
526
+ "type": "string",
527
+ "pattern": "^x-[a-zA-Z0-9_-]+/",
528
+ "description": "A xBRIEF reference type. Canonical types: x-xbrief/plan, x-xbrief/github-issue, x-xbrief/github-pr, x-xbrief/commit, x-xbrief/external, x-xbrief/research, x-xbrief/adr. Custom consumer types SHOULD use x-<consumer>/ namespace (e.g. x-myapp/ticket)."
529
+ }
530
+ }
531
+ }
532
+ ]
533
+ },
534
+ "Location": {
535
+ "type": "object",
536
+ "properties": {
537
+ "name": {
538
+ "type": "string"
539
+ },
540
+ "address": {
541
+ "type": "string"
542
+ },
543
+ "geo": {
544
+ "type": "array",
545
+ "minItems": 2,
546
+ "maxItems": 2,
547
+ "items": {
548
+ "type": "number"
549
+ }
550
+ },
551
+ "url": {
552
+ "type": "string"
553
+ }
554
+ },
555
+ "additionalProperties": true
556
+ },
557
+ "RecurrenceRule": {
558
+ "type": "object",
559
+ "required": [
560
+ "frequency"
561
+ ],
562
+ "properties": {
563
+ "frequency": {
564
+ "enum": [
565
+ "daily",
566
+ "weekly",
567
+ "monthly",
568
+ "yearly"
569
+ ]
570
+ },
571
+ "interval": {
572
+ "type": "integer",
573
+ "minimum": 1
574
+ },
575
+ "until": {
576
+ "$ref": "#/$defs/dateTime"
577
+ },
578
+ "count": {
579
+ "type": "integer",
580
+ "minimum": 1
581
+ },
582
+ "byDay": {
583
+ "type": "array",
584
+ "items": {
585
+ "enum": [
586
+ "MO",
587
+ "TU",
588
+ "WE",
589
+ "TH",
590
+ "FR",
591
+ "SA",
592
+ "SU"
593
+ ]
594
+ }
595
+ },
596
+ "byMonth": {
597
+ "type": "array",
598
+ "items": {
599
+ "type": "integer",
600
+ "minimum": 1,
601
+ "maximum": 12
602
+ }
603
+ },
604
+ "byMonthDay": {
605
+ "type": "array",
606
+ "items": {
607
+ "type": "integer",
608
+ "minimum": 1,
609
+ "maximum": 31
610
+ }
611
+ }
612
+ },
613
+ "additionalProperties": true
614
+ },
615
+ "Reminder": {
616
+ "type": "object",
617
+ "required": [
618
+ "trigger",
619
+ "action"
620
+ ],
621
+ "properties": {
622
+ "trigger": {
623
+ "type": "string"
624
+ },
625
+ "action": {
626
+ "enum": [
627
+ "display",
628
+ "email",
629
+ "webhook",
630
+ "audio"
631
+ ]
632
+ },
633
+ "description": {
634
+ "type": "string"
635
+ }
636
+ },
637
+ "additionalProperties": true
638
+ },
639
+ "Agent": {
640
+ "type": "object",
641
+ "required": [
642
+ "id",
643
+ "type"
644
+ ],
645
+ "properties": {
646
+ "id": {
647
+ "type": "string"
648
+ },
649
+ "type": {
650
+ "enum": [
651
+ "human",
652
+ "aiAgent",
653
+ "system"
654
+ ]
655
+ },
656
+ "name": {
657
+ "type": "string"
658
+ },
659
+ "email": {
660
+ "type": "string"
661
+ },
662
+ "model": {
663
+ "type": "string"
664
+ },
665
+ "version": {
666
+ "type": "string"
667
+ }
668
+ },
669
+ "additionalProperties": true
670
+ },
671
+ "Change": {
672
+ "type": "object",
673
+ "required": [
674
+ "sequence",
675
+ "timestamp",
676
+ "agent",
677
+ "operation"
678
+ ],
679
+ "properties": {
680
+ "sequence": {
681
+ "type": "integer",
682
+ "minimum": 0
683
+ },
684
+ "timestamp": {
685
+ "$ref": "#/$defs/dateTime"
686
+ },
687
+ "agent": {
688
+ "$ref": "#/$defs/Agent"
689
+ },
690
+ "operation": {
691
+ "enum": [
692
+ "create",
693
+ "update",
694
+ "delete",
695
+ "fork",
696
+ "merge"
697
+ ]
698
+ },
699
+ "reason": {
700
+ "type": "string"
701
+ },
702
+ "path": {
703
+ "type": "string"
704
+ },
705
+ "oldValue": {},
706
+ "newValue": {},
707
+ "description": {
708
+ "type": "string"
709
+ },
710
+ "snapshotUri": {
711
+ "type": "string"
712
+ },
713
+ "relatedChanges": {
714
+ "type": "array",
715
+ "items": {
716
+ "type": "string"
717
+ }
718
+ }
719
+ },
720
+ "additionalProperties": true
721
+ },
722
+ "Fork": {
723
+ "type": "object",
724
+ "required": [
725
+ "parentUid",
726
+ "parentSequence",
727
+ "forkedAt"
728
+ ],
729
+ "properties": {
730
+ "parentUid": {
731
+ "type": "string"
732
+ },
733
+ "parentSequence": {
734
+ "type": "integer",
735
+ "minimum": 0
736
+ },
737
+ "forkedAt": {
738
+ "$ref": "#/$defs/dateTime"
739
+ },
740
+ "forkReason": {
741
+ "type": "string"
742
+ },
743
+ "mergeStatus": {
744
+ "enum": [
745
+ "unmerged",
746
+ "mergePending",
747
+ "merged",
748
+ "conflict"
749
+ ]
750
+ }
751
+ },
752
+ "additionalProperties": true
753
+ },
754
+ "Lock": {
755
+ "type": "object",
756
+ "required": [
757
+ "agent",
758
+ "acquiredAt",
759
+ "type"
760
+ ],
761
+ "properties": {
762
+ "agent": {
763
+ "$ref": "#/$defs/Agent"
764
+ },
765
+ "acquiredAt": {
766
+ "$ref": "#/$defs/dateTime"
767
+ },
768
+ "expiresAt": {
769
+ "$ref": "#/$defs/dateTime"
770
+ },
771
+ "type": {
772
+ "enum": [
773
+ "soft",
774
+ "hard"
775
+ ]
776
+ }
777
+ },
778
+ "additionalProperties": true
779
+ },
780
+ "dateTime": {
781
+ "type": "string",
782
+ "format": "date-time",
783
+ "pattern": "(Z|[+-]\\d{2}:\\d{2})$"
784
+ }
785
+ }
786
+ }