Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
description: Cobra CLI patterns for cmd/thee
description: Cobra CLI patterns for cmd/muxon
globs: "harness/cmd/**/*.go"
alwaysApply: false
---

# thee CLI (`cmd/thee`)
# muxon CLI (`cmd/muxon`)

Specs: `docs/harness-architecture/cli.md`. Commands must match the documented tree (`run`, `chat`, `doctor`, `cost`, …).

## Thin command layer

`cmd/thee` does only:
`cmd/muxon` does only:

1. Define `cobra.Command` (help, flags, args validation).
2. Bind flags; load config via `internal/config`.
3. Call `internal/...` with `cmd.Context()` (or `context` from `PersistentPreRunE`).
4. Map errors to **stable exit codes** (headless `thee run` — see session-director doc).
4. Map errors to **stable exit codes** (headless `muxon run` — see session-director doc).

No business logic, no `net/http` calls, no tool execution in `cmd/`.

Expand Down
2 changes: 1 addition & 1 deletion .agents/rules/go-documentation.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ alwaysApply: false

- **Exported** types, funcs, consts, and vars: godoc comment immediately above the declaration.
- **Non-trivial unexported** APIs: same godoc style when behavior isn't obvious from the name.
- **Package** comment: full sentence adjacent to `package` (no blank line); `// Package foo ...` for libraries, `// Command thee ...` for `cmd/thee`.
- **Package** comment: full sentence adjacent to `package` (no blank line); `// Package foo ...` for libraries, `// Command muxon ...` for `cmd/muxon`.
- Doc style: complete sentence, starts with the name being documented, ends with a period.

