Skip to main content

Module project

Module project 

Source
Expand description

Canonical project identity for skill scope: Project matching.

A project == its git repo root. Harvest stamps a learned skill with the repo root it was learned in; injection computes the repo root of the current working dir; the two match iff you’re in the same repo. Using the repo root (not the cwd) means a skill learned in a subdir of repo X still applies anywhere in X.

Functions§

active_project_id
The active project id for scope matching: MUR_ACTIVE_PROJECT env override, else the current working dir’s repo root. None when neither resolves (→ only user/enterprise skills inject). Single source used by both the CLI injection hook and the agent runtime injector so they can’t diverge.
project_id
Canonical project id (repo-root path string) for scope matching, or None if not in a repo. Canonicalized so two entry points into the same repo (subdir, symlink, relative path) produce the same id.
repo_root_of
Walk up from start to the directory containing a .git entry (the repo root). None if start isn’t inside a git repo.