init-config-file
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInit Config File
初始化配置文件
This skill is the single authoritative writer of for a ***plain project. Anything that ends up in should go through this skill. The renderer () reads each key listed below into the same argparse namespace it uses for CLI flags — so a value set in is exactly equivalent to passing the corresponding on the command line.
config.yamlconfig.yamlcodeplainconfig.yaml--flag此技能是*plain项目中的唯一权威编写者**。任何要写入的内容都必须通过此技能。渲染器()会将下面列出的每个键读取到与CLI标志相同的argparse命名空间中——因此在中设置的值与在命令行中传递对应的完全等效。
config.yamlconfig.yamlcodeplainconfig.yaml--flagWhen to run
运行时机
- End of Phase 3 / start of Phase 4 — after every test-script decision is locked in (unit tests, conformance tests, prepare-environment), before delegating to
forge-plain.plain-healthcheck - End of — only when Phase 3 of the feature touched the testing surface (new script generated, script removed, template directory introduced).
add-feature - End of any single-skill workflow that finalizes a script or template — e.g. after ,
implement-unit-testing-script,implement-conformance-testing-script,implement-prepare-environment-script, oradd-template.create-import-module - On demand — when the user asks "rebuild my config", "what valid keys are there", or you discover the config file is hand-edited / inconsistent.
If you only fixed a typo inside a file and the testing surface didn't move, you do not need to re-run this skill — go straight to .
.plainplain-healthcheck- 第三阶段结束/第四阶段开始时——在所有测试脚本决策(单元测试、一致性测试、环境准备)确定后,在委托给
forge-plain之前。plain-healthcheck - 结束时——仅当功能的第三阶段涉及测试范围(生成新脚本、移除脚本、引入模板目录)时。
add-feature - 任何完成脚本或模板的单技能工作流结束时——例如在运行、
implement-unit-testing-script、implement-conformance-testing-script、implement-prepare-environment-script或add-template之后。create-import-module - 按需运行——当用户询问“重建我的配置”、“有哪些有效键”,或者你发现配置文件是手动编辑/不一致时。
如果你只是修复了文件中的拼写错误且测试范围未改变,则无需重新运行此技能——直接运行即可。
.plainplain-healthcheckWhat this skill does
此技能的功能
- Determines how many files the project needs (one per part — see Per-part split).
config.yaml - For each config, gathers the decided values from the current project state (existing scripts under , the template directory, the build/dest folder choices).
test_scripts/ - Emits a clean, alphabetically-grouped containing only keys that are actually in use, using the canonical key names from the Valid keys reference.
config.yaml - Verifies that every value points at a file that exists on disk under
*-script(or wherever the user placed it), using the same lookup rule the renderer uses: absolute path → path relative to the config file's directory → path relative to the renderer's directory.test_scripts/ - Hands off to for the full validation pass.
plain-healthcheck
What this skill does NOT do
此技能不具备的功能
- It does not generate testing scripts. Use ,
implement-unit-testing-script, orimplement-conformance-testing-scriptfirst; this skill only wires them in.implement-prepare-environment-script - It does not decide whether the user wants conformance tests, a prepare-environment script, copy-build, etc. Those decisions belong to Phase 3. This skill only records them.
forge-plain - It does not invent values for keys whose decisions weren't made — it leaves them out (the renderer falls back to its default) rather than guessing.
- It does not write secrets. belongs in the
api-keyenvironment variable, never inCODEPLAIN_API_KEY.config.yaml
- 不生成测试脚本。请先使用、
implement-unit-testing-script或implement-conformance-testing-script;此技能仅负责将它们关联到配置中。implement-prepare-environment-script - 不决定用户是否需要一致性测试、环境准备脚本、复制构建等。这些决策属于第三阶段。此技能仅记录这些决策。
forge-plain - 不为未做出决策的键生成值——它会忽略这些键(渲染器会使用默认值),而不是猜测。
- 不写入密钥。应放在
api-key环境变量中,绝不能放在CODEPLAIN_API_KEY中。config.yaml
Valid keys reference
有效键参考
The canonical list of keys is derived from the CLI argparse parser. Every key below corresponds to exactly one and is read by the renderer through . No other keys are valid — the renderer rejects unknown keys with .
codeplain--flagupdate_args_with_configparser.error(f"Invalid argument: {key}")YAML keys use the dashed form (e.g. , not ) to mirror the CLI flag spelling. The only exception that has historically appeared with underscores is ; prefer for new configs but accept either when reading an existing file.
unittests-scriptunittests_scripttemplate_dirtemplate-dir标准键列表源自 CLI的argparse解析器。下面的每个键都对应一个,渲染器通过读取这些键。其他所有键均无效——渲染器会通过拒绝未知键。
codeplain--flagupdate_args_with_configparser.error(f"Invalid argument: {key}")YAML键使用短横线形式(例如,而非)以匹配CLI标志的拼写。历史上唯一使用下划线的例外是;对于新配置,优先使用,但读取现有文件时两种形式都可接受。
unittests-scriptunittests_scripttemplate_dirtemplate-dirKeys you typically include
通常需要包含的键
These keys reflect choices made in Phase 3 of and are the bread and butter of a project's :
forge-plainconfig.yaml| Key | Type | Default | When to include |
|---|---|---|---|
| path (string) | — | Required. Every project gets a unit-test runner. Path resolves relative to the config file's directory (preferred) or the renderer directory. |
| path (string) | — | Include when the user opted into conformance testing in Phase 3. |
| path (string) | — | Include only when both (a) the user opted into a prepare-environment script and (b) |
| int (seconds) | | Include only when the user explicitly raised/lowered the default. |
| path (string) | — | Include whenever the project has an |
| path (string) | | Points at a separate YAML file consumed by Python's |
| string | | Include only when the user picked a non-default folder name. |
| string | | Include only when the user picked a non-default folder name. Must differ from |
| string | | Always include with the value |
| string | — | Include when the user wants build output rooted somewhere other than the project root. |
这些键反映了第三阶段做出的选择,是项目的核心内容:
forge-plainconfig.yaml| 键 | 类型 | 默认值 | 包含时机 |
|---|---|---|---|
| 路径(字符串) | — | 必填项。每个项目都需要一个单元测试运行器。路径相对于配置文件目录(推荐)或渲染器目录解析。 |
| 路径(字符串) | — | 当用户在第三阶段选择一致性测试时包含。 |
| 路径(字符串) | — | 仅当(a)用户选择了环境准备脚本且(b)同时设置了 |
| 整数(秒) | | 仅当用户明确修改默认值时包含。 |
| 路径(字符串) | — | 当项目有 |
| 路径(字符串) | | 指向一个供Python的 |
| 字符串 | | 仅当用户选择了非默认文件夹名称时包含。 |
| 字符串 | | 仅当用户选择了非默认文件夹名称时包含。必须与 |
| 字符串 | | 始终以 |
| 字符串 | — | 当用户希望构建输出根目录不在项目根目录时包含。 |
Keys you occasionally include
偶尔需要包含的键
These are useful but the defaults are almost always fine. Only include them when the user explicitly changed the default during Phase 3:
| Key | Type | Default | Notes |
|---|---|---|---|
| bool | | The renderer copies the rendered code to |
| bool | | Requires |
| string | | Target folder for the conformance-test copy. Must differ from |
| bool | | Disable only when the user explicitly does not want a log file. Controls whether logs are mirrored to disk — it does not set the log level (that's |
| string | | If |
| bool | | Include only when the user wants the state-machine graph rendered. |
| bool | | Include only when the project is meant to run in CI / non-interactive mode by default. |
| bool | | Almost never belongs in |
| bool | | Almost never belongs in |
| URL (string) | | Include only when the user is pointing at a non-default API endpoint. |
这些键很有用,但默认值几乎总是适用。仅当用户在第三阶段明确修改默认值时才包含:
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 布尔值 | | 渲染器在成功渲染后会将渲染后的代码复制到 |
| 布尔值 | | 需要同时设置 |
| 字符串 | | 一致性测试复制的目标文件夹。必须与 |
| 布尔值 | | 仅当用户明确不希望生成日志文件时禁用。控制日志是否镜像到磁盘——它不设置日志级别(这是 |
| 字符串 | | 如果 |
| 布尔值 | | 仅当用户希望渲染状态机图时包含。 |
| 布尔值 | | 仅当项目默认要在CI/非交互模式下运行时包含。 |
| 布尔值 | | 几乎不应放在 |
| 布尔值 | | 几乎不应放在 |
| URL(字符串) | | 仅当用户指向非默认API端点时包含。 |
Keys you must NEVER include
绝对不能包含的键
These flags are per-invocation or secret. Putting them in is always wrong:
config.yaml| Key | Why it doesn't belong |
|---|---|
| Secret. Belongs in the |
| Per-invocation. |
| Per-invocation preview. Mutually exclusive with |
| Per-invocation. Selects a slice of functionalities to (re)render. |
| Per-invocation. Mutually exclusive with |
| Internal / debugging flag. |
| Refers to the config file itself — the renderer ignores it when reading the config. |
| The |
If the user asks to put any of these in , refuse and explain why.
config.yaml这些标志是每次调用专属或保密的。将它们放在中永远是错误的:
config.yaml| 键 | 不能包含的原因 |
|---|---|
| 保密信息。应放在 |
| 每次调用专属。 |
| 每次调用预览。与 |
| 每次调用专属。选择要(重新)渲染的功能片段。 |
| 每次调用专属。与 |
| 内部/调试标志。 |
| 指向配置文件本身——渲染器读取配置时会忽略它。 |
| 要渲染的 |
如果用户要求将这些键中的任何一个放入,请拒绝并解释原因。
config.yamlLogging configuration
日志配置
Log levels are not controlled directly by — they live in a separate YAML file that the renderer feeds to Python's . The key is the pointer that wires the two together.
config.yamllogging.config.dictConfigconfig.yamllogging-config-path日志级别不由直接控制——它们位于一个独立的YAML文件中,渲染器会将其传入Python的。中的键是连接两者的指针。
config.yamllogging.config.dictConfigconfig.yamllogging-config-pathHow the renderer assembles logging
渲染器如何组装日志配置
From in the source:
setup_loggingcodeplain- The renderer first installs a set of baseline levels:
- root logger →
INFO - (the renderer's own logger) →
LOGGER_NAMEINFO - →
gitWARNING - →
transitionsERROR - →
transitions.extensions.diagramsERROR
- root logger →
- If resolves to an existing file on disk, the renderer loads that YAML and calls
args.logging_config_pathon it. This overlays anything from step 1 — the user can raise, lower, or add levels for any logger they care about, add handlers, change formatters, etc.logging.config.dictConfig(...) - The renderer then attaches its own handlers (TUI handler unless , file handler if
headless, crash buffer otherwise). Whatever level the root logger ended up at after step 2 is the level those handlers respect.log-to-file
In other words: is the only knob that changes the levels. and only control whether and where logs are written — not what gets written.
logging-config-pathlog-to-filelog-file-name来自源码中的:
codeplainsetup_logging- 渲染器首先安装一组基线级别:
- 根日志记录器 →
INFO - (渲染器自身的日志记录器) →
LOGGER_NAMEINFO - →
gitWARNING - →
transitionsERROR - →
transitions.extensions.diagramsERROR
- 根日志记录器 →
- 如果解析为磁盘上存在的文件,渲染器会加载该YAML并对其调用
args.logging_config_path。这会覆盖步骤1中的所有设置——用户可以提高、降低或添加任何他们关心的日志记录器的级别,添加处理器,更改格式化程序等。logging.config.dictConfig(...) - 然后渲染器附加自己的处理器(除非否则使用TUI处理器,如果
headless则使用文件处理器,否则使用崩溃缓冲区)。步骤2后根日志记录器最终的级别就是这些处理器遵循的级别。log-to-file
换句话说:是更改日志级别的唯一控制项。和仅控制日志是否写入以及写入位置——而不是写入内容。
logging-config-pathlog-to-filelog-file-nameDefault behavior
默认行为
- The CLI default value for is
logging-config-path. If a file by that exact name exists in the current working directory, it will be loaded automatically — even withoutlogging_config.yamlbeing set inlogging-config-path.config.yaml - If the file does not exist, the renderer silently keeps the baseline levels from step 1 above (no warning).
- If the file exists but fails to parse / apply, the renderer warns () and falls back to the baseline.
Failed to load logging configuration from …
This means the mere presence of a file is itself a config decision. When you assemble a project's , you have three cases:
logging_config.yamlconfig.yaml| Situation | What to do |
|---|---|
The user is happy with the baseline levels and the project has no | Leave |
The user wants custom levels and is fine with the file being named | Create that file (see Recommended logging config below). Leaving |
| The user wants the logging config file to live somewhere non-default (different filename or directory). | Create the file at the chosen path and set |
When in doubt, ask the user: "Do you want to change the default log levels (INFO for the renderer, WARNING for git, ERROR for transitions), or stick with the defaults?" Only generate / pin the file when they say yes.
- 的CLI默认值为
logging-config-path。如果当前工作目录中存在同名文件,即使logging_config.yaml中未设置config.yaml,也会自动加载该文件。logging-config-path - 如果文件不存在,渲染器会静默保留步骤1中的基线级别(无警告)。
- 如果文件存在但解析/应用失败,渲染器会发出警告()并回退到基线级别。
Failed to load logging configuration from …
这意味着**文件的存在本身就是一个配置决策**。当你组装项目的时,有三种情况:
logging_config.yamlconfig.yaml| 情况 | 处理方式 |
|---|---|
用户满意基线级别且项目磁盘上没有 | 在 |
用户想要自定义级别且接受文件名为 | 创建该文件(参见下面的推荐日志配置)。在 |
| 用户希望日志配置文件放在非默认位置(不同文件名或目录) | 在选定路径创建文件,并在 |
如有疑问,请询问用户:“你想要更改默认日志级别(渲染器为INFO,git为WARNING,transitions为ERROR),还是保持默认?”仅当用户同意时才生成/固定该文件。
Recommended logging config
推荐日志配置
When the user does want custom levels, write a minimal -style YAML file. Example with two common knobs (verbose renderer logs, plus suppression of a chatty third-party logger):
dictConfigversion: 1
disable_existing_loggers: false
formatters:
default:
format: "%(levelname)s:%(name)s:%(message)s"
handlers:
console:
class: logging.StreamHandler
formatter: default
level: DEBUG
loggers:
codeplain:
level: DEBUG
urllib3:
level: WARNING
root:
level: INFO
handlers: [console]Guidelines for what to put in this file:
- Always set —
version: 1requires it.dictConfig - Set unless the user explicitly wants to silence loggers that were created before
disable_existing_loggers: falseran. The renderer creates several before it loads this file, and disabling them by default leads to confusing dead silence.dictConfig - Only override levels the user actually asked about. Don't preemptively add every logger the codebase touches — that creates ongoing maintenance for no benefit.
- Don't put the /
LoggingHandler/CrashLogHandlerhere — the renderer attaches those itself afterFileHandlerruns. Adding them here will cause duplicate log lines.dictConfig - This file is not validated by . If you change it, ask the user to confirm by reading it back to them.
plain-healthcheck
当用户确实需要自定义级别时,编写一个最小的风格的YAML文件。以下是包含两个常用设置(详细的渲染器日志,以及抑制一个冗长的第三方日志记录器)的示例:
dictConfigversion: 1
disable_existing_loggers: false
formatters:
default:
format: "%(levelname)s:%(name)s:%(message)s"
handlers:
console:
class: logging.StreamHandler
formatter: default
level: DEBUG
loggers:
codeplain:
level: DEBUG
urllib3:
level: WARNING
root:
level: INFO
handlers: [console]编写此文件的准则:
- 始终设置——
version: 1要求此设置。dictConfig - 设置,除非用户明确希望静默
disable_existing_loggers: false运行前创建的日志记录器。渲染器在加载此文件前会创建几个日志记录器,默认禁用它们会导致令人困惑的静默状态。dictConfig - 仅覆盖用户实际要求的级别。不要预先添加代码库涉及的每个日志记录器——这会造成不必要的持续维护。
- 不要在此处添加/
LoggingHandler/CrashLogHandler——渲染器会在FileHandler运行后自行附加这些处理器。在此处添加会导致日志行重复。dictConfig - 此文件不会被验证。如果你更改了它,请让用户通过读回内容来确认。
plain-healthcheck
Per-part split
按部分拆分
The rule, which mirrors what Phase 3 already establishes, is one per part of the system that has its own testing scripts:
forge-plainconfig.yaml- Single-stack project (e.g. one Python service) → one at the project root.
config.yaml - Multi-part project (e.g. Python backend + React frontend) → one per part, placed next to the part's top module (e.g.
config.yaml,backend/config.yaml). Each config references only its own scripts; never mix stacks in a single config.frontend/config.yaml - A part's split should follow the module boundaries from Phase 1 / Phase 2: if a module has its own language, framework, and test scripts, it gets its own next to that module.
config.yaml
Before emitting anything, state the planned split to the user (e.g. "I'll emit and ") if there is more than one part.
backend/config.yamlfrontend/config.yaml规则与第三阶段已确立的规则一致:每个拥有独立测试脚本的系统部分对应一个:
forge-plainconfig.yaml- 单栈项目(例如一个Python服务)→ 在项目根目录有一个。
config.yaml - 多部分项目(例如Python后端 + React前端)→ 每个部分对应一个,放在该部分的顶级模块旁边(例如
config.yaml、backend/config.yaml)。每个配置仅引用自身的脚本;绝不能在单个配置中混合不同栈。frontend/config.yaml - 部分的拆分应遵循第一阶段/第二阶段的模块边界:如果一个模块有自己的语言、框架和测试脚本,则在该模块旁边创建一个独立的。
config.yaml
在生成任何文件之前,如果项目有多个部分,请向用户说明计划的拆分方式(例如“我将生成和”)。
backend/config.yamlfrontend/config.yamlWorkflow
工作流程
Step 1 — Inventory
步骤1 — 盘点
- List every file in the repo and identify the top modules (modules not
.plain-ed by anything else) — same procedure asrequiresStep 1.plain-healthcheck - For each top module, determine which part it belongs to (single-stack → one part; multi-part → one part per top module).
- List every script under and group them by part (e.g.
test_scripts/belongs to the backend part,*_python.shbelongs to the frontend part).*_js.sh - Identify the template directory (typically ) and any custom resource directories (typically
template/).resources/ - Read any existing in each part's directory — preserve any user-set fields not listed in Valid keys reference only with the user's explicit approval, and warn that unknown keys will be rejected by the renderer.
config.yaml
- 列出仓库中的所有文件并确定顶级模块(不被其他模块
.plain的模块)——与requires步骤1的流程相同。plain-healthcheck - 针对每个顶级模块,确定它属于哪个部分(单栈→一个部分;多部分→每个顶级模块对应一个部分)。
- 列出下的所有脚本并按部分分组(例如
test_scripts/属于后端部分,*_python.sh属于前端部分)。*_js.sh - 确定模板目录(通常为)和任何自定义资源目录(通常为
template/)。resources/ - 读取每个部分目录中已有的——仅在用户明确批准的情况下保留有效键参考中未列出的用户设置字段,并警告用户未知键会被渲染器拒绝。
config.yaml
Step 2 — Assemble per-part values
步骤2 — 组装每个部分的值
For each part:
- Start from an empty key set.
- Add — required. If the script doesn't exist yet, stop and tell the caller to run
unittests-script: test_scripts/run_unittests_<lang>.<sh|ps1>first.implement-unit-testing-script - If the part has a conformance script on disk → add .
conformance-tests-script: … - If the part has a prepare-environment script on disk → first verify is also being added; if not, stop and surface this to the user (offer to either generate the missing conformance script via
conformance-tests-scriptor drop the prepare-environment script).implement-conformance-testing-script - If the project has shared templates → add (or whatever path the user used).
template-dir: template - Always add . This skill pins the copy destination on every config it writes, regardless of what Phase 3 said about it. If Phase 3 explicitly asked for a different
build-dest: dist, stop and surface the conflict to the user — do not silently honor the override.build-dest - For every other key in Valid keys reference, include it only if Phase 3 produced a non-default decision for that key.
- Cross-validate the assembled key set:
- is set to
build-dest.dist - ≠
build-folder(in particular,build-destis neverbuild-folder).dist - ≠
conformance-tests-folder.conformance-tests-dest - requires
copy-conformance-tests: true.conformance-tests-script - is set ⇒
log-file-nameis notlog-to-file.false - All paths resolve on disk (absolute → relative to config dir → relative to renderer dir).
*-script - No script path crosses stacks (e.g. must not reference
backend/config.yaml).run_unittests_js.sh
针对每个部分:
- 从空键集开始。
- 添加——必填项。如果脚本尚未存在,请停止并告知调用者先运行
unittests-script: test_scripts/run_unittests_<lang>.<sh|ps1>。implement-unit-testing-script - 如果该部分磁盘上有一致性脚本→添加。
conformance-tests-script: … - 如果该部分磁盘上有环境准备脚本→首先验证是否也添加了;如果没有,请停止并向用户说明此问题(提供两种选择:要么通过
conformance-tests-script生成缺失的一致性脚本,要么移除环境准备脚本)。implement-conformance-testing-script - 如果项目有共享模板→添加(或用户使用的任何路径)。
template-dir: template - 始终添加。此技能会在它编写的每个配置中固定复制目标,无论第三阶段对此有何说明。如果第三阶段明确要求使用不同的
build-dest: dist,请停止并向用户说明冲突——不要静默覆盖。build-dest - 对于有效键参考中的其他每个键,仅当第三阶段做出了非默认决策时才包含它。
- 交叉验证组装的键集:
- 设置为
build-dest。dist - ≠
build-folder(特别是build-dest绝不能是build-folder)。dist - ≠
conformance-tests-folder。conformance-tests-dest - 需要
copy-conformance-tests: true。conformance-tests-script - 设置了⇒
log-file-name不为log-to-file。false - 所有路径在磁盘上都可解析(绝对路径→相对于配置目录的路径→相对于渲染器目录的路径)。
*-script - 脚本路径不跨栈(例如不得引用
backend/config.yaml)。run_unittests_js.sh
Step 3 — Emit config.yaml
config.yaml步骤3 — 生成config.yaml
config.yamlFor each part, write a clean YAML file:
- One key per line, in the order they appear in Valid keys reference (script paths first, then template/build folders, then copy/log settings).
- Use dashed key names. Quote string values only when YAML requires it.
- No comments inside the file — keep it machine-parseable. If the user needs a comment, put it in the surrounding spec or README.
- Idempotent: re-running this skill on an unchanged project produces a byte-for-byte identical file.
Example for a single-stack Python project with conformance testing and a prepare-environment script:
unittests-script: test_scripts/run_unittests_python.sh
conformance-tests-script: test_scripts/run_conformance_tests_python.sh
prepare-environment-script: test_scripts/prepare_environment_python.sh
template-dir: template
build-dest: distExample for a multi-part project ():
backend/config.yamlunittests-script: test_scripts/run_unittests_python.sh
conformance-tests-script: test_scripts/run_conformance_tests_python.sh
template-dir: ../template
build-dest: dist针对每个部分,编写一个整洁的YAML文件:
- 每行一个键,按有效键参考中的顺序排列(首先是脚本路径,然后是模板/构建文件夹,最后是复制/日志设置)。
- 使用短横线形式的键名。仅当YAML要求时才对字符串值加引号。
- 文件内无注释——保持机器可解析。如果用户需要注释,请将其放在相关规范或README中。
- 幂等性:在未更改的项目上重新运行此技能会生成完全相同的文件。
以下是一个带有一致性测试和环境准备脚本的单栈Python项目示例:
unittests-script: test_scripts/run_unittests_python.sh
conformance-tests-script: test_scripts/run_conformance_tests_python.sh
prepare-environment-script: test_scripts/prepare_environment_python.sh
template-dir: template
build-dest: dist多部分项目示例():
backend/config.yamlunittests-script: test_scripts/run_unittests_python.sh
conformance-tests-script: test_scripts/run_conformance_tests_python.sh
template-dir: ../template
build-dest: distStep 4 — Hand off
步骤4 — 任务委托
Tell the caller exactly which file(s) were written and invoke to validate the project end-to-end. Do not declare success on your own — is the source of truth for "is this project ready to render?".
plain-healthcheckplain-healthcheck告知调用者确切生成了哪些文件,并调用来端到端验证项目。不要自行宣告成功——是“项目是否准备好渲染”的唯一权威。
plain-healthcheckplain-healthcheckAnti-patterns
反模式
- Inventing values for keys the user never decided on. Leave them out and let the renderer use its default.
- Mixing stacks in one config. referencing a JS script is always a bug — split into per-part configs instead.
backend/config.yaml - Putting ,
api-key,dry-run,full-plain,render-range,render-from,replay-with, orconfig-nameinfilename. All of these are per-invocation or secret; the renderer treats them as command-line concerns.config.yaml - Emitting without
prepare-environment-script. A prepare-environment script only makes sense in service of conformance tests; without one,conformance-tests-scriptwill fail.plain-healthcheck - Hand-merging into an existing config.yaml without re-running this skill. If the user edited the config manually, re-run the skill to re-derive a clean canonical version (after confirming any custom fields with the user).
- Reading the renderer's API key from a project file. Always rely on .
CODEPLAIN_API_KEY
- 为用户从未做出决策的键生成值。忽略这些键,让渲染器使用默认值。
- 在一个配置中混合不同栈。引用JS脚本永远是错误的——改为按部分拆分配置。
backend/config.yaml - 将、
api-key、dry-run、full-plain、render-range、render-from、replay-with或config-name放入filename。这些都是每次调用专属或保密的;渲染器将它们视为命令行相关的内容。config.yaml - 在未设置的情况下生成
conformance-tests-script。环境准备脚本仅在为一致性测试服务时有意义;如果没有一致性测试,prepare-environment-script会失败。plain-healthcheck - 不重新运行此技能就手动合并到现有中。如果用户手动编辑了配置,请重新运行此技能以重新生成整洁的标准版本(在与用户确认任何自定义字段后)。
config.yaml - 从项目文件中读取渲染器的API密钥。始终依赖。
CODEPLAIN_API_KEY
Validation Checklist
验证检查清单
- One exists per part of the system (single-stack → root; multi-part → per part).
config.yaml - Every has at minimum
config.yaml.unittests-script - Every value points at a file that exists on disk.
*-script - No declares
config.yamlwithout also declaringprepare-environment-script.conformance-tests-script - No mixes stacks (every script in it targets the same language).
config.yaml - is set to
build-destin every emitteddist.config.yaml - ≠
build-folder;build-dest≠conformance-tests-folder.conformance-tests-dest - only when
copy-conformance-tests: trueis set.conformance-tests-script - only when
log-file-nameis notlog-to-file.false - No forbidden keys (,
api-key,dry-run,full-plain,render-range,render-from,replay-with,config-name).filename - set whenever the project has shared templates or import modules.
template-dir - returned
plain-healthcheckafter the config(s) were written.PASS
- 系统的每个部分都有一个(单栈→根目录;多部分→每个部分对应一个)。
config.yaml - 每个至少包含
config.yaml。unittests-script - 每个值都指向磁盘上存在的文件。
*-script - 没有在未声明
config.yaml的情况下声明conformance-tests-script。prepare-environment-script - 没有混合不同栈(其中的所有脚本都针对同一种语言)。
config.yaml - 每个生成的中
config.yaml都设置为build-dest。dist - ≠
build-folder;build-dest≠conformance-tests-folder。conformance-tests-dest - 仅当设置了时才设置
conformance-tests-script。copy-conformance-tests: true - 仅当不为
log-to-file时才设置false。log-file-name - 没有禁用的键(、
api-key、dry-run、full-plain、render-range、render-from、replay-with、config-name)。filename - 当项目有共享模板或导入模块时设置。
template-dir - 配置文件生成后返回
plain-healthcheck。PASS