feat(schema): introduce group-level process variable schema system#98
Draft
HanselIdes wants to merge 1 commit intomainfrom
Draft
feat(schema): introduce group-level process variable schema system#98HanselIdes wants to merge 1 commit intomainfrom
HanselIdes wants to merge 1 commit intomainfrom
Conversation
Two schemas cover all processes in each group:
solutions/variables.schema.json — 114 variables across all solutions
quick-start/variables.schema.json — 1 variable (meal)
Both validate against schema/process-variables.meta-schema.json.
Toolchain (tools/schema/):
extract-variables.mjs — --extract/--check/--dead modes; reads BPMN
(bpmn-moddle), DMN, forms, and CPT test JSON; --group flag targets
the full solutions/ or quick-start/ tree
lint-naming.mjs — camelCase enforcement; gated by enforceNaming flag
(false until issue #96 snake_case migration lands)
find-similar-variables.mjs — Signal A (Levenshtein name similarity
within group) + Signal B (Jaccard property-set overlap cross-group)
Config:
.variable-schema.config.json — convention, scope, enforceNaming
CODEOWNERS — @HanselIdes owns schema/ and both vocabulary files
.github/workflows/variable-schema.yml — CI: detect changed group,
validate schema, check unregistered variables, lint naming; dead
scan and similarity advisory; cascade warning on schema/ changes
CLAUDE.md added to document delegated-mode autonomy and schema
maintenance playbook for the ci-agent.
Closes #95 (implementation complete; issue #96 tracks migration).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #95
Summary
solutions/variables.schema.json(114 variables) andquick-start/variables.schema.json(1 variable)schema/process-variables.meta-schema.jsonloan.amount) are resolved to their root variable (loan)Toolchain (
tools/schema/)extract-variables.mjs--extractbootstraps a schema;--checkfails CI on unregistered variables;--deadflags candidates for DEAD markinglint-naming.mjsenforceNaming: falsein config until issue #96 (snake_case migration) landsfind-similar-variables.mjsCI (
.github/workflows/variable-schema.yml)Triggers on changes to BPMN, DMN, form, test JSON, or schema files. Detects which group changed and runs: validate meta-schema → check unregistered variables → lint naming. Dead scan and similarity run as advisory jobs after check passes. A cascade warning posts to the job summary when
schema/itself changes.Test plan
node tools/schema/extract-variables.mjs --check --group solutionsexits 0node tools/schema/extract-variables.mjs --check --group quick-startexits 0node tools/schema/lint-naming.mjs --group solutionsexits 0 (notices for 29 snake_case variables, no errors whileenforceNaming: false)node tools/schema/find-similar-variables.mjsexits 0 with advisory output--checkto exit 1 with a GitHub annotationenforceNaming: true🤖 Generated with Claude Code