@vectros-ai/blueprints 0.5.0 → 0.6.3
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/CHANGELOG.md +67 -0
- package/README.md +21 -2
- package/dist/index.d.mts +152 -15
- package/dist/index.d.ts +152 -15
- package/dist/index.js +748 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +748 -2
- package/dist/index.mjs.map +1 -1
- package/guides/agentic-sdlc.md +238 -0
- package/package.json +3 -1
- package/prompts/agentic-sdlc-agent.md +127 -0
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
|
|
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
|
-
|
|
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,703 @@ var codingAgentMemory = {
|
|
|
1018
1064
|
};
|
|
1019
1065
|
var coding_agent_memory_default = codingAgentMemory;
|
|
1020
1066
|
|
|
1067
|
+
// src/blueprints/agentic-sdlc.ts
|
|
1068
|
+
var DATA_PLANE_ACTIONS = [
|
|
1069
|
+
"records:r",
|
|
1070
|
+
"records:c",
|
|
1071
|
+
"records:u",
|
|
1072
|
+
"search:r",
|
|
1073
|
+
"schemas:r",
|
|
1074
|
+
"inference:r",
|
|
1075
|
+
"documents:r",
|
|
1076
|
+
"documents:c",
|
|
1077
|
+
"folders:r",
|
|
1078
|
+
"folders:c"
|
|
1079
|
+
];
|
|
1080
|
+
var agenticSdlc = {
|
|
1081
|
+
name: "agentic-sdlc",
|
|
1082
|
+
version: "1.0.0",
|
|
1083
|
+
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.",
|
|
1084
|
+
contextId: "agentic-sdlc",
|
|
1085
|
+
contextName: "Agentic SDLC Knowledge Base",
|
|
1086
|
+
schemas: [
|
|
1087
|
+
// ============================ DOCUMENTS ============================
|
|
1088
|
+
// Content-dominant: the markdown body is the artifact; fields are metadata.
|
|
1089
|
+
// Each binds the `document` surface and is ingested via `document_ingest`.
|
|
1090
|
+
{
|
|
1091
|
+
// An architecture/product DECISION (an ADR). The body is the prose —
|
|
1092
|
+
// Context / Decision / Consequences — and is what `rag_ask` answers over;
|
|
1093
|
+
// the fields below are filter/sort metadata + the supersede chain. The
|
|
1094
|
+
// anchor of the graph: most other types link back to a decision.
|
|
1095
|
+
typeName: "decision",
|
|
1096
|
+
displayName: "Decision (ADR)",
|
|
1097
|
+
indexMode: "HYBRID",
|
|
1098
|
+
allowedSurfaces: ["document"],
|
|
1099
|
+
// A document carries an INTRINSIC title (the ingest title) + body; the schema
|
|
1100
|
+
// declares only the metadata BEYOND those. (No typed `title` field — that
|
|
1101
|
+
// would duplicate the document's own title.)
|
|
1102
|
+
fields: [
|
|
1103
|
+
{
|
|
1104
|
+
fieldId: "summary",
|
|
1105
|
+
fieldType: "string",
|
|
1106
|
+
searchable: true,
|
|
1107
|
+
description: "A one-paragraph abstract of the decision. The full reasoning is the document body.",
|
|
1108
|
+
renderHints: { label: "Summary", widget: "textarea", order: 2 }
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
fieldId: "status",
|
|
1112
|
+
fieldType: "enum",
|
|
1113
|
+
filterable: true,
|
|
1114
|
+
enumValues: ["proposed", "accepted", "superseded", "deprecated"],
|
|
1115
|
+
renderHints: { label: "Status", widget: "select", order: 3 }
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
fieldId: "area",
|
|
1119
|
+
fieldType: "string",
|
|
1120
|
+
filterable: true,
|
|
1121
|
+
description: 'Subsystem the decision applies to (e.g. "search", "auth", "billing").',
|
|
1122
|
+
renderHints: { label: "Area", widget: "text", order: 4 }
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
fieldId: "tags",
|
|
1126
|
+
fieldType: "array",
|
|
1127
|
+
filterable: true,
|
|
1128
|
+
description: 'Freeform labels (e.g. "security", "schema"). Search-side filter.',
|
|
1129
|
+
renderHints: { label: "Tags", order: 5 }
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
// Self-reference (document → document): the decision this one supersedes.
|
|
1133
|
+
fieldId: "supersedes",
|
|
1134
|
+
fieldType: "reference",
|
|
1135
|
+
targetTypeName: "decision",
|
|
1136
|
+
targetSurface: "document",
|
|
1137
|
+
targetField: "externalId",
|
|
1138
|
+
cardinality: "one",
|
|
1139
|
+
description: "The decision this one supersedes (by externalId).",
|
|
1140
|
+
renderHints: { label: "Supersedes", order: 6 }
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
fieldId: "date",
|
|
1144
|
+
fieldType: "date",
|
|
1145
|
+
description: "ISO-8601 decision date. Range-queryable / sortable.",
|
|
1146
|
+
renderHints: { label: "Date", widget: "date", order: 7 }
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1149
|
+
lookupFields: ["status", "area", "supersedes", { fieldName: "date", rangeEnabled: true }]
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
// A DESIGN doc or spec — the exploration that drives a decision. Distinct
|
|
1153
|
+
// from `decision` (a different browse genre + it links to the decision it
|
|
1154
|
+
// informs). Body = the design narrative.
|
|
1155
|
+
typeName: "design",
|
|
1156
|
+
displayName: "Design",
|
|
1157
|
+
indexMode: "HYBRID",
|
|
1158
|
+
allowedSurfaces: ["document"],
|
|
1159
|
+
// Intrinsic title + body; schema = metadata beyond those (no typed `title`).
|
|
1160
|
+
fields: [
|
|
1161
|
+
{
|
|
1162
|
+
fieldId: "summary",
|
|
1163
|
+
fieldType: "string",
|
|
1164
|
+
searchable: true,
|
|
1165
|
+
description: "A one-paragraph abstract. The full design is the document body.",
|
|
1166
|
+
renderHints: { label: "Summary", widget: "textarea", order: 2 }
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
fieldId: "status",
|
|
1170
|
+
fieldType: "enum",
|
|
1171
|
+
filterable: true,
|
|
1172
|
+
enumValues: ["draft", "active", "implemented", "superseded"],
|
|
1173
|
+
renderHints: { label: "Status", widget: "select", order: 3 }
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
fieldId: "area",
|
|
1177
|
+
fieldType: "string",
|
|
1178
|
+
filterable: true,
|
|
1179
|
+
renderHints: { label: "Area", widget: "text", order: 4 }
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
fieldId: "tags",
|
|
1183
|
+
fieldType: "array",
|
|
1184
|
+
filterable: true,
|
|
1185
|
+
renderHints: { label: "Tags", order: 5 }
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
// Cross-document edge: the decision this design informs/produces.
|
|
1189
|
+
fieldId: "relatedDecision",
|
|
1190
|
+
fieldType: "reference",
|
|
1191
|
+
targetTypeName: "decision",
|
|
1192
|
+
targetSurface: "document",
|
|
1193
|
+
targetField: "externalId",
|
|
1194
|
+
cardinality: "one",
|
|
1195
|
+
description: "The decision this design informs (by externalId).",
|
|
1196
|
+
renderHints: { label: "Related decision", order: 6 }
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
// Self-reference: a design supersedes an earlier design/spec.
|
|
1200
|
+
fieldId: "supersedes",
|
|
1201
|
+
fieldType: "reference",
|
|
1202
|
+
targetTypeName: "design",
|
|
1203
|
+
targetSurface: "document",
|
|
1204
|
+
targetField: "externalId",
|
|
1205
|
+
cardinality: "one",
|
|
1206
|
+
description: "The design this one supersedes (by externalId).",
|
|
1207
|
+
renderHints: { label: "Supersedes", order: 7 }
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
fieldId: "updatedOn",
|
|
1211
|
+
fieldType: "date",
|
|
1212
|
+
description: "ISO-8601 \u2014 when last revised. Range-queryable.",
|
|
1213
|
+
renderHints: { label: "Updated on", widget: "date", order: 8 }
|
|
1214
|
+
}
|
|
1215
|
+
],
|
|
1216
|
+
lookupFields: ["status", "area", "relatedDecision", "supersedes", { fieldName: "updatedOn", rangeEnabled: true }]
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
// A REFERENCE doc — maintained "how it works / how to": guides, onboarding,
|
|
1220
|
+
// API docs, process docs. Body = the prose. Distinct shape: a `category`
|
|
1221
|
+
// (DRY sub-labels — onboarding/api/process are same shape) and `lastReviewed`
|
|
1222
|
+
// (freshness is the whole game for reference material).
|
|
1223
|
+
typeName: "reference",
|
|
1224
|
+
displayName: "Reference",
|
|
1225
|
+
indexMode: "HYBRID",
|
|
1226
|
+
allowedSurfaces: ["document"],
|
|
1227
|
+
// Intrinsic title + body; schema = metadata beyond those (no typed `title`).
|
|
1228
|
+
fields: [
|
|
1229
|
+
{
|
|
1230
|
+
fieldId: "summary",
|
|
1231
|
+
fieldType: "string",
|
|
1232
|
+
searchable: true,
|
|
1233
|
+
description: "A one-paragraph abstract. The full reference is the document body.",
|
|
1234
|
+
renderHints: { label: "Summary", widget: "textarea", order: 2 }
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
// The sub-kind, as a filterable field (not a separate schema — these are
|
|
1238
|
+
// the same shape, differing only by label, so a field is the DRY choice).
|
|
1239
|
+
fieldId: "category",
|
|
1240
|
+
fieldType: "enum",
|
|
1241
|
+
filterable: true,
|
|
1242
|
+
enumValues: ["guide", "onboarding", "api", "process", "other"],
|
|
1243
|
+
renderHints: { label: "Category", widget: "select", order: 3 }
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
fieldId: "area",
|
|
1247
|
+
fieldType: "string",
|
|
1248
|
+
filterable: true,
|
|
1249
|
+
renderHints: { label: "Area", widget: "text", order: 4 }
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
fieldId: "tags",
|
|
1253
|
+
fieldType: "array",
|
|
1254
|
+
filterable: true,
|
|
1255
|
+
renderHints: { label: "Tags", order: 5 }
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
fieldId: "status",
|
|
1259
|
+
fieldType: "enum",
|
|
1260
|
+
filterable: true,
|
|
1261
|
+
enumValues: ["active", "superseded"],
|
|
1262
|
+
renderHints: { label: "Status", widget: "select", order: 6 }
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
// Optional cross-document edge: the decision behind this reference.
|
|
1266
|
+
fieldId: "relatedDecision",
|
|
1267
|
+
fieldType: "reference",
|
|
1268
|
+
targetTypeName: "decision",
|
|
1269
|
+
targetSurface: "document",
|
|
1270
|
+
targetField: "externalId",
|
|
1271
|
+
cardinality: "one",
|
|
1272
|
+
description: "The decision behind this reference, if any (by externalId).",
|
|
1273
|
+
renderHints: { label: "Related decision", order: 7 }
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
// Freshness — "references not reviewed since X". The reference-doc signal.
|
|
1277
|
+
fieldId: "lastReviewed",
|
|
1278
|
+
fieldType: "date",
|
|
1279
|
+
description: "ISO-8601 \u2014 when this reference was last verified current. Range-queryable.",
|
|
1280
|
+
renderHints: { label: "Last reviewed", widget: "date", order: 8 }
|
|
1281
|
+
}
|
|
1282
|
+
],
|
|
1283
|
+
lookupFields: ["category", "area", "status", "relatedDecision", { fieldName: "lastReviewed", rangeEnabled: true }]
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
// A RUNBOOK — a step-by-step operational procedure (deploy, release, recover).
|
|
1287
|
+
// Body = the procedure. Distinct browse genre, and often BORN FROM a
|
|
1288
|
+
// post-mortem (its resolution, codified) — a cross-document edge.
|
|
1289
|
+
typeName: "runbook",
|
|
1290
|
+
displayName: "Runbook",
|
|
1291
|
+
indexMode: "HYBRID",
|
|
1292
|
+
allowedSurfaces: ["document"],
|
|
1293
|
+
// Intrinsic title + body; schema = metadata beyond those (no typed `title`).
|
|
1294
|
+
fields: [
|
|
1295
|
+
{
|
|
1296
|
+
fieldId: "summary",
|
|
1297
|
+
fieldType: "string",
|
|
1298
|
+
searchable: true,
|
|
1299
|
+
description: "When to use this runbook \u2014 the trigger. The steps are the document body.",
|
|
1300
|
+
renderHints: { label: "Summary", widget: "textarea", order: 2 }
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
fieldId: "area",
|
|
1304
|
+
fieldType: "string",
|
|
1305
|
+
filterable: true,
|
|
1306
|
+
renderHints: { label: "Area", widget: "text", order: 3 }
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
fieldId: "tags",
|
|
1310
|
+
fieldType: "array",
|
|
1311
|
+
filterable: true,
|
|
1312
|
+
renderHints: { label: "Tags", order: 4 }
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
fieldId: "status",
|
|
1316
|
+
fieldType: "enum",
|
|
1317
|
+
filterable: true,
|
|
1318
|
+
enumValues: ["active", "retired"],
|
|
1319
|
+
renderHints: { label: "Status", widget: "select", order: 5 }
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
// Cross-document edge: the post-mortem whose resolution this runbook codifies.
|
|
1323
|
+
fieldId: "bornFrom",
|
|
1324
|
+
fieldType: "reference",
|
|
1325
|
+
targetTypeName: "postmortem",
|
|
1326
|
+
targetSurface: "document",
|
|
1327
|
+
targetField: "externalId",
|
|
1328
|
+
cardinality: "one",
|
|
1329
|
+
description: "The post-mortem this runbook was codified from (by externalId).",
|
|
1330
|
+
renderHints: { label: "Born from (post-mortem)", order: 6 }
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
fieldId: "relatedDecision",
|
|
1334
|
+
fieldType: "reference",
|
|
1335
|
+
targetTypeName: "decision",
|
|
1336
|
+
targetSurface: "document",
|
|
1337
|
+
targetField: "externalId",
|
|
1338
|
+
cardinality: "one",
|
|
1339
|
+
description: "A decision this runbook implements, if any (by externalId).",
|
|
1340
|
+
renderHints: { label: "Related decision", order: 7 }
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
fieldId: "updatedOn",
|
|
1344
|
+
fieldType: "date",
|
|
1345
|
+
description: "ISO-8601 \u2014 when last revised. Range-queryable.",
|
|
1346
|
+
renderHints: { label: "Updated on", widget: "date", order: 8 }
|
|
1347
|
+
}
|
|
1348
|
+
],
|
|
1349
|
+
lookupFields: ["area", "status", "bornFrom", "relatedDecision", { fieldName: "updatedOn", rangeEnabled: true }]
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
// A POST-MORTEM — what broke and the durable lesson. Body = the writeup
|
|
1353
|
+
// (impact / root cause / resolution / lesson). Distinct shape: `severity` +
|
|
1354
|
+
// `occurredOn` (the incident timeline). "Have we hit this before?" lives here.
|
|
1355
|
+
typeName: "postmortem",
|
|
1356
|
+
displayName: "Post-mortem",
|
|
1357
|
+
indexMode: "HYBRID",
|
|
1358
|
+
allowedSurfaces: ["document"],
|
|
1359
|
+
// Intrinsic title + body; schema = metadata beyond those (no typed `title`).
|
|
1360
|
+
fields: [
|
|
1361
|
+
{
|
|
1362
|
+
fieldId: "summary",
|
|
1363
|
+
fieldType: "string",
|
|
1364
|
+
searchable: true,
|
|
1365
|
+
description: "What happened, in brief. The full analysis (impact/root cause/resolution/lesson) is the body.",
|
|
1366
|
+
renderHints: { label: "Summary", widget: "textarea", order: 2 }
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
fieldId: "severity",
|
|
1370
|
+
fieldType: "enum",
|
|
1371
|
+
filterable: true,
|
|
1372
|
+
enumValues: ["low", "medium", "high", "critical"],
|
|
1373
|
+
renderHints: { label: "Severity", widget: "select", order: 3 }
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
fieldId: "status",
|
|
1377
|
+
fieldType: "enum",
|
|
1378
|
+
filterable: true,
|
|
1379
|
+
enumValues: ["open", "mitigated", "resolved"],
|
|
1380
|
+
renderHints: { label: "Status", widget: "select", order: 4 }
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
fieldId: "area",
|
|
1384
|
+
fieldType: "string",
|
|
1385
|
+
filterable: true,
|
|
1386
|
+
renderHints: { label: "Area", widget: "text", order: 5 }
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
fieldId: "tags",
|
|
1390
|
+
fieldType: "array",
|
|
1391
|
+
filterable: true,
|
|
1392
|
+
renderHints: { label: "Tags", order: 6 }
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
fieldId: "relatedDecision",
|
|
1396
|
+
fieldType: "reference",
|
|
1397
|
+
targetTypeName: "decision",
|
|
1398
|
+
targetSurface: "document",
|
|
1399
|
+
targetField: "externalId",
|
|
1400
|
+
cardinality: "one",
|
|
1401
|
+
description: "A decision implicated in or addressed by this incident (by externalId).",
|
|
1402
|
+
renderHints: { label: "Related decision", order: 7 }
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
fieldId: "occurredOn",
|
|
1406
|
+
fieldType: "date",
|
|
1407
|
+
description: 'ISO-8601 \u2014 when it happened. Range-queryable \u2014 "incidents this month".',
|
|
1408
|
+
renderHints: { label: "Occurred on", widget: "date", order: 8 }
|
|
1409
|
+
}
|
|
1410
|
+
],
|
|
1411
|
+
lookupFields: ["severity", "status", "area", "relatedDecision", { fieldName: "occurredOn", rangeEnabled: true }]
|
|
1412
|
+
},
|
|
1413
|
+
// ============================= RECORDS =============================
|
|
1414
|
+
// Structure-dominant: the typed fields are the artifact. Short, exact-queryable.
|
|
1415
|
+
{
|
|
1416
|
+
// A governance CONTROL — a policy/standard/control the codebase must satisfy,
|
|
1417
|
+
// WITH its evidence. The compliance instrument: it records what enforces it
|
|
1418
|
+
// (`evidence`), the runbook that VERIFIES it (cross-surface → document), and
|
|
1419
|
+
// the decision that mandates it. "Which critical controls are active, and how
|
|
1420
|
+
// is each proven?"
|
|
1421
|
+
typeName: "control",
|
|
1422
|
+
displayName: "Control",
|
|
1423
|
+
indexMode: "HYBRID",
|
|
1424
|
+
fields: [
|
|
1425
|
+
{
|
|
1426
|
+
fieldId: "title",
|
|
1427
|
+
fieldType: "string",
|
|
1428
|
+
required: true,
|
|
1429
|
+
searchable: true,
|
|
1430
|
+
validation: { minLength: 1, maxLength: 200 },
|
|
1431
|
+
renderHints: { label: "Title", widget: "text", order: 1, displayField: true }
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
fieldId: "statement",
|
|
1435
|
+
fieldType: "string",
|
|
1436
|
+
searchable: true,
|
|
1437
|
+
description: "The requirement \u2014 what must always hold.",
|
|
1438
|
+
renderHints: { label: "Statement", widget: "textarea", order: 2 }
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
fieldId: "rationale",
|
|
1442
|
+
fieldType: "string",
|
|
1443
|
+
searchable: true,
|
|
1444
|
+
description: "Why the control exists \u2014 the risk it prevents.",
|
|
1445
|
+
renderHints: { label: "Rationale", widget: "textarea", order: 3 }
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
// The policy → implementation spectrum in one filterable field.
|
|
1449
|
+
fieldId: "kind",
|
|
1450
|
+
fieldType: "enum",
|
|
1451
|
+
filterable: true,
|
|
1452
|
+
enumValues: ["policy", "standard", "control"],
|
|
1453
|
+
renderHints: { label: "Kind", widget: "select", order: 4 }
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
// Ordinal, but EQUALITY (range/prefix order is lexical, so low<critical
|
|
1457
|
+
// would sort alphabetically). Enumerate "all critical controls" by equality.
|
|
1458
|
+
fieldId: "criticality",
|
|
1459
|
+
fieldType: "enum",
|
|
1460
|
+
filterable: true,
|
|
1461
|
+
enumValues: ["low", "medium", "high", "critical"],
|
|
1462
|
+
renderHints: { label: "Criticality", widget: "select", order: 5 }
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
fieldId: "evidence",
|
|
1466
|
+
fieldType: "string",
|
|
1467
|
+
searchable: true,
|
|
1468
|
+
description: "What enforces or proves the control inline (e.g. an architecture test or gate).",
|
|
1469
|
+
renderHints: { label: "Evidence", widget: "textarea", order: 6 }
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
fieldId: "status",
|
|
1473
|
+
fieldType: "enum",
|
|
1474
|
+
filterable: true,
|
|
1475
|
+
enumValues: ["draft", "active", "retired"],
|
|
1476
|
+
renderHints: { label: "Status", widget: "select", order: 7 }
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
fieldId: "area",
|
|
1480
|
+
fieldType: "string",
|
|
1481
|
+
filterable: true,
|
|
1482
|
+
renderHints: { label: "Area", widget: "text", order: 8 }
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
fieldId: "tags",
|
|
1486
|
+
fieldType: "array",
|
|
1487
|
+
filterable: true,
|
|
1488
|
+
renderHints: { label: "Tags", order: 9 }
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
// Cross-surface edge (record → document): the runbook that proves the control.
|
|
1492
|
+
fieldId: "verifiedBy",
|
|
1493
|
+
fieldType: "reference",
|
|
1494
|
+
targetTypeName: "runbook",
|
|
1495
|
+
targetSurface: "document",
|
|
1496
|
+
targetField: "externalId",
|
|
1497
|
+
cardinality: "one",
|
|
1498
|
+
description: "The runbook that verifies this control (by externalId).",
|
|
1499
|
+
renderHints: { label: "Verified by (runbook)", order: 10 }
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
// Cross-surface edge (record → document): the decision that mandates it.
|
|
1503
|
+
fieldId: "relatedDecision",
|
|
1504
|
+
fieldType: "reference",
|
|
1505
|
+
targetTypeName: "decision",
|
|
1506
|
+
targetSurface: "document",
|
|
1507
|
+
targetField: "externalId",
|
|
1508
|
+
cardinality: "one",
|
|
1509
|
+
description: "The decision that mandates this control (by externalId).",
|
|
1510
|
+
renderHints: { label: "Related decision", order: 11 }
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
fieldId: "reviewedOn",
|
|
1514
|
+
fieldType: "date",
|
|
1515
|
+
description: "ISO-8601 last-reviewed date. Range-queryable.",
|
|
1516
|
+
renderHints: { label: "Reviewed on", widget: "date", order: 12 }
|
|
1517
|
+
}
|
|
1518
|
+
],
|
|
1519
|
+
lookupFields: [
|
|
1520
|
+
"kind",
|
|
1521
|
+
"criticality",
|
|
1522
|
+
"status",
|
|
1523
|
+
"area",
|
|
1524
|
+
"verifiedBy",
|
|
1525
|
+
"relatedDecision",
|
|
1526
|
+
{ fieldName: "reviewedOn", rangeEnabled: true }
|
|
1527
|
+
]
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
// A CONVENTION — a must-follow operating rule the team teaches its agents. The
|
|
1531
|
+
// durable, shareable operating-memory. Distinct fields capture how we actually
|
|
1532
|
+
// write these: the `rule` (imperative), the `why` (rationale), and `howToApply`
|
|
1533
|
+
// (the concrete application) are SEPARATE fields, not one blob — so an agent can
|
|
1534
|
+
// recall the rule, the reasoning, and the how independently.
|
|
1535
|
+
typeName: "convention",
|
|
1536
|
+
displayName: "Convention",
|
|
1537
|
+
indexMode: "HYBRID",
|
|
1538
|
+
fields: [
|
|
1539
|
+
{
|
|
1540
|
+
fieldId: "title",
|
|
1541
|
+
fieldType: "string",
|
|
1542
|
+
required: true,
|
|
1543
|
+
searchable: true,
|
|
1544
|
+
validation: { minLength: 1, maxLength: 200 },
|
|
1545
|
+
renderHints: { label: "Title", widget: "text", order: 1, displayField: true }
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
fieldId: "rule",
|
|
1549
|
+
fieldType: "string",
|
|
1550
|
+
searchable: true,
|
|
1551
|
+
description: "The convention itself, stated as an imperative.",
|
|
1552
|
+
renderHints: { label: "Rule", widget: "textarea", order: 2 }
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
fieldId: "why",
|
|
1556
|
+
fieldType: "string",
|
|
1557
|
+
searchable: true,
|
|
1558
|
+
description: "Why it matters \u2014 the trade-off / the antipattern it prevents.",
|
|
1559
|
+
renderHints: { label: "Why", widget: "textarea", order: 3 }
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
fieldId: "howToApply",
|
|
1563
|
+
fieldType: "string",
|
|
1564
|
+
searchable: true,
|
|
1565
|
+
description: "How to comply in practice \u2014 the concrete application steps.",
|
|
1566
|
+
renderHints: { label: "How to apply", widget: "textarea", order: 4 }
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
fieldId: "area",
|
|
1570
|
+
fieldType: "string",
|
|
1571
|
+
filterable: true,
|
|
1572
|
+
renderHints: { label: "Area", widget: "text", order: 5 }
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
fieldId: "status",
|
|
1576
|
+
fieldType: "enum",
|
|
1577
|
+
filterable: true,
|
|
1578
|
+
enumValues: ["active", "retired"],
|
|
1579
|
+
renderHints: { label: "Status", widget: "select", order: 6 }
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
fieldId: "tags",
|
|
1583
|
+
fieldType: "array",
|
|
1584
|
+
filterable: true,
|
|
1585
|
+
renderHints: { label: "Tags", order: 7 }
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
// Cross-surface edge (record → document): the decision that established it.
|
|
1589
|
+
fieldId: "establishedBy",
|
|
1590
|
+
fieldType: "reference",
|
|
1591
|
+
targetTypeName: "decision",
|
|
1592
|
+
targetSurface: "document",
|
|
1593
|
+
targetField: "externalId",
|
|
1594
|
+
cardinality: "one",
|
|
1595
|
+
description: "The decision that established this convention (by externalId).",
|
|
1596
|
+
renderHints: { label: "Established by (decision)", order: 8 }
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
fieldId: "updatedOn",
|
|
1600
|
+
fieldType: "date",
|
|
1601
|
+
description: "ISO-8601 \u2014 when last revised. Range-queryable.",
|
|
1602
|
+
renderHints: { label: "Updated on", widget: "date", order: 9 }
|
|
1603
|
+
}
|
|
1604
|
+
],
|
|
1605
|
+
lookupFields: ["area", "status", "establishedBy", { fieldName: "updatedOn", rangeEnabled: true }]
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
// A GOTCHA / sharp edge: a symptom, its cause, and the fix. A tight typed
|
|
1609
|
+
// triple — found by meaning (semantic search on the symptom) + area/status.
|
|
1610
|
+
// The most standalone type; no typed edge.
|
|
1611
|
+
typeName: "gotcha",
|
|
1612
|
+
displayName: "Gotcha",
|
|
1613
|
+
indexMode: "HYBRID",
|
|
1614
|
+
fields: [
|
|
1615
|
+
{
|
|
1616
|
+
fieldId: "symptom",
|
|
1617
|
+
fieldType: "string",
|
|
1618
|
+
required: true,
|
|
1619
|
+
searchable: true,
|
|
1620
|
+
validation: { minLength: 1, maxLength: 500 },
|
|
1621
|
+
renderHints: { label: "Symptom", widget: "textarea", order: 1, displayField: true }
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
fieldId: "cause",
|
|
1625
|
+
fieldType: "string",
|
|
1626
|
+
searchable: true,
|
|
1627
|
+
renderHints: { label: "Cause", widget: "textarea", order: 2 }
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
fieldId: "fix",
|
|
1631
|
+
fieldType: "string",
|
|
1632
|
+
searchable: true,
|
|
1633
|
+
renderHints: { label: "Fix", widget: "textarea", order: 3 }
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
fieldId: "area",
|
|
1637
|
+
fieldType: "string",
|
|
1638
|
+
filterable: true,
|
|
1639
|
+
renderHints: { label: "Area", widget: "text", order: 4 }
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
fieldId: "status",
|
|
1643
|
+
fieldType: "enum",
|
|
1644
|
+
filterable: true,
|
|
1645
|
+
enumValues: ["active", "resolved"],
|
|
1646
|
+
renderHints: { label: "Status", widget: "select", order: 5 }
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
fieldId: "tags",
|
|
1650
|
+
fieldType: "array",
|
|
1651
|
+
filterable: true,
|
|
1652
|
+
renderHints: { label: "Tags", order: 6 }
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
fieldId: "discoveredOn",
|
|
1656
|
+
fieldType: "date",
|
|
1657
|
+
description: "ISO-8601 \u2014 when first hit. Range-queryable.",
|
|
1658
|
+
renderHints: { label: "Discovered on", widget: "date", order: 7 }
|
|
1659
|
+
}
|
|
1660
|
+
],
|
|
1661
|
+
lookupFields: ["area", "status", { fieldName: "discoveredOn", rangeEnabled: true }]
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
// A glossary TERM — a definition keyed by the term itself. Structure-dominant:
|
|
1665
|
+
// `term` is a UNIQUE exact-lookup key (the showcase of a uniqueness constraint),
|
|
1666
|
+
// `definition` is the RAG body, `aliases` catch alternate names. Links to the
|
|
1667
|
+
// decision that defines/establishes the concept where there is one.
|
|
1668
|
+
typeName: "term",
|
|
1669
|
+
displayName: "Glossary term",
|
|
1670
|
+
indexMode: "HYBRID",
|
|
1671
|
+
fields: [
|
|
1672
|
+
{
|
|
1673
|
+
fieldId: "term",
|
|
1674
|
+
fieldType: "string",
|
|
1675
|
+
required: true,
|
|
1676
|
+
searchable: true,
|
|
1677
|
+
validation: { minLength: 1, maxLength: 200 },
|
|
1678
|
+
renderHints: { label: "Term", widget: "text", order: 1, displayField: true }
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
fieldId: "definition",
|
|
1682
|
+
fieldType: "string",
|
|
1683
|
+
searchable: true,
|
|
1684
|
+
description: "What the term means \u2014 the RAG-able body.",
|
|
1685
|
+
renderHints: { label: "Definition", widget: "textarea", order: 2 }
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
fieldId: "aliases",
|
|
1689
|
+
fieldType: "array",
|
|
1690
|
+
filterable: true,
|
|
1691
|
+
description: "Alternate names / abbreviations for the same concept.",
|
|
1692
|
+
renderHints: { label: "Aliases", order: 3 }
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
fieldId: "area",
|
|
1696
|
+
fieldType: "string",
|
|
1697
|
+
filterable: true,
|
|
1698
|
+
renderHints: { label: "Area", widget: "text", order: 4 }
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
fieldId: "tags",
|
|
1702
|
+
fieldType: "array",
|
|
1703
|
+
filterable: true,
|
|
1704
|
+
renderHints: { label: "Tags", order: 5 }
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
fieldId: "relatedDecision",
|
|
1708
|
+
fieldType: "reference",
|
|
1709
|
+
targetTypeName: "decision",
|
|
1710
|
+
targetSurface: "document",
|
|
1711
|
+
targetField: "externalId",
|
|
1712
|
+
cardinality: "one",
|
|
1713
|
+
description: "A decision that defines or establishes this term (by externalId).",
|
|
1714
|
+
renderHints: { label: "Related decision", order: 6 }
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
fieldId: "updatedOn",
|
|
1718
|
+
fieldType: "date",
|
|
1719
|
+
description: "ISO-8601 \u2014 when last revised. Range-queryable.",
|
|
1720
|
+
renderHints: { label: "Updated on", widget: "date", order: 7 }
|
|
1721
|
+
}
|
|
1722
|
+
],
|
|
1723
|
+
// `term` is a UNIQUE equality lookup — exact "define X" + a one-per-term
|
|
1724
|
+
// guarantee. `area`/`relatedDecision` enumerate; `updatedOn` is the range row.
|
|
1725
|
+
lookupFields: [
|
|
1726
|
+
{ fieldName: "term", unique: true },
|
|
1727
|
+
"area",
|
|
1728
|
+
"relatedDecision",
|
|
1729
|
+
{ fieldName: "updatedOn", rangeEnabled: true }
|
|
1730
|
+
]
|
|
1731
|
+
}
|
|
1732
|
+
],
|
|
1733
|
+
// Least-privilege, data-plane only. The scope of the `ssk_*` key the bootstrap
|
|
1734
|
+
// mints for THIS blueprint's service principal (the MCP/API runtime). See
|
|
1735
|
+
// DATA_PLANE_ACTIONS above for the action set + rationale.
|
|
1736
|
+
accessProfile: {
|
|
1737
|
+
allowedActions: DATA_PLANE_ACTIONS
|
|
1738
|
+
},
|
|
1739
|
+
// A reusable `editor` role for the HUMAN owner — DISTINCT from `accessProfile`
|
|
1740
|
+
// (which scopes only the service-principal key). `bootstrap` provisions this
|
|
1741
|
+
// role in the context but binds it to no one; the owner joins themselves so the
|
|
1742
|
+
// data-plane app (app.vectros.ai) shows their KB — its switcher lists only
|
|
1743
|
+
// contexts the signed-in user holds an active access profile in, and bootstrap
|
|
1744
|
+
// grants the human none by default. Bind it after bootstrap with:
|
|
1745
|
+
// vectros access grant --principal usr_<your-user-id> --context agentic-sdlc --role editor
|
|
1746
|
+
// (or the admin app's Access > Contexts > agentic-sdlc > Profiles > Create).
|
|
1747
|
+
// Editor PARITY with the service key (same DATA_PLANE_ACTIONS) so a human
|
|
1748
|
+
// curator can browse AND write/correct the KB; still no :d and no control-plane
|
|
1749
|
+
// action, so the scope gate accepts it exactly like the accessProfile.
|
|
1750
|
+
roles: {
|
|
1751
|
+
editor: [{ allowedActions: DATA_PLANE_ACTIONS }]
|
|
1752
|
+
},
|
|
1753
|
+
servicePrincipal: {
|
|
1754
|
+
externalId: "agentic-sdlc",
|
|
1755
|
+
displayName: "Agentic SDLC Knowledge Base"
|
|
1756
|
+
}
|
|
1757
|
+
// No bundled seed in this version: the content artifacts live on the document
|
|
1758
|
+
// surface and the cross-surface graph is populated by the ingest agent
|
|
1759
|
+
// (document_ingest / record_create), not the bootstrap seed step. Production
|
|
1760
|
+
// contexts provision with `vectros bootstrap --no-seed` regardless.
|
|
1761
|
+
};
|
|
1762
|
+
var agentic_sdlc_default = agenticSdlc;
|
|
1763
|
+
|
|
1021
1764
|
// src/blueprints/second-brain.ts
|
|
1022
1765
|
var secondBrain = {
|
|
1023
1766
|
name: "second-brain",
|
|
@@ -1114,6 +1857,7 @@ var secondBrain = {
|
|
|
1114
1857
|
},
|
|
1115
1858
|
seed: [
|
|
1116
1859
|
{
|
|
1860
|
+
surface: "record",
|
|
1117
1861
|
typeName: "note",
|
|
1118
1862
|
externalId: "seed-welcome",
|
|
1119
1863
|
fields: {
|
|
@@ -1247,6 +1991,7 @@ var clinicalIntake = {
|
|
|
1247
1991
|
},
|
|
1248
1992
|
seed: [
|
|
1249
1993
|
{
|
|
1994
|
+
surface: "record",
|
|
1250
1995
|
typeName: "intake",
|
|
1251
1996
|
externalId: "seed-synthetic-intake",
|
|
1252
1997
|
fields: {
|
|
@@ -1270,6 +2015,7 @@ var clinical_intake_default = clinicalIntake;
|
|
|
1270
2015
|
var BUNDLED_BLUEPRINTS = [
|
|
1271
2016
|
task_management_default,
|
|
1272
2017
|
coding_agent_memory_default,
|
|
2018
|
+
agentic_sdlc_default,
|
|
1273
2019
|
second_brain_default,
|
|
1274
2020
|
clinical_intake_default
|
|
1275
2021
|
];
|