create-lykomi-app 0.11.1 → 0.13.0

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 (66) hide show
  1. package/README.md +8 -0
  2. package/package.json +1 -1
  3. package/presets/foundry-iq/files/AGENTS.md +6 -0
  4. package/presets/foundry-iq/files/README.md +20 -0
  5. package/presets/foundry-iq/files/agent/app/agent.py +3 -0
  6. package/presets/foundry-iq/files/agent/app/main.py +22 -4
  7. package/presets/foundry-iq/files/agent/pyproject.toml +3 -3
  8. package/presets/foundry-iq/files/src/main.tsx +2 -1
  9. package/presets/neo4j/files/AGENTS.md +6 -0
  10. package/presets/neo4j/files/README.md +20 -0
  11. package/presets/neo4j/files/agent/app/agent.py +3 -0
  12. package/presets/neo4j/files/agent/app/main.py +19 -0
  13. package/presets/neo4j/files/agent/pyproject.toml +3 -3
  14. package/presets/neo4j/files/src/main.tsx +2 -1
  15. package/presets/neo4j/manifest.json +1 -1
  16. package/template/AGENTS.md +6 -0
  17. package/template/README.md +43 -4
  18. package/template/_agents/skills/lykomi-author-chat-module/SKILL.md +57 -0
  19. package/template/_agents/skills/lykomi-author-chat-module/references/PROCESS_GUIDE.md +203 -0
  20. package/template/_agents/skills/lykomi-author-chat-module/references/form-ux.md +579 -0
  21. package/template/_agents/skills/lykomi-build-agent-forms/SKILL.md +36 -0
  22. package/template/_agents/skills/lykomi-build-agent-forms/references/PROCESS_GUIDE.md +203 -0
  23. package/template/_agents/skills/lykomi-build-agent-forms/references/form-ux.md +579 -0
  24. package/template/_agents/skills/lykomi-build-workbench/SKILL.md +37 -0
  25. package/template/_agents/skills/lykomi-build-workbench/references/PROCESS_GUIDE.md +203 -0
  26. package/template/_agents/skills/lykomi-build-workbench/references/form-ux.md +579 -0
  27. package/template/_agents/skills/lykomi-verify-agent-apis/SKILL.md +42 -0
  28. package/template/_agents/skills/lykomi-verify-agent-apis/references/PROCESS_GUIDE.md +203 -0
  29. package/template/_agents/skills/lykomi-verify-agent-apis/references/form-ux.md +579 -0
  30. package/template/_agents/skills/lykomi-verify-ui/SKILL.md +31 -0
  31. package/template/_claude/skills/lykomi-author-chat-module/SKILL.md +57 -0
  32. package/template/_claude/skills/lykomi-author-chat-module/references/PROCESS_GUIDE.md +203 -0
  33. package/template/_claude/skills/lykomi-author-chat-module/references/form-ux.md +579 -0
  34. package/template/_claude/skills/lykomi-build-agent-forms/SKILL.md +36 -0
  35. package/template/_claude/skills/lykomi-build-agent-forms/references/PROCESS_GUIDE.md +203 -0
  36. package/template/_claude/skills/lykomi-build-agent-forms/references/form-ux.md +579 -0
  37. package/template/_claude/skills/lykomi-build-workbench/SKILL.md +37 -0
  38. package/template/_claude/skills/lykomi-build-workbench/references/PROCESS_GUIDE.md +203 -0
  39. package/template/_claude/skills/lykomi-build-workbench/references/form-ux.md +579 -0
  40. package/template/_claude/skills/lykomi-verify-agent-apis/SKILL.md +42 -0
  41. package/template/_claude/skills/lykomi-verify-agent-apis/references/PROCESS_GUIDE.md +203 -0
  42. package/template/_claude/skills/lykomi-verify-agent-apis/references/form-ux.md +579 -0
  43. package/template/_claude/skills/lykomi-verify-ui/SKILL.md +31 -0
  44. package/template/agent/app/agent.py +3 -1
  45. package/template/agent/app/main.py +15 -1
  46. package/template/agent/app/skills.py +70 -0
  47. package/template/agent/pyproject.toml +3 -3
  48. package/template/agent/skills/plan-work/SKILL.md +18 -0
  49. package/template/agent/tests/test_skills.py +75 -0
  50. package/template/package.json +5 -5
  51. package/template/src/main.tsx +2 -1
  52. package/template/src/pages/starter-prompts.tsx +9 -2
  53. package/template/src/showcase/context-inspector.tsx +110 -0
  54. package/template/src/showcase/dashboard-example.tsx +157 -0
  55. package/template/src/showcase/feedback-example.tsx +135 -0
  56. package/template/src/showcase/form-example.tsx +171 -0
  57. package/template/src/showcase/form-model.ts +38 -0
  58. package/template/src/showcase/module.tsx +47 -0
  59. package/template/src/showcase/process-example.tsx +118 -0
  60. package/template/src/showcase/showcase-page.tsx +218 -0
  61. package/template/src/showcase/source-panel.tsx +50 -0
  62. package/template/src/showcase/table-example.tsx +180 -0
  63. package/template/src/showcase/table-model.ts +48 -0
  64. package/template/src/showcase/use-context-preview.ts +55 -0
  65. package/template/src/showcase/use-task-context.ts +107 -0
  66. package/template/src/showcase/windows-example.tsx +106 -0
package/README.md CHANGED
@@ -34,6 +34,14 @@ Home opens with a chat composer and clickable prompts. Guide demonstrates a page
34
34
 
35
35
  The lower interface menu links to the Guide in local demo mode. Connecting a real auth provider makes it the signed-in user menu.
36
36
 
37
+ ## Explore Before Connecting Azure
38
+
39
+ Run `pnpm dev:web`, then open **Showcase** at `/showcase`. Six working examples cover forms, collections, dashboards, guided processes, tabs/panels and feedback. A live inspector shows actual AG-UI context and client tools; source panels expose the example code. UI interactions work without credentials. Agent replies require your configured backend.
40
+
41
+ Every preset also includes five coding skills in `.agents/skills/` and `.claude/skills/`: API grounding, ChatModules, agent-aware forms, workbenches and browser verification. No global installation is required. These teach your coding assistant how to build the app; runtime tools belong to your agent and page modules.
42
+
43
+ The showcase is a lazy, removable `showcaseModule` in `src/main.tsx`. Example data is local and disposable. Use the examples as a starting point, then connect your own persistence and application tools.
44
+
37
45
  ## Theme The App
38
46
 
39
47
  Generated apps use LYKOMI's neutral and deep-petrol palette, light and dark V2 favicons, a locally bundled Manrope font, and `LYKOMI UI` for the shell and browser title. Edit `src/theme.ts` to change branding, colors, radius, and typography.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lykomi-app",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "license": "MIT",
5
5
  "description": "Scaffold a new LYKOMI app — AG-UI protocol + Microsoft Agent Framework + Azure Foundry, ready to run.",
