agentsmesh 0.2.5 → 0.2.6

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 (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +24 -895
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - d011602: Add a Starlight documentation site published to GitHub Pages; shorten the npm README and link to the hosted docs for full guides and CLI reference.
8
+
3
9
  ## 0.2.5
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,79 +1,29 @@
1
- # AgentsMesh
2
-
3
- [![CI](https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml)
4
- [![npm version](https://img.shields.io/npm/v/agentsmesh.svg)](https://www.npmjs.com/package/agentsmesh)
5
- [![Coverage](https://codecov.io/gh/sampleXbro/agentsmesh/branch/master/graph/badge.svg)](https://codecov.io/gh/sampleXbro/agentsmesh)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
- [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/)
8
- [![Node.js](https://img.shields.io/node/v/agentsmesh.svg)](https://nodejs.org/)
9
- [![npm downloads](https://img.shields.io/npm/dm/agentsmesh.svg)](https://www.npmjs.com/package/agentsmesh)
10
-
11
- **One config. Nine AI coding tools. Zero drift.**
1
+ <h1 align="center">AgentsMesh</h1>
2
+
3
+ <p align="center">
4
+ <a href="https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml"><img src="https://github.com/sampleXbro/agentsmesh/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
5
+ <a href="https://www.npmjs.com/package/agentsmesh"><img src="https://img.shields.io/npm/v/agentsmesh.svg" alt="npm version"></a>
6
+ <a href="https://codecov.io/gh/sampleXbro/agentsmesh"><img src="https://codecov.io/gh/sampleXbro/agentsmesh/branch/master/graph/badge.svg" alt="Coverage"></a>
7
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
8
+ <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-strict-blue.svg" alt="TypeScript"></a>
9
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/agentsmesh.svg" alt="Node.js"></a>
10
+ <a href="https://www.npmjs.com/package/agentsmesh"><img src="https://img.shields.io/npm/dm/agentsmesh.svg" alt="npm downloads"></a>
11
+ <a href="https://samplexbro.github.io/agentsmesh"><img src="https://img.shields.io/badge/docs-website-brightgreen.svg" alt="Docs"></a>
12
+ <a href="https://github.com/sampleXbro/agentsmesh/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
13
+ </p>
12
14
 
13
15
  AgentsMesh maintains a single canonical configuration in `.agentsmesh/` and syncs it bidirectionally to Claude Code, Cursor, Copilot, Continue, Junie, Gemini CLI, Cline, Codex CLI, and Windsurf. Rules, commands, agents, skills, MCP servers, hooks, ignore patterns, and permissions -- all from one source of truth.
14
16
 
15
- ---
16
-
17
- **Table of Contents**
18
-
19
- - [Why AgentsMesh](#why-agentsmesh)
20
- - [Installation](#installation)
21
- - [Quick Start](#quick-start)
22
- - [Supported Tools](#supported-tools)
23
- - [Canonical Configuration](#canonical-configuration)
24
- - [Rules](#rules)
25
- - [Commands](#commands)
26
- - [Agents](#agents)
27
- - [Skills](#skills)
28
- - [MCP Servers](#mcp-servers)
29
- - [Permissions](#permissions)
30
- - [Hooks](#hooks)
31
- - [Ignore Patterns](#ignore-patterns)
32
- - [CLI Reference](#cli-reference)
33
- - [Global Flags](#global-flags)
34
- - [init](#init)
35
- - [generate](#generate)
36
- - [import](#import)
37
- - [install](#install)
38
- - [diff](#diff)
39
- - [lint](#lint)
40
- - [watch](#watch)
41
- - [check](#check)
42
- - [merge](#merge)
43
- - [matrix](#matrix)
44
- - [Configuration](#configuration)
45
- - [agentsmesh.yaml](#agentsmeshyaml)
46
- - [Local Overrides](#local-overrides)
47
- - [Extends](#extends)
48
- - [Collaboration Settings](#collaboration-settings)
49
- - [Conversions](#conversions)
50
- - [Workflows](#workflows)
51
- - [Adopting AgentsMesh in an Existing Project](#adopting-agentsmesh-in-an-existing-project)
52
- - [Supporting Multiple Tools on a Team](#supporting-multiple-tools-on-a-team)
53
- - [Sharing Config Across Repositories](#sharing-config-across-repositories)
54
- - [CI Drift Detection](#ci-drift-detection)
55
- - [Installing Community Packs](#installing-community-packs)
56
- - [Local Development Overrides](#local-development-overrides)
57
- - [How Generation Works](#how-generation-works)
58
- - [Roadmap](#roadmap)
59
- - [Contributing](#contributing)
60
- - [License](#license)
17
+ > **Full documentation: [samplexbro.github.io/agentsmesh](https://samplexbro.github.io/agentsmesh)**
61
18
 
62
19
  ---
63
20
 
64
21
  ## Why AgentsMesh
65
22
 
66
- If your team uses more than one AI coding tool -- or even if you just use one today and might switch tomorrow -- you already know the pain. Each tool has its own config format, its own directory structure, its own way of defining rules, commands, and MCP servers. Change a rule in `.cursor/rules/`, forget to update `.claude/rules/`, and your agents start behaving differently depending on who is editing. Scale that across a team where half the developers use Cursor and the other half use Claude Code, and config drift becomes a real problem.
67
-
68
- AgentsMesh solves this by giving you a single canonical directory (`.agentsmesh/`) that holds all your AI tool configuration. When you run `agentsmesh generate`, it produces the correct output for every tool your team uses. When someone on the team already has tool-specific config, `agentsmesh import` brings it into the canonical format. The round-trip is lossless: what goes in comes back out, including internal file references, supporting skill files, and embedded metadata.
69
-
70
- **What sets AgentsMesh apart from manual management:**
71
-
72
23
  - **One source of truth** -- edit `.agentsmesh/`, generate everywhere. No more copy-pasting rules between tool directories.
73
24
  - **Bidirectional sync** -- import existing configs into canonical form and generate back out. No data loss, no manual reformatting.
74
25
  - **Team-safe collaboration** -- lock files track generated state, `check` catches drift in CI, `merge` resolves conflicts after `git merge`.
75
- - **Lossless feature projection** -- when a tool lacks native support for a feature (e.g., Codex CLI has no commands), AgentsMesh projects it as an embedded skill with enough metadata to round-trip on re-import.
76
- - **Real operational tooling** -- `diff`, `lint`, `watch`, `check`, `merge`, and `matrix` are first-class commands, not afterthoughts. Most config tools stop at "generate and hope for the best."
26
+ - **Lossless feature projection** -- when a tool lacks native support for a feature, AgentsMesh projects it as an embedded skill with enough metadata to round-trip on re-import.
77
27
 
78
28
  ---
79
29
 
@@ -130,8 +80,6 @@ That's it. Your `.agentsmesh/` directory is now the single source of truth, and
130
80
 
131
81
  ## Supported Tools
132
82
 
133
- AgentsMesh supports 9 AI coding tools with varying levels of feature support per tool. "Native" means the feature maps directly to the tool's own config format. "Embedded" means AgentsMesh projects the feature into a compatible format (e.g., converting commands to invokable skills) with enough metadata for lossless round-trip. "Partial" means limited support.
134
-
135
83
  | Feature | Claude Code | Cursor | Copilot | Gemini CLI | Cline | Codex CLI | Windsurf | Continue | Junie |
136
84
  |---------------|:-----------:|:-------:|:-------:|:----------:|:-------:|:---------:|:--------:|:--------:|:--------:|
137
85
  | Rules | Native | Native | Native | Native | Native | Native | Native | Native | Native |
@@ -143,839 +91,20 @@ AgentsMesh supports 9 AI coding tools with varying levels of feature support per
143
91
  | Ignore | Native | Native | -- | Native | Native | -- | Native | -- | Native |
144
92
  | Permissions | Native | Partial | -- | Partial | -- | -- | -- | -- | -- |
145
93
 
146
- Embedded support is deliberate, not a workaround. Projected features carry enough metadata that `agentsmesh import` can restore them to their original canonical form, not flatten them into plain text.
147
-
148
- ---
149
-
150
- ## Canonical Configuration
151
-
152
- The `.agentsmesh/` directory is the single source of truth. Everything below is a reference for the canonical file formats.
153
-
154
- ```
155
- .agentsmesh/
156
- rules/
157
- _root.md # Root rule (always applied, required)
158
- *.md # Additional rules (scoped by target or glob)
159
- commands/
160
- *.md # Slash-command-style prompts
161
- agents/
162
- *.md # Subagent definitions
163
- skills/
164
- {name}/
165
- SKILL.md # Skill definition
166
- *.* # Supporting files (templates, references, etc.)
167
- mcp.json # MCP server definitions
168
- permissions.yaml # Allow/deny tool permission lists
169
- hooks.yaml # Lifecycle hooks
170
- ignore # gitignore-style exclusion patterns
171
- installs.yaml # Record of installed packs
172
- .lock # Generated state checksums (managed by CLI)
173
- agentsmesh.yaml # Project configuration
174
- agentsmesh.local.yaml # Local overrides (gitignored)
175
- ```
176
-
177
- ### Rules
178
-
179
- Rules are markdown files with optional YAML frontmatter. The root rule (`_root.md`) is required and always applied. Additional rules can be scoped to specific targets or file patterns.
180
-
181
- ```markdown
182
- ---
183
- root: true
184
- ---
185
-
186
- # Project Guidelines
187
-
188
- - Write tests before implementation.
189
- - Max 200 lines per file.
190
- - Use TypeScript strict mode.
191
- ```
192
-
193
- Scoped rule example:
194
-
195
- ```markdown
196
- ---
197
- description: Frontend conventions
198
- targets: [cursor, claude-code]
199
- globs: [src/components/**/*.tsx]
200
- ---
201
-
202
- Use functional components with hooks. No class components.
203
- Prefer Tailwind utility classes over custom CSS.
204
- ```
205
-
206
- **Frontmatter fields:**
207
-
208
- | Field | Type | Description |
209
- |---------------------------|------------|--------------------------------------------------------------------|
210
- | `root` | `boolean` | Always-applied rule. Required for `_root.md`. |
211
- | `description` | `string` | Human-readable rule name. |
212
- | `targets` | `string[]` | Limit rule to specific tools. Empty = all targets. |
213
- | `globs` | `string[]` | File patterns this rule applies to (tool-dependent). |
214
- | `trigger` | `string` | Activation mode hint for Windsurf: `always_on`, `model_decision`, `glob`, `manual`. |
215
- | `codexEmit` | `string` | Codex CLI instruction type: `advisory` or `execution`. |
216
- | `codexInstructionVariant` | `string` | Codex nested instruction format: `default` or `override`. |
217
-
218
- ### Commands
219
-
220
- Commands are reusable prompts that map to slash commands in tools that support them (Claude Code, Cursor, Copilot, Gemini CLI). For tools without native command support, they are projected as invokable skills.
221
-
222
- ```markdown
223
- ---
224
- description: Create a conventional commit from current changes
225
- allowed-tools:
226
- - Read
227
- - Bash(git status)
228
- - Bash(git diff)
229
- - Bash(git add)
230
- - Bash(git commit)
231
- ---
232
-
233
- Review the current git changes. Analyze what was modified and why.
234
- Draft a conventional commit message (feat/fix/refactor/test/docs scope).
235
- Stage the relevant files and commit.
236
- ```
237
-
238
- **Frontmatter fields:**
239
-
240
- | Field | Type | Description |
241
- |-----------------|------------|----------------------------------------------------|
242
- | `description` | `string` | Short description shown in command menus. |
243
- | `allowed-tools` | `string[]` | Tools the command is allowed to use when invoked. |
244
-
245
- ### Agents
246
-
247
- Agents define custom subagents with their own tools, model, permissions, hooks, and skills.
248
-
249
- ```markdown
250
- ---
251
- name: code-reviewer
252
- description: Reviews code changes for quality and security issues
253
- tools:
254
- - Read
255
- - Grep
256
- - Glob
257
- - Bash(git diff)
258
- - Bash(git log)
259
- model: sonnet
260
- permissionMode: ask
261
- maxTurns: 10
262
- mcpServers:
263
- - github
264
- hooks:
265
- PreToolUse:
266
- - matcher: "Edit|Write"
267
- type: command
268
- command: "eslint --fix $FILE"
269
- skills:
270
- - security-review
271
- memory: .context/review-history.md
272
- ---
273
-
274
- You are a senior code reviewer. Focus on logic correctness, performance,
275
- security vulnerabilities, and adherence to project conventions.
276
-
277
- Flag issues by severity. Suggest concrete fixes, not vague recommendations.
278
- ```
279
-
280
- **Frontmatter fields:**
281
-
282
- | Field | Type | Description |
283
- |-------------------|------------|-----------------------------------------------------------------|
284
- | `name` | `string` | Agent identifier. |
285
- | `description` | `string` | Short description. |
286
- | `tools` | `string[]` | Allowed tools (Read, Grep, Bash, etc.). |
287
- | `disallowedTools` | `string[]` | Explicitly denied tools. |
288
- | `model` | `string` | Model hint: `sonnet`, `opus`, `haiku`. |
289
- | `permissionMode` | `string` | How permissions are handled: `ask`, `default`, `none`. |
290
- | `maxTurns` | `number` | Maximum conversation turns. |
291
- | `mcpServers` | `string[]` | MCP servers available to this agent. |
292
- | `hooks` | `object` | Agent-level lifecycle hooks (same format as `hooks.yaml`). |
293
- | `skills` | `string[]` | Skills available to this agent. |
294
- | `memory` | `string` | Path to external memory file. |
295
-
296
- ### Skills
297
-
298
- Skills are directories containing a `SKILL.md` definition and any supporting files (templates, reference docs, examples). Supporting files are preserved across generation and import.
299
-
300
- ```
301
- .agentsmesh/skills/
302
- api-generator/
303
- SKILL.md
304
- template.hbs
305
- examples/
306
- user-api.ts
307
- ```
308
-
309
- ```markdown
310
- ---
311
- description: Generate REST API endpoints from OpenAPI specs
312
- ---
313
-
314
- Given an OpenAPI specification file, generate TypeScript route handlers
315
- with request validation, error handling, and response typing.
316
-
317
- Reference template: [template.hbs](./template.hbs)
318
- See example: [user-api.ts](./examples/user-api.ts)
319
- ```
320
-
321
- ### MCP Servers
322
-
323
- MCP server definitions use a JSON format compatible with the Model Context Protocol.
324
-
325
- ```json
326
- {
327
- "mcpServers": {
328
- "github": {
329
- "type": "stdio",
330
- "command": "npx",
331
- "args": ["-y", "@modelcontextprotocol/server-github"],
332
- "env": {
333
- "GITHUB_TOKEN": "$GITHUB_TOKEN"
334
- }
335
- },
336
- "internal-api": {
337
- "type": "url",
338
- "url": "http://localhost:3100/mcp",
339
- "headers": {
340
- "Authorization": "Bearer $API_TOKEN"
341
- }
342
- }
343
- }
344
- }
345
- ```
346
-
347
- Supports both `stdio` (local process) and `url` (HTTP endpoint) server types. Environment variables use `$VAR` syntax and are resolved at runtime by each tool.
348
-
349
- ### Permissions
350
-
351
- Allow/deny lists for tool operations. Mainly consumed by Claude Code (native) and Cursor/Gemini CLI (partial).
352
-
353
- ```yaml
354
- allow:
355
- - Read
356
- - Grep
357
- - Glob
358
- - Bash(pnpm test:*)
359
- - Bash(pnpm build:*)
360
- - Bash(git add:*)
361
- - Bash(git commit:*)
362
- deny:
363
- - WebFetch
364
- - Bash(curl:*)
365
- - Bash(rm -rf:*)
366
- - Read(.env)
367
- ```
368
-
369
- Patterns support wildcards. `Bash(pnpm test:*)` allows any `pnpm test:` subcommand.
370
-
371
- ### Hooks
372
-
373
- Lifecycle hooks that trigger before/after tool use, on notifications, on user prompts, and on subagent lifecycle events.
374
-
375
- ```yaml
376
- PreToolUse:
377
- - matcher: "Edit|Write"
378
- type: command
379
- command: "eslint --fix $FILE"
380
- timeout: 30
381
-
382
- PostToolUse:
383
- - matcher: "Bash"
384
- type: prompt
385
- prompt: "Review the command output for security concerns."
386
-
387
- Notification:
388
- - matcher: "*"
389
- type: command
390
- command: "./scripts/log-notification.sh"
391
-
392
- UserPromptSubmit:
393
- - matcher: "*"
394
- type: command
395
- command: "./scripts/prompt-guard.sh"
396
- ```
397
-
398
- **Hook types:** `PreToolUse`, `PostToolUse`, `Notification`, `UserPromptSubmit`, `SubagentStart`, `SubagentStop`
399
-
400
- **Entry fields:**
401
-
402
- | Field | Type | Description |
403
- |-----------|----------|------------------------------------------------------|
404
- | `matcher` | `string` | Regex pattern for which tool/event triggers the hook. |
405
- | `type` | `string` | `command` (run a shell command) or `prompt` (inject a prompt). |
406
- | `command` | `string` | Shell command to execute (when `type: command`). |
407
- | `prompt` | `string` | Prompt text to inject (when `type: prompt`). |
408
- | `timeout` | `number` | Timeout in seconds (optional). |
409
-
410
- ### Ignore Patterns
411
-
412
- A gitignore-style file listing patterns that AI tools should not index or read.
413
-
414
- ```
415
- node_modules
416
- dist
417
- .env
418
- .env.*
419
- *.log
420
- .DS_Store
421
- coverage
422
- ```
94
+ See the [full feature matrix docs](https://samplexbro.github.io/agentsmesh/reference/supported-tools/) for details on native vs. embedded support.
423
95
 
424
96
  ---
425
97
 
426
- ## CLI Reference
427
-
428
- ### Global Flags
429
-
430
- | Flag | Description |
431
- |-------------|---------------------------------------|
432
- | `--help` | Show help output and exit. |
433
- | `--version` | Print CLI version and exit. |
434
- | `--verbose` | Show full error stack traces on failure. |
435
-
436
- ### init
437
-
438
- Create the canonical scaffold: `agentsmesh.yaml`, `agentsmesh.local.yaml`, `.agentsmesh/` directory with a starter `_root.md` rule, and update `.gitignore`.
439
-
440
- ```bash
441
- agentsmesh init [flags]
442
- ```
443
-
444
- | Flag | Description |
445
- |---------|---------------------------------------------------------|
446
- | `--yes` | Auto-import any detected tool configs without prompting. |
447
-
448
- During init, AgentsMesh scans the project for existing AI tool configurations (`.claude/`, `.cursor/`, `.cline/`, `.junie/`, `.continue/`, `.gemini/`, `.codex/`, `.windsurf/`, `.github/copilot-instructions.md`). If found, it offers to import them into the canonical directory.
449
-
450
- ```bash
451
- # Interactive mode (prompts for each detected config)
452
- agentsmesh init
453
-
454
- # Auto-import everything detected
455
- agentsmesh init --yes
456
- ```
457
-
458
- ### generate
459
-
460
- Generate target-specific config files from the canonical `.agentsmesh/` directory.
461
-
462
- ```bash
463
- agentsmesh generate [flags]
464
- ```
465
-
466
- | Flag | Description |
467
- |--------------------|------------------------------------------------------------|
468
- | `--targets <csv>` | Comma-separated list of target IDs to generate for. |
469
- | `--dry-run` | Preview changes without writing any files. |
470
- | `--check` | Verify sync status only. Exit code 1 if out of sync. |
471
- | `--force` | Bypass collaboration lock violations. |
472
- | `--refresh-cache` | Re-fetch remote extends sources before generating. |
473
- | `--no-cache` | Alias for `--refresh-cache`. |
474
-
475
- ```bash
476
- # Generate for all configured targets
477
- agentsmesh generate
478
-
479
- # Generate for specific targets only
480
- agentsmesh generate --targets claude-code,cursor
481
-
482
- # Preview what would change
483
- agentsmesh generate --dry-run
484
-
485
- # CI check: fail if generated files are out of date
486
- agentsmesh generate --check
487
-
488
- # Force through locked feature protections
489
- agentsmesh generate --force
490
-
491
- # Refresh remote extends cache
492
- agentsmesh generate --refresh-cache
493
- ```
494
-
495
- ### import
496
-
497
- Import an existing tool's config into the canonical `.agentsmesh/` directory.
498
-
499
- ```bash
500
- agentsmesh import --from <target>
501
- ```
502
-
503
- | Flag | Description |
504
- |------------------|---------------------------------------------------------|
505
- | `--from <target>`| Source tool ID to import from (required). |
506
-
507
- Valid targets: `claude-code`, `cursor`, `copilot`, `continue`, `junie`, `gemini-cli`, `cline`, `codex-cli`, `windsurf`
508
-
509
- ```bash
510
- # Import existing Claude Code configuration
511
- agentsmesh import --from claude-code
512
-
513
- # Import Cursor rules and settings
514
- agentsmesh import --from cursor
515
-
516
- # Import from any supported tool
517
- agentsmesh import --from copilot
518
- agentsmesh import --from gemini-cli
519
- agentsmesh import --from cline
520
- agentsmesh import --from codex-cli
521
- agentsmesh import --from windsurf
522
- agentsmesh import --from continue
523
- agentsmesh import --from junie
524
- ```
525
-
526
- The import process maps tool-specific config to the canonical format:
527
- - `.claude/rules/*.md` becomes `.agentsmesh/rules/*.md`
528
- - `.claude/settings.json` permissions become `.agentsmesh/permissions.yaml`
529
- - `.cursor/rules/*.mdc` gets converted to standard markdown
530
- - Skills, agents, commands, MCP, hooks, and ignore patterns are all mapped to their canonical equivalents
531
-
532
- Internal file references (links between skills, supporting file paths) are rewritten from tool-specific paths to canonical paths, so cross-references stay valid.
533
-
534
- ### install
535
-
536
- Install rules, commands, agents, or skills from a remote or local source.
537
-
538
- ```bash
539
- agentsmesh install <source> [flags]
540
- ```
541
-
542
- | Flag | Description |
543
- |------------------|-------------------------------------------------------------------|
544
- | `<source>` | GitHub/GitLab URL, git URL, SSH, or local path. |
545
- | `--path <dir>` | Subdirectory within the source repo to install from. |
546
- | `--target <id>` | Hint for native format auto-discovery (e.g., `claude-code`). |
547
- | `--as <kind>` | Manual mode: install as `rules`, `commands`, `agents`, or `skills`. |
548
- | `--name <id>` | Override the generated install entry name. |
549
- | `--extends` | Record as an extends entry instead of a materialized pack. |
550
- | `--sync` | Reinstall missing packs from `.agentsmesh/installs.yaml`. |
551
- | `--dry-run` | Preview what would be installed without writing. |
552
- | `--force` | Non-interactive mode: include all resources, skip prompts. |
553
-
554
- **Source formats:**
555
-
556
- | Format | Example |
557
- |--------------------------------------------------|------------------------------------------|
558
- | GitHub shorthand | `github:org/repo@v1.0.0` |
559
- | GitLab shorthand | `gitlab:group/repo@main` |
560
- | Git SSH | `git+ssh://git@github.com/org/repo#main`|
561
- | Local path | `local:../shared-config` |
562
-
563
- ```bash
564
- # Auto-discover and install from a GitHub repo
565
- agentsmesh install github:org/shared-rules@v2.0.0
566
-
567
- # Install specific skills from a subdirectory
568
- agentsmesh install github:org/repo --path skills --as skills
569
-
570
- # Cherry-pick specific items
571
- agentsmesh install github:org/repo --as agents --name team-agents
572
-
573
- # Record as extends (linked, not materialized)
574
- agentsmesh install github:org/base-config --extends
575
-
576
- # Reinstall missing packs after a fresh clone
577
- agentsmesh install --sync
578
-
579
- # Preview before committing
580
- agentsmesh install github:org/repo --dry-run
581
- ```
582
-
583
- Installed packs are written to `.agentsmesh/packs/` and tracked in `.agentsmesh/installs.yaml`. They merge with your canonical config during generation.
584
-
585
- ### diff
586
-
587
- Show a unified diff of what the next `generate` would change, without writing anything.
588
-
589
- ```bash
590
- agentsmesh diff [flags]
591
- ```
592
-
593
- | Flag | Description |
594
- |-----------------|------------------------------------------------------|
595
- | `--targets <csv>` | Limit diff output to specific target IDs. |
596
-
597
- ```bash
598
- # See all pending changes
599
- agentsmesh diff
600
-
601
- # See changes for Windsurf only
602
- agentsmesh diff --targets windsurf
603
- ```
604
-
605
- ### lint
606
-
607
- Validate canonical files against target-specific constraints. Each target has its own linting rules -- for example, Cursor requires `.mdc` format compliance, Claude Code validates `settings.json` schema, and all targets check for valid frontmatter.
608
-
609
- ```bash
610
- agentsmesh lint [flags]
611
- ```
612
-
613
- | Flag | Description |
614
- |-----------------|--------------------------------------------------|
615
- | `--targets <csv>` | Limit linting to specific target IDs. |
616
-
617
- ```bash
618
- # Lint for all configured targets
619
- agentsmesh lint
620
-
621
- # Lint for Cursor constraints only
622
- agentsmesh lint --targets cursor
623
- ```
624
-
625
- ### watch
626
-
627
- Watch the `.agentsmesh/` directory for changes and automatically regenerate on save. Uses a 300ms debounce to batch rapid edits. The watch loop ignores its own lock file writes to prevent infinite regeneration cycles.
628
-
629
- ```bash
630
- agentsmesh watch [flags]
631
- ```
632
-
633
- | Flag | Description |
634
- |-----------------|--------------------------------------------------|
635
- | `--targets <csv>` | Limit regeneration to specific target IDs. |
636
-
637
- ```bash
638
- # Watch and regenerate for all targets
639
- agentsmesh watch
640
-
641
- # Watch and regenerate for Claude Code only
642
- agentsmesh watch --targets claude-code
643
- ```
644
-
645
- ### check
646
-
647
- Verify that the canonical files still match the lock file (`.agentsmesh/.lock`). Designed for CI pipelines -- exits with code 1 if generated files have drifted.
648
-
649
- ```bash
650
- agentsmesh check
651
- ```
652
-
653
- No flags. Returns exit code 0 if everything is in sync, 1 if drift is detected.
654
-
655
- ### merge
656
-
657
- Resolve `.agentsmesh/.lock` merge conflicts after a `git merge`. Rebuilds the lock file from the current canonical state.
658
-
659
- ```bash
660
- agentsmesh merge
661
- ```
662
-
663
- No flags. Run this after `git merge` when the lock file has conflicts.
664
-
665
- ### matrix
666
-
667
- Display the feature-target compatibility matrix for your current configuration.
668
-
669
- ```bash
670
- agentsmesh matrix [flags]
671
- ```
672
-
673
- | Flag | Description |
674
- |-----------------|-------------------------------------------------------|
675
- | `--targets <csv>` | Limit matrix columns to specific target IDs. |
676
- | `--verbose` | Show detailed feature notes alongside the matrix. |
677
-
678
- ```bash
679
- # Show full matrix
680
- agentsmesh matrix
681
-
682
- # Show matrix for specific targets
683
- agentsmesh matrix --targets claude-code,cursor,copilot
684
-
685
- # Show matrix with detailed notes
686
- agentsmesh matrix --verbose
687
- ```
688
-
689
- ---
690
-
691
- ## Configuration
692
-
693
- ### agentsmesh.yaml
694
-
695
- The main project configuration file. Created by `agentsmesh init`.
696
-
697
- ```yaml
698
- version: 1
699
-
700
- # Which tools to generate config for
701
- targets:
702
- - claude-code
703
- - cursor
704
- - copilot
705
- - gemini-cli
706
- - cline
707
- - codex-cli
708
- - windsurf
709
- - continue
710
- - junie
711
-
712
- # Which features to sync (all enabled by default)
713
- features:
714
- - rules
715
- - commands
716
- - agents
717
- - skills
718
- - mcp
719
- - hooks
720
- - ignore
721
- - permissions
722
-
723
- # Inherit shared config from other sources
724
- extends:
725
- - name: company-standards
726
- source: github:my-org/ai-config@v1.0.0
727
- features: [rules, commands, permissions]
728
-
729
- # Team collaboration settings
730
- collaboration:
731
- strategy: merge
732
- lock_features:
733
- - mcp
734
- - permissions
735
- ```
736
-
737
- **Top-level fields:**
738
-
739
- | Field | Type | Description |
740
- |-----------------|------------|--------------------------------------------------------------|
741
- | `version` | `number` | Config version. Currently `1`. |
742
- | `targets` | `string[]` | Tool IDs to generate config for. |
743
- | `features` | `string[]` | Features to sync. Omit to enable all. |
744
- | `extends` | `array` | Shared config sources to inherit from. |
745
- | `overrides` | `object` | Per-target overrides (keyed by target ID). |
746
- | `collaboration` | `object` | Team collaboration and lock settings. |
747
- | `conversions` | `object` | Control feature projection behavior per target. |
748
-
749
- ### Local Overrides
750
-
751
- `agentsmesh.local.yaml` is gitignored and allows individual developers to customize their setup without affecting the shared config.
752
-
753
- ```yaml
754
- # Only generate for the tools I use
755
- targets:
756
- - claude-code
757
-
758
- # Skip features I don't need locally
759
- features:
760
- - rules
761
- - commands
762
- - skills
763
- - mcp
764
- ```
765
-
766
- Local overrides narrow the scope -- they cannot add targets or features that the project config does not define.
767
-
768
- ### Extends
769
-
770
- Pull shared configuration from remote repositories, other local projects, or Git URLs.
771
-
772
- ```yaml
773
- extends:
774
- # GitHub release
775
- - name: company-rules
776
- source: github:my-org/ai-config@v1.0.0
777
- features: [rules, commands]
778
-
779
- # GitLab repo
780
- - name: platform-config
781
- source: gitlab:infra/ai-standards@v2.3.1
782
- features: [rules, permissions]
783
-
784
- # Git SSH
785
- - name: private-rules
786
- source: git+ssh://git@github.com/org/config.git#main
787
- features: [rules]
788
-
789
- # Local directory (monorepo shared config)
790
- - name: shared-local
791
- source: ../shared-ai-config
792
- features: [rules, commands, mcp]
793
- ```
794
-
795
- **Extends entry fields:**
796
-
797
- | Field | Type | Description |
798
- |------------|------------|---------------------------------------------------------------|
799
- | `name` | `string` | Identifier for this extends entry. |
800
- | `source` | `string` | Source URL or path. |
801
- | `version` | `string` | Version tag (for remote sources). |
802
- | `target` | `string` | Hint for native format auto-discovery. |
803
- | `features` | `string[]` | Which features to inherit from this source. |
804
- | `path` | `string` | Subdirectory within the source. |
805
- | `pick` | `object` | Cherry-pick specific resources (e.g., `rules: [style, perf]`).|
806
-
807
- Remote sources are cached in `~/.agentsmesh/cache/`. Use `--refresh-cache` on `generate` to force a re-fetch.
808
-
809
- ### Collaboration Settings
810
-
811
- Control how teams work with generated config files.
812
-
813
- ```yaml
814
- collaboration:
815
- strategy: merge # merge | lock | last-wins
816
- lock_features:
817
- - mcp
818
- - permissions
819
- ```
820
-
821
- | Strategy | Behavior |
822
- |-------------|------------------------------------------------------------------------|
823
- | `merge` | Standard 3-way merge of the lock file. Use `agentsmesh merge` to resolve conflicts. |
824
- | `lock` | Locked features cannot be regenerated without `--force`. Useful for sensitive config like MCP servers and permissions. |
825
- | `last-wins` | Always overwrite the lock with the latest state. |
826
-
827
- ### Conversions
828
-
829
- Control how features are projected when a target lacks native support.
830
-
831
- ```yaml
832
- conversions:
833
- # Convert commands to skills for tools that don't have native command support
834
- commands_to_skills:
835
- codex-cli: true
836
-
837
- # Convert agents to skills for tools that don't have native agent support
838
- agents_to_skills:
839
- cline: true
840
- windsurf: true
841
- codex-cli: true
842
- gemini-cli: true
843
- ```
844
-
845
- Set a conversion to `false` to disable projection for that target. The feature will simply be skipped instead of being embedded as a skill.
846
-
847
- ---
848
-
849
- ## Workflows
850
-
851
- ### Adopting AgentsMesh in an Existing Project
852
-
853
- If the project already has AI tool configs scattered across `.claude/`, `.cursor/`, `.cline/`, and so on:
854
-
855
- ```bash
856
- # 1. Initialize the canonical directory
857
- agentsmesh init
858
-
859
- # 2. Import existing configs (one at a time or use --yes during init)
860
- agentsmesh import --from claude-code
861
- agentsmesh import --from cursor
862
-
863
- # 3. Review the canonical files
864
- ls .agentsmesh/rules/
865
- ls .agentsmesh/commands/
866
- cat .agentsmesh/permissions.yaml
867
-
868
- # 4. Generate fresh output for all targets
869
- agentsmesh generate
870
-
871
- # 5. Verify nothing unexpected changed
872
- agentsmesh diff
873
- ```
874
-
875
- After this, `.agentsmesh/` is the source of truth. Edit canonical files, run `generate`, and commit both the canonical sources and the generated output.
876
-
877
- ### Supporting Multiple Tools on a Team
878
-
879
- When half the team uses Cursor and the other half uses Claude Code:
880
-
881
- ```yaml
882
- # agentsmesh.yaml
883
- version: 1
884
- targets:
885
- - claude-code
886
- - cursor
887
- features:
888
- - rules
889
- - commands
890
- - agents
891
- - skills
892
- - mcp
893
- - hooks
894
- - permissions
895
- - ignore
896
- ```
897
-
898
- Everyone edits `.agentsmesh/`. Run `agentsmesh generate` after changes. Both `.claude/` and `.cursor/` directories stay in sync. The lock file tracks the generated state so PR reviews can catch drift.
899
-
900
- ### Sharing Config Across Repositories
901
-
902
- Create a shared repo with canonical rules, then reference it with extends:
903
-
904
- ```yaml
905
- # In each project's agentsmesh.yaml
906
- extends:
907
- - name: org-standards
908
- source: github:my-org/ai-standards@v1.2.0
909
- features: [rules, commands, permissions]
910
- ```
911
-
912
- When the shared repo publishes a new release, bump the version tag and run `agentsmesh generate --refresh-cache`.
913
-
914
- ### CI Drift Detection
915
-
916
- Add a check step to your CI pipeline:
917
-
918
- ```yaml
919
- # .github/workflows/ci.yml
920
- - name: Verify AI config sync
921
- run: npx agentsmesh check
922
- ```
923
-
924
- `agentsmesh check` exits with code 1 if generated files have drifted from the lock file. This catches cases where someone edited `.agentsmesh/` but forgot to regenerate, or edited a generated file directly.
925
-
926
- ### Installing Community Packs
927
-
928
- Install shared skills, rules, or agents from public repositories:
929
-
930
- ```bash
931
- # Install skills from a public repo
932
- agentsmesh install github:community/ai-skills@v1.0.0
933
-
934
- # Install specific skills from a subdirectory
935
- agentsmesh install github:my-org/toolbox --path skills --as skills
936
-
937
- # After a fresh clone, reinstall recorded packs
938
- agentsmesh install --sync
939
- ```
940
-
941
- Installed packs live in `.agentsmesh/packs/` and are tracked in `.agentsmesh/installs.yaml`. They merge into the canonical config during generation.
942
-
943
- ### Local Development Overrides
944
-
945
- Each developer can create `agentsmesh.local.yaml` (gitignored) to customize their local setup:
946
-
947
- ```yaml
948
- # I only use Claude Code, don't generate Cursor/Copilot files locally
949
- targets:
950
- - claude-code
951
-
952
- # I don't need hooks locally
953
- features:
954
- - rules
955
- - commands
956
- - agents
957
- - skills
958
- - mcp
959
- - permissions
960
- ```
961
-
962
- This narrows the scope without affecting the shared `agentsmesh.yaml` that the rest of the team uses.
963
-
964
- ---
965
-
966
- ## How Generation Works
967
-
968
- The generation pipeline follows this sequence:
98
+ ## Documentation
969
99
 
970
- 1. **Load config** -- parse `agentsmesh.yaml`, merge local overrides, validate schema.
971
- 2. **Load canonical sources** -- read all files from `.agentsmesh/`, resolve extends (fetch from cache or remote), load installed packs, merge everything.
972
- 3. **Generate per target** -- for each enabled target, call target-specific generators for rules, commands, agents, skills, MCP, hooks, ignore, and permissions. Each generator produces `{path, content}` pairs in the target's native format.
973
- 4. **Rewrite references** -- internal `.agentsmesh/` file paths are rewritten to target-relative paths (e.g., `.agentsmesh/skills/api-gen/template.hbs` becomes `.claude/skills/api-gen/template.hbs`).
974
- 5. **Resolve collisions** -- detect overlapping output paths across features, prefer native over embedded, remove duplicates.
975
- 6. **Write output** -- create target directories, write all files, update the lock file with checksums.
976
- 7. **Clean stale files** -- remove previously generated files that are no longer in the output set.
100
+ The documentation site covers everything in detail:
977
101
 
978
- On import, the pipeline runs in reverse: tool-specific paths are mapped back to canonical paths, references are restored, and metadata is preserved for round-trip fidelity.
102
+ - **[Getting Started](https://samplexbro.github.io/agentsmesh/getting-started/installation/)** -- installation, quick start
103
+ - **[Canonical Config](https://samplexbro.github.io/agentsmesh/canonical-config/)** -- rules, commands, agents, skills, MCP, hooks, ignore, permissions
104
+ - **[CLI Reference](https://samplexbro.github.io/agentsmesh/cli/)** -- all commands: init, generate, import, install, diff, lint, watch, check, merge, matrix
105
+ - **[Configuration](https://samplexbro.github.io/agentsmesh/configuration/agentsmesh-yaml/)** -- agentsmesh.yaml, local overrides, extends, collaboration, conversions
106
+ - **[Guides](https://samplexbro.github.io/agentsmesh/guides/existing-project/)** -- adopting in existing projects, multi-tool teams, sharing config, CI drift detection, community packs
107
+ - **[Reference](https://samplexbro.github.io/agentsmesh/reference/generation-pipeline/)** -- how the generation pipeline works
979
108
 
980
109
  ---
981
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentsmesh",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "One canonical source for AI coding agent rules, commands, skills, MCP, hooks, and permissions — synced across Claude Code, Cursor, Copilot, Continue, Junie, Gemini CLI, Cline, Codex CLI, and Windsurf.",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",