Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/workshop-rs/src/catalog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! back, so parser, emitter, analyzer, and tooling never embed
//! locale-specific strings as identity.
//!
//! Locale coverage is data ([`docs/adr/0001-catalog-boundaries.md`]):
//! Locale coverage is data ([ADR-0001](https://github.com/wrightkit/workshop-rs/blob/main/docs/adr/0001-catalog-boundaries.md)):
//! the primary locale (the first declared one, `en-US`) is complete — every
//! entry and enum member carries a primary-locale alias — while additional
//! declared locales may be partially covered. Missing target-locale mappings
Expand Down
2 changes: 1 addition & 1 deletion crates/workshop-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! semantic identities, kinds, parameters, and locale tables binding
//! identities to client spellings; catalog version/digest identity and
//! per-locale coverage;
//! * [`format`] — canonical number formatting for computed Workshop values;
//! * [`mod@format`] — canonical number formatting for computed Workshop values;
//! * [`actions`], [`events`], [`rules`], [`values`], [`settings`], and
//! [`gameplay`] — the discoverable Workshop domains;
//! * [`program`] — the canonical public Workshop program model;
Expand Down
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ relevant code/tests/data and current Issue contract.
- [Workshop source layout](architecture/source-layout.md): domain entry points,
shared implementation boundaries, CLI verification tooling, and test-owned
fixtures.
- [Public API and compatibility contract](compatibility-facades.md): crate-root
module exports, root re-exports, and retired compatibility paths.
- [Repository agent guidance](../AGENTS.md): implementation routing,
verification, source attribution, and delivery rules.

Expand Down
1 change: 1 addition & 0 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ For substantive implementation work, resolve the smallest relevant current contr
| Hero/gameplay dataset model | [`../gameplay-data.md`](../gameplay-data.md) |
| Gameplay semantic queries | [`../gameplay-query.md`](../gameplay-query.md) |
| Action layout contract | [`../action-layout.md`](../action-layout.md) |
| Public API modules, re-exports, and compatibility boundary | [`../compatibility-facades.md`](../compatibility-facades.md) |
| Architecture decision history | [`../adr/README.md`](../adr/README.md) |
| Source layout and domain routing | [`source-layout.md`](source-layout.md) |

Expand Down
14 changes: 10 additions & 4 deletions docs/architecture/source-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ shared home:
- `tests/` owns executable Workshop contract and regression checks, with
source-attributed fixtures beside the tests that exercise them.

The root operation modules (`parser`, `emitter`, `validate`, `convert`, and
`roundtrip`) are the public Workshop operations over `Program`. Storage,
lexer, arena, ID, and census compatibility paths are documentation-hidden
support surfaces and are not ordinary 1.0 contracts.
The crate-root module and re-export inventory, including the public operations
and the supported `detect` and `signatures` entry points, is maintained in the
[Public API and compatibility contract](../compatibility-facades.md). This
document describes source ownership rather than maintaining a second export
list.

The former public `arena`, `ids`, and root `semantic` modules, WIR-facing
operations, and `settings::table` path are no longer public paths. Storage,
tokenization, typed IDs, and normalized WIR remain implementation details;
they are private or crate-private, not `#[doc(hidden)]` public exports.
34 changes: 17 additions & 17 deletions docs/compatibility-facades.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ internal storage or parser implementation details.

## Supported public API

| Contract area | Public paths |
| --- | --- |
| Canonical program model | `program`, the crate-root model re-exports |
| Workshop domains and data | `actions`, `catalog`, `events`, `gameplay`, `rules`, `settings`, `values`, `source` |
| Workshop operations | `parser`, `validate`, `convert`, `roundtrip`, `emitter`, `format` |
| Locale detection | `detect` is the crate-root entry point; `catalog::detect` owns the implementation |
| Parse-context contract | `signatures::{ExpectedDomain, NoExpectedDomain, ChainedExpectedDomain}` |
| Public errors | crate-root `WorkshopError` and `CatalogError` |
The table lists every crate-root public module and re-export from
[`crates/workshop-rs/src/lib.rs`](../crates/workshop-rs/src/lib.rs). Rustdoc
remains the item-level reference for symbols nested under those modules.

These are API areas, not a complete item-level inventory. Their public
contracts express Workshop concepts and operations independently of the
current internal representation.
| Contract area | Crate-root public paths |
| --- | --- |
| Canonical program model | `program` |
| Root model re-exports | `Action`, `Condition`, `Event`, `EventTarget`, `EventTeam`, `ModifyOp`, `PlayerEventKind`, `Program`, `ProvenanceError`, `Rule`, `Subroutine`, `Value`, `Variable` |
| Workshop domains | `actions`, `catalog`, `events`, `gameplay`, `rules`, `settings`, `values` |
| Source and provenance | `source` |
| Workshop operations | `convert`, `detect`, `emitter`, `format`, `parser`, `roundtrip`, `validate` |
| Parse-context contract | `signatures` |
| Public errors | `CatalogError`, `WorkshopError` |

## Supported public aliases

`detect` and `signatures` are intentionally supported public entry points,
even though their modules forward to canonical implementations elsewhere.
`detect` keeps locale detection discoverable at the crate root, while
`signatures` defines the parse-context contract shared by Workshop parsing and
frontends that supply expected enum domains. The catalog remains the sole
source of signature data.
`detect` keeps locale detection discoverable at the crate root while
`catalog::detect` owns its implementation. `signatures` exposes the
parse-context contract shared by Workshop parsing and frontends that supply
expected enum domains. Both are intentional public APIs, not compatibility-only
facades; the catalog remains the sole source of signature data.

## Compatibility-only facades

Expand Down
6 changes: 4 additions & 2 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ The `Public API compatibility` CI job runs `cargo-semver-checks` for the
`workshop-rs` library against the latest normal release published on crates.io.
This automatically advances the accepted baseline after each release, so
semver-safe additive changes do not require baseline updates. The protected
surface is the documented public library API established by #112. The CLI
crate, generated catalog data, test support, storage internals, and
surface is the documented public library API established by #112 and
listed in the
[Public API and compatibility contract](compatibility-facades.md).
The CLI crate, generated catalog data, test support, storage internals, and
`#[doc(hidden)]` compatibility paths are outside this gate unless they are
reachable through that documented API.

Expand Down
Loading