Move files from repo root into .config folder#180
Conversation
📝 WalkthroughWalkthroughThis PR relocates shared configuration files (pyrefly, ruff, pylint, coverage, typos, prettier) into a ChangesConfig directory migration and Copier provenance relocation
Estimated code review effort: 3 (Moderate) | ~25 minutes OpenAPI anyOf Collapse Safety Fix
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@template/template/.config/.prettierrc`:
- Line 1: The nested Prettier symlink points to the wrong target and resolves
inside the template instead of the repo-root config. Update the symbolic link
for .prettierrc under template/.config so it references the root-level
.config/.prettierrc, keeping the template aligned with the shared Prettier
configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 669ffbc3-7981-4d49-be4d-e11496453cbd
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (71)
.claude/CLAUDE.md.coderabbit.yaml.config/.coveragerc.config/.prettierrc.config/_typos.toml.config/pylintrc.toml.config/pyrefly.mutmut.toml.config/pyrefly.toml.config/ruff-non-src.toml.config/ruff.toml.devcontainer/devcontainer.json.github/CODE_OF_CONDUCT.md.github/CONTRIBUTING.md.github/workflows/ci.yaml.pre-commit-config.yamlAGENTS.mdCLAUDE.mdcopier.yamlextensions/context.pypyproject.tomlpytest.inisrc/copier_base_template/copier_tasks/copier_provenance.pysrc/copier_base_template/openapi/openapi_schema_simplifier.pytemplate/.config/.coveragerctemplate/.config/.prettierrctemplate/.config/_typos.tomltemplate/.config/pylintrc.tomltemplate/.config/pyrefly.tomltemplate/.config/ruff-non-src.tomltemplate/.config/ruff.tomltemplate/.coveragerctemplate/.devcontainer/devcontainer.json.jinja-basetemplate/.github/CODE_OF_CONDUCT.mdtemplate/.github/CONTRIBUTING.mdtemplate/.github/workflows/ci.yaml.jinja-basetemplate/.prettierrctemplate/CODE_OF_CONDUCT.mdtemplate/CONTRIBUTING.mdtemplate/README.md.jinja-basetemplate/_typos.tomltemplate/copier.yml.jinja-basetemplate/extensions/context.py.jinja-basetemplate/pylintrc.tomltemplate/pyrefly.tomltemplate/ruff-non-src.tomltemplate/ruff.tomltemplate/template/.claude/CLAUDE.mdtemplate/template/.config/.prettierrctemplate/template/.config/_typos.tomltemplate/template/.config/{% if template_uses_python %}.coveragerc{% endif %}template/template/.config/{% if template_uses_python %}pylintrc.toml{% endif %}template/template/.config/{% if template_uses_python %}pyrefly.mutmut.toml{% endif %}template/template/.config/{% if template_uses_python %}pyrefly.toml{% endif %}template/template/.config/{% if template_uses_python %}ruff-non-src.toml{% endif %}template/template/.config/{% if template_uses_python %}ruff.toml{% endif %}template/template/.github/CONTRIBUTING.mdtemplate/template/.github/{% raw %}{% if is_open_source %}CODE_OF_CONDUCT.md{% endif %}{% endraw %}template/template/.prettierrctemplate/template/CLAUDE.mdtemplate/template/CONTRIBUTING.mdtemplate/template/_typos.tomltemplate/template/{% if template_uses_python %}.coveragerc{% endif %}template/template/{% if template_uses_python %}pylintrc.toml{% endif %}template/template/{% if template_uses_python %}pyrefly.mutmut.toml{% endif %}template/template/{% if template_uses_python %}pyrefly.toml{% endif %}template/template/{% if template_uses_python %}ruff-non-src.toml{% endif %}template/template/{% if template_uses_python %}ruff.toml{% endif %}template/template/{% raw %}{% if is_open_source %}CODE_OF_CONDUCT.md{% endif %}{% endraw %}template/{% if install_claude_cli %}CLAUDE.md{% endif %}tests/unit/copier_tasks/test_copier_provenance.pytests/unit/openapi/test_openapi_schema_simplifier.py
💤 Files with no reviewable changes (22)
- template/template/CONTRIBUTING.md
- template/template/{% if template_uses_python %}ruff.toml{% endif %}
- template/template/.prettierrc
- template/template/{% raw %}{% if is_open_source %}CODE_OF_CONDUCT.md{% endif %}{% endraw %}
- template/ruff.toml
- template/CONTRIBUTING.md
- template/ruff-non-src.toml
- template/template/_typos.toml
- template/template/{% if template_uses_python %}pylintrc.toml{% endif %}
- template/template/{% if template_uses_python %}.coveragerc{% endif %}
- template/pyrefly.toml
- template/template/{% if template_uses_python %}ruff-non-src.toml{% endif %}
- template/_typos.toml
- template/template/CLAUDE.md
- template/CODE_OF_CONDUCT.md
- template/.prettierrc
- template/{% if install_claude_cli %}CLAUDE.md{% endif %}
- template/template/{% if template_uses_python %}pyrefly.mutmut.toml{% endif %}
- template/.coveragerc
- CLAUDE.md
- template/pylintrc.toml
- template/template/{% if template_uses_python %}pyrefly.toml{% endif %}
| @@ -0,0 +1 @@ | |||
| ../../.config/.prettierrc No newline at end of file | |||
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Fix the nested Prettier symlink path.
This currently resolves to template/.config/.prettierrc instead of the repo-root .config/.prettierrc, so the nested template will point at the wrong file.
Proposed fix
-../../.config/.prettierrc
+../../../.config/.prettierrc📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ../../.config/.prettierrc | |
| [Symbolic link → ../../../.config/.prettierrc] |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@template/template/.config/.prettierrc` at line 1, The nested Prettier symlink
points to the wrong target and resolves inside the template instead of the
repo-root config. Update the symbolic link for .prettierrc under
template/.config so it references the root-level .config/.prettierrc, keeping
the template aligned with the shared Prettier configuration.
There was a problem hiding this comment.
https://code.claude.com/docs/en/claude-directory#file-reference so based on this it seems it really wants CLAUDE.md to be at the root to apply at the fully project. But im guessing you didn't notice any difference b/c AGENTS.md is staying at the root and it likely picks that one up. Just something to think about if we do another pass and try to move more things from that root location.

Why is this change necessary?
The repository root was cluttered with a large number of tool config files, dotfiles, and copier metadata. This moves many of them out of the root — into
.config/for tool configs and copier metadata,.github/for community-health docs, and.claude/for the Claude entrypoint — to keep the root lean and group related files together. The change is applied consistently across the base template and the child/grandchild template layers it generates.How does this change address the issue?
Moved into
.config/(tool configs — each pointed at its new path via the tool's explicit config flag in.pre-commit-config.yaml, and mirror symlinks in the child/grandchild templates recreated at the new depth):.coveragerc(pytest.ini--cov-config)pylintrc.toml(--rcfile)ruff.toml+ruff-non-src.toml(--configforruff,ruff-format; devcontainerruff.configuration;copier.yamlsed task)pyrefly.tomlandpyrefly.mutmut.toml(-c; internalproject-includes/project-excludes/search-pathrewritten with../since pyrefly resolves them relative to the config file's directory; devcontainerpython.pyrefly.configPath)_typos.toml(--config).prettierrc(--config; devcontainerprettier.configPath)Moved into
.github/(GitHub auto-detects these locations):CONTRIBUTING.md(relative links toREADME/LICENSEupdated to../)CODE_OF_CONDUCT.mdMoved into
.claude/:CLAUDE.md→.claude/CLAUDE.md(a documented, equivalent auto-load location); its import updated@AGENTS.md→@../AGENTS.md.Copier metadata moved into
.config/:.copier-answers.yml— grandparent_answers_fileset to.config/.copier-answers.yml; thecopier_answers_directoryquestion is baked into the generated child's_answers_file; provenance parent-src discovery reads.config/with a root fallback; the README update command carries--answers-file .config/.copier-answers.yml..copier-managed-files.json—copier_provenance.pynow writes/reads it in.config/(with a.config-first, root-fallback helper for mixed chains); the provenance comment stamped into managed files,AGENTS.md, and.coderabbit.yamlupdated to the new path.Not moved (for now...ran into funkiness):
biome.jsoncstays at the root — Biome v2 requires its root config at the project root, and relocating it either errors (--config-path) or silently disables the config ("root": false).pyrightconfig.jsonandpytest.inialso stay (pyright/pytest resolve them from the root).What side effects does this change have?
Existing downstream repos need a one-time manual migration (copier does not relocate existing files on update):
git mv .copier-answers.yml .config/.copier-answers.ymlcopier updatemust always pass--answers-file .config/.copier-answers.yml— copier'supdateignores_answers_fileand defaults to the root path. This flag is baked into the README's documented update command; a barecopier updatewill fail to find the answers file.IDE config auto-discovery for ruff/pyrefly/prettier is preserved via explicit
*.configPath/*.configurationsettings indevcontainer.json(and its jinja template).How is this change tested?
pre-commit runfor every affected hook against the new paths:ruff(src/non-src),ruff-format,pylint,pyrefly,biome-check,prettier,typos— all pass; verified each config is actually loaded (not vacuously passing) via-v/--dump-config/debug output.tests/unit/copier_tasks/test_copier_provenance.py(53 pass, incl. new tests for.config-first and root-fallback manifest/answers discovery) and the fulltests/unitsuite (70 pass);ruff/pyrightclean..copier-answers.ymland.copier-managed-files.jsonland in.config/; and confirmedcopier update --answers-file .config/.copier-answers.ymlsucceeds while a barecopier updatefails.Other
All mirror symlinks in the
template/andtemplate/template/layers were recreated at the correct relative depth (and relocated into.config//.github/sub-dirs to match). The child.claudesymlink already points at the root.claude, soCLAUDE.mdpropagates through it without a separate symlink.Summary by CodeRabbit
New Features
.configdirectory for editor, linting, formatting, and coverage settings.Bug Fixes
Documentation