Contributing
Thanks for your interest. Facet is a small project run by one person, with most of the code written by AI agents (how it was built). Issues and merge requests are welcome on GitLab.
Reporting a problem or an idea
Section titled “Reporting a problem or an idea”Open an issue. For a bug, say what you did, what you expected and what happened, and attach the smallest Markdown file that shows it.
For a new feature or a change to the file format, open an issue before writing code. The format combines existing conventions (Markwhen dates, Obsidian Tasks and Dataview fields, OpenFastTrace-style requirement ids) and must stay easy for a person or an agent to read and edit by hand, so new syntax is added with care.
Setting up
Section titled “Setting up”The repository has a devcontainer: open it in VS Code and it runs npm ci
and installs the pre-commit hooks. Without it, install Node 24.2 or later and
pre-commit, then run:
npm ci # build, lint and test toolspre-commit install --install-hooks # commit hooks (they use node_modules)| Command | Does |
|---|---|
npm run build |
compile all packages (tsc -b) and bundle the extension |
npm run typecheck |
strict type check (same as the compile step of build) |
npm run lint |
oxlint (type-aware) and the Prettier check |
npm run format |
format code and JSON with Prettier |
npm test |
Vitest, all packages |
npm run package |
build the VSIX and the CLI tarball into dist-package/ |
pre-commit run --all-files |
every hook, as the pipeline runs it |
The packages are packages/core (the model: parser, scheduler, lint, edits),
packages/cli (the facet command) and
packages/vscode (the extension). Press F5 in VS Code (“Facet: run extension
on examples/workspace”) to build and open examples/workspace in an
Extension Development Host with Facet loaded.
This site lives in site/ (Astro Starlight). To preview it:
cd sitenpm cinpm run devMerge requests
Section titled “Merge requests”- One merge request per issue, from a branch named
<issue>-<slug>, withCloses #<issue>in the description. - Conventional Commits
(
feat(vscode): …,fix(core): …,docs: …); thecommit-msghook checks them, and they decide the release version. Small commits, each one building and passing the tests. - History is semi-linear and not squashed: rebase on
master, and fold fixups into the commit they fix (git rebase -i --autosquash) before the merge request is merged. - The pre-commit hooks run Prettier, oxlint, the type check, the tests,
markdownlint, codespell and gitleaks. Run
pre-commit run --all-filesbefore pushing. The pipeline must pass before a merge request is merged. - New behaviour comes with tests, written first where possible. Test fixtures
and examples are invented:
examples/workspacecovers the whole format,packages/core/demois the tidy demo. - Graphical edits end up as minimal text edits at the right line of the right file: a view never rewrites a whole file.
- Update the docs (this site under
site/,README.md,packages/vscode/README.md) when behaviour changes.
Dependencies and reused code
Section titled “Dependencies and reused code”A new dependency needs a reason, a maintained upstream and a licence from the accepted list: MIT, ISC, BSD, Apache-2.0, 0BSD, BlueOak, and MPL-2.0 only unmodified. The extension build writes the notices of everything it bundles and fails on any other licence.
Copied code must have a clear licence and keep its notice. Markwhen’s
timeline view, for one, has no licence and must not be copied. See
Licence and credits.
Licence of contributions
Section titled “Licence of contributions”Contributions are accepted under the project’s MIT licence.