@technomoron/agent-run 0.99.15 → 0.99.17

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 CHANGED
@@ -1,6 +1,17 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ Version 0.99.17 (2026-05-06)
5
+ ----------------------------
6
+ * Generate Codex native skills under `CODEX_HOME/skills` so runtime skill discovery matches generated profiles.
7
+ * Remove stale legacy Codex skill copies from `live/.agents/skills` during profile updates.
8
+
9
+ Version 0.99.16 (2026-05-03)
10
+ ----------------------------
11
+ * Move review history out of generated `live/` directories into persistent profile `reviews/` directories and migrate legacy live review files.
12
+ * Rename the built-in review skill to `code-review-organizer` and remove stale generated `code-review` skill directories.
13
+ * Add the `release-package-check` skill to replace the external `repo-check` package release checklist.
14
+
4
15
  Version 0.99.15 (2026-04-30)
5
16
  ----------------------------
6
17
  * Add `--generate` for Codex and Claude runs to render generated files without launching the underlying tool.
package/README.md CHANGED
@@ -171,7 +171,7 @@ directory and rewrites generated files:
171
171
  - `AGENTS.md`
172
172
  - `CLAUDE.md`
173
173
  - `config.toml`
174
- - `.agents/skills/**`
174
+ - `memories/codex-home/skills/**`
175
175
  - `.claude/**`
176
176
  - `bin/**`
177
177
 
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.10';
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/code-review/SKILL.md.njk'
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/code-review/SKILL.md.njk', defaultCodeReviewSkill()]
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 .', 'repo-check check .', 'pnpm run cleanbuild'],
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: '{{ agentDir }}/reviews',
985
- reviewFile: '{{ agentDir }}/reviews/REVIEW-{{ date }}.md',
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: manifest.paths?.reviewDir ?? baseManifest.paths?.reviewDir ?? '{{ agentDir }}/reviews',
1021
- reviewFile: manifest.paths?.reviewFile ?? baseManifest.paths?.reviewFile ?? '{{ agentDir }}/reviews/REVIEW-{{ date }}.md',
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,17 +1077,23 @@ 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);
1081
+ const memoriesDir = resolveRuntimePath(configRoot, manifest.paths.memoriesDir, env, baseContext);
1082
+ const codexHomeDir = path.join(memoriesDir, 'codex-home');
1060
1083
  const paths = {
1061
1084
  profileDir,
1062
1085
  liveDir,
1063
1086
  changesFile: resolveRuntimePath(configRoot, manifest.paths.changesFile, env, baseContext),
1064
- reviewDir: resolveRuntimePath(configRoot, manifest.paths.reviewDir, env, baseContext),
1087
+ reviewDir,
1065
1088
  reviewFile: resolveRuntimePath(configRoot, manifest.paths.reviewFile, env, baseContext),
1066
- memoriesDir: resolveRuntimePath(configRoot, manifest.paths.memoriesDir, env, baseContext),
1089
+ reviewConsolidatedFile: manifest.paths.reviewConsolidatedFile
1090
+ ? resolveRuntimePath(configRoot, manifest.paths.reviewConsolidatedFile, env, baseContext)
1091
+ : path.join(reviewDir, 'REVIEW.md'),
1092
+ memoriesDir,
1067
1093
  globalMemoryDir: globalMemoryDir(configRoot),
1068
- codexHomeDir: path.join(resolveRuntimePath(configRoot, manifest.paths.memoriesDir, env, baseContext), 'codex-home'),
1094
+ codexHomeDir,
1069
1095
  overridesDir: path.join(profileDir, 'overrides'),
1070
- codexSkillsDir: path.join(liveDir, '.agents', 'skills'),
1096
+ codexSkillsDir: path.join(codexHomeDir, 'skills'),
1071
1097
  claudeSkillsDir: path.join(liveDir, '.claude', 'skills'),
1072
1098
  binDir: path.join(liveDir, 'bin')
1073
1099
  };
@@ -1420,6 +1446,84 @@ function syncRuntimeDirs(context) {
1420
1446
  ]) {
1421
1447
  fs.mkdirSync(dir, { recursive: true });
1422
1448
  }
