Add workspace README and configuration files
This commit is contained in:
parent
47953c2c4b
commit
c4544468f1
3 changed files with 273 additions and 0 deletions
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
.tmp*
|
||||||
|
.tmp/*
|
||||||
|
*.log
|
||||||
|
target*
|
||||||
|
.env
|
||||||
|
*.env
|
||||||
|
work
|
||||||
|
*.out
|
||||||
|
bin
|
||||||
|
botserver-stack
|
||||||
|
*logfile*
|
||||||
|
*-log*
|
||||||
|
docs/book
|
||||||
|
*.rdb
|
||||||
|
botserver-installers/*
|
||||||
|
!botserver-installers/.gitkeep
|
||||||
128
Cargo.toml
Normal file
128
Cargo.toml
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
[workspace]
|
||||||
|
resolver = "2"
|
||||||
|
members = [
|
||||||
|
"botapp",
|
||||||
|
"botdevice",
|
||||||
|
"botlib",
|
||||||
|
"botserver",
|
||||||
|
"bottest",
|
||||||
|
"botui",
|
||||||
|
]
|
||||||
|
|
||||||
|
[workspace.lints.rust]
|
||||||
|
unused_imports = "warn"
|
||||||
|
unused_variables = "warn"
|
||||||
|
unused_mut = "warn"
|
||||||
|
unsafe_code = "deny"
|
||||||
|
missing_docs = "allow"
|
||||||
|
|
||||||
|
[workspace.lints.clippy]
|
||||||
|
all = { level = "warn", priority = -1 }
|
||||||
|
pedantic = { level = "warn", priority = -1 }
|
||||||
|
nursery = { level = "warn", priority = -1 }
|
||||||
|
cargo = { level = "warn", priority = -1 }
|
||||||
|
panic = "warn"
|
||||||
|
todo = "warn"
|
||||||
|
# Disabled: has false positives for functions with mut self, heap types (Vec, String)
|
||||||
|
missing_const_for_fn = "allow"
|
||||||
|
# Disabled: Axum handlers and framework requirements need owned types
|
||||||
|
needless_pass_by_value = "allow"
|
||||||
|
# Disabled: transitive dependencies we cannot control
|
||||||
|
multiple_crate_versions = "allow"
|
||||||
|
# Disabled: when async traits require non-Send futures
|
||||||
|
future_not_send = "allow"
|
||||||
|
# Disabled: intentional similar names for related concepts (e.g. title_bg/title_fg)
|
||||||
|
similar_names = "allow"
|
||||||
|
# Disabled: doc comments removed per zero-comments policy
|
||||||
|
missing_errors_doc = "allow"
|
||||||
|
missing_panics_doc = "allow"
|
||||||
|
# Disabled: not all public functions need #[must_use]
|
||||||
|
must_use_candidate = "allow"
|
||||||
|
# Disabled: functions can be long if well-structured
|
||||||
|
too_many_lines = "allow"
|
||||||
|
# Disabled: complex functions are sometimes necessary
|
||||||
|
cognitive_complexity = "allow"
|
||||||
|
# Disabled: many arguments needed for complex constructors
|
||||||
|
too_many_arguments = "allow"
|
||||||
|
# Disabled: module organization is intentional
|
||||||
|
module_name_repetitions = "allow"
|
||||||
|
# Disabled: struct organization is intentional
|
||||||
|
struct_excessive_bools = "allow"
|
||||||
|
# Disabled: explicit returns sometimes clearer
|
||||||
|
needless_return = "allow"
|
||||||
|
# Disabled: if-let vs match is stylistic
|
||||||
|
single_match_else = "allow"
|
||||||
|
# Disabled: option/result chains are readable
|
||||||
|
option_if_let_else = "allow"
|
||||||
|
# Disabled: explicit ref patterns sometimes clearer
|
||||||
|
redundant_closure_for_method_calls = "allow"
|
||||||
|
# Disabled: cast precision loss acceptable in controlled cases
|
||||||
|
cast_possible_truncation = "allow"
|
||||||
|
cast_sign_loss = "allow"
|
||||||
|
cast_precision_loss = "allow"
|
||||||
|
cast_possible_wrap = "allow"
|
||||||
|
# Disabled: wildcard imports used intentionally
|
||||||
|
wildcard_imports = "allow"
|
||||||
|
# Disabled: some patterns require manual implementations
|
||||||
|
derivable_impls = "allow"
|
||||||
|
# Disabled: inline format args style preference
|
||||||
|
uninlined_format_args = "allow"
|
||||||
|
# Disabled: default trait not always appropriate
|
||||||
|
default_trait_access = "allow"
|
||||||
|
# Disabled: redundant else can be clearer
|
||||||
|
redundant_else = "allow"
|
||||||
|
# Disabled: unit patterns in matches intentional
|
||||||
|
ignored_unit_patterns = "allow"
|
||||||
|
# Disabled: manual string operations sometimes clearer
|
||||||
|
manual_string_new = "allow"
|
||||||
|
# Disabled: items after statements acceptable
|
||||||
|
items_after_statements = "allow"
|
||||||
|
# Disabled: clone on copy types sometimes intentional
|
||||||
|
clone_on_copy = "allow"
|
||||||
|
# Disabled: map_unwrap_or style preference
|
||||||
|
map_unwrap_or = "allow"
|
||||||
|
# Disabled: unnecessary wraps sometimes for API consistency
|
||||||
|
unnecessary_wraps = "allow"
|
||||||
|
# Disabled: used underscore binding acceptable
|
||||||
|
used_underscore_binding = "allow"
|
||||||
|
# Disabled: implicit hasher acceptable
|
||||||
|
implicit_hasher = "allow"
|
||||||
|
# Disabled: return self not always appropriate
|
||||||
|
return_self_not_must_use = "allow"
|
||||||
|
# Disabled: ref binding style preference
|
||||||
|
ref_binding_to_reference = "allow"
|
||||||
|
# Disabled: needless borrow sometimes clearer
|
||||||
|
needless_borrow = "allow"
|
||||||
|
# Disabled: explicit iter acceptable
|
||||||
|
explicit_iter_loop = "allow"
|
||||||
|
# Disabled: explicit into iter acceptable
|
||||||
|
explicit_into_iter_loop = "allow"
|
||||||
|
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
lto = true
|
||||||
|
opt-level = "z"
|
||||||
|
strip = true
|
||||||
|
panic = "abort"
|
||||||
|
codegen-units = 1
|
||||||
|
overflow-checks = true
|
||||||
|
|
||||||
|
[profile.ci]
|
||||||
|
inherits = "release"
|
||||||
|
lto = false
|
||||||
|
codegen-units = 16
|
||||||
|
debug = false
|
||||||
|
|
||||||
|
[profile.low-memory]
|
||||||
|
inherits = "release"
|
||||||
|
lto = "thin"
|
||||||
|
codegen-units = 16
|
||||||
|
debug = false
|
||||||
|
incremental = false
|
||||||
|
opt-level = "s"
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
debug = 0
|
||||||
|
incremental = true
|
||||||
|
codegen-units = 256
|
||||||
|
opt-level = 0
|
||||||
129
README.md
Normal file
129
README.md
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
# General Bots Workspace
|
||||||
|
|
||||||
|
**Version:** 6.1.0
|
||||||
|
**Type:** Rust Workspace (Monorepo with Independent Subproject Repos)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
This workspace contains multiple General Bots projects:
|
||||||
|
|
||||||
|
```
|
||||||
|
gb/
|
||||||
|
├── PROMPT.md ← Workspace-level development guide (READ THIS FIRST)
|
||||||
|
├── Cargo.toml ← Workspace configuration
|
||||||
|
├── README.md ← This file
|
||||||
|
│
|
||||||
|
├── botapp/ ← Desktop application (Tauri)
|
||||||
|
├── botserver/ ← Main server (API + business logic)
|
||||||
|
├── botlib/ ← Shared library (types, utilities)
|
||||||
|
├── botui/ ← Web UI (HTML/CSS/JS)
|
||||||
|
├── botbook/ ← Documentation
|
||||||
|
├── bottest/ ← Integration tests
|
||||||
|
├── botdevice/ ← Device integration
|
||||||
|
├── botmodels/ ← AI models
|
||||||
|
├── botplugin/ ← Plugin system
|
||||||
|
├── bottemplates/ ← Templates
|
||||||
|
└── target/ ← Build artifacts
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## CRITICAL: PROMPT.md Files
|
||||||
|
|
||||||
|
**Each project has a PROMPT.md that defines its development rules.**
|
||||||
|
|
||||||
|
The diagnostics tool reads and respects these PROMPT.md files.
|
||||||
|
|
||||||
|
### Hierarchy
|
||||||
|
|
||||||
|
1. **`PROMPT.md`** (this directory) - Workspace-wide rules
|
||||||
|
2. **`botapp/PROMPT.md`** - Desktop app specifics
|
||||||
|
3. **`botserver/PROMPT.md`** - Server specifics
|
||||||
|
4. **`botlib/PROMPT.md`** - Library specifics
|
||||||
|
5. **`botui/PROMPT.md`** - UI specifics
|
||||||
|
6. **`botbook/PROMPT.md`** - Documentation specifics
|
||||||
|
7. **`bottest/PROMPT.md`** - Test specifics
|
||||||
|
|
||||||
|
**ALWAYS read the relevant PROMPT.md before working on a project.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Main Directive
|
||||||
|
|
||||||
|
**LOOP AND COMPACT UNTIL 0 WARNINGS - MAXIMUM YOLO**
|
||||||
|
|
||||||
|
- 0 warnings
|
||||||
|
- 0 errors
|
||||||
|
- Trust project diagnostics
|
||||||
|
- Respect all rules
|
||||||
|
- No `#[allow()]` in source code
|
||||||
|
- Real code fixes only
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo build
|
||||||
|
cargo test
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Development Workflow
|
||||||
|
|
||||||
|
1. Read `PROMPT.md` (workspace-level rules)
|
||||||
|
2. Read `<project>/PROMPT.md` (project-specific rules)
|
||||||
|
3. Use diagnostics tool to check warnings
|
||||||
|
4. Fix all warnings with full file rewrites
|
||||||
|
5. Verify with diagnostics after each file
|
||||||
|
6. Never suppress warnings with `#[allow()]`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Git Structure
|
||||||
|
|
||||||
|
**Note:** Each subproject has its own git repository. This root repository only tracks workspace-level files:
|
||||||
|
|
||||||
|
- `PROMPT.md` - Development guide
|
||||||
|
- `Cargo.toml` - Workspace configuration
|
||||||
|
- `README.md` - This file
|
||||||
|
- `.gitignore` - Ignore patterns
|
||||||
|
|
||||||
|
Subprojects (botapp, botserver, etc.) are **not** git submodules - they are independent repositories.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Rules Summary
|
||||||
|
|
||||||
|
```
|
||||||
|
✅ FULL FILE REWRITES ONLY
|
||||||
|
✅ BATCH ALL FIXES BEFORE WRITING
|
||||||
|
✅ VERIFY WITH DIAGNOSTICS AFTER EACH FILE
|
||||||
|
✅ TRUST PROJECT DIAGNOSTICS
|
||||||
|
✅ RESPECT ALL RULES
|
||||||
|
|
||||||
|
❌ NEVER use #[allow()] in source code
|
||||||
|
❌ NEVER use partial edits
|
||||||
|
❌ NEVER run cargo check/clippy manually
|
||||||
|
❌ NEVER leave unused code
|
||||||
|
❌ NEVER use .unwrap()/.expect()
|
||||||
|
❌ NEVER use panic!/todo!/unimplemented!()
|
||||||
|
❌ NEVER add comments
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- Main Server: http://localhost:8081
|
||||||
|
- Desktop App: Uses Tauri to wrap botui
|
||||||
|
- Documentation: See botbook/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
See individual project repositories for license information.
|
||||||
Loading…
Add table
Reference in a new issue