docs(agents): define OS_ env-var naming structure rule#2493
Merged
Conversation
Prime Directive #9 only mandated the `OS_` prefix; the *shape* was undocumented, so new vars drifted (e.g. a bare `OS_PINYIN_SEARCH` for a boolean flag). Codify the structure observed across the existing vars: - `OS_{DOMAIN}_{FEATURE}[_QUALIFIER]` — domain-grouped (AUTH/CORS/SSO/…) - boolean flags → `_ENABLED` suffix (OS_SSO_ENABLED, OS_SEARCH_PINYIN_ENABLED) - config values → `OS_{DOMAIN}_{NAME}` (OS_CLOUD_URL, OS_LOG_LEVEL) - escape hatches → `OS_ALLOW_{X}`; opt-outs → `OS_SKIP_/OS_DISABLE_` - test-only → `OS_TEST_*`/`OS_EXPECT_*` Pre-existing non-conforming vars (OS_METADATA_WRITABLE, OS_EAGER_SCHEMAS, OS_SERVER_TIMING) flagged as debt, not precedent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
背景
Prime Directive #9 只规定了
OS_前缀,结构没定义。结果新变量飘:讨论 #2486(通用拼音搜索)时取了个裸名OS_PINYIN_SEARCH当布尔开关,既无域分组也无_ENABLED后缀,跟现有OS_SSO_ENABLED/OS_CORS_ENABLED一类不一致。改动
把现有变量里已经存在的规律固化进 #9(grounded in actual usage,非凭空造):
OS_{DOMAIN}_{FEATURE}[_QUALIFIER]—— 域分组(AUTH/CORS/SSO/CLOUD/DATABASE/…)_ENABLED后缀(OS_SSO_ENABLED、OS_SEARCH_PINYIN_ENABLED),不要裸名OS_{DOMAIN}_{NAME}(OS_CLOUD_URL、OS_LOG_LEVEL)OS_ALLOW_{X}(故意不分组、显眼);opt-out →OS_SKIP_/OS_DISABLE_OS_TEST_*/OS_EXPECT_*OS_METADATA_WRITABLE/OS_EAGER_SCHEMAS/OS_SERVER_TIMING)标为 债,非先例关联
OS_SEARCH_PINYIN_ENABLED)🤖 Generated with Claude Code