chore: align hero_books with hero_compute (structure, scripts, docs) #109

Merged
mahmoud merged 2 commits from development_docs_docusaurus_and_architecture into development 2026-04-27 17:30:52 +00:00
Owner

Summary

Aligns hero_books with the hero_compute repo structure so the two repos look the same. Two commits:

  1. docs: add docusaurus.md, consolidate architecture.md — full reference for hero_docs CLI and the 9 docs.* RPC methods; root + crates/architecture.md consolidated into one file under docs/.
  2. chore: align repo structure with hero_compute — workspace layout, scripts, and docs reshape.

Workspace layout

Before After
src/bin/hero_books.rs crates/hero_books/src/main.rs (own crate)
src/bin/hero_docs.rs crates/hero_docs/src/main.rs (own crate)
src/lib.rs (4-line re-export) deleted
Root Cargo.toml is a [package] with [[bin]] entries Pure workspace; [workspace.package] shared metadata; resolver = "3"

Binary names are unchanged, so target/release/hero_books / target/release/hero_docs paths stay the same — service_books install, CI publish, and deploy/single-vm keep working without touch-ups. Verified with cargo build --workspace and cargo build --bin hero_books --bin hero_docs.

Scripts

  • Moved buildenv.shscripts/buildenv.sh (build_lib.sh already prefers this location).
  • Added scripts/configure.sh, install.sh, uninstall.sh modeled on hero_compute's equivalents.
  • Added make configure and make uninstall targets.

Docs

  • Flattened docs/manual/*docs/* (no more manual/ subdirectory; matches hero_compute's flat layout).
  • Deleted docs/manual/README.md; the root README is the single index.
  • Updated all cross-links across the root README, crate READMEs, and docs/architecture.md to the flat paths.
  • README rust-toolchain note bumped to 1.93+; added a bun line for users who run hero_docs / docs.*.
  • README Quick Start gets a curl one-liner that uses the new install.sh, matching hero_compute's onboarding pattern.

Intentionally not touched

  • LICENSE, rust-toolchain.toml, SKILL.md — kept at root.
  • Existing crate Cargo.toml files retain their explicit version/edition/license fields; migrating those to workspace inheritance is a separate, mechanical follow-up.
  • deploy/, tests/, specs/ — only the two src/bin/* references in specs/architecture.md were fixed; broader specs cleanup is a separate task.

Test plan

  • cargo check --workspace — passes
  • cargo build --bin hero_books --bin hero_docs — produces target/debug/hero_books and target/debug/hero_docs at the expected paths
  • Manual review of rendered Markdown in the file viewer (links resolve; tables render)
  • CI build-linux passes on the publish step (token issue from PR #99 should be unrelated to this PR)
  • service_books install from hero_skills still produces working binaries (no changes expected, but worth a sanity run)

🤖 Generated with Claude Code

## Summary Aligns hero_books with the hero_compute repo structure so the two repos look the same. Two commits: 1. **`docs: add docusaurus.md, consolidate architecture.md`** — full reference for `hero_docs` CLI and the 9 `docs.*` RPC methods; root + `crates/architecture.md` consolidated into one file under `docs/`. 2. **`chore: align repo structure with hero_compute`** — workspace layout, scripts, and docs reshape. ### Workspace layout | Before | After | |---|---| | `src/bin/hero_books.rs` | `crates/hero_books/src/main.rs` (own crate) | | `src/bin/hero_docs.rs` | `crates/hero_docs/src/main.rs` (own crate) | | `src/lib.rs` (4-line re-export) | _deleted_ | | Root `Cargo.toml` is a `[package]` with `[[bin]]` entries | Pure workspace; `[workspace.package]` shared metadata; `resolver = "3"` | **Binary names are unchanged**, so `target/release/hero_books` / `target/release/hero_docs` paths stay the same — `service_books install`, CI publish, and `deploy/single-vm` keep working without touch-ups. Verified with `cargo build --workspace` and `cargo build --bin hero_books --bin hero_docs`. ### Scripts - Moved `buildenv.sh` → `scripts/buildenv.sh` (`build_lib.sh` already prefers this location). - Added `scripts/configure.sh`, `install.sh`, `uninstall.sh` modeled on hero_compute's equivalents. - Added `make configure` and `make uninstall` targets. ### Docs - Flattened `docs/manual/*` → `docs/*` (no more `manual/` subdirectory; matches hero_compute's flat layout). - Deleted `docs/manual/README.md`; the root README is the single index. - Updated all cross-links across the root README, crate READMEs, and `docs/architecture.md` to the flat paths. - README rust-toolchain note bumped to 1.93+; added a `bun` line for users who run `hero_docs` / `docs.*`. - README Quick Start gets a curl one-liner that uses the new `install.sh`, matching hero_compute's onboarding pattern. ### Intentionally not touched - `LICENSE`, `rust-toolchain.toml`, `SKILL.md` — kept at root. - Existing crate `Cargo.toml` files retain their explicit version/edition/license fields; migrating those to workspace inheritance is a separate, mechanical follow-up. - `deploy/`, `tests/`, `specs/` — only the two `src/bin/*` references in `specs/architecture.md` were fixed; broader specs cleanup is a separate task. ## Test plan - [x] `cargo check --workspace` — passes - [x] `cargo build --bin hero_books --bin hero_docs` — produces `target/debug/hero_books` and `target/debug/hero_docs` at the expected paths - [ ] Manual review of rendered Markdown in the file viewer (links resolve; tables render) - [ ] CI build-linux passes on the publish step (token issue from PR #99 should be unrelated to this PR) - [ ] `service_books install` from `hero_skills` still produces working binaries (no changes expected, but worth a sanity run) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
docs: add docusaurus.md, consolidate architecture.md into docs/manual
All checks were successful
Test / test (pull_request) Successful in 6m57s
Test / integration (pull_request) Successful in 4m40s
667e96bbf4
- docs/manual/docusaurus.md: full reference for the hero_docs CLI and the
  9 docs.* RPC methods (new, generate, installTemplate, updateTemplate,
  build, dev, publish, publishDev, jobStatus). Covers requirements (bun,
  RSYNCD_SECRET), input-hash dedup via hero_proc action_id, output_path
  semantics per method, and how to stop a long-running docs.dev job via
  hero_proc job.cancel.

- docs/manual/architecture.md: moved from the workspace root and updated
  to include hero_books_app (Dioxus WASM frontend), hero_books_docusaurus,
  the docusaurus cache directory, and a pointer to docusaurus.md. Removed
  crates/architecture.md (duplicate, less detailed).

- docs/manual/server.md: extend the RPC method table with all 9 docs.*
  entries and link to docusaurus.md.

- docs/manual/README.md / README.md: add Architecture and Docusaurus
  rows; drop the now-stale crates/architecture.md link.

Kristof asked whether the docs server is "ready to be used" and how to
install requirements; this gives the team a single page to point at.
chore: align repo structure with hero_compute
All checks were successful
Test / integration (pull_request) Has been skipped
Test / test (pull_request) Successful in 6m36s
12b37fe02a
Brings the workspace layout, scripts, and docs into the same shape as
hero_compute so the team has a consistent mental model across Hero repos.

Workspace
- Move src/bin/hero_books.rs -> crates/hero_books/src/main.rs
- Move src/bin/hero_docs.rs  -> crates/hero_docs/src/main.rs
- Delete root src/lib.rs (4-line re-export of hero_books_lib; nothing
  in the workspace consumed it).
- Root Cargo.toml is now pure-workspace: removed [package], [[bin]],
  [dependencies], [features]; added [workspace.package] for shared
  metadata; set resolver = "3".
- New crates use workspace inheritance for version/edition/rust-version
  /authors/license/repository, matching the hero_compute pattern. Other
  crates are unchanged in this PR (mechanical follow-up).
- Binary names are unchanged (hero_books, hero_docs), so target/release/*
  paths and every downstream consumer (service_books install, CI publish,
  deploy/single-vm) keep working. Verified with `cargo build --workspace`
  and `cargo build --bin hero_books --bin hero_docs`.

Scripts
- Move buildenv.sh -> scripts/buildenv.sh (build_lib.sh already prefers
  scripts/buildenv.sh and falls back to root, so this is a clean move).
- Add scripts/configure.sh, install.sh, uninstall.sh modeled on hero_
  compute's equivalents and adapted to hero_books (no KVM/hypervisor
  bits; configure builds the workspace; install copies binaries and
  runs hero_books --start; uninstall stops services and cleans up).
- Add corresponding `make configure` and `make uninstall` targets.

Docs
- Flatten docs/manual/* into docs/ to match hero_compute's flat layout.
- Delete docs/manual/README.md; the root README is the single index.
- Update all cross-links across README.md, crate READMEs, and
  docs/architecture.md to use the new flat paths.
- README rust-toolchain note bumped to 1.93+ (matches rust-toolchain.toml
  and the new workspace.package rust-version).
- README quick-start grows a curl one-liner that uses the new install.sh,
  matching hero_compute's onboarding pattern.
- specs/architecture.md: fix the two src/bin/* entry-point paths.

What's left intentionally untouched
- LICENSE, rust-toolchain.toml, SKILL.md remain at root.
- deploy/, tests/, specs/ untouched (separate cleanup tasks).
- Existing crate Cargo.toml files keep their explicit version/edition
  declarations; migrating them to workspace.package inheritance is a
  follow-up so this PR's diff stays scoped to the structural move.
mahmoud changed title from docs: add docusaurus.md and consolidate architecture into docs/manual to chore: align hero_books with hero_compute (structure, scripts, docs) 2026-04-27 17:23:03 +00:00
mahmoud merged commit 8692b15e51 into development 2026-04-27 17:30:52 +00:00
mahmoud deleted branch development_docs_docusaurus_and_architecture 2026-04-27 17:30:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_books!109
No description provided.