lavish-axi 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/dist/chrome-client.js +6 -0
- package/dist/cli.mjs +7 -1
- package/package.json +4 -2
- package/skills/lavish-axi/SKILL.md +54 -0
package/README.md
CHANGED
|
@@ -73,9 +73,13 @@ pnpm run build
|
|
|
73
73
|
pnpm link
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## Teach Your Agent About Lavish (recommended)
|
|
77
77
|
|
|
78
|
-
Lavish does not
|
|
78
|
+
Lavish does not wire itself into your agent automatically, so in a fresh session your agent would not know to use it.
|
|
79
|
+
There are two ways to fix that - **you only need one.**
|
|
80
|
+
We recommend the hook.
|
|
81
|
+
|
|
82
|
+
### Option A: Session hook (recommended)
|
|
79
83
|
|
|
80
84
|
Run this once to opt in:
|
|
81
85
|
|
|
@@ -88,7 +92,22 @@ With the hook installed, your agent learns to turn complex responses into rich,
|
|
|
88
92
|
|
|
89
93
|
**Restart your agent session after running this** so the new hook takes effect.
|
|
90
94
|
|
|
91
|
-
|
|
95
|
+
### Option B: Install as a skill
|
|
96
|
+
|
|
97
|
+
Prefer the [Agent Skills](https://agentskills.io) format, or use an agent that supports it?
|
|
98
|
+
Install Lavish as a skill with [`npx skills`](https://github.com/vercel-labs/skills):
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
npx skills add kunchenguid/lavish-axi --skill lavish-axi
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This drops a `lavish-axi` skill into your agent's skills directory (`.claude/skills/` for example; add `-g` for `~/.claude/skills/`).
|
|
105
|
+
The skill carries the same guidance the hook delivers, but it loads on demand when the agent recognizes a task that calls for a visual artifact, rather than every session.
|
|
106
|
+
It does not surface your live open sessions - run `lavish-axi setup hooks` if you want that ambient context too.
|
|
107
|
+
|
|
108
|
+
### No setup at all
|
|
109
|
+
|
|
110
|
+
Lavish also works fully as a plain CLI - just tell your agent to `npx lavish-axi <file.html>` as shown in the Quick Start.
|
|
92
111
|
|
|
93
112
|
## How It Works
|
|
94
113
|
|
|
@@ -157,6 +176,7 @@ Known playbook IDs: `diagram`, `table`, `comparison`, `plan`, `diff`, `input`, `
|
|
|
157
176
|
```sh
|
|
158
177
|
pnpm run check # Run all verification commands
|
|
159
178
|
pnpm run build # Bundle the publishable CLI, chrome, and design assets
|
|
179
|
+
pnpm run build:skill # Regenerate the installable lavish-axi skill
|
|
160
180
|
pnpm test # Run node:test tests
|
|
161
181
|
pnpm run lint # Run ESLint
|
|
162
182
|
pnpm run format:check # Check Prettier formatting
|
package/dist/chrome-client.js
CHANGED
|
@@ -260,6 +260,12 @@ annotationButton.onclick = () => {
|
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
sendButton.onclick = sendQueued;
|
|
263
|
+
chatInput.addEventListener("keydown", (event) => {
|
|
264
|
+
if (event.key === "Enter" && !event.shiftKey && !event.isComposing) {
|
|
265
|
+
event.preventDefault();
|
|
266
|
+
sendQueued();
|
|
267
|
+
}
|
|
268
|
+
});
|
|
263
269
|
copyPathButton.onclick = copyFilePath;
|
|
264
270
|
endButton.onclick = endSession;
|
|
265
271
|
frame.addEventListener("load", () => {
|
package/dist/cli.mjs
CHANGED
|
@@ -942,6 +942,12 @@ function createArtifactSdk() {
|
|
|
942
942
|
if (prompt) queuePrompt(prompt, c);
|
|
943
943
|
closeCard();
|
|
944
944
|
};
|
|
945
|
+
textarea.addEventListener("keydown", (event) => {
|
|
946
|
+
if (event.key === "Enter" && !event.shiftKey && !event.isComposing) {
|
|
947
|
+
event.preventDefault();
|
|
948
|
+
sendButton.click();
|
|
949
|
+
}
|
|
950
|
+
});
|
|
945
951
|
setTimeout(() => textarea.focus(), 0);
|
|
946
952
|
}
|
|
947
953
|
window.lavish = {
|
|
@@ -1899,7 +1905,7 @@ function normalizePagePath(path5) {
|
|
|
1899
1905
|
// src/cli.js
|
|
1900
1906
|
var COMMANDS = /* @__PURE__ */ new Set(["open", "poll", "end", "stop", "server", "playbook", "design", "setup"]);
|
|
1901
1907
|
var DESCRIPTION = "Lavish Editor helps agents turn rich HTML artifacts into collaborative human review surfaces. Whenever you are about to give user a complex response that will be easier to understand via a rich / interactive page, consider using Lavish Editor. First generate an interactive HTML artifact according to user request, then run `lavish-axi <html-file>` so the user can visually review it, annotate elements or selected text, queue prompts, and send feedback back through `lavish-axi poll`.";
|
|
1902
|
-
var VERSION = "0.1.
|
|
1908
|
+
var VERSION = "0.1.20";
|
|
1903
1909
|
async function run(argv) {
|
|
1904
1910
|
await ensureStateDir();
|
|
1905
1911
|
const normalizedArgv = normalizeArgv(argv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lavish-axi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"packageManager": "pnpm@11.1.1",
|
|
5
5
|
"description": "HTML is the new markdown. Lavish is the new editor for your HTML artifacts.",
|
|
6
6
|
"type": "module",
|
|
@@ -9,13 +9,15 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
+
"skills/lavish-axi",
|
|
12
13
|
"lavish-editor-marketing/renders/lavish-editor-marketing.gif",
|
|
13
14
|
"LICENSE",
|
|
14
15
|
"README.md"
|
|
15
16
|
],
|
|
16
17
|
"scripts": {
|
|
17
18
|
"build": "node scripts/build.js",
|
|
18
|
-
"
|
|
19
|
+
"build:skill": "node scripts/build-skill.js",
|
|
20
|
+
"check": "npm run build && npm run lint && npm run format:check && npm run typecheck && npm test && node scripts/build-skill.js --check",
|
|
19
21
|
"start": "node dist/cli.mjs",
|
|
20
22
|
"lint": "eslint bin src test scripts",
|
|
21
23
|
"format": "prettier --write .",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lavish-axi
|
|
3
|
+
description: Turn complex or visual agent responses into rich, reviewable HTML artifacts the user can annotate and send feedback on, using the lavish-axi CLI. Use when about to give a plan, comparison, diagram, table, code diff, report, or anything easier to grasp visually than as prose.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lavish Editor
|
|
7
|
+
|
|
8
|
+
Lavish Editor helps agents turn rich HTML artifacts into collaborative human review surfaces. Whenever you are about to give user a complex response that will be easier to understand via a rich / interactive page, consider using Lavish Editor. First generate an interactive HTML artifact according to user request, then run `npx -y lavish-axi <html-file>` so the user can visually review it, annotate elements or selected text, queue prompts, and send feedback back through `npx -y lavish-axi poll`.
|
|
9
|
+
|
|
10
|
+
You do not need lavish-axi installed globally - invoke it with `npx -y lavish-axi <html-file>`.
|
|
11
|
+
If lavish-axi output shows a follow-up command starting with `lavish-axi`, run it as `npx -y lavish-axi ...` instead.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
Use lavish-axi when the user asks for a visual artifact, HTML explainer, interactive prototype, review surface, product or technical plan, comparison, report, or browser-based feedback loop
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Create the HTML artifact (default location `.lavish/<name>.html` in the working directory).
|
|
20
|
+
2. Run `npx -y lavish-axi <html-file>` to open or resume a review session in the browser.
|
|
21
|
+
3. Run `npx -y lavish-axi poll <html-file>` to long-poll for the user's annotations and queued prompts.
|
|
22
|
+
4. Apply the feedback, then poll again with `--agent-reply "<message>"` to reply in the browser and keep the loop going.
|
|
23
|
+
5. Run `npx -y lavish-axi end <html-file>` when the review is finished.
|
|
24
|
+
|
|
25
|
+
## Visual guidance
|
|
26
|
+
|
|
27
|
+
- Use visual hierarchy to make the most important decisions, risks, tradeoffs, and next actions obvious at a glance
|
|
28
|
+
- Use visual structure such as sections, cards, tables, diagrams, annotated snippets, and side-by-side comparisons instead of long prose
|
|
29
|
+
- Choose typography, spacing, color, and layout deliberately so the artifact has a clear point of view
|
|
30
|
+
- Prevent horizontal overflow: design narrow layouts intentionally, use minmax(0, 1fr) and min-width: 0 for grid/flex children, and deliberately wrap or truncate long labels/status text
|
|
31
|
+
|
|
32
|
+
## Playbooks
|
|
33
|
+
|
|
34
|
+
Run `npx -y lavish-axi playbook <id>` for focused, detailed guidance on any of these:
|
|
35
|
+
|
|
36
|
+
- `diagram` - Map relationships, flows, state, and architecture
|
|
37
|
+
- `table` - Turn dense records into scan-friendly review surfaces
|
|
38
|
+
- `comparison` - Show options, tradeoffs, and current vs target behavior
|
|
39
|
+
- `plan` - Explain a product or technical plan before implementation
|
|
40
|
+
- `diff` - Present code or PR changes with evidence and findings
|
|
41
|
+
- `input` - Must be used when the agent needs to collect user input on decisions, choices, preferences, triage, scope, or other structured feedback from within the artifact
|
|
42
|
+
- `slides` - Create a deliberate presentation when slides are requested
|
|
43
|
+
|
|
44
|
+
## Commands & rules
|
|
45
|
+
|
|
46
|
+
- Run `npx -y lavish-axi <html-file>` to open or resume a Lavish Editor session
|
|
47
|
+
- Unless the user specifies another location, create HTML artifacts in the current working directory under `.lavish/`
|
|
48
|
+
- Lavish serves the html file through a local express.js server. If your html needs to reference other filesystem assets such as images, CSS, fonts, and local scripts, copy them into the same directory as the HTML file, then reference them with relative paths from that directory. Never prepend `/` to those asset paths - root paths won't work
|
|
49
|
+
- Run `npx -y lavish-axi poll <html-file>` to wait for user feedback
|
|
50
|
+
- Run `npx -y lavish-axi end <html-file>` to end a session
|
|
51
|
+
- Run `npx -y lavish-axi stop` to shut down the background server (it also self-stops when idle or after the last session ends with nothing connected)
|
|
52
|
+
- Run `npx -y lavish-axi playbook <playbook_id>` for focused artifact guidance
|
|
53
|
+
- Lavish does not auto-inject any design system - artifacts stay portable so they render identically when opened directly without lavish-axi running. Choose a design system in this priority order: (1) if the user asked for a specific look or named design system, follow that; (2) otherwise, if the current project already has a design system or style conventions, match those so the artifact fits in; (3) otherwise, prefer the Lavish-recommended Tailwind CSS browser runtime v4 + DaisyUI v5, available via CDN - run `npx -y lavish-axi design` for a copy-pasteable CDN snippet plus component reference. Prefer that CDN snippet over hand-writing styles unless explicitly instructed otherwise by the user.
|
|
54
|
+
- Use lavish-axi when the user asks for a visual artifact, HTML explainer, interactive prototype, review surface, product or technical plan, comparison, report, or browser-based feedback loop
|