Initial public release

Luxe 0.1.0: a coding agent harness for the terminal. See README.md to get started and CHANGELOG.md for releases.
This commit is contained in:
Evan Whittaker
2026-10-17 12:08:30 -05:00
commit 09a7de2520
1730 changed files with 412952 additions and 0 deletions

31
web/demo-scripts/demo-skills.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Two project skills for the demos that show the `@` picker's Skills tab.
#
# Run as a `--seed`, so they're part of the project's history rather than a change the dock counts.
set -euo pipefail
mkdir -p .luxe/skills/test-first .luxe/skills/release-notes
cat >.luxe/skills/test-first/SKILL.md <<'MD'
---
name: test-first
description: Fixing a reported bug. Write the failing test before touching the code, then make it pass.
---
1. Reproduce the report as a test in `test/`, and run it with the `test` tool. It must fail, for
the reason the report gives. A test that passes before the fix proves nothing.
2. Make the smallest change that turns it green. Leave neighboring behavior alone.
3. Run the whole suite with the `test` tool.
4. Say what the test pins down in one sentence, so a reviewer knows what it's guarding.
MD
cat >.luxe/skills/release-notes/SKILL.md <<'MD'
---
name: release-notes
description: Writing the entry for CHANGELOG.md after a user-visible change.
---
Lead with what changed for someone running `todo`, not with the refactor behind it. One line per
change, present tense, command names in backticks.
MD

View File

@@ -0,0 +1,74 @@
# flagship — the hero: one small feature, written, reviewed and ready to ship.
#
# What using Luxe looks like, at the speed it happens: a request, the agent reading its way in, an
# edit with its diff, the tests really run, and a reply that says what changed. Then the part no
# other agent has: the change read back as a Guided Review, a chapter at a time, and finished into a
# pull request drafted from it. Nothing is staged and nothing is sped up; only the dead air between
# frames is trimmed. The take ends on the draft and never opens it.
#
# The repository is fictional, so `gh` is a stand-in (`gh/gh`) that answers for `acme/todo`: it
# says the branch has no pull request yet, which is what makes the review offer to open one. The
# work happens on a branch of its own, since a pull request from `main` into `main` is refused.
#
# The two waits on a model that are not dead air, the guide being written and the pull request
# being drafted, are marked `squeeze`…`resume`: `cast-edit.py` plays each in two seconds, every
# frame kept, and the clock on screen still says how long it took.
#
# The recorder starts Luxe with the dashboard off, so a take opens on the session itself rather
# than on three seconds of a splash screen it is not about.
#: cols 120
#: rows 32
#: speed 1.0
#: model anthropic/claude-sonnet-5-5
#: thinking medium
#: glyphs nerd
#: bin gh
#: setup git remote add origin https://github.com/acme/todo.git && git checkout -q -b todo-overdue
# A modal waiting on a person looks exactly like a finished turn, and strands the take. Both
# the permission panel and the question tool get answered a beat after they appear.
answer Return hold 3 when Allow once
answer Return hold 3.5 when Enter submit
sleep 3
mark start
sleep 1.2
enter add a `todo overdue` command: open tasks past their due date, oldest first. with a test
log the turn — over when the screen stops changing
settle 6 max 420
log the review: Ctrl+G writes its guide, and once it says it is ready, Ctrl+G opens it
sleep 2
mod ctrl g
sleep 1
mark squeeze-guide
expect review ready max 180
mark resume-guide
sleep 1.5
mod ctrl g
expect space next max 30
settle 2 max 60
sleep 4.5
key space
sleep 4.5
key space
sleep 3
log finish, into a pull request
mod alt Return
expect Open pull request max 15
sleep 2
key Down x4
sleep 1
key Return
sleep 1
mark squeeze-draft
log the draft
expect Title max 120
mark resume-draft
settle 2 max 60
sleep 4
mark end

148
web/demo-scripts/gh/gh Executable file
View File

@@ -0,0 +1,148 @@
#!/usr/bin/env python3
"""A stand-in `gh` for the demo project, which has no GitHub to talk to.
The toy project under `web/demo` is fictional, and so is its repository: `acme/todo`. A take that
shows the `@` picker's GitHub tab needs issues and pull requests to list, and pointing a recording at
a real repository would put strangers' names and titles on the website. So the recorder puts this
directory first on `PATH` (`#: bin gh` in a script) and Luxe lists what's here instead.
Everything else about the take is real: the picker, the chips, the model, the tools it calls. The
answers are the shapes `gh` actually prints (see `crates/luxe-core/src/github/fixtures/`), and it
refuses anything it doesn't know, loudly, so a take that wanders off the script fails rather than
showing something made up on the spot. Read-only by construction: nothing here writes or posts.
"""
import json
import sys
REPO = "acme/todo"
URL = f"https://github.com/{REPO}"
ME = "luxe-demo"
ISSUES = {
12: {
"title": "`todo due 2026-3-4` misses tasks due that day",
"author": "mara-okafor",
"updated": "2026-09-28T16:12:00Z",
"body": (
"Dates without leading zeros don't match anything:\n\n"
"```\n$ todo add 'file taxes' --due 2026-03-04\n$ todo due 2026-3-4\nnothing here\n```\n\n"
"`todo due 2026-03-04` finds it. I'd expect either both to work or the short one to be "
"rejected with a message, not silently match nothing."
),
},
9: {
"title": "`todo done` should match titles case-insensitively",
"author": "jon-avery",
"updated": "2026-09-26T09:40:00Z",
"body": "`todo done Buy milk` fails when the task was added as `buy milk`.",
},
7: {
"title": "A task added with no title is saved anyway",
"author": "mara-okafor",
"updated": "2026-09-21T13:05:00Z",
"body": "`todo add --due 2026-10-01` saves a task whose title is an empty string.",
},
}
PULLS = {
15: {"title": "Add `todo edit` to rename a task", "author": "jon-avery", "updated": "2026-09-29T08:30:00Z"},
13: {"title": "Sort `todo list` by due date", "author": ME, "updated": "2026-09-27T18:02:00Z"},
}
def node(kind, number, item):
return {
"__typename": kind,
"number": number,
"title": item["title"],
"url": f"{URL}/{'pull' if kind == 'PullRequest' else 'issues'}/{number}",
"state": "OPEN",
"isDraft": False,
"updatedAt": item["updated"],
"repository": {"nameWithOwner": REPO},
"author": {"login": item["author"]},
}
def search(query):
if "is:issue" in query:
nodes = [node("Issue", n, i) for n, i in ISSUES.items()]
elif "review-requested:@me" in query:
nodes = [node("PullRequest", 15, PULLS[15])]
elif "author:@me" in query:
nodes = [node("PullRequest", 13, PULLS[13])]
else:
nodes = []
return {"data": {"search": {"nodes": nodes}}}
def flag(args, name):
"""The value after `name`, from either `-f name=value` style or `--name value`."""
for i, arg in enumerate(args):
if arg in ("-f", "-F") and i + 1 < len(args) and args[i + 1].startswith(f"{name}="):
return args[i + 1].split("=", 1)[1]
if arg == f"--{name}" and i + 1 < len(args):
return args[i + 1]
return None
def issue_view(args):
number = int(next(a for a in args[2:] if a.isdigit()))
issue = ISSUES.get(number)
if issue is None:
refuse(f"GraphQL: Could not resolve to an issue or pull request with the number of {number}.")
if "--json" in args:
print(json.dumps({
"number": number,
"title": issue["title"],
"body": issue["body"],
"url": f"{URL}/issues/{number}",
"author": {"login": issue["author"], "is_bot": False},
"comments": [],
}))
return
print(f"{issue['title']} {REPO}#{number}")
print(f"Open • {issue['author']} opened • 0 comments\n")
print(issue["body"])
print(f"\nView this issue on GitHub: {URL}/issues/{number}")
def refuse(message):
print(message, file=sys.stderr)
sys.exit(1)
def main(args):
if args[:1] == ["--version"]:
print("gh version 2.100.0 (demo stand-in)")
elif args[:2] == ["auth", "status"]:
print(json.dumps({"hosts": {"github.com": [{
"state": "success", "active": True, "host": "github.com", "login": ME,
"tokenSource": "keyring", "scopes": "repo", "gitProtocol": "https",
}]}}))
elif args[:2] == ["repo", "view"]:
print(json.dumps({"nameWithOwner": REPO, "url": URL, "defaultBranchRef": {"name": "main"}}))
elif args[:2] == ["issue", "view"]:
issue_view(args)
elif args[:2] == ["issue", "list"]:
for number, issue in ISSUES.items():
print(f"#{number}\tOPEN\t{issue['title']}")
elif args[:2] == ["api", "graphql"]:
query = flag(args, "query") or ""
if "search(" in query:
print(json.dumps(search(flag(args, "q") or "")))
elif "pullRequests(headRefName" in query:
# No pull request for this branch yet, which is the truth for a fresh session
print(json.dumps({"data": {"repository": {
"defaultBranchRef": {"name": "main"},
"pullRequests": {"nodes": []},
"stack": {"nodes": []},
}, "rateLimit": {"remaining": 4999, "resetAt": "2026-09-29T20:00:00Z"}}}))
else:
refuse("demo gh: this query isn't part of the demo")
else:
refuse(f"demo gh: `gh {' '.join(args)}` isn't part of the demo")
main(sys.argv[1:])

