diff --git a/.github/workflows/install-matrix.yml b/.github/workflows/install-matrix.yml new file mode 100644 index 000000000..f1680a455 --- /dev/null +++ b/.github/workflows/install-matrix.yml @@ -0,0 +1,49 @@ +name: Install matrix + +# Cross-platform install-surface checks (plan: install/packaging U11). The +# release pipeline (release.yml) owns the binary build; this matrix verifies +# the install.sh dry-run + CLI lifecycle on the container-runnable tier-1 +# targets and documents the manual checklist for macOS/Arch acceptance A–C. + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + install-sh-dry-run: + name: install.sh dry-run (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, macos-14] + steps: + - uses: actions/checkout@v6 + - name: POSIX syntax check + run: sh -n install.sh + - name: Dry-run (no download) + run: HIVE_INSTALL_DRY_RUN=1 sh install.sh + - name: Dry-run records no channel / installs no binary + run: | + HOME="$(mktemp -d)" + export HOME + HIVE_INSTALL_DRY_RUN=1 HIVE_BIN_DIR="$HOME/bin" sh install.sh + test ! -e "$HOME/.config/hive/install-channel" + test ! -e "$HOME/bin/hive" + + acceptance: + name: acceptance (uninstall preserves work + version + hv) + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v6 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + - name: Run install/uninstall acceptance + run: bundle exec ruby -Ilib -Itest test/integration/install_acceptance_test.rb diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..a60d85e78 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,121 @@ +name: Release + +# Build the self-contained, vendored-Ruby hive binary for each tier-1 target +# and publish it to GitHub Releases with checksums + a signature. This is the +# single source of truth every distribution channel (brew tap, AUR hive-bin, +# bash one-liner) consumes. Plan: install/packaging U1. + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + version-check: + name: "version: tag == lib/hive.rb VERSION" + runs-on: ubuntu-latest + outputs: + version: ${{ steps.read.outputs.version }} + steps: + - uses: actions/checkout@v6 + - id: read + run: | + VERSION="$(ruby -e 'require_relative "lib/hive"; print Hive::VERSION')" + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + TAG="${GITHUB_REF_NAME#v}" + if [ "$TAG" != "$VERSION" ]; then + echo "tag 'v$TAG' does not match Hive::VERSION '$VERSION'" >&2 + exit 1 + fi + echo "release version $VERSION matches tag $GITHUB_REF_NAME" + + build: + name: "build ${{ matrix.target }}" + needs: version-check + runs-on: ${{ matrix.runs_on }} + strategy: + fail-fast: false + matrix: + include: + - target: hive-macos-arm64 + runs_on: macos-14 + os: macos + arch: arm64 + - target: hive-linux-x86_64-glibc + runs_on: ubuntu-22.04 + os: linux + arch: x86_64 + steps: + - uses: actions/checkout@v6 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Install tebako (U1 packaging tool) + run: gem install tebako -v 0.15.9 --no-document + + - name: Build vendored binary (Tebako) + run: ./packaging/build.sh "${{ matrix.target }}" + env: + TEBAKO_TARGET: ${{ matrix.target }} + + - name: Sanity check (--version, no system Ruby) + run: | + set -euo pipefail + ./dist/"${{ matrix.target }}"/hive --version + ./dist/"${{ matrix.target }}"/hive --version | grep -qF "${{ needs.version-check.outputs.version }}" + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target }} + path: dist/${{ matrix.target }}/ + + release: + name: "checksums + sign + publish" + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/download-artifact@v4 + with: + path: dist/ + + - name: Assemble tarballs + SHA256SUMS + run: ./packaging/assemble.sh + + - name: Pin release checksums into packaging manifests + run: ./packaging/pin-checksums.sh + + - name: Sign SHA256SUMS + env: + RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }} + run: | + set -euo pipefail + if [ -n "${RELEASE_SIGNING_KEY:-}" ]; then + printf '%s' "$RELEASE_SIGNING_KEY" > /tmp/signing.key + openssl dgst -sha256 -sign /tmp/signing.key -out SHA256SUMS.sig SHA256SUMS + rm -f /tmp/signing.key + else + echo "::warning::RELEASE_SIGNING_KEY not set; shipping without a signature" + fi + + - name: Publish GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: | + dist/*.tar.gz + dist/SHA256SUMS + dist/SHA256SUMS.sig + install.sh + packaging/homebrew/hive.rb + packaging/aur/PKGBUILD + packaging/aur/.SRCINFO + fail_on_unmatched_files: true + generate_release_notes: true diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 000000000..280d87763 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,53 @@ +# Install Hive via an agent + +This is the canonical copy-paste prompt that installs Hive through a coding +agent (Claude Code, Codex, Pi, or any agent that can run shell commands). The +prompt is designed to run **unmodified** across agents: it detects the OS, +picks the right distribution channel, verifies the install, and offers `hive +init` — and it halts before clobbering anything. + +Copy the block below into your agent and let it drive. + +````text +Install Hive, the folder-as-agent multi-agent pipeline, from its official +distribution channels. Pick the install channel based on this machine's OS and +package managers, verify the result, and offer to run `hive init`. + +CHANNEL SELECTION (in order): +- macOS with Homebrew: `brew tap ivankuznetsov/homebrew-hive && brew install hive` +- Arch Linux with an AUR helper: `yay -S hive-bin` +- Linux with neither: `curl -fsSL https://github.com/ivankuznetsov/hive/releases/latest/download/install.sh | bash` + +STOP CONDITIONS — halt and report instead of proceeding if any of these hold: +- A previous hive install already exists. Run `command -v hive` and, if found, + stop and ask whether to reuse it, update it, or continue with a fresh install. +- `claude` is missing or `claude --version` is older than 2.1.118. Stop and + report the missing prerequisite (planning/brainstorm stages need it). +- `codex` is missing or `codex --version` is older than 0.125.0. Stop and + report that the default execute agent will not work until Codex is installed. +- `gh auth status` fails. Stop and ask the user to authenticate GitHub CLI. +- The chosen bin directory (`~/.local/bin` for the bash one-liner) is not on + PATH. Stop and ask which PATH directory should receive the binary. +- A foreign `hive` binary (e.g. Apache Hive) already owns the name on PATH and + is not the hive binary we just installed. Use the `hv` alias instead and + report that the install landed as `hv`. + +VERIFY (after install): +- `hive --version` must print a semver (e.g. 0.1.0). +- `command -v hive` (or `command -v hv`) must resolve to the installed binary. +- Report the installed version and the `command -v` path. + +AFTER VERIFYING: +- Offer to run `hive init .` inside a project (it registers the daemon service + and writes `~/.config/hive/config.yml`). + +SKILLS (only if the host agent exposes a real marketplace command, e.g. +`claude marketplace add` / `codex plugin marketplace add` / a Pi equivalent): +- Install the separate hive-skills package from its marketplace repo so hive's + slash-commands/skills are available. Do NOT write skills into + ~/.claude / ~/.codex / ~/.pi by hand — that is the marketplace's job. +- If no marketplace command exists, skip this step and say so. +```` + +See [docs/install-prompt.md](docs/install-prompt.md) for the rationale and the +per-agent test matrix. diff --git a/README.md b/README.md index 1fd7a0ff1..f46519ef1 100644 --- a/README.md +++ b/README.md @@ -48,30 +48,9 @@ Hive's other primary surface is a coding agent — Claude Code, Codex, Gemini, P ### Install Hive via an agent -Paste this into Claude Code, Codex, or another agent CLI when you want it to install Hive for you. The block has explicit stop-conditions so the agent halts before clobbering existing state. +Paste this into Claude Code, Codex, or another agent CLI when you want it to install Hive for you. The block has explicit stop-conditions so the agent halts before clobbering existing state, and it detects your OS to pick the right channel (Homebrew → AUR → bash one-liner). -```text -Install Hive from the canonical GitHub source into ~/Dev/hive and put the hive binary on PATH. - -Before changing anything: -- If ~/Dev/hive already exists, stop and ask whether to reuse it, pull it, or choose another directory. -- If `claude` is missing or `claude --version` is older than 2.1.118, stop and report the missing prerequisite. -- If `codex` is missing or `codex --version` is older than 0.125.0, stop and report that the default execute agent will not work until Codex is installed. -- If `gh auth status` fails, stop and ask the user to authenticate GitHub CLI. -- If ~/.local/bin is not on PATH, stop and ask which PATH directory should receive the symlink, then substitute that directory for ~/.local/bin in the link command below. -- If /hive already exists (file, symlink, or another checkout's binary), stop and ask whether to overwrite it or pick a different bin directory before running the link command below. - -Run these commands in order (replace with the chosen PATH directory; default is ~/.local/bin): - -git clone https://github.com/ivankuznetsov/hive ~/Dev/hive -cd ~/Dev/hive -bundle install -mkdir -p -ln -sf ~/Dev/hive/bin/hive /hive -hive --version - -Report the installed version and the path returned by `command -v hive`. -``` +The canonical, always-current prompt lives in [INSTALL.md](INSTALL.md) — copy it from there so you always get the latest channel logic. In short it does: OS/channel detection → install → `hive --version` + `command -v hive` verification → offer `hive init`, and installs the skills package only when the host agent exposes a real marketplace command. ### Operate Hive day-to-day via an agent @@ -86,17 +65,18 @@ The `--json` envelope is stable across versions (schemas live under [schemas/](s ## Install -Requires Ruby 3.4, git ≥ 2.40, an authenticated `claude` ≥ 2.1.118, `codex` ≥ 0.125.0 for the default execute agent, and an authenticated `gh`. See [docs/getting-started.md#prerequisites](docs/getting-started.md#prerequisites) for the full prerequisite list and the first-run walkthrough. +Hive ships as a **self-contained binary** (vendored Ruby — no system Ruby required) through four distribution channels, all sourced from tagged GitHub Releases: -```bash -git clone https://github.com/ivankuznetsov/hive ~/Dev/hive -cd ~/Dev/hive -bundle install -mkdir -p ~/.local/bin -ln -sf ~/Dev/hive/bin/hive ~/.local/bin/hive -``` +| Channel | Command | +|---|---| +| Homebrew tap (macOS arm64) | `brew tap ivankuznetsov/homebrew-hive && brew install hive` | +| AUR (Arch) | `yay -S hive-bin` | +| Bash one-liner (any tier-1 Linux / macOS) | `curl -fsSL https://github.com/ivankuznetsov/hive/releases/latest/download/install.sh \| bash` | +| Agent-driven (Claude Code / Codex / Pi) | paste the prompt from [INSTALL.md](INSTALL.md) | + +Tier-1 targets are macOS arm64 and Ubuntu 22.04+ / Arch x86_64. Runtime prerequisites (`git`, `bash`, `claude` ≥ 2.1.118, `codex` ≥ 0.125.0, `gh` authenticated, `jq`) are detected and reported with install hints by `hive doctor` and the installer — nothing is auto-installed. See [docs/getting-started.md#prerequisites](docs/getting-started.md#prerequisites). -If `~/.local/bin` is not on `PATH`, put the symlink in a directory that is. The `-sf` form overwrites an existing `hive` at the target path; run `command -v hive` first if you already have one installed and don't want to clobber it. Verify the install with `hive --version` and `hive doctor`. +Verify the install with `hive --version` and `hive doctor`. If a foreign `hive` (e.g. Apache Hive) already owns the name on PATH, use the `hv` alias the installers provide. Remove with `hive uninstall` (or the package manager's uninstaller); `hive update` shells out to the native updater. ## Power-User / Scripting CLI @@ -109,6 +89,7 @@ The TUI is the recommended human interface and an agent-driven CLI is the recomm | Daemon | `hive daemon enable/start/status/tail/stop/disable` | Run the per-project daemon that polls `hive status --json` and auto-dispatches workflow verbs for tasks that can advance. Opt-in; read [wiki/operating.md](wiki/operating.md) before going live. See [docs/cli.md#daemon](docs/cli.md#daemon). | | Diagnostics | `hive status`, `hive doctor`, `hive rebase-status`, `hive markers clear`, `hive metrics rollback-rate` | Inspect task state, validate configured stage/reviewer skills, check whether the next run would auto-rebase, clear a recovery marker by name, or report fix-agent rollback rate. See [docs/cli.md#diagnostics](docs/cli.md#diagnostics). | | Registry | `hive init`, `hive forget`, `hive prune`, `hive migrate`, `hive tree` | Attach Hive to a project, remove projects from the global registry, prune missing paths, rename old stage folders, or print the Thor command tree. See [docs/cli.md#lower-level-surface](docs/cli.md#lower-level-surface). | +| Lifecycle | `hive update`, `hive uninstall` | Update via the native package manager (brew / AUR / bash), or remove hive cleanly — preserving completed work. See [docs/cli.md#lower-level-surface](docs/cli.md#lower-level-surface). | Full per-command reference, every flag, every envelope field, and every exit code lives in [docs/cli.md](docs/cli.md). diff --git a/Rakefile b/Rakefile index 9f5959cd8..e935b0c74 100644 --- a/Rakefile +++ b/Rakefile @@ -25,6 +25,23 @@ Rake::TestTask.new(:smoke) do |t| t.description = "Run live-claude smoke tests (real subprocess; ~$0.25/run)" end +namespace :release do + desc "Fail unless the current git tag matches Hive::VERSION" + task :version_check do + require "hive" + tag = `git describe --tags --exact-match 2>/dev/null`.strip + abort "not on a tag" if tag.empty? + abort "tag #{tag} does not match Hive::VERSION #{Hive::VERSION}" unless tag == "v#{Hive::VERSION}" + puts "version #{Hive::VERSION} matches tag #{tag}" + end + + desc "Verify SHA256SUMS against the packed dist/ tarballs" + task :checksums do + sh "packaging/assemble.sh" + sh "cd dist && sha256sum -c SHA256SUMS" + end +end + namespace :e2e do Rake::TestTask.new(:lib_test) do |t| t.libs << "test" diff --git a/bin/hive b/bin/hive index bfd53884b..2e9097707 100755 --- a/bin/hive +++ b/bin/hive @@ -2,36 +2,6 @@ $LOAD_PATH.unshift(File.expand_path("../lib", __dir__)) -require "hive" -require "hive/cli" +require "hive/cli_entry" -if ARGV == [ "--version" ] || ARGV == [ "-v" ] - puts Hive::VERSION - exit 0 -end - -# Thor only honours `--help` *before* the subcommand name (`hive help approve`); -# `hive approve --help` would be consumed as the TARGET positional. Intercept -# the help flag before Thor dispatch so the convention agents try first works. -def rewrite_help_flag!(argv) - return if argv.empty? - - cmd_idx = argv.index { |a| !a.start_with?("-") } - return unless cmd_idx - - help_idx = argv[(cmd_idx + 1)..]&.index { |a| a == "--help" || a == "-h" } - return unless help_idx - - cmd = argv.delete_at(cmd_idx) - argv.delete_at(cmd_idx + help_idx) - argv.unshift("help", cmd) -end - -rewrite_help_flag!(ARGV) - -begin - Hive::CLI.start(ARGV) -rescue Hive::Error => e - warn "hive: #{e.message}" - exit(e.respond_to?(:exit_code) ? e.exit_code : 1) -end +Hive::CliEntry.run!(ARGV) diff --git a/bin/hv b/bin/hv new file mode 100755 index 000000000..cdde33593 --- /dev/null +++ b/bin/hv @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby + +# Conflict-safe alias for `hive`. Used when a foreign `hive` binary (e.g. +# Apache Hive) already owns the name on PATH; the installer installs the +# command as `hv` instead and records the fallback. `hv` dispatches the +# exact same Thor CLI. + +$LOAD_PATH.unshift(File.expand_path("../lib", __dir__)) + +require "hive/cli_entry" + +Hive::CliEntry.run!(ARGV) diff --git a/docs/acceptance.md b/docs/acceptance.md new file mode 100644 index 000000000..c479cf13c --- /dev/null +++ b/docs/acceptance.md @@ -0,0 +1,43 @@ +# Acceptance scenarios (A–D) + +The four acceptance scenarios from the install/packaging brainstorm, with their +exact observable outcomes. Container-runnable scenarios (D, and B on a Linux +box) are encoded in `test/integration/install_acceptance_test.rb` and the +`.github/workflows/install-matrix.yml` CI job; A and C require macOS/Arch +hardware and are verified via the manual checklists below before a release. + +## A — macOS arm64 via Homebrew (manual) + +1. On a clean macOS arm64 machine with no Ruby installed: + `brew tap ivankuznetsov/homebrew-hive && brew install hive` +2. `hive --version` prints `0.1.0` with no system Ruby. +3. `hive init .` in a project prompts to enable+start the daemon service and + writes `~/Library/LaunchAgents/local.hive-daemon.plist`. +4. `brew audit --strict` (on the formula) is clean. + +## B — Arch via AUR (container-runnable) + +1. On Arch x86_64: `yay -S hive-bin`. +2. `hive --version` prints `0.1.0`. +3. `hive init` registers `~/.config/systemd/user/hive-daemon.service`. +4. `yay -Syu hive-bin` upgrades in place. +5. `namcap` on the package is clean. + +## C — prompt installer (manual) + +1. Paste the prompt from `INSTALL.md` into at least two of Claude Code / Codex / + Pi on a tier-1 target. +2. The agent picks the right channel (brew → AUR → bash) and halts on any + stop-condition (existing install, missing/old `claude`/`codex`, failing + `gh auth`). +3. `hive --version` and `command -v hive` both succeed; the agent offers + `hive init`. + +## D — clean uninstall preserves completed work (automated) + +Encoded in `test/integration/install_acceptance_test.rb`: + +1. `hive init` creates `.hive-state/` and registers the project. +2. `hive uninstall --purge` removes the binary, daemon registration, global + config, and in-flight `.hive-state/` content, **but preserves + `.hive-state/stages/8-done/`**. diff --git a/docs/architecture.md b/docs/architecture.md index b7de59227..d05f5a121 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -22,6 +22,11 @@ Hive is a Ruby CLI around filesystem state, agent subprocesses, and git worktree `-- config.yml # global registry ``` +> The global registry now lives on the XDG config path +> (`~/.config/hive/config.yml`), not inside the source checkout above. The +> checkout tree is shown for reference — a packaged install has no source +> checkout at all. + The project checkout holds code. `.hive-state/` holds durable Hive state on the separate `hive/state` branch. The feature worktree holds code changes for one task branch. ## Storage Layout @@ -76,7 +81,9 @@ hive doctor --json ## Config Schema -Global registry lives at `~/Dev/hive/config.yml`: +Global registry lives at `~/.config/hive/config.yml` (or `$HIVE_HOME/config.yml` +if `HIVE_HOME` is set; a pre-XDG `~/Dev/hive/config.yml` is migrated on first +run): ```yaml registered_projects: diff --git a/docs/cli.md b/docs/cli.md index 082ad50fc..e2a616641 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -43,6 +43,8 @@ hive reject-finding --severity nit | `hive markers clear FOLDER --name NAME` | Clear a recovery marker through the allowlisted path. | | `hive rebase-status TARGET` | Inspect whether the next run would auto-rebase. | | `hive migrate [PROJECT_PATH]` | Rename in-flight task folders from older stage layouts. | +| `hive update` | Update via the native package manager (brew / AUR / bash one-liner). | +| `hive uninstall [--purge]` | Remove hive (binary, daemon service, config, project state; preserves completed work). | | `hive tree` | Print the Thor command tree. | Use these when building scripts, recovering a task, or checking idempotency. @@ -71,7 +73,7 @@ Read [wiki/operating.md](../wiki/operating.md) before running it live. | Command | Use it for | |---|---| -| `hive doctor` | Verify configured stage and reviewer skills. | +| `hive doctor` | Verify configured stage/reviewer skills **and** required runtime tools (git, bash, claude, gh, jq). | | `hive doctor --json` | Emit the same checks in a machine-readable envelope. | | `hive version` or `hive --version` | Print the Hive version. | | `hive forget NAME` | Remove one project from the global registry. | diff --git a/docs/getting-started.md b/docs/getting-started.md index 162eb7132..1d130dd44 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -6,15 +6,22 @@ The example is xbookmark, a real Hive dogfood task that finished as [xbookmark P ## Prerequisites -You need Ruby 3.4, git >= 2.40, `claude` authenticated, `codex` installed for the default execute agent, `gh` authenticated, and a git checkout you can modify. The commands below use `~/Dev/xbookmark`; substitute your own project path and project name when running against another repo. +Hive ships as a self-contained binary (no system Ruby needed). You need git ≥ 2.40, `claude` authenticated ≥ 2.1.118, `codex` installed ≥ 0.125.0 for the default execute agent, `gh` authenticated, and `jq`. `hive doctor` reports anything missing with install hints. The commands below use `~/Dev/xbookmark`; substitute your own project path and name. ## Step 1 - Install ```bash -git clone https://github.com/ivankuznetsov/hive ~/Dev/hive && cd ~/Dev/hive && bundle install && mkdir -p ~/.local/bin && ln -sf ~/Dev/hive/bin/hive ~/.local/bin/hive +# macOS (arm64) +brew tap ivankuznetsov/homebrew-hive && brew install hive + +# Arch +yay -S hive-bin + +# any tier-1 Linux / macOS +curl -fsSL https://github.com/ivankuznetsov/hive/releases/latest/download/install.sh | bash ``` -If `~/.local/bin` is not on your `PATH`, put the symlink in a directory that is before running the next step. The `-sf` form will overwrite an existing `hive` at the target path, so check `command -v hive` first if you already have one installed. +If a foreign `hive` (e.g. Apache Hive) already owns the name, use the `hv` alias the installers provide. ```bash hive --version @@ -27,7 +34,7 @@ cd ~/Dev/xbookmark hive init . ``` -`hive init` creates `.hive-state/` as a worktree of the orphan `hive/state` branch, registers the project in `~/Dev/hive/config.yml`, and scaffolds the stage folders. Read the storage details in [docs/architecture.md#storage-layout](architecture.md#storage-layout). +`hive init` creates `.hive-state/` as a worktree of the orphan `hive/state` branch, registers the project in `~/.config/hive/config.yml`, and scaffolds the stage folders. Read the storage details in [docs/architecture.md#storage-layout](architecture.md#storage-layout). ## Step 3 - Capture The Idea diff --git a/docs/install-prompt.md b/docs/install-prompt.md new file mode 100644 index 000000000..c8c2e55d6 --- /dev/null +++ b/docs/install-prompt.md @@ -0,0 +1,45 @@ +# The install prompt (rationale + test matrix) + +`INSTALL.md` is the canonical published prompt that installs Hive through a +coding agent. This page explains why it is shaped the way it is and how it is +verified across agents. + +## Why a prompt, not more code + +The four distribution channels (Homebrew tap, AUR `hive-bin`, bash one-liner, +and this prompt) all consume the same tagged GitHub Releases as their source of +truth. The prompt is the *agent-native* front door: it lets a user paste one +block into Claude Code / Codex / Pi and have the agent drive OS detection → +channel selection → install → verification → `hive init`, rather than the user +copy-pasting shell lines they have to understand. + +## Design constraints + +1. **Runs unmodified across agents.** The prompt must not assume a specific + agent's command surface beyond "can run shell commands". Everything the + agent needs is expressed as stop-conditions and shell commands. +2. **Halts before clobbering.** The stop-conditions (existing install, + missing/old `claude`/`codex`, failing `gh auth`, PATH/binary conflicts) are + carried over verbatim from the original README agent-install block so an + agent never silently overwrites state. +3. **Channel order is deterministic.** brew → AUR → bash, so a machine with + Homebrew never falls through to the one-liner, and Arch with `yay` prefers + the native package over the one-liner. +4. **Verification is mandatory.** `hive --version` + `command -v hive` must both + succeed before the agent reports success. +5. **Skills are marketplace-gated.** The skills package is only installed when + the host agent exposes a real marketplace command; the prompt never + hand-writes skills into `~/.claude` / `~/.codex` / `~/.pi`. + +## Test matrix + +| Agent | OS | Expected channel | Notes | +|-------|----|------------------|-------| +| Claude Code | macOS arm64 | brew | `claude marketplace add` available → skills installed | +| Claude Code | Ubuntu (no brew) | bash one-liner | no marketplace → skills skipped | +| Codex | Arch | AUR | `codex plugin marketplace add` | +| Pi | macOS arm64 | brew | Pi marketplace equivalent | + +Acceptance (plan U11 scenario C): the prompt executes unmodified on at least +two of the three agents and produces a verified `hive --version` plus an offer +to `hive init`. diff --git a/examples/launchd/hive-bot.plist b/examples/launchd/hive-bot.plist index 38bdb17ad..62a7c6814 100644 --- a/examples/launchd/hive-bot.plist +++ b/examples/launchd/hive-bot.plist @@ -7,14 +7,12 @@ work.hive.bot ProgramArguments - /Users/asterio/Dev/hive/bin/hive + /Users/YOU/.local/bin/hive bot start EnvironmentVariables - HIVE_HOME - /Users/asterio/Dev/hive HIVE_TELEGRAM_BOT_TOKEN replace-with-botfather-token diff --git a/examples/launchd/hive-daemon.plist b/examples/launchd/hive-daemon.plist index 4cec8d28b..9451d9ee7 100644 --- a/examples/launchd/hive-daemon.plist +++ b/examples/launchd/hive-daemon.plist @@ -2,6 +2,10 @@