Skip to content

Conversation

@forketyfork
Copy link
Owner

Solution:

  • Generate zsh wrapper .zprofile/.zshrc under ~/.cache/architect/zsh that source the user’s originals and then re-prepend the Architect bin dir.
  • Set ARCHITECT_ZDOTDIR_WRAPPER and related env vars so ZDOTDIR is restored correctly while still applying the PATH injection.
  • Install precmd/chpwd guards in the wrapper .zshrc to keep the Architect entry after PATH resets on directory changes.

Issue: Architect command disappears from PATH after directory changes in zsh terminals.

Solution: Add zsh wrapper dotfiles that source original configs and re-apply PATH.

Solution: Install precmd/chpwd guard to keep the Architect entry after PATH resets.
@forketyfork forketyfork requested a review from Copilot January 27, 2026 15:04
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 331a09396e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a solution to keep the Architect bin directory on PATH in zsh shells by generating wrapper configuration files that preserve PATH after system-level resets (particularly from macOS's /etc/zprofile).

Changes:

  • Adds zsh wrapper generation for .zprofile and .zshrc that source user's original dotfiles and re-prepend Architect's bin directory
  • Implements precmd and chpwd hooks to maintain PATH entry after directory changes
  • Documents the zsh PATH preservation mechanism in the AI integration guide

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/shell.zig Implements zsh wrapper generation, ZDOTDIR manipulation, and PATH guards to maintain Architect's bin directory on PATH
docs/ai-integration.md Documents how the zsh PATH preservation works and where wrapper files are created

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Refs: PR comment 2732461993, 2732464145, 2732464175

Add wrapper .zshenv/.zlogin to source original startup files.

Simplify zsh wrapper path handling and rename ZDOTDIR default var.
@forketyfork forketyfork merged commit 4526494 into main Jan 27, 2026
4 checks passed
@forketyfork forketyfork deleted the fix/architect-path branch January 27, 2026 15:39
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.

2 participants