@ryuenn3123/agentic-senior-core 2.5.22 → 3.0.2

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 (174) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +22 -0
  2. package/.agent-context/prompts/init-project.md +55 -39
  3. package/.agent-context/prompts/refactor.md +2 -1
  4. package/.agent-context/prompts/review-code.md +3 -2
  5. package/.agent-context/review-checklists/pr-checklist.md +8 -1
  6. package/.agent-context/rules/architecture.md +11 -0
  7. package/.agent-context/rules/frontend-architecture.md +2 -2
  8. package/.agent-context/state/architecture-map.md +1 -1
  9. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  10. package/.agents/workflows/init-project.md +3 -3
  11. package/.agents/workflows/refactor.md +1 -1
  12. package/.agents/workflows/review-code.md +4 -5
  13. package/.cursorrules +27 -71
  14. package/.gemini/instructions.md +6 -7
  15. package/.github/copilot-instructions.md +5 -6
  16. package/.windsurfrules +27 -71
  17. package/AGENTS.md +7 -9
  18. package/CONTRIBUTING.md +18 -31
  19. package/README.md +17 -43
  20. package/bin/agentic-senior-core.js +0 -6
  21. package/lib/cli/commands/init.mjs +113 -650
  22. package/lib/cli/commands/launch.mjs +1 -23
  23. package/lib/cli/commands/rollback.mjs +1 -1
  24. package/lib/cli/commands/upgrade.mjs +47 -28
  25. package/lib/cli/compiler.mjs +77 -72
  26. package/lib/cli/constants.mjs +84 -26
  27. package/lib/cli/init-architecture-flow.mjs +231 -0
  28. package/lib/cli/init-detection-flow.mjs +123 -0
  29. package/lib/cli/init-options.mjs +344 -0
  30. package/lib/cli/init-selection.mjs +100 -0
  31. package/lib/cli/preflight.mjs +1 -1
  32. package/lib/cli/profile-packs.mjs +15 -1
  33. package/lib/cli/project-scaffolder.mjs +18 -154
  34. package/lib/cli/utils.mjs +224 -13
  35. package/mcp.json +19 -19
  36. package/package.json +5 -2
  37. package/scripts/context-triggered-audit.mjs +18 -18
  38. package/scripts/documentation-boundary-audit.mjs +92 -5
  39. package/scripts/forbidden-content-check.mjs +1 -1
  40. package/scripts/frontend-usability-audit.mjs +21 -28
  41. package/scripts/governance-weekly-report.mjs +29 -15
  42. package/scripts/llm-judge.mjs +2 -5
  43. package/scripts/mcp-server.mjs +389 -5
  44. package/scripts/release-gate.mjs +121 -145
  45. package/scripts/sync-thin-adapters.mjs +161 -0
  46. package/scripts/v3-purge-audit.mjs +231 -0
  47. package/scripts/validate-evidence-bundle.mjs +1 -1
  48. package/scripts/validate.mjs +224 -272
  49. package/.agent-context/blueprints/api-nextjs.md +0 -184
  50. package/.agent-context/blueprints/aspnet-api.md +0 -247
  51. package/.agent-context/blueprints/ci-github-actions.md +0 -226
  52. package/.agent-context/blueprints/ci-gitlab.md +0 -200
  53. package/.agent-context/blueprints/fastapi-service.md +0 -210
  54. package/.agent-context/blueprints/go-service.md +0 -217
  55. package/.agent-context/blueprints/graphql-grpc-api.md +0 -51
  56. package/.agent-context/blueprints/infrastructure-as-code.md +0 -62
  57. package/.agent-context/blueprints/kubernetes-manifests.md +0 -76
  58. package/.agent-context/blueprints/laravel-api.md +0 -233
  59. package/.agent-context/blueprints/mobile-app.md +0 -91
  60. package/.agent-context/blueprints/nestjs-logic.md +0 -247
  61. package/.agent-context/blueprints/observability.md +0 -227
  62. package/.agent-context/blueprints/spring-boot-api.md +0 -218
  63. package/.agent-context/profiles/platform.md +0 -13
  64. package/.agent-context/profiles/regulated.md +0 -13
  65. package/.agent-context/profiles/startup.md +0 -13
  66. package/.agent-context/review-checklists/frontend-excellence-rubric.md +0 -73
  67. package/.agent-context/review-checklists/frontend-skill-parity.md +0 -29
  68. package/.agent-context/review-checklists/frontend-usability.md +0 -35
  69. package/.agent-context/review-checklists/marketplace-acceptance.md +0 -60
  70. package/.agent-context/review-checklists/performance-audit.md +0 -71
  71. package/.agent-context/review-checklists/release-operations.md +0 -33
  72. package/.agent-context/review-checklists/security-audit.md +0 -119
  73. package/.agent-context/skills/README.md +0 -63
  74. package/.agent-context/skills/backend/README.md +0 -68
  75. package/.agent-context/skills/backend/architecture.md +0 -361
  76. package/.agent-context/skills/backend/compatibility-manifest.json +0 -8
  77. package/.agent-context/skills/backend/data-access.md +0 -231
  78. package/.agent-context/skills/backend/errors.md +0 -138
  79. package/.agent-context/skills/backend/validation.md +0 -117
  80. package/.agent-context/skills/backend.md +0 -29
  81. package/.agent-context/skills/cli/.evidence/compatibility-manifest.json +0 -5
  82. package/.agent-context/skills/cli/.evidence/sbom-excerpt.json +0 -10
  83. package/.agent-context/skills/cli/.evidence/test-report.json +0 -8
  84. package/.agent-context/skills/cli/CHANGELOG.md +0 -6
  85. package/.agent-context/skills/cli/README.md +0 -56
  86. package/.agent-context/skills/cli/compatibility-manifest.json +0 -8
  87. package/.agent-context/skills/cli/init.md +0 -38
  88. package/.agent-context/skills/cli/output.md +0 -36
  89. package/.agent-context/skills/cli/package.json +0 -5
  90. package/.agent-context/skills/cli/safety-telemetry.md +0 -39
  91. package/.agent-context/skills/cli/tests/.gitkeep +0 -1
  92. package/.agent-context/skills/cli/upgrade.md +0 -38
  93. package/.agent-context/skills/cli.md +0 -32
  94. package/.agent-context/skills/distribution/.evidence/compatibility-manifest.json +0 -9
  95. package/.agent-context/skills/distribution/.evidence/sbom-excerpt.json +0 -6
  96. package/.agent-context/skills/distribution/.evidence/test-report.json +0 -8
  97. package/.agent-context/skills/distribution/CHANGELOG.md +0 -7
  98. package/.agent-context/skills/distribution/README.md +0 -27
  99. package/.agent-context/skills/distribution/compatibility-manifest.json +0 -8
  100. package/.agent-context/skills/distribution/compatibility.md +0 -32
  101. package/.agent-context/skills/distribution/package.json +0 -5
  102. package/.agent-context/skills/distribution/provenance-attestation.md +0 -47
  103. package/.agent-context/skills/distribution/publish.md +0 -37
  104. package/.agent-context/skills/distribution/rollback.md +0 -32
  105. package/.agent-context/skills/distribution/tests/.gitkeep +0 -1
  106. package/.agent-context/skills/distribution.md +0 -32
  107. package/.agent-context/skills/frontend/.evidence/compatibility-manifest.json +0 -9
  108. package/.agent-context/skills/frontend/.evidence/sbom-excerpt.json +0 -6
  109. package/.agent-context/skills/frontend/.evidence/test-report.json +0 -8
  110. package/.agent-context/skills/frontend/CHANGELOG.md +0 -7
  111. package/.agent-context/skills/frontend/README.md +0 -50
  112. package/.agent-context/skills/frontend/accessibility.md +0 -107
  113. package/.agent-context/skills/frontend/compatibility-manifest.json +0 -8
  114. package/.agent-context/skills/frontend/conversion-clarity.md +0 -51
  115. package/.agent-context/skills/frontend/motion.md +0 -67
  116. package/.agent-context/skills/frontend/package.json +0 -5
  117. package/.agent-context/skills/frontend/performance.md +0 -63
  118. package/.agent-context/skills/frontend/responsive-delivery.md +0 -41
  119. package/.agent-context/skills/frontend/tests/.gitkeep +0 -1
  120. package/.agent-context/skills/frontend/ui-architecture.md +0 -128
  121. package/.agent-context/skills/frontend.md +0 -40
  122. package/.agent-context/skills/fullstack/.evidence/compatibility-manifest.json +0 -9
  123. package/.agent-context/skills/fullstack/.evidence/sbom-excerpt.json +0 -6
  124. package/.agent-context/skills/fullstack/.evidence/test-report.json +0 -8
  125. package/.agent-context/skills/fullstack/CHANGELOG.md +0 -7
  126. package/.agent-context/skills/fullstack/README.md +0 -27
  127. package/.agent-context/skills/fullstack/compatibility-manifest.json +0 -8
  128. package/.agent-context/skills/fullstack/contracts.md +0 -53
  129. package/.agent-context/skills/fullstack/end-to-end.md +0 -42
  130. package/.agent-context/skills/fullstack/feature-slicing.md +0 -65
  131. package/.agent-context/skills/fullstack/package.json +0 -5
  132. package/.agent-context/skills/fullstack/release-coordination.md +0 -51
  133. package/.agent-context/skills/fullstack/tests/.gitkeep +0 -1
  134. package/.agent-context/skills/fullstack.md +0 -30
  135. package/.agent-context/skills/index.json +0 -107
  136. package/.agent-context/skills/review-quality/.evidence/compatibility-manifest.json +0 -9
  137. package/.agent-context/skills/review-quality/.evidence/sbom-excerpt.json +0 -6
  138. package/.agent-context/skills/review-quality/.evidence/test-report.json +0 -8
  139. package/.agent-context/skills/review-quality/CHANGELOG.md +0 -7
  140. package/.agent-context/skills/review-quality/README.md +0 -27
  141. package/.agent-context/skills/review-quality/benchmark.md +0 -30
  142. package/.agent-context/skills/review-quality/compatibility-manifest.json +0 -8
  143. package/.agent-context/skills/review-quality/package.json +0 -5
  144. package/.agent-context/skills/review-quality/planning.md +0 -38
  145. package/.agent-context/skills/review-quality/release-decision.md +0 -49
  146. package/.agent-context/skills/review-quality/security.md +0 -34
  147. package/.agent-context/skills/review-quality/tests/.gitkeep +0 -1
  148. package/.agent-context/skills/review-quality.md +0 -34
  149. package/.agent-context/stacks/csharp.md +0 -149
  150. package/.agent-context/stacks/flutter.md +0 -16
  151. package/.agent-context/stacks/go.md +0 -181
  152. package/.agent-context/stacks/java.md +0 -135
  153. package/.agent-context/stacks/php.md +0 -192
  154. package/.agent-context/stacks/python.md +0 -153
  155. package/.agent-context/stacks/react-native.md +0 -16
  156. package/.agent-context/stacks/ruby.md +0 -80
  157. package/.agent-context/stacks/rust.md +0 -86
  158. package/.agent-context/stacks/typescript.md +0 -317
  159. package/.agent-context/state/skill-platform.json +0 -38
  160. package/lib/cli/skill-selector.mjs +0 -232
  161. package/lib/cli/templates/api-contract.md.id.tmpl +0 -143
  162. package/lib/cli/templates/api-contract.md.tmpl +0 -143
  163. package/lib/cli/templates/architecture-decision-record.md.id.tmpl +0 -106
  164. package/lib/cli/templates/architecture-decision-record.md.tmpl +0 -145
  165. package/lib/cli/templates/database-schema.md.id.tmpl +0 -74
  166. package/lib/cli/templates/database-schema.md.tmpl +0 -74
  167. package/lib/cli/templates/flow-overview.md.id.tmpl +0 -118
  168. package/lib/cli/templates/flow-overview.md.tmpl +0 -131
  169. package/lib/cli/templates/project-brief.md.id.tmpl +0 -55
  170. package/lib/cli/templates/project-brief.md.tmpl +0 -79
  171. package/scripts/init-project.ps1 +0 -105
  172. package/scripts/init-project.sh +0 -131
  173. package/scripts/skill-tier-policy.mjs +0 -76
  174. package/scripts/trust-scorer.mjs +0 -119
