@brickhouse-tech/sync-agents 0.3.4 → 0.3.5

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 (2) hide show
  1. package/README.md +46 -4
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # sync-agents
2
2
 
3
- One set of agent rules to rule them all. `sync-agents` keeps your AI coding agent configurations in a single `.agents/` directory and syncs them to agent-specific directories (`.claude/`, `.windsurf/`, `.cursor/`, `.github/copilot/`) via symlinks. This ensures all agents follow the same rules, skills, and workflows without duplicating files.
3
+ One set of agent rules to rule them all. `sync-agents` keeps your AI coding agent configurations in a single `.agents/` directory and syncs them to agent-specific directories (`.claude/`, `.windsurf/`, `.cursor/`, `.github/copilot/`) via symlinks. This ensures all agents follow the same rules, skills, workflows, subagents, plans, and specs without duplicating files.
4
4
 
5
5
  AGENTS.md serves as an auto-generated index of everything in `.agents/` and is symlinked to CLAUDE.md for Claude compatibility.
6
6
 
@@ -69,11 +69,20 @@ SHA-256 checksums are published alongside each release as `checksums.txt`.
69
69
  │ ├── workflow1.md
70
70
  │ ├── workflow2.md
71
71
  │ └── ...
72
+ ├── agents/ # optional: Claude subagent definitions
73
+ │ └── reviewer.md
74
+ ├── plans/ # optional: per-effort implementation plans (how/when)
75
+ │ └── auth-effort/
76
+ │ └── rollout.md
77
+ ├── specs/ # optional: durable design/requirements docs (what/why)
78
+ │ └── SPEC-001.md
72
79
  └── STATE.md
73
80
  ```
74
81
 
75
82
  > **Note:** Skills use a directory layout (`skills/name/SKILL.md`) rather than flat files. This allows skills to include supporting files alongside their definition. The `fix` command can convert legacy flat skill files to the directory layout automatically.
76
83
 
84
+ > **Optional buckets:** `agents/`, `plans/`, and `specs/` activate only when their directory exists — `init` does not create them, `add agent|plan|spec <name>` does. They sync to Claude only (`.claude/agents`, `.claude/plans`, `.claude/specs`); other tools consume plans/specs through the `AGENTS.md` index and have no subagent surface. `plans/` and `specs/` share plumbing but differ in lifecycle: specs are durable what/why documents, plans are per-effort how/when documents that retire when the effort lands.
85
+
77
86
  Running `sync-agents sync` creates symlinks from `.agents/` subdirectories into `.claude/`, `.windsurf/`, `.cursor/`, and `.github/copilot/`. Any changes to `.agents/` are automatically reflected in the target directories because they are symlinks, not copies.
78
87
 
79
88
  AGENTS.md is also symlinked to CLAUDE.md so that Claude reads the index natively.
@@ -95,10 +104,16 @@ AGENTS.md is also symlinked to CLAUDE.md so that Claude reads the index natively
95
104
  | `inherit --list` | List current inheritance links |
96
105
  | `inherit --remove <label>` | Remove an inheritance link by label |
97
106
  | `status` | Show the current sync status of all targets and symlinks |
98
- | `add <type> <name>` | Add a new rule, skill, or workflow from a template (type is `rule`, `skill`, or `workflow`) |
99
- | `index` | Regenerate `AGENTS.md` by scanning the contents of `.agents/` |
107
+ | `add <type> <name>` | Add a new artifact from a template (type is `rule`, `skill`, `workflow`, `agent`, `plan`, or `spec`) |
108
+ | `index [--no-fix]` | Regenerate `AGENTS.md` by scanning `.agents/`. Backfills fixable skill frontmatter first (`--no-fix` skips the backfill) |
109
+ | `lint [skills] [--fix]` | Validate SKILL.md frontmatter against [Claude's skill authoring rules](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices); `--fix` amends fixable findings in place |
100
110
  | `clean` | Remove all synced symlinks and empty target directories (does not remove `.agents/`) |
101
- | `fix [type]` | Migrate legacy dirs into `.agents/`, convert flat skill files to directory layout, and repair broken symlinks. Type: `skills`, `rules`, `workflows`, or `all` (default) |
111
+ | `fix [type]` | Migrate legacy dirs into `.agents/`, convert flat skill files to directory layout, and repair broken symlinks. Type: any bucket dir, or `all` (default) |
112
+ | `promote <type> <name>` | Copy an artifact from the project's `.agents/` to the user-level global store (`~/.agents/`) |
113
+ | `global init` | Initialize the global `~/.agents/` store |
114
+ | `global sync` | Fan the global store out to each tool's user-level config dir with semantic-aware routing |
115
+ | `global status` | Show per-artifact sync state across global tool dirs |
116
+ | `global clean` | Remove global symlinks/concat files owned by sync-agents |
102
117
 
103
118
  ## Options
104
119
 
@@ -111,6 +126,8 @@ AGENTS.md is also symlinked to CLAUDE.md so that Claude reads the index natively
111
126
  | `--dry-run` | Show what would be done without making changes |
112
127
  | `--force` | Overwrite existing files and symlinks |
113
128
  | `--no-clobber` | (fix only) Skip items that already exist in `.agents/` instead of merging |
129
+ | `--fix` | (lint only) Amend fixable frontmatter findings in place |
130
+ | `--no-fix` | (index only) Skip the skill frontmatter backfill |
114
131
 
115
132
  ## Configuration
116
133
 
@@ -152,6 +169,22 @@ A reproducible demo is available in [`examples/fix/`](examples/fix/):
152
169
  bash examples/fix/run-demo.sh
153
170
  ```
154
171
 
172
+ ## Skill frontmatter (lint & backfill)
173
+
174
+ Claude discovers skills through their `SKILL.md` YAML frontmatter, with [published requirements](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices): `name` (≤64 chars, lowercase letters/numbers/hyphens, no reserved words) and `description` (non-empty, ≤1024 chars, third person, says what the skill does *and when to use it*).
175
+
176
+ `sync-agents lint` checks every skill against those rules; `lint --fix` mechanically amends what it can — injecting a missing frontmatter block, deriving `name` from the directory, deriving `description` from the first body paragraph, truncating overlong values, and stripping XML tags — while preserving all other frontmatter keys verbatim. Reserved-word names are reported but never auto-renamed.
177
+
178
+ `sync-agents index` runs the same backfill by default before regenerating `AGENTS.md`, so legacy skills upgrade themselves as part of the normal index cycle (`--no-fix` opts out). Unfixable findings warn but never fail indexing.
179
+
180
+ ```bash
181
+ # report compliance issues (exit non-zero on errors — CI-friendly)
182
+ sync-agents lint
183
+
184
+ # amend fixable findings in place
185
+ sync-agents lint --fix
186
+ ```
187
+
155
188
  ## Inheritance
156
189
 
157
190
  Projects can inherit agent rules from parent directories (org, team, global) using a convention-based approach. This enables hierarchical rule sharing without duplicating files.
@@ -311,6 +344,15 @@ sync-agents add skill debugging
311
344
  # Add a new workflow
312
345
  sync-agents add workflow deploy
313
346
 
347
+ # Add a Claude subagent / a plan / a spec (creates the bucket on demand)
348
+ sync-agents add agent reviewer
349
+ sync-agents add plan q3-roadmap
350
+ sync-agents add spec sso-login
351
+
352
+ # Validate + upgrade skill frontmatter
353
+ sync-agents lint
354
+ sync-agents lint --fix
355
+
314
356
  # Sync to all targets (.claude/ and .windsurf/)
315
357
  sync-agents sync
316
358
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickhouse-tech/sync-agents",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Simple scripts to DRY up common agent interactions across multiple LLM providers.",
5
5
  "keywords": [
6
6
  "agents",
@@ -26,11 +26,11 @@
26
26
  "bin/sync-agents.js"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@brickhouse-tech/sync-agents-darwin-arm64": "0.3.4",
30
- "@brickhouse-tech/sync-agents-darwin-x64": "0.3.4",
31
- "@brickhouse-tech/sync-agents-linux-arm64": "0.3.4",
32
- "@brickhouse-tech/sync-agents-linux-x64": "0.3.4",
33
- "@brickhouse-tech/sync-agents-win32-x64": "0.3.4"
29
+ "@brickhouse-tech/sync-agents-darwin-arm64": "0.3.5",
30
+ "@brickhouse-tech/sync-agents-darwin-x64": "0.3.5",
31
+ "@brickhouse-tech/sync-agents-linux-arm64": "0.3.5",
32
+ "@brickhouse-tech/sync-agents-linux-x64": "0.3.5",
33
+ "@brickhouse-tech/sync-agents-win32-x64": "0.3.5"
34
34
  },
35
35
  "overrides": {
36
36
  "file-type": ">=22",