Skip to content

Commit 239411b

Browse files
committed
Document scoped facet identity in docs, update collection terminology to scope, and mark all tasks complete
1 parent ab8219c commit 239411b

9 files changed

Lines changed: 76 additions & 65 deletions

File tree

docs/cli/add.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The manifest, lockfile, and receipt are **never written ahead** of success. On f
4444
| Registry name with version | `viper-plans@1.2.3` | Exact pin. |
4545
| Registry name with `@latest` | `viper-plans@latest` | Re-resolves to the newest published version; `latest` is preserved verbatim in `facets.json` (the entry floats). Only a bare name pins. |
4646
| Registry name with wildcard | `viper-plans@*`, `1.*`, `1.2.*` | Wildcard preserved in `facets.json`; resolved exact version goes in the lockfile. |
47+
| Scoped registry name | `@scope/name`, `@scope/name@1.2.3`, `@scope/name@latest`, `@scope/name@1.*` | A scoped facet (`@scope/name`). The leading `@` marks the scope; a trailing `@` separates the version (so `@scope/name@1.2.3` pins `@scope/name` to `1.2.3`). Versioning and pinning rules are identical to unscoped names. |
4748
| GitHub shorthand | `github:owner/repo`, `github:owner/repo#main` | Optional `#ref` (branch, tag, SHA). |
4849
| HTTPS git URL | `https://github.com/owner/repo.git#v1.0.0` | Must end in `.git`. |
4950
| SCP-style git URL | `git@github.com:owner/repo.git#main` | Standard `user@host:path` SSH form. |
@@ -73,6 +74,10 @@ facet add viper-plans@1.2.3
7374
# specific resolved version.
7475
facet add viper-plans@1.*
7576

77+
# Scoped facet -- the leading @ is the scope; an optional trailing
78+
# @version pins it (e.g. @acme/deploy-tools@1.2.3).
79+
facet add @acme/deploy-tools
80+
7681
# GitHub shorthand with a ref.
7782
facet add github:agent-facets/viper-plans#main
7883

docs/cli/authoring/build.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ On success, the build writes output to `dist/`:
2626

2727
- `dist/<name>-<version>.facet` -- a self-contained archive (uncompressed tar containing `build-manifest.json` and `archive.tar.gz`)
2828

29+
For a scoped facet identity, the name's `/` renders as a nested path under `dist/`. For example, `@acme/cowsay` at `1.0.0` is written to `dist/@acme/cowsay-1.0.0.facet`; the build creates the required parent directories.
30+
2931
The `.facet` file is the single distributable artifact. The build manifest is embedded inside it. Use `--emit-manifest` to also write a loose copy of `build-manifest.json` to `dist/` for debugging or tooling integration.
3032

3133
If the build fails, errors are displayed inline under the failed pipeline stage, with a suggestion to run `facet edit` to fix the issues.

docs/cli/authoring/create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ If a `facet.json` already exists in the target directory, the command prompts fo
1515

1616
## Wizard flow
1717

18-
1. **Name** -- the facet name, in kebab-case (e.g., `my-facet`).
18+
1. **Name** -- the facet identity. Either an unscoped name (`my-facet`) or a scoped name (`@scope/name`, e.g. `@acme/my-facet`). Each segment is kebab-case (a lowercase letter, then lowercase letters, digits, or hyphens).
1919
2. **Description** -- a brief description of the facet.
2020
3. **Version** -- defaults to `0.0.0`.
21-
4. **Assets** -- add skills, agents, and commands by name. At least one asset is required. Each asset shows its description below the name -- press Enter to edit the name, or press ↓ during name editing to edit the description in your terminal editor.
21+
4. **Assets** -- add skills, agents, and commands by name. Asset names are always plain kebab-case local identifiers (`code-review`) -- they are never scoped, even when the facet identity is. The first asset of each type defaults its name to the facet's unscoped name segment (`@acme/cowsay` suggests `cowsay`). At least one asset is required. Each asset shows its description below the name -- press Enter to edit the name, or press ↓ during name editing to edit the description in your terminal editor.
2222
5. **Confirmation** -- review the summary and confirm.
2323

2424
## Generated files

docs/guides/create-your-first-facet.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ facet create my-facet
1717

1818
The [`facet create`](/cli/authoring/create) wizard walks you through four prompts:
1919

20-
1. **Name** -- kebab-case identifier for the facet (e.g., `my-facet`).
20+
1. **Name** -- the facet identity: an unscoped name (`my-facet`) or a scoped name (`@scope/name`, e.g. `@acme/my-facet`). Each segment is kebab-case.
2121
2. **Description** -- a brief summary of what the facet does.
2222
3. **Version** -- defaults to `0.0.0`.
23-
4. **Assets** -- add skills, agents, and commands by name. At least one asset is required.
23+
4. **Assets** -- add skills, agents, and commands by name. Asset names are always plain kebab-case -- never scoped, even when the facet identity is. At least one asset is required.
2424

2525
After confirming, the wizard writes the project files.
2626
</Step>
@@ -189,6 +189,8 @@ dist/
189189
└── my-facet-0.0.0.facet
190190
```
191191

192+
A scoped facet identity renders as a nested path: `@acme/my-facet` at `0.0.0` is written to `dist/@acme/my-facet-0.0.0.facet`.
193+
192194
The `.facet` file is the single distributable artifact. Use `--emit-manifest` to also write a loose `build-manifest.json` to `dist/` for debugging:
193195

194196
```sh

docs/guides/install-facets.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ facet adapter install
1515

1616
Without a specifier, [`facet adapter install`](/cli/adapters/install) launches an interactive picker listing the first-party adapters:
1717

18-
| Name | Package | Tool |
19-
| ------------- | ------------------------------------ | ----------- |
20-
| `opencode` | `@agent-facets/adapter-opencode` | OpenCode |
21-
| `claude-code` | `@agent-facets/adapter-claude-code` | Claude Code |
22-
| `codex` | `@agent-facets/adapter-codex` | Codex |
18+
| Name | Package | Tool |
19+
|---------------|-------------------------------------|-------------|
20+
| `opencode` | `@agent-facets/adapter-opencode` | OpenCode |
21+
| `claude-code` | `@agent-facets/adapter-claude-code` | Claude Code |
22+
| `codex` | `@agent-facets/adapter-codex` | Codex |
2323

2424
You can also install by name directly:
2525

@@ -31,7 +31,7 @@ The adapter is downloaded, bundled into a self-contained `adapter.js`, and place
3131

3232
## Search the registry
3333

34-
```sh
34+
```shell
3535
facet search <term>
3636
```
3737

@@ -59,14 +59,15 @@ facet add <source>
5959

6060
### Source grammar
6161

62-
| Form | Example |
63-
| ---------------------------- | --------------------------------------------- |
64-
| Registry name | `facet add viper-plans` |
65-
| Registry name with version | `facet add viper-plans@1.2.3` |
66-
| Major-pinned wildcard | `facet add viper-plans@1.*` |
67-
| GitHub shorthand | `facet add github:owner/repo#main` |
68-
| HTTPS git URL | `facet add https://github.com/owner/repo.git` |
69-
| Local path | `facet add ./local-facets/my-plans` |
62+
| Form | Example |
63+
|----------------------------|-----------------------------------------------|
64+
| Registry name | `facet add viper-plans` |
65+
| Registry name with version | `facet add viper-plans@1.2.3` |
66+
| Major-pinned wildcard | `facet add viper-plans@1.*` |
67+
| Scoped registry name | `facet add @acme/deploy-tools` |
68+
| GitHub shorthand | `facet add github:owner/repo#main` |
69+
| HTTPS git URL | `facet add https://github.com/owner/repo.git` |
70+
| Local path | `facet add ./local-facets/my-plans` |
7071

7172
A bare name (no version) resolves to the latest published version and writes the exact resolved version back to `facets.json`. Wildcards like `1.*` are preserved in `facets.json`; the specific resolved version goes in the lockfile.
7273

@@ -90,12 +91,13 @@ The project manifest. Maps facet names to source specifiers:
9091
{
9192
"facets": {
9293
"viper-plans": "1.2.3",
93-
"rezi": "0.5.0"
94+
"rezi": "0.5.0",
95+
"@acme/deploy-tools": "2.0.0"
9496
}
9597
}
9698
```
9799

98-
This is the source of truth for which facets belong to the project and at what version.
100+
This is the source of truth for which facets belong to the project and at what version. Scoped facets (`@scope/name`) appear as keys verbatim, including the leading `@`.
99101

100102
### `facets.lock`
101103

docs/guides/publish-a-facet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Build your facet before publishing. If you have not built yet, or if your source
5757
facet build
5858
```
5959

60-
See [`facet build`](/cli/authoring/build) for details on the 6-stage pipeline. The build writes `dist/<name>-<version>.facet`.
60+
See [`facet build`](/cli/authoring/build) for details on the 6-stage pipeline. The build writes `dist/<name>-<version>.facet` (a scoped name renders as a nested path, e.g. `dist/@acme/cowsay-1.0.0.facet`).
6161

6262
## Publish
6363

docs/specification/manifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ Authoring a facet with either section today produces a manifest the installer wi
5757

5858
| Field | Required | Type | Description |
5959
| ------------- | -------- | ------ | ----------------------------- |
60-
| `name` | Yes | string | Facet name. MUST be non-empty.|
60+
| `name` | Yes | string | Facet identity. An unscoped name (`cowsay`) or a scoped name (`@scope/name`). See [Schema Constraints](#schema-constraints). |
6161
| `version` | Yes | string | Semver version string. |
6262
| `description` | No | string | Human-readable description. |
6363
| `author` | No | string | Author name or identifier. |
6464

65-
The `name` and `version` fields MUST be present. A manifest missing either field MUST be rejected.
65+
The `name` and `version` fields MUST be present. A manifest missing either field MUST be rejected. The `name` MUST be a valid facet identity: an unscoped name, or a scoped `@scope/name`, where each segment is a lowercase kebab-case slug (starts with a lowercase letter; lowercase letters, digits, and hyphens after; ends with a letter or digit). Asset names (skills, agents, commands) are validated independently as local kebab-case identifiers and are never scoped.
6666

6767
Consumers MUST tolerate unrecognized top-level fields. Unknown fields MUST be ignored -- not rejected.
6868

0 commit comments

Comments
 (0)