[repo] Workspace: Scaffold Phase 0 with schema, engine, content, ui and the PWA shell
pnpm + turbo workspace with the commands from CLAUDE.md §3. The contracts from §6 as JSON Schemas with generated types; localDay as the one place a day is computed; the forbidden-word list shared by lint:copy and the library validator, with 13 negative fixtures; a Svelte 5 PWA shell built under /Rosea/ with a meta CSP. E2E and offline suites run against the built bundle; the offline one closes the server rather than emulating. Analysis: .agents/features/phase0-workspace.md
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://rosea.invalid/schema/hope-sentence.json",
|
||||
"title": "HopeSentence",
|
||||
"description": "One entry of the curated hope library (CLAUDE.md §6.1). The only words one player can send another are ids of these.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "text", "source", "use", "tone", "promisesOutcome"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Stable, lowercase, hyphenated. A message between players carries only this.",
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
||||
"maxLength": 64
|
||||
},
|
||||
"text": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["en"],
|
||||
"properties": {
|
||||
"en": { "type": "string", "minLength": 1 },
|
||||
"cs": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["work", "author", "tradition", "translation", "publicDomain", "verifiedBy", "verifiedAt"],
|
||||
"properties": {
|
||||
"work": { "type": "string", "minLength": 1 },
|
||||
"author": { "type": ["string", "null"] },
|
||||
"tradition": {
|
||||
"description": "A lowercase tag such as `biblical` or `stoic`. `rosea` marks a line the author wrote for this game.",
|
||||
"type": "string",
|
||||
"pattern": "^[a-z]+(-[a-z]+)*$"
|
||||
},
|
||||
"translation": { "type": ["string", "null"] },
|
||||
"publicDomain": { "type": "boolean" },
|
||||
"verifiedBy": { "type": "string", "minLength": 1 },
|
||||
"verifiedAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }
|
||||
}
|
||||
},
|
||||
"use": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": { "type": "string", "enum": ["sunset", "comfort", "thanks"] }
|
||||
},
|
||||
"tone": { "type": "string", "pattern": "^[a-z]+(-[a-z]+)*$" },
|
||||
"promisesOutcome": { "type": "boolean" }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user