Problem
Editor tooling for .ferrflow.json depends on a JSON schema that lives at a stable URL. Today it's published on ferrflow.com/schema/ferrflow.json — handy for VS Code / Zed, useless for offline use or pre-commit hooks that can't hit the internet.
Proposal
Bundle the schema into the ferrflow binary via include_str!, and expose a new subcommand:
ferrflow schema [--pretty] [--output <file>]
- Prints the JSON schema to stdout (or
--output).
--pretty formats it.
- Exits non-zero if the bundled schema can't be parsed (sanity check on the build artefact).
Additionally:
Build-time hook
Add a build.rs (or keep it simple with include_str!) that embeds schema/ferrflow.json from the repo root. CI gate: compare the embedded schema against schema/ferrflow.json — fail if they diverge so we can't ship a binary whose schema doesn't match the checked-in source of truth.
Acceptance
ferrflow schema returns the schema with exit 0.
- A user with no internet can run
ferrflow schema > /tmp/schema.json then point VS Code at that local path.
- Pre-commit hooks in CI can validate
.ferrflow.json without any network call.
- The bundled schema matches
schema/ferrflow.json byte-for-byte.
Problem
Editor tooling for
.ferrflow.jsondepends on a JSON schema that lives at a stable URL. Today it's published onferrflow.com/schema/ferrflow.json— handy for VS Code / Zed, useless for offline use or pre-commit hooks that can't hit the internet.Proposal
Bundle the schema into the
ferrflowbinary viainclude_str!, and expose a new subcommand:--output).--prettyformats it.Additionally:
ferrflow init(feat(init): auto-discover monorepo packages from workspace config #333) uses the bundled schema to validate the generated file right after writing.ferrflow doctor(feat(cli): ferrflow doctor diagnostic subcommand #363) uses it too for its "config parses" check.ferrflow.com/schema/ferrflow-v3.json, so editor integrations can pin to a specific major.Build-time hook
Add a build.rs (or keep it simple with
include_str!) that embedsschema/ferrflow.jsonfrom the repo root. CI gate: compare the embedded schema againstschema/ferrflow.json— fail if they diverge so we can't ship a binary whose schema doesn't match the checked-in source of truth.Acceptance
ferrflow schemareturns the schema with exit 0.ferrflow schema > /tmp/schema.jsonthen point VS Code at that local path..ferrflow.jsonwithout any network call.schema/ferrflow.jsonbyte-for-byte.