vibe-coding-master 0.7.20 → 0.7.22

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.
@@ -26,15 +26,15 @@ export const CORE_VCM_ROLE_DEFINITIONS = [
26
26
  dispatchable: true
27
27
  }
28
28
  ];
29
- export const GATE_REVIEWER_ROLE_DEFINITION = {
30
- name: "gate-reviewer",
31
- label: "Gate Reviewer",
32
- commandAgent: "gate-reviewer",
29
+ export const REVIEWER_ROLE_DEFINITION = {
30
+ name: "reviewer",
31
+ label: "Reviewer",
32
+ commandAgent: "reviewer",
33
33
  dispatchable: false
34
34
  };
35
35
  export const VCM_ROLE_DEFINITIONS = [
36
36
  ...CORE_VCM_ROLE_DEFINITIONS,
37
- GATE_REVIEWER_ROLE_DEFINITION
37
+ REVIEWER_ROLE_DEFINITION
38
38
  ];
39
39
  export const TRANSLATOR_TOOL_ROLE_DEFINITION = {
40
40
  name: "translator",
@@ -69,8 +69,8 @@ export function isRoleName(value) {
69
69
  export function isVcmRoleName(value) {
70
70
  return VCM_ROLE_NAMES.includes(value);
71
71
  }
72
- export function isGateReviewerRoleName(value) {
73
- return value === GATE_REVIEWER_ROLE_DEFINITION.name;
72
+ export function isReviewerRoleName(value) {
73
+ return value === REVIEWER_ROLE_DEFINITION.name;
74
74
  }
75
75
  export function isToolRoleName(value) {
76
76
  return TOOL_ROLE_NAMES.includes(value);
@@ -3,6 +3,6 @@ export const VCM_MEMORY_ROLE_NAMES = [
3
3
  "architect",
4
4
  "coder",
5
5
  "tester",
6
- "gate-reviewer",
6
+ "reviewer",
7
7
  "harness-engineer"
8
8
  ];
@@ -39,6 +39,11 @@ const REQUIRED_HEADINGS = {
39
39
  "Evidence Reviewed",
40
40
  "Tests Added Or Updated",
41
41
  "Coverage Mapping",
42
+ "L3 Coverage",
43
+ "Trigger Assessment",
44
+ "Affected End-To-End Flows",
45
+ "L3 Commands And Evidence",
46
+ "Not-Required Evidence",
42
47
  "Commands Run Or Checked",
43
48
  "Validation Results",
44
49
  "Failed Expectations",
@@ -139,6 +144,28 @@ function validateArtifactFields(kind, content) {
139
144
  const invalidFields = result === "pass" || result === "fail"
140
145
  ? []
141
146
  : ["Test Result must be pass or fail."];
147
+ const l3Required = /^\s*L3 Required\s*:\s*(\S+)\s*$/im.exec(content)?.[1]?.toLowerCase();
148
+ if (l3Required !== "yes" && l3Required !== "no") {
149
+ invalidFields.push("L3 Required must be yes or no.");
150
+ }
151
+ const l3TriggerAssessment = readArtifactSectionValue(content, "Trigger Assessment");
152
+ const l3AffectedFlows = readArtifactSectionContent(content, "Affected End-To-End Flows");
153
+ const l3Commands = readArtifactSectionValue(content, "L3 Commands And Evidence");
154
+ const l3NotRequiredEvidence = readArtifactSectionValue(content, "Not-Required Evidence");
155
+ if (l3Required === "yes") {
156
+ if (!hasSubstantiveSectionValue(l3TriggerAssessment)) {
157
+ invalidFields.push("Trigger Assessment is required when L3 Required is yes.");
158
+ }
159
+ if (!hasCompleteL3FlowMapping(l3AffectedFlows)) {
160
+ invalidFields.push("Affected End-To-End Flows are required when L3 Required is yes.");
161
+ }
162
+ if (!hasSubstantiveSectionValue(l3Commands)) {
163
+ invalidFields.push("L3 Commands And Evidence are required when L3 Required is yes.");
164
+ }
165
+ }
166
+ if (l3Required === "no" && !hasSubstantiveSectionValue(l3NotRequiredEvidence)) {
167
+ invalidFields.push("Not-Required Evidence is required when L3 Required is no.");
168
+ }
142
169
  const coverageGaps = readArtifactSectionValue(content, "Coverage Gaps");
143
170
  const blockingIssues = readArtifactSectionValue(content, "Blocking Validation Issues");
144
171
  const userApproval = readArtifactSectionValue(content, "User Approval Evidence");
@@ -187,6 +214,25 @@ function validateArtifactFields(kind, content) {
187
214
  }
188
215
  return [];
189
216
  }
217
+ function hasSubstantiveSectionValue(value) {
218
+ return Boolean(value && !/^(none|tbd)\.?$/i.test(value.trim()));
219
+ }
220
+ function hasCompleteL3FlowMapping(value) {
221
+ if (!value) {
222
+ return false;
223
+ }
224
+ const allowedActions = new Set(["run-existing", "updated", "added"]);
225
+ return value
226
+ .split(/\r?\n/)
227
+ .map((line) => line.trim())
228
+ .filter((line) => line.startsWith("|") && line.endsWith("|"))
229
+ .some((line) => {
230
+ const cells = line.slice(1, -1).split("|").map((cell) => cell.trim());
231
+ return cells.length === 8
232
+ && allowedActions.has(cells[6]?.toLowerCase() ?? "")
233
+ && cells.every((cell) => Boolean(cell) && !/^(none|tbd)\.?$/i.test(cell));
234
+ });
235
+ }
190
236
  function validateDecision(content, allowed) {
191
237
  const decision = readArtifactSectionValue(content, "Decision")?.toLowerCase();
192
238
  return decision && allowed.includes(decision)
@@ -194,6 +240,12 @@ function validateDecision(content, allowed) {
194
240
  : [`Decision must be one of: ${allowed.join(", ")}.`];
195
241
  }
196
242
  export function readArtifactSectionValue(content, heading) {
243
+ return readArtifactSectionContent(content, heading)
244
+ ?.split(/\r?\n/)
245
+ .map((line) => line.trim())
246
+ .find(Boolean);
247
+ }
248
+ function readArtifactSectionContent(content, heading) {
197
249
  const match = new RegExp(`^#{1,6}\\s+${escapeRegExp(heading)}\\s*$`, "im").exec(content);
198
250
  if (!match || match.index === undefined) {
199
251
  return undefined;
@@ -203,7 +255,7 @@ export function readArtifactSectionValue(content, heading) {
203
255
  const section = nextHeading?.index === undefined
204
256
  ? afterHeading
205
257
  : afterHeading.slice(0, nextHeading.index);
206
- return section.split(/\r?\n/).map((line) => line.trim()).find(Boolean);
258
+ return section.trim();
207
259
  }
208
260
  function hasHeading(content, heading) {
209
261
  const pattern = new RegExp(`^#{1,6}\\s+${escapeRegExp(heading)}\\s*$`, "im");