lavish-axi 0.1.24 → 0.1.26
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 +14 -14
- package/dist/cli.mjs +62 -15
- package/package.json +1 -1
- package/skills/lavish/SKILL.md +4 -2
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ pnpm link
|
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
- **File-path identity** - Sessions are keyed by the canonical HTML file path, so agents do not need opaque IDs.
|
|
130
|
-
- **Portable artifacts** - The artifact runs in an iframe while Lavish injects a small SDK for annotations, snapshots, and feedback controls. Lavish does not inject any design system, so the saved HTML file renders identically whether you open it through `lavish-axi` or directly in a browser.
|
|
130
|
+
- **Portable artifacts** - The artifact runs in an iframe while Lavish injects a small SDK for annotations, snapshots, and feedback controls. Lavish does not inject any design system, so the saved HTML file renders identically whether you open it through `lavish-axi` or directly in a browser. Before writing HTML, choose a design system in strict priority order: follow a user-requested look first; otherwise inspect the current project for a Tailwind or theme config, CSS variables or design tokens, a component library, brand assets, or existing styled pages and match what you find; only when both come up empty, run `lavish-axi design` for a copy-pasteable Tailwind CSS v4 + DaisyUI v5 CDN fallback.
|
|
131
131
|
- **Local assets** - Copy local images, CSS, fonts, and scripts next to the HTML artifact and reference them with relative paths from that directory; root-prefixed paths such as `/assets/logo.png` will not resolve through Lavish's artifact route.
|
|
132
132
|
- **Live reload** - Lavish watches the HTML artifact file by default and preserves the artifact iframe scroll position across reloads. To also reload on sibling asset changes, add `data-lavish-live-reload-root` to the root element or `<meta name="lavish-live-reload" content="root">`.
|
|
133
133
|
- **Feedback controls** - Native form controls (radios, checkboxes, inputs, selects, buttons, labels, contenteditable) are interactive automatically, so they do not need `data-lavish-action`; wire their handlers to `window.lavish.queuePrompt()` or `window.lavish.sendQueuedPrompts()` to send feedback.
|
|
@@ -135,7 +135,7 @@ pnpm link
|
|
|
135
135
|
The browser chrome keeps editing actions in the overflow menu (copy path, reload artifact, copy DOM snapshot, end session) and can submit queued prompts with **Send & end session**, which delivers the prompts before ending the session.
|
|
136
136
|
- **Keyboard shortcuts** - In the chrome composer, Enter sends queued prompts and Shift+Enter inserts a newline.
|
|
137
137
|
In the annotation card, Enter queues the annotation, Shift+Enter inserts a newline, and Ctrl+Enter (Cmd+Enter on macOS) queues it and sends all queued prompts immediately.
|
|
138
|
-
- **Agent presence** - The browser shows when no agent is listening, keeps queued feedback for the next successful `lavish-axi poll` send even across reloads, and only blocks sending while the agent is working on delivered feedback.
|
|
138
|
+
- **Agent presence** - The browser shows when no agent is listening, keeps queued feedback for the next successful `lavish-axi poll` send even across reloads, and only blocks sending while the agent is working on delivered feedback. The no-timeout poll writes an immediate stderr banner and periodic stderr heartbeats while stdout stays reserved for the final response; if the poll is interrupted or times out, re-run it because queued feedback is never lost.
|
|
139
139
|
- **Precise targets** - Text annotations include selected text plus range anchors, so agents are not limited to whole-element selectors.
|
|
140
140
|
- **Server cleanup** - The detached server stops after the last session ends when nothing is connected, or after `LAVISH_AXI_IDLE_TIMEOUT_MS` (default 30 minutes) with no browser or poll connections.
|
|
141
141
|
Set `LAVISH_AXI_IDLE_TIMEOUT_MS=0` or `off` to disable idle self-shutdown.
|
|
@@ -143,17 +143,17 @@ pnpm link
|
|
|
143
143
|
|
|
144
144
|
## CLI Reference
|
|
145
145
|
|
|
146
|
-
| Command | Description
|
|
147
|
-
| ----------------------------- |
|
|
148
|
-
| `lavish-axi` | Show current sessions and usage guidance.
|
|
149
|
-
| `lavish-axi <html-file>` | Open or resume a Lavish Editor session.
|
|
150
|
-
| `lavish-axi poll <html-file>` | Long-poll until the user sends feedback or ends the session.
|
|
151
|
-
| `lavish-axi end <html-file>` | End a session.
|
|
152
|
-
| `lavish-axi stop` | Shut down the background server.
|
|
153
|
-
| `lavish-axi playbook [id]` | List focused artifact guidance or show one playbook.
|
|
154
|
-
| `lavish-axi design` | Show
|
|
155
|
-
| `lavish-axi setup hooks` | Install or repair optional SessionStart hooks for Claude Code, Codex, and OpenCode; restart the agent session afterward.
|
|
156
|
-
| `lavish-axi server` | Run the local Lavish Editor server.
|
|
146
|
+
| Command | Description |
|
|
147
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
148
|
+
| `lavish-axi` | Show current sessions and usage guidance. |
|
|
149
|
+
| `lavish-axi <html-file>` | Open or resume a Lavish Editor session. |
|
|
150
|
+
| `lavish-axi poll <html-file>` | Long-poll until the user sends feedback or ends the session; leave no-timeout polls running, or re-run them if interrupted. |
|
|
151
|
+
| `lavish-axi end <html-file>` | End a session. |
|
|
152
|
+
| `lavish-axi stop` | Shut down the background server. |
|
|
153
|
+
| `lavish-axi playbook [id]` | List focused artifact guidance or show one playbook. |
|
|
154
|
+
| `lavish-axi design` | Show the Tailwind + DaisyUI CDN fallback after user and project design sources come up empty. |
|
|
155
|
+
| `lavish-axi setup hooks` | Install or repair optional SessionStart hooks for Claude Code, Codex, and OpenCode; restart the agent session afterward. |
|
|
156
|
+
| `lavish-axi server` | Run the local Lavish Editor server. |
|
|
157
157
|
|
|
158
158
|
Known playbook IDs: `diagram`, `table`, `comparison`, `plan`, `diff`, `input`, `slides`.
|
|
159
159
|
One artifact often combines several playbooks, such as a plan that includes a comparison and a diagram, so read every playbook relevant to the artifact for the best quality.
|
|
@@ -164,7 +164,7 @@ One artifact often combines several playbooks, such as a plan that includes a co
|
|
|
164
164
|
| ------------------------ | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
165
165
|
| `lavish-axi <html-file>` | `--no-open` | Ensure the server/session exists without opening another browser window. |
|
|
166
166
|
| `lavish-axi poll` | `--agent-reply "..."` | Show the agent's reply in the existing browser chat before polling again. |
|
|
167
|
-
| `lavish-axi poll` | `--timeout-ms <ms>` | Test/debug escape hatch only; agents should normally omit it.
|
|
167
|
+
| `lavish-axi poll` | `--timeout-ms <ms>` | Test/debug escape hatch only; agents should normally omit it and leave the long poll running. |
|
|
168
168
|
| `lavish-axi stop` | `--port <port>` | Shut down a server running on a non-default port. |
|
|
169
169
|
| `lavish-axi server` | `--verbose` | Log session and watcher events to stderr; can also be enabled with `LAVISH_AXI_DEBUG=1`. Detached server output is appended to `~/.lavish-axi/server.log` (or `LAVISH_AXI_STATE_DIR/server.log`) for startup and crash diagnostics. |
|
|
170
170
|
|
package/dist/cli.mjs
CHANGED
|
@@ -20,7 +20,7 @@ var DESIGN_CDN_URLS = {
|
|
|
20
20
|
var DESIGN_CDN_SNIPPET = `<link rel="stylesheet" href="${DESIGN_CDN_URLS.daisyui}">
|
|
21
21
|
<link rel="stylesheet" href="${DESIGN_CDN_URLS.daisyuiThemes}">
|
|
22
22
|
<script src="${DESIGN_CDN_URLS.tailwind}"></script>`;
|
|
23
|
-
var DESIGN_SYSTEM_HINT = "Lavish does not auto-inject any design system - artifacts stay portable so they render identically when opened directly without lavish-axi running.
|
|
23
|
+
var DESIGN_SYSTEM_HINT = "Lavish does not auto-inject any design system - artifacts stay portable so they render identically when opened directly without lavish-axi running. Before writing any HTML, decide the design direction in this strict priority order, and only move to the next step when the current one truly yields nothing: (1) if the user asked for a specific look or named design system, use that; (2) otherwise you must first inspect the current project for design conventions - look for a Tailwind or theme config, shared CSS variables or design tokens, a component library, brand assets, or existing styled pages - and match what you find so the artifact fits in; (3) only when both steps come up empty, use the Lavish-recommended Tailwind CSS browser runtime v4 + DaisyUI v5, available via CDN - run `lavish-axi design` for a copy-pasteable CDN snippet plus component reference, and prefer that CDN snippet over hand-writing styles unless explicitly instructed otherwise by the user. When you deliver the artifact, state which of the three design sources you used and why.";
|
|
24
24
|
var DAISYUI_THEMES = [
|
|
25
25
|
"light",
|
|
26
26
|
"dark",
|
|
@@ -61,7 +61,7 @@ var DAISYUI_THEMES = [
|
|
|
61
61
|
function createDesignOutput() {
|
|
62
62
|
return {
|
|
63
63
|
design: {
|
|
64
|
-
summary: "Lavish does not auto-inject any design system
|
|
64
|
+
summary: "Use this Lavish CDN fallback only if (1) the user gave no design direction and (2) you already inspected the current project and found no design system or style conventions to match. If you have not checked the project yet, check first. Lavish does not auto-inject any design system; artifacts stay portable HTML. The strict priority order is: (1) a look or named design system the user asked for; (2) the current project's design system or style conventions - look for a Tailwind or theme config, shared CSS variables or design tokens, a component library, brand assets, or existing styled pages; (3) this Tailwind CSS browser runtime v4 + DaisyUI v5 + themes snippet - paste the CDN snippet below into your `<head>` and prefer the CDN snippet over hand-writing styles unless explicitly instructed otherwise by the user.",
|
|
65
65
|
cdn_snippet: DESIGN_CDN_SNIPPET,
|
|
66
66
|
cdn_urls: DESIGN_CDN_URLS,
|
|
67
67
|
versions: { tailwind: TAILWIND_BROWSER_VERSION, daisyui: DAISYUI_VERSION },
|
|
@@ -1946,7 +1946,7 @@ function normalizePagePath(path5) {
|
|
|
1946
1946
|
// src/cli.js
|
|
1947
1947
|
var COMMANDS = /* @__PURE__ */ new Set(["open", "poll", "end", "stop", "server", "playbook", "design", "setup"]);
|
|
1948
1948
|
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`.";
|
|
1949
|
-
var VERSION = "0.1.
|
|
1949
|
+
var VERSION = "0.1.26";
|
|
1950
1950
|
async function run(argv) {
|
|
1951
1951
|
await ensureStateDir();
|
|
1952
1952
|
const normalizedArgv = normalizeArgv(argv);
|
|
@@ -2038,7 +2038,7 @@ function createHomeOutput({ bin, sessions, includeSessions = true }) {
|
|
|
2038
2038
|
"Run `lavish-axi <html-file>` to open or resume a Lavish Editor session",
|
|
2039
2039
|
"Unless the user specifies another location, create HTML artifacts in the current working directory under `.lavish/`",
|
|
2040
2040
|
"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",
|
|
2041
|
-
"Run `lavish-axi poll <html-file>` to wait for user feedback",
|
|
2041
|
+
"Run `lavish-axi poll <html-file>` to wait for user feedback. It long-polls and stays silent until the user sends feedback or ends the session, so leave it running - never kill it. If your harness limits how long a foreground command may run, run the poll as a background task; if it gets killed or times out anyway, just re-run it - queued feedback is never lost",
|
|
2042
2042
|
"Run `lavish-axi end <html-file>` to end a session",
|
|
2043
2043
|
"Run `lavish-axi stop` to shut down the background server (it also self-stops when idle or after the last session ends with nothing connected)",
|
|
2044
2044
|
"Run `lavish-axi playbook <playbook_id>` for focused artifact guidance. One artifact often combines several playbooks (for example a plan that includes a comparison and a diagram), so read every playbook relevant to the artifact, not just one, for the best quality",
|
|
@@ -2069,7 +2069,7 @@ function createPlaybookOutput(args) {
|
|
|
2069
2069
|
function createOpenOutput({ file, url, status }) {
|
|
2070
2070
|
return {
|
|
2071
2071
|
session: { file, url, status },
|
|
2072
|
-
next_step: `Do not respond to the user just yet. Now you must run \`lavish-axi poll ${file}\`. This command long-polls until the user sends feedback or ends the session. Do not pass --timeout-ms during normal agent use.
|
|
2072
|
+
next_step: `Do not respond to the user just yet. Now you must run \`lavish-axi poll ${file}\`. This command long-polls until the user sends feedback or ends the session, and it stays silent the whole time - that is normal, never kill it. Do not pass --timeout-ms during normal agent use. If your harness limits how long a foreground command may run, run the poll as a background task and wait for it to finish; if the poll still gets killed or times out, just re-run it - queued feedback is never lost. After applying feedback, run \`lavish-axi poll ${file} --agent-reply "<message for the user>"\` without --timeout-ms to show your response in Lavish Editor and wait for more feedback.`
|
|
2073
2073
|
};
|
|
2074
2074
|
}
|
|
2075
2075
|
async function openCommand(args) {
|
|
@@ -2107,11 +2107,58 @@ async function pollCommand(args) {
|
|
|
2107
2107
|
}
|
|
2108
2108
|
const timeoutMs = flagValue(args, "--timeout-ms");
|
|
2109
2109
|
const timeoutQuery = timeoutMs ? `&timeoutMs=${encodeURIComponent(timeoutMs)}` : "";
|
|
2110
|
-
const
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2110
|
+
const onPollSignal = (signal) => {
|
|
2111
|
+
process.stderr.write(`
|
|
2112
|
+
${pollInterruptedText(absolute)}
|
|
2113
|
+
`);
|
|
2114
|
+
process.exit(signal === "SIGINT" ? 130 : 143);
|
|
2115
|
+
};
|
|
2116
|
+
if (!timeoutMs) {
|
|
2117
|
+
process.on("SIGINT", onPollSignal);
|
|
2118
|
+
process.on("SIGTERM", onPollSignal);
|
|
2119
|
+
}
|
|
2120
|
+
const waitReporter = timeoutMs ? null : startPollWaitReporter({ file: absolute });
|
|
2121
|
+
try {
|
|
2122
|
+
const response = await fetchJson(`${baseUrl}/api/poll?file=${encodeURIComponent(absolute)}${timeoutQuery}`, {
|
|
2123
|
+
retries: 3,
|
|
2124
|
+
retryDelayMs: 500
|
|
2125
|
+
});
|
|
2126
|
+
return createPollOutput({ file: absolute, response });
|
|
2127
|
+
} finally {
|
|
2128
|
+
waitReporter?.stop();
|
|
2129
|
+
if (!timeoutMs) {
|
|
2130
|
+
process.off("SIGINT", onPollSignal);
|
|
2131
|
+
process.off("SIGTERM", onPollSignal);
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
function pollWaitBannerText(file) {
|
|
2136
|
+
return `[lavish-axi] Long-polling for user feedback on ${file}. This stays silent until the user sends feedback or ends the session - leave it running. If it gets killed or times out, re-run \`lavish-axi poll ${file}\` - queued feedback is never lost.`;
|
|
2137
|
+
}
|
|
2138
|
+
function pollWaitTickText(elapsedMs) {
|
|
2139
|
+
const minutes = Math.round(elapsedMs / 6e4);
|
|
2140
|
+
return `[lavish-axi] Still waiting for user feedback (${minutes}m). Leave this running until the user acts.`;
|
|
2141
|
+
}
|
|
2142
|
+
function pollInterruptedText(file) {
|
|
2143
|
+
return `[lavish-axi] Poll interrupted before user feedback arrived. The user may still be reviewing - re-run \`lavish-axi poll ${file}\` to keep waiting; queued feedback is never lost.`;
|
|
2144
|
+
}
|
|
2145
|
+
function startPollWaitReporter({
|
|
2146
|
+
file,
|
|
2147
|
+
write = (line) => {
|
|
2148
|
+
process.stderr.write(line);
|
|
2149
|
+
},
|
|
2150
|
+
intervalMs = 6e4
|
|
2151
|
+
}) {
|
|
2152
|
+
write(`${pollWaitBannerText(file)}
|
|
2153
|
+
`);
|
|
2154
|
+
let elapsedMs = 0;
|
|
2155
|
+
const timer = setInterval(() => {
|
|
2156
|
+
elapsedMs += intervalMs;
|
|
2157
|
+
write(`${pollWaitTickText(elapsedMs)}
|
|
2158
|
+
`);
|
|
2159
|
+
}, intervalMs);
|
|
2160
|
+
timer.unref?.();
|
|
2161
|
+
return { stop: () => clearInterval(timer) };
|
|
2115
2162
|
}
|
|
2116
2163
|
function createPollOutput({ file, response }) {
|
|
2117
2164
|
if (response.status === "missing") {
|
|
@@ -2124,7 +2171,7 @@ function createPollOutput({ file, response }) {
|
|
|
2124
2171
|
session: { file, status: "feedback" },
|
|
2125
2172
|
dom_snapshot: response.dom_snapshot || "",
|
|
2126
2173
|
prompts: response.prompts || [],
|
|
2127
|
-
next_step: `Apply the requested changes to ${file}. Do not respond to the user just yet. Now you must run \`lavish-axi poll ${file} --agent-reply "<message for the user>"\` without --timeout-ms unless the user ended the session. The poll
|
|
2174
|
+
next_step: `Apply the requested changes to ${file}. Do not respond to the user just yet. Now you must run \`lavish-axi poll ${file} --agent-reply "<message for the user>"\` without --timeout-ms unless the user ended the session. The poll waits silently until the user sends more feedback or ends the session - never kill it. If your harness limits how long a foreground command may run, run the poll as a background task; if it still gets killed or times out, just re-run it - queued feedback is never lost.`
|
|
2128
2175
|
};
|
|
2129
2176
|
}
|
|
2130
2177
|
if (response.status === "ended") {
|
|
@@ -2132,7 +2179,7 @@ function createPollOutput({ file, response }) {
|
|
|
2132
2179
|
}
|
|
2133
2180
|
return {
|
|
2134
2181
|
session: { file, status: response.status || "waiting" },
|
|
2135
|
-
next_step: `No user feedback arrived before the optional timeout. Run \`lavish-axi poll ${file}\` without --timeout-ms to wait indefinitely.`
|
|
2182
|
+
next_step: `No user feedback arrived before the optional timeout. Run \`lavish-axi poll ${file}\` without --timeout-ms to wait indefinitely - queued feedback is never lost, so re-running the poll is always safe.`
|
|
2136
2183
|
};
|
|
2137
2184
|
}
|
|
2138
2185
|
async function endCommand(args) {
|
|
@@ -2453,7 +2500,7 @@ Usage:
|
|
|
2453
2500
|
|
|
2454
2501
|
${DESIGN_SYSTEM_HINT}
|
|
2455
2502
|
|
|
2456
|
-
Note: poll long-polls indefinitely by default until the user sends feedback or ends the session. Do not pass --timeout-ms during normal agent use; it is for tests and debugging only.
|
|
2503
|
+
Note: poll long-polls indefinitely by default until the user sends feedback or ends the session, staying silent while it waits - never kill it. Do not pass --timeout-ms during normal agent use; it is for tests and debugging only. If your harness limits how long a foreground command may run, run the poll as a background task; if it gets killed or times out anyway, just re-run it - queued feedback is never lost.
|
|
2457
2504
|
|
|
2458
2505
|
`;
|
|
2459
2506
|
var COMMAND_HELP = {
|
|
@@ -2463,7 +2510,7 @@ Open or resume a Lavish Editor review session for an HTML artifact. Use --no-ope
|
|
|
2463
2510
|
`,
|
|
2464
2511
|
poll: `Usage: lavish-axi poll <html-file> [--agent-reply "..."]
|
|
2465
2512
|
|
|
2466
|
-
This command long-polls indefinitely for queued user prompts, then returns them to the agent. Do not pass --timeout-ms during normal agent use; it is for tests and debugging only.
|
|
2513
|
+
This command long-polls indefinitely for queued user prompts, then returns them to the agent. It stays silent while it waits - that is normal, never kill it. Do not pass --timeout-ms during normal agent use; it is for tests and debugging only. If your harness limits how long a foreground command may run, run the poll as a background task and wait for it to finish; if it still gets killed or times out, just re-run it - queued feedback is never lost. Use --agent-reply after applying prior feedback to display your response in Lavish Editor before waiting again.
|
|
2467
2514
|
`,
|
|
2468
2515
|
end: `Usage: lavish-axi end <html-file>
|
|
2469
2516
|
|
|
@@ -2486,7 +2533,7 @@ Examples:
|
|
|
2486
2533
|
`,
|
|
2487
2534
|
design: `Usage: lavish-axi design
|
|
2488
2535
|
|
|
2489
|
-
Show a copy-pasteable CDN snippet for Tailwind CSS browser runtime v4 + DaisyUI v5 + themes, plus technical reference for DaisyUI components. Lavish artifacts stay portable HTML.
|
|
2536
|
+
Show a copy-pasteable CDN snippet for Tailwind CSS browser runtime v4 + DaisyUI v5 + themes, plus technical reference for DaisyUI components. Lavish artifacts stay portable HTML. This CDN snippet is the design fallback, not the default: inspect the project before falling back. The strict priority order is: (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; (3) only when both come up empty, prefer the Lavish-recommended Tailwind + DaisyUI CDN snippet over hand-writing styles unless explicitly instructed otherwise by the user.
|
|
2490
2537
|
`,
|
|
2491
2538
|
setup: `Usage: lavish-axi setup hooks
|
|
2492
2539
|
|
package/package.json
CHANGED
package/skills/lavish/SKILL.md
CHANGED
|
@@ -27,6 +27,8 @@ Use lavish-axi when the user asks for a visual artifact, HTML explainer, interac
|
|
|
27
27
|
1. Create the HTML artifact (default location `.lavish/<name>.html` in the working directory).
|
|
28
28
|
2. Run `npx -y lavish-axi <html-file>` to open or resume a review session in the browser.
|
|
29
29
|
3. Run `npx -y lavish-axi poll <html-file>` to long-poll for the user's annotations and queued prompts.
|
|
30
|
+
The poll stays silent until the user acts - leave it running, never kill it.
|
|
31
|
+
If your harness limits how long a foreground command may run, run the poll as a background task; if it gets killed or times out anyway, just re-run it - queued feedback is never lost.
|
|
30
32
|
4. Apply the feedback, then poll again with `--agent-reply "<message>"` to reply in the browser and keep the loop going.
|
|
31
33
|
5. Run `npx -y lavish-axi end <html-file>` when the review is finished.
|
|
32
34
|
|
|
@@ -55,9 +57,9 @@ One artifact often combines several playbooks (for example a plan that includes
|
|
|
55
57
|
- Run `npx -y lavish-axi <html-file>` to open or resume a Lavish Editor session
|
|
56
58
|
- Unless the user specifies another location, create HTML artifacts in the current working directory under `.lavish/`
|
|
57
59
|
- 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
|
|
58
|
-
- Run `npx -y lavish-axi poll <html-file>` to wait for user feedback
|
|
60
|
+
- Run `npx -y lavish-axi poll <html-file>` to wait for user feedback. It long-polls and stays silent until the user sends feedback or ends the session, so leave it running - never kill it. If your harness limits how long a foreground command may run, run the poll as a background task; if it gets killed or times out anyway, just re-run it - queued feedback is never lost
|
|
59
61
|
- Run `npx -y lavish-axi end <html-file>` to end a session
|
|
60
62
|
- 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)
|
|
61
63
|
- Run `npx -y lavish-axi playbook <playbook_id>` for focused artifact guidance. One artifact often combines several playbooks (for example a plan that includes a comparison and a diagram), so read every playbook relevant to the artifact, not just one, for the best quality
|
|
62
|
-
- Lavish does not auto-inject any design system - artifacts stay portable so they render identically when opened directly without lavish-axi running.
|
|
64
|
+
- Lavish does not auto-inject any design system - artifacts stay portable so they render identically when opened directly without lavish-axi running. Before writing any HTML, decide the design direction in this strict priority order, and only move to the next step when the current one truly yields nothing: (1) if the user asked for a specific look or named design system, use that; (2) otherwise you must first inspect the current project for design conventions - look for a Tailwind or theme config, shared CSS variables or design tokens, a component library, brand assets, or existing styled pages - and match what you find so the artifact fits in; (3) only when both steps come up empty, use 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, and prefer that CDN snippet over hand-writing styles unless explicitly instructed otherwise by the user. When you deliver the artifact, state which of the three design sources you used and why.
|
|
63
65
|
- 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
|