Skip to content

Auto-derive symlinks and add bootstrap.sh reconstruction pipeline#23

Merged
ali5ter merged 1 commit into
mainfrom
feature/auto-links-and-bootstrap
Apr 12, 2026
Merged

Auto-derive symlinks and add bootstrap.sh reconstruction pipeline#23
ali5ter merged 1 commit into
mainfrom
feature/auto-links-and-bootstrap

Conversation

@ali5ter
Copy link
Copy Markdown
Owner

@ali5ter ali5ter commented Apr 12, 2026

Summary

  • init-symlinks.sh β€” replaces the static LINKS array with dynamic discovery from collections/*/. Uses the naming convention built into the template: NAME/pdfs β†’ LIBRARY_BASE/NAME, NAME/indexed β†’ LIBRARY_BASE/library-indexed/NAME, findings β†’ LIBRARY_BASE/library-findings. Instances that need non-standard paths can define a LINKS array in .env to override.
  • bootstrap.sh β€” new full reconstruction pipeline. From a clean clone with .env configured, one command creates cloud directories, restores symlinks, downloads PDFs (Source URL from COLLECTION.md), converts to Markdown, and regenerates CATALOGUE.md. Fully idempotent.
  • All four AI context files updated with bootstrap.sh and init-symlinks.sh in their Tools sections.
  • README.md and CLAUDE.md updated with the new one-command setup workflow.

Test plan

  • bash -n init-symlinks.sh β€” no syntax errors
  • bash -n bootstrap.sh β€” no syntax errors
  • With no collections/ subdirs, init-symlinks.sh with LIBRARY_BASE set warns and exits cleanly
  • With collections present, init-symlinks.sh auto-derives the correct link pairs
  • A LINKS array in .env takes precedence over auto-discovery
  • bootstrap.sh exits with a clear error if .env is missing or LIBRARY_BASE is unset
  • bootstrap.sh skips collections with no Source URL in COLLECTION.md
  • Re-running bootstrap.sh on a fully-built library skips all download and convert steps

Closes #21, closes #22

πŸ€– Generated with Claude Code

Issue #22 β€” init-symlinks.sh:
- Replace static LINKS array with dynamic discovery from collections/*/
- Naming convention: NAME/pdfs β†’ LIBRARY_BASE/NAME,
  NAME/indexed β†’ LIBRARY_BASE/library-indexed/NAME,
  findings β†’ LIBRARY_BASE/library-findings
- LINKS array defined in .env takes precedence over auto-discovery

Issue #21 β€” bootstrap.sh:
- Full reconstruction pipeline from a clean clone
- Validates .env and LIBRARY_BASE, initialises lib/pfb submodule if needed
- Creates cloud-storage directories, runs init-symlinks.sh
- Downloads PDFs per collection using Source URL from COLLECTION.md
- Converts PDFs to Markdown, regenerates CATALOGUE.md
- Idempotent: skips collections already downloaded or converted

Docs:
- Update CLAUDE.md project layout and common commands
- Update README.md with one-command bootstrap workflow and symlink override docs
- Update AGENTS.md, GEMINI.md, .github/copilot-instructions.md Tools sections

Closes #21, closes #22

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ali5ter ali5ter merged commit c5d2443 into main Apr 12, 2026
1 check passed
@ali5ter ali5ter deleted the feature/auto-links-and-bootstrap branch April 12, 2026 15:01
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.

Auto-derive LINKS in init-symlinks.sh from collections/ directory Add bootstrap.sh: full reconstruction pipeline from a clean clone

1 participant