feat: add stable project identity #5

Merged
CoderLambert merged 5 commits from feat/project-identity into main 2026-05-20 20:44:25 +08:00
CoderLambert commented 2026-05-20 19:49:43 +08:00 (Migrated from github.com)

Summary

  • Add identity.lua to resolve stable project identity from Git remote origin, package.json name, directory name, or path hash fallback.
  • Use the stable identity id for new rules file paths.
  • Keep legacy path-hash rules as a fallback so existing project rules continue to work.
  • Add :ProjectSearch identity to inspect current identity and rule paths.
  • Add :ProjectSearch migrate to copy legacy path-hash rules to the stable identity path.
  • Report identity and migration status in :ProjectSearch health.
  • Add docs/project-identity.md.

Stack

This PR is stacked on #4 and uses feat/user-template-dirs as its base branch. Merge #4 first, then this PR.

Notes

Identity resolution reads small local files such as .git/config and package.json; it does not run fd, rg, or scan project files when opening the picker.

## Summary - Add `identity.lua` to resolve stable project identity from Git remote origin, `package.json` name, directory name, or path hash fallback. - Use the stable identity id for new rules file paths. - Keep legacy path-hash rules as a fallback so existing project rules continue to work. - Add `:ProjectSearch identity` to inspect current identity and rule paths. - Add `:ProjectSearch migrate` to copy legacy path-hash rules to the stable identity path. - Report identity and migration status in `:ProjectSearch health`. - Add `docs/project-identity.md`. ## Stack This PR is stacked on #4 and uses `feat/user-template-dirs` as its base branch. Merge #4 first, then this PR. ## Notes Identity resolution reads small local files such as `.git/config` and `package.json`; it does not run `fd`, `rg`, or scan project files when opening the picker.
Sign in to join this conversation.