@vectros-ai/blueprints 0.5.0 → 0.6.2

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.
package/dist/index.js CHANGED
@@ -199,11 +199,36 @@ var BlueprintServicePrincipalSchema = import_zod.z.object({
199
199
  externalId: import_zod.z.string().min(1),
200
200
  displayName: import_zod.z.string().min(1)
201
201
  }).strict();
202
- var BlueprintSeedRecordSchema = import_zod.z.object({
202
+ var SeedCommonShape = {
203
+ /** The schema typeName this seed instantiates (should match a declared schema). */
203
204
  typeName: import_zod.z.string().min(1),
204
- externalId: import_zod.z.string().min(1),
205
+ /**
206
+ * Stable, caller-supplied id — the loader's idempotency key AND the value other
207
+ * seeds resolve a `reference` against (across surfaces: a record seed may
208
+ * reference a document seed by its externalId, and vice versa).
209
+ */
210
+ externalId: import_zod.z.string().min(1)
211
+ };
212
+ var RecordSeedSchema = import_zod.z.object({
213
+ surface: import_zod.z.literal("record"),
214
+ ...SeedCommonShape,
215
+ /** The record payload, validated against the bound schema. */
205
216
  fields: import_zod.z.record(import_zod.z.unknown())
206
217
  }).strict();
218
+ var DocumentSeedSchema = import_zod.z.object({
219
+ surface: import_zod.z.literal("document"),
220
+ ...SeedCommonShape,
221
+ /** Human-readable document title — REQUIRED by the text-ingest path. */
222
+ title: import_zod.z.string().min(1),
223
+ /** Raw text content to ingest + index — REQUIRED and non-empty (the platform rejects a blank ingest). */
224
+ text: import_zod.z.string().min(1),
225
+ /** Optional structured payload bound to the schema (the document's `fields`). */
226
+ fields: import_zod.z.record(import_zod.z.unknown()).optional()
227
+ }).strict();
228
+ var BlueprintSeedRecordSchema = import_zod.z.discriminatedUnion("surface", [
229
+ RecordSeedSchema,
230
+ DocumentSeedSchema
231
+ ]);
207
232
  var SELF_TOKEN_RE = /\$\{\{\s*self\.[A-Za-z_]\w*\s*\}\}/;
208
233
  function lintSelfTokenPlacement(value, ctx) {
209
234
  const walk = (node, path, inRoleDataScope) => {
@@ -259,6 +284,23 @@ function lintIdentityRefsDeclared(value, ctx) {
259
284
  };
260
285
  walk(value, []);
261
286
  }
287
+ function lintSeedSurfaces(value, ctx) {
288
+ const bp = value;
289
+ if (!Array.isArray(bp.seed)) return;
290
+ const byType = new Map((bp.schemas ?? []).map((s) => [s.typeName, s]));
291
+ bp.seed.forEach((seed, i) => {
292
+ const schema = byType.get(seed.typeName);
293
+ if (!schema) return;
294
+ const allowed = schema.allowedSurfaces ?? ["record"];
295
+ if (!allowed.includes(seed.surface ?? "record")) {
296
+ ctx.addIssue({
297
+ code: import_zod.z.ZodIssueCode.custom,
298
+ path: ["seed", i, "surface"],
299
+ message: `seed '${seed.externalId}' uses surface '${seed.surface ?? "record"}', but schema '${seed.typeName}' allows only [${allowed.join(", ")}]`
300
+ });
301
+ }
302
+ });
303
+ }
262
304
  var BlueprintSchema = import_zod.z.object({
263
305
  /** Stable blueprint id (the `--blueprint <name>` selector + idempotency key). */
264
306
  name: import_zod.z.string().min(1),
@@ -281,6 +323,7 @@ var BlueprintSchema = import_zod.z.object({
281
323
  }).strict().superRefine((bp, ctx) => {
282
324
  lintSelfTokenPlacement(bp, ctx);
283
325
  lintIdentityRefsDeclared(bp, ctx);
326
+ lintSeedSurfaces(bp, ctx);
284
327
  });
285
328
  function formatIssuePath(path) {
286
329
  let out = "";
@@ -759,6 +802,7 @@ var taskManagement = {
759
802
  },
760
803
  seed: [
761
804
  {
805
+ surface: "record",
762
806
  typeName: "task",
763
807
  externalId: "seed-welcome",
764
808
  fields: {
@@ -988,6 +1032,7 @@ var codingAgentMemory = {
988
1032
  // Seeded FIRST so the convention below resolves its reference to it — the
989
1033
  // loader creates seeds in array order, and a reference target must exist when
990
1034
  // the referencing record is written.
1035
+ surface: "record",
991
1036
  typeName: "decision",
992
1037
  externalId: "seed-use-vectros-for-memory",
993
1038
  fields: {
@@ -1003,6 +1048,7 @@ var codingAgentMemory = {
1003
1048
  // Demonstrates a live typed link at bootstrap: this convention references the
1004
1049
  // decision above by its externalId, so "open the decision behind this rule"
1005
1050
  // works the moment the blueprint is applied.
1051
+ surface: "record",
1006
1052
  typeName: "convention",
1007
1053
  externalId: "seed-record-the-why",
1008
1054
  fields: {
@@ -1018,6 +1064,689 @@ var codingAgentMemory = {
1018
1064
  };
1019
1065
  var coding_agent_memory_default = codingAgentMemory;
1020
1066
 
1067
+ // src/blueprints/agentic-sdlc.ts
1068
+ var agenticSdlc = {
1069
+ name: "agentic-sdlc",
1070
+ version: "1.0.0",
1071
+ description: "A whole-SDLC system of record for an AI development team \u2014 decisions, designs, references, runbooks, post-mortems (as documents) plus controls, conventions, gotchas, and a glossary (as records), cross-linked and recalled by meaning.",
1072
+ contextId: "agentic-sdlc",
1073
+ contextName: "Agentic SDLC Knowledge Base",
1074
+ schemas: [
1075
+ // ============================ DOCUMENTS ============================
1076
+ // Content-dominant: the markdown body is the artifact; fields are metadata.
1077
+ // Each binds the `document` surface and is ingested via `document_ingest`.
1078
+ {
1079
+ // An architecture/product DECISION (an ADR). The body is the prose —
1080
+ // Context / Decision / Consequences — and is what `rag_ask` answers over;
1081
+ // the fields below are filter/sort metadata + the supersede chain. The
1082
+ // anchor of the graph: most other types link back to a decision.
1083
+ typeName: "decision",
1084
+ displayName: "Decision (ADR)",
1085
+ indexMode: "HYBRID",
1086
+ allowedSurfaces: ["document"],
1087
+ // A document carries an INTRINSIC title (the ingest title) + body; the schema
1088
+ // declares only the metadata BEYOND those. (No typed `title` field — that
1089
+ // would duplicate the document's own title.)
1090
+ fields: [
1091
+ {
1092
+ fieldId: "summary",
1093
+ fieldType: "string",
1094
+ searchable: true,
1095
+ description: "A one-paragraph abstract of the decision. The full reasoning is the document body.",
1096
+ renderHints: { label: "Summary", widget: "textarea", order: 2 }
1097
+ },
1098
+ {
1099
+ fieldId: "status",
1100
+ fieldType: "enum",
1101
+ filterable: true,
1102
+ enumValues: ["proposed", "accepted", "superseded", "deprecated"],
1103
+ renderHints: { label: "Status", widget: "select", order: 3 }
1104
+ },
1105
+ {
1106
+ fieldId: "area",
1107
+ fieldType: "string",
1108
+ filterable: true,
1109
+ description: 'Subsystem the decision applies to (e.g. "search", "auth", "billing").',
1110
+ renderHints: { label: "Area", widget: "text", order: 4 }
1111
+ },
1112
+ {
1113
+ fieldId: "tags",
1114
+ fieldType: "array",
1115
+ filterable: true,
1116
+ description: 'Freeform labels (e.g. "security", "schema"). Search-side filter.',
1117
+ renderHints: { label: "Tags", order: 5 }
1118
+ },
1119
+ {
1120
+ // Self-reference (document → document): the decision this one supersedes.
1121
+ fieldId: "supersedes",
1122
+ fieldType: "reference",
1123
+ targetTypeName: "decision",
1124
+ targetSurface: "document",
1125
+ targetField: "externalId",
1126
+ cardinality: "one",
1127
+ description: "The decision this one supersedes (by externalId).",
1128
+ renderHints: { label: "Supersedes", order: 6 }
1129
+ },
1130
+ {
1131
+ fieldId: "date",
1132
+ fieldType: "date",
1133
+ description: "ISO-8601 decision date. Range-queryable / sortable.",
1134
+ renderHints: { label: "Date", widget: "date", order: 7 }
1135
+ }
1136
+ ],
1137
+ lookupFields: ["status", "area", "supersedes", { fieldName: "date", rangeEnabled: true }]
1138
+ },
1139
+ {
1140
+ // A DESIGN doc or spec — the exploration that drives a decision. Distinct
1141
+ // from `decision` (a different browse genre + it links to the decision it
1142
+ // informs). Body = the design narrative.
1143
+ typeName: "design",
1144
+ displayName: "Design",
1145
+ indexMode: "HYBRID",
1146
+ allowedSurfaces: ["document"],
1147
+ // Intrinsic title + body; schema = metadata beyond those (no typed `title`).
1148
+ fields: [
1149
+ {
1150
+ fieldId: "summary",
1151
+ fieldType: "string",
1152
+ searchable: true,
1153
+ description: "A one-paragraph abstract. The full design is the document body.",
1154
+ renderHints: { label: "Summary", widget: "textarea", order: 2 }
1155
+ },
1156
+ {
1157
+ fieldId: "status",
1158
+ fieldType: "enum",
1159
+ filterable: true,
1160
+ enumValues: ["draft", "active", "implemented", "superseded"],
1161
+ renderHints: { label: "Status", widget: "select", order: 3 }
1162
+ },
1163
+ {
1164
+ fieldId: "area",
1165
+ fieldType: "string",
1166
+ filterable: true,
1167
+ renderHints: { label: "Area", widget: "text", order: 4 }
1168
+ },
1169
+ {
1170
+ fieldId: "tags",
1171
+ fieldType: "array",
1172
+ filterable: true,
1173
+ renderHints: { label: "Tags", order: 5 }
1174
+ },
1175
+ {
1176
+ // Cross-document edge: the decision this design informs/produces.
1177
+ fieldId: "relatedDecision",
1178
+ fieldType: "reference",
1179
+ targetTypeName: "decision",
1180
+ targetSurface: "document",
1181
+ targetField: "externalId",
1182
+ cardinality: "one",
1183
+ description: "The decision this design informs (by externalId).",
1184
+ renderHints: { label: "Related decision", order: 6 }
1185
+ },
1186
+ {
1187
+ // Self-reference: a design supersedes an earlier design/spec.
1188
+ fieldId: "supersedes",
1189
+ fieldType: "reference",
1190
+ targetTypeName: "design",
1191
+ targetSurface: "document",
1192
+ targetField: "externalId",
1193
+ cardinality: "one",
1194
+ description: "The design this one supersedes (by externalId).",
1195
+ renderHints: { label: "Supersedes", order: 7 }
1196
+ },
1197
+ {
1198
+ fieldId: "updatedOn",
1199
+ fieldType: "date",
1200
+ description: "ISO-8601 \u2014 when last revised. Range-queryable.",
1201
+ renderHints: { label: "Updated on", widget: "date", order: 8 }
1202
+ }
1203
+ ],
1204
+ lookupFields: ["status", "area", "relatedDecision", "supersedes", { fieldName: "updatedOn", rangeEnabled: true }]
1205
+ },
1206
+ {
1207
+ // A REFERENCE doc — maintained "how it works / how to": guides, onboarding,
1208
+ // API docs, process docs. Body = the prose. Distinct shape: a `category`
1209
+ // (DRY sub-labels — onboarding/api/process are same shape) and `lastReviewed`
1210
+ // (freshness is the whole game for reference material).
1211
+ typeName: "reference",
1212
+ displayName: "Reference",
1213
+ indexMode: "HYBRID",
1214
+ allowedSurfaces: ["document"],
1215
+ // Intrinsic title + body; schema = metadata beyond those (no typed `title`).
1216
+ fields: [
1217
+ {
1218
+ fieldId: "summary",
1219
+ fieldType: "string",
1220
+ searchable: true,
1221
+ description: "A one-paragraph abstract. The full reference is the document body.",
1222
+ renderHints: { label: "Summary", widget: "textarea", order: 2 }
1223
+ },
1224
+ {
1225
+ // The sub-kind, as a filterable field (not a separate schema — these are
1226
+ // the same shape, differing only by label, so a field is the DRY choice).
1227
+ fieldId: "category",
1228
+ fieldType: "enum",
1229
+ filterable: true,
1230
+ enumValues: ["guide", "onboarding", "api", "process", "other"],
1231
+ renderHints: { label: "Category", widget: "select", order: 3 }
1232
+ },
1233
+ {
1234
+ fieldId: "area",
1235
+ fieldType: "string",
1236
+ filterable: true,
1237
+ renderHints: { label: "Area", widget: "text", order: 4 }
1238
+ },
1239
+ {
1240
+ fieldId: "tags",
1241
+ fieldType: "array",
1242
+ filterable: true,
1243
+ renderHints: { label: "Tags", order: 5 }
1244
+ },
1245
+ {
1246
+ fieldId: "status",
1247
+ fieldType: "enum",
1248
+ filterable: true,
1249
+ enumValues: ["active", "superseded"],
1250
+ renderHints: { label: "Status", widget: "select", order: 6 }
1251
+ },
1252
+ {
1253
+ // Optional cross-document edge: the decision behind this reference.
1254
+ fieldId: "relatedDecision",
1255
+ fieldType: "reference",
1256
+ targetTypeName: "decision",
1257
+ targetSurface: "document",
1258
+ targetField: "externalId",
1259
+ cardinality: "one",
1260
+ description: "The decision behind this reference, if any (by externalId).",
1261
+ renderHints: { label: "Related decision", order: 7 }
1262
+ },
1263
+ {
1264
+ // Freshness — "references not reviewed since X". The reference-doc signal.
1265
+ fieldId: "lastReviewed",
1266
+ fieldType: "date",
1267
+ description: "ISO-8601 \u2014 when this reference was last verified current. Range-queryable.",
1268
+ renderHints: { label: "Last reviewed", widget: "date", order: 8 }
1269
+ }
1270
+ ],
1271
+ lookupFields: ["category", "area", "status", "relatedDecision", { fieldName: "lastReviewed", rangeEnabled: true }]
1272
+ },
1273
+ {
1274
+ // A RUNBOOK — a step-by-step operational procedure (deploy, release, recover).
1275
+ // Body = the procedure. Distinct browse genre, and often BORN FROM a
1276
+ // post-mortem (its resolution, codified) — a cross-document edge.
1277
+ typeName: "runbook",
1278
+ displayName: "Runbook",
1279
+ indexMode: "HYBRID",
1280
+ allowedSurfaces: ["document"],
1281
+ // Intrinsic title + body; schema = metadata beyond those (no typed `title`).
1282
+ fields: [
1283
+ {
1284
+ fieldId: "summary",
1285
+ fieldType: "string",
1286
+ searchable: true,
1287
+ description: "When to use this runbook \u2014 the trigger. The steps are the document body.",
1288
+ renderHints: { label: "Summary", widget: "textarea", order: 2 }
1289
+ },
1290
+ {
1291
+ fieldId: "area",
1292
+ fieldType: "string",
1293
+ filterable: true,
1294
+ renderHints: { label: "Area", widget: "text", order: 3 }
1295
+ },
1296
+ {
1297
+ fieldId: "tags",
1298
+ fieldType: "array",
1299
+ filterable: true,
1300
+ renderHints: { label: "Tags", order: 4 }
1301
+ },
1302
+ {
1303
+ fieldId: "status",
1304
+ fieldType: "enum",
1305
+ filterable: true,
1306
+ enumValues: ["active", "retired"],
1307
+ renderHints: { label: "Status", widget: "select", order: 5 }
1308
+ },
1309
+ {
1310
+ // Cross-document edge: the post-mortem whose resolution this runbook codifies.
1311
+ fieldId: "bornFrom",
1312
+ fieldType: "reference",
1313
+ targetTypeName: "postmortem",
1314
+ targetSurface: "document",
1315
+ targetField: "externalId",
1316
+ cardinality: "one",
1317
+ description: "The post-mortem this runbook was codified from (by externalId).",
1318
+ renderHints: { label: "Born from (post-mortem)", order: 6 }
1319
+ },
1320
+ {
1321
+ fieldId: "relatedDecision",
1322
+ fieldType: "reference",
1323
+ targetTypeName: "decision",
1324
+ targetSurface: "document",
1325
+ targetField: "externalId",
1326
+ cardinality: "one",
1327
+ description: "A decision this runbook implements, if any (by externalId).",
1328
+ renderHints: { label: "Related decision", order: 7 }
1329
+ },
1330
+ {
1331
+ fieldId: "updatedOn",
1332
+ fieldType: "date",
1333
+ description: "ISO-8601 \u2014 when last revised. Range-queryable.",
1334
+ renderHints: { label: "Updated on", widget: "date", order: 8 }
1335
+ }
1336
+ ],
1337
+ lookupFields: ["area", "status", "bornFrom", "relatedDecision", { fieldName: "updatedOn", rangeEnabled: true }]
1338
+ },
1339
+ {
1340
+ // A POST-MORTEM — what broke and the durable lesson. Body = the writeup
1341
+ // (impact / root cause / resolution / lesson). Distinct shape: `severity` +
1342
+ // `occurredOn` (the incident timeline). "Have we hit this before?" lives here.
1343
+ typeName: "postmortem",
1344
+ displayName: "Post-mortem",
1345
+ indexMode: "HYBRID",
1346
+ allowedSurfaces: ["document"],
1347
+ // Intrinsic title + body; schema = metadata beyond those (no typed `title`).
1348
+ fields: [
1349
+ {
1350
+ fieldId: "summary",
1351
+ fieldType: "string",
1352
+ searchable: true,
1353
+ description: "What happened, in brief. The full analysis (impact/root cause/resolution/lesson) is the body.",
1354
+ renderHints: { label: "Summary", widget: "textarea", order: 2 }
1355
+ },
1356
+ {
1357
+ fieldId: "severity",
1358
+ fieldType: "enum",
1359
+ filterable: true,
1360
+ enumValues: ["low", "medium", "high", "critical"],
1361
+ renderHints: { label: "Severity", widget: "select", order: 3 }
1362
+ },
1363
+ {
1364
+ fieldId: "status",
1365
+ fieldType: "enum",
1366
+ filterable: true,
1367
+ enumValues: ["open", "mitigated", "resolved"],
1368
+ renderHints: { label: "Status", widget: "select", order: 4 }
1369
+ },
1370
+ {
1371
+ fieldId: "area",
1372
+ fieldType: "string",
1373
+ filterable: true,
1374
+ renderHints: { label: "Area", widget: "text", order: 5 }
1375
+ },
1376
+ {
1377
+ fieldId: "tags",
1378
+ fieldType: "array",
1379
+ filterable: true,
1380
+ renderHints: { label: "Tags", order: 6 }
1381
+ },
1382
+ {
1383
+ fieldId: "relatedDecision",
1384
+ fieldType: "reference",
1385
+ targetTypeName: "decision",
1386
+ targetSurface: "document",
1387
+ targetField: "externalId",
1388
+ cardinality: "one",
1389
+ description: "A decision implicated in or addressed by this incident (by externalId).",
1390
+ renderHints: { label: "Related decision", order: 7 }
1391
+ },
1392
+ {
1393
+ fieldId: "occurredOn",
1394
+ fieldType: "date",
1395
+ description: 'ISO-8601 \u2014 when it happened. Range-queryable \u2014 "incidents this month".',
1396
+ renderHints: { label: "Occurred on", widget: "date", order: 8 }
1397
+ }
1398
+ ],
1399
+ lookupFields: ["severity", "status", "area", "relatedDecision", { fieldName: "occurredOn", rangeEnabled: true }]
1400
+ },
1401
+ // ============================= RECORDS =============================
1402
+ // Structure-dominant: the typed fields are the artifact. Short, exact-queryable.
1403
+ {
1404
+ // A governance CONTROL — a policy/standard/control the codebase must satisfy,
1405
+ // WITH its evidence. The compliance instrument: it records what enforces it
1406
+ // (`evidence`), the runbook that VERIFIES it (cross-surface → document), and
1407
+ // the decision that mandates it. "Which critical controls are active, and how
1408
+ // is each proven?"
1409
+ typeName: "control",
1410
+ displayName: "Control",
1411
+ indexMode: "HYBRID",
1412
+ fields: [
1413
+ {
1414
+ fieldId: "title",
1415
+ fieldType: "string",
1416
+ required: true,
1417
+ searchable: true,
1418
+ validation: { minLength: 1, maxLength: 200 },
1419
+ renderHints: { label: "Title", widget: "text", order: 1, displayField: true }
1420
+ },
1421
+ {
1422
+ fieldId: "statement",
1423
+ fieldType: "string",
1424
+ searchable: true,
1425
+ description: "The requirement \u2014 what must always hold.",
1426
+ renderHints: { label: "Statement", widget: "textarea", order: 2 }
1427
+ },
1428
+ {
1429
+ fieldId: "rationale",
1430
+ fieldType: "string",
1431
+ searchable: true,
1432
+ description: "Why the control exists \u2014 the risk it prevents.",
1433
+ renderHints: { label: "Rationale", widget: "textarea", order: 3 }
1434
+ },
1435
+ {
1436
+ // The policy → implementation spectrum in one filterable field.
1437
+ fieldId: "kind",
1438
+ fieldType: "enum",
1439
+ filterable: true,
1440
+ enumValues: ["policy", "standard", "control"],
1441
+ renderHints: { label: "Kind", widget: "select", order: 4 }
1442
+ },
1443
+ {
1444
+ // Ordinal, but EQUALITY (range/prefix order is lexical, so low<critical
1445
+ // would sort alphabetically). Enumerate "all critical controls" by equality.
1446
+ fieldId: "criticality",
1447
+ fieldType: "enum",
1448
+ filterable: true,
1449
+ enumValues: ["low", "medium", "high", "critical"],
1450
+ renderHints: { label: "Criticality", widget: "select", order: 5 }
1451
+ },
1452
+ {
1453
+ fieldId: "evidence",
1454
+ fieldType: "string",
1455
+ searchable: true,
1456
+ description: "What enforces or proves the control inline (e.g. an architecture test or gate).",
1457
+ renderHints: { label: "Evidence", widget: "textarea", order: 6 }
1458
+ },
1459
+ {
1460
+ fieldId: "status",
1461
+ fieldType: "enum",
1462
+ filterable: true,
1463
+ enumValues: ["draft", "active", "retired"],
1464
+ renderHints: { label: "Status", widget: "select", order: 7 }
1465
+ },
1466
+ {
1467
+ fieldId: "area",
1468
+ fieldType: "string",
1469
+ filterable: true,
1470
+ renderHints: { label: "Area", widget: "text", order: 8 }
1471
+ },
1472
+ {
1473
+ fieldId: "tags",
1474
+ fieldType: "array",
1475
+ filterable: true,
1476
+ renderHints: { label: "Tags", order: 9 }
1477
+ },
1478
+ {
1479
+ // Cross-surface edge (record → document): the runbook that proves the control.
1480
+ fieldId: "verifiedBy",
1481
+ fieldType: "reference",
1482
+ targetTypeName: "runbook",
1483
+ targetSurface: "document",
1484
+ targetField: "externalId",
1485
+ cardinality: "one",
1486
+ description: "The runbook that verifies this control (by externalId).",
1487
+ renderHints: { label: "Verified by (runbook)", order: 10 }
1488
+ },
1489
+ {
1490
+ // Cross-surface edge (record → document): the decision that mandates it.
1491
+ fieldId: "relatedDecision",
1492
+ fieldType: "reference",
1493
+ targetTypeName: "decision",
1494
+ targetSurface: "document",
1495
+ targetField: "externalId",
1496
+ cardinality: "one",
1497
+ description: "The decision that mandates this control (by externalId).",
1498
+ renderHints: { label: "Related decision", order: 11 }
1499
+ },
1500
+ {
1501
+ fieldId: "reviewedOn",
1502
+ fieldType: "date",
1503
+ description: "ISO-8601 last-reviewed date. Range-queryable.",
1504
+ renderHints: { label: "Reviewed on", widget: "date", order: 12 }
1505
+ }
1506
+ ],
1507
+ lookupFields: [
1508
+ "kind",
1509
+ "criticality",
1510
+ "status",
1511
+ "area",
1512
+ "verifiedBy",
1513
+ "relatedDecision",
1514
+ { fieldName: "reviewedOn", rangeEnabled: true }
1515
+ ]
1516
+ },
1517
+ {
1518
+ // A CONVENTION — a must-follow operating rule the team teaches its agents. The
1519
+ // durable, shareable operating-memory. Distinct fields capture how we actually
1520
+ // write these: the `rule` (imperative), the `why` (rationale), and `howToApply`
1521
+ // (the concrete application) are SEPARATE fields, not one blob — so an agent can
1522
+ // recall the rule, the reasoning, and the how independently.
1523
+ typeName: "convention",
1524
+ displayName: "Convention",
1525
+ indexMode: "HYBRID",
1526
+ fields: [
1527
+ {
1528
+ fieldId: "title",
1529
+ fieldType: "string",
1530
+ required: true,
1531
+ searchable: true,
1532
+ validation: { minLength: 1, maxLength: 200 },
1533
+ renderHints: { label: "Title", widget: "text", order: 1, displayField: true }
1534
+ },
1535
+ {
1536
+ fieldId: "rule",
1537
+ fieldType: "string",
1538
+ searchable: true,
1539
+ description: "The convention itself, stated as an imperative.",
1540
+ renderHints: { label: "Rule", widget: "textarea", order: 2 }
1541
+ },
1542
+ {
1543
+ fieldId: "why",
1544
+ fieldType: "string",
1545
+ searchable: true,
1546
+ description: "Why it matters \u2014 the trade-off / the antipattern it prevents.",
1547
+ renderHints: { label: "Why", widget: "textarea", order: 3 }
1548
+ },
1549
+ {
1550
+ fieldId: "howToApply",
1551
+ fieldType: "string",
1552
+ searchable: true,
1553
+ description: "How to comply in practice \u2014 the concrete application steps.",
1554
+ renderHints: { label: "How to apply", widget: "textarea", order: 4 }
1555
+ },
1556
+ {
1557
+ fieldId: "area",
1558
+ fieldType: "string",
1559
+ filterable: true,
1560
+ renderHints: { label: "Area", widget: "text", order: 5 }
1561
+ },
1562
+ {
1563
+ fieldId: "status",
1564
+ fieldType: "enum",
1565
+ filterable: true,
1566
+ enumValues: ["active", "retired"],
1567
+ renderHints: { label: "Status", widget: "select", order: 6 }
1568
+ },
1569
+ {
1570
+ fieldId: "tags",
1571
+ fieldType: "array",
1572
+ filterable: true,
1573
+ renderHints: { label: "Tags", order: 7 }
1574
+ },
1575
+ {
1576
+ // Cross-surface edge (record → document): the decision that established it.
1577
+ fieldId: "establishedBy",
1578
+ fieldType: "reference",
1579
+ targetTypeName: "decision",
1580
+ targetSurface: "document",
1581
+ targetField: "externalId",
1582
+ cardinality: "one",
1583
+ description: "The decision that established this convention (by externalId).",
1584
+ renderHints: { label: "Established by (decision)", order: 8 }
1585
+ },
1586
+ {
1587
+ fieldId: "updatedOn",
1588
+ fieldType: "date",
1589
+ description: "ISO-8601 \u2014 when last revised. Range-queryable.",
1590
+ renderHints: { label: "Updated on", widget: "date", order: 9 }
1591
+ }
1592
+ ],
1593
+ lookupFields: ["area", "status", "establishedBy", { fieldName: "updatedOn", rangeEnabled: true }]
1594
+ },
1595
+ {
1596
+ // A GOTCHA / sharp edge: a symptom, its cause, and the fix. A tight typed
1597
+ // triple — found by meaning (semantic search on the symptom) + area/status.
1598
+ // The most standalone type; no typed edge.
1599
+ typeName: "gotcha",
1600
+ displayName: "Gotcha",
1601
+ indexMode: "HYBRID",
1602
+ fields: [
1603
+ {
1604
+ fieldId: "symptom",
1605
+ fieldType: "string",
1606
+ required: true,
1607
+ searchable: true,
1608
+ validation: { minLength: 1, maxLength: 500 },
1609
+ renderHints: { label: "Symptom", widget: "textarea", order: 1, displayField: true }
1610
+ },
1611
+ {
1612
+ fieldId: "cause",
1613
+ fieldType: "string",
1614
+ searchable: true,
1615
+ renderHints: { label: "Cause", widget: "textarea", order: 2 }
1616
+ },
1617
+ {
1618
+ fieldId: "fix",
1619
+ fieldType: "string",
1620
+ searchable: true,
1621
+ renderHints: { label: "Fix", widget: "textarea", order: 3 }
1622
+ },
1623
+ {
1624
+ fieldId: "area",
1625
+ fieldType: "string",
1626
+ filterable: true,
1627
+ renderHints: { label: "Area", widget: "text", order: 4 }
1628
+ },
1629
+ {
1630
+ fieldId: "status",
1631
+ fieldType: "enum",
1632
+ filterable: true,
1633
+ enumValues: ["active", "resolved"],
1634
+ renderHints: { label: "Status", widget: "select", order: 5 }
1635
+ },
1636
+ {
1637
+ fieldId: "tags",
1638
+ fieldType: "array",
1639
+ filterable: true,
1640
+ renderHints: { label: "Tags", order: 6 }
1641
+ },
1642
+ {
1643
+ fieldId: "discoveredOn",
1644
+ fieldType: "date",
1645
+ description: "ISO-8601 \u2014 when first hit. Range-queryable.",
1646
+ renderHints: { label: "Discovered on", widget: "date", order: 7 }
1647
+ }
1648
+ ],
1649
+ lookupFields: ["area", "status", { fieldName: "discoveredOn", rangeEnabled: true }]
1650
+ },
1651
+ {
1652
+ // A glossary TERM — a definition keyed by the term itself. Structure-dominant:
1653
+ // `term` is a UNIQUE exact-lookup key (the showcase of a uniqueness constraint),
1654
+ // `definition` is the RAG body, `aliases` catch alternate names. Links to the
1655
+ // decision that defines/establishes the concept where there is one.
1656
+ typeName: "term",
1657
+ displayName: "Glossary term",
1658
+ indexMode: "HYBRID",
1659
+ fields: [
1660
+ {
1661
+ fieldId: "term",
1662
+ fieldType: "string",
1663
+ required: true,
1664
+ searchable: true,
1665
+ validation: { minLength: 1, maxLength: 200 },
1666
+ renderHints: { label: "Term", widget: "text", order: 1, displayField: true }
1667
+ },
1668
+ {
1669
+ fieldId: "definition",
1670
+ fieldType: "string",
1671
+ searchable: true,
1672
+ description: "What the term means \u2014 the RAG-able body.",
1673
+ renderHints: { label: "Definition", widget: "textarea", order: 2 }
1674
+ },
1675
+ {
1676
+ fieldId: "aliases",
1677
+ fieldType: "array",
1678
+ filterable: true,
1679
+ description: "Alternate names / abbreviations for the same concept.",
1680
+ renderHints: { label: "Aliases", order: 3 }
1681
+ },
1682
+ {
1683
+ fieldId: "area",
1684
+ fieldType: "string",
1685
+ filterable: true,
1686
+ renderHints: { label: "Area", widget: "text", order: 4 }
1687
+ },
1688
+ {
1689
+ fieldId: "tags",
1690
+ fieldType: "array",
1691
+ filterable: true,
1692
+ renderHints: { label: "Tags", order: 5 }
1693
+ },
1694
+ {
1695
+ fieldId: "relatedDecision",
1696
+ fieldType: "reference",
1697
+ targetTypeName: "decision",
1698
+ targetSurface: "document",
1699
+ targetField: "externalId",
1700
+ cardinality: "one",
1701
+ description: "A decision that defines or establishes this term (by externalId).",
1702
+ renderHints: { label: "Related decision", order: 6 }
1703
+ },
1704
+ {
1705
+ fieldId: "updatedOn",
1706
+ fieldType: "date",
1707
+ description: "ISO-8601 \u2014 when last revised. Range-queryable.",
1708
+ renderHints: { label: "Updated on", widget: "date", order: 7 }
1709
+ }
1710
+ ],
1711
+ // `term` is a UNIQUE equality lookup — exact "define X" + a one-per-term
1712
+ // guarantee. `area`/`relatedDecision` enumerate; `updatedOn` is the range row.
1713
+ lookupFields: [
1714
+ { fieldName: "term", unique: true },
1715
+ "area",
1716
+ "relatedDecision",
1717
+ { fieldName: "updatedOn", rangeEnabled: true }
1718
+ ]
1719
+ }
1720
+ ],
1721
+ // Least-privilege, data-plane only. r/c/u records + search + schema discovery +
1722
+ // inference:r (grounded recall over the document bodies) + document/folder r/c
1723
+ // (the content artifacts are documents). NO :d — knowledge is superseded/retired
1724
+ // via a status flip, so the trail of how the team's thinking evolved stays intact.
1725
+ accessProfile: {
1726
+ allowedActions: [
1727
+ "records:r",
1728
+ "records:c",
1729
+ "records:u",
1730
+ "search:r",
1731
+ "schemas:r",
1732
+ "inference:r",
1733
+ "documents:r",
1734
+ "documents:c",
1735
+ "folders:r",
1736
+ "folders:c"
1737
+ ]
1738
+ },
1739
+ servicePrincipal: {
1740
+ externalId: "agentic-sdlc",
1741
+ displayName: "Agentic SDLC Knowledge Base"
1742
+ }
1743
+ // No bundled seed in this version: the content artifacts live on the document
1744
+ // surface and the cross-surface graph is populated by the ingest agent
1745
+ // (document_ingest / record_create), not the bootstrap seed step. Production
1746
+ // contexts provision with `vectros bootstrap --no-seed` regardless.
1747
+ };
1748
+ var agentic_sdlc_default = agenticSdlc;
1749
+
1021
1750
  // src/blueprints/second-brain.ts
1022
1751
  var secondBrain = {
1023
1752
  name: "second-brain",
@@ -1114,6 +1843,7 @@ var secondBrain = {
1114
1843
  },
1115
1844
  seed: [
1116
1845
  {
1846
+ surface: "record",
1117
1847
  typeName: "note",
1118
1848
  externalId: "seed-welcome",
1119
1849
  fields: {
@@ -1247,6 +1977,7 @@ var clinicalIntake = {
1247
1977
  },
1248
1978
  seed: [
1249
1979
  {
1980
+ surface: "record",
1250
1981
  typeName: "intake",
1251
1982
  externalId: "seed-synthetic-intake",
1252
1983
  fields: {
@@ -1270,6 +2001,7 @@ var clinical_intake_default = clinicalIntake;
1270
2001
  var BUNDLED_BLUEPRINTS = [
1271
2002
  task_management_default,
1272
2003
  coding_agent_memory_default,
2004
+ agentic_sdlc_default,
1273
2005
  second_brain_default,
1274
2006
  clinical_intake_default
1275
2007
  ];