1449
+ migrateLiveReviewFiles(context);
1450
+ removeLegacyCodexSkillDirs(context);
1451
+ removeLegacyCodeReviewSkillDirs(context);
1452
+ }
1453
+ function removeLegacyCodexSkillDirs(context) {
1454
+ const legacyCodexSkillsDir = path.join(context.paths.liveDir, '.agents', 'skills');
1455
+ if (path.resolve(legacyCodexSkillsDir) === path.resolve(context.paths.codexSkillsDir)) {
1456
+ return;
1457
+ }
1458
+ for (const skill of context.skills) {
1459
+ const legacySkillDir = path.join(legacyCodexSkillsDir, skill.name);
1460
+ if (fs.existsSync(legacySkillDir)) {
1461
+ fs.rmSync(legacySkillDir, { recursive: true, force: true });
1462
+ }
1463
+ }
1464
+ }
1465
+ function removeLegacyCodeReviewSkillDirs(context) {
1466
+ if (!context.skills.some((skill) => skill.name === 'code-review-organizer')) {
1467
+ return;
1468
+ }
1469
+ for (const dir of [
1470
+ path.join(context.paths.liveDir, '.agents', 'skills', 'code-review'),
1471
+ path.join(context.paths.codexSkillsDir, 'code-review'),
1472
+ path.join(context.paths.claudeSkillsDir, 'code-review')
1473
+ ]) {
1474
+ if (fs.existsSync(dir)) {
1475
+ fs.rmSync(dir, { recursive: true, force: true });
1476
+ }
1477
+ }
1478
+ }
1479
+ function migrateLiveReviewFiles(context) {
1480
+ const legacyReviewDir = path.join(context.paths.liveDir, 'reviews');
1481
+ if (path.resolve(legacyReviewDir) === path.resolve(context.paths.reviewDir) || !fs.existsSync(legacyReviewDir)) {
1482
+ return;
1483
+ }
1484
+ fs.mkdirSync(context.paths.reviewDir, { recursive: true });
1485
+ for (const entry of fs.readdirSync(legacyReviewDir, { withFileTypes: true })) {
1486
+ if (!entry.isFile()) {
1487
+ continue;
1488
+ }
1489
+ const sourcePath = path.join(legacyReviewDir, entry.name);
1490
+ let targetPath = path.join(context.paths.reviewDir, entry.name);
1491
+ if (fs.existsSync(targetPath)) {
1492
+ if (filesHaveSameContent(sourcePath, targetPath)) {
1493
+ fs.rmSync(sourcePath);
1494
+ continue;
1495
+ }
1496
+ targetPath = nextAvailablePath(context.paths.reviewDir, entry.name);
1497
+ }
1498
+ moveFile(sourcePath, targetPath);
1499
+ }
1500
+ }
1501
+ function filesHaveSameContent(leftPath, rightPath) {
1502
+ const left = fs.readFileSync(leftPath);
1503
+ const right = fs.readFileSync(rightPath);
1504
+ return left.length === right.length && left.equals(right);
1505
+ }
1506
+ function nextAvailablePath(dir, filename) {
1507
+ const parsed = path.parse(filename);
1508
+ for (let sequence = 1;; sequence += 1) {
1509
+ const candidate = path.join(dir, `${parsed.name}.${sequence}${parsed.ext}`);
1510
+ if (!fs.existsSync(candidate)) {
1511
+ return candidate;
1512
+ }
1513
+ }
1514
+ }
1515
+ function moveFile(sourcePath, targetPath) {
1516
+ try {
1517
+ fs.renameSync(sourcePath, targetPath);
1518
+ }
1519
+ catch (error) {
1520
+ const code = error.code;
1521
+ if (code !== 'EXDEV') {
1522
+ throw error;
1523
+ }
1524
+ fs.copyFileSync(sourcePath, targetPath);
1525
+ fs.rmSync(sourcePath);
1526
+ }
1423
1527
  }
1424
1528
  function validateRenderedSkill(content, sourcePath) {
1425
1529
  const frontMatter = /^---\n([\s\S]*?)\n---\n/.exec(content.replace(/\r\n/g, '\n'));
@@ -2348,18 +2452,62 @@ function defaultGithubReleaseSkill() {
2348
2452
  ''
2349
2453
  ].join('\n');
2350
2454
  }
