core

module
v0.1.0-rc.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0

README

FACET

FACET

Keep your product's features, code and tests from drifting apart.

CI

Website · Specification · Authoring guide · Changelog


FACET describes each named capability of your product in a YAML record and connects it to the source that implements it with @facet: comments. The facet command checks both directions: every active record has code, and every comment has a record.

Version 0.1.0-rc.5, specification edition 0.1.0. This is a release candidate; commands, flags, Go APIs, MCP tools and schemas may still change before 0.1.0.

Quick start

In the root of your project:

npx facet-framework@0.1.0-rc.5 init

init writes the record layout, schemas, specification, lint tools and a CI workflow. Existing files are kept unless you pass --force.

Pick one capability your project already has and describe it in docs/facets/features/<domain>/<capability>/<feature>.yaml. Mark the code that implements it with a @facet: <domain>/<capability>/<feature> comment. The minimal example shows a complete record and anchor.

Then check it:

npx facet-framework@0.1.0-rc.5 lint

Install

npm (Node.js 18+, Linux, macOS or Windows on x64 or arm64). Release candidates use the npm tag next, so name the version:

npm install --save-dev facet-framework@0.1.0-rc.5
npx facet lint

Release archives. Each release carries one archive per platform (facet_<version>_<os>_<arch>) and a checksums.txt:

version=0.1.0-rc.5
archive="facet_${version}_linux_amd64.tar.gz"
base="https://github.com/facet-framework/core/releases/download/v${version}"
curl -fsSLO "$base/$archive"
curl -fsSLO "$base/checksums.txt"
grep "  $archive\$" checksums.txt | sha256sum --check   # macOS: shasum -a 256 --check
tar -xzf "$archive" facet
./facet version

Commands

Command Purpose
facet init Set up FACET in a project.
facet lint Check records against their schema and the source they anchor.
facet drift Report anchored source that changed without its record.
facet test Run the test commands a project declares.
facet docs site Build a documentation site from the registry.
facet mcp Serve the registry to agents over MCP (stdio).
facet lsp Hover, go-to-definition and diagnostics for @facet: anchors.
facet setup Report and complete a project's FACET setup.

facet --help lists every command.

Browser reader

facet ui asks before downloading FACET Atlas on its first run. Atlas is a separate product licensed under AGPL-3.0. Use facet ui --yes in scripts to authorize the download.

Claude Code and Codex

One plugin serves both hosts. It adds skills for writing records and placing anchors, hooks that check records as you edit, and the registry MCP server.

Claude Code, inside a session:

/plugin marketplace add facet-framework/core
/plugin install facet@facet-framework

Codex, from a terminal:

codex plugin marketplace add facet-framework/core
codex plugin add facet@facet-local

Codex starts the registry MCP server from a facet CLI on PATH; see docs/CODEX.md for that setup, skill invocation and the differences between the hosts.

Documentation

License

Apache-2.0. Third-party notices are in NOTICE and THIRD_PARTY.md. See CONTRIBUTING.md to contribute and SECURITY.md to report a vulnerability.

Directories

Path Synopsis
cli
@facet: authoring/guardrails/adr-status-proposal @facet-role: related
@facet: authoring/guardrails/adr-status-proposal @facet-role: related
scaffold
Package scaffold writes FACET into a project that does not have it: the record layout, the JSON schemas, the specification, the lint suite with its pinned dispatcher, an empty scan filter and the CI workflow.
Package scaffold writes FACET into a project that does not have it: the record layout, the JSON schemas, the specification, the lint suite with its pinned dispatcher, an empty scan filter and the CI workflow.
cmd
atlas-pin command
Command atlas-pin converts release metadata for scripts/atlas-pin.sh.
Command atlas-pin converts release metadata for scripts/atlas-pin.sh.
facet command
Command facet is the FACET Core CLI: the registry, linter, hooks and MCP server, without a browser application or embedded front-end assets.
Command facet is the FACET Core CLI: the registry, linter, hooks and MCP server, without a browser application or embedded front-end assets.
@facet: delivery/distribution/registry-snapshot @facet-role: related
@facet: delivery/distribution/registry-snapshot @facet-role: related
docs
integrations
Package integrations contains the remote API's versioned wire contract.
Package integrations contains the remote API's versioned wire contract.
examples
internal
docsite
@facet: navigation/documentation/guided-documentation @facet-role: primary
@facet: navigation/documentation/guided-documentation @facet-role: primary
remote
Package remote implements the published, read-only integration boundary.
Package remote implements the published, read-only integration boundary.
sourceview
Package sourceview resolves portable repository identities to exactly one local checkout per repository for one command invocation.
Package sourceview resolves portable repository identities to exactly one local checkout per repository for one command invocation.
spec
Package spec reads specification sources and pins their addressable units.
Package spec reads specification sources and pins their addressable units.
pkg
filelock
@facet: registry/integrity/runner-test-discovery @facet-role: related
@facet: registry/integrity/runner-test-discovery @facet-role: related
productplugin
Package productplugin defines the portable executable product protocol.
Package productplugin defines the portable executable product protocol.
@facet: navigation/retrieval/registry-index @facet-role: related
@facet: navigation/retrieval/registry-index @facet-role: related
@facet: authoring/guardrails/adr-status-proposal @facet-role: primary
@facet: authoring/guardrails/adr-status-proposal @facet-role: primary
Package release describes the running build independently of data formats.
Package release describes the running build independently of data formats.
Package schema provides the canonical schemas used by the spec parser.
Package schema provides the canonical schemas used by the spec parser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL