Skip to content

Project-local mode: execution preamble and meta-skills hardcode ~/.praxis paths #53

Description

@anujhydrabadi

Bug

In project-local mode (praxis login --local / praxis refresh-skills --project), state follows the active root: the MCP manifest snapshot is written to <repo>/.praxis/mcp-tools.json (paths.MCPTools follows ActiveRoot; written via refreshMCPSnapshot, cmd/login_setup.go:366).

But the instructions injected into skills tell the AI host to look in the home path:

  • the execution preamble (internal/render/preamble.go:42): "A snapshot from your last praxis login lives at ~/.praxis/mcp-tools.json"
  • the embedded praxis meta-skill (internal/skillinstall/dummy.go:170): same hardcoded ~/.praxis/...
  • the praxis-onboarding SKILL.md (internal/skillinstall/embedded/praxis-onboarding/SKILL.md:18): hardcoded ~/.praxis/onboarding-progress.json

In project mode the host greps a path that is absent or stale (possibly belonging to a different org/profile than the project-local credentials) — wrong tool list, wrong onboarding state.

Suggested fix

Render the real path at install time: the preamble and meta-skill bodies are produced client-side, and the installer knows the active root — make the path a template variable ({{PRAXIS_DIR}}) substituted with the actual ~/.praxis or <repo>/.praxis during RenderedContent() / meta-skill install. Alternatively, change the instruction to a root-agnostic command: "run praxis mcp --json (live) — or ask praxis status --json for the state dir and grep <state_dir>/mcp-tools.json", if status exposes the active root (add it if not).

Add a test: project-scoped install → installed SKILL.md bodies contain the project-local path (or the root-agnostic instruction), not ~/.praxis.

Found during the praxis skills/gateway audit (2026-07-06).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions