Colocate openprose-lint and add deterministic language gates - #145
Colocate openprose-lint and add deterministic language gates#145rawwerks wants to merge 4 commits into
Conversation
|
Follow-up correction after package-shape review: I narrowed I also tightened New local proof from the clean commit: pnpm lint:prose
bash scripts/lint-prose.sh release-packageThe release package dry-run now packages 109 files, 1.1MiB / 272.1KiB compressed, and the package file list contains no @irl-dan i think ready for your review |
Why the crate contains a spec snapshotA visible part of this PR is a curated OpenProse spec bundle under
The snapshot is the better tradeoff because Maintenance is mechanical:
The snapshot is intentionally not the full repo or full example corpus. It |
|
I tightened the packaging/review boundary in two ways so the generated snapshot is still available to the Rust package, but is less prominent as review surface. First, Second, That should keep those files hidden by default in GitHub diffs while still including them for So the intended review path is: review the source docs, sync script, Cargo include allowlist, and package verification gate; treat This does not make the snapshot disappear, but it makes the boundary explicit and gives future changes guardrails as long as we keep using the sync/check/package steps intentionally. |
f3eb414 to
7059b90
Compare
Summary
openprose-lintas a Rust workspace crate undercrates/openprose-lint.scripts/lint-prose.shas the repository-owned deterministic gate for the current OpenProse language surface.pnpm lintand adds explicit advisory and packaging profiles.OpenProse LintGitHub Actions workflow that runs the linter gate on pull requests andmainpushes.cargo publish --dry-run -p openprose-lintproves the crate is self-contained without vendoring the full example/replay corpus.Use Case / Run Evidence
The practical invariant is: when a language surface lands on OpenProse main, the same branch's linter should know how to parse and validate it. Keeping the linter in this repository makes that invariant reviewable in the same PR that changes the language.
This change also gives maintainers a fast deterministic signal before reaching for heavier evaluation:
bash scripts/lint-prose.shchecks the current skill/spec snapshot, linter tests, conformance cases, and bundled examples.bash scripts/lint-prose.sh advisoryreports non-blocking language-surface discovery and optional drift checks.bash scripts/lint-prose.sh packageproves the crate package can be built and verified from the packaged source tree.bash scripts/lint-prose.sh release-packageis the clean-worktree package proof for actual release commits.Design Boundary
The linter lives in
crates/openprose-lintas a normal Cargo package because it is close to the language definition and should evolve with it. The root repository owns the gate script because maintainers and CI should not need to know Cargo internals to ask "does this OpenProse change still lint?"The linter is not moved into the skill/spec docs themselves. The docs remain the human and agent-facing language contract; the Rust crate is the deterministic checker for that contract.
The linter does not decide GitHub Actions policy.
scripts/lint-prose.shis the single reusable entrypoint that can be run locally, from any CI runner, or from GitHub Actions. The workflow is deliberately thin: it installs toolchains and invokespnpm lint:prosepluspnpm lint:prose:package.The packaged spec bundle is intentionally curated. It includes the source files needed for build-time vocabulary extraction, source identity checks, linked language docs, and adapter manifest validation. The full example corpus, replay fixtures, generated TypeScript tests, and world-model binary fixtures remain in the parent repository and are linted from there; they are not part of the crate payload.
Examples
Run the default deterministic gate:
Run non-blocking discovery output:
Verify package self-containment from a review branch:
Verify package self-containment from a clean release commit:
Testing
Validated locally:
Additional targeted checks run during the branch:
bash scripts/lint-prose.sh release-packagewas checked from the clean local commit and passed without--allow-dirty. It packaged 109 files, 1.1MiB / 272.1KiB compressed, verified the packaged OpenProse spec bundle, and validated every packaged adapter manifest from the extracted package tree.The package file list contains no
spec-snapshot/.../examples/,replay/,world-models/, generated TypeScript example tests,generate.ts, or.binfixtures.Post-Merge Sequence
pnpm lint:prosepluspnpm lint:prose:packageonmain.openprose-lintonly from a clean release commit, after maintainer approval, using the documentedrelease-packagegate.openprose/prose-lintrepository to point contributors here, then archive that repository if maintainers agree no active workflow still depends on it.Residual Risk / Follow-ups
pnpm lintnow includes the linter gate. That is intentional for the invariant above, but maintainers should decide whether every warning should stay non-blocking or become blocking over time.jqin addition to Rust/Cargo.