stylegallery 0.1.10 → 0.1.12

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 (94) hide show
  1. package/AGENTS.md +2 -2
  2. package/GOVERNANCE.md +1 -1
  3. package/README.md +38 -35
  4. package/consumer-reference/agent-native/README.md +5 -5
  5. package/consumer-reference/agent-native/v2/material-registry.json +1 -1
  6. package/design-engineering/loading-and-feedback.md +1 -0
  7. package/design-engineering/native-interaction-contracts.md +2 -0
  8. package/design-engineering/state-management/patterns/latest-request-wins.md +2 -0
  9. package/design-engineering/state-management/patterns/optimistic-overlay.md +1 -0
  10. package/design-engineering/state-management/patterns/single-flight.md +2 -0
  11. package/design-engineering/state-management/patterns/unsaved-navigation.md +2 -0
  12. package/design-engineering/state-management/patterns/url-state.md +1 -0
  13. package/design-engineering/state-management/recipes/delete-undo.md +1 -0
  14. package/design-engineering/text-input-and-internationalization.md +1 -0
  15. package/expression/directions/nocturne-editorial.md +1 -0
  16. package/expression/directions/warm-print.md +1 -0
  17. package/expression/techniques/gradient-atmosphere.md +1 -0
  18. package/expression/techniques/grain-and-texture.md +1 -0
  19. package/expression/techniques/webgl-hero.md +1 -0
  20. package/guides/decision-tree.md +2 -0
  21. package/guides/webpage-generation-workflow.md +2 -0
  22. package/log.md +29 -0
  23. package/motion/accessible-motion.md +2 -0
  24. package/motion/interruption-and-retargeting.md +2 -0
  25. package/motion/rendering-and-performance.md +1 -0
  26. package/motion/techniques/kinetic-type.md +1 -0
  27. package/motion/techniques/scroll-choreography.md +2 -0
  28. package/package.json +14 -8
  29. package/patterns/centering/center.md +1 -0
  30. package/patterns/centering/super-center.md +2 -0
  31. package/patterns/containment/box.md +1 -0
  32. package/patterns/containment/clamped-card.md +1 -0
  33. package/patterns/containment/content-limiter.md +2 -0
  34. package/patterns/containment/fluid-styles.md +1 -0
  35. package/patterns/grid-repetition/card-grid.md +2 -0
  36. package/patterns/grid-repetition/columns.md +1 -0
  37. package/patterns/grid-repetition/dense-grid.md +1 -0
  38. package/patterns/grid-repetition/grid-wrapper.md +1 -0
  39. package/patterns/grid-repetition/masonry-approx.md +1 -0
  40. package/patterns/grid-repetition/page-grid.md +1 -0
  41. package/patterns/grid-repetition/ram-grid.md +2 -0
  42. package/patterns/grid-repetition/twelve-span-grid.md +1 -0
  43. package/patterns/in-line-grouping/badge-list.md +1 -0
  44. package/patterns/in-line-grouping/breadcrumb.md +1 -0
  45. package/patterns/in-line-grouping/cluster.md +1 -0
  46. package/patterns/in-line-grouping/deconstructed-pancake.md +1 -0
  47. package/patterns/in-line-grouping/pagination.md +1 -0
  48. package/patterns/in-line-grouping/reel.md +2 -0
  49. package/patterns/in-line-grouping/split-nav.md +1 -0
  50. package/patterns/in-line-grouping/tab-strip.md +1 -0
  51. package/patterns/in-line-grouping/wrap-row.md +1 -0
  52. package/patterns/media-fit/frame.md +2 -0
  53. package/patterns/media-fit/icon-frame.md +1 -0
  54. package/patterns/overlay-exception/imposter.md +1 -0
  55. package/patterns/overlay-exception/overlay-stack.md +1 -0
  56. package/patterns/split-sidebar/list-detail.md +1 -0
  57. package/patterns/split-sidebar/main-with-rail.md +1 -0
  58. package/patterns/split-sidebar/media-object.md +1 -0
  59. package/patterns/split-sidebar/sidebar.md +2 -0
  60. package/patterns/split-sidebar/split-screen.md +1 -0
  61. package/patterns/split-sidebar/sticky-aside.md +2 -0
  62. package/patterns/split-sidebar/supporting-pane.md +1 -0
  63. package/patterns/split-sidebar/switcher.md +2 -0
  64. package/patterns/stacking/feed.md +1 -0
  65. package/patterns/stacking/line-up.md +2 -0
  66. package/patterns/stacking/stack.md +1 -0
  67. package/patterns/stacking/step-nav.md +1 -0
  68. package/patterns/viewport-shell/cover.md +1 -0
  69. package/patterns/viewport-shell/fixed-sidenav-shell.md +2 -0
  70. package/patterns/viewport-shell/holy-grail.md +2 -0
  71. package/patterns/viewport-shell/panel-layout.md +1 -0
  72. package/patterns/viewport-shell/scroll-body-shell.md +2 -0
  73. package/patterns/viewport-shell/sticky-footer.md +2 -0
  74. package/patterns/viewport-shell/sticky-header.md +2 -0
  75. package/platform-guides/preferences-and-accessibility.md +1 -0
  76. package/recipes/article-page.md +1 -0
  77. package/recipes/command-surface.md +1 -0
  78. package/recipes/dashboard.md +1 -0
  79. package/recipes/form-flow.md +1 -0
  80. package/recipes/homepage.md +2 -0
  81. package/recipes/list-detail.md +1 -0
  82. package/recipes/saas-settings.md +1 -0
  83. package/scripts/agent-native/v2/material-cli-adapter.mjs +7 -5
  84. package/scripts/agent-native/v2/material-queries.mjs +21 -0
  85. package/scripts/agent-native/v2/material-search-v3.mjs +409 -0
  86. package/scripts/compiler/README.md +16 -16
  87. package/scripts/compiler/mcp.mjs +38 -2
  88. package/scripts/legacy-sg-material-mcp.mjs +9 -0
  89. package/scripts/legacy-sg-material.mjs +4 -0
  90. package/scripts/pattern-data.mjs +409 -0
  91. package/scripts/sg-entry.mjs +2 -2
  92. package/scripts/sg-material-mcp.mjs +1 -1
  93. package/scripts/stylegallery-cli.mjs +130 -0
  94. package/skills/stylegallery-search/SKILL.md +34 -0
