ugly-app 0.1.145 → 0.1.147
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/dist/cli/version.d.ts +1 -1
- package/dist/cli/version.js +1 -1
- package/package.json +1 -1
- package/src/cli/version.ts +1 -1
- package/templates/.claude/skills/bot-swarm/SKILL.md +46 -6
- package/templates/.claude/skills/fix-feedback/SKILL.md +16 -1
- package/templates/client/main.tsx +9 -1
- package/templates/client/pages/HomePage.tsx +13 -51
package/dist/cli/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.1.
|
|
1
|
+
export declare const CLI_VERSION = "0.1.147";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/cli/version.js
CHANGED
package/package.json
CHANGED
package/src/cli/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated by prebuild — do not edit manually
|
|
2
|
-
export const CLI_VERSION = "0.1.
|
|
2
|
+
export const CLI_VERSION = "0.1.147";
|
|
@@ -8,12 +8,42 @@ user-invocable: true
|
|
|
8
8
|
|
|
9
9
|
Run one full autonomous cycle. No human input. No clarifying questions. Make the best possible decision at every step. If something breaks, fix it.
|
|
10
10
|
|
|
11
|
+
**CORE PRINCIPLE: Be maximally ambitious. Every bot in this swarm — feedback bots, maintain bot, manager — should push for big changes, not incremental tweaks. Feedback bots should request new features, major redesigns, and bold improvements — not just "move this button 2px." The maintain bot must implement everything requested, no matter how large. "Too complex" is never a valid reason to skip work. The only limit is violating Critical Rules in CLAUDE.md.**
|
|
12
|
+
|
|
13
|
+
## About the Website
|
|
14
|
+
|
|
15
|
+
This website can do **anything**. It is a full-stack app with AI capabilities, real-time data, and a complete UI component library. The current sample pages demonstrate a subset of what's possible:
|
|
16
|
+
|
|
17
|
+
- **AI Test** (`/ai-test`) — text generation (textGen) and image generation (imageGen)
|
|
18
|
+
- **Audio Test** (`/audio-test`) — text-to-speech (TTS) and speech-to-text (STT)
|
|
19
|
+
- **Kagi Test** (`/kagi-test`) — Kagi search API integration
|
|
20
|
+
- **UI Components** (`/ui-components`) — suite of common UI controls (buttons, cards, inputs, selects, modals, etc.)
|
|
21
|
+
- **Todo Demo** (`/todo-demo`) — real-time CRUD with live sync
|
|
22
|
+
- **Auth Demo** (`/auth-demo`) — OAuth login/logout
|
|
23
|
+
- **Path Params** (`/user/:userId`) and **Query Params** (`/search`) — routing demos
|
|
24
|
+
|
|
25
|
+
These are just samples. The bot swarm should treat the site as a blank canvas — feedback bots can request entirely new pages, features, layouts, data models, or integrations. There are no limits on what can be built.
|
|
26
|
+
|
|
11
27
|
## Prerequisites
|
|
12
28
|
|
|
13
|
-
-
|
|
29
|
+
- The dev server must be running with HMR and watchers disabled (see below)
|
|
14
30
|
- `.env` must have `UGLY_BOT_TOKEN` (from `npx ugly-app login`)
|
|
15
31
|
- Playwright must be installed (`npx playwright install chromium`)
|
|
16
32
|
|
|
33
|
+
### Starting the dev server (no HMR, no watch)
|
|
34
|
+
|
|
35
|
+
The bot swarm modifies source files while the server runs. To avoid HMR reloads and watcher interference mid-cycle, start the server without watchers:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 1. Start Docker (MongoDB + Redis)
|
|
39
|
+
docker compose up -d
|
|
40
|
+
|
|
41
|
+
# 2. Run the server directly (no tsx watch, no tsc --watch, no eslint --watch)
|
|
42
|
+
npx tsx --env-file=.env server/index.ts &
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Do **not** use `npm run dev` — it enables tsx watch, tsc watch, and eslint watch which conflict with bot file edits. After the maintain bot finishes and commits, the restart step (Step 5) will kill and restart the server to pick up changes.
|
|
46
|
+
|
|
17
47
|
## First Run Bootstrap
|
|
18
48
|
|
|
19
49
|
If `bots/` directory does not exist:
|
|
@@ -146,6 +176,8 @@ Dispatch ALL active personas as **parallel subagents**. Each subagent does:
|
|
|
146
176
|
}
|
|
147
177
|
}'
|
|
148
178
|
```
|
|
179
|
+
**Feedback bots should be ambitious in what they request.** Don't just report cosmetic nits — request new features, suggest adding entire new pages, propose redesigns, ask for search/filter/sort capabilities, request animations, dark mode, better navigation, new data models. Think like a demanding product manager, not a passive observer. The feedback should push the site to evolve rapidly.
|
|
180
|
+
|
|
149
181
|
8. Update `bots/feedback/active/{slug}/memory.md`:
|
|
150
182
|
```markdown
|
|
151
183
|
## Cycle [YYYY-MM-DD]
|
|
@@ -166,6 +198,8 @@ Record which bots succeeded and which failed/timed out.
|
|
|
166
198
|
|
|
167
199
|
Run sequentially in one session. No questions. Make autonomous decisions.
|
|
168
200
|
|
|
201
|
+
**AMBITION MANDATE: The maintain bot builds everything. There is no "too complex," "too risky," or "would require significant changes." If a feedback bot asked for it, you build it. New pages, new endpoints, new collections, migrations, full redesigns, multi-file refactors — all fair game. The only valid decline reason is a direct contradiction of a Critical Rule in CLAUDE.md. Everything else gets built, no matter how many files it touches or how large the change is.**
|
|
202
|
+
|
|
169
203
|
1. Read `bots/maintain/memory.md` for feature inventory and context
|
|
170
204
|
2. Mark all `new` feedback as `captured` to prevent double-processing:
|
|
171
205
|
- Run `npm run feedback --json` to get all feedback
|
|
@@ -178,8 +212,14 @@ Run sequentially in one session. No questions. Make autonomous decisions.
|
|
|
178
212
|
```
|
|
179
213
|
3. Invoke `/fix-feedback local` — run completely unattended:
|
|
180
214
|
- Do not ask which environment. Use `local`.
|
|
181
|
-
- For each feedback item: implement the fix or feature. Build it, no matter how large
|
|
182
|
-
-
|
|
215
|
+
- For each feedback item: implement the fix or feature. **Build it, no matter how large.**
|
|
216
|
+
- **Never decline feedback because it's "complex" or "ambitious."** If you're unsure how, read existing code and the ugly-app API reference, then figure it out.
|
|
217
|
+
- If feedback requires new pages: add routes in `shared/pages.ts`, components in `client/pages/`, mappings in `client/allPages.ts`.
|
|
218
|
+
- If feedback requires new endpoints: add to `shared/api.ts` and `server/index.ts`.
|
|
219
|
+
- If feedback requires new collections: add to `shared/collections.ts`, run `npm run db:init`.
|
|
220
|
+
- If feedback requires images: use `npm run imageGen -- "prompt" --output client/assets/<name>.png`.
|
|
221
|
+
- If feedback requires schema changes: write a migration in `server/migrations/`.
|
|
222
|
+
- Resolve each item via API with status `resolved` (preferred) or `declined` (only for Critical Rule violations) and a resolution message.
|
|
183
223
|
- Commit each change: `[bot] fix: ...` or `[bot] feat: ...`
|
|
184
224
|
4. Invoke `/fix-code` — run completely unattended:
|
|
185
225
|
- Fix all TypeScript errors, lint warnings, test failures.
|
|
@@ -245,7 +285,7 @@ Run sequentially in one session. No questions. Make autonomous decisions.
|
|
|
245
285
|
|
|
246
286
|
## Step 5 — Restart Loop
|
|
247
287
|
|
|
248
|
-
1. Stop the
|
|
288
|
+
1. Stop the server (find and kill the `npx tsx` server process)
|
|
249
289
|
2. Run `npm install` (maintain bot may have added packages in Step 3)
|
|
250
290
|
3. Run `npm run build`
|
|
251
291
|
4. **If build fails:**
|
|
@@ -255,13 +295,13 @@ Run sequentially in one session. No questions. Make autonomous decisions.
|
|
|
255
295
|
- Commit: `[bot] fix: build errors`
|
|
256
296
|
- Run `npm run build` again
|
|
257
297
|
- **Repeat until build succeeds. Do not stop. Do not ask for help.**
|
|
258
|
-
5. Start
|
|
298
|
+
5. Start the server without watchers: `npx tsx --env-file=.env server/index.ts &`
|
|
259
299
|
6. Wait for the server to be ready — poll `http://localhost:3000` with up to 60 retries (1s apart)
|
|
260
300
|
7. **If server fails to start or crashes:**
|
|
261
301
|
- Read the error output and/or `npm run error`
|
|
262
302
|
- Fix the code
|
|
263
303
|
- Commit: `[bot] fix: startup errors`
|
|
264
|
-
- Kill and restart `
|
|
304
|
+
- Kill and restart `npx tsx --env-file=.env server/index.ts &`
|
|
265
305
|
- **Repeat until server is healthy. Do not stop. Do not ask for help.**
|
|
266
306
|
8. Once healthy: update the journal cycle file's Restart outcome to `success` or note any fixes made
|
|
267
307
|
9. Commit any remaining changes: `[bot] fix: restart issues`
|
|
@@ -18,5 +18,20 @@ Run: `npm run feedback:server`
|
|
|
18
18
|
|
|
19
19
|
This fetches recent user feedback from MongoDB. For each piece of feedback:
|
|
20
20
|
1. Understand the user's issue or request
|
|
21
|
-
2. Implement the fix or feature
|
|
21
|
+
2. Implement the fix or feature — **no matter how large or complex**
|
|
22
22
|
3. Run `npm run build` to verify it compiles
|
|
23
|
+
|
|
24
|
+
## Ambition policy
|
|
25
|
+
|
|
26
|
+
**You must attempt every piece of feedback.** There is no such thing as "too complex" or "too risky" or "out of scope." If a user asked for it, build it. This includes:
|
|
27
|
+
|
|
28
|
+
- New pages, new collections, new API endpoints
|
|
29
|
+
- Major UI redesigns or layout overhauls
|
|
30
|
+
- Adding entirely new features (search, filtering, sorting, animations, themes)
|
|
31
|
+
- Generating images with `npm run imageGen` when visuals are needed
|
|
32
|
+
- Writing migrations when collection schemas must change
|
|
33
|
+
- Multi-file changes that touch client, server, and shared simultaneously
|
|
34
|
+
|
|
35
|
+
The only valid reason to decline feedback is if it contradicts a Critical Rule in CLAUDE.md (e.g. "commit .env" or "add `any` types"). Everything else gets built.
|
|
36
|
+
|
|
37
|
+
If you're unsure how to implement something, read the existing code, read the ugly-app API reference, and figure it out. Do not skip it. Do not defer it. Do not say "this would require significant refactoring" — just do the refactoring.
|
|
@@ -48,6 +48,14 @@ if (!token) {
|
|
|
48
48
|
);
|
|
49
49
|
})
|
|
50
50
|
.catch(() => {
|
|
51
|
-
|
|
51
|
+
root.render(
|
|
52
|
+
<RouterProvider
|
|
53
|
+
fallback={<div>404 — Page not found</div>}
|
|
54
|
+
loginFallback={loginPopup}
|
|
55
|
+
isAuthenticated={() => false}
|
|
56
|
+
>
|
|
57
|
+
<App socket={null} />
|
|
58
|
+
</RouterProvider>,
|
|
59
|
+
);
|
|
52
60
|
});
|
|
53
61
|
}
|
|
@@ -142,39 +142,6 @@ function HomePageBody({
|
|
|
142
142
|
|
|
143
143
|
const ctaLabel = getCtaLabel(branches);
|
|
144
144
|
|
|
145
|
-
const navItems = [
|
|
146
|
-
{
|
|
147
|
-
href: '/auth-demo',
|
|
148
|
-
label: 'Auth Demo',
|
|
149
|
-
desc: 'Login, logout, and user info',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
href: '/user/example-user-id',
|
|
153
|
-
label: 'Path Params Demo',
|
|
154
|
-
desc: 'URL: /user/:userId',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
href: '/search?q=hello',
|
|
158
|
-
label: 'Query Params Demo',
|
|
159
|
-
desc: 'URL: /search?q=...',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
href: '/ai-test',
|
|
163
|
-
label: 'AI Test',
|
|
164
|
-
desc: 'Text & image generation models',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
href: '/ui-components',
|
|
168
|
-
label: 'UI Components',
|
|
169
|
-
desc: 'Live demos of all built-in components',
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
href: '/todo-demo',
|
|
173
|
-
label: 'Todo Demo',
|
|
174
|
-
desc: 'Real-time CRUD with trackDocs & trackKeys',
|
|
175
|
-
},
|
|
176
|
-
];
|
|
177
|
-
|
|
178
145
|
return (
|
|
179
146
|
<div style={{ maxWidth: 640, margin: '0 auto', padding: 24, display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
180
147
|
<Card>
|
|
@@ -195,29 +162,24 @@ function HomePageBody({
|
|
|
195
162
|
</div>
|
|
196
163
|
)}
|
|
197
164
|
</Card>
|
|
198
|
-
|
|
199
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
200
|
-
{navItems.map(({ href, label, desc }) => (
|
|
201
|
-
<a key={href} href={href} style={{ textDecoration: 'none', color: 'inherit' }}>
|
|
202
|
-
<Card>
|
|
203
|
-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
204
|
-
<div>
|
|
205
|
-
<Text weight="medium">{label}</Text>
|
|
206
|
-
<Text size="sm" style={{ opacity: 0.6, marginTop: 2 }}>{desc}</Text>
|
|
207
|
-
</div>
|
|
208
|
-
<span style={{ fontSize: 20, opacity: 0.3 }}>→</span>
|
|
209
|
-
</div>
|
|
210
|
-
</Card>
|
|
211
|
-
</a>
|
|
212
|
-
))}
|
|
213
|
-
</div>
|
|
214
165
|
</div>
|
|
215
166
|
);
|
|
216
167
|
}
|
|
217
168
|
|
|
218
169
|
export default function HomePage(): React.ReactElement {
|
|
219
|
-
|
|
220
|
-
|
|
170
|
+
// Check both that a token exists AND that AppProvider is available.
|
|
171
|
+
// When the token is present but invalid (e.g. expired), the socket
|
|
172
|
+
// connection fails and we render without AppProvider — so we must
|
|
173
|
+
// fall back to the unauthenticated view to avoid a useApp() crash
|
|
174
|
+
// that causes an infinite reload loop.
|
|
175
|
+
let isLoggedIn = false;
|
|
176
|
+
try {
|
|
177
|
+
// useApp throws if there is no AppProvider ancestor
|
|
178
|
+
useApp();
|
|
179
|
+
isLoggedIn = true;
|
|
180
|
+
} catch {
|
|
181
|
+
isLoggedIn = false;
|
|
182
|
+
}
|
|
221
183
|
if (isLoggedIn) return <HomePageAuthenticated />;
|
|
222
184
|
return <HomePageUnauthenticated />;
|
|
223
185
|
}
|