@ryuenn3123/agentic-senior-core 3.0.19 → 3.0.21

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.
Files changed (77) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +96 -103
  2. package/.agent-context/prompts/init-project.md +32 -100
  3. package/.agent-context/prompts/refactor.md +22 -44
  4. package/.agent-context/prompts/review-code.md +28 -52
  5. package/.agent-context/review-checklists/architecture-review.md +31 -62
  6. package/.agent-context/review-checklists/pr-checklist.md +74 -108
  7. package/.agent-context/rules/api-docs.md +18 -206
  8. package/.agent-context/rules/architecture.md +40 -207
  9. package/.agent-context/rules/database-design.md +10 -199
  10. package/.agent-context/rules/docker-runtime.md +5 -5
  11. package/.agent-context/rules/efficiency-vs-hype.md +11 -149
  12. package/.agent-context/rules/error-handling.md +9 -231
  13. package/.agent-context/rules/event-driven.md +17 -221
  14. package/.agent-context/rules/frontend-architecture.md +74 -119
  15. package/.agent-context/rules/git-workflow.md +1 -1
  16. package/.agent-context/rules/microservices.md +28 -161
  17. package/.agent-context/rules/naming-conv.md +8 -138
  18. package/.agent-context/rules/performance.md +9 -175
  19. package/.agent-context/rules/realtime.md +11 -44
  20. package/.agent-context/rules/security.md +11 -295
  21. package/.agent-context/rules/testing.md +9 -174
  22. package/.agent-context/state/benchmark-analysis.json +3 -3
  23. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  24. package/.agent-context/state/onboarding-report.json +71 -11
  25. package/.agents/workflows/init-project.md +7 -24
  26. package/.agents/workflows/refactor.md +7 -24
  27. package/.agents/workflows/review-code.md +7 -24
  28. package/.cursorrules +22 -21
  29. package/.gemini/instructions.md +2 -2
  30. package/.github/copilot-instructions.md +2 -2
  31. package/.instructions.md +112 -213
  32. package/.windsurfrules +22 -21
  33. package/AGENTS.md +4 -4
  34. package/CONTRIBUTING.md +13 -22
  35. package/README.md +6 -20
  36. package/lib/cli/commands/init.mjs +102 -148
  37. package/lib/cli/commands/launch.mjs +3 -3
  38. package/lib/cli/commands/optimize.mjs +14 -4
  39. package/lib/cli/commands/upgrade.mjs +25 -23
  40. package/lib/cli/compiler.mjs +96 -62
  41. package/lib/cli/constants.mjs +28 -136
  42. package/lib/cli/detector/design-evidence.mjs +189 -6
  43. package/lib/cli/detector.mjs +6 -7
  44. package/lib/cli/init-detection-flow.mjs +10 -93
  45. package/lib/cli/init-selection.mjs +2 -68
  46. package/lib/cli/project-scaffolder/constants.mjs +1 -1
  47. package/lib/cli/project-scaffolder/design-contract.mjs +183 -108
  48. package/lib/cli/project-scaffolder/discovery.mjs +36 -82
  49. package/lib/cli/project-scaffolder/prompt-builders.mjs +45 -55
  50. package/lib/cli/project-scaffolder/storage.mjs +0 -2
  51. package/lib/cli/token-optimization.mjs +1 -1
  52. package/lib/cli/utils.mjs +75 -9
  53. package/package.json +2 -2
  54. package/scripts/detection-benchmark.mjs +4 -15
  55. package/scripts/documentation-boundary-audit.mjs +9 -9
  56. package/scripts/explain-on-demand-audit.mjs +11 -11
  57. package/scripts/forbidden-content-check.mjs +9 -9
  58. package/scripts/frontend-usability-audit.mjs +45 -35
  59. package/scripts/llm-judge.mjs +1 -1
  60. package/scripts/mcp-server/constants.mjs +2 -2
  61. package/scripts/mcp-server/tool-registry.mjs +1 -1
  62. package/scripts/release-gate/audit-checks.mjs +22 -7
  63. package/scripts/release-gate/static-checks.mjs +5 -5
  64. package/scripts/release-gate.mjs +1 -1
  65. package/scripts/rules-guardian-audit.mjs +14 -13
  66. package/scripts/single-source-lazy-loading-audit.mjs +3 -3
  67. package/scripts/sync-thin-adapters.mjs +5 -5
  68. package/scripts/ui-design-judge/design-execution-summary.mjs +27 -1
  69. package/scripts/ui-design-judge/prompting.mjs +5 -5
  70. package/scripts/ui-design-judge/reporting.mjs +3 -1
  71. package/scripts/ui-design-judge/rubric-calibration.mjs +8 -5
  72. package/scripts/ui-design-judge/rubric-goldset.json +2 -2
  73. package/scripts/ui-design-judge.mjs +75 -7
  74. package/scripts/validate/config.mjs +138 -48
  75. package/scripts/validate/coverage-checks.mjs +32 -7
  76. package/scripts/validate.mjs +8 -4
  77. package/lib/cli/architect.mjs +0 -431
@@ -84,18 +84,18 @@ export const REQUIRED_DEVELOPER_FIRST_MENTION_PATTERNS = [
84
84
  },
85
85
  {
86
86
  path: '.agent-context/prompts/init-project.md',
87
- label: 'Init prompt first mention includes Federated Governance baseline',
88
- pattern: /rules operations context\s*\(Federated Governance baseline\)/iu,
87
+ label: 'Init prompt first mention includes strict AI coding guidance context',
88
+ pattern: /strict AI coding guidance context/iu,
89
89
  },
90
90
  {
91
91
  path: 'lib/cli/commands/init.mjs',
92
- label: 'Init command wording includes Federated Governance baseline',
93
- pattern: /rules operations\s+(assets|pack)[^\n]*\(Federated Governance baseline\)/iu,
92
+ label: 'Init command wording includes project guidance pack',
93
+ pattern: /copy the project guidance pack[^\n]*compile a single rulebook/iu,
94
94
  },
95
95
  {
96
96
  path: 'lib/cli/commands/upgrade.mjs',
97
- label: 'Upgrade command wording includes Federated Governance baseline',
98
- pattern: /rules operations upgrade assistant\s*\(Federated Governance baseline\)/iu,
97
+ label: 'Upgrade command wording includes managed guidance upgrade',
98
+ pattern: /running managed guidance upgrade for an existing repository\./iu,
99
99
  },
100
100
  {
101
101
  path: 'lib/cli/utils.mjs',
@@ -121,10 +121,9 @@ export const REQUIRED_COMPLIANCE_CANONICAL_SNIPPETS = [
121
121
  ];
122
122
  export const REQUIRED_DETECTION_TRANSPARENCY_SNIPPETS = [
123
123
  {
124
- path: 'lib/cli/commands/init.mjs',
124
+ path: 'lib/cli/init-detection-flow.mjs',
125
125
  snippets: [
126
- 'Existing project detection transparency:',
127
- 'Use detected setup for this existing project?',
126
+ 'existing-project-evidence-only',
128
127
  'detectionTransparency',
129
128
  ],
130
129
  },
@@ -144,20 +143,38 @@ export const REQUIRED_DETECTION_TRANSPARENCY_SNIPPETS = [
144
143
  ],
145
144
  },
146
145
  ];
