Skip to content

docs: restructure public README and fix piped installer - #1012

Open
AlexMikhalev wants to merge 7 commits into
mainfrom
task/3556-readme-public-refresh
Open

AlexMikhalev wants to merge 7 commits into
mainfrom
task/3556-readme-public-refresh

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Summary

  • Fixes the installer: curl ... | bash currently exits 0 and installs nothing, because the guard at the end of scripts/install.sh is false when bash reads from stdin.
  • Rebuilds the README in the style of analysis-tools-dev/static-analysis: hero, badges, contents table and a categorised catalogue of related public repositories.
  • Corrects or removes content that was wrong. The README goes from about 900 lines to about 340, and detail moves behind links to existing docs.

Corrected

  • Python example used ta.Thesaurus, which does not exist in terraphim-automata 1.0.0.
  • Removed references to missing files (LICENSE, desktop/README.md, docs/archive/..., quickwit_*_config.json).
  • Removed commands that do not exist (terraphim-agent commands, REPL /vm, /web, /file, /deploy, /sessions, brew install terraphim/terraphim-ai/terraphim-ai).
  • Removed the superseded terraphim-repl crate, and added terraphim-grep, previously absent from the install docs.
  • Removed the link to private terraphim-skills, and @terraphim/autocomplete, whose published 1.3.0 package has no native binaries and cannot load.
  • Added a note that building this workspace needs a token for the private terraphim Cargo registry. cargo fetch fails without one.

Evidence

Run on macOS arm64 in isolated HOME directories:

Check Result
Installer: piped, piped with args, file, process substitution Installs and runs
Installer: sourced Does not run main
cargo install terraphim_grep --locked, terraphim_agent --locked, empty CARGO_HOME Installed 1.21.2 and 1.21.1
README commands, Python block and hook script Run against v1.21.22 binaries and terraphim-automata 1.0.0
update_release.py (pinned updater) on a copy Only changes the date line, the same as on the old README
Downloads block compared with github/main Byte-identical
Relative links and anchors All resolve on this branch

Not run: yarn run dev, cargo run, Homebrew install (formula URL checked only), Linux. Three external citations return 403 to curl (Forbes, The Atlantic, Fandom) and were not changed.

Notes for review

  • Bot PR chore(release): update release links (auto) #1004 changes the same date line and will need re-proposing after this merges.
  • Gitea main has diverged, so this needs a separate sync. Follow-up decisions are tracked on Gitea issue terraphim/terraphim-ai#3556.

🤖 Generated with Claude Code

AlexMikhalev and others added 3 commits November 1, 2026 19:51
`curl ... | bash` exited 0 and installed nothing. When bash reads the
script from stdin, BASH_SOURCE[0] is unset, so the guard compared an
empty string with "bash" and never called main. Default to $0 so piped
and direct runs both execute main, while sourcing still does not.

Also correct the usage text: passing options through a pipe needs
`bash -s --`, because `bash --with-cli` is an invalid bash option.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rebuild the README around a hero, contents table and categorised
catalogue, modelled on analysis-tools-dev/static-analysis, and add an
ecosystem section linking the related public repositories.

Every documented command was run against the v1.21.22 binaries, and
references to missing files, removed subcommands and non-existent
packages were dropped. The bot-managed downloads block is unchanged.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The options overwrote each other, so the documented combination
installed only whichever came last. Add to the selection instead,
without duplicates, and only suggest next steps for installed tools.

Correct the README's checksum claim, which is conditional, and the
invalid `| bash --with-cli` forms in docs/installation.md.

Addresses structural review findings on PR #1012.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Your documentation changes have been deployed to:
https://0795a947.terraphim-docs.pages.dev

This preview will be available until the PR is closed.

The live badge displayed the current member count, which reads as a
weak signal on a project landing page. Label the link instead.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Your documentation changes have been deployed to:
https://557691c3.terraphim-docs.pages.dev

This preview will be available until the PR is closed.

The list promised unconditional checksum verification and a fallback to
source compilation. The installer can continue without checksums, with a
warning, and has no source-build path.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AlexMikhalev

Copy link
Copy Markdown
Contributor Author

Structural review round 2 by gpt-5.6-sol, posted after verification. Both P2 findings were reproduced against the installer and fixed in 06965a9e8; round 3 is reviewing that commit.

Summary

This round re-reviewed the public README refresh and installer corrections at dd6fe55bc against github/main.

The earlier findings are now addressed as follows:

  • Resolved P1 — combined installer options: --with-cli --with-grep now accumulates all three tools rather than allowing the second option to overwrite the first. Testing under the system Bash 3.2 produced terraphim-agent terraphim-cli terraphim-grep.
  • Resolved P2 — README checksum wording: README.md:76 now accurately says checksums are verified “when they are available”.
  • Resolved P2 — completion guidance: scripts/install.sh:411-421 lists only installed tools and offers terraphim-agent repl only when the agent was installed.
  • Invocation compatibility confirmed: piped, sourced and process-substitution forms all behaved correctly under /bin/bash 3.2.57.
  • Bot-managed content confirmed: the region between the terraphim-downloads markers is byte-identical to github/main.

Remaining suggestions:

  • The older feature list in docs/installation.md still makes an unconditional checksum claim.
  • The same list claims a source-compilation fallback which the current installer does not implement.

No P0 or P1 findings remain. The remaining documentation defects are outside the two changed lines in docs/installation.md, but are directly relevant because this PR updates and endorses that installer documentation.

Confidence Score: 4/5

  • Safe to merge with awareness of two misleading installation-guide claims.
  • The functional round-one P1 is resolved, Bash 3.2 and empty-array behaviour were exercised successfully, all requested invocation forms work, and the README’s local links and heading anchors are valid. The remaining two findings are P2 documentation accuracy issues.
  • File requiring attention: docs/installation.md.

Important Files Changed

Filename Overview
README.md Replaces the former long README with a public-facing overview, installation paths, verified examples and ecosystem links. The checksum wording is now conditional, all local links resolve, and the bot-managed download region is unchanged from the base branch.
scripts/install.sh Adds deduplicating option accumulation, accurate per-tool completion guidance and robust direct-execution detection. The changes work under macOS /bin/bash 3.2, including piped, sourced and process-substitution invocation.
docs/installation.md Corrects piped argument forwarding by using bash -s --. Its adjacent feature list still contains two inaccurate claims described below.

Installer Flow

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Invoke install.sh] --> B{Invocation form}
    B -->|curl pipe| C[bash -s -- OPTIONS]
    B -->|executed file or process substitution| D[main receives OPTIONS]
    B -->|source install.sh| E[Define functions only]
    C --> F[parse_args]
    D --> F
    F --> G{Option}
    G -->|--with-cli| H[add_tool terraphim-cli]
    G -->|--with-grep| I[add_tool terraphim-grep]
    G -->|--tool NAME| J[Replace default, then deduplicate]
    H --> K[Install accumulated tools]
    I --> K
    J --> K
    K --> L{Manifest has checksum?}
    L -->|Yes| M[Verify SHA-256 and install]
    L -->|No| N[Warn and install unverified]
    M --> O[Print commands for installed tools only]
    N --> O

    style H fill:#d4edda,stroke:#28a745
    style I fill:#d4edda,stroke:#28a745
    style J fill:#d4edda,stroke:#28a745
    style O fill:#d4edda,stroke:#28a745
Loading

Inline Findings

No findings occur on changed diff lines.

Comments Outside Diff (2)

  1. P2 docs/installation.md, line 25: Unconditional checksum claim remains

    The feature list promises “Security verification with checksums”, but the installer explicitly permits two unverified paths:

    • scripts/install.sh:184-190 falls back to TLS when the helper SHA256SUMS file is unavailable.
    • scripts/install.sh:309-310 continues when a release manifest carries no asset checksum.

    This is the same class of misleading wording corrected in README.md:76. Make the guide consistent, for example:

    - ✅ Checksum verification when published checksums are available
  2. P2 docs/installation.md, line 27: Source-compilation fallback is not implemented

    The guide advertises “Fallback to source compilation”, but scripts/install.sh has no Cargo, Rust compiler or source-build path. Resolution or download failure exits with the installer’s manifest/download error codes instead. Users on an unpublished target will therefore receive an error rather than the documented fallback.

    Remove this feature or implement and test an actual source-build path. Given the installer’s stated purpose of installing published client binaries, removing the claim is the safer correction.

Commands Run

Command/check Result
git apply --numstat < ../pr1012.diff Confirmed changes to README.md, docs/installation.md and scripts/install.sh.
/bin/bash --version GNU bash, version 3.2.57(1)-release, matching the requested compatibility target.
/bin/bash -n scripts/install.sh scripts/platform-detection.sh scripts/binary-resolution.sh scripts/security-verification.sh Passed.
shellcheck -s bash scripts/install.sh One pre-existing SC2034 warning for unused local resolved at line 270; no correctness errors relevant to this patch.
Source installer, then parse_args --with-cli --with-grep Passed: count 3, tools terraphim-agent terraphim-cli terraphim-grep.
Source installer, then parse_args --tool terraphim-cli --tool terraphim-grep Passed: count 2, with no retained default agent and no overwrite.
Empty TOOLS_TO_INSTALL, then tool_selected x under set -euo pipefail Returned the expected non-match status without an unbound-array error.
Empty-array length expansion under Bash 3.2 and set -u Passed, length 0.
cat scripts/install.sh | /bin/bash -s -- --help Passed with exit 0.
/bin/bash -c 'source scripts/install.sh; …' Passed; functions were loaded and main did not run.
/bin/bash <(cat scripts/install.sh) --help Passed with exit 0.
Extract and compare the README marker region against git show github/main:README.md Byte-identical: 1255 bytes on both sides.
Python validation of relative Markdown links in README.md No missing local links.
Python validation of README heading anchors All table-of-contents anchors resolve. The repeated bun-install heading is inside an example and does not invalidate any link.
Recalculate hashes listed in scripts/SHA256SUMS All three helper checksums matched.
HTTP checks for the website, documentation, how-tos, editor, client releases, Homebrew repository and PyPI page All returned HTTP 200. crates.io returned its usual automated-request 403; GHCR’s unauthenticated registry endpoint returned 401, which is expected for that API endpoint and does not disprove image availability.
Inspect scripts/install.sh for Cargo/source-build logic No source-compilation path exists, contradicting docs/installation.md:27.
git status --short after review Empty; the read-only worktree remained unchanged.

One attempted repository-search batch used options unsupported by the locally installed terraphim-grep; the first query returned usage status 2, and several searches piped through head reported status 101 after their output pipe closed. Those results were not relied upon for findings.

Last reviewed commit: dd6fe55 | Reviews (2)

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Your documentation changes have been deployed to:
https://4784fcbc.terraphim-docs.pages.dev

This preview will be available until the PR is closed.

…badge

The options on the second install command ran off the code block, so it
read the same as the first. Wrap the line. Label the Discord link rather
than showing a live count, matching the Discourse badge.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AlexMikhalev

Copy link
Copy Markdown
Contributor Author

Structural review round 3 by gpt-5.6-sol, reviewing 06965a9e8: 5/5 with no findings. Both round 2 P2s are confirmed fixed. 7718d305f then made two README display fixes found by checking the rendered page; round 4 is reviewing it.

Structural re-review — Round 3

Reviewed commit: 06965a9e81f62b0db88d2faec258b160da14295a
Base: github/main at 2f8884f986cb1541b67086549767dd416fff8acc

Prior findings

Both Round 2 P2 findings are resolved:

  1. Unconditional checksum claim — resolved

    • docs/installation.md:25 now says: “Checksum verification when published checksums are available”.
    • This matches scripts/install.sh:307-321, which verifies a checksum when supplied, warns and continues when the manifest has none, and supports explicit --skip-verify.
    • The corresponding README wording at README.md:76 is also accurate.
  2. Non-existent source-compilation fallback — resolved

    • docs/installation.md:26 now says: “Installs pre-built release binaries; it does not compile from source”.
    • This matches scripts/install.sh:265-365: the installer resolves, downloads, verifies, extracts and installs published archives; there is no compilation fallback.

Commit 06965a9e8 introduced no new defect in making these corrections.

Findings

P0

None.

P1

None.

P2

None.

The wider re-review of scripts/install.sh, README.md, and the PR-touched installer documentation found no additional actionable defects. Installer option composition, piped-shell argument syntax, completion output, relative README links and Markdown structure were consistent.

Required marker verification

