参考
agore.yaml 参考
每个配置字段的类型与默认值,以及加载器的容错规则。
位置与加载
文件默认为工作目录中的 agore.yaml(可用全局 --config 旗标覆盖)。加载规则:
- 文件缺失不是错误 —— 使用内建默认值,因此
init、create、inspect和lint均可零配置运行。只有release要求该文件必须存在。 - 已有文件中缺失的字段由默认值填充。例如,缺少
skill.lint.budgets的配置会获得默认预算。 - 未知的顶层键被容忍。
agore是父域,skill是其中一个子域;其他子域(例如未来的eval:)会被忽略而不报错。对未知的嵌套键同样如此。 - 唯一受约束的值是发布器的
type,必须为bundle或github。
完整示例
version: 1
project:
name: my-skills
repository: https://github.com/agore-dev/my-skills
workspace:
base: main
skill:
paths:
- "."
- "skills/*"
exclude:
- "evals/**"
- "tests/**"
- "**/*_test.*"
lint:
strict: false
ignore: []
budgets:
description_max_tokens: 120
body_max_tokens: 2500
body_max_lines: 300
release:
publishers:
- type: bundle
- type: github字段参考
Root
| 字段 | 类型 | 默认值 | 含义 |
|---|---|---|---|
version | int | 1 | 配置格式版本。 |
project | object | — | 项目标识。 |
workspace | object | — | Git 工作区设置。 |
skill | object | — | Skill 子域。 |
project
| 字段 | 类型 | 默认值 | 含义 |
|---|---|---|---|
name | string | "" | 项目名称。init 从目录名填充。用作仓库 slug 的兜底来源。 |
repository | string | "" | 仓库 URL。发布仓库 slug 的第一来源;可用时 init 从 git remote get-url origin 填充。 |
workspace
| 字段 | 类型 | 默认值 | 含义 |
|---|---|---|---|
base | string | "main" | --changed diff 的基础分支(git diff <base>...HEAD)。未提交的工作树变更(暂存、未暂存、未跟踪)始终在提交 diff 之上额外计入。 |
skill
| 字段 | 类型 | 默认值 | 含义 |
|---|---|---|---|
paths | []string | [".", "skills/*"] | 用于发现直接包含 SKILL.md 的目录的 glob 模式(相对于仓库根目录)。同时决定 create 的脚手架位置:skills/* 模式会把新 Skill 路由到 skills/<name>。 |
exclude | []string | ["evals/**", "tests/**", "**/*_test.*"] | 与 Skill 相对路径匹配的 glob 模式。被排除的文件在 inspect、lint 和 release 中一致跳过 —— 见文件漏斗。 |
lint | object | 见下文 | Lint 行为。 |
release | object | 见下文 | 发布行为。 |
skill.lint
| 字段 | 类型 | 默认值 | 含义 |
|---|---|---|---|
strict | bool | false | 将警告视为 lint 失败。--strict 旗标会强制开启。 |
ignore | []string | [] | 完全跳过的规则 ID(例如 ["TRIG-001", "CTX-003"])。 |
budgets | object | 见下文 | CTX-001 与 inspect 进度条使用的上下文预算。 |
skill.lint.budgets
| 字段 | 类型 | 默认值 | 含义 |
|---|---|---|---|
description_max_tokens | int | 120 | L1(名称 + 描述)的最大 Token 数。 |
body_max_tokens | int | 2500 | SKILL.md L2 正文的最大 Token 数。 |
body_max_lines | int | 300 | SKILL.md L2 正文的最大行数。 |
设为 0 或负值的预算视为不存在,由默认值替换。
skill.release
| 字段 | 类型 | 默认值 | 含义 |
|---|---|---|---|
exclude | []string | nil(skill.exclude 的旧版别名) | 旧版。 匹配 Skill 相对路径的 glob,打包时跳过命中的文件。当 skill.exclude 不存在时,该列表在加载时被提升为 skill.exclude;两者同时设置时同时生效(合并去重)。新配置应使用 skill.exclude。 |
publishers | []object | [{type: bundle}, {type: github}] | 有序的发布器列表。仅 bundle 和 github 有效;其他任何值都会导致配置加载失败:unsupported publisher type "<t>" (allowed: bundle, github)。 |
迁移说明。 把排除列表从 skill.release.exclude 移到 skill.exclude。留在原处依然可用 —— 当新键不存在时其值会被提升为 skill.exclude —— 但两个列表同时存在的配置会两者都生效,这通常不是你想要的。
校验错误
加载器在遇到以下情况时报告并中止:YAML 语法错误(parse config <path>: ...),以及不受支持的发布器类型。其余一切 —— 未知键、ignore 中未知的规则 ID(它们只是匹配不到任何规则)、非常规的 glob 模式 —— 都被接受或忽略。
相关
paths如何与发现机制交互: 零配置的单仓库与 monorepo 发现