You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2f63533
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/skills/implement-platform/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Read `apps/sim/platform/AGENTS.md` first. It is the canonical ownership and code
10
10
1.**Scope the phase.** Foundations, recipes and evidence are Phase 1. Approved product screens and their unique parts are Phase 2. Route integration, persisted state and authorization belong to Phase 3. Keep UI-only requests isolated; do not advance phases just to make a demo look real.
11
11
2.**Resolve the contract.** Inventory the live Shared and Platform libraries and the relevant Core/Chat/Workspaces product use. Compare the actual Base, usage and any theme counterpart. Read the applicable Dashboard/Issues/Changelog/Logs contract. Record key, current file/page/node, roles, named parts, states, approved parameters and ancestor use in a task-local checkpoint. Match slots by meaning. Do not treat the archived libraries, Marcus's work, canvas guides or a copied instance as alternative masters.
12
12
3.**Choose one owner.** Search the existing component exports and catalog evidence. Reuse a master and a single code implementation. New reusable behavior needs an evidenced Paper Base before a code variant. Register in Shared if it could serve another system; otherwise use Platform with a reason. A page-only composition lives by its feature; its styling stays in the central `design-system/features/<feature>/` owner. Route-private modules only compose. On second use, promote it once and update both imports together. Fix an existing master centrally; propagate the corrected recipe to every affected use. Never create a variant just to fill a gallery.
13
-
4. **Translate anatomy, not artboard coordinates.** Consult the installed Next docs in `node_modules/next/dist/docs` (especially project structure, CSS, Server/Client Components). Use semantic DOM, native or accessible behaviors, intrinsic size and responsive relationships. A 560px Paper modal is a preferred maximum, not a fixed width. The same modal should fit 647px and 390px viewports without new variants. Use centralized Tailwind roles, the type and material contracts, shared icon geometry and slots. Confirm the rendered DOM has the intended behavior. A searchable field accepts text, a disclosure opens by keyboard, a modal part composes directly, and a table renders the caller’s records. Repeated data takes an array, never a fixed list of numbered specimen props. Register a named native component for these cases. A new size requires a distinct, evidenced use; it isn't a device enum. Never pass styles through a composition. When editing generated files, change the source contract or compiler and regenerate the affected set.
13
+
4. **Translate anatomy, not artboard coordinates.** Consult the installed Next docs in `node_modules/next/dist/docs` (especially project structure, CSS, Server/Client Components). Use semantic DOM, native or accessible behaviors, intrinsic size and responsive relationships. A 560px Paper modal is a preferred maximum, not a fixed width. The same modal should fit 647px and 390px viewports without new variants. Use centralized Tailwind roles, the type and material contracts, shared icon geometry and slots. Confirm the rendered DOM has the intended behavior. A searchable field accepts text, a disclosure opens by keyboard, a modal part composes directly, and a table renders the caller’s records. Repeated data takes an array, never a fixed list of numbered specimen props. Register a named native component for these cases. A new size requires a distinct, evidenced use; it isn't a device enum. Never pass styles through a composition. Trace repeated rows to their registered item and preserve the surrounding layout. Accept a typed collection, then render empty, short and longer-than-specimen data to prove that any example count can change. Keep different semantic roles distinct. When editing generated files, change the source contract or compiler and regenerate the affected set.
14
14
5.**Exercise the right states.** Build a matrix of actual themes, relevant content sizes, natural/focus/error/disabled states, keyboard navigation, long data, zoom and widths between Paper examples. The workbench is tooling, not a Phase 2 product screen. Entities, including organizations, workspaces, members and chats, come only through the server fixture gate. Render empty or absent data distinctly. Client interaction may open, dismiss or change steps; no authentication, persistence or network effects.
15
15
6.**Prove it.** Run the structural audit against real code, regenerate/check relevant files, render the app in a real browser, and compare computed type/material/geometry and screenshots with live Paper. Exercise empty, full, stress and flag-off. Retire unused variants and resolve every affected use. Verify isolation and the repository gates. Report covered keys/states separately from visual comparisons; record unresolved differences and durable verification paths. Stop at the authorized phase.
Copy file name to clipboardExpand all lines: apps/sim/platform/AGENTS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ Search Shared → Platform → Product before adding anything. Use the stable Pa
17
17
## Public API
18
18
19
19
- A page supplies data, semantic slots, supported variants and callbacks. It owns no CSS, inline styles, Tailwind classes or visual overrides, including layout around a component. A composition with its own spacing is itself a recipe with an owner. No `className`, `style`, utility pass-through, arbitrary JSX prop spread or per-screen colors/geometry.
20
+
- Repeated data takes a typed array with stable item IDs. A specimen's row count is an example; render zero, two or more than the reference count without numbered props. Preserve genuinely distinct fixed slots.
20
21
- Keep the smallest API that describes the behavior. Use a native interactive element or an accessible primitive for focus, keyboard, disabled, validation and dismissal. Use named native controls for interactive masters and typed record arrays for repeated data. A static structural recipe does not provide those behaviors. A different label, icon, item count or viewport width does not create another variant.
21
22
- Keep tokens and composite recipes central. The Tailwind theme maps to semantic variables. An owner module may apply structural Tailwind utilities and registered theme roles; callers only use its public API. `PlatformSurface` selects the theme for the tree. Modules in an owner can express grid/flex, intrinsic sizing, focus, wrapping and overflow. Do not bake a screenshot into a component. At the default root size the result must match Paper; use scalable type and spacing, bounded widths, flexible tracks, logical insets and natural height. Breakpoints follow a change in composition, not the number of Paper examples. Fixed stroke widths, icon geometry, touch targets and aligned data lanes are deliberate. Test intermediate widths, long content and zoom.
22
23
- Preserve theme roles, Geist and Geist Mono recipes, 16px directional overflow fades, shell/floating glass and quiet reading surfaces. Compare real semantic parts and nested controls, not just matching names. A gallery or a token declaration is not evidence that a variant is needed. Remove unused variants, their styles and documentation. If Paper and code disagree, reconcile with the live authority.
Copy file name to clipboardExpand all lines: apps/sim/platform/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ import { Button } from '@/platform/design-system/components'
25
25
26
26
Shared and Platform still own different recipes; `catalog/evidence.json` preserves that ownership and a path from the Base to a Platform product use. Registered states without a Platform use, canvas organizers and the other products are outside this library. Product-specific compositions and real data adapters belong to later phases.
27
27
28
+
Workspace lists, sidebar items, recents and attachment batches accept typed arrays with stable item IDs. Use the named components for these collection masters: a Paper specimen's item count is sample data. An empty array renders zero items, and adding items preserves their registered row/card appearance. Each scroll viewport determines fades and controls from its actual contents. Chart labels, marks, inspected values and legends come from the same series. Supply raw numeric values and their units to data tables. The column schema determines alignment and which columns remain visible as the table narrows.
29
+
28
30
## Maintaining the source
29
31
30
32
The [Platform design contract](AGENTS.md) is authoritative. Use the repository's [implementation skill](../../../.agents/skills/implement-platform/SKILL.md) and its Paper companion. A change starts from the current master and representative product uses. Keep verified raw Paper exports locally: they may contain private example content. Only code, design geometry, safe slots and source references enter this repo.
0 commit comments