@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.
- package/.agents/plugins/agentic-senior-core/plugin.json +3 -0
- package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +131 -0
- package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +16 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +28 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +35 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +54 -0
- package/.agents/rules/agentic-senior-core.md +131 -0
- package/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.clinerules/agentic-senior-core.md +94 -0
- package/.codex-plugin/plugin.json +24 -0
- package/.cursor/rules/agentic-senior-core.mdc +99 -0
- package/.devin-plugin/plugin.json +13 -0
- package/.github/copilot-instructions.md +94 -0
- package/.github/plugin/marketplace.json +20 -0
- package/.github/plugin/plugin.json +16 -0
- package/.kiro/steering/agentic-senior-core.md +94 -0
- package/.openclaw/skills/asc/SKILL.md +23 -0
- package/.openclaw/skills/asc-audit/SKILL.md +28 -0
- package/.openclaw/skills/asc-review/SKILL.md +54 -0
- package/.opencode/plugins/agentic-senior-core.mjs +31 -0
- package/.windsurf/rules/agentic-senior-core.md +94 -0
- package/AGENTS.md +126 -127
- package/CONTRIBUTING.md +93 -63
- package/README.md +190 -110
- package/__init__.py +61 -0
- package/bin/agentic-senior-core.js +42 -41
- package/commands/asc-audit.md +1 -0
- package/commands/asc-audit.toml +2 -0
- package/commands/asc-help.md +9 -0
- package/commands/asc-help.toml +2 -0
- package/commands/asc-refactor.md +1 -0
- package/commands/asc-refactor.toml +2 -0
- package/commands/asc-review.md +1 -0
- package/commands/asc-review.toml +2 -0
- package/gemini-extension.json +10 -0
- package/hooks/copilot-hooks.json +21 -0
- package/hooks/hooks.json +31 -0
- package/hooks/session-start.js +36 -0
- package/hooks/subagent-start.js +38 -0
- package/lib/cli/commands/adapter.mjs +109 -0
- package/lib/cli/commands/clean.mjs +63 -0
- package/lib/cli/commands/status.mjs +94 -0
- package/package.json +43 -60
- package/plugin.yaml +16 -0
- package/scripts/uninstall.js +38 -0
- package/skills/asc/SKILL.md +16 -0
- package/skills/asc-audit/SKILL.md +28 -0
- package/skills/asc-refactor/SKILL.md +35 -0
- package/skills/asc-review/SKILL.md +54 -0
- package/.agent-context/policies/llm-judge-threshold.json +0 -29
- package/.agent-context/prompts/bootstrap-design.md +0 -63
- package/.agent-context/prompts/compact-natural-mode.md +0 -100
- package/.agent-context/prompts/init-project.md +0 -60
- package/.agent-context/prompts/refactor.md +0 -38
- package/.agent-context/prompts/review-code.md +0 -31
- package/.agent-context/review-checklists/architecture-review.md +0 -57
- package/.agent-context/review-checklists/pr-checklist.md +0 -134
- package/.agent-context/rules/api-docs.md +0 -24
- package/.agent-context/rules/api-versioning.md +0 -16
- package/.agent-context/rules/architecture.md +0 -38
- package/.agent-context/rules/background-jobs.md +0 -17
- package/.agent-context/rules/config-and-flags.md +0 -16
- package/.agent-context/rules/database-design.md +0 -18
- package/.agent-context/rules/docker-runtime.md +0 -17
- package/.agent-context/rules/error-handling.md +0 -16
- package/.agent-context/rules/event-driven.md +0 -16
- package/.agent-context/rules/frontend-architecture.md +0 -54
- package/.agent-context/rules/microservices.md +0 -16
- package/.agent-context/rules/migrations.md +0 -16
- package/.agent-context/rules/observability.md +0 -16
- package/.agent-context/rules/performance.md +0 -16
- package/.agent-context/rules/realtime.md +0 -16
- package/.agent-context/rules/resilience.md +0 -18
- package/.agent-context/rules/security.md +0 -18
- package/.agent-context/rules/testing.md +0 -16
- package/.agent-context/state/README.md +0 -25
- package/.agent-context/state/architecture-map.md +0 -40
- package/.agent-context/state/benchmark-comparison-schema.json +0 -181
- package/.agent-context/state/benchmark-reproducibility.json +0 -87
- package/.agent-context/state/benchmark-thresholds.json +0 -10
- package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
- package/.agent-context/state/dependency-map.md +0 -41
- package/.agent-context/state/memory-adapter-contract.json +0 -52
- package/.agent-context/state/memory-schema-v1.json +0 -88
- package/GEMINI.md +0 -1
- package/benchmarks/README.md +0 -60
- package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
- package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
- package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
- package/lib/cli/adaptive-context/catalog.mjs +0 -394
- package/lib/cli/adaptive-context/file-signals.mjs +0 -100
- package/lib/cli/adaptive-context/implications.mjs +0 -44
- package/lib/cli/adaptive-context.mjs +0 -151
- package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
- package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
- package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
- package/lib/cli/backup.mjs +0 -210
- package/lib/cli/commands/context.mjs +0 -140
- package/lib/cli/commands/init/project-context.mjs +0 -60
- package/lib/cli/commands/init/runtime-environment.mjs +0 -59
- package/lib/cli/commands/init/setup-decisions.mjs +0 -83
- package/lib/cli/commands/init.mjs +0 -654
- package/lib/cli/commands/launch.mjs +0 -76
- package/lib/cli/commands/optimize.mjs +0 -284
- package/lib/cli/commands/rollback.mjs +0 -64
- package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
- package/lib/cli/commands/upgrade.mjs +0 -451
- package/lib/cli/compiler.mjs +0 -187
- package/lib/cli/constants.mjs +0 -136
- package/lib/cli/detector/constants.mjs +0 -135
- package/lib/cli/detector/design-evidence/collector.mjs +0 -256
- package/lib/cli/detector/design-evidence/constants.mjs +0 -39
- package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
- package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
- package/lib/cli/detector/design-evidence/summary.mjs +0 -109
- package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
- package/lib/cli/detector/design-evidence.mjs +0 -25
- package/lib/cli/detector/stack-detection.mjs +0 -243
- package/lib/cli/detector/ui-signals.mjs +0 -150
- package/lib/cli/detector/workspace-scan.mjs +0 -177
- package/lib/cli/detector.mjs +0 -23
- package/lib/cli/init-detection-flow.mjs +0 -48
- package/lib/cli/init-options.mjs +0 -237
- package/lib/cli/init-selection.mjs +0 -29
- package/lib/cli/memory-continuity.mjs +0 -537
- package/lib/cli/preflight.mjs +0 -76
- package/lib/cli/project-scaffolder/constants.mjs +0 -69
- package/lib/cli/project-scaffolder/discovery.mjs +0 -272
- package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
- package/lib/cli/project-scaffolder/storage.mjs +0 -144
- package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
- package/lib/cli/project-scaffolder.mjs +0 -29
- package/lib/cli/rollback.mjs +0 -66
- package/lib/cli/token-optimization.mjs +0 -401
- package/lib/cli/utils/filesystem.mjs +0 -81
- package/lib/cli/utils/managed-surface.mjs +0 -280
- package/lib/cli/utils/prompting.mjs +0 -44
- package/lib/cli/utils.mjs +0 -479
- package/mcp.json +0 -134
- package/scripts/adaptive-context/fixtures.mjs +0 -183
- package/scripts/adaptive-context-benchmark.mjs +0 -9
- package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
- package/scripts/benchmark-evidence-bundle.mjs +0 -645
- package/scripts/benchmark-gate.mjs +0 -121
- package/scripts/benchmark-intelligence.mjs +0 -33
- package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
- package/scripts/build-release-benchmark-bundle.mjs +0 -202
- package/scripts/bump-version.mjs +0 -103
- package/scripts/clean-local-artifacts.mjs +0 -78
- package/scripts/compact-natural-mode-benchmark.mjs +0 -9
- package/scripts/context-triggered-audit.mjs +0 -391
- package/scripts/detection-benchmark.mjs +0 -127
- package/scripts/docs-quality-drift-report.mjs +0 -358
- package/scripts/documentation-boundary-audit.mjs +0 -305
- package/scripts/explain-on-demand-audit.mjs +0 -427
- package/scripts/forbidden-content-check.mjs +0 -123
- package/scripts/frontend-usability-audit.mjs +0 -243
- package/scripts/generate-sbom.mjs +0 -61
- package/scripts/governance-weekly-report.mjs +0 -466
- package/scripts/llm-judge/checklist-loader.mjs +0 -45
- package/scripts/llm-judge/constants.mjs +0 -66
- package/scripts/llm-judge/diff-collection.mjs +0 -74
- package/scripts/llm-judge/prompting.mjs +0 -78
- package/scripts/llm-judge/providers.mjs +0 -111
- package/scripts/llm-judge/verdict.mjs +0 -134
- package/scripts/llm-judge.mjs +0 -200
- package/scripts/memory-continuity-benchmark.mjs +0 -322
- package/scripts/quality-trend-report.mjs +0 -289
- package/scripts/release-gate/audit-checks.mjs +0 -441
- package/scripts/release-gate/constants.mjs +0 -53
- package/scripts/release-gate/runtime.mjs +0 -63
- package/scripts/release-gate/static-checks.mjs +0 -182
- package/scripts/release-gate.mjs +0 -42
- package/scripts/rules-guardian-audit.mjs +0 -580
- package/scripts/single-source-lazy-loading-audit.mjs +0 -449
- package/scripts/sync-thin-adapters.mjs +0 -72
- package/scripts/token-optimization-benchmark.mjs +0 -252
- package/scripts/ui-design-judge/constants.mjs +0 -13
- package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
- package/scripts/ui-design-judge/git-input.mjs +0 -134
- package/scripts/ui-design-judge/prompting.mjs +0 -52
- package/scripts/ui-design-judge/providers.mjs +0 -102
- package/scripts/ui-design-judge/reporting.mjs +0 -183
- package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
- package/scripts/ui-design-judge/rubric-goldset.json +0 -188
- package/scripts/ui-design-judge.mjs +0 -319
- package/scripts/ui-rubric-calibration.mjs +0 -35
- package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
- package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
- package/scripts/validate/audits/file-size.mjs +0 -158
- package/scripts/validate/audits/reflection-citations.mjs +0 -130
- package/scripts/validate/audits/release-bundle.mjs +0 -135
- package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
- package/scripts/validate/config.mjs +0 -501
- package/scripts/validate/coverage-checks.mjs +0 -446
- package/scripts/validate/file-structure.mjs +0 -158
- package/scripts/validate/markdown-content.mjs +0 -109
- package/scripts/validate/project-metadata.mjs +0 -166
- package/scripts/validate/utils.mjs +0 -52
- 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
|
-
}
|
package/scripts/bump-version.mjs
DELETED
|
@@ -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);
|