Skip to content

Add project scope for repo-local dotfiles - #23

Merged
polymorcodeus merged 7 commits into
mainfrom
project-scope
Aug 23, 2026
Merged

Add project scope for repo-local dotfiles#23
polymorcodeus merged 7 commits into
mainfrom
project-scope

Conversation

@polymorcodeus

@polymorcodeus polymorcodeus commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

Adds project scope: manage repo-local dotfiles (.vscode/, .crush/, AGENTS.md) that live inside a git repository, backed up to the lnk repo but not committed upstream. Completes the project-scope work ahead of the v2.0.0 release.

What's new

  • Core workflow - init, add/list/untrack patterns, push/restore/pull.
  • Lifecycle parity - project remove (restore files, drop storage) and project forget (unlink, keep storage), plus reconcile-on-untrack and a project sync command that reconciles patterns, live files, and storage.
  • Global patterns - project add/untrack --global manage the repo-root .lnkinclude; local ! patterns negate a global include per project.
  • Discovery + health - project list --all lists stored projects; lnk doctor reports stored projects, unmarked storage, and empty project dirs.

Usage

Command Purpose
project init / add <pattern> / untrack [--keep] <pattern> manage .lnkinclude
project push [--force] / sync [--dry-run] [--prune-deletions] [--force] move/reconcile files
project restore [--dry-run] [--force] / pull [--force] recreate symlinks
project remove / forget stop managing (restore vs keep storage)
project list [--all] patterns, or stored projects

Behavior changes / guardrails

  • All project commands anchor at the git toplevel; running from a subdirectory is safe.
  • Project commands refuse to run inside the lnk repo (or any clone of it) to prevent self-storage.
  • Files tracked by the project's own git are skipped by push/sync/restore with a warning (add !path or --force), avoiding a committed file becoming a machine-local symlink.
  • project untrack reconciles by default (mirrors lnk remove); --keep restores edit-only behavior.
  • Deletions are never auto-propagated: sync reports them, and only --prune-deletions removes their stored copies.
  • Files are managed individually, not as directory symlinks; local-only repos (no origin) get a local/<name>-<hash> storage ID.

Testing

  • Unit tests alongside each collaborator cover the guardrails, reconciliation, lifecycle, global patterns, and doctor integration.
  • make check runs fmt, vet, lint, unit, and integration suites; all green.

@polymorcodeus
polymorcodeus marked this pull request as draft August 20, 2026 21:03
@polymorcodeus
polymorcodeus marked this pull request as ready for review August 20, 2026 23:26
@polymorcodeus polymorcodeus changed the title Project Scope Storage & Core Commands Add project scope for repo-local dotfiles Aug 23, 2026
@polymorcodeus polymorcodeus self-assigned this Aug 23, 2026
@polymorcodeus
polymorcodeus merged commit 7869bbd into main Aug 23, 2026
4 checks passed
@polymorcodeus
polymorcodeus deleted the project-scope branch August 23, 2026 18:13
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