跳到正文
cccskills
免费在 GitHub 公开中文介绍

brownfield-retrospective

审查现有代码的一个部分,从设计决策记录、实现惯例、缺失功能和技术选型四个方面整理问题,并推进计划、测试、修复及再次审查。

原文查看原文说明

Run the ECC engineering process retroactively against an existing project slice. Audit current state, reconstruct past decisions, produce a four-axis gap register (thinking, coding practice, missing features, technology selection), then execute fixes forward through the plan-TDD-review pipeline. Use when adopting ECC mid-project, taking over an inherited codebase, or asking what was missed and what would have been built differently from day one.

AI 评分90分/ 100查看安装方法

适用场景

  • 审查接手的现有代码
  • 在开发途中引入ECC流程
  • 添加功能前重新评估模块
  • 决定修复、重写或保留现有部分

中文介绍

功能

brownfield-retrospective针对现有代码的一部分,从现状审查推进到改进后的再次核查。它根据代码和Git历史还原当前行为与过去的设计决策,从决策记录不足、实现惯例、缺失功能、技术选型四个方面建立问题台账。每个问题都记录依据、严重程度、工作量和处理状态,并衔接计划、测试先行的实现、代码审查和再次审查。

适用场景

适合检查接手的代码,或在项目开发途中引入ECC开发流程。也可在添加下一个功能前,判断某个模块应继续修复、重新编写,还是记录理由后保持现状。

使用示例

  • “审查这个模块,整理我们遗漏的问题。”
  • “调查过去的设计决策,制定改进计划。”
  • “读取问题台账,从上次停下的位置继续。”

注意事项

流程会使用ECC的相关代理和技能。每个审查范围以约15个文件或2,000行为参考,成果保存到docs/retro/<slice>/。审查期间不做修复;重写、更换技术等重大变更,需要经过项目规定的审批。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确以现有代码为对象,并按四个指定方面整理问题。
步骤具体性步骤、输入输出和示例是否具体
A良好提供分阶段步骤、成果保存位置、问题台账字段及填写示例。
安全性发送数据、删除文件、执行命令等是否有说明
A良好禁止在审查期间修复,并要求重写或更换技术前确认范围并取得项目规定的批准。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足指定多个ECC代理和相关技能,但未提供安装步骤。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月19日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md11.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Brownfield Retrospective

Run ECC's engineering process retroactively against a project that was built without it. Pick any slice of an existing codebase, audit what exists, reconstruct how it got there, extract a four-axis gap register, then execute the fixes forward through the standard ECC pipeline.

The workflow is slice-first: no whole-repo onboarding is required before it is useful, and every phase is re-enterable from a durable artifact on disk. Start in the middle, work backwards, then move forward.

When to Activate

  • Adopting ECC in a repository that already exists and is already shaped
  • User asks to "audit my existing project", "retro this codebase", or "what did we miss?"
  • Taking over, inheriting, or returning to a codebase after a long gap
  • User asks "why is it like this?" followed by "should it stay like this?"
  • A module, feature, or service needs a rethink before the next feature lands on top of it
  • Deciding whether a legacy area should be fixed forward, rewritten, or left documented as-is

When Not to Use

  • Greenfield work with no existing code — use planner and tdd-workflow directly
  • Onboarding to spec-driven development without the redesign loop — the spec-miner agent does that on its own
  • A launch go/no-go production-readiness pass — use production-audit
  • Security-only sweeps — use security-review
  • Team process retrospectives (sprint ceremonies) — this audits a codebase, not people

The Working Set

All artifacts are written inside the audited project, under docs/retro/<slice>/:

FilePhasePurpose
gap-register.md0-6The state machine — perimeter, Current phase: marker, and rows. The only file required to resume mid-stream.
baseline-audit.md1Reviewer findings, test/CI snapshot, TODO inventory.
reconstructed-spec.md2What the code actually does today (Requirements + Invariants).
target-design.md4Target shape for the slice and the fix sequence.

Backfilled decisions go to docs/adr/ per the architecture-decision-records skill. If the project uses OpenSpec, reconstructed-spec.md may instead be openspec/specs/<capability>/spec.md produced by spec-miner.

How It Works

Phase 0 — Pick the Entry Point

Start from what the user cares about today. Do not map the whole repo first.

Any of these is a valid slice:

User signalSlice
Names a directory, module, or serviceThat path plus its direct callers
Names a feature or user flowThe files that implement it, traced from the entry point
Names a bug, incident, or pain pointThe code that produced it plus one level of call chain
Names a dependency or tech choiceEverything that touches it
Names nothingThe 2-3 hottest paths by churn — propose them and let the user pick

Record the perimeter at the top of gap-register.md before anything else: paths in scope, entry points, callers, blast radius. Budget the slice at roughly 15 files or 2,000 lines; if the user's pick is bigger, cut it into named sub-slices and register each as its own row of work. A slice too big to audit in one session is a slice that never finishes. Keep a Current phase: marker beside the perimeter and advance it each time a phase completes.

Phase 1 — Present-State Audit

Establish what exists now, with evidence. Do not fix anything yet.

  1. Recon the slice: manifest and framework fingerprint, entry points, test layout, CI checks (borrow the recon steps from codebase-onboarding, scoped to the perimeter).
  2. Run the reviewers that match the stack, in parallel where possible. Every finding must carry a file:line pointer:
    • The language reviewer for the stack (typescript-reviewer, python-reviewer, go-reviewer, ...)
    • security-reviewer
    • silent-failure-hunter for swallowed errors
    • type-design-analyzer where invariants are encoded in types
    • performance-optimizer only if the slice is on a hot path
  3. Snapshot the current state: test count and coverage, lint/CI status, TODO/FIXME/HACK inventory inside the perimeter.

Write everything to baseline-audit.md. Findings that get fixed during this phase corrupt the baseline — hold them for the register.

Phase 2 — Backward Reconstruction

Work backwards from the present state to the decisions that produced it.

  1. Mine the behavioral spec: run spec-miner against the slice. Its Requirements (WHEN → THEN) and Invariants become reconstructed-spec.md — the baseline truth for Phase 5 tests.
  2. Git archaeology on the perimeter:
    • git log --oneline -- <slice> for directory history; use --follow only with a single file path — age, authors, cadence
    • Largest and most reverted commits — where the design changed under pressure
    • Churn hotspots — files changed far more often than neighbors
    • Dead ends — branches or scaffolding that never shipped
  3. Decision inventory: list the significant decisions frozen into the code (stack and framework choices, data model, boundaries, error strategy, state management). Check each against docs/adr/, README, and comments. Every decision with no written record is itself a pre-existing thinking gap — record it in Phase 3, do not silently backfill it here.
  4. Where behavior is opaque, use code-explorer to trace execution paths before guessing at intent.

Phase 3 — Gap Analysis (Four Axes)

Convert the audit and reconstruction into register rows. One axis per class of gap:

AxisQuestionSources
ThinkingWhat was decided but never recorded? Which invariants live only in code?Decision inventory, reconstructed spec
Coding practiceWhere does the code diverge from how ECC would have written it?Phase 1 findings, the rules/ pack for the language, spec items with no test anchor
Missing featuresWhat would a day-one build have included that this slice never got?Boundary input validation, observability, rate limiting, idempotency, migrations plus rollback, a11y, i18n, user docs, CI gates
Technology selectionIs the chosen tech fighting the codebase? Outdated, duplicated, risky, or missing?Dependency inventory, git archaeology, recon

