@agents-inc/cli 0.74.8 → 0.74.11

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 (87) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +73 -109
  3. package/dist/{chunk-FVMYBN5K.js → chunk-2EXAK22V.js} +34 -46
  4. package/dist/chunk-2EXAK22V.js.map +1 -0
  5. package/dist/{chunk-4Q2JLBCX.js → chunk-54AECXSH.js} +2 -2
  6. package/dist/{chunk-RBR355UI.js → chunk-C6YLN4AW.js} +3 -3
  7. package/dist/{chunk-F7LOH754.js → chunk-EWKUUWYY.js} +5 -1
  8. package/dist/chunk-EWKUUWYY.js.map +1 -0
  9. package/dist/{chunk-7W226BOV.js → chunk-FW5C245M.js} +3 -3
  10. package/dist/chunk-FW5C245M.js.map +1 -0
  11. package/dist/{chunk-HJY4354Y.js → chunk-IYA5PSXU.js} +2 -2
  12. package/dist/{chunk-TUGXTCGX.js → chunk-M5IAGR5Z.js} +2 -2
  13. package/dist/{chunk-BQW4ONJE.js → chunk-NDKIFVR4.js} +2 -2
  14. package/dist/{chunk-7JVDZFJG.js → chunk-OINQ6OWM.js} +2 -2
  15. package/dist/{chunk-E3MF6GGS.js → chunk-PUZLP4SL.js} +2 -2
  16. package/dist/{chunk-Q53GBFTO.js → chunk-VILTRTBT.js} +2 -2
  17. package/dist/{chunk-ULP3GGXG.js → chunk-VIVOJASC.js} +4 -4
  18. package/dist/{chunk-KZG3EQSH.js → chunk-VYHRCFMD.js} +3 -3
  19. package/dist/{chunk-GNA6IOQZ.js → chunk-XPRDNALD.js} +2 -2
  20. package/dist/{chunk-7SKGMV7P.js → chunk-YDBVG6RF.js} +9 -9
  21. package/dist/{chunk-SM4FX2IU.js → chunk-YZUAXX7F.js} +3 -3
  22. package/dist/commands/build/plugins.js +2 -2
  23. package/dist/commands/build/stack.js +2 -2
  24. package/dist/commands/compile.js +2 -2
  25. package/dist/commands/config/index.js +2 -2
  26. package/dist/commands/config/path.js +1 -1
  27. package/dist/commands/config/show.js +2 -2
  28. package/dist/commands/diff.js +1 -1
  29. package/dist/commands/doctor.js +1 -1
  30. package/dist/commands/edit.js +12 -12
  31. package/dist/commands/eject.js +1 -1
  32. package/dist/commands/import/skill.js +1 -1
  33. package/dist/commands/info.js +1 -1
  34. package/dist/commands/init.js +12 -12
  35. package/dist/commands/list.js +1 -1
  36. package/dist/commands/new/agent.js +2 -2
  37. package/dist/commands/new/marketplace.js +2 -2
  38. package/dist/commands/new/skill.js +2 -2
  39. package/dist/commands/outdated.js +1 -1
  40. package/dist/commands/search.js +1 -1
  41. package/dist/commands/uninstall.js +1 -1
  42. package/dist/commands/update.js +2 -2
  43. package/dist/commands/validate.js +1 -1
  44. package/dist/components/wizard/category-grid.test.js +2 -2
  45. package/dist/components/wizard/domain-selection.js +3 -3
  46. package/dist/components/wizard/source-grid.test.js +2 -2
  47. package/dist/components/wizard/stack-selection.js +3 -3
  48. package/dist/components/wizard/step-agents.js +3 -3
  49. package/dist/components/wizard/step-agents.test.js +3 -3
  50. package/dist/components/wizard/step-build.js +3 -3
  51. package/dist/components/wizard/step-build.test.js +3 -3
  52. package/dist/components/wizard/step-confirm.test.js +2 -2
  53. package/dist/components/wizard/step-refine.js +2 -1
  54. package/dist/components/wizard/step-refine.test.js +2 -1
  55. package/dist/components/wizard/step-refine.test.js.map +1 -1
  56. package/dist/components/wizard/step-settings.js +2 -2
  57. package/dist/components/wizard/step-settings.test.js +5 -5
  58. package/dist/components/wizard/step-sources.js +3 -3
  59. package/dist/components/wizard/step-sources.test.js +3 -3
  60. package/dist/components/wizard/step-stack.js +5 -5
  61. package/dist/components/wizard/step-stack.test.js +5 -5
  62. package/dist/components/wizard/wizard-layout.js +3 -3
  63. package/dist/components/wizard/wizard.js +11 -11
  64. package/dist/hooks/init.js +12 -12
  65. package/dist/{source-loader-X46F4X2B.js → source-loader-WBDPZJEW.js} +2 -2
  66. package/dist/{source-manager-WG7HJHVW.js → source-manager-RRGK4SBP.js} +2 -2
  67. package/dist/stores/wizard-store.js +2 -2
  68. package/dist/stores/wizard-store.test.js +2 -2
  69. package/package.json +1 -1
  70. package/dist/chunk-7W226BOV.js.map +0 -1
  71. package/dist/chunk-F7LOH754.js.map +0 -1
  72. package/dist/chunk-FVMYBN5K.js.map +0 -1
  73. /package/dist/{chunk-4Q2JLBCX.js.map → chunk-54AECXSH.js.map} +0 -0
  74. /package/dist/{chunk-RBR355UI.js.map → chunk-C6YLN4AW.js.map} +0 -0
  75. /package/dist/{chunk-HJY4354Y.js.map → chunk-IYA5PSXU.js.map} +0 -0
  76. /package/dist/{chunk-TUGXTCGX.js.map → chunk-M5IAGR5Z.js.map} +0 -0
  77. /package/dist/{chunk-BQW4ONJE.js.map → chunk-NDKIFVR4.js.map} +0 -0
  78. /package/dist/{chunk-7JVDZFJG.js.map → chunk-OINQ6OWM.js.map} +0 -0
  79. /package/dist/{chunk-E3MF6GGS.js.map → chunk-PUZLP4SL.js.map} +0 -0
  80. /package/dist/{chunk-Q53GBFTO.js.map → chunk-VILTRTBT.js.map} +0 -0
  81. /package/dist/{chunk-ULP3GGXG.js.map → chunk-VIVOJASC.js.map} +0 -0
  82. /package/dist/{chunk-KZG3EQSH.js.map → chunk-VYHRCFMD.js.map} +0 -0
  83. /package/dist/{chunk-GNA6IOQZ.js.map → chunk-XPRDNALD.js.map} +0 -0
  84. /package/dist/{chunk-7SKGMV7P.js.map → chunk-YDBVG6RF.js.map} +0 -0
  85. /package/dist/{chunk-SM4FX2IU.js.map → chunk-YZUAXX7F.js.map} +0 -0
  86. /package/dist/{source-loader-X46F4X2B.js.map → source-loader-WBDPZJEW.js.map} +0 -0
  87. /package/dist/{source-manager-WG7HJHVW.js.map → source-manager-RRGK4SBP.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ Each release has detailed notes in its own file under [`changelogs/`](./changelo
7
7
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
8
8
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
 
10
+ ## [0.74.11] - 2026-03-14
11
+
12
+ **Documentation overhaul — README, standards, .ai-docs**
13
+
14
+ - README rewritten with screenshots and visual wizard walkthrough
15
+ - Standards consolidated: E2E testing bible, TypeScript types bible
16
+ - .ai-docs validated against current source (12 files updated)
17
+ - 39 redundant/completed docs removed
18
+
19
+ See [changelogs/0.74.11.md](./changelogs/0.74.11.md) for full details.
20
+
21
+ ---
22
+
23
+ ## [0.74.10] - 2026-03-14
24
+
25
+ **E2E test file splits for parallel execution**
26
+
27
+ - Split 6 large E2E files (1,087 to 451 lines each) into 14 smaller files
28
+ - 76 tests preserved, E2E suite now 62 files / 468 tests
29
+
30
+ See [changelogs/0.74.10.md](./changelogs/0.74.10.md) for full details.
31
+
32
+ ---
33
+
34
+ ## [0.74.9] - 2026-03-14
35
+
36
+ **Wizard polish, R-08 refactor, E2E test methodology fixes**
37
+
38
+ - Unify 5 resolve functions into single `resolveRelationships` (R-08)
39
+ - ViewTitle on all wizard steps (D-95), logo only on first screen (D-72)
40
+ - Relocate fake E2E tests to proper unit test files and smoke/ directory
41
+
42
+ See [changelogs/0.74.9.md](./changelogs/0.74.9.md) for full details.
43
+
44
+ ---
45
+
10
46
  ## [0.74.8] - 2026-03-14
11
47
 
12
48
  **Edit command scope fixes, unit test coverage expansion**
package/README.md CHANGED
@@ -4,38 +4,18 @@
4
4
 
5
5
  # Agents Inc
6
6
 
7
- An agent composition framework that builds stacks and compiles specialized subagents for [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Manage your subagents and skills with code via a unified CLI.
7
+ An agent composition framework for Claude Code.
8
+
9
+ Compose specialized [Claude Code](https://docs.anthropic.com/en/docs/claude-code) subagents from atomic skills. Choose your stack, customize your skills, and compile from the CLI.
8
10
 
9
11
  [![npm version](https://img.shields.io/npm/v/@agents-inc/cli)](https://www.npmjs.com/package/@agents-inc/cli)
10
12
  [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/)
11
13
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
12
14
  [![Node: 18+](https://img.shields.io/badge/Node-18%2B-green.svg)](https://nodejs.org/)
13
15
 
14
- <!-- TODO: Add animated GIF of the full init wizard flow (stack selection -> skill grid -> agent config -> done).
15
- This is the hero image. It should show the complete happy path in ~15-20 seconds.
16
16
  <p align="center">
17
- <img src="./assets/init-wizard.gif" alt="Agents Inc init wizard" width="700">
17
+ <img src="./screenshots/wizard-flow.gif" alt="Agents Inc init wizard" width="700">
18
18
  </p>
19
- -->
20
-
21
- ## Overview
22
-
23
- Agents Inc comprises two parts:
24
-
25
- - **[Marketplace](https://github.com/agents-inc/skills):** 87+ atomic, best-practice skills spanning web, API, CLI, infra, and meta domains
26
- - **CLI:** installs, ejects, creates, compiles, and updates skills and subagents
27
-
28
- Skills are composed into 18+ domain-specific subagents through templates and modular agent partials, all validated against strict Zod schemas. Everything is ejectable so there's endless customisation with no lock-in.
29
-
30
- ## How It Works
31
-
32
- Each subagent is composed from modular partials (role, workflow, output format) plus a set of atomic skills. The CLI manages the full lifecycle:
33
-
34
- - **Install:** pull skills from the public marketplace, your own, or a local directory either as plugins or directly as source files
35
- - **Compose:** map skills to subagents, configure preloaded vs dynamic loading
36
- - **Compile:** resolve skill mappings, Liquid templates, and agent partials into `.claude/agents/`
37
- - **Eject:** take progressive ownership of any layer (partials, templates, skills, subagents)
38
- - **Update:** pull upstream skill changes without losing local customizations
39
19
 
40
20
  ## Getting Started
41
21
 
@@ -43,11 +23,11 @@ Each subagent is composed from modular partials (role, workflow, output format)
43
23
  npx @agents-inc/cli init
44
24
  ```
45
25
 
46
- Requires Node 18+ and [Claude Code](https://docs.anthropic.com/en/docs/claude-code).
47
-
48
- The wizard has three steps:
26
+ <p align="center">
27
+ <img src="screenshots/stack-selection.png" alt="Stack selection" width="700">
28
+ </p>
49
29
 
50
- **1. Pick a stack or start from scratch** (or create your own in your custom marketplace):
30
+ Choose a pre-built stack or start from scratch. Stacks pre-select skills and agents for common tech combinations.
51
31
 
52
32
  | Stack | Technologies |
53
33
  | ------------------ | ------------------------------------------------------------------ |
@@ -58,32 +38,43 @@ The wizard has three steps:
58
38
  | `remix-stack` | Remix + React + Hono + Drizzle |
59
39
  | `solidjs-stack` | SolidJS + Hono + Drizzle |
60
40
 
61
- **2. Customize skills.** Add or remove from the interactive grid.
62
-
63
- **3. Select subagents.** Choose which role-based subagents to include.
41
+ <p align="center">
42
+ <img src="screenshots/skill-selection.png" alt="Skill selection" width="700">
43
+ </p>
64
44
 
65
- **4. Compile.** After init, use `agentsinc edit` to change selections and `agentsinc compile` to rebuild.
45
+ Add or remove skills from the interactive grid. Skills are organized by domain with framework-aware filtering.
66
46
 
67
- ## Skills
47
+ <p align="center">
48
+ <img src="screenshots/agent-selection.png" alt="Agent selection" width="700">
49
+ </p>
68
50
 
69
- 87+ skills organized by category:
51
+ Choose which subagents to compile. Each agent is composed from the skills you selected.
70
52
 
71
- **Web:** `React` `Vue` `Angular` `SolidJS` `Next.js` `Remix` `Nuxt` `SCSS Modules` `CVA` `Zustand` `Pinia` `NgRx SignalStore` `Jotai` `React Query` `SWR` `tRPC` `GraphQL` `React Hook Form` `Zod` `shadcn/ui` `Radix UI` `TanStack Table` `Vitest` `Playwright` `Cypress` `MSW` `Framer Motion` `Storybook` `Accessibility`
53
+ After init, use `agentsinc edit` to change selections and `agentsinc compile` to rebuild.
72
54
 
73
- **API:** `Hono` `Express` `Fastify` `Drizzle` `Prisma` `Better Auth` `PostHog` `Resend` `Axiom + Pino + Sentry` `GitHub Actions`
55
+ ## Guides
74
56
 
75
- **Mobile:** `React Native` `Expo`
57
+ | Guide | Description |
58
+ | --------------------------------------------------------------------------- | -------------------------------------------------------------------- |
59
+ | [Install modes](docs/guides/install-modes.md) | Plugin vs local install, global vs project scope |
60
+ | [Editing your config](docs/guides/editing-config.md) | Skill mappings, preloaded vs dynamic loading, and config structure |
61
+ | [Customizing subagents](docs/guides/customizing-subagents.md) | Eject and modify partials, templates, and skills |
62
+ | [Writing custom skills and subagents](docs/guides/writing-custom-skills.md) | Author skills and subagents from scratch or iterate on existing ones |
63
+ | [Importing third-party skills](docs/guides/importing-skills.md) | Install skills from external repositories |
64
+ | [Creating a marketplace](docs/guides/creating-a-marketplace.md) | Build a personal or org-level marketplace with curated skills |
76
65
 
77
- **CLI:** `Commander` `oclif + Ink`
66
+ ## Skills
78
67
 
79
- **Infra:** `Turborepo` `Tooling` `Env config`
68
+ **Web:** React, Vue, Angular, Next.js, Remix, Nuxt, SolidJS, Tailwind, Zustand, Vitest, Playwright, and more
69
+ **API:** Hono, Express, Drizzle, Prisma, PostHog, and more
70
+ **Mobile:** React Native, Expo
71
+ **CLI:** Commander, oclif + Ink
72
+ **Shared:** Turborepo, Code Reviewing, Auth Security, and more
80
73
 
81
- **Meta:** `Code reviewing` `Research methodology` `Investigation requirements` `Anti-over-engineering` `Context management`
74
+ Browse the full catalog on the [Plugin Marketplace](https://github.com/agents-inc/skills).
82
75
 
83
76
  ## Subagents
84
77
 
85
- 17 roles across 7 categories:
86
-
87
78
  | Category | Subagents |
88
79
  | ---------------- | ------------------------------------------------------------------ |
89
80
  | Developers | `web-developer` `api-developer` `cli-developer` `web-architecture` |
@@ -95,90 +86,63 @@ The wizard has three steps:
95
86
  | Documentation | `documentor` |
96
87
  | Meta | `skill-summoner` `agent-summoner` |
97
88
 
89
+ Each subagent is composed from modular partials (role, workflow, output format) plus its assigned skills. Everything is ejectable.
90
+
98
91
  ## Commands
99
92
 
100
- ### Primary
93
+ ### Core
101
94
 
102
95
  | Command | Description |
103
96
  | --------- | --------------------------------------------------------------------------- |
104
97
  | `init` | Interactive setup wizard: pick a stack, customize skills, compile subagents |
105
- | `edit` | Modify skill selection in the interactive wizard |
98
+ | `edit` | Modify skill selection via the interactive wizard |
106
99
  | `compile` | Recompile subagents after changes |
107
100
  | `update` | Pull latest skills from source |
101
+ | `search` | Search skills across all sources |
108
102
 
109
103
  ### Customization
110
104
 
111
- | Command | Description |
112
- | -------------- | ----------------------------------------------------------------------------------------------------------------- |
113
- | `eject <type>` | Export for customization (`agent-partials`, `templates`, `skills`, `all`) |
114
- | `new skill` | Scaffold a custom skill ![Coming soon](https://img.shields.io/badge/coming%20soon-grey) |
115
- | `new agent` | Scaffold a custom agent ![Coming soon](https://img.shields.io/badge/coming%20soon-grey) |
116
- | `import skill` | Import a skill from an external GitHub repository ![Coming soon](https://img.shields.io/badge/coming%20soon-grey) |
117
- | `search` | Search skills across sources ![Coming soon](https://img.shields.io/badge/coming%20soon-grey) |
105
+ | Command | Description |
106
+ | ----------------- | ------------------------------------------------------------------------- |
107
+ | `eject <type>` | Export for customization (`agent-partials`, `templates`, `skills`, `all`) |
108
+ | `new skill` | Scaffold a custom skill |
109
+ | `new agent` | Scaffold a custom agent |
110
+ | `new marketplace` | Scaffold a new skill marketplace |
111
+ | `import skill` | Import a skill from an external GitHub repository |
112
+
113
+ ### Build
114
+
115
+ | Command | Description |
116
+ | ------------------- | ---------------------------------------------- |
117
+ | `build marketplace` | Generate `marketplace.json` from source skills |
118
+ | `build plugins` | Build skill and agent plugins for distribution |
119
+ | `build stack` | Build a stack as a single plugin |
120
+
121
+ ### Configuration
122
+
123
+ | Command | Description |
124
+ | ---------------------- | ---------------------------------- |
125
+ | `config` | Show config overview |
126
+ | `config get` | Get a config value |
127
+ | `config show` | Display all resolved config values |
128
+ | `config path` | Show config file paths |
129
+ | `config set-project` | Set a project config value |
130
+ | `config unset-project` | Remove a project config value |
118
131
 
119
132
  ### Diagnostics
120
133
 
121
- | Command | Description |
122
- | ----------- | ------------------------------------------------------------------------------------------------------------ |
123
- | `doctor` | Diagnose setup issues |
124
- | `diff` | Show changes between local and source skills ![Coming soon](https://img.shields.io/badge/coming%20soon-grey) |
125
- | `outdated` | Check for skill updates |
126
- | `validate` | Validate config and skill structure |
127
- | `info` | Show project configuration details |
128
- | `uninstall` | Remove Agents Inc from your project |
134
+ | Command | Description |
135
+ | ----------- | -------------------------------------------- |
136
+ | `doctor` | Diagnose setup issues |
137
+ | `diff` | Show changes between local and source skills |
138
+ | `list` | List installed skills |
139
+ | `outdated` | Check for skill updates |
140
+ | `validate` | Validate config and skill structure |
141
+ | `info` | Show project configuration details |
142
+ | `uninstall` | Remove Agents Inc from your project |
129
143
 
130
144
  Run `agentsinc --help` for full usage.
131
145
 
132
- ## Customization
133
-
134
- Progressive layers from config to full extension:
135
-
136
- | Layer | How |
137
- | --------------- | ---------------------------------------------------------------------------------------------- |
138
- | Edit config | `.claude-src/config.yaml`; skill-to-subagent mappings, preloaded/dynamic |
139
- | Wizard | `agentsinc edit`; add/remove skills interactively |
140
- | Eject partials | `agentsinc eject agent-partials`; customize agent partials such as intro, workflow, and output |
141
- | Eject templates | `agentsinc eject templates`; modify Liquid templates |
142
- | Eject skills | `agentsinc eject skills`; fork skills for local editing |
143
- | Custom skills | `agentsinc new skill`; scaffold with proper metadata |
144
- | Custom agents | `agentsinc new agent`; scaffold agent files |
145
- | Custom sources | Point to a private repo or local directory as a skill source |
146
- | Plugins | Package skills/subagents as Claude Code plugins for distribution |
147
-
148
- Templates apply globally across all subagents; partials apply to specific roles. Put shared conventions in a template for consistency, and role-specific behaviour in partials.
149
-
150
- Import skills from any GitHub repository:
151
-
152
- ```bash
153
- agentsinc import skill github:your-org/skills --list
154
- agentsinc import skill github:your-org/skills --skill react-best-practices
155
- agentsinc import skill github:your-org/skills --all
156
- ```
157
-
158
- ## Tech Stack
159
-
160
- | Component | Technology |
161
- | ------------ | ------------------------------------- |
162
- | Commands | oclif |
163
- | Terminal UI | Ink + React |
164
- | Wizard state | Zustand |
165
- | Validation | Zod (30+ schemas at parse boundaries) |
166
- | Compilation | LiquidJS |
167
- | Testing | Vitest |
168
-
169
- ```
170
- src/cli/
171
- commands/ # oclif command definitions
172
- components/ # Ink/React terminal UI components
173
- lib/ # Core logic (compiler, loader, resolver, schemas)
174
- stores/ # Zustand state management
175
- utils/ # Shared utilities
176
- src/agents/ # Subagent definitions (18 roles)
177
- config/ # Skills matrix, stacks, default mappings
178
- ```
179
-
180
- See [docs/reference/architecture.md](./docs/reference/architecture.md) for the full reference.
181
-
182
146
  ## Links
183
147
 
184
148
  - [Plugin Marketplace](https://github.com/agents-inc/skills): browse and discover skills
@@ -984,7 +984,7 @@ function loadConfigTypesDataInBackground(sourceFlag, projectDir) {
984
984
  if (!await directoryExists(claudeSrcDir)) {
985
985
  throw new Error(`${CLAUDE_SRC_DIR}/ not found \u2014 run '${CLI_BIN_NAME} init' first`);
986
986
  }
987
- const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-X46F4X2B.js");
987
+ const { loadSkillsMatrixFromSource: loadSkillsMatrixFromSource2 } = await import("./source-loader-WBDPZJEW.js");
988
988
  const { loadAllAgents: loadAllAgents2 } = await import("./loader-NHUCFMFQ.js");
989
989
  const sourceResult = await loadSkillsMatrixFromSource2({
990
990
  sourceFlag,
@@ -1744,22 +1744,33 @@ function mergeMatrixWithSkills(categories, relationships, skills) {
1744
1744
  };
1745
1745
  return merged;
1746
1746
  }
1747
- function resolveConflicts(skillId, conflictRules, resolve) {
1748
- const conflicts = [];
1749
- for (const rule of conflictRules) {
1747
+ function resolveRelationships(skillId, relationships, resolve) {
1748
+ const conflictsWith = [];
1749
+ const discourages = [];
1750
+ const compatible = /* @__PURE__ */ new Set();
1751
+ const requires = [];
1752
+ const alternatives = [];
1753
+ for (const rule of relationships.conflicts) {
1750
1754
  const resolved = rule.skills.map((slug) => resolve(slug, "conflicts")).filter((id) => id !== null);
1751
1755
  if (!resolved.includes(skillId)) continue;
1752
1756
  for (const other of resolved) {
1753
- if (other !== skillId && !conflicts.some((c) => c.skillId === other)) {
1754
- conflicts.push({ skillId: other, reason: rule.reason });
1757
+ if (other !== skillId && !conflictsWith.some((c) => c.skillId === other)) {
1758
+ conflictsWith.push({ skillId: other, reason: rule.reason });
1755
1759
  }
1756
1760
  }
1757
1761
  }
1758
- return conflicts;
1759
- }
1760
- function resolveCompatibilityGroups(skillId, compatibilityGroups, resolve) {
1761
- const compatible = /* @__PURE__ */ new Set();
1762
- for (const group of compatibilityGroups) {
1762
+ if (relationships.discourages) {
1763
+ for (const rule of relationships.discourages) {
1764
+ const resolved = rule.skills.map((slug) => resolve(slug, "discourages")).filter((id) => id !== null);
1765
+ if (!resolved.includes(skillId)) continue;
1766
+ for (const other of resolved) {
1767
+ if (other !== skillId && !discourages.some((d) => d.skillId === other)) {
1768
+ discourages.push({ skillId: other, reason: rule.reason });
1769
+ }
1770
+ }
1771
+ }
1772
+ }
1773
+ for (const group of relationships.compatibleWith ?? []) {
1763
1774
  const resolved = group.skills.map((slug) => resolve(slug, "compatibleWith")).filter((id) => id !== null);
1764
1775
  if (!resolved.includes(skillId)) continue;
1765
1776
  for (const other of resolved) {
@@ -1768,11 +1779,7 @@ function resolveCompatibilityGroups(skillId, compatibilityGroups, resolve) {
1768
1779
  }
1769
1780
  }
1770
1781
  }
1771
- return [...compatible];
1772
- }
1773
- function resolveRequirements(skillId, requireRules, resolve) {
1774
- const requires = [];
1775
- for (const rule of requireRules) {
1782
+ for (const rule of relationships.requires) {
1776
1783
  const ruleSkillId = resolve(rule.skill, "requires.skill");
1777
1784
  if (ruleSkillId !== skillId) continue;
1778
1785
  const resolvedNeeds = rule.needs.map((slug) => resolve(slug, "requires.needs")).filter((id) => id !== null);
@@ -1783,11 +1790,7 @@ function resolveRequirements(skillId, requireRules, resolve) {
1783
1790
  reason: rule.reason
1784
1791
  });
1785
1792
  }
1786
- return requires;
1787
- }
1788
- function resolveAlternatives(skillId, alternativeGroups, resolve) {
1789
- const alternatives = [];
1790
- for (const group of alternativeGroups) {
1793
+ for (const group of relationships.alternatives) {
1791
1794
  const resolved = group.skills.map((slug) => resolve(slug, "alternatives")).filter((id) => id !== null);
1792
1795
  if (!resolved.includes(skillId)) continue;
1793
1796
  for (const alt of resolved) {
@@ -1796,26 +1799,19 @@ function resolveAlternatives(skillId, alternativeGroups, resolve) {
1796
1799
  }
1797
1800
  }
1798
1801
  }
1799
- return alternatives;
1800
- }
1801
- function resolveDiscourages(skillId, discourageRules, resolve) {
1802
- if (!discourageRules) return [];
1803
- const discourages = [];
1804
- for (const rule of discourageRules) {
1805
- const resolved = rule.skills.map((slug) => resolve(slug, "discourages")).filter((id) => id !== null);
1806
- if (!resolved.includes(skillId)) continue;
1807
- for (const other of resolved) {
1808
- if (other !== skillId && !discourages.some((d) => d.skillId === other)) {
1809
- discourages.push({ skillId: other, reason: rule.reason });
1810
- }
1811
- }
1812
- }
1813
- return discourages;
1802
+ return {
1803
+ conflictsWith,
1804
+ discourages,
1805
+ compatibleWith: [...compatible],
1806
+ requires,
1807
+ alternatives
1808
+ };
1814
1809
  }
1815
1810
  function buildResolvedSkill(skill, _categories, relationships, slugMap) {
1816
1811
  const resolve = (slug2, context) => resolveToCanonicalId(slug2, slugMap.slugToId, context ? `${skill.id} ${context}` : void 0);
1817
1812
  const slug = skill.slug;
1818
1813
  const recommendation = relationships.recommends.find((r) => r.skill === skill.slug);
1814
+ const resolved = resolveRelationships(skill.id, relationships, resolve);
1819
1815
  return {
1820
1816
  id: skill.id,
1821
1817
  slug,
@@ -1825,17 +1821,9 @@ function buildResolvedSkill(skill, _categories, relationships, slugMap) {
1825
1821
  category: skill.category,
1826
1822
  tags: skill.tags,
1827
1823
  author: skill.author,
1828
- conflictsWith: resolveConflicts(skill.id, relationships.conflicts, resolve),
1824
+ ...resolved,
1829
1825
  isRecommended: recommendation != null,
1830
1826
  recommendedReason: recommendation?.reason,
1831
- requires: resolveRequirements(skill.id, relationships.requires, resolve),
1832
- alternatives: resolveAlternatives(skill.id, relationships.alternatives, resolve),
1833
- discourages: resolveDiscourages(skill.id, relationships.discourages, resolve),
1834
- compatibleWith: resolveCompatibilityGroups(
1835
- skill.id,
1836
- relationships.compatibleWith ?? [],
1837
- resolve
1838
- ),
1839
1827
  path: skill.path,
1840
1828
  ...skill.custom === true ? { custom: true } : {}
1841
1829
  };
@@ -5508,4 +5496,4 @@ export {
5508
5496
  validateAllPlugins,
5509
5497
  printPluginValidationResult
5510
5498
  };
5511
- //# sourceMappingURL=chunk-FVMYBN5K.js.map
5499
+ //# sourceMappingURL=chunk-2EXAK22V.js.map