Skip to content
cccskills
FreePublished on GitHub

adr-migrate

Migrate existing ADRs to YAML frontmatter format. Scans docs/decisions/ for ADRs without frontmatter, infers status from body text, shows dry-run for approval. Trigger: /adr-migrate

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md4.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

ADR Migrate

既存の ADR ファイルに YAML frontmatter を追加するマイグレーションスキル。

Workflow

Step 1: Scan ADR files

Glob: docs/decisions/adr-*.md

If no files found: "ADR ファイルが見つかりません。" → Stop.

Classify each file:

  • Has frontmatter (starts with ---): Skip (already migrated)
  • No frontmatter: Candidate for migration

If all files already have frontmatter: "すべての ADR に frontmatter が設定済みです。" → Stop.

Step 2: Infer status for each candidate

Read the full content of each candidate file and apply these rules:

Status inference

Search for a ## Status or ## ステータス section. Extract the text content of that section.

Keyword matching (case-insensitive):

KeywordsInferred Status
complete, done, implemented, 実装完了, 完了Complete
in progress, in-progress, implementing, 実装中, 進行中InProgress
proposed, draft, 提案, ドラフトProposed
No status section or no keyword matchAccepted (default)

Plan detection

Search for links matching plan-*.md pattern in the body text. If found, extract the filename for the plan field.

Deps detection (informational only)

Search for ADR-NNN patterns in the body text. Record as potential dependencies but do NOT auto-set in frontmatter. Report as notes in the dry-run output for the user to review.

Step 3: Show dry-run report

Display the migration plan before applying:

## ADR Migration Dry-Run

| File | Inferred Status | Plan | Potential Deps | Notes |
|------|----------------|------|---------------|-------|
| adr-001-auth.md | Complete | - | - | Status section: "Implemented" |
| adr-002-api.md | Accepted | plan-api.md | ADR-001 | No status section (default) |
| adr-003-db.md | InProgress | - | ADR-001, ADR-002 | Status section: "In progress" |

### Skipped (already have frontmatter)
- adr-004-cache.md

### Notes
- `deps` フィールドは自動設定されません。上記の "Potential Deps" を確認し、必要に応じて手動で追加してください。
- Status の推定が正しくない場合は、適用前にお知らせください。

この内容で frontmatter を追加してよろしいですか?

Wait for user approval before proceeding.

Step 4: Apply migration

After user approval, for each candidate file:

  1. Use Edit tool to insert frontmatter at the beginning of the file:
---
status: { inferred_status }
plan: { plan_filename } # only if detected
---
  1. If a plan was detected, include it. If not, omit the field entirely (don't include empty fields).

  2. Do NOT auto-add deps — leave for manual review.

Step 5: Handle redundant status sections

After adding frontmatter, ask the user about redundant ## Status / ## ステータス sections:

以下のファイルに `## Status` セクションが残っています。
frontmatter に status が移行されたため、冗長になっている可能性があります。

- adr-001-auth.md (line 15-17)
- adr-003-db.md (line 20-22)

これらのセクションを削除しますか?(各ファイル個別に確認することもできます)

Only remove if the user approves.

Edge Cases

CaseBehavior
File already has frontmatterSkip, report in "Skipped" section
No status section foundDefault to Accepted, add warning note
Multiple status keywords matchUse the first match, note ambiguity
File is empty or malformedSkip with warning
docs/decisions/ doesn't existReport and stop

Related

  • adr-schema.md: Frontmatter schema definition
  • /adr-session: Post-migration, use this to manage ADR sessions

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Start or resume an ADR session. Without number: show status overview and recommend next actionable ADR. With number: provide phase-specific guidance. Trigger: /adr-session, /adr-session NNN, /adr-session new

The English summary is being prepared. Showing the original description.

berlysia/dotfiles9Updated Oct 20, 2026

Analyze a project's harness maturity and guide staged adoption of Harness Engineering best practices (quality loops, safety gates, linters, CLAUDE.md optimization).

The English summary is being prepared. Showing the original description.

berlysia/dotfiles9Updated Oct 20, 2026

bugfix

Free

Standardized bug fix workflow using TDD (Red-Green-Refactor). Use when fixing bugs, resolving issues, or when the user invokes /bugfix. Ensures root cause analysis, failing test first, then minimal fix.

The English summary is being prepared. Showing the original description.

berlysia/dotfiles9Updated Oct 20, 2026

Create detailed specifications by iteratively clarifying unclear points for Plan mode. Use when: After completing a plan when detailed requirements need clarification before implementation.

The English summary is being prepared. Showing the original description.

berlysia/dotfiles9Updated Oct 20, 2026

Policy-enforcing installer that deploys hardened Claude Code Action workflows (`@claude` manual mention + dependency-bot auto-fix) into a personal GitHub repository the user administers. Use when asked to introduce Claude Code Action, apply `@claude` mention support, or set up automated CI auto-fix for dependency bot PRs, using the security-hardened templates shipped with this skill.

The English summary is being prepared. Showing the original description.

berlysia/dotfiles9Updated Oct 20, 2026

説明的な文章に緩急を設計するための規範。緩急を装飾ではなく認知モードの切替(観察→逡巡→断定→再観察)と未回収の緊張の管理として扱い、文の拍、段落の密度波形、節の入り方、緩みと駄文の判別、執筆後の機械的な点検手順を定める。読み物として読ませたい章・記事・解説文を生成するとき、または「密度はあるが平坦でおもしろくない」文章を診断・修正するときに使用する。

The English summary is being prepared. Showing the original description.

berlysia/dotfiles9Updated Oct 20, 2026

See all skills by berlysia

Report a problem with this skill