@ryuenn3123/agentic-senior-core 2.5.22 → 3.0.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 (173) hide show
  1. package/.agent-context/prompts/init-project.md +5 -5
  2. package/.agent-context/prompts/refactor.md +2 -1
  3. package/.agent-context/prompts/review-code.md +3 -2
  4. package/.agent-context/review-checklists/pr-checklist.md +8 -1
  5. package/.agent-context/rules/architecture.md +11 -0
  6. package/.agent-context/rules/frontend-architecture.md +2 -2
  7. package/.agent-context/state/architecture-map.md +1 -1
  8. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  9. package/.agents/workflows/init-project.md +3 -3
  10. package/.agents/workflows/refactor.md +1 -1
  11. package/.agents/workflows/review-code.md +4 -5
  12. package/.cursorrules +27 -71
  13. package/.gemini/instructions.md +6 -7
  14. package/.github/copilot-instructions.md +5 -6
  15. package/.windsurfrules +27 -71
  16. package/AGENTS.md +7 -9
  17. package/CONTRIBUTING.md +18 -31
  18. package/README.md +21 -4
  19. package/bin/agentic-senior-core.js +0 -6
  20. package/lib/cli/commands/init.mjs +113 -650
  21. package/lib/cli/commands/launch.mjs +1 -23
  22. package/lib/cli/commands/rollback.mjs +1 -1
  23. package/lib/cli/commands/upgrade.mjs +1 -23
  24. package/lib/cli/compiler.mjs +77 -72
  25. package/lib/cli/constants.mjs +84 -26
  26. package/lib/cli/init-architecture-flow.mjs +231 -0
  27. package/lib/cli/init-detection-flow.mjs +123 -0
  28. package/lib/cli/init-options.mjs +344 -0
  29. package/lib/cli/init-selection.mjs +100 -0
  30. package/lib/cli/preflight.mjs +1 -1
  31. package/lib/cli/profile-packs.mjs +15 -1
  32. package/lib/cli/project-scaffolder.mjs +18 -154
  33. package/lib/cli/utils.mjs +16 -12
  34. package/mcp.json +19 -19
  35. package/package.json +5 -2
  36. package/scripts/context-triggered-audit.mjs +18 -18
  37. package/scripts/documentation-boundary-audit.mjs +92 -5
  38. package/scripts/forbidden-content-check.mjs +1 -1
  39. package/scripts/frontend-usability-audit.mjs +21 -28
  40. package/scripts/governance-weekly-report.mjs +29 -15
  41. package/scripts/llm-judge.mjs +2 -5
  42. package/scripts/mcp-server.mjs +389 -5
  43. package/scripts/release-gate.mjs +121 -145
  44. package/scripts/sync-thin-adapters.mjs +161 -0
  45. package/scripts/v3-purge-audit.mjs +231 -0
  46. package/scripts/validate-evidence-bundle.mjs +1 -1
  47. package/scripts/validate.mjs +224 -272
  48. package/.agent-context/blueprints/api-nextjs.md +0 -184
  49. package/.agent-context/blueprints/aspnet-api.md +0 -247
  50. package/.agent-context/blueprints/ci-github-actions.md +0 -226
  51. package/.agent-context/blueprints/ci-gitlab.md +0 -200
  52. package/.agent-context/blueprints/fastapi-service.md +0 -210
  53. package/.agent-context/blueprints/go-service.md +0 -217
  54. package/.agent-context/blueprints/graphql-grpc-api.md +0 -51
  55. package/.agent-context/blueprints/infrastructure-as-code.md +0 -62
  56. package/.agent-context/blueprints/kubernetes-manifests.md +0 -76
  57. package/.agent-context/blueprints/laravel-api.md +0 -233
  58. package/.agent-context/blueprints/mobile-app.md +0 -91
  59. package/.agent-context/blueprints/nestjs-logic.md +0 -247
  60. package/.agent-context/blueprints/observability.md +0 -227
  61. package/.agent-context/blueprints/spring-boot-api.md +0 -218
  62. package/.agent-context/profiles/platform.md +0 -13
  63. package/.agent-context/profiles/regulated.md +0 -13
  64. package/.agent-context/profiles/startup.md +0 -13
  65. package/.agent-context/review-checklists/frontend-excellence-rubric.md +0 -73
  66. package/.agent-context/review-checklists/frontend-skill-parity.md +0 -29
  67. package/.agent-context/review-checklists/frontend-usability.md +0 -35
  68. package/.agent-context/review-checklists/marketplace-acceptance.md +0 -60
  69. package/.agent-context/review-checklists/performance-audit.md +0 -71
  70. package/.agent-context/review-checklists/release-operations.md +0 -33
  71. package/.agent-context/review-checklists/security-audit.md +0 -119
  72. package/.agent-context/skills/README.md +0 -63
  73. package/.agent-context/skills/backend/README.md +0 -68
  74. package/.agent-context/skills/backend/architecture.md +0 -361
  75. package/.agent-context/skills/backend/compatibility-manifest.json +0 -8
  76. package/.agent-context/skills/backend/data-access.md +0 -231
  77. package/.agent-context/skills/backend/errors.md +0 -138
  78. package/.agent-context/skills/backend/validation.md +0 -117
  79. package/.agent-context/skills/backend.md +0 -29
  80. package/.agent-context/skills/cli/.evidence/compatibility-manifest.json +0 -5
  81. package/.agent-context/skills/cli/.evidence/sbom-excerpt.json +0 -10
  82. package/.agent-context/skills/cli/.evidence/test-report.json +0 -8
  83. package/.agent-context/skills/cli/CHANGELOG.md +0 -6
  84. package/.agent-context/skills/cli/README.md +0 -56
  85. package/.agent-context/skills/cli/compatibility-manifest.json +0 -8
  86. package/.agent-context/skills/cli/init.md +0 -38
  87. package/.agent-context/skills/cli/output.md +0 -36
  88. package/.agent-context/skills/cli/package.json +0 -5
  89. package/.agent-context/skills/cli/safety-telemetry.md +0 -39
  90. package/.agent-context/skills/cli/tests/.gitkeep +0 -1
  91. package/.agent-context/skills/cli/upgrade.md +0 -38
  92. package/.agent-context/skills/cli.md +0 -32
  93. package/.agent-context/skills/distribution/.evidence/compatibility-manifest.json +0 -9
  94. package/.agent-context/skills/distribution/.evidence/sbom-excerpt.json +0 -6
  95. package/.agent-context/skills/distribution/.evidence/test-report.json +0 -8
  96. package/.agent-context/skills/distribution/CHANGELOG.md +0 -7
  97. package/.agent-context/skills/distribution/README.md +0 -27
  98. package/.agent-context/skills/distribution/compatibility-manifest.json +0 -8
  99. package/.agent-context/skills/distribution/compatibility.md +0 -32
  100. package/.agent-context/skills/distribution/package.json +0 -5
  101. package/.agent-context/skills/distribution/provenance-attestation.md +0 -47
  102. package/.agent-context/skills/distribution/publish.md +0 -37
  103. package/.agent-context/skills/distribution/rollback.md +0 -32
  104. package/.agent-context/skills/distribution/tests/.gitkeep +0 -1
  105. package/.agent-context/skills/distribution.md +0 -32
  106. package/.agent-context/skills/frontend/.evidence/compatibility-manifest.json +0 -9
  107. package/.agent-context/skills/frontend/.evidence/sbom-excerpt.json +0 -6
  108. package/.agent-context/skills/frontend/.evidence/test-report.json +0 -8
  109. package/.agent-context/skills/frontend/CHANGELOG.md +0 -7
  110. package/.agent-context/skills/frontend/README.md +0 -50
  111. package/.agent-context/skills/frontend/accessibility.md +0 -107
  112. package/.agent-context/skills/frontend/compatibility-manifest.json +0 -8
  113. package/.agent-context/skills/frontend/conversion-clarity.md +0 -51
  114. package/.agent-context/skills/frontend/motion.md +0 -67
  115. package/.agent-context/skills/frontend/package.json +0 -5
  116. package/.agent-context/skills/frontend/performance.md +0 -63
  117. package/.agent-context/skills/frontend/responsive-delivery.md +0 -41
  118. package/.agent-context/skills/frontend/tests/.gitkeep +0 -1
  119. package/.agent-context/skills/frontend/ui-architecture.md +0 -128
  120. package/.agent-context/skills/frontend.md +0 -40
  121. package/.agent-context/skills/fullstack/.evidence/compatibility-manifest.json +0 -9
  122. package/.agent-context/skills/fullstack/.evidence/sbom-excerpt.json +0 -6
  123. package/.agent-context/skills/fullstack/.evidence/test-report.json +0 -8
  124. package/.agent-context/skills/fullstack/CHANGELOG.md +0 -7
  125. package/.agent-context/skills/fullstack/README.md +0 -27
  126. package/.agent-context/skills/fullstack/compatibility-manifest.json +0 -8
  127. package/.agent-context/skills/fullstack/contracts.md +0 -53
  128. package/.agent-context/skills/fullstack/end-to-end.md +0 -42
  129. package/.agent-context/skills/fullstack/feature-slicing.md +0 -65
  130. package/.agent-context/skills/fullstack/package.json +0 -5
  131. package/.agent-context/skills/fullstack/release-coordination.md +0 -51
  132. package/.agent-context/skills/fullstack/tests/.gitkeep +0 -1
  133. package/.agent-context/skills/fullstack.md +0 -30
  134. package/.agent-context/skills/index.json +0 -107
  135. package/.agent-context/skills/review-quality/.evidence/compatibility-manifest.json +0 -9
  136. package/.agent-context/skills/review-quality/.evidence/sbom-excerpt.json +0 -6
  137. package/.agent-context/skills/review-quality/.evidence/test-report.json +0 -8
  138. package/.agent-context/skills/review-quality/CHANGELOG.md +0 -7
  139. package/.agent-context/skills/review-quality/README.md +0 -27
  140. package/.agent-context/skills/review-quality/benchmark.md +0 -30
  141. package/.agent-context/skills/review-quality/compatibility-manifest.json +0 -8
  142. package/.agent-context/skills/review-quality/package.json +0 -5
  143. package/.agent-context/skills/review-quality/planning.md +0 -38
  144. package/.agent-context/skills/review-quality/release-decision.md +0 -49
  145. package/.agent-context/skills/review-quality/security.md +0 -34
  146. package/.agent-context/skills/review-quality/tests/.gitkeep +0 -1
  147. package/.agent-context/skills/review-quality.md +0 -34
  148. package/.agent-context/stacks/csharp.md +0 -149
  149. package/.agent-context/stacks/flutter.md +0 -16
  150. package/.agent-context/stacks/go.md +0 -181
  151. package/.agent-context/stacks/java.md +0 -135
  152. package/.agent-context/stacks/php.md +0 -192
  153. package/.agent-context/stacks/python.md +0 -153
  154. package/.agent-context/stacks/react-native.md +0 -16
  155. package/.agent-context/stacks/ruby.md +0 -80
  156. package/.agent-context/stacks/rust.md +0 -86
  157. package/.agent-context/stacks/typescript.md +0 -317
  158. package/.agent-context/state/skill-platform.json +0 -38
  159. package/lib/cli/skill-selector.mjs +0 -232
  160. package/lib/cli/templates/api-contract.md.id.tmpl +0 -143
  161. package/lib/cli/templates/api-contract.md.tmpl +0 -143
  162. package/lib/cli/templates/architecture-decision-record.md.id.tmpl +0 -106
  163. package/lib/cli/templates/architecture-decision-record.md.tmpl +0 -145
  164. package/lib/cli/templates/database-schema.md.id.tmpl +0 -74
  165. package/lib/cli/templates/database-schema.md.tmpl +0 -74
  166. package/lib/cli/templates/flow-overview.md.id.tmpl +0 -118
  167. package/lib/cli/templates/flow-overview.md.tmpl +0 -131
  168. package/lib/cli/templates/project-brief.md.id.tmpl +0 -55
  169. package/lib/cli/templates/project-brief.md.tmpl +0 -79
  170. package/scripts/init-project.ps1 +0 -105
  171. package/scripts/init-project.sh +0 -131
  172. package/scripts/skill-tier-policy.mjs +0 -76
  173. 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