refactor: clean up project structure (scripts/, templates/fonts/, docs/i18n/)#320
refactor: clean up project structure (scripts/, templates/fonts/, docs/i18n/)#320aajinn wants to merge 5 commits intosantifer:mainfrom
Conversation
Reduces root clutter from 7 README files to 1. Updates language links in README.md to new paths. Moved: - README.es.md → docs/i18n/README.es.md - README.ja.md → docs/i18n/README.ja.md - README.ko-KR.md → docs/i18n/README.ko-KR.md - README.pt-BR.md → docs/i18n/README.pt-BR.md - README.ru.md → docs/i18n/README.ru.md - README.zh-TW.md → docs/i18n/README.zh-TW.md
Fonts are only used by the PDF pipeline (generate-pdf.mjs + cv-template.html). Co-locating them with the CV template makes the dependency explicit and reduces root-level clutter. Updated references in: - generate-pdf.mjs (fontsDir resolution) - doctor.mjs (checkFonts path) - update-system.mjs (SYSTEM_PATHS — fonts now covered by templates/) - templates/README.md - docs/SCRIPTS.md, docs/CUSTOMIZATION.md - DATA_CONTRACT.md - batch/batch-prompt.md, modes/pdf.md - README.md + all docs/i18n/README.*.md
Moves 13 runnable scripts to scripts/ and the shared liveness module to scripts/lib/ to clean up the project root. Scripts moved: - analyze-patterns.mjs → scripts/analyze-patterns.mjs - check-liveness.mjs → scripts/check-liveness.mjs - cv-sync-check.mjs → scripts/cv-sync-check.mjs - dedup-tracker.mjs → scripts/dedup-tracker.mjs - doctor.mjs → scripts/doctor.mjs - followup-cadence.mjs → scripts/followup-cadence.mjs - generate-pdf.mjs → scripts/generate-pdf.mjs - merge-tracker.mjs → scripts/merge-tracker.mjs - normalize-statuses.mjs → scripts/normalize-statuses.mjs - scan.mjs → scripts/scan.mjs - test-all.mjs → scripts/test-all.mjs - update-system.mjs → scripts/update-system.mjs - verify-pipeline.mjs → scripts/verify-pipeline.mjs - liveness-core.mjs → scripts/lib/liveness-core.mjs Internal path fixes: - All scripts using dirname(__filename) updated to resolve project root as join(__dirname, '..') - check-liveness.mjs import updated to ./lib/liveness-core.mjs - batch-runner.sh updated to scripts/merge-tracker.mjs + scripts/verify-pipeline.mjs - merge-tracker.mjs internal execFileSync path updated Reference updates: - package.json npm scripts - CLAUDE.md (update-system, merge-tracker, verify, dedup, normalize) - DATA_CONTRACT.md system layer table - docs/SCRIPTS.md, docs/SETUP.md, docs/ARCHITECTURE.md - README.md project structure - modes/_shared.md + all language variants (de, fr, ja, pt, ru) - modes/pdf.md, modes/patterns.md, modes/followup.md, modes/pipeline.md - batch/batch-prompt.md - CONTRIBUTING.md, .github/PULL_REQUEST_TEMPLATE.md - examples/ats-normalization-test.md
Documents all runnable scripts and shared modules in the new scripts/ directory with npm command mappings.
refactor: clean up project structure (scripts/, templates/fonts/, docs/i18n/)
There was a problem hiding this comment.
Welcome to career-ops, @aajinn! Thanks for your first PR.
A few things to know:
- Tests will run automatically — check the status below
- Make sure you've linked a related issue (required for features)
- Read CONTRIBUTING.md if you haven't
We'll review your PR soon. Join our Discord if you have questions.
📝 WalkthroughWalkthroughThis pull request reorganizes project structure by moving executable Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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: 22
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@batch/batch-prompt.md`:
- Line 235: The "Sources of Truth" table contains a stale script path
referencing generate-pdf.mjs at the repo root; update that entry to match the
other reference by changing it to scripts/generate-pdf.mjs so both mentions of
the PDF generation script (generate-pdf.mjs) are consistent.
In `@docs/i18n/README.ja.md`:
- Around line 207-211: The directory tree duplicates a "templates/" node; remove
the second "templates/" block and merge its "fonts/" entry into the existing
templates section so there is only one "templates/" listing that contains
cv-template.html, portals.example.yml, states.yml, and a fonts/ subdirectory;
ensure the final tree shows a single templates/ node with fonts/ nested under
it.
In `@docs/i18n/README.ko-KR.md`:
- Around line 207-211: The README contains a duplicated "templates/" tree entry;
remove the redundant block and consolidate into a single "templates/" node that
includes "fonts/" as a child; update the existing "templates/" section (the one
listing cv-template.html, portals.example.yml, states.yml) to also list fonts/
so there is one authoritative "templates/" tree instead of two conflicting
entries referencing templates/ and fonts/.
In `@docs/i18n/README.pt-BR.md`:
- Around line 207-212: Remove the duplicated top-level "templates/" subtree and
merge its "fonts/" entry into the existing "templates/" block (the earlier
templates/ listing) so there is only one templates/ subtree; specifically delete
the second block that repeats "templates/" and ensure the first templates/ block
includes the "fonts/" item alongside cv-template.html, portals.example.yml and
states.yml to restore a consistent project tree.
In `@docs/i18n/README.ru.md`:
- Around line 193-197: The project tree contains a duplicated templates/ block;
remove the second templates/ block (the one listing cv-template.html,
portals.example.yml, states.yml, and fonts/) and instead place fonts/ as a child
under the existing templates/ node so there is only one templates/ entry and
fonts/ is nested beneath it; update the entries cv-template.html,
portals.example.yml, and states.yml to remain under that single templates/ node
to keep the tree accurate.
In `@docs/i18n/README.zh-TW.md`:
- Around line 210-214: The project tree contains a duplicated top-level
"templates/" node; remove the duplicate entry and merge its children so there is
a single "templates/" subtree that lists "cv-template.html",
"portals.example.yml", "states.yml" and the "fonts/" directory (i.e., move
"fonts/" under the existing templates/ node and delete the redundant templates/
root).
In `@examples/ats-normalization-test.md`:
- Line 46: Update the inconsistent verification commands so they all use the
relative script path "scripts/generate-pdf.mjs" (as in the updated Line 46);
locate the older root-level invocations present around Line 35 and Line 39 and
replace them with the same form used on Line 46 (e.g., "node
scripts/generate-pdf.mjs /tmp/dirty-cv.html /tmp/clean-cv.pdf --format=a4") to
ensure every example/verification in examples/ats-normalization-test.md is
normalized and copy/paste-safe.
In `@modes/de/_shared.md`:
- Line 1: The file starts with a UTF-8 BOM which causes parser/tool
compatibility issues and a false-positive "unpaired bracket" warning; remove the
BOM so the file is saved as UTF-8 without BOM and ensure the first characters
read "Geteilter Kontext -- career-ops (Deutsch)" (i.e., the header line begins
at the very first byte), then re-run linting to confirm the unpaired bracket
warning disappears.
In `@modes/followup.md`:
- Line 1: Remove the invisible BOM character at the start of the file so the
header line "# Mode: followup -- Follow-up Cadence Tracker" begins with a normal
'#' character, then re-save the file in UTF-8 without BOM (ensure your
editor/IDE encoding is set to "UTF-8 without BOM" or use a tool to strip the
BOM).
In `@modes/fr/pipeline.md`:
- Line 1: Remove the UTF-8 BOM at the start of the file so the first character
is the '#' of the heading "Mode : pipeline -- Inbox d'URLs (Second Brain)"; open
the file in a text editor or run a tool to strip the BOM (e.g., save as UTF-8
without BOM) and ensure the first byte is '#' to avoid BOM-related
linting/editor issues.
In `@modes/ja/_shared.md`:
- Line 1: The file starts with a UTF-8 BOM (U+FEFF) before the header "共通コンテキスト
-- career-ops(日本語)"; remove that BOM character so the first character of the
file is the “#” header, and save the file as UTF-8 without BOM to prevent
markdown tooling inconsistencies.
In `@modes/ja/pipeline.md`:
- Line 1: Remove the invisible UTF-8 BOM (U+FEFF) at the start of the file
before the text "モード: pipeline -- URL インボックス(Second Brain)" and re-save the file
as UTF-8 without BOM so the first character is the visible '#' instead of the
BOM; ensure your editor/CI enforces UTF-8 without BOM for this file.
In `@modes/patterns.md`:
- Line 1: The first line "Mode: patterns -- Rejection Pattern Detector" contains
a leading UTF-8 BOM which can break some Markdown parsers; remove the BOM so the
file is plain UTF-8 (no BOM) by editing the file encoding or deleting the BOM
character at the start of that header line (e.g., reopen in UTF-8-without-BOM or
run a BOM-strip command) and verify the line now begins exactly with "Mode:
patterns -- Rejection Pattern Detector".
In `@modes/pdf.md`:
- Line 1: The file header "Modo: pdf — Generación de PDF ATS-Optimizado"
contains a leading UTF-8 BOM character; remove the BOM from the start of
modes/pdf.md so the file begins with the visible header text only, then save and
re-commit the file (you can strip it with an editor or a one-line tool/command
before committing). Ensure the first byte is not the BOM and verify the file
renders correctly in Markdown viewers after the change.
- Line 21: The script scripts/generate-pdf.mjs calls join() but only imports
resolve and dirname from 'path'; update the import statement to include join
(e.g., import { resolve, dirname, join } from 'path') or replace the join usage
(projectRoot = join(__dirname, '..')) with an existing function like resolve to
avoid the ReferenceError; locate the import line importing resolve and dirname
and add join, and verify projectRoot is set correctly in the top-level script.
In `@modes/pipeline.md`:
- Line 1: The file starts with a UTF-8 BOM before the first line ("# Modo:
pipeline — Inbox de URLs (Second Brain)"); remove that leading BOM character and
re-save the document as UTF-8 without BOM so the first character is the hash (#)
and keep the rest of the line intact, then verify tools/CI no longer report
encoding issues.
In `@modes/ru/_shared.md`:
- Line 1: Remove the UTF-8 BOM from the first line which currently reads "#
Общий контекст — career-ops (Русский)"; edit the header so it starts with a
plain '#' character (e.g., "# Общий контекст — career-ops (Русский)") to
eliminate the hidden BOM and ensure consistent encoding and tooling behavior.
In `@modes/ru/oferta.md`:
- Line 1: Remove the leading UTF-8 BOM (U+FEFF) from the start of
modes/ru/oferta.md and any other updated markdown files in this PR; open each
file in a text editor or run a strip step that removes a BOM at the first
character so the file begins with the visible text "Режим: oferta — Полная
оценка A-F" and re-save without the BOM to avoid noisy diffs and parser/linter
issues.
In `@scripts/generate-pdf.mjs`:
- Around line 116-117: The script currently sets fontsDir (const fontsDir =
resolve(projectRoot, 'templates', 'fonts')) and proceeds to rewrite font URLs
without checking the directory exists; add an existence check for fontsDir
before any URL rewriting and handle both branches: if missing, either fail fast
with a clear, actionable error message (including fontsDir) or log a warning and
skip the rewrite step so file:// URLs are not produced, and if present continue
with the current rewrite logic; update the code paths that reference fontsDir
(the variable and the function that performs URL rewriting) to follow this
check.
- Line 20: The file uses join to construct projectRoot but join is not imported
from the path module; update the import that provides path (the import where
path is referenced) to also import join (so that join(...) used to set
projectRoot resolves), or alternatively replace usage with path.join if you
prefer keeping a default import; ensure the symbol join is defined before using
it in the assignment to projectRoot.
In `@scripts/README.md`:
- Line 3: Update the README's opening sentence and the script table guidance so
it doesn't claim every script is run with `npm run <name>`: change the header
line that currently reads like "All utility scripts for career-ops. Run via `npm
run <name>`..." to indicate "Most utility scripts..." or similar, and for the
table rows that lack npm aliases provide explicit execution examples (e.g.,
"node scripts/<file>.mjs") next to those entries; ensure you update both the
initial summary sentence and the table rows referenced near the script listings
so readers know when to use `npm run` versus `node scripts/<file>.mjs`.
In `@scripts/update-system.mjs`:
- Around line 50-63: The SYSTEM_PATHS allowlist is missing the new
scripts/README.md file; update the SYSTEM_PATHS array in
scripts/update-system.mjs to include 'scripts/README.md' so the auto-update
logic (the SYSTEM_PATHS constant used by the updateSystem function) will treat
that doc as a system-updatable file and avoid drift between local and upstream
script documentation.
🪄 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: cfbea418-2b66-4395-a9f8-e029420efd00
⛔ Files ignored due to path filters (4)
templates/fonts/dm-sans-latin-ext.woff2is excluded by!**/*.woff2templates/fonts/dm-sans-latin.woff2is excluded by!**/*.woff2templates/fonts/space-grotesk-latin-ext.woff2is excluded by!**/*.woff2templates/fonts/space-grotesk-latin.woff2is excluded by!**/*.woff2
📒 Files selected for processing (51)
.github/PULL_REQUEST_TEMPLATE.mdCLAUDE.mdCONTRIBUTING.mdDATA_CONTRACT.mdREADME.mdbatch/batch-prompt.mdbatch/batch-runner.shdocs/ARCHITECTURE.mddocs/CUSTOMIZATION.mddocs/SCRIPTS.mddocs/SETUP.mddocs/i18n/README.es.mddocs/i18n/README.ja.mddocs/i18n/README.ko-KR.mddocs/i18n/README.pt-BR.mddocs/i18n/README.ru.mddocs/i18n/README.zh-TW.mdexamples/ats-normalization-test.mdmodes/_shared.mdmodes/de/_shared.mdmodes/de/pipeline.mdmodes/followup.mdmodes/fr/_shared.mdmodes/fr/pipeline.mdmodes/ja/_shared.mdmodes/ja/pipeline.mdmodes/patterns.mdmodes/pdf.mdmodes/pipeline.mdmodes/pt/_shared.mdmodes/pt/pipeline.mdmodes/ru/_shared.mdmodes/ru/oferta.mdmodes/ru/pipeline.mdpackage.jsonscripts/README.mdscripts/analyze-patterns.mjsscripts/check-liveness.mjsscripts/cv-sync-check.mjsscripts/dedup-tracker.mjsscripts/doctor.mjsscripts/followup-cadence.mjsscripts/generate-pdf.mjsscripts/lib/liveness-core.mjsscripts/merge-tracker.mjsscripts/normalize-statuses.mjsscripts/scan.mjsscripts/test-all.mjsscripts/update-system.mjsscripts/verify-pipeline.mjstemplates/README.md
What does this PR do?
Reduces root-level clutter by moving files to more logical locations:
14
.mjsscripts →scripts/, fonts →templates/fonts/, and 6 translated READMEs →docs/i18n/.No behavior changes — all internal paths, npm scripts, docs, and mode files updated to match.
Related issue
Type of change
Checklist
node scripts/test-all.mjsand all tests passChanges
scripts/— all 13.mjsutilities +scripts/lib/liveness-core.mjs__dirnamepath resolutions updated to resolve project root asjoin(__dirname, '..')package.jsonnpm scripts updatedCLAUDE.md,DATA_CONTRACT.md,docs/,modes/(EN/DE/FR/JA/PT/RU),batch/batch-runner.sh,CONTRIBUTING.md, CI templatestemplates/fonts/— fonts co-located withcv-template.htmlthat uses themscripts/generate-pdf.mjsandscripts/doctor.mjspath updatedupdate-system.mjsSYSTEM_PATHS updated (fonts now covered bytemplates/)docs/i18n/— 6 translated READMEs off the rootREADME.mdupdated to new pathsQuestions? Join the Discord for faster feedback.
Summary by CodeRabbit
Documentation
scripts/directory and fonts moved undertemplates/fonts/.Chores
scripts/directory; consolidated font assets undertemplates/fonts/.