@ryuenn3123/agentic-senior-core 3.0.17 → 3.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +84 -94
  2. package/.agent-context/prompts/init-project.md +32 -100
  3. package/.agent-context/prompts/refactor.md +22 -44
  4. package/.agent-context/prompts/review-code.md +28 -52
  5. package/.agent-context/review-checklists/architecture-review.md +31 -62
  6. package/.agent-context/review-checklists/pr-checklist.md +74 -108
  7. package/.agent-context/rules/api-docs.md +18 -206
  8. package/.agent-context/rules/architecture.md +40 -207
  9. package/.agent-context/rules/database-design.md +10 -199
  10. package/.agent-context/rules/docker-runtime.md +5 -5
  11. package/.agent-context/rules/efficiency-vs-hype.md +11 -149
  12. package/.agent-context/rules/error-handling.md +9 -231
  13. package/.agent-context/rules/event-driven.md +17 -221
  14. package/.agent-context/rules/frontend-architecture.md +66 -119
  15. package/.agent-context/rules/git-workflow.md +1 -1
  16. package/.agent-context/rules/microservices.md +28 -161
  17. package/.agent-context/rules/naming-conv.md +8 -138
  18. package/.agent-context/rules/performance.md +9 -175
  19. package/.agent-context/rules/realtime.md +11 -44
  20. package/.agent-context/rules/security.md +11 -295
  21. package/.agent-context/rules/testing.md +9 -174
  22. package/.agent-context/state/benchmark-analysis.json +3 -3
  23. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  24. package/.agent-context/state/onboarding-report.json +71 -11
  25. package/.agents/workflows/init-project.md +7 -24
  26. package/.agents/workflows/refactor.md +7 -24
  27. package/.agents/workflows/review-code.md +7 -24
  28. package/.cursorrules +22 -21
  29. package/.gemini/instructions.md +2 -2
  30. package/.github/copilot-instructions.md +2 -2
  31. package/.instructions.md +112 -213
  32. package/.windsurfrules +22 -21
  33. package/AGENTS.md +4 -4
  34. package/CONTRIBUTING.md +13 -22
  35. package/README.md +6 -20
  36. package/lib/cli/commands/init.mjs +102 -148
  37. package/lib/cli/commands/launch.mjs +3 -3
  38. package/lib/cli/commands/optimize.mjs +14 -4
  39. package/lib/cli/commands/upgrade.mjs +25 -23
  40. package/lib/cli/compiler.mjs +96 -62
  41. package/lib/cli/constants.mjs +28 -136
  42. package/lib/cli/detector/design-evidence.mjs +189 -6
  43. package/lib/cli/detector.mjs +6 -7
  44. package/lib/cli/init-detection-flow.mjs +10 -93
  45. package/lib/cli/init-selection.mjs +2 -68
  46. package/lib/cli/project-scaffolder/constants.mjs +1 -1
  47. package/lib/cli/project-scaffolder/design-contract.mjs +438 -335
  48. package/lib/cli/project-scaffolder/discovery.mjs +36 -82
  49. package/lib/cli/project-scaffolder/prompt-builders.mjs +55 -63
  50. package/lib/cli/project-scaffolder/storage.mjs +0 -4
  51. package/lib/cli/token-optimization.mjs +1 -1
  52. package/lib/cli/utils.mjs +75 -9
  53. package/package.json +2 -2
  54. package/scripts/detection-benchmark.mjs +4 -15
  55. package/scripts/documentation-boundary-audit.mjs +9 -9
  56. package/scripts/explain-on-demand-audit.mjs +11 -11
  57. package/scripts/forbidden-content-check.mjs +9 -9
  58. package/scripts/frontend-usability-audit.mjs +57 -36
  59. package/scripts/llm-judge.mjs +1 -1
  60. package/scripts/mcp-server/constants.mjs +60 -0
  61. package/scripts/mcp-server/tool-registry.mjs +149 -0
  62. package/scripts/mcp-server/tools.mjs +446 -0
  63. package/scripts/mcp-server.mjs +23 -661
  64. package/scripts/release-gate/audit-checks.mjs +426 -0
  65. package/scripts/release-gate/constants.mjs +53 -0
  66. package/scripts/release-gate/runtime.mjs +63 -0
  67. package/scripts/release-gate/static-checks.mjs +182 -0
  68. package/scripts/release-gate.mjs +13 -794
  69. package/scripts/rules-guardian-audit.mjs +14 -13
  70. package/scripts/single-source-lazy-loading-audit.mjs +3 -3
  71. package/scripts/sync-thin-adapters.mjs +5 -5
  72. package/scripts/ui-design-judge/constants.mjs +24 -0
  73. package/scripts/ui-design-judge/design-execution-summary.mjs +259 -0
  74. package/scripts/ui-design-judge/git-input.mjs +131 -0
  75. package/scripts/ui-design-judge/prompting.mjs +73 -0
  76. package/scripts/ui-design-judge/providers.mjs +102 -0
  77. package/scripts/ui-design-judge/reporting.mjs +182 -0
  78. package/scripts/ui-design-judge/rubric-calibration.mjs +214 -0
  79. package/scripts/ui-design-judge/rubric-goldset.json +188 -0
  80. package/scripts/ui-design-judge.mjs +166 -771
  81. package/scripts/ui-rubric-calibration.mjs +35 -0
  82. package/scripts/validate/config.mjs +198 -55
  83. package/scripts/validate/coverage-checks.mjs +32 -7
  84. package/scripts/validate.mjs +8 -4
  85. package/lib/cli/architect.mjs +0 -431
