Skip to content

Commit a4aaf10

Browse files
authored
Merge pull request #78 from assistant-ui/codex/contributing-schema-boundary-docs
docs(contributing): clarify schema boundary entrypoints
2 parents dbc5ea6 + 874652d commit a4aaf10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/docs/contributing/content.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Each component lives in [`components/tool-ui/`](https://github.com/assistant-ui/
1717
- `schema.ts`: Serializable schema + strict/safe parsers (`SerializableXSchema`, `parseSerializableX`, `safeParseSerializableX`)
1818
- `types.ts` (optional): TypeScript type definitions when component complexity justifies a dedicated file
1919
- `component-name.tsx`: Main component implementation
20-
- `index.ts` or `index.tsx`: Public exports (component, types, parser)
20+
- `index.ts` or `index.tsx`: Public UI exports only (component + UI-facing types)
21+
- `<component>/schema` entrypoint: import schema values and parse helpers from this path (not from the main index)
2122

2223
### Sub-Components (as needed)
2324

@@ -73,7 +74,7 @@ Implementation pattern:
7374
- Minimal but clear chrome
7475
5. Sub-components: Extract header/body/footer/actions when the component grows
7576
6. `context.tsx`: Use React context only when sub-components genuinely need shared state
76-
7. `index.tsx`: Export the public API (component, types, strict/safe parsers)
77+
7. `index.tsx`: Export only the UI surface (component + UI-facing types); export strict/safe parsers from `.../schema`
7778

7879
</Step>
7980

0 commit comments

Comments
 (0)