@gobing-ai/superskill 0.1.3 → 0.1.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.
package/README.md CHANGED
@@ -4,185 +4,161 @@ Multi-agent skill, command, subagent, hook, and MCP config distribution and auth
4
4
 
5
5
  ## Why
6
6
 
7
- Coding agents (Claude Code, Codex, Pi, OpenCode, Antigravity, Hermes, ) each use different config formats for skills, slash commands, subagents, hooks, and MCP servers. Maintaining hand-synced copies across agents is error-prone and doesn't scale.
7
+ Coding agents (Claude Code, Codex, Pi, OpenCode, Antigravity, Hermes, omp) each use different config formats for skills, slash commands, subagents, hooks, and MCP servers. Maintaining hand-synced copies across agents is error-prone and doesn't scale.
8
8
 
9
9
  **superskill** solves this with two layers:
10
10
 
11
11
  1. **Distribution** — `superskill install` takes a Claude Code plugin as the single source of truth and distributes it to any target agent, using [rulesync](https://www.npmjs.com/package/rulesync) as the format-conversion engine.
12
- 2. **Authoring + quality** — Five type commands (`agent`, `skill`, `command`, `hook`, `magent`) provide scaffold → validate → evaluate → refine → evolve workflows with persistent quality data.
12
+ 2. **Authoring + quality** — Five type commands (`agent`, `skill`, `command`, `hook`, `magent`) provide scaffold → validate → evaluate → refine → evolve workflows with persistent quality data in SQLite.
13
13
 
14
- ## Supported targets
15
-
16
- | Target | Engine | Notes |
17
- |--------|--------|-------|
18
- | `claude` | Direct marketplace install | Source of truth |
19
- | `codex` | rulesync | `~/.agents/skills/` |
20
- | `pi` | rulesync | Subagents → Pi native agent format |
21
- | `omp` | superskill (copy) | Pi variant with custom root and binary (uses `pi` rulesync surrogate) |
22
- | `opencode` | rulesync | `~/.agents/skills/` |
23
- | `antigravity-cli` | rulesync | `~/.gemini/antigravity-cli/skills/` |
24
- | `antigravity-ide` | rulesync | `~/.gemini/config/skills/` |
25
- | `hermes` | superskill (copy) | `~/.hermes/skills/` (uses `opencode` rulesync surrogate) |
26
-
27
- **Deprecated:** Gemini CLI, old unified Antigravity.
14
+ ## Install
28
15
 
29
- ## Quick start
16
+ ```bash
17
+ npm i -g @gobing-ai/superskill
30
18
 
31
- ### Prerequisites
19
+ # or go with bun
20
+ bun add -g @gobing-ai/superskill
21
+ ```
32
22
 
33
- - [Bun](https://bun.sh/) ≥ 1.3.14
34
- - [proto](https://moonrepo.dev/proto) (optional — pinned versions in `.prototools`)
23
+ From source (contributors):
35
24
 
36
25
  ```bash
37
- # Install pinned tool versions (optional)
38
- proto use
39
-
40
- # Install dependencies
26
+ proto use # install pinned tool versions (Bun, etc.)
41
27
  bun install
28
+ bun run build
29
+ cd apps/cli && bun link
42
30
  ```
43
31
 
44
- ### Run the CLI (development)
32
+ Requires [Bun](https://bun.sh/) 1.3.14. See [`docs/help/installation.md`](docs/help/installation.md) for details and troubleshooting.
33
+
34
+ ## Quick start
45
35
 
46
36
  ```bash
47
- # Via workspace filter
48
- bun run dev
37
+ # Distribute a plugin to every supported target
38
+ superskill install my-plugin --targets all
49
39
 
50
- # Or directly
51
- bun run apps/cli/src/index.ts --help
52
- ```
40
+ # Author a skill: scaffold → validate → evaluate → refine
41
+ superskill skill scaffold my-skill --description "Deploy a Cloudflare Worker"
42
+ superskill skill validate my-skill
43
+ superskill skill evaluate my-skill --save
44
+ superskill skill refine my-skill --auto
53
45
 
54
- ### Build a standalone binary
46
+ # Package a skill for distribution, or merge skills
47
+ superskill skill package my-skill
48
+ superskill skill migrate ./source-skill-1 ./source-skill-2 ./dest-skill
55
49
 
56
- ```bash
57
- bun run build
58
- # Output: dist/cli/superskill
50
+ # Emit a hook to a single target agent
51
+ superskill hook emit my-hook --target pi
59
52
  ```
60
53
 
54
+ Full walkthrough: [`docs/help/quick_start.md`](docs/help/quick_start.md).
55
+
61
56
  ## Commands
62
57
 
63
- ### `superskill install` distribute a plugin to target agents
58
+ | Command | What it does | Docs |
59
+ |---------|--------------|------|
60
+ | `install` | Distribute a plugin's skills, commands, subagents, hooks, MCP to target agents | [`cmd_install.md`](docs/help/cmd_install.md) |
61
+ | `agent` | Manage subagent definitions (scaffold/validate/evaluate/refine/evolve) | [`cmd_agent.md`](docs/help/cmd_agent.md) |
62
+ | `skill` | Manage skill definitions (+ `package`, `migrate`) | [`cmd_skill.md`](docs/help/cmd_skill.md) |
63
+ | `command` | Manage slash command definitions | [`cmd_command.md`](docs/help/cmd_command.md) |
64
+ | `hook` | Manage hook definitions (+ `emit`) | [`cmd_hook.md`](docs/help/cmd_hook.md) |
65
+ | `magent` | Manage main-agent configurations | [`cmd_magent.md`](docs/help/cmd_magent.md) |
66
+
67
+ The five type commands share a common five-operation lifecycle (scaffold → validate → evaluate → refine → evolve) with type-specific quality dimensions and rubrics. Each command doc includes usage, architecture diagrams, sequence diagrams, and source-file references.
64
68
 
65
- Install a Claude Code plugin's skills, commands, subagents, hooks, and MCP config to target coding agents.
69
+ **Help docs index:** [`docs/help/index.md`](docs/help/index.md)
70
+
71
+ ### Operation lifecycle
66
72
 
67
73
  ```
68
- superskill install [options] <plugin>
74
+ scaffold validate → evaluate → refine → evolve
75
+ ↑ │
76
+ └─── longitudinal ───────┘
69
77
  ```
70
78
 
71
- | Argument / Option | Description | Default |
72
- |-------------------|-------------|---------|
73
- | `<plugin>` | Plugin name to install (required) | |
74
- | `--marketplace <path>` | Path to `.claude-plugin/marketplace.json` or its containing directory | CWD's `.claude-plugin/` |
75
- | `--targets <list>` | Comma-separated target agents, or `all` | all configured |
76
- | `--no-global` | Install to project-level instead of user-level global directories | `false` |
77
- | `--dry-run` | Preview without writing files | `false` |
78
- | `--verbose` | Print each step and file copy | `false` |
79
+ | Operation | Purpose | Quality gate |
80
+ |-----------|---------|-------------|
81
+ | `scaffold` | Create new entity from template | Structure validation |
82
+ | `validate` | Check structure and frontmatter | Pre-check spur rules |
83
+ | `evaluate` | Score quality across dimensions | Rubric-weighted scoring (Scorer persona) |
84
+ | `refine` | Apply low-risk fixes automatically | Fix classification (auto-apply / suggest / flag) |
85
+ | `evolve` | Propose longitudinal improvements | Double-loop gate (Author → Skeptic → Judge) |
86
+
87
+ Extra operations by type:
88
+
89
+ | Type | Extra operation | What it does |
90
+ |------|----------------|-------------|
91
+ | `skill` | `package` | Bundle a skill + companion files into a distributable archive |
92
+ | `skill` | `migrate` | Merge one or more source skills into a destination skill |
93
+ | `hook` | `emit` | Emit a hook definition to a single target agent |
79
94
 
80
- **Examples:**
95
+ ## Quality system
96
+
97
+ ### Rubric-driven evaluation
98
+
99
+ `evaluate` scores entities across type-specific quality dimensions using YAML rubrics. Ships with 5 package-default rubrics (`agent`, `skill`, `command`, `hook`, `magent`) — load custom ones with `--rubric <path>`.
81
100
 
82
101
  ```bash
83
- # Install a plugin to all supported targets
84
- superskill install rd3 --targets all
102
+ # Heuristic evaluation (built-in checks)
103
+ superskill skill evaluate my-skill --save
85
104
 
86
- # Install to specific targets only
87
- superskill install rd3 --targets codex,pi,antigravity-cli
105
+ # Rubric evaluation emit scoring brief for an external model
106
+ superskill skill evaluate my-skill --rubric --json > scoring-brief.json
88
107
 
89
- # Preview what would be written without touching the filesystem
90
- superskill install rd3 --targets all --dry-run
108
+ # Ingest scored result and persist
109
+ superskill skill evaluate my-skill --ingest scored-result.json --save
91
110
  ```
92
111
 
93
- ---
112
+ ### Two-call seam (Scorer / Author / Skeptic / Judge)
94
113
 
95
- ### Type Commands`agent`, `skill`, `command`, `hook`, `magent`
114
+ The CLI never scores or generates inline. Quality operations drive four personas via a two-call seam the CLI emits envelopes, personas process offline, the CLI ingests results.
96
115
 
97
- Five type commands manage agent-facing resources:
116
+ | Persona | Role | Input | Output |
117
+ |---------|------|-------|--------|
118
+ | **Scorer** | Rubric judge | Envelope from `evaluate --rubric --json` | `{ rubric_version, dimensions: { score, note } }` |
119
+ | **Author** | Rewriter | Envelope from `evolve --propose-only --json` | `ProposedChange[]` with `anchor_hash` |
120
+ | **Skeptic** | Refuter | Proposal + verbatim goal anchor | `{ ok, violations[] }` |
121
+ | **Judge** | Tournament selector | Multiple candidate proposals | Winning proposal ID |
98
122
 
99
- | Command | Description |
100
- |---------|-------------|
101
- | `superskill agent` | Manage subagent definitions |
102
- | `superskill skill` | Manage skill definitions |
103
- | `superskill command` | Manage slash command definitions |
104
- | `superskill hook` | Manage hook definitions |
105
- | `superskill magent` | Manage main-agent configurations |
123
+ ### Double-loop gate for `evolve`
106
124
 
107
- Each type command supports the following five operations:
125
+ `evolve --ingest <file>` applies authored proposals through a four-gate quality control:
108
126
 
109
- #### 1. `scaffold`Create a new file from templates
110
- ```bash
111
- superskill <type> scaffold <name> [options]
112
- ```
113
- * **Options:**
114
- * `--description <text>`: Set description frontmatter.
115
- * `--target <agent>`: Target agent format.
116
- * `--output <dir>`: Target directory for the output file.
117
- * `--force`: Overwrite existing files.
127
+ 1. **Deterministic validate** 0 errors required
128
+ 2. **Δ-margin** — score must improve by ≥ `--margin` (default 0.05)
129
+ 3. **Anchor hash** goal anchor unchanged (hash-gated)
130
+ 4. **Skeptic review** — regressive merges rejected and restored
118
131
 
119
- #### 2. `validate` Run schema and compliance check
120
- ```bash
121
- superskill <type> validate <nameOrPath> [options]
122
- ```
123
- * **Options:**
124
- * `--target <agent>`: Target agent to validate format compliance.
125
- * `--strict`: Enable optional/warning-level checks.
126
- * `--json`: Output findings in JSON format.
132
+ Version-aware trends partition by `rubric_version`, preventing false regression signals when rubrics are updated.
127
133
 
128
- #### 3. `evaluate` — Score content against 5 quality dimensions
129
- ```bash
130
- superskill <type> evaluate <nameOrPath> [options]
131
- ```
132
- * **Options:**
133
- * `--target <agent>`: Target agent formatting rules.
134
- * `--save`: Save report to SQLite database.
135
- * `--json`: Output report in JSON format.
134
+ ## Supported targets
136
135
 
137
- #### 4. `refine` Run automated fixes and suggestions
138
- ```bash
139
- superskill <type> refine <nameOrPath> [options]
140
- ```
141
- * **Options:**
142
- * `--target <agent>`: Target agent formatting rules.
143
- * `--auto`: Apply automatic fixes without confirmation.
144
- * `--save`: Save post-remediation report to SQLite database.
136
+ | Target | Engine | Output location |
137
+ |--------|--------|-----------------|
138
+ | `claude` | Direct `claude plugin install` | Claude Code marketplace |
139
+ | `codex` | rulesync | `~/.agents/skills/` |
140
+ | `pi` | rulesync + superskill hook shim | Pi native format |
141
+ | `omp` | superskill copy (via `pi` surrogate) | `~/.omp/agent/skills/` |
142
+ | `opencode` | rulesync | `~/.agents/skills/` |
143
+ | `antigravity-cli` | rulesync | `~/.gemini/antigravity-cli/skills/` |
144
+ | `antigravity-ide` | rulesync | `~/.gemini/config/skills/` |
145
+ | `hermes` | superskill copy (via `opencode` surrogate) | `~/.hermes/skills/` |
145
146
 
146
- #### 5. `evolve` — Apply longitudinal improvements from evaluation history
147
- ```bash
148
- superskill <type> evolve <name> [options]
149
- ```
150
- * **Options:**
151
- * `--target <agent>`: Target agent formatting rules.
152
- * `--from <timestamp>`: Baseline evaluation window.
153
- * `--proposeOnly`: Propose modifications and save as draft without applying.
154
- * `--accept <proposal_id>`: Accept and apply a specific draft proposal.
155
- * `--reject <proposal_id>`: Reject a specific draft proposal.
147
+ Since ts-ai-runner 0.3.21, `omp`, `hermes`, and `antigravity-cli` are canonical `AgentName` values slash-command dialect translation maps 1:1. Only `antigravity-ide` still bridges through `opencode`.
156
148
 
157
- ---
149
+ ## Bundled `cc` plugin
158
150
 
159
- ## Project structure
151
+ superskill ships with a Claude Code plugin at [`plugins/cc/`](plugins/cc/) (marketplace name: `cc`, version `0.1.1`) that demonstrates the full authoring lifecycle and provides the meta-agent skills the expert personas reference:
160
152
 
161
- ```
162
- apps/
163
- cli/ # Commander-based CLI (the binary)
164
- src/
165
- commands/ # CLI command registration (install, type commands)
166
- pipeline/ # Conversion stages (pure functions)
167
- content/ # Frontmatter parse/edit, name resolution
168
- operations/ # scaffold, validate, evaluate, refine, evolve logic
169
- quality/ # Dimension definitions + per-type evaluators
170
- store/ # SQLite via @gobing-ai/ts-db
171
- templates/ # Default templates shipped with npm
172
- targets.ts # Target enum + mapping tables
173
- config.ts # superskill.jsonc schema + loader
174
- marketplace.ts # Marketplace manifest parser + resolver
175
- mapper.ts # Plugin → .rulesync/ canonical layout
176
- rulesync.ts # Thin wrapper around rulesync.generate()
177
- cli.ts # Commander program setup
178
- index.ts # Entry point
179
- tests/ # bun:test suites
180
- packages/ # Shared workspace packages (Bun workspaces)
181
- tooling/
182
- typescript/ # Shared tsconfig presets
183
- docs/ # Authoritative project documentation (00–05, 99)
184
- vendors/ # Reference-only vendored source (do not modify)
185
- ```
153
+ | Entity | Count | Purpose |
154
+ |--------|-------|---------|
155
+ | **skills** | 6 | `anti-hallucination`, `cc-agents`, `cc-commands`, `cc-hooks`, `cc-magents`, `cc-skills` — domain knowledge for each entity type |
156
+ | **commands** | 16 | 4 operations × 4 entity types — thin slash-command wrappers that delegate to skills |
157
+ | **agents** | 5 | `expert-agent`, `expert-command`, `expert-hook`, `expert-magent`, `expert-skill` — specialist subagents that route to skills |
158
+ | **hooks** | 1 | `Stop` hook running the anti-hallucination guard |
159
+ | **scripts** | 3 | `ah_guard.ts`, `validate_response.ts`, `logger.ts` — deterministic enforcement for the anti-hallucination protocol |
160
+
161
+ The plugin follows a three-tier delegation pattern: **Commands/Agents → Skills → `superskill` CLI**. See [`plugins/cc/README.md`](plugins/cc/README.md) for the full entity design and relationship diagram.
186
162
 
187
163
  ## Development
188
164
 
@@ -196,10 +172,21 @@ vendors/ # Reference-only vendored source (do not modify)
196
172
  | Lint + format | Biome 2.4.16 |
197
173
  | Test runner | `bun:test` |
198
174
  | Format conversion | rulesync (npm) |
175
+ | Quality store | SQLite via `@gobing-ai/ts-db` |
176
+ | Constraint rules | Spur (`spur rule run`) |
199
177
  | Git hooks | Lefthook |
200
178
  | Conventional commits | cocogitto (`cog`) |
201
179
  | Tool versions | proto (`.prototools`) |
202
180
 
181
+ ### Workspace layout
182
+
183
+ ```
184
+ apps/cli/ # Commander-based CLI entry (the binary); imports @gobing-ai/superskill-core
185
+ packages/core/ # reusable domain logic and no-app operation APIs
186
+ tooling/typescript/ # shared tsconfig presets
187
+ plugins/cc/ # bundled Claude Code plugin
188
+ ```
189
+
203
190
  ### Commands
204
191
 
205
192
  ```bash
@@ -210,6 +197,7 @@ bun run test # bun test with coverage
210
197
  bun run build # compile to standalone binary
211
198
  bun run dev # watch mode
212
199
  bun run check # lint + test (CI gate)
200
+ bun run spur-check # lint + pre-check rules + test + post-check rules
213
201
  ```
214
202
 
215
203
  ### Verification gate
@@ -220,16 +208,11 @@ All must pass before a change is considered done:
220
208
  2. `bun run test` — all tests pass, no `.skip` or commented-out tests. Coverage ≥ 90% lines + functions.
221
209
  3. `bun run build` — standalone binary compiles.
222
210
  4. `git status` — only intentional changes.
211
+ 5. `bun run spur-check` — pre-check rules (22) + post-check rules (coverage-gate + tsdoc-export) all green.
223
212
 
224
213
  ### Code style
225
214
 
226
- Enforced by [biome.json](biome.json):
227
-
228
- - 4-space indent, 120-char line width
229
- - Single quotes, semicolons always, trailing commas everywhere
230
- - `interface` for object shapes, `type` for unions/intersections
231
- - `any` is an error — narrow the type or justify with `// biome-ignore`
232
- - Workspace imports use `@<scope>/*` aliases, never deep relative paths
215
+ Enforced by [biome.json](biome.json): 4-space indent, 120-char width, single quotes, semicolons, trailing commas. `interface` for object shapes, `type` for unions. `any` is an error. Workspace imports use `@<scope>/*` aliases.
233
216
 
234
217
  ### Commits
235
218
 
@@ -237,6 +220,10 @@ Enforced by [biome.json](biome.json):
237
220
 
238
221
  ## Documentation
239
222
 
223
+ **Help docs** (usage + implementation diagrams): [`docs/help/`](docs/help/index.md)
224
+
225
+ **Authoritative project docs:**
226
+
240
227
  | Doc | Covers |
241
228
  |-----|--------|
242
229
  | [00_ADR](docs/00_ADR.md) | Architecture decisions (authoritative) |
@@ -250,4 +237,3 @@ Enforced by [biome.json](biome.json):
250
237
  ## License
251
238
 
252
239
  [Apache 2.0](LICENSE)
253
-