用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/liza-mas/liza --skill adr-backfill命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Operate a running §BRAND_NAME_TITLE§ multi-agent run from outside the agent pool: keep the orchestrator healthy, review checkpoints, recover stalls, wire agent environments, plan the next run, and escalate to the human only at genuine forks. Use when operating/babysitting a §BRAND_NAME_TITLE§ run (interactive `§BRAND_BINARY_NAME§ tui` or a headless watch loop), not when authoring the work yourself.
Pre-commit Clean Code refactoring
Produce legacy PRD-format SMARC specifications. Use only when the user or assigned task explicitly names detailed-spec-writing; never infer activation from requests to write an objective, goal, requirements, specification, plan, or PRD.
基于 SOC 职业分类
正在显示 SKILL.md
| name | adr-backfill |
| description | Backfill missing ADR from git history and documentation |
Reconstruct Architecture Decision Records from a repository's git history and documentation. You're doing archaeology — finding the decisions buried in commits, specs, and docs, then surfacing them as ADRs.
An ADR is warranted when someone made a choice that shaped the system. Not every commit is a decision. Your job is to find the ones that were.
Classify files — Distinguish architectural files (where decisions manifest) from supportive files (tests, utils). Persist this classification.
Identify candidate commits — Find commits that touch architectural files with structural changes (not just edits).
Cluster into decisions — Group related commits that represent a single decision being implemented.
Fill gaps — Pull in minor commits (typo fixes, forgotten files) that belong to a cluster but were filtered out.
For each cluster — Analyze intent, ask the user for context, generate the ADR.
Scan complementary sources — Check specs/ and docs/ for decisions not captured by commits.
Enrich ADRs — Add cross-references, diagrams, and implementation notes from related documentation.
Order chronologically — Renumber ADRs to maintain chronological sequence.
Update ADR index — Keep specs/architecture/ADR/README.md in sync after any ADR is added, removed, or renumbered.
Maintain state in files so work isn't lost if the conversation ends.
Consider all files - present and deleted. Deletion may reveal an architectural decision.
Tier 0 — Dependency manifests (highest signal)
requirements.txt, pyproject.toml, package.json, go.mod, Cargo.tomlTier 1 — Infrastructure & deployment
Dockerfile, docker-compose*.yml, CI configs, terraform, k8s manifestsTier 2 — Domain structure
Tier 3 — Interface contracts
specs/ — Design documents that may contain decisions preceding implementationdocs/ — Usage guides and criteria that may encode decisions-as-codeSome files blur the line. When uncertain, ask: "If this changed significantly, would a senior engineer want to know why before approving?" If yes, it's architectural.
Not every change to an architectural file is a decision. Look for:
A 200-line refactor in a util is less ADR-worthy than a one-line addition of celery to requirements.txt.
Assign candidate numbers in strict chronological order (earliest commit date first). This numbering carries through to the final ADR sequence ID. When presenting candidates grouped by confidence tier, sort candidates within each group by ascending number (i.e. chronologically).
When uncertain about boundaries, ask the user.
Classification ambiguity
"I'm unsure whether
src/lib/kafka_client.pyis architectural (core infrastructure) or supportive (utility). It's used by 12 services. How do you see it?"
Cluster boundaries
"Commits abc123–def456 span 3 weeks and touch both the new auth system and the database migration. Should these be one decision or two?"
Intent unclear
"This cluster adds Redis, but I can't tell if it's for caching, session storage, or as a Celery broker. What was the driver?"
Low confidence
"I found 4 commits that add logging configuration. Is this ADR-worthy or just housekeeping?"
Always ask before generating an ADR. Present your analysis, let the user confirm or correct.
Before generating each ADR, ask for:
If PR descriptions or commit messages already contain this, confirm rather than re-ask.
Git commits are the primary source but not the only one. Some decisions are better documented in specs or docs than in commit messages.
Check specs/ for:
A spec file often documents a decision that spans multiple commits or was made before coding began. When you find a spec that describes a decision:
Example: specs/platform-detection.md documented the three-module detection architecture before implementation — this warranted its own ADR even without a clear commit cluster.
Check docs/ for:
Docs may not warrant their own ADR but can enrich commit-based ADRs with:
Example: docs/SELECTION-CRITERIA.md documented the scoring system as a deliberate choice — this warranted an ADR capturing the "criteria as code" decision.
After generating commit-based ADRs:
Gate:
"I found these decisions in specs/docs that aren't captured by commit-based ADRs:
- Platform detection architecture (specs/platform-detection.md)
- Sector taxonomy resolution (specs/sector-taxonomy.md) Which should become ADRs?"
After initial ADR generation, enrich with cross-references and context from related documentation.
Build a reference graph:
Use explicit references: "With the ATS extractor architecture established (ADR-0003, ADR-0008)..."
For each ADR, check if related docs contain:
Add these as inline content within relevant sections, not just as references.
Example enrichment:
### Architecture
**6-Phase Pipeline Vision** (designed from day one):
\`\`\`
Phase 0: Company Discovery → company-inventory.md
Phase 1: Job Discovery → career_jobs/*.json
...
\`\`\`
When the user provides collaboration context, add an "Implementation Notes" section capturing:
Example:
### Implementation Notes
**Collaboration model:** Paired with Claude on specs, implementation, and tests.
Human wrote ~20 LoC to demonstrate the `@register_extractor` decorator mechanism
and the base class pattern — faster than explaining. Every line reviewed with
many requested changes.
**Subsequent findings:** Architecture review identified technical debt:
- REQUEST_TIMEOUT duplication (10+ files, values 10-30s)
- Intra-module duplication in `extract_job_listings.py`
ADRs should be numbered chronologically by decision date, not generation order.
If spec-derived ADRs fall chronologically between commit-based ADRs:
git mv for rename tracking# 15 - ... → # 2 - ...)ADR-0005 → ADR-0008)To avoid conflicts when numbers swap:
git mv 0002-*.md temp-0002-*.md)git mv temp-0015-*.md 0002-*.md)git log of spec fileUse MADR format unless the user specifies otherwise. Place in specs/architecture/ADR/ or the project's existing ADR location.
---
*Reconstructed from commits {first_sha}..{last_sha} ({date_range})*
---
*Reconstructed from {source_file} ({date_range})*
After generating, renumbering, or removing ADRs, update specs/architecture/ADR/README.md.
The index is a markdown table with two columns: ADR (linked title) and Decision (one-sentence outcome).
A good backfilled ADR:
A bad backfilled ADR:
Persist your work so it survives conversation boundaries:
specs/architecture/ADR/adr-backfill-state.yml — classification, clusters, processing progressspecs/architecture/ADR/adr-backfill-clusters/ — one file per cluster with analysis and user inputCheck for existing state at the start. Offer to resume or restart.
When the user invokes this skill:
specs/architecture/ADR/README.md index# adr-backfill-state.yml
version: 1
repository: "git@github.com:org/repo.git"
started_at: "2024-01-15T10:30:00Z"
last_updated: "2024-01-15T14:22:00Z"
file_classification:
# path → {tier: int | null, category: string, override: bool}
"requirements.txt": {tier: 0, category: "dependency_manifest"}
"src/core/domain.py": {tier: 2, category: "domain_structure"}
"tests/test_domain.py": {tier: null, category: "test"}
commits:
# sha → annotation
"abc123":
pruned: false
highest_tier: 0
signals:
- {type: "dependency_added", weight: 1.0, details: {package: "celery"}}
architectural_files: ["requirements.txt"]
processed: true
"def456":
pruned: true
processed: true
clusters:
# Commit-based cluster
[, , ]
[]
[]
# [seq id] - [title]
## Context and Problem Statement
...
## Considered Options
1. [option name] - [description]
2. [option name] - [description]
## Decision Outcome
Chose **Option N**: ...
### Architecture
[diagrams, tables, module descriptions from enrichment]
### Rationale
...
### Implementation Notes
[collaboration patterns, technical decisions, debt identified — when provided by user]
### Consequences
**Positive:**
- ...
**Limitations accepted:**
- ...
---
*Reconstructed from commits {first_sha}..{last_sha} ({date_range})*