@technomoron/agent-run 0.99.15 → 0.99.16
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/CHANGES +6 -0
- package/dist/agent-run.js +155 -17
- package/examples/basic-config/agent-config/global/skills/code-review-organizer/SKILL.md.njk +18 -0
- package/examples/basic-config/agent-config/global/skills/release-package-check/SKILL.md.njk +14 -0
- package/examples/basic-config/agent-config/global/tool-templates/AGENTS.md.njk +1 -0
- package/examples/basic-config/agent-config/starter/basic-project/agent-run.jsonc +4 -3
- package/package.json +1 -1
- package/examples/basic-config/agent-config/global/skills/code-review/SKILL.md.njk +0 -12
package/CHANGES
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
Version 0.99.16 (2026-05-03)
|
|
5
|
+
----------------------------
|
|
6
|
+
* Move review history out of generated `live/` directories into persistent profile `reviews/` directories and migrate legacy live review files.
|
|
7
|
+
* Rename the built-in review skill to `code-review-organizer` and remove stale generated `code-review` skill directories.
|
|
8
|
+
* Add the `release-package-check` skill to replace the external `repo-check` package release checklist.
|
|
9
|
+
|
|
4
10
|
Version 0.99.15 (2026-04-30)
|
|
5
11
|
----------------------------
|
|
6
12
|
* Add `--generate` for Codex and Claude runs to render generated files without launching the underlying tool.
|
package/dist/agent-run.js
CHANGED
|
@@ -23,7 +23,7 @@ const VERBOSE_ENV = 'AGENT_RUN_VERBOSE';
|
|
|
23
23
|
const MANIFEST_FILE_NAME = 'agent-run.jsonc';
|
|
24
24
|
const LOCAL_TEMPLATE_FILE_NAME = 'local.md.njk';
|
|
25
25
|
const LIVE_DIR_NAME = 'live';
|
|
26
|
-
const PACKAGE_VERSION = '0.99.
|
|
26
|
+
const PACKAGE_VERSION = '0.99.16';
|
|
27
27
|
const UNEXPANDED_TEMPLATE_RE = /\{\{[^}]+\}\}|\{%[^%]+%\}/;
|
|
28
28
|
const agentRunEnvCache = new Map();
|
|
29
29
|
const GENERATED_GITIGNORE_ENTRIES = [
|
|
@@ -43,7 +43,8 @@ const REQUIRED_GLOBAL_TEMPLATES = [
|
|
|
43
43
|
'global/tool-templates/claude-settings.json.njk',
|
|
44
44
|
'global/skills/commit-workflow/SKILL.md.njk',
|
|
45
45
|
'global/skills/github-release/SKILL.md.njk',
|
|
46
|
-
'global/skills/
|
|
46
|
+
'global/skills/release-package-check/SKILL.md.njk',
|
|
47
|
+
'global/skills/code-review-organizer/SKILL.md.njk'
|
|
47
48
|
];
|
|
48
49
|
function main(invokedTool, argv) {
|
|
49
50
|
const parsed = parseInvocation(invokedTool, argv);
|
|
@@ -758,7 +759,8 @@ function ensureDefaultGlobalTemplates(configRoot) {
|
|
|
758
759
|
['global/tool-templates/claude-settings.json.njk', defaultClaudeSettingsTemplate()],
|
|
759
760
|
['global/skills/commit-workflow/SKILL.md.njk', defaultCommitWorkflowSkill()],
|
|
760
761
|
['global/skills/github-release/SKILL.md.njk', defaultGithubReleaseSkill()],
|
|
761
|
-
['global/skills/
|
|
762
|
+
['global/skills/release-package-check/SKILL.md.njk', defaultReleasePackageCheckSkill()],
|
|
763
|
+
['global/skills/code-review-organizer/SKILL.md.njk', defaultCodeReviewOrganizerSkill()]
|
|
762
764
|
]);
|
|
763
765
|
for (const [relativePath, content] of defaults) {
|
|
764
766
|
const filePath = path.join(configRoot, relativePath);
|
|
@@ -966,13 +968,13 @@ function defaultManifest(profile) {
|
|
|
966
968
|
includes: [`{{ profile }}/${LOCAL_TEMPLATE_FILE_NAME}`]
|
|
967
969
|
},
|
|
968
970
|
skills: {
|
|
969
|
-
install: ['commit-workflow', 'github-release', 'code-review']
|
|
971
|
+
install: ['commit-workflow', 'github-release', 'release-package-check', 'code-review-organizer']
|
|
970
972
|
},
|
|
971
973
|
tools: {
|
|
972
974
|
codex: true,
|
|
973
975
|
claude: true
|
|
974
976
|
},
|
|
975
|
-
checks: ['agent-run check .', '
|
|
977
|
+
checks: ['agent-run check .', 'pnpm run cleanbuild'],
|
|
976
978
|
guardrails: {
|
|
977
979
|
blockGitWrite: true,
|
|
978
980
|
blockPublish: true,
|
|
@@ -981,8 +983,8 @@ function defaultManifest(profile) {
|
|
|
981
983
|
},
|
|
982
984
|
paths: {
|
|
983
985
|
changesFile: '{{ projectRoot }}/CHANGES',
|
|
984
|
-
reviewDir: '{{
|
|
985
|
-
reviewFile: '{{
|
|
986
|
+
reviewDir: '{{ profileDir }}/reviews',
|
|
987
|
+
reviewFile: '{{ profileDir }}/reviews/REVIEW-{{ date }}.md',
|
|
986
988
|
memoriesDir: '{{ agentDir }}/memories'
|
|
987
989
|
}
|
|
988
990
|
};
|
|
@@ -993,6 +995,8 @@ function normalizeManifest(manifest, profile) {
|
|
|
993
995
|
? manifest.skills
|
|
994
996
|
: manifest.skills?.install ?? asSkillObject(baseManifest.skills).install;
|
|
995
997
|
const overrides = Array.isArray(manifest.skills) ? {} : manifest.skills?.overrides ?? {};
|
|
998
|
+
const reviewDir = normalizeLegacyDefaultReviewPath(manifest.paths?.reviewDir ?? baseManifest.paths?.reviewDir ?? '{{ profileDir }}/reviews');
|
|
999
|
+
const reviewFile = normalizeLegacyDefaultReviewPath(manifest.paths?.reviewFile ?? baseManifest.paths?.reviewFile ?? '{{ profileDir }}/reviews/REVIEW-{{ date }}.md');
|
|
996
1000
|
return {
|
|
997
1001
|
profile: manifest.profile ?? profile,
|
|
998
1002
|
kind: manifest.kind ?? baseManifest.kind ?? 'code',
|
|
@@ -1001,7 +1005,7 @@ function normalizeManifest(manifest, profile) {
|
|
|
1001
1005
|
includes: manifest.agent?.includes ?? defaultAgentIncludesForProfile(profile)
|
|
1002
1006
|
},
|
|
1003
1007
|
skills: {
|
|
1004
|
-
install: installedSkills,
|
|
1008
|
+
install: normalizeInstalledSkills(installedSkills),
|
|
1005
1009
|
overrides
|
|
1006
1010
|
},
|
|
1007
1011
|
tools: {
|
|
@@ -1017,12 +1021,28 @@ function normalizeManifest(manifest, profile) {
|
|
|
1017
1021
|
},
|
|
1018
1022
|
paths: {
|
|
1019
1023
|
changesFile: manifest.paths?.changesFile ?? baseManifest.paths?.changesFile ?? '{{ projectRoot }}/CHANGES',
|
|
1020
|
-
reviewDir
|
|
1021
|
-
reviewFile
|
|
1024
|
+
reviewDir,
|
|
1025
|
+
reviewFile,
|
|
1026
|
+
reviewConsolidatedFile: manifest.paths?.reviewConsolidatedFile ?? baseManifest.paths?.reviewConsolidatedFile,
|
|
1022
1027
|
memoriesDir: manifest.paths?.memoriesDir ?? baseManifest.paths?.memoriesDir ?? '{{ agentDir }}/memories'
|
|
1023
1028
|
}
|
|
1024
1029
|
};
|
|
1025
1030
|
}
|
|
1031
|
+
function normalizeSkillName(name) {
|
|
1032
|
+
return name === 'code-review' ? 'code-review-organizer' : name;
|
|
1033
|
+
}
|
|
1034
|
+
function normalizeInstalledSkills(names) {
|
|
1035
|
+
return [...new Set(names.map(normalizeSkillName))];
|
|
1036
|
+
}
|
|
1037
|
+
function normalizeLegacyDefaultReviewPath(value) {
|
|
1038
|
+
if (value === '{{ agentDir }}/reviews') {
|
|
1039
|
+
return '{{ profileDir }}/reviews';
|
|
1040
|
+
}
|
|
1041
|
+
if (value === '{{ agentDir }}/reviews/REVIEW-{{ date }}.md') {
|
|
1042
|
+
return '{{ profileDir }}/reviews/REVIEW-{{ date }}.md';
|
|
1043
|
+
}
|
|
1044
|
+
return value;
|
|
1045
|
+
}
|
|
1026
1046
|
function asSkillObject(skills) {
|
|
1027
1047
|
if (Array.isArray(skills)) {
|
|
1028
1048
|
return { install: skills, overrides: {} };
|
|
@@ -1057,12 +1077,16 @@ function buildRenderContext(projectRoot, profileDir, configRoot, manifest, env)
|
|
|
1057
1077
|
checks: manifest.checks,
|
|
1058
1078
|
guardrails: manifest.guardrails
|
|
1059
1079
|
};
|
|
1080
|
+
const reviewDir = resolveRuntimePath(configRoot, manifest.paths.reviewDir, env, baseContext);
|
|
1060
1081
|
const paths = {
|
|
1061
1082
|
profileDir,
|
|
1062
1083
|
liveDir,
|
|
1063
1084
|
changesFile: resolveRuntimePath(configRoot, manifest.paths.changesFile, env, baseContext),
|
|
1064
|
-
reviewDir
|
|
1085
|
+
reviewDir,
|
|
1065
1086
|
reviewFile: resolveRuntimePath(configRoot, manifest.paths.reviewFile, env, baseContext),
|
|
1087
|
+
reviewConsolidatedFile: manifest.paths.reviewConsolidatedFile
|
|
1088
|
+
? resolveRuntimePath(configRoot, manifest.paths.reviewConsolidatedFile, env, baseContext)
|
|
1089
|
+
: path.join(reviewDir, 'REVIEW.md'),
|
|
1066
1090
|
memoriesDir: resolveRuntimePath(configRoot, manifest.paths.memoriesDir, env, baseContext),
|
|
1067
1091
|
globalMemoryDir: globalMemoryDir(configRoot),
|
|
1068
1092
|
codexHomeDir: path.join(resolveRuntimePath(configRoot, manifest.paths.memoriesDir, env, baseContext), 'codex-home'),
|
|
@@ -1420,6 +1444,70 @@ function syncRuntimeDirs(context) {
|
|
|
1420
1444
|
]) {
|
|
1421
1445
|
fs.mkdirSync(dir, { recursive: true });
|
|
1422
1446
|
}
|
|
1447
|
+
migrateLiveReviewFiles(context);
|
|
1448
|
+
removeLegacyCodeReviewSkillDirs(context);
|
|
1449
|
+
}
|
|
1450
|
+
function removeLegacyCodeReviewSkillDirs(context) {
|
|
1451
|
+
if (!context.skills.some((skill) => skill.name === 'code-review-organizer')) {
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
for (const dir of [
|
|
1455
|
+
path.join(context.paths.codexSkillsDir, 'code-review'),
|
|
1456
|
+
path.join(context.paths.claudeSkillsDir, 'code-review')
|
|
1457
|
+
]) {
|
|
1458
|
+
if (fs.existsSync(dir)) {
|
|
1459
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
function migrateLiveReviewFiles(context) {
|
|
1464
|
+
const legacyReviewDir = path.join(context.paths.liveDir, 'reviews');
|
|
1465
|
+
if (path.resolve(legacyReviewDir) === path.resolve(context.paths.reviewDir) || !fs.existsSync(legacyReviewDir)) {
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
fs.mkdirSync(context.paths.reviewDir, { recursive: true });
|
|
1469
|
+
for (const entry of fs.readdirSync(legacyReviewDir, { withFileTypes: true })) {
|
|
1470
|
+
if (!entry.isFile()) {
|
|
1471
|
+
continue;
|
|
1472
|
+
}
|
|
1473
|
+
const sourcePath = path.join(legacyReviewDir, entry.name);
|
|
1474
|
+
let targetPath = path.join(context.paths.reviewDir, entry.name);
|
|
1475
|
+
if (fs.existsSync(targetPath)) {
|
|
1476
|
+
if (filesHaveSameContent(sourcePath, targetPath)) {
|
|
1477
|
+
fs.rmSync(sourcePath);
|
|
1478
|
+
continue;
|
|
1479
|
+
}
|
|
1480
|
+
targetPath = nextAvailablePath(context.paths.reviewDir, entry.name);
|
|
1481
|
+
}
|
|
1482
|
+
moveFile(sourcePath, targetPath);
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
function filesHaveSameContent(leftPath, rightPath) {
|
|
1486
|
+
const left = fs.readFileSync(leftPath);
|
|
1487
|
+
const right = fs.readFileSync(rightPath);
|
|
1488
|
+
return left.length === right.length && left.equals(right);
|
|
1489
|
+
}
|
|
1490
|
+
function nextAvailablePath(dir, filename) {
|
|
1491
|
+
const parsed = path.parse(filename);
|
|
1492
|
+
for (let sequence = 1;; sequence += 1) {
|
|
1493
|
+
const candidate = path.join(dir, `${parsed.name}.${sequence}${parsed.ext}`);
|
|
1494
|
+
if (!fs.existsSync(candidate)) {
|
|
1495
|
+
return candidate;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
function moveFile(sourcePath, targetPath) {
|
|
1500
|
+
try {
|
|
1501
|
+
fs.renameSync(sourcePath, targetPath);
|
|
1502
|
+
}
|
|
1503
|
+
catch (error) {
|
|
1504
|
+
const code = error.code;
|
|
1505
|
+
if (code !== 'EXDEV') {
|
|
1506
|
+
throw error;
|
|
1507
|
+
}
|
|
1508
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
1509
|
+
fs.rmSync(sourcePath);
|
|
1510
|
+
}
|
|
1423
1511
|
}
|
|
1424
1512
|
function validateRenderedSkill(content, sourcePath) {
|
|
1425
1513
|
const frontMatter = /^---\n([\s\S]*?)\n---\n/.exec(content.replace(/\r\n/g, '\n'));
|
|
@@ -2348,18 +2436,62 @@ function defaultGithubReleaseSkill() {
|
|
|
2348
2436
|
''
|
|
2349
2437
|
].join('\n');
|
|
2350
2438
|
}
|
|
2351
|
-
function
|
|
2439
|
+
function defaultReleasePackageCheckSkill() {
|
|
2440
|
+
return [
|
|
2441
|
+
'---',
|
|
2442
|
+
'name: release-package-check',
|
|
2443
|
+
'description: Use before package releases and publish-ready changes to verify package metadata, release notes, lockfiles, workflows, git state, and agent-file hygiene.',
|
|
2444
|
+
'---',
|
|
2445
|
+
'',
|
|
2446
|
+
'# Release Package Check',
|
|
2447
|
+
'',
|
|
2448
|
+
'Use this skill instead of an external `repo-check` command.',
|
|
2449
|
+
'For package release or publish-ready work, verify the relevant package directory before finalizing:',
|
|
2450
|
+
'',
|
|
2451
|
+
'- The directory contains `package.json` and is inside a git repository.',
|
|
2452
|
+
'- The repository path follows `<org>/<repo>`, and `package.json.name` is `@<org>/<package-dir-name>`.',
|
|
2453
|
+
'- `package.json.version`, `package.json.license`, and `package.json.copyright` are present and non-empty.',
|
|
2454
|
+
'- A package-local `LICENSE` file exists and contains the exact copyright string from `package.json.copyright`.',
|
|
2455
|
+
'- A package-local `CHANGES` file exists.',
|
|
2456
|
+
'- The first `Version ...` line in `CHANGES` matches `Version <package.json.version> (<YYYY-MM-DD>)`.',
|
|
2457
|
+
'- The year in the top `CHANGES` version line appears in `package.json.copyright`.',
|
|
2458
|
+
'- The git `origin` remote matches `<org>/<repo>`.',
|
|
2459
|
+
'- The current branch has an upstream configured and is in sync with it after fetching.',
|
|
2460
|
+
'- The repository does not contain agent files or directories such as `AGENTS.md`, `CLAUDE.md`, `codex.md`, `.claude`, or `.codex`.',
|
|
2461
|
+
'- The repository root has a lockfile: `pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`, `bun.lockb`, or `bun.lock`.',
|
|
2462
|
+
'- GitHub workflows under `.github/workflows` use `actions/setup-node@v6` and `node-version: 24`.',
|
|
2463
|
+
'- GitHub workflows do not reference `node20` or `node22`.',
|
|
2464
|
+
'- The git working tree is clean for files under the checked package directory.',
|
|
2465
|
+
'- If files beyond `CHANGES` changed in the checked package directory, that package `CHANGES` file is also changed.',
|
|
2466
|
+
'',
|
|
2467
|
+
'Run the configured checks after this checklist:',
|
|
2468
|
+
'',
|
|
2469
|
+
'{% for check in checks %}',
|
|
2470
|
+
'- `{{ check }}`',
|
|
2471
|
+
'{% endfor %}',
|
|
2472
|
+
''
|
|
2473
|
+
].join('\n');
|
|
2474
|
+
}
|
|
2475
|
+
function defaultCodeReviewOrganizerSkill() {
|
|
2352
2476
|
return [
|
|
2353
2477
|
'---',
|
|
2354
|
-
'name: code-review',
|
|
2355
|
-
'description: Use for code review,
|
|
2478
|
+
'name: code-review-organizer',
|
|
2479
|
+
'description: Use for organizing code review findings, review files, and review follow-up state.',
|
|
2356
2480
|
'---',
|
|
2357
2481
|
'',
|
|
2358
|
-
'# Code Review',
|
|
2482
|
+
'# Code Review Organizer',
|
|
2359
2483
|
'',
|
|
2360
|
-
'
|
|
2361
|
-
'
|
|
2484
|
+
'On review startup, move any files from {{ paths.liveDir }}/reviews into {{ paths.reviewDir }} so review history persists outside the ephemeral live directory.',
|
|
2485
|
+
'Before doing any code review, read the generated AGENTS.md file and the current consolidated review file: {{ paths.reviewConsolidatedFile }}.',
|
|
2486
|
+
'Save each active review to {{ paths.reviewDir }}/yyyy-mm-dd-[sequence].md, where the sequence increments for multiple reviews on the same date.',
|
|
2487
|
+
'Whenever a saved review is created or changed, update {{ paths.reviewConsolidatedFile }} with the consolidated current review findings.',
|
|
2488
|
+
'In {{ paths.reviewConsolidatedFile }}, include each active finding with its review date and source review filename.',
|
|
2489
|
+
'When a finding is fixed, remove it from {{ paths.reviewConsolidatedFile }} and move it to {{ paths.reviewDir }}/DONE.md with the time it was fixed.',
|
|
2490
|
+
'When a finding is intentionally not fixed, remove it from {{ paths.reviewConsolidatedFile }} and move it to {{ paths.reviewDir }}/DONE.md with the time it was marked intentional and a note that it was intentionally left as-is.',
|
|
2491
|
+
'When a dated review file has no remaining active findings, delete it.',
|
|
2492
|
+
'Also include active findings in the final user-facing reply.',
|
|
2362
2493
|
'Do not save review files inside the project repo.',
|
|
2494
|
+
'Before the final reply for review work, verify that no REVIEW*.md files exist in {{ projectRoot }}, active dated review files exist only when they still contain active findings, and the consolidated REVIEW.md file was updated.',
|
|
2363
2495
|
''
|
|
2364
2496
|
].join('\n');
|
|
2365
2497
|
}
|
|
@@ -2410,6 +2542,12 @@ function defaultToolInstructionsTemplate(isClaude) {
|
|
|
2410
2542
|
'{{ paths.reviewFile }}',
|
|
2411
2543
|
'```',
|
|
2412
2544
|
'',
|
|
2545
|
+
'Consolidated review file:',
|
|
2546
|
+
'',
|
|
2547
|
+
'```text',
|
|
2548
|
+
'{{ paths.reviewConsolidatedFile }}',
|
|
2549
|
+
'```',
|
|
2550
|
+
'',
|
|
2413
2551
|
'Memories directory:',
|
|
2414
2552
|
'',
|
|
2415
2553
|
'```text',
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review-organizer
|
|
3
|
+
description: Use for organizing code review findings in {{ profile }}.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Organizer
|
|
7
|
+
|
|
8
|
+
Write review notes to:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
{{ paths.reviewFile }}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Keep the consolidated review in:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
{{ paths.reviewConsolidatedFile }}
|
|
18
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-package-check
|
|
3
|
+
description: Use before package releases in {{ profile }}.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Release Package Check
|
|
7
|
+
|
|
8
|
+
Use this checklist instead of an external `repo-check` command.
|
|
9
|
+
|
|
10
|
+
Run configured checks after package metadata, release notes, workflow, lockfile, and git-state review:
|
|
11
|
+
|
|
12
|
+
{% for check in checks %}
|
|
13
|
+
- `{{ check }}`
|
|
14
|
+
{% endfor %}
|
|
@@ -12,6 +12,7 @@ Do not edit this generated file. Edit `agent-run.jsonc` and `local.md.njk`.
|
|
|
12
12
|
- agentDir: `{{ agentDir }}`
|
|
13
13
|
- profileDir: `{{ profileDir }}`
|
|
14
14
|
- reviewFile: `{{ paths.reviewFile }}`
|
|
15
|
+
- reviewConsolidatedFile: `{{ paths.reviewConsolidatedFile }}`
|
|
15
16
|
- memoriesDir: `{{ paths.memoriesDir }}`
|
|
16
17
|
- globalMemoryDir: `{{ paths.globalMemoryDir }}`
|
|
17
18
|
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"install": [
|
|
13
13
|
"commit-workflow",
|
|
14
14
|
"github-release",
|
|
15
|
-
"
|
|
15
|
+
"release-package-check",
|
|
16
|
+
"code-review-organizer",
|
|
16
17
|
"triage"
|
|
17
18
|
],
|
|
18
19
|
"overrides": {
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
},
|
|
37
38
|
"paths": {
|
|
38
39
|
"changesFile": "{{ projectRoot }}/CHANGES",
|
|
39
|
-
"reviewDir": "{{
|
|
40
|
-
"reviewFile": "{{
|
|
40
|
+
"reviewDir": "{{ profileDir }}/reviews",
|
|
41
|
+
"reviewFile": "{{ profileDir }}/reviews/REVIEW-{{ date }}.md",
|
|
41
42
|
"memoriesDir": "{{ agentDir }}/memories"
|
|
42
43
|
}
|
|
43
44
|
}
|
package/package.json
CHANGED