协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
decision-log【开发与工程】Use when an architecture/product decision should be recorded or past decisions need re-checking — an ADR-style decision journal for agents and teams. Create numbered decision records, track superseding chains, schedule periodic reviews, and search past decisions to avoid re-litigating settled questions.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill to keep durable, searchable decision records when a team or agent needs to remember what was decided, why it was decided, what alternatives were considered, and when the decision should be reviewed.
It solves recurring problems that chat history and meeting notes do not solve well:
The pattern is ADR-style: one Markdown file per decision, numbered sequentially, with status, context, options, decision, consequences, and review metadata. The format follows the spirit of Michael Nygard's Architecture Decision Record (ADR) pattern, generalized for product, operations, research, and team decisions.
Decision records live in a configurable directory:
--decisions-dir DIR on every command, orDECISIONS_DIR=/path/to/decisions, or./decisions/ relative to the current working directory.python scripts/decision_log.py new --title "Use SQLite for source-tracker"
The command creates the next numbered file, such as:
./decisions/ADR-001-use-sqlite-for-source-tracker.md
Open the printed path, complete the sections, then change ## Status from
proposed to accepted once the decision is approved.
Create a decision record when the choice is meaningful enough that future people will ask "why did we do this?" Examples:
Do not create an ADR for trivial choices:
Each decision record is a Markdown file named:
ADR-NNN-short-title.md
NNN is a zero-padded sequence number (001, 002, ...). Do not hand-number
files unless you are migrating old records; use the CLI so numbers remain
consistent.
The sections are:
Allowed values:
proposed — drafted but not yet adopted.accepted — active decision.superseded by ADR-NNN — replaced by a later decision.deprecated — intentionally retired without a direct replacement.Never delete an old decision just because it changed. Supersede it so the audit trail remains intact.
The date the record was created or accepted, in YYYY-MM-DD format.
The problem statement, background, constraints, forces, assumptions, and facts that make the decision necessary. Good context explains why the decision is not obvious.
List meaningful alternatives and their pros/cons. Include the rejected options that future readers are likely to ask about.
State what was chosen and why. The "why" matters as much as the choice: tie the selection back to constraints, trade-offs, and expected outcomes.
Record positive, negative, and neutral consequences. This prevents the record from becoming only a justification memo; known downsides should be visible.
Record the review cadence, next review date, and trigger condition:
monthly, quarterly, annually, or on-trigger.YYYY-MM-DD, auto-computed for dated cadences.Create a new decision with the default quarterly review cadence:
python scripts/decision_log.py new --title "Use SQLite for source-tracker"
Add initial context:
python scripts/decision_log.py new \
--title "Use SQLite for source-tracker" \
--context "Single-user local index, low write volume, simple backup needs."
Create in a specific directory:
python scripts/decision_log.py new \
--title "Use hosted object storage for exports" \
--decisions-dir ./docs/decisions
Choose a review cadence:
python scripts/decision_log.py new \
--title "Adopt quarterly vendor review" \
--cadence annually
Completion criterion: the CLI prints a new ADR-NNN-short-title.md path and the
file contains a filled title, date, cadence, and next review date when applicable.
List all decisions:
python scripts/decision_log.py list
Filter by status:
python scripts/decision_log.py list --status accepted
python scripts/decision_log.py list --status proposed
python scripts/decision_log.py list --status superseded
python scripts/decision_log.py list --status deprecated
Filter by topic text:
python scripts/decision_log.py list --topic storage
Completion criterion: the table shows ADR number, date, status, title, and path.
When a decision changes, create the new decision first, then mark the old one as superseded:
python scripts/decision_log.py new --title "Move source-tracker storage to Postgres"
python scripts/decision_log.py supersede 001 --by 005
This updates ADR-001...md to:
## Status
superseded by ADR-005
and appends a link to the replacing ADR. The old context remains searchable.
Completion criterion: list --status superseded includes the old ADR, and
timeline shows the chain.
Search full text across decisions:
python scripts/decision_log.py search "SQLite"
python scripts/decision_log.py search "backup"
The search returns matching ADRs and context snippets so you can avoid re-litigating previously settled questions.
Completion criterion: matching ADR numbers, titles, paths, and snippets are printed, or the CLI explicitly says no matches were found.
Show decisions whose next review date is due:
python scripts/decision_log.py due-review
Use the cron-compatible checker for scheduled reminders:
python scripts/review_checker.py --decisions-dir ./decisions
Example weekly cron scheduler entry:
0 9 * * MON DECISIONS_DIR=/path/to/decisions python /path/to/scripts/review_checker.py
The checker is silent when nothing is due. When accepted decisions are due, it prints a concise summary that can be delivered to a messaging platform by the scheduler or wrapper you already use.
Completion criterion: due accepted decisions produce a message beginning with
N decisions due for review:; no due decisions produce no output from the
checker.
Show superseding chains:
python scripts/decision_log.py timeline
Filter chains by topic:
python scripts/decision_log.py timeline --topic storage
Example output:
ADR-001 → ADR-005 → ADR-012
Completion criterion: every chain shows oldest decision first and follows
superseded by ADR-NNN links forward.
monthly — use for fast-moving decisions, experiments, vendor trials, or
operational choices that could become stale quickly. Next review is date + 1
calendar month.quarterly — default for most active product, architecture, and workflow
decisions. Next review is date + 3 calendar months.annually — use for stable decisions where yearly validation is enough. Next
review is date + 1 calendar year.on-trigger — use when a date is not meaningful. Leave Next review blank
and write a concrete trigger, such as "review if monthly volume exceeds 1M
records" or "review if a second team adopts this workflow."Calendar-month calculations clamp to the last valid day of the target month. For example, a monthly review from January 31 becomes February 28 or 29.
When a workflow produces or updates a file, provide the file path to the user so they can open, review, and edit the Markdown record in their normal editor.
superseded by ADR-NNN and keep the file.Next review value. Use on-trigger only when the trigger is concrete.ADR-NNN-short-title.md pattern will
not be included in list, review, or timeline commands.proposed, accepted, superseded by ADR-NNN,
or deprecated so filters and reminders work.ADR-NNN-short-title.md and numbers are sequential.accepted status once approved.python scripts/decision_log.py list shows the expected records.python scripts/decision_log.py due-review finds due records.python scripts/decision_log.py timeline shows superseding chains.review_checker.py with the intended
DECISIONS_DIR or --decisions-dir.scripts/decision_log.py — main CLI for create, list, supersede, search,
due-review, and timeline.scripts/review_checker.py — silent-when-empty reminder checker for cron
schedulers.templates/decision-template.md — blank ADR template.references/adr-format.md — section-by-section ADR writing guide.references/review-cadence.md — cadence and trigger rules.