feat: add canonical workspace verification - #8
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 950822a. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR introduces workspace-kit verify as the canonical offline verification gate that composes config validation, configured doctor checks, optional registry validation (when registry.project is configured), and a wiki catalog drift check. It also adds declarative registry ownership/shape policies and updates scaffolds/tests/docs to adopt the new verification contract.
Changes:
- Add
workspace-kit verify [--json]and refactordoctorinternals to share a report-building path. - Add registry policies
allowedOwners,mustContain, andmaxEntries, including config-side contradiction checks and enforcement in static registry validation. - Update init scaffolds, smoke checks, tests, and documentation to be “verify-green” by default and to describe the new contract.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/registry.test.ts | Adds coverage for new registry policy enforcement (allowedOwners, mustContain, maxEntries). |
| test/init.test.ts | Updates init expectations from “doctor-green” to “verify-green” and asserts new scripts/hooks. |
| test/config-version-handoff.test.ts | Extends config parsing/validation tests for the new registry policy fields and contradictions. |
| test/cli-commands.test.ts | Adds verify --json contract test and adjusts wiki backfill tests for seeded catalogs. |
| src/init.ts | Updates scaffold scripts to call verify and seeds initial wiki catalogs for personal/runtime profiles. |
| src/config.ts | Parses and validates new registry policy fields and performs cross-field contradiction checks. |
| src/cli.ts | Adds verify command and refactors doctor output into a reusable report for composition. |
| src/checks/wikiBackfill.ts | Adds repoRoot support and tweaks daily-log catalog generation behavior and links. |
| src/checks/registry.ts | Enforces maxEntries, allowedOwners, and mustContain during static registry validation. |
| scripts/smoke-package.mjs | Switches installed-tarball smoke from separate validate steps to verify. |
| README.md | Updates quick usage and command contract docs to emphasize verify as the canonical gate. |
| docs/convention.md | Documents the new verification and registry policy contracts and scaffold expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
Add one offline verification command and declarative project-registry ownership policies.
Changed
workspace-kit verify [--json]as the canonical config, doctor, registry, and wiki-catalog gateallowedOwners,mustContain, andmaxEntriesregistry policies with contradiction checksReview aids
Risks
verifyadds configured registry and wiki-catalog checks without network accessVerification
pnpm run verifyrelease gateComplexity
The doctor evaluator is shared with
verify; policy parsing stays at the config boundary and registry enforcement stays in the existing static validation phase.Note
Medium Risk
Changes the canonical validation entry point and CI/pre-commit behavior;
verifyadds registry and wiki-catalog failures that were previously separate commands, though existing standalone commands are unchanged.Overview
Introduces
workspace-kit verifyas the single offline local/CI gate: it parsesworkspace.jsononce, runs the same checks asdoctor, optionallyregistry validatewhenregistry.projectis set, and awiki backfilldry-run drift check whenwikiis configured.verify --jsonmirrorsdoctor --jsonwith extraconfig,registry, andwikiBackfillcheck keys; unknown config keys surface as warnings here (not only inconfig validate).Registry gains declarative policies
allowedOwners,mustContain, andmaxEntries, parsed in config with cross-field validation and enforced in static registry validation before checkout inspection.Init/scaffold shifts to
verify-green defaults:package.jsonscripts callworkspace-kit verify, pre-commit hooks runnpm run verify, fresh personal/runtime scaffolds seed wiki catalogs viawikiBackfillwith an explicitrepoRoot, and docs describe adoption aroundverifyinstead of chainingdoctor+ separate registry steps.Reviewed by Cursor Bugbot for commit 950822a. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds
workspace-kit verifyas the single offline gate for local and CI, and introduces declarative registry ownership policies to strengthen project registry validation. Simplifies scaffolds to be verify-green and updates docs and tests accordingly.New Features
workspace-kit verify [--json]: validates config, runs configureddoctor, includesregistry validatewhenregistry.projectis set, and checks wiki backfill drift. Emits one JSON object with--json.allowedOwners,mustContain, andmaxEntries(with contradiction checks). Enforced byregistry validateand included inverify.verifypre-commit hook.verifyandconfig validate. Scaffolds settestto runverify.Migration
doctor+registry validatesteps withworkspace-kit verify(ornpm run verify).registry.projectto enable registry checks inverify. Use the newallowedOwners,mustContain, andmaxEntriesas needed.verifydoes not runwiki stale; keep calling it explicitly if you rely on history-based staleness.Written for commit 950822a. Summary will update on new commits.