147
- export const REQUIRED_STACK_RESEARCH_ENGINE_SNIPPETS = [
146
+ export const REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS = [
147
+ {
148
+ path: '.instructions.md',
149
+ snippets: [
150
+ 'Do not silently choose frameworks or architecture from offline heuristics.',
151
+ 'produce a short recommendation from evidence and live official documentation before coding',
152
+ ],
153
+ },
154
+ {
155
+ path: '.agent-context/prompts/init-project.md',
156
+ snippets: [
157
+ 'If the user already named a stack or framework, treat it as an explicit constraint.',
158
+ 'produce a short evidence-backed recommendation from the brief, repo evidence, and live official documentation before coding',
159
+ ],
160
+ },
148
161
  {
149
- path: 'lib/cli/architect.mjs',
162
+ path: '.agent-context/rules/architecture.md',
150
163
  snippets: [
151
- 'STACK_SIGNAL_WEIGHTS',
152
- 'briefType',
153
- 'recommendArchitecture',
154
- 'formatArchitectureRecommendation',
164
+ 'Do not force a default architecture label before the repo, delivery model, and boundary evidence are clear.',
165
+ ],
166
+ },
167
+ {
168
+ path: '.agent-context/rules/microservices.md',
169
+ snippets: [
170
+ 'Do not start with microservices by fashion, fear, or habit.',
155
171
  ],
156
172
  },
157
173
  {
158
174
  path: 'lib/cli/commands/init.mjs',
159
175
  snippets: [
160
- 'recommendArchitecture',
176
+ 'AGENT_DECISION_STACK_FILE_NAME',
177
+ 'agent recommendation required from current repo/brief evidence',
161
178
  ],
162
179
  },
163
180
  ];
@@ -254,12 +271,13 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
254
271
  {
255
272
  path: '.instructions.md',
256
273
  snippets: [
274
+ 'Resolve the smallest relevant layer set for the current request.',
257
275
  'UI Design Mode',
258
276
  'bootstrap-design.md',
259
277
  'frontend-architecture.md',
260
278
  'do not eagerly load unrelated backend-only rules',
261
279
  'valid style context',
262
- 'explicitly approved reference systems',
280
+ 'External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted',
263
281
  'WCAG 2.2 AA as the hard compliance floor',
264
282
  'APCA as advisory perceptual tuning only',
265
283
  ],
@@ -267,39 +285,30 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
267
285
  {
268
286
  path: '.agent-context/prompts/bootstrap-design.md',
269
287
  snippets: [
270
- 'UI Design Mode is context-isolated by default:',
288
+ 'This contract is a decision scaffold, not a style preset.',
289
+ 'We guide the agent; we do not pick the final style',
271
290
  'Token Architecture and Alias Strategy',
272
- '`tokenSystem`',
273
291
  '`repoEvidence.designEvidenceSummary`',
274
- 'Responsive Strategy and Cross-Viewport Adaptation Matrix',
275
- '`colorTruth.format`',
276
- '`crossViewportAdaptation.mutationRules.mobile/tablet/desktop`',
277
- '`motionSystem`',
278
- '`componentMorphology`',
279
- '`accessibilityPolicy`',
280
- '`designExecutionPolicy`',
281
- '`designExecutionHandoff`',
282
- '`reviewRubric`',
283
- '`contextHygiene`',
284
- 'Do not reuse a color palette, component skin, or motion signature from prior chats, memories, or unrelated projects',
285
- 'If no approved reference system exists, synthesize the design from zero using current product context, constraints, and content only.',
286
- 'Design continuity is opt-in.',
287
- 'WCAG 2.2 AA as the blocking baseline',
288
- 'APCA only as advisory perceptual tuning',
289
- 'Structured design execution must stay representation-first',
290
- 'structured handoff',
291
- 'surface plan',
292
- 'component graph',
293
- 'stable review rubric',
294
- 'Genericity findings must name the actual drift signal',
292
+ 'Responsive Recomposition Plan',
293
+ 'source of truth',
294
+ 'research current official docs',
295
+ 'Responsive design means recomposition, not resizing.',
296
+ 'agent-chosen visual direction',
297
+ 'viewport mutation rules',
298
+ 'WCAG 2.2 AA is the hard floor',
299
+ 'APCA may be used only as advisory perceptual tuning',
300
+ 'unresearched dependency choices',
301
+ 'default component-kit styling without product rationale',
302
+ 'genericity findings that cannot name the exact drift signal',
295
303
  ],
296
304
  },
297
305
  {
298
306
  path: 'scripts/ui-design-judge.mjs',
299
307
  snippets: [
300
- 'Advisory-first UI design contract judge.',
308
+ 'Advisory-default UI design contract judge.',
301
309
  'Repo-internal workflow audit; no user-facing runtime modes.',
302
- 'Runs only in advisory mode for this repository workflow.',
310
+ 'genericityAutoFail',
311
+ 'blocking required actions',
303
312
  'Do not reward generic SaaS defaults or popular template patterns.',
304
313
  'UI design judge only evaluates changed UI surfaces.',
305
314
  'Structured design execution summary was supplied to semantic review.',
@@ -309,7 +318,9 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
309
318
  'reviewRubric',
310
319
  'genericityStatus',
311
320
  'handoffReady',
321
+ 'structuredInspectionAvailable',
312
322
  'calibratedStatus',
323
+ 'applyGenericityAutoFail',
313
324
  ],
314
325
  },
315
326
  {
@@ -317,6 +328,7 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
317
328
  snippets: [
318
329
  'ui-rubric-calibration-v1',
319
330
  'matchedGenericitySignals',
331
+ 'matchedForbiddenPatterns',
320
332
  'matchedValidBoldSignals',
321
333
  'contractDriftDetected',
322
334
  'Genericity claim was not backed by any named drift signal.',
@@ -346,6 +358,8 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
346
358
  'accessibilityPolicy',
347
359
  'designExecutionPolicy',
348
360
  'seedRefinementRequiredBeforeUiImplementation',
361
+ 'requirePerSurfaceMutationOps',
362
+ 'forbidUniformSiblingSurfaceTreatment',
349
363
  'requireStructuredHandoff',
350
364
  'handoffFormatVersion',
351
365
  'designExecutionHandoff',
@@ -368,16 +382,21 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
368
382
  'signatureMoveRationale',
369
383
  'implementationGuardrails',
370
384
  'reviewRubric',
385
+ 'genericityAutoFail',
371
386
  'genericitySignals',
372
387
  'validBoldSignals',
373
388
  'mustExplainGenericity',
374
389
  'mustSeparateTasteFromFailure',
390
+ 'offline-prescribed-style-used-as-final-direction',
391
+ 'unresearched-library-or-framework-choice',
392
+ 'single-safe-typographic-family-without-role-contrast-or-rationale',
375
393
  'hardComplianceFloor',
376
394
  'advisoryContrastModel',
377
395
  'contextHygiene',
378
396
  'repoEvidenceOverridesMemory',
379
397
  'requireExplicitContinuityApproval',
380
398
  'forbidCarryoverWhenUnapproved',
399
+ 'approvedExternalConstraintUsage',
381
400
  'requireViewportMutationRules',
382
401
  'allowHexDerivatives',
383
402
  ],
@@ -398,15 +417,21 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
398
417
  'arbitraryBreakpointCount',
399
418
  'cssVariables',
400
419
  'componentInventory',
420
+ 'structuredInspection',
421
+ 'classAttributeCount',
422
+ 'inlineStyleObjectCount',
401
423
  'tokenBypassSignals',
402
424
  ],
403
425
  },
404
426
  {
405
427
  path: 'lib/cli/compiler.mjs',
406
428
  snippets: [
429
+ 'Resolve the smallest relevant layer set before responding.',
430
+ 'LAYER 1: RULES (SCOPE-RESOLVED)',
407
431
  'LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS',
408
432
  'bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign',
409
433
  'Keep UI-only requests context-isolated',
434
+ 'git-workflow.md',
410
435
  'designEvidenceSummary',
411
436
  ],
412
437
  },
@@ -426,9 +451,9 @@ export const REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS = [
426
451
  'Docker Compose Quickstart',
427
452
  'Compose file reference',
428
453
  'Dockerfile best practices',
429
- 'Prefer current `docker compose` workflows and `compose.yaml`.',
454
+ 'Use current `docker compose` workflows and `compose.yaml`.',
430
455
  'Do not add the top-level Compose `version` field by default.',
431
- 'Prefer the latest stable compatible Docker base image',
456
+ 'Use the latest stable compatible Docker base image',
432
457
  ],
433
458
  },
434
459
  {
@@ -443,7 +468,7 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
443
468
  {
444
469
  path: '.instructions.md',
445
470
  snippets: [
446
- 'prefer the latest stable compatible dependency set and official setup flow',
471
+ 'use the latest stable compatible dependency set and official setup flow',
447
472
  ],
448
473
  },
449
474
  {
@@ -458,8 +483,8 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
458
483
  {
459
484
  path: '.agent-context/prompts/init-project.md',
460
485
  snippets: [
461
- 'latest stable compatible dependency set and official framework setup flow first',
462
- 'Prefer official framework setup commands or canonical starter flows',
486
+ 'recommend the latest stable compatible dependency set and official framework setup flow from live official documentation before coding',
487
+ 'Use official framework setup commands or canonical starter flows',
463
488
  ],
464
489
  },
465
490
  ];
@@ -471,13 +496,78 @@ export const FORBIDDEN_TEMPLATE_BOOTSTRAP_SNIPPETS = [
471
496
  ],
472
497
  },
473
498
  ];
499
+ export const FORBIDDEN_ACTIVE_BIAS_ANCHOR_SNIPPETS = [
500
+ {
501
+ path: '.instructions.md',
502
+ snippets: [
503
+ 'illustrative, not exhaustive',
504
+ 'explicitly approved reference systems',
505
+ 'Do not auto-recommend frameworks',
506
+ 'prefer the latest stable compatible dependency set',
507
+ ],
508
+ },
509
+ {
510
+ path: '.agent-context/prompts/bootstrap-design.md',
511
+ snippets: [
512
+ 'stylistic inspiration',
513
+ 'famous brand reference',
514
+ 'If no approved reference system exists',
515
+ 'explicitly approved reference systems',
516
+ ],
517
+ },
518
+ {
519
+ path: '.agent-context/prompts/init-project.md',
520
+ snippets: [
521
+ 'Compact User Prompt Patterns',
522
+ 'latest stable compatible dependency set and official framework setup flow first',
523
+ 'Prefer official framework setup commands',
524
+ 'ask for confirmation instead of silently choosing a stack',
525
+ ],
526
+ },
527
+ {
528
+ path: 'lib/cli/project-scaffolder/design-contract.mjs',
529
+ snippets: [
530
+ 'explicitly-approved-reference-systems',
531
+ 'approvedReferenceUsage',
532
+ ],
533
+ },
534
+ {
535
+ path: 'lib/cli/constants.mjs',
536
+ snippets: [
537
+ 'BLUEPRINT_RECOMMENDATIONS',
538
+ `java-${'enter'}${'prise'}-api`,
539
+ `dotnet-${'enter'}${'prise'}-api`,
540
+ ],
541
+ },
542
+ {
543
+ path: 'lib/cli/init-detection-flow.mjs',
544
+ snippets: [
545
+ `Using detected ${'stack'} automatically`,
546
+ `Use detected ${'setup'} for this existing project?`,
547
+ 'Override detected stack',
548
+ ],
549
+ },
550
+ {
551
+ path: 'scripts/ui-design-judge/prompting.mjs',
552
+ snippets: [
553
+ '"recommendation": string',
554
+ ],
555
+ },
556
+ {
557
+ path: 'scripts/documentation-boundary-audit.mjs',
558
+ snippets: [
559
+ 'suggestedActions',
560
+ 'suggestedDocumentationUpdates',
561
+ ],
562
+ },
563
+ ];
474
564
  export const REQUIRED_DETERMINISTIC_BOUNDARY_ENFORCEMENT_SNIPPETS = [
475
565
  {
476
566
  path: 'scripts/documentation-boundary-audit.mjs',
477
567
  snippets: [
478
568
  'reportVersion',
479
569
  'violations',
480
- 'suggestedActions',
570
+ 'requiredActions',
481
571
  'diagnosticCode',
482
572
  'autoDocsSyncScope',
483
573
  'rolloutMetrics',
@@ -3,6 +3,7 @@ import { join, relative } from 'node:path';
3
3
  import {
4
4
  COMPLIANCE_ALIAS_TERMS,
5
5
  COMPLIANCE_TERMINOLOGY_BOUNDARY_PATHS,
6
+ FORBIDDEN_ACTIVE_BIAS_ANCHOR_SNIPPETS,
6
7
  FORMAL_ARTIFACT_PATHS,
7
8
  FORBIDDEN_TEMPLATE_BOOTSTRAP_SNIPPETS,
8
9
  REQUIRED_COMPLIANCE_CANONICAL_SNIPPETS,
@@ -12,7 +13,7 @@ import {
12
13
  REQUIRED_DEVELOPER_FIRST_MENTION_PATTERNS,
13
14
  REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS,
14
15
  REQUIRED_HUMAN_WRITING_SNIPPETS,
15
- REQUIRED_STACK_RESEARCH_ENGINE_SNIPPETS,
16
+ REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS,
16
17
  REQUIRED_TEMPLATE_FREE_BOOTSTRAP_SNIPPETS,
17
18
  REQUIRED_TERMINOLOGY_ROW_PATTERNS,
18
19
  REQUIRED_TERMINOLOGY_RULE_SNIPPET,
@@ -86,7 +87,7 @@ export async function validateTerminologyMapping(context) {
86
87
  fail(`${TERMINOLOGY_REFERENCE_DOCUMENT_PATH} must define first-mention canonical term rule`);
87
88
  }
88
89
 
89
- if (terminologyReferenceContent.includes('Compliance and audit artifacts must keep canonical enterprise terminology')) {
90
+ if (terminologyReferenceContent.includes('Formal policy and audit artifacts must keep canonical terminology')) {
90
91
  pass(`${TERMINOLOGY_REFERENCE_DOCUMENT_PATH} defines compliance terminology boundary`);
91
92
  } else {
92
93
  fail(`${TERMINOLOGY_REFERENCE_DOCUMENT_PATH} must define compliance terminology boundary`);
@@ -191,12 +192,12 @@ export async function validateDetectionTransparencyCoverage(context) {
191
192
  });
192
193
  }
193
194
 
194
- export async function validateStackResearchEngineCoverage(context) {
195
+ export async function validateStackDecisionBoundaryCoverage(context) {
195
196
  await validateSnippetCoverage({
196
- heading: 'Checking stack research engine coverage...',
197
- coverageRules: REQUIRED_STACK_RESEARCH_ENGINE_SNIPPETS,
198
- missingLabel: 'stack research source',
199
- snippetLabel: 'stack research snippet',
197
+ heading: 'Checking stack decision boundary coverage...',
198
+ coverageRules: REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS,
199
+ missingLabel: 'stack decision boundary source',
200
+ snippetLabel: 'stack decision boundary snippet',
200
201
  context,
201
202
  });
202
203
  }
@@ -303,6 +304,30 @@ export async function validateDeterministicBoundaryEnforcementCoverage(context)
303
304
  });
304
305
  }
305
306
 
307
+ export async function validateRulesOnlyActiveSurfaceCoverage(context) {
308
+ const { ROOT_DIR, fileExists, readTextFile, pass, fail } = context;
309
+
310
+ console.log('\nChecking rules-only active surface cleanup...');
311
+
312
+ for (const forbiddenRule of FORBIDDEN_ACTIVE_BIAS_ANCHOR_SNIPPETS) {
313
+ const absoluteForbiddenPath = join(ROOT_DIR, forbiddenRule.path);
314
+
315
+ if (!(await fileExists(absoluteForbiddenPath))) {
316
+ fail(`Missing rules-only active surface source: ${forbiddenRule.path}`);
317
+ continue;
318
+ }
319
+
320
+ const forbiddenContent = await readTextFile(absoluteForbiddenPath);
321
+ for (const forbiddenSnippet of forbiddenRule.snippets) {
322
+ if (forbiddenContent.includes(forbiddenSnippet)) {
323
+ fail(`${forbiddenRule.path} must not include active bias-anchor snippet: ${forbiddenSnippet}`);
324
+ } else {
325
+ pass(`${forbiddenRule.path} excludes active bias-anchor snippet: ${forbiddenSnippet}`);
326
+ }
327
+ }
328
+ }
329
+ }
330
+
306
331
  export async function validateHumanWritingGovernance(context) {
307
332
  const { ROOT_DIR, fileExists, readTextFile, pass, fail } = context;
308
333
 
@@ -19,7 +19,6 @@ import { fileURLToPath } from 'node:url';
19
19
  import {
20
20
  ALLOWED_SEVERITIES,
21
21
  OVERRIDE_WARNING_WINDOW_DAYS,
22
- REQUIRED_STACK_RESEARCH_ENGINE_SNIPPETS,
23
22
  } from './validate/config.mjs';
24
23
  import {
25
24
  validateDependencyFreshnessAutomationCoverage,
@@ -28,8 +27,9 @@ import {
28
27
  validateDockerRuntimeAutomationCoverage,
29
28
  validateHumanWritingGovernance,
30
29
  validateInstructionAdapters,
30
+ validateRulesOnlyActiveSurfaceCoverage,
31
31
  validateSkillPurgeSurface,
32
- validateStackResearchEngineCoverage,
32
+ validateStackDecisionBoundaryCoverage,
33
33
  validateTemplateFreeBootstrapCoverage,
34
34
  validateTerminologyMapping,
35
35
  validateUiDesignAutomationCoverage,
@@ -137,6 +137,9 @@ async function validateRequiredFiles() {
137
137
  'scripts/docs-quality-drift-report.mjs',
138
138
  'scripts/governance-weekly-report.mjs',
139
139
  'scripts/mcp-server.mjs',
140
+ 'scripts/mcp-server/constants.mjs',
141
+ 'scripts/mcp-server/tool-registry.mjs',
142
+ 'scripts/mcp-server/tools.mjs',
140
143
  'scripts/frontend-usability-audit.mjs',
141
144
  'scripts/ui-design-judge.mjs',
142
145
  'scripts/documentation-boundary-audit.mjs',
@@ -180,7 +183,7 @@ async function validateRequiredFiles() {
180
183
  'tests/cli-smoke.test.mjs',
181
184
  'tests/mcp-server.test.mjs',
182
185
  'tests/llm-judge.test.mjs',
183
- 'tests/enterprise-ops.test.mjs',
186
+ 'tests/operations.test.mjs',
184
187
  'LICENSE',
185
188
  '.gitignore',
186
189
  ];
@@ -700,7 +703,7 @@ async function main() {
700
703
  await validateDocumentationFlow();
701
704
  await validateTerminologyMapping(coverageValidationContext);
702
705
  await validateDetectionTransparencyCoverage(coverageValidationContext);
703
- await validateStackResearchEngineCoverage(coverageValidationContext);
706
+ await validateStackDecisionBoundaryCoverage(coverageValidationContext);
704
707
  await validateUniversalSopConsolidationCoverage(coverageValidationContext);
705
708
  await validateTemplateFreeBootstrapCoverage(coverageValidationContext);
706
709
  await validateUpgradeUiContractWarningCoverage(coverageValidationContext);
@@ -708,6 +711,7 @@ async function main() {
708
711
  await validateDockerRuntimeAutomationCoverage(coverageValidationContext);
709
712
  await validateDependencyFreshnessAutomationCoverage(coverageValidationContext);
710
713
  await validateDeterministicBoundaryEnforcementCoverage(coverageValidationContext);
714
+ await validateRulesOnlyActiveSurfaceCoverage(coverageValidationContext);
711
715
  await validateStackResearchSnapshotState();
712
716
  await validateMcpConfiguration();
713
717
  await validateHumanWritingGovernance(coverageValidationContext);