Next Steps
Ordered, roughly by priority. Update as items are done or added.
-
Web SPA bundle size. The phase-3 engine port bundles the list/expansion text and all 113 dynamic prompts eagerly (~712 KB gzipped). Trim it: serve the larger list files (
danbooru,d-*) frompublic/via runtime fetch instead of inlining, switch dynamic-prompt imports to a lazy glob, and/or uselodash-esfor tree-shaking. Not blocking, but worth doing before launch. -
Live end-to-end verification with a Stable Diffusion WebUI. Start a WebUI with
--api, then exercise: CLI generate (npm start), the web UI (npm run server) feed/search/settings, and one each of variation, reroll, upscale, and animation. This is the one thing the modernization could not verify (no WebUI was running). Confirms thenode-fetch→fetchmigration and Express 5 routes in practice. -
Review the
no-dupe-else-ifwarnings. Severaldynamic-prompts/*files (e.g.portrait-princess.js,portrait.js,v1/person.js,v1/castle.js,v1/princess-simple.js,futuristic.js,beach.js) have duplicateelse ifconditions — likely latent bugs in the prompt generators. Decide the intended condition per case (this will change generated prompts), or confirm they're harmless. Don't bulk-edit. -
Grow the test harness into real assertions. The import smoke test now exists (committed as
scripts/smoke-test.mjs, run bynpm run smoke/npm test, and in CI) — it loads the full module graph, forces every dynamic prompt throughrequire(ESM), and expands a prompt. Next: add actual unit tests (e.g. forcleanup/list/prompt-salt) and a small browser-engine assertion for the SPA'score/path. Seetesting.md. -
README refresh. The root
README.mdpredates 2.0.0; update the run instructions to thenpmscripts, note the Node 24 requirement, and mention theweb-app/SPA and thenpm run docsdoc-site. -
Finish the SPA UI rework, then re-enable the Generate + Settings tabs. The React + Vite
web-app/exists and only the Build tab is currently shown while the UI is reworked. Complete that rework and unhide the other tabs. (The olderweb/frontend/jQuery client modernization is now largely superseded by this SPA — do it only if the classic server is kept long-term.) The 2026-06-19 home-screen refinement removed several working features (image generation, chaos, presets, the Settings button/drawer, the mode badge) to be brought back — tracked inremoved-pending-readd.md. The owner wants presets re-added as a richer thing (full settings + auto-generation), not the old apply/save dropdown. -
Optional: consider in-process generation instead of the server-spawns-CLI design (see
future.md). -
DPL (Dynamic Prompt Language) — the active next build. Design done — a Markdown-shaped, non-programmer-first language for authoring generators, with a two-way JS bridge for the logic-heavy ~10% (the
entityfamily, the keyword-pile / suggestion / danbooru builtins). Full proposal + requirements coverage in../reference/dpl-design.md; mockup analysis in../reference/dpl-language.md. DPL is built first because it's wired into the v3 engine (item 8). Prototype a parser/compiler that turns.dpl→ the weighted-layer render → the existing generator contract, with.js/.dplloaders coexisting for incremental migration. Most mechanics are settled (weights[n]auto-from-1000, local recursive sort,go to/go back,one of/N of, repetition modes); remaining: indentation strictness, exactctxbridge surface, file layout.
7a. DPL build status. Engine (src/core/dpl/dpl.js) + 25 tests; entire v2 catalog converted to
data/dynamic-prompts/v3/ (.dpl + JS sidecars); node + browser loaders + the dynamic-prompt stage +
the classifier load v3 as the default catalog, v1/v2 frozen and addressed by {#v1/…} / {#v2/…}
path prefixes (no suffix). The SPA has the wrapper UI (bottom-right button → preset list → Manage
modal with two Start/End boxes; frames generation) and v3-default building blocks. smoke + web build
(597 modules) + scripts/dpl-engine-check.mjs all green. Remaining/optional: wire .dpl/engine
checks into npm test; the broader engine still auto-appends fx/artists — revisit per the v3
"no auto fx/artists" intent; persist wrapper presets across the share-link if desired; image-gen etc.
(the older removed features in removed-pending-readd.md).
-
v3 — the weighted-layer prompt engine. Direction in
v3-layers.md: ordering-by-weight over a layer tree (file/section/line are layers; the prompt box is the root); weights are local (sort within container, recursive depth-first render, auto from 1000); retire the "full prompt" concept so the engine — not each block — supplies start/end framing (delivery UX still open, likely presets). DPL (item 7) is its authoring language and comes first. No de-duplication (non-goal). -
Review the 6
no-useless-assignmentspots. ESLint 10 promoted this rule intorecommended; it flags benign init-then-overwrite patterns insrc/server.js(×3),src/web/backend/indexImages.js(×2), andsrc/web/frontend/single.js(×1). Currently demoted towarnineslint.config.js. Either tidy the dead stores or leave as-is (changing them is behavior-neutral here, but low value).