You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(refresh-skills): default to user-level install, add --project scope (#23)
* feat(refresh-skills): default to user-level install, add --project scope
`praxis refresh-skills` installed skills into the user-level home dirs
(~/.claude/skills, ...), which apply globally across every repo. That
over-applied org skills — e.g. praxis-k8s-operations + its MCPs nudging
Claude away from a user's local kubectl in repos that don't want them.
Keep user-level as the default (the main customer case) and add an
opt-in `--project` flag that scopes the install to the current repo
(<cwd>/.claude/skills, etc.) instead of the global home dir.
- harness.Harness.ProjectScoped(dir): rebases SkillDir/AgentDir from
the home dir onto a project dir, per-host (handles Codex's split
~/.agents/skills vs ~/.codex/agents). Non-home paths pass through.
- runPostAuthSetup gains a projectScoped arg; refresh-skills wires it
to --project and reports scope in text + JSON output.
- Project scope SKIPS the receipt-based "wipe previous profile" steps
(skills + agents) so a repo-local refresh can't delete the user's
global install. The disk-scoped orphan sweep still runs (it only
touches the project-scoped host dirs).
TDD: harness unit tests + runPostAuthSetup project-scope tests (writes
into project dir; does not wipe a pre-seeded user-level install) +
refresh-skills --project RunE test. Full -race suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(refresh-skills): fall back to user scope correctly when getwd fails
Addresses CodeRabbit review on #23. When `refresh-skills --project` is
requested but the working directory can't be resolved, the install fell
back to a user-level target but kept treating it as project-scoped — so
the receipt-based user-level wipes were skipped and the reported scope
lied about where files landed.
- Track an `effectiveProjectScoped` in runPostAuthSetup that drops to
false on getwd() failure; gate the three user-level wipe steps on it
and surface it via postAuthState.projectScoped.
- refresh-skills now reports the effective scope (state.projectScoped),
not the requested flag, in both JSON and text output.
- Regression tests: getwd-failure fallback runs the user-level wipe
(login_setup_test) and reports user scope (skill_test).
Nitpicks also addressed:
- login_reuse_test stub now asserts login passes projectScoped=false.
- TestProjectScoped_* consolidated into one table-driven test.
- TestRefreshSkills_ProjectFlag_* drive --project/--json through Cobra
flags to exercise flag wiring.
- README: stop claiming refresh-skills doesn't exist.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments