argsbarg 7.0.6 → 7.0.8

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 (42) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/README.md +4 -4
  3. package/docs/README.md +1 -1
  4. package/docs/ai-skills.md +14 -62
  5. package/docs/bundled-docs.md +9 -13
  6. package/docs/cli-program.md +10 -11
  7. package/docs/configure.md +9 -11
  8. package/docs/output-schema.md +1 -1
  9. package/examples/full-example/AGENTS.md +3 -3
  10. package/examples/full-example/docs/README.md +1 -1
  11. package/examples/full-example/justfile +0 -1
  12. package/examples/full-example/skills/full-example/SKILL.md +0 -2
  13. package/examples/full-example/src/program.ts +0 -1
  14. package/examples/full-example-json/AGENTS.md +3 -3
  15. package/examples/full-example-json/docs/README.md +1 -1
  16. package/examples/full-example-json/justfile +0 -1
  17. package/examples/full-example-json/skills/full-example-json/SKILL.md +0 -2
  18. package/examples/full-example-json/src/program.ts +0 -1
  19. package/index.d.ts +5 -3
  20. package/package.json +1 -1
  21. package/src/builtins/builtins.test.ts +1 -22
  22. package/src/builtins/configure-copy.ts +4 -11
  23. package/src/builtins/presentation.ts +2 -5
  24. package/src/configure/artifacts/status.test.ts +5 -5
  25. package/src/configure/artifacts/target-effective.ts +1 -2
  26. package/src/configure/artifacts/target-skill.ts +9 -15
  27. package/src/configure/artifacts/targets/skill.ts +8 -1
  28. package/src/configure/artifacts/targets.test.ts +5 -5
  29. package/src/configure/configure.test.ts +4 -4
  30. package/src/core/parse.test.ts +1 -112
  31. package/src/core/types.ts +5 -3
  32. package/src/core/validate.ts +4 -2
  33. package/src/docs/builtin.ts +5 -3
  34. package/src/docs/cli-guide.ts +3 -3
  35. package/src/docs/docs.test.ts +3 -47
  36. package/src/docs/resolve.ts +5 -5
  37. package/src/docs/save.ts +9 -20
  38. package/src/help.test.ts +250 -8
  39. package/src/help.ts +397 -46
  40. package/src/skill/generate.ts +30 -156
  41. package/src/skill/hint.ts +2 -15
  42. package/src/skill/install.ts +3 -35
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.8] - 2026-09-15
11
+
12
+ ### Added
13
+
14
+ - **Non-TTY in-band schema discovery in `--help`** — when `--help` is invoked in non-TTY environments (such as pipes, scripts, and AI agent subprocesses), argsbarg automatically outputs full, untruncated YAML `Output Schema` (and `Input Schema` on `kind: "json"` commands) below command options and arguments. Enables zero-drift contract discovery for AI agents in a single turn without reading external documentation.
15
+ - **Unboxed plain-text help in non-TTY** — strips Unicode box borders, vertical bars, and trailing whitespace padding when output is not a TTY, outputting clean, indented plain text that optimizes token usage and prevents parsing artifacts in automated tooling. TTY sessions retain compact, rounded UTF-8 boxes without schema bloat by default.
16
+ - **`schemaToYamlLines` helper** — exported utility converting JSON Schema definitions (with `$ref` resolution, property JSDoc comments, optional `?` markers, and enums) into clean, human- and agent-readable YAML representation.
17
+
18
+ ## [7.0.7] - 2026-09-15
19
+
20
+ ### Removed
21
+
22
+ - **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`.
23
+
24
+ ### Changed
25
+
26
+ - **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.
27
+ - **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`.
28
+
10
29
  ## [7.0.6] - 2026-09-15
11
30
 
12
31
  ### Changed
