@ryuenn3123/agentic-senior-core 4.4.0 → 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.
Files changed (196) hide show
  1. package/.agents/plugins/marketplace.json +21 -0
  2. package/.agents/rules/agentic-senior-core.md +126 -0
  3. package/.claude-plugin/marketplace.json +17 -0
  4. package/.claude-plugin/plugin.json +17 -0
  5. package/.clinerules/agentic-senior-core.md +94 -0
  6. package/.codex-plugin/plugin.json +24 -0
  7. package/.cursor/rules/agentic-senior-core.mdc +99 -0
  8. package/.devin-plugin/plugin.json +13 -0
  9. package/.github/copilot-instructions.md +94 -0
  10. package/.github/plugin/marketplace.json +20 -0
  11. package/.github/plugin/plugin.json +16 -0
  12. package/.kiro/steering/agentic-senior-core.md +94 -0
  13. package/.openclaw/skills/asc/SKILL.md +23 -0
  14. package/.openclaw/skills/asc-audit/SKILL.md +28 -0
  15. package/.openclaw/skills/asc-review/SKILL.md +54 -0
  16. package/.opencode/plugins/agentic-senior-core.mjs +31 -0
  17. package/.windsurf/rules/agentic-senior-core.md +94 -0
  18. package/AGENTS.md +126 -127
  19. package/CONTRIBUTING.md +93 -63
  20. package/README.md +160 -111
  21. package/__init__.py +61 -0
  22. package/bin/agentic-senior-core.js +42 -41
  23. package/commands/asc-audit.md +1 -0
  24. package/commands/asc-audit.toml +2 -0
  25. package/commands/asc-help.md +9 -0
  26. package/commands/asc-help.toml +2 -0
  27. package/commands/asc-refactor.md +1 -0
  28. package/commands/asc-refactor.toml +2 -0
  29. package/commands/asc-review.md +1 -0
  30. package/commands/asc-review.toml +2 -0
  31. package/gemini-extension.json +10 -0
  32. package/hooks/copilot-hooks.json +21 -0
  33. package/hooks/hooks.json +31 -0
  34. package/hooks/session-start.js +36 -0
  35. package/hooks/subagent-start.js +38 -0
  36. package/lib/cli/commands/adapter.mjs +109 -0
  37. package/lib/cli/commands/clean.mjs +63 -0
  38. package/lib/cli/commands/status.mjs +94 -0
  39. package/package.json +43 -60
  40. package/plugin.yaml +16 -0
  41. package/scripts/uninstall.js +38 -0
  42. package/skills/asc/SKILL.md +16 -0
  43. package/skills/asc-audit/SKILL.md +28 -0
  44. package/skills/asc-refactor/SKILL.md +35 -0
  45. package/skills/asc-review/SKILL.md +54 -0
  46. package/.agent-context/policies/llm-judge-threshold.json +0 -29
  47. package/.agent-context/prompts/bootstrap-design.md +0 -63
  48. package/.agent-context/prompts/compact-natural-mode.md +0 -100
  49. package/.agent-context/prompts/init-project.md +0 -60
  50. package/.agent-context/prompts/refactor.md +0 -38
  51. package/.agent-context/prompts/review-code.md +0 -31
  52. package/.agent-context/review-checklists/architecture-review.md +0 -57
  53. package/.agent-context/review-checklists/pr-checklist.md +0 -134
  54. package/.agent-context/rules/api-docs.md +0 -24
  55. package/.agent-context/rules/api-versioning.md +0 -16
  56. package/.agent-context/rules/architecture.md +0 -38
  57. package/.agent-context/rules/background-jobs.md +0 -17
  58. package/.agent-context/rules/config-and-flags.md +0 -16
  59. package/.agent-context/rules/database-design.md +0 -18
  60. package/.agent-context/rules/docker-runtime.md +0 -17
  61. package/.agent-context/rules/error-handling.md +0 -16
  62. package/.agent-context/rules/event-driven.md +0 -16
  63. package/.agent-context/rules/frontend-architecture.md +0 -54
  64. package/.agent-context/rules/microservices.md +0 -16
  65. package/.agent-context/rules/migrations.md +0 -16
  66. package/.agent-context/rules/observability.md +0 -16
  67. package/.agent-context/rules/performance.md +0 -16
  68. package/.agent-context/rules/realtime.md +0 -16
  69. package/.agent-context/rules/resilience.md +0 -18
  70. package/.agent-context/rules/security.md +0 -18
  71. package/.agent-context/rules/testing.md +0 -16
  72. package/.agent-context/state/README.md +0 -25
  73. package/.agent-context/state/architecture-map.md +0 -40
  74. package/.agent-context/state/benchmark-comparison-schema.json +0 -181
  75. package/.agent-context/state/benchmark-reproducibility.json +0 -87
  76. package/.agent-context/state/benchmark-thresholds.json +0 -10
  77. package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
  78. package/.agent-context/state/dependency-map.md +0 -41
  79. package/.agent-context/state/memory-adapter-contract.json +0 -52
  80. package/.agent-context/state/memory-schema-v1.json +0 -88
  81. package/GEMINI.md +0 -1
  82. package/benchmarks/README.md +0 -60
  83. package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
  84. package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
  85. package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
  86. package/lib/cli/adaptive-context/catalog.mjs +0 -394
  87. package/lib/cli/adaptive-context/file-signals.mjs +0 -100
  88. package/lib/cli/adaptive-context/implications.mjs +0 -44
  89. package/lib/cli/adaptive-context.mjs +0 -151
  90. package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
  91. package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
  92. package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
  93. package/lib/cli/backup.mjs +0 -210
  94. package/lib/cli/commands/context.mjs +0 -140
  95. package/lib/cli/commands/init/project-context.mjs +0 -60
  96. package/lib/cli/commands/init/runtime-environment.mjs +0 -59
  97. package/lib/cli/commands/init/setup-decisions.mjs +0 -83
  98. package/lib/cli/commands/init.mjs +0 -654
  99. package/lib/cli/commands/launch.mjs +0 -76
  100. package/lib/cli/commands/optimize.mjs +0 -284
  101. package/lib/cli/commands/rollback.mjs +0 -64
  102. package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
  103. package/lib/cli/commands/upgrade.mjs +0 -451
  104. package/lib/cli/compiler.mjs +0 -187
  105. package/lib/cli/constants.mjs +0 -136
  106. package/lib/cli/detector/constants.mjs +0 -135
  107. package/lib/cli/detector/design-evidence/collector.mjs +0 -256
  108. package/lib/cli/detector/design-evidence/constants.mjs +0 -39
  109. package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
  110. package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
  111. package/lib/cli/detector/design-evidence/summary.mjs +0 -109
  112. package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
  113. package/lib/cli/detector/design-evidence.mjs +0 -25
  114. package/lib/cli/detector/stack-detection.mjs +0 -243
  115. package/lib/cli/detector/ui-signals.mjs +0 -150
  116. package/lib/cli/detector/workspace-scan.mjs +0 -177
  117. package/lib/cli/detector.mjs +0 -23
  118. package/lib/cli/init-detection-flow.mjs +0 -48
  119. package/lib/cli/init-options.mjs +0 -237
  120. package/lib/cli/init-selection.mjs +0 -29
  121. package/lib/cli/memory-continuity.mjs +0 -537
  122. package/lib/cli/preflight.mjs +0 -76
  123. package/lib/cli/project-scaffolder/constants.mjs +0 -69
  124. package/lib/cli/project-scaffolder/discovery.mjs +0 -272
  125. package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
  126. package/lib/cli/project-scaffolder/storage.mjs +0 -144
  127. package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
  128. package/lib/cli/project-scaffolder.mjs +0 -29
  129. package/lib/cli/rollback.mjs +0 -66
  130. package/lib/cli/token-optimization.mjs +0 -401
  131. package/lib/cli/utils/filesystem.mjs +0 -81
  132. package/lib/cli/utils/managed-surface.mjs +0 -280
  133. package/lib/cli/utils/prompting.mjs +0 -44
  134. package/lib/cli/utils.mjs +0 -479
  135. package/mcp.json +0 -134
  136. package/scripts/adaptive-context/fixtures.mjs +0 -183
  137. package/scripts/adaptive-context-benchmark.mjs +0 -9
  138. package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
  139. package/scripts/benchmark-evidence-bundle.mjs +0 -645
  140. package/scripts/benchmark-gate.mjs +0 -121
  141. package/scripts/benchmark-intelligence.mjs +0 -33
  142. package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
  143. package/scripts/build-release-benchmark-bundle.mjs +0 -202
  144. package/scripts/bump-version.mjs +0 -103
  145. package/scripts/clean-local-artifacts.mjs +0 -78
  146. package/scripts/compact-natural-mode-benchmark.mjs +0 -9
  147. package/scripts/context-triggered-audit.mjs +0 -391
  148. package/scripts/detection-benchmark.mjs +0 -127
  149. package/scripts/docs-quality-drift-report.mjs +0 -358
  150. package/scripts/documentation-boundary-audit.mjs +0 -305
  151. package/scripts/explain-on-demand-audit.mjs +0 -427
  152. package/scripts/forbidden-content-check.mjs +0 -123
  153. package/scripts/frontend-usability-audit.mjs +0 -243
  154. package/scripts/generate-sbom.mjs +0 -61
  155. package/scripts/governance-weekly-report.mjs +0 -466
  156. package/scripts/llm-judge/checklist-loader.mjs +0 -45
  157. package/scripts/llm-judge/constants.mjs +0 -66
  158. package/scripts/llm-judge/diff-collection.mjs +0 -74
  159. package/scripts/llm-judge/prompting.mjs +0 -78
  160. package/scripts/llm-judge/providers.mjs +0 -111
  161. package/scripts/llm-judge/verdict.mjs +0 -134
  162. package/scripts/llm-judge.mjs +0 -200
  163. package/scripts/memory-continuity-benchmark.mjs +0 -322
  164. package/scripts/quality-trend-report.mjs +0 -289
  165. package/scripts/release-gate/audit-checks.mjs +0 -441
  166. package/scripts/release-gate/constants.mjs +0 -53
  167. package/scripts/release-gate/runtime.mjs +0 -63
  168. package/scripts/release-gate/static-checks.mjs +0 -182
  169. package/scripts/release-gate.mjs +0 -42
  170. package/scripts/rules-guardian-audit.mjs +0 -580
  171. package/scripts/single-source-lazy-loading-audit.mjs +0 -449
  172. package/scripts/sync-thin-adapters.mjs +0 -72
  173. package/scripts/token-optimization-benchmark.mjs +0 -252
  174. package/scripts/ui-design-judge/constants.mjs +0 -13
  175. package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
  176. package/scripts/ui-design-judge/git-input.mjs +0 -134
  177. package/scripts/ui-design-judge/prompting.mjs +0 -52
  178. package/scripts/ui-design-judge/providers.mjs +0 -102
  179. package/scripts/ui-design-judge/reporting.mjs +0 -183
  180. package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
  181. package/scripts/ui-design-judge/rubric-goldset.json +0 -188
  182. package/scripts/ui-design-judge.mjs +0 -319
  183. package/scripts/ui-rubric-calibration.mjs +0 -35
  184. package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
  185. package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
  186. package/scripts/validate/audits/file-size.mjs +0 -158
  187. package/scripts/validate/audits/reflection-citations.mjs +0 -130
  188. package/scripts/validate/audits/release-bundle.mjs +0 -135
  189. package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
  190. package/scripts/validate/config.mjs +0 -501
  191. package/scripts/validate/coverage-checks.mjs +0 -446
  192. package/scripts/validate/file-structure.mjs +0 -158
  193. package/scripts/validate/markdown-content.mjs +0 -109
  194. package/scripts/validate/project-metadata.mjs +0 -166
  195. package/scripts/validate/utils.mjs +0 -52
  196. package/scripts/validate.mjs +0 -267
@@ -1,202 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-check
3
-
4
- /**
5
- * build-release-benchmark-bundle.mjs
6
- *
7
- * Phase 5 Task 5.4. Reads the locked benchmark artifacts produced in Phases
8
- * 0-3 and emits a single release bundle that references each artifact by
9
- * SHA-256 hash plus a non-marketing summary section. The script never
10
- * regenerates Phase 0-3 numbers; it only references and hashes them.
11
- */
12
-
13
- import { createHash } from 'node:crypto';
14
- import { existsSync, readFileSync, writeFileSync } from 'node:fs';
15
- import { dirname, join, resolve } from 'node:path';
16
- import { fileURLToPath } from 'node:url';
17
-
18
- const SCRIPT_FILE_PATH = fileURLToPath(import.meta.url);
19
- const REPOSITORY_ROOT = resolve(dirname(SCRIPT_FILE_PATH), '..');
20
- const ARGS = new Set(process.argv.slice(2));
21
- const JSON_ONLY = ARGS.has('--json');
22
-
23
- const SOURCE_ARTIFACTS = [
24
- {
25
- artifactId: 'phase-0-baseline',
26
- relativePath: 'benchmarks/results/baseline-2026-05-16.json',
27
- role: 'token-baseline',
28
- description: 'Phase 0 token-usage baseline measured across providers using free count-tokens APIs and tiktoken estimates.',
29
- },
30
- {
31
- artifactId: 'phase-2-cache',
32
- relativePath: 'benchmarks/results/cache-phase-2-2026-05-16.json',
33
- role: 'cache-simulation',
34
- description: 'Phase 2 offline warm-cache simulation. Direct provider API integration mode; see docs/architecture/decisions-foundation.md D4 for the per-tool scope matrix.',
35
- },
36
- {
37
- artifactId: 'phase-3-anti-halu',
38
- relativePath: 'benchmarks/results/anti-halu-phase-3-2026-05-16.json',
39
- role: 'anti-halu-benchmark',
40
- description: 'Phase 3 offline provider-free anti-halu benchmark.',
41
- },
42
- {
43
- artifactId: 'scorecard-2026-05-16',
44
- relativePath: 'benchmarks/results/scorecard-2026-05-16.json',
45
- role: 'supply-chain-snapshot',
46
- description: 'Phase 5 Task 5.3 supply-chain snapshot. Scorecard CLI was not installed locally; fallback signals are documented honestly.',
47
- },
48
- ];
49
-
50
- function sha256Hex(buffer) {
51
- // Normalize CRLF -> LF before hashing so bundle integrity is reproducible
52
- // across platforms (Windows working tree may be CRLF; CI checkouts are LF).
53
- const normalized = buffer.toString('utf8').replace(/\r\n/g, '\n');
54
- const hash = createHash('sha256');
55
- hash.update(normalized, 'utf8');
56
- return hash.digest('hex');
57
- }
58
-
59
- function loadArtifact(rootDir, descriptor) {
60
- const absolutePath = join(rootDir, descriptor.relativePath);
61
- if (!existsSync(absolutePath)) {
62
- return {
63
- ...descriptor,
64
- status: 'missing',
65
- sha256: null,
66
- sizeBytes: 0,
67
- summary: null,
68
- };
69
- }
70
- const content = readFileSync(absolutePath);
71
- const sha = sha256Hex(content);
72
- let summary = null;
73
- try {
74
- const parsed = JSON.parse(content.toString('utf8'));
75
- summary = summarizeArtifact(descriptor.role, parsed);
76
- } catch {
77
- summary = { error: 'artifact is not valid JSON' };
78
- }
79
- return {
80
- ...descriptor,
81
- status: 'present',
82
- sha256: sha,
83
- sizeBytes: content.length,
84
- summary,
85
- };
86
- }
87
-
88
- function summarizeArtifact(role, parsed) {
89
- if (!parsed || typeof parsed !== 'object') {
90
- return null;
91
- }
92
- if (role === 'token-baseline') {
93
- return {
94
- report_version: parsed.report_version || null,
95
- generated_at: parsed.generated_at || null,
96
- provider_count: Array.isArray(parsed.providers) ? parsed.providers.length : null,
97
- };
98
- }
99
- if (role === 'cache-simulation') {
100
- const anthropicWithLoaded = Array.isArray(parsed.summary)
101
- ? parsed.summary.find((row) => row.provider === 'anthropic' && row.scenario === 'with_loaded_rules')
102
- : null;
103
- return {
104
- report_version: parsed.report_version || null,
105
- integration_mode: parsed.integration_mode || null,
106
- fixture_count: parsed.fixture_count || null,
107
- provider_count: parsed.provider_count || null,
108
- anthropic_with_loaded_avg_total_input: anthropicWithLoaded?.average_total_input_tokens ?? null,
109
- anthropic_with_loaded_avg_warm_read: anthropicWithLoaded?.average_warm_read_effective_tokens ?? null,
110
- scope_caveat_present: typeof parsed.scope_caveat === 'string' && parsed.scope_caveat.length > 0,
111
- };
112
- }
113
- if (role === 'anti-halu-benchmark') {
114
- return {
115
- reportVersion: parsed.reportVersion || null,
116
- generatedAt: parsed.generatedAt || null,
117
- passRatePercent: parsed.passRatePercent ?? null,
118
- citationValidityRatePercent: parsed.citationValidityRatePercent ?? null,
119
- fixtureCount: parsed.fixtureCount ?? null,
120
- passedCount: parsed.passedCount ?? null,
121
- failedCount: parsed.failedCount ?? null,
122
- };
123
- }
124
- if (role === 'supply-chain-snapshot') {
125
- return {
126
- report_version: parsed.report_version || null,
127
- status: parsed.status || null,
128
- npm_audit_full: parsed.fallback_signals?.npm_audit_full || null,
129
- lockfile_consistent: parsed.fallback_signals?.lockfile_consistent ?? null,
130
- runtime_dependencies_count: parsed.fallback_signals?.runtime_dependencies_count ?? null,
131
- };
132
- }
133
- return null;
134
- }
135
-
136
- export function buildReleaseBenchmarkBundle(options = {}) {
137
- const rootDir = options.rootDir ? resolve(String(options.rootDir)) : REPOSITORY_ROOT;
138
- const artifacts = SOURCE_ARTIFACTS.map((descriptor) => loadArtifact(rootDir, descriptor));
139
- const missingArtifacts = artifacts.filter((artifact) => artifact.status === 'missing');
140
-
141
- return {
142
- bundle_version: '1.0.0',
143
- release_target: '4.0.0',
144
- release_status: 'released',
145
- generated_at: new Date().toISOString(),
146
- description: 'Phase 5 release benchmark bundle. References Phase 0-3 locked artifacts plus the Phase 5 supply-chain snapshot. No artifact is regenerated by this bundle. Artifact integrity is verified by SHA-256 hash via scripts/audit-release-bundle.mjs.',
147
- sources: {
148
- research_foundation: 'docs/architecture/decisions-foundation.md',
149
- d4_caching_scope_matrix: 'docs/architecture/decisions-foundation.md#d4',
150
- caching_reporting_format: 'docs/benchmark-reference.md',
151
- historical_record: 'docs/archive/HISTORY.md',
152
- },
153
- integrity: {
154
- hash_algorithm: 'SHA-256',
155
- missing_artifact_count: missingArtifacts.length,
156
- missing_artifacts: missingArtifacts.map((artifact) => artifact.relativePath),
157
- },
158
- artifacts: artifacts.map((artifact) => ({
159
- artifact_id: artifact.artifactId,
160
- role: artifact.role,
161
- relative_path: artifact.relativePath,
162
- description: artifact.description,
163
- status: artifact.status,
164
- sha256: artifact.sha256,
165
- size_bytes: artifact.sizeBytes,
166
- summary: artifact.summary,
167
- })),
168
- };
169
- }
170
-
171
- function main() {
172
- const bundle = buildReleaseBenchmarkBundle();
173
-
174
- if (bundle.integrity.missing_artifact_count > 0) {
175
- process.stderr.write(`build-release-benchmark-bundle: ${bundle.integrity.missing_artifact_count} artifact(s) missing: ${bundle.integrity.missing_artifacts.join(', ')}\n`);
176
- process.exit(1);
177
- }
178
-
179
- const outputPath = join(REPOSITORY_ROOT, 'benchmarks', 'results', 'release-bundle-4.0.0.json');
180
- writeFileSync(outputPath, `${JSON.stringify(bundle, null, 2)}\n`, 'utf8');
181
-
182
- if (JSON_ONLY) {
183
- process.stdout.write(`${JSON.stringify(bundle, null, 2)}\n`);
184
- process.exit(0);
185
- }
186
-
187
- console.log('===============================================');
188
- console.log(' build-release-benchmark-bundle');
189
- console.log('===============================================');
190
- console.log(` Release target: ${bundle.release_target}`);
191
- console.log(` Release status: ${bundle.release_status}`);
192
- console.log(` Artifact count: ${bundle.artifacts.length}`);
193
- console.log(` Missing artifacts: ${bundle.integrity.missing_artifact_count}`);
194
- console.log(` Output: benchmarks/results/release-bundle-4.0.0.json`);
195
- console.log('');
196
- console.log(' Bundle written. Run scripts/audit-release-bundle.mjs to verify integrity before release.');
197
- process.exit(0);
198
- }
199
-
200
- if (process.argv[1] && (import.meta.url === `file://${process.argv[1].replace(/\\/g, '/')}` || process.argv[1].endsWith('build-release-benchmark-bundle.mjs'))) {
201
- main();
202
- }
@@ -1,103 +0,0 @@
1
- import fs from 'node:fs/promises';
2
- import path from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
-
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = path.dirname(__filename);
7
- const ROOT_DIR = path.resolve(__dirname, '..');
8
-
9
- async function fileExists(filePath) {
10
- try {
11
- await fs.stat(filePath);
12
- return true;
13
- } catch {
14
- return false;
15
- }
16
- }
17
-
18
- async function readTextFile(filePath) {
19
- return fs.readFile(filePath, 'utf8');
20
- }
21
-
22
- async function writeTextFile(filePath, content) {
23
- return fs.writeFile(filePath, content, 'utf8');
24
- }
25
-
26
- async function bumpVersion() {
27
- const newVersion = process.argv[2];
28
- if (!newVersion || !/^\d+\.\d+\.\d+$/.test(newVersion)) {
29
- console.error('Usage: node scripts/bump-version.mjs <new-version>');
30
- console.error('Example: node scripts/bump-version.mjs 2.1.0');
31
- process.exit(1);
32
- }
33
-
34
- console.log(`Starting version bump to ${newVersion}...`);
35
-
36
- // 1. Update package.json
37
- const packageJsonPath = path.join(ROOT_DIR, 'package.json');
38
- const packageJsonContent = await readTextFile(packageJsonPath);
39
- const packageJson = JSON.parse(packageJsonContent);
40
- const oldVersion = packageJson.version;
41
-
42
- if (oldVersion === newVersion) {
43
- console.log(`Version is already ${newVersion}. Exiting.`);
44
- process.exit(0);
45
- }
46
-
47
- packageJson.version = newVersion;
48
- await writeTextFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
49
- console.log(`Updated package.json (was ${oldVersion})`);
50
-
51
- // 2. Update package-lock.json when it exists.
52
- const packageLockPath = path.join(ROOT_DIR, 'package-lock.json');
53
- if (await fileExists(packageLockPath)) {
54
- const packageLock = JSON.parse(await readTextFile(packageLockPath));
55
- if (packageLock.name === packageJson.name) {
56
- packageLock.version = newVersion;
57
- }
58
- if (packageLock.packages?.['']?.name === packageJson.name) {
59
- packageLock.packages[''].version = newVersion;
60
- }
61
- await writeTextFile(packageLockPath, JSON.stringify(packageLock, null, 2) + '\n');
62
- console.log('Updated package-lock.json');
63
- }
64
-
65
- // 3. Update docs/deep-analysis-and-roadmap-backlog.md
66
- const roadmapPath = path.join(ROOT_DIR, 'docs', 'deep-analysis-and-roadmap-backlog.md');
67
- if (await fileExists(roadmapPath)) {
68
- let roadmapContent = await readTextFile(roadmapPath);
69
- roadmapContent = roadmapContent.replace(`Current Version: ${oldVersion}`, `Current Version: ${newVersion}`);
70
- await writeTextFile(roadmapPath, roadmapContent);
71
- console.log('Updated docs/deep-analysis-and-roadmap-backlog.md');
72
- }
73
-
74
- // 4. Update CHANGELOG.md
75
- const changelogPath = path.join(ROOT_DIR, 'CHANGELOG.md');
76
- if (await fileExists(changelogPath)) {
77
- let changelogContent = await readTextFile(changelogPath);
78
-
79
- // Check if new version already has an entry
80
- if (!changelogContent.includes(`## ${newVersion}`)) {
81
- const today = new Date().toISOString().split('T')[0];
82
- const newEntry = `## ${newVersion} - ${today}\n### Added\n- \n\n### Changed\n- \n\n### Fixed\n- \n\n`;
83
-
84
- // Find the first version heading "## x.x.x"
85
- const firstHeadingIndex = changelogContent.search(/^## \d+\.\d+\.\d+/m);
86
- if (firstHeadingIndex !== -1) {
87
- changelogContent = changelogContent.slice(0, firstHeadingIndex) + newEntry + changelogContent.slice(firstHeadingIndex);
88
- await writeTextFile(changelogPath, changelogContent);
89
- console.log('Prepended new entry to CHANGELOG.md');
90
- }
91
- } else {
92
- console.log(`CHANGELOG.md already has an entry for ${newVersion}`);
93
- }
94
- }
95
-
96
- console.log(`\nVersion successfully bumped from ${oldVersion} to ${newVersion}!`);
97
- console.log('Remember to fill out your CHANGELOG.md before pushing.');
98
- }
99
-
100
- bumpVersion().catch(e => {
101
- console.error('Fatal error:', e);
102
- process.exit(1);
103
- });
@@ -1,78 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { rm, stat } from 'node:fs/promises';
4
- import { dirname, join, relative, resolve } from 'node:path';
5
- import { fileURLToPath } from 'node:url';
6
-
7
- const SCRIPT_FILE_PATH = fileURLToPath(import.meta.url);
8
- const REPOSITORY_ROOT = resolve(dirname(SCRIPT_FILE_PATH), '..');
9
-
10
- const LOCAL_ARTIFACT_PATHS = [
11
- 'test_output.txt',
12
- 'validate_output.txt',
13
- 'release-gate-report.json',
14
- '.benchmarks',
15
- '.zed',
16
- '.agentic-backup',
17
- '.agent-context/state/active-memory.json',
18
- '.agent-context/state/llm-judge-report.json',
19
- '.agent-context/state/benchmark-analysis.json',
20
- '.agent-context/state/benchmark-evidence-bundle.json',
21
- '.agent-context/state/benchmark-history.json',
22
- '.agent-context/state/benchmark-trend-report.csv',
23
- '.agent-context/state/benchmark-trend-report.json',
24
- '.agent-context/state/benchmark-writer-judge-matrix.json',
25
- '.agent-context/state/docs-quality-drift-report.json',
26
- '.agent-context/state/memory-continuity-benchmark.json',
27
- '.agent-context/state/quality-trend-report.json',
28
- '.agent-context/state/token-saver',
29
- '.agent-context/state/token-optimization-report.json',
30
- '.agent-context/state/token-optimization-benchmark.json',
31
- '.agent-context/state/weekly-governance-report.json',
32
- ];
33
-
34
- function resolveLocalArtifactPath(relativePath) {
35
- const resolvedPath = resolve(REPOSITORY_ROOT, relativePath);
36
- const repositoryRelativePath = relative(REPOSITORY_ROOT, resolvedPath);
37
-
38
- if (
39
- repositoryRelativePath.startsWith('..')
40
- || repositoryRelativePath === ''
41
- || resolve(repositoryRelativePath) === repositoryRelativePath
42
- ) {
43
- throw new Error(`Refusing to clean path outside repository root: ${relativePath}`);
44
- }
45
-
46
- return resolvedPath;
47
- }
48
-
49
- async function pathExists(targetPath) {
50
- try {
51
- await stat(targetPath);
52
- return true;
53
- } catch {
54
- return false;
55
- }
56
- }
57
-
58
- let removedCount = 0;
59
- let skippedCount = 0;
60
-
61
- for (const relativePath of LOCAL_ARTIFACT_PATHS) {
62
- const targetPath = resolveLocalArtifactPath(relativePath);
63
-
64
- if (!(await pathExists(targetPath))) {
65
- skippedCount += 1;
66
- continue;
67
- }
68
-
69
- await rm(targetPath, {
70
- force: true,
71
- recursive: true,
72
- });
73
-
74
- removedCount += 1;
75
- console.log(`removed ${relativePath}`);
76
- }
77
-
78
- console.log(`local artifact cleanup complete: removed=${removedCount}, skipped=${skippedCount}`);
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { COMPACT_NATURAL_MODE_FIXTURES } from '../benchmarks/compact-natural-mode/fixtures.mjs';
4
- import { evaluateCompactNaturalFixtures } from '../benchmarks/compact-natural-mode/scorer.mjs';
5
-
6
- const report = evaluateCompactNaturalFixtures(COMPACT_NATURAL_MODE_FIXTURES);
7
-
8
- console.log(JSON.stringify(report, null, 2));
9
- process.exit(report.passed ? 0 : 1);