Thanks for your interest in Clearstack! This project is both a specification and its working proof — contributions to either are welcome.
- Read the README for project overview
- Skim the spec docs in
docs/— especially CONVENTIONS.md - Run
npm run specto see the compliance checker in action
git clone <repo-url>
cd clearstack
npm install # installs deps, vendors hybrids, builds icons
npm run dev # starts server with --watch and .env loading
npm run spec # interactive spec compliance checkerThese are enforced by CI. Your PR will not merge if any fail.
- ≤150 lines per code file. Add
// SPLIT CANDIDATE:comments at ~120 lines. - ≤500 lines per doc file.
- ESLint clean. Semicolons, 2-space indent,
prefer-const,eqeqeq. - Prettier formatted. Run
npm run formatbefore committing. - JSDoc types pass. Run
npm run typecheck. Zero errors. - All tests pass.
npm testruns both node and browser tests.
- Create a branch from
main - Make your changes — keep files under 150 lines
- Add/update tests for anything that could break
- Run
npm run spec all— all 7 checks must pass - Open a PR with a clear description of what and why
The spec is a living document. If your implementation reveals a gap:
- Fix the code
- Update the relevant spec doc in
docs/ - Note the discovery in
docs/BUILD_LOG.mdif it's significant
src/components/{tier}/{tag-name}/
├── {tag-name}.js # Component definition
├── {tag-name}.css # Scoped styles (tag-name nesting)
├── {tag-name}.test.js # Browser tests
└── index.js # Re-export
Then add the CSS import to src/styles/components.css.
- Add JSON Schema + layout to
src/api/schemas.js - Add seed data to
data/seed.json - Create a store model in
src/store/ - The generic CRUD router handles the rest
Add the Lucide icon name mapping to scripts/build-icons.js and run
npm run postinstall.
After each implementation session, ask yourself:
- What patterns did I discover?
- What broke that I didn't expect?
- What tests would catch the bugs I found?
- Did any files grow past 120 lines?
- Does the spec need correction?
Be kind, be constructive, be specific. This project was built through collaborative conversation — contributions should continue that spirit.