2351
- function defaultCodeReviewSkill() {
2455
+ function defaultReleasePackageCheckSkill() {
2352
2456
  return [
2353
2457
  '---',
2354
- 'name: code-review',
2355
- 'description: Use for code review, PR review, and diff review.',
2458
+ 'name: release-package-check',
2459
+ 'description: Use before package releases and publish-ready changes to verify package metadata, release notes, lockfiles, workflows, git state, and agent-file hygiene.',
2356
2460
  '---',
2357
2461
  '',
2358
- '# Code Review',
2462
+ '# Release Package Check',
2463
+ '',
2464
+ 'Use this skill instead of an external `repo-check` command.',
2465
+ 'For package release or publish-ready work, verify the relevant package directory before finalizing:',
2359
2466
  '',
2360
- 'Save review notes to {{ paths.reviewFile }}. If the file exists, update it.',
2361
- 'Also include findings in the final user-facing reply.',
2467
+ '- The directory contains `package.json` and is inside a git repository.',
2468
+ '- The repository path follows `<org>/<repo>`, and `package.json.name` is `@<org>/<package-dir-name>`.',
2469
+ '- `package.json.version`, `package.json.license`, and `package.json.copyright` are present and non-empty.',
2470
+ '- A package-local `LICENSE` file exists and contains the exact copyright string from `package.json.copyright`.',
2471
+ '- A package-local `CHANGES` file exists.',
2472
+ '- The first `Version ...` line in `CHANGES` matches `Version <package.json.version> (<YYYY-MM-DD>)`.',
2473
+ '- The year in the top `CHANGES` version line appears in `package.json.copyright`.',
2474
+ '- The git `origin` remote matches `<org>/<repo>`.',
2475
+ '- The current branch has an upstream configured and is in sync with it after fetching.',
2476
+ '- The repository does not contain agent files or directories such as `AGENTS.md`, `CLAUDE.md`, `codex.md`, `.claude`, or `.codex`.',
2477
+ '- The repository root has a lockfile: `pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`, `bun.lockb`, or `bun.lock`.',
2478
+ '- GitHub workflows under `.github/workflows` use `actions/setup-node@v6` and `node-version: 24`.',
2479
+ '- GitHub workflows do not reference `node20` or `node22`.',
2480
+ '- The git working tree is clean for files under the checked package directory.',
2481
+ '- If files beyond `CHANGES` changed in the checked package directory, that package `CHANGES` file is also changed.',
2482
+ '',
2483
+ 'Run the configured checks after this checklist:',
2484
+ '',
2485
+ '{% for check in checks %}',
2486
+ '- `{{ check }}`',
2487
+ '{% endfor %}',
2488
+ ''
2489
+ ].join('\n');
2490
+ }
2491
+ function defaultCodeReviewOrganizerSkill() {
2492
+ return [
2493
+ '---',
2494
+ 'name: code-review-organizer',
2495
+ 'description: Use for organizing code review findings, review files, and review follow-up state.',
2496
+ '---',
2497
+ '',
2498
+ '# Code Review Organizer',
2499
+ '',
2500
+ 'On review startup, move any files from {{ paths.liveDir }}/reviews into {{ paths.reviewDir }} so review history persists outside the ephemeral live directory.',
2501
+ 'Before doing any code review, read the generated AGENTS.md file and the current consolidated review file: {{ paths.reviewConsolidatedFile }}.',
2502
+ 'Save each active review to {{ paths.reviewDir }}/yyyy-mm-dd-[sequence].md, where the sequence increments for multiple reviews on the same date.',
2503
+ 'Whenever a saved review is created or changed, update {{ paths.reviewConsolidatedFile }} with the consolidated current review findings.',
2504
+ 'In {{ paths.reviewConsolidatedFile }}, include each active finding with its review date and source review filename.',
2505
+ 'When a finding is fixed, remove it from {{ paths.reviewConsolidatedFile }} and move it to {{ paths.reviewDir }}/DONE.md with the time it was fixed.',
2506
+ '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.',
2507
+ 'When a dated review file has no remaining active findings, delete it.',
2508
+ 'Also include active findings in the final user-facing reply.',
2362
2509
  'Do not save review files inside the project repo.',
2510
+ '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
2511
  ''
2364
2512
  ].join('\n');
2365
2513
  }
@@ -2410,6 +2558,12 @@ function defaultToolInstructionsTemplate(isClaude) {
2410
2558
  '{{ paths.reviewFile }}',
2411
2559
  '```',
2412
2560
  '',
2561
+ 'Consolidated review file:',
2562
+ '',
2563
+ '```text',
2564
+ '{{ paths.reviewConsolidatedFile }}',
2565
+ '```',
2566
+ '',
2413
2567
  'Memories directory:',
2414
2568
  '',
2415
2569
  '```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
- "code-review",
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": "{{ agentDir }}/reviews",
40
- "reviewFile": "{{ agentDir }}/reviews/REVIEW-{{ date }}.md",
40
+ "reviewDir": "{{ profileDir }}/reviews",
41
+ "reviewFile": "{{ profileDir }}/reviews/REVIEW-{{ date }}.md",
41
42
  "memoriesDir": "{{ agentDir }}/memories"
42
43
  }
43
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technomoron/agent-run",
3
- "version": "0.99.15",
3
+ "version": "0.99.17",
4
4
  "packageManager": "pnpm@10.28.1",
5
5
  "bin": {
6
6
  "agent-run": "dist/agent-run.js"
@@ -1,12 +0,0 @@
1
- ---
2
- name: code-review
3
- description: Use for reviewing code changes in {{ profile }}.
4
- ---
5
-
6
- # Code Review
7
-
8
- Write review notes to:
9
-
10
- ```text
11
- {{ paths.reviewFile }}
12
- ```