analyzing-codebases
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity,…
Writes AGENTS.md per subproject, archives run artifacts, and suggests rcc handoff conditionally. Use when verifying-refactors passes (PASS or PASS-WITH-WEAK-TESTS).
Claude Code
$ npx -y skills add wayne930242/Reflexive-Claude-Code --skill finalizing-refactors --agent claude-code
Codex
$ npx skills add wayne930242/Reflexive-Claude-Code --skill finalizing-refactors -a codex -y
Cursor
$ npx skills add wayne930242/Reflexive-Claude-Code --skill finalizing-refactors -a cursor -y
Gemini CLI
$ npx skills add wayne930242/Reflexive-Claude-Code --skill finalizing-refactors -a gemini-cli -y
GitHub Copilot
$ npx skills add wayne930242/Reflexive-Claude-Code --skill finalizing-refactors -a github-copilot -y
OpenCode
$ npx skills add wayne930242/Reflexive-Claude-Code --skill finalizing-refactors -a opencode -y
Windsurf
$ npx skills add wayne930242/Reflexive-Claude-Code --skill finalizing-refactors -a windsurf -y
name: finalizing-refactors description: Writes AGENTS.md per subproject, archives run artifacts, and suggests rcc handoff conditionally. Use when verifying-refactors passes (PASS or PASS-WITH-WEAK-TESTS).
**Finalizing refactors IS leaving a codebase that the next AI agent can pick up immediately.**
Write per-subproject AGENTS.md (the cross-tool standard for agent-targeted docs), archive run artifacts to `.rcc/archive/`, suggest next-step handoff to rcc based on project state.
**Core principle:** The refactor is not done until the next agent has a map.
**Pattern:** Terminal **Handoff:** user-confirmation **Next:** none (terminal), but suggests `/rcc migrate` or `/rcc reflect`
**Tasks:** 1. Detect subprojects 2. For each subproject, read existing AGENTS.md (if any) 3. Generate AGENTS.md content per template 4. Show diff and get user approval 5. Write AGENTS.md files 6. Archive run artifacts 7. Detect rcc state and suggest handoff 8. Print final summary
Root has a manifest → root is a subproject. Any directory with its own manifest and not nested in another is a subproject. Use same detection as analyzing-codebases.
For each subproject root, check if `AGENTS.md` exists. If yes, parse existing section headings. Plan will add missing sections, preserve existing.
Per subproject, fill template at `references/agents-md-template.md`:
Show `diff -u <existing> <proposed>` per subproject. User approves per subproject or batch. Rejections → prompt for edits.
Write approved AGENTS.md files. Commit:
git add <paths> git commit -m "docs(aref): add/update AGENTS.md for N subprojects"
Move run artifacts to `.rcc/archive/{ts}-aref-run/`:
mkdir -p .rcc/archive/{ts}-aref-run
mv .rcc/{ts}-*.md .rcc/archive/{ts}-aref-run/
mv .rcc/{ts}-*.json .rcc/archive/{ts}-aref-run/ 2>/dev/null || true
mv .rcc/{ts}-apply-state.yml .rcc/archive/{ts}-aref-run/ 2>/dev/null || trueKeep `.rcc/aref-raw/` and clean it: `rm -rf .rcc/aref-raw/{ts}-*`.
Commit:
git add .rcc/archive/{ts}-aref-run/
git commit -m "chore(aref): archive run {ts}"Check:
No agent system detected → print: > Refactor complete. This project has no agent system. Next: `/rcc migrate` to bootstrap skills, CLAUDE.md, rules.
Agent system present → print: > Refactor complete. Existing agent system detected. Next: `/rcc reflect` to let the existing skills incorporate the new structure.
Print:
Instruct user: > To merge: `git checkout main && git merge --no-ff <branch>` or open a PR.
| Thought | Reality | |---------|---------| | "AGENTS.md is redundant with README" | AGENTS.md is the agent-targeted doc; README is human-targeted. Different audiences, different content. | | "Skip archive, user can read .rcc/ directly" | Archive keeps unstacked run history. Cleans working .rcc/. | | "Merge the branch to finalize" | User merges. Plugin stops at branch. |
A Claude Code plugin marketplace for skills-driven Agentic Context Engineering (ACE) — build, analyze, and maintain agent systems with structured workflows.
Detects project languages and monorepo state, runs language-appropriate static analysis (dependency graph, complexity,…
Executes a refactor plan phase-by-phase on a dedicated branch with per-phase commits and mandatory reviewer checkpoints. Use when…
Converts a refactor map into a phased plan using parallel-change, branch-by-abstraction, or strangler fig patterns. Use when user…
Adds golden/snapshot tests to untested hotspot modules before refactoring. Use when refactor plan marks any phase with…
Validates hard structural rules (no cycles, file/fn line caps, cognitive/cyclomatic complexity) and runs mutation testing on…
Validates component-type choices for agent system work, classifying knowledge as CLAUDE.md vs rule vs skill vs agent vs hook and…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.