@ryuenn3123/agentic-senior-core 1.8.2 → 1.9.1

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 (76) hide show
  1. package/.agent-context/blueprints/mobile-app.md +21 -21
  2. package/.agent-context/policies/llm-judge-threshold.json +19 -19
  3. package/.agent-context/profiles/platform.md +13 -13
  4. package/.agent-context/profiles/regulated.md +13 -13
  5. package/.agent-context/profiles/startup.md +13 -13
  6. package/.agent-context/review-checklists/frontend-skill-parity.md +28 -28
  7. package/.agent-context/review-checklists/frontend-usability.md +33 -33
  8. package/.agent-context/review-checklists/release-operations.md +29 -29
  9. package/.agent-context/skills/README.md +62 -62
  10. package/.agent-context/skills/backend/README.md +67 -67
  11. package/.agent-context/skills/backend/architecture.md +360 -360
  12. package/.agent-context/skills/backend/data-access.md +230 -230
  13. package/.agent-context/skills/backend/errors.md +137 -137
  14. package/.agent-context/skills/backend/validation.md +116 -116
  15. package/.agent-context/skills/backend.md +28 -28
  16. package/.agent-context/skills/cli/README.md +49 -49
  17. package/.agent-context/skills/cli/init.md +37 -37
  18. package/.agent-context/skills/cli/output.md +35 -35
  19. package/.agent-context/skills/cli/upgrade.md +37 -37
  20. package/.agent-context/skills/cli.md +28 -28
  21. package/.agent-context/skills/distribution/README.md +18 -18
  22. package/.agent-context/skills/distribution/compatibility.md +31 -31
  23. package/.agent-context/skills/distribution/publish.md +36 -36
  24. package/.agent-context/skills/distribution/rollback.md +31 -31
  25. package/.agent-context/skills/distribution.md +28 -28
  26. package/.agent-context/skills/frontend/README.md +35 -35
  27. package/.agent-context/skills/frontend/accessibility.md +107 -107
  28. package/.agent-context/skills/frontend/motion.md +66 -66
  29. package/.agent-context/skills/frontend/performance.md +62 -62
  30. package/.agent-context/skills/frontend/ui-architecture.md +128 -128
  31. package/.agent-context/skills/frontend.md +29 -29
  32. package/.agent-context/skills/fullstack/README.md +18 -18
  33. package/.agent-context/skills/fullstack/contracts.md +52 -52
  34. package/.agent-context/skills/fullstack/end-to-end.md +41 -41
  35. package/.agent-context/skills/fullstack/feature-slicing.md +64 -64
  36. package/.agent-context/skills/fullstack.md +26 -26
  37. package/.agent-context/skills/index.json +107 -107
  38. package/.agent-context/skills/review-quality/README.md +18 -18
  39. package/.agent-context/skills/review-quality/benchmark.md +29 -29
  40. package/.agent-context/skills/review-quality/planning.md +37 -37
  41. package/.agent-context/skills/review-quality/security.md +33 -33
  42. package/.agent-context/skills/review-quality.md +27 -27
  43. package/.agent-context/stacks/flutter.md +16 -16
  44. package/.agent-context/stacks/react-native.md +16 -16
  45. package/.agent-context/state/architecture-map.md +25 -25
  46. package/.agent-context/state/benchmark-analysis.json +431 -431
  47. package/.agent-context/state/benchmark-thresholds.json +10 -10
  48. package/.agent-context/state/benchmark-watchlist.json +19 -19
  49. package/.agent-context/state/dependency-map.md +32 -32
  50. package/.agent-context/state/skill-platform.json +38 -38
  51. package/.agent-override.md +36 -36
  52. package/.cursorrules +140 -140
  53. package/.github/ISSUE_TEMPLATE/v1.7-frontend-work-item.yml +54 -54
  54. package/.github/copilot-instructions.md +62 -0
  55. package/.github/workflows/benchmark-detection.yml +38 -38
  56. package/.github/workflows/benchmark-intelligence.yml +50 -50
  57. package/.github/workflows/frontend-usability-gate.yml +36 -36
  58. package/.github/workflows/publish.yml +32 -0
  59. package/.github/workflows/release-gate.yml +32 -32
  60. package/.github/workflows/sbom-compliance.yml +32 -32
  61. package/.windsurfrules +106 -106
  62. package/AGENTS.md +181 -131
  63. package/README.md +318 -318
  64. package/bin/agentic-senior-core.js +1556 -1556
  65. package/mcp.json +92 -29
  66. package/package.json +1 -1
  67. package/scripts/benchmark-gate.mjs +121 -121
  68. package/scripts/benchmark-intelligence.mjs +140 -140
  69. package/scripts/detection-benchmark.mjs +138 -138
  70. package/scripts/frontend-usability-audit.mjs +87 -87
  71. package/scripts/generate-sbom.mjs +61 -61
  72. package/scripts/init-project.ps1 +104 -104
  73. package/scripts/llm-judge.mjs +664 -664
  74. package/scripts/release-gate.mjs +116 -116
  75. package/scripts/skill-tier-policy.mjs +75 -75
  76. package/scripts/validate.mjs +636 -636
@@ -1,138 +1,138 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * detection-benchmark.mjs
5
- *
6
- * Lightweight benchmark for stack detection heuristics used by the CLI.
7
- * Publishes top-1 accuracy and manual-correction-rate proxy.
8
- */
9
-
10
- const BLUEPRINT_RECOMMENDATIONS = {
11
- 'typescript.md': 'api-nextjs.md',
12
- 'python.md': 'fastapi-service.md',
13
- 'java.md': 'spring-boot-api.md',
14
- 'php.md': 'laravel-api.md',
15
- 'go.md': 'go-service.md',
16
- 'csharp.md': 'aspnet-api.md',
17
- };
18
-
19
- const AMBIGUITY_THRESHOLD = 0.08;
20
-
21
- const BENCHMARK_FIXTURES = [
22
- { fixtureName: 'typescript-basic', markers: ['package.json', 'tsconfig.json'], expectedStack: 'typescript.md' },
23
- { fixtureName: 'typescript-next', markers: ['package.json', 'tsconfig.json', 'next.config.js'], expectedStack: 'typescript.md' },
24
- { fixtureName: 'python-poetry', markers: ['pyproject.toml'], expectedStack: 'python.md' },
25
- { fixtureName: 'python-requirements', markers: ['requirements.txt'], expectedStack: 'python.md' },
26
- { fixtureName: 'java-maven', markers: ['pom.xml'], expectedStack: 'java.md' },
27
- { fixtureName: 'java-gradle', markers: ['build.gradle'], expectedStack: 'java.md' },
28
- { fixtureName: 'php-composer', markers: ['composer.json'], expectedStack: 'php.md' },
29
- { fixtureName: 'go-module', markers: ['go.mod'], expectedStack: 'go.md' },
30
- { fixtureName: 'dotnet-solution', markers: ['app.sln'], expectedStack: 'csharp.md' },
31
- { fixtureName: 'rust-cargo', markers: ['Cargo.toml'], expectedStack: 'rust.md' },
32
- { fixtureName: 'ruby-gemfile', markers: ['Gemfile'], expectedStack: 'ruby.md' },
33
- { fixtureName: 'mixed-ts-python', markers: ['package.json', 'tsconfig.json', 'pyproject.toml'], expectedStack: 'typescript.md' },
34
- ];
35
-
36
- function detectProjectFromMarkers(markers) {
37
- const markerNames = new Set(markers);
38
- const candidates = [];
39
-
40
- if (markerNames.has('package.json') || markerNames.has('tsconfig.json') || markerNames.has('next.config.js') || markerNames.has('next.config.mjs')) {
41
- let confidenceScore = 0.7;
42
- if (markerNames.has('package.json')) confidenceScore += 0.12;
43
- if (markerNames.has('tsconfig.json')) confidenceScore += 0.12;
44
- if (markerNames.has('next.config.js') || markerNames.has('next.config.mjs')) confidenceScore += 0.05;
45
- candidates.push({ stackFileName: 'typescript.md', confidenceScore: Math.min(confidenceScore, 0.97) });
46
- }
47
-
48
- if (markerNames.has('pyproject.toml') || markerNames.has('requirements.txt')) {
49
- candidates.push({
50
- stackFileName: 'python.md',
51
- confidenceScore: markerNames.has('pyproject.toml') ? 0.96 : 0.78,
52
- });
53
- }
54
-
55
- if (markerNames.has('pom.xml') || markerNames.has('build.gradle') || markerNames.has('build.gradle.kts')) {
56
- candidates.push({
57
- stackFileName: 'java.md',
58
- confidenceScore: markerNames.has('pom.xml') ? 0.95 : 0.84,
59
- });
60
- }
61
-
62
- if (markerNames.has('composer.json')) candidates.push({ stackFileName: 'php.md', confidenceScore: 0.95 });
63
- if (markerNames.has('go.mod')) candidates.push({ stackFileName: 'go.md', confidenceScore: 0.96 });
64
- if (markerNames.has('Cargo.toml')) candidates.push({ stackFileName: 'rust.md', confidenceScore: 0.96 });
65
- if (markerNames.has('Gemfile')) candidates.push({ stackFileName: 'ruby.md', confidenceScore: 0.95 });
66
-
67
- const hasDotNetMarker = Array.from(markerNames).some((markerName) => markerName.endsWith('.sln') || markerName.endsWith('.csproj'));
68
- if (hasDotNetMarker) {
69
- candidates.push({ stackFileName: 'csharp.md', confidenceScore: 0.95 });
70
- }
71
-
72
- if (candidates.length === 0) {
73
- return {
74
- recommendedStack: null,
75
- recommendedBlueprint: null,
76
- confidenceScore: 0,
77
- confidenceGap: 0,
78
- needsManualCorrection: true,
79
- };
80
- }
81
-
82
- candidates.sort((leftCandidate, rightCandidate) => rightCandidate.confidenceScore - leftCandidate.confidenceScore);
83
- const strongestCandidate = candidates[0];
84
- const secondStrongestCandidate = candidates[1];
85
- const confidenceGap = secondStrongestCandidate
86
- ? Number((strongestCandidate.confidenceScore - secondStrongestCandidate.confidenceScore).toFixed(2))
87
- : Number(strongestCandidate.confidenceScore.toFixed(2));
88
-
89
- return {
90
- recommendedStack: strongestCandidate.stackFileName,
91
- recommendedBlueprint: BLUEPRINT_RECOMMENDATIONS[strongestCandidate.stackFileName] || null,
92
- confidenceScore: strongestCandidate.confidenceScore,
93
- confidenceGap,
94
- needsManualCorrection: confidenceGap < AMBIGUITY_THRESHOLD,
95
- };
96
- }
97
-
98
- function runBenchmark() {
99
- let passingFixtureCount = 0;
100
- let manualCorrectionCount = 0;
101
-
102
- const fixtureResults = BENCHMARK_FIXTURES.map((benchmarkFixture) => {
103
- const detectionResult = detectProjectFromMarkers(benchmarkFixture.markers);
104
- const isCorrect = detectionResult.recommendedStack === benchmarkFixture.expectedStack;
105
-
106
- if (isCorrect) {
107
- passingFixtureCount += 1;
108
- }
109
-
110
- if (detectionResult.needsManualCorrection) {
111
- manualCorrectionCount += 1;
112
- }
113
-
114
- return {
115
- fixtureName: benchmarkFixture.fixtureName,
116
- expectedStack: benchmarkFixture.expectedStack,
117
- detectedStack: detectionResult.recommendedStack,
118
- confidenceGap: detectionResult.confidenceGap,
119
- needsManualCorrection: detectionResult.needsManualCorrection,
120
- isCorrect,
121
- };
122
- });
123
-
124
- const totalFixtureCount = BENCHMARK_FIXTURES.length;
125
- const top1Accuracy = Number((passingFixtureCount / totalFixtureCount).toFixed(4));
126
- const manualCorrectionRate = Number((manualCorrectionCount / totalFixtureCount).toFixed(4));
127
-
128
- return {
129
- generatedAt: new Date().toISOString(),
130
- fixtureCount: totalFixtureCount,
131
- top1Accuracy,
132
- manualCorrectionRate,
133
- fixtures: fixtureResults,
134
- };
135
- }
136
-
137
- const benchmarkResult = runBenchmark();
138
- console.log(JSON.stringify(benchmarkResult, null, 2));
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * detection-benchmark.mjs
5
+ *
6
+ * Lightweight benchmark for stack detection heuristics used by the CLI.
7
+ * Publishes top-1 accuracy and manual-correction-rate proxy.
8
+ */
9
+
10
+ const BLUEPRINT_RECOMMENDATIONS = {
11
+ 'typescript.md': 'api-nextjs.md',
12
+ 'python.md': 'fastapi-service.md',
13
+ 'java.md': 'spring-boot-api.md',
14
+ 'php.md': 'laravel-api.md',
15
+ 'go.md': 'go-service.md',
16
+ 'csharp.md': 'aspnet-api.md',
17
+ };
18
+
19
+ const AMBIGUITY_THRESHOLD = 0.08;
20
+
21
+ const BENCHMARK_FIXTURES = [
22
+ { fixtureName: 'typescript-basic', markers: ['package.json', 'tsconfig.json'], expectedStack: 'typescript.md' },
23
+ { fixtureName: 'typescript-next', markers: ['package.json', 'tsconfig.json', 'next.config.js'], expectedStack: 'typescript.md' },
24
+ { fixtureName: 'python-poetry', markers: ['pyproject.toml'], expectedStack: 'python.md' },
25
+ { fixtureName: 'python-requirements', markers: ['requirements.txt'], expectedStack: 'python.md' },
26
+ { fixtureName: 'java-maven', markers: ['pom.xml'], expectedStack: 'java.md' },
27
+ { fixtureName: 'java-gradle', markers: ['build.gradle'], expectedStack: 'java.md' },
28
+ { fixtureName: 'php-composer', markers: ['composer.json'], expectedStack: 'php.md' },
29
+ { fixtureName: 'go-module', markers: ['go.mod'], expectedStack: 'go.md' },
30
+ { fixtureName: 'dotnet-solution', markers: ['app.sln'], expectedStack: 'csharp.md' },
31
+ { fixtureName: 'rust-cargo', markers: ['Cargo.toml'], expectedStack: 'rust.md' },
32
+ { fixtureName: 'ruby-gemfile', markers: ['Gemfile'], expectedStack: 'ruby.md' },
33
+ { fixtureName: 'mixed-ts-python', markers: ['package.json', 'tsconfig.json', 'pyproject.toml'], expectedStack: 'typescript.md' },
34
+ ];
35
+
36
+ function detectProjectFromMarkers(markers) {
37
+ const markerNames = new Set(markers);
38
+ const candidates = [];
39
+
40
+ if (markerNames.has('package.json') || markerNames.has('tsconfig.json') || markerNames.has('next.config.js') || markerNames.has('next.config.mjs')) {
41
+ let confidenceScore = 0.7;
42
+ if (markerNames.has('package.json')) confidenceScore += 0.12;
43
+ if (markerNames.has('tsconfig.json')) confidenceScore += 0.12;
44
+ if (markerNames.has('next.config.js') || markerNames.has('next.config.mjs')) confidenceScore += 0.05;
45
+ candidates.push({ stackFileName: 'typescript.md', confidenceScore: Math.min(confidenceScore, 0.97) });
46
+ }
47
+
48
+ if (markerNames.has('pyproject.toml') || markerNames.has('requirements.txt')) {
49
+ candidates.push({
50
+ stackFileName: 'python.md',
51
+ confidenceScore: markerNames.has('pyproject.toml') ? 0.96 : 0.78,
52
+ });
53
+ }
54
+
55
+ if (markerNames.has('pom.xml') || markerNames.has('build.gradle') || markerNames.has('build.gradle.kts')) {
56
+ candidates.push({
57
+ stackFileName: 'java.md',
58
+ confidenceScore: markerNames.has('pom.xml') ? 0.95 : 0.84,
59
+ });
60
+ }
61
+
62
+ if (markerNames.has('composer.json')) candidates.push({ stackFileName: 'php.md', confidenceScore: 0.95 });
63
+ if (markerNames.has('go.mod')) candidates.push({ stackFileName: 'go.md', confidenceScore: 0.96 });
64
+ if (markerNames.has('Cargo.toml')) candidates.push({ stackFileName: 'rust.md', confidenceScore: 0.96 });
65
+ if (markerNames.has('Gemfile')) candidates.push({ stackFileName: 'ruby.md', confidenceScore: 0.95 });
66
+
67
+ const hasDotNetMarker = Array.from(markerNames).some((markerName) => markerName.endsWith('.sln') || markerName.endsWith('.csproj'));
68
+ if (hasDotNetMarker) {
69
+ candidates.push({ stackFileName: 'csharp.md', confidenceScore: 0.95 });
70
+ }
71
+
72
+ if (candidates.length === 0) {
73
+ return {
74
+ recommendedStack: null,
75
+ recommendedBlueprint: null,
76
+ confidenceScore: 0,
77
+ confidenceGap: 0,
78
+ needsManualCorrection: true,
79
+ };
80
+ }
81
+
82
+ candidates.sort((leftCandidate, rightCandidate) => rightCandidate.confidenceScore - leftCandidate.confidenceScore);
83
+ const strongestCandidate = candidates[0];
84
+ const secondStrongestCandidate = candidates[1];
85
+ const confidenceGap = secondStrongestCandidate
86
+ ? Number((strongestCandidate.confidenceScore - secondStrongestCandidate.confidenceScore).toFixed(2))
87
+ : Number(strongestCandidate.confidenceScore.toFixed(2));
88
+
89
+ return {
90
+ recommendedStack: strongestCandidate.stackFileName,
91
+ recommendedBlueprint: BLUEPRINT_RECOMMENDATIONS[strongestCandidate.stackFileName] || null,
92
+ confidenceScore: strongestCandidate.confidenceScore,
93
+ confidenceGap,
94
+ needsManualCorrection: confidenceGap < AMBIGUITY_THRESHOLD,
95
+ };
96
+ }
97
+
98
+ function runBenchmark() {
99
+ let passingFixtureCount = 0;
100
+ let manualCorrectionCount = 0;
101
+
102
+ const fixtureResults = BENCHMARK_FIXTURES.map((benchmarkFixture) => {
103
+ const detectionResult = detectProjectFromMarkers(benchmarkFixture.markers);
104
+ const isCorrect = detectionResult.recommendedStack === benchmarkFixture.expectedStack;
105
+
106
+ if (isCorrect) {
107
+ passingFixtureCount += 1;
108
+ }
109
+
110
+ if (detectionResult.needsManualCorrection) {
111
+ manualCorrectionCount += 1;
112
+ }
113
+
114
+ return {
115
+ fixtureName: benchmarkFixture.fixtureName,
116
+ expectedStack: benchmarkFixture.expectedStack,
117
+ detectedStack: detectionResult.recommendedStack,
118
+ confidenceGap: detectionResult.confidenceGap,
119
+ needsManualCorrection: detectionResult.needsManualCorrection,
120
+ isCorrect,
121
+ };
122
+ });
123
+
124
+ const totalFixtureCount = BENCHMARK_FIXTURES.length;
125
+ const top1Accuracy = Number((passingFixtureCount / totalFixtureCount).toFixed(4));
126
+ const manualCorrectionRate = Number((manualCorrectionCount / totalFixtureCount).toFixed(4));
127
+
128
+ return {
129
+ generatedAt: new Date().toISOString(),
130
+ fixtureCount: totalFixtureCount,
131
+ top1Accuracy,
132
+ manualCorrectionRate,
133
+ fixtures: fixtureResults,
134
+ };
135
+ }
136
+
137
+ const benchmarkResult = runBenchmark();
138
+ console.log(JSON.stringify(benchmarkResult, null, 2));
@@ -1,87 +1,87 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * frontend-usability-audit.mjs
5
- *
6
- * Governance-level audit for V1.7 frontend execution assets.
7
- * This repository does not host a frontend runtime app, so the audit validates
8
- * required execution artifacts and quality gates documentation.
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/roadmap.md',
21
- 'docs/v1.7-issue-breakdown.md',
22
- 'docs/v1.7-execution-playbook.md',
23
- '.agent-context/review-checklists/frontend-usability.md',
24
- ];
25
-
26
- const REQUIRED_ROADMAP_SNIPPETS = [
27
- 'V1.7',
28
- 'Frontend Product Experience',
29
- 'Release status: Completed',
30
- 'Delivered Scope',
31
- ];
32
-
33
- const REQUIRED_CHECKLIST_SNIPPETS = [
34
- 'Responsiveness',
35
- 'Accessibility',
36
- 'Performance',
37
- 'Documentation and Release Evidence',
38
- ];
39
-
40
- function assertFileExists(relativeFilePath, failures) {
41
- const absoluteFilePath = resolve(REPOSITORY_ROOT, relativeFilePath);
42
- if (!existsSync(absoluteFilePath)) {
43
- failures.push(`Missing required file: ${relativeFilePath}`);
44
- }
45
- }
46
-
47
- function assertContains(contentLabel, filePath, fileContent, snippets, failures) {
48
- for (const snippetText of snippets) {
49
- if (!fileContent.includes(snippetText)) {
50
- failures.push(`${contentLabel} missing snippet "${snippetText}" in ${filePath}`);
51
- }
52
- }
53
- }
54
-
55
- function runAudit() {
56
- const failures = [];
57
-
58
- for (const requiredFilePath of REQUIRED_FILES) {
59
- assertFileExists(requiredFilePath, failures);
60
- }
61
-
62
- const roadmapPath = 'docs/roadmap.md';
63
- const checklistPath = '.agent-context/review-checklists/frontend-usability.md';
64
-
65
- if (existsSync(resolve(REPOSITORY_ROOT, roadmapPath))) {
66
- const roadmapContent = readFileSync(resolve(REPOSITORY_ROOT, roadmapPath), 'utf8');
67
- assertContains('Roadmap', roadmapPath, roadmapContent, REQUIRED_ROADMAP_SNIPPETS, failures);
68
- }
69
-
70
- if (existsSync(resolve(REPOSITORY_ROOT, checklistPath))) {
71
- const checklistContent = readFileSync(resolve(REPOSITORY_ROOT, checklistPath), 'utf8');
72
- assertContains('Checklist', checklistPath, checklistContent, REQUIRED_CHECKLIST_SNIPPETS, failures);
73
- }
74
-
75
- const reportPayload = {
76
- generatedAt: new Date().toISOString(),
77
- auditName: 'frontend-usability-audit',
78
- passed: failures.length === 0,
79
- failureCount: failures.length,
80
- failures,
81
- };
82
-
83
- console.log(JSON.stringify(reportPayload, null, 2));
84
- process.exit(reportPayload.passed ? 0 : 1);
85
- }
86
-
87
- runAudit();
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * frontend-usability-audit.mjs
5
+ *
6
+ * Governance-level audit for V1.7 frontend execution assets.
7
+ * This repository does not host a frontend runtime app, so the audit validates
8
+ * required execution artifacts and quality gates documentation.
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/roadmap.md',
21
+ 'docs/v1.7-issue-breakdown.md',
22
+ 'docs/v1.7-execution-playbook.md',
23
+ '.agent-context/review-checklists/frontend-usability.md',
24
+ ];
25
+
26
+ const REQUIRED_ROADMAP_SNIPPETS = [
27
+ 'V1.7',
28
+ 'Frontend Product Experience',
29
+ 'Release status: Completed',
30
+ 'Delivered Scope',
31
+ ];
32
+
33
+ const REQUIRED_CHECKLIST_SNIPPETS = [
34
+ 'Responsiveness',
35
+ 'Accessibility',
36
+ 'Performance',
37
+ 'Documentation and Release Evidence',
38
+ ];
39
+
40
+ function assertFileExists(relativeFilePath, failures) {
41
+ const absoluteFilePath = resolve(REPOSITORY_ROOT, relativeFilePath);
42
+ if (!existsSync(absoluteFilePath)) {
43
+ failures.push(`Missing required file: ${relativeFilePath}`);
44
+ }
45
+ }
46
+
47
+ function assertContains(contentLabel, filePath, fileContent, snippets, failures) {
48
+ for (const snippetText of snippets) {
49
+ if (!fileContent.includes(snippetText)) {
50
+ failures.push(`${contentLabel} missing snippet "${snippetText}" in ${filePath}`);
51
+ }
52
+ }
53
+ }
54
+
55
+ function runAudit() {
56
+ const failures = [];
57
+
58
+ for (const requiredFilePath of REQUIRED_FILES) {
59
+ assertFileExists(requiredFilePath, failures);
60
+ }
61
+
62
+ const roadmapPath = 'docs/roadmap.md';
63
+ const checklistPath = '.agent-context/review-checklists/frontend-usability.md';
64
+
65
+ if (existsSync(resolve(REPOSITORY_ROOT, roadmapPath))) {
66
+ const roadmapContent = readFileSync(resolve(REPOSITORY_ROOT, roadmapPath), 'utf8');
67
+ assertContains('Roadmap', roadmapPath, roadmapContent, REQUIRED_ROADMAP_SNIPPETS, failures);
68
+ }
69
+
70
+ if (existsSync(resolve(REPOSITORY_ROOT, checklistPath))) {
71
+ const checklistContent = readFileSync(resolve(REPOSITORY_ROOT, checklistPath), 'utf8');
72
+ assertContains('Checklist', checklistPath, checklistContent, REQUIRED_CHECKLIST_SNIPPETS, failures);
73
+ }
74
+
75
+ const reportPayload = {
76
+ generatedAt: new Date().toISOString(),
77
+ auditName: 'frontend-usability-audit',
78
+ passed: failures.length === 0,
79
+ failureCount: failures.length,
80
+ failures,
81
+ };
82
+
83
+ console.log(JSON.stringify(reportPayload, null, 2));
84
+ process.exit(reportPayload.passed ? 0 : 1);
85
+ }
86
+
87
+ runAudit();
@@ -1,61 +1,61 @@
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();
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();