@ryanreh99/skills-sync 1.0.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 (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -0
  3. package/dist/assets/contracts/build/bundle.schema.json +76 -0
  4. package/dist/assets/contracts/inputs/config.schema.json +13 -0
  5. package/dist/assets/contracts/inputs/mcp-servers.schema.json +56 -0
  6. package/dist/assets/contracts/inputs/pack-manifest.schema.json +33 -0
  7. package/dist/assets/contracts/inputs/pack-sources.schema.json +47 -0
  8. package/dist/assets/contracts/inputs/profile.schema.json +21 -0
  9. package/dist/assets/contracts/inputs/upstreams.schema.json +45 -0
  10. package/dist/assets/contracts/runtime/targets.schema.json +120 -0
  11. package/dist/assets/contracts/state/upstreams-lock.schema.json +38 -0
  12. package/dist/assets/manifests/targets.linux.json +27 -0
  13. package/dist/assets/manifests/targets.macos.json +27 -0
  14. package/dist/assets/manifests/targets.windows.json +27 -0
  15. package/dist/assets/seed/config.json +3 -0
  16. package/dist/assets/seed/packs/personal/mcp/servers.json +20 -0
  17. package/dist/assets/seed/packs/personal/pack.json +7 -0
  18. package/dist/assets/seed/packs/personal/sources.json +31 -0
  19. package/dist/assets/seed/profiles/personal.json +4 -0
  20. package/dist/assets/seed/upstreams.json +23 -0
  21. package/dist/cli.js +532 -0
  22. package/dist/index.js +27 -0
  23. package/dist/lib/adapters/claude.js +49 -0
  24. package/dist/lib/adapters/codex.js +239 -0
  25. package/dist/lib/adapters/common.js +114 -0
  26. package/dist/lib/adapters/copilot.js +53 -0
  27. package/dist/lib/adapters/cursor.js +53 -0
  28. package/dist/lib/adapters/gemini.js +52 -0
  29. package/dist/lib/agents.js +888 -0
  30. package/dist/lib/bindings.js +510 -0
  31. package/dist/lib/build.js +190 -0
  32. package/dist/lib/bundle.js +165 -0
  33. package/dist/lib/config.js +324 -0
  34. package/dist/lib/core.js +447 -0
  35. package/dist/lib/detect.js +56 -0
  36. package/dist/lib/doctor.js +504 -0
  37. package/dist/lib/init.js +292 -0
  38. package/dist/lib/inventory.js +235 -0
  39. package/dist/lib/manage.js +463 -0
  40. package/dist/lib/mcp-config.js +264 -0
  41. package/dist/lib/profile-transfer.js +221 -0
  42. package/dist/lib/upstreams.js +782 -0
  43. package/docs/agent-storage-map.md +153 -0
  44. package/docs/architecture.md +117 -0
  45. package/docs/changelog.md +12 -0
  46. package/docs/commands.md +94 -0
  47. package/docs/contracts.md +112 -0
  48. package/docs/homebrew.md +46 -0
  49. package/docs/quickstart.md +14 -0
  50. package/docs/roadmap.md +5 -0
  51. package/docs/security.md +32 -0
  52. package/docs/user-guide.md +257 -0
  53. package/package.json +61 -0
@@ -0,0 +1,153 @@
1
+ # Agent Storage Map (Validated)
2
+
3
+ This document records the current source-of-truth findings for runtime storage and config behavior for:
4
+ - Codex CLI (OpenAI)
5
+ - Claude Code (Anthropic)
6
+ - Cursor
7
+ - Gemini CLI
8
+
9
+ If a field is not clearly documented in official docs, it is marked **UNVERIFIED** and `skills-sync` uses a conservative default.
10
+
11
+ ## Codex CLI (OpenAI)
12
+
13
+ ### Config and MCP
14
+ - User config: `~/.codex/config.toml` (Windows equivalent: `%USERPROFILE%\\.codex\\config.toml`)
15
+ - Project config: `.codex/config.toml` (trusted projects)
16
+ - MCP schema: TOML tables under `[mcp_servers.<name>]` with keys like:
17
+ - `transport`
18
+ - `command`, `args`, `env`, `env_vars`, `cwd` (stdio)
19
+ - `url`, `bearer_token_env_var`, `http_headers`, `env_http_headers` (HTTP)
20
+
21
+ ### Skills / discovery
22
+ - Codex skills docs describe discovery from `.agents/skills` and other scopes.
23
+ - `SKILL.md`-based folders are supported.
24
+
25
+ ### Precedence and env vars
26
+ - Docs show user + project config and per-run overrides (`-c/--config`).
27
+ - `CODEX_HOME` controls Codex home location.
28
+
29
+ ### Stability
30
+ - MCP and skills are documented as first-class features (treated as stable for this repo).
31
+
32
+ ### Sources
33
+ - https://developers.openai.com/codex/config-advanced
34
+ - https://developers.openai.com/codex/mcp
35
+ - https://developers.openai.com/codex/skills
36
+
37
+ ---
38
+
39
+ ## Claude Code (Anthropic)
40
+
41
+ ### Config and MCP
42
+ - Settings files:
43
+ - User: `~/.claude/settings.json`
44
+ - Project: `.claude/settings.json`
45
+ - Local project override: `.claude/settings.local.json`
46
+ - MCP config locations documented as:
47
+ - Main Claude config (primary): `~/.claude.json`
48
+ - Dedicated MCP file: `~/.claude/mcp_servers.json`
49
+ - Project scope: `.mcp.json`
50
+ - Precedence: when both user-level files are present, the main `~/.claude.json` takes priority over `~/.claude/mcp_servers.json`.
51
+
52
+ ### Skills / sub-agents discovery
53
+ - Sub-agents:
54
+ - User: `~/.claude/agents/`
55
+ - Project: `.claude/agents/`
56
+ - `~/.claude/skills` / `.claude/skills` are **UNVERIFIED** in Anthropic docs.
57
+ - This repo uses `.claude/skills` as a conservative compatibility path.
58
+
59
+ ### Precedence and env vars
60
+ - Settings precedence is documented (managed > user/project tiers).
61
+ - `CLAUDE_CONFIG_DIR` is documented for config/data location control.
62
+
63
+ ### Stability
64
+ - Claude settings + MCP are documented.
65
+ - Sub-agents are documented as primary feature.
66
+
67
+ ### Sources
68
+ - https://docs.anthropic.com/en/docs/claude-code/settings
69
+ - https://docs.anthropic.com/en/docs/claude-code/mcp
70
+ - https://docs.anthropic.com/en/docs/claude-code/sub-agents
71
+
72
+ ---
73
+
74
+ ## Cursor
75
+
76
+ ### Config and MCP
77
+ - MCP config:
78
+ - User: `~/.cursor/mcp.json`
79
+ - Project: `.cursor/mcp.json`
80
+ - MCP schema uses JSON `mcpServers` objects with keys like `command`, `args`, `env`.
81
+
82
+ ### Skills / discovery
83
+ - Cursor-native locations:
84
+ - `.agents/skills/`
85
+ - `.cursor/skills/`
86
+ - `~/.agents/skills/`
87
+ - `~/.cursor/skills/`
88
+ - Compatibility loading (officially documented):
89
+ - `.claude/skills/`
90
+ - `.codex/skills/`
91
+ - `~/.claude/skills/`
92
+ - `~/.codex/skills/`
93
+ - Discovery is **top-level only** (same constraint as Gemini). Nested skill namespaces require flat aliases at the skills directory root for reliable detection.
94
+
95
+ ### Precedence and env vars
96
+ - Project vs global MCP files are documented.
97
+ - Cursor CLI config has documented envs:
98
+ - `CURSOR_CONFIG_DIR`
99
+ - `XDG_CONFIG_HOME` (Linux/BSD)
100
+ - MCP-specific env-override variable for config file location is **UNVERIFIED**.
101
+
102
+ ### Stability
103
+ - MCP and skills pages are official docs pages.
104
+
105
+ ### Sources
106
+ - https://cursor.com/docs/context/mcp
107
+ - https://cursor.com/docs/context/skills
108
+ - https://cursor.com/docs/context/rules
109
+ - https://cursor.com/docs/cli/reference/configuration
110
+
111
+ ---
112
+
113
+ ## Gemini CLI (Google)
114
+
115
+ ### Config and MCP
116
+ - Settings files:
117
+ - User: `~/.gemini/settings.json`
118
+ - Project: `.gemini/settings.json`
119
+ - MCP config lives in `settings.json` under:
120
+ - `mcpServers` (server definitions)
121
+ - `mcp` (global MCP behavior settings)
122
+
123
+ ### Skills / sub-agents discovery
124
+ - Skills discovery:
125
+ - `.gemini/skills/` and alias `.agents/skills/` (project)
126
+ - `~/.gemini/skills/` and alias `~/.agents/skills/` (user)
127
+ - discovery is path-local (`SKILL.md` or `*/SKILL.md`), so nested namespace trees require flatten/aliasing for reliable detection.
128
+ - documented precedence includes workspace over user over extension.
129
+ - Custom agents/subagents:
130
+ - docs show `.gemini/agents/*.md` and `~/.gemini/agents/*.md`
131
+ - subagents are explicitly marked experimental.
132
+
133
+ ### Precedence and env vars
134
+ - Settings precedence is explicitly documented.
135
+ - `GEMINI_CLI_HOME` controls user config/storage root.
136
+
137
+ ### Stability
138
+ - Settings/MCP/skills are documented.
139
+ - Subagents/agent-mode area includes experimental labeling.
140
+
141
+ ### Sources
142
+ - https://geminicli.com/docs/reference/configuration
143
+ - https://geminicli.com/docs/tools/mcp-server/
144
+ - https://geminicli.com/docs/cli/skills/
145
+ - https://geminicli.com/docs/core/subagents/
146
+
147
+ ---
148
+
149
+ ## Conservative defaults used by this repo
150
+
151
+ - `apply` manages **user-level targets only** by default.
152
+ - Cursor adapter uses copy+aliases projection (same as Gemini) — skills are copied to `dist/.cursor/skills` with flat `vendor__*` aliases for any nested skill paths, then bound to `~/.cursor/skills` at apply time.
153
+ - When schema/path behavior is ambiguous, docs are preserved in this file and implementation avoids destructive assumptions.
@@ -0,0 +1,117 @@
1
+ # Architecture
2
+
3
+ ## Design Principle
4
+ - Internal model is stable.
5
+ - External agent contracts are volatile.
6
+ - Adapters are thin and mechanical.
7
+
8
+ This repo keeps one canonical build artifact and projects to per-agent runtime shapes.
9
+
10
+ ## Pipeline
11
+ 1. Inputs in `workspace/`
12
+ 2. `build` creates canonical bundle + projections in `dist/`
13
+ 3. `apply` binds skills dirs and merges managed MCP entries into runtime targets
14
+ 4. `unlink` reverses managed bindings/entries
15
+
16
+ ## Canonical Artifact
17
+ `~/.skills-sync/internal/common/` is the source of truth:
18
+ - `bundle.json`
19
+ - `skills/`
20
+ - `mcp.json`
21
+
22
+ ## Projections
23
+ Built from `common`:
24
+ - `dist/common/skills`, `dist/common/mcp.json`
25
+ - `dist/.codex/*`, `dist/.claude/*`, `dist/.cursor/*`, `dist/.copilot/*`, `dist/.gemini/*`
26
+
27
+ ## Internal Modules
28
+ - Bundle builder: `internal/scripts/lib/bundle.mjs`
29
+ - Build orchestration: `internal/scripts/lib/build.mjs`
30
+ - Adapters:
31
+ - `internal/scripts/lib/adapters/codex.mjs`
32
+ - `internal/scripts/lib/adapters/claude.mjs`
33
+ - `internal/scripts/lib/adapters/cursor.mjs`
34
+ - `internal/scripts/lib/adapters/copilot.mjs`
35
+ - `internal/scripts/lib/adapters/gemini.mjs`
36
+ - `internal/scripts/lib/adapters/common.mjs`
37
+ - Binding/apply/unlink: `internal/scripts/lib/bindings.mjs`
38
+ - MCP managed merge: `internal/scripts/lib/mcp-config.mjs`
39
+ - Validation: `internal/scripts/lib/doctor.mjs`
40
+
41
+ ## Runtime Write Policy
42
+ - Skills: linked (Windows junction/symlink, macOS symlink).
43
+ - MCP: merged under managed namespace `skills-sync__*`.
44
+ - Unmanaged entries are preserved.
45
+
46
+ ## Link Behavior
47
+ - Windows directories: junction, symlink fallback
48
+ - Windows files: hardlink, copy fallback
49
+ - macOS: symlink
50
+
51
+ ## Scope Defaults
52
+ - Apply targets user-level locations by default.
53
+ - Path contracts and verification notes live in:
54
+ - [agent-storage-map.md](agent-storage-map.md)
55
+
56
+ ## AI Contexts
57
+
58
+ `skills-sync` builds one canonical bundle and projects it to each agent runtime contract.
59
+
60
+ Canonical source:
61
+ - `~/.skills-sync/internal/common/skills`
62
+ - `~/.skills-sync/internal/common/mcp.json`
63
+ - `~/.skills-sync/internal/common/bundle.json`
64
+
65
+ ### Codex
66
+ - Projection:
67
+ - `dist/.codex/skills`
68
+ - `dist/.codex/vendor_imports/skills`
69
+ - `dist/.codex/config.toml`
70
+ - Apply:
71
+ - skills dir binding
72
+ - managed MCP block in user config TOML (`skills-sync__*`)
73
+
74
+ ### Claude Code
75
+ - Projection:
76
+ - `dist/.claude/skills`
77
+ - `dist/.claude/mcp.json`
78
+ - Apply:
79
+ - skills dir binding
80
+ - managed MCP JSON entries under `mcpServers.skills-sync__*`
81
+
82
+ ### Cursor
83
+ - Projection:
84
+ - `dist/.cursor/skills` (includes top-level `vendor__*` aliases for discoverability)
85
+ - `dist/.cursor/mcp.json`
86
+ - Apply:
87
+ - skills dir binding
88
+ - managed MCP JSON entries under `mcpServers.skills-sync__*`
89
+ - Cursor skills docs note native + compatibility discovery paths:
90
+ - `.agents/skills`, `.cursor/skills`, `~/.agents/skills`, `~/.cursor/skills`
91
+ - `.claude/skills`, `.codex/skills`, `~/.claude/skills`, `~/.codex/skills`
92
+
93
+ ### Copilot
94
+ - Projection:
95
+ - `dist/.copilot/skills` (includes top-level `vendor__*` aliases for discoverability)
96
+ - `dist/.copilot/mcp-config.json`
97
+ - Apply:
98
+ - skills dir binding
99
+ - managed MCP JSON entries under `mcpServers.skills-sync__*`
100
+
101
+ ### Gemini CLI
102
+ - Projection:
103
+ - `dist/.gemini/skills` (includes top-level `vendor__*` aliases for discoverability)
104
+ - `dist/.gemini/vendor_imports/skills`
105
+ - `dist/.gemini/settings.json`
106
+ - Apply:
107
+ - skills dir binding
108
+ - managed MCP JSON entries under `mcpServers.skills-sync__*`
109
+ - aliases are required because Gemini skill discovery is path-local (`SKILL.md` or `*/SKILL.md`)
110
+
111
+ ## Important Behavior
112
+ - `build` regenerates all dist artifacts.
113
+ - During `build`, MCP projection policy is controlled by `canOverride` in target manifests:
114
+ - `true`: projection can be regenerated from canonical MCP
115
+ - `false`: projection is seeded from local config and MCP sections are updated in place
116
+ - `apply` consumes existing dist artifacts and updates runtime targets.
117
+ - `doctor` validates bundle, projections, state, and managed MCP presence.
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ ## Unreleased
6
+
7
+ - Added Copilot runtime target support:
8
+ - skills path: `~/.copilot/skills` (Windows: `%USERPROFILE%\\.copilot\\skills`)
9
+ - MCP config path: `~/.copilot/mcp-config.json` (Windows: `%USERPROFILE%\\.copilot\\mcp-config.json`)
10
+ - default target policy: `canOverride: true`
11
+ - Wired Copilot through build/apply/unlink/detect/doctor flows.
12
+ - Extended integration fixtures/tests to validate Copilot behavior.
@@ -0,0 +1,94 @@
1
+ # Commands
2
+
3
+ Use either:
4
+ - `npm run <script> -- <args>`
5
+ - `node internal/scripts/skills-sync.mjs <command> <args>`
6
+
7
+ ## Command Surface
8
+ 1. `init [--seed]`
9
+ 2. `build [--profile <name>] [--lock=read|write|refresh]`
10
+ 3. `apply [--profile <name>] [--build] [--dry-run]`
11
+ 4. `doctor [--profile <name>]`
12
+ 5. `detect`
13
+ 6. `detect [--format text|json] [--agents <comma-list>]`
14
+ 7. `unlink [--dry-run]`
15
+ 8. `list upstreams [--format text|json]`
16
+ 9. `list skills [--upstream <id>] [--ref <ref>] [--profile <name>] [--format text|json]`
17
+ 10. `list upstream-content [--upstream <id>] [--ref <ref>] [--profile <name>] [--format text|json]`
18
+ 11. `list profiles [--format text|json]`
19
+ 12. `list everything [--format text|json]`
20
+ 13. `profile show [name] [--format text|json]`
21
+ 14. `profile add-skill <name> --upstream <id> --path <repoPath> [--ref <ref>] [--dest-prefix <prefix>]`
22
+ 15. `profile remove-skill <name> --upstream <id> --path <repoPath> [--ref <ref>] [--dest-prefix <prefix>]`
23
+ 16. `profile add-mcp <name> <server> (--command <command> [--args <arg...> | --arg <arg>...] [--env <KEY=VALUE...>] | --url <url>)`
24
+ 17. `profile remove-mcp <name> <server>`
25
+ 18. `profile export [name] [--output <path>]`
26
+ 19. `profile import <name> --input <path> [--replace]`
27
+ 20. `agent inventory [--agents <comma-list>] [--format text|json]`
28
+ 21. `agent drift [--profile <name>] [--agents <comma-list>] [--dry-run] [--format text|json]`
29
+ 22. `upstream add <id> --repo <url> [--default-ref <ref>] [--type git]`
30
+ 23. `upstream remove <id>`
31
+ 24. `search skills [--upstream <id>] [--ref <ref>] [--profile <name>] --query <text> [--format text|json]`
32
+ 25. `search skills [--upstream <id>] [--ref <ref>] [--profile <name>] --interactive`
33
+ 26. `use <name>`
34
+ 27. `current`
35
+ 28. `ls`
36
+ 29. `new <name>`
37
+ 30. `remove <name>`
38
+ 31. `help`
39
+
40
+ Unknown commands fail with:
41
+ `Unknown command. See: skills-sync help`
42
+
43
+ ## Notes
44
+ - `init`: scaffolds minimal workspace only (non-destructive).
45
+ - `init --seed`: backs up existing workspace and copies seed content (no build).
46
+ - `apply`: does not build unless `--build` is provided. If `--profile` is omitted, it uses the profile embedded in `~/.skills-sync/internal/common/bundle.json`.
47
+ - `apply --dry-run`: prints planned bind/config operations without touching files or state.
48
+ - `detect`: prints resolved target paths and support mode per agent.
49
+ - `detect --agents`: limits output to selected agents (for example: `codex,claude`).
50
+ - `doctor`: validates contracts, lock pins, dist projections, and bindings.
51
+ - `unlink --dry-run`: previews removals without deleting bindings or MCP entries.
52
+ - `list upstreams`: lists configured upstream repositories and default refs.
53
+ - `list skills`: lists all skills (path + title) available under `skills/**/SKILL.md`. If `--upstream` is omitted, it lists across profile-derived refs (or all upstream defaults when no profile is provided).
54
+ - `list upstream-content`: lists both skills and any discoverable upstream MCP manifests (`**/mcp/servers.json`) for selected upstream refs.
55
+ - `list profiles`: same profile listing as `ls`, with optional JSON output.
56
+ - `list everything`: prints every discovered profile plus its local/imported skills and MCP servers.
57
+ - `profile show [name]`: shows one profile's local skills, imported skills, and MCP servers (defaults to current profile if omitted).
58
+ - `profile add-skill` / `profile remove-skill`: edits `workspace/packs/<name>/sources.json` skill imports.
59
+ - `profile add-mcp` / `profile remove-mcp`: edits `workspace/packs/<name>/mcp/servers.json`. For add, provide exactly one of `--command` or `--url` (`--env` entries use `KEY=VALUE` format and apply to `--command` only). Use repeated `--arg` for dash-prefixed command args, for example `--arg --stdio`.
60
+ - `profile export`: exports profile pack config and local skill files to JSON for migration.
61
+ - `profile import`: imports exported profile config into local workspace.
62
+ - `agent inventory`: inspects installed skills and MCP servers per detected agent, including parse issues.
63
+ - `agent drift --dry-run`: compares profile-expected skills/MCP against installed agent state without mutating files.
64
+ - `agent drift`: reconciles drift by promoting detected extra MCP servers into the selected profile, then rebuilds and applies across detected agents before reporting final drift.
65
+ - `upstream add` / `upstream remove`: edits `workspace/upstreams.json`. Removing also prunes matching lock pins from `workspace/upstreams.lock.json`.
66
+ - `search skills` (non-interactive): filters skills by keyword matched case-insensitively against skill path and title.
67
+ - `search skills --interactive`: prompt-based search loop for ad-hoc exploration.
68
+ - `use <name>`: writes `{ "defaultProfile": "<name>" }` to `workspace/config.json`. After this, `--profile` can be omitted from `build`, `apply`, and `doctor`.
69
+ - `current`: prints the current default profile name from `workspace/config.json`.
70
+ - `ls`: lists all profiles found in `workspace/profiles/` and `internal/seed/profiles/`, marking the default with `->`.
71
+ - `new <name>`: scaffolds a new profile JSON and pack directory under `workspace/` (non-destructive).
72
+ - `remove <name>`: deletes `workspace/profiles/<name>.json` and clears the default if it matched. Pack directory is preserved.
73
+
74
+ ## Default Profile (`workspace/config.json`)
75
+ `--profile` is optional on `build`, `apply`, and `doctor`. When omitted, the CLI reads `defaultProfile` from `workspace/config.json`.
76
+
77
+ Set it once:
78
+ ```bash
79
+ skills-sync use personal
80
+ # or edit workspace/config.json directly:
81
+ # { "defaultProfile": "personal" }
82
+ ```
83
+
84
+ Then omit `--profile` everywhere:
85
+ ```bash
86
+ skills-sync build
87
+ skills-sync apply
88
+ skills-sync doctor
89
+ ```
90
+
91
+ ## Lock Modes (`build`)
92
+ - `write` (default): writes missing pins.
93
+ - `read`: never writes lockfile; fails when required pins are missing.
94
+ - `refresh`: refreshes pins for all refs used by the selected profile.
@@ -0,0 +1,112 @@
1
+ # Contracts
2
+
3
+ ## Inputs
4
+
5
+ ### Profile
6
+ Path:
7
+ - `workspace/profiles/<name>.json`
8
+
9
+ Schema:
10
+ - `internal/contracts/inputs/profile.schema.json`
11
+
12
+ Shape:
13
+ ```json
14
+ { "name": "personal", "packPath": "workspace/packs/personal" }
15
+ ```
16
+
17
+ ### Pack Manifest
18
+ Path:
19
+ - `<pack>/pack.json`
20
+
21
+ Schema:
22
+ - `internal/contracts/inputs/pack-manifest.schema.json`
23
+
24
+ ### Pack Sources
25
+ Path:
26
+ - `<pack>/sources.json`
27
+
28
+ Schema:
29
+ - `internal/contracts/inputs/pack-sources.schema.json`
30
+
31
+ Shape:
32
+ ```json
33
+ { "imports": [] }
34
+ ```
35
+
36
+ ### MCP Servers Input
37
+ Path:
38
+ - `<pack>/mcp/servers.json`
39
+
40
+ Schema:
41
+ - `internal/contracts/inputs/mcp-servers.schema.json`
42
+
43
+ Shape:
44
+ ```json
45
+ {
46
+ "servers": {
47
+ "stdio-server": { "command": "...", "args": [], "env": { "KEY": "VALUE" } },
48
+ "http-server": { "url": "https://example.com/mcp" }
49
+ }
50
+ }
51
+ ```
52
+
53
+ ### Upstreams + Lock
54
+ - `workspace/upstreams.json` (fallback `internal/starter/upstreams.json`)
55
+ - `workspace/upstreams.lock.json`
56
+
57
+ Schemas:
58
+ - `internal/contracts/inputs/upstreams.schema.json`
59
+ - `internal/contracts/state/upstreams-lock.schema.json`
60
+
61
+ ## Runtime Targets
62
+
63
+ Schema:
64
+ - `internal/contracts/runtime/targets.schema.json`
65
+
66
+ Required top-level keys:
67
+ - `codex`
68
+ - `claude`
69
+ - `cursor`
70
+ - `copilot`
71
+ - `gemini`
72
+
73
+ Per-tool target fields:
74
+ - `skillsDir`: runtime skills directory target
75
+ - `mcpConfig`: runtime MCP config target
76
+ - `canOverride` (boolean): build projection policy for MCP config
77
+ - `true`: dist MCP projection can be generated directly from canonical bundle
78
+ - `false`: build reads existing local config (if present) and only replaces MCP sections
79
+
80
+ ## Build Contract
81
+
82
+ Canonical artifact:
83
+ - `~/.skills-sync/internal/common/bundle.json`
84
+ - `~/.skills-sync/internal/common/skills/`
85
+ - `~/.skills-sync/internal/common/mcp.json`
86
+
87
+ Schema:
88
+ - `internal/contracts/build/bundle.schema.json`
89
+
90
+ `~/.skills-sync/internal/common` is authoritative.
91
+ All other `dist/*` paths are projections.
92
+
93
+ ## Projection Contract (Current)
94
+
95
+ Primary projections:
96
+ - `dist/common/*`
97
+ - `dist/.codex/*`
98
+ - `dist/.claude/*`
99
+ - `dist/.cursor/*`
100
+ - `dist/.copilot/*`
101
+ - `dist/.gemini/*`
102
+
103
+ ## Runtime Mutation Contract
104
+
105
+ `apply` behavior:
106
+ - skills directories are linked where supported
107
+ - MCP config is merged under `skills-sync__*` namespace
108
+ - unmanaged user entries are preserved
109
+
110
+ `unlink` behavior:
111
+ - removes managed links
112
+ - removes managed MCP namespace entries only
@@ -0,0 +1,46 @@
1
+ # Homebrew
2
+
3
+ ## Install (users)
4
+ Use this repository as a tap:
5
+
6
+ ```bash
7
+ brew tap ryanreh99/skills-sync
8
+ brew install ryanreh99/skills-sync/skills-sync
9
+ ```
10
+
11
+ ## Publish/Update (maintainers)
12
+ This formula installs a release tarball produced by `npm pack`, with bundled runtime dependencies.
13
+
14
+ 1. Bump `package.json` version.
15
+ 2. Run release checks:
16
+ ```bash
17
+ npm ci
18
+ npm run prepublishOnly
19
+ ```
20
+ 3. Build the tarball:
21
+ ```bash
22
+ npm pack
23
+ ```
24
+ Example output: `skills-sync-1.0.0.tgz`
25
+ 4. Regenerate the formula with the release URL and local tarball hash:
26
+ ```bash
27
+ npm run brew:formula -- \
28
+ --url https://github.com/ryanreh99/skills-sync/releases/download/v1.0.0/skills-sync-1.0.0.tgz \
29
+ --tarball ./skills-sync-1.0.0.tgz
30
+ ```
31
+ 5. Commit `Formula/skills-sync.rb` (and any version/changelog updates) to the repository.
32
+ 6. Create/publish GitHub release tag `v<version>`.
33
+ 7. Upload the same `skills-sync-<version>.tgz` file from step 3 to that release.
34
+ 8. Optionally publish to npm:
35
+ ```bash
36
+ npm publish
37
+ ```
38
+
39
+ If you already published to npm and want to generate directly from the npm tarball:
40
+
41
+ ```bash
42
+ npm run brew:formula
43
+ ```
44
+
45
+ The default URL for `npm run brew:formula` is:
46
+ `https://registry.npmjs.org/<name>/-/<name>-<version>.tgz`
@@ -0,0 +1,14 @@
1
+ # Quickstart
2
+
3
+ ## Minimal Setup
4
+ 1. `npm i -g @ryanreh99/skills-sync`
5
+ 2. `npx @ryanreh99/skills-sync`
6
+ 3. `skills-sync init --seed`
7
+ 4. `skills-sync use personal`
8
+ 5. `skills-sync build`
9
+ 6. `skills-sync apply`
10
+ 7. `skills-sync doctor`
11
+
12
+ ## Next
13
+ - Main guide: - [user-guide.md](user-guide.md)
14
+ - Full command reference: - [commands.md](commands.md)
@@ -0,0 +1,5 @@
1
+ # Future Plans
2
+
3
+ This document tracks planned roadmap items that are not implemented yet.
4
+
5
+ No pending roadmap items right now.
@@ -0,0 +1,32 @@
1
+ # Security Policy
2
+
3
+ ## Credential Handling
4
+
5
+ - Never commit tokens, secrets, credentials, or private endpoints to this repository.
6
+ - Keep real profile packs and machine-specific overrides in `workspace/` only.
7
+ - Keep upstream clone cache data in `upstreams_cache/` only.
8
+ - Store authentication material in environment variables consumed by MCP server commands.
9
+
10
+ ## Repository Safety Expectations
11
+
12
+ - `examples/` must remain secret-free.
13
+ - `manifests/` and `schemas/` must remain secret-free.
14
+ - `dist/`, `workspace/`, and `upstreams_cache/` are generated/local and ignored by git.
15
+
16
+ ## Prohibited Content
17
+
18
+ Do not commit any of the following:
19
+
20
+ - API keys or bearer tokens
21
+ - OAuth client secrets
22
+ - username/password credentials
23
+ - personal/private internal endpoints
24
+ - `.env` files containing sensitive data
25
+
26
+ ## Reporting
27
+
28
+ If a secret is committed accidentally:
29
+
30
+ 1. Revoke or rotate the secret immediately.
31
+ 2. Remove it from repository history.
32
+ 3. Re-run `doctor` and verify all examples/manifests remain clean.