argsbarg 7.0.5 → 7.0.7

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 (49) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/README.md +3 -3
  3. package/docs/README.md +1 -1
  4. package/docs/ai-skills.md +14 -59
  5. package/docs/bundled-docs.md +11 -15
  6. package/docs/cli-program.md +11 -12
  7. package/docs/configure.md +9 -11
  8. package/docs/output-schema.md +0 -1
  9. package/examples/full-example/AGENTS.md +3 -1
  10. package/examples/full-example/docs/README.md +1 -1
  11. package/examples/full-example/docs/http.md +1 -1
  12. package/examples/full-example/docs/mcp.md +1 -1
  13. package/examples/full-example/docs/openapi.json +1 -6
  14. package/examples/full-example/justfile +0 -1
  15. package/examples/full-example/{docs/skill.md → skills/full-example/SKILL.md} +10 -8
  16. package/examples/full-example/src/program.ts +0 -1
  17. package/examples/full-example-json/AGENTS.md +3 -1
  18. package/examples/full-example-json/docs/README.md +1 -1
  19. package/examples/full-example-json/docs/http.md +1 -1
  20. package/examples/full-example-json/docs/mcp.md +5 -5
  21. package/examples/full-example-json/docs/openapi.json +1 -6
  22. package/examples/full-example-json/justfile +0 -1
  23. package/examples/full-example-json/{docs/skill.md → skills/full-example-json/SKILL.md} +15 -13
  24. package/examples/full-example-json/src/program.ts +0 -1
  25. package/index.d.ts +5 -3
  26. package/package.json +1 -1
  27. package/src/builtins/builtins.test.ts +1 -22
  28. package/src/builtins/configure-copy.ts +4 -11
  29. package/src/builtins/presentation.ts +2 -5
  30. package/src/cli-tool/create.test.ts +1 -0
  31. package/src/cli-tool/create.ts +5 -1
  32. package/src/configure/artifacts/status.test.ts +5 -5
  33. package/src/configure/artifacts/target-effective.ts +1 -2
  34. package/src/configure/artifacts/target-skill.ts +9 -15
  35. package/src/configure/artifacts/targets/skill.ts +8 -1
  36. package/src/configure/artifacts/targets.test.ts +5 -5
  37. package/src/configure/configure.test.ts +4 -4
  38. package/src/core/parse.test.ts +1 -93
  39. package/src/core/types.ts +5 -3
  40. package/src/core/validate.ts +4 -2
  41. package/src/docs/builtin.ts +5 -3
  42. package/src/docs/cli-guide.ts +3 -3
  43. package/src/docs/docs.test.ts +3 -45
  44. package/src/docs/resolve.ts +5 -5
  45. package/src/docs/save.ts +52 -15
  46. package/src/help.test.ts +6 -7
  47. package/src/skill/generate.ts +32 -154
  48. package/src/skill/hint.ts +6 -32
  49. package/src/skill/install.ts +10 -31