The <!-- terraphim-downloads:start --> through <!-- terraphim-downloads:end --> region is byte-identical to github/main.

  • cmp exit status: 0
  • Base SHA-256: 3d8c48155ae6b73bb05d00b008ec2eddb60f5268d6c742ce5877246640ceebff
  • Head SHA-256: 3d8c48155ae6b73bb05d00b008ec2eddb60f5268d6c742ce5877246640ceebff

Confidence

5/5 — Safe to merge with minimal risk.

All P0/P1 issues are absent, both previous P2 findings are resolved, and no remaining P2 finding was identified.

Commands run and results

All checks were read-only. No compilation, build, edit, commit, push or PR comment was performed.

  1. Repository identity and scope

    • git rev-parse HEAD → 06965a9e81f62b0db88d2faec258b160da14295a
    • git branch --show-current → task/3556-readme-public-refresh
    • git rev-parse github/main → 2f8884f986cb1541b67086549767dd416fff8acc
    • git status --short → clean
    • git diff --name-status github/main...HEAD → only:
      • README.md
      • docs/installation.md
      • scripts/install.sh
  2. Full diff and fixing commit

    • Read the supplied pr1012-r3.diff.
    • git show 06965a9e8 -- docs/installation.md README.md scripts/install.sh → confirmed the final commit changes only the inaccurate feature claims in docs/installation.md.
  3. Diff integrity

    • git diff --check github/main...HEAD → exit 0; no whitespace errors.
  4. Shell syntax, without executing installation

    • bash -n scripts/install.sh scripts/platform-detection.sh scripts/binary-resolution.sh scripts/security-verification.sh → exit 0.
  5. Marker byte comparison

    • Extracted the marker region from github/main:README.md and HEAD:README.md.
    • cmp -s → exit 0.
    • SHA-256 values matched exactly, as listed above.
  6. Installer argument parsing, without downloads or installation

    • Sourced scripts/install.sh; its main guard prevented installer execution.
    • Exercised parse_args only:
      • --with-grep --with-cli → agent, grep and CLI selected.
      • --with-cli --with-grep → agent, CLI and grep selected.
      • --cli-only → CLI only.
      • repeated --tool → requested tools selected.
      • repeated --with-cli → no duplicate.
      • custom directory containing spaces and explicit version → preserved correctly.
    • Result: exit 0.
  7. README relative links

    • Checked every relative Markdown link introduced by the PR.
    • All targets exist, including the installation, release-channel, Python binding, integration, architecture and licence documents.
  8. Markdown structure

    • README.md: 26 code fences, balanced; one matched <details> block.
    • docs/installation.md: 66 code fences, balanced.

No Cargo, Rust, Yarn, npm, Make or other build command was run.

Last reviewed commit: 06965a9 | Reviews (3)

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Your documentation changes have been deployed to:
https://8b324153.terraphim-docs.pages.dev

This preview will be available until the PR is closed.

@AlexMikhalev

Copy link
Copy Markdown
Contributor Author

Structural review round 4 by gpt-5.6-sol.

Summary

Round 4 verifies the documentation-only changes in commit 7718d305f, which wraps the second installer command and replaces the live Discord count with a static community badge.

  • Wrapped installer command — Valid Bash syntax. The continuation joins the two physical lines into one pipeline, and bash -s -- --with-grep --with-cli passes both installer options through unchanged.
  • Markdown fencing — README.md:68–75 remains one bash fenced code block with exactly one opening and one closing fence.
  • Static Discord badge — README.md:19 retains the Discord invitation link while avoiding reliance on the live server-count endpoint.
  • Generated downloads region — The inclusive terraphim-downloads:start through terraphim-downloads:end region is byte-identical to github/main: both are 1,256 bytes with SHA-256 3d8c48155ae6b73bb05d00b008ec2eddb60f5268d6c742ce5877246640ceebff.

Round 3’s clean result remains valid. No new or remaining suggestions were identified.

Confidence Score: 5/5

  • Safe to merge with minimal risk.
  • There are no P0, P1 or P2 findings. The shell syntax, argument propagation, Markdown fence structure and protected downloads region were all verified directly.
  • No files require special attention.

Important Files Changed

Filename Overview
README.md The second installer example is now wrapped without changing its shell semantics, and the Discord badge is static. No findings.
docs/installation.md Part of the previously reviewed PR diff; unchanged by 7718d305f. No findings carried forward from round 3.
scripts/install.sh Part of the previously reviewed PR diff; unchanged by 7718d305f. No findings carried forward from round 3.

Findings

  • P0: None.
  • P1: None.
  • P2: None.

Commands Run

  • cat ../pr1012-r4.diff
    • Read the supplied full PR diff successfully.
  • git status --short --branch
    • Confirmed branch task/3556-readme-public-refresh, tracking github/task/3556-readme-public-refresh.
  • git rev-parse HEAD
    • Returned 7718d305fd13388e39fdb91e8d853654cfca5f51.
  • git diff --name-status github/main...HEAD
    • Reported the full PR scope: README.md, docs/installation.md, and scripts/install.sh.
  • git show --stat --oneline --decorate --no-renames 7718d305f
    • Confirmed the latest commit changes only README.md: three insertions and two deletions.
  • git show --format=fuller --no-ext-diff --no-renames -- README.md 7718d305f
    • Confirmed the two intended changes: the wrapped installer pipeline and static Discord badge.
  • git diff --check github/main...HEAD
    • Exit 0; no whitespace errors.
  • bash -n against the wrapped two-line command
    • Exit 0; valid shell syntax.
  • Exact pipeline simulation using a simulated curl and real bash -s -- --with-grep --with-cli
    • Exit 0; installer received exactly <--with-grep> <--with-cli>.
  • awk over README.md:64–79
    • Found exactly two fence delimiters around lines 68–75; exit 0. The example remains one fenced bash code block.
  • cmp between the inclusive downloads marker regions in README.md and github/main:README.md
    • Exit 0; regions are byte-identical.
  • wc -c and shasum -a 256 for both marker regions
    • Both are 1256 bytes.
    • Both hashes are 3d8c48155ae6b73bb05d00b008ec2eddb60f5268d6c742ce5877246640ceebff.

No compilation, build, edit, commit, push or remote comment was performed.

Last reviewed commit: 7718d30 | Reviews (4)

The source repository is private, but terraphim-skills.md is public.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Your documentation changes have been deployed to:
https://29fd135a.terraphim-docs.pages.dev

This preview will be available until the PR is closed.

@AlexMikhalev

Copy link
Copy Markdown
Contributor Author

Structural review round 5 by gpt-5.6-sol.

Structural re-review — Round 5

PR: #1012
Head: 83b4c9c9c6d757e6222d478de8c7a1359ef0848a
Base: github/main at 2f8884f986cb1541b67086549767dd416fff8acc
Previous reviewed head: 7718d305fd13388e39fdb91e8d853654cfca5f51

Findings

  • P0: None.
  • P1: None.
  • P2: None.

Verification

  • README.md:213 links to https://terraphim-skills.md with the label Terraphim Skills. Its wording, “Discover, install and publish skills for any AI coding agent”, accurately reflects the supplied page description. Omitting the serial comma is normal British usage and does not alter the meaning.
  • README.md:263 places the same link under Websites and documentation and describes it as a “Marketplace of skills for AI coding agents”. This is consistent with a site for discovering, installing and publishing skills.
  • Both bullets read naturally in their respective sections:
    • the first is appropriately included among agent-oriented guides;
    • the second is appropriately included among project websites and documentation.
  • The <!-- terraphim-downloads:start --> through <!-- terraphim-downloads:end --> region is byte-identical to github/main: 1,256 bytes on both revisions.
  • The head commit contains exactly two insertions in README.md; no unrelated round-5 change was found.
  • The checkout was clean.

Commands run and results

  1. One combined inspection command:

    • Confirmed the requested head and github/main revisions.
    • Read the supplied full diff and README context.
    • Compared the downloads marker regions using their raw encoded bytes.
    • Result: BYTE_IDENTICAL: True; both regions were 1,256 bytes.
  2. One combined Git inspection command:

    • Confirmed HEAD is 83b4c9c9c…, with parent 7718d305f….
    • git status --short produced no output.
    • git show --stat HEAD reported README.md | 2 ++.
    • The head-only patch showed only the additions at README.md:213 and README.md:263.

No compilation, build, edits, commits, pushes or comments were performed.

Confidence: 5/5.

This branch was successfully deployed

1 active deployment
docs-preview — 83b4c9c9 Deployed Nov 1, 2026 by AlexMikhalev via Deploy Preview #328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant