@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,446 +0,0 @@
|
|
|
1
|
-
import { join, relative } from 'node:path';
|
|
2
|
-
import {
|
|
3
|
-
COMPLIANCE_ALIAS_TERMS,
|
|
4
|
-
COMPLIANCE_TERMINOLOGY_BOUNDARY_PATHS,
|
|
5
|
-
FORBIDDEN_ACTIVE_BIAS_ANCHOR_SNIPPETS,
|
|
6
|
-
FORMAL_ARTIFACT_PATHS,
|
|
7
|
-
FORBIDDEN_TEMPLATE_BOOTSTRAP_SNIPPETS,
|
|
8
|
-
REQUIRED_COMPLIANCE_CANONICAL_SNIPPETS,
|
|
9
|
-
REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS,
|
|
10
|
-
REQUIRED_DETECTION_TRANSPARENCY_SNIPPETS,
|
|
11
|
-
REQUIRED_DETERMINISTIC_BOUNDARY_ENFORCEMENT_SNIPPETS,
|
|
12
|
-
REQUIRED_DEVELOPER_FIRST_MENTION_PATTERNS,
|
|
13
|
-
REQUIRED_DIAGRAM_FORMAT_SNIPPETS,
|
|
14
|
-
REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS,
|
|
15
|
-
REQUIRED_HUMAN_WRITING_SNIPPETS,
|
|
16
|
-
REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS,
|
|
17
|
-
REQUIRED_TEMPLATE_FREE_BOOTSTRAP_SNIPPETS,
|
|
18
|
-
REQUIRED_TERMINOLOGY_ROW_PATTERNS,
|
|
19
|
-
REQUIRED_TERMINOLOGY_RULE_SNIPPET,
|
|
20
|
-
REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS,
|
|
21
|
-
REQUIRED_UNIVERSAL_SOP_SNIPPETS,
|
|
22
|
-
REQUIRED_UPGRADE_UI_CONTRACT_WARNING_SNIPPETS,
|
|
23
|
-
TERMINOLOGY_REFERENCE_PATHS,
|
|
24
|
-
THIN_ADAPTER_PATHS,
|
|
25
|
-
} from './config.mjs';
|
|
26
|
-
|
|
27
|
-
async function validateSnippetCoverage({
|
|
28
|
-
heading,
|
|
29
|
-
coverageRules,
|
|
30
|
-
missingLabel,
|
|
31
|
-
snippetLabel,
|
|
32
|
-
context,
|
|
33
|
-
}) {
|
|
34
|
-
const { ROOT_DIR, fileExists, readTextFile, pass, fail } = context;
|
|
35
|
-
|
|
36
|
-
console.log(`\n${heading}`);
|
|
37
|
-
|
|
38
|
-
for (const coverageRule of coverageRules) {
|
|
39
|
-
const absoluteCoveragePath = join(ROOT_DIR, coverageRule.path);
|
|
40
|
-
|
|
41
|
-
if (!(await fileExists(absoluteCoveragePath))) {
|
|
42
|
-
fail(`Missing ${missingLabel}: ${coverageRule.path}`);
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const coverageContent = await readTextFile(absoluteCoveragePath);
|
|
47
|
-
for (const requiredSnippet of coverageRule.snippets) {
|
|
48
|
-
if (coverageContent.includes(requiredSnippet)) {
|
|
49
|
-
pass(`${coverageRule.path} includes ${snippetLabel}: ${requiredSnippet}`);
|
|
50
|
-
} else {
|
|
51
|
-
fail(`${coverageRule.path} is missing ${snippetLabel}: ${requiredSnippet}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export async function validateTerminologyMapping(context) {
|
|
58
|
-
const { ROOT_DIR, fileExists, readTextFile, pass, fail } = context;
|
|
59
|
-
|
|
60
|
-
console.log('\nChecking terminology mapping consistency...');
|
|
61
|
-
|
|
62
|
-
for (const terminologyReferencePath of TERMINOLOGY_REFERENCE_PATHS) {
|
|
63
|
-
const absoluteReferencePath = join(ROOT_DIR, terminologyReferencePath);
|
|
64
|
-
|
|
65
|
-
if (!(await fileExists(absoluteReferencePath))) {
|
|
66
|
-
fail(`Missing terminology reference source: ${terminologyReferencePath}`);
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const referenceContent = await readTextFile(absoluteReferencePath);
|
|
71
|
-
|
|
72
|
-
if (referenceContent.includes('Terminology Mapping (Final)')) {
|
|
73
|
-
pass(`${terminologyReferencePath} includes Terminology Mapping (Final)`);
|
|
74
|
-
} else {
|
|
75
|
-
fail(`${terminologyReferencePath} must include Terminology Mapping (Final)`);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
for (const terminologyRowRule of REQUIRED_TERMINOLOGY_ROW_PATTERNS) {
|
|
79
|
-
if (terminologyRowRule.pattern.test(referenceContent)) {
|
|
80
|
-
pass(`${terminologyReferencePath} includes mapping row: ${terminologyRowRule.label}`);
|
|
81
|
-
} else {
|
|
82
|
-
fail(`${terminologyReferencePath} is missing mapping row: ${terminologyRowRule.label}`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (referenceContent.includes(REQUIRED_TERMINOLOGY_RULE_SNIPPET)) {
|
|
87
|
-
pass(`${terminologyReferencePath} includes first-mention canonical term rule`);
|
|
88
|
-
} else {
|
|
89
|
-
fail(`${terminologyReferencePath} must include first-mention canonical term rule`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
for (const firstMentionRule of REQUIRED_DEVELOPER_FIRST_MENTION_PATTERNS) {
|
|
94
|
-
const absoluteFirstMentionPath = join(ROOT_DIR, firstMentionRule.path);
|
|
95
|
-
|
|
96
|
-
if (!(await fileExists(absoluteFirstMentionPath))) {
|
|
97
|
-
fail(`Missing developer-facing first-mention source: ${firstMentionRule.path}`);
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const firstMentionContent = await readTextFile(absoluteFirstMentionPath);
|
|
102
|
-
if (firstMentionRule.pattern.test(firstMentionContent)) {
|
|
103
|
-
pass(`${firstMentionRule.path} keeps first-mention rule: ${firstMentionRule.label}`);
|
|
104
|
-
} else {
|
|
105
|
-
fail(`${firstMentionRule.path} must keep first-mention rule: ${firstMentionRule.label}`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
for (const compliancePath of COMPLIANCE_TERMINOLOGY_BOUNDARY_PATHS) {
|
|
110
|
-
const absoluteCompliancePath = join(ROOT_DIR, compliancePath);
|
|
111
|
-
|
|
112
|
-
if (!(await fileExists(absoluteCompliancePath))) {
|
|
113
|
-
fail(`Missing compliance/audit artifact for terminology boundary: ${compliancePath}`);
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const complianceContent = await readTextFile(absoluteCompliancePath);
|
|
118
|
-
for (const aliasTerm of COMPLIANCE_ALIAS_TERMS) {
|
|
119
|
-
if (complianceContent.includes(aliasTerm)) {
|
|
120
|
-
fail(`${compliancePath} must not use developer-facing alias in compliance context: ${aliasTerm}`);
|
|
121
|
-
} else {
|
|
122
|
-
pass(`${compliancePath} keeps canonical terminology boundary for alias: ${aliasTerm}`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
for (const complianceRule of REQUIRED_COMPLIANCE_CANONICAL_SNIPPETS) {
|
|
128
|
-
const absoluteComplianceRulePath = join(ROOT_DIR, complianceRule.path);
|
|
129
|
-
|
|
130
|
-
if (!(await fileExists(absoluteComplianceRulePath))) {
|
|
131
|
-
fail(`Missing compliance canonical source: ${complianceRule.path}`);
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const complianceRuleContent = await readTextFile(absoluteComplianceRulePath);
|
|
136
|
-
if (complianceRuleContent.includes(complianceRule.snippet)) {
|
|
137
|
-
pass(`${complianceRule.path} keeps canonical terminology rule: ${complianceRule.label}`);
|
|
138
|
-
} else {
|
|
139
|
-
fail(`${complianceRule.path} must keep canonical terminology rule: ${complianceRule.label}`);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export async function validateDetectionTransparencyCoverage(context) {
|
|
145
|
-
await validateSnippetCoverage({
|
|
146
|
-
heading: 'Checking existing-project detection transparency coverage...',
|
|
147
|
-
coverageRules: REQUIRED_DETECTION_TRANSPARENCY_SNIPPETS,
|
|
148
|
-
missingLabel: 'detection transparency source',
|
|
149
|
-
snippetLabel: 'detection transparency snippet',
|
|
150
|
-
context,
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export async function validateStackDecisionBoundaryCoverage(context) {
|
|
155
|
-
await validateSnippetCoverage({
|
|
156
|
-
heading: 'Checking stack decision boundary coverage...',
|
|
157
|
-
coverageRules: REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS,
|
|
158
|
-
missingLabel: 'stack decision boundary source',
|
|
159
|
-
snippetLabel: 'stack decision boundary snippet',
|
|
160
|
-
context,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export async function validateUniversalSopConsolidationCoverage(context) {
|
|
165
|
-
await validateSnippetCoverage({
|
|
166
|
-
heading: 'Checking Universal SOP consolidation coverage...',
|
|
167
|
-
coverageRules: REQUIRED_UNIVERSAL_SOP_SNIPPETS,
|
|
168
|
-
missingLabel: 'Universal SOP source',
|
|
169
|
-
snippetLabel: 'Universal SOP snippet',
|
|
170
|
-
context,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export async function validateDiagramFormatCoverage(context) {
|
|
175
|
-
await validateSnippetCoverage({
|
|
176
|
-
heading: 'Checking documentation diagram format coverage...',
|
|
177
|
-
coverageRules: REQUIRED_DIAGRAM_FORMAT_SNIPPETS,
|
|
178
|
-
missingLabel: 'diagram format source',
|
|
179
|
-
snippetLabel: 'diagram format snippet',
|
|
180
|
-
context,
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export async function validateTemplateFreeBootstrapCoverage(context) {
|
|
185
|
-
const { ROOT_DIR, fileExists, readTextFile, pass, fail } = context;
|
|
186
|
-
|
|
187
|
-
console.log('\nChecking template-free dynamic bootstrap coverage...');
|
|
188
|
-
|
|
189
|
-
for (const coverageRule of REQUIRED_TEMPLATE_FREE_BOOTSTRAP_SNIPPETS) {
|
|
190
|
-
const absoluteCoveragePath = join(ROOT_DIR, coverageRule.path);
|
|
191
|
-
|
|
192
|
-
if (!(await fileExists(absoluteCoveragePath))) {
|
|
193
|
-
fail(`Missing template-free bootstrap source: ${coverageRule.path}`);
|
|
194
|
-
continue;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
const coverageContent = await readTextFile(absoluteCoveragePath);
|
|
198
|
-
for (const requiredSnippet of coverageRule.snippets) {
|
|
199
|
-
if (coverageContent.includes(requiredSnippet)) {
|
|
200
|
-
pass(`${coverageRule.path} includes template-free bootstrap snippet: ${requiredSnippet}`);
|
|
201
|
-
} else {
|
|
202
|
-
fail(`${coverageRule.path} is missing template-free bootstrap snippet: ${requiredSnippet}`);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
for (const forbiddenRule of FORBIDDEN_TEMPLATE_BOOTSTRAP_SNIPPETS) {
|
|
208
|
-
const absoluteForbiddenPath = join(ROOT_DIR, forbiddenRule.path);
|
|
209
|
-
|
|
210
|
-
if (!(await fileExists(absoluteForbiddenPath))) {
|
|
211
|
-
fail(`Missing template-free bootstrap source: ${forbiddenRule.path}`);
|
|
212
|
-
continue;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const forbiddenContent = await readTextFile(absoluteForbiddenPath);
|
|
216
|
-
for (const forbiddenSnippet of forbiddenRule.snippets) {
|
|
217
|
-
if (forbiddenContent.includes(forbiddenSnippet)) {
|
|
218
|
-
fail(`${forbiddenRule.path} must not include active template snippet: ${forbiddenSnippet}`);
|
|
219
|
-
} else {
|
|
220
|
-
pass(`${forbiddenRule.path} excludes active template snippet: ${forbiddenSnippet}`);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export async function validateUpgradeUiContractWarningCoverage(context) {
|
|
227
|
-
await validateSnippetCoverage({
|
|
228
|
-
heading: 'Checking upgrade UI contract warning coverage...',
|
|
229
|
-
coverageRules: REQUIRED_UPGRADE_UI_CONTRACT_WARNING_SNIPPETS,
|
|
230
|
-
missingLabel: 'upgrade UI contract warning source',
|
|
231
|
-
snippetLabel: 'upgrade UI contract warning snippet',
|
|
232
|
-
context,
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export async function validateUiDesignAutomationCoverage(context) {
|
|
237
|
-
await validateSnippetCoverage({
|
|
238
|
-
heading: 'Checking UI design automation coverage...',
|
|
239
|
-
coverageRules: REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS,
|
|
240
|
-
missingLabel: 'UI design automation source',
|
|
241
|
-
snippetLabel: 'UI design automation snippet',
|
|
242
|
-
context,
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export async function validateDockerRuntimeAutomationCoverage(context) {
|
|
247
|
-
await validateSnippetCoverage({
|
|
248
|
-
heading: 'Checking Docker runtime automation coverage...',
|
|
249
|
-
coverageRules: REQUIRED_DOCKER_RUNTIME_AUTOMATION_SNIPPETS,
|
|
250
|
-
missingLabel: 'Docker runtime automation source',
|
|
251
|
-
snippetLabel: 'Docker runtime automation snippet',
|
|
252
|
-
context,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export async function validateDependencyFreshnessAutomationCoverage(context) {
|
|
257
|
-
await validateSnippetCoverage({
|
|
258
|
-
heading: 'Checking dependency freshness automation coverage...',
|
|
259
|
-
coverageRules: REQUIRED_DEPENDENCY_FRESHNESS_AUTOMATION_SNIPPETS,
|
|
260
|
-
missingLabel: 'dependency freshness automation source',
|
|
261
|
-
snippetLabel: 'dependency freshness automation snippet',
|
|
262
|
-
context,
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export async function validateDeterministicBoundaryEnforcementCoverage(context) {
|
|
267
|
-
await validateSnippetCoverage({
|
|
268
|
-
heading: 'Checking deterministic boundary enforcement coverage...',
|
|
269
|
-
coverageRules: REQUIRED_DETERMINISTIC_BOUNDARY_ENFORCEMENT_SNIPPETS,
|
|
270
|
-
missingLabel: 'deterministic boundary source',
|
|
271
|
-
snippetLabel: 'deterministic boundary snippet',
|
|
272
|
-
context,
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export async function validateRulesOnlyActiveSurfaceCoverage(context) {
|
|
277
|
-
const { ROOT_DIR, fileExists, readTextFile, pass, fail } = context;
|
|
278
|
-
|
|
279
|
-
console.log('\nChecking rules-only active surface cleanup...');
|
|
280
|
-
|
|
281
|
-
for (const forbiddenRule of FORBIDDEN_ACTIVE_BIAS_ANCHOR_SNIPPETS) {
|
|
282
|
-
const absoluteForbiddenPath = join(ROOT_DIR, forbiddenRule.path);
|
|
283
|
-
|
|
284
|
-
if (!(await fileExists(absoluteForbiddenPath))) {
|
|
285
|
-
fail(`Missing rules-only active surface source: ${forbiddenRule.path}`);
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
const forbiddenContent = await readTextFile(absoluteForbiddenPath);
|
|
290
|
-
for (const forbiddenSnippet of forbiddenRule.snippets) {
|
|
291
|
-
if (forbiddenContent.includes(forbiddenSnippet)) {
|
|
292
|
-
fail(`${forbiddenRule.path} must not include active bias-anchor snippet: ${forbiddenSnippet}`);
|
|
293
|
-
} else {
|
|
294
|
-
pass(`${forbiddenRule.path} excludes active bias-anchor snippet: ${forbiddenSnippet}`);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export async function validateHumanWritingGovernance(context) {
|
|
301
|
-
const { ROOT_DIR, fileExists, readTextFile, pass, fail } = context;
|
|
302
|
-
|
|
303
|
-
console.log('\nChecking human writing governance...');
|
|
304
|
-
|
|
305
|
-
const disallowedEmojiPattern = /[\u2705\u274C\u26A0\u{1F4CC}\u{1F536}\u{1F4CE}\u{1F534}\u{1F7E0}\u{1F7E1}\u{1F7E2}]/u;
|
|
306
|
-
|
|
307
|
-
for (const formalArtifactPath of FORMAL_ARTIFACT_PATHS) {
|
|
308
|
-
const absoluteFormalArtifactPath = join(ROOT_DIR, formalArtifactPath);
|
|
309
|
-
|
|
310
|
-
if (!(await fileExists(absoluteFormalArtifactPath))) {
|
|
311
|
-
fail(`Missing formal artifact for writing governance: ${formalArtifactPath}`);
|
|
312
|
-
continue;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
const formalArtifactContent = await readTextFile(absoluteFormalArtifactPath);
|
|
316
|
-
if (disallowedEmojiPattern.test(formalArtifactContent)) {
|
|
317
|
-
fail(`${formalArtifactPath} contains disallowed emoji symbols in formal text`);
|
|
318
|
-
} else {
|
|
319
|
-
pass(`${formalArtifactPath} has no disallowed emoji symbols`);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
for (const snippetRule of REQUIRED_HUMAN_WRITING_SNIPPETS) {
|
|
324
|
-
const absoluteRulePath = join(ROOT_DIR, snippetRule.path);
|
|
325
|
-
if (!(await fileExists(absoluteRulePath))) {
|
|
326
|
-
fail(`Missing writing governance source: ${snippetRule.path}`);
|
|
327
|
-
continue;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
const writingRuleContent = await readTextFile(absoluteRulePath);
|
|
331
|
-
for (const requiredSnippet of snippetRule.snippets) {
|
|
332
|
-
if (writingRuleContent.includes(requiredSnippet)) {
|
|
333
|
-
pass(`${snippetRule.path} includes writing governance snippet: ${requiredSnippet}`);
|
|
334
|
-
} else {
|
|
335
|
-
fail(`${snippetRule.path} is missing writing governance snippet: ${requiredSnippet}`);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export async function validateInstructionAdapters(context) {
|
|
342
|
-
const {
|
|
343
|
-
ROOT_DIR,
|
|
344
|
-
CANONICAL_INSTRUCTION_PATH,
|
|
345
|
-
fileExists,
|
|
346
|
-
readTextFile,
|
|
347
|
-
normalizeLineEndings,
|
|
348
|
-
pass,
|
|
349
|
-
fail,
|
|
350
|
-
} = context;
|
|
351
|
-
|
|
352
|
-
console.log('\nChecking instruction adapter consolidation...');
|
|
353
|
-
|
|
354
|
-
const canonicalInstructionContent = normalizeLineEndings(await readTextFile(CANONICAL_INSTRUCTION_PATH));
|
|
355
|
-
const requiredBootstrapReceiptSnippets = [
|
|
356
|
-
'Bootstrap Receipt',
|
|
357
|
-
'loaded_files',
|
|
358
|
-
'selected_rules',
|
|
359
|
-
'skipped_rules',
|
|
360
|
-
'unreachable_files',
|
|
361
|
-
'validation_plan',
|
|
362
|
-
];
|
|
363
|
-
const instructionFootprintLimits = [
|
|
364
|
-
{ path: 'AGENTS.md', maxLines: 180 },
|
|
365
|
-
{ path: '.agent-context/prompts/bootstrap-design.md', maxLines: 80 },
|
|
366
|
-
{ path: '.agent-context/rules/frontend-architecture.md', maxLines: 180 },
|
|
367
|
-
];
|
|
368
|
-
|
|
369
|
-
for (const requiredBootstrapReceiptSnippet of requiredBootstrapReceiptSnippets) {
|
|
370
|
-
if (canonicalInstructionContent.includes(requiredBootstrapReceiptSnippet)) {
|
|
371
|
-
pass(`AGENTS.md includes bootstrap receipt snippet: ${requiredBootstrapReceiptSnippet}`);
|
|
372
|
-
} else {
|
|
373
|
-
fail(`AGENTS.md is missing bootstrap receipt snippet: ${requiredBootstrapReceiptSnippet}`);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
for (const footprintLimit of instructionFootprintLimits) {
|
|
380
|
-
const absoluteFootprintPath = join(ROOT_DIR, footprintLimit.path);
|
|
381
|
-
if (!(await fileExists(absoluteFootprintPath))) {
|
|
382
|
-
fail(`Missing instruction footprint source: ${footprintLimit.path}`);
|
|
383
|
-
continue;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
const footprintContent = await readTextFile(absoluteFootprintPath);
|
|
387
|
-
const footprintLineCount = footprintContent.split(/\r?\n/u).length;
|
|
388
|
-
if (footprintLineCount <= footprintLimit.maxLines) {
|
|
389
|
-
pass(`${footprintLimit.path} stays compact (${footprintLineCount}/${footprintLimit.maxLines} lines)`);
|
|
390
|
-
} else {
|
|
391
|
-
fail(`${footprintLimit.path} is too long for the active instruction surface (${footprintLineCount}/${footprintLimit.maxLines} lines)`);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
for (const thinAdapterPath of THIN_ADAPTER_PATHS) {
|
|
396
|
-
const absoluteAdapterPath = join(ROOT_DIR, thinAdapterPath);
|
|
397
|
-
|
|
398
|
-
if (!(await fileExists(absoluteAdapterPath))) {
|
|
399
|
-
fail(`Missing thin adapter file: ${thinAdapterPath}`);
|
|
400
|
-
continue;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
const thinAdapterContent = await readTextFile(absoluteAdapterPath);
|
|
404
|
-
|
|
405
|
-
if (thinAdapterContent.trim() === '@AGENTS.md') {
|
|
406
|
-
pass(`${thinAdapterPath} imports AGENTS.md`);
|
|
407
|
-
} else {
|
|
408
|
-
fail(`${thinAdapterPath} must be exactly @AGENTS.md`);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
const thinAdapterLineCount = thinAdapterContent.split(/\r?\n/u).length;
|
|
412
|
-
if (thinAdapterLineCount <= 2) {
|
|
413
|
-
pass(`${thinAdapterPath} remains thin (${thinAdapterLineCount} lines)`);
|
|
414
|
-
} else {
|
|
415
|
-
fail(`${thinAdapterPath} is too large for thin-adapter mode (${thinAdapterLineCount} lines)`);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
export async function validateSkillPurgeSurface(context) {
|
|
421
|
-
const { ROOT_DIR, AGENT_CONTEXT_DIR, fileExists, pass, fail } = context;
|
|
422
|
-
|
|
423
|
-
console.log('\nChecking skill and tier purge surface...');
|
|
424
|
-
|
|
425
|
-
const skillDirectoryPath = join(AGENT_CONTEXT_DIR, 'skills');
|
|
426
|
-
if (await fileExists(skillDirectoryPath)) {
|
|
427
|
-
fail('Skills directory must be removed: .agent-context/skills');
|
|
428
|
-
} else {
|
|
429
|
-
pass('Skills directory removed: .agent-context/skills');
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
const retiredFiles = [
|
|
433
|
-
join(ROOT_DIR, 'lib', 'cli', 'skill-selector.mjs'),
|
|
434
|
-
join(ROOT_DIR, 'scripts', 'skill-tier-policy.mjs'),
|
|
435
|
-
join(ROOT_DIR, 'scripts', 'trust-scorer.mjs'),
|
|
436
|
-
];
|
|
437
|
-
|
|
438
|
-
for (const retiredFilePath of retiredFiles) {
|
|
439
|
-
const relativeRetiredPath = relative(ROOT_DIR, retiredFilePath).replace(/\\/g, '/');
|
|
440
|
-
if (await fileExists(retiredFilePath)) {
|
|
441
|
-
fail(`Retired file still present: ${relativeRetiredPath}`);
|
|
442
|
-
} else {
|
|
443
|
-
pass(`Retired file removed: ${relativeRetiredPath}`);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { join } from 'node:path';
|
|
2
|
-
import { readdir } from 'node:fs/promises';
|
|
3
|
-
|
|
4
|
-
export async function validateRequiredFiles(context) {
|
|
5
|
-
const { ROOT_DIR, fileExists, pass, fail } = context;
|
|
6
|
-
console.log('\nChecking required files...');
|
|
7
|
-
|
|
8
|
-
const requiredFiles = [
|
|
9
|
-
'bin/agentic-senior-core.js',
|
|
10
|
-
'scripts/validate.mjs',
|
|
11
|
-
'scripts/llm-judge.mjs',
|
|
12
|
-
'scripts/detection-benchmark.mjs',
|
|
13
|
-
'scripts/benchmark-evidence-bundle.mjs',
|
|
14
|
-
'scripts/benchmark-writer-judge-matrix.mjs',
|
|
15
|
-
'scripts/benchmark-gate.mjs',
|
|
16
|
-
'scripts/benchmark-intelligence.mjs',
|
|
17
|
-
'scripts/memory-continuity-benchmark.mjs',
|
|
18
|
-
'scripts/docs-quality-drift-report.mjs',
|
|
19
|
-
'scripts/governance-weekly-report.mjs',
|
|
20
|
-
'scripts/mcp-server.mjs',
|
|
21
|
-
'scripts/mcp-server/constants.mjs',
|
|
22
|
-
'scripts/mcp-server/tool-registry.mjs',
|
|
23
|
-
'scripts/mcp-server/tools.mjs',
|
|
24
|
-
'scripts/frontend-usability-audit.mjs',
|
|
25
|
-
'scripts/ui-design-judge.mjs',
|
|
26
|
-
'scripts/documentation-boundary-audit.mjs',
|
|
27
|
-
'scripts/context-triggered-audit.mjs',
|
|
28
|
-
'scripts/rules-guardian-audit.mjs',
|
|
29
|
-
'scripts/explain-on-demand-audit.mjs',
|
|
30
|
-
'scripts/single-source-lazy-loading-audit.mjs',
|
|
31
|
-
'scripts/audit-cache-layer-contract.mjs',
|
|
32
|
-
'scripts/audit-typography-palette-anti-repeat.mjs',
|
|
33
|
-
'lib/cli/audits/typography-palette-anti-repeat-audit.mjs',
|
|
34
|
-
'lib/cli/commands/audit-design-anti-repeat.mjs',
|
|
35
|
-
'scripts/sync-thin-adapters.mjs',
|
|
36
|
-
'scripts/release-gate.mjs',
|
|
37
|
-
'scripts/generate-sbom.mjs',
|
|
38
|
-
'.agent-context/policies/llm-judge-threshold.json',
|
|
39
|
-
'.agent-context/prompts/compact-natural-mode.md',
|
|
40
|
-
'mcp.json',
|
|
41
|
-
'AGENTS.md',
|
|
42
|
-
'CLAUDE.md',
|
|
43
|
-
'GEMINI.md',
|
|
44
|
-
'README.md',
|
|
45
|
-
'CHANGELOG.md',
|
|
46
|
-
'docs/doc-index.md',
|
|
47
|
-
'docs/project-brief.md',
|
|
48
|
-
'docs/flow-overview.md',
|
|
49
|
-
'docs/api-contract.md',
|
|
50
|
-
'docs/faq.md',
|
|
51
|
-
'docs/deep-dive.md',
|
|
52
|
-
'docs/archive/HISTORY.md',
|
|
53
|
-
'docs/archive/CHANGELOG-archive.md',
|
|
54
|
-
'.agent-context/state/benchmark-reproducibility.json',
|
|
55
|
-
'.agent-context/state/benchmark-writer-judge-config.json',
|
|
56
|
-
'.agent-context/state/memory-schema-v1.json',
|
|
57
|
-
'.agent-context/state/memory-adapter-contract.json',
|
|
58
|
-
'.vscode/mcp.json',
|
|
59
|
-
'.github/workflows/release-gate.yml',
|
|
60
|
-
'.github/workflows/sbom-compliance.yml',
|
|
61
|
-
'.github/workflows/benchmark-intelligence.yml',
|
|
62
|
-
'.github/workflows/docs-quality-drift-report.yml',
|
|
63
|
-
'.github/workflows/governance-weekly-report.yml',
|
|
64
|
-
'tests/cli-smoke.test.mjs',
|
|
65
|
-
'tests/mcp-server.test.mjs',
|
|
66
|
-
'tests/llm-judge.test.mjs',
|
|
67
|
-
'tests/operations.test.mjs',
|
|
68
|
-
'LICENSE',
|
|
69
|
-
'.gitignore',
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
for (const requiredFilePath of requiredFiles) {
|
|
73
|
-
const absoluteRequiredFilePath = join(ROOT_DIR, requiredFilePath);
|
|
74
|
-
|
|
75
|
-
if (await fileExists(absoluteRequiredFilePath)) {
|
|
76
|
-
pass(requiredFilePath);
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
fail(`Missing required file: ${requiredFilePath}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export async function validateRuleFiles(context) {
|
|
85
|
-
const { AGENT_CONTEXT_DIR, fileExists, readTextFile, pass, fail } = context;
|
|
86
|
-
console.log('\nChecking rule, checklist, prompt, and state files...');
|
|
87
|
-
|
|
88
|
-
const expectedPaths = [
|
|
89
|
-
'rules/architecture.md',
|
|
90
|
-
'rules/security.md',
|
|
91
|
-
'rules/performance.md',
|
|
92
|
-
'rules/error-handling.md',
|
|
93
|
-
'rules/testing.md',
|
|
94
|
-
'rules/api-docs.md',
|
|
95
|
-
'rules/microservices.md',
|
|
96
|
-
'rules/event-driven.md',
|
|
97
|
-
'rules/database-design.md',
|
|
98
|
-
'rules/realtime.md',
|
|
99
|
-
'rules/frontend-architecture.md',
|
|
100
|
-
'rules/docker-runtime.md',
|
|
101
|
-
'rules/observability.md',
|
|
102
|
-
'rules/resilience.md',
|
|
103
|
-
'rules/migrations.md',
|
|
104
|
-
'rules/background-jobs.md',
|
|
105
|
-
'rules/config-and-flags.md',
|
|
106
|
-
'rules/api-versioning.md',
|
|
107
|
-
'review-checklists/pr-checklist.md',
|
|
108
|
-
'review-checklists/architecture-review.md',
|
|
109
|
-
'prompts/init-project.md',
|
|
110
|
-
'prompts/compact-natural-mode.md',
|
|
111
|
-
'prompts/bootstrap-design.md',
|
|
112
|
-
'prompts/refactor.md',
|
|
113
|
-
'prompts/review-code.md',
|
|
114
|
-
'state/architecture-map.md',
|
|
115
|
-
'state/dependency-map.md',
|
|
116
|
-
];
|
|
117
|
-
|
|
118
|
-
for (const expectedPath of expectedPaths) {
|
|
119
|
-
const absoluteExpectedPath = join(AGENT_CONTEXT_DIR, expectedPath);
|
|
120
|
-
|
|
121
|
-
if (!(await fileExists(absoluteExpectedPath))) {
|
|
122
|
-
fail(`Missing agent context file: .agent-context/${expectedPath}`);
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const fileContent = await readTextFile(absoluteExpectedPath);
|
|
127
|
-
if (fileContent.trim().length < 100) {
|
|
128
|
-
fail(`Agent context file is suspiciously short: .agent-context/${expectedPath}`);
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
pass(`.agent-context/${expectedPath}`);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export async function validateChecklistConsolidation(context) {
|
|
137
|
-
const { AGENT_CONTEXT_DIR, pass, fail } = context;
|
|
138
|
-
console.log('\nChecking review checklist consolidation...');
|
|
139
|
-
|
|
140
|
-
const reviewChecklistDirectoryPath = join(AGENT_CONTEXT_DIR, 'review-checklists');
|
|
141
|
-
const checklistEntries = await readdir(reviewChecklistDirectoryPath, { withFileTypes: true });
|
|
142
|
-
const checklistFileNames = checklistEntries
|
|
143
|
-
.filter((entry) => entry.isFile() && entry.name.endsWith('.md'))
|
|
144
|
-
.map((entry) => entry.name)
|
|
145
|
-
.sort((leftName, rightName) => leftName.localeCompare(rightName));
|
|
146
|
-
|
|
147
|
-
const expectedChecklistFileNames = ['architecture-review.md', 'pr-checklist.md'];
|
|
148
|
-
|
|
149
|
-
if (checklistFileNames.length <= 2) {
|
|
150
|
-
pass(`Checklist count is consolidated (${checklistFileNames.length}/2)`);
|
|
151
|
-
} else {
|
|
152
|
-
fail(`Checklist count exceeds limit (${checklistFileNames.length}/2): ${checklistFileNames.join(', ')}`);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
for (const expectedChecklistFileName of expectedChecklistFileNames) {
|
|
156
|
-
if (checklistFileNames.includes(expectedChecklistFileName)) {
|
|
157
|
-
pass(`Checklist exists: .agent-context/review-checklists/${expectedChecklistFileName}`);
|
|
158
|
-
} else {
|
|
159
|
-
fail(`Missing consolidated checklist: .agent-context/review-checklists/${expectedChecklistFileName}`);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|