6
6
  "keywords": [
@@ -70,3 +70,9 @@ pnpm build
70
70
  ```
71
71
 
72
72
  Use browser verification for layout or chat-flow changes.
73
+
74
+ ## Local skills and examples
75
+
76
+ Use the repository-local skills in `.agents/skills/` or `.claude/skills/` for grounding, ChatModules, agent-aware forms, workbenches and browser verification. Their bundled form UX references describe the shared component contract. These are coding-assistant instructions, not runtime chat skills.
77
+
78
+ `src/showcase/` is a removable, lazy example module. Its inspector reads actual framework state. Keep privacy opt-outs, expected-value checks and read/edit boundaries when adapting an example. Run `pnpm dev:web` to explore without an agent; real replies need the configured service.
@@ -143,3 +143,23 @@ VITE_MSAL_API_SCOPE=api://<api-app-id>/access_as_user
143
143
  ```
144
144
 
145
145
  Ensure your authenticated fetch path forwards the user's bearer token to `/api/agent`.
146
+
147
+ ## Component showcase
148
+
149
+ Run `pnpm dev:web` and open `/showcase` to explore six interactive examples without Azure credentials: forms, collections, dashboards, processes, workbench windows and feedback. The live inspector reads the framework’s actual AG-UI state and available client tools. Select text in a field, filter a table, or change the active window to see the context change. Source panels contain the exact example code, ready to copy.
150
+
151
+ Connect the agent service with `pnpm dev` to ask about that context or request a guarded draft edit. The inspector works offline; agent replies require your configured backend. Examples use local, disposable data. Saving a form accepts it only in this example; leaving the example resets it. The feedback example explicitly simulates outcomes.
152
+
153
+ The showcase is a lazy `ChatModule` in `src/showcase/module.tsx`. Remove `showcaseModule` from the imports and `modules` list in `src/main.tsx` to remove its route and navigation; you can then delete `src/showcase/`. Your own app keeps using the same framework components.
154
+
155
+ ## Bundled coding skills
156
+
157
+ Five repository-local skills ship in both `.agents/skills/` (Codex and compatible tools) and `.claude/skills/` (Claude Code):
158
+
159
+ - `lykomi-verify-agent-apis`: verify current framework and library APIs.
160
+ - `lykomi-author-chat-module`: compose pages, navigation and agent tools.
161
+ - `lykomi-build-agent-forms`: build consistent read/edit forms with automatic field context and guarded edits.
162
+ - `lykomi-build-workbench`: connect windows, tables and processes to visible context.
163
+ - `lykomi-verify-ui`: verify real browser behavior, context and package boundaries.
164
+
165
+ These guide your coding assistant; they are not runtime tools for the chat agent. They install only in this project and do not change global configuration. The optional Claude Code plugin adds documentation MCP servers; it is not required for these bundled skills. Keep project-specific adaptations in your generated app.
@@ -1,5 +1,7 @@
1
1
  from functools import lru_cache
2
2
 
3
+ from .skills import ChatSkillsProvider, get_skills_source
4
+
3
5
  from agent_framework import Agent
4
6
  from agent_framework.foundry import FoundryChatClient
5
7
  from azure.identity import DefaultAzureCredential
@@ -13,6 +15,7 @@ def get_agent() -> Agent:
13
15
  client = FoundryChatClient(credential=DefaultAzureCredential())
14
16
 
15
17
  return Agent(
18
+ context_providers=[ChatSkillsProvider(get_skills_source())],
16
19
  client=client,
17
20
  name="FoundryIQAgent",
18
21
  instructions=(
@@ -3,6 +3,8 @@ from fastapi import FastAPI, Request
3
3
  from fastapi.middleware.cors import CORSMiddleware
4
4
 
5
5
  from .agent import get_agent
6
+ from .skills import get_skills_source
7
+ from agent_framework import SkillsSourceContext
6
8
  from .foundry_iq import reset_query_source_authorization, set_query_source_authorization
7
9
 
8
10
  load_dotenv()
@@ -22,10 +24,9 @@ app.add_middleware(
22
24
  async def foundry_iq_security_trimming_context(request: Request, call_next):
23
25
  # x-ms-query-source-authorization is preferred; authorization is a local-dev
24
26
  # fallback for passing the signed-in user's bearer token to security trimming.
25
- query_source_authorization = (
26
- request.headers.get("x-ms-query-source-authorization")
27
- or request.headers.get("authorization")
28
- )
27
+ query_source_authorization = request.headers.get(
28
+ "x-ms-query-source-authorization"
29
+ ) or request.headers.get("authorization")
29
30
  token = set_query_source_authorization(query_source_authorization)
30
31
  try:
31
32
  return await call_next(request)
@@ -66,6 +67,23 @@ async def health() -> dict[str, str]:
66
67
  return {"status": "ok"}
67
68
 
68
69
 
70
+ @app.get("/api/chat/config")
71
+ async def chat_config() -> dict[str, object]:
72
+ skills = await get_skills_source().get_skills(
73
+ SkillsSourceContext(agent=get_agent())
74
+ )
75
+ return {
76
+ "skills": [
77
+ {
78
+ "name": skill.frontmatter.name,
79
+ "description": skill.frontmatter.description,
80
+ "scope": "app",
81
+ }
82
+ for skill in skills
83
+ ]
84
+ }
85
+
86
+
69
87
  try:
70
88
  from agent_framework.ag_ui import add_agent_framework_fastapi_endpoint
71
89
  except ImportError:
@@ -4,9 +4,9 @@ version = "0.0.0"
4
4
  description = "FastAPI + Microsoft Agent Framework service for __PROJECT_NAME__ with Foundry IQ MCP retrieval."
5
5
  requires-python = ">=3.12,<3.14"
6
6
  dependencies = [
7
- "agent-framework-ag-ui>=1.0.0b260429",
8
- "agent-framework-core>=1.2.2,<2",
9
- "agent-framework-foundry>=1.2.2,<2",
7
+ "agent-framework-ag-ui>=1.1.0",
8
+ "agent-framework-core>=1.14.0,<2",
9
+ "agent-framework-foundry>=1.11.0,<2",
10
10
  "azure-identity>=1.25.1",
11
11
  "fastapi[standard]>=0.115.0",
12
12
  "httpx>=0.28.0",
@@ -1,4 +1,5 @@
1
1
  import "./index.css";
2
+ import { showcaseModule } from "./showcase/module.tsx";
2
3
  import { bootstrapShell } from "@lykomi/web-shell";
3
4
  import type { AuthAdapter } from "@lykomi/web-shell";
4
5
  import { customerPages } from "@/pages/index.tsx";
@@ -9,7 +10,7 @@ const localDemoAuth: AuthAdapter = {
9
10
  };
10
11
 
11
12
  bootstrapShell({
12
- modules: [foundryIqModule],
13
+ modules: [showcaseModule, foundryIqModule],
13
14
  pages: customerPages,
14
15
  authProvider: localDemoAuth,
15
16
  agentFetch: fetch,
@@ -88,3 +88,9 @@ The agent can also call `show_graph` with a payload to put any graph in the side
88
88
  # Where the visualization lives
89
89
 
90
90
  `@lykomi/web-graph`, an npm package. It is source-neutral: it takes the payload contract and knows nothing about Neo4j or Cypher. Its `@lykomi/web-graph/adapters/neo4j` entry point converts driver-shaped records in the browser, for apps that query a graph directly rather than through an agent.
91
+
92
+ ## Local skills and examples
93
+
94
+ Use the repository-local skills in `.agents/skills/` or `.claude/skills/` for grounding, ChatModules, agent-aware forms, workbenches and browser verification. Their bundled form UX references describe the shared component contract. These are coding-assistant instructions, not runtime chat skills.
95
+
96
+ `src/showcase/` is a removable, lazy example module. Its inspector reads actual framework state. Keep privacy opt-outs, expected-value checks and read/edit boundaries when adapting an example. Run `pnpm dev:web` to explore without an agent; real replies need the configured service.
@@ -185,3 +185,23 @@ docker-compose.yml local Neo4j (development only)
185
185
  The visualization itself is `@lykomi/web-graph`, which knows
186
186
  nothing about Neo4j — it takes a source-neutral payload. You can point it at
187
187
  any graph data you have.
188
+
189
+ ## Component showcase
190
+
191
+ Run `pnpm dev:web` and open `/showcase` to explore six interactive examples without Azure credentials: forms, collections, dashboards, processes, workbench windows and feedback. The live inspector reads the framework’s actual AG-UI state and available client tools. Select text in a field, filter a table, or change the active window to see the context change. Source panels contain the exact example code, ready to copy.
192
+
193
+ Connect the agent service with `pnpm dev` to ask about that context or request a guarded draft edit. The inspector works offline; agent replies require your configured backend. Examples use local, disposable data. Saving a form accepts it only in this example; leaving the example resets it. The feedback example explicitly simulates outcomes.
194
+
195
+ The showcase is a lazy `ChatModule` in `src/showcase/module.tsx`. Remove `showcaseModule` from the imports and `modules` list in `src/main.tsx` to remove its route and navigation; you can then delete `src/showcase/`. Your own app keeps using the same framework components.
196
+
197
+ ## Bundled coding skills
198
+
199
+ Five repository-local skills ship in both `.agents/skills/` (Codex and compatible tools) and `.claude/skills/` (Claude Code):
200
+
201
+ - `lykomi-verify-agent-apis`: verify current framework and library APIs.
202
+ - `lykomi-author-chat-module`: compose pages, navigation and agent tools.
203
+ - `lykomi-build-agent-forms`: build consistent read/edit forms with automatic field context and guarded edits.
204
+ - `lykomi-build-workbench`: connect windows, tables and processes to visible context.
205
+ - `lykomi-verify-ui`: verify real browser behavior, context and package boundaries.
206
+
207
+ These guide your coding assistant; they are not runtime tools for the chat agent. They install only in this project and do not change global configuration. The optional Claude Code plugin adds documentation MCP servers; it is not required for these bundled skills. Keep project-specific adaptations in your generated app.
@@ -1,5 +1,7 @@
1
1
  from functools import lru_cache
2
2
 
3
+ from .skills import ChatSkillsProvider, get_skills_source
4
+
3
5
  from agent_framework import Agent
4
6
  from agent_framework.foundry import FoundryChatClient
5
7
  from azure.identity import DefaultAzureCredential
@@ -13,6 +15,7 @@ def get_agent() -> Agent:
13
15
  client = FoundryChatClient(credential=DefaultAzureCredential())
14
16
 
15
17
  return Agent(
18
+ context_providers=[ChatSkillsProvider(get_skills_source())],
16
19
  client=client,
17
20
  name="GraphAgent",
18
21
  instructions=(
@@ -4,6 +4,8 @@ from fastapi import FastAPI
4
4
  from fastapi.middleware.cors import CORSMiddleware
5
5
 
6
6
  from .agent import get_agent
7
+ from .skills import get_skills_source
8
+ from agent_framework import SkillsSourceContext
7
9
  from .graph_db import close_driver
8
10
 
9
11
 
@@ -62,6 +64,23 @@ async def health() -> dict[str, str]:
62
64
  return {"status": "ok"}
63
65
 
64
66
 
67
+ @app.get("/api/chat/config")
68
+ async def chat_config() -> dict[str, object]:
69
+ skills = await get_skills_source().get_skills(
70
+ SkillsSourceContext(agent=get_agent())
71
+ )
72
+ return {
73
+ "skills": [
74
+ {
75
+ "name": skill.frontmatter.name,
76
+ "description": skill.frontmatter.description,
77
+ "scope": "app",
78
+ }
79
+ for skill in skills
80
+ ]
81
+ }
82
+
83
+
65
84
  try:
66
85
  from agent_framework.ag_ui import add_agent_framework_fastapi_endpoint
67
86
  except ImportError:
@@ -4,11 +4,11 @@ version = "0.0.0"
4
4
  description = "FastAPI + Microsoft Agent Framework graph service for __PROJECT_NAME__."
5
5
  requires-python = ">=3.12,<3.14"
6
6
  dependencies = [
7
- "agent-framework-ag-ui>=1.0.0b260429",
8
- "agent-framework-core>=1.2.2,<2",
7
+ "agent-framework-ag-ui>=1.1.0",
8
+ "agent-framework-core>=1.14.0,<2",
9
9
  # Also provides FoundryEmbeddingClient, used by graph_vector_search — no
10
10
  # second SDK and no second credential story for embeddings.
11
- "agent-framework-foundry>=1.2.2,<2",
11
+ "agent-framework-foundry>=1.11.0,<2",
12
12
  "azure-identity>=1.25.1",
13
13
  "fastapi[standard]>=0.115.0",
14
14
  # Vector indexes need a 5.13+ server; any recent driver talks to one.
@@ -1,4 +1,5 @@
1
1
  import "./index.css";
2
+ import { showcaseModule } from "./showcase/module.tsx";
2
3
  import { bootstrapShell } from "@lykomi/web-shell";
3
4
  import type { AuthAdapter } from "@lykomi/web-shell";
4
5
  import { createVoiceModule } from "@lykomi/web-voice";
@@ -25,7 +26,7 @@ const voiceModules = voiceProxyUrl
25
26
  : [];
26
27
 
27
28
  bootstrapShell({
28
- modules: [...voiceModules, graphModule],
29
+ modules: [showcaseModule, ...voiceModules, graphModule],
29
30
  pages: customerPages,
30
31
  authProvider: localDemoAuth,
31
32
  agentFetch: fetch,
@@ -5,7 +5,7 @@
5
5
  "extends": "default",
6
6
  "filesDir": "files",
7
7
  "extraDependencies": {
8
- "@lykomi/web-graph": "0.3.20"
8
+ "@lykomi/web-graph": "0.3.21"
9
9
  },
10
10
  "extraScripts": {
11
11
  "graph:up": "docker compose up -d",
@@ -76,3 +76,9 @@ pnpm build
76
76
  ```
77
77
 
78
78
  Use browser verification for layout or chat-flow changes.
79
+
80
+ ## Local skills and examples
81
+
82
+ Use the repository-local skills in `.agents/skills/` or `.claude/skills/` for grounding, ChatModules, agent-aware forms, workbenches and browser verification. Their bundled form UX references describe the shared component contract. These are coding-assistant instructions, not runtime chat skills.
83
+
84
+ `src/showcase/` is a removable, lazy example module. Its inspector reads actual framework state. Keep privacy opt-outs, expected-value checks and read/edit boundaries when adapting an example. Run `pnpm dev:web` to explore without an agent; real replies need the configured service.
@@ -66,10 +66,7 @@ Connect an authenticated storage service before saving remotely.
66
66
 
67
67
  ## Coding With AI Agents
68
68
 
69
- This app ships `AGENTS.md` (+ a `CLAUDE.md` shim) for coding agents. Claude
70
- Code users can also install the LYKOMI UI plugin — grounding for the
71
- fast-moving assistant-ui / AG-UI / Agent Framework stack plus a ChatModule
72
- authoring skill:
69
+ This app ships `AGENTS.md`, a `CLAUDE.md` shim, and five [local coding skills](#bundled-coding-skills). No extra install is needed for the skills. Claude Code users can optionally install the LYKOMI UI plugin for documentation MCP servers and centrally updated skills:
73
70
 
74
71
  ```
75
72
  /plugin marketplace add lykomi/ui
@@ -208,3 +205,45 @@ VITE_MSAL_API_SCOPE=api://<api-app-id>/access_as_user
208
205
  - `AGENTS.md` is the local coding-agent contract.
209
206
  - `CLAUDE.md` imports `AGENTS.md` for Claude Code.
210
207
  - Images and documents (PDF/DOCX) are sent to the model as file content. Use `new FileAttachmentAdapter({ documentMode: "metadata" })` if your model cannot accept file input, and elide attachment bytes before persisting chat history.
208
+
209
+ ## Component showcase
210
+
211
+ Run `pnpm dev:web` and open `/showcase` to explore six interactive examples without Azure credentials: forms, collections, dashboards, processes, workbench windows and feedback. The live inspector reads the framework’s actual AG-UI state and available client tools. Select text in a field, filter a table, or change the active window to see the context change. Source panels contain the exact example code, ready to copy.
212
+
213
+ Connect the agent service with `pnpm dev` to ask about that context or request a guarded draft edit. The inspector works offline; agent replies require your configured backend. Examples use local, disposable data. Saving a form accepts it only in this example; leaving the example resets it. The feedback example explicitly simulates outcomes.
214
+
215
+ The showcase is a lazy `ChatModule` in `src/showcase/module.tsx`. Remove `showcaseModule` from the imports and `modules` list in `src/main.tsx` to remove its route and navigation; you can then delete `src/showcase/`. Your own app keeps using the same framework components.
216
+
217
+ ## Bundled coding skills
218
+
219
+ Five repository-local skills ship in both `.agents/skills/` (Codex and compatible tools) and `.claude/skills/` (Claude Code):
220
+
221
+ - `lykomi-verify-agent-apis`: verify current framework and library APIs.
222
+ - `lykomi-author-chat-module`: compose pages, navigation and agent tools.
223
+ - `lykomi-build-agent-forms`: build consistent read/edit forms with automatic field context and guarded edits.
224
+ - `lykomi-build-workbench`: connect windows, tables and processes to visible context.
225
+ - `lykomi-verify-ui`: verify real browser behavior, context and package boundaries.
226
+
227
+ These guide your coding assistant; they are not runtime tools for the chat agent. They install only in this project and do not change global configuration. The optional Claude Code plugin adds documentation MCP servers; it is not required for these bundled skills. Keep project-specific adaptations in your generated app.
228
+
229
+ ## Skills in the running chat
230
+
231
+ Type `/` in the composer or use **+ → Use a skill**. The included `/plan-work`
232
+ skill turns your request and current page context into a practical work plan.
233
+ Add runtime skills as `agent/skills/<name>/SKILL.md` with `name` and `description`
234
+ in YAML frontmatter. Restart the agent after adding or editing skills.
235
+
236
+ `agent/app/skills.py` connects Agent Framework discovery with explicit slash
237
+ selection. A selected skill is resolved and loaded before the model runs; normal
238
+ chat can also discover skills automatically. The backend owns the catalogue and
239
+ permissions. No script runner is configured by this starter.
240
+
241
+ These runtime skills serve the app's users. The `.agents/skills/` and
242
+ `.claude/skills/` directories instead help coding agents develop the application.
243
+
244
+ Run the runtime checks without Azure credentials from `agent/`:
245
+ `uv run python -m unittest discover -s tests -v`.
246
+
247
+ The Collections showcase loads 120 local example tasks in batches and registers
248
+ row/bulk actions once with `useDataTableActions`. The agent uses those same actions;
249
+ Delete waits for your confirmation. All example changes stay in the browser.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: lykomi-author-chat-module
3
+ description: Author a LYKOMI UI ChatModule — the unit of composition for bootstrapShell() apps. Use when adding a feature module to an app built on @lykomi/web-shell (new pages, tool UIs, theme layers, providers, nav items, or chat persistence), or when wiring an existing feature into the shell instead of hardcoding it.
4
+ ---
5
+
6
+ A `ChatModule` is how features plug into a LYKOMI UI app. The shell stays
7
+ generic; modules contribute everything feature-specific. Never hardcode
8
+ feature wiring into the shell — compose it as a module.
9
+
10
+ ## The contract (from `@lykomi/web-shell`)
11
+
12
+ ```ts
13
+ import { defineChatModule, type ChatModule } from "@lykomi/web-shell";
14
+
15
+ export const myModule = defineChatModule({
16
+ name: "my-feature",
17
+ useInit, // hook body run inside the layout — cross-store sync, nav registration
18
+ toolUIs, // ReactNode inside <AGUIRuntimeProvider> — makeAssistantToolUI instances
19
+ layoutExtras, // ReactNode inside the layout — banners, dialogs, popovers
20
+ wrappers, // ComponentType[] applied outer→inner — context providers
21
+ useThemeLayers, // hook returning ThemeLayer[] — stacked on the static theme
22
+ pages, // { path, element }[] — appended to Routes (host app wins on collision)
23
+ fetchInterceptor, // zero-arg installer called before createRoot
24
+ chatConversation, // URL-driven chat persistence (below)
25
+ });
26
+ ```
27
+
28
+ Then: `bootstrapShell({ modules: [myModule], pages, theme })`.
29
+
30
+ ## Rules that keep modules composable
31
+
32
+ - `useInit` is a React hook body — rules of hooks apply (no conditionals around it).
33
+ - Sidebar nav is mutated from `useInit` via `useNavStore.getState().setConfig(...)` — there is no declarative nav field.
34
+ - `wrappers` order is outer→inner from the array; the shell renders
35
+ `BrowserRouter → AuthProvider → wrappers → AGUIRuntimeProvider → toolUIs → Routes`.
36
+ - Host-app `pages` beat module `pages` on path collision — never rely on a module owning `/`.
37
+ - Chat persistence: provide `chatConversation` with `pathPattern` (regex capturing the conversation id), optional `useStickyConversationId()` (keeps the runtime alive across non-chat navigation), and `buildHistoryAdapter({ urlMatch, aguiThreadId })` returning an assistant-ui `ThreadHistoryAdapter`. Selection: URL match → first registered config → in-memory.
38
+ - Tool UIs use `makeAssistantToolUI(...)` (assistant-ui 0.15.x) and are registered by rendering them inside `toolUIs`.
39
+
40
+ ## Verify before writing
41
+
42
+ Check the current types in `@lykomi/web-shell` (the package's
43
+ `.d.ts` or [`packages/web-shell/AGENTS.md`](https://github.com/lykomi/ui/blob/main/packages/web-shell/AGENTS.md))
44
+ — the module contract is pre-1.0 and evolves. If your change also touches
45
+ `@assistant-ui/*` or `@ag-ui/*` APIs, run the `lykomi-verify-agent-apis`
46
+ skill first.
47
+
48
+ For multi-step forms or resumable processes, read the wizard/process guidance
49
+ in [the bundled UX contract](references/form-ux.md). It covers the shared
50
+ `ProcessSteps`/`ProcessGuide` pattern, host-authored actions, returning to
51
+ completed steps, locked-state explanations and checking API availability.
52
+
53
+ ## Shared form UX contract
54
+
55
+ Before authoring form UI, read [the framework form UX contract](references/form-ux.md).
56
+ Follow its defaults unless the user explicitly requests a different UX. This bundled
57
+ reference is generated from `docs/FORM_UX.md`; do not duplicate its rules here.
@@ -0,0 +1,203 @@
1
+ <!-- Generated from docs/FORM_UX.md; do not edit. -->
2
+
3
+ ## Wizards and process guidance
4
+
5
+ Use `ProcessSteps` for a connected status rail and `ProcessGuide` for that rail
6
+ plus a focused guidance/action panel. This section is the maintained component
7
+ contract; the standalone process guide and skill resources are generated from it.
8
+ Use a wizard for sequential input and a process overview for resumable work;
9
+ independent tasks belong in a task list rather than a misleading sequence.
10
+
11
+ - Start with `variant="compact"` and expanded guidance for an active task.
12
+ Collapse only genuinely secondary help; do not hide the required next action. Use `framed` to make the rail and guidance read as
13
+ one component; omit a duplicate frame inside an existing panel. Vertical
14
+ rails center as a group while labels remain aligned to the start.
15
+ - Highlight the inspected compact step with a subtle primary fill and primary
16
+ label; other steps use a quiet neutral surface. Keep the guidance unfilled,
17
+ with a primary step label identifying its owner. The compact horizontal rail
18
+ sits above the labels: completed segments and outlined checks use primary,
19
+ unfinished segments stay neutral. Vertical connectors advance only between
20
+ two completed steps. Reserve semantic warning/error colors for those states;
21
+ inspection never changes status. Overview steps retain their selected border.
22
+ - Separate actual progress (`currentStepId`) from the inspected step
23
+ (`selectedStepId`). Allow explicit navigation to completed steps so users can
24
+ revise earlier inputs. Supply Back actions when useful. The host owns
25
+ validation, persistence, permissions and invalidation of dependent results.
26
+ - Author the panel's `content` and `actions` with standard forms and Buttons.
27
+ Use filled Buttons for the main forward transaction; outlined Buttons for
28
+ revising completed input and Back. The component must not invent actions,
29
+ choose their variants, or silently run jobs when a step is inspected.
30
+ - Announce actual current-step status changes even while an earlier step is
31
+ inspected; do not announce whole forms or every progress tick. Running work
32
+ needs honest task-specific progress rather than a percentage inferred from
33
+ the step count. Use a task list for work without a meaningful sequence.
34
+ - Use explicit complete/ready/running/blocked/error/skipped/pending statuses.
35
+ Compact locked steps use a short status; a `message` explains prerequisites
36
+ on hover and keyboard focus, in detailed view and unfolded guidance. Errors
37
+ remain visible. Do not communicate state through color alone.
38
+ - Preserve unsaved values while guidance is folded. Hosts persist drafts when
39
+ navigating between steps; folding is not saving. Use theme semantic tokens,
40
+ the accessible disclosure and reduced-motion behavior provided by the component.
41
+ - Native TypeScript verifies published installed-package exports. Stored JSX
42
+ separately verifies the deployed renderer scope. New framework APIs must be
43
+ published before downstream production consumers import them.
44
+
45
+ ### Shared process and chat context
46
+
47
+ Opt in with `ProcessGuide agentContext={{ id, label, sourcePage, active }}`. Use a stable process-instance ID scoped by its canonical source page; use a readable process label. `active` is required: the host must set it to `false` for inactive tabs, background panels and builder previews, or unmount the guide. A mounted guide without this prop remains presentation-only. With multiple active guides, pointer or keyboard interaction determines which process the With control highlights; all active process snapshots remain available to the agent.
48
+
49
+ The same committed host props supply the guide, the With control and the next AG-UI request. Context carries `currentStepId` (execution position), `selectedStepId` (inspected guidance) and each step's identity, status, optionality, selectability, description and blocker. Plain string description/message values are included automatically; for JSX, provide `contextText={{ description, message }}` with the equivalent plain-text guidance. React nodes, input values and callbacks are never scraped or serialized. Expose relevant form data through the normal field/context APIs.
50
+
51
+ `ui_process_get_context` reads current active processes and identifies the focused process. `ui_process_select_step` takes `processId`, `sourcePage` and `stepId`, validates the live registration and explicit selectability, then calls the same selection handler as a user click. Its `requested` result acknowledges dispatch, not a completed host transition: read live context afterward. It never executes, skips, approves, publishes or completes work. Those transactions remain host-owned, permission-checked tools. The existing `ui_get_context` includes process references too.
52
+
53
+ Context is refreshed on each user request and by the live read tools; it is not a continuous stream of browser changes into a response already being generated. After navigation or an action, refresh context before giving the next guidance. Sent-message context retains the original snapshot. Automatic live process context is separate from optional user pins and survives the user switching into chat, while inactive/unmounted guides are excluded.
54
+
55
+ ### Status symbols, selection and optionality
56
+
57
+ Use these exact `ProcessStepStatus` values; do not infer execution state from selection or optionality.
58
+
59
+ | `status` | Default label | Symbol | Meaning |
60
+ | ---------- | --------------- | --------------------- | --------------------------------------------------------------------------------------------------- |
61
+ | `pending` | Waiting | Outlined clock | Awaiting availability or scheduling; not ready yet. Use `blocked` for a known preventing condition. |
62
+ | `ready` | Ready | Open circle | Available to start, but not started. The inspected ready step adds a centered dot. |
63
+ | `running` | In progress | Spinner | Execution has actually started; honor reduced motion. |
64
+ | `complete` | Completed | Outlined check-circle | Work was completed and accepted by the host. |
65
+ | `blocked` | Blocked | Standalone lock | A prerequisite or permission prevents execution; explain it with `message`. |
66
+ | `error` | Needs attention | Outlined alert-circle | Failure or invalid result requires correction or retry; keep `message` visible. |
67
+ | `skipped` | Skipped | Outlined minus-circle | The host recorded an explicit skip decision; do not present it as completed work. |
68
+
69
+ `currentStepId` is the actual process position. `selectedStepId` is the step being inspected; its surface highlights which guidance belongs to it. The dot is an additional selection cue only for `ready`: inspecting a completed, running, blocked or skipped step preserves its status symbol. Without a valid selection, the component inspects the current step. Avoid an ambiguous `active` or `disabled` boolean for these distinct concepts.
70
+
71
+ `selectable` explicitly permits inspection when `onStepSelect` is provided. It never means executable: a host can allow inspection of a blocked step without permitting its action. Status and `optional` never authorize navigation by themselves.
72
+
73
+ Set `optional: true` independently of status. Unstarted optional steps use a dashed-circle marker in place of the pending clock or ready open circle. Running, completed, blocked, failed and skipped steps keep their status symbols. The default visible label is `Optional`; localize it using `optionalLabel`. It remains visible at compact density and is included in interactive accessible names. An optional step can still be blocked. Provide host-owned Skip/Back actions through the guidance `actions` slot: the host checks policy, persists the decision, sets `status: "skipped"`, and chooses the new `currentStepId`. There is no automatic skip, persistence or prerequisite resolution in this component. Completion accepts both `complete` and `skipped`, but neither selection nor optionality alone marks a process finished.
74
+
75
+ ### Shared component API for builders
76
+
77
+ This self-contained contract is available in the bundled skill reference;
78
+ no framework repository checkout is needed. Verify the installed/deployed API
79
+ before authoring because a host may expose an earlier version.
80
+
81
+ `ProcessSteps` accepts `steps`, `currentStepId`, `selectedStepId`,
82
+ `onStepSelect(id)`, `variant` (`compact` or `overview`, default `compact`),
83
+ `orientation` (`responsive`, `vertical` or `horizontal`, default `responsive`),
84
+ `density` (`comfortable` or `compact`, default `comfortable`), optional
85
+ `showChevrons` (boolean, default false) and an accessible
86
+ `label` (default `Process progress`). Each step has a stable unique string `id`,
87
+ string `label`, and explicit `status`: `pending`, `ready`, `running`, `complete`,
88
+ `blocked`, `error` or `skipped`. Optional fields are `statusLabel` (localized text),
89
+ `description`, `message`, `selectable`, `optional` and `optionalLabel`. Only explicitly selectable steps with
90
+ an `onStepSelect` callback navigate; callbacks never advance actual progress.
91
+ A non-selectable blocked step with a message exposes a focusable tooltip.
92
+
93
+ `showChevrons` adds decorative separators only to horizontal `compact` navigation.
94
+ Their size and reserved gap follow `density`; the progress track stays above the
95
+ steps. Responsive narrow or explicitly vertical layouts retain their connected vertical
96
+ track, and `overview` is unchanged. Chevrons convey sequence, never status.
97
+
98
+ Horizontal rails retain readable minimum step widths and scroll inside their own viewport when needed. Overflow alone reveals previous/next buttons and subtle edge fades; swiping, trackpad scrolling and keyboard navigation also work. Scrolling never selects a step or advances progress. Selecting or focusing a step brings it into the rail viewport without scrolling the host page. Manual scrolling is not snapped back to the selected step. Buttons respect reduced motion and RTL. Localize their names with `scrollLabels={{ previous: "Previous steps", next: "Next steps" }}`.
99
+
100
+ Keep default `orientation="responsive"` for a full wizard: it stacks vertically in narrow containers. Use `orientation="horizontal"` for an embedded progress strip that should remain horizontal even on mobile. Guidance and host content remain outside the scroll viewport. Do not hide steps, truncate essential labels or make the entire page scroll sideways.
101
+
102
+ Use standalone `ProcessSteps density="compact"` for progress-only display: one
103
+ marker and label per step, with accessible status text. There is no guidance
104
+ panel. `onStepSelect(id)` is entirely host-owned: open a document picker,
105
+ navigate to a page or trigger another permitted action; it need not inspect
106
+ inline guidance. Omit the callback for a passive progress indicator.
107
+
108
+ `ProcessGuide` accepts the same props and adds per-step `title` (text), plus `content` and
109
+ `actions` (React nodes), plus these guide-level props:
110
+
111
+ | Prop | Contract |
112
+ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
113
+ | `framed` | Optional themed frame; default false. |
114
+ | `headingLevel` | 2, 3 or 4; default 3. |
115
+ | `guidance` | `expanded` (default) or `collapsible`. |
116
+ | `defaultGuidanceOpen` | Initial uncontrolled disclosure state; default false. |
117
+ | `guidanceOpen`, `onGuidanceOpenChange(open)` | Optional host-controlled disclosure state. |
118
+ | `guidanceToggleLabel` | Localized disclosure text; default `Guidance & actions`. |
119
+ | `guidanceTogglePlacement` | `guidance` (default) or `step`; compact collapsible guides can place the disclosure in the inspected step. Explicit step selection opens guidance, including reselection. Initial open state remains configurable. |
120
+ | `showPosition` | Optional numeric position in guidance; default false. The owning step label remains when the task title differs. |
121
+ | `formatPosition(index, total)` | Localized position text when `showPosition` is true; index is one-based. |
122
+ | `completion` | Content shown only when no step is inspected/current and every step is complete or skipped. |
123
+
124
+ The selected step falls back to the current step if its ID is absent/invalid.
125
+ Changing inspected steps remounts their content; hosts must retain drafts outside
126
+ that content. Folding guidance keeps the same inputs mounted. Empty arrays render
127
+ nothing. The component never fetches, saves, authorizes, validates or runs a job.
128
+
129
+ Example composition, after availability is verified:
130
+
131
+ ```jsx
132
+ <ProcessGuide
133
+ framed
134
+ variant="compact"
135
+ guidance="expanded"
136
+ currentStepId="review"
137
+ selectedStepId={inspectedStep}
138
+ onStepSelect={setInspectedStep}
139
+ steps={[
140
+ {
141
+ id: "documents",
142
+ label: "Documents",
143
+ status: "complete",
144
+ selectable: true,
145
+ title: "Select the source documents",
146
+ content: documentFields,
147
+ actions: (
148
+ <Button type="button" variant="outline" onClick={openDocumentEditor}>
149
+ Change documents
150
+ </Button>
151
+ ),
152
+ },
153
+ {
154
+ id: "review",
155
+ label: "Review",
156
+ status: "ready",
157
+ selectable: true,
158
+ description: "Check the findings before confirming.",
159
+ content: reviewFields,
160
+ actions: (
161
+ <Button type="button" onClick={validateAndSaveReview}>
162
+ Confirm review
163
+ </Button>
164
+ ),
165
+ },
166
+ ]}
167
+ />
168
+ ```
169
+
170
+ The host supplies the fields and handlers in this example, including saving
171
+ changes and invalidating results after source edits. In native TypeScript import
172
+ from the published package and its stylesheet. In stored JSX use only verified
173
+ scope symbols without imports.
174
+
175
+ ### Design references
176
+
177
+ - [USWDS step indicator](https://designsystem.digital.gov/components/step-indicator/):
178
+ distinguish current/completed/pending and keep explicit headings/navigation.
179
+ - [GOV.UK multiple tasks](https://design-system.service.gov.uk/patterns/complete-multiple-tasks/):
180
+ resumable work needs clear task statuses and prerequisites.
181
+ - [Carbon progress indicator](https://www.carbondesignsystem.com/building-blocks/core/components/progress-indicator/guidelines):
182
+ a stable sequence and validation are prerequisites for linear task guidance.
183
+ - [WAI disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/):
184
+ keyboard operation and expanded state for unfolding guidance.
185
+
186
+ These inform the design; usability with real users still needs validation.
187
+
188
+ ### List toolbar control density
189
+
190
+ List toolbars use the shared `Button size="sm"` density for New, grouping,
191
+ Filters, Columns and other text actions. Authored `DataTableToolbar actions`
192
+ use the same primitive and size; do not mix the default-height button into that
193
+ row. Let the button primitive own font family, weight, size, control radius,
194
+ outline surface and interaction states. Table controls must not restyle ordinary
195
+ outline buttons with a different radius, translucent fill or shadow reset.
196
+ Retain meaningful states such as active filters, dashed facet boundaries and
197
+ pressed grouping. Icon-only toolbar controls share the same height and focus
198
+ behavior. Menus and badges retain their own semantic surface treatment.
199
+
200
+ Verify the rendered toolbar in light/dark themes and at narrow widths. Compare
201
+ computed height, font, weight and radius of authored actions with built-in
202
+ Filters/Columns; using the same component name alone does not establish parity.
203
+ Use CSS and shared primitive variants, without observers or per-button requests.