How it was built
Almost all of Facet’s code, tests and documentation were written by AI agents: Claude Code running Claude Opus. One person directs the work and owns the product: the file format, how each view looks and behaves, what gets built next and what is left out.
That is the first thing a careful user should know, so it is said here plainly. It is not a reason to trust the code. The premise of the project is the opposite: code written by a model has to prove itself more than code written by hand, not less.
A model writes code that compiles, reads well and is wrong. It writes a test that runs a line without checking anything that matters. It “tidies” a line whose oddness was the fix. So Facet is built on checks that do not care who wrote a change, plus a person who tries every change before it ships. This page lists those checks, the practices around them, what did not work, and the limits, with the commands to verify each claim.
Who decides what
Section titled “Who decides what”The maintainer decides the product. The format has to stay plain Markdown that a person or an agent can read and edit by hand, so every piece of syntax is a product decision: Facet reuses existing conventions (Markwhen dates, Obsidian Tasks and Dataview fields, OpenFastTrace-style requirement ids) rather than inventing its own. The maintainer also uses Facet every day for real planning, and what breaks or annoys there becomes the next piece of work.
The agents decide technical details within those choices: internal module design, which library to use after checking it, small details the format leaves open.
What gates a change
Section titled “What gates a change”Every commit runs these checks as pre-commit hooks, and the GitLab pipeline runs them again on every merge request:
- Tests. Vitest over all packages: the model, the CLI, the extension host code and the webview components (rendered in happy-dom). Over 3,000 tests at the time of writing.
- Type check.
tsc -bin strict mode, plusnoUncheckedIndexedAccessandexactOptionalPropertyTypes. - Lint and format. oxlint with type-aware rules (no floating promises,
no unsafe
any), warnings treated as errors; Prettier. - Docs. markdownlint and codespell on every Markdown file, this site included.
- Secrets. gitleaks on every commit.
- Hygiene. YAML and JSON syntax, merge-conflict markers, large files, line endings.
- Commit messages. commitlint: every commit follows Conventional Commits, which decide the release version.
- Licences. The extension and CLI builds list every bundled module’s licence and fail on any licence outside an accepted list (MIT, ISC, BSD, Apache-2.0, 0BSD, BlueOak; MPL-2.0 only unmodified).
- Package checks. The VSIX is written by Facet’s own tested code, which refuses what the Marketplace would refuse or show broken: an SVG icon, and README images that are relative, SVG or not https.
Two groups of tests carry most of the weight, because they test the promises Facet makes rather than single functions.
Round-trip edits. Facet’s main promise is that a graphical edit becomes a minimal text edit and nothing else. A round-trip test takes the example workspace and, for every node in it, renames it, sets and removes each of its properties, changes its state, moves it, deletes it and edits its description. After each edit it parses the files again and checks two things: the change reads back as intended, and every other node is exactly as it was. That is over 800 cases generated from one invented workspace.
Lint examples. examples/workspace is an invented workspace that uses
the whole file format, including a folder of
deliberately broken files. Each file states in a comment at its top the lint
results it must give, such as
<!-- lint: warning owner-away (…) -->, and a test checks that lint gives
exactly those, no more and no fewer. A new lint rule or a parser change that
shifts any result fails the suite.
Practices
Section titled “Practices”Tests first. Each unit starts from a failing test that states the behaviour, then the code that makes it pass. Bug fixes start with a test that reproduces the bug.
Independent review of every change. Before a change is merged, a separate agent session that did not write it reads the whole diff against the coding standards and the description of what was asked, and looks for ways it can fail: edge cases, wrong assumptions, missing tests. It changes nothing; its findings are checked one by one and the real ones fixed.
Dependencies are vetted before they are added. A new package needs a reason, and is checked first: that it is the real package from the real publisher, that it is maintained, its registry signatures, and the licence of everything it pulls in. Fewer dependencies is the default: the VSIX, for one, is written by about 500 lines of Facet’s own tested code instead of the usual packaging tool and its large dependency tree.
A person tries every view. Unit tests do not show whether a drag feels right or a shortcut works. The views are first driven in a real headless Chromium, then the maintainer installs the build and tries each change in VS Code before it is merged.
Minimal text edits. No view and no command ever rewrites a whole file. An edit touches only the characters that must change, at the right line of the right file, so your formatting and notes survive and a diff of a Facet edit is as small as one made by hand.
Invented data only. Examples, test fixtures and screenshots use invented projects, people and dates. No real plan or personal data goes into the repository.
Reused code keeps its licence. Facet uses the Markwhen parser for dates as an unmodified MIT dependency. Markwhen’s timeline view has no licence, so none of it was copied.
What did not work
Section titled “What did not work”- Unit tests were not enough for views. An early view passed all its unit tests and still had dead keyboard shortcuts in a real browser. Since then every view is driven in headless Chromium before a person tries it.
- Undo inside the Facet panel did not work reliably next to the text editor’s own history. It was dropped: edits go into the Markdown, and Ctrl+Z in the editor undoes them.
- A Facet “Open With” editor was planned and dropped once the side bar and Facet tabs proved enough.
The limits
Section titled “The limits”- One maintainer. Product decisions, QA and merges rest on one person. There is no second human reviewer.
- Preview. The extension is published as Preview: the format and the views can still change between releases.
- Views are tested mostly in Chromium and VS Code. The webviews are checked in headless Chromium and in VS Code on the maintainer’s setup. Other editors built on VS Code, other operating systems and screen readers get little or no testing.
- Review is done by a model too. The independent review is a separate agent, not a person. It catches a lot, but it shares blind spots with the model that wrote the code; the human QA covers behaviour, not every line.
- Gates are only as good as their tests. The suite is large, but there is no coverage floor, mutation testing or fuzzing; a test that checks too little still passes.
- Hooks are local. A commit can skip the hooks with
--no-verify; the pipeline repeats the checks, but nothing beyond the maintainer’s own discipline stops a merge. - Small user base. Most real use so far is the maintainer’s own. Bugs that only other planning styles reveal are still to be found: report them.
Verify it yourself
Section titled “Verify it yourself”The repository is public, and every claim above is a command:
git clone https://gitlab.com/foreachexists/products/facet.gitcd facetnpm ci
# The hooks every commit runs, and the pipelinecat .pre-commit-config.yaml .gitlab-ci.yml
# Every hook, as the pipeline runs it (needs pre-commit installed)pre-commit run --all-files
# The tests, the type check and the lintersnpm testnpm run typechecknpm run lint
# The round-trip edit tests and the lint example tests on their ownnode_modules/.bin/vitest run packages/core/src/edit-roundtrip.test.tsnode_modules/.bin/vitest run packages/core/src/lint-examples.test.ts
# The results each example file says it must givegrep -r "lint:" examples/workspace
# Build, lint the example workspace with the CLI, and see the bundled licencesnpm run buildnode packages/cli/dist/bin.js lint examples/workspacecat packages/vscode/dist/THIRD-PARTY-NOTICES.mdnpm test ends with the number of test files and tests. At the time of
writing that is 77 files and 3,168 tests; it will have moved by the time you
run it. The point is that it is a command, not a claim.