Skip to content

feat: Advisory hook for architect cd into builder worktrees #658

@waleedkadous

Description

@waleedkadous

When using the architect role, cd-ing into builder worktrees violates the operational rules (should use absolute paths / Read tool instead).

Consider adding an advisory (non-blocking) hook that warns the architect when they attempt to cd into .builders/. The hook should only fire for architect sessions, not builder sessions (builders are already inside worktrees).

Sketch:

# Only warn if we're NOT already in a builder worktree
if [[ "$PWD" != */.builders/* ]] && echo "$CLAUDE_COMMAND" | grep -q '\.builders/'; then
  echo "⚠ Architect: use absolute paths with Read instead of cd-ing into builder worktrees"
fi
exit 0  # advisory, never blocks

Context: came up during ci-channel development when the architect cd'd into a builder worktree to check a diff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions