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
22 changes: 8 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
with:
go-version-file: go.mod
cache: true
- name: Check Go formatting and production size
run: |
files=$(find . -type f -name '*.go' ! -path './.git/*' ! -path './.worktrees/*' | sort)
test -z "$(printf '%s\n' "$files" | xargs gofmt -l)"
production=$(printf '%s\n' "$files" | awk '!/_test\.go$/')
lines=$(printf '%s\n' "$production" | xargs wc -l | awk 'END { print $1 }')
echo "production Go lines: $lines"
test "$lines" -le 1000
- run: go test ./...
- run: go vet ./...
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /tmp/threadbear_darwin_arm64 ./cmd/threadbear
Expand All @@ -34,17 +42,3 @@ jobs:
for path in / /install /install.sh; do
curl --fail --silent --show-error "http://127.0.0.1:8000$path" >/dev/null
done
- name: Lint rendered plist fixture
run: |
sed \
-e 's#{{xml .Label}}#org.litman.threadbear#g' \
-e 's#{{xml .BinaryPath}}#/tmp/threadbear#g' \
-e 's#{{.StartInterval}}#300#g' \
-e 's#{{xml .Home}}#/tmp/threadbear-home#g' \
-e 's#{{xml .CodexHome}}#/tmp/threadbear-home/.codex#g' \
-e 's#{{xml .Path}}#/usr/bin:/bin#g' \
-e 's#{{xml .LCAll}}#C#g' \
-e 's#{{xml .StdoutPath}}#/tmp/threadbear.stdout.log#g' \
-e 's#{{xml .StderrPath}}#/tmp/threadbear.stderr.log#g' \
assets/org.litman.threadbear.plist.tmpl > /tmp/org.litman.threadbear.plist
plutil -lint /tmp/org.litman.threadbear.plist
4 changes: 2 additions & 2 deletions .github/workflows/release-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
echo "- Release: \`$RELEASE_TAG\`"
echo "- Result: \`$SMOKE_OUTCOME\`"
echo "- Runner architecture: \`$(uname -m)\`"
echo "- Proved: live release manifest, checksum, candidate self-test, fixture control-task validation, binary install, LaunchAgent load, status, and uninstall cleanup."
echo "- Not proved: real Codex auth, real App Server title effects, Luna behavior, rendered Desktop titles, or architectures other than this runner."
echo "- Proved: live release manifest, checksum, candidate self-test, binary install, native PreToolUse/PostToolUse title finalization against an unarchived task and settled rollout, committed state, status, inventory convergence, and uninstall cleanup."
echo "- Not proved: real Codex auth, rendered Desktop titles, Luna behavior, or architectures other than this runner."
echo "- Deployment timing: a Pages/CDN lag can make the live bootstrap older than the release commit; that red result still requires operator investigation."
echo "- A red result marks the published release for operator action; this workflow does not delete, demote, or retry a release."
} >> "$GITHUB_STEP_SUMMARY"
23 changes: 9 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ jobs:
with:
go-version-file: go.mod
cache: true
- name: Check Go formatting and production size
run: |
files=$(find . -type f -name '*.go' ! -path './.git/*' ! -path './.worktrees/*' | sort)
test -z "$(printf '%s\n' "$files" | xargs gofmt -l)"
production=$(printf '%s\n' "$files" | awk '!/_test\.go$/')
lines=$(printf '%s\n' "$production" | xargs wc -l | awk 'END { print $1 }')
echo "production Go lines: $lines"
test "$lines" -le 1000
- name: Validate release tag
id: release_tag
run: |
Expand Down Expand Up @@ -61,20 +69,7 @@ jobs:
- run: go vet ./...
- run: sh -n install.sh
- run: if [ -f site/install.sh ]; then cmp install.sh site/install.sh; fi
- name: Lint rendered plist fixture
run: |
sed \
-e 's#{{xml .Label}}#org.litman.threadbear#g' \
-e 's#{{xml .BinaryPath}}#/tmp/threadbear#g' \
-e 's#{{.StartInterval}}#300#g' \
-e 's#{{xml .Home}}#/tmp/threadbear-home#g' \
-e 's#{{xml .CodexHome}}#/tmp/threadbear-home/.codex#g' \
-e 's#{{xml .Path}}#/usr/bin:/bin#g' \
-e 's#{{xml .LCAll}}#C#g' \
-e 's#{{xml .StdoutPath}}#/tmp/threadbear.stdout.log#g' \
-e 's#{{xml .StderrPath}}#/tmp/threadbear.stderr.log#g' \
assets/org.litman.threadbear.plist.tmpl > /tmp/org.litman.threadbear.plist
plutil -lint /tmp/org.litman.threadbear.plist
- run: cmp INSTALL.md site/install
- name: Build Darwin release binaries
run: |
mkdir -p dist
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## Unreleased

### Changed

- Replaced the v2 heartbeat, retained control task, title queue, and LaunchAgent with two native current-task title calls per ordinary turn, expanded and verified by two deterministic hooks.
- Made installation and v2 title migration foreground, consented, rerunnable flows with fresh-task and rendered Desktop verification.

### Removed

- Removed background title processing, runtime Luna classification, Stop repair, durable title plans, and App Server title writes.

## v2.0.0 - 2026-07-31

### Changed
Expand Down
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

@docs/README.md

ThreadBear is a playful, token-conscious Codex title manager for macOS: one Go binary and one LaunchAgent observe Codex tasks, decide seven statuses, and safely update visible Desktop titles.
ThreadBear is a playful, token-conscious Codex title manager for macOS: one small on-demand Go binary and two native title hooks keep visible Desktop titles current without a daemon.

- Current work item: BEAR-100. The evergreen contract is `README.md` plus `docs/architecture.md`; dated files in `docs/plans/` are historical evidence, not current architecture.
- Current work item: BEAR-102. The evergreen contract is `README.md` plus `docs/architecture.md`; dated files in `docs/plans/` are historical evidence, not current architecture.
- Private eval corpus: `ericlitman/threadbear-eval` (real user messages — must never enter this public tree).
- Voice: playful, bear-themed, never at the expense of operational clarity.
- Keep the complete production executable surface below 2,000 source lines and prefer below 1,000. Do not compress code to game the count.
- Control-task adoption is explicit through `threadbear install --control-task-id`; installation never creates a persistent conversation.
- CI rejects more than 1,000 physical lines of production Go; stay materially below that without compressing code to game the count.
- Do not add a scheduler, retained control task, pending-title queue, detached title writer, or background classifier.
- Changelog: every PR with user-visible changes must append a concise entry under `CHANGELOG.md`'s `Unreleased` section. Release preparation renames that section to `vN.N.N - YYYY-MM-DD` and adds a fresh `Unreleased` section; the release workflow rejects stable tags without the matching version section.
Loading
Loading