zpaper-draft

Type to search...

to open search from anywhere

l-tag-update-list

Review all blog articles and update the tag taxonomy. Use when: (1) User wants to review/update the tag list, (2) User says 'update tags', 'review tags', or 'tag audit', (3) User wants to add/remove/r...

Tag List Update Workflow

Review all blog articles, update the tag taxonomy, and ensure consistent tagging across all articles.

Steps

1. Read the current tag list

Read the tag definition document at doc/docs/overview/tags.md. Parse the “タグ一覧” section to extract all currently defined tag IDs and labels.

2. Collect tags from all articles

Read all article MDX files from blog/src/articles/. For each file, parse the YAML frontmatter and extract the tags array. Build a mapping of tag ID to the list of articles that use it.

3. Compare tags in use vs. tag doc

Produce three lists:

  • Tags in articles but not in the tag doc — These are candidates to add to the tag doc. For each, propose a label following the conventions in the tag doc.
  • Tags in the tag doc but not used in any article — These are potentially stale. They may still be valid (reserved for future use) but should be reviewed.
  • Potential duplicates or merge candidates — Tags that express similar concepts and could be consolidated (e.g., dev-tools vs development-tools).

4. Present the analysis to the user

Display the three lists clearly. For new tag candidates, suggest appropriate labels. For stale tags, recommend whether to keep or remove. For duplicates, suggest which tag to keep and which to merge into it.

Wait for the user to review and approve the proposed changes before proceeding.

5. Update the tag doc

After user approval, update doc/docs/overview/tags.md:

  • Add new tags in the correct alphabetical position within the “タグ一覧” section
  • Remove tags the user confirmed as stale
  • Rename/merge tags as approved

Maintain the - id — label format and alphabetical ordering.

6. Verify tag count per article

After any changes, verify that each article has at most 7 tags. If any article exceeds 7 tags, flag it for the user. The only exception is very long articles that genuinely cover many distinct topics.

7. Update article frontmatter

If any tags were renamed or merged, update the tags array in the frontmatter of all affected article MDX files in blog/src/articles/.

8. Verify the build

Run pnpm build from the project root (or pnpm --filter blog build if available) to verify the blog still builds successfully after the changes.

Report the results to the user.