@vectros-ai/blueprints 0.6.3 → 0.6.4

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 CHANGED
@@ -3,6 +3,37 @@
3
3
  All notable changes to `@vectros-ai/blueprints` are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org).
5
5
 
6
+ ## 0.6.4 — 2026-07-03
7
+
8
+ ### Added
9
+
10
+ - **`agentic-sdlc` `editor` role now carries full data-plane delete** (blueprint `1.1.0 → 1.2.0`).
11
+ The human owner's `editor` role gains `records:d` / `documents:d` / `folders:d` on top of the
12
+ shared data-plane actions — so a person granted `editor` can hard-delete data-plane content
13
+ (curation cleanup), while the agent's service key stays delete-free and curates by soft-retract
14
+ (archive) instead. Deleting only *your own* data via a scoped credential is a separate, later
15
+ capability; today `editor` is context-wide.
16
+ - **Guide + agent prompt now include KB query-mechanics guidance.** Reach for `record_query`
17
+ before `hybrid_search` for an enumerable ask (exact + compact); query compactly by default
18
+ (`limit: 3` + `uniqueDocuments: true`, since hits carry passages); how to scope by type per
19
+ tool (`hybrid_search` uses `typeName`, which narrows documents and records alike;
20
+ `record_query` uses `type`); and the `textMode: PHRASE` keyword-leg trap on long natural-language queries
21
+ (a `textScore` of 0 on every hit means the keyword leg contributed nothing — use a short
22
+ phrase or `textMode: "OR"`).
23
+ - **`agentic-sdlc` records now carry a `sourceRef` field** (blueprint `1.0.0 → 1.1.0`).
24
+ The four record types (`control`, `convention`, `gotcha`, `term`) gain a `sourceRef` string —
25
+ the repo path of the source file each record was distilled from — as an equality
26
+ lookup. It is the record analog of the provenance a document keeps: because many
27
+ records are extracted from one file, a record can't embed an in-file back-reference,
28
+ so it names its source instead. A change to a source file then finds exactly its
29
+ records (`record_query` by `sourceRef`) to re-extract, keeping the knowledge base in
30
+ sync with the repository without a separate index to maintain. Additive and
31
+ backward-compatible; existing records simply have no `sourceRef` until re-extracted.
32
+ - **Guide + agent prompt now document the repo↔KB sync pattern in full** — the two
33
+ self-describing markers (`vectros-kb-id` for a file that *is* a KB document,
34
+ `vectros-kb-records` for a file that *feeds* records) plus `sourceRef`, so a consumer
35
+ can keep a mirrored repo and its KB in sync with no side index.
36
+
6
37
  ## 0.6.3 — 2026-07-01
7
38
 
8
39
  ### Added
package/dist/index.js CHANGED
@@ -1077,9 +1077,10 @@ var DATA_PLANE_ACTIONS = [
1077
1077
  "folders:r",
1078
1078
  "folders:c"
1079
1079
  ];
1080
+ var EDITOR_ACTIONS = [...DATA_PLANE_ACTIONS, "records:d", "documents:d", "folders:d"];
1080
1081
  var agenticSdlc = {
1081
1082
  name: "agentic-sdlc",
1082
- version: "1.0.0",
1083
+ version: "1.2.0",
1083
1084
  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
1085
  contextId: "agentic-sdlc",
1085
1086
  contextName: "Agentic SDLC Knowledge Base",
@@ -1514,6 +1515,19 @@ var agenticSdlc = {
1514
1515
  fieldType: "date",
1515
1516
  description: "ISO-8601 last-reviewed date. Range-queryable.",
1516
1517
  renderHints: { label: "Reviewed on", widget: "date", order: 12 }
1518
+ },
1519
+ {
1520
+ // Provenance for sync: the source file this record was distilled from. A
1521
+ // record can't carry an in-file marker the way a document can (many records
1522
+ // come from one file), so it names its source instead — a change to that file
1523
+ // finds (equality lookup) and re-extracts exactly its records. Equality, not
1524
+ // range: file-level is the sync unit (re-extraction reprocesses the whole file),
1525
+ // and the schema keeps its single range lookup for the date row.
1526
+ fieldId: "sourceRef",
1527
+ fieldType: "string",
1528
+ filterable: true,
1529
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
1530
+ renderHints: { label: "Source ref", widget: "text", order: 13 }
1517
1531
  }
1518
1532
  ],
1519
1533
  lookupFields: [
@@ -1523,7 +1537,8 @@ var agenticSdlc = {
1523
1537
  "area",
1524
1538
  "verifiedBy",
1525
1539
  "relatedDecision",
1526
- { fieldName: "reviewedOn", rangeEnabled: true }
1540
+ { fieldName: "reviewedOn", rangeEnabled: true },
1541
+ "sourceRef"
1527
1542
  ]
1528
1543
  },
1529
1544
  {
@@ -1600,9 +1615,23 @@ var agenticSdlc = {
1600
1615
  fieldType: "date",
1601
1616
  description: "ISO-8601 \u2014 when last revised. Range-queryable.",
1602
1617
  renderHints: { label: "Updated on", widget: "date", order: 9 }
1618
+ },
1619
+ {
1620
+ // Provenance for sync — see the note on `control.sourceRef`.
1621
+ fieldId: "sourceRef",
1622
+ fieldType: "string",
1623
+ filterable: true,
1624
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
1625
+ renderHints: { label: "Source ref", widget: "text", order: 10 }
1603
1626
  }
1604
1627
  ],
1605
- lookupFields: ["area", "status", "establishedBy", { fieldName: "updatedOn", rangeEnabled: true }]
1628
+ lookupFields: [
1629
+ "area",
1630
+ "status",
1631
+ "establishedBy",
1632
+ { fieldName: "updatedOn", rangeEnabled: true },
1633
+ "sourceRef"
1634
+ ]
1606
1635
  },
1607
1636
  {
1608
1637
  // A GOTCHA / sharp edge: a symptom, its cause, and the fix. A tight typed
@@ -1656,9 +1685,22 @@ var agenticSdlc = {
1656
1685
  fieldType: "date",
1657
1686
  description: "ISO-8601 \u2014 when first hit. Range-queryable.",
1658
1687
  renderHints: { label: "Discovered on", widget: "date", order: 7 }
1688
+ },
1689
+ {
1690
+ // Provenance for sync — see the note on `control.sourceRef`.
1691
+ fieldId: "sourceRef",
1692
+ fieldType: "string",
1693
+ filterable: true,
1694
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
1695
+ renderHints: { label: "Source ref", widget: "text", order: 8 }
1659
1696
  }
1660
1697
  ],
1661
- lookupFields: ["area", "status", { fieldName: "discoveredOn", rangeEnabled: true }]
1698
+ lookupFields: [
1699
+ "area",
1700
+ "status",
1701
+ { fieldName: "discoveredOn", rangeEnabled: true },
1702
+ "sourceRef"
1703
+ ]
1662
1704
  },
1663
1705
  {
1664
1706
  // A glossary TERM — a definition keyed by the term itself. Structure-dominant:
@@ -1718,6 +1760,14 @@ var agenticSdlc = {
1718
1760
  fieldType: "date",
1719
1761
  description: "ISO-8601 \u2014 when last revised. Range-queryable.",
1720
1762
  renderHints: { label: "Updated on", widget: "date", order: 7 }
1763
+ },
1764
+ {
1765
+ // Provenance for sync — see the note on `control.sourceRef`.
1766
+ fieldId: "sourceRef",
1767
+ fieldType: "string",
1768
+ filterable: true,
1769
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
1770
+ renderHints: { label: "Source ref", widget: "text", order: 8 }
1721
1771
  }
1722
1772
  ],
1723
1773
  // `term` is a UNIQUE equality lookup — exact "define X" + a one-per-term
@@ -1726,7 +1776,8 @@ var agenticSdlc = {
1726
1776
  { fieldName: "term", unique: true },
1727
1777
  "area",
1728
1778
  "relatedDecision",
1729
- { fieldName: "updatedOn", rangeEnabled: true }
1779
+ { fieldName: "updatedOn", rangeEnabled: true },
1780
+ "sourceRef"
1730
1781
  ]
1731
1782
  }
1732
1783
  ],
@@ -1744,11 +1795,13 @@ var agenticSdlc = {
1744
1795
  // grants the human none by default. Bind it after bootstrap with:
1745
1796
  // vectros access grant --principal usr_<your-user-id> --context agentic-sdlc --role editor
1746
1797
  // (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.
1798
+ // The editor gets the full data plane so a human curator can browse, write/correct,
1799
+ // AND hard-delete the KB (EDITOR_ACTIONS = the service key's set + delete). The
1800
+ // service key deliberately lacks delete and archives instead; the trusted human
1801
+ // owner may permanently remove genuine strays. Still no control-plane action, so
1802
+ // the scope gate accepts it as a data-plane-only role.
1750
1803
  roles: {
1751
- editor: [{ allowedActions: DATA_PLANE_ACTIONS }]
1804
+ editor: [{ allowedActions: EDITOR_ACTIONS }]
1752
1805
  },
1753
1806
  servicePrincipal: {
1754
1807
  externalId: "agentic-sdlc",