@@ -973,7 +992,9 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
973
992
  - 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`).
974
993
  - Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
975
994
 
976
- [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v7.0.6...HEAD
995
+ [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v7.0.8...HEAD
996
+ [7.0.8]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.8
997
+ [7.0.7]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.7
977
998
  [7.0.6]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.6
978
999
  [7.0.5]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.5
979
1000
  [7.0.4]: https://github.com/bdombro/bun-argsbarg/releases/tag/v7.0.4
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
 
@@ -148,7 +148,7 @@ ArgsBarg automatically integrates several core features into your application. T
148
148
 
149
149
  ### Core Capabilities (Stable)
150
150
 
151
- - `-h` / `--help` — Highly-formatted, terminal-width scoped help at any routing depth.
151
+ - `-h` / `--help` — Highly-formatted, terminal-width scoped help at any routing depth. Rounded UTF-8 boxes in TTY; unboxed plain text with in-band YAML input and output schemas in non-TTY for zero-drift agent discovery.
152
152
  - `version` — Print the program's version (e.g., `myapp version`).
153
153
  - `http` — Launch the high-performance HTTP REST server (injected when `httpServer.enabled` is `true`).
154
154
  - `completion bash` / `zsh` / `fish` — Generate shell completion scripts to stdout for deployment and packaging.
@@ -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 an intent-based `SKILL.md` router to `~/.agents/skills/<key>/` when `program.skill: { enabled: true }`, directing agents to run `<subcommand> --help` for just-in-time option and argument discovery.
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,78 +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` + `SKILL.md`) from your CLI schema and install them to `~/.agents/skills/<key>/` per the open standard at https://dotagentsprotocol.com/.
6
-
7
- ## Enable on the program root
8
-
9
- ```typescript
10
- export const program = {
11
- key: "myapp",
12
- skill: { enabled: true },
13
- ...
14
- } satisfies CliProgram;
15
- ```
16
-
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.
18
-
19
- The skill directory name is the program `key` with `/`, `\`, and spaces replaced by `_` (e.g. `sqsp-qa`, `full-example`).
20
-
21
- ## Install via `configure install`
22
-
23
- ```bash
24
- myapp configure install
25
- ```
26
-
27
- Skills are installed via `configure install` and removed via `configure uninstall` (run `just install-local` / `just uninstall` in dev).
28
-
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`), execution guidance, options & help discovery protocol (`--help`), compact command router, workflow & pitfalls, and client setup
40
- - **`SKILL.md`** — compatibility copy of `skill.md` for tools that expect uppercase filenames
41
-
42
- Installed files include an HTML comment hint (`Generated by myapp configure; do not edit.`) after skill frontmatter.
43
-
44
- ## Client setup
45
-
46
- | Client | Skill path |
47
- | --- | --- |
48
- | Cursor, Codex, Copilot, most agents | `~/.agents/skills/<key>/` (auto via `configure install`) |
49
- | Claude Code | Manual symlink to `~/.claude/skills/<key>/` |
5
+ ## Repository skill (`skills/<app>/SKILL.md`)
50
6
 
51
- ```bash
52
- mkdir -p ~/.claude/skills
53
- ln -sf ~/.agents/skills/<key> ~/.claude/skills/<key>
54
- ```
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.
55
8
 
56
- 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.
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.
57
10
 
58
- ## MCP vs skills vs docs
11
+ ### Structure of `skills/<app>/SKILL.md`
59
12
 
60
- | Mechanism | Role |
61
- | --- | --- |
62
- | **`myapp mcp`** (requires `mcpServer`) | Runtime tool execution over MCP |
63
- | **`program.skill.enabled`** + **`configure install`** | Persists optimized intent-based skill router at `~/.agents/skills/<key>/` |
64
- | **`myapp docs`** (requires `docs`) | Bundled markdown on stdout (`docs mcp` when MCP enabled) |
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`)
65
17
 
66
- `skill.md` is an intent-based router that directs agents to specific subcommands and guides them to use `<subcommand> --help` for JIT option discovery. Prefer `configure install` over `docs skill` for installed agents. See [cli-program.md](cli-program.md).
18
+ ## Claude Code plugin
67
19
 
68
- ## Repository skill (`skills/<app>/SKILL.md`)
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`.
69
21
 
70
- Running `myapp docs skill --save` writes `skills/<app>/SKILL.md` directly into the consumer repository. Committing this file adheres to the repository skill convention (`skills/<name>/SKILL.md`), allowing agents, tools, and skill managers to discover and install your CLI's skill directly from the source repository.
22
+ ## Uninstalling legacy skills
71
23
 
72
- **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.
73
25
 
74
26
  See also:
75
27
 
76
28
  - [Bundled docs](bundled-docs.md) — `docs` config and compile-time imports
77
29
  - [MCP server](mcp.md) — `mcpServer` config and `mcp` protocol
