Skip to content

Commit 2596631

Browse files
committed
Merge branch 'AI-steering-docs' into fdc3-api-metadata
2 parents 7816d6d + b1d33cc commit 2596631

4 files changed

Lines changed: 93 additions & 0 deletions

File tree

.amazonq/rules/fdc3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Read and follow the guidance in [AGENTS.md](../../AGENTS.md) at the root of this
1414
- Update `CHANGELOG.md` under `[Unreleased]` for non-trivial changes.
1515
- Contributions must maintain or improve test coverage in `fdc3-agent-proxy`, `fdc3-get-agent`, `fdc3-standard`, and `fdc3-web-impl`.
1616
- Do not edit `website/versioned_docs/`, `website/versioned_sidebars/`, or `website/static/schemas/` — these are snapshots from past FDC3 releases, unless a correction is specifically requested.
17+
- Conformance tests validate Desktop Agent compliance. Test definitions (with unique IDs like `UCBasicUsage1`) live in `website/docs/api/conformance/`; implementations live in `toolbox/fdc3-conformance/`. Features using MUST/MUST NOT keywords require conformance tests. See AGENTS.md for full details.

.gitlab/agents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Read and follow the guidance in [AGENTS.md](../AGENTS.md) at the root of this re
1414
- Update `CHANGELOG.md` under `[Unreleased]` for non-trivial changes.
1515
- Contributions must maintain or improve test coverage in `fdc3-agent-proxy`, `fdc3-get-agent`, `fdc3-standard`, and `fdc3-web-impl`.
1616
- Do not edit `website/versioned_docs/`, `website/versioned_sidebars/`, or `website/static/schemas/` — these are snapshots from past FDC3 releases, unless a correction is specifically requested.
17+
- Conformance tests validate Desktop Agent compliance. Test definitions (with unique IDs like `UCBasicUsage1`) live in `website/docs/api/conformance/`; implementations live in `toolbox/fdc3-conformance/`. Features using MUST/MUST NOT keywords require conformance tests. See AGENTS.md for full details.

.kiro/steering.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Read and follow the guidance in [AGENTS.md](../AGENTS.md) at the root of this re
1414
- Update `CHANGELOG.md` under `[Unreleased]` for non-trivial changes.
1515
- Contributions must maintain or improve test coverage in `fdc3-agent-proxy`, `fdc3-get-agent`, `fdc3-standard`, and `fdc3-web-impl`.
1616
- Do not edit `website/versioned_docs/`, `website/versioned_sidebars/`, or `website/static/schemas/` — these are snapshots from past FDC3 releases, unless a correction is specifically requested.
17+
- Conformance tests validate Desktop Agent compliance. Test definitions (with unique IDs like `UCBasicUsage1`) live in `website/docs/api/conformance/`; implementations live in `toolbox/fdc3-conformance/`. Features using MUST/MUST NOT keywords require conformance tests. See AGENTS.md for full details.