Register format (the table is the skill's durable output):

| ID | Axis | Gap | Evidence | Forward fix | Severity | Effort | Status |
|----|------|-----|----------|-------------|----------|--------|--------|
| G-001 | practice | Errors swallowed in retry loop | src/api/retry.ts:42 | Propagate + map at boundary | P1 | S | open |
  • Severity: P0 security exposure or data loss, P1 correctness, P2 practice and observability, P3 selection and cleanup.
  • Effort: S under a session, M a few sessions, L needs its own plan.
  • Status: open, in-progress, done, wont-fix.
  • Every row needs an evidence pointer. A gap you cannot point at is an opinion.

Phase 4 — Redesign / Rethink

Turn the register into a sequenced plan. Follow the project's existing task and approval authority. Keep the register as audit evidence linked to that system; do not create competing canonical task state. Confirm scope and obtain project-required approval before a rewrite, technology replacement, migration, or other material change.

  1. Run architect or code-architect over the P0 and P1 rows to produce target-design.md: target shape for the slice, the fix sequence, and an explicit "what does not change" list to protect working behavior.
  2. Backfill retro-ADRs for every undocumented decision from Phase 2. Mark them as reconstructed (status: proposed (reconstructed), date of the retro, note the original decision predates the record). Separate observed history from inferred intent, and have the project owner confirm a decision before marking it accepted. Never present a backfilled ADR as if it were written at decision time.
  3. Triage every register row into one of: fix-forward (repair in place), rewrite (replace the slice), leave-documented (wont-fix). A wont-fix must record its reason in the register — a wont-fix with a reason closes the thinking gap; a silent one reopens it.
  4. Sequence the backlog: P0 first, then interleave quick wins with larger repairs to keep momentum.

Phase 5 — Forward Execution

Work the register through the standard ECC pipeline, one row per session as a baseline pace:

planner (scope the row)
  → tdd-guide (failing test first — for a legacy gap the first test
    usually encodes the missing invariant from reconstructed-spec.md)
  → implement
  → code-reviewer
  → security-reviewer (if the row touches input, auth, or data)
  → doc-updater + ADR (if the decision changed)
  → conventional commit
  → mark the register row done
  • Update gap-register.md statuses as rows close; the register is the durable state, not the conversation.
  • On session boundaries, hand off through the project's memory mechanism (unified-memory, context carriers) so the next session resumes from the register alone.

Phase 6 — Closure and Re-Audit

When every row is done or wont-fix:

  1. Re-run the Phase 1 audit over the same perimeter.
  2. Diff against baseline-audit.md and verify with verification-loop — the gaps claimed closed must stay closed.
  3. Record the delta (findings then, findings now, rows closed, rows deferred) at the bottom of gap-register.md.
  4. Anything that resurfaced becomes a new row, not a failure — the register is a loop, not a one-shot.

Resuming Mid-Stream

Any session can start in the middle. Read docs/retro/<slice>/gap-register.md first:

  • Register exists with a row in-progress → Phase 5, finish that row.
  • Register exists with at least one row, all rows closed → Phase 6.
  • Register exists, rows open, none in progress → resume at the Current phase: marker (Phase 3 register awaiting triage, or Phase 4 backlog awaiting its first row).
  • No register, but baseline-audit.md exists → Phase 2.
  • No artifacts at all → Phase 0 with the user.

Anti-Patterns

  • Auditing the whole repo before any slice — the workflow is slice-first by design.
  • Fixing code during Phases 1-3 — audit phases produce the register; edits mid-audit corrupt the baseline.
  • Register rows without evidence pointers.
  • wont-fix without a recorded reason.
  • Presenting backfilled ADRs as contemporaneous records.
  • Skipping the Phase 6 re-audit — closure is verified, not declared.

Related Skills

  • codebase-onboarding — recon baseline for Phase 1
  • architecture-decision-records — retro-ADR backfill in Phase 4
  • tdd-workflow — Phase 5 execution discipline
  • verification-loop — Phase 6 closure
  • production-audit — launch-readiness lens (complementary, later)
  • security-review — security-only requests

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

accessibility

免费有简介AI 评分 100分

依据WCAG 2.2设计和检查Web、iOS及Android界面,核查读屏标签、键盘操作、配色对比度和操作目标尺寸,使界面支持辅助技术。

  • 为纯图标按钮添加说明
  • 检查键盘操作与模态框焦点
  • 检查对比度与操作目标尺寸
affaan-m/ECC28.6万2026年10月21日 更新

agent-architecture-audit

免费有简介AI 评分 80分

从指令、记忆、工具执行和界面显示等十二个层面排查人工智能代理故障,依据代码和日志梳理原因,按严重程度列出问题并提出修复方案。

  • 排查仅在应用内出现的故障
  • 调查旧对话混入回答的原因
  • 核对工具漏执行或虚报执行
affaan-m/ECC28.6万2026年10月21日 更新

agent-eval

免费有简介AI 评分 80分

用实际开发任务比较多个编程智能体,记录成功率、可获取的API费用、耗时和重复运行的稳定性,为工具选型及更新后的性能评估提供数据。

  • 用实际开发任务比较智能体
  • 采用新工具或模型前进行评估
  • 检查智能体更新后的性能
affaan-m/ECC28.6万2026年10月21日 更新

agent-harness-construction

免费有简介AI 评分 100分

设计和调整AI智能体使用的工具、输入与返回格式,明确出错后的恢复、重试和停止条件,管理上下文信息量,并以完成率、重试次数和成功任务成本评估改进。

  • 设计智能体工具及输入格式
  • 明确工具结果与下一步行动
  • 制定安全重试与停止条件
affaan-m/ECC28.6万2026年10月21日 更新

agent-introspection-debugging

免费有简介AI 评分 100分

根据错误信息和执行环境,分析AI代理反复失败或重复操作的原因。通过小范围、可撤销的恢复操作检验假设,并将结果与依据整理成可供交接的报告。

  • 诊断代理连续失败
  • 调查重复调用工具的循环
  • 检查上下文积累导致的输出退化
affaan-m/ECC28.6万2026年10月5日 更新

agent-introspection-debugging

免费有简介AI 评分 100分

在AI代理反复失败或重复操作时,记录错误与环境前提、排查原因,采取影响有限的恢复操作,并汇总结果和证据,为有依据的重试与交接提供支持。

  • 排查重复调用工具的原因
  • 调查对话膨胀导致的质量下降
  • 核对文件路径与环境差异
affaan-m/ECC28.6万2026年10月21日 更新

查看 affaan-m 的全部技能

报告此技能的问题