chore: scaffold Next.js 15 + Supabase clients + vitest
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# IMS Project Initialization Design
|
||||
|
||||
**Date:** 2026-07-09
|
||||
**Scope:** CLAUDE.md + memory notes + Obsidian wiki — no code scaffold
|
||||
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
HSE Incident Management System for Setia Corporation (3PL warehouse). Replaces WhatsApp/Excel-based safety reporting. Full requirements in `docs/01_PRD...`, tech spec in `docs/02_Technical_Specification...`, roadmap in `docs/03_Development_Roadmap...`.
|
||||
|
||||
Three docs total ~7,000 words. Reading them every Claude session wastes tokens. Goal: distill into structured memory files + lean CLAUDE.md so future sessions load targeted context instead of raw docs.
|
||||
|
||||
---
|
||||
|
||||
## Approach: Lean CLAUDE.md + Rich Memory (Approach A)
|
||||
|
||||
**Why:** CLAUDE.md stays operational (<80 lines), memory files scoped by topic, Obsidian graph shows relationships between topics. Best token efficiency across multi-session builds.
|
||||
|
||||
---
|
||||
|
||||
## Files Created
|
||||
|
||||
### 1. `/Users/yapweeihan/Desktop/Projects/IMS/CLAUDE.md`
|
||||
Claude-facing instructions only:
|
||||
- Stack + versions (Next.js, Supabase, Vercel, Claude API, Resend, WhatsApp Business)
|
||||
- Current phase (Phase 0 — not started)
|
||||
- Dev conventions (RLS always enforced, API keys server-side only, never commit .env)
|
||||
- graphify rules (query before browsing)
|
||||
- Pointer to memory files for deep context
|
||||
|
||||
### 2. `~/.claude/projects/-Users-yapweeihan-Desktop-Projects-IMS/memory/`
|
||||
Five per-topic files:
|
||||
- `project_overview.md` — client, objectives, user roles, success metrics
|
||||
- `architecture.md` — stack choices + rationale, module diagram
|
||||
- `db_schema.md` — all 10 tables, key fields, RLS rules, pgvector note
|
||||
- `phases.md` — 4 phases with deliverables; current phase marker updated each session
|
||||
- `compliance.md` — Malaysia NADOPOD 2004 rules, JKKP 6/7/8 triggers, 5-year retention
|
||||
|
||||
### 3. `~/Desktop/ClaudeVault/`
|
||||
Obsidian vault additions:
|
||||
- `IMS-memory/` symlink → memory dir (live-updating)
|
||||
- `IMS/wiki.md` — condensed human+Claude-readable summary of all 3 docs with `[[wikilinks]]` to memory files
|
||||
|
||||
---
|
||||
|
||||
## Conventions
|
||||
|
||||
- Memory `phases.md` gets updated at the start of each build phase (Phase 0 → 1 → 2...) so Claude always knows where we are.
|
||||
- CLAUDE.md never grows beyond 100 lines; deep context lives in memory.
|
||||
- Obsidian graph view shows `[[project_overview]]` → `[[architecture]]` → `[[db_schema]]` → `[[phases]]` → `[[compliance]]` topology.
|
||||
- All memory files use frontmatter (`type`, `name`, `description`) consistent with the global memory system.
|
||||
|
||||
---
|
||||
|
||||
## Verification
|
||||
|
||||
1. `cat /Users/yapweeihan/Desktop/Projects/IMS/CLAUDE.md` — under 100 lines, readable in one scroll.
|
||||
2. `ls ~/.claude/projects/-Users-yapweeihan-Desktop-Projects-IMS/memory/` — 5 .md files + MEMORY.md index.
|
||||
3. Obsidian vault `ClaudeVault` shows `IMS-memory/` folder and `IMS/wiki.md`.
|
||||
4. Obsidian Graph View shows `[[wikilinks]]` between IMS memory notes.
|
||||
5. Future Claude session: reading MEMORY.md index + one targeted memory file is enough to answer "what phase are we in?" and "what is the db schema?" without reading the raw docs.
|
||||
Reference in New Issue
Block a user