package/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [7.0.7] - 2026-09-15
11
+
12
+ ### Removed
13
+
14
+ - **Removed all skill generation features** — completely removed the `docs skill` (and `docs skill --save`) built-in subcommands from the CLI runtime. Skill files are no longer generated from code or schemas. Skills are purely authored starter templates located at `skills/<app>/SKILL.md` (conforming to the open https://dotagentsprotocol.com standard), included with examples and scaffolded via `argsbarg create`. Removed skill bundle generation from `configure install` (uninstall continues to clean up legacy `~/.agents/skills/<key>/` directories). Deprecated `program.skill`.
15
+
16
+ ### Changed
17
+
18
+ - **Consumer AGENTS.md scoped to app authors** — adjusted instructions in `AGENTS.md` copy templates and consumer checkouts. Removed consumer-facing discovery instructions (`--help` discovery belongs in `SKILL.md` for end-user agents) and added guidance for authoring agents to maintain `skills/<key>/SKILL.md` when adding or modifying commands.
19
+ - **Omit skill from consumer docgen** — in consumer copy templates, `just docgen` omits skill generation so author customizations in `skills/<app>/SKILL.md` are not overwritten. Skills are included with examples and scaffolded via `argsbarg create`.
20
+
21
+ ## [7.0.6] - 2026-09-15
22
+
23
+ ### Changed
24
+
25
+ - **Repository skill convention (`skills/<app>/SKILL.md`)** — `docs skill --save` now writes to `./skills/<app>/SKILL.md` instead of `./docs/skill.md`, aligning with the open skill repository standard. Automatically removes legacy `./docs/skill.md` when saving. Updated `argsbarg create` to scaffold `skills/<app>/SKILL.md`.
26
+ - **Intent-based agent skill router** — `skill.md` / `SKILL.md` is now an intent-based router directing agents to specific subcommands and guiding them to use `<subcommand> --help` for JIT option and positional discovery. Dropped `reference.md` generation and install, preventing agent context window bloat and outdated flag hallucinations. `cliSkillInstall` automatically cleans up legacy `reference.md` when refreshing.
27
+ - **Consumer agent instructions** — updated `AGENTS.md` managed template to instruct coding agents to use `<cli> <subcommand> --help` instead of reading large API markdown documentation files.
28
+
10
29
  ## [7.0.5] - 2026-09-15
11
30
 
12
31
  ### Added
@@ -965,7 +984,9 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
965
984
  - Migrate schemas: rename every `children` property to **`commands`**; move positional definitions to **`CliPositional`** objects on `positionals` and strip `positional` / `argMin` / `argMax` from flag definitions under `options` (flags only carry `name`, `description`, `kind`, and optional `shortName`).
966
985
  - Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
967
986
 
968
- [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v7.0.5...HEAD
987
+ [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v7.0.7...HEAD
988
+ [7.0.7]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.7
989
+ [7.0.6]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.6
969
990
  [7.0.5]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.5
970
991
  [7.0.4]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.4
971
992
  [7.0.3]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.3
package/README.md CHANGED
@@ -11,7 +11,7 @@ Why ArgsBarg?
11
11
 
12
12
  *Schema-first & Auto-validated* — Define your entire command structure, options, description, and inputs once. ArgsBarg compiles this into type-safe option accessors, command-line routing, and validation schemas, keeping your code and interfaces perfectly aligned.
13
13
 
14
- *Automated Schemagen & Docgen* — Maintain single-source truth by decorating standard TypeScript types (`/** @sg */ interface...`) to automatically compile them into runtime validation schemas (`argsbarg schemagen`). Easily export standard-compliant API documentation, full CLI reference markdown, OpenAPI 3.1 definitions, and agent skill sheets directly from your code (`docs --save` command) using introspection.
14
+ *Automated Schemagen & Docgen* — Maintain single-source truth by decorating standard TypeScript types (`/** @sg */ interface...`) to automatically compile them into runtime validation schemas (`argsbarg schemagen`). Easily export standard-compliant API documentation, full CLI reference markdown, and OpenAPI 3.1 definitions directly from your code (`docs --save` command) using introspection.
15
15
 
16
16
  *Production REST Server* — Instantly expose your commands as HTTP REST endpoints (`POST /v1/some-command`) with built-in Kubernetes-compliant `/health/liveness` and `/health/readiness` probes, ECS structured JSON logging to `stderr`, and auto-generated OpenAPI 3.1 specs with an interactive Swagger UI.
17
17
 
@@ -383,9 +383,9 @@ bun scripts/merge-agents-md.ts .
383
383
 
384
384
  This refreshes the argsbarg-managed section in `AGENTS.md` while preserving your app-specific prefix and `**<app> conventions:**` footer. See **Agent instructions** in [docs/cli-program.md](docs/cli-program.md).
385
385
 
386
- ### 3. Generated Skills & Workspace Configuration
386
+ ### 3. Agent Skills & Workspace Configuration
387
387
 
388
- Running `myapp configure install` installs a compact `SKILL.md` index and full-reference `reference.md` to `~/.agents/skills/<key>/` when `program.skill: { enabled: true }`.
388
+ ArgsBarg CLIs adopt the open repository skill convention (`skills/<app>/SKILL.md`) per the standard at https://dotagentsprotocol.com/. Scaffolding via `argsbarg create` copies an initial `SKILL.md` template directing agents to run `<subcommand> --help` for just-in-time option discovery. Running `myapp configure install` registers your MCP server in `~/.agents/mcp.json` and bootstraps app configuration.
389
389
 
390
390
  See **[docs/configure.md](docs/configure.md)** and **[docs/ai-skills.md](docs/ai-skills.md)** for developer setup and automated Homebrew pipeline integration.
391
391
 
package/docs/README.md CHANGED
@@ -15,7 +15,7 @@ Start here to pick the right guide.
15
15
  | **Shipping configure / agent artifacts** | [configure.md](configure.md) — Homebrew + `myapp configure install` |
16
16
  | **Homebrew tap-from-repo distribution** | [distribution-homebrew.md](distribution-homebrew.md) — formula pattern, `argsbarg create` |
17
17
  | **Bundling `myapp docs` topics** | [bundled-docs.md](bundled-docs.md) — consumer docgen vs framework docs |
18
- | **Agent skills** | [ai-skills.md](ai-skills.md) — `configure`, `docs skill` |
18
+ | **Agent skills** | [ai-skills.md](ai-skills.md) — repository skills (`skills/<app>/SKILL.md`) |
19
19
  | **Maintaining the argsbarg repo** | [developing.md](developing.md) — release, consumers, npm `files` |
20
20
  | **IDE agents in a consumer app** | `bunx argsbarg create` (includes `AGENTS.md`) or `bun scripts/merge-agents-md.ts .` from argsbarg checkout |
21
21
  | **Runnable examples** (shipped in npm) | [examples/](examples/) — see table below |
package/docs/ai-skills.md CHANGED
@@ -1,75 +1,30 @@
1
1
  # Agent skills
2
2
 
3
- > This feature is experimental.
3
+ ArgsBarg CLIs adopt the open repository skill convention (`skills/<app>/SKILL.md`) per the standard at https://dotagentsprotocol.com/.
4
4
 
5
- ArgsBarg can generate agent skill directories (`skill.md` + `reference.md`) from your CLI schema and install them to `~/.agents/skills/<key>/` per the open standard at https://dotagentsprotocol.com/.
5
+ ## Repository skill (`skills/<app>/SKILL.md`)
6
6
 
7
- ## Enable on the program root
7
+ ArgsBarg CLI templates and `argsbarg create` scaffold an initial `skills/<app>/SKILL.md` directly in the consumer repository. Committing this file allows agents, tools, and skill managers (such as `npx skills add`) to discover and install your CLI's skill directly from the source repository.
8
8
 
9
- ```typescript
10
- export const program = {
11
- key: "myapp",
12
- skill: { enabled: true },
13
- ...
14
- } satisfies CliProgram;
15
- ```
9
+ Because developers customize `skills/<app>/SKILL.md` with domain workflows, execution tips, and specific examples, skills are **authored artifacts**, not dynamically generated from code. Consumer `just docgen` refreshes only API and schema docs under `./docs/` and never overwrites repository skills.
16
10
 
17
- When `skill.enabled` is `true`, run `configure install` after `brew install` or `brew upgrade` to install and refresh the skill. When omitted or `enabled` is not `true`, no skill is installed.
11
+ ### Structure of `skills/<app>/SKILL.md`
18
12
 
19
- The skill directory name is the program `key` with `/`, `\`, and spaces replaced by `_` (e.g. `sqsp-qa`, `full-example`).
13
+ - **YAML frontmatter** — `id`, `name`, `description`, `enabled` per https://dotagentsprotocol.com
14
+ - **Options & Help Discovery** — guides agents to discover arguments and flags just-in-time via `<command> --help`
15
+ - **Commands catalog** — compact intent-based router directing agents to the right subcommands
16
+ - **Workflow & Pitfalls** — guidelines for automated execution (e.g. using non-interactive flags like `--yes`)
20
17
 
21
- ## Install via `configure install`
18
+ ## Claude Code plugin
22
19
 
23
- ```bash
24
- myapp configure install
25
- ```
20
+ When `mcpServer.claudePlugin: true` is configured, running `myapp mcp bundle` packages `dist/claude-plugin/<name>.zip` containing an MCP pointer skill (`SKILL.md` only) that routes Claude Code to the bundled MCP server. This is a dist packaging artifact, not installed via `configure`.
26
21
 
27
- Skills are installed via `configure install` and removed via `configure uninstall` (run `just install-local` / `just uninstall` in dev).
22
+ ## Uninstalling legacy skills
28
23
 
29
- ## Programmatic install
30
-
31
- ```typescript
32
- import { cliSkillInstall } from "argsbarg/skill/install"; // internal module
33
- ```
34
-
35
- `cliSkillInstall(root, { global: true, rimraf: true })` returns changed file paths.
36
-
37
- ## Generated content
38
-
39
- - **`skill.md`** — https://dotagentsprotocol.com frontmatter (`id`, `name`, `description`, `enabled`), compact command index, pitfalls, client setup, and a pointer to `reference.md`
40
- - **`SKILL.md`** — compatibility copy of `skill.md` for tools that expect uppercase filenames
41
- - **`reference.md`** — full `docs cli` markdown reference
42
-
43
- Installed files include an HTML comment hint (`Generated by myapp configure; do not edit.`) after skill frontmatter and at the top of `reference.md`.
44
-
45
- ## Client setup
46
-
47
- | Client | Skill path |
48
- | --- | --- |
49
- | Cursor, Codex, Copilot, most agents | `~/.agents/skills/<key>/` (auto via `configure install`) |
50
- | Claude Code | Manual symlink to `~/.claude/skills/<key>/` |
51
-
52
- ```bash
53
- mkdir -p ~/.claude/skills
54
- ln -sf ~/.agents/skills/<key> ~/.claude/skills/<key>
55
- ```
56
-
57
- Skills describe **shell invocation only** — no MCP setup or `tools/call` guidance. Use **`myapp docs mcp`** (when `docs` and `mcpServer` are enabled) or connect the MCP server for agent execution.
58
-
59
- ## MCP vs skills vs docs
60
-
61
- | Mechanism | Role |
62
- | --- | --- |
63
- | **`myapp mcp`** (requires `mcpServer`) | Runtime tool execution over MCP |
64
- | **`program.skill.enabled`** + **`configure install`** | Persists optimized skill bundle at `~/.agents/skills/<key>/` |
65
- | **`myapp docs`** (requires `docs`) | Bundled markdown on stdout (`docs mcp` when MCP enabled) |
66
-
67
- `skill.md` is the routing index; `reference.md` matches `docs cli`. Prefer `configure install` over `docs skill` for installed agents. See [cli-program.md](cli-program.md).
68
-
69
- **Claude Code plugin** (`mcpServer.claudePlugin: true` → `mcp bundle` writes `dist/claude-plugin/<name>.zip`) ships a separate MCP pointer skill (`SKILL.md` only) that routes agents to the bundled MCP server. This is a **dist artifact**, not installed via `configure`.
24
+ If an earlier version of an app installed a skill to `~/.agents/skills/<key>/`, running `myapp configure uninstall` cleans up that directory.
70
25
 
71
26
  See also:
72
27
 
73
28
  - [Bundled docs](bundled-docs.md) — `docs` config and compile-time imports
74
29
  - [MCP server](mcp.md) — `mcpServer` config and `mcp` protocol
75
- - [Configure](configure.md) — app, completions, skills, and MCP config
30
+ - [Configure](configure.md) — app config and MCP registration
@@ -56,17 +56,15 @@ myapp docs readme
56
56
  myapp docs architecture
57
57
  myapp docs cli-schema # full command tree as JSON
58
58
  myapp docs cli # command tree as markdown
59
- myapp docs skill # generated Cursor SKILL.md
60
59
  myapp docs mcp # auto-generated when mcpServer.enabled
61
60
  myapp docs http # auto-generated when httpServer.enabled
62
61
  myapp docs openapi # OpenAPI 3.1 JSON when httpServer.enabled
63
62
  myapp docs readme --save # write ./docs/readme.md
64
63
  myapp docs cli-schema --save # write ./docs/cli-schema.json
65
64
  myapp docs openapi --save # write ./docs/openapi.json
65
+ myapp docs cli --save # write ./docs/cli.md
66
66
  ```
67
67
 
68
- Top-level `myapp --help` points agents at `myapp docs skill`. The `docs skill` subcommand description recommends `configure` for a persisted bundle.
69
-
70
68
  ## Configuration
71
69
 
72
70
  | Field | Default | Purpose |
@@ -75,7 +73,7 @@ Top-level `myapp --help` points agents at `myapp docs skill`. The `docs skill` s
75
73
  | `description` | `"Print bundled CLI documentation."` | Router help for `myapp docs` |
76
74
  | `topics` | *(none)* | Optional topic key → `{ text, description? }` |
77
75
 
78
- Reserved topic keys in `topics`: **`http`**, **`mcp`**, **`all`**, **`schema`**, **`cli`**, **`skill`**, **`openapi`** (reserved — use the matching `docs <name>` subcommand instead).
76
+ Reserved topic keys in `topics`: **`http`**, **`mcp`**, **`all`**, **`schema`**, **`cli`**, **`openapi`** (reserved — use the matching `docs <name>` subcommand instead).
79
77
 
80
78
  When `description` is omitted on a topic, ArgsBarg generates leaf help (`readme` → "Print README (user guide).").
81
79
 
@@ -91,13 +89,12 @@ Bun embeds the file when you `bun build --compile`. ArgsBarg does not read the f
91
89
 
92
90
  Inline topics in your program root when the set is small; use a separate module only if the import map grows enough to clutter `index.tsx`.
93
91
 
94
- ## CLI schema, API, and skill (`docs cli-schema`, `docs cli`, `docs skill`)
92
+ ## CLI schema and API (`docs cli-schema`, `docs cli`)
95
93
 
96
94
  By default (unless `docs.enabled: false`):
97
95
 
98
96
  - **`docs cli-schema`** — same JSON as the former root `--schema` flag (handlers omitted; built-in subtrees included for leaf roots).
99
97
  - **`docs cli`** — markdown rendering of the same command tree (options, positionals, subcommands, fallback routing).
100
- - **`docs skill`** — prints the compact `SKILL.md` index. Prefer `configure install` for agents (persists index + full API in `reference.md`).
101
98
 
102
99
  ## MCP guide (`docs mcp`)
103
100
 
@@ -123,8 +120,7 @@ All `docs` subcommands are hidden from MCP `tools/list` (`mcpTool: { enabled: fa
123
120
 
124
121
  | Channel | Role |
125
122
  | --- | --- |
126
- | `configure` (skill targets) | Writes compact `SKILL.md` + full-API `reference.md` to disk |
127
- | `docs skill` | Print generated `SKILL.md` to stdout |
123
+ | `skills/<app>/SKILL.md` | Authored repository skill router |
128
124
  | `docs cli` | Print command tree markdown to stdout |
129
125
  | `docs cli-schema` | Print command tree JSON to stdout |
130
126
  | `docs` | Bundled markdown topics on stdout |
@@ -135,18 +131,17 @@ Do not declare a top-level command named **`docs`** unless `docs.enabled: false`
135
131
 
136
132
  ## Agent artifact contract
137
133
 
138
- Load one primary artifact per task — avoid pulling `reference.md`, `cli-schema.json`, and `openapi.json` together unless you need all three.
134
+ Load one primary artifact per task — avoid pulling full CLI markdown trees or JSON schemas unless you need exact shapes. Agents should rely on `<subcommand> --help` for on-demand option and positional discovery.
139
135
 
140
136
  | Goal | Load |
141
137
  | --- | --- |
142
- | Route to the right command | `SKILL.md` (via `configure` or `docs skill`) |
143
- | Full command tree + option prose | `reference.md` or `docs cli` |
138
+ | Route to the right command | `skills/<app>/SKILL.md` (repository skill) |
139
+ | Inspect options and positional slots | `<subcommand> --help` |
140
+ | Full command tree + option prose | `docs cli` |
144
141
  | Machine-readable CLI tree + schemas | `docs cli-schema` |
145
142
  | HTTP request/response shapes | `docs openapi` or `GET /openapi.json` |
146
143
  | MCP tool list + env config | `docs mcp` |
147
144
 
148
- Skill `reference.md` is **compact** (no embedded `outputSchema` JSON blocks). Fetch `cli-schema` or OpenAPI when you need exact shapes.
149
-
150
145
  ## Save to disk (`--save`)
151
146
 
152
147
  Pass **`--save`** on `docs` or any docs subcommand to write files under **`./docs/`** (relative to the current working directory). Each saved path is printed on stdout.
@@ -157,6 +152,7 @@ Pass **`--save`** on `docs` or any docs subcommand to write files under **`./doc
157
152
  | `docs cli-schema --save` | `./docs/cli-schema.json` |
158
153
  | `docs openapi --save` | `./docs/openapi.json` |
159
154
  | `docs cli --save` | `./docs/cli.md` |
160
- | `docs skill --save` | `./docs/skill.md` |
161
155
 
162
- Argsbarg-generated markdown (`mcp`, `http`, `skill`) includes a `Generated by … docs … --save` HTML comment (`skill` places it after YAML frontmatter so parsers still work). `cli-schema.json`, `openapi.json`, and argsbarg-generated markdown resolve `{argsbarg:program}` in `notes` to the program key. Consumer-authored topic files are written as-is.
156
+ > **Repository skill convention:** Scaffolding (`argsbarg create`) includes `./skills/<app>/SKILL.md` from the project template as an editable intent-based router. In consumer projects, `just docgen` intentionally refreshes only API/CLI reference docs under `./docs/` (`cli.md`, `cli-schema.json`, `mcp.md`, etc.), leaving `skills/<app>/SKILL.md` for hand-crafted agent instructions and domain workflows.
157
+
158
+ Argsbarg-generated markdown (`mcp`, `http`) includes a `Generated by … docs … --save` HTML comment. `cli-schema.json`, `openapi.json`, and argsbarg-generated markdown resolve `{argsbarg:program}` in `notes` to the program key. Consumer-authored topic files are written as-is.
@@ -1,6 +1,6 @@
1
1
  # Writing `CliProgram` and leaf commands
2
2
 
3
- ArgsBarg turns your schema into help, shell completions, MCP tools, and agent skills. **The same `description` fields you write for humans are the agent contract** for basic apps.
3
+ ArgsBarg turns your schema into help, shell completions, and MCP tools. **The same `description` fields you write for humans are the agent contract** for basic apps.
4
4
 
5
5
  **Documentation map:** [docs/README.md](README.md) — which guide to read for MCP, configure, consumer docgen, and Cursor setup.
6
6
 
@@ -90,7 +90,7 @@ export const reserveCommand = {
90
90
 
91
91
  Use a **parameterized factory** only when the schema truly depends on inputs (e.g. `createUpsertCommand(deps)` for tests or injected config). A `reserveCommand()` that returns a static literal adds indirection without benefit.
92
92
 
93
- **`satisfies CliProgram`** on the root (or **`satisfies CliLeaf`** / router type on extracted modules) preserves type-checking whether inline or not. Keep **program-root fields in alphabetical order** (`appConfig`, `commands`, `description`, `docs`, `hooks`, `httpServer`, `key`, `mcpServer`, `readiness`, `skill`, `version`, …).
93
+ **`satisfies CliProgram`** on the root (or **`satisfies CliLeaf`** / router type on extracted modules) preserves type-checking whether inline or not. Keep **program-root fields in alphabetical order** (`appConfig`, `commands`, `description`, `docs`, `hooks`, `httpServer`, `key`, `mcpServer`, `readiness`, `version`, …).
94
94
 
95
95
  ## Descriptions
96
96
 
@@ -99,26 +99,26 @@ Write for **what the command does**, not how the UI works:
99
99
  - **Good:** `Reserve a QA environment.`
100
100
  - **Weak:** `Opens the reservation wizard.`
101
101
 
102
- Option and positional `description` strings appear in `-h`, MCP `inputSchema`, and generated skills — keep them concrete (`Environment name (e.g. qa2).`).
102
+ Option and positional `description` strings appear in `-h` and MCP `inputSchema` — keep them concrete (`Environment name (e.g. qa2).`).
103
103
 
104
104
  Use root **`notes`** for cross-cutting hints shown in help (install commands, docs topics, VPN requirements).
105
105
 
106
106
  ## Agent-friendly schema
107
107
 
108
- Descriptions and schemas are copied into MCP tools, HTTP OpenAPI, and generated skills — optimize for smaller, clearer agent payloads:
108
+ Descriptions and schemas are copied into MCP tools and HTTP OpenAPI — optimize for smaller, clearer agent payloads:
109
109
 
110
- - **Declare options on the leaf command** that uses them — routing groups cannot declare options (program root may). Wire schemas (MCP, OpenAPI, skills) expose leaf-local options only.
110
+ - **Declare options on the leaf command** that uses them — routing groups cannot declare options (program root may). Wire schemas (MCP, OpenAPI) expose leaf-local options only.
111
111
  - Prefer **`kind: "json"`** leaves with schemagen `inputSchema` for complex tool bodies (one nested object beats many flat flags).
112
112
  - Keep **`description`** strings short and action-oriented; put examples in **`notes`**, not duplicated in every option.
113
113
  - Use **`hidden: true`** or **`mcpTool.enabled: false`** for debug/internal commands.
114
114
  - For shape discovery: HTTP agents load **`docs openapi`** or `GET /openapi.json`; MCP agents use **`docs cli-schema`**; load full **`docs cli`** only when prose is needed.
115
- - Skill **`reference.md`** uses a compact CLI guide (no inline `outputSchema` JSON) — see [bundled-docs.md](bundled-docs.md#agent-artifact-contract).
115
+ - Repository **`skills/<app>/SKILL.md`** acts as an intent-based router that directs agents to `<subcommand> --help` — see [bundled-docs.md](bundled-docs.md#agent-artifact-contract).
116
116
 
117
117
  Validation: [json-schema-subset.md](json-schema-subset.md) (Draft-07 default; 2019-09 / 2020-12 when `$schema` is set — including Zod-generated schemas).
118
118
 
119
119
  ## Well-known option names
120
120
 
121
- Prefer **`yes`**, **`dry-run`**, and **`json`** when semantics match. They appear in `-h`, MCP `inputSchema`, and generated skills — write clear option `description` strings (e.g. "Skip confirmation; use for non-interactive runs.").
121
+ Prefer **`yes`**, **`dry-run`**, and **`json`** when semantics match. They appear in `-h` and MCP `inputSchema` — write clear option `description` strings (e.g. "Skip confirmation; use for non-interactive runs.").
122
122
 
123
123
  ## When to use `mcpTool` (escape hatches only)
124
124
 
@@ -160,7 +160,7 @@ On **leaf commands**, set `outputSchema` to a JSON Schema describing stdout when
160
160
  }
161
161
  ```
162
162
 
163
- Exported in `docs cli-schema`, `docs cli`, skill `reference.md`, and MCP `tools/list`. Not validated at runtime yet. Pair with `notes` for prose examples; do not duplicate the full schema in `notes`.
163
+ Exported in `docs cli-schema`, `docs cli`, and MCP `tools/list`. Not validated at runtime yet. Pair with `notes` for prose examples; do not duplicate the full schema in `notes`.
164
164
 
165
165
  For a **outputSchema codegen guidelines** (TypeScript types → JSON Schema → `outputSchema` constants), see [output-schema.md](output-schema.md).
166
166
 
@@ -542,8 +542,7 @@ await cli.run();
542
542
  - **Strict:** unknown keys rejected on load.
543
543
  - **CLI:** missing required config exits 1 before the leaf handler (TTY prompt when interactive). Built-in `docs` and `configure get`/`set` skip this exit.
544
544
  - **MCP:** server stays up; missing config returns `isError: true` at `tools/call`.
545
- - **Configure:** interactive `configure` runs the app config wizard; **`configure install`** refreshes agent artifacts to `~/.agents/` (see https://dotagentsprotocol.com). Optional `configure.afterInstall` / `configure.beforeUninstall` for app-specific agent setup; see [configure.md](configure.md).
546
- - **Agent skill:** `program.skill: { enabled: true }` installs to `~/.agents/skills/<key>/` on `configure install`; see [configure.md](configure.md) and [ai-skills.md](ai-skills.md).
545
+ - **Configure:** interactive `configure` runs the app config wizard; **`configure install`** registers MCP in `~/.agents/mcp.json` (see https://dotagentsprotocol.com). Optional `configure.afterInstall` / `configure.beforeUninstall` for app-specific agent setup; see [configure.md](configure.md).
547
546
  - **MCP install:** `mcpServer: { enabled: true }` merges into `~/.agents/mcp.json` on `configure install`; manual Cursor/Claude setup in [mcp.md](mcp.md).
548
547
 
549
548
  See [config-schema.md](config-schema.md) for codegen, [configure.md](configure.md) (`configure.targets`), and [mcp.md](mcp.md).
@@ -583,7 +582,7 @@ If you maintain argsbarg from a sibling checkout, `just consumers-dev` / `just c
583
582
 
584
583
  3. **Optional:** add consumer-specific sections above the `<!-- argsbarg:managed -->` marker in `AGENTS.md` (project context, Ink patterns, domain notes).
585
584
 
586
- - **Not this file:** `myapp configure install` writes the **app** skill (`SKILL.md` under `~/.agents/skills/<key>/`) from your command schema — how to *invoke* the CLI. `AGENTS.md` is for *authoring* argsbarg schema.
585
+ - **Not this file:** `skills/<app>/SKILL.md` in your repository is the **app** skill — how to *invoke* the CLI. `AGENTS.md` is for *authoring* argsbarg schema.
587
586
 
588
587
  ## See also
589
588
 
@@ -591,5 +590,5 @@ If you maintain argsbarg from a sibling checkout, `just consumers-dev` / `just c
591
590
  - [Output schemas](output-schema.md) — codegen pipeline for leaf `outputSchema`
592
591
  - [Developing argsbarg](developing.md) — release, consumer sync, npm `files`
593
592
  - [MCP server](mcp.md) — tools, schema resource, env bootstrapping
594
- - [Agent skills](ai-skills.md) — `configure`
593
+ - [Agent skills](ai-skills.md) — repository skills
595
594
  - [Bundled docs](bundled-docs.md) — `docs` topics, consumer docgen vs framework docs
package/docs/configure.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > This feature is experimental.
4
4
 
5
- The `configure` built-in manages **agent artifacts** (skills, MCP config, app config). The **binary and shell completions** ship via Homebrew — see [distribution-homebrew.md](distribution-homebrew.md).
5
+ The `configure` built-in manages **agent artifacts** (MCP config, app config). The **binary and shell completions** ship via Homebrew — see [distribution-homebrew.md](distribution-homebrew.md).
6
6
 
7
7
  Opt out with `configure: { enabled: false }` on the program root.
8
8
 
@@ -13,7 +13,7 @@ Private GitHub release downloads require [GitHub CLI](https://cli.github.com/) a
13
13
  ```bash
14
14
  brew tap <org>/<repo> git@github.com:<org>/<repo>.git
15
15
  brew install <tap>/<key>
16
- <key> configure install # skills, MCP, config bootstrap; required-config wizard on TTY
16
+ <key> configure install # MCP, config bootstrap; required-config wizard on TTY
17
17
  ```
18
18
 
19
19
  Upgrade with `brew upgrade <key>`, then run `<key> configure install` again. Shell completions are installed by Homebrew during `brew install`. Users must configure their shell per [Homebrew Shell Completion](https://docs.brew.sh/Shell-Completion).
@@ -34,18 +34,18 @@ just build
34
34
  just install-local # uninstall, build, brew install, configure install (`just install` is an alias)
35
35
  ```
36
36
 
37
- `just install-local` runs `configure uninstall` (via `just uninstall`), installs via Homebrew, then `configure install`. Use `just reinstall-local` to swap the binary into Cellar during tight edit cycles; run `just refresh` afterward for skills/MCP.
37
+ `just install-local` runs `configure uninstall` (via `just uninstall`), installs via Homebrew, then `configure install`. Use `just reinstall-local` to swap the binary into Cellar during tight edit cycles; run `just refresh` afterward for MCP.
38
38
 
39
39
  ## Quick reference
40
40
 
41
41
  ```bash
42
- # Install skills/MCP after install or upgrade (required — not run by Homebrew)
42
+ # Install MCP config after install or upgrade (required — not run by Homebrew)
43
43
  <key> configure install
44
44
 
45
45
  # See what is installed
46
46
  <key> configure status [--json]
47
47
 
48
- # Remove all agent artifacts and app config (run before brew uninstall)
48
+ # Remove agent artifacts and app config (run before brew uninstall)
49
49
  <key> configure uninstall [--yes]
50
50
 
51
51
  # Read or write app config (when program.appConfig is set)
@@ -61,7 +61,6 @@ Bare `<key> configure` (no subcommand) shows help. Use subcommands above.
61
61
  | --- | --- | --- |
62
62
  | Binary | skipped (read-only) | Homebrew formula `bin.install` |
63
63
  | Shell completions | skipped | Homebrew `generate_completions_from_executable` |
64
- | Agent skill | automatic | `~/.agents/skills/<key>/` when `program.skill.enabled` |
65
64
  | MCP config | automatic | `~/.agents/mcp.json` when `mcpServer.enabled` (see https://dotagentsprotocol.com) |
66
65
  | App config | bootstrap + wizard | Creates `~/.local/lib/<key>/config.json` as `{}` when missing; TTY wizard when required keys are missing |
67
66
 
@@ -70,7 +69,7 @@ Bare `<key> configure` (no subcommand) shows help. Use subcommands above.
70
69
  When **`PATH`** resolves the program key to the **running executable** (e.g. after `brew install`):
71
70
 
72
71
  - **`configure status`** shows `app: system (PATH)`
73
- - **`configure install`** refreshes the agent skill (when `program.skill.enabled`) and registers MCP in `~/.agents/mcp.json` (when `mcpServer.enabled`); bootstraps `config.json` when missing
72
+ - **`configure install`** registers MCP in `~/.agents/mcp.json` (when `mcpServer.enabled`); bootstraps `config.json` when missing
74
73
 
75
74
  MCP config uses the command name on **`PATH`**, not a Cellar path. For Cursor, Claude Code, and Claude Desktop, copy the `mcpServers` entry manually — see [mcp.md](mcp.md) and `docs mcp`.
76
75
 
@@ -88,7 +87,6 @@ Optional keys are set via `configure set` or environment variables.
88
87
  Optional gates for app binary status:
89
88
 
90
89
  ```typescript
91
- skill: { enabled: true },
92
90
  mcpServer: { enabled: true },
93
91
  configure: {
94
92
  targets: {
@@ -142,8 +140,8 @@ Export helpers from `argsbarg`: `resolveAppConfigPath`, `displayAppConfigPath`.
142
140
 
143
141
  | Subcommand | Description |
144
142
  | --- | --- |
145
- | `install` | Install agent artifacts; bootstrap config; required-config wizard on TTY |
146
- | `uninstall` | Remove skill, MCP entry, and app config (`--yes` skips TTY confirm) |
143
+ | `install` | Install agent artifacts (MCP); bootstrap config; required-config wizard on TTY |
144
+ | `uninstall` | Remove legacy skill, MCP entry, and app config (`--yes` skips TTY confirm) |
147
145
  | `status` | Read-only inventory (`--json` for machine output) |
148
146
  | `get` / `set` | Read or write `program.appConfig` keys (when configured) |
149
147
 
@@ -159,7 +157,7 @@ If an existing entry matches, install is a no-op. If an existing entry differs,
159
157
 
160
158
  ## Formula `caveats`
161
159
 
162
- Generated formulae document the two-step install when the app has skills, MCP, or `appConfig` entries. Homebrew prints `caveats` after `brew install` and in `brew info`:
160
+ Generated formulae document the two-step install when the app has MCP or `appConfig` entries. Homebrew prints `caveats` after `brew install` and in `brew info`:
163
161
 
164
162
  ```ruby
165
163
  def caveats
@@ -21,7 +21,6 @@ export const status = {
21
21
  | --- | --- |
22
22
  | `myapp docs cli-schema` | Full command tree JSON export |
23
23
  | `myapp docs cli` | Markdown per-command **Output** section |
24
- | `myapp docs skill` | `reference.md` for agent skills |
25
24
  | MCP `tools/list` | Optional `outputSchema` on each tool |
26
25
  | HTTP `GET /openapi.json` | Response schema per tool |
27
26
 
@@ -8,7 +8,8 @@
8
8
 
9
9
  - `README.md` — user-facing install/commands
10
10
  - `docs/architecture.md` — maintainer internals (create if missing)
11
- - Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`, `docs/skill.md`
11
+ - Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`
12
+ - `skills/full-example/SKILL.md` — agent skill router (scaffolded from template; customize as needed)
12
13
 
13
14
  <!-- argsbarg:managed -->
14
15
 
@@ -67,6 +68,7 @@ When adding commands: `src/commands/<name>/command.ts`; register in `program.ts`
67
68
 
68
69
  - **CLI:** `bun ./src/index.ts …` or `just run …`
69
70
  - **Tests:** `just test` (after `just check`)
71
+ - **Repository skill:** When adding, renaming, or removing commands, update `skills/<key>/SKILL.md` so the intent-based router remains accurate for end-user agents. (`just docgen` updates `./docs/` only and never overwrites `skills/`).
70
72
 
71
73
  <!-- /argsbarg:managed -->
72
74
 
@@ -11,7 +11,7 @@ Reference template for argsbarg consumer docgen. Every builtin is enabled in `sr
11
11
  | **Full command tree (markdown)** | [cli.md](cli.md) — generated |
12
12
  | **Full command tree (JSON)** | [cli-schema.json](cli-schema.json) — generated |
13
13
  | **OpenAPI 3.1** | [openapi.json](openapi.json) — generated |
14
- | **Agent skill index** | [skill.md](skill.md) — generated |
14
+ | **Agent skill router** | [../skills/full-example/SKILL.md](../skills/full-example/SKILL.md) — scaffolded from template |
15
15
 
16
16
  ## Framework docs vs this directory
17
17
 
@@ -60,7 +60,7 @@ See the argsbarg [logging guide](https://github.com/bdombro/bun-argsbarg/blob/ma
60
60
  ## REST routes
61
61
 
62
62
  - `POST /echo` (CLI: `full-example echo`) — Echo a message (MCP-friendly leaf).
63
- - `POST /status` (CLI: `full-example status`) — Show app version. (flags: --json)
63
+ - `POST /status` (CLI: `full-example status`) — Show app version.
64
64
 
65
65
  ## Request bodies
66
66
 
@@ -92,7 +92,7 @@ full-example mcp
92
92
  ## Exposed tools
93
93
 
94
94
  - `full-example echo` — echo — Echo a message (MCP-friendly leaf).
95
- - `full-example status` — status — Show app version. (flags: --json)
95
+ - `full-example status` — status — Show app version.
96
96
 
97
97
  ## Tool arguments
98
98
 
@@ -450,12 +450,7 @@
450
450
  "application/json; charset=utf-8": {
451
451
  "schema": {
452
452
  "type": "object",
453
- "properties": {
454
- "json": {
455
- "type": "string",
456
- "description": "Emit JSON."
457
- }
458
- }
453
+ "properties": {}
459
454
  }
460
455
  }
461
456
  }
@@ -48,7 +48,6 @@ dev *ARGS:
48
48
  docgen:
49
49
  @just run docs cli-schema --save
50
50
  @just run docs cli --save
51
- @just run docs skill --save
52
51
  @just run docs mcp --save
53
52
  @just run docs http --save
54
53
  @just run docs openapi --save
@@ -4,8 +4,6 @@ name: full-example
4
4
  description: Operates the full-example CLI (echo, status). Use when the user mentions full-example, echo, status, or related tasks.
5
5
  enabled: true
6
6
  ---
7
- <!-- Generated by full-example docs skill --save; do not edit. -->
8
-
9
7
 
10
8
  # full-example
11
9
 
@@ -19,18 +17,22 @@ Invoke via shell:
19
17
  full-example <subcommand> [options] [args]
20
18
  ```
21
19
 
20
+ ## Options & Help Discovery
21
+
22
+ - Run `full-example <subcommand> --help` to inspect flags, choices, and positional arguments before running unfamiliar subcommands.
23
+ - Run `full-example --help` at the root for top-level options and command routing.
24
+
22
25
  ## Commands
23
26
 
24
27
  - **`full-example echo`** — Echo a message (MCP-friendly leaf).
25
- - **`full-example status`** — Show app version. (flags: --json)
28
+ - **`full-example status`** — Show app version.
26
29
 
27
- ## Pitfalls
30
+ ## Workflow & Pitfalls
28
31
 
32
+ - Always run `full-example <subcommand> --help` instead of guessing options or reading large doc files.
29
33
  - Pass `--` before arguments that look like flags.
30
-
31
- ## Reference
32
-
33
- For full detail, open `reference.md` in this skill directory (same as `full-example docs cli`).
34
+ - Pass `--yes` for non-interactive execution when confirmation is required.
35
+ - Pass `--json` when machine-readable structured output is supported.
34
36
 
35
37
  ## Install location
36
38
 
@@ -21,6 +21,5 @@ export const program = {
21
21
  key: createIdentity.key,
22
22
  mcpServer: { enabled: true },
23
23
  httpServer: { enabled: true },
24
- skill: { enabled: true },
25
24
  version: "1.0.0",
26
25
  } satisfies CliProgram;
@@ -8,7 +8,8 @@
8
8
 
9
9
  - `README.md` — user-facing install/commands
10
10
  - `docs/architecture.md` — maintainer internals (create if missing)
11
- - Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`, `docs/skill.md`
11
+ - Generated: `just docgen` → `docs/cli.md`, `docs/cli-schema.json`
12
+ - `skills/full-example-json/SKILL.md` — agent skill router (scaffolded from template; customize as needed)
12
13
 
13
14
  <!-- argsbarg:managed -->
14
15
 
@@ -72,6 +73,7 @@ When adding commands: `src/commands/<name>/command.ts` + `types.ts` when schemas
72
73
  - **Runtime:** Bun (`just test`, `just dev`).
73
74
  - **Tests:** colocate `*.test.ts` next to the module.
74
75
  - **Schemagen:** after changing `/** @sg */` types in `src/`, run `just schemagen` (`__generated__/` is gitignored).
76
+ - **Repository skill:** When adding, renaming, or removing commands, update `skills/<key>/SKILL.md` so the intent-based router remains accurate for end-user agents. (`just docgen` updates `./docs/` only and never overwrites `skills/`).
75
77
 
76
78
  ### Abstractions
77
79
 
@@ -11,7 +11,7 @@ Reference template for argsbarg consumer docgen. Every builtin is enabled in `sr
11
11
  | **Full command tree (markdown)** | [cli.md](cli.md) — generated |
12
12
  | **Full command tree (JSON)** | [cli-schema.json](cli-schema.json) — generated |
13
13
  | **OpenAPI 3.1** | [openapi.json](openapi.json) — generated |
14
- | **Agent skill index** | [skill.md](skill.md) — generated |
14
+ | **Agent skill router** | [../skills/full-example-json/SKILL.md](../skills/full-example-json/SKILL.md) — scaffolded from template |
15
15
 
16
16
  ## Framework docs vs this directory
17
17
 
@@ -61,7 +61,7 @@ See the argsbarg [logging guide](https://github.com/bdombro/bun-argsbarg/blob/ma
61
61
 
62
62
  - `POST /echo` (CLI: `full-example-json echo`) — Echo a message (MCP-friendly leaf).
63
63
  - `POST /render-json` (CLI: `full-example-json render-json`) — Echo a JSON message (schema-first JSON leaf demo).
64
- - `POST /status` (CLI: `full-example-json status`) — Show app version. (flags: --json)
64
+ - `POST /status` (CLI: `full-example-json status`) — Show app version.
65
65
  - `GET /workspaces` (CLI: `full-example-json workspaces get`) — List workspaces.
66
66
  - `POST /workspaces` (CLI: `full-example-json workspaces post`) — Create a workspace.
67
67
  - `GET /workspaces/{id}` (CLI: `full-example-json workspaces :id get`) — Get one workspace.
@@ -93,13 +93,13 @@ full-example-json mcp
93
93
 
94
94
  - `full-example-json echo` — echo — Echo a message (MCP-friendly leaf).
95
95
  - `full-example-json render-json` — render-json — Echo a JSON message (schema-first JSON leaf demo).
96
- - `full-example-json status` — status — Show app version. (flags: --json)
97
- - `full-example-json workspaces get` — workspaces get — List workspaces.
98
- - `full-example-json workspaces post` — workspaces post — Create a workspace.
96
+ - `full-example-json status` — status — Show app version.
97
+ - `full-example-json workspaces :id delete` — workspaces :id delete — Delete a workspace.
99
98
  - `full-example-json workspaces :id get` — workspaces :id get — Get one workspace.
100
- - `full-example-json workspaces :id put` — workspaces :id put — Replace a workspace.
101
99
  - `full-example-json workspaces :id patch` — workspaces :id patch — Patch a workspace name.
102
- - `full-example-json workspaces :id delete` — workspaces :id delete — Delete a workspace.
100
+ - `full-example-json workspaces :id put` — workspaces :id put — Replace a workspace.
101
+ - `full-example-json workspaces get` — workspaces get — List workspaces.
102
+ - `full-example-json workspaces post` — workspaces post — Create a workspace.
103
103
 
104
104
  ## Tool arguments
105
105
 
@@ -583,12 +583,7 @@
583
583
  "application/json; charset=utf-8": {
584
584
  "schema": {
585
585
  "type": "object",
586
- "properties": {
587
- "json": {
588
- "type": "string",
589
- "description": "Emit JSON."
590
- }
591
- }
586
+ "properties": {}
592
587
  }
593
588
  }
594
589
  }