```go
Expand Down
2 changes: 1 addition & 1 deletion .agents/rules/go-project-structure.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Package boundaries, interfaces, and thee internal layout
description: Package boundaries, interfaces, and muxon internal layout
globs: "harness/**/*.go"
alwaysApply: false
---
Expand Down
2 changes: 1 addition & 1 deletion .agents/rules/go-testing.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Go tests, testdata, and replay fixtures for thee-harness
description: Go tests, testdata, and replay fixtures for muxon
globs: "harness/**/*_test.go"
alwaysApply: false
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
description: thee-harness project context for agents (Go CLI, layout, specs)
description: muxon project context for agents (Go CLI, layout, specs)
alwaysApply: true
---

# thee-harness
# muxon

Open-source **Go** CLI (`thee`) and libraries. Specs live in `docs/harness-architecture/`; build order in `docs/harness-architecture/implementation-plan.md`.
Open-source **Go** CLI (`muxon`) and libraries. Specs live in `docs/harness-architecture/`; build order in `docs/harness-architecture/implementation-plan.md`.

## Layout (do not invent alternatives)

Monorepo: harness code lives under **`harness/`** (Go module). API is sibling `api/` (separate module).

- `harness/cmd/thee/` — Cobra wiring only: flags, args, exit codes, stdout/stderr/`--json`.
- `harness/cmd/muxon/` — Cobra wiring only: flags, args, exit codes, stdout/stderr/`--json`.
- `harness/internal/` — all behavior; packages mirror architecture (`director`, `contextengine`, `router`, `provider`, `tools`, …).
- **Rule:** `cmd/thee` calls `internal/director` (and siblings); no HTTP, tools, or session loop in `cmd/`.
- **Rule:** `cmd/muxon` calls `internal/director` (and siblings); no HTTP, tools, or session loop in `cmd/`.
- `harness/testdata/` — fixtures, trace replay, `httptest` recordings.
- Go **1.24+**, `gofmt`/`goimports`, `golangci-lint` in CI.

Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Vendored via [skills CLI](https://github.com/vercel-labs/skills). Cursor discovers these from `.agents/skills/` automatically.

**Precedence:** For thee-harness layout, godoc-only comments, and `internal/` boundaries, **`.agents/rules/` and this repo’s architecture docs win** if a skill suggests a different structure (e.g. `pkg/`, heavy layering).
**Precedence:** For muxon layout, godoc-only comments, and `internal/` boundaries, **`.agents/rules/` and this repo’s architecture docs win** if a skill suggests a different structure (e.g. `pkg/`, heavy layering).

## spf13/go-skills

| Skill | Use |
|-------|-----|
| `cobra-viper` | `cmd/thee` — Cobra wiring, config, CLI tests |
| `cobra-viper` | `cmd/muxon` — Cobra wiring, config, CLI tests |
| `go` | Idiomatic Go, flat packages, stdlib-first |
| `go-spec-reviewer` | Review design/spec before large implementations |
| `go-release` | GoReleaser, versioning, release hygiene |
Expand Down
4 changes: 2 additions & 2 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changesets

Every pull request carries a changeset: a small markdown file here that names the bump and says,
for someone using `thee`, what changed.
for someone using `muxon`, what changed.

```bash
pnpm changeset # pick thee, pick patch or minor, write the note
pnpm changeset # pick muxon, pick patch or minor, write the note
pnpm changeset --empty # docs-only or internal change
```

Expand Down
6 changes: 3 additions & 3 deletions .changeset/dotenv-provider-keys.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
"thee": minor
"muxon": minor
---

`thee` reads provider keys such as `OPENCODE_API_KEY` from the nearest `.env` at or above the current directory, up to the repo root. Variables already set in your shell win over the file. Copy `.env.example` to `.env` to get started.
`muxon` reads provider keys such as `OPENCODE_API_KEY` from the nearest `.env` at or above the current directory, up to the repo root. Variables already set in your shell win over the file. Copy `.env.example` to `.env` to get started.

**Upgrade:** a `.env` line that isn't `KEY=VALUE` (for example `name: value`) now stops every `thee` command with the file and line number. Fix or remove that line.
**Upgrade:** a `.env` line that isn't `KEY=VALUE` (for example `name: value`) now stops every `muxon` command with the file and line number. Fix or remove that line.
5 changes: 5 additions & 0 deletions .changeset/rename-to-muxon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"muxon": minor
---

Rename the project and CLI from thee to muxon (binary, module path, `MUXON_*` env vars, `.muxon/` config dir) and add the logo to the README.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copy to .env and fill in the keys you use. .env is gitignored.
# thee reads the nearest .env at or above the current directory, up to the
# muxon reads the nearest .env at or above the current directory, up to the
# repo root. Variables already set in your shell take precedence.

# OpenCode Go (task eval, /providers in the TUI)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
path=".changeset/dependabot-$NUMBER.md"
# the title is data: written through printf into the file body, never evaluated
if grep -qE '^(harness/go\.(mod|sum)|go\.work(\.sum)?)$' <<<"$changed"; then
content=$(printf -- '---\n"thee": patch\n---\n\nDependencies: %s.\n' "$TITLE" | base64 -w0)
content=$(printf -- '---\n"muxon": patch\n---\n\nDependencies: %s.\n' "$TITLE" | base64 -w0)
else
content=$(printf -- '---\n---\n' | base64 -w0)
fi
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ jobs:
cache-dependency-path: harness/go.sum
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y ripgrep
- run: go build -o thee ./cmd/thee
- run: go build -o muxon ./cmd/muxon
- name: DeepInfra basket
env:
DEEPINFRA_API_KEY: ${{ secrets.DEEPINFRA_API_KEY }}
run: |
./thee eval basket \
./muxon eval basket \
--matrix testdata/eval/matrix-ci.yaml \
--tasks 'testdata/eval/*.json' \
--trials 1 \
--concurrency 2 \
--budget-usd 5 \
--trust \
--out "$GITHUB_WORKSPACE/.thee/eval"
--out "$GITHUB_WORKSPACE/.muxon/eval"
- uses: actions/upload-artifact@v4
if: always()
with:
name: eval-runs
path: .thee/eval/runs
path: .muxon/eval/runs
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Release: on a version tag (v1.2.3), build the thee binaries with goreleaser (.goreleaser.yml),
# Release: on a version tag (v1.2.3), build the muxon binaries with goreleaser (.goreleaser.yml),
# attest them, and publish the GitHub release. The body is this version's CHANGELOG.md section.
name: release

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# `gh attestation verify thee_linux_amd64.tar.gz --owner adavila0703` proves an archive came
# `gh attestation verify muxon_linux_amd64.tar.gz --owner adavila0703` proves an archive came
# from this workflow in this repository
- uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Release flow (changesets): every merged PR carries a .changeset/*.md file. This workflow keeps a
# "Release" pull request open that bumps the version in package.json and writes CHANGELOG.md from
# them. Merging that PR runs `pnpm release:tag`, which pushes the vX.Y.Z tag; release.yml then builds
# the thee binaries with goreleaser and publishes the GitHub release.
# the muxon binaries with goreleaser and publishes the GitHub release.
#
# Needs secrets.RELEASE_TOKEN: a fine-grained personal access token with contents: write and
# pull-requests: write on this repo. Tags pushed with the default GITHUB_TOKEN never trigger other
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.DS_Store

# Harness runtime
.thee/
.muxon/
/dist/

# Env / secrets
Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# come from CHANGELOG.md (changesets), so goreleaser's own changelog stays off.
version: 2

project_name: thee
project_name: muxon

builds:
- id: thee
- id: muxon
dir: harness
main: ./cmd/thee
binary: thee
main: ./cmd/muxon
binary: muxon
env:
- CGO_ENABLED=0
flags:
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Agent instructions

This repository is the **thee** monorepo. The open-source harness is the Go module under `harness/` (`thee` CLI). Before implementing behavior, read the matching doc under `docs/harness-architecture/` and the [implementation plan](docs/harness-architecture/implementation-plan.md).
This repository is the **muxon** monorepo. The open-source harness is the Go module under `harness/` (`muxon` CLI). Before implementing behavior, read the matching doc under `docs/harness-architecture/` and the [implementation plan](docs/harness-architecture/implementation-plan.md).

## Go code

Follow project rules in `.agents/rules/`:

| Rule | Topic |
|------|--------|
| `thee-harness-context.mdc` | Layout, deps, specs (always on) |
| `muxon-context.mdc` | Layout, deps, specs (always on) |
| `go-format-and-naming.mdc` | Naming, packages, receivers |
| `go-errors-context-concurrency.mdc` | Errors, `context`, goroutines, slog |
| `go-documentation.mdc` | Godoc only — no inline narration |
| `go-project-structure.mdc` | `internal/` boundaries, interfaces |
| `go-cli-thee.mdc` | Thin `cmd/thee` + Cobra |
| `go-cli-muxon.mdc` | Thin `cmd/muxon` + Cobra |
| `go-testing.mdc` | Tests, `testdata`, replay |

## Agent skills (`.agents/skills/`)
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Run from repo root. Harness module lives in harness/.
HARNESS := ./harness
THEE := $(HARNESS)/cmd/thee
MUXON := $(HARNESS)/cmd/muxon

.PHONY: help build thee test vet fmt lint eval
.PHONY: help build muxon test vet fmt lint eval

help:
@echo "Targets (from repo root):"
@echo " make build - build harness/thee binary"
@echo " make thee - go run thee CLI (pass ARGS=...)"
@echo " make build - build harness/muxon binary"
@echo " make muxon - go run muxon CLI (pass ARGS=...)"
@echo " make test - go test ./harness/..."
@echo " make vet - go vet ./harness/..."
@echo " make fmt - gofmt harness/"
@echo " make lint - golangci-lint run (in harness/)"
@echo " make eval - OpenCode Go basket (from repo root)"

build:
go build -o harness/thee $(THEE)
go build -o harness/muxon $(MUXON)

thee:
go run $(THEE) $(ARGS)
muxon:
go run $(MUXON) $(ARGS)

test:
go test ./harness/...
Expand All @@ -33,4 +33,4 @@ lint:
cd harness && golangci-lint run

eval:
cd harness && go run ./cmd/thee eval basket --matrix testdata/eval/matrix-opencode.yaml --tasks 'testdata/eval/*.json' --trials 1 --concurrency 2 --budget-usd 5 --trust
cd harness && go run ./cmd/muxon eval basket --matrix testdata/eval/matrix-opencode.yaml --tasks 'testdata/eval/*.json' --trials 1 --concurrency 2 --budget-usd 5 --trust
6 changes: 3 additions & 3 deletions PROGRESS.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thee harness — implementation progress
muxon harness — implementation progress
======================================
Spec / build order: docs/harness-architecture/implementation-plan.md
Code module: harness/
Expand All @@ -11,11 +11,11 @@ Milestone M0: PASS
Milestone M1: pending (4.10 skipped — no API key)
Milestone A: PASS
Milestone B: PASS (scripted TUI fixture reaches done)
Milestone C: PASS (local basket files, results.jsonl, thee eval report). Live model matrix not run.
Milestone C: PASS (local basket files, results.jsonl, muxon eval report). Live model matrix not run.
Milestone D: PASS as stubs (goreleaser config, auth, export, gc, completion, serve). No tag published.

Monorepo layout: DONE
Module path: github.com/PLACEHOLDER/thee/harness (replace PLACEHOLDER before publish)
Module path: github.com/PLACEHOLDER/muxon/harness (replace PLACEHOLDER before publish)


Parts (plan order)
Expand Down
Loading
Loading