@eventmodelers/cli 0.0.1
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 +175 -0
- package/cli.js +676 -0
- package/package.json +35 -0
- package/shared/build-kit/code-export.mjs +560 -0
- package/shared/build-kit/lib/ollama-agent.js +147 -0
- package/shared/build-kit/package.json +11 -0
- package/shared/build-kit/ralph-ollama.js +39 -0
- package/shared/build-kit/realtime-agent.js +18 -0
- package/stacks/axon/templates/.claude/skills/build-automation/SKILL.md +407 -0
- package/stacks/axon/templates/.claude/skills/build-automation/references/feature-flag-patterns.md +114 -0
- package/stacks/axon/templates/.claude/skills/build-automation-workflow/SKILL.md +496 -0
- package/stacks/axon/templates/.claude/skills/build-automation-workflow/references/axon-workflow-api.md +279 -0
- package/stacks/axon/templates/.claude/skills/build-automation-workflow/references/feature-flag-patterns.md +114 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/SKILL.md +396 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/references/axon-test-fixture-patterns.md +162 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/references/feature-flag-patterns.md +56 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/references/rest-api-patterns.md +115 -0
- package/stacks/axon/templates/.claude/skills/build-state-view/SKILL.md +282 -0
- package/stacks/axon/templates/.claude/skills/connect/SKILL.md +178 -0
- package/stacks/axon/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +611 -0
- package/stacks/axon/templates/.claude/skills/load-slice/SKILL.md +141 -0
- package/stacks/axon/templates/.claude/skills/update-slice-status/SKILL.md +105 -0
- package/stacks/axon/templates/build-kit/lib/AGENT.md +47 -0
- package/stacks/axon/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/axon/templates/build-kit/lib/backend-prompt.md +158 -0
- package/stacks/axon/templates/build-kit/lib/prompt.md +126 -0
- package/stacks/axon/templates/build-kit/lib/ralph.js +369 -0
- package/stacks/axon/templates/build-kit/ralph-claude.js +44 -0
- package/stacks/axon/templates/build-kit/ralph.sh +98 -0
- package/stacks/axon/templates/root/.env.example +5 -0
- package/stacks/axon/templates/root/CLAUDE.md +60 -0
- package/stacks/axon/templates/root/README.md +44 -0
- package/stacks/axon/templates/root/docker-compose.yml +64 -0
- package/stacks/axon/templates/root/mvnw +259 -0
- package/stacks/axon/templates/root/mvnw.cmd +149 -0
- package/stacks/axon/templates/root/pom.xml +125 -0
- package/stacks/axon/templates/root/src/main/java/io/axoniq/quickstart/QuickstartApplication.java +128 -0
- package/stacks/axon/templates/root/src/main/java/io/axoniq/quickstart/config/WebConfig.java +155 -0
- package/stacks/axon/templates/root/src/main/resources/application.properties +2 -0
- package/stacks/axon/templates/root/src/main/resources/static/bg-body.png +0 -0
- package/stacks/axon/templates/root/src/main/resources/static/bg-header.png +0 -0
- package/stacks/axon/templates/root/src/main/resources/static/index.html +596 -0
- package/stacks/cratis-csharp/templates/.claude/skills/_shared/cratis-conventions.md +251 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-automation/SKILL.md +99 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-automation/references/patterns.md +115 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-change/SKILL.md +163 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-change/references/patterns.md +234 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-view/SKILL.md +120 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-view/references/patterns.md +166 -0
- package/stacks/cratis-csharp/templates/.claude/skills/connect/SKILL.md +169 -0
- package/stacks/cratis-csharp/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +609 -0
- package/stacks/cratis-csharp/templates/.claude/skills/load-slice/SKILL.md +141 -0
- package/stacks/cratis-csharp/templates/.claude/skills/update-slice-status/SKILL.md +105 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/AGENT.md +58 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/backend-prompt.md +129 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/prompt.md +124 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/ralph.js +302 -0
- package/stacks/cratis-csharp/templates/build-kit/ralph-claude.js +37 -0
- package/stacks/cratis-csharp/templates/build-kit/ralph.sh +98 -0
- package/stacks/cratis-csharp/templates/root/.frontend/index.css +29 -0
- package/stacks/cratis-csharp/templates/root/.frontend/index.html +17 -0
- package/stacks/cratis-csharp/templates/root/.frontend/main.tsx +18 -0
- package/stacks/cratis-csharp/templates/root/.frontend/tsconfig.json +42 -0
- package/stacks/cratis-csharp/templates/root/.frontend/tsconfig.node.json +11 -0
- package/stacks/cratis-csharp/templates/root/.frontend/vite.config.ts +56 -0
- package/stacks/cratis-csharp/templates/root/App.tsx +23 -0
- package/stacks/cratis-csharp/templates/root/CLAUDE.md +62 -0
- package/stacks/cratis-csharp/templates/root/CratisApp.csproj +25 -0
- package/stacks/cratis-csharp/templates/root/CratisApp.sln +18 -0
- package/stacks/cratis-csharp/templates/root/GlobalUsings.cs +3 -0
- package/stacks/cratis-csharp/templates/root/Home.tsx +102 -0
- package/stacks/cratis-csharp/templates/root/Program.cs +26 -0
- package/stacks/cratis-csharp/templates/root/README.md +192 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/AllListings.ts +47 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/Listing.cs +11 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/Listing.ts +12 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/ListingDataTable.tsx +17 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/index.ts +1 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/Register.ts +51 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/RegisterDialog.tsx +18 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/Registration.cs +27 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/index.ts +1 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/SomeFeature.tsx +22 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/SomeName.cs +3 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/index.ts +1 -0
- package/stacks/cratis-csharp/templates/root/appsettings.Development.json +9 -0
- package/stacks/cratis-csharp/templates/root/appsettings.json +26 -0
- package/stacks/cratis-csharp/templates/root/docker-compose.yml +23 -0
- package/stacks/cratis-csharp/templates/root/package.json +33 -0
- package/stacks/cratis-csharp/templates/root/tsconfig.json +3 -0
- package/stacks/modeling-kit/templates/.claude/settings.local.json +13 -0
- package/stacks/modeling-kit/templates/.claude/skills/analyze-existing-model/SKILL.md +215 -0
- package/stacks/modeling-kit/templates/.claude/skills/attributes/SKILL.md +176 -0
- package/stacks/modeling-kit/templates/.claude/skills/connect/SKILL.md +182 -0
- package/stacks/modeling-kit/templates/.claude/skills/discover-storyboard/SKILL.md +383 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/SKILL.md +465 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/SKILL.md +587 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/references/facilitating-event-modeling-workshops.md +626 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/SKILL.md +542 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/SKILL.md +497 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md +783 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/SKILL.md +604 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/SKILL.md +699 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-integrating-legacy-systems/SKILL.md +674 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/SKILL.md +231 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/domain-patterns.md +150 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/patterns.md +329 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/snapshotting.md +204 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md +352 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/references/project-planning-with-event-modeling.md +341 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-plotting-events/SKILL.md +153 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/SKILL.md +136 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/examples.md +78 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/patterns.md +85 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/SKILL.md +655 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-translating-external-events/SKILL.md +479 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/SKILL.md +234 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models-checklist/SKILL.md +353 -0
- package/stacks/modeling-kit/templates/.claude/skills/examples/SKILL.md +200 -0
- package/stacks/modeling-kit/templates/.claude/skills/handle-comment/SKILL.md +94 -0
- package/stacks/modeling-kit/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +441 -0
- package/stacks/modeling-kit/templates/.claude/skills/place-element/SKILL.md +290 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard/SKILL.md +212 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard-screen/SKILL.md +123 -0
- package/stacks/modeling-kit/templates/.claude/skills/timeline/SKILL.md +353 -0
- package/stacks/modeling-kit/templates/.claude/skills/update-slice-status/SKILL.md +110 -0
- package/stacks/modeling-kit/templates/.claude/skills/wdyt/SKILL.md +134 -0
- package/stacks/modeling-kit/templates/kit/lib/agent.sh +20 -0
- package/stacks/modeling-kit/templates/kit/lib/ollama-agent.js +147 -0
- package/stacks/modeling-kit/templates/kit/lib/ralph.js +286 -0
- package/stacks/modeling-kit/templates/kit/package.json +12 -0
- package/stacks/modeling-kit/templates/kit/ralph-claude.js +50 -0
- package/stacks/modeling-kit/templates/kit/ralph-ollama.js +38 -0
- package/stacks/modeling-kit/templates/kit/ralph.sh +61 -0
- package/stacks/modeling-kit/templates/kit/realtime-agent.js +18 -0
- package/stacks/modeling-kit/templates/root/CLAUDE.md +56 -0
- package/stacks/node/templates/.claude/skills/build-automation/SKILL.md +266 -0
- package/stacks/node/templates/.claude/skills/build-state-change/SKILL.md +344 -0
- package/stacks/node/templates/.claude/skills/build-state-view/SKILL.md +412 -0
- package/stacks/node/templates/.claude/skills/connect/SKILL.md +178 -0
- package/stacks/node/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +628 -0
- package/stacks/node/templates/.claude/skills/load-slice/SKILL.md +143 -0
- package/stacks/node/templates/.claude/skills/update-slice-status/SKILL.md +110 -0
- package/stacks/node/templates/build-kit/README.md +86 -0
- package/stacks/node/templates/build-kit/lib/AGENT.md +47 -0
- package/stacks/node/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/node/templates/build-kit/lib/backend-prompt.md +152 -0
- package/stacks/node/templates/build-kit/lib/prompt.md +122 -0
- package/stacks/node/templates/build-kit/lib/ralph.js +369 -0
- package/stacks/node/templates/build-kit/ralph-claude.js +44 -0
- package/stacks/node/templates/build-kit/ralph.sh +98 -0
- package/stacks/node/templates/root/.env.example +15 -0
- package/stacks/node/templates/root/CLAUDE.md +60 -0
- package/stacks/node/templates/root/docker-compose.yml +15 -0
- package/stacks/node/templates/root/flyway.conf +17 -0
- package/stacks/node/templates/root/migrations/V1__schema.sql.example +12 -0
- package/stacks/node/templates/root/package.json +50 -0
- package/stacks/node/templates/root/server.ts +130 -0
- package/stacks/node/templates/root/setup-env.sh +53 -0
- package/stacks/node/templates/root/src/common/assertions.ts +6 -0
- package/stacks/node/templates/root/src/common/db.ts +32 -0
- package/stacks/node/templates/root/src/common/loadPostgresEventstore.ts +23 -0
- package/stacks/node/templates/root/src/common/parseEndpoint.ts +51 -0
- package/stacks/node/templates/root/src/common/processorDlq.ts +28 -0
- package/stacks/node/templates/root/src/common/realtimeBroadcast.ts +12 -0
- package/stacks/node/templates/root/src/common/replay.ts +16 -0
- package/stacks/node/templates/root/src/common/routes.ts +19 -0
- package/stacks/node/templates/root/src/common/testHelpers.ts +44 -0
- package/stacks/node/templates/root/src/swagger.ts +34 -0
- package/stacks/node/templates/root/src/util/assertions.ts +6 -0
- package/stacks/node/templates/root/src/util/hash.ts +9 -0
- package/stacks/node/templates/root/src/util/sanitize.ts +23 -0
- package/stacks/node/templates/root/tsconfig.json +32 -0
- package/stacks/node/templates/root/vercel.json +8 -0
- package/stacks/supabase/templates/.claude/skills/build-automation/SKILL.md +266 -0
- package/stacks/supabase/templates/.claude/skills/build-state-change/SKILL.md +344 -0
- package/stacks/supabase/templates/.claude/skills/build-state-view/SKILL.md +390 -0
- package/stacks/supabase/templates/.claude/skills/build-webhook/SKILL.md +303 -0
- package/stacks/supabase/templates/.claude/skills/connect/SKILL.md +178 -0
- package/stacks/supabase/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +628 -0
- package/stacks/supabase/templates/.claude/skills/load-slice/SKILL.md +143 -0
- package/stacks/supabase/templates/.claude/skills/update-slice-status/SKILL.md +110 -0
- package/stacks/supabase/templates/build-kit/README.md +86 -0
- package/stacks/supabase/templates/build-kit/lib/AGENT.md +47 -0
- package/stacks/supabase/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/supabase/templates/build-kit/lib/backend-prompt.md +152 -0
- package/stacks/supabase/templates/build-kit/lib/prompt.md +123 -0
- package/stacks/supabase/templates/build-kit/lib/ralph.js +369 -0
- package/stacks/supabase/templates/build-kit/ralph-claude.js +44 -0
- package/stacks/supabase/templates/build-kit/ralph.sh +98 -0
- package/stacks/supabase/templates/root/.env.example +22 -0
- package/stacks/supabase/templates/root/CLAUDE.md +61 -0
- package/stacks/supabase/templates/root/flyway.conf +17 -0
- package/stacks/supabase/templates/root/package.json +52 -0
- package/stacks/supabase/templates/root/server.ts +177 -0
- package/stacks/supabase/templates/root/setup-env.sh +53 -0
- package/stacks/supabase/templates/root/src/common/assertions.ts +6 -0
- package/stacks/supabase/templates/root/src/common/db.ts +32 -0
- package/stacks/supabase/templates/root/src/common/loadPostgresEventstore.ts +23 -0
- package/stacks/supabase/templates/root/src/common/parseEndpoint.ts +51 -0
- package/stacks/supabase/templates/root/src/common/processorDlq.ts +28 -0
- package/stacks/supabase/templates/root/src/common/realtimeBroadcast.ts +19 -0
- package/stacks/supabase/templates/root/src/common/replay.ts +16 -0
- package/stacks/supabase/templates/root/src/common/routes.ts +23 -0
- package/stacks/supabase/templates/root/src/common/testHelpers.ts +54 -0
- package/stacks/supabase/templates/root/src/supabase/README.md +141 -0
- package/stacks/supabase/templates/root/src/supabase/api.ts +56 -0
- package/stacks/supabase/templates/root/src/supabase/requireOrgaAdmin.ts +32 -0
- package/stacks/supabase/templates/root/src/supabase/requireSysUser.ts +40 -0
- package/stacks/supabase/templates/root/src/supabase/requireUser.ts +72 -0
- package/stacks/supabase/templates/root/src/swagger.ts +34 -0
- package/stacks/supabase/templates/root/src/util/assertions.ts +6 -0
- package/stacks/supabase/templates/root/src/util/hash.ts +9 -0
- package/stacks/supabase/templates/root/src/util/sanitize.ts +23 -0
- package/stacks/supabase/templates/root/supabase/config.toml +295 -0
- package/stacks/supabase/templates/root/supabase/migrations/V1__schema.sql.example +12 -0
- package/stacks/supabase/templates/root/supabase/seed.sql +1 -0
- package/stacks/supabase/templates/root/tsconfig.json +32 -0
- package/stacks/supabase/templates/root/vercel.json +8 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: discover-storyboard
|
|
3
|
+
description: Navigate an existing web app using browser automation MCP (Puppeteer/Playwright/Chrome DevTools), capture screenshots at each step, and build one or more storyboard timelines on the board with real screenshots as SCREEN nodes — ready for event modeling
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Discover Storyboard
|
|
7
|
+
|
|
8
|
+
> **FIRST — before invoking `connect` or anything else**: check for a browser automation MCP (Step 0). If none is found, stop immediately.
|
|
9
|
+
|
|
10
|
+
You are discovering the UI flows of an existing system by navigating it with a browser, taking screenshots, and uploading them to the eventmodelers board as SCREEN nodes — one per column, arranged chronologically in timelines so the team can build an event model from the real application.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Step 0 — Check for browser automation MCP
|
|
15
|
+
|
|
16
|
+
Use `ToolSearch` to look for browser automation tools. Run these searches in order until you find a match:
|
|
17
|
+
|
|
18
|
+
| Search query | What to look for in results |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `puppeteer navigate` | `puppeteer_navigate`, `puppeteer_screenshot`, `puppeteer_click` |
|
|
21
|
+
| `playwright browser` | `browser_navigate`, `browser_screenshot`, `browser_click`, `browser_take_screenshot` |
|
|
22
|
+
| `chrome devtools screenshot` | any navigate + screenshot + click tool set |
|
|
23
|
+
|
|
24
|
+
From the results, identify and save:
|
|
25
|
+
|
|
26
|
+
| Variable | What to assign |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `NAVIGATE_TOOL` | the tool that navigates to a URL (e.g. `puppeteer_navigate`) |
|
|
29
|
+
| `SCREENSHOT_TOOL` | the tool that captures a screenshot (e.g. `puppeteer_screenshot`) |
|
|
30
|
+
| `CLICK_TOOL` | the tool that clicks an element (e.g. `puppeteer_click`) |
|
|
31
|
+
| `CONTENT_TOOL` | the tool that returns page HTML or text (e.g. `puppeteer_get_content`, `browser_snapshot`) |
|
|
32
|
+
| `FILL_TOOL` | the tool that fills an input field (e.g. `puppeteer_fill`, `browser_type`) — optional |
|
|
33
|
+
|
|
34
|
+
**If no navigate + screenshot tools are found in any search**, print this message and stop completely:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Chrome DevTools / browser automation MCP is not configured.
|
|
38
|
+
|
|
39
|
+
Install a browser automation MCP and restart Claude Code. Options:
|
|
40
|
+
• Puppeteer MCP: @modelcontextprotocol/server-puppeteer
|
|
41
|
+
• Playwright MCP: @playwright/mcp
|
|
42
|
+
|
|
43
|
+
Once installed, run /discover-storyboard again.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Do NOT invoke `connect`. Do NOT proceed to Step 1.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 1 — Connect
|
|
51
|
+
|
|
52
|
+
Invoke the `connect` skill to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until all four are available.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Step 2 — Gather discovery parameters (interactive)
|
|
57
|
+
|
|
58
|
+
Always ask these two questions before proceeding — even if arguments were passed inline.
|
|
59
|
+
|
|
60
|
+
### Question 1 — URL
|
|
61
|
+
|
|
62
|
+
Ask the user:
|
|
63
|
+
> "What URL should I open to start the discovery? (e.g. `http://localhost:3000`)"
|
|
64
|
+
|
|
65
|
+
Wait for the answer. Save as `startUrl`. Do not proceed until a URL is provided.
|
|
66
|
+
|
|
67
|
+
### Question 2 — Discovery focus
|
|
68
|
+
|
|
69
|
+
Ask the user:
|
|
70
|
+
> "Any guidance for the discovery? For example:
|
|
71
|
+
> - Focus on a specific flow (e.g. 'only the checkout flow')
|
|
72
|
+
> - Ignore certain sections (e.g. 'skip the admin panel', 'ignore login pages')
|
|
73
|
+
> - A particular user journey to follow (e.g. 'register a new account then book a room')
|
|
74
|
+
> - Leave blank to discover all visible flows automatically."
|
|
75
|
+
|
|
76
|
+
Wait for the answer (or a blank/skip). Save as `discoveryGuidance`. If blank, set to `"explore all visible flows"`.
|
|
77
|
+
|
|
78
|
+
### Additional parameters (from `$ARGUMENTS` only — do not ask)
|
|
79
|
+
|
|
80
|
+
| Field | How to find it | Default |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `maxScreenshots` | any number mentioned, e.g. "up to 20 screens" | 15 |
|
|
83
|
+
| `chapterId` | an existing chapter UUID to add screens to | omit = create new chapter per flow |
|
|
84
|
+
| `boardId` | explicit board override | from `connect` skill |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Step 3 — Prepare screenshot storage
|
|
89
|
+
|
|
90
|
+
Create a local temp directory to store screenshots during this session:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
mkdir -p /tmp/discover-storyboard
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Screenshots will be saved as `/tmp/discover-storyboard/screen-001.png`, `screen-002.png`, etc.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Step 4 — Navigate and capture screens
|
|
101
|
+
|
|
102
|
+
Use the browser tools identified in Step 0. Process screens **one at a time** — navigate, screenshot, understand, decide next action.
|
|
103
|
+
|
|
104
|
+
### 4a — Start at the entry URL
|
|
105
|
+
|
|
106
|
+
1. Navigate to `startUrl` using `NAVIGATE_TOOL`
|
|
107
|
+
2. Wait briefly for the page to settle
|
|
108
|
+
3. Take a screenshot using `SCREENSHOT_TOOL` — save to `/tmp/discover-storyboard/screen-001.png`
|
|
109
|
+
4. Use `CONTENT_TOOL` to read the page structure and compose a `description` for this screen covering three things:
|
|
110
|
+
- **What it shows**: the main content and purpose of this screen
|
|
111
|
+
- **How the user got here**: `"Initial load"` for the entry screen
|
|
112
|
+
- **What actions are possible**: list the primary user actions available (buttons, forms, links that lead somewhere meaningful) — expressed as intent, not UI labels (e.g. "user can submit a new order", "user can filter products by category")
|
|
113
|
+
|
|
114
|
+
Record this screen:
|
|
115
|
+
```
|
|
116
|
+
screens = [
|
|
117
|
+
{
|
|
118
|
+
index: 1,
|
|
119
|
+
title: "<page title or heading>",
|
|
120
|
+
url: "<current url>",
|
|
121
|
+
filepath: "/tmp/discover-storyboard/screen-001.png",
|
|
122
|
+
flowHint: "<which flow this belongs to, e.g. 'Navigation / Home'>",
|
|
123
|
+
description: "Shows <what>. Arrived via: initial load. Actions: <user can do X>, <user can do Y>, <user can do Z>."
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 4b — Explore the flows
|
|
129
|
+
|
|
130
|
+
For each subsequent screen (up to `maxScreenshots`):
|
|
131
|
+
|
|
132
|
+
**Decide what to do next — always guided by `discoveryGuidance`:**
|
|
133
|
+
- If guidance names a specific flow or journey → follow only that path closely
|
|
134
|
+
- If guidance says to ignore certain sections → skip those links entirely
|
|
135
|
+
- If guidance describes a user journey (e.g. "register then book") → follow those steps in sequence, filling forms as needed
|
|
136
|
+
- If guidance is "explore all visible flows" → cover the primary navigation paths, one main section at a time
|
|
137
|
+
|
|
138
|
+
**Priority order for next interactions:**
|
|
139
|
+
1. Primary navigation items (top nav, sidebar) — explore each main section
|
|
140
|
+
2. Main call-to-action buttons on the current page (e.g. "Add to cart", "Sign up", "Submit")
|
|
141
|
+
3. Form submissions (fill required fields with plausible example values, then submit)
|
|
142
|
+
4. State transitions (e.g. after "Order Placed" → go to order confirmation page)
|
|
143
|
+
|
|
144
|
+
**Skip:**
|
|
145
|
+
- External links (different domain)
|
|
146
|
+
- Already-visited URLs
|
|
147
|
+
- Logout / destructive actions (unless explicitly in `flowDescription`)
|
|
148
|
+
- Settings / admin-only sections (unless explicitly requested)
|
|
149
|
+
- Repeated UI patterns with identical structure
|
|
150
|
+
|
|
151
|
+
After each interaction:
|
|
152
|
+
1. Take a screenshot → save to `/tmp/discover-storyboard/screen-NNN.png` (increment counter)
|
|
153
|
+
2. Use `CONTENT_TOOL` to read the page and compose a `description` covering:
|
|
154
|
+
- **What it shows**: the main content and purpose of this screen
|
|
155
|
+
- **How the user got here**: the action taken to reach this screen (e.g. "clicked 'Add to cart'", "submitted login form")
|
|
156
|
+
- **What actions are possible**: primary user actions expressed as intent (e.g. "user can confirm the order", "user can apply a discount code")
|
|
157
|
+
3. Append to `screens` array with:
|
|
158
|
+
- `title` — the page/modal title
|
|
159
|
+
- `url` — current URL
|
|
160
|
+
- `filepath` — local file path
|
|
161
|
+
- `flowHint` — which logical flow this screen belongs to
|
|
162
|
+
- `description` — "Shows <what>. Arrived via: <interaction>. Actions: <user can do X>, <user can do Y>."
|
|
163
|
+
|
|
164
|
+
Continue until `maxScreenshots` is reached or no new screens are discoverable.
|
|
165
|
+
|
|
166
|
+
### 4c — Group screens into flows
|
|
167
|
+
|
|
168
|
+
After all screenshots are collected, group `screens` by `flowHint` into flows:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
flows = [
|
|
172
|
+
{
|
|
173
|
+
name: "Login & Authentication",
|
|
174
|
+
screens: [screen-001, screen-002, screen-003]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "Product Browsing",
|
|
178
|
+
screens: [screen-004, screen-005, screen-006]
|
|
179
|
+
},
|
|
180
|
+
...
|
|
181
|
+
]
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Rules:**
|
|
185
|
+
- If all screens clearly belong to one linear journey → one flow, one timeline
|
|
186
|
+
- If screens span distinct sections → one flow per section
|
|
187
|
+
- If `chapterId` was provided in Step 2 → put ALL screens in that single chapter (ignore flow grouping)
|
|
188
|
+
- Aim for 3–12 screens per flow; split or merge to stay in that range
|
|
189
|
+
|
|
190
|
+
Tell the user:
|
|
191
|
+
```
|
|
192
|
+
Discovered N screens across M flows:
|
|
193
|
+
Flow 1: "Login & Authentication" — 3 screens
|
|
194
|
+
Flow 2: "Product Browsing" — 5 screens
|
|
195
|
+
...
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Step 5 — Create chapters for each flow
|
|
201
|
+
|
|
202
|
+
**If `chapterId` was provided** — use it as the single `CHAPTER_ID` for all screens. Skip this step.
|
|
203
|
+
|
|
204
|
+
**Otherwise** — for each flow, create one chapter:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/chapters" \
|
|
208
|
+
-H "x-token: $TOKEN" \
|
|
209
|
+
-H "Content-Type: application/json" \
|
|
210
|
+
-d '{"position":{"x":0,"y":0}}'
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Extract `id` → `CHAPTER_ID` for this flow.
|
|
214
|
+
|
|
215
|
+
Update the chapter title to the flow name using `node:changed`:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
219
|
+
-H "x-token: $TOKEN" \
|
|
220
|
+
-H "x-board-id: $BOARD_ID" \
|
|
221
|
+
-H "x-user-id: discover-storyboard" \
|
|
222
|
+
-H "Content-Type: application/json" \
|
|
223
|
+
-d '[{
|
|
224
|
+
"id": "<uuid>",
|
|
225
|
+
"eventType": "node:changed",
|
|
226
|
+
"nodeId": "<CHAPTER_ID>",
|
|
227
|
+
"boardId": "<BOARD_ID>",
|
|
228
|
+
"timestamp": <NOW_MS>,
|
|
229
|
+
"changedAttributes": ["meta.title"],
|
|
230
|
+
"meta": { "type": "CHAPTER", "title": "<flow name>" },
|
|
231
|
+
"node": { "id": "<CHAPTER_ID>", "data": {} }
|
|
232
|
+
}]'
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Save `CHAPTER_ID` against each flow.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Step 6 — Fetch chapter grid and build column queue
|
|
240
|
+
|
|
241
|
+
For each chapter, fetch its current grid state:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
curl -s -H "x-token: $TOKEN" \
|
|
245
|
+
"$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$CHAPTER_ID"
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
From `meta.timelineData`:
|
|
249
|
+
- `rows` — find the row with `type === "actor"` → save its `id` as `actorRowId`
|
|
250
|
+
- `columns` — ordered list; build an empty-column queue
|
|
251
|
+
|
|
252
|
+
**Cell ID convention**: `<rowId>-<columnId>` — always computed directly, never looked up.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Step 7 — Place SCREEN nodes and upload screenshots
|
|
257
|
+
|
|
258
|
+
Process each flow's screens **one at a time in order**.
|
|
259
|
+
|
|
260
|
+
For each screen:
|
|
261
|
+
|
|
262
|
+
### 7a — Acquire a column slot
|
|
263
|
+
|
|
264
|
+
**If the empty-column queue is non-empty** — pop the first entry → `columnId`. Compute `CELL_ID = actorRowId + "-" + columnId`.
|
|
265
|
+
|
|
266
|
+
**If the empty-column queue is empty** — create a new column:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/timelines/$CHAPTER_ID/columns" \
|
|
270
|
+
-H "x-token: $TOKEN" \
|
|
271
|
+
-H "x-board-id: $BOARD_ID" \
|
|
272
|
+
-H "x-user-id: discover-storyboard" \
|
|
273
|
+
-H "Content-Type: application/json" \
|
|
274
|
+
-d '{}'
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Extract `columnId`. Compute `CELL_ID = actorRowId + "-" + columnId`.
|
|
278
|
+
|
|
279
|
+
### 7b — Generate UUID and upload the screenshot
|
|
280
|
+
|
|
281
|
+
Generate UUIDs for `SCREEN_NODE_ID` and `EVT_ID`:
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
python3 -c "import uuid; print(uuid.uuid4())"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Upload the saved screenshot file using `SCREEN_NODE_ID` **before** creating the node:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/images/$SCREEN_NODE_ID" \
|
|
291
|
+
-H "x-token: $TOKEN" \
|
|
292
|
+
-F "file=@<screen.filepath>"
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
> **Note**: This uploads the real screenshot to the SCREEN node — it is a different endpoint from the sketch API. The sketch API (`/images/$NODE/sketch`) renders AI-generated wireframe elements. This endpoint (`/images/$NODE`) uploads an actual image file.
|
|
296
|
+
|
|
297
|
+
Log success or failure. On failure, note it in the final report but continue.
|
|
298
|
+
|
|
299
|
+
### 7c — Create the SCREEN node
|
|
300
|
+
|
|
301
|
+
Now create the SCREEN node using the same `SCREEN_NODE_ID` (the image is already uploaded for it):
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
305
|
+
-H "x-token: $TOKEN" \
|
|
306
|
+
-H "x-board-id: $BOARD_ID" \
|
|
307
|
+
-H "x-user-id: discover-storyboard" \
|
|
308
|
+
-H "Content-Type: application/json" \
|
|
309
|
+
-d '[{
|
|
310
|
+
"id": "<EVT_ID>",
|
|
311
|
+
"eventType": "node:created",
|
|
312
|
+
"nodeId": "<SCREEN_NODE_ID>",
|
|
313
|
+
"boardId": "<BOARD_ID>",
|
|
314
|
+
"timestamp": <NOW_MS>,
|
|
315
|
+
"chapterId": "<CHAPTER_ID>",
|
|
316
|
+
"cellId": "<CELL_ID>",
|
|
317
|
+
"meta": {
|
|
318
|
+
"type": "SCREEN",
|
|
319
|
+
"title": "<screen.title>",
|
|
320
|
+
"description": "<screen.description — 'Shows X. Arrived via: Y. Actions: user can do A, user can do B.'>"
|
|
321
|
+
},
|
|
322
|
+
"node": { "id": "<SCREEN_NODE_ID>", "data": {} }
|
|
323
|
+
}]'
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Verify the response contains `"hashes"`. If it fails, log the error and continue to the next screen — do not stop the entire run.
|
|
327
|
+
|
|
328
|
+
### 7d — Verify the screen
|
|
329
|
+
|
|
330
|
+
Confirm the node and its uploaded screenshot both actually exist:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/screens/$SCREEN_NODE_ID/verify" \
|
|
334
|
+
-H "x-token: $TOKEN"
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
If `valid` is `false`, read the `error` field. If `imageExists` is `false`, the screenshot upload in 7b failed silently — retry it once. Log any screen that still fails verification in the final report and continue to the next screen.
|
|
338
|
+
|
|
339
|
+
### 7e — Report per-screen progress
|
|
340
|
+
|
|
341
|
+
After each screen: print one line, e.g.:
|
|
342
|
+
```
|
|
343
|
+
✓ Screen 3/8 — "Checkout Confirmation" placed in flow "Checkout"
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## Step 8 — Final report
|
|
349
|
+
|
|
350
|
+
After all flows and screens are processed:
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
Discover Storyboard complete.
|
|
354
|
+
|
|
355
|
+
Flows created (N total):
|
|
356
|
+
• "Login & Authentication" — chapter <id> — 3 screens
|
|
357
|
+
• "Product Browsing" — chapter <id> — 5 screens
|
|
358
|
+
|
|
359
|
+
Screens uploaded: N of M (list any failures, including screens that failed 7d verification)
|
|
360
|
+
|
|
361
|
+
Next steps:
|
|
362
|
+
- Open the board to review the storyboard timelines
|
|
363
|
+
- Run /timeline to add domain events to each timeline
|
|
364
|
+
- Run /eventmodeling-identifying-inputs to map UI actions to commands
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Navigation guidelines
|
|
370
|
+
|
|
371
|
+
**Be systematic, not exhaustive.** The goal is to capture the key user journeys — not every possible page combination.
|
|
372
|
+
|
|
373
|
+
- Visit each major section of the app at least once
|
|
374
|
+
- Follow the primary happy path for any form or flow (fill forms with plausible test data)
|
|
375
|
+
- Capture before-and-after states (e.g. "empty cart" and "cart with items")
|
|
376
|
+
- Do NOT follow pagination to every page — one example page is enough
|
|
377
|
+
- Do NOT take screenshots of loading spinners or empty states unless they represent a meaningful step
|
|
378
|
+
- If you encounter a login wall, fill in any visible credentials from the URL (e.g. `admin`/`password`) or ask the user for credentials before proceeding
|
|
379
|
+
|
|
380
|
+
**Recognizing meaningful screen transitions:**
|
|
381
|
+
- URL change → new screen
|
|
382
|
+
- Major content change (modal opens, form submitted, page reloaded) → new screen
|
|
383
|
+
- Only cosmetic changes (tooltip shown, menu expanded) → NOT a new screen
|