Logbook
Daily reflections, progress, and lessons learned
Knowledge base markdown import.
Wanted the RAG knowledge base to pull straight from the markdown files I keep at the repo root. Added a markdown importer accessible from admin (POST /admin/kb/import-files) and as a CLI command (php spark kb:import-files). Each imported chunk gets lightweight keywords extracted from the markdown-as-text — improves the keyword/LIKE pass.Added chunk metadata fields (chunk_index, total_chunks) and a chunks navigation panel in the admin KB editor so I can step through parent and child chunks of long docs.The RAG pipeline now normalises markdown and HTML to plain text both for relevance scoring and for the prompt context — no more raw markdown tokens leaking into prompts.Two MySQL strict-mode bugs to fix: the KB importer was saving chunk_index/total_chunks as NULL on single-chunk docs, and the admin KB index page was passing no view data so the "Recent Entries" panel was always empty. Both fixed.
Strict modes catch silent bugs that loose modes hide for months.
Pages, dark logo, cleanup.
Built the static Pages module today — pages table and admin CRUD. This is where legal pages, About, anything else freeform lives. Also added dark-logo support to settings (different logo for dark backgrounds) and an updated_at column on the messages table. Then removed the legacy media tables — they were from an older design I never used.
Delete dead tables. They drag every migration that comes after.
Favicons.
One migration: AddFaviconToSettings. Site needs its little square in browser tabs. Done.
Even a one-line ship is a ship.
Schema cleanup.
FixSeoSettingsColumns migration. Some column definitions on the SEO settings table were wrong — sizes, defaults. Cleaned them up. Boring but necessary.
Schema mistakes get exponentially harder to fix later. Catch them early.
Social fields and SEO for diary entries.
Smaller day, mostly polish. Added Facebook and Instagram fields to settings (the social fields had been split across two migrations earlier in the day — consolidated them). Added SEO columns to diary_logs so logbook entries get proper meta titles and descriptions. Made social_post.account_id nullable — a scheduled post can exist before being assigned to an account.
Nullable foreign keys can be the right answer when the workflow allows it.