git clone https://github.com/MattDevy/pi-continuous-learning.git
cd pi-continuous-learning
npm installNode.js >= 18 required.
npm test # run all tests
npm test -w packages/pi-continuous-learning -- src/foo.test.ts # run a single file
npm test -w packages/pi-continuous-learning -- -t "pattern" # run tests matching a name
npm run typecheck # type-check without emitting
npm run lint # ESLint
npm run check # tests + lint + typecheck (mirrors CI)All three checks must pass before submitting a PR. CI runs them automatically.
CI also runs MegaLinter which checks YAML/JSON formatting (Prettier), Markdown, shell scripts, spelling, and secret scanning. You can run the same checks locally before pushing — requires Docker.
npm run lint:mega # lint changed files (matches CI behaviour)
npm run lint:mega:fix # auto-fix formatting issuesWith --fix, MegaLinter writes formatting changes directly to your files. Review the diff and commit the results.
VALIDATE_ALL_CODEBASEis set tofalsein.mega-linter.yml. In CI this means only PR-changed files are linted. Locally, MegaLinter falls back togit diff— so staged and modified files are checked.
Follow Conventional Commits:
feat: add new feature
fix: correct a bug
docs: update documentation
ci: changes to CI/CD
chore: maintenance tasks
refactor: code change with no behaviour change
test: add or update tests
Releases are automated via Release Please, which reads commit messages to generate the changelog and bump the version. A feat: triggers a minor bump; fix: a patch; feat!: or BREAKING CHANGE: a major.
- ESM project — imports need
.jsextensions even for.tssources - Strict mode with
noUncheckedIndexedAccessandexactOptionalPropertyTypesare enabled — array access returnsT | undefinedand optional properties cannot be assignedundefinedexplicitly - Prefix intentionally unused parameters with
_ console.warnandconsole.errorare allowed;console.logandconsole.infoare not
- Keep PRs focused on a single concern
- Add tests for new behaviour — coverage threshold is 80% for branches, functions, lines, and statements
- The existing tests are a good reference for style and structure