- Treat
content/*.mdxas the canonical article store. The SQL article schemas insupabase/are not the runtime source of article content. - Prefer code over README when they conflict. Parts of the README are stale.
- Keep changes narrow. This repo has duplicated article parsers and several UI/data contracts that are easy to break with broad refactors.
- Do not read or print real secret values from
.envor.env.*. Use.env.examplefor variable names and expected configuration. - Use
rgandrg --filesfor search.
- Preserve the split between
/and/home. /is the landing page and intentionally hides the navbar./homeis the article browser.- Preserve
.mdx-containerand theh2/h3article heading structure.components/TableOfContents.tsxdepends on both. - Preserve the dark-mode chain across:
- the inline boot script in
app/layout.tsx - the
darkclass on<html> - CSS variables in
app/globals.css provider/DarkModeProvider.tsx
- the inline boot script in
- Preserve the chat response contract across
app/chat/page.tsx,lib/chat-citations.ts, andlib/rag.ts.- assistant answers use bracket citations
- backend appends a trailing
Sources:section - UI strips that section and links citations to
message.sources
- Keep article metadata as a literal
export const metadata = { ... };. - Keep
title,description, andtopicsas literal string/array fields. - Keep
### Author: .... - Keep
> Date: YYYY-MM-DD. - Keep article body starting with a top-level
#heading. - If you change that contract, update all dependent parsers together:
lib/rss.tslib/rag-local.tsscripts/vectorize_articles.mjs- any affected tests
- Keep
SUPABASE_SERVICE_ROLE_KEYserver-only. - Treat these routes as security-sensitive:
app/api/verify-email/route.tsapp/api/reset-password/route.ts
- Do not move service-role Supabase code into shared modules imported by client code.
- Do not use
npm run lintas a read-only check. In this repo it runsnpm run formatand mutates files. - Preferred TypeScript validation:
npx tsc --noEmit --pretty false
- Preferred Jest validation in constrained environments:
env JEST_USE_WATCHMAN=0 npm test -- --runInBand --watchman=false
- Coverage in constrained environments:
env JEST_USE_WATCHMAN=0 npm run coverage -- --runInBand --watchman=false
- Content contract validation:
python3 scripts/check_content_contract.py
npm run buildis valuable for route/layout/global styling changes, but may fail in restricted-network environments because ofnext/font/google.
- Use the repository skills under
.agents/skillswhen the task matches:devverse-ui-routesdevverse-content-mdxdevverse-rag-chatdevverse-supabase-authdevverse-feeds-seodevverse-validatedevverse-refresh-vectors