一键导入
cleanup
CB - Post-implementation cleanup — rationalize docs, capture learnings, update project state
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
CB - Post-implementation cleanup — rationalize docs, capture learnings, update project state
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
CB - WCAG 2.2 compliance patterns for web interfaces. Use when building or reviewing UI for accessibility — semantic HTML, ARIA, keyboard navigation, color contrast, motion safety, screen reader support, and automated testing. Complements ui-component-creator (structure), front-end-design (aesthetics), and mobile-friendly-design (responsive).
CB - Create and manage Bruno API collections. Use when building API requests, test suites, environments, or working with .bru files in api_tools/. Bruno is a Git-native, offline-first API client (Postman alternative).
CB - Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
CB - Use when building responsive web interfaces that must work across phone, tablet, and desktop. Covers mobile navigation, touch-friendly interactions, responsive layouts, and mobile form patterns. Complements ui-component-creator (structure) and front-end-design (creative direction). Not for native mobile apps — responsive web only.
CB - Generate PR description, sync branch, push, and create/update PR
CB - Create a production release with changelog, version bump, PR, tag. Supports two-branch (dev->main) and single-branch (release branch->main) workflows.
| name | cleanup |
| description | CB - Post-implementation cleanup — rationalize docs, capture learnings, update project state |
| user-invocable | true |
You are tasked with cleaning up after a completed implementation by analyzing what actually happened and creating documentation for significant decisions.
This implements the "Review & Rationalization Phase" from Parnas and Clements (1986): documentation should show the cleaned-up, rationalized version of what happened, not the messy discovery process.
What cleanup does:
When this command is invoked:
git branch --show-currentfeat/auth-setup → auth-setup).claude/workspace/plans/ and find one whose filename contains the slug.claude/workspace/research/ and .claude/workspace/reviews/ for matching filesRead all provided files FULLY (no limit/offset):
Check for uncommitted changes — they are part of the implementation:
git status --porcelain
git diff HEAD
git diff --cached
Analyze git history since plan creation (including uncommitted):
git log --since="[plan date]" --oneline --no-merges
git diff [plan-commit]..HEAD --stat
git diff [plan-commit]..HEAD
git diff HEAD --stat
Read 8-10 most important changed files FULLY — compare current state to what the plan described.
Compare what was planned vs what was actually built:
Plan vs reality:
Identify what's worth preserving (max 5 items):
Update all documentation so it reads as if the current code was always the intended outcome. No "we changed X because the plan said Y" — just describe what the code does and why.
This applies to ALL text — both existing and newly written. Scan every line you've added or modified for "trail of changes" language (e.g., "this replaces the old X", "previously we used Y", "unlike the former approach").
Code comments: Review comments in changed files. They should explain purpose, not history. Remove any that reference the implementation journey.
README.md: Update if user-facing behavior, installation steps, or API usage changed. Describe current state as intended design.
CLAUDE.md: Update architecture sections, conventions, and patterns to match the final implementation. Document as established practice, not a recent change.
Other project docs: Rewrite affected sections to describe the current state cleanly.
The rule: A reader encountering any documentation for the first time should see a coherent, intentional design — not a trail of changes.
Update decisions via project-server (add_decision) with implementation learnings:
Decisions are stored in the project-server database.
For each pattern/convention to add:
Mark completed items via project-server (complete_todo):
Delete the build review file if it exists:
.claude/workspace/build-logs/REVIEW.md.claude/workspace/build-logs/review-diff.patch.claude/workspace/build-logs/tooling.jsonThese are temporary build artifacts and should not be committed.
Commit the cleanup changes:
docs: cleanup after <feature-name> implementationPresent summary:
Cleanup Complete
## Learnings Captured:
- decisions.md: [summary of entries added/updated]
## Documentation Updated:
- CLAUDE.md: [N] patterns/conventions added
- todo.md: [N] items marked as completed
- decisions.md: [updated with implementation learnings]
- README.md: [updated if user-facing changes]
Recommended next step: /pr to create PR description
git status and git diff HEAD for uncommitted workA cleanup is complete when: