一键导入
phase-cleanup
Refactor and finalize code after parallel phases complete, addressing technical debt. Use in cleanup phase to polish code before merge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Refactor and finalize code after parallel phases complete, addressing technical debt. Use in cleanup phase to polish code before merge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run section orchestrators to coordinate multi-component workflows. Use when starting work on a section.
Validate agent YAML frontmatter and configuration. Use before committing agent changes or in CI.
Reply to PR review comments using the correct GitHub API endpoint. Use when responding to inline code review feedback (not gh pr comment).
Run Mojo tests using mojo test command. Use when executing tests or verifying test coverage.
Track implementation progress against plan. Use to monitor component delivery and identify blockers.
Check agent configuration coverage across hierarchy levels and phases. Use to ensure complete agent system coverage.
| name | phase-cleanup |
| description | Refactor and finalize code after parallel phases complete, addressing technical debt. Use in cleanup phase to polish code before merge. |
| mcp_fallback | none |
| category | phase |
| phase | Cleanup |
Refactor and finalize code after all parallel phases (Test, Implementation, Package) are complete.
# Check for code quality issues
grep -r "TODO\|FIXME\|HACK" scylla/
just pre-commit-all
pixi run mojo test -I . tests/
# Format and clean
pixi run mojo format scylla/**/*.mojo
pixi run mojo format tests/**/*.mojo
# Verify no warnings
pixi run mojo build -I . shared/ 2>&1 | grep -i "warning" && echo "⚠️ Warnings found" || echo "✅ No warnings"
KISS - Keep It Simple:
# Before: Over-engineered
fn process(data: Tensor) -> Tensor:
let step1 = stage1(data)
let step2 = stage2(step1)
let step3 = stage3(step2)
return finalize(step3)
# After: Simple pipeline
fn process(data: Tensor) -> Tensor:
return pipeline(data)
DRY - Don't Repeat Yourself:
# Before: Duplication
fn add_f32(a: Float32, b: Float32) -> Float32:
return a + b
fn add_f64(a: Float64, b: Float64) -> Float64:
return a + b
# After: Generic
fn add[dtype: DType](a: Scalar[dtype], b: Scalar[dtype]) -> Scalar[dtype]:
return a + b
SOLID - Single Responsibility:
# Before: Mixed responsibilities
fn load_and_process(path: String) -> Tensor:
let raw = load_file(path)
let cleaned = remove_outliers(raw)
return normalize(cleaned)
# After: Separate
fn load_data(path: String) -> RawData:
return load_file(path)
fn preprocess_data(data: RawData) -> Tensor:
return normalize(remove_outliers(data))
mojo format)main branch| Issue | Action |
|---|---|
| TODOs remain | Document in issue or remove code |
| Tests fail | Revert changes, debug, try again |
| Coverage low | Add tests for uncovered lines |
| Warnings | Fix immediately (zero-warnings policy) |
| Merge conflicts | Resolve with implementation team |
Before marking cleanup complete:
# 1. Format
pixi run mojo format scylla/**/*.mojo tests/**/*.mojo
# 2. Test
pixi run mojo test -I . tests/
# 3. No warnings
pixi run mojo build -I . shared/ 2>&1 | tee /tmp/build.log
grep -i "warning" /tmp/build.log && echo "❌ Warnings found" || echo "✅ Clean"
# 4. No TODOs
grep -r "TODO\|FIXME" scylla/ && echo "❌ TODOs found" || echo "✅ Clean"
# 5. Pre-commit
just pre-commit-all
# 6. Final confirmation
git status # No uncommitted changes
CLAUDE.md - "Key Development Principles" (KISS, DRY, SOLID, YAGNI)CLAUDE.md - "Zero-Warnings Policy" (enforcement guidelines)CLAUDE.md - "Common Mistakes to Avoid" (patterns from 64+ test failures)Key Principle: Cleanup completes the 5-phase workflow. Code must be merge-ready.