文档搜索
- 作者仓库星标 2
- 作者更新于 实时读取
- 作者仓库 anton
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @wcygan · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: adr
description: Anton ADR lifecycle — author new architectural decision records, list existing ones by status or…
category: AI 智能
runtime: 无特殊运行时
---
# adr 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Why this skill exists / Hard rules / Workflow — new”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Why this skill exists / Hard rules / Workflow — new”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/adr` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Why this skill exists / Hard rules / Workflow — new”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: adr
description: Anton ADR lifecycle — author new architectural decision records, list existing ones by status or…
category: AI 智能
source: wcygan/anton
---
# adr
## 什么时候使用
- 用于审阅代码、文档或方案并给出可执行反馈 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Why this skill exists / Hard rules / Workflow — new」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "adr" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Why this skill exists / Hard rules / Workflow — new
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} ADR
Anton-local skill for the architectural decision record lifecycle. Owns three workflows: new, list, supersede. ADRs live at context/adrs/NNNN-kebab-slug.md and are immutable — once accepted, the body never changes. Supersession is the only way to revise a decision.
Why this skill exists
Anton needs one durable home for architectural decisions so that:
cluster-intake-gatekeeperhas somewhere to hand off its ADD/DEFER/REJECT verdicts (instead of stopping at "ADR-ready").- Future Codex sessions can discover prior decisions automatically via the SessionStart hook (
.Codex/hooks/inject_adr_index.py) without the operator typing them in. cluster-intakeStep 2 can query pastReverteddecisions by category instead of grepping a single shared file.- The operator (and future-Will) can recover why the cluster looks the way it does without mining
git log.
The skill is anton-local and has no runtime dependency on ~/.Codex/skills/context-repo-adr — the format is intentionally compatible with the global context-repo conventions, but invoking this skill never delegates to that one.
Hard rules
- ADRs are immutable. Once an ADR's
status:isAccepted(orReverted/Rejected/Deferred), the body never changes. The only edit allowed on an existing ADR is flipping thestatus:line toSuperseded-by NNNN. Any other change must go throughsupersede. - Numbers are never reused. The next number is always
max(existing) + 1, zero-padded to four digits, regardless of whether earlier numbers were superseded. Status: Revertedis anton-specific. Use it for any decision that was once live and is now removed. Standard MADR has no equivalent.
References:
- Field reference and immutability rule → conventions
- Canonical template for new ADRs → template
Workflow — new
Triggered by:
- The user says "create an ADR" / "record this decision" /
/adr new "<title>" cluster-intake-gatekeeperhands off an ADD / DEFER / REJECT verdict (the verdict object substitutes for the interactive interview — see "Handoff from intake" below)
Steps
Allocate the next number.
Glob('context/adrs/0[0-9][0-9][0-9]-*.md'). Sort. The next number ismax + 1, zero-padded to 4 digits. Never reuse a number.Generate the slug. Lowercase the title, kebab-case it, drop articles and prepositions, take the first 4–6 meaningful words. Example: "Adopt Cilium over Calico for CNI" →
adopt-cilium-over-calico-for-cni→ file0018-adopt-cilium-over-calico-for-cni.md.Interview the user (skip this when invoked from intake — see Handoff from intake). Ask only the questions whose answers aren't already known:
- Title (one short sentence)
- One-sentence summary (the blockquote after the H1)
status— usuallyAcceptedfor forward-looking decisions;Deferred/Rejected/Revertedif knownaffects— pick the broadest applicable category from:storage,observability,databases,registries,demos,networking,security,compute,all, or a new category if none fitintent—concrete-need/learning/unknownsupersedes— list of NNNNs being superseded by this one (usually empty)- Context (1–3 paragraphs — what situation prompts this decision, what forces are in play)
- Decision (active voice, one or two sentences — "We will adopt X" / "We will not")
- Alternatives considered (do-nothing + 1–2 alternatives, with a one-line "why rejected" each)
- Consequences — accepted costs, lessons (if
Reverted), follow-ups
Write the ADR file at
context/adrs/NNNN-slug.mdusing the shape from template. Frontmatter is mandatory; missing frontmatter fields default to the template's defaults.If
supersedes:is non-empty, also flip thestatus:line of each superseded ADR toSuperseded-by NNNN. This is the only allowed in-place edit on an existing ADR. UseEditwith a precise old/new string for the status line only — never touch the body.Confirm to the user with the file path and the new ADR number.
Handoff from intake
When cluster-intake-gatekeeper invokes this skill at the end of its evaluation, it passes the verdict object directly. Map the verdict to ADR fields without re-interviewing:
| Gatekeeper verdict | ADR status: |
Notes |
|---|---|---|
| Add (concrete need) | Accepted |
intent: concrete-need. Decision section names the hand-off skill (add-flux-app / flux-app-author). Consequences section includes the Renovate-PR tax line. |
| Add (learning) | Accepted |
intent: learning. Consequences section must include the timebox, exit plan, and review date — these are load-bearing under the contained-learning rubric. The frontmatter should add a review-by: field with the review date. |
| Defer | Deferred |
Body holds the exact measurable unblock conditions (what would have to be true to convert to Accepted). |
| Reject | Rejected |
Body holds the failed gate (1–7) or known-bad pattern, and — if appropriate — whether reframing as a learning intake would change the answer. |
After writing the ADR, return to the gatekeeper with the ADR number so it can include it in its memory append.
Workflow — list
Triggered by:
/adr listor/adr list --status Revertedor/adr list --affects databasescluster-intakeStep 2 (the removal-detection lookup) — internally invokes this with--status Reverted --affects <candidate-category>to find prior reverts
Steps
Glob('context/adrs/0[0-9][0-9][0-9]-*.md').- For each file, read the frontmatter and extract
status,date,affects,intent, and the H1 title. - Apply filters:
--status <X>→ keep only ADRs whosestatus:matchesX(case-insensitive)--affects <X>→ keep only ADRs whoseaffects:containsX- With no filter, return all
- Format as a markdown table sorted by NNNN (columns: #, Title, Status, Date, Affects, Intent).
- If used as the data source for
cluster-intakeStep 2: also read the matching ADRs' "Re-adoption guidance" section so the intake can surface the conditions under which a re-attempt would be valid.
Workflow — supersede
Triggered by:
/adr supersede <NNNN> "<reason>"— the user wants to revise an existing decision
Steps
- Verify the target exists.
Readcontext/adrs/NNNN-*.md. If missing, abort with a clear error. - Verify the target's current status. If it is already
Superseded-by NNNN, abort — supersession chains exist (NNNN can be superseded by MMMM which is superseded by PPPP), so the user must supersede the latest in the chain. - Author the replacement by invoking the
newworkflow withsupersedes: [<NNNN>]pre-populated. Walk the interview as normal. - Flip the old ADR's status line — and only the status line — from
Accepted(or whatever it was) toSuperseded-by <new NNNN>. UseEditwith the precise old/new strings. Do not touch the body, the date, or any other field. - Confirm to the user with both ADR numbers (old → new) and the file paths.
What this skill does NOT do
- Does not write Flux manifests — that is
add-flux-app. - Does not run cluster intake — that is
cluster-intake(which hands off here). - Does not edit ADR bodies after the fact. Ever. Use
supersede. - Does not auto-detect when a decision should be superseded. Manual via
/adr supersede. - Does not push, commit, or tag — the user owns git operations.
- Does not delete ADRs. ADRs are append-only forever, even superseded ones.
Related skills and agents
cluster-intake/cluster-intake-gatekeeper— the dominant authoring path. Hand off here on every verdict.add-flux-app/flux-app-author— invoked after anAcceptedADR that involves new manifests.~/.Codex/skills/context-repo-adr(user-level) — format-compatible but not invoked at runtime. If the user adopts the full context-repo convention later, the existing ADRs will Just Work.
Anti-patterns
- Editing an ADR body to reflect a changed decision. That's what
supersedeis for. Editing in place destroys the historical record. - Re-using a number after a delete. ADRs are never deleted, so this shouldn't come up — but if it does, allocate the next number, never the gap.
- Authoring an ADR before the decision is actually made. ADRs document decisions that happened, not aspirations. If the user is still considering, they're not ready for an ADR.
- Verbose ADRs. One screen of body is the target. If the decision genuinely needs more context, link to a doc — don't inline it.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核