@@ -0,0 +1,182 @@
1
+ // @ts-check
2
+
3
+ import { existsSync } from 'node:fs';
4
+ import { resolve } from 'node:path';
5
+ import {
6
+ ARCHITECTURE_REVIEW_CHECKLIST_PATH,
7
+ BACKEND_ARCHITECTURE_RULE_PATH,
8
+ BACKEND_REVIEW_CHECKLIST_PATH,
9
+ REFACTOR_PROMPT_PATH,
10
+ REPOSITORY_ROOT,
11
+ REQUIRED_ARCHITECTURE_REVIEW_CHECKLIST_SNIPPETS,
12
+ REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS,
13
+ REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS,
14
+ REQUIRED_REFACTOR_PROMPT_SNIPPETS,
15
+ VERSION_PATTERN,
16
+ } from './constants.mjs';
17
+ import { pushResult, readText } from './runtime.mjs';
18
+
19
+ export function runStaticReleaseChecks(results, diagnostics) {
20
+ const packageJsonPath = 'package.json';
21
+ const changelogPath = 'CHANGELOG.md';
22
+ const roadmapPath = 'docs/roadmap.md';
23
+
24
+ const packageJsonContent = readText(packageJsonPath);
25
+ if (!packageJsonContent) {
26
+ pushResult(results, false, 'package-json-exists', `Missing ${packageJsonPath}`);
27
+ }
28
+
29
+ let packageManifest = null;
30
+ if (packageJsonContent) {
31
+ try {
32
+ packageManifest = JSON.parse(packageJsonContent);
33
+ pushResult(results, true, 'package-json-parse', 'package.json is valid JSON');
34
+ } catch (packageParseError) {
35
+ const parseMessage = packageParseError instanceof Error ? packageParseError.message : 'Unknown parse error';
36
+ pushResult(results, false, 'package-json-parse', `Cannot parse package.json: ${parseMessage}`);
37
+ }
38
+ }
39
+
40
+ const releaseVersion = packageManifest?.version;
41
+ diagnostics.releaseVersion = releaseVersion ?? null;
42
+
43
+ if (!releaseVersion || !VERSION_PATTERN.test(releaseVersion)) {
44
+ pushResult(results, false, 'version-semver', `Invalid package version: ${String(releaseVersion)}`);
45
+ } else {
46
+ pushResult(results, true, 'version-semver', `Version ${releaseVersion} matches x.y.z format`);
47
+ }
48
+
49
+ const changelogContent = readText(changelogPath);
50
+ if (!changelogContent) {
51
+ pushResult(results, false, 'changelog-exists', `Missing ${changelogPath}`);
52
+ } else if (!releaseVersion) {
53
+ pushResult(results, false, 'changelog-version-entry', 'Cannot check changelog because version is invalid');
54
+ } else if (!changelogContent.includes(`## ${releaseVersion} - `)) {
55
+ pushResult(results, false, 'changelog-version-entry', `Missing release header for ${releaseVersion} in CHANGELOG.md`);
56
+ } else {
57
+ pushResult(results, true, 'changelog-version-entry', `Found release header for ${releaseVersion}`);
58
+ }
59
+
60
+ const roadmapContent = readText(roadmapPath);
61
+ if (!roadmapContent) {
62
+ pushResult(results, false, 'roadmap-exists', `Missing ${roadmapPath}`);
63
+ } else if (!roadmapContent.includes('V1.8')) {
64
+ pushResult(results, false, 'roadmap-v18', 'Roadmap does not mention V1.8 release track');
65
+ } else {
66
+ pushResult(results, true, 'roadmap-v18', 'Roadmap includes V1.8 release track');
67
+ }
68
+
69
+ const requiredOperationsFiles = [
70
+ '.agent-context/review-checklists/architecture-review.md',
71
+ 'docs/v1.8-operations-playbook.md',
72
+ '.github/workflows/release-gate.yml',
73
+ '.github/workflows/sbom-compliance.yml',
74
+ '.github/workflows/governance-weekly-report.yml',
75
+ 'scripts/governance-weekly-report.mjs',
76
+ ];
77
+
78
+ for (const requiredOperationsFile of requiredOperationsFiles) {
79
+ const absoluteRequiredPath = resolve(REPOSITORY_ROOT, requiredOperationsFile);
80
+ if (!existsSync(absoluteRequiredPath)) {
81
+ pushResult(results, false, 'required-operations-file', `Missing ${requiredOperationsFile}`);
82
+ continue;
83
+ }
84
+
85
+ pushResult(results, true, 'required-operations-file', `${requiredOperationsFile} is present`);
86
+ }
87
+
88
+ pushResult(
89
+ results,
90
+ true,
91
+ 'compatibility-manifest-coverage',
92
+ 'Skill compatibility manifest gate has been retired in V3 purge mode'
93
+ );
94
+
95
+ const backendArchitectureRuleContent = readText(BACKEND_ARCHITECTURE_RULE_PATH);
96
+ if (!backendArchitectureRuleContent) {
97
+ pushResult(results, false, 'backend-universal-principles-rule-exists', `Missing ${BACKEND_ARCHITECTURE_RULE_PATH}`);
98
+ } else {
99
+ pushResult(results, true, 'backend-universal-principles-rule-exists', `${BACKEND_ARCHITECTURE_RULE_PATH} is present`);
100
+
101
+ const missingBackendArchitectureRuleSnippets = REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS.filter(
102
+ (requiredSnippet) => !backendArchitectureRuleContent.includes(requiredSnippet)
103
+ );
104
+
105
+ if (missingBackendArchitectureRuleSnippets.length === 0) {
106
+ pushResult(results, true, 'backend-universal-principles-rule-coverage', 'Backend universal rule snippets are complete');
107
+ } else {
108
+ pushResult(
109
+ results,
110
+ false,
111
+ 'backend-universal-principles-rule-coverage',
112
+ `Missing backend universal rule snippets: ${missingBackendArchitectureRuleSnippets.join(', ')}`
113
+ );
114
+ }
115
+ }
116
+
117
+ const backendReviewChecklistContent = readText(BACKEND_REVIEW_CHECKLIST_PATH);
118
+ if (!backendReviewChecklistContent) {
119
+ pushResult(results, false, 'backend-universal-principles-checklist-exists', `Missing ${BACKEND_REVIEW_CHECKLIST_PATH}`);
120
+ } else {
121
+ pushResult(results, true, 'backend-universal-principles-checklist-exists', `${BACKEND_REVIEW_CHECKLIST_PATH} is present`);
122
+
123
+ const missingBackendChecklistSnippets = REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS.filter(
124
+ (requiredSnippet) => !backendReviewChecklistContent.includes(requiredSnippet)
125
+ );
126
+
127
+ if (missingBackendChecklistSnippets.length === 0) {
128
+ pushResult(results, true, 'backend-universal-principles-checklist-coverage', 'Backend review checklist snippets are complete');
129
+ } else {
130
+ pushResult(
131
+ results,
132
+ false,
133
+ 'backend-universal-principles-checklist-coverage',
134
+ `Missing backend review checklist snippets: ${missingBackendChecklistSnippets.join(', ')}`
135
+ );
136
+ }
137
+ }
138
+
139
+ const refactorPromptContent = readText(REFACTOR_PROMPT_PATH);
140
+ if (!refactorPromptContent) {
141
+ pushResult(results, false, 'backend-universal-principles-refactor-guidance-exists', `Missing ${REFACTOR_PROMPT_PATH}`);
142
+ } else {
143
+ pushResult(results, true, 'backend-universal-principles-refactor-guidance-exists', `${REFACTOR_PROMPT_PATH} is present`);
144
+
145
+ const missingRefactorPromptSnippets = REQUIRED_REFACTOR_PROMPT_SNIPPETS.filter(
146
+ (requiredSnippet) => !refactorPromptContent.includes(requiredSnippet)
147
+ );
148
+
149
+ if (missingRefactorPromptSnippets.length === 0) {
150
+ pushResult(results, true, 'backend-universal-principles-refactor-guidance-coverage', 'Backend refactor guidance snippets are complete');
151
+ } else {
152
+ pushResult(
153
+ results,
154
+ false,
155
+ 'backend-universal-principles-refactor-guidance-coverage',
156
+ `Missing backend refactor guidance snippets: ${missingRefactorPromptSnippets.join(', ')}`
157
+ );
158
+ }
159
+ }
160
+
161
+ const architectureReviewChecklistContent = readText(ARCHITECTURE_REVIEW_CHECKLIST_PATH);
162
+ if (!architectureReviewChecklistContent) {
163
+ pushResult(results, false, 'architecture-review-checklist-exists', `Missing ${ARCHITECTURE_REVIEW_CHECKLIST_PATH}`);
164
+ } else {
165
+ pushResult(results, true, 'architecture-review-checklist-exists', `${ARCHITECTURE_REVIEW_CHECKLIST_PATH} is present`);
166
+
167
+ const missingArchitectureChecklistSnippets = REQUIRED_ARCHITECTURE_REVIEW_CHECKLIST_SNIPPETS.filter(
168
+ (requiredSnippet) => !architectureReviewChecklistContent.includes(requiredSnippet)
169
+ );
170
+
171
+ if (missingArchitectureChecklistSnippets.length === 0) {
172
+ pushResult(results, true, 'architecture-review-checklist-coverage', 'Architecture review checklist sections are complete');
173
+ } else {
174
+ pushResult(
175
+ results,
176
+ false,
177
+ 'architecture-review-checklist-coverage',
178
+ `Missing architecture review checklist sections: ${missingArchitectureChecklistSnippets.join(', ')}`
179
+ );
180
+ }
181
+ }
182
+ }