[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:
2026-11-01 00:27:33 +01:00
parent 1e4c5a06b6
commit 49c8def037
78 changed files with 9015 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
# Rosea pre-commit hook — CLAUDE.md §5.2.
# .gitignore is a reminder; this is the enforcement. Rejects any staged blob over
# 5 MB, because a raw image export cannot be removed without a history rewrite.
LIMIT=5242880
report=$(mktemp)
trap 'rm -f "$report"' EXIT
git diff --cached --name-only --diff-filter=ACM -z |
while IFS= read -r -d '' path; do
blob=$(git rev-parse ":$path" 2>/dev/null) || continue
size=$(git cat-file -s "$blob" 2>/dev/null || echo 0)
if [ "$size" -gt "$LIMIT" ]; then
awk "BEGIN{printf \" %s — %.1f MB\n\", \"$path\", $size/1048576}" >> "$report"
fi
done
if [ -s "$report" ]; then
echo "BLOCKED: staged files exceed the 5 MB limit:" >&2
cat "$report" >&2
echo "" >&2
echo "Build output and raw image exports are never committed (CLAUDE.md §5.2)." >&2
echo "Final art goes in art/final/ as optimised WebP/AVIF." >&2
exit 1
fi
exit 0