candidates-folder-refactor
Rank noisy folders for skill-folder-refactor. Use when asked to find refactor candidates, noisy folders, or top folders/subfolders to split.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Rank noisy folders for skill-folder-refactor. Use when asked to find refactor candidates, noisy folders, or top folders/subfolders to split.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Resolve short approval against the latest checkpoint. Use for "lgtm", "looks good", "approved", or "go ahead"; not risky or review feedback.
Re-check a prior assistant claim. Use when user says "nack", "not convinced", or "check again"; not for review feedback.
UI/UX routing front door. Use as the front door for broad or ambiguous UI/UX work that needs the right build, redesign, audit, design-system, accessibility, or browser specialist. Do not use when the user already names a narrower UI skill.
Proposes UI Vault resource upgrades for a selected webpage. Use when the user asks for libraries, assets, effects, or inspiration for an existing page. Do not use for implementation or greenfield design.
Upload, list, or delete files with s3upload and return expiring Azure links. Use for configured temporary Azure storage; not for S3 or cloud setup.
Ship local Git changes by inspecting, polishing, validating, split-committing, and pushing. Use for commit, push, ship, delivery audit, or delivery blockers; not deploys or releases.
| name | candidates-folder-refactor |
| description | Rank noisy folders for skill-folder-refactor. Use when asked to find refactor candidates, noisy folders, or top folders/subfolders to split. |
Find the top five noisy folders that are good candidates for skill-folder-refactor. This skill only scouts and ranks; it does not move files.
git status --short --branch, repo instructions, and existing maps such as codebase-map-understand.md when present. Use existing codebase maps for relationship/hotspot leads before ranking broad codebase candidates, then verify with scanner metrics and live files.# Fresh scan
node skills/engineering/candidates-folder-refactor/scripts/find-candidates.mjs [folder]
# Reuse prior results
node skills/engineering/candidates-folder-refactor/scripts/find-candidates.mjs [folder] --from-log
The scanner writes [folder]/.pi/candidates-folder-refactor/latest.json and appends runs.jsonl.
Install once:
sh skills/engineering/candidates-folder-refactor/scripts/install.sh
Use autofolderrefactor ignore [folder] to preview and establish generated/vendor/artifact ignore rules, then autofolderrefactor <loops> [folder] (for example autofolderrefactor 3 .) to run fully automatic candidate #1 → smart share-code + folder-refactor loops. Only use this when the owner explicitly wants autonomous refactoring. Guardrails:
pwd or subfolders (no parent/symlink escapes).utils/common buckets.PI_AUTO_FOLDER_REFACTOR_TOPOLOGY_GUARD=0 disables the runtime topology guard..refactorignoreThe scanner honors .refactorignore in the current working directory and scan root. Use one pattern per line, with # comments, optional trailing / for directories, */** globs, and ! negation for later rules. It also reports Suggested .refactorignore entries for artifact/generated/vendor-looking folders and omits those from refactor candidates. Smart suggestions use confidence-scored evidence: generated-code headers, lock/generated marker files, artifact-heavy extensions, vendor/opensource path patterns, artifact folder names, low-churn unreferenced huge trees, and parent-folder compaction. Source roots such as lib/, src/, internal/, domain/, and weak architecture names like external/ are protected unless stronger artifact/generated evidence exists. Scanner content reads are budgeted by PI_CANDIDATES_FOLDER_REFACTOR_MAX_CONTENT_FILE_BYTES and PI_CANDIDATES_FOLDER_REFACTOR_MAX_TOTAL_CONTENT_BYTES; files beyond those budgets still count structurally but skip import/symbol content analysis.
[folder]/.pi/candidates-folder-refactor/latest.json first to reuse prior candidates, ignored false positives, and the likely next /folder-refactor target before deciding whether a fresh scan is needed.. from inside that folder, or the folder path from its parent).git log churn, import fan-in/fan-out, test presence, responsibility role signals, and duplicate file/symbol names.node_modules, .git, dist, build, coverage, .pi, .understand-anything, etc.).files/churn/callers/imports/tests/roles/duplicates) before the judgment so evidence is easy to compare./folder-refactor <candidate> should be the next guarded command and what boundary to give it.[target]/.pi/candidates-folder-refactor/latest.json and appends runs.jsonl.--from-log or by reading latest.json; then focus inspection on prior top candidates, newly changed folders, and the previous Next step instead of rescanning every broad subtree by default./folder-refactor <candidate> so the extension starts skill-folder-refactor with scan/audit/state guardrails.lgtm after the candidate report, treat it as approving candidate #1 and immediately run /folder-refactor <candidate #1> with the candidate metrics and suggested boundary as context..pi/candidates-folder-refactor/ logs as actionable targets.Candidates folder refactor: <repo-or-folder>
Top candidates:
1. <path> — metrics: files <n>, churn <n>, callers <n>, imports-out <n>, tests <n>, roles <n>, duplicates <n>. <why noisy; suggested /folder-refactor boundary>
2. ...
Validation/scout evidence:
- scanner: <command>
- log: <target>/.pi/candidates-folder-refactor/latest.json
- inspected: <paths or searches>
Next step: say `lgtm` to run `/folder-refactor <best path>` immediately, or name another candidate.
Follow the shared skill contract for repo study, dirty-worktree hygiene, verification evidence, safe handoffs, and safety defaults.