feature/smbcloud-deploy
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 1 | # Public, open-source repository |
| 2 | |
| 3 | `smbcloud-cli` is published on GitHub as **open source**. Everything you commit here — code, comments, docs, and `.agents/skills/*` — is **world-readable and permanent** (git history outlives any later deletion). Before writing anything, ask: "is this safe on a public repo forever?" |
| 4 | |
| 5 | Do **not** add internal smbCloud infrastructure detail or secrets: |
| 6 | |
| 7 | - server hostnames/IPs and operational endpoints beyond what the CLI already targets in source — e.g. account-scoped SSH key names (`id_<n>@smbcloud`), `api-1.smbcloud.xyz`, internal health ports |
| 8 | - account/user IDs and which user or tenant owns which project |
| 9 | - real customer/app domains, PM2 process names, the production port → app → domain registry |
| 10 | - workspace/project IDs and `frontend_app_id` / `deploy_repo_id` values |
| 11 | - secrets/config: API keys, tokens, `.env` values, connection strings, real auth/CORS origins |
| 12 | - commands that read local credentials to enumerate the API (e.g. `cat ~/.smb/token | curl …`) |
| 13 | - incident logs or examples that name real apps, tenants, customers, or dated rollouts |
| 14 | |
| 15 | Keep docs and skills **generic** — describe how the tool behaves, using placeholders (`example.com`, `<app>`, `<source>`, `<port>`, `<n>`). The base API host (`api.smbcloud.xyz`) is already in the source, so it is not a new leak; the items above are. Fleet-specific operational detail and the internal deploy reference live only in the private `smbcloud` repo. |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | # Rust coding guidelines |
| 20 | |
| 21 | - Prioritize code correctness and clarity. Speed and efficiency are secondary priorities unless otherwise specified. |
| 22 | - Do not write organizational or comments that summarize the code. Comments should only be written in order to explain "why" the code is written in some way in the case there is a reason that is tricky / non-obvious. |
| 23 | - Prefer implementing functionality in existing files unless it is a new logical component. Avoid creating many small files. |
| 24 | - Avoid using functions that panic like `unwrap()`, instead use mechanisms like `?` to propagate errors. |
| 25 | - Be careful with operations like indexing which may panic if the indexes are out of bounds. |
| 26 | - Never silently discard errors with `let _ =` on fallible operations. Always handle errors appropriately: |
| 27 | - Propagate errors with `?` when the calling function should handle them |
| 28 | - Use `.log_err()` or similar when you need to ignore errors but want visibility |
| 29 | - Use explicit error handling with `match` or `if let Err(...)` when you need custom logic |
| 30 | - Example: avoid `let _ = client.request(...).await?;` - use `client.request(...).await?;` instead |
| 31 | - When implementing async operations that may fail, ensure errors propagate to the UI layer so users get meaningful feedback. |
| 32 | - Never create files with `mod.rs` paths - prefer `src/some_module.rs` instead of `src/some_module/mod.rs`. |
| 33 | - When creating new crates, prefer specifying the library root path in `Cargo.toml` using `[lib] path = "...rs"` instead of the default `lib.rs`, to maintain consistent and descriptive naming (e.g., `gpui.rs` or `main.rs`). |
| 34 | - Avoid creative additions unless explicitly requested |
| 35 | - Use full words for variable names (no abbreviations like "q" for "queue") |
| 36 | - Use variable shadowing to scope clones in async contexts for clarity, minimizing the lifetime of borrowed references. |
| 37 | Example: |
| 38 | ```rust |
| 39 | executor.spawn({ |
| 40 | let task_ran = task_ran.clone(); |
| 41 | async move { |
| 42 | *task_ran.borrow_mut() = true; |
| 43 | } |
| 44 | }); |
| 45 | ``` |