Plaited Standards
Purpose
This skill provides code conventions and development standards that apply to all Plaited code—whether behavioral programs, UI templates, utilities, or tests.
Use this when:
- Writing or editing TypeScript code in Plaited projects
- Following Plaited code conventions
- Generating code for Plaited applications
- Verifying code quality before presenting to users
- Understanding import path standards
- Applying the 95% confidence threshold
Quick Reference
| Reference |
Use For |
| code-conventions.md |
Type system, function style, templates, imports, null handling |
| standards.md |
95% confidence threshold, documentation guidelines, Bun APIs |
| verification-workflow.md |
Complete code generation workflow |
Code Conventions
code-conventions.md
Type System
- Prefer
type over interface
- Use
type for object shapes, unions, intersections
- Use arrow functions over function declarations
Function Style
- Arrow functions for all functions
- Object parameters for functions with 2+ parameters
- Destructure in function signature
Templates
- JSX syntax only (not
h() or createTemplate())
- Use "template" not "component"
Imports
- Package imports in tests:
'plaited', 'plaited/ui', 'plaited/testing'
plaited for behavioral programming (useBehavioral, useSignal, useWorker)
plaited/ui for templates and custom elements (bElement, createStyles, FT)
- Relative imports within packages
Null Handling
- Prefer
undefined over null
- Use optional chaining and nullish coalescing
Development Standards
standards.md
95% Confidence Threshold
- Verify information before stating implementation details
- Read files in real-time to verify accuracy
- Use typescript-lsp@plaited_development-skills skill for type verification
- Report uncertainty rather than guess
Documentation Guidelines
- TSDoc for public APIs
- No
@example sections (tests/stories are living examples)
- Use
@internal for non-public APIs
Bun Platform APIs
- Prefer Bun native APIs over Node.js equivalents
- Use
Bun.file(), Bun.write(), Bun.spawn()
- Use
bun:test for testing
Verification Workflow
verification-workflow.md
Code Generation Phases
- API Verification - Check imports, verify types with LSP
- Code Generation - Apply patterns from framework skills
- Post-Generation Validation - Verify against standards
Confidence Protocol
Before presenting code:
1. Verify all imports exist
2. Confirm type signatures with LSP
3. Check patterns against skill references
4. Only present if 95%+ confident
Terminology
Plaited is a template-driven framework:
- Use "template" not "component"
- Use "behavioral element" or "bElement" for interactive elements
- Refer to browser APIs by specific names (Custom Elements, Shadow DOM)
Related Skills
- behavioral-core - BP coordination patterns
- ui-patterns - Templates, bElements, styling
- typescript-lsp@plaited_development-skills - Type verification and symbol discovery
- code-documentation@plaited_development-skills - TSDoc writing standards
1---2name: standards3description: Plaited code conventions and development standards. Use when writing or editing TypeScript code in Plaited projects, following code conventions (type system, function style, imports), generating code, or verifying code quality.4license: ISC5---6
7# Plaited Standards
8
9## Purpose
10
11This skill provides code conventions and development standards that apply to **all** Plaited code—whether behavioral programs, UI templates, utilities, or tests.
12
13**Use this when:**
14- Writing or editing TypeScript code in Plaited projects
15- Following Plaited code conventions
16- Generating code for Plaited applications
17- Verifying code quality before presenting to users
18- Understanding import path standards
19- Applying the 95% confidence threshold
20
21## Quick Reference
22
23| Reference | Use For |
24|-----------|---------|
25| [code-conventions.md](references/code-conventions.md) | Type system, function style, templates, imports, null handling |
26| [standards.md](references/standards.md) | 95% confidence threshold, documentation guidelines, Bun APIs |
27| [verification-workflow.md](references/verification-workflow.md) | Complete code generation workflow |
28
29## Code Conventions
30
31**[code-conventions.md](references/code-conventions.md)**
32
33### Type System
34- Prefer `type` over `interface`
35- Use `type` for object shapes, unions, intersections
36- Use arrow functions over function declarations
37
38### Function Style
39- Arrow functions for all functions
40- Object parameters for functions with 2+ parameters
41- Destructure in function signature
42
43### Templates
44- JSX syntax only (not `h()` or `createTemplate()`)
45- Use "template" not "component"
46
47### Imports
48- Package imports in tests: `'plaited'`, `'plaited/ui'`, `'plaited/testing'`
49- `plaited` for behavioral programming (useBehavioral, useSignal, useWorker)
50- `plaited/ui` for templates and custom elements (bElement, createStyles, FT)
51- Relative imports within packages
52
53### Null Handling
54- Prefer `undefined` over `null`
55- Use optional chaining and nullish coalescing
56
57## Development Standards
58
59**[standards.md](references/standards.md)**
60
61### 95% Confidence Threshold
62- Verify information before stating implementation details
63- Read files in real-time to verify accuracy
64- Use typescript-lsp@plaited_development-skills skill for type verification
65- Report uncertainty rather than guess
66
67### Documentation Guidelines
68- TSDoc for public APIs
69- No `@example` sections (tests/stories are living examples)
70- Use `@internal` for non-public APIs
71
72### Bun Platform APIs
73- Prefer Bun native APIs over Node.js equivalents
74- Use `Bun.file()`, `Bun.write()`, `Bun.spawn()`
75- Use `bun:test` for testing
76
77## Verification Workflow
78
79**[verification-workflow.md](references/verification-workflow.md)**
80
81### Code Generation Phases
82
831. **API Verification** - Check imports, verify types with LSP
842. **Code Generation** - Apply patterns from framework skills
853. **Post-Generation Validation** - Verify against standards
86
87### Confidence Protocol
88
89```
90Before presenting code:
911. Verify all imports exist
922. Confirm type signatures with LSP
933. Check patterns against skill references
944. Only present if 95%+ confident
95```
96
97## Terminology
98
99Plaited is a **template-driven** framework:
100- Use "template" not "component"
101- Use "behavioral element" or "bElement" for interactive elements
102- Refer to browser APIs by specific names (Custom Elements, Shadow DOM)
103
104## Related Skills
105
106- **behavioral-core** - BP coordination patterns
107- **ui-patterns** - Templates, bElements, styling
108- **typescript-lsp@plaited_development-skills** - Type verification and symbol discovery
109- **code-documentation@plaited_development-skills** - TSDoc writing standards