@supersoniks/concorde 5.1.2 → 5.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/concorde-docs/SKILL.md +1 -1
- package/README.md +1 -1
- package/ai/README.md +29 -41
- package/ai/skills/concorde/SKILL.md +54 -324
- package/ai/skills/concorde/rules/composition.md +32 -0
- package/ai/skills/concorde/rules/data.md +47 -0
- package/ai/skills/concorde/rules/http.md +25 -0
- package/ai/skills/concorde/rules/lists-forms.md +35 -0
- package/ai/skills/concorde/rules/styling.md +46 -0
- package/ai/skills/concorde/rules/troubleshooting.md +45 -0
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +21 -21
- package/concorde-core.es.js +977 -980
- package/custom-elements-manifest.public.config.mjs +8 -0
- package/{.tmp-cem/custom-elements.json → custom-elements.json} +11722 -8868
- package/dist/concorde-core.bundle.js +21 -21
- package/dist/concorde-core.es.js +977 -980
- package/dist/docs-mock-api-sw.js +58 -223
- package/dist/docs-mock-api-sw.js.map +4 -4
- package/dist/img/concorde/plane_01.jpg +0 -0
- package/dist/img/concorde/plane_02.jpg +0 -0
- package/dist/img/concorde/plane_03.jpg +0 -0
- package/dist/img/concorde/plane_04.jpg +0 -0
- package/dist/img/concorde/plane_05.jpg +0 -0
- package/dist/img/concorde/plane_06.jpg +0 -0
- package/dist/img/concorde/plane_07.jpg +0 -0
- package/dist/img/concorde/plane_08.jpg +0 -0
- package/dist/img/concorde/plane_09.jpg +0 -0
- package/dist/img/concorde/plane_10.jpg +0 -0
- package/dist/img/concorde/plane_11.jpg +0 -0
- package/dist/img/concorde/plane_12.jpg +0 -0
- package/dist/img/concorde/plane_13.jpg +0 -0
- package/dist/img/og-concorde.jpg +0 -0
- package/dist/robots.txt +11 -10
- package/docs/.htaccess +7 -0
- package/docs/about.html +111 -0
- package/docs/about.md +22 -0
- package/docs/assets/{index-BgG6FFPt.js → index-6sS76xWj.js} +482 -500
- package/docs/assets/{index-x89XINSG.css → index-DkdPbH0F.css} +1 -1
- package/docs/core/components/functional/date/date.md +1 -1
- package/docs/core/components/functional/list/list.html +7 -5
- package/docs/core/components/functional/list/list.md +6 -2
- package/docs/core/components/ui/card/card.html +1 -1
- package/docs/core/components/ui/card/card.md +1 -1
- package/docs/core/components/ui/image/image.html +17 -17
- package/docs/core/components/ui/image/image.md +17 -17
- package/docs/core/components/ui/modal/modal.html +2 -2
- package/docs/core/components/ui/modal/modal.md +2 -2
- package/docs/custom-elements.json +16559 -0
- package/docs/docs/decorators/bind.html +22 -21
- package/docs/docs/decorators/bind.md +23 -24
- package/docs/docs/getting-started/ai-agents.html +50 -94
- package/docs/docs/getting-started/ai-agents.md +29 -55
- package/docs/docs/getting-started/dataFlow.html +1 -1
- package/docs/docs/getting-started/dataFlow.md +1 -1
- package/docs/docs/index.html +1 -1
- package/docs/hubs/decorators.html +11 -16
- package/docs/hubs/remote-data.html +5 -9
- package/docs/img/og-concorde.jpg +0 -0
- package/docs/index.html +91 -2
- package/docs/index.md +2 -2
- package/docs/llms-full.txt +58 -74
- package/docs/llms.txt +6 -4
- package/docs/privacy.html +122 -0
- package/docs/privacy.md +32 -0
- package/docs/sitemap.xml +6 -0
- package/docs/src/core/components/functional/date/date.md +1 -1
- package/docs/src/core/components/functional/list/list.md +6 -2
- package/docs/src/core/components/functional/sdui/component-catalog.gaps.json +1 -1
- package/docs/src/core/components/functional/sdui/component-catalog.json +1 -1
- package/docs/src/core/components/ui/card/card.md +1 -1
- package/docs/src/core/components/ui/image/image.md +17 -17
- package/docs/src/core/components/ui/modal/modal.md +2 -2
- package/docs/src/docs/decorators/bind.md +23 -24
- package/docs/src/docs/getting-started/ai-agents.md +29 -55
- package/docs/src/docs/getting-started/dataFlow.md +1 -1
- package/docs/src/docs/search/docs-search.json +100 -55
- package/docs/src/tsconfig.json +11 -5
- package/index.html +89 -0
- package/package.json +8 -4
- package/public/img/og-concorde.jpg +0 -0
- package/scripts/ai-init.mjs +104 -379
- package/scripts/ai-init.test.mjs +81 -239
- package/scripts/docs-markdown-vite-plugin.ts +11 -5
- package/scripts/docs-public-url.mjs +6 -0
- package/scripts/docs.htaccess +7 -0
- package/scripts/generate-cem.mjs +244 -0
- package/scripts/generate-cem.test.mjs +122 -0
- package/scripts/generate-crawl-docs.mjs +29 -5
- package/scripts/generate-sdui-catalog.mjs +11 -10
- package/scripts/post-build-docs.js +3 -0
- package/scripts/pre-publish.mjs +2 -1
- package/scripts/site-pages.mjs +212 -0
- package/scripts/site-pages.test.mjs +116 -0
- package/site-pages/about.md +22 -0
- package/site-pages/privacy.md +32 -0
- package/src/core/components/functional/date/date.md +1 -1
- package/src/core/components/functional/list/list.md +6 -2
- package/src/core/components/functional/sdui/component-catalog.gaps.json +1 -1
- package/src/core/components/functional/sdui/component-catalog.json +1 -1
- package/src/core/components/ui/card/card.md +1 -1
- package/src/core/components/ui/image/image.md +17 -17
- package/src/core/components/ui/modal/modal.md +2 -2
- package/src/core/decorators/subscriber/bind.ts +9 -14
- package/src/docs/components/docs-demo-sources.ts +3 -3
- package/src/docs/decorators/bind.md +23 -24
- package/src/docs/docs-location.spec.ts +10 -0
- package/src/docs/docs-location.ts +10 -0
- package/src/docs/example/decorators-demo-bind-demos.ts +11 -28
- package/src/docs/example/docs-toggle-demos.ts +1 -1
- package/src/docs/getting-started/ai-agents.md +29 -55
- package/src/docs/getting-started/dataFlow.md +1 -1
- package/src/docs/home/home.ts +3 -1
- package/src/docs/navigation/navigation.ts +1 -1
- package/src/docs/search/docs-search.json +100 -55
- package/src/docs/search/markdown-renderer.ts +6 -1
- package/src/docs/tailwind/css/docs/content.css +4 -5
- package/src/tsconfig.json +11 -5
- package/src/tsconfig.tsbuildinfo +1 -1
- package/ai/AGENTS.md +0 -56
- package/ai/cursor/rules/concorde-menu.mdc +0 -15
- package/ai/cursor/rules/concorde-scope.mdc +0 -14
- package/ai/cursor/rules/concorde-theme.mdc +0 -13
- package/ai/cursor/rules/concorde.mdc +0 -66
- package/ai/jetbrains/rules/concorde.md +0 -53
- package/ai/skills/concorde-get-set-dp/SKILL.md +0 -194
- package/ai/skills/concorde-imports/SKILL.md +0 -78
- package/ai/skills/concorde-menu/SKILL.md +0 -74
- package/ai/skills/concorde-scope/SKILL.md +0 -70
- package/ai/skills/concorde-theme/SKILL.md +0 -57
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>@bind — Concorde by Supersoniks</title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, docs/decorators/bind, bind, @bind, decorator, { reflect: true },
|
|
7
|
+
<meta name="description" content="@bind(key) keeps a class property and one path of the DataProvider store in sync. With { reflect: true } the sync goes both ways: the property follows the store, and each assignment is written back to">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, docs/decorators/bind, bind, @bind, decorator, @bind(key), { reflect: true }, @state(), reflect: true, set(), reflect, @subscribe, ${index}">
|
|
9
9
|
<meta name="concorde-doc-id" content="docs/decorators/bind">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/docs/decorators/bind">
|
|
11
11
|
<link rel="alternate" type="text/markdown" href="https://concorde.supersoniks.org/docs/decorators/bind.md">
|
|
@@ -16,24 +16,12 @@
|
|
|
16
16
|
</header>
|
|
17
17
|
<main>
|
|
18
18
|
<article>
|
|
19
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde decorator — @bind</strong>.
|
|
19
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde decorator — @bind</strong>. @bind(key) keeps a class property and one path of the DataProvider store in sync. With { reflect: true } the sync goes both ways: the property follows the store, and each assignment is written back to <span>Doc ID: <code>docs/decorators/bind</code>. Keywords: Concorde, supersoniks, docs/decorators/bind, bind, @bind, decorator, @bind(key), { reflect: true }, @state(), reflect: true, set(), reflect, @subscribe, ${index}. URL: <a href="https://concorde.supersoniks.org/docs/decorators/bind">https://concorde.supersoniks.org/docs/decorators/bind</a>.</span></p>
|
|
20
20
|
<h1 id="bind">@bind</h1>
|
|
21
|
-
<p>
|
|
21
|
+
<p><code>@bind(key)</code> keeps a class property and one path of the DataProvider store in sync. With <code>{ reflect: true }</code> the sync goes both ways: the property follows the store, and each assignment is written back to it. For one direction only, use the complementary decorators: <a href="/docs/decorators/subscribe">@subscribe</a> to read, <a href="/docs/decorators/publish">@publish</a> to write. See <a href="/docs/getting-started/dataFlow">Data flow</a> for the overall model.</p>
|
|
22
22
|
<h2 id="import">Import</h2>
|
|
23
23
|
<pre><code class="language-typescript">import { bind } from "@supersoniks/concorde/decorators";
|
|
24
|
-
|
|
25
|
-
@bind("flight.gate")
|
|
26
|
-
@state()
|
|
27
|
-
gate = "";
|
|
28
|
-
</code></pre>
|
|
29
|
-
<h2 id="basic-usage">Basic usage</h2>
|
|
30
|
-
<p>The first path segment is the data provider id, the rest is dot notation (array items use a numeric index: <code>passengers.0</code>). The property updates each time the store value changes. Add <code>@state()</code> so Lit re-renders.</p>
|
|
31
|
-
<pre><code><docs-demo-sources for="demo-bind"></docs-demo-sources>
|
|
32
|
-
<demo-bind></demo-bind>
|
|
33
|
-
</code></pre>
|
|
34
|
-
<h2 id="typed-key">Typed key</h2>
|
|
35
|
-
<p>With a <code>DataProviderKey<T></code>, TypeScript checks that the property type matches <code>T</code> at that path.</p>
|
|
36
|
-
<pre><code class="language-typescript">import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
24
|
+
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
37
25
|
|
|
38
26
|
type Flight = { flight: string; gate: string; boarded: number };
|
|
39
27
|
const flightKey = new DataProviderKey&lt;Flight&gt;("flight");
|
|
@@ -42,13 +30,26 @@ const flightKey = new DataProviderKey&lt;Flight&gt;("flight");
|
|
|
42
30
|
@state()
|
|
43
31
|
boarded = 0;
|
|
44
32
|
</code></pre>
|
|
33
|
+
<h2 id="basic-usage">Basic usage</h2>
|
|
34
|
+
<p>The key is a <a href="/docs/misc/dataProviderKey">DataProviderKey</a>: TypeScript checks that the property type matches <code>T</code> at that path. The property updates each time the store value changes. Add <code>@state()</code> so Lit re-renders.</p>
|
|
35
|
+
<pre><code><docs-demo-sources for="demo-bind"></docs-demo-sources>
|
|
36
|
+
<demo-bind></demo-bind>
|
|
37
|
+
</code></pre>
|
|
45
38
|
<h2 id="reflect">Reflect</h2>
|
|
46
|
-
<p>
|
|
39
|
+
<p>With <code>reflect: true</code>, each assignment to the property calls <code>set()</code> at the key path, so every other subscriber sees the new value. An internal guard prevents update loops. Without <code>reflect</code> (the default), assigning the property does not touch the store, and <code>@bind</code> behaves like <code>@subscribe</code>.</p>
|
|
47
40
|
<pre><code><docs-demo-sources for="demo-bind-reflect"></docs-demo-sources>
|
|
48
41
|
<demo-bind-reflect></demo-bind-reflect>
|
|
49
42
|
</code></pre>
|
|
50
43
|
<h2 id="dynamic-path">Dynamic path</h2>
|
|
51
|
-
<p>Placeholders such as <code>${index}</code> are resolved from properties of the same component, and <code>@bind</code> re-subscribes when they change.
|
|
44
|
+
<p>Placeholders such as <code>${index}</code> are resolved from properties of the same component, and <code>@bind</code> re-subscribes when they change. Declare them in the key's second generic and write them in a plain string, not a backtick template literal. While a placeholder is <code>null</code> or <code>undefined</code> the binding is inactive; <code>{ skipEmptyPlaceholder: true }</code> also waits on <code>""</code>. Full rules: <a href="/docs/misc/dynamic-path">Dynamic paths</a>.</p>
|
|
45
|
+
<pre><code class="language-typescript">const personKey = new DataProviderKey&lt;Person, { dataProvider: string; index: number }&gt;(
|
|
46
|
+
"${dataProvider}.${index}",
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
@bind(personKey)
|
|
50
|
+
@state()
|
|
51
|
+
person: Person | null = null;
|
|
52
|
+
</code></pre>
|
|
52
53
|
<pre><code><docs-demo-sources for="demo-bind-dynamic"></docs-demo-sources>
|
|
53
54
|
<demo-bind-dynamic></demo-bind-dynamic>
|
|
54
55
|
</code></pre>
|
|
@@ -64,8 +65,8 @@ boarded = 0;
|
|
|
64
65
|
</tr>
|
|
65
66
|
</thead>
|
|
66
67
|
<tbody><tr>
|
|
67
|
-
<td><code>
|
|
68
|
-
<td><code>
|
|
68
|
+
<td><code>key</code></td>
|
|
69
|
+
<td><code>DataProviderKey<T></code></td>
|
|
69
70
|
<td>Store path to bind. Supports <code>${prop}</code> placeholders</td>
|
|
70
71
|
</tr>
|
|
71
72
|
<tr>
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
# @bind
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@bind(key)` keeps a class property and one path of the DataProvider store in sync. With `{ reflect: true }` the sync goes both ways: the property follows the store, and each assignment is written back to it. For one direction only, use the complementary decorators: [@subscribe](/docs/decorators/subscribe) to read, [@publish](/docs/decorators/publish) to write. See [Data flow](/docs/getting-started/dataFlow) for the overall model.
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
7
|
<sonic-code language="typescript">
|
|
8
8
|
<template>
|
|
9
9
|
import { bind } from "@supersoniks/concorde/decorators";
|
|
10
|
+
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
11
|
+
|
|
12
|
+
type Flight = { flight: string; gate: string; boarded: number };
|
|
13
|
+
const flightKey = new DataProviderKey<Flight>("flight");
|
|
10
14
|
|
|
11
|
-
@bind(
|
|
15
|
+
@bind(flightKey.boarded, { reflect: true })
|
|
12
16
|
@state()
|
|
13
|
-
|
|
17
|
+
boarded = 0;
|
|
14
18
|
</template>
|
|
15
19
|
</sonic-code>
|
|
16
20
|
|
|
17
21
|
## Basic usage
|
|
18
22
|
|
|
19
|
-
The
|
|
23
|
+
The key is a [DataProviderKey](/docs/misc/dataProviderKey): TypeScript checks that the property type matches `T` at that path. The property updates each time the store value changes. Add `@state()` so Lit re-renders.
|
|
20
24
|
|
|
21
25
|
<sonic-code>
|
|
22
26
|
<template>
|
|
@@ -25,26 +29,9 @@ The first path segment is the data provider id, the rest is dot notation (array
|
|
|
25
29
|
</template>
|
|
26
30
|
</sonic-code>
|
|
27
31
|
|
|
28
|
-
## Typed key
|
|
29
|
-
|
|
30
|
-
With a `DataProviderKey<T>`, TypeScript checks that the property type matches `T` at that path.
|
|
31
|
-
|
|
32
|
-
<sonic-code language="typescript">
|
|
33
|
-
<template>
|
|
34
|
-
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
35
|
-
|
|
36
|
-
type Flight = { flight: string; gate: string; boarded: number };
|
|
37
|
-
const flightKey = new DataProviderKey<Flight>("flight");
|
|
38
|
-
|
|
39
|
-
@bind(flightKey.boarded, { reflect: true })
|
|
40
|
-
@state()
|
|
41
|
-
boarded = 0;
|
|
42
|
-
</template>
|
|
43
|
-
</sonic-code>
|
|
44
|
-
|
|
45
32
|
## Reflect
|
|
46
33
|
|
|
47
|
-
|
|
34
|
+
With `reflect: true`, each assignment to the property calls `set()` at the key path, so every other subscriber sees the new value. An internal guard prevents update loops. Without `reflect` (the default), assigning the property does not touch the store, and `@bind` behaves like `@subscribe`.
|
|
48
35
|
|
|
49
36
|
<sonic-code>
|
|
50
37
|
<template>
|
|
@@ -55,7 +42,19 @@ By default (`reflect: false`) the binding is one-way: assigning the property doe
|
|
|
55
42
|
|
|
56
43
|
## Dynamic path
|
|
57
44
|
|
|
58
|
-
Placeholders such as `${index}` are resolved from properties of the same component, and `@bind` re-subscribes when they change.
|
|
45
|
+
Placeholders such as `${index}` are resolved from properties of the same component, and `@bind` re-subscribes when they change. Declare them in the key's second generic and write them in a plain string, not a backtick template literal. While a placeholder is `null` or `undefined` the binding is inactive; `{ skipEmptyPlaceholder: true }` also waits on `""`. Full rules: [Dynamic paths](/docs/misc/dynamic-path).
|
|
46
|
+
|
|
47
|
+
<sonic-code language="typescript">
|
|
48
|
+
<template>
|
|
49
|
+
const personKey = new DataProviderKey<Person, { dataProvider: string; index: number }>(
|
|
50
|
+
"${dataProvider}.${index}",
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
@bind(personKey)
|
|
54
|
+
@state()
|
|
55
|
+
person: Person | null = null;
|
|
56
|
+
</template>
|
|
57
|
+
</sonic-code>
|
|
59
58
|
|
|
60
59
|
<sonic-code>
|
|
61
60
|
<template>
|
|
@@ -72,6 +71,6 @@ The decorator subscribes in `connectedCallback` and unsubscribes in `disconnecte
|
|
|
72
71
|
|
|
73
72
|
| Argument | Type | Description |
|
|
74
73
|
|----------|------|-------------|
|
|
75
|
-
| `
|
|
74
|
+
| `key` | `DataProviderKey<T>` | Store path to bind. Supports `${prop}` placeholders |
|
|
76
75
|
| `options.reflect` | `boolean` (default `false`) | Write local assignments back to the store |
|
|
77
76
|
| `options.skipEmptyPlaceholder` | `boolean` (default `false`) | Treat a placeholder resolved to `""` as not ready |
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>AI agents (
|
|
7
|
-
<meta name="description" content="Concorde ships
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, docs/getting-started/ai-agents, ai-agents, AI agents (
|
|
9
|
-
| Concorde repo (contributors) | ,
|
|
6
|
+
<title>AI agents (skill) — Concorde by Supersoniks</title>
|
|
7
|
+
<meta name="description" content="Concorde ships one Agent Skill, concorde, so coding agents follow the framework patterns. Cursor, Claude Code, JetBrains Junie and other agents load it on their own when they work on Concorde code; th">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, docs/getting-started/ai-agents, ai-agents, AI agents (skill), guide, concorde, AGENTS.md, yarn ai:sync, ai-init, yarn add @supersoniks/concorde, |
|
|
9
|
+
| Concorde repo (contributors) | , SKILL.md, custom-elements.json, rules/">
|
|
10
10
|
<meta name="concorde-doc-id" content="docs/getting-started/ai-agents">
|
|
11
11
|
<link rel="canonical" href="https://concorde.supersoniks.org/docs/getting-started/ai-agents">
|
|
12
12
|
<link rel="alternate" type="text/markdown" href="https://concorde.supersoniks.org/docs/getting-started/ai-agents.md">
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
</header>
|
|
18
18
|
<main>
|
|
19
19
|
<article>
|
|
20
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde guide — AI agents (
|
|
21
|
-
| Concorde repo (contributors) | ,
|
|
22
|
-
<h1 id="ai-agents-
|
|
23
|
-
<p>Concorde ships <
|
|
24
|
-
<p>On a <a href="/docs/getting-started/installation">starter</a> project, run <code>yarn ai:sync</code> after install. On an existing project, install Concorde first, then
|
|
25
|
-
<h2 id="
|
|
20
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde guide — AI agents (skill)</strong>. Concorde ships one Agent Skill, concorde, so coding agents follow the framework patterns. Cursor, Claude Code, JetBrains Junie and other agents load it on their own when they work on Concorde code; th <span>Doc ID: <code>docs/getting-started/ai-agents</code>. Keywords: Concorde, supersoniks, docs/getting-started/ai-agents, ai-agents, AI agents (skill), guide, concorde, AGENTS.md, yarn ai:sync, ai-init, yarn add @supersoniks/concorde, |
|
|
21
|
+
| Concorde repo (contributors) | , SKILL.md, custom-elements.json, rules/. URL: <a href="https://concorde.supersoniks.org/docs/getting-started/ai-agents">https://concorde.supersoniks.org/docs/getting-started/ai-agents</a>.</span></p>
|
|
22
|
+
<h1 id="ai-agents-skill">AI agents (skill)</h1>
|
|
23
|
+
<p>Concorde ships one <a href="https://agentskills.io">Agent Skill</a>, <code>concorde</code>, so coding agents follow the framework patterns. Cursor, Claude Code, JetBrains Junie and other agents load it on their own when they work on Concorde code; there is nothing to add to your <code>AGENTS.md</code>.</p>
|
|
24
|
+
<p>On a <a href="/docs/getting-started/installation">starter</a> project, run <code>yarn ai:sync</code> after install. On an existing project, install Concorde first, then run <code>ai-init</code>.</p>
|
|
25
|
+
<h2 id="commands">Commands</h2>
|
|
26
26
|
<table>
|
|
27
27
|
<thead>
|
|
28
28
|
<tr>
|
|
@@ -43,76 +43,45 @@
|
|
|
43
43
|
<td><code>yarn ai-init</code></td>
|
|
44
44
|
</tr>
|
|
45
45
|
</tbody></table>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Manual / existing project
|
|
50
|
-
node node_modules/@supersoniks/concorde/scripts/ai-init.mjs
|
|
51
|
-
</code></pre>
|
|
52
|
-
<h2 id="useful-flags">Useful flags</h2>
|
|
46
|
+
<p>Re-run the same command after each Concorde upgrade to refresh the skill.</p>
|
|
47
|
+
<h2 id="the-skill">The skill</h2>
|
|
48
|
+
<p><code>SKILL.md</code> is the entry point: where to find the truth (the project, these docs, <code>custom-elements.json</code>), the critical rules and the imports. Details live in <code>rules/</code> files that the agent reads only for the topic at hand.</p>
|
|
53
49
|
<table>
|
|
54
50
|
<thead>
|
|
55
51
|
<tr>
|
|
56
|
-
<th>
|
|
57
|
-
<th>
|
|
52
|
+
<th>File</th>
|
|
53
|
+
<th>Topic</th>
|
|
58
54
|
</tr>
|
|
59
55
|
</thead>
|
|
60
56
|
<tbody><tr>
|
|
61
|
-
<td><code
|
|
62
|
-
<td>
|
|
63
|
-
</tr>
|
|
64
|
-
<tr>
|
|
65
|
-
<td><code>--merge-agents</code></td>
|
|
66
|
-
<td>Opt-in: keep the project preamble and append / refresh the Concorde block</td>
|
|
67
|
-
</tr>
|
|
68
|
-
<tr>
|
|
69
|
-
<td><code>--force-agents</code></td>
|
|
70
|
-
<td>Opt-in: <strong>replace</strong> the whole <code>AGENTS.md</code> (destructive)</td>
|
|
71
|
-
</tr>
|
|
72
|
-
<tr>
|
|
73
|
-
<td><code>--overlay <dir></code></td>
|
|
74
|
-
<td>Extra rules/skills + optional <code>AGENTS.concorde.md</code> for project-only Concorde agent notes</td>
|
|
57
|
+
<td><code>SKILL.md</code></td>
|
|
58
|
+
<td>Sources, critical rules, component shape, imports</td>
|
|
75
59
|
</tr>
|
|
76
60
|
<tr>
|
|
77
|
-
<td><code
|
|
78
|
-
<td>
|
|
61
|
+
<td><code>rules/data.md</code></td>
|
|
62
|
+
<td>Store, <code>DataProviderKey</code>, <code>@subscribe</code> / <code>@publish</code> / <code>@bind</code> / <code>@handle</code>, <code>sub()</code>, <code>get</code> / <code>set</code> / <code>dp</code></td>
|
|
79
63
|
</tr>
|
|
80
64
|
<tr>
|
|
81
|
-
<td><code
|
|
82
|
-
<td>
|
|
65
|
+
<td><code>rules/http.md</code></td>
|
|
66
|
+
<td><code>Endpoint</code>, <code>@get</code> / <code>@post</code>, API configuration</td>
|
|
83
67
|
</tr>
|
|
84
|
-
</tbody></table>
|
|
85
|
-
<h2 id="agentsmd-policy-non-invasive"><code>AGENTS.md</code> policy (non-invasive)</h2>
|
|
86
|
-
<table>
|
|
87
|
-
<thead>
|
|
88
68
|
<tr>
|
|
89
|
-
<
|
|
90
|
-
<
|
|
91
|
-
</tr>
|
|
92
|
-
</thead>
|
|
93
|
-
<tbody><tr>
|
|
94
|
-
<td>No <code>AGENTS.md</code></td>
|
|
95
|
-
<td>Create the Concorde guide</td>
|
|
69
|
+
<td><code>rules/lists-forms.md</code></td>
|
|
70
|
+
<td><code>sonic-list</code> / <code>sonic-queue</code>, form fields</td>
|
|
96
71
|
</tr>
|
|
97
72
|
<tr>
|
|
98
|
-
<td>
|
|
99
|
-
<td>
|
|
73
|
+
<td><code>rules/styling.md</code></td>
|
|
74
|
+
<td>Theme, tokens, classes, styling rules</td>
|
|
100
75
|
</tr>
|
|
101
76
|
<tr>
|
|
102
|
-
<td>
|
|
103
|
-
<td
|
|
77
|
+
<td><code>rules/composition.md</code></td>
|
|
78
|
+
<td>Parts of compound components, built-in states</td>
|
|
104
79
|
</tr>
|
|
105
80
|
<tr>
|
|
106
|
-
<td><code
|
|
107
|
-
<td>
|
|
81
|
+
<td><code>rules/troubleshooting.md</code></td>
|
|
82
|
+
<td>Symptom → cause → fix: values not updating, requests not sent, empty lists</td>
|
|
108
83
|
</tr>
|
|
109
84
|
</tbody></table>
|
|
110
|
-
<pre><code class="language-text">[optional project preamble — short, project-only]
|
|
111
|
-
<!-- concorde-ai -->
|
|
112
|
-
<package ai/AGENTS.md>
|
|
113
|
-
[--- + overlay AGENTS.concorde.md]
|
|
114
|
-
</code></pre>
|
|
115
|
-
<p>Everything <strong>after</strong> <code><!-- concorde-ai --></code> is replaced on each <code>ai-init</code> run (idempotent). Do not paste a full copy of the Concorde guide above the marker — put project-specific notes in <code>AGENTS.concorde.md</code> (overlay). If the preamble duplicates package <code>AGENTS.md</code>, <code>ai-init</code> slims or drops it and prints a warning. Legacy filenames <code>AGENTS.overlay.md</code> / <code>AGENTS.starter.md</code> are still accepted with a deprecation warning.</p>
|
|
116
85
|
<h2 id="what-gets-installed">What gets installed</h2>
|
|
117
86
|
<table>
|
|
118
87
|
<thead>
|
|
@@ -122,51 +91,38 @@ node node_modules/@supersoniks/concorde/scripts/ai-init.mjs
|
|
|
122
91
|
</tr>
|
|
123
92
|
</thead>
|
|
124
93
|
<tbody><tr>
|
|
125
|
-
<td><code
|
|
126
|
-
<td>
|
|
94
|
+
<td><code>.agents/skills/concorde/</code></td>
|
|
95
|
+
<td>The skill (read directly by Cursor)</td>
|
|
127
96
|
</tr>
|
|
128
97
|
<tr>
|
|
129
|
-
<td><code>.
|
|
130
|
-
<td>
|
|
98
|
+
<td><code>.claude/skills/concorde</code></td>
|
|
99
|
+
<td>Symlink for Claude Code</td>
|
|
131
100
|
</tr>
|
|
132
101
|
<tr>
|
|
133
|
-
<td><code>.
|
|
134
|
-
<td>
|
|
135
|
-
</tr>
|
|
136
|
-
<tr>
|
|
137
|
-
<td><code>.cursor/skills/concorde-scope/</code></td>
|
|
138
|
-
<td><code>serviceURL</code>, <code>formDataProvider</code>, API configuration</td>
|
|
139
|
-
</tr>
|
|
140
|
-
<tr>
|
|
141
|
-
<td><code>.cursor/skills/concorde-theme/</code></td>
|
|
142
|
-
<td><code>sonic-theme</code> and <code>--sc-*</code> tokens</td>
|
|
143
|
-
</tr>
|
|
144
|
-
<tr>
|
|
145
|
-
<td><code>.cursor/skills/concorde-menu/</code></td>
|
|
146
|
-
<td><code>sonic-menu</code> navigation</td>
|
|
102
|
+
<td><code>.junie/skills/concorde</code></td>
|
|
103
|
+
<td>Symlink for JetBrains Junie</td>
|
|
147
104
|
</tr>
|
|
105
|
+
</tbody></table>
|
|
106
|
+
<p>Where symlinks are not allowed (some Windows setups), the skill is copied instead. Your own skills in these folders are never touched. Commit <code>.agents/</code> and the links if your team shares agent settings.</p>
|
|
107
|
+
<p><strong><code>AGENTS.md</code> stays yours:</strong> <code>ai-init</code> never reads or writes it.</p>
|
|
108
|
+
<h2 id="flags">Flags</h2>
|
|
109
|
+
<table>
|
|
110
|
+
<thead>
|
|
148
111
|
<tr>
|
|
149
|
-
<
|
|
150
|
-
<
|
|
112
|
+
<th>Flag</th>
|
|
113
|
+
<th>Effect</th>
|
|
151
114
|
</tr>
|
|
152
|
-
|
|
153
|
-
<
|
|
154
|
-
<td
|
|
115
|
+
</thead>
|
|
116
|
+
<tbody><tr>
|
|
117
|
+
<td><code>--no-links</code></td>
|
|
118
|
+
<td>Install <code>.agents/skills</code> only, without the <code>.claude</code> / <code>.junie</code> links</td>
|
|
155
119
|
</tr>
|
|
156
120
|
<tr>
|
|
157
|
-
<td><code
|
|
158
|
-
<td>
|
|
121
|
+
<td><code>--overlay <dir></code></td>
|
|
122
|
+
<td>Also install the skills found in <code><dir>/skills/</code> (project kit)</td>
|
|
159
123
|
</tr>
|
|
160
124
|
</tbody></table>
|
|
161
|
-
<
|
|
162
|
-
<ol>
|
|
163
|
-
<li><strong>Starter project:</strong> <a href="/docs/getting-started/installation">Installation</a> — <code>yarn ai:sync</code> is wired in the kit.</li>
|
|
164
|
-
<li><strong>Existing project:</strong> run <strong><code>ai-init</code></strong> after <code>yarn add @supersoniks/concorde</code>.</li>
|
|
165
|
-
<li>Commit <code>.cursor/</code> and <code>.aiassistant/</code> (and <code>AGENTS.md</code> only if you opted in / it was created) if your team shares agent settings.</li>
|
|
166
|
-
<li>Re-run the same command when you bump <code>@supersoniks/concorde</code> to refresh skills from <code>node_modules/@supersoniks/concorde/ai/</code>.</li>
|
|
167
|
-
<li>In Cursor, skills under <code>.cursor/skills/</code> are picked up automatically; mention a skill in chat for focused tasks (e.g. migration → <code>concorde-get-set-dp</code>).</li>
|
|
168
|
-
</ol>
|
|
169
|
-
<p>Source files in the npm package: <code>node_modules/@supersoniks/concorde/ai/</code> (see also <code>ai/README.md</code> in the <a href="https://github.com/supersoniks/concorde">Concorde repository</a>).</p>
|
|
125
|
+
<p>Source files in the npm package: <code>node_modules/@supersoniks/concorde/ai/skills/concorde/</code>.</p>
|
|
170
126
|
|
|
171
127
|
</article>
|
|
172
128
|
</main>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# AI agents (
|
|
1
|
+
# AI agents (skill)
|
|
2
2
|
|
|
3
|
-
Concorde ships
|
|
3
|
+
Concorde ships one [Agent Skill](https://agentskills.io), `concorde`, so coding agents follow the framework patterns. Cursor, Claude Code, JetBrains Junie and other agents load it on their own when they work on Concorde code; there is nothing to add to your `AGENTS.md`.
|
|
4
4
|
|
|
5
|
-
On a [starter](/docs/getting-started/installation) project, run `yarn ai:sync` after install. On an existing project, install Concorde first, then
|
|
5
|
+
On a [starter](/docs/getting-started/installation) project, run `yarn ai:sync` after install. On an existing project, install Concorde first, then run `ai-init`.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Commands
|
|
8
8
|
|
|
9
9
|
| Context | Command |
|
|
10
10
|
|---------|---------|
|
|
@@ -12,65 +12,39 @@ On a [starter](/docs/getting-started/installation) project, run `yarn ai:sync` a
|
|
|
12
12
|
| Any consumer app (after `yarn add @supersoniks/concorde`) | `node node_modules/@supersoniks/concorde/scripts/ai-init.mjs` |
|
|
13
13
|
| Concorde repo (contributors) | `yarn ai-init` |
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
# Starter (from project root)
|
|
18
|
-
yarn ai:sync
|
|
15
|
+
Re-run the same command after each Concorde upgrade to refresh the skill.
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
node node_modules/@supersoniks/concorde/scripts/ai-init.mjs
|
|
22
|
-
</template>
|
|
23
|
-
</sonic-code>
|
|
17
|
+
## The skill
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
`SKILL.md` is the entry point: where to find the truth (the project, these docs, `custom-elements.json`), the critical rules and the imports. Details live in `rules/` files that the agent reads only for the topic at hand.
|
|
26
20
|
|
|
27
|
-
|
|
|
28
|
-
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
## `AGENTS.md` policy (non-invasive)
|
|
37
|
-
|
|
38
|
-
| Situation | Default |
|
|
39
|
-
|-----------|---------|
|
|
40
|
-
| No `AGENTS.md` | Create the Concorde guide |
|
|
41
|
-
| File with `<!-- concorde-ai -->` | Refresh the managed zone only |
|
|
42
|
-
| File **without** marker (project notes) | **Left untouched** — skills / rules are enough |
|
|
43
|
-
| `--merge-agents` / `--force-agents` / `--skip-agents` | See flags above |
|
|
44
|
-
|
|
45
|
-
```text
|
|
46
|
-
[optional project preamble — short, project-only]
|
|
47
|
-
<!-- concorde-ai -->
|
|
48
|
-
<package ai/AGENTS.md>
|
|
49
|
-
[--- + overlay AGENTS.concorde.md]
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Everything **after** `<!-- concorde-ai -->` is replaced on each `ai-init` run (idempotent). Do not paste a full copy of the Concorde guide above the marker — put project-specific notes in `AGENTS.concorde.md` (overlay). If the preamble duplicates package `AGENTS.md`, `ai-init` slims or drops it and prints a warning. Legacy filenames `AGENTS.overlay.md` / `AGENTS.starter.md` are still accepted with a deprecation warning.
|
|
21
|
+
| File | Topic |
|
|
22
|
+
|------|-------|
|
|
23
|
+
| `SKILL.md` | Sources, critical rules, component shape, imports |
|
|
24
|
+
| `rules/data.md` | Store, `DataProviderKey`, `@subscribe` / `@publish` / `@bind` / `@handle`, `sub()`, `get` / `set` / `dp` |
|
|
25
|
+
| `rules/http.md` | `Endpoint`, `@get` / `@post`, API configuration |
|
|
26
|
+
| `rules/lists-forms.md` | `sonic-list` / `sonic-queue`, form fields |
|
|
27
|
+
| `rules/styling.md` | Theme, tokens, classes, styling rules |
|
|
28
|
+
| `rules/composition.md` | Parts of compound components, built-in states |
|
|
29
|
+
| `rules/troubleshooting.md` | Symptom → cause → fix: values not updating, requests not sent, empty lists |
|
|
53
30
|
|
|
54
31
|
## What gets installed
|
|
55
32
|
|
|
56
33
|
| Path | Role |
|
|
57
34
|
|------|------|
|
|
58
|
-
|
|
|
59
|
-
| `.
|
|
60
|
-
| `.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| `.cursor/rules/concorde.mdc` | Cursor rules (always-on patterns) |
|
|
66
|
-
| `.aiassistant/rules/concorde.md` | JetBrains AI Assistant rules |
|
|
35
|
+
| `.agents/skills/concorde/` | The skill (read directly by Cursor) |
|
|
36
|
+
| `.claude/skills/concorde` | Symlink for Claude Code |
|
|
37
|
+
| `.junie/skills/concorde` | Symlink for JetBrains Junie |
|
|
38
|
+
|
|
39
|
+
Where symlinks are not allowed (some Windows setups), the skill is copied instead. Your own skills in these folders are never touched. Commit `.agents/` and the links if your team shares agent settings.
|
|
40
|
+
|
|
41
|
+
**`AGENTS.md` stays yours:** `ai-init` never reads or writes it.
|
|
67
42
|
|
|
68
|
-
##
|
|
43
|
+
## Flags
|
|
69
44
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
5. In Cursor, skills under `.cursor/skills/` are picked up automatically; mention a skill in chat for focused tasks (e.g. migration → `concorde-get-set-dp`).
|
|
45
|
+
| Flag | Effect |
|
|
46
|
+
|------|--------|
|
|
47
|
+
| `--no-links` | Install `.agents/skills` only, without the `.claude` / `.junie` links |
|
|
48
|
+
| `--overlay <dir>` | Also install the skills found in `<dir>/skills/` (project kit) |
|
|
75
49
|
|
|
76
|
-
Source files in the npm package: `node_modules/@supersoniks/concorde/ai
|
|
50
|
+
Source files in the npm package: `node_modules/@supersoniks/concorde/ai/skills/concorde/`.
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<td><code>serviceURL="/docs-mock-api"</code> — <a href="/docs/misc/docs-mock-api">Local API demos</a></td>
|
|
77
77
|
</tr>
|
|
78
78
|
</tbody></table>
|
|
79
|
-
<p>
|
|
79
|
+
<p>Agent skill: <code>concorde</code> (<code>rules/data.md</code>), see <a href="/docs/getting-started/ai-agents">AI agents</a>.</p>
|
|
80
80
|
<h2 id="dataproviderkey">DataProviderKey</h2>
|
|
81
81
|
<pre><code class="language-typescript">import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
82
82
|
import { dp, get, set } from "@supersoniks/concorde/utils";
|
|
@@ -19,7 +19,7 @@ Recommended patterns for new Concorde apps (Lit + TypeScript). Under the hood, d
|
|
|
19
19
|
| Derived / aggregate (JSONata) | `derive()` or `sonic-jsonata` — [Jsonata](/core/components/functional/jsonata) |
|
|
20
20
|
| Offline doc demos | `serviceURL="/docs-mock-api"` — [Local API demos](/docs/misc/docs-mock-api) |
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Agent skill: `concorde` (`rules/data.md`), see [AI agents](/docs/getting-started/ai-agents).
|
|
23
23
|
|
|
24
24
|
## DataProviderKey
|
|
25
25
|
|
package/docs/docs/index.html
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<li><a href="/docs/decorators/wait-for-ancestors">@awaitConnectedAncestors</a> <small>(docs/decorators/wait-for-ancestors)</small></li>
|
|
80
80
|
<li><a href="/docs/directives/sub">sub()</a> <small>(docs/directives/sub)</small></li>
|
|
81
81
|
<li><a href="/docs/directives/t">t()</a> <small>(docs/directives/t)</small></li>
|
|
82
|
-
<li><a href="/docs/getting-started/ai-agents">AI agents (
|
|
82
|
+
<li><a href="/docs/getting-started/ai-agents">AI agents (skill)</a> <small>(docs/getting-started/ai-agents)</small></li>
|
|
83
83
|
<li><a href="/docs/getting-started/components">Components</a> <small>(docs/getting-started/components)</small></li>
|
|
84
84
|
<li><a href="/docs/getting-started/create-a-component">Creating components</a> <small>(docs/getting-started/create-a-component)</small></li>
|
|
85
85
|
<li><a href="/docs/getting-started/dataFlow">Data flow</a> <small>(docs/getting-started/dataFlow)</small></li>
|
|
@@ -80,27 +80,14 @@ API reference
|
|
|
80
80
|
<section id="docs-decorators-bind" data-doc-id="docs/decorators/bind">
|
|
81
81
|
<h2><a href="/docs/decorators/bind">@bind</a></h2>
|
|
82
82
|
<p><strong>Doc ID:</strong> <code>docs/decorators/bind</code> · <a href="/docs/decorators/bind">full page</a></p>
|
|
83
|
-
<p
|
|
83
|
+
<p>@bind(key) keeps a class property and one path of the DataProvider store in sync. With { reflect: true } the sync goes both ways: the property follows the store, and each assignment is written back to</p>
|
|
84
84
|
<pre class="doc-excerpt">@bind
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
@bind(key) keeps a class property and one path of the DataProvider store in sync. With { reflect: true } the sync goes both ways: the property follows the store, and each assignment is written back to it. For one direction only, use the complementary decorators: @subscribe to read, @publish to write. See Data flow for the overall model.
|
|
87
87
|
|
|
88
88
|
Import
|
|
89
89
|
|
|
90
90
|
import { bind } from "@supersoniks/concorde/decorators";
|
|
91
|
-
|
|
92
|
-
@bind("flight.gate")
|
|
93
|
-
@state()
|
|
94
|
-
gate = "";
|
|
95
|
-
|
|
96
|
-
Basic usage
|
|
97
|
-
|
|
98
|
-
The first path segment is the data provider id, the rest is dot notation (array items use a numeric index: passengers.0). The property updates each time the store value changes. Add @state() so Lit re-renders.
|
|
99
|
-
|
|
100
|
-
Typed key
|
|
101
|
-
|
|
102
|
-
With a DataProviderKey , TypeScript checks that the property type matches T at that path.
|
|
103
|
-
|
|
104
91
|
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
105
92
|
|
|
106
93
|
type Flight = { flight: string; gate: string; boarded: number };
|
|
@@ -110,9 +97,17 @@ const flightKey = new DataProviderKey&lt;Flight&gt;("flight");
|
|
|
110
97
|
@state()
|
|
111
98
|
boarded = 0;
|
|
112
99
|
|
|
100
|
+
Basic usage
|
|
101
|
+
|
|
102
|
+
The key is a DataProviderKey: TypeScript checks that the property type matches T at that path. The property updates each time the store value changes. Add @state() so Lit re-renders.
|
|
103
|
+
|
|
113
104
|
Reflect
|
|
114
105
|
|
|
115
|
-
|
|
106
|
+
With reflect: true, each assignment to the property calls set() at the key path, so every other subscriber sees the new value. An internal guard prevents update loops. Without reflect (the default), assigning the property does not touch the store, and @bind behaves like @subscribe.
|
|
107
|
+
|
|
108
|
+
Dynamic path
|
|
109
|
+
|
|
110
|
+
Placeholders s</pre>
|
|
116
111
|
</section>
|
|
117
112
|
<section id="docs-decorators-get" data-doc-id="docs/decorators/get">
|
|
118
113
|
<h2><a href="/docs/decorators/get">@get</a></h2>
|