aiox-core 5.0.7 → 5.0.8

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 (191) hide show
  1. package/.aiox-core/cli/commands/pro/buyer.js +379 -0
  2. package/.aiox-core/cli/commands/pro/index.js +191 -52
  3. package/.aiox-core/cli/commands/validate/index.js +2 -0
  4. package/.aiox-core/core/code-intel/helpers/dev-helper.js +1 -1
  5. package/.aiox-core/core/code-intel/helpers/devops-helper.js +0 -1
  6. package/.aiox-core/core/code-intel/helpers/planning-helper.js +1 -1
  7. package/.aiox-core/core/code-intel/helpers/qa-helper.js +2 -2
  8. package/.aiox-core/core/config/schemas/framework-config.schema.json +1 -0
  9. package/.aiox-core/core/config/template-overrides.js +1 -1
  10. package/.aiox-core/core/doctor/checks/ide-sync.js +81 -25
  11. package/.aiox-core/core/doctor/checks/rules-files.js +0 -1
  12. package/.aiox-core/core/doctor/checks/skills-count.js +83 -15
  13. package/.aiox-core/core/graph-dashboard/cli.js +1 -2
  14. package/.aiox-core/core/graph-dashboard/data-sources/code-intel-source.js +1 -1
  15. package/.aiox-core/core/ids/layer-classifier.js +1 -1
  16. package/.aiox-core/core/pro/pro-updater.js +578 -0
  17. package/.aiox-core/core/synapse/context/context-tracker.js +107 -9
  18. package/.aiox-core/core/synapse/layers/layer-processor.js +1 -1
  19. package/.aiox-core/core-config.yaml +15 -1
  20. package/.aiox-core/data/capability-detection.js +15 -15
  21. package/.aiox-core/data/entity-registry.yaml +18 -2
  22. package/.aiox-core/data/registry-update-log.jsonl +5 -0
  23. package/.aiox-core/data/tok3-token-comparison.js +0 -4
  24. package/.aiox-core/data/tool-search-validation.js +1 -1
  25. package/.aiox-core/development/agents/aiox-master.md +44 -6
  26. package/.aiox-core/development/agents/data-engineer.md +4 -4
  27. package/.aiox-core/development/agents/devops.md +52 -2
  28. package/.aiox-core/development/agents/po.md +1 -1
  29. package/.aiox-core/development/agents/qa.md +5 -11
  30. package/.aiox-core/development/agents/sm.md +3 -3
  31. package/.aiox-core/development/agents/ux-design-expert.md +1 -1
  32. package/.aiox-core/development/scripts/unified-activation-pipeline.js +29 -3
  33. package/.aiox-core/development/tasks/dev-develop-story.md +46 -7
  34. package/.aiox-core/development/tasks/devops-pro-access-grant.md +93 -0
  35. package/.aiox-core/development/tasks/devops-pro-activate.md +42 -0
  36. package/.aiox-core/development/tasks/devops-pro-check-access.md +34 -0
  37. package/.aiox-core/development/tasks/devops-pro-request-reset.md +34 -0
  38. package/.aiox-core/development/tasks/devops-pro-resend-verification.md +32 -0
  39. package/.aiox-core/development/tasks/devops-pro-reset-password.md +36 -0
  40. package/.aiox-core/development/tasks/devops-pro-validate-login.md +36 -0
  41. package/.aiox-core/development/tasks/devops-pro-verify-status.md +33 -0
  42. package/.aiox-core/development/tasks/qa-gate.md +54 -4
  43. package/.aiox-core/development/tasks/validate-next-story.md +39 -2
  44. package/.aiox-core/framework-config.yaml +1 -0
  45. package/.aiox-core/infrastructure/scripts/codex-skills-sync/README.md +69 -0
  46. package/.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js +727 -0
  47. package/.aiox-core/infrastructure/scripts/codex-skills-sync/index.js +10 -0
  48. package/.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js +65 -4
  49. package/.aiox-core/infrastructure/scripts/generate-settings-json.js +29 -4
  50. package/.aiox-core/infrastructure/scripts/ide-sync/agent-parser.js +4 -0
  51. package/.aiox-core/infrastructure/scripts/ide-sync/index.js +67 -7
  52. package/.aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js +145 -3
  53. package/.aiox-core/infrastructure/scripts/repair-agent-references.js +263 -0
  54. package/.aiox-core/infrastructure/scripts/validate-claude-integration.js +60 -8
  55. package/.aiox-core/infrastructure/scripts/validate-paths.js +13 -0
  56. package/.aiox-core/install-manifest.yaml +134 -82
  57. package/.aiox-core/utils/filters/index.js +2 -1
  58. package/.claude/commands/AIOX/agents/aiox-master.md +21 -0
  59. package/.claude/commands/AIOX/agents/analyst.md +21 -0
  60. package/.claude/commands/AIOX/agents/architect.md +21 -0
  61. package/.claude/commands/AIOX/agents/data-engineer.md +21 -0
  62. package/.claude/commands/AIOX/agents/dev.md +21 -0
  63. package/.claude/commands/AIOX/agents/devops.md +21 -0
  64. package/.claude/commands/AIOX/agents/pm.md +21 -0
  65. package/.claude/commands/AIOX/agents/po.md +21 -0
  66. package/.claude/commands/AIOX/agents/qa.md +21 -0
  67. package/.claude/commands/AIOX/agents/sm.md +21 -0
  68. package/.claude/commands/AIOX/agents/squad-creator.md +21 -0
  69. package/.claude/commands/AIOX/agents/ux-design-expert.md +21 -0
  70. package/.claude/commands/AIOX/scripts/agent-config-loader.js +624 -0
  71. package/.claude/commands/AIOX/scripts/generate-greeting.js +160 -0
  72. package/.claude/commands/AIOX/scripts/greeting-builder.js +866 -0
  73. package/.claude/commands/AIOX/scripts/session-context-loader.js +286 -0
  74. package/.claude/commands/AIOX/stories/story-6.1.4.md +1404 -0
  75. package/.claude/commands/cohort-squad/agents/cohort-manager.md +156 -0
  76. package/.claude/commands/design-system/agents/brad-frost.md +1097 -0
  77. package/.claude/commands/design-system/agents/dan-mall.md +857 -0
  78. package/.claude/commands/design-system/agents/dave-malouf.md +2272 -0
  79. package/.claude/commands/design-system/agents/design-chief.md +102 -0
  80. package/.claude/commands/design-system/agents/nano-banana-generator.md +162 -0
  81. package/.claude/commands/greet.md +101 -0
  82. package/.claude/commands/synapse/manager.md +75 -0
  83. package/.claude/commands/synapse/tasks/add-rule.md +94 -0
  84. package/.claude/commands/synapse/tasks/create-command.md +109 -0
  85. package/.claude/commands/synapse/tasks/create-domain.md +127 -0
  86. package/.claude/commands/synapse/tasks/diagnose-synapse.md +245 -0
  87. package/.claude/commands/synapse/tasks/edit-rule.md +109 -0
  88. package/.claude/commands/synapse/tasks/suggest-domain.md +116 -0
  89. package/.claude/commands/synapse/tasks/toggle-domain.md +83 -0
  90. package/.claude/commands/synapse/templates/domain-template +8 -0
  91. package/.claude/commands/synapse/templates/manifest-entry-template +4 -0
  92. package/.claude/commands/synapse/utils/manifest-parser-reference.md +134 -0
  93. package/.claude/hooks/precompact-session-digest.cjs +2 -2
  94. package/.claude/skills/AIOX/agents/aiox-master/SKILL.md +511 -0
  95. package/.claude/skills/AIOX/agents/analyst/SKILL.md +281 -0
  96. package/.claude/skills/AIOX/agents/architect/SKILL.md +482 -0
  97. package/.claude/skills/AIOX/agents/data-engineer/SKILL.md +503 -0
  98. package/.claude/skills/AIOX/agents/dev/SKILL.md +568 -0
  99. package/.claude/skills/AIOX/agents/devops/SKILL.md +597 -0
  100. package/.claude/skills/AIOX/agents/pm/SKILL.md +385 -0
  101. package/.claude/skills/AIOX/agents/po/SKILL.md +343 -0
  102. package/.claude/skills/AIOX/agents/qa/SKILL.md +451 -0
  103. package/.claude/skills/AIOX/agents/sm/SKILL.md +295 -0
  104. package/.claude/skills/AIOX/agents/squad-creator/SKILL.md +352 -0
  105. package/.claude/skills/AIOX/agents/ux-design-expert/SKILL.md +503 -0
  106. package/.claude/skills/architect-first/SKILL.md +275 -0
  107. package/.claude/skills/architect-first/assets/architecture-template.md +505 -0
  108. package/.claude/skills/architect-first/assets/config-template.yaml +351 -0
  109. package/.claude/skills/architect-first/references/architecture-checklist.md +216 -0
  110. package/.claude/skills/architect-first/references/pre-implementation-checklist.md +119 -0
  111. package/.claude/skills/architect-first/references/stop-rules-guide.md +291 -0
  112. package/.claude/skills/architect-first/references/testing-strategy-guide.md +477 -0
  113. package/.claude/skills/architect-first/scripts/architecture_validator.py +490 -0
  114. package/.claude/skills/architect-first/scripts/check_coupling.py +306 -0
  115. package/.claude/skills/architect-first/scripts/validate_risk_mitigation.py +382 -0
  116. package/.claude/skills/checklist-runner/SKILL.md +113 -0
  117. package/.claude/skills/clone-mind.md +329 -0
  118. package/.claude/skills/coderabbit-review/SKILL.md +106 -0
  119. package/.claude/skills/course-generation-workflow.md +76 -0
  120. package/.claude/skills/enhance-workflow.md +466 -0
  121. package/.claude/skills/mcp-builder/LICENSE.txt +202 -0
  122. package/.claude/skills/mcp-builder/SKILL.md +328 -0
  123. package/.claude/skills/mcp-builder/reference/evaluation.md +602 -0
  124. package/.claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
  125. package/.claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
  126. package/.claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
  127. package/.claude/skills/mcp-builder/scripts/connections.py +151 -0
  128. package/.claude/skills/mcp-builder/scripts/evaluation.py +373 -0
  129. package/.claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  130. package/.claude/skills/mcp-builder/scripts/requirements.txt +2 -0
  131. package/.claude/skills/ralph.md +181 -0
  132. package/.claude/skills/skill-creator/LICENSE.txt +202 -0
  133. package/.claude/skills/skill-creator/SKILL.md +209 -0
  134. package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
  135. package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  136. package/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  137. package/.claude/skills/squad.md +301 -0
  138. package/.claude/skills/synapse/SKILL.md +132 -0
  139. package/.claude/skills/synapse/assets/README.md +50 -0
  140. package/.claude/skills/synapse/references/brackets.md +100 -0
  141. package/.claude/skills/synapse/references/commands.md +118 -0
  142. package/.claude/skills/synapse/references/domains.md +126 -0
  143. package/.claude/skills/synapse/references/layers.md +186 -0
  144. package/.claude/skills/synapse/references/manifest.md +142 -0
  145. package/.claude/skills/tech-search/SKILL.md +431 -0
  146. package/.claude/skills/tech-search/prompts/page-extract.md +133 -0
  147. package/README.en.md +2 -2
  148. package/README.md +8 -2
  149. package/bin/aiox.js +55 -4
  150. package/bin/utils/framework-guard.js +4 -2
  151. package/bin/utils/pro-detector.js +119 -28
  152. package/bin/utils/validate-publish.js +6 -6
  153. package/docs/aiox-agent-flows/devops-system.md +18 -0
  154. package/docs/aiox-workflows/README.md +1 -0
  155. package/docs/aiox-workflows/pro-access-grant-workflow.md +218 -0
  156. package/docs/guides/pro/access-grant-ops-playbook.md +370 -0
  157. package/docs/guides/pro/install-gate-setup.md +12 -6
  158. package/docs/guides/pro/squad-creator-handoff-pro-access-ops.md +134 -0
  159. package/docs/guides/supabase-ops-handoff.md +768 -0
  160. package/package.json +12 -1
  161. package/packages/aiox-pro-cli/bin/aiox-pro.js +33 -12
  162. package/packages/installer/src/config/configure-environment.js +118 -50
  163. package/packages/installer/src/installer/aiox-core-installer.js +124 -27
  164. package/packages/installer/src/installer/brownfield-upgrader.js +66 -9
  165. package/packages/installer/src/installer/dependency-installer.js +4 -0
  166. package/packages/installer/src/pro/pro-scaffolder.js +5 -5
  167. package/packages/installer/src/updater/index.js +151 -10
  168. package/packages/installer/src/wizard/ide-config-generator.js +73 -7
  169. package/packages/installer/src/wizard/index.js +119 -31
  170. package/packages/installer/src/wizard/pro-setup.js +118 -47
  171. package/packages/installer/src/wizard/validation/validators/dependency-validator.js +32 -25
  172. package/packages/installer/src/wizard/validation/validators/file-structure-validator.js +26 -0
  173. package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +84 -1
  174. package/packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js +1 -1
  175. package/packages/installer/tests/unit/doctor/doctor-checks.test.js +85 -19
  176. package/packages/installer/tests/unit/entity-registry-bootstrap.test.js +4 -4
  177. package/packages/installer/tests/unit/generate-settings-json/generate-settings-json.test.js +5 -5
  178. package/packages/installer/tests/unit/ide-sync-integration/ide-sync-integration.test.js +4 -4
  179. package/packages/installer/tests/unit/merger/yaml-merger.test.js +11 -11
  180. package/pro/README.md +12 -1
  181. package/pro/license/index.js +3 -11
  182. package/pro/license/license-api.js +25 -0
  183. package/pro/license/license-cache.js +135 -31
  184. package/pro/license/license-crypto.js +59 -3
  185. package/pro/package.json +5 -4
  186. package/pro/squads/README.md +16 -16
  187. package/pro/squads/index.js +1 -1
  188. package/scripts/e2e/installed-skills-smoke.js +264 -0
  189. package/scripts/package-synapse.js +3 -3
  190. package/scripts/validate-package-completeness.js +8 -11
  191. package/.aiox-core/lib/build.json +0 -1
