@alan-ai-hq/agent-manager-linux-x64 0.1.199 → 0.1.200

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.
Files changed (96) hide show
  1. package/alan-agent.cjs +8885 -5214
  2. package/alan-holder.cjs +5364 -3401
  3. package/alan-lease.cjs +808 -200
  4. package/builtin-skills/agent-desktop/SKILL.md +94 -0
  5. package/builtin-skills/alan-artifact/SKILL.md +128 -0
  6. package/builtin-skills/alan-artifact/examples/interactive-diagram.md +50 -0
  7. package/builtin-skills/alan-artifact/examples/prototype.md +53 -0
  8. package/builtin-skills/alan-artifact/examples/test-report.md +55 -0
  9. package/builtin-skills/alan-artifact/references/design.md +39 -0
  10. package/builtin-skills/alan-artifact/references/diagrams.md +20 -0
  11. package/builtin-skills/alan-deck/SKILL.md +189 -0
  12. package/builtin-skills/alan-diagrams/SKILL.md +105 -0
  13. package/builtin-skills/alan-diagrams/references/diagram-catalogue.md +847 -0
  14. package/builtin-skills/alan-docs/SKILL.md +143 -0
  15. package/builtin-skills/alan-docs/references/administration/members-and-teams.md +48 -0
  16. package/builtin-skills/alan-docs/references/administration/org-dashboard.md +19 -0
  17. package/builtin-skills/alan-docs/references/administration/organisation-settings.md +41 -0
  18. package/builtin-skills/alan-docs/references/agents-and-sessions/code-context.md +60 -0
  19. package/builtin-skills/alan-docs/references/agents-and-sessions/coding-agents-and-models.md +78 -0
  20. package/builtin-skills/alan-docs/references/agents-and-sessions/session-lifecycle.md +62 -0
  21. package/builtin-skills/alan-docs/references/agents-and-sessions/start-a-session.md +110 -0
  22. package/builtin-skills/alan-docs/references/automations/automation-runs.md +69 -0
  23. package/builtin-skills/alan-docs/references/automations/create-an-automation.md +143 -0
  24. package/builtin-skills/alan-docs/references/automations/overview.md +77 -0
  25. package/builtin-skills/alan-docs/references/cloud-and-local/cloud-images.md +64 -0
  26. package/builtin-skills/alan-docs/references/cloud-and-local/cloud-sessions-and-execution.md +89 -0
  27. package/builtin-skills/alan-docs/references/cloud-and-local/cloud-setup.md +128 -0
  28. package/builtin-skills/alan-docs/references/cloud-and-local/codex-cli-connector.md +92 -0
  29. package/builtin-skills/alan-docs/references/cloud-and-local/local-execution.md +213 -0
  30. package/builtin-skills/alan-docs/references/cloud-and-local/runtime-recovery.md +60 -0
  31. package/builtin-skills/alan-docs/references/cloud-and-local/sandboxes.md +74 -0
  32. package/builtin-skills/alan-docs/references/cloud-and-local/troubleshooting-and-faq.md +102 -0
  33. package/builtin-skills/alan-docs/references/get-started/connect-azure-devops.md +89 -0
  34. package/builtin-skills/alan-docs/references/get-started/connect-bitbucket.md +86 -0
  35. package/builtin-skills/alan-docs/references/get-started/connect-github.md +114 -0
  36. package/builtin-skills/alan-docs/references/get-started/join-a-team.md +114 -0
  37. package/builtin-skills/alan-docs/references/get-started/product-map.md +96 -0
  38. package/builtin-skills/alan-docs/references/get-started/quickstart.md +158 -0
  39. package/builtin-skills/alan-docs/references/get-started/set-up-your-team.md +200 -0
  40. package/builtin-skills/alan-docs/references/get-started/sign-in.md +104 -0
  41. package/builtin-skills/alan-docs/references/get-started/welcome.md +39 -0
  42. package/builtin-skills/alan-docs/references/integrations/connect-microsoft-teams.md +116 -0
  43. package/builtin-skills/alan-docs/references/integrations/connect-slack.md +164 -0
  44. package/builtin-skills/alan-docs/references/integrations/import-from-linear.md +172 -0
  45. package/builtin-skills/alan-docs/references/plans-and-billing/plans-and-limits.md +115 -0
  46. package/builtin-skills/alan-docs/references/plans-and-billing/usage-and-credits.md +47 -0
  47. package/builtin-skills/alan-docs/references/reference/documents-and-artifacts.md +52 -0
  48. package/builtin-skills/alan-docs/references/reference/faq.md +89 -0
  49. package/builtin-skills/alan-docs/references/reference/feature-catalog.md +89 -0
  50. package/builtin-skills/alan-docs/references/reference/glossary.md +96 -0
  51. package/builtin-skills/alan-docs/references/reference/links-and-ids.md +80 -0
  52. package/builtin-skills/alan-docs/references/reference/roles-and-permissions.md +64 -0
  53. package/builtin-skills/alan-docs/references/reference/statuses.md +86 -0
  54. package/builtin-skills/alan-docs/references/reviews-testing-deploys/deployments.md +28 -0
  55. package/builtin-skills/alan-docs/references/reviews-testing-deploys/pull-requests.md +85 -0
  56. package/builtin-skills/alan-docs/references/reviews-testing-deploys/review-work.md +55 -0
  57. package/builtin-skills/alan-docs/references/reviews-testing-deploys/testing-evidence.md +52 -0
  58. package/builtin-skills/alan-docs/references/skills/plugins-and-mcp.md +24 -0
  59. package/builtin-skills/alan-docs/references/skills/skills.md +103 -0
  60. package/builtin-skills/alan-docs/references/tasks/complete-a-task.md +79 -0
  61. package/builtin-skills/alan-docs/references/tasks/create-a-task.md +67 -0
  62. package/builtin-skills/alan-docs/references/tasks/subtasks-and-status.md +55 -0
  63. package/builtin-skills/alan-docs/references/tasks/task-artifacts.md +56 -0
  64. package/builtin-skills/alan-docs/references/tasks/task-detail.md +65 -0
  65. package/builtin-skills/alan-docs/references/teams-and-planning/cycles.md +93 -0
  66. package/builtin-skills/alan-docs/references/teams-and-planning/documents.md +66 -0
  67. package/builtin-skills/alan-docs/references/teams-and-planning/epics.md +95 -0
  68. package/builtin-skills/alan-docs/references/teams-and-planning/whiteboard.md +52 -0
  69. package/builtin-skills/alan-docs/references/troubleshooting/agent-blocked.md +38 -0
  70. package/builtin-skills/alan-docs/references/troubleshooting/common-problems.md +118 -0
  71. package/builtin-skills/alan-docs/references/troubleshooting/github-access.md +41 -0
  72. package/builtin-skills/alan-docs/references/troubleshooting/missing-artifact.md +47 -0
  73. package/builtin-skills/alan-docs/references/troubleshooting/report-an-issue.md +74 -0
  74. package/builtin-skills/alan-docs/references/troubleshooting/runtime-unavailable.md +49 -0
  75. package/builtin-skills/alan-docs/scripts/generate-references.mjs +363 -0
  76. package/builtin-skills/alan-environment-setup/SKILL.md +320 -0
  77. package/builtin-skills/alan-environment-setup/references/android.md +118 -0
  78. package/builtin-skills/alan-environment-setup/references/troubleshooting.md +33 -0
  79. package/builtin-skills/alan-skill-authoring/SKILL.md +83 -0
  80. package/builtin-skills/alan-tasks/SKILL.md +195 -0
  81. package/builtin-skills/alan-test-android/SKILL.md +224 -0
  82. package/builtin-skills/alan-test-android/scripts/android-up.sh +227 -0
  83. package/builtin-skills/alan-test-android/scripts/install-launch.sh +38 -0
  84. package/builtin-skills/alan-test-android/scripts/record.sh +64 -0
  85. package/builtin-skills/alan-test-android/scripts/ui.py +367 -0
  86. package/builtin-skills/alan-test-desktop/SKILL.md +107 -0
  87. package/builtin-skills/alan-test-desktop/references/linux-recording.md +31 -0
  88. package/builtin-skills/alan-test-feature/SKILL.md +243 -0
  89. package/builtin-skills/alan-test-mobile/SKILL.md +65 -0
  90. package/builtin-skills/alan-test-web/SKILL.md +113 -0
  91. package/builtin-skills/alan-walkthrough/SKILL.md +152 -0
  92. package/builtin-skills/alan-walkthrough/scripts/mark-changes.js +419 -0
  93. package/builtin-skills/alan-walkthrough/scripts/publish-capture.mjs +288 -0
  94. package/builtin-skills/alan-workflows/SKILL.md +235 -0
  95. package/builtin-skills/manifest.json +19 -0
  96. package/package.json +3 -2
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: agent-desktop
3
+ version: 1.0.0
4
+ description: "This skill should be used when a task must see or operate a native desktop application on the streamed Alan cloud desktop: a GTK app, an Electron window with no CDP endpoint, an OS file dialog, a native menu, the tray, the clipboard, or window management. It drives the agent-desktop CLI's accessibility-tree snapshot-and-ref loop. Do not use it for web pages, mobile web, or any Chromium app that offers a CDP endpoint; use agent-browser there."
5
+ ---
6
+
7
+ # agent-desktop
8
+
9
+ Computer use for desktop apps through the OS accessibility tree. Every command
10
+ prints one JSON envelope with `ok` and either `data` or `error`.
11
+
12
+ ## Choose the driver first
13
+
14
+ | Target | Driver |
15
+ | --- | --- |
16
+ | Web page, route, PWA, mobile web | `agent-browser` (`alan-test-web`) |
17
+ | Electron or Chromium app with a CDP endpoint | `agent-browser --cdp <port>` |
18
+ | Native app, OS dialog, native menu, tray, window management | this skill |
19
+
20
+ `agent-desktop` is the fallback for surfaces that expose no CDP endpoint. It
21
+ cannot read the console, page errors, or network activity, and it cannot
22
+ emulate a phone: use `agent-browser` for those. Do not replace a working
23
+ `agent-browser` attachment with this driver.
24
+
25
+ ## Readiness
26
+
27
+ Run this only in an Alan cloud sandbox with a streamed desktop. The image
28
+ provides `at-spi2-core`, a running accessibility bus, and
29
+ `GTK_MODULES=gail:atk-bridge`; a host without them reports
30
+ `accessibility: denied` and refuses every command.
31
+
32
+ 1. `command -v agent-desktop`.
33
+ 2. `agent-desktop status`. `permissions.accessibility.state` must be `granted`;
34
+ otherwise return `blocked` with the state and suggestion rather than
35
+ guessing at the UI.
36
+ 3. Load the CLI's own guidance before the first interaction, since it tracks
37
+ the installed version:
38
+ - `agent-desktop skills get desktop`: the loop, refs, retry rules.
39
+ - `agent-desktop skills get platform`: what differs on this OS.
40
+
41
+ ## The loop
42
+
43
+ Observe, act on a ref, observe again. Refs belong to one snapshot.
44
+
45
+ ```sh
46
+ agent-desktop snapshot --app "<App>" -i --compact # map the app
47
+ agent-desktop click @<snapshot>:e12 # act on a ref
48
+ agent-desktop find --app "<App>" --role button --name "Save" --exact --first
49
+ agent-desktop get @<snapshot>:e12 --property text # read a value
50
+ ```
51
+
52
+ - For a large app, `snapshot --skeleton` first, then drill into one region
53
+ with `snapshot --root <ref>`. Scoping to a subtree is the cheapest
54
+ observation by a wide margin.
55
+ - Assert with `find --role --name --exact --count`; it returns a few tokens.
56
+ Do not assert with `--text` alone, whose counts are unreliable, and prefer
57
+ `get` on a resolved ref over a fresh full snapshot.
58
+ - Prefer `--wait-for <role>:<text>` over a fixed `sleep`.
59
+ - Use `--session <name>` for the whole charter and keep refs inside it.
60
+
61
+ ## Writing text into Chromium apps
62
+
63
+ `set-value` is not supported by Chromium (Chrome, Electron): it returns
64
+ `ACTION_NOT_SUPPORTED`. The only path is physical input:
65
+
66
+ ```sh
67
+ agent-desktop type @<snapshot>:e7 "value" --headed
68
+ ```
69
+
70
+ `--headed` moves real keystrokes through the focused window. Use it only when
71
+ the task permits physical input on the streamed desktop, never to work around
72
+ a headless failure, and say so in the result when it changes focus away from
73
+ the user.
74
+
75
+ ## Known gaps
76
+
77
+ Report these as gaps instead of inferring behaviour:
78
+
79
+ - No console, page-error, or network channel. A finding that needs them is
80
+ `unverified` here, not `passed`.
81
+ - `aria-live` / `role=status` text is often absent from the tree; assert on a
82
+ durable element instead of the transient message.
83
+ - Native menus and dialogs are not always exposed (Electron's in-window menu
84
+ popups are a known case). Confirm the surface exists before relying on it.
85
+ - Viewport work is window resize, not device emulation: no touch, mobile user
86
+ agent, or device pixel ratio.
87
+
88
+ ## Cleanup and data handling
89
+
90
+ - Close only what you launched. `close-app` cannot disambiguate between
91
+ several instances of one app, so record the PID and stop that process.
92
+ - Snapshots, clipboard reads, screenshots, and traces can contain private
93
+ desktop content. Keep them out of public logs, artifacts, and uploads; pass
94
+ an evidence path only when the caller asked for one.
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: alan-artifact
3
+ description: "This skill should be used when an Alan workflow must \"compose the artifact\", \"write the plan artifact\", \"render the report\", \"add an interactive block\", or \"add an interactive diagram\" to a plan, test report, review, or document artifact. Do not use it for Mermaid diagrams (use alan-diagrams), ordinary chat replies, production UI, external publishing, Alan prototypes (those go through upsert_prototype_version), or to run any browser or backend test."
4
+ version: 2.4.0
5
+ ---
6
+
7
+ # Alan Artifact
8
+
9
+ Compose the one artifact an Alan workflow persists: self-contained Markdown for
10
+ background agents, with HTML added wherever it makes the human reading surface
11
+ clearer. There is no "normal" versus "visual" artifact. Every artifact is one
12
+ composition, and the parent workflow stays responsible for the facts in it and
13
+ for saving it.
14
+
15
+ ## Trigger
16
+
17
+ Use this when composing a plan, test report, review, or document artifact
18
+ before saving it, or when a user asks for a plan, report, document,
19
+ interactive block, or interactive (HTML) diagram inside an Alan task,
20
+ workflow, or chat session. Mermaid diagrams belong to `alan-diagrams`.
21
+
22
+ Do not use it to:
23
+
24
+ - research, decide, test, review, or implement anything;
25
+ - create a second artifact, public URL, or publishing step;
26
+ - compose an Alan prototype: a runnable prototype is its own artifact with a Vite React TypeScript source snapshot, persisted through `upsert_prototype_version`, not an HTML block in a document;
27
+ - run browser, backend, screenshot, certification, or validation suites. Composing an artifact never starts infrastructure.
28
+
29
+ ## Inputs
30
+
31
+ From the parent workflow or the verified conversation:
32
+
33
+ 1. The reader and the one question the artifact must answer.
34
+ 2. Verified content: facts, relationships, decisions, evidence paths, revisions, open items.
35
+ 3. The persistence tool the parent will call and its context IDs.
36
+ 4. Any constraints: width, print, reduced motion, accessibility.
37
+
38
+ If evidence is missing, say so in the artifact. Never invent nodes, owners,
39
+ dates, counts, statuses, or coverage.
40
+
41
+ ## Storage Contract
42
+
43
+ Alan artifact tools accept `content` (agent Markdown) plus optional `html` with
44
+ `presentation`:
45
+
46
+ | Presentation | What Alan stores | Who edits it |
47
+ |---|---|---|
48
+ | Markdown only | Collaborative document | People in the editor; agents via `update_artifact` |
49
+ | `embedded` | Collaborative document: the HTML block first, then the Markdown | Same; the HTML renders as a sandboxed block inside the editor |
50
+ | `full` | Native artifact row, no collaborative document, no version snapshot | Agents via `update_artifact` |
51
+
52
+ Agents reading an artifact receive the Markdown, never the HTML source. For an
53
+ embedded artifact they receive the live document body, so keep the Markdown
54
+ complete on its own.
55
+
56
+ ## Procedure
57
+
58
+ 1. **Settle the reading surface.** Decide whether the question is answered by
59
+ prose, a table, a diagram, an HTML layout, an interactive block, or an interactive
60
+ diagram. One dominant idea per artifact. Add HTML only when it explains
61
+ something the Markdown cannot; a plan that reads well as Markdown ships as
62
+ Markdown.
63
+ 2. **Write the agent Markdown.** Concise, executable, complete. Do not repeat the
64
+ title or summary. Use headings a later agent can read by section.
65
+ 3. **Write the HTML, if any.** Read [references/design.md](references/design.md)
66
+ first: it calibrates the treatment to the request, then sets typography,
67
+ neutrals, the two-theme token pattern, layout, and the process of sketching
68
+ a small design plan before markup. Then follow [Composition rules](#composition-rules).
69
+ A Mermaid diagram in the Markdown follows `/alan-diagrams`; a hand-drawn
70
+ SVG diagram in the HTML follows [references/diagrams.md](references/diagrams.md).
71
+ A bounded interactive block follows [examples/prototype.md](examples/prototype.md);
72
+ interactive diagrams follow
73
+ [examples/interactive-diagram.md](examples/interactive-diagram.md).
74
+ Test reports, reviews, and plans that report a change follow the order in
75
+ [examples/test-report.md](examples/test-report.md): verdict, environment,
76
+ what changed, Before / After (UI pointer table with a legend line per
77
+ number, Behavior/API table with a request and response diff, Metrics table),
78
+ checks, console and network, issues and what was not verified. UI evidence
79
+ always has the same number on both images; the parent obtains the marked
80
+ captures through `/alan-walkthrough`.
81
+ 4. **Choose `presentation`.** `full` when the HTML is the whole reading surface
82
+ and nobody needs to edit it in place. `embedded` when the HTML introduces or
83
+ orients a Markdown body people will keep editing.
84
+ 5. **Inspect statically, then hand back.** Read the HTML once for the rules
85
+ below. Return the Markdown, the HTML, the presentation, and any omissions to
86
+ the parent workflow. Do not open a browser, start a server, or run a script
87
+ to check it.
88
+
89
+ ## Composition Rules
90
+
91
+ - Self-contained: inline CSS and JavaScript. The one external host allowed is
92
+ Google Fonts (a stylesheet from `fonts.googleapis.com`, files from
93
+ `fonts.gstatic.com`), always with a real fallback stack because the frame
94
+ falls back silently. No other external scripts, styles, fonts, images,
95
+ iframes, fetches, storage, forms, popups, downloads, or navigation of the
96
+ parent page.
97
+ - Keep it small. No base64 media. Captures belong in the Markdown as the
98
+ persistence tool describes, never duplicated inside the HTML.
99
+ - Semantic HTML with a sane heading order; every meaningful SVG has a title.
100
+ - The block renders in a sandboxed frame that receives the app's theme as
101
+ `data-theme="light|dark"` on its root and falls back to `prefers-color-scheme`.
102
+ Define the light tokens on bare `:root`, override them under
103
+ `@media (prefers-color-scheme: dark)` guarded as `:root:not([data-theme="light"])`,
104
+ and again under `:root[data-theme="dark"]`; set `color-scheme: light dark`
105
+ and an explicit `body` background from a token. The pattern is spelled out in
106
+ [references/design.md](references/design.md).
107
+ - Responsive from narrow to wide; nothing scrolls horizontally except inside its
108
+ own container. Readable in print and with reduced motion.
109
+ - Design from the subject. No fixed palette, no card grid, no forced columns,
110
+ no dashboard chrome, no decorative charts of pass counts or progress, and
111
+ none of the generated-look defaults listed in the design reference.
112
+ - The static document must carry the complete meaning without JavaScript.
113
+ Interaction only reveals, focuses, or steps through what is already there.
114
+ - Evidence fidelity beats richness. If a relationship or number is unverified,
115
+ leave it out or label it as unresolved.
116
+
117
+ ## Failure Handling
118
+
119
+ - Evidence too thin for the visual: ship Markdown and name what is missing.
120
+ - Parent cannot persist HTML: return Markdown only.
121
+ - Persistence tool times out: call `list_artifacts` before retrying. A snapshot
122
+ warning in the tool result means the artifact was saved; do not retry.
123
+ - `update_artifact` replaces the whole body: read the artifact in full first.
124
+
125
+ ## Artifact Policy
126
+
127
+ This skill produces content for exactly one parent-owned artifact. It creates
128
+ no records itself, uploads nothing, and never adds a review or publish step.
@@ -0,0 +1,50 @@
1
+ # Example: interactive diagram
2
+
3
+ Use an interactive diagram when a reader must trace named paths through a graph
4
+ too dense to read at once. The full graph stays visible; controls only focus a
5
+ path. Everything a reader needs is in the static SVG.
6
+
7
+ Agent Markdown (`content`):
8
+
9
+ ```markdown
10
+ ## Artifact save path
11
+
12
+ - Agent tool → repository → artifacts row.
13
+ - Markdown and embedded HTML also write a collaborative document and a version snapshot.
14
+ - Full HTML writes only the artifacts row.
15
+ ```
16
+
17
+ HTML (`html`, `presentation: "embedded"`):
18
+
19
+ ```html
20
+ <figure style="font:14px system-ui;margin:0">
21
+ <figcaption>Artifact save path. Choose a format to highlight its writes.</figcaption>
22
+ <p>
23
+ <button data-path="markdown">Markdown</button>
24
+ <button data-path="embedded">Embedded HTML</button>
25
+ <button data-path="full">Full HTML</button>
26
+ </p>
27
+ <svg viewBox="0 0 520 160" width="100%" role="img" aria-labelledby="t">
28
+ <title id="t">Tool call to artifacts row, documents table, and version snapshot</title>
29
+ <g id="n-tool"><rect x="10" y="60" width="110" height="40" fill="none" stroke="currentColor"/><text x="65" y="85" text-anchor="middle">create tool</text></g>
30
+ <g id="n-row"><rect x="200" y="60" width="110" height="40" fill="none" stroke="currentColor"/><text x="255" y="85" text-anchor="middle">artifacts row</text></g>
31
+ <g id="n-doc" data-only="markdown embedded"><rect x="390" y="10" width="120" height="40" fill="none" stroke="currentColor"/><text x="450" y="35" text-anchor="middle">document (Yjs)</text></g>
32
+ <g id="n-ver" data-only="markdown embedded"><rect x="390" y="110" width="120" height="40" fill="none" stroke="currentColor"/><text x="450" y="135" text-anchor="middle">version snapshot</text></g>
33
+ <path d="M120 80H200" stroke="currentColor"/>
34
+ <path d="M310 80L390 30" stroke="currentColor" data-only="markdown embedded"/>
35
+ <path d="M310 80L390 130" stroke="currentColor" data-only="markdown embedded"/>
36
+ </svg>
37
+ <script>
38
+ document.querySelectorAll("[data-path]").forEach((b) =>
39
+ b.addEventListener("click", () => {
40
+ document.querySelectorAll("[data-only]").forEach((el) => {
41
+ el.style.opacity = el.dataset.only.includes(b.dataset.path) ? "1" : "0.25";
42
+ });
43
+ })
44
+ );
45
+ </script>
46
+ </figure>
47
+ ```
48
+
49
+ The static graph already shows every node and edge; the buttons only dim what
50
+ a format does not touch.
@@ -0,0 +1,53 @@
1
+ # Example: bounded interactive block inside a document
2
+
3
+ This is a document artifact with one interactive HTML block, for answering a
4
+ single behaviour question in place. It is **not** an Alan prototype. When the
5
+ user asks for a prototype, a mockup they can open and click as an app, or a
6
+ revision of an existing one, the parent workflow uses the prototype lifecycle
7
+ instead: `upsert_prototype_version` with a Vite React TypeScript
8
+ `sourceSnapshot` and `packageJson`, keeping `prototypeId` and
9
+ `parentVersionId` on revisions. This skill does not compose those.
10
+
11
+ Use this block when one interaction or state transition is the open question.
12
+ Show only its relevant states, label the simulated boundary, and make no claim
13
+ about backend, auth, or persistence.
14
+
15
+ Agent Markdown (`content`):
16
+
17
+ ```markdown
18
+ ## Retry affordance for failed uploads
19
+
20
+ Question: should a failed capture upload offer inline retry or a banner?
21
+
22
+ States shown: idle, uploading, failed, retried-once. Backend is simulated;
23
+ the retry is a timer. Decision needed: inline retry (recommended) vs banner.
24
+ ```
25
+
26
+ HTML (`html`, `presentation: "full"`):
27
+
28
+ ```html
29
+ <main style="font:15px/1.5 system-ui;max-width:40rem;margin:2rem auto;padding:0 1rem;color-scheme:light dark">
30
+ <h1>Retry affordance for failed uploads</h1>
31
+ <p>Simulated: the upload fails once, then succeeds on retry.</p>
32
+ <section aria-live="polite">
33
+ <button id="go">Upload capture</button>
34
+ <p id="status">Idle.</p>
35
+ </section>
36
+ <script>
37
+ const status = document.getElementById("status");
38
+ const go = document.getElementById("go");
39
+ let attempt = 0;
40
+ go.addEventListener("click", () => {
41
+ attempt += 1;
42
+ status.textContent = "Uploading step-01.png…";
43
+ setTimeout(() => {
44
+ status.textContent = attempt === 1 ? "Failed: 413 payload too large. Retry?" : "Uploaded.";
45
+ go.textContent = attempt === 1 ? "Retry upload" : "Upload capture";
46
+ }, 600);
47
+ });
48
+ </script>
49
+ </main>
50
+ ```
51
+
52
+ Stop here. Do not add a second state machine, styling system, or fake data
53
+ service. The parent workflow persists it with `create_document_artifact`.
@@ -0,0 +1,55 @@
1
+ # Example: test report and review evidence
2
+
3
+ The Markdown body of a test report or review, in the default order. Captures
4
+ come from `/alan-walkthrough` as `capture:` refs; never write local paths. The
5
+ same Before / After, Behavior/API and Metrics tables appear in the PR body.
6
+
7
+ ```markdown
8
+ **Verdict: mixed.** The diff list renders and opens inline; the filter loses its text on resize.
9
+
10
+ | | |
11
+ | --- | --- |
12
+ | URL | https://localhost:8443/sessions/... |
13
+ | Commit | `a1b2c3d` against `main` |
14
+ | Browser | Chromium 1440x900, light theme |
15
+ | Account, flags, data | seeded user, `diffFiles` on, 107 changed files |
16
+
17
+ ## What changed
18
+
19
+ | Area | Change | Files |
20
+ | --- | --- | --- |
21
+ | Changes panel | Flat collapsible file rows | `apps/web/src/features/diff/...` |
22
+
23
+ ## Before / After
24
+
25
+ | Surface | Before (changes marked) | After (changes marked) |
26
+ | --- | --- | --- |
27
+ | Changes panel | ![Before](capture:...) | ![After](capture:...) |
28
+
29
+ 1. Before: nested folder tree -> After: flat rows with an inline diff per file
30
+ 2. Before: no filter -> After: filter field above the list
31
+
32
+ | Endpoint | Case | Before | After |
33
+ | --- | --- | --- | --- |
34
+ | `GET /public/diffs` | 107 files | 200, 1.2 MB | 200, 0.4 MB |
35
+
36
+ | Metric | Before | After | Delta | n / spread | How measured |
37
+ | --- | --- | --- | --- | --- | --- |
38
+ | Requests on open | 14 | 9 | -5 | 5 / 0 | browser network log |
39
+
40
+ ## Checks
41
+
42
+ | Check | Rule (observable) | Result | Evidence |
43
+ | --- | --- | --- | --- |
44
+ | Open a file | Its diff expands in place within 300 ms | pass | ![Opened](capture:...) |
45
+ | Resize with filter text | The text stays | fail | ![Filter cleared](capture:...) |
46
+
47
+ ## Console and network
48
+
49
+ Console clean. One 429 on `/public/diffs/summary`, retried once.
50
+
51
+ ## Issues, risks, not verified
52
+
53
+ - Filter text is lost on resize (2 of 2 runs); suspected cause: the field remounts.
54
+ - Not verified: Windows, a 5000-file diff.
55
+ ```
@@ -0,0 +1,39 @@
1
+ # Designing the HTML surface of an Alan artifact
2
+
3
+ Read this when an artifact carries HTML. Approach it as the design lead who
4
+ gives every subject its own treatment, and calibrate that treatment to the
5
+ request instead of reaching for a house style.
6
+
7
+ ## Read the request first
8
+
9
+ Calibrate treatment, not whether to design. A plan, a report, or a review
10
+ deserves the same craft as a landing page; what changes is how loud the craft
11
+ is. Most Alan artifacts want a utilitarian treatment: real typographic
12
+ hierarchy, considered spacing, a chosen palette, no hero. An artifact a user
13
+ will keep, share, or click through, such as a prototype-like interactive block
14
+ or a decision document meant to persuade, may warrant an editorial treatment
15
+ with one deliberate aesthetic risk. When unsure, a well-composed page is never
16
+ wrong; an over-designed identity sometimes is.
17
+
18
+ ## Fundamentals
19
+
20
+ - **Ground it in the subject.** Pin one concrete subject, its reader, and the page's single job. Carry at least one detail only this subject would have, as content, never ornament: its real units and scales, its document conventions, its terms of art. Real content throughout, never placeholder text.
21
+ - **Pair typefaces.** Typography carries the page even when the page is not about typography. A display face used with restraint, a complementary body face, and a utility face for captions or data when needed. Google Fonts is the one external host an Alan HTML block may load: link the stylesheet from `fonts.googleapis.com` (the files come from `fonts.gstatic.com`) and always declare a real fallback stack, because the sandboxed frame falls back silently. Any other face must be inlined as a `@font-face` data URI or not used. Keep running text near 65 characters wide, set a type scale and stay on it, give headings `text-wrap: balance`, and uppercase labels a touch of letter-spacing. `font-variant-numeric: tabular-nums` wherever digits line up.
22
+ - **Choose neutrals, don't default to them.** A pure mid-grey reads as unconsidered; a grey with a slight hue bias toward the accent reads as chosen. Pure white and near-black are fine grounds when the subject suits them.
23
+ - **Design both themes.** The frame receives `data-theme="light"` or `data-theme="dark"` from the app's toggle, and falls back to the OS `prefers-color-scheme` when the host does not stamp one. Structure the CSS token-level for all three states: the bare `:root` block defines the complete light palette; `@media (prefers-color-scheme: dark)` redefines only the tokens, guarded as `:root:not([data-theme="light"])`; `:root[data-theme="dark"]` redefines them again so the toggle wins in both directions. Style components only through the tokens, declare every token in bare `:root` before any override, set `color-scheme: light dark`, and give `body` an explicit background from a token, since the frame composites over the app's ground. Do not naively invert; keep contrast legible and the accent working on both grounds. A design that commits to one visual world may stay single-theme, but then paints background and every color explicitly, as a choice.
24
+ - **Let layout do the spacing.** Sibling groups use flex or grid with `gap`, not per-element margins that collapse or double. Wide content (tables, code, diagrams) gets `overflow-x: auto` on its own container; the page body never scrolls sideways.
25
+ - **Compose repeated things as one object.** Cards in a row, label/value pairs, badges on siblings: same edges, baselines, and inner padding from one to the next. Let content set height and pick a column count the items fill. Text that can outgrow its track wraps or scrolls; clipped text is a bug.
26
+ - **Not everything is a card.** Border, fill, radius, and shadow each say "separate object"; spend them by role, lifting the one thing that needs it. Big-number tiles only when those figures are the point.
27
+ - **Draw charts to the scale.** One scale places marks, ticks, and labels; every label names a value the chart reaches; chart text takes theme tokens; marks, labels, and edges stay clear of one another and inside the drawing's bounds. Never chart pass counts, invented coverage, or nominal status.
28
+ - **Show the page at rest.** Everything meant to be read is visible once loaded, without scrolling to trigger it. A section may animate in from a visible resting state, never from `opacity: 0` waiting on an observer. Size any opener to what it holds, not to the viewport. An interactive block opens in a realistic working state with example data plainly marked as example.
29
+ - **Avoid the generated look.** Warm cream with a serif display and terracotta accent; near-black with a lone acid-green or vermilion pop; broadsheet hairline rules with dense columns; a purple-to-blue gradient hero on white; Inter or Space Grotesk as the safe face; emoji as section markers; everything centered; one radius everywhere; an accent rail on rounded cards. If the user asks for one of these, follow them exactly; otherwise do not spend the freedom on a default.
30
+ - **Build cleanly.** Watch overlapping elements and cascade collisions (a `.section` selector fighting an element selector over spacing). Close every non-void element, double-quote attributes, give keyboard focus a visible state, respect `prefers-reduced-motion`. Generative or decorative graphics go through Canvas rather than long hand-authored SVG path data.
31
+ - **Words are design material.** Write from the reader's side of the screen; name things by what people recognize, not by how the system is built. Active voice; a control says exactly what happens. Structural devices (numbering, eyebrows, dividers, labels) encode something true about the content: numbered markers only when the content is a sequence.
32
+ - **When it is a UI, not a document.** A tool is scanned and operated, so surface the summary before the detail and encode state in form as well as number (a pill, a chip, a severity stripe). Semantic color (good, warning, critical) is separate from the accent and does not count as it. What is interactive looks interactive.
33
+
34
+ ## Process
35
+
36
+ 1. Before writing markup, sketch a design plan: 4 to 6 named hex values, typefaces for at least two roles, and the layout concept in one or two sentences. For an editorial treatment, check the plan against the subject and revise any part that reads like the default for any similar page; say what changed and why.
37
+ 2. Build from the plan, deriving every color and type decision from it.
38
+ 3. Read the result once for the composition rules in `SKILL.md` and the theme pattern above. Static inspection only; this skill never opens a browser or starts a server.
39
+ 4. Hand back to the parent workflow. The live artifact is the review surface; further polish is the user's to ask for.
@@ -0,0 +1,20 @@
1
+ # Hand-drawn SVG diagrams in HTML blocks
2
+
3
+ Use this only for a diagram drawn as inline SVG inside an artifact's HTML
4
+ block, usually because it is interactive. For deciding what to draw, and for
5
+ any ```` ```mermaid ```` diagram in the Markdown body, invoke `/alan-diagrams`.
6
+
7
+ Hand-author inline `<svg>` with native shapes (`rect`,
8
+ `circle`, `line`, `polyline`, `path`) and `<text>`. No libraries, no external
9
+ images.
10
+
11
+ - **Size by `viewBox`.** `viewBox="0 0 W H"` sized to the content, scaled by CSS (`max-width: 100%; height: auto`). Wide flows read left to right; layered stacks read top to bottom.
12
+ - **Theme with `currentColor`.** Strokes, text, and arrowheads inherit the page's foreground in both themes; reserve one literal hue for the one element that carries meaning, and make sure it reads on both grounds.
13
+ - **Arrowheads are markers or polygons.** A `<defs><marker>` referenced by `marker-end="url(#arrow)"`, or a small `<polygon>` at the line's end.
14
+ - **Keep text legible.** Roughly 11 to 13px at the drawn scale, `text-anchor` for alignment, labels of a word or three. Sentences belong in the caption.
15
+ - **Align to a grid.** Shared baselines and even gaps are most of what makes a hand diagram read as deliberate.
16
+ - **Accessible and self-contained.** Wrap the `<svg>` in `<figure>` with a `<figcaption>`, give the `<svg>` `role="img"` and an `aria-label` carrying the same claim. No `<script>`, `<style>`, or `<foreignObject>` inside the SVG; gradients, patterns, and `<use>` reference ids in the same fragment. Long decorative path data means the drawing wants a real graphics tool; simplify instead.
17
+
18
+ **Interactive diagrams** keep the full graph visible in the static SVG and let
19
+ controls only dim, focus, or step through what is already there. See
20
+ [../examples/interactive-diagram.md](../examples/interactive-diagram.md).
@@ -0,0 +1,189 @@
1
+ ---
2
+ name: alan-deck
3
+ version: 1.0.0
4
+ description: "This skill should be used when a person asks for a deck, slides, a presentation, a pitch, a talk, a keynote, an all-hands, or \"something I can present\". It builds one Alan presentation artifact: a single self-contained HTML document on a fixed 1920x1080 stage that scales to any window, with a fixed set of layouts, keyboard navigation, speaker notes, and light and dark. Do not use it for a generic plan, report, or document artifact (alan-artifact), a standalone Mermaid diagram (alan-diagrams), a browser test (alan-test-web), a runnable prototype (upsert_prototype_version), or an external .pptx or .key file."
5
+ ---
6
+
7
+ # Build a presentation deck
8
+
9
+ A deck is an argument told one idea at a time. It ships as one Alan artifact
10
+ whose HTML is the whole reading surface: a fixed 1920x1080 stage that scales into
11
+ whatever frame the viewer gives it, so the same deck works in an artifact
12
+ preview, on a laptop, on a projector, and on a phone held sideways. Outline it
13
+ first, build it from the layouts below, walk every slide, then hand it back.
14
+
15
+ ## The surface
16
+
17
+ Persist the deck with `create_document_artifact` — use `create_plan` only when the
18
+ deck is a plan presented for approval — passing `html` with `presentation: "full"`.
19
+ `full` stores the HTML as the artifact's native body with no collaborative
20
+ document, because the deck is the entire reading surface and nobody edits it in
21
+ place; `embedded` would place the HTML above a Markdown body in a document, which
22
+ is wrong for a deck.
23
+
24
+ That HTML renders inside a sandboxed frame: scripts run, links open in a new tab,
25
+ and the frame has no same-origin access to Alan, so it can never read Alan's
26
+ cookies, storage, or DOM. Alan stamps its resolved theme on the frame root as
27
+ `data-theme="light"` or `data-theme="dark"`, and the frame falls back to the
28
+ operating system's `prefers-color-scheme` when no theme is stamped. The frame
29
+ gives the deck one fixed viewport: size the stage to it and never let the body
30
+ scroll.
31
+
32
+ Revise a deck in place with `update_artifact` (the same `html` and `presentation`),
33
+ so a link to it follows the deck instead of forking a second copy.
34
+
35
+ ## Budget the slides before you write one
36
+
37
+ Work out the count from the ask, and say it in the reply so the person can push
38
+ back:
39
+
40
+ - **4 to 6** — explain something in a few slides, or a status update: title, one
41
+ slide per point, the ask.
42
+ - **7 to 10** — a pitch, a proposal, or a decision to present: title, problem,
43
+ insight, proposal, evidence, risks, ask.
44
+ - **10 to 18** — a talk or an all-hands section, one slide per 60 to 90 seconds of
45
+ speaking.
46
+ - **up to 30** — a workshop or training, in sections of 5 to 7 with a section
47
+ slide between them.
48
+
49
+ Never exceed 30. If the material does not fit, cut material and never shrink the
50
+ type. A slide with two ideas is two slides. An agenda slide earns its place only
51
+ above 12 slides; a "thank you" or "questions?" slide never does — end on the ask or
52
+ the summary.
53
+
54
+ ## Write the outline first
55
+
56
+ List every slide as: number, layout, headline, and the one thing it proves. The
57
+ headline is a complete sentence stating the point ("Conflicts come from the read
58
+ side, not the write side"), not a topic label ("Conflicts"). Two headlines that
59
+ prove the same thing collapse into one. Show the outline before building when the
60
+ deck runs past 8 slides or the material is the person's.
61
+
62
+ ## Pick a layout per slide
63
+
64
+ Each layout has a label, so a person can say "slide 3, the two-column".
65
+
66
+ | Layout | Use it for |
67
+ |---|---|
68
+ | **title** (once) | Deck title at 128px, subtitle at 40px muted, one plain line of who and when at 28px. Never a dot-separated chain. |
69
+ | **statement** | One sentence at 88px, left-aligned, at most 14 words, an optional 40px line under it. The deck's beats: the insight, the ask, the close. |
70
+ | **numbers** | A 64px headline over two to four results at 132px, each with a one-line caption over a hairline. Use whenever a slide has more than one number. |
71
+ | **two-column** | A 64px headline, two columns at 32px with a 28px muted column title over a hairline. Before/after, problem/fix, option A/option B. Never three columns. Bullets live here only, at most 5, each one line. |
72
+ | **number** | A 64px headline over one figure at 240px with `tabular-nums`, and a 36px caption naming what it is and where it came from. One number per slide. |
73
+ | **figure** | A 64px headline over a chart card drawn from data (never hand-drawn axes), or a card holding an inline SVG diagram, a table of at most 4 columns, or a `data:` image. A product image must be real, never mocked UI; with no real image, draw an honest placeholder naming the missing asset. |
74
+ | **section** | A 200px muted section number over a 64px title. Only in decks over 12 slides. |
75
+
76
+ Every layout except title centers on the vertical axis; content hugging the top
77
+ with half the stage empty is a layout bug.
78
+
79
+ ## Type, colour, motion
80
+
81
+ All sizes are stage pixels, and the shell scales them. Use Alan's type system:
82
+ Inter for text and headings, JetBrains Mono only for code and aligned technical
83
+ figures. On the stage, body and captions never drop below 28px, headings and
84
+ numbers are 600 weight, body is 400, figures use `tabular-nums`, and every gap is
85
+ a multiple of 8 (the named type sizes are the exceptions). Stage margins are 120px.
86
+
87
+ Colour is Alan's neutral system, not a brand palette. Light: background `#FFFFFF`,
88
+ muted surface `#F5F5F5`, text `#0A0A0A`, muted text `#666666`, emphasis `#0A0A0A`,
89
+ border `#E6E6E6`, focus ring `#737373`. Dark: background `#111111`, muted surface
90
+ `#1E1E1E`, text `#FAFAFA`, muted text `#8C8C8C`, emphasis `#FAFAFA`, border
91
+ `#262626`. Emphasis is carried by contrast and weight, never by hue: the single
92
+ "accent phrase" a deck may have is set at 600 weight in the text colour, and the
93
+ emphasis token is the strongest text colour, reserved for the `number` figure.
94
+ The only colourful mark a slide may carry is a small filled status dot — success
95
+ `#209752`, warning `#9B6508`, or danger `#D31212` — never a coloured fill behind
96
+ text or a block. Never a gradient, a drop shadow under text, a coloured glow, or
97
+ an inverted-background section slide. Define the tokens once as CSS custom
98
+ properties and style every component through them, so both themes stay in step.
99
+
100
+ Slide changes are a single 150ms opacity fade on the incoming slide, matching
101
+ Alan's fast motion step, and nothing else; because `hidden` removes a slide from
102
+ layout, the fade is a keyframe animation as the slide is revealed, not a
103
+ transition. Drop it under `prefers-reduced-motion`. No build animations and no
104
+ per-element entrances.
105
+
106
+ ## Charts and diagrams
107
+
108
+ Prefer Alan's native surfaces. Decide what to draw with `/alan-diagrams`, then
109
+ draw it inside the slide as hand-authored inline SVG — native shapes and `<text>`,
110
+ no charting library, no external image — so the deck stays one self-contained
111
+ file. Theme strokes, text, and arrowheads with `currentColor` so they follow both
112
+ themes, and reserve at most one literal hue for the element that carries meaning.
113
+
114
+ A chart slide holds at most 8 data points, emphasises the series the slide is
115
+ about and mutes the rest, labels values directly instead of with a legend, and
116
+ keeps axis text at 22px — the one exception to the 28px floor. Draw one scale that
117
+ places marks, ticks, and labels, and keep every label inside the drawing's bounds.
118
+
119
+ ## The HTML contract
120
+
121
+ - One self-contained string. Inline `<style>`, one inline `<script>` for the shell
122
+ and notes, inline `<svg>`, and `data:` images. No `link`, `@import`, external
123
+ `src`, `fetch`, or request the deck needs in order to render: the frame has a
124
+ null origin and drops what it cannot load. Declare a real font fallback stack
125
+ after Inter, and use `localStorage` only opportunistically — the deck must work
126
+ with none.
127
+ - Structure it as readable markup: explicit closing tags and double-quoted
128
+ attributes. One `<section>` per slide carrying `data-layout` and `data-label`,
129
+ with an `<aside>` for its speaker notes. Use `<h1>` once on the title slide and
130
+ exactly one `<h2>` on every other slide; every slide except the current one
131
+ carries `hidden`. A short HTML comment at the top lists the slides by label.
132
+ - Define the light tokens on bare `:root`, redefine only the tokens under
133
+ `@media (prefers-color-scheme: dark)` guarded as
134
+ `:root:not([data-theme="light"])`, and again under `:root[data-theme="dark"]`.
135
+ Set `color-scheme: light dark`, and give `body` an explicit background from a
136
+ token, because the frame composites over the app's ground.
137
+ - The shell letterboxes the fixed 1920x1080 stage into the frame's viewport on
138
+ load, on resize, and on a `ResizeObserver`, scaling it to fit without cropping: a
139
+ fixed 1920x1080 stage centered in the viewport, scaled by
140
+ `transform: scale(var(--stage-scale))` where the shell sets `--stage-scale` to
141
+ `min(innerWidth / 1920, innerHeight / 1080)`. It handles ArrowRight,
142
+ ArrowDown, Space, PageDown, and a click on the right 60% to advance; ArrowLeft,
143
+ ArrowUp, PageUp, and the left 40% to go back; Home, End, `N` for notes, and
144
+ Escape to close notes. It keeps the current slide's 1-based index in
145
+ `location.hash` (slide 1 is `#1`) via `history.replaceState`, so a link lands on
146
+ it, and works with no storage.
147
+ - The chrome bar holds previous and next, the counter as `N / T` (tabular,
148
+ `aria-live` polite), a Notes toggle, and a key hint that hides under a 700px
149
+ viewport width. No theme button: the frame owns the theme.
150
+ - Notes open in a panel on the muted-surface token that overlays the stage
151
+ without replacing the slide, so the current slide stays visible behind it.
152
+ - Speaker notes are full sentences the speaker reads aloud, 40 to 120 words, on
153
+ every slide with a chart, a number, or a claim.
154
+ - Print lays out one slide per page from the stylesheet: reveal every `[hidden]`
155
+ slide, reset the stage transform, hide the chrome, and set
156
+ `@page { size: 1920px 1080px; margin: 0 }`.
157
+
158
+ This skill ships one file and no helper scripts: the deck is a single HTML string
159
+ passed to an artifact tool, so there is nothing to inline or build on disk, and
160
+ rendering runs through `/alan-test-web` rather than a hand-rolled harness.
161
+
162
+ ## Verify before handing back
163
+
164
+ Render the persisted deck in a real browser with `/alan-test-web` and walk every
165
+ slide. Check, and say in the reply if any of these fails:
166
+
167
+ 1. No text overflows its slide: no headline wraps past two lines, no statement
168
+ past three, no bullet past one.
169
+ 2. Every slide carries one idea, and its headline survives on its own as a
170
+ sentence.
171
+ 3. The counter and the hash move together; opening `#4` lands on slide 4.
172
+ 4. Notes open with `N` and show the current slide's notes.
173
+ 5. Light and dark both read, and a figure's labels sit inside its frame.
174
+
175
+ Then name the deck, its slide count, and only the caveats: a placeholder needing a
176
+ real asset, a number needing a source, or a slide you were unsure about. Do not
177
+ restate the deck.
178
+
179
+ ## Never
180
+
181
+ - Never more than one idea, one headline, or one accent phrase per slide.
182
+ - Never body text under 28px on the stage, and never a long list shrunk to fit.
183
+ - Never an agenda slide under 12 slides, and never a "thank you" or "questions?" slide.
184
+ - Never a gradient, a drop shadow under text, a coloured glow, or emoji as bullets.
185
+ - Never a theme button or theme script, and never a dot-separated meta chain.
186
+ - Never Title Case headlines, all-caps eyebrows, or a period at the end of a headline or bullet.
187
+ - Never three columns, a table over 4 columns, or a chart legend when direct labels fit.
188
+ - Never a second artifact for a second version; revise the same deck with `update_artifact` so its link follows it.
189
+ - Never a second file, an external dependency, or a network request the deck needs to render.