Repository navigation
docs: add experimental tier governance and dependency rules to AGENTS.md - #5523
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f45d576922
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| - 实验开关分 `beta` 与 `experimental` 两档:`KIMI_CODE_EXPERIMENTAL_<NAME>` 控制单个开关;`KIMI_CODE_EXPERIMENTAL_FLAG` 与 `config.toml` 的 `[experimental].beta` 只开启全部 `beta` 功能,不开启 `experimental` 功能。优先级:`beta` 为单项环境变量 > Beta 总开关(`KIMI_CODE_EXPERIMENTAL_FLAG` 或 `[experimental].beta`)> `[experimental].<id>` > `false`;`experimental` 为单项环境变量 > `[experimental].<id>` > `false`。 | ||
| - `packages/agent-core-v2` 和 kap-server 的模块:没有集中的开关目录。在所属领域里用 `registerFlagDefinition` 声明各端 `stages` 与 `effectTiming`,再用 `IFlagService.enabled(id)` 检查。 | ||
| - 新增实验开关默认设为 `'experimental'`;升入 `'beta'` 会对所有开启 Beta 总开关的用户默认生效,没有明确要求和可用性验证依据时不要直接设为 `'beta'`。阶段流转可逆:已处于 `'beta'` 的功能若推倒重做交互或核心实现,应退回 `'experimental'`。 | ||
| - 正式功能不得依赖仍处于 `'experimental'` 或 `'beta'` 阶段的能力;建立在未转正实验能力之上的入口、UI 或子功能,必须受同一开关或自身的实验开关门控(除非先将底层能力独立转正)。 |
There was a problem hiding this comment.
Require dependent gates to be at least as restrictive
Allowing a dependent entry to use “its own experimental flag” does not guarantee that its prerequisite is enabled: if the prerequisite remains experimental while the entry is promoted to beta, KIMI_CODE_EXPERIMENTAL_FLAG=1 enables only the entry because FlagService.evaluate() resolves each definition independently. A change following this rule can therefore expose an unusable or silently ineffective entry while still complying with the documented requirement. Specify that a dependent gate must be no easier to enable than its prerequisite and must also check or enable that prerequisite, rather than merely having a separate flag.
AGENTS.md reference: AGENTS.md:L214-L216
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 87599f3: clarified that when a dependent entry uses a separate experimental flag instead of sharing the prerequisite flag, its stage on each surface must not exceed the prerequisite's stage (so an experimental prerequisite cannot have a beta dependent enabled by the Beta master switch) and the dependent path must also check that the prerequisite flag is enabled.
| - 还没公开的功能放在实验开关后面,未配置时一律默认关闭,注册结构不设 `default` 字段;全量转正时直接移除开关(某端先行转正时可在 `stages` 中将该端设为 `'ga'`,不再出现在该端实验列表中,也不受其他端在共享 `config.toml` 里写入的关闭值影响)。 | ||
| - 实验开关分 `beta` 与 `experimental` 两档:`KIMI_CODE_EXPERIMENTAL_<NAME>` 控制单个开关;`KIMI_CODE_EXPERIMENTAL_FLAG` 与 `config.toml` 的 `[experimental].beta` 只开启全部 `beta` 功能,不开启 `experimental` 功能。优先级:`beta` 为单项环境变量 > Beta 总开关(`KIMI_CODE_EXPERIMENTAL_FLAG` 或 `[experimental].beta`)> `[experimental].<id>` > `false`;`experimental` 为单项环境变量 > `[experimental].<id>` > `false`。 | ||
| - `packages/agent-core-v2` 和 kap-server 的模块:没有集中的开关目录。在所属领域里用 `registerFlagDefinition` 声明各端 `stages` 与 `effectTiming`,再用 `IFlagService.enabled(id)` 检查。 | ||
| - 新增实验开关默认设为 `'experimental'`;升入 `'beta'` 会对所有开启 Beta 总开关的用户默认生效,没有明确要求和可用性验证依据时不要直接设为 `'beta'`。阶段流转可逆:已处于 `'beta'` 的功能若推倒重做交互或核心实现,应退回 `'experimental'`。 |
There was a problem hiding this comment.
Apply stage rollbacks only to affected surfaces
The rollback instruction treats a feature as having one global stage, but FlagDefinitionInput.stages assigns stages independently to TUI, desktop, and web. If a feature is beta on multiple surfaces and only its desktop interaction is rewritten, following this wording can unnecessarily downgrade the unaffected TUI and web implementations and remove them from the Beta master switch. State that promotion and rollback decisions are made per surface, with only the surfaces whose interaction or implementation is being rebuilt moved back to experimental.
AGENTS.md reference: AGENTS.md:L123-L123
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 87599f3: clarified that stage promotion and rollback are evaluated per surface (stages[surface]), so rebuilding a feature on one surface only rolls that surface back to experimental without downgrading unaffected surfaces.
2c5c9c2 to
651fc49
Compare
651fc49 to
ea4d9ab
Compare
* feat: split experimental flags into Beta and Experimental tiers * fix(agent-core-v2): keep legacy master-env tower migration pending until master flag is set * fix: harden legacy tower fallback, meta refresh ordering, and flag tier tests * fix(flag): normalize unparseable tower env in read-only legacy fallback * fix: preserve symlinked config during tower migration and document WaitFor default * fix: keep tower migration pending on false master env and refresh meta on configChanged * feat: unify Lab entry point and refine Chinese Beta/Experimental copy * fix(flag): preserve Tower via env fallback when config.toml fails to parse * fix(flag): scope legacy Tower migration marker per configPath and mark /lab idle-only in docs * feat(flags): unify desktop/web Lab flags in config.toml and harden legacy migration * fix(flags): preserve legacy local flags pre-meta and scope restart notice to pending enablement * fix(lab): gate beta master on server metadata and refresh TUI flags on config change * fix(flag): guard config migration hard links and concurrent updates * fix(flag): reconcile WaitFor live toggles and preserve tower state * test: scope WaitFor flag stub in goal tests and enable experimental flags in prompt-cache scenario * test: start wait_for enabled before toggling it off in prompt-cache scenario * feat(flags): isolate [experimental.cli] and [experimental.desktop] profiles * docs: document [experimental.cli] and [experimental.desktop] in AGENTS.md * feat(lab): add inline tier descriptions and move desktop beta switch to header * feat(lab): refine beta and experimental tier descriptions * feat(lab): refine experimental hint copy and drop beta-master lock noise * feat(lab): shorten beta header switch label to All * docs: add experimental tier governance and dependency rules to AGENTS.md (#5523) * fix: guard unprofiled web lab toggles, lock migration stamps, and add vscode changeset * fix: align ConfigResponse experimental event type with profile buckets * chore: mark klient and kap-server changesets as minor bumps * fix: stamp all experimental profiles on fresh-install migration * refactor(agent-core-v2): fold legacy tower migration into FlagService via ConfigService
Requirement or Bug
按
AGENTS.md「新增或修改团队流程、经验性规则时,单独提 PR」的要求,将 #5333 引入experimental/beta两档实验开关后配套的两条开发与评审规则独立拆出评审:约束新开关默认落档与阶段可逆回退,并禁止正式功能静默依赖未转正的实验能力。Bug Reproduction Steps
N/A
Root Cause
N/A
Code Changes
在根
AGENTS.md的## 实验特性小节补充两条开发与评审约束(不涉及运行时代码):默认从
'experimental'起步,谨慎升入'beta',且阶段流转可逆:KIMI_CODE_EXPERIMENTAL_FLAG=1(如wait_for曾设default: true默认暴露给全端模型、tower需重启进程并改变会话编排、notify_user在 TUI 与 Desktop/Web 的完成度不一致)。feat: split experimental flags into Beta and Experimental tiers #5333 引入 Beta 总开关([experimental.<profile>].beta与KIMI_CODE_EXPERIMENTAL_FLAG=1)后,任何标为'beta'的开关都会对开启 Beta 总开关的尝鲜用户自动生效;若未经可用性验证直接标为'beta',或某'beta'功能在推倒重做期间仍留在'beta',会直接破坏尝鲜用户的日常工作流。'experimental',仅在有明确要求与验证依据时升为'beta';当'beta'功能发生交互或核心实现重做时,可逆退回'experimental'。实验性身份传染(正式功能不得依赖未转正的实验开关):
-w参数、/worktree面板与状态栏分支提示共同依赖worktree开关;Desktop/Web@引用会话 UI 依赖会话索引实验能力;/tower命令与多智能体视图依赖tower开关)。若上层入口作为无开关的正式功能暴露,而底层工具/服务仍处于'experimental'或'beta'(默认关闭),默认配置用户会触发半残路径或静默失效。Behavior Changes and Affected Users
无运行时或构建产物行为变化(仅更新仓库根
AGENTS.md开发规范;本分支基于 #5333 的feat/experimental-tiers,待 #5333 合入后自动切回main)。受影响模块:
AGENTS.md测试覆盖结论:已通过
node scripts/checks/instructions.mjs引用完整性检查与pnpm run check:duplication检查。Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.