Skip to content

docs: refactorバッチの記録とdevcontainer更新 - #135

Merged
keito4 merged 2 commits into
mainfrom
chore/refactor-batch-01
Nov 12, 2025
Merged

docs: refactorバッチの記録とdevcontainer更新#135
keito4 merged 2 commits into
mainfrom
chore/refactor-batch-01

Conversation

@keito4

@keito4 keito4 commented Nov 12, 2025

Copy link
Copy Markdown
Owner

概要

  • refactor系Codexプロンプトに「MCP経由で5件ずつIssue化してから着手する」手順を追記
  • .codex/prompts/refactor:decouple.mdのトラッキング用に issues/refactor-decouple-batch-01.md を新設
  • Dev Containerで個人設定やGitHub CLIを扱えるようにマウントを整理し、Next.js用node_modulesボリュームを追加

テスト

  • npm run format:check
  • npm run lint
  • npm test

Summary by CodeRabbit

  • Documentation

    • Added a preparatory step to refactoring guides requiring repository-wide discovery and batching of items into GitHub Issues (in groups of five) before work begins.
    • Added detailed refactor batch plans with concrete decoupling strategies and acceptance criteria.
  • Chores

    • Updated development container mounts for improved local config access and node module persistence.
  • Tests

    • Adjusted test scripts to run Jest in-band for test, watch, and coverage runs.

@coderabbitai

coderabbitai Bot commented Nov 12, 2025

Copy link
Copy Markdown

Walkthrough

The PR adds preparatory batching guidance to five refactor prompt files, updates DevContainer mounts to include additional user config and a volume for node_modules, adds a new issue document describing five decoupling plans, and adjusts Jest scripts in package.json to run tests in-band.

Changes

Cohort / File(s) Summary
Refactor prompts
​.codex/prompts/refactor:decouple.md, ​.codex/prompts/refactor:dedupe.md, ​.codex/prompts/refactor:reorganize.md, ​.codex/prompts/refactor:simplify.md, ​.codex/prompts/refactor:split.md
Inserted a new "0." step under 手順(最小リスク) instructing repository-wide discovery of related items and batching them into GitHub Issues in groups of five (MCP recommended). No code/API changes.
DevContainer configuration
​.devcontainer/devcontainer.json
Modified mounts: replaced .claude directory mount with .claude.json file mount; added mounts for ~/.gitconfig, ~/.config/gh, ~/.codex; added a volume mount for ${containerWorkspaceFolder}/next/node_modules.
Refactor documentation (new)
issues/refactor-decouple-batch-01.md
Added a new issues doc listing five decoupling plans with target files, coupling descriptions, implementation steps, and Definition of Done; planning-only, no code changes.
Package scripts
package.json
Updated Jest-related scripts to run in-band: test, test:watch, and test:coverage now include --runInBand.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review focus: correctness of new procedural wording across the five prompt files (consistency/translation), DevContainer mount path semantics and security implications, and package.json script behavior.
  • Extra attention: ​.devcontainer/devcontainer.json mounts and the new issues/refactor-decouple-batch-01.md content for completeness.

Possibly related PRs

Poem

🐰 I hopped through prompts, one by one,
Batching five tasks beneath the sun.
Mounts aligned and tests run straight,
Notes for refactors—neat and slate—
A tiny rabbit cheers the code undone. 🎋

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'docs: refactorバッチの記録とdevcontainer更新' accurately describes the main changes: documentation updates for refactor batches and devcontainer configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/refactor-batch-01

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ad940f and cace237.

📒 Files selected for processing (2)
  • issues/refactor-decouple-batch-01.md (1 hunks)
  • package.json (1 hunks)
🔇 Additional comments (2)
package.json (1)

15-17: Confirm intent: sequential test execution is intentional.

Adding --runInBand across all Jest scripts makes tests run sequentially instead of in parallel. This supports stable test execution during refactor work but may increase total test time. Ensure this is a deliberate, long-term choice aligned with the project's refactor strategy (mentioned in the PR summary as supporting "safer, incremental refactor workflows") and not a temporary debugging measure.

issues/refactor-decouple-batch-01.md (1)

1-63: Well-structured refactor planning document.

The issue tracking is clear, specific, and actionable. Each issue includes precise file/line ranges, concrete problem statements, multi-step plans, and verifiable Definitions of Done. This format will help implementers understand coupling patterns and success criteria.

One note: Issues 1 and 2 both target script/import.sh (different line ranges: 5-54 vs. 65-91). Ensure sequencing or coordination is clear during implementation so that refactoring one issue does not conflict with or undo progress on the other. Consider adding a note in the implementation plan about execution order if there are dependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@keito4 keito4 self-assigned this Nov 12, 2025
@keito4
keito4 merged commit 178c716 into main Nov 12, 2025
1 of 2 checks passed
@keito4
keito4 deleted the chore/refactor-batch-01 branch January 4, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant