Repository navigation
Collect explicitly requested rule entries and localize the rule view - #40
Merged
Qiuner merged 3 commits intoNov 14, 2026
Merged
Conversation
- discover-constraints: new repeatable --entry option (and entries API option) for projects that keep their rules outside AGENTS/CLAUDE files, such as CONTEXT.md. Missing or non-Markdown paths are reported in coverage.unresolved. - constraint-rule-view: generated text follows the architecture map language. zh maps keep the Chinese text; other languages get English, as described in references/bilingual.md. The legacy default without a language stays Chinese. - Tests for both changes; documentation updated in English and Chinese.
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.
Problem 1. The constraint collector only starts from AGENTS, CLAUDE, GEMINI and SKILL files, CONTRIBUTING.md, Copilot instructions and Cursor rules. Projects that keep their rules in another file, such as CONTEXT.md, get an empty catalog and the delivery ends with no rules at all. On a real Godot project the collector found 0 sources. 2. The rule view text is hardcoded in Chinese (src/constraint-rule-view.mts). A map authored in another language, for example pt-BR, shows Chinese headings and labels mixed with English controls, which contradicts references/bilingual.md ("other languages use English controls with authored project text"). ## Changes - discover-constraints: new repeatable
--entry <path>option (and anentriesoption in the API). Requested files are treated as instruction entries and their local Markdown references are followed. Missing or non-Markdown paths are reported incoverage.unresolvedinstead of failing. - constraint-rule-view: generated text follows the architecture map language. Maps in zh keep the existing Chinese text; any other language gets English. Without a language the legacy default stays Chinese, so existing outputs do not change. - render and render-constraints pass the map language to the rule view. - references/constraint-graph.md and .zh.md document--entry; docs/i18n.json updated with check-docs --update. ## Tests - New test: explicit entries are collected, referenced files are followed, and missing or non-Markdown entries land in coverage.unresolved. - New test: no CJK text in the rule view for pt-BR and en maps; Chinese text kept for zh-CN and for the legacy default. - Both new tests fail on the previous code (the option and the language parameter did not exist). - npm test: 101 passed, 0 failed. npm run check:build and scripts/check-docs.mjs pass. - On the Godot project mentioned above: 0 sources before, 11 sources and 192 sections with--entry CONTEXT.md --entry README.md.Maintainer completion
Generated rule content now follows language changes after the page opens, including category cards, coverage, directory/source documents and open detail dialogs. Authored rules and source quotations retain their original text. Selection, grouping, filters and camera state are preserved.
Added browser regression coverage for Chinese/English switching, directory and dialog content, mobile layout and initial language selection. Updated both constraint-graph guides and regenerated distribution artifacts and the demo.
Validation: local
npm run check:prpassed (101 unit tests and all browser suites), andnpm run check:installpassed on the committed snapshot. Desktop English and mobile Chinese screenshots were inspected. The browser CI runner is pinned to Ubuntu 24.04 because Playwright 1.56.1 cannot install Chromium on the new Ubuntu 26.04ubuntu-latestimage.