@ryuenn3123/agentic-senior-core 4.4.0 → 5.2.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.
Files changed (201) hide show
  1. package/.agents/plugins/agentic-senior-core/plugin.json +3 -0
  2. package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +131 -0
  3. package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +16 -0
  4. package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +28 -0
  5. package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +35 -0
  6. package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +54 -0
  7. package/.agents/rules/agentic-senior-core.md +131 -0
  8. package/.claude-plugin/marketplace.json +17 -0
  9. package/.claude-plugin/plugin.json +17 -0
  10. package/.clinerules/agentic-senior-core.md +94 -0
  11. package/.codex-plugin/plugin.json +24 -0
  12. package/.cursor/rules/agentic-senior-core.mdc +99 -0
  13. package/.devin-plugin/plugin.json +13 -0
  14. package/.github/copilot-instructions.md +94 -0
  15. package/.github/plugin/marketplace.json +20 -0
  16. package/.github/plugin/plugin.json +16 -0
  17. package/.kiro/steering/agentic-senior-core.md +94 -0
  18. package/.openclaw/skills/asc/SKILL.md +23 -0
  19. package/.openclaw/skills/asc-audit/SKILL.md +28 -0
  20. package/.openclaw/skills/asc-review/SKILL.md +54 -0
  21. package/.opencode/plugins/agentic-senior-core.mjs +31 -0
  22. package/.windsurf/rules/agentic-senior-core.md +94 -0
  23. package/AGENTS.md +126 -127
  24. package/CONTRIBUTING.md +93 -63
  25. package/README.md +190 -110
  26. package/__init__.py +61 -0
  27. package/bin/agentic-senior-core.js +42 -41
  28. package/commands/asc-audit.md +1 -0
  29. package/commands/asc-audit.toml +2 -0
  30. package/commands/asc-help.md +9 -0
  31. package/commands/asc-help.toml +2 -0
  32. package/commands/asc-refactor.md +1 -0
  33. package/commands/asc-refactor.toml +2 -0
  34. package/commands/asc-review.md +1 -0
  35. package/commands/asc-review.toml +2 -0
  36. package/gemini-extension.json +10 -0
  37. package/hooks/copilot-hooks.json +21 -0
  38. package/hooks/hooks.json +31 -0
  39. package/hooks/session-start.js +36 -0
  40. package/hooks/subagent-start.js +38 -0
  41. package/lib/cli/commands/adapter.mjs +109 -0
  42. package/lib/cli/commands/clean.mjs +63 -0
  43. package/lib/cli/commands/status.mjs +94 -0
  44. package/package.json +43 -60
  45. package/plugin.yaml +16 -0
  46. package/scripts/uninstall.js +38 -0
  47. package/skills/asc/SKILL.md +16 -0
  48. package/skills/asc-audit/SKILL.md +28 -0
  49. package/skills/asc-refactor/SKILL.md +35 -0
  50. package/skills/asc-review/SKILL.md +54 -0
  51. package/.agent-context/policies/llm-judge-threshold.json +0 -29
  52. package/.agent-context/prompts/bootstrap-design.md +0 -63
  53. package/.agent-context/prompts/compact-natural-mode.md +0 -100
  54. package/.agent-context/prompts/init-project.md +0 -60
  55. package/.agent-context/prompts/refactor.md +0 -38
  56. package/.agent-context/prompts/review-code.md +0 -31
  57. package/.agent-context/review-checklists/architecture-review.md +0 -57
  58. package/.agent-context/review-checklists/pr-checklist.md +0 -134
  59. package/.agent-context/rules/api-docs.md +0 -24
  60. package/.agent-context/rules/api-versioning.md +0 -16
  61. package/.agent-context/rules/architecture.md +0 -38
  62. package/.agent-context/rules/background-jobs.md +0 -17
  63. package/.agent-context/rules/config-and-flags.md +0 -16
  64. package/.agent-context/rules/database-design.md +0 -18
  65. package/.agent-context/rules/docker-runtime.md +0 -17
  66. package/.agent-context/rules/error-handling.md +0 -16
  67. package/.agent-context/rules/event-driven.md +0 -16
  68. package/.agent-context/rules/frontend-architecture.md +0 -54
  69. package/.agent-context/rules/microservices.md +0 -16
  70. package/.agent-context/rules/migrations.md +0 -16
  71. package/.agent-context/rules/observability.md +0 -16
  72. package/.agent-context/rules/performance.md +0 -16
  73. package/.agent-context/rules/realtime.md +0 -16
  74. package/.agent-context/rules/resilience.md +0 -18
  75. package/.agent-context/rules/security.md +0 -18
  76. package/.agent-context/rules/testing.md +0 -16
  77. package/.agent-context/state/README.md +0 -25
  78. package/.agent-context/state/architecture-map.md +0 -40
  79. package/.agent-context/state/benchmark-comparison-schema.json +0 -181
  80. package/.agent-context/state/benchmark-reproducibility.json +0 -87
  81. package/.agent-context/state/benchmark-thresholds.json +0 -10
  82. package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
  83. package/.agent-context/state/dependency-map.md +0 -41
  84. package/.agent-context/state/memory-adapter-contract.json +0 -52
  85. package/.agent-context/state/memory-schema-v1.json +0 -88
  86. package/GEMINI.md +0 -1
  87. package/benchmarks/README.md +0 -60
  88. package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
  89. package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
  90. package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
  91. package/lib/cli/adaptive-context/catalog.mjs +0 -394
  92. package/lib/cli/adaptive-context/file-signals.mjs +0 -100
  93. package/lib/cli/adaptive-context/implications.mjs +0 -44
  94. package/lib/cli/adaptive-context.mjs +0 -151
  95. package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
  96. package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
  97. package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
  98. package/lib/cli/backup.mjs +0 -210
  99. package/lib/cli/commands/context.mjs +0 -140
  100. package/lib/cli/commands/init/project-context.mjs +0 -60
  101. package/lib/cli/commands/init/runtime-environment.mjs +0 -59
  102. package/lib/cli/commands/init/setup-decisions.mjs +0 -83
  103. package/lib/cli/commands/init.mjs +0 -654
  104. package/lib/cli/commands/launch.mjs +0 -76
  105. package/lib/cli/commands/optimize.mjs +0 -284
  106. package/lib/cli/commands/rollback.mjs +0 -64
  107. package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
  108. package/lib/cli/commands/upgrade.mjs +0 -451
  109. package/lib/cli/compiler.mjs +0 -187
  110. package/lib/cli/constants.mjs +0 -136
  111. package/lib/cli/detector/constants.mjs +0 -135
  112. package/lib/cli/detector/design-evidence/collector.mjs +0 -256
  113. package/lib/cli/detector/design-evidence/constants.mjs +0 -39
  114. package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
  115. package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
  116. package/lib/cli/detector/design-evidence/summary.mjs +0 -109
  117. package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
  118. package/lib/cli/detector/design-evidence.mjs +0 -25
  119. package/lib/cli/detector/stack-detection.mjs +0 -243
  120. package/lib/cli/detector/ui-signals.mjs +0 -150
  121. package/lib/cli/detector/workspace-scan.mjs +0 -177
  122. package/lib/cli/detector.mjs +0 -23
  123. package/lib/cli/init-detection-flow.mjs +0 -48
  124. package/lib/cli/init-options.mjs +0 -237
  125. package/lib/cli/init-selection.mjs +0 -29
  126. package/lib/cli/memory-continuity.mjs +0 -537
  127. package/lib/cli/preflight.mjs +0 -76
  128. package/lib/cli/project-scaffolder/constants.mjs +0 -69
  129. package/lib/cli/project-scaffolder/discovery.mjs +0 -272
  130. package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
  131. package/lib/cli/project-scaffolder/storage.mjs +0 -144
  132. package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
  133. package/lib/cli/project-scaffolder.mjs +0 -29
  134. package/lib/cli/rollback.mjs +0 -66
  135. package/lib/cli/token-optimization.mjs +0 -401
  136. package/lib/cli/utils/filesystem.mjs +0 -81
  137. package/lib/cli/utils/managed-surface.mjs +0 -280
  138. package/lib/cli/utils/prompting.mjs +0 -44
  139. package/lib/cli/utils.mjs +0 -479
  140. package/mcp.json +0 -134
  141. package/scripts/adaptive-context/fixtures.mjs +0 -183
  142. package/scripts/adaptive-context-benchmark.mjs +0 -9
  143. package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
  144. package/scripts/benchmark-evidence-bundle.mjs +0 -645
  145. package/scripts/benchmark-gate.mjs +0 -121
  146. package/scripts/benchmark-intelligence.mjs +0 -33
  147. package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
  148. package/scripts/build-release-benchmark-bundle.mjs +0 -202
  149. package/scripts/bump-version.mjs +0 -103
  150. package/scripts/clean-local-artifacts.mjs +0 -78
  151. package/scripts/compact-natural-mode-benchmark.mjs +0 -9
  152. package/scripts/context-triggered-audit.mjs +0 -391
  153. package/scripts/detection-benchmark.mjs +0 -127
  154. package/scripts/docs-quality-drift-report.mjs +0 -358
  155. package/scripts/documentation-boundary-audit.mjs +0 -305
  156. package/scripts/explain-on-demand-audit.mjs +0 -427
  157. package/scripts/forbidden-content-check.mjs +0 -123
  158. package/scripts/frontend-usability-audit.mjs +0 -243
  159. package/scripts/generate-sbom.mjs +0 -61
  160. package/scripts/governance-weekly-report.mjs +0 -466
  161. package/scripts/llm-judge/checklist-loader.mjs +0 -45
  162. package/scripts/llm-judge/constants.mjs +0 -66
  163. package/scripts/llm-judge/diff-collection.mjs +0 -74
  164. package/scripts/llm-judge/prompting.mjs +0 -78
  165. package/scripts/llm-judge/providers.mjs +0 -111
  166. package/scripts/llm-judge/verdict.mjs +0 -134
  167. package/scripts/llm-judge.mjs +0 -200
  168. package/scripts/memory-continuity-benchmark.mjs +0 -322
  169. package/scripts/quality-trend-report.mjs +0 -289
  170. package/scripts/release-gate/audit-checks.mjs +0 -441
  171. package/scripts/release-gate/constants.mjs +0 -53
  172. package/scripts/release-gate/runtime.mjs +0 -63
  173. package/scripts/release-gate/static-checks.mjs +0 -182
  174. package/scripts/release-gate.mjs +0 -42
  175. package/scripts/rules-guardian-audit.mjs +0 -580
  176. package/scripts/single-source-lazy-loading-audit.mjs +0 -449
  177. package/scripts/sync-thin-adapters.mjs +0 -72
  178. package/scripts/token-optimization-benchmark.mjs +0 -252
  179. package/scripts/ui-design-judge/constants.mjs +0 -13
  180. package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
  181. package/scripts/ui-design-judge/git-input.mjs +0 -134
  182. package/scripts/ui-design-judge/prompting.mjs +0 -52
  183. package/scripts/ui-design-judge/providers.mjs +0 -102
  184. package/scripts/ui-design-judge/reporting.mjs +0 -183
  185. package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
  186. package/scripts/ui-design-judge/rubric-goldset.json +0 -188
  187. package/scripts/ui-design-judge.mjs +0 -319
  188. package/scripts/ui-rubric-calibration.mjs +0 -35
  189. package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
  190. package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
  191. package/scripts/validate/audits/file-size.mjs +0 -158
  192. package/scripts/validate/audits/reflection-citations.mjs +0 -130
  193. package/scripts/validate/audits/release-bundle.mjs +0 -135
  194. package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
  195. package/scripts/validate/config.mjs +0 -501
  196. package/scripts/validate/coverage-checks.mjs +0 -446
  197. package/scripts/validate/file-structure.mjs +0 -158
  198. package/scripts/validate/markdown-content.mjs +0 -109
  199. package/scripts/validate/project-metadata.mjs +0 -166
  200. package/scripts/validate/utils.mjs +0 -52
  201. package/scripts/validate.mjs +0 -267
@@ -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,158 +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/sync-thin-adapters.mjs',
32
- 'scripts/release-gate.mjs',
33
- 'scripts/generate-sbom.mjs',
34
- '.agent-context/policies/llm-judge-threshold.json',
35
- '.agent-context/prompts/compact-natural-mode.md',
36
- 'mcp.json',
37
- 'AGENTS.md',
38
- 'CLAUDE.md',
39
- 'GEMINI.md',
40
- 'README.md',
41
- 'CHANGELOG.md',
42
- 'docs/doc-index.md',
43
- 'docs/project-brief.md',
44
- 'docs/flow-overview.md',
45
- 'docs/api-contract.md',
46
- 'docs/faq.md',
47
- 'docs/deep-dive.md',
48
- 'docs/archive/HISTORY.md',
49
- 'docs/archive/CHANGELOG-archive.md',
50
- '.agent-context/state/benchmark-reproducibility.json',
51
- '.agent-context/state/benchmark-writer-judge-config.json',
52
- '.agent-context/state/memory-schema-v1.json',
53
- '.agent-context/state/memory-adapter-contract.json',
54
- '.vscode/mcp.json',
55
- '.github/workflows/release-gate.yml',
56
- '.github/workflows/sbom-compliance.yml',
57
- '.github/workflows/benchmark-intelligence.yml',
58
- '.github/workflows/docs-quality-drift-report.yml',
59
- '.github/workflows/governance-weekly-report.yml',
60
- 'tests/cli-smoke.test.mjs',
61
- 'tests/mcp-server.test.mjs',
62
- 'tests/llm-judge.test.mjs',
63
- 'tests/operations.test.mjs',
64
- 'LICENSE',
65
- '.gitignore',
66
- ];
67
-
68
- for (const requiredFilePath of requiredFiles) {
69
- const absoluteRequiredFilePath = join(ROOT_DIR, requiredFilePath);
70
-
71
- if (await fileExists(absoluteRequiredFilePath)) {
72
- pass(requiredFilePath);
73
- continue;
74
- }
75
-
76
- fail(`Missing required file: ${requiredFilePath}`);
77
- }
78
- }
79
-
80
- export async function validateRuleFiles(context) {
81
- const { AGENT_CONTEXT_DIR, fileExists, readTextFile, pass, fail } = context;
82
- console.log('\nChecking rule, checklist, prompt, and state files...');
83
-
84
- const expectedPaths = [
85
- 'rules/architecture.md',
86
- 'rules/security.md',
87
- 'rules/performance.md',
88
- 'rules/error-handling.md',
89
- 'rules/testing.md',
90
- 'rules/api-docs.md',
91
- 'rules/microservices.md',
92
- 'rules/event-driven.md',
93
- 'rules/database-design.md',
94
- 'rules/realtime.md',
95
- 'rules/frontend-architecture.md',
96
- 'rules/docker-runtime.md',
97
- 'rules/observability.md',
98
- 'rules/resilience.md',
99
- 'rules/migrations.md',
100
- 'rules/background-jobs.md',
101
- 'rules/config-and-flags.md',
102
- 'rules/api-versioning.md',
103
- 'review-checklists/pr-checklist.md',
104
- 'review-checklists/architecture-review.md',
105
- 'prompts/init-project.md',
106
- 'prompts/compact-natural-mode.md',
107
- 'prompts/bootstrap-design.md',
108
- 'prompts/refactor.md',
109
- 'prompts/review-code.md',
110
- 'state/architecture-map.md',
111
- 'state/dependency-map.md',
112
- ];
113
-
114
- for (const expectedPath of expectedPaths) {
115
- const absoluteExpectedPath = join(AGENT_CONTEXT_DIR, expectedPath);
116
-
117
- if (!(await fileExists(absoluteExpectedPath))) {
118
- fail(`Missing agent context file: .agent-context/${expectedPath}`);
119
- continue;
120
- }
121
-
122
- const fileContent = await readTextFile(absoluteExpectedPath);
123
- if (fileContent.trim().length < 100) {
124
- fail(`Agent context file is suspiciously short: .agent-context/${expectedPath}`);
125
- continue;
126
- }
127
-
128
- pass(`.agent-context/${expectedPath}`);
129
- }
130
- }
131
-
132
- export async function validateChecklistConsolidation(context) {
133
- const { AGENT_CONTEXT_DIR, pass, fail } = context;
134
- console.log('\nChecking review checklist consolidation...');
135
-
136
- const reviewChecklistDirectoryPath = join(AGENT_CONTEXT_DIR, 'review-checklists');
137
- const checklistEntries = await readdir(reviewChecklistDirectoryPath, { withFileTypes: true });
138
- const checklistFileNames = checklistEntries
139
- .filter((entry) => entry.isFile() && entry.name.endsWith('.md'))
140
- .map((entry) => entry.name)
141
- .sort((leftName, rightName) => leftName.localeCompare(rightName));
142
-
143
- const expectedChecklistFileNames = ['architecture-review.md', 'pr-checklist.md'];
144
-
145
- if (checklistFileNames.length <= 2) {
146
- pass(`Checklist count is consolidated (${checklistFileNames.length}/2)`);
147
- } else {
148
- fail(`Checklist count exceeds limit (${checklistFileNames.length}/2): ${checklistFileNames.join(', ')}`);
149
- }
150
-
151
- for (const expectedChecklistFileName of expectedChecklistFileNames) {
152
- if (checklistFileNames.includes(expectedChecklistFileName)) {
153
- pass(`Checklist exists: .agent-context/review-checklists/${expectedChecklistFileName}`);
154
- } else {
155
- fail(`Missing consolidated checklist: .agent-context/review-checklists/${expectedChecklistFileName}`);
156
- }
157
- }
158
- }