@ryuenn3123/agentic-senior-core 4.3.15 → 5.1.0
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/.agents/plugins/marketplace.json +21 -0
- package/.agents/rules/agentic-senior-core.md +126 -0
- package/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.clinerules/agentic-senior-core.md +94 -0
- package/.codex-plugin/plugin.json +24 -0
- package/.cursor/rules/agentic-senior-core.mdc +99 -0
- package/.devin-plugin/plugin.json +13 -0
- package/.github/copilot-instructions.md +94 -0
- package/.github/plugin/marketplace.json +20 -0
- package/.github/plugin/plugin.json +16 -0
- package/.kiro/steering/agentic-senior-core.md +94 -0
- package/.openclaw/skills/asc/SKILL.md +23 -0
- package/.openclaw/skills/asc-audit/SKILL.md +28 -0
- package/.openclaw/skills/asc-review/SKILL.md +54 -0
- package/.opencode/plugins/agentic-senior-core.mjs +31 -0
- package/.windsurf/rules/agentic-senior-core.md +94 -0
- package/AGENTS.md +126 -179
- package/CONTRIBUTING.md +93 -63
- package/README.md +160 -111
- package/__init__.py +61 -0
- package/bin/agentic-senior-core.js +41 -43
- package/commands/asc-audit.md +1 -0
- package/commands/asc-audit.toml +2 -0
- package/commands/asc-help.md +9 -0
- package/commands/asc-help.toml +2 -0
- package/commands/asc-refactor.md +1 -0
- package/commands/asc-refactor.toml +2 -0
- package/commands/asc-review.md +1 -0
- package/commands/asc-review.toml +2 -0
- package/gemini-extension.json +10 -0
- package/hooks/copilot-hooks.json +21 -0
- package/hooks/hooks.json +31 -0
- package/hooks/session-start.js +36 -0
- package/hooks/subagent-start.js +38 -0
- package/lib/cli/commands/adapter.mjs +109 -0
- package/lib/cli/commands/clean.mjs +63 -0
- package/lib/cli/commands/status.mjs +94 -0
- package/package.json +43 -67
- package/plugin.yaml +16 -0
- package/scripts/uninstall.js +38 -0
- package/skills/asc/SKILL.md +16 -0
- package/skills/asc-audit/SKILL.md +28 -0
- package/skills/asc-refactor/SKILL.md +35 -0
- package/skills/asc-review/SKILL.md +54 -0
- package/.agent-context/policies/llm-judge-threshold.json +0 -29
- package/.agent-context/prompts/bootstrap-design.md +0 -63
- package/.agent-context/prompts/compact-natural-mode.md +0 -100
- package/.agent-context/prompts/init-project.md +0 -60
- package/.agent-context/prompts/refactor.md +0 -38
- package/.agent-context/prompts/review-code.md +0 -31
- package/.agent-context/review-checklists/architecture-review.md +0 -57
- package/.agent-context/review-checklists/pr-checklist.md +0 -136
- package/.agent-context/rules/api-docs.md +0 -24
- package/.agent-context/rules/api-versioning.md +0 -16
- package/.agent-context/rules/architecture.md +0 -33
- package/.agent-context/rules/background-jobs.md +0 -17
- package/.agent-context/rules/config-and-flags.md +0 -16
- package/.agent-context/rules/database-design.md +0 -18
- package/.agent-context/rules/docker-runtime.md +0 -17
- package/.agent-context/rules/error-handling.md +0 -16
- package/.agent-context/rules/event-driven.md +0 -16
- package/.agent-context/rules/frontend-architecture.md +0 -54
- package/.agent-context/rules/microservices.md +0 -16
- package/.agent-context/rules/migrations.md +0 -16
- package/.agent-context/rules/observability.md +0 -16
- package/.agent-context/rules/performance.md +0 -16
- package/.agent-context/rules/realtime.md +0 -16
- package/.agent-context/rules/resilience.md +0 -18
- package/.agent-context/rules/security.md +0 -18
- package/.agent-context/rules/testing.md +0 -16
- package/.agent-context/state/README.md +0 -25
- package/.agent-context/state/architecture-map.md +0 -40
- package/.agent-context/state/benchmark-comparison-schema.json +0 -181
- package/.agent-context/state/benchmark-reproducibility.json +0 -87
- package/.agent-context/state/benchmark-thresholds.json +0 -10
- package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
- package/.agent-context/state/dependency-map.md +0 -41
- package/.agent-context/state/memory-adapter-contract.json +0 -52
- package/.agent-context/state/memory-schema-v1.json +0 -88
- package/GEMINI.md +0 -1
- package/benchmarks/README.md +0 -60
- package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
- package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
- package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
- package/lib/cli/adaptive-context/catalog.mjs +0 -390
- package/lib/cli/adaptive-context/file-signals.mjs +0 -100
- package/lib/cli/adaptive-context/implications.mjs +0 -44
- package/lib/cli/adaptive-context.mjs +0 -365
- package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
- package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
- package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
- package/lib/cli/audits/typography-palette-anti-repeat-audit.mjs +0 -239
- package/lib/cli/backup.mjs +0 -210
- package/lib/cli/commands/audit-design-anti-repeat.mjs +0 -39
- package/lib/cli/commands/context.mjs +0 -140
- package/lib/cli/commands/init/project-context.mjs +0 -60
- package/lib/cli/commands/init/runtime-environment.mjs +0 -59
- package/lib/cli/commands/init/setup-decisions.mjs +0 -83
- package/lib/cli/commands/init.mjs +0 -654
- package/lib/cli/commands/launch.mjs +0 -76
- package/lib/cli/commands/optimize.mjs +0 -284
- package/lib/cli/commands/rollback.mjs +0 -64
- package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
- package/lib/cli/commands/upgrade.mjs +0 -451
- package/lib/cli/compiler.mjs +0 -570
- package/lib/cli/constants.mjs +0 -136
- package/lib/cli/detector/constants.mjs +0 -135
- package/lib/cli/detector/design-evidence/collector.mjs +0 -256
- package/lib/cli/detector/design-evidence/constants.mjs +0 -39
- package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
- package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
- package/lib/cli/detector/design-evidence/summary.mjs +0 -109
- package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
- package/lib/cli/detector/design-evidence.mjs +0 -25
- package/lib/cli/detector/stack-detection.mjs +0 -243
- package/lib/cli/detector/ui-signals.mjs +0 -150
- package/lib/cli/detector/workspace-scan.mjs +0 -177
- package/lib/cli/detector.mjs +0 -23
- package/lib/cli/init-detection-flow.mjs +0 -48
- package/lib/cli/init-options.mjs +0 -237
- package/lib/cli/init-selection.mjs +0 -29
- package/lib/cli/memory-continuity.mjs +0 -537
- package/lib/cli/preflight.mjs +0 -76
- package/lib/cli/project-scaffolder/constants.mjs +0 -69
- package/lib/cli/project-scaffolder/discovery.mjs +0 -272
- package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
- package/lib/cli/project-scaffolder/storage.mjs +0 -144
- package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
- package/lib/cli/project-scaffolder.mjs +0 -29
- package/lib/cli/rollback.mjs +0 -66
- package/lib/cli/token-optimization.mjs +0 -486
- package/lib/cli/utils/filesystem.mjs +0 -81
- package/lib/cli/utils/managed-surface.mjs +0 -280
- package/lib/cli/utils/prompting.mjs +0 -44
- package/lib/cli/utils.mjs +0 -479
- package/mcp.json +0 -134
- package/scripts/adaptive-context/fixtures.mjs +0 -183
- package/scripts/adaptive-context-benchmark.mjs +0 -9
- package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
- package/scripts/audit-cache-layer-contract.mjs +0 -263
- package/scripts/audit-caching-scope-hygiene.mjs +0 -268
- package/scripts/audit-file-size.mjs +0 -219
- package/scripts/audit-reflection-citations.mjs +0 -163
- package/scripts/audit-release-bundle.mjs +0 -170
- package/scripts/audit-rule-id-uniqueness.mjs +0 -313
- package/scripts/audit-typography-palette-anti-repeat.mjs +0 -120
- package/scripts/benchmark-evidence-bundle.mjs +0 -645
- package/scripts/benchmark-gate.mjs +0 -121
- package/scripts/benchmark-intelligence.mjs +0 -33
- package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
- package/scripts/build-release-benchmark-bundle.mjs +0 -202
- package/scripts/bump-version.mjs +0 -103
- package/scripts/clean-local-artifacts.mjs +0 -78
- package/scripts/compact-natural-mode-benchmark.mjs +0 -9
- package/scripts/context-triggered-audit.mjs +0 -391
- package/scripts/detection-benchmark.mjs +0 -127
- package/scripts/docs-quality-drift-report.mjs +0 -358
- package/scripts/documentation-boundary-audit.mjs +0 -305
- package/scripts/explain-on-demand-audit.mjs +0 -427
- package/scripts/forbidden-content-check.mjs +0 -123
- package/scripts/frontend-usability-audit.mjs +0 -243
- package/scripts/generate-sbom.mjs +0 -61
- package/scripts/governance-weekly-report.mjs +0 -466
- package/scripts/llm-judge/checklist-loader.mjs +0 -45
- package/scripts/llm-judge/constants.mjs +0 -66
- package/scripts/llm-judge/diff-collection.mjs +0 -74
- package/scripts/llm-judge/prompting.mjs +0 -78
- package/scripts/llm-judge/providers.mjs +0 -111
- package/scripts/llm-judge/verdict.mjs +0 -134
- package/scripts/llm-judge.mjs +0 -200
- package/scripts/memory-continuity-benchmark.mjs +0 -322
- package/scripts/quality-trend-report.mjs +0 -289
- package/scripts/release-gate/audit-checks.mjs +0 -441
- package/scripts/release-gate/constants.mjs +0 -53
- package/scripts/release-gate/runtime.mjs +0 -63
- package/scripts/release-gate/static-checks.mjs +0 -182
- package/scripts/release-gate.mjs +0 -42
- package/scripts/rules-guardian-audit.mjs +0 -580
- package/scripts/single-source-lazy-loading-audit.mjs +0 -449
- package/scripts/sync-thin-adapters.mjs +0 -72
- package/scripts/token-optimization-benchmark.mjs +0 -252
- package/scripts/ui-design-judge/constants.mjs +0 -13
- package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
- package/scripts/ui-design-judge/git-input.mjs +0 -134
- package/scripts/ui-design-judge/prompting.mjs +0 -52
- package/scripts/ui-design-judge/providers.mjs +0 -102
- package/scripts/ui-design-judge/reporting.mjs +0 -183
- package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
- package/scripts/ui-design-judge/rubric-goldset.json +0 -188
- package/scripts/ui-design-judge.mjs +0 -319
- package/scripts/ui-rubric-calibration.mjs +0 -35
- package/scripts/validate/config.mjs +0 -519
- package/scripts/validate/coverage-checks.mjs +0 -446
- package/scripts/validate/file-structure.mjs +0 -162
- package/scripts/validate/markdown-content.mjs +0 -109
- package/scripts/validate/project-metadata.mjs +0 -166
- package/scripts/validate.mjs +0 -338
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* frontend-usability-audit.mjs
|
|
5
|
-
*
|
|
6
|
-
* Governance-level audit for current frontend governance assets.
|
|
7
|
-
* This repository does not host a frontend runtime app, so the audit validates
|
|
8
|
-
* required quality gates and archived execution evidence.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
12
|
-
import { resolve, dirname } from 'node:path';
|
|
13
|
-
import { fileURLToPath } from 'node:url';
|
|
14
|
-
|
|
15
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
-
const __dirname = dirname(__filename);
|
|
17
|
-
const REPOSITORY_ROOT = resolve(__dirname, '..');
|
|
18
|
-
|
|
19
|
-
const REQUIRED_FILES = [
|
|
20
|
-
'docs/archive/HISTORY.md',
|
|
21
|
-
'AGENTS.md',
|
|
22
|
-
'.agent-context/prompts/bootstrap-design.md',
|
|
23
|
-
'scripts/ui-design-judge.mjs',
|
|
24
|
-
'scripts/ui-rubric-calibration.mjs',
|
|
25
|
-
'scripts/ui-design-judge/rubric-calibration.mjs',
|
|
26
|
-
'scripts/ui-design-judge/rubric-goldset.json',
|
|
27
|
-
'.agent-context/rules/frontend-architecture.md',
|
|
28
|
-
'.agent-context/review-checklists/pr-checklist.md',
|
|
29
|
-
'.agent-context/review-checklists/architecture-review.md',
|
|
30
|
-
'lib/cli/detector/design-evidence.mjs',
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const REQUIRED_HISTORY_SNIPPETS = [
|
|
34
|
-
'V1.7',
|
|
35
|
-
'Frontend Product Experience',
|
|
36
|
-
'completed',
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
const REQUIRED_PR_CHECKLIST_SNIPPETS = [
|
|
40
|
-
'### 2. Architecture (→ rules/architecture.md)',
|
|
41
|
-
'### 10. Documentation',
|
|
42
|
-
'### 15. Universal SOP Consolidation',
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
const REQUIRED_ARCHITECTURE_CHECKLIST_SNIPPETS = [];
|
|
46
|
-
|
|
47
|
-
const REQUIRED_FRONTEND_RULE_SNIPPETS = [
|
|
48
|
-
'## FE-009: Accessibility',
|
|
49
|
-
'WCAG 2.2 AA is the hard floor.',
|
|
50
|
-
'APCA is advisory perceptual tuning only.',
|
|
51
|
-
'## FE-010: CSS Production Hardening',
|
|
52
|
-
'overflow, wrapping, truncation',
|
|
53
|
-
'## FE-011: Implementation Boundaries',
|
|
54
|
-
'Do not hardcode framework-specific state management or data fetching libraries, or rigid component doctrines',
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
const REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS = [
|
|
58
|
-
'WCAG 2.2 AA is the hard compliance floor',
|
|
59
|
-
'Name Your Defaults',
|
|
60
|
-
'Choose an Anchor',
|
|
61
|
-
'Creative Commitments'
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
const REQUIRED_UI_DESIGN_JUDGE_SNIPPETS = [
|
|
65
|
-
'Advisory-default UI design contract judge.',
|
|
66
|
-
'Repo-internal workflow audit; no user-facing runtime modes.',
|
|
67
|
-
'genericityAutoFail',
|
|
68
|
-
'blocking required actions',
|
|
69
|
-
'Do not reward generic SaaS defaults or popular template patterns.',
|
|
70
|
-
'UI design judge only evaluates changed UI surfaces.',
|
|
71
|
-
'Structured design execution summary was supplied to semantic review.',
|
|
72
|
-
'designExecutionSignalCount',
|
|
73
|
-
'designExecutionPolicy',
|
|
74
|
-
'designExecutionHandoff',
|
|
75
|
-
'reviewRubric',
|
|
76
|
-
'genericityStatus',
|
|
77
|
-
'handoffReady',
|
|
78
|
-
'calibratedStatus',
|
|
79
|
-
'structuredInspectionAvailable',
|
|
80
|
-
'applyGenericityAutoFail',
|
|
81
|
-
];
|
|
82
|
-
|
|
83
|
-
const REQUIRED_INSTRUCTIONS_SNIPPETS = [
|
|
84
|
-
'UI Design Mode',
|
|
85
|
-
'Resolve the smallest relevant layer set for the current request.',
|
|
86
|
-
'bootstrap-design.md',
|
|
87
|
-
'frontend-architecture.md',
|
|
88
|
-
'do not eagerly load unrelated backend-only rules',
|
|
89
|
-
'valid style context',
|
|
90
|
-
'External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted',
|
|
91
|
-
'WCAG 2.2 AA as the hard compliance floor',
|
|
92
|
-
'APCA as advisory perceptual tuning only',
|
|
93
|
-
];
|
|
94
|
-
|
|
95
|
-
const REQUIRED_DESIGN_EVIDENCE_SNIPPETS = [
|
|
96
|
-
'summaryVersion',
|
|
97
|
-
"source: 'lightweight-static-scan'",
|
|
98
|
-
'cssVariables',
|
|
99
|
-
'componentInventory',
|
|
100
|
-
'structuredInspection',
|
|
101
|
-
'classAttributeCount',
|
|
102
|
-
'inlineStyleObjectCount',
|
|
103
|
-
'tokenBypassSignals',
|
|
104
|
-
];
|
|
105
|
-
|
|
106
|
-
const REQUIRED_COMPILER_UI_EVIDENCE_SNIPPETS = [
|
|
107
|
-
'frontendEvidenceMetrics',
|
|
108
|
-
'designEvidenceSummary',
|
|
109
|
-
];
|
|
110
|
-
|
|
111
|
-
function assertFileExists(relativeFilePath, failures) {
|
|
112
|
-
const absoluteFilePath = resolve(REPOSITORY_ROOT, relativeFilePath);
|
|
113
|
-
if (!existsSync(absoluteFilePath)) {
|
|
114
|
-
failures.push(`Missing required file: ${relativeFilePath}`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function assertContains(contentLabel, filePath, fileContent, snippets, failures) {
|
|
119
|
-
for (const snippetText of snippets) {
|
|
120
|
-
if (!fileContent.includes(snippetText)) {
|
|
121
|
-
failures.push(`${contentLabel} missing snippet "${snippetText}" in ${filePath}`);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function runAudit() {
|
|
127
|
-
const failures = [];
|
|
128
|
-
|
|
129
|
-
for (const requiredFilePath of REQUIRED_FILES) {
|
|
130
|
-
assertFileExists(requiredFilePath, failures);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const roadmapPath = 'docs/archive/HISTORY.md';
|
|
134
|
-
const frontendRulePath = '.agent-context/rules/frontend-architecture.md';
|
|
135
|
-
const bootstrapDesignPromptPath = '.agent-context/prompts/bootstrap-design.md';
|
|
136
|
-
const instructionsPath = 'AGENTS.md';
|
|
137
|
-
const prChecklistPath = '.agent-context/review-checklists/pr-checklist.md';
|
|
138
|
-
const architectureChecklistPath = '.agent-context/review-checklists/architecture-review.md';
|
|
139
|
-
const designEvidenceExtractorPath = 'lib/cli/detector/design-evidence.mjs';
|
|
140
|
-
const compilerPath = 'lib/cli/compiler.mjs';
|
|
141
|
-
|
|
142
|
-
if (existsSync(resolve(REPOSITORY_ROOT, roadmapPath))) {
|
|
143
|
-
const roadmapContent = readFileSync(resolve(REPOSITORY_ROOT, roadmapPath), 'utf8');
|
|
144
|
-
assertContains('Project history', roadmapPath, roadmapContent, REQUIRED_HISTORY_SNIPPETS, failures);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
if (existsSync(resolve(REPOSITORY_ROOT, prChecklistPath))) {
|
|
148
|
-
const checklistContent = readFileSync(resolve(REPOSITORY_ROOT, prChecklistPath), 'utf8');
|
|
149
|
-
assertContains('PR checklist', prChecklistPath, checklistContent, REQUIRED_PR_CHECKLIST_SNIPPETS, failures);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (existsSync(resolve(REPOSITORY_ROOT, frontendRulePath))) {
|
|
153
|
-
const frontendRuleContent = readFileSync(resolve(REPOSITORY_ROOT, frontendRulePath), 'utf8');
|
|
154
|
-
assertContains('Frontend rule', frontendRulePath, frontendRuleContent, REQUIRED_FRONTEND_RULE_SNIPPETS, failures);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (existsSync(resolve(REPOSITORY_ROOT, bootstrapDesignPromptPath))) {
|
|
158
|
-
const bootstrapDesignPromptContent = readFileSync(resolve(REPOSITORY_ROOT, bootstrapDesignPromptPath), 'utf8');
|
|
159
|
-
assertContains(
|
|
160
|
-
'Bootstrap design prompt',
|
|
161
|
-
bootstrapDesignPromptPath,
|
|
162
|
-
bootstrapDesignPromptContent,
|
|
163
|
-
REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS,
|
|
164
|
-
failures
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (existsSync(resolve(REPOSITORY_ROOT, 'scripts/ui-design-judge.mjs'))) {
|
|
169
|
-
const uiDesignJudgeContent = readFileSync(resolve(REPOSITORY_ROOT, 'scripts/ui-design-judge.mjs'), 'utf8');
|
|
170
|
-
assertContains(
|
|
171
|
-
'UI design judge',
|
|
172
|
-
'scripts/ui-design-judge.mjs',
|
|
173
|
-
uiDesignJudgeContent,
|
|
174
|
-
REQUIRED_UI_DESIGN_JUDGE_SNIPPETS,
|
|
175
|
-
failures
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (existsSync(resolve(REPOSITORY_ROOT, instructionsPath))) {
|
|
180
|
-
const instructionsContent = readFileSync(resolve(REPOSITORY_ROOT, instructionsPath), 'utf8');
|
|
181
|
-
assertContains('Instructions', instructionsPath, instructionsContent, REQUIRED_INSTRUCTIONS_SNIPPETS, failures);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
if (existsSync(resolve(REPOSITORY_ROOT, architectureChecklistPath))) {
|
|
185
|
-
const excellenceRubricContent = readFileSync(resolve(REPOSITORY_ROOT, architectureChecklistPath), 'utf8');
|
|
186
|
-
assertContains(
|
|
187
|
-
'Architecture checklist',
|
|
188
|
-
architectureChecklistPath,
|
|
189
|
-
excellenceRubricContent,
|
|
190
|
-
REQUIRED_ARCHITECTURE_CHECKLIST_SNIPPETS,
|
|
191
|
-
failures
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
let designEvidenceExtractorContent = '';
|
|
196
|
-
let compilerContent = '';
|
|
197
|
-
|
|
198
|
-
if (existsSync(resolve(REPOSITORY_ROOT, designEvidenceExtractorPath))) {
|
|
199
|
-
designEvidenceExtractorContent = readFileSync(resolve(REPOSITORY_ROOT, designEvidenceExtractorPath), 'utf8');
|
|
200
|
-
assertContains(
|
|
201
|
-
'Design evidence extractor',
|
|
202
|
-
designEvidenceExtractorPath,
|
|
203
|
-
designEvidenceExtractorContent,
|
|
204
|
-
REQUIRED_DESIGN_EVIDENCE_SNIPPETS,
|
|
205
|
-
failures
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (existsSync(resolve(REPOSITORY_ROOT, compilerPath))) {
|
|
210
|
-
compilerContent = readFileSync(resolve(REPOSITORY_ROOT, compilerPath), 'utf8');
|
|
211
|
-
assertContains(
|
|
212
|
-
'Compiler UI evidence projection',
|
|
213
|
-
compilerPath,
|
|
214
|
-
compilerContent,
|
|
215
|
-
REQUIRED_COMPILER_UI_EVIDENCE_SNIPPETS,
|
|
216
|
-
failures
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const reportPayload = {
|
|
221
|
-
generatedAt: new Date().toISOString(),
|
|
222
|
-
auditName: 'frontend-usability-audit',
|
|
223
|
-
passed: failures.length === 0,
|
|
224
|
-
failureCount: failures.length,
|
|
225
|
-
failures,
|
|
226
|
-
phase2DesignEvidenceCoverage: {
|
|
227
|
-
extractorFilePath: designEvidenceExtractorPath,
|
|
228
|
-
compilerFilePath: compilerPath,
|
|
229
|
-
extractorIncludesSummaryVersion: designEvidenceExtractorContent.includes('summaryVersion'),
|
|
230
|
-
extractorIncludesCssVariables: designEvidenceExtractorContent.includes('cssVariables'),
|
|
231
|
-
extractorIncludesComponentInventory: designEvidenceExtractorContent.includes('componentInventory'),
|
|
232
|
-
extractorIncludesStructuredInspection: designEvidenceExtractorContent.includes('structuredInspection'),
|
|
233
|
-
extractorIncludesTokenBypassSignals: designEvidenceExtractorContent.includes('tokenBypassSignals'),
|
|
234
|
-
compilerProjectsFrontendEvidenceMetrics: compilerContent.includes('frontendEvidenceMetrics'),
|
|
235
|
-
compilerProjectsDesignEvidenceSummary: compilerContent.includes('designEvidenceSummary'),
|
|
236
|
-
},
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
console.log(JSON.stringify(reportPayload, null, 2));
|
|
240
|
-
process.exit(reportPayload.passed ? 0 : 1);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
runAudit();
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* generate-sbom.mjs
|
|
5
|
-
*
|
|
6
|
-
* Minimal CycloneDX-compatible SBOM for governance CI evidence.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { readFileSync } from 'node:fs';
|
|
10
|
-
import { resolve, dirname } from 'node:path';
|
|
11
|
-
import { fileURLToPath } from 'node:url';
|
|
12
|
-
import { randomUUID } from 'node:crypto';
|
|
13
|
-
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
-
const __dirname = dirname(__filename);
|
|
16
|
-
const REPOSITORY_ROOT = resolve(__dirname, '..');
|
|
17
|
-
const PACKAGE_JSON_PATH = resolve(REPOSITORY_ROOT, 'package.json');
|
|
18
|
-
|
|
19
|
-
function buildComponents(dependencyGroup, dependencies) {
|
|
20
|
-
return Object.entries(dependencies || {}).map(([dependencyName, dependencyVersion]) => ({
|
|
21
|
-
type: 'library',
|
|
22
|
-
name: dependencyName,
|
|
23
|
-
version: String(dependencyVersion).replace(/^[^\d]*/, ''),
|
|
24
|
-
scope: dependencyGroup,
|
|
25
|
-
purl: `pkg:npm/${dependencyName}@${String(dependencyVersion).replace(/^[^\d]*/, '')}`,
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function generateSbom() {
|
|
30
|
-
const packageManifest = JSON.parse(readFileSync(PACKAGE_JSON_PATH, 'utf8'));
|
|
31
|
-
const runtimeComponents = buildComponents('required', packageManifest.dependencies);
|
|
32
|
-
const developmentComponents = buildComponents('optional', packageManifest.devDependencies);
|
|
33
|
-
const allComponents = [...runtimeComponents, ...developmentComponents];
|
|
34
|
-
|
|
35
|
-
const sbomPayload = {
|
|
36
|
-
bomFormat: 'CycloneDX',
|
|
37
|
-
specVersion: '1.5',
|
|
38
|
-
serialNumber: `urn:uuid:${randomUUID()}`,
|
|
39
|
-
version: 1,
|
|
40
|
-
metadata: {
|
|
41
|
-
timestamp: new Date().toISOString(),
|
|
42
|
-
component: {
|
|
43
|
-
type: 'application',
|
|
44
|
-
name: packageManifest.name,
|
|
45
|
-
version: packageManifest.version,
|
|
46
|
-
},
|
|
47
|
-
tools: [
|
|
48
|
-
{
|
|
49
|
-
vendor: 'Agentic-Senior-Core',
|
|
50
|
-
name: 'generate-sbom.mjs',
|
|
51
|
-
version: packageManifest.version,
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
components: allComponents,
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
console.log(JSON.stringify(sbomPayload, null, 2));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
generateSbom();
|