@@ -0,0 +1,231 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readdir, readFile, stat, writeFile, mkdir } from 'node:fs/promises';
4
+ import { dirname, extname, join, relative, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const SCRIPT_FILE_PATH = fileURLToPath(import.meta.url);
8
+ const ROOT_DIR = resolve(dirname(SCRIPT_FILE_PATH), '..');
9
+ const STATE_OUTPUT_PATH = join(ROOT_DIR, '.agent-context', 'state', 'v3-purge-audit.json');
10
+
11
+ const STATIC_DIRECTORIES = [
12
+ '.agent-context/stacks',
13
+ '.agent-context/blueprints',
14
+ '.agent-context/profiles',
15
+ ];
16
+
17
+ const REFERENCE_TOKENS = [
18
+ '.agent-context/stacks/',
19
+ '.agent-context/blueprints/',
20
+ '.agent-context/profiles/',
21
+ ];
22
+
23
+ const NON_BLOCKING_REFERENCE_FILE_PATHS = new Set([
24
+ '.agent-context/state/v3-purge-audit.json',
25
+ 'scripts/v3-purge-audit.mjs',
26
+ ]);
27
+
28
+ const RUNTIME_BLOCKING_PATH_PATTERNS = [
29
+ /^AGENTS\.md$/,
30
+ /^\.instructions\.md$/,
31
+ /^\.github\/copilot-instructions\.md$/,
32
+ /^\.gemini\/instructions\.md$/,
33
+ /^mcp\.json$/,
34
+ /^lib\//,
35
+ /^scripts\//,
36
+ /^tests\//,
37
+ /^\.agent-context\/prompts\//,
38
+ /^\.agents\/workflows\//,
39
+ /^\.agent-context\/review-checklists\//,
40
+ ];
41
+
42
+ const SKIP_DIRECTORY_NAMES = new Set([
43
+ '.git',
44
+ 'node_modules',
45
+ '.benchmarks',
46
+ '.agentic-backup',
47
+ ]);
48
+
49
+ const TEXT_EXTENSIONS = new Set([
50
+ '.md',
51
+ '.mjs',
52
+ '.js',
53
+ '.json',
54
+ '.yml',
55
+ '.yaml',
56
+ '.txt',
57
+ '.ts',
58
+ '.tsx',
59
+ '.cjs',
60
+ '.sh',
61
+ '.ps1',
62
+ ]);
63
+
64
+ function isTextCandidate(fileName) {
65
+ const extension = extname(fileName).toLowerCase();
66
+ return TEXT_EXTENSIONS.has(extension);
67
+ }
68
+
69
+ async function pathStatOrNull(targetPath) {
70
+ try {
71
+ return await stat(targetPath);
72
+ } catch {
73
+ return null;
74
+ }
75
+ }
76
+
77
+ async function listAllFiles(directoryPath) {
78
+ const discoveredFilePaths = [];
79
+
80
+ async function walk(currentPath) {
81
+ const directoryEntries = await readdir(currentPath, { withFileTypes: true });
82
+
83
+ for (const entry of directoryEntries) {
84
+ if (entry.isDirectory() && SKIP_DIRECTORY_NAMES.has(entry.name)) {
85
+ continue;
86
+ }
87
+
88
+ const entryPath = join(currentPath, entry.name);
89
+
90
+ if (entry.isDirectory()) {
91
+ await walk(entryPath);
92
+ continue;
93
+ }
94
+
95
+ if (!isTextCandidate(entry.name)) {
96
+ continue;
97
+ }
98
+
99
+ discoveredFilePaths.push(entryPath);
100
+ }
101
+ }
102
+
103
+ await walk(directoryPath);
104
+ return discoveredFilePaths;
105
+ }
106
+
107
+ async function collectDirectoryEntryCount(absoluteDirectoryPath) {
108
+ const directoryStats = await pathStatOrNull(absoluteDirectoryPath);
109
+ if (!directoryStats || !directoryStats.isDirectory()) {
110
+ return 0;
111
+ }
112
+
113
+ let fileCount = 0;
114
+
115
+ async function walk(currentPath) {
116
+ const directoryEntries = await readdir(currentPath, { withFileTypes: true });
117
+
118
+ for (const entry of directoryEntries) {
119
+ const entryPath = join(currentPath, entry.name);
120
+ if (entry.isDirectory()) {
121
+ await walk(entryPath);
122
+ continue;
123
+ }
124
+
125
+ fileCount += 1;
126
+ }
127
+ }
128
+
129
+ await walk(absoluteDirectoryPath);
130
+ return fileCount;
131
+ }
132
+
133
+ async function runAudit() {
134
+ const allTextFilePaths = await listAllFiles(ROOT_DIR);
135
+ const matchesByFile = [];
136
+ const tokenMatchCounts = Object.fromEntries(REFERENCE_TOKENS.map((token) => [token, 0]));
137
+ let runtimeBlockingFileCount = 0;
138
+ let documentationReferenceFileCount = 0;
139
+
140
+ function isRuntimeBlockingFile(relativeFilePath) {
141
+ return RUNTIME_BLOCKING_PATH_PATTERNS.some((pattern) => pattern.test(relativeFilePath));
142
+ }
143
+
144
+ for (const absoluteFilePath of allTextFilePaths) {
145
+ const relativeFilePath = relative(ROOT_DIR, absoluteFilePath).replace(/\\/g, '/');
146
+
147
+ if (NON_BLOCKING_REFERENCE_FILE_PATHS.has(relativeFilePath)) {
148
+ continue;
149
+ }
150
+
151
+ const fileContent = await readFile(absoluteFilePath, 'utf8');
152
+
153
+ const matchedTokens = REFERENCE_TOKENS.filter((token) => fileContent.includes(token));
154
+ if (matchedTokens.length === 0) {
155
+ continue;
156
+ }
157
+
158
+ for (const matchedToken of matchedTokens) {
159
+ tokenMatchCounts[matchedToken] += 1;
160
+ }
161
+
162
+ const classification = isRuntimeBlockingFile(relativeFilePath)
163
+ ? 'runtime-blocking'
164
+ : 'documentation-reference';
165
+
166
+ if (classification === 'runtime-blocking') {
167
+ runtimeBlockingFileCount += 1;
168
+ } else {
169
+ documentationReferenceFileCount += 1;
170
+ }
171
+
172
+ matchesByFile.push({
173
+ filePath: relativeFilePath,
174
+ matchedTokens,
175
+ classification,
176
+ });
177
+ }
178
+
179
+ const directoryAudit = [];
180
+ for (const relativeDirectoryPath of STATIC_DIRECTORIES) {
181
+ const absoluteDirectoryPath = join(ROOT_DIR, relativeDirectoryPath);
182
+ const directoryStat = await pathStatOrNull(absoluteDirectoryPath);
183
+
184
+ directoryAudit.push({
185
+ path: relativeDirectoryPath,
186
+ exists: Boolean(directoryStat && directoryStat.isDirectory()),
187
+ fileCount: await collectDirectoryEntryCount(absoluteDirectoryPath),
188
+ });
189
+ }
190
+
191
+ const report = {
192
+ generatedAt: new Date().toISOString(),
193
+ auditName: 'v3-purge-audit',
194
+ source: 'working-tree',
195
+ deletionCandidates: directoryAudit,
196
+ referenceSummary: {
197
+ scannedTextFileCount: allTextFilePaths.length,
198
+ blockingFileCount: matchesByFile.length,
199
+ runtimeBlockingFileCount,
200
+ documentationReferenceFileCount,
201
+ tokenMatchCounts,
202
+ },
203
+ blockingReferences: matchesByFile,
204
+ readyForMassDeletion: runtimeBlockingFileCount === 0,
205
+ nextActions: runtimeBlockingFileCount === 0
206
+ ? [
207
+ documentationReferenceFileCount === 0
208
+ ? 'No runtime blockers detected. Mass deletion can proceed after explicit user confirmation.'
209
+ : 'No runtime blockers detected. Optional docs cleanup can be done after explicit user confirmation for mass deletion.',
210
+ ]
211
+ : [
212
+ 'Refactor blocking references before removing static directories.',
213
+ 'Rerun `npm run audit:v3-purge` and require readyForMassDeletion=true before deletion.',
214
+ ],
215
+ };
216
+
217
+ await mkdir(dirname(STATE_OUTPUT_PATH), { recursive: true });
218
+ await writeFile(STATE_OUTPUT_PATH, JSON.stringify(report, null, 2) + '\n', 'utf8');
219
+
220
+ console.log(JSON.stringify(report, null, 2));
221
+
222
+ if (process.argv.includes('--strict') && !report.readyForMassDeletion) {
223
+ process.exitCode = 1;
224
+ }
225
+ }
226
+
227
+ runAudit().catch((error) => {
228
+ console.error('[FATAL] v3-purge-audit failed');
229
+ console.error(error instanceof Error ? error.stack : String(error));
230
+ process.exitCode = 1;
231
+ });
@@ -13,7 +13,7 @@ export async function validateEvidenceBundle(artifactPath) {
13
13
  if (!stats.isDirectory()) {
14
14
  return { passed: false, error: '.evidence is not a directory' };
15
15
  }
16
- } catch (err) {
16
+ } catch {
17
17
  return { passed: false, error: 'Missing .evidence directory' };
18
18
  }
19
19