View File

@@ -0,0 +1,65 @@
# mention — reference an issue and a skill with `@`, then let the agent go.
#
# The picker is the demo, so the take is mostly typing: `@` opens on files, Tab walks to GitHub,
# a filter finds the issue, Enter makes it a chip; then `@` again for a skill. Sending it is the
# last beat, and the take ends once the agent has visibly picked both up.
#
# The repository is fictional, so `gh` is a stand-in (`gh/gh`) that answers for `acme/todo` and
# refuses anything else. Everything else is real, including the model reading the issue it was
# pointed at.
#: cols 120
#: rows 32
#: speed 1.0
#: model anthropic/claude-sonnet-5-5
#: thinking medium
#: glyphs nerd
#: bin gh
#: seed bash "$DEMO_SCRIPTS/demo-skills.sh"
#: setup git remote add origin https://github.com/acme/todo.git
answer Return hold 3 when Allow once
answer Return hold 3.5 when Enter submit
sleep 3
mark start
sleep 1
type fix
key space
sleep 0.3
type @
sleep 1.6
log walk the tabs to GitHub
key Tab
sleep 1.6
key Tab
expect #12 max 20
sleep 2.2
log narrow to the issue and insert it
type miss
sleep 1.8
key Return
sleep 1.2
type with
key space
sleep 0.3
type @
sleep 1.2
key Tab
sleep 1.0
type test
sleep 1.6
key Return
sleep 1.8
log send it
key Return
log the agent reads both
settle 5 max 240
sleep 2.5
mark end

View File

@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# The change the Guided Review demo reads back.
#
# Applied by `review.rec` as its `--setup`, so the review has something with shape to it: three
# files, a real boundary fix, a new filter, and a test. A one-line change reviews as `Step 1 / 1`,
# which is a true rendering of a change too small to be worth the surface it is demonstrating.
set -euo pipefail
# 1. A new filter, with the overdue case pulled out of the CLI and given a name.
cat >>src/filter.js <<'JS'
/**
* Tasks past their due date as of `today`, oldest first.
*
* Separate from `dueBy` on purpose: "due by Friday" is a plan and "overdue on Friday" is a
* problem, and folding them into one predicate with a flag made every call site read wrong.
*/
export function overdue(tasks, today) {
return tasks
.filter((task) => !task.done && task.due && task.due < today)
.sort((a, b) => a.due.localeCompare(b.due));
}
JS
# 2. The CLI grows a command for it. Python rather than sed: the usage string is multi-line, and a
# sed that inserts `\n` into it writes the two characters rather than a line break.
python3 - <<'PY'
import pathlib
path = pathlib.Path("src/cli.js")
source = path.read_text()
source = source.replace("todo due <DATE>", "todo due <DATE>\ntodo overdue")
source = source.replace(
'import { dueBy, open, tagged } from "./filter.js";',
'import { dueBy, open, overdue, tagged } from "./filter.js";',
)
source = source.replace(
' case "due":\n show(dueBy(open(tasks), words[0]));\n break;',
' case "due":\n show(dueBy(open(tasks), words[0]));\n break;\n'
' case "overdue":\n show(overdue(tasks, new Date().toISOString().slice(0, 10)));\n break;',
)
path.write_text(source)
PY
# 3. And a test for it, because the project's own AGENTS.md says a behavior change needs one.
python3 - <<'PY'
import pathlib
path = pathlib.Path("test/filter.test.js")
source = path.read_text()
source = source.replace(
'import { dueBy, open, tagged } from "../src/filter.js";',
'import { dueBy, open, overdue, tagged } from "../src/filter.js";',
)
source += '''
test("overdue skips finished work and puts the oldest first", () => {
assert.deepEqual(
overdue(tasks, "2026-03-21").map((t) => t.title),
["Ship the docs", "Fix the parser"],
);
});
'''
path.write_text(source)
PY