AGENTS.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,96 @@ The `packages/testing` module provides shared generic step definitions (e.g. `I
178178

179179
Context type schemas live in `packages/fdc3-context/schemas/context/`. Changes regenerate `ContextTypes.ts`. These are independent of the DACP protocol schemas.
180180

181+
## Conformance Testing
182+
183+
FDC3 includes a conformance testing system that validates whether a Desktop Agent implementation conforms to the standard. This system has two parts: **test definitions** (in the standard's documentation) and **test implementations** (in the conformance package).
184+
185+
### Compliance Requirements and RFC 2119 Keywords
186+
187+
The FDC3 standard follows [RFC 2119](https://tools.ietf.org/html/rfc2119) for requirement levels. The compliance requirements for each part of the standard are defined in:
188+
189+
- **Desktop Agent API**: `website/docs/api/spec.md` — section "Desktop Agent API Standard Compliance"
190+
- **App Directory**: `website/docs/app-directory/spec.md` — section "App Directory Standard Compliance"
191+
- **Intents**: `website/docs/intents/spec.md` — section "Intents Standard Compliance"
192+
- **Context Data**: `website/docs/context/spec.md` — section "Context Data Standard Compliance"
193+
194+
The overall compliance policy is described in `website/docs/fdc3-compliance.md`.
195+
196+
**When conformance tests are required:**
197+
- Features described with **MUST** or **MUST NOT** keywords require conformance tests.
198+
- Features described with **SHOULD**, **MAY**, or **OPTIONAL** do not always require tests. However, if an optional feature is implemented, it MUST conform to the standard — in which case a **conditional** conformance test should be provided (one that only runs if the feature is present).
199+
- Features marked `@experimental` are generally optional for compliance but recommended for implementation.
200+
201+
### Test Definitions
202+
203+
Conformance test definitions live in `website/docs/api/conformance/` and form part of the published FDC3 standard:
204+
205+
| File | Coverage |
206+
|------|----------|
207+
| `Overview.md` | Index and general notes |
208+
| `Basic-Tests.md` | Connection, basic API sanity checks |
209+
| `Open-Tests.md` | `fdc3.open()` behavior |
210+
| `User-Channel-Tests.md` | User channel broadcast, filtering, join/leave |
211+
| `App-Channel-Tests.md` | App channel behavior |
212+
| `Metadata-Tests.md` | `getInfo()`, `getAppMetadata()`, `findInstances()` |
213+
| `Intents-Tests.md` | `findIntent`, `raiseIntent`, intent results, private channels |
214+
215+
Each test definition has a **unique identifier** (e.g. `UCBasicUsage1`, `2.0-RaiseIntentSingleResolve`, `BasicCL1`). These IDs are the link between the definitions and their implementations.
216+
217+
Test definitions describe multi-app scenarios in table format, specifying which app performs each step. Some tests are **manual** (e.g. intent resolver UI, channel selector UI) because they require user interaction.
218+
219+
### Test Implementations
220+
221+
Conformance tests are implemented in `toolbox/fdc3-conformance/`. This is a browser-based test suite using **Mocha** and **Chai**, bundled with **Webpack**. It runs inside a Desktop Agent (e.g. the `demo` reference implementation) and tests the agent's behavior from the perspective of web applications.
222+
223+
The implementation has three key parts:
224+
225+
```
226+
toolbox/fdc3-conformance/
227+
├── src/
228+
│ ├── test/ # Test runner and test implementations
229+
│ │ ├── basic/ # Basic sanity tests (e.g. fdc3.basic.ts)
230+
│ │ ├── advanced/ # Full test suites (channels, intents, open, etc.)
231+
│ │ ├── manual/ # Manual/interactive tests (resolver UI, etc.)
232+
│ │ ├── support/ # Shared test utilities and helpers
233+
│ │ ├── testSuite.ts # Test registry — maps test names to implementations
234+
│ │ └── index.ts # Browser entry point
235+
│ ├── mock/ # Mock applications used as counterparts in tests
236+
│ │ ├── basic.ts # Simple app that listens for context/intents
237+
│ │ ├── channel.ts # App for channel tests
238+
│ │ ├── intent-a.ts .. k.ts # Apps A-K for intent tests (each with specific behavior)
239+
│ │ ├── open-a.ts # App for open tests
240+
│ │ └── metadata.ts # App for metadata tests
241+
│ └── context-types.ts # Custom context types used in tests
242+
├── static/
243+
│ ├── apps/ # HTML entry points for each mock app
244+
│ └── directories/ # AppD records for test apps
245+
└── package.json
246+
```
247+
248+
**Architecture:** Tests are multi-app. A "Test" app (the runner) orchestrates the scenario, while "mock" apps (A, B, C, etc.) are launched by the Desktop Agent and perform their roles (listening for intents, broadcasting context, etc.). Communication between the test runner and mock apps happens via FDC3 context broadcasts on a control channel.
249+
250+
**Naming convention:** Each test implementation's `it()` block title must include the test definition ID in parentheses, e.g.:
251+
```typescript
252+
it('(UCBasicUsage1) Should receive context when adding a listener...', async () => { ... });
253+
```
254+
This allows tracing from a test result back to the corresponding definition in the standard.
255+
256+
### Adding or Updating Conformance Tests
257+
258+
When adding a new standard feature that includes MUST/MUST NOT requirements:
259+
260+
1. **Write the test definition** in the appropriate file under `website/docs/api/conformance/`. Follow the existing table format describing the multi-app steps. Assign a unique test ID.
261+
2. **Implement the test** in `toolbox/fdc3-conformance/src/test/`. Add it to the appropriate file in `basic/` or `advanced/`, or create a new file if needed.
262+
3. **Register the test** in `testSuite.ts` so it appears in the test runner UI.
263+
4. **Create or update mock apps** if the test requires new app behaviors. Each mock app needs:
264+
- A TypeScript source file in `src/mock/`
265+
- An HTML entry point in `static/apps/<app-name>/`
266+
- An AppD record in `static/directories/website-conformance.json`
267+
5. **Use the test definition ID** as the prefix in the `it()` block title.
268+
269+
For optional/conditional features (SHOULD/MAY), implement the test but make it conditional on the feature being available (e.g. check `ImplementationMetadata.optionalFeatures`).
270+
181271
## Version Management
182272

183273
All workspace packages share the same version number (currently `2.2.2`). Use `syncpack` to keep versions consistent:

0 commit comments

Comments
 (0)