@deslop/coding-standards 0.0.0-stage → 0.1.761

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.
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "@deslop/coding-standards",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.761",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/MP281X/deslop",
7
+ "directory": "tools/coding-standards"
8
+ },
9
+ "bin": {
10
+ "deslop-coding-standards": "./dist/install.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "skills",
15
+ "src/css-properties.d.ts",
16
+ "tsconfig.json"
17
+ ],
18
+ "type": "module",
19
+ "imports": {
20
+ "#package": "./package.json",
21
+ "#rules/*": "./src/rules/*"
22
+ },
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/oxlint.d.ts",
26
+ "default": "./dist/oxlint.js"
27
+ },
28
+ "./css-properties": "./src/css-properties.d.ts",
29
+ "./tsconfig.json": "./tsconfig.json"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "dependencies": {
35
+ "@shadcn/lint": "^0.2.0",
36
+ "oxlint-plugin-react-doctor": "^0.9.14"
37
+ },
38
+ "devDependencies": {
39
+ "@oxlint/plugins": "1.85.0",
40
+ "oxlint": "1.85.0",
41
+ "oxlint-tsgolint": "7.0.2003"
42
+ },
43
+ "peerDependencies": {
44
+ "@effect/tsgo": ">=0.46",
45
+ "oxlint": "^1.82",
46
+ "oxlint-tsgolint": "^7.0"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "@effect/tsgo": {
50
+ "optional": true
51
+ },
52
+ "oxlint": {
53
+ "optional": true
54
+ },
55
+ "oxlint-tsgolint": {
56
+ "optional": true
57
+ }
58
+ },
59
+ "engines": {
60
+ "node": ">=26"
61
+ },
62
+ "scripts": {
63
+ "build": "vp pack"
64
+ }
6
65
  }
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: design
3
+ description: 'UI and UX rules for screens and visual explanations. Use when building, prototyping, or reviewing a component, diagram, review page, or other rendered agent output.'
4
+ ---
5
+
6
+ # Design
7
+
8
+ **Scope.** Follow repository-specific CODING_STANDARDS.md. CLI-installed skills are read-only; improve their package source and refresh via the CLI.
9
+
10
+ **Catalog.** List installed components and current shadcn registry capabilities before designing; group the available primitives by purpose. Inspect source/props rather than assuming training-era APIs. Reuse shared components; add missing registry components through the repository command, never hand-build or restyle them. Lint violations use existing tokens/variants.
11
+
12
+ **Code.** Reuse one app host, compiler, theme, shared components and Tailwind tokens. No custom-CSS/dynamic-class escape or weaker scratch checks. Verify the first real slice before expanding.
13
+
14
+ ```tsx
15
+ // good
16
+ <Badge variant="secondary">Draft</Badge>
17
+ <Empty><EmptyTitle>No runs yet</EmptyTitle><Button onClick={() => startRun()}>Run</Button></Empty>
18
+ // bad — "without hardcoding those values the desing/ui/ux need to be consistent with the rest of the app"
19
+ <span className="rounded-full bg-[#eef] px-[7px] text-[11px]">Draft</span>
20
+ <div className="flex flex-col items-center gap-2 p-6 text-muted-foreground">No runs yet</div>
21
+ ```
22
+
23
+ **Consistency.** Match nearest screens: structure, spacing, type, icons, density, states, copy and behavior. Reuse their renderer; follow the majority where inconsistent. Without a sibling, use T3 Code's interface as reference.
24
+
25
+ ```tsx
26
+ // good — the picker every other model choice uses
27
+ <ModelPicker value={model} onValueChange={setModel} />
28
+ // bad — "make how the button behave consistent with the rest to not break the user expectations"
29
+ <Select value={model} onValueChange={setModel}>{models.map(...)}</Select> // a second picker that behaves differently
30
+ ```
31
+
32
+ **One way.** One representation/action, one consistent name and appearance. Remove redundant refresh, badges, icon-label pairs, decoration and wrappers.
33
+
34
+ ```tsx
35
+ // good
36
+ <StarIcon aria-label="Default" />
37
+ // bad — "i don't want refresh buttons or stuffs like that in the ui/app"
38
+ <Button onClick={refetch}><RefreshIcon /></Button>
39
+ <Badge><StarIcon /> Default</Badge> // "Don't have icons/emoji and text that say the same thing"
40
+ ```
41
+
42
+ **Compact.** Flat and dense: group by proximity before adding a card, cards only when elevation means something and never nested, and no empty vertical space.
43
+
44
+ ```tsx
45
+ // good
46
+ <section className="flex flex-col gap-2">{rows}</section>
47
+ // bad — "keep the UI flat/brutalist/minimal… don't have nested cards or visually heavy layouts"
48
+ <Card><CardContent><Card className="p-8">{rows}</Card></CardContent></Card>
49
+ ```
50
+
51
+ **Precision.** Exact on the design-system scale: icons sized by one shared box, one horizontal inset for search, pinned rows, dividers, and list rows; pinned rows outside the scroll area; borders that stay put while scrolling.
52
+
53
+ ```tsx
54
+ // good
55
+ <SearchIcon className="size-4" />
56
+ // bad — "some icons have different sizes", "the spacing is kinda shitty"
57
+ <SearchIcon width={15} height={15} />
58
+ ```
59
+
60
+ **Visible.** Controls are always visible, outlined or filled, never only on hover; state shows by background (the selected row, the active tab), never a check column; when rows share a name, the subtitle shows what tells them apart.
61
+
62
+ ```tsx
63
+ // good
64
+ <TableRow data-state={selected ? 'selected' : undefined}>
65
+ // bad — "i'm not a fan that things like the empty star comes out on hover"
66
+ <Button className="opacity-0 group-hover:opacity-100" variant="ghost">
67
+ ```
68
+
69
+ **Responsive.** Preserve the complete task on phones, not merely stacked desktop panes. Test narrow/wide screens, long/duplicate content, zoom, overflow, touch targets and reachable controls; no hidden essential action or deep nesting.
70
+
71
+ **Accessible.** Semantic landmarks, headings, labels and status/errors; keyboard navigation, visible focus, logical order and deliberate return, contrast, reduced motion and accessible names. Run axe and real keyboard/touch journeys; automated scans alone do not prove accessibility.
72
+
73
+ **Feedback.** Quiet local mutation feedback; pending/error state beside its action or field. Motion explains change, never delays input/navigation/reading. Use existing tokens and respect reduced motion; no animation dependency for a CSS state change.
74
+
75
+ **Inspect.** Open actual desktop/phone captures: hierarchy, density, legibility, alignment, clipping, controls. Inspect meaningful video frames and sequence. Fix weak composition even when clicks/axe pass; a playable recording is not inspection.
76
+
77
+ ## Prototypes
78
+
79
+ **Task.** Name the person, next action and uncertainty. Compare the same realistic task/data; hierarchy follows editing, scanning, comparison, graph exploration or review.
80
+
81
+ **Range.** Show at least five clearly different directions across information model, interaction, layout, density and visual language—not cosmetic variations. Include an ambitious/unexpected concept and a plain smaller direction; adapt useful real-product patterns. Label executable prototypes versus conceptual sketches and what each tests. Concepts may contribute only an interaction, hierarchy or visual idea; never imply they are working software.
82
+
83
+ **Behavior.** Executable candidates exercise the smallest complete journey plus choice-changing empty, long/duplicate, selection, pending, failure and permission states. Conceptual sketches state unimplemented behavior; judge their idea, not a fictional runtime pass.
84
+
85
+ **Synthesis.** The user often chooses between directions. Compare transferable strengths/tradeoffs and propose a coherent blend; don't force a winner or concatenate incompatible mechanisms. Test the blend's weakest assumption before expansion.
86
+
87
+ **Show.** Labeled, inspected desktop/phone views at consistent sizes; short video only for meaningful interaction. No manual variant-switcher journey. Reuse one host, discard losing source and expand the synthesis. Settled UI verification does not require five more directions.
88
+
89
+ ## Visual explanations
90
+
91
+ **Form.** Markdown for conclusions, comparisons and file maps; visuals for relationships/layout; interaction for exploration; video for change over time. Use the simplest useful form, not images of prose.
92
+
93
+ **Hierarchy.** Outcome/decision, decisive evidence, limits. Group by reader question, not execution order; consistent labels and annotations beside their subject. Simplify/split for phones, never shrink unreadable canvases.
94
+
95
+ **Review.** Map every semantic/config change to final packages/files; distinguish moves/generated copies and omit formatting noise. Use readable lists/tables, not compressed tree art. Explain behavior and consequential choices without requiring diff reading. Risks stay visible; supporting detail collapses. No host-status duplication or screenshot file browser.
96
+
97
+ **Delivery.** Markdown carries the explanation. HTML complements it only where spatial relationships, layout or interaction communicate something Markdown cannot; never screenshot or record a replacement for readable prose, tables or file maps. Embed only the useful visual, beside its claim; keep secondary captures collapsed or linked rather than making a gallery the default reading path. Prove actual controls, keyboard access, desktop/phone layout and errors. Keep temporary hosts, source and media under the repository's ignored scratch path, never a root proof directory. Stop owned services and remove settled source. No duplicate chat, page and PR recap.
98
+
99
+ **Theme and scale.** Agent-made visuals use the user's dark theme and existing design tokens. Verify browser color preference; a dark class alone does not activate a media-query theme. Align headings, controls and rows to shared insets; use consistent type/spacing and compact grouping, not empty space or tiny text. Show variants separately legible, not as a compressed strip. Inspect hierarchy, density and alignment at desktop/phone sizes; reject a weak composition even when overflow and clicks pass.
100
+
101
+ ## Image assets
102
+
103
+ Use image generation for an asset that benefits from synthesis—illustration, atmosphere, texture, an icon exploration—not for ordinary text, an exact diagram or a fake screenshot of functioning software. Use the native generation/editing tool exposed by the assigned harness (Codex image work uses its native image tool); never invent a tool call or substitute an API client when the capability is absent. Missing capability is a reported gap, not a successful generation.
104
+
105
+ Give the tool the asset's purpose, placement, composition, existing palette, intended dimensions/aspect ratio and output constraints. For edits, supply the real source image and name what must remain unchanged. Generate only assets the chosen direction needs; do not add speculative art or an image dependency to an otherwise complete UI. Use repository icons and CSS where they express the job more precisely.
106
+
107
+ Inspect the actual returned file at its intended display size: composition, subject, crop, text/edge artifacts, contrast and fit with the surrounding screen. Correct visible defects before integrating. Preserve useful original output and identify it as generated; a generated visual is not runtime or browser evidence. Real UI proof still comes from the rendered app and actual interaction. Store only used assets in product source; remove discarded variants and temporary generation material.