@@ -0,0 +1,263 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs-extra');
5
+ const path = require('path');
6
+
7
+ const { parseAllAgents } = require('./ide-sync/agent-parser');
8
+ const { commandSync } = require('./ide-sync/index');
9
+ const {
10
+ syncSkills,
11
+ getCodexHome,
12
+ getSkillId,
13
+ getLegacySkillId,
14
+ } = require('./codex-skills-sync/index');
15
+ const { validateCodexSkills } = require('./codex-skills-sync/validate');
16
+
17
+ function getDefaultOptions() {
18
+ const projectRoot = process.cwd();
19
+ return {
20
+ projectRoot,
21
+ sourceDir: path.join(projectRoot, '.aiox-core', 'development', 'agents'),
22
+ localSkillsDir: path.join(projectRoot, '.codex', 'skills'),
23
+ globalSkillsDir: path.join(getCodexHome(), 'skills'),
24
+ geminiCommandsDir: path.join(projectRoot, '.gemini', 'commands'),
25
+ includeGlobal: true,
26
+ dryRun: false,
27
+ quiet: false,
28
+ json: false,
29
+ };
30
+ }
31
+
32
+ function parseArgs(argv = process.argv.slice(2)) {
33
+ const args = new Set(argv);
34
+ return {
35
+ includeGlobal: !args.has('--no-global'),
36
+ dryRun: args.has('--dry-run'),
37
+ quiet: args.has('--quiet') || args.has('-q'),
38
+ json: args.has('--json'),
39
+ };
40
+ }
41
+
42
+ function isParsableAgent(agent) {
43
+ return !agent.error || agent.error === 'YAML parse failed, using fallback extraction';
44
+ }
45
+
46
+ function buildLegacyArtifacts(agents, options) {
47
+ const artifacts = [];
48
+
49
+ for (const agent of agents) {
50
+ const canonicalSkillId = getSkillId(agent.id);
51
+ const legacySkillId = getLegacySkillId(agent.id);
52
+
53
+ artifacts.push({
54
+ kind: 'skill-dir',
55
+ scope: 'local',
56
+ canonicalId: canonicalSkillId,
57
+ legacyId: legacySkillId,
58
+ path: path.join(options.localSkillsDir, legacySkillId),
59
+ });
60
+
61
+ if (options.includeGlobal) {
62
+ artifacts.push({
63
+ kind: 'skill-dir',
64
+ scope: 'global',
65
+ canonicalId: canonicalSkillId,
66
+ legacyId: legacySkillId,
67
+ path: path.join(options.globalSkillsDir, legacySkillId),
68
+ });
69
+ }
70
+
71
+ artifacts.push({
72
+ kind: 'gemini-command',
73
+ scope: 'project',
74
+ canonicalId: canonicalSkillId,
75
+ legacyId: legacySkillId,
76
+ path: path.join(options.geminiCommandsDir, `${legacySkillId}.toml`),
77
+ });
78
+ }
79
+
80
+ artifacts.push({
81
+ kind: 'gemini-menu',
82
+ scope: 'project',
83
+ canonicalId: 'aiox-menu',
84
+ legacyId: 'aios-menu',
85
+ path: path.join(options.geminiCommandsDir, 'aios-menu.toml'),
86
+ });
87
+
88
+ return artifacts;
89
+ }
90
+
91
+ function removeLegacyArtifacts(artifacts, options) {
92
+ const removed = [];
93
+ const skipped = [];
94
+
95
+ for (const artifact of artifacts) {
96
+ if (!fs.existsSync(artifact.path)) {
97
+ skipped.push({ ...artifact, reason: 'not-found' });
98
+ continue;
99
+ }
100
+
101
+ if (!options.dryRun) {
102
+ fs.removeSync(artifact.path);
103
+ }
104
+
105
+ removed.push(artifact);
106
+ }
107
+
108
+ return { removed, skipped };
109
+ }
110
+
111
+ function validateGeminiCommands(agents, commandsDir) {
112
+ const errors = [];
113
+ const checked = [];
114
+
115
+ const menuPath = path.join(commandsDir, 'aiox-menu.toml');
116
+ checked.push(menuPath);
117
+ if (!fs.existsSync(menuPath)) {
118
+ errors.push(`Missing Gemini launcher: ${menuPath}`);
119
+ }
120
+
121
+ const legacyMenuPath = path.join(commandsDir, 'aios-menu.toml');
122
+ if (fs.existsSync(legacyMenuPath)) {
123
+ errors.push(`Legacy Gemini launcher still present: ${legacyMenuPath}`);
124
+ }
125
+
126
+ for (const agent of agents) {
127
+ const canonicalId = getSkillId(agent.id);
128
+ const legacyId = getLegacySkillId(agent.id);
129
+ const canonicalPath = path.join(commandsDir, `${canonicalId}.toml`);
130
+ const legacyPath = path.join(commandsDir, `${legacyId}.toml`);
131
+
132
+ checked.push(canonicalPath);
133
+ if (!fs.existsSync(canonicalPath)) {
134
+ errors.push(`Missing Gemini command: ${canonicalPath}`);
135
+ }
136
+ if (fs.existsSync(legacyPath)) {
137
+ errors.push(`Legacy Gemini command still present: ${legacyPath}`);
138
+ }
139
+ }
140
+
141
+ return {
142
+ ok: errors.length === 0,
143
+ checked: checked.length,
144
+ errors,
145
+ };
146
+ }
147
+
148
+ async function repairAgentReferences(options = {}) {
149
+ const resolved = { ...getDefaultOptions(), ...options };
150
+ const agents = parseAllAgents(resolved.sourceDir).filter(isParsableAgent);
151
+ const legacyArtifacts = buildLegacyArtifacts(agents, resolved);
152
+ const cleanup = removeLegacyArtifacts(legacyArtifacts, resolved);
153
+
154
+ const skillSync = syncSkills({
155
+ sourceDir: resolved.sourceDir,
156
+ localSkillsDir: resolved.localSkillsDir,
157
+ globalSkillsDir: resolved.globalSkillsDir,
158
+ global: resolved.includeGlobal,
159
+ dryRun: resolved.dryRun,
160
+ quiet: true,
161
+ });
162
+
163
+ await commandSync({
164
+ projectRoot: resolved.projectRoot,
165
+ ide: null,
166
+ dryRun: resolved.dryRun,
167
+ verbose: false,
168
+ quiet: true,
169
+ });
170
+
171
+ const localValidation = validateCodexSkills({
172
+ projectRoot: resolved.projectRoot,
173
+ sourceDir: resolved.sourceDir,
174
+ skillsDir: resolved.localSkillsDir,
175
+ strict: true,
176
+ quiet: true,
177
+ });
178
+
179
+ const globalValidation = resolved.includeGlobal
180
+ ? validateCodexSkills({
181
+ projectRoot: resolved.projectRoot,
182
+ sourceDir: resolved.sourceDir,
183
+ skillsDir: resolved.globalSkillsDir,
184
+ strict: true,
185
+ allowOrphaned: true,
186
+ quiet: true,
187
+ })
188
+ : null;
189
+
190
+ const geminiValidation = validateGeminiCommands(agents, resolved.geminiCommandsDir);
191
+
192
+ return {
193
+ ok: localValidation.ok && (globalValidation ? globalValidation.ok : true) && geminiValidation.ok,
194
+ agentsChecked: agents.length,
195
+ removed: cleanup.removed,
196
+ skipped: cleanup.skipped,
197
+ skillSync,
198
+ validations: {
199
+ localCodex: localValidation,
200
+ globalCodex: globalValidation,
201
+ gemini: geminiValidation,
202
+ },
203
+ };
204
+ }
205
+
206
+ function formatHumanReport(result) {
207
+ const lines = [
208
+ result.ok
209
+ ? `✅ Agent/skill reference repair completed (${result.agentsChecked} core agents checked)`
210
+ : `❌ Agent/skill reference repair found issues (${result.agentsChecked} core agents checked)`,
211
+ `- Removed legacy artifacts: ${result.removed.length}`,
212
+ `- Skipped missing legacy artifacts: ${result.skipped.length}`,
213
+ `- Local Codex validation: ${result.validations.localCodex.ok ? 'pass' : 'fail'}`,
214
+ `- Global Codex validation: ${result.validations.globalCodex ? (result.validations.globalCodex.ok ? 'pass' : 'fail') : 'skipped'}`,
215
+ `- Gemini validation: ${result.validations.gemini.ok ? 'pass' : 'fail'}`,
216
+ ];
217
+
218
+ const detailErrors = [
219
+ ...result.validations.localCodex.errors,
220
+ ...(result.validations.globalCodex ? result.validations.globalCodex.errors : []),
221
+ ...result.validations.gemini.errors,
222
+ ];
223
+
224
+ if (detailErrors.length > 0) {
225
+ lines.push(...detailErrors.map(error => ` • ${error}`));
226
+ }
227
+
228
+ return lines.join('\n');
229
+ }
230
+
231
+ async function main() {
232
+ const options = parseArgs();
233
+ const result = await repairAgentReferences(options);
234
+
235
+ if (!options.quiet) {
236
+ if (options.json) {
237
+ console.log(JSON.stringify(result, null, 2));
238
+ } else {
239
+ console.log(formatHumanReport(result));
240
+ }
241
+ }
242
+
243
+ if (!result.ok) {
244
+ process.exitCode = 1;
245
+ }
246
+ }
247
+
248
+ if (require.main === module) {
249
+ main().catch((error) => {
250
+ console.error(`❌ ${error.message}`);
251
+ process.exit(1);
252
+ });
253
+ }
254
+
255
+ module.exports = {
256
+ buildLegacyArtifacts,
257
+ removeLegacyArtifacts,
258
+ validateGeminiCommands,
259
+ repairAgentReferences,
260
+ parseArgs,
261
+ getDefaultOptions,
262
+ formatHumanReport,
263
+ };
@@ -17,10 +17,28 @@ function countMarkdownFiles(dirPath) {
17
17
  return fs.readdirSync(dirPath).filter((f) => f.endsWith('.md')).length;
18
18
  }
