feat(436): OWM parser-class lint (dangling refs, annotation reuse, pipeline range, style typos)#480
Merged
Merged
Conversation
Adds the four parser-class checks called out in the issue's failure-class list, plus an explicit coexistence note describing how this hook divides work with the future Mermaid block validator from sibling issue #435. Background on the parser choice: the `wardley-script-parser` package the issue referenced does not exist on npm; the real upstream `wmlandscape` ships the full OnlineWardleyMaps React renderer (894 KB, depends on React/MUI/Next/lodash) — not usable from a Node hook. Pulling that in would also conflict with the "millisecond budget" the issue called out. Implemented as inline state-machine checks so the hook stays self- contained and zero-install for plugin distribution. New checks (all run inside the single OWM-block walk): 1. Dangling references — `evolve` / `pipeline` / edge endpoints must target a name declared by `component` / `anchor` / `note` / `submap` / `market` earlier in the same block. Reports first-seen line per (name, kind) to keep output short. 2. Annotation index reuse — each `annotation N [...]` ID must be unique; duplicates report the prior line number. 3. Pipeline range — `pipeline NAME [v1, v2]` endpoints must both sit in [0.00, 1.00] and `v1 < v2`. Coord regexes updated to accept a leading `-` so out-of-range negative values trigger the range check instead of silently failing the pattern match. 4. OWM style whitelist — `style NAME` must be one of `wardley`, `colour`, `plain`, `handwritten`, `dark`. Catches the typos called out in the issue (`wardely`, `handritten`, …). Coexistence with #435 (item 4 of the suggested scope): - This hook owns OWM / `wardley`-fenced blocks. - The narrow `wardley-beta` Mermaid bare-digit check stays here — it targets a Wardley-template-specific rendering trap, not general Mermaid correctness. - General Mermaid validation (ER, flowchart, sequence, etc.) belongs to #435's `mermaid-block-scanner`. The two hooks parse different blocks within the same Wardley template, with no overlap. Documented in the hook docstring and in `arckit-claude/hooks/README.md`. Smoke tests: - Clean OWM block: no output (allow) - Every new check trigger: blocks with categorised report - TechnoGadget example from the wardley-mapping skill: no false positives - Pipeline `[-0.1, 1.5]`: range error captured (regex no longer hides it) - Component `[-0.3, 0.85]`: range error captured Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
royster70
added a commit
to royster70/arc-kit
that referenced
this pull request
May 16, 2026
Round-3 review (tractorjuice#441 comment 4459176602) flagged converter drift on the PR branch ~2 days behind main. Rebased onto upstream/main (v4.21.0 release set: tractorjuice#460-462, tractorjuice#463-465, tractorjuice#467, tractorjuice#470-477, tractorjuice#480) and re-ran `python scripts/converter.py` to regenerate the 5 extension formats from current sources. Drifts picked up: - AU command/prompt/skill files brought into consistency with current `project_template_overrides` rewrite (`.arckit/templates/` -> `.arckit/templates-custom/` in the "Then" row; CA/UAE files already reflect this pattern) - `pages`, `framework`, `uae-priorities-alignment` extension outputs regenerated from upstream source updates - Skill SKILL.md files (`architecture-workflow`, `mermaid-syntax`, `plantuml-syntax`, `wardley-mapping`) regenerated for tractorjuice#455/tractorjuice#480 changes - `config/doc-types.mjs`, `docs/guides/custom-commands.md`, `templates/pages-template.html`, `plugin.json`, and `arckit-paperclip/src/data/commands.json` propagated CHANGELOG conflict resolved: AU round-2/AI6 entries moved to the re-opened [Unreleased] section above the new [4.21.0] block. Reviewer's "neighbourly fix" (`.arckit/templates/data-source-profile-template.md`) no longer needed — already tracked in upstream/main. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Replaces #479, which auto-closed when its base branch was deleted on #477's merge. Rebased onto main; single commit.
Covers items 2 (parser-class failures) and 4 (coexistence with #435) from the owner's suggested scope on #436.
Parser choice (why no npm dep)
The
wardley-script-parserpackage the issue referenced doesn't exist on npm. The real upstreamwmlandscape(v3.0.1) is the full OnlineWardleyMaps React renderer — 894 KB, depends on React/MUI/Next/lodash. Not usable from a Node hook, and pulling it in would blow the millisecond budget the issue called out.Implemented as inline state-machine checks: zero install, fits the budget, keeps the plugin self-contained.
New checks (all run inside the single OWM-block walk)
evolve/pipeline/ edge endpoints must target a name declared bycomponent/anchor/note/submap/marketearlier in the same block. Reports first-seen line per (name, kind).annotation N [...]ID must be unique; duplicates report the prior line number.pipeline NAME [v1, v2]endpoints both in[0.00, 1.00]andv1 < v2. Coord regexes updated to accept a leading-so out-of-range negatives trigger the range check instead of silently failing the pattern match.style NAMEmust be one ofwardley,colour,plain,handwritten,dark. Catches the typos called out in the issue (wardely,handritten, …).Coexistence with #435 (item 4)
Doc-only:
wardley-fenced blocks.wardley-betaMermaid bare-digit check stays here — Wardley-template-specific rendering trap.mermaid-block-scanner. No overlap.Spelled out in both the hook docstring and
arckit-claude/hooks/README.md.Test plan
[-0.1, 1.5]→ range error captured[-0.3, 0.85]→ range error capturedmarkdownlint-cli2 arckit-claude/hooks/README.md→ 0 errors/arckit:wardleyagainst a test repo🤖 Generated with Claude Code