@@ -37,3 +37,42 @@ reader?** If yes, a human writes it. If the agent is moving, replacing, illustra
3737researching, or planning around prose that a human wrote, that's fair game.
3838
3939When in doubt, treat it as prose and hand it to a human.
40+
41+ ## Cursor Cloud specific instructions
42+
43+ This repo is the ** Pro Git** book (source in AsciiDoc). "Building" means converting
44+ ` progit.asc ` into HTML/EPUB/FB2/MOBI/PDF. There is no runtime backend or database.
45+
46+ ### Toolchains
47+ - ** Ruby/Rake pipeline** (this is what CI runs). Ruby 3.2 is installed via apt; Bundler
48+ is installed system-wide and gems are installed into ` ~/.bundle-gems ` (configured via a
49+ global ` bundle config path ` ). The startup update script runs ` bundle install ` to refresh
50+ gems, so you do not need to reinstall them.
51+ - ** Rust ` progit ` CLI** in ` builder/ ` — an optional single-command wrapper around the same
52+ Asciidoctor toolchain, plus a local book reader. It has no third-party crates. Build with
53+ ` cargo build --release --manifest-path builder/Cargo.toml ` (binary at
54+ ` builder/target/release/progit ` ). See ` builder/README.md ` .
55+
56+ ### Build / test / lint (standard commands live in ` Rakefile ` and ` README.asc ` )
57+ - Full build (CI parity): ` bundle exec rake book:build ` . This also runs the
58+ htmlproofer + epubcheck validation step, but ** ` book:build ` intentionally rescues and
59+ ignores those check errors** (see the ` rescue ` in ` Rakefile ` ).
60+ - Single formats: ` bundle exec rake book:build_html ` / ` build_epub ` / ` build_fb2 ` /
61+ ` build_mobi ` / ` build_pdf ` . The PDF build is the slow one (~ 1 min).
62+ - There is no separate lint step; htmlproofer/epubcheck (run via ` book:check ` ) are the de
63+ facto linters for the generated HTML/EPUB.
64+
65+ ### Non-obvious gotchas
66+ - ** Do not use ` bundle exec rake book:ci ` for offline verification.** Unlike ` book:build ` ,
67+ ` book:ci ` does * not* ignore htmlproofer/epubcheck errors, and htmlproofer will fail on
68+ external links (404s / no network) even when the book itself is fine. Use ` book:build ` .
69+ - ** MOBI is effectively a no-op.** ` book:build_mobi ` reports success but does not emit
70+ ` progit.mobi ` — current ` asciidoctor-epub3 ` (see ` Gemfile ` ) no longer produces KF8/MOBI.
71+ This is pre-existing repo behavior, not an environment problem.
72+ - Generated outputs (` progit.html ` , ` progit.pdf ` , ` progit.epub ` , ` progit.fb2.zip ` , etc.),
73+ ` book/contributors.txt ` , and ` Gemfile.lock ` are all git-ignored.
74+
75+ ### Local reader (manual/GUI verification)
76+ - ` ./builder/target/release/progit serve --port 8080 ` builds the HTML and serves a
77+ multi-page reader at ` http://127.0.0.1:8080/ ` (binds ` 127.0.0.1 ` only). ` / ` is the cover +
78+ TOC; ` /r/<section> ` is a single section with sidebar TOC and prev/next links. Ctrl-C to stop.
0 commit comments