package/AGENTS.md CHANGED
@@ -37,8 +37,8 @@ Before editing generated artifacts, validators, lifecycle state, or ownership po
37
37
  ## Agent Retrieval Route
38
38
 
39
39
  - When repository filesystem access is available, traverse the local Markdown corpus first: start at this file and `README.md`, follow the relevant task route or domain index, and read the selected source files directly.
40
- - When the relevant path is not yet clear, use `sg-material search --query "<narrow query>" --paths-only --limit <N>` to obtain a small deterministic set of repository-relative candidate paths, then continue by reading those files locally.
41
- - Use `sg-material context` as a fallback when repository files cannot be read directly or when a bounded, provenance-linked context package must be transferred to another process. Do not make context packaging the default local retrieval path.
40
+ - When the relevant path is not yet clear, use `stylegallery search "<narrow query>" --paths-only --limit <N>` to obtain a small deterministic set of repository-relative candidate paths, then continue by reading those files locally.
41
+ - Use `stylegallery read <id> --outline` and `--section <slug>` to read one part of a long document. Use `stylegallery context --query` as a fallback when repository files cannot be read directly or when a bounded, provenance-linked context package must be transferred to another process. Do not make context packaging the default local retrieval path.
42
42
 
43
43
  The remaining pattern, CSS, naming, token, checklist, and verification rules apply to the Layout domain. Non-Layout domain documents may discuss product-layer behavior, but they do not authorize decorative or motion properties in reusable Layout pattern CSS.
44
44
 
package/GOVERNANCE.md CHANGED
@@ -24,7 +24,7 @@ Use this file before editing repository documentation. It names which file is au
24
24
  | Quality gates and evidence | `quality/**/*.md` | Manual | None | `stable` | Claim-boundary changes, evidence-family changes, or broken quality links. | `scripts/validate-okf.mjs`, `scripts/validate-links.mjs`, `scripts/validate-ia.mjs` | Quality owner |
25
25
  | Consumer reference contract | `consumer-reference/contract.md`, `consumer-reference/schema/item.schema.json` | Manual | None | `stable` contract with related fixtures | Handoff shape, path boundary, lifecycle, ownership, or dependency-direction changes. | `scripts/validate-consumer-reference.mjs`, `scripts/test-validate-consumer-reference.mjs` | Repository governance owner with Validation owner |
26
26
  | Agent-native knowledge interface v1 | `consumer-reference/agent-native/registry.json`, `consumer-reference/agent-native/schema/*.json`, `scripts/agent-native/{registry,identity,queries}.mjs`, `scripts/sg.mjs`, `scripts/sg-mcp.mjs` | Manual, with protocol projections derived from one operation registry | Frozen v1 CLI JSON, read-only MCP tools/resources, and compatibility projections | `experimental`, byte-compatible v1 interface | Identity grammar, canonical hashing, registry records, operation metadata, capability/effect semantics, receipt/conformance rules, or retrieval changes. | `bun run test:agent-native` | Repository governance owner with Validation owner |
27
- | Governed material interface v2 | `consumer-reference/agent-native/v2/admission-policy.json`, its closed schemas, and admitted tracked Markdown | `scripts/agent-native/v2/generate-material-registry.mjs` | `consumer-reference/agent-native/v2/material-registry.json`; separate `sg-material` CLI and material MCP | `experimental`, read-only and isolated from v1 | Admission roots/exclusions, source hash, identity, operation inventory, query/context bounds, package exposure, or source drift changes. | `bun run validate:material`, `bun run test:material`, generated drift | Repository governance owner with Validation owner |
27
+ | Governed material interface v2 | `consumer-reference/agent-native/v2/admission-policy.json`, its closed schemas, and admitted tracked Markdown | `scripts/agent-native/v2/generate-material-registry.mjs` | `consumer-reference/agent-native/v2/material-registry.json`; `stylegallery search|read|context` and the main and material MCP servers | `experimental`, read-only and isolated from v1 | Admission roots/exclusions, source hash, identity, operation inventory, query/context bounds, package exposure, or source drift changes. | `bun run validate:material`, `bun run test:material`, generated drift | Repository governance owner with Validation owner |
28
28
  | Experimental protocol extensions | `scripts/agent-native/v2/experimental-extension-registry.mjs`, `scripts/agent-native/v2/extensions/*.mjs`, lifecycle extension records | Manual | A2A `1.0` and AG-UI `0.0.57` projections | `experimental`, retained pending owner review | Protocol version, caller inventory, forwarding, migration evidence, or disposition changes. | `scripts/agent-native/v2/test-agent-extension-boundary.mjs`, lifecycle suites | Repository governance owner with protocol and Validation owners |
29
29
  | Lifecycle dispositions and archives | `consumer-reference/policies/lifecycle-dispositions.json`, its five records, and `consumer-reference/schema/lifecycle-disposition.schema.json` | Manual, with immutable archive receipts | Retrieval metadata for historical sentinel/calibration and page evidence | `pending_owner` for three families; both extensions `retain` | Owner, deadline, caller status, archive object/ref, approval, transition, or post-deadline action changes. | `bun run validate:lifecycle-dispositions`, `bun run test:lifecycle-dispositions` | Repository governance owner with named family owner and Validation owner |
30
30
  | Portable token source | `consumer-reference/fixtures/token-portability/valid-reference.json`, `consumer-reference/schema/portable-tokens.schema.json` | `scripts/build-reference-artifacts.mjs` with Style Dictionary `5.5.0` | `consumer-reference/generated/tokens.css`, `consumer-reference/generated/manifest.json` | `stable` restricted adapter contract, `generated` output | Allowed token shape, adapter/version pin, source token count, warning, declaration, or content hash changes. | `scripts/validate-reference-artifacts.mjs`, `scripts/test-reference-adapters.mjs` | Repository governance owner with Validation owner |
package/README.md CHANGED
@@ -18,7 +18,7 @@ The existing Layout corpus remains a gallery of minimal, portable CSS layout pat
18
18
 
19
19
  [Consumer Reference](consumer-reference/index.md) is shared non-domain infrastructure for optional consumer-owned reference handoffs. It carries schema, routing, provenance, and evidence metadata without owning profiles, visual values, components, or a seventh domain.
20
20
 
