@givolt/i3-composer-agent 1.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude/commands/{build.md → i3-build.md} +10 -10
  3. package/.claude/commands/{code-simplify.md → i3-code-simplify.md} +2 -2
  4. package/.claude/commands/{constraints.md → i3-constraints.md} +4 -4
  5. package/.claude/commands/{plan.md → i3-plan.md} +1 -1
  6. package/.claude/commands/{review.md → i3-review.md} +3 -3
  7. package/.claude/commands/{ship.md → i3-ship.md} +4 -4
  8. package/.claude/commands/{spec.md → i3-spec.md} +1 -1
  9. package/.claude/commands/{test.md → i3-test.md} +2 -2
  10. package/.claude/commands/{webperf.md → i3-webperf.md} +1 -1
  11. package/.claude-plugin/marketplace.json +1 -1
  12. package/.claude-plugin/plugin.json +1 -1
  13. package/.codex-plugin/plugin.json +1 -1
  14. package/.gemini/commands/{build.toml → i3-build.toml} +10 -10
  15. package/.gemini/commands/{code-simplify.toml → i3-code-simplify.toml} +2 -2
  16. package/.gemini/commands/{constraints.toml → i3-constraints.toml} +4 -4
  17. package/.gemini/commands/{planning.toml → i3-planning.toml} +1 -1
  18. package/{commands/review.toml → .gemini/commands/i3-review.toml} +3 -3
  19. package/.gemini/commands/{ship.toml → i3-ship.toml} +4 -4
  20. package/.gemini/commands/{spec.toml → i3-spec.toml} +1 -1
  21. package/{commands/test.toml → .gemini/commands/i3-test.toml} +2 -2
  22. package/.gemini/commands/{webperf.toml → i3-webperf.toml} +1 -1
  23. package/README.md +72 -69
  24. package/agents/code-reviewer.md +2 -2
  25. package/agents/security-auditor.md +1 -1
  26. package/agents/test-engineer.md +1 -1
  27. package/agents/web-performance-auditor.md +3 -3
  28. package/bin/agent-targets.json +11 -0
  29. package/bin/asset-fingerprint.cjs +38 -0
  30. package/bin/cleanup-backups.cjs +16 -0
  31. package/bin/i3-composer-agent.cjs +29 -14
  32. package/bin/install.cjs +81 -19
  33. package/bin/native-content.cjs +29 -0
  34. package/bin/wizard.cjs +2 -1
  35. package/commands/{build.toml → i3-build.toml} +10 -10
  36. package/commands/{code-simplify.toml → i3-code-simplify.toml} +2 -2
  37. package/commands/{constraints.toml → i3-constraints.toml} +4 -4
  38. package/commands/{planning.toml → i3-planning.toml} +1 -1
  39. package/{.gemini/commands/review.toml → commands/i3-review.toml} +3 -3
  40. package/commands/{ship.toml → i3-ship.toml} +4 -4
  41. package/commands/{spec.toml → i3-spec.toml} +1 -1
  42. package/{.gemini/commands/test.toml → commands/i3-test.toml} +2 -2
  43. package/commands/{webperf.toml → i3-webperf.toml} +1 -1
  44. package/docs/adoption-guide.md +35 -35
  45. package/docs/agents.md +12 -12
  46. package/docs/antigravity-setup.md +14 -14
  47. package/docs/codebuddy-setup.md +27 -18
  48. package/docs/codex-setup.md +6 -6
  49. package/docs/commandcode-setup.md +5 -5
  50. package/docs/copilot-cli-setup.md +5 -5
  51. package/docs/copilot-setup.md +22 -22
  52. package/docs/cursor-setup.md +22 -22
  53. package/docs/gemini-cli-setup.md +26 -26
  54. package/docs/getting-started.md +36 -38
  55. package/docs/opencode-setup.md +31 -31
  56. package/docs/windsurf-setup.md +7 -7
  57. package/docs/workbuddy-setup.md +92 -0
  58. package/hooks/SDD-CACHE.md +3 -3
  59. package/hooks/SIMPLIFY-IGNORE.md +2 -2
  60. package/hooks/session-start-test.sh +1 -1
  61. package/hooks/session-start.sh +3 -3
  62. package/package.json +36 -20
  63. package/plugin.json +1 -1
  64. package/references/accessibility-checklist.md +1 -1
  65. package/references/definition-of-done.md +7 -7
  66. package/references/observability-checklist.md +3 -3
  67. package/references/orchestration-patterns.md +17 -17
  68. package/references/performance-checklist.md +2 -2
  69. package/references/security-checklist.md +1 -1
  70. package/references/testing-patterns.md +1 -1
  71. package/skills/{api-and-interface-design → i3-api-and-interface-design}/SKILL.md +2 -2
  72. package/skills/{browser-testing-with-devtools → i3-browser-testing-with-devtools}/SKILL.md +1 -1
  73. package/skills/{ci-cd-and-automation → i3-ci-cd-and-automation}/SKILL.md +2 -2
  74. package/skills/{code-review-and-quality → i3-code-review-and-quality}/SKILL.md +5 -5
  75. package/skills/{code-simplification → i3-code-simplification}/SKILL.md +1 -1
  76. package/skills/{constraint-driven-development → i3-constraint-driven-development}/SKILL.md +15 -15
  77. package/skills/{context-engineering → i3-context-engineering}/SKILL.md +1 -1
  78. package/skills/{debugging-and-error-recovery → i3-debugging-and-error-recovery}/SKILL.md +2 -2
  79. package/skills/{deprecation-and-migration → i3-deprecation-and-migration}/SKILL.md +2 -2
  80. package/skills/{documentation-and-adrs → i3-documentation-and-adrs}/SKILL.md +1 -1
  81. package/skills/{doubt-driven-development → i3-doubt-driven-development}/SKILL.md +8 -8
  82. package/skills/{frontend-ui-engineering → i3-frontend-ui-engineering}/SKILL.md +1 -1
  83. package/skills/{git-workflow-and-versioning → i3-git-workflow-and-versioning}/SKILL.md +4 -4
  84. package/skills/{idea-refine → i3-idea-refine}/SKILL.md +2 -2
  85. package/skills/{idea-refine → i3-idea-refine}/scripts/idea-refine.sh +1 -1
  86. package/skills/{incremental-implementation → i3-incremental-implementation}/SKILL.md +3 -3
  87. package/skills/{interview-me → i3-interview-me}/SKILL.md +12 -12
  88. package/skills/{observability-and-instrumentation → i3-observability-and-instrumentation}/SKILL.md +5 -5
  89. package/skills/{performance-optimization → i3-performance-optimization}/SKILL.md +1 -1
  90. package/skills/{performance-optimization → i3-performance-optimization}/references/optimization-patterns.md +1 -1
  91. package/skills/{planning-and-task-breakdown → i3-planning-and-task-breakdown}/SKILL.md +2 -2
  92. package/skills/{security-and-hardening → i3-security-and-hardening}/SKILL.md +3 -3
  93. package/skills/{security-and-hardening → i3-security-and-hardening}/references/hardening-patterns.md +1 -1
  94. package/skills/{shipping-and-launch → i3-shipping-and-launch}/SKILL.md +2 -2
  95. package/skills/{source-driven-development → i3-source-driven-development}/SKILL.md +2 -2
  96. package/skills/{spec-driven-development → i3-spec-driven-development}/SKILL.md +7 -7
  97. package/skills/{test-driven-development → i3-test-driven-development}/SKILL.md +2 -2
  98. package/skills/{using-agent-skills → i3-using-agent-skills}/SKILL.md +67 -67
  99. package/CHANGELOG.md +0 -34
  100. package/NOTICE.md +0 -14
  101. package/docs/advanced-per-agent-configuration.md +0 -70
  102. package/docs/comparison.md +0 -131
  103. package/docs/developer-onboarding.md +0 -116
  104. package/docs/skill-anatomy.md +0 -203
  105. package/evals/README.md +0 -101
  106. package/evals/cases/api-and-interface-design.json +0 -45
  107. package/evals/cases/browser-testing-with-devtools.json +0 -44
  108. package/evals/cases/ci-cd-and-automation.json +0 -45
  109. package/evals/cases/code-review-and-quality.json +0 -49
  110. package/evals/cases/code-simplification.json +0 -45
  111. package/evals/cases/constraint-driven-development.json +0 -79
  112. package/evals/cases/context-engineering.json +0 -44
  113. package/evals/cases/debugging-and-error-recovery.json +0 -58
  114. package/evals/cases/deprecation-and-migration.json +0 -52
  115. package/evals/cases/documentation-and-adrs.json +0 -44
  116. package/evals/cases/doubt-driven-development.json +0 -43
  117. package/evals/cases/frontend-ui-engineering.json +0 -52
  118. package/evals/cases/git-workflow-and-versioning.json +0 -47
  119. package/evals/cases/idea-refine.json +0 -43
  120. package/evals/cases/incremental-implementation.json +0 -57
  121. package/evals/cases/interview-me.json +0 -42
  122. package/evals/cases/observability-and-instrumentation.json +0 -44
  123. package/evals/cases/performance-optimization.json +0 -53
  124. package/evals/cases/planning-and-task-breakdown.json +0 -45
  125. package/evals/cases/security-and-hardening.json +0 -53
  126. package/evals/cases/shipping-and-launch.json +0 -56
  127. package/evals/cases/source-driven-development.json +0 -44
  128. package/evals/cases/spec-driven-development.json +0 -72
  129. package/evals/cases/test-driven-development.json +0 -73
  130. package/evals/cases/using-agent-skills.json +0 -44
  131. package/evals/fixtures/api-and-interface-design/service-brief.md +0 -19
  132. package/evals/fixtures/browser-testing-with-devtools/README.md +0 -5
  133. package/evals/fixtures/browser-testing-with-devtools/index.html +0 -24
  134. package/evals/fixtures/browser-testing-with-devtools/server.js +0 -15
  135. package/evals/fixtures/ci-cd-and-automation/package.json +0 -8
  136. package/evals/fixtures/ci-cd-and-automation/src/slug.js +0 -3
  137. package/evals/fixtures/ci-cd-and-automation/test/slug.test.js +0 -9
  138. package/evals/fixtures/code-review-and-quality/user-search.diff +0 -16
  139. package/evals/fixtures/code-simplification/config-parser.js +0 -46
  140. package/evals/fixtures/code-simplification/config-parser.test.js +0 -15
  141. package/evals/fixtures/context-engineering/context-audit.md +0 -15
  142. package/evals/fixtures/debugging-and-error-recovery/pagination.js +0 -8
  143. package/evals/fixtures/debugging-and-error-recovery/pagination.test.js +0 -9
  144. package/evals/fixtures/debugging-and-error-recovery/time-pressure.md +0 -6
  145. package/evals/fixtures/deprecation-and-migration/api-inventory.md +0 -9
  146. package/evals/fixtures/documentation-and-adrs/decision-context.md +0 -16
  147. package/evals/fixtures/doubt-driven-development/migration-plan.md +0 -19
  148. package/evals/fixtures/frontend-ui-engineering/Button.tsx +0 -7
  149. package/evals/fixtures/frontend-ui-engineering/design-system.md +0 -11
  150. package/evals/fixtures/git-workflow-and-versioning/.eval/working-tree.patch +0 -21
  151. package/evals/fixtures/git-workflow-and-versioning/app.js +0 -7
  152. package/evals/fixtures/git-workflow-and-versioning/app.test.js +0 -9
  153. package/evals/fixtures/incremental-implementation/reports.js +0 -7
  154. package/evals/fixtures/incremental-implementation/reports.test.js +0 -12
  155. package/evals/fixtures/incremental-implementation/tasks/plan.md +0 -8
  156. package/evals/fixtures/incremental-implementation-pressure/draft-export.js +0 -17
  157. package/evals/fixtures/incremental-implementation-pressure/scenario.md +0 -9
  158. package/evals/fixtures/observability-and-instrumentation/operations.md +0 -11
  159. package/evals/fixtures/observability-and-instrumentation/payment-retry.js +0 -14
  160. package/evals/fixtures/performance-optimization/benchmark.js +0 -15
  161. package/evals/fixtures/performance-optimization/products.js +0 -14
  162. package/evals/fixtures/planning-and-task-breakdown/notifications-spec.md +0 -18
  163. package/evals/fixtures/security-and-hardening/webhook.js +0 -11
  164. package/evals/fixtures/security-and-hardening/webhook.test.js +0 -13
  165. package/evals/fixtures/shipping-and-launch/authority-pressure.md +0 -6
  166. package/evals/fixtures/shipping-and-launch/launch-status.md +0 -11
  167. package/evals/fixtures/source-driven-development/framework-task.md +0 -10
  168. package/evals/fixtures/spec-driven-development/billing-brief.md +0 -16
  169. package/evals/fixtures/spec-driven-development-decomposition/portal-brief.md +0 -22
  170. package/evals/fixtures/test-driven-development/BUG.md +0 -10
  171. package/evals/fixtures/test-driven-development/README.md +0 -28
  172. package/evals/fixtures/test-driven-development/package.json +0 -9
  173. package/evals/fixtures/test-driven-development/src/split.js +0 -8
  174. package/evals/fixtures/test-driven-development/test/split.test.js +0 -13
  175. package/evals/fixtures/test-driven-development-ecosystem/README.md +0 -9
  176. package/evals/fixtures/test-driven-development-ecosystem/ledger.py +0 -15
  177. package/evals/fixtures/test-driven-development-ecosystem/test_ledger.py +0 -19
  178. package/evals/fixtures/using-agent-skills/incident.md +0 -6
  179. package/evals/plugin/code-review-fires/graders/off-by-one.md +0 -7
  180. package/evals/plugin/code-review-fires/graders/severity-labels.md +0 -4
  181. package/evals/plugin/code-review-fires/graders/skill-fired.md +0 -5
  182. package/evals/plugin/code-review-fires/prompt.md +0 -31
  183. package/evals/plugin/code-review-stays-quiet/graders/not-fired.md +0 -8
  184. package/evals/plugin/code-review-stays-quiet/graders/tdd-fired.md +0 -6
  185. package/evals/plugin/code-review-stays-quiet/prompt.md +0 -8
  186. package/evals/plugin/code-review-stays-quiet-on-commit-message/graders/not-fired.md +0 -8
  187. package/evals/plugin/code-review-stays-quiet-on-commit-message/prompt.md +0 -25
  188. package/evals/skill-impact.md +0 -6
  189. package/rebrand/INSTALLATION-SPEC.md +0 -46
  190. package/rebrand/MAINTENANCE.md +0 -113
  191. package/rebrand/NOTICE.md +0 -14
  192. package/rebrand/PR-WORKFLOW.md +0 -34
  193. package/rebrand/UNIFICATION-SPEC.md +0 -33
  194. package/rebrand/VALIDATION.md +0 -32
  195. package/rebrand/VERSIONING.md +0 -33
  196. package/rebrand/apply.cjs +0 -194
  197. package/rebrand/brand.json +0 -13
  198. package/rebrand/catalog.cjs +0 -56
  199. package/rebrand/fork-patches.json +0 -12
  200. package/rebrand/overlay/.github/workflows/test-plugin-install.yml +0 -177
  201. package/rebrand/overlay/CHANGELOG.md +0 -34
  202. package/rebrand/overlay/bin/agent-targets.json +0 -726
  203. package/rebrand/overlay/bin/i3-composer-agent.cjs +0 -190
  204. package/rebrand/overlay/bin/install.cjs +0 -164
  205. package/rebrand/overlay/bin/skills-registry.LICENSE +0 -21
  206. package/rebrand/overlay/bin/wizard.cjs +0 -66
  207. package/rebrand/overlay/scripts/validate-brand.cjs +0 -44
  208. package/rebrand/overlay/tests/bundle.test.cjs +0 -85
  209. package/rebrand/overlay/tests/installer.test.cjs +0 -193
  210. package/rebrand/package.template.json +0 -82
  211. package/rebrand/rebrand.sh +0 -4
  212. package/rebrand/record-upstream.cjs +0 -37
  213. package/rebrand/templates/README.md +0 -124
  214. package/rebrand/templates/codebuddy-setup.md +0 -88
  215. package/rebrand/templates/codex-setup.md +0 -45
  216. package/rebrand/tests/pipeline.test.cjs +0 -185
  217. package/rebrand/upstream.json +0 -171
  218. package/scripts/floor-guard-reference-test.js +0 -291
  219. package/scripts/lib/skill-lint-test.js +0 -650
  220. package/scripts/lib/skill-lint.js +0 -584
  221. package/scripts/run-evals-test.js +0 -623
  222. package/scripts/run-evals.js +0 -638
  223. package/scripts/validate-artifact-paths-test.js +0 -179
  224. package/scripts/validate-artifact-paths.js +0 -128
  225. package/scripts/validate-brand.cjs +0 -44
  226. package/scripts/validate-commands-test.js +0 -216
  227. package/scripts/validate-commands.js +0 -222
  228. package/scripts/validate-reference-links-test.js +0 -495
  229. package/scripts/validate-reference-links.js +0 -187
  230. package/scripts/validate-skills.js +0 -69
  231. package/scripts/validate-versions-test.js +0 -32
  232. package/scripts/validate-versions.js +0 -35
  233. package/tests/bundle.test.cjs +0 -85
  234. package/tests/installer.test.cjs +0 -193
  235. /package/skills/{constraint-driven-development → i3-constraint-driven-development}/references/floor-guard.md +0 -0
  236. /package/skills/{idea-refine → i3-idea-refine}/examples.md +0 -0
  237. /package/skills/{idea-refine → i3-idea-refine}/frameworks.md +0 -0
  238. /package/skills/{idea-refine → i3-idea-refine}/refinement-criteria.md +0 -0
@@ -1,222 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * validate-commands.js
4
- *
5
- * Guards against silent drift across the three slash-command directories:
6
- * .claude/commands/ (.md — Claude Code)
7
- * .gemini/commands/ (.toml — Gemini CLI)
8
- * commands/ (.toml — Antigravity CLI)
9
- *
10
- * Checks (errors block CI):
11
- * - Every command present in one directory exists in all three
12
- * - The 'description' field is identical across all three equivalents
13
- * - Claude command frontmatter is valid YAML, not merely splittable
14
- *
15
- * What this does NOT check:
16
- * Prompt body differences are intentional — each tool has its own
17
- * syntax ($ARGUMENTS, i3-composer-agent: prefixes, GEMINI.md vs CLAUDE.md).
18
- *
19
- * Exit codes: 0 = all clear, 1 = one or more errors
20
- */
21
-
22
- 'use strict';
23
-
24
- const fs = require('fs');
25
- const path = require('path');
26
-
27
- // The same frontmatter-validity rules validate-skills applies to SKILL.md.
28
- // `descriptionFromMd` below splits each line on its first colon, exactly as the
29
- // skill reader used to, so a command whose frontmatter is not valid YAML passes
30
- // every check here — and Claude Code parses that frontmatter when the command is
31
- // loaded. The #494 thread verified all 25 SKILL.md files AND the command files by
32
- // hand; this makes the second half a check too.
33
- const { frontmatterYamlErrors } = require(path.join(__dirname, 'lib', 'skill-lint.js'));
34
-
35
- // ─── Config ───────────────────────────────────────────────────────────────────
36
-
37
- const ROOT = path.resolve(__dirname, '..');
38
-
39
- const DIRS = {
40
- claude: { dir: path.join(ROOT, '.claude', 'commands'), ext: '.md' },
41
- gemini: { dir: path.join(ROOT, '.gemini', 'commands'), ext: '.toml' },
42
- antigravity:{ dir: path.join(ROOT, 'commands'), ext: '.toml' },
43
- };
44
-
45
- // Commands where the file stem differs between Claude and the TOML dirs.
46
- // Key = Claude stem, value = TOML stem.
47
- const NAME_MAP = {
48
- plan: 'planning',
49
- };
50
- const NAME_MAP_REVERSE = Object.fromEntries(
51
- Object.entries(NAME_MAP).map(([k, v]) => [v, k])
52
- );
53
-
54
- // ─── Parsers ──────────────────────────────────────────────────────────────────
55
-
56
- function descriptionFromMd(filePath) {
57
- const content = fs.readFileSync(filePath, 'utf8');
58
- const match = content.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n/);
59
- if (!match) return null;
60
- for (const line of match[1].split(/\r?\n/)) {
61
- const colonIdx = line.indexOf(':');
62
- if (colonIdx === -1) continue;
63
- if (line.slice(0, colonIdx).trim() === 'description') {
64
- return line.slice(colonIdx + 1).trim().replace(/^['"]|['"]$/g, '');
65
- }
66
- }
67
- return null;
68
- }
69
-
70
- function descriptionFromToml(filePath) {
71
- const content = fs.readFileSync(filePath, 'utf8');
72
- const doubleMatch = content.match(/^description\s*=\s*"((?:[^"\\]|\\.)*)"/m);
73
- if (doubleMatch) return doubleMatch[1].replace(/\\"/g, '"');
74
- const singleMatch = content.match(/^description\s*=\s*'([^']*)'/m);
75
- return singleMatch ? singleMatch[1] : null;
76
- }
77
-
78
- // ─── Loader ───────────────────────────────────────────────────────────────────
79
-
80
- function loadCommands({ dir, ext }) {
81
- if (!fs.existsSync(dir)) return {};
82
- return Object.fromEntries(
83
- fs.readdirSync(dir)
84
- .filter(f => f.endsWith(ext))
85
- .map(f => {
86
- const stem = path.basename(f, ext);
87
- const full = path.join(dir, f);
88
- try {
89
- const desc = ext === '.md' ? descriptionFromMd(full) : descriptionFromToml(full);
90
- return [stem, desc];
91
- } catch (e) {
92
- console.log(` ✗ ${stem} — cannot read file: ${e.message}`);
93
- return [stem, null];
94
- }
95
- })
96
- );
97
- }
98
-
99
- // ─── Main ─────────────────────────────────────────────────────────────────────
100
-
101
- function main() {
102
- const byTool = {
103
- claude: loadCommands(DIRS.claude),
104
- gemini: loadCommands(DIRS.gemini),
105
- antigravity: loadCommands(DIRS.antigravity),
106
- };
107
-
108
- // Canonical command list: use Claude stems as the reference.
109
- // Map each Claude stem to its TOML equivalent for lookup.
110
- const claudeStems = Object.keys(byTool.claude).sort();
111
- const allTomlStems = new Set([
112
- ...Object.keys(byTool.gemini),
113
- ...Object.keys(byTool.antigravity),
114
- ]);
115
- const allCanonicalStems = new Set([
116
- ...claudeStems,
117
- ...[...allTomlStems].map(s => NAME_MAP_REVERSE[s] ?? s),
118
- ]);
119
-
120
- let errors = 0;
121
-
122
- // ── Parity check ────────────────────────────────────────────────────────────
123
- console.log('Checking command parity...');
124
-
125
- // Commands in Claude not found in TOML dirs
126
- for (const stem of claudeStems) {
127
- const tomlStem = NAME_MAP[stem] ?? stem;
128
- const missing = [];
129
- if (!(tomlStem in byTool.gemini)) missing.push('.gemini/commands');
130
- if (!(tomlStem in byTool.antigravity)) missing.push('commands');
131
- if (missing.length) {
132
- console.log(` ✗ ${stem} — missing in: ${missing.join(', ')}`);
133
- errors++;
134
- } else {
135
- console.log(` ✓ ${stem}${stem !== tomlStem ? ` (${tomlStem} in toml dirs)` : ''}`);
136
- }
137
- }
138
-
139
- // Commands in TOML dirs not found in Claude
140
- for (const stem of [...allTomlStems].sort()) {
141
- const claudeStem = NAME_MAP_REVERSE[stem] ?? stem;
142
- if (!(claudeStem in byTool.claude)) {
143
- console.log(` ✗ ${stem} — present in toml dirs but missing in .claude/commands`);
144
- errors++;
145
- }
146
- }
147
-
148
- // ── Claude frontmatter validity ─────────────────────────────────────────────
149
- // Only the .md directory: the TOML dirs are parsed by a real TOML parser
150
- // already, so a malformed one surfaces as a missing description above.
151
- console.log('\nChecking Claude command frontmatter...');
152
-
153
- for (const stem of claudeStems) {
154
- const full = path.join(DIRS.claude.dir, `${stem}${DIRS.claude.ext}`);
155
- let yamlErrors = [];
156
- try {
157
- yamlErrors = frontmatterYamlErrors(fs.readFileSync(full, 'utf8'));
158
- } catch (e) {
159
- console.log(` ✗ ${stem} — cannot read file: ${e.message}`);
160
- errors++;
161
- continue;
162
- }
163
- if (yamlErrors.length === 0) {
164
- console.log(` ✓ ${stem}`);
165
- continue;
166
- }
167
- console.log(` ✗ ${stem}`);
168
- for (const message of yamlErrors) {
169
- console.log(` ${message}`);
170
- errors++;
171
- }
172
- }
173
-
174
- // ── Description sync check ──────────────────────────────────────────────────
175
- console.log('\nChecking description sync...');
176
-
177
- for (const claudeStem of claudeStems) {
178
- const tomlStem = NAME_MAP[claudeStem] ?? claudeStem;
179
- const descClaude = byTool.claude[claudeStem];
180
- const descGemini = byTool.gemini[tomlStem];
181
- const descAgy = byTool.antigravity[tomlStem];
182
-
183
- const malformed = [
184
- ['.claude/commands', byTool.claude, claudeStem],
185
- ['.gemini/commands', byTool.gemini, tomlStem],
186
- ['commands/', byTool.antigravity, tomlStem],
187
- ].filter(([, commands, stem]) => Object.prototype.hasOwnProperty.call(commands, stem) && commands[stem] == null);
188
-
189
- if (malformed.length) {
190
- console.log(` ✗ ${claudeStem}`);
191
- for (const [toolDir, , stem] of malformed) {
192
- console.log(` ${toolDir}/${stem} — missing or malformed description`);
193
- }
194
- errors++;
195
- continue;
196
- }
197
-
198
- if (descClaude == null || descGemini == null || descAgy == null) {
199
- // Missing file already flagged by parity check
200
- continue;
201
- }
202
-
203
- const allMatch = descClaude === descGemini && descGemini === descAgy;
204
-
205
- if (allMatch) {
206
- console.log(` ✓ ${claudeStem}`);
207
- } else {
208
- console.log(` ✗ ${claudeStem}`);
209
- console.log(` .claude: ${descClaude}`);
210
- console.log(` .gemini: ${descGemini}`);
211
- console.log(` commands/: ${descAgy}`);
212
- errors++;
213
- }
214
- }
215
-
216
- const status = errors > 0 ? 'FAILED' : 'PASSED';
217
- console.log(`\n${allCanonicalStems.size} commands checked — ${errors} error(s) — ${status}`);
218
-
219
- if (errors > 0) process.exit(1);
220
- }
221
-
222
- main();