78
- - [Configure](configure.md) — app, completions, skills, and MCP config
30
+ - [Configure](configure.md) — app config and MCP registration
@@ -56,18 +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
66
- myapp docs skill --save # write ./skills/myapp/SKILL.md
65
+ myapp docs cli --save # write ./docs/cli.md
67
66
  ```
68
67
 
69
- Top-level `myapp --help` points agents at `myapp docs skill`. The `docs skill` subcommand description recommends `configure` for a persisted bundle.
70
-
71
68
  ## Configuration
72
69
 
73
70
  | Field | Default | Purpose |
@@ -76,7 +73,7 @@ Top-level `myapp --help` points agents at `myapp docs skill`. The `docs skill` s
76
73
  | `description` | `"Print bundled CLI documentation."` | Router help for `myapp docs` |
77
74
  | `topics` | *(none)* | Optional topic key → `{ text, description? }` |
78
75
 
79
- 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).
80
77
 
81
78
  When `description` is omitted on a topic, ArgsBarg generates leaf help (`readme` → "Print README (user guide).").
82
79
 
@@ -92,13 +89,12 @@ Bun embeds the file when you `bun build --compile`. ArgsBarg does not read the f
92
89
 
93
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`.
94
91
 
95
- ## CLI schema, API, and skill (`docs cli-schema`, `docs cli`, `docs skill`)
92
+ ## CLI schema and API (`docs cli-schema`, `docs cli`)
96
93
 
97
94
  By default (unless `docs.enabled: false`):
98
95
 
99
96
  - **`docs cli-schema`** — same JSON as the former root `--schema` flag (handlers omitted; built-in subtrees included for leaf roots).
100
97
  - **`docs cli`** — markdown rendering of the same command tree (options, positionals, subcommands, fallback routing).
101
- - **`docs skill`** — prints the compact `SKILL.md` router. Prefer `configure install` for agents (persists `skill.md` + `SKILL.md` to `~/.agents/skills/<key>/`).
102
98
 
103
99
  ## MCP guide (`docs mcp`)
104
100
 
@@ -124,8 +120,7 @@ All `docs` subcommands are hidden from MCP `tools/list` (`mcpTool: { enabled: fa
124
120
 
125
121
  | Channel | Role |
126
122
  | --- | --- |
127
- | `configure` (skill targets) | Writes intent-based `skill.md` + `SKILL.md` router to disk |
128
- | `docs skill` | Print generated `SKILL.md` to stdout |
123
+ | `skills/<app>/SKILL.md` | Authored repository skill router |
129
124
  | `docs cli` | Print command tree markdown to stdout |
130
125
  | `docs cli-schema` | Print command tree JSON to stdout |
131
126
  | `docs` | Bundled markdown topics on stdout |
@@ -140,7 +135,7 @@ Load one primary artifact per task — avoid pulling full CLI markdown trees or
140
135
 
141
136
  | Goal | Load |
142
137
  | --- | --- |
143
- | Route to the right command | `SKILL.md` (via `configure` or `docs skill`) |
138
+ | Route to the right command | `skills/<app>/SKILL.md` (repository skill) |
144
139
  | Inspect options and positional slots | `<subcommand> --help` |
145
140
  | Full command tree + option prose | `docs cli` |
146
141
  | Machine-readable CLI tree + schemas | `docs cli-schema` |
@@ -149,7 +144,7 @@ Load one primary artifact per task — avoid pulling full CLI markdown trees or
149
144
 
150
145
  ## Save to disk (`--save`)
151
146
 
152
- Pass **`--save`** on `docs` or any docs subcommand to write files under **`./docs/`** (or **`./skills/<app>/`** for skills) (relative to the current working directory). Each saved path is printed on stdout.
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.
153
148
 
154
149
  | Command | Output |
155
150
  | --- | --- |
@@ -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` | `./skills/<app>/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
- - Generated **`SKILL.md`** acts as an intent-based router that directs agents to `<subcommand> --help` — 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
 
@@ -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,9 +21,9 @@ 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` | Intent-based SKILL.md router for agent skills |
25
24
  | MCP `tools/list` | Optional `outputSchema` on each tool |
26
25
  | HTTP `GET /openapi.json` | Response schema per tool |
26
+ | CLI `--help` (non-TTY) | YAML output schema for zero-drift in-band agent discovery |
27
27
 
28
28
  **Not validated at runtime** — argsbarg does not parse or reject handler stdout against the schema today. The schema is documentation and MCP/HTTP metadata.
29
29
 
@@ -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`, `skills/full-example/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,8 +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`)
70
- - **Agent discovery via `--help`:** Prefer running `<cli> <subcommand> --help` to inspect flags, defaults, and positionals on-the-fly. Avoid reading long API documentation files (`docs/cli.md`) into context.
71
- - **Agent skill:** `skills/<key>/SKILL.md` is an intent-based router. Run `configure install` to persist it to `~/.agents/skills/<key>/`.
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/`).
72
72
 
73
73
  <!-- /argsbarg:managed -->
74
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 router** | [../skills/full-example/SKILL.md](../skills/full-example/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
 
@@ -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
 
@@ -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`, `skills/full-example-json/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,8 +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).
75
- - **Agent discovery via `--help`:** Prefer running `<cli> <subcommand> --help` to inspect flags, defaults, and positionals on-the-fly. Avoid reading long API documentation files (`docs/cli.md`) into context.
76
- - **Agent skill:** `skills/<key>/SKILL.md` is an intent-based router. Run `configure install` to persist it to `~/.agents/skills/<key>/`.
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/`).
77
77
 
78
78
  ### Abstractions
79
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 router** | [../skills/full-example-json/SKILL.md](../skills/full-example-json/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
 
@@ -58,7 +58,6 @@ dev *ARGS:
58
58
  docgen: schemagen
59
59
  @just run docs cli-schema --save
60
60
  @just run docs cli --save
61
- @just run docs skill --save
62
61
  @just run docs mcp --save
63
62
  @just run docs http --save
64
63
  @just run docs openapi --save
@@ -4,8 +4,6 @@ name: full-example-json
4
4
  description: Operates the full-example-json CLI (echo, render-json, status, workspaces :id delete, workspaces :id get, and 4 more). Use when the user mentions full-example-json, echo, render-json, status, or related tasks.
5
5
  enabled: true
6
6
  ---
7
- <!-- Generated by full-example-json docs skill --save; do not edit. -->
8
-
9
7
 
10
8
  # full-example-json
11
9
 
@@ -28,6 +28,5 @@ export const program = {
28
28
  key: createIdentity.key,
29
29
  mcpServer: { enabled: true },
30
30
  readiness: AppDb.checkReadiness,
31
- skill: { enabled: true },
32
31
  version: "1.0.0",
33
32
  } satisfies CliProgram;
package/index.d.ts CHANGED
@@ -533,9 +533,11 @@ export interface CliCompletionConfig {
533
533
  /** When `false`, hide/disable `completion` (default: enabled). */
534
534
  enabled?: boolean;
535
535
  }
536
- /** Opt-in agent skill install to `~/.agents/skills/<key>/` (default: disabled). */
536
+ /**
537
+ * @deprecated Skill generation was removed; skills are authored directly in repositories under `skills/<app>/SKILL.md`.
538
+ */
537
539
  export interface CliSkillConfig {
538
- /** When `true`, install the agent skill via `configure install`. Default false when omitted. */
540
+ /** @deprecated Skill generation was removed; this property has no effect. */
539
541
  enabled?: boolean;
540
542
  }
541
543
  /** Context for {@link CliConfigureConfig} lifecycle hooks. */
@@ -807,7 +809,7 @@ export type CliProgram = CliNode & {
807
809
  mcpServer?: CliMcpServerConfig;
808
810
  /** Optional readiness probe for HTTP/MCP `GET /health/readiness` only. */
809
811
  readiness?: (ctx: ReadinessContext) => boolean | Promise<boolean>;
810
- /** Opt-in agent skill (`~/.agents/skills/<key>/`). Default disabled when omitted. */
812
+ /** @deprecated Skill generation was removed; skills are authored directly in repositories under `skills/<app>/SKILL.md`. */
811
813
  skill?: CliSkillConfig;
812
814
  /** Program version (printed by the `version` built-in and MCP serverInfo). */
813
815
  version: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argsbarg",
3
- "version": "7.0.6",
3
+ "version": "7.0.8",
4
4
  "main": "./src/index.ts",
5
5
  "module": "./src/index.ts",
6
6
  "dependencies": {