View File

@@ -0,0 +1,31 @@
# stills-models — the model picker, standing still.
#
# Its own take, at a terminal small enough for the whole frame to fit the picture: the picker is as
# wide as the longest model id it could list, so on a wide terminal it runs to both edges and a crop
# cut it off. Two takes, one for each width the site shows it at, each cropped to the frame.
#
# scripts/site-record.sh --raw web/demo-scripts/stills-models.rec
# scripts/site-record.sh --raw --name stills-models.narrow --cols 76 web/demo-scripts/stills-models.rec
# S=web/src/assets/captures
# scripts/cast-still.py $S/stills-models.cast --at <still: models + 0.5> --crop 2,5,104,14 --out $S/models.svg
# scripts/cast-still.py $S/stills-models.narrow.cast --at <same> --crop 2,5,72,14 --out $S/models.narrow.svg
#: cols 108
#: rows 24
#: model anthropic/claude-sonnet-5-5
#: thinking low
#: glyphs nerd
sleep 3
mark start
log model picker
enter /model
sleep 2
type sonnet 5
sleep 2.5
log still: models
sleep 1.5
key Escape
sleep 1
mark end

View File

@@ -0,0 +1,27 @@
# stills-tools — what `/tools` lists, standing still.
#
# Recorded `--raw` and cut with `scripts/cast-still.py` at the driver log's times, like `stills`.
#
# S=web/src/assets/captures
# scripts/cast-still.py $S/stills-tools.cast --at <still: tools + 0.5> --crop 41,19,109,13 --out $S/tools.svg
#
# No turn: an earlier take ran a rename to show the tools at work, and the model did it with `sed`,
# which is a fine answer and the wrong picture for a section about what the toolset adds.
#: cols 150
#: rows 36
#: model anthropic/claude-sonnet-5-5
#: thinking low
#: glyphs nerd
sleep 3
mark start
log tools
enter /tools
sleep 3
log still: tools
sleep 1
key Escape
sleep 1
mark end

View File

@@ -0,0 +1,46 @@
# stills — the command palette and the slash picker, standing still.
#
# Not a demo: nobody watches this take. It opens the palette with a few letters typed, and
# `scripts/cast-still.py` cuts the frame out of the raw recording at the time the driver log gives
# for it. Recorded with `--raw`, so the log's clock and the cast's agree, and the raw take is what's
# committed as `captures/stills.cast`.
#
# scripts/site-record.sh --raw web/demo-scripts/stills.rec (then keep stills.raw.cast)
# S=web/src/assets/captures
# scripts/cast-still.py $S/stills.cast --at <still: palette + 0.5> --out $S/palette.svg
# scripts/cast-still.py $S/stills.cast --at <same> --crop 21,6,107,24 --out $S/palette.narrow.svg
# scripts/cast-still.py $S/stills.cast --at <still: slash + 0.5> --out $S/slash.svg
# scripts/cast-still.py $S/stills.cast --at <same> --crop 43,12,107,24 --out $S/slash.narrow.svg
#
# The dirty tree is there so the dock beside the palette has changes to list.
#: cols 150
#: rows 36
#: model anthropic/claude-sonnet-5-5
#: thinking low
#: glyphs nerd
#: bin gh
#: seed bash "$DEMO_SCRIPTS/demo-skills.sh"
#: setup bash "$DEMO_SCRIPTS/review-change.sh"; git remote add origin https://github.com/acme/todo.git
sleep 3
mark start
log palette
mod ctrl k
sleep 1.5
type rev
sleep 2.5
log still: palette
sleep 1.5
key Escape
sleep 1
log slash
type /git
sleep 2.5
log still: slash
sleep 1.5
key Escape
sleep 1
mark end