- Never delete comments describing unobvious logic when refactoring. Move or update them to match the new code, but preserve their intent.
- Use
pnpmovernpm/npx. - Always use single assert to check the whole value instead of multiple asserts for every field.
- Make the plan extremely concise. Sacrifice grammar for the sake of concision.
- At the end of each plan, give me a list of unresolved questions to answer, if any.
- Finish every plan by running tests.
- Rust CLI:
packages/cli, entry atlib.rs, commands atcommands.rs. - Config parsing pipeline:
human_config.rsβsystem_config.rsβ internal JSON βhbs_templating/codegen_templates.rsβConfig.res. - Shared runtime library:
packages/envio. - To edit runtime code, edit templates under
packages/cli/templates/, not files ingenerated/. - Prefer reading
.resmodules directly; ignore compiled.jsartifacts.
Prefer Public module API for testing.
Verify that tests pass by running a compiler pnpm rescript and tests pnpm vitest run.
- When using
Utils.magicfor type casting, always add explicit type annotations:value->(Utils.magic: inputType => outputType) - Always use ReScript 11 documentation. Never suggest ReasonML syntax.
- Never use
[| item |]to create an array. Use[ item ]instead. - Must always use
=for setting value to a field. Use:=only for ref values created usingreffunction. - Never use
%rawto access object fields if you know the type. - In tests, never log β use
Assertmodule for all verifications. - Use try/catch as expressions instead of refs for tracking success/failure.