Skip to content

Commit 18f04a6

Browse files
committed
Add platform development standards instructions
1 parent 38ef8dd commit 18f04a6

2 files changed

Lines changed: 144 additions & 0 deletions

File tree

docs_build/dev/ProjectInstructions/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ READ THIS FIRST
4343

4444
Addendum index:
4545
- Canonical Repository Structure: project-instructions/addendums/canonical-repository-structure.md
46+
- Platform Development Standards: project-instructions/addendums/platform-development-standards.md
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Platform Development Standards
2+
3+
## Purpose
4+
5+
Establish repository-wide standards for database usage, entity lifecycle management, creator tool design, and shared component reuse.
6+
7+
---
8+
9+
# PostgreSQL Platform Standard
10+
11+
## Rules
12+
13+
- SQLite is deprecated.
14+
- PostgreSQL is the canonical database platform.
15+
- New development must not introduce SQLite.
16+
- New tools must target PostgreSQL.
17+
- New tests must target PostgreSQL.
18+
- New migrations must target PostgreSQL.
19+
20+
## Legacy
21+
22+
Existing SQLite references should be removed when touched by active development.
23+
24+
## Exception
25+
26+
Owner approval is required for any non-PostgreSQL database implementation.
27+
28+
---
29+
30+
# Referenced Entity Protection
31+
32+
## Purpose
33+
34+
Prevent accidental data loss and broken references.
35+
36+
## Rules
37+
38+
Entities referenced by another record may not be directly deleted.
39+
40+
Allowed actions:
41+
42+
- Archive
43+
- Deprecate
44+
- Replace
45+
46+
Direct deletion is prohibited while references exist.
47+
48+
## Examples
49+
50+
- Messages
51+
- TTS Profiles
52+
- Emotion Profiles
53+
- Characters
54+
- Objects
55+
- Assets
56+
- Worlds
57+
- Tags
58+
59+
## Exception
60+
61+
Owner approval required for destructive removal.
62+
63+
---
64+
65+
# Table First Tool Standard
66+
67+
## Purpose
68+
69+
Provide a consistent creator experience across all tools.
70+
71+
## Preferred
72+
73+
- Table driven interfaces
74+
- Inline editing
75+
- Add row at bottom
76+
- Expandable child rows
77+
- Save and Cancel on the active row
78+
79+
## Avoid
80+
81+
- Large data-entry forms
82+
- Separate edit pages
83+
- Wizard-style CRUD workflows
84+
85+
## Exception
86+
87+
Forms may be used when table interaction is not practical.
88+
89+
---
90+
91+
# Shared Component Governance
92+
93+
## Purpose
94+
95+
Reduce duplicate code across tools.
96+
97+
## Shared JavaScript Location
98+
99+
```text
100+
assets/js/shared/
101+
```
102+
103+
## Examples
104+
105+
- API helpers
106+
- Table helpers
107+
- Status helpers
108+
- Dialog helpers
109+
- Validation helpers
110+
111+
## Rules
112+
113+
Functionality used by multiple tools should be moved into shared components.
114+
115+
Tool-specific functionality remains within the tool folder.
116+
117+
Shared functionality must not be stored inside an unrelated tool folder.
118+
119+
## Testing
120+
121+
Shared functionality must include tests under:
122+
123+
```text
124+
tests/js/shared/
125+
```
126+
127+
Tool-specific functionality remains tested within its corresponding tool test location.
128+
129+
---
130+
131+
# Governance Enforcement
132+
133+
## Rules
134+
135+
New development must follow these standards.
136+
137+
When modifying existing functionality:
138+
139+
1. Review compliance with these standards.
140+
2. Correct violations when practical within the scope of the work.
141+
3. Avoid introducing new technical debt.
142+
143+
Repository-wide standards must exist in Project Instructions and not solely within chat discussions.

0 commit comments

Comments
 (0)