19
19
 
20
+ function listMarkdownBasenames(dirPath) {
21
+ if (!fs.existsSync(dirPath)) return [];
22
+ return fs.readdirSync(dirPath)
23
+ .filter((f) => f.endsWith('.md'))
24
+ .map((f) => path.basename(f, '.md'))
25
+ .sort();
26
+ }
27
+
28
+ function listClaudeAgentSkillIds(skillsAgentsDir) {
29
+ if (!fs.existsSync(skillsAgentsDir)) return [];
30
+ return fs.readdirSync(skillsAgentsDir, { withFileTypes: true })
31
+ .filter((entry) => entry.isDirectory() && fs.existsSync(path.join(skillsAgentsDir, entry.name, 'SKILL.md')))
32
+ .map((entry) => entry.name)
33
+ .sort();
34
+ }
35
+
20
36
  function validateClaudeIntegration(options = {}) {
21
37
  const projectRoot = options.projectRoot || process.cwd();
22
38
  const rulesFile = options.rulesFile || path.join(projectRoot, '.claude', 'CLAUDE.md');
23
39
  const agentsDir = options.agentsDir || path.join(projectRoot, '.claude', 'commands', 'AIOX', 'agents');
40
+ const skillsAgentsDir =
41
+ options.skillsAgentsDir || path.join(projectRoot, '.claude', 'skills', 'AIOX', 'agents');
24
42
  const hooksDir = options.hooksDir || path.join(projectRoot, '.claude', 'hooks');
25
43
  const sourceAgentsDir =
26
44
  options.sourceAgentsDir || path.join(projectRoot, '.aiox-core', 'development', 'agents');
@@ -29,7 +47,10 @@ function validateClaudeIntegration(options = {}) {
29
47
  const warnings = [];
30
48
 
31
49
  if (!fs.existsSync(agentsDir)) {
32
- errors.push(`Missing Claude agents dir: ${path.relative(projectRoot, agentsDir)}`);
50
+ warnings.push(`Missing legacy Claude commands dir: ${path.relative(projectRoot, agentsDir)}`);
51
+ }
52
+ if (!fs.existsSync(skillsAgentsDir)) {
53
+ errors.push(`Missing Claude agent skills dir: ${path.relative(projectRoot, skillsAgentsDir)}`);
33
54
  }
34
55
  if (!fs.existsSync(rulesFile)) {
35
56
  warnings.push(`Claude rules file not found yet: ${path.relative(projectRoot, rulesFile)}`);
@@ -38,10 +59,36 @@ function validateClaudeIntegration(options = {}) {
38
59
  warnings.push(`Claude hooks dir not found yet: ${path.relative(projectRoot, hooksDir)}`);
39
60
  }
40
61
 
41
- const sourceCount = countMarkdownFiles(sourceAgentsDir);
42
- const claudeCount = countMarkdownFiles(agentsDir);
43
- if (sourceCount > 0 && claudeCount !== sourceCount) {
44
- warnings.push(`Claude agent count differs from source (${claudeCount}/${sourceCount})`);
62
+ const sourceAgents = listMarkdownBasenames(sourceAgentsDir);
63
+ const commandAgents = listMarkdownBasenames(agentsDir);
64
+ const skillAgents = listClaudeAgentSkillIds(skillsAgentsDir);
65
+
66
+ if (sourceAgents.length > 0 && skillAgents.length !== sourceAgents.length) {
67
+ errors.push(`Claude agent skill count differs from source (${skillAgents.length}/${sourceAgents.length})`);
68
+ }
69
+
70
+ for (const sourceAgent of sourceAgents) {
71
+ if (!skillAgents.includes(sourceAgent)) {
72
+ errors.push(`Missing Claude agent skill: ${sourceAgent}`);
73
+ continue;
74
+ }
75
+
76
+ const skillPath = path.join(skillsAgentsDir, sourceAgent, 'SKILL.md');
77
+ let skillContent = '';
78
+ try {
79
+ skillContent = fs.readFileSync(skillPath, 'utf8');
80
+ } catch (_error) {
81
+ errors.push(`Cannot read Claude agent skill: ${sourceAgent}`);
82
+ continue;
83
+ }
84
+
85
+ if (!skillContent.includes('activation_type: pipeline')) {
86
+ errors.push(`Claude agent skill missing activation_type: pipeline: ${sourceAgent}`);
87
+ }
88
+ }
89
+
90
+ if (sourceAgents.length > 0 && commandAgents.length !== sourceAgents.length) {
91
+ warnings.push(`Legacy Claude command count differs from source (${commandAgents.length}/${sourceAgents.length})`);
45
92
  }
46
93
 
47
94
  return {
@@ -49,15 +96,18 @@ function validateClaudeIntegration(options = {}) {
49
96
  errors,
50
97
  warnings,
51
98
  metrics: {
52
- sourceAgents: sourceCount,
53
- claudeAgents: claudeCount,
99
+ sourceAgents: sourceAgents.length,
100
+ claudeCommands: commandAgents.length,
101
+ claudeSkills: skillAgents.length,
54
102
  },
55
103
  };
56
104
  }
57
105
 
58
106
  function formatHumanReport(result) {
59
107
  if (result.ok) {
60
- const lines = [`✅ Claude integration validation passed (agents: ${result.metrics.claudeAgents})`];
108
+ const lines = [
109
+ `✅ Claude integration validation passed (skills: ${result.metrics.claudeSkills}, legacy commands: ${result.metrics.claudeCommands})`,
110
+ ];
61
111
  if (result.warnings.length > 0) {
62
112
  lines.push(...result.warnings.map((w) => `⚠️ ${w}`));
63
113
  }
@@ -98,4 +148,6 @@ module.exports = {
98
148
  validateClaudeIntegration,
99
149
  parseArgs,
100
150
  countMarkdownFiles,
151
+ listMarkdownBasenames,
152
+ listClaudeAgentSkillIds,
101
153
  };
@@ -9,6 +9,7 @@ const FORBIDDEN_ABSOLUTE_PATTERNS = [
9
9
  /\/home\/[^\s/'"]+/g,
10
10
  /[A-Za-z]:\\Users\\[^\s\\'"]+/g,
11
11
  ];
12
+ const GENERATED_SKILL_MARKER = '<!-- AIOX-CODEX-LOCAL-SKILLS: generated -->';
12
13
 
13
14
  function getDefaultOptions() {
14
15
  const projectRoot = process.cwd();
@@ -56,6 +57,12 @@ function collectAbsolutePathViolations(content, filePath) {
56
57
 
57
58
  function validateSkillPathConventions(content, filePath) {
58
59
  const errors = [];
60
+ const generatedSquadSource = extractGeneratedSquadSource(content);
61
+
62
+ if (content.includes(GENERATED_SKILL_MARKER) && generatedSquadSource) {
63
+ return errors;
64
+ }
65
+
59
66
  if (!content.includes('.aiox-core/development/agents/')) {
60
67
  errors.push(`${filePath} missing canonical source path ".aiox-core/development/agents/"`);
61
68
  }
@@ -65,6 +72,11 @@ function validateSkillPathConventions(content, filePath) {
65
72
  return errors;
66
73
  }
67
74
 
75
+ function extractGeneratedSquadSource(content) {
76
+ const match = String(content || '').match(/`(squads\/[^`]+\/agents\/[^`]+\.md)`/);
77
+ return match ? match[1] : '';
78
+ }
79
+
68
80
  function validatePaths(options = {}) {
69
81
  const resolved = { ...getDefaultOptions(), ...options };
70
82
  const errors = [];
@@ -139,4 +151,5 @@ module.exports = {
139
151
  listSkillFiles,
140
152
  collectAbsolutePathViolations,
141
153
  validateSkillPathConventions,
154
+ extractGeneratedSquadSource,
142
155
  };