@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.
- package/.agent-context/prompts/bootstrap-design.md +96 -103
- package/.agent-context/prompts/init-project.md +32 -100
- package/.agent-context/prompts/refactor.md +22 -44
- package/.agent-context/prompts/review-code.md +28 -52
- package/.agent-context/review-checklists/architecture-review.md +31 -62
- package/.agent-context/review-checklists/pr-checklist.md +74 -108
- package/.agent-context/rules/api-docs.md +18 -206
- package/.agent-context/rules/architecture.md +40 -207
- package/.agent-context/rules/database-design.md +10 -199
- package/.agent-context/rules/docker-runtime.md +5 -5
- package/.agent-context/rules/efficiency-vs-hype.md +11 -149
- package/.agent-context/rules/error-handling.md +9 -231
- package/.agent-context/rules/event-driven.md +17 -221
- package/.agent-context/rules/frontend-architecture.md +74 -119
- package/.agent-context/rules/git-workflow.md +1 -1
- package/.agent-context/rules/microservices.md +28 -161
- package/.agent-context/rules/naming-conv.md +8 -138
- package/.agent-context/rules/performance.md +9 -175
- package/.agent-context/rules/realtime.md +11 -44
- package/.agent-context/rules/security.md +11 -295
- package/.agent-context/rules/testing.md +9 -174
- package/.agent-context/state/benchmark-analysis.json +3 -3
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.agent-context/state/onboarding-report.json +71 -11
- package/.agents/workflows/init-project.md +7 -24
- package/.agents/workflows/refactor.md +7 -24
- package/.agents/workflows/review-code.md +7 -24
- package/.cursorrules +22 -21
- package/.gemini/instructions.md +2 -2
- package/.github/copilot-instructions.md +2 -2
- package/.instructions.md +112 -213
- package/.windsurfrules +22 -21
- package/AGENTS.md +4 -4
- package/CONTRIBUTING.md +13 -22
- package/README.md +6 -20
- package/lib/cli/commands/init.mjs +102 -148
- package/lib/cli/commands/launch.mjs +3 -3
- package/lib/cli/commands/optimize.mjs +14 -4
- package/lib/cli/commands/upgrade.mjs +25 -23
- package/lib/cli/compiler.mjs +96 -62
- package/lib/cli/constants.mjs +28 -136
- package/lib/cli/detector/design-evidence.mjs +189 -6
- package/lib/cli/detector.mjs +6 -7
- package/lib/cli/init-detection-flow.mjs +10 -93
- package/lib/cli/init-selection.mjs +2 -68
- package/lib/cli/project-scaffolder/constants.mjs +1 -1
- package/lib/cli/project-scaffolder/design-contract.mjs +183 -108
- package/lib/cli/project-scaffolder/discovery.mjs +36 -82
- package/lib/cli/project-scaffolder/prompt-builders.mjs +45 -55
- package/lib/cli/project-scaffolder/storage.mjs +0 -2
- package/lib/cli/token-optimization.mjs +1 -1
- package/lib/cli/utils.mjs +75 -9
- package/package.json +2 -2
- package/scripts/detection-benchmark.mjs +4 -15
- package/scripts/documentation-boundary-audit.mjs +9 -9
- package/scripts/explain-on-demand-audit.mjs +11 -11
- package/scripts/forbidden-content-check.mjs +9 -9
- package/scripts/frontend-usability-audit.mjs +45 -35
- package/scripts/llm-judge.mjs +1 -1
- package/scripts/mcp-server/constants.mjs +2 -2
- package/scripts/mcp-server/tool-registry.mjs +1 -1
- package/scripts/release-gate/audit-checks.mjs +22 -7
- package/scripts/release-gate/static-checks.mjs +5 -5
- package/scripts/release-gate.mjs +1 -1
- package/scripts/rules-guardian-audit.mjs +14 -13
- package/scripts/single-source-lazy-loading-audit.mjs +3 -3
- package/scripts/sync-thin-adapters.mjs +5 -5
- package/scripts/ui-design-judge/design-execution-summary.mjs +27 -1
- package/scripts/ui-design-judge/prompting.mjs +5 -5
- package/scripts/ui-design-judge/reporting.mjs +3 -1
- package/scripts/ui-design-judge/rubric-calibration.mjs +8 -5
- package/scripts/ui-design-judge/rubric-goldset.json +2 -2
- package/scripts/ui-design-judge.mjs +75 -7
- package/scripts/validate/config.mjs +138 -48
- package/scripts/validate/coverage-checks.mjs +32 -7
- package/scripts/validate.mjs +8 -4
- 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
|
|
88
|
-
pattern: /
|
|
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
|
|
93
|
-
pattern: /
|
|
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
|
|
98
|
-
pattern: /
|
|
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/
|
|
124
|
+
path: 'lib/cli/init-detection-flow.mjs',
|
|
125
125
|
snippets: [
|
|
126
|
-
'
|
|
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
|
|
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: '
|
|
162
|
+
path: '.agent-context/rules/architecture.md',
|
|
150
163
|
snippets: [
|
|
151
|
-
'
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
'
|
|
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
|
-
'
|
|
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
|
-
'
|
|
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
|
|
275
|
-
'
|
|
276
|
-
'
|
|
277
|
-
'
|
|
278
|
-
'
|
|
279
|
-
'
|
|
280
|
-
'
|
|
281
|
-
'
|
|
282
|
-
'
|
|
283
|
-
'
|
|
284
|
-
'
|
|
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-
|
|
308
|
+
'Advisory-default UI design contract judge.',
|
|
301
309
|
'Repo-internal workflow audit; no user-facing runtime modes.',
|
|
302
|
-
'
|
|
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
|
-
'
|
|
454
|
+
'Use current `docker compose` workflows and `compose.yaml`.',
|
|
430
455
|
'Do not add the top-level Compose `version` field by default.',
|
|
431
|
-
'
|
|
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
|
-
'
|
|
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
|
|
462
|
-
'
|
|
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
|
-
'
|
|
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
|
-
|
|
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('
|
|
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
|
|
195
|
+
export async function validateStackDecisionBoundaryCoverage(context) {
|
|
195
196
|
await validateSnippetCoverage({
|
|
196
|
-
heading: 'Checking stack
|
|
197
|
-
coverageRules:
|
|
198
|
-
missingLabel: 'stack
|
|
199
|
-
snippetLabel: 'stack
|
|
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
|
|
package/scripts/validate.mjs
CHANGED
|
@@ -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
|
-
|
|
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/
|
|
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
|
|
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);
|