src/contains the Rust CLI and product modules:cli/for argument routing,api/for Weave flows,trace/for repo memory,engine/for package scanning,tui/for terminal UI, andweb/for the embedded web server.front-layer/is the Vite + React frontend that is built and embedded into the Rust binary at compile time.docs/holds command and feature guides.scripts/contains install/build helpers.npm/andgo/provide wrapper distribution targets.- Build-time embedding is controlled by
build.rs; treat it as part of the app runtime path, not as optional tooling.
cargo buildbuilds the Rust CLI and triggers frontend embedding when needed.cargo install --path . --forceinstalls the local build onto the machine for real CLI testing.cargo testruns Rust tests.npm run buildfromfront-layer/builds the web UI bundle explicitly.npm run lintandnpm run typecheckfromfront-layer/validate frontend code.infynon --host 127.0.0.1 --port 4173runs the bundled web server locally.
- Use Rust idioms:
snake_casefor functions/modules,PascalCasefor types, and small focused modules. - Keep frontend components in
PascalCasefiles when they are app-level components; shared UI primitives follow the existingfront-layer/src/components/ui/naming. - For frontend feature work, prefer composing dedicated subcomponents instead of keeping large pages in a single file.
- Use the existing shadcn UI primitives from
front-layer/src/components/ui/wherever possible instead of introducing ad-hoc replacements. - Do not add hardcoded colors in frontend code. Use theme tokens and semantic utility classes such as
bg-card,text-muted-foreground,border-border,bg-primary, and related token-based variants. - Prefer ASCII source files. Match existing formatting; use
cargo fmtonly on files you intend to change. - Avoid path-dependent runtime behavior. New web/runtime features should work from any current working directory.
- Add Rust unit tests next to the module they cover when logic is non-trivial.
- For frontend changes, run
npm run build,npm run lint, andnpm run typecheckbefore shipping. - For root CLI/web changes, verify both
infynon --helpand a live health check such asGET /health.
- Follow the existing history style:
feat: ...,refactor: ...,ci: ...,release: ..., or scoped forms likefeat(trace): .... - Keep commits narrow and explain behavior changes, not just file edits.
- PRs should include: purpose, affected commands/modules, verification steps, and screenshots for visible frontend changes.
- Do not rely on machine-specific install paths for frontend assets; the supported pattern is compile-time embedding.
- If you add SSL or packaging changes, verify behavior on Windows, Linux, and macOS assumptions before merging.