Files
donlucasandClaude Opus 5 c9a019eb88 The name finally reaches the parts that were left alone
xscapes was decided on 09-01 with the repo, and the rename stopped at the
module path because going further meant touching live state: the env vars,
~/.config/asciiscapes/, and the marker on twelve hooks already installed in
his settings.json. This finishes it.

The marker was the whole risk. It is uninstall's only handle on its own
work, so changing the constant alone would have left twelve hooks that
nothing could see -- uninstall reporting zero, install adding a second copy
beside each, and a person editing JSON by hand to remove a tool that said
it had gone. install.go now WRITES `# xscapes:v1` and RECOGNISES
`# asciiscapes:v1`, and the existing stale-path branch migrates them. The
plan says "migrated from asciiscapes:v1" rather than "re-pointed", because
the two are different amounts of risk and the reviewer should be told which.
Proven by emptying legacyMarkers: the tests go red, and the failure shows
the orphan exactly -- Stop ends up with two hooks, one of them invisible.

Settings were renamed with a fallback rather than a hard cut, because a
rename is the cheapest way there is to build a knob nothing reads: the
value looks applied, the picture does not change, and the measurement is
wrong with nothing saying so. These are variables typed by hand while
judging a frame, so muscle memory is the expected input. internal/envx
keeps ASCIISCAPES_* working and names it on stderr once, from the top of
main -- the last moment certainly safe to write, since -live, claude and
inside take the alternate screen shortly after. hook and statusline are
exempt: one runs on every tool call into /dev/null, the other owns a line
of the agent's chrome. Writing the test for the warning found it firing on
a variable exported empty, which is inert, and a warning that cries wolf on
a clean environment is one nobody reads.

Left saying asciiscapes on purpose, and these are not leftovers: the
legacyMarkers entry, envx's legacyPrefix, the verbatim quotes in
_FEEDBACK.md, origin-chat.md's decision pass, and the superseded bullets in
RESUME.md. Rewriting a record of what was true then would only make it lie.

Live state moved with it: ~/.config/asciiscapes -> ~/.config/xscapes (53
spools, 17 backups), and the twelve hooks migrated with a diff of exactly
24 lines, all marker, nothing else touched. Two spools written into the old
path by the still-old binary during the swap were merged back in timestamp
order rather than appended.

Also drops a duplicated `xscapes tune` line in the help, which predates
this and was only visible once the name was read twice.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1u8vp8AgrTuaCCcLv6HVi
2026-09-03 12:17:14 -07:00

58 lines
1.9 KiB
Go

package main
import (
"fmt"
"strings"
"github.com/donlucasx/xscapes/internal/canvas"
"github.com/donlucasx/xscapes/internal/companion"
"github.com/donlucasx/xscapes/internal/scape"
)
// busyPage sweeps the activity level so the range can be judged. The question
// is not whether each level looks nice on its own -- it is whether idle and
// flat-out are distinguishable at a glance, which only a sweep can answer.
func busyPage(seed int64) string {
levels := []struct {
lv float64
name string
note string
}{
{0.00, "idle", "waiting on you &mdash; the sea should settle, not stop"},
{0.25, "reading", "a tool or two; barely stirred"},
{0.50, "editing", "steady work"},
{0.75, "building", "several tools in flight"},
{1.00, "flat out", "subagents, tests, the lot"},
}
cat := companion.NewCat()
_, chh := cat.Size()
var b strings.Builder
b.WriteString(`<style>.win{border:1px solid #2a2a32;border-radius:6px;overflow:hidden}` +
`.lv{font-size:10px;color:#55555f;letter-spacing:.1em;margin-bottom:5px}</style>`)
b.WriteString(`<h1>xscapes &mdash; how hard is it working?</h1>`)
for _, l := range levels {
st := companion.Working
if l.lv == 0 {
st = companion.Resting
}
// Two moments of each level, because a single frame cannot show speed.
var row strings.Builder
for _, t := range []float64{3.0, 3.5} {
c := canvas.New(64, 18, canvas.AlphaFar, canvas.AlphaMid, canvas.AlphaNear)
scape.NewShore(seed, false).Update(c, t, scape.Activity{
Working: l.lv > 0, Level: l.lv, ContextUsed: 0.3,
})
cat.Draw(c.Near(), 4, c.H-2-chh, t, st)
fmt.Fprintf(&row, `<div class="win">%s</div>`, c.HTMLFragment(12))
}
fmt.Fprintf(&b, `<div class="card"><div class="meta"><div class="nm">%s</div>`+
`<div class="rg">Level %.2f</div><div class="nt">%s</div></div>`+
`<div style="display:flex;gap:12px">%s</div></div>`,
l.name, l.lv, l.note, row.String())
}
return canvas.HTMLPage("xscapes — activity level", b.String())
}