21
- [Agent-Native StyleGallery](consumer-reference/agent-native/README.md) documents the frozen v1 claim/evidence/governance interface. The `sg` CLI and main MCP server also expose [website compilation](scripts/compiler/README.md) through a separately installed compiler; isolated material v2 indexes admitted Markdown through `sg-material` and its read-only MCP. Lifecycle records own extension and archive dispositions. These interfaces do not create a seventh domain, replace the Markdown corpus, permit mutation of governed knowledge, or feed visual defaults back into Layout.
21
+ [Agent-Native StyleGallery](consumer-reference/agent-native/README.md) documents the frozen v1 claim/evidence/governance interface. The `stylegallery` CLI and main MCP server also expose [website compilation](scripts/compiler/README.md) through a separately installed compiler; isolated material v2 indexes admitted Markdown, searched and read through `stylegallery search` / `stylegallery read` and the matching MCP tools. Lifecycle records own extension and archive dispositions. These interfaces do not create a seventh domain, replace the Markdown corpus, permit mutation of governed knowledge, or feed visual defaults back into Layout.
22
22
 
23
23
  ## Quick Start
24
24
 
@@ -32,7 +32,7 @@ Or install the CLI globally:
32
32
 
33
33
  ```sh
34
34
  npm install --global stylegallery
35
- sg discover --format json
35
+ stylegallery discover --format json
36
36
  ```
37
37
 
38
38
  The npm package includes the pinned `@chenglou/pretext@0.0.8` browser text-layout engine. StyleGallery uses it as a measurement and verification dependency for text-fit QA; the Node CLI and MCP servers do not execute browser Canvas APIs.
@@ -40,23 +40,23 @@ The npm package includes the pinned `@chenglou/pretext@0.0.8` browser text-layou
40
40
  Common read-only commands:
41
41
 
42
42
  ```sh
43
- sg resolve sg:profile/editorial-reference-profile --format json
44
- sg claims sg:profile/editorial-reference-profile --format json
45
- sg context sg:profile/editorial-reference-profile --format json
46
- sg ops --format json
43
+ stylegallery resolve sg:profile/editorial-reference-profile --format json
44
+ stylegallery claims sg:profile/editorial-reference-profile --format json
45
+ stylegallery context sg:profile/editorial-reference-profile --format json
46
+ stylegallery ops --format json
47
47
  ```
48
48
 
49
49
  Check the gallery's own claims with the Registrar and the Conservator:
50
50
 
51
51
  ```sh
52
- sg registrar
53
- sg registrar --stale
54
- sg registrar --unverified
55
- sg conservator
56
- sg conservator --pattern sidebar,reel --controls
52
+ stylegallery registrar
53
+ stylegallery registrar --stale
54
+ stylegallery registrar --unverified
55
+ stylegallery conservator
56
+ stylegallery conservator --pattern sidebar,reel --controls
57
57
  ```
58
58
 
59
- `sg registrar` checks every claim record in `quality/claim-records/` against the [claim template and machine-field rules](quality/claims.md). `--stale` lists records whose review date has passed, and `--unverified` lists records whose verdict is not fully automated. `sg conservator` renders every Layout pattern's documented CSS in Chromium at 320, 768, and 1440 CSS pixels and measures the spatial behavior the pattern doc claims. `--controls` also removes a declaration each pattern depends on and requires the matching measurement to fail. Playwright is installed with the package, but its browser is not. If Chromium is missing, the command reports `browser_missing`; run `npx playwright install chromium`, add `--install-browser`, or use an installed Chrome with `--channel chrome`.
59
+ `stylegallery registrar` checks every claim record in `quality/claim-records/` against the [claim template and machine-field rules](quality/claims.md). `--stale` lists records whose review date has passed, and `--unverified` lists records whose verdict is not fully automated. `stylegallery conservator` renders every Layout pattern's documented CSS in Chromium at 320, 768, and 1440 CSS pixels and measures the spatial behavior the pattern doc claims. `--controls` also removes a declaration each pattern depends on and requires the matching measurement to fail. Playwright is installed with the package, but its browser is not. If Chromium is missing, the command reports `browser_missing`; run `npx playwright install chromium`, add `--install-browser`, or use an installed Chrome with `--channel chrome`.
60
60
 
61
61
  Every command writes JSON to stdout. Knowledge results retain their deterministic v1 payloads; `discover` and `ops` also report the local compiler installation. Invalid input returns an error object and a nonzero exit status. See [Agent-Native StyleGallery](consumer-reference/agent-native/README.md) for the frozen knowledge contract, StableRef and VersionID model, MCP resources, and trust boundaries.
62
62
 
@@ -64,24 +64,28 @@ Compile a website directly through SG after [installing the compiler](scripts/co
64
64
 
65
65
  ```sh
66
66
  export SG_COMPILER_ROOT=/absolute/path/to/site-compiler
67
- sg compile --url https://example.com --out ./captures/example
68
- sg timeline --url https://example.com --out ./captures/example --step 500
69
- sg workflow
67
+ stylegallery compile --url https://example.com --out ./captures/example
68
+ stylegallery timeline --url https://example.com --out ./captures/example --step 500
69
+ stylegallery workflow
70
70
  ```
71
71
 
72
72
  `compile`, `timeline`, `transcribe`, `sale`, `gate`, and `build` are direct SG commands and MCP tool names. See [SG Website Compilation](scripts/compiler/README.md) for all commands, configuration, output ownership, and verification.
73
73
 
74
- Start with `sg workflow` to select the stages for reconstruction, adaptation, or sale-package production. For a faithful clone, use available original media and fill document gaps by inspecting the source. The automatic `build` command is a sale-edition preview with restricted source access; it is not the general clone builder.
74
+ Start with `stylegallery workflow` to select the stages for reconstruction, adaptation, or sale-package production. For a faithful clone, use available original media and fill document gaps by inspecting the source. The automatic `build` command is a sale-edition preview with restricted source access; it is not the general clone builder.
75
75
 
76
- Material v2 searches the admitted Markdown corpus and returns JSON without an additional format flag:
76
+ `search` ranks the admitted Markdown corpus offline (BM25F over title, aliases, description, questions, path, headings, and body) and returns JSON (schema 3.0) without a format flag. Each result carries a readable id such as `sg:layout/sticky-header`, a verbatim snippet, and the next `read` command:
77
77
 
78
78
  ```sh
79
- npx --package stylegallery sg-material discover
80
- npx --package stylegallery sg-material search --query "sticky layout" --paths-only --limit 5
81
- npx --package stylegallery sg-material context --query "responsive sidebar" --budget-tokens 4096
79
+ npx stylegallery search "sticky header"
80
+ npx stylegallery search "헤더 고정" --query-en "sticky header"
81
+ npx stylegallery search "sticky layout" --paths-only --limit 5
82
+ npx stylegallery read sg:layout/sticky-header --outline
83
+ npx stylegallery read sg:layout/sticky-header --section css
84
+ npx stylegallery context --query "responsive sidebar" --budget-tokens 4096
85
+ npx stylegallery --help
82
86
  ```
83
87
 
84
- With a global install, the same commands are available as `sg-material discover`, `sg-material search`, and `sg-material context`.
88
+ Agents asking in another language should pass `--query-en` (MCP: `query_en`) with an English rewrite; Korean words match only documents that declare Korean `aliases`. The old `sg` alias is gone (it collided with ast-grep); `sg-material`, `stylegallery-material`, and `stylegallery-material-mcp` still work in 0.1.12 with a rename notice and are removed in the next release.
85
89
 
86
90
  For a coding agent with repository filesystem access, local guided traversal is the default: read `AGENTS.md` and this README, follow the narrowest relevant task route or domain index, and inspect the selected Markdown files directly. Use `search --paths-only` only when the path is unclear; it returns a deterministic `paths` array of repository-relative candidates without full result metadata. Reserve `context` for environments that cannot read repository files or for transferring a bounded, provenance-linked package.
87
91
 
@@ -116,18 +120,7 @@ Example MCP client configuration:
116
120
 
117
121
  The main MCP server exposes governed read operations and compiler execution tools. Configure `SG_COMPILER_ROOT` in its environment to use the compiler. Execution tools declare file and network effects; the knowledge registry remains a read-only API. The frozen read-only server remains available as `bun run sg:mcp:v1`.
118
122
 
119
- The separate Material v2 MCP server is available as `stylegallery-material-mcp`. Attach it for Markdown retrieval and authoring work; the main server covers governed knowledge reads and compiler execution.
120
-
121
- ```json
122
- {
123
- "mcpServers": {
124
- "stylegallery-material": {
125
- "command": "npx",
126
- "args": ["--yes", "--package", "stylegallery", "stylegallery-material-mcp"]
127
- }
128
- }
129
- }
130
- ```
123
+ The main server also exposes `search` and `read`, the same operations and JSON as the CLI commands, so one server covers Markdown retrieval. The former Material v2 server (`material-*` tools) still runs as `stylegallery-material-mcp` in 0.1.12 with a rename notice on stderr.
131
124
 
132
125
  ## 한국어 빠른 시작
133
126
 
@@ -141,10 +134,10 @@ npx stylegallery discover --format json
141
134
 
142
135
  ```sh
143
136
  npm install --global stylegallery
144
- sg discover --format json
137
+ stylegallery discover --format json
145
138
  ```
146
139
 
147
- `discover`는 사용 가능한 인터페이스를 보여주고, `resolve`는 하나의 레코드를 조회하며, `claims`는 관련 주장과 근거를 분리해서 보여줍니다. `context`는 에이전트에 전달할 수 있는 제한된 컨텍스트 패키지를 만들고, `ops`는 지원하는 작업 목록을 반환합니다. 저장소를 직접 읽을 수 있는 에이전트는 `AGENTS.md`와 이 README의 작업 경로에서 시작해 로컬 Markdown을 따라가는 방식이 기본입니다. 경로가 불명확할 때만 `sg-material search --query "검색어" --paths-only --limit 5`로 후보 경로를 좁히고, `context`는 파일에 직접 접근할 수 없거나 제한된 패키지를 전달해야 할 때 사용합니다. 모든 결과는 자동화에 바로 사용할 수 있는 JSON입니다.
140
+ `discover`는 사용 가능한 인터페이스를 보여주고, `resolve`는 하나의 레코드를 조회하며, `claims`는 관련 주장과 근거를 분리해서 보여줍니다. `context`는 에이전트에 전달할 수 있는 제한된 컨텍스트 패키지를 만들고, `ops`는 지원하는 작업 목록을 반환합니다. 저장소를 직접 읽을 수 있는 에이전트는 `AGENTS.md`와 이 README의 작업 경로에서 시작해 로컬 Markdown을 따라가는 방식이 기본입니다. 경로가 불명확할 때만 `stylegallery search "검색어" --paths-only --limit 5`로 후보 경로를 좁히고, `context`는 파일에 직접 접근할 수 없거나 제한된 패키지를 전달해야 할 때 사용합니다. 모든 결과는 자동화에 바로 사용할 수 있는 JSON입니다.
148
141
 
149
142
  CLI와 MCP의 상세 사용법은 [Agent-Native StyleGallery 가이드](consumer-reference/agent-native/README.md)를 참고하세요. 사람이 문서를 탐색하려면 아래의 도메인 표에서 목적에 맞는 진입점을 선택하면 됩니다.
150
143
 
@@ -277,6 +270,16 @@ Every pattern documents its primary problem, structure, constraints, scroll owne
277
270
 
278
271
  Pattern verification covers the relevant viewport, container, content, direction, writing-mode, interaction, overflow, focus, and sticky/scroll cases. See the [detailed verification matrix](layout/index.md#verification-matrix).
279
272
 
273
+ ## Releasing
274
+
275
+ The npm package is published from GitHub Actions through [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers). The repository stores no npm token, and nothing is published from a local machine.
276
+
277
+ 1. Open a pull request that bumps `version` in `package.json`, adds the `log.md` entry, and refreshes the material registry and lifecycle hashes that the version change touches. Merge it after CI passes.
278
+ 2. Create a GitHub Release from `main` whose tag is `v` plus the new version, for example `v0.1.11`.
279
+ 3. Publishing the release runs [`.github/workflows/publish.yml`](.github/workflows/publish.yml). The workflow checks that the tag matches `package.json`, runs the governance, lifecycle, reference-artifact, material, and Registrar checks, and runs `npm publish` with a short-lived OIDC credential. npm attaches provenance automatically.
280
+
281
+ The npm Trusted Publisher entry for `stylegallery` must name owner `changeroa`, repository `StyleGallery`, and workflow `publish.yml`, and must allow `npm publish`. A new entry expires unless its first publish succeeds within two days, so register it in the same sitting as a release.
282
+
280
283
  ## License
281
284
 
282
285
  Source code is licensed under the MIT License ([LICENSE](LICENSE)). Documentation is licensed under Creative Commons Attribution 4.0 International ([LICENSE-DOCS](LICENSE-DOCS)). Material adapted from external sources keeps its original rights; see [NOTICE](NOTICE) and the [External Adaptation Contract](DOMAINS.md#external-adaptation-contract).
@@ -6,7 +6,7 @@ description: Machine-facing identity, query, execution, protocol-projection, and
6
6
 
7
7
  # Agent-Native StyleGallery
8
8
 
9
- Primary role: frozen v1 knowledge interface guide. For the current `sg` CLI and main MCP server, including compiler execution, use [SG Website Compilation](../../scripts/compiler/README.md).
9
+ Primary role: frozen v1 knowledge interface guide. For the current `stylegallery` CLI and main MCP server, including compiler execution, use [SG Website Compilation](../../scripts/compiler/README.md).
10
10
 
11
11
  Agent-Native StyleGallery lets a person, script, or agent inspect the governed StyleGallery knowledge graph without learning repository paths first. The Markdown corpus remains the human-readable source material; the agent-native layer gives its governed fixture records stable identities, closed schemas, deterministic operations, and protocol-specific projections.
12
12
 
@@ -58,13 +58,13 @@ All machine-mode results are deterministic JSON on stdout. A failed request retu
58
58
 
59
59
  ## Governed Material v2
60
60
 
61
- Material v2 is an isolated, read-only interface over admitted Markdown. Use `sg-material discover`, `search`, `get`, and `context`, or the equivalent `material-*` tools exposed by `stylegallery-material-mcp`. It does not merge material with v1 trust records or expand the admission policy.
61
+ Material v2 is an isolated, read-only interface over admitted Markdown. Use `stylegallery search`, `stylegallery read`, and `stylegallery context --query`, or the `search` and `read` tools of `stylegallery-mcp`. It does not merge material with v1 trust records or expand the admission policy.
62
62
 
63
- Search keeps the fixed field weights `title: 16`, `path: 8`, and `body: 1`. For a multi-token query, each field contribution is multiplied by `ceil(material_count / max(1, token_document_frequency))` so a specific, uncommon term such as `sticky` is not outranked by a corpus-wide term such as `layout`. Results expose the document frequency and multiplier for every normalized query token; ties remain ordered by projected StableRef. `--paths-only` preserves the same ranking while returning repository-relative paths.
63
+ `stylegallery search` (search v3, `scripts/agent-native/v2/material-search-v3.mjs`) ranks with BM25F (`k1` 1.2) over the fields title (weight 4), aliases (4), description (2.5), questions (2.5), path (2), headings (1.5), and body (1), each with its own length normalization. Terms are NFKC-lowercased Unicode words with English stopwords removed and light plural/-ing/-ed stemming. Hangul 2-grams are indexed only from Korean `aliases`, `questions`, and titles. `aliases` and `questions` are frontmatter JSON lists (`aliases: ["sticky top navigation", "헤더 고정"]`); add only names and questions the document's own sections answer. `query_en` adds an English rewrite of a non-English query. Ties order by readable id (`sg:<domain>/<slug>`, from the file name, or the path when names collide). `--paths-only` keeps the same ranking. The legacy `material-search` operation keeps its fixed `title: 16`, `path: 8`, `body: 1` weights with a rarity multiplier for the material v2 MCP. `node scripts/search-eval.mjs` scores both rankers on `eval/search/questions.json`.
64
64
 
65
65
  ```sh
66
- sg-material search --query "sticky layout" --paths-only --limit 5
67
- stylegallery-material search --query "design terminology source kinds" --paths-only --limit 5
66
+ stylegallery search "sticky layout" --paths-only --limit 5
67
+ stylegallery search "design terminology source kinds" --paths-only --limit 5
68
68
  ```
69
69
 
70
70
  ## MCP