Tạo project
Trong trang này
sota init my-app --features all
cd my-app
# terminal 1 — watcher của chính bạn
npm run dev
# terminal 2 — Development session
npm run dev:sotasota init tạo scaffold tương thích manifest schema v3. Chạy không kèm --features thì CLI hỏi capability cần scaffold; truyền --features admin-screen,skill,backend,tool,tool-result-ui (hoặc all) để trả lời sẵn. Thêm sau bằng sota add.
Các scaffold feature#
| Feature | Thêm gì | Kéo theo |
|---|---|---|
admin-screen | Một native page React + TypeScript + Vite kèm watch build cho local development. | — |
skill | Một contribution dạng nội dung SKILL.md. Không cần backend. | — |
backend | Một Express service tối thiểu với request log, Core JWT verification và health route. | — |
tool | Một tool cho agent: entry trong manifest, JSON Schema input/output và backend route trả lời nó. | backend |
tool-result-ui | Một tool cộng thêm React surface render ngay dưới kết quả của nó trong conversation. | tool, backend |
Scaffold là tiện lợi, không phải bắt buộc.
Express, npm và TypeScript được chọn vì phổ biến dễ hiểu. Contract của nền tảng chỉ là HTTP thuần cộng một manifest — bất kỳ ngôn ngữ hay runtime nào phục vụ được route đã khai báo và verify được invocation token đều là app backend hợp lệ.
Template có gì?#
| Path | Ý nghĩa |
|---|---|
manifest.yaml | Identity, version, contributions, runtime bindings, health, locales và platform compatibility. |
src/backend/ | Service đã có auth verification, health và tool routes mẫu. |
src/ui/ | Native React modules và style cho UI slots. |
src/skills/ | Skills dạng nội dung. |
src/schemas/ | JSON Schema cho tool input/output. |
src/locales/ | Nhãn và chuỗi đa ngôn ngữ. |
.sota/app-ui-contracts/ | Platform UI contracts được generate; không sửa tay. |
.agent/skills/ | Best practices đi kèm về architecture, security, testing, tools và UI. |