Skip to content

Commit 7a539b2

Browse files
committed
update
1 parent 334b92a commit 7a539b2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

CALIBER_LEARNINGS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Caliber Learnings
2+
3+
Accumulated patterns and anti-patterns from development sessions.
4+
Auto-managed by [caliber](https://github.com/caliber-ai-org/ai-setup) — do not edit manually.
5+
6+
- **[gotcha:project]** In `CLAUDE.md` and skill files, never use line-range path refs like `src/Plugin.php:47–53` — Caliber scoring treats these as invalid file references and deducts points. Use bare paths only: `src/Plugin.php`.
7+
- **[gotcha:project]** `vendor/` directory paths (e.g., `vendor/autoload.php`, `vendor/bin/phpunit`) are scored as invalid file references by Caliber. Reference composer scripts (`composer test`) or omit the vendor prefix when writing skills and `CLAUDE.md`.
8+
- **[pattern:project]** Tests in this module cannot invoke any host-app code at runtime (`TFSmarty`, `\MyAdmin\Mail`, `get_module_db`, `$GLOBALS['tf']`). Use `ReflectionClass` for method/property introspection and `file_get_contents(dirname(__DIR__) . '/src/Plugin.php')` + `assertStringContainsString()` for verifying code patterns that depend on the MyAdmin runtime.
9+
- **[env:project]** `PRORATE_BILLING` must be defined before the `Plugin` class is autoloaded because it appears in the `$settings` array initializer. `tests/bootstrap.php` handles this — never remove or reorder that define, and never run tests without the bootstrap (rely on `phpunit.xml.dist` which sets it automatically via `bootstrap="tests/bootstrap.php"`).

0 commit comments

Comments
 (0)