Skip to content

Add helper scripts for use, sync, and freshness#4

Open
thegalexc wants to merge 1 commit into
disler:mainfrom
thegalexc:pr/upstream-helper-scripts
Open

Add helper scripts for use, sync, and freshness#4
thegalexc wants to merge 1 commit into
disler:mainfrom
thegalexc:pr/upstream-helper-scripts

Conversation

@thegalexc
Copy link
Copy Markdown

Summary

This adds small helper scripts for the three most mechanical library operations:

  • bin/use.py
  • bin/sync.py
  • bin/freshness.py

It also updates the skill docs, cookbooks, and justfile so the documented workflow matches the actual behavior.

The goal is to keep the agent as the orchestration layer while moving repetitive file-copy, clone, and compare logic into simple reusable scripts.

Why

The current library concept is strong, but some operations are very procedural:

  • resolve an entry from library.yaml
  • fetch from local or GitHub source
  • install dependencies first
  • compare installed content to source
  • refresh installed items consistently

Encoding those steps entirely in prose makes behavior harder to keep consistent across runs and across agent harnesses.

These helpers make the core operations:

  • repeatable
  • testable
  • easier to document
  • easier for agents to invoke correctly

What’s included

New scripts

  • bin/use.py

    • install or refresh one catalog entry
    • supports local paths and GitHub URLs
    • installs dependencies first
    • supports --global
    • supports --target
    • supports --project-root for resolving relative default_dirs
  • bin/sync.py

    • re-pulls all installed items
    • processes dependencies before dependents
    • supports --dry-run
    • supports --project-root
  • bin/freshness.py

    • compares installed content against source via live hashing
    • supports local and GitHub-backed sources
    • supports --json
    • supports --project-root

Safer project-local path handling

Relative default_dirs are now resolved against a target project root, not implicitly against whatever directory the script was launched from.

That prevents a subtle footgun where running a command from the library repo itself could accidentally install or inspect project-local entries there.

Docs and command surface updates

  • adds /library freshness to the documented command set
  • adds cookbook/freshness.md
  • updates use, sync, and related cookbooks
  • adds a just freshness shortcut
  • updates README wording so it no longer claims there are no helper scripts

Behavior notes

  • local file and local directory sources are both supported
  • GitHub browser and raw URLs are supported
  • freshness checks all installed copies it finds
  • the scripts support older Python via typing imports rather than newer-only annotation syntax

Validation

Manually validated with a temp project:

  1. install a demo skill into a project-local default dir
  2. confirm freshness reports up-to-date
  3. modify installed content
  4. confirm freshness reports outdated
  5. run sync
  6. confirm freshness returns to up-to-date

Also ran:

  • python3 -m py_compile bin/use.py bin/sync.py bin/freshness.py
  • git diff --check

Scope

This PR intentionally avoids any private catalog entries, private skills, or repo-specific customizations. It is limited to generic helper-script functionality and the docs needed to support it.

Copy link
Copy Markdown

@no-tably no-tably left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful!

juliuschun added a commit to juliuschun/the-library that referenced this pull request May 1, 2026
…tion)

Reverts the 2026-05-01 absorption of skill-architect into library.
Lifecycle (create/validate/audit/distill/refine) belongs to skill-architect;
catalog + customer-VM distribution belongs to library. Different
responsibilities → separate skills, per fleet pattern.

- SKILL.md: slim back to distribution + catalog only (operator-host publish)
- library.yaml: restore skill-architect entry (tag=business),
  narrow library tag back to tower-ops only
- cookbook/{create,validate,audit,distill,refine}.md: moved to skill-architect/
- reference/skill-*.md: moved to skill-architect/{spec,templates,validation,testing-guide,classification}.md

Decision doc reversal recorded in
workspace/decisions/2026-05-01-skill-lifecycle-mandatory-entry-point.md (disler#4).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

2 participants