@ryuenn3123/agentic-senior-core 3.0.17 → 3.0.20
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 +84 -94
- 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 +66 -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 +438 -335
- package/lib/cli/project-scaffolder/discovery.mjs +36 -82
- package/lib/cli/project-scaffolder/prompt-builders.mjs +55 -63
- package/lib/cli/project-scaffolder/storage.mjs +0 -4
- 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 +57 -36
- package/scripts/llm-judge.mjs +1 -1
- package/scripts/mcp-server/constants.mjs +60 -0
- package/scripts/mcp-server/tool-registry.mjs +149 -0
- package/scripts/mcp-server/tools.mjs +446 -0
- package/scripts/mcp-server.mjs +23 -661
- package/scripts/release-gate/audit-checks.mjs +426 -0
- package/scripts/release-gate/constants.mjs +53 -0
- package/scripts/release-gate/runtime.mjs +63 -0
- package/scripts/release-gate/static-checks.mjs +182 -0
- package/scripts/release-gate.mjs +13 -794
- 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/constants.mjs +24 -0
- package/scripts/ui-design-judge/design-execution-summary.mjs +259 -0
- package/scripts/ui-design-judge/git-input.mjs +131 -0
- package/scripts/ui-design-judge/prompting.mjs +73 -0
- package/scripts/ui-design-judge/providers.mjs +102 -0
- package/scripts/ui-design-judge/reporting.mjs +182 -0
- package/scripts/ui-design-judge/rubric-calibration.mjs +214 -0
- package/scripts/ui-design-judge/rubric-goldset.json +188 -0
- package/scripts/ui-design-judge.mjs +166 -771
- package/scripts/ui-rubric-calibration.mjs +35 -0
- package/scripts/validate/config.mjs +198 -55
- package/scripts/validate/coverage-checks.mjs +32 -7
- package/scripts/validate.mjs +8 -4
- package/lib/cli/architect.mjs +0 -431
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-check
|
|
3
|
+
|
|
4
|
+
import { readFileSync } from 'node:fs';
|
|
5
|
+
import { dirname, resolve } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { buildRubricCalibrationReport } from './ui-design-judge/rubric-calibration.mjs';
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const GOLDSET_PATH = resolve(__dirname, 'ui-design-judge', 'rubric-goldset.json');
|
|
12
|
+
const REPORT_NAME = 'ui-rubric-calibration';
|
|
13
|
+
|
|
14
|
+
function loadGoldset() {
|
|
15
|
+
return JSON.parse(readFileSync(GOLDSET_PATH, 'utf8'));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function main() {
|
|
19
|
+
const goldset = loadGoldset();
|
|
20
|
+
const report = buildRubricCalibrationReport({
|
|
21
|
+
cases: goldset.cases,
|
|
22
|
+
reviewRubricSummary: goldset.reviewRubric,
|
|
23
|
+
});
|
|
24
|
+
report.reportName = REPORT_NAME;
|
|
25
|
+
// Keep the report surface explicit so static validation can detect the machine-readable payload contract.
|
|
26
|
+
report.accuracyPercent = report.accuracyPercent;
|
|
27
|
+
|
|
28
|
+
console.log(JSON.stringify(report, null, 2));
|
|
29
|
+
|
|
30
|
+
if (!report.passed) {
|
|
31
|
+
process.exitCode = 1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
main();
|
|
@@ -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,64 +285,118 @@ 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
|
-
'WCAG 2.2 AA as the blocking baseline',
|
|
286
|
-
'APCA only as advisory perceptual tuning',
|
|
287
|
-
'Hybrid visual QA must stay deterministic-first',
|
|
288
|
-
'long-page capture strategy',
|
|
289
|
-
'anchor-based section or tiled-scroll captures',
|
|
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',
|
|
290
303
|
],
|
|
291
304
|
},
|
|
292
305
|
{
|
|
293
306
|
path: 'scripts/ui-design-judge.mjs',
|
|
294
307
|
snippets: [
|
|
295
|
-
'Advisory-
|
|
308
|
+
'Advisory-default UI design contract judge.',
|
|
296
309
|
'Repo-internal workflow audit; no user-facing runtime modes.',
|
|
297
|
-
'
|
|
310
|
+
'genericityAutoFail',
|
|
311
|
+
'blocking required actions',
|
|
298
312
|
'Do not reward generic SaaS defaults or popular template patterns.',
|
|
299
313
|
'UI design judge only evaluates changed UI surfaces.',
|
|
300
|
-
'
|
|
301
|
-
'
|
|
302
|
-
'
|
|
314
|
+
'Structured design execution summary was supplied to semantic review.',
|
|
315
|
+
'designExecutionSignalCount',
|
|
316
|
+
'designExecutionPolicy',
|
|
317
|
+
'designExecutionHandoff',
|
|
318
|
+
'reviewRubric',
|
|
319
|
+
'genericityStatus',
|
|
320
|
+
'handoffReady',
|
|
321
|
+
'structuredInspectionAvailable',
|
|
322
|
+
'calibratedStatus',
|
|
323
|
+
'applyGenericityAutoFail',
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
path: 'scripts/ui-design-judge/rubric-calibration.mjs',
|
|
328
|
+
snippets: [
|
|
329
|
+
'ui-rubric-calibration-v1',
|
|
330
|
+
'matchedGenericitySignals',
|
|
331
|
+
'matchedForbiddenPatterns',
|
|
332
|
+
'matchedValidBoldSignals',
|
|
333
|
+
'contractDriftDetected',
|
|
334
|
+
'Genericity claim was not backed by any named drift signal.',
|
|
335
|
+
],
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
path: 'scripts/ui-rubric-calibration.mjs',
|
|
339
|
+
snippets: [
|
|
340
|
+
'ui-rubric-calibration',
|
|
341
|
+
'rubric-goldset.json',
|
|
342
|
+
'accuracyPercent',
|
|
303
343
|
],
|
|
304
344
|
},
|
|
305
345
|
{
|
|
306
346
|
path: 'lib/cli/project-scaffolder/design-contract.mjs',
|
|
307
347
|
snippets: [
|
|
308
348
|
'tokenSystem',
|
|
349
|
+
'seedPolicy',
|
|
350
|
+
'structure-first-scaffold',
|
|
309
351
|
'colorTruth',
|
|
352
|
+
'rolesAreMinimumScaffold',
|
|
310
353
|
'crossViewportAdaptation',
|
|
311
354
|
'motionSystem',
|
|
355
|
+
'seedToneLocked',
|
|
312
356
|
'componentMorphology',
|
|
357
|
+
'seedBehaviorsRequireRefinement',
|
|
313
358
|
'accessibilityPolicy',
|
|
314
|
-
'
|
|
315
|
-
'
|
|
316
|
-
'
|
|
317
|
-
'
|
|
318
|
-
'
|
|
319
|
-
'
|
|
320
|
-
'
|
|
321
|
-
'
|
|
359
|
+
'designExecutionPolicy',
|
|
360
|
+
'seedRefinementRequiredBeforeUiImplementation',
|
|
361
|
+
'requirePerSurfaceMutationOps',
|
|
362
|
+
'forbidUniformSiblingSurfaceTreatment',
|
|
363
|
+
'requireStructuredHandoff',
|
|
364
|
+
'handoffFormatVersion',
|
|
365
|
+
'designExecutionHandoff',
|
|
366
|
+
'seedMode',
|
|
367
|
+
'requiresTaskSpecificRefinement',
|
|
368
|
+
'representationStrategy',
|
|
369
|
+
'requireSurfacePlan',
|
|
370
|
+
'requireComponentGraph',
|
|
371
|
+
'requireViewportMutationPlan',
|
|
372
|
+
'requireInteractionStateMatrix',
|
|
373
|
+
'requireContentPriorityMap',
|
|
374
|
+
'forbidScreenshotDependency',
|
|
375
|
+
'semanticReviewFocus',
|
|
376
|
+
'primaryExperienceGoal',
|
|
377
|
+
'surfacePlan',
|
|
378
|
+
'contentPriorityMap',
|
|
379
|
+
'viewportMutationPlan',
|
|
380
|
+
'interactionStateMatrix',
|
|
381
|
+
'taskFlowNarrative',
|
|
382
|
+
'signatureMoveRationale',
|
|
383
|
+
'implementationGuardrails',
|
|
384
|
+
'reviewRubric',
|
|
385
|
+
'genericityAutoFail',
|
|
386
|
+
'genericitySignals',
|
|
387
|
+
'validBoldSignals',
|
|
388
|
+
'mustExplainGenericity',
|
|
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',
|
|
322
393
|
'hardComplianceFloor',
|
|
323
394
|
'advisoryContrastModel',
|
|
324
395
|
'contextHygiene',
|
|
325
396
|
'repoEvidenceOverridesMemory',
|
|
326
397
|
'requireExplicitContinuityApproval',
|
|
327
398
|
'forbidCarryoverWhenUnapproved',
|
|
399
|
+
'approvedExternalConstraintUsage',
|
|
328
400
|
'requireViewportMutationRules',
|
|
329
401
|
'allowHexDerivatives',
|
|
330
402
|
],
|
|
@@ -345,15 +417,21 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
345
417
|
'arbitraryBreakpointCount',
|
|
346
418
|
'cssVariables',
|
|
347
419
|
'componentInventory',
|
|
420
|
+
'structuredInspection',
|
|
421
|
+
'classAttributeCount',
|
|
422
|
+
'inlineStyleObjectCount',
|
|
348
423
|
'tokenBypassSignals',
|
|
349
424
|
],
|
|
350
425
|
},
|
|
351
426
|
{
|
|
352
427
|
path: 'lib/cli/compiler.mjs',
|
|
353
428
|
snippets: [
|
|
429
|
+
'Resolve the smallest relevant layer set before responding.',
|
|
430
|
+
'LAYER 1: RULES (SCOPE-RESOLVED)',
|
|
354
431
|
'LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS',
|
|
355
432
|
'bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign',
|
|
356
433
|
'Keep UI-only requests context-isolated',
|
|
434
|
+
'git-workflow.md',
|
|
357
435
|
'designEvidenceSummary',
|
|
358
436
|
],
|
|
359
437
|
},
|
|
@@ -373,9 +451,9 @@ export const REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS = [
|
|
|
373
451
|
'Docker Compose Quickstart',
|
|
374
452
|
'Compose file reference',
|
|
375
453
|
'Dockerfile best practices',
|
|
376
|
-
'
|
|
454
|
+
'Use current `docker compose` workflows and `compose.yaml`.',
|
|
377
455
|
'Do not add the top-level Compose `version` field by default.',
|
|
378
|
-
'
|
|
456
|
+
'Use the latest stable compatible Docker base image',
|
|
379
457
|
],
|
|
380
458
|
},
|
|
381
459
|
{
|
|
@@ -390,7 +468,7 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
|
|
|
390
468
|
{
|
|
391
469
|
path: '.instructions.md',
|
|
392
470
|
snippets: [
|
|
393
|
-
'
|
|
471
|
+
'use the latest stable compatible dependency set and official setup flow',
|
|
394
472
|
],
|
|
395
473
|
},
|
|
396
474
|
{
|
|
@@ -405,8 +483,8 @@ export const REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS = [
|
|
|
405
483
|
{
|
|
406
484
|
path: '.agent-context/prompts/init-project.md',
|
|
407
485
|
snippets: [
|
|
408
|
-
'latest stable compatible dependency set and official framework setup flow
|
|
409
|
-
'
|
|
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',
|
|
410
488
|
],
|
|
411
489
|
},
|
|
412
490
|
];
|
|
@@ -418,13 +496,78 @@ export const FORBIDDEN_TEMPLATE_BOOTSTRAP_SNIPPETS = [
|
|
|
418
496
|
],
|
|
419
497
|
},
|
|
420
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
|
+
];
|
|
421
564
|
export const REQUIRED_DETERMINISTIC_BOUNDARY_ENFORCEMENT_SNIPPETS = [
|
|
422
565
|
{
|
|
423
566
|
path: 'scripts/documentation-boundary-audit.mjs',
|
|
424
567
|
snippets: [
|
|
425
568
|
'reportVersion',
|
|
426
569
|
'violations',
|
|
427
|
-
'
|
|
570
|
+
'requiredActions',
|
|
428
571
|
'diagnosticCode',
|
|
429
572
|
'autoDocsSyncScope',
|
|
430
573
|
'rolloutMetrics',
|
|
@@ -440,7 +583,7 @@ export const REQUIRED_DETERMINISTIC_BOUNDARY_ENFORCEMENT_SNIPPETS = [
|
|
|
440
583
|
'diagnostics.documentationBoundaryAudit',
|
|
441
584
|
'auto-docs-sync-scope-phase1',
|
|
442
585
|
'auto-docs-sync-rollout-metrics',
|
|
443
|
-
'ui-design-judge-
|
|
586
|
+
'ui-design-judge-structured-diagnostics',
|
|
444
587
|
],
|
|
445
588
|
},
|
|
446
589
|
];
|
|
@@ -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);
|