rename spec 3 #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
use skill /hero_crates_best_practices_check
put a readme in each of the folders
organize the repo well
initial start
put a spec document in each directory (SPECIFICATIONS.md)
Here is a minimal spec for CodeSmith.
CodeSmith — Minimal Specification
1. Purpose
CodeSmith is a remote development orchestration module that prepares and manages secure development environments on remote servers over SSH.
Its first goal is simple:
This is only the skeleton for further work.
2. High-Level Concept
CodeSmith consists of two parts:
2.1 Local controller
Runs on the operator/developer machine.
Responsibilities:
2.2 Remote CodeSmith server
Runs on each managed server.
Responsibilities:
3. Core Design Principles
3.1 SSH-first
No public service exposure is required initially.
All communication happens through:
3.2 OpenRPC-native
All remote operations are exposed through a clear OpenRPC interface.
This allows:
3.3 Secure-by-default
Development happens in isolated contexts.
Initial security model:
3.4 Workspace-oriented
The primary unit of work is a workspace.
A workspace contains:
4. Initial Scope
The first version only needs to support:
4.1 Node preparation
Prepare a target server over SSH so it can run CodeSmith.
Includes:
4.2 Remote server startup
Ensure the CodeSmith server is running on the node.
Includes:
4.3 Local forwarding
Forward the remote CodeSmith API endpoint to a local socket.
Examples:
The controller should maintain a mapping such as:
4.4 User management
Remote server can:
4.5 Workspace management
Remote server can:
4.6 Sandbox skeleton
Remote server can create a minimal isolated execution context.
At this stage, sandbox may simply mean:
5. Non-Goals for the First Skeleton
Not required yet:
6. Architecture
6.1 Components
Local Controller
Responsible for:
Remote Agent / Server
Responsible for:
Workspace
A directory structure representing an isolated development environment.
Sandbox
Logical isolation boundary attached to a workspace.
7. Basic Flow
7.1 Register / prepare node
7.2 Create workspace
7.3 Use workspace
Later tools or agents connect through the controller to the node and operate only inside that workspace context.
8. Security Model (Minimal)
8.1 Trust boundaries
8.2 Privilege model
8.3 Isolation baseline
Each workspace should at minimum have:
9. Minimal Remote API Surface (OpenRPC)
Suggested first methods:
Node / service
node.infonode.healthnode.versionUser management
user.createuser.getuser.listuser.deleteWorkspace management
workspace.createworkspace.getworkspace.listworkspace.deleteSandbox / environment
sandbox.createsandbox.getsandbox.deleteCode / repository setup
Implementation Specification: Repo Reorganization for hero_codesmith
Objective
Reorganize the hero_codesmith repository from a single-crate structure into a proper multi-crate workspace following the hero_crates_best_practices_check skill. The repo needs to:
crates/directory with the standardized workspace structurecodesmiths_servertocodesmith_server)hero_codesmithper naming conventionsRequirements
hero_codesmith_ui- Admin UI (Axum-based)hero_codesmith_lib- Shared library code (from existing src/devsmith_lib)hero_codesmith_server- Business logic + OpenRPC API (fixed naming from issue's codesmiths)hero_codesmith_ssh- SSH-related functionality (as specified in issue)hero_codesmith- CLI binary (optional)hero_codesmith_examplescrate for integration tests and examplesStep-by-Step Implementation Plan
Step 1: Create workspace root Cargo.toml
Replace existing Cargo.toml with workspace configuration containing all crate members.
Step 2: Create hero_codesmith_lib crate
Create shared library crate, move code from src/devsmith_lib to crates/hero_codesmith_lib/
Step 3: Create hero_codesmith_server crate
Create server crate with OpenRPC API and Unix Domain Socket binding.
Step 4: Create hero_codesmith_sdk crate
Create SDK crate using openrpc_client! macro from server's openrpc.json.
Step 5: Create hero_codesmith_ui crate
Create UI crate with Axum and openrpc_proxy! macro.
Step 6: Create hero_codesmith_ssh crate
Create SSH functionality crate.
Step 7: Create hero_codesmith (CLI) crate
Create CLI binary crate.
Step 8: Create hero_codesmith_examples crate
Create examples and integration tests crate.
Step 9: Update buildenv.sh and Makefile
Update build configuration for workspace.
Step 10: Update root README.md
Document new workspace structure.
Step 11: Clean up old src/ directory
Remove old single-crate structure.
Step 12: Run validation checks
Verify workspace builds and follows best practices.
Acceptance Criteria
Notes
codesmiths_server(with 's') which violates the naming convention. This has been corrected tocodesmith_server.hero_codesmithas the prefix per naming_convention skill.