Fallback: search common locations banner
maslennikov-ig maslennikov-ig

Fallback: search common locations

Development community intermediate

Description

for p in "$HOME/code/claude-code-orchestrator-kit" "$HOME/projects/claude-code-orchestrator-kit"; do [ -d "$p/.claude/templates" ] && KIT_PATH="$p" && break done

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for maslennikov-ig/claude-code-orchestrator-kit, shared by 10 entries in this directory. It describes the repository, not this entry specifically.


description: Connect any project to Gastown multi-agent orchestration argument-hint: [rig-name]

Connect the current project to Gastown for multi-agent AI orchestration. Run this from the project directory.

**Important**: Ensure `gt` and `bd` are in PATH before running commands.

**Kit location**: Determine the kit path by finding where this file lives:

KIT_PATH=$(dirname "$(dirname "$(dirname "$(readlink -f "$0" 2>/dev/null || echo ".")")")")
# Fallback: search common locations
for p in "$HOME/code/claude-code-orchestrator-kit" "$HOME/projects/claude-code-orchestrator-kit"; do
  [ -d "$p/.claude/templates" ] && KIT_PATH="$p" && break
done

Or set explicitly: `KIT_PATH="$HOME/code/claude-code-orchestrator-kit"`

**What you must do:**

1. Pre-flight checks

which gt && gt --version 2>&1 | head -1
which bd && bd --version 2>&1 | head -1
systemctl --user is-active gastown-daemon
git rev-parse --show-toplevel

All must succeed. If `gt`/`bd` not found — tell user to install them first. If daemon not active — `systemctl --user start gastown-daemon`.

2. Determine parameters

PROJECT_PATH=$(git rev-parse --show-toplevel)

Rig name: use `$ARGUMENTS` if provided, otherwise `basename "$PROJECT_PATH"`.

RIG=${ARGUMENTS:-$(basename "$PROJECT_PATH")}

Confirm with user: "Connecting project at `$PROJECT_PATH` as rig `$RIG`. Correct?"

3. Check if already connected

gt rig list 2>/dev/null

If `$RIG` already in the list — skip to step 7 (file copy). Tell user rig already exists.

4. Add rig to Gastown

cd ~/gt && gt rig add "$RIG" "$PROJECT_PATH"

This auto-provisions ~30 components: bare repo, clones, Dolt database, beads config, patrol molecules, agent beads, routes, settings.

If it fails, show error and stop.

5. Update daemon.json

Read `~/gt/mayor/daemon.json` and add the new rig to patrol arrays:

  • Add $RIG to patrols.witness.rigs[] (if not already present)
  • Add $RIG to patrols.refinery.rigs[] (if not already present)

Write the updated JSON back.

**Example** — if daemon.json has:

"witness": { "rigs": ["mc2"] }

Change to:

"witness": { "rigs": ["mc2", "newrig"] }

6. Restart daemon

echo '{"agents":{}}' > ~/gt/daemon/restart_state.json
systemctl --user restart gastown-daemon
sleep 5
gt daemon status

7. Run doctor

gt doctor --fix --rig "$RIG"

Report results. Warnings are OK for fresh rigs.

8. Beads initialization

Check if `.beads/` exists in the project:

ls "$PROJECT_PATH/.beads/config.yaml" 2>/dev/null

If NOT found — tell user they can run `/beads-init` to set up issue tracking. If found — skip, beads already initialized.

9. Copy Gastown slash commands

Copy these files from the orchestrator kit to the project's `.claude/commands/`:

DEST="$PROJECT_PATH/.claude/commands"
mkdir -p "$DEST"

Files to copy:

  • $KIT_PATH/.claude/commands/work.md$DEST/work.md