Skip to content

feat(new): add tlc new command to write .odoo-dev.json config#21

Draft
trisdoan wants to merge 1 commit into
mainfrom
feat/tlc-new-odoo-dev-config
Draft

feat(new): add tlc new command to write .odoo-dev.json config#21
trisdoan wants to merge 1 commit into
mainfrom
feat/tlc-new-odoo-dev-config

Conversation

@trisdoan
Copy link
Copy Markdown
Collaborator

Summary

  • Adds tlc new subcommand that detects the project's Odoo layout and writes .claude/.odoo-dev.json for consumption by Claude agents
  • Supports 4 managed layouts (trobz, c2c, odoosh, doodba), local (from TLC_CODE_DIR/odoo/odoo/{version}), and webonly fallback
  • --global / -g writes to ~/.claude/ instead of CWD/.claude/
  • --force skips overwrite confirmation; always creates .bak before overwriting

Changes

  • trobz_local/odoo_dev_config.py — layout detection, version resolution, atomic write logic
  • trobz_local/assets/odoo-dev.json — JSON schema for validation (bundled with package)
  • trobz_local/main.py — registers tlc new command
  • pyproject.toml / uv.lock — adds odoo-addons-path>=1.3.0 and jsonschema>=4.0
  • tests/test_new.py — 9 TDD tests covering all layout scenarios

Test plan

  • uv run pytest tests/test_new.py — all 9 tests pass
  • uv run pytest — full suite (97 tests) passes with no regressions
  • tlc new in a managed Trobz project writes correct layout and sourcePaths
  • tlc new in an empty dir writes layout: webonly and exits 0
  • tlc new -g writes to ~/.claude/.odoo-dev.json
  • tlc new --force on existing file creates .bak and overwrites odoo key only

@trisdoan trisdoan force-pushed the feat/tlc-new-odoo-dev-config branch 2 times, most recently from 2db1590 to d3aa788 Compare May 20, 2026 09:20
@trisdoan trisdoan force-pushed the feat/tlc-new-odoo-dev-config branch from d3aa788 to 19b56c5 Compare May 20, 2026 09:23
@trisdoan trisdoan marked this pull request as draft May 20, 2026 09:41
@trisdoan
Copy link
Copy Markdown
Collaborator Author

wait for trobz/odoo-addons-path#14 to be merged

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