diff --git a/.agents/skills/doc-writer/SKILL.md b/.agents/skills/doc-writer/SKILL.md index 214fe49c2..2c3392ab8 100644 --- a/.agents/skills/doc-writer/SKILL.md +++ b/.agents/skills/doc-writer/SKILL.md @@ -290,17 +290,17 @@ When a page shows the **On this page** table of contents (the default behavior u If your opening section is truly introductory, keep it as body copy without an `Overview` heading. If that section has a more specific purpose, use a descriptive heading such as `Key concepts`, `Prerequisites`, or another topic-specific label. -For Aspire AppHost code examples, use synced `Tabs` / `TabItem` blocks with `syncKey='aspire-lang'` at each code snippet. Do **not** add a page-level `PivotSelector` just to switch AppHost code samples between C# and TypeScript. Readers should be able to switch the language at the specific snippet they are reading. +For Aspire AppHost code examples, use synced `Tabs` / `TabItem` blocks with `syncKey='aspire-lang'` at each code snippet. List TypeScript first so `apphost.mts` is the default experience for readers without a saved preference. Do **not** add a page-level `PivotSelector` just to switch AppHost code samples between TypeScript and C#. Readers should be able to switch the language at the specific snippet they are reading. ```mdx - -C# example content here. - - TypeScript example content here. + + +C# example content here. + ``` @@ -445,40 +445,26 @@ For client/library packages: ``` -## AppHost Language Parity (C# and TypeScript) +## AppHost Language Parity (TypeScript and C#) -Aspire supports both **C# AppHosts** (`AppHost.cs`) and **TypeScript AppHosts** (`apphost.mts`). Documentation must treat both languages as first-class citizens. **Always show both C# and TypeScript code samples for AppHost code unless the feature is genuinely language-specific or TypeScript support does not exist yet.** Never write AppHost or hosting-integration documentation with a C#-only bias. +Aspire supports both **TypeScript AppHosts** (`apphost.mts`) and **C# AppHosts** (`AppHost.cs`). Documentation must treat both languages as first-class citizens. **Always show both TypeScript and C# code samples for AppHost code unless the feature is genuinely language-specific or TypeScript support does not exist yet.** Never write AppHost or hosting-integration documentation with a C#-only bias. ### Core Principles -1. **Always show both languages**: Every AppHost-focused example, walkthrough, and AppHost code sample must include both C# and TypeScript variants unless the feature is genuinely language-specific. +1. **Always show both languages**: Every AppHost-focused example, walkthrough, and AppHost code sample must include both TypeScript and C# variants unless the feature is genuinely language-specific. 2. **Show implementations, not availability notes**: When a TypeScript AppHost API exists, demonstrate it in a complete TypeScript tab beside the C# example. A note or callout that only names the available TypeScript methods does not satisfy language parity. 3. **Use neutral framing**: Write prose that applies to both languages. Say "In your AppHost" not "In your C# project". Say "Add a Redis resource" not "Call `builder.AddRedis()`". -4. **Neither language is the default**: Don't present C# first as the "real" example and TypeScript as an afterthought. Both tabs are equal peers. +4. **Default to TypeScript**: Put the TypeScript tab first so `apphost.mts` is on the left and selected for readers without a saved preference. Keep C# as an equal peer and preserve the reader's explicit language selection. 5. **Verify TypeScript APIs exist**: Before writing a TypeScript example, confirm the API exists in the TypeScript AppHost SDK. Do not invent TypeScript samples — if you are unsure whether an API is available, flag it for review. ### AppHost tabs pattern for AppHost content -Use synced `Tabs` for AppHost-specific content that changes between C# and TypeScript. Each AppHost code snippet should provide its own language tabs and use `syncKey='aspire-lang'` so the user's language choice stays synchronized across snippets on the page. +Use synced `Tabs` for AppHost-specific content that changes between TypeScript and C#. Each AppHost code snippet should provide its own language tabs, list TypeScript first, and use `syncKey='aspire-lang'` so the user's language choice stays synchronized across snippets on the page. ````mdx import { Tabs, TabItem } from "@astrojs/starlight/components"; - - -```csharp title="AppHost.cs" -var builder = DistributedApplication.CreateBuilder(args); - -var cache = builder.AddRedis("cache"); - -builder.AddProject("api") - .WithReference(cache); - -builder.Build().Run(); -``` - - ```typescript title="apphost.mts" @@ -494,6 +480,20 @@ await api.withReference(cache); await builder.build().run(); ``` + + + +```csharp title="AppHost.cs" +var builder = DistributedApplication.CreateBuilder(args); + +var cache = builder.AddRedis("cache"); + +builder.AddProject("api") + .WithReference(cache); + +builder.Build().Run(); +``` + ```` @@ -506,15 +506,15 @@ If a section heading should appear in the **On this page** table of contents, ke ### Conventions -| Aspect | C# | TypeScript | -| ---------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| File title | `title="AppHost.cs"` | `title="apphost.mts"` | -| Tab wrapper | Shared `` container | Shared `` container | -| Tab item | `` | `` | -| Builder creation | `DistributedApplication.CreateBuilder(args)` | `import { createBuilder } from './.aspire/modules/aspire.mjs';` then newline for space followed by `await createBuilder();` | -| Method casing | PascalCase (`AddRedis`) | camelCase (`addRedis`) | -| Async pattern | Synchronous fluent calls | `await` each builder call | -| Build & run | `builder.Build().Run()` | `await builder.build().run()` | +| Aspect | TypeScript | C# | +| ---------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | +| File title | `title="apphost.mts"` | `title="AppHost.cs"` | +| Tab wrapper | Shared `` container | Shared `` container | +| Tab item | `` | `` | +| Builder creation | `import { createBuilder } from './.aspire/modules/aspire.mjs';` then newline for space followed by `await createBuilder();` | `DistributedApplication.CreateBuilder(args)` | +| Method casing | camelCase (`addRedis`) | PascalCase (`AddRedis`) | +| Async pattern | `await` each builder call | Synchronous fluent calls | +| Build & run | `await builder.build().run()` | `builder.Build().Run()` | ### Prose Guidelines @@ -595,18 +595,6 @@ Brief description of the technology and what the integration enables. ### Add [Technology] resource - - -```csharp title="AppHost.cs" -var builder = DistributedApplication.CreateBuilder(args); - -var tech = builder.AddTechnology("tech"); - -// After adding all resources, run the app... -builder.Build().Run(); -``` - - ```typescript title="apphost.mts" @@ -619,6 +607,18 @@ const tech = await builder.addTechnology("tech"); await builder.build().run(); ``` + + + +```csharp title="AppHost.cs" +var builder = DistributedApplication.CreateBuilder(args); + +var tech = builder.AddTechnology("tech"); + +// After adding all resources, run the app... +builder.Build().Run(); +``` + @@ -644,20 +644,6 @@ Include both hosting and client sections: ### Add [Technology] resource - - -```csharp title="AppHost.cs" -var builder = DistributedApplication.CreateBuilder(args); - -var tech = builder.AddTechnology("tech"); - -builder.AddProject("api") - .WithReference(tech); - -builder.Build().Run(); -``` - - ```typescript title="apphost.mts" @@ -673,6 +659,20 @@ await api.withReference(tech); await builder.build().run(); ``` + + + +```csharp title="AppHost.cs" +var builder = DistributedApplication.CreateBuilder(args); + +var tech = builder.AddTechnology("tech"); + +builder.AddProject("api") + .WithReference(tech); + +builder.Build().Run(); +``` + diff --git a/.agents/skills/whatsnew/SKILL.md b/.agents/skills/whatsnew/SKILL.md index 002287079..d50d41087 100644 --- a/.agents/skills/whatsnew/SKILL.md +++ b/.agents/skills/whatsnew/SKILL.md @@ -77,7 +77,7 @@ infer from context — e.g. a fresh release with no page → `draft`). | What | Path | |------|------| | What's-new pages | `src/frontend/src/content/docs/whats-new/aspire-N-N.mdx` (JA under `.../ja/whats-new/`) | -| Version constants | `src/frontend/config/aspire-versions.mjs` (`currentAspireMajorMinorVersion`, `currentAspireVersion`) | +| Version constants | `src/frontend/config/aspire-versions.mjs` (`currentAspireMajorMinorVersion`, `currentAspireVersion`, `currentAspirePreviewVersion`) | | Sidebar | `src/frontend/config/sidebar/docs.topics.ts` (What's-new `items`) | | Announcement banner | `banner:` frontmatter on `src/frontend/src/content/docs/index.mdx`, `src/frontend/src/content/docs/docs.mdx`, `src/frontend/src/content/docs/community/index.mdx`, and each `src/frontend/src/content/docs/{locale}/index.mdx` (+ `.../ja/docs.mdx`); rendered by `src/frontend/src/components/starlight/Banner.astro` | | Assets | `src/frontend/src/assets/whats-new/aspire-/` | diff --git a/.agents/skills/whatsnew/references/01-draft-scaffold.md b/.agents/skills/whatsnew/references/01-draft-scaffold.md index ee7692df0..9efe95cd3 100644 --- a/.agents/skills/whatsnew/references/01-draft-scaffold.md +++ b/.agents/skills/whatsnew/references/01-draft-scaffold.md @@ -35,8 +35,11 @@ duplicating. dedicated **"New integrations"** and **"Default container image updates"** sections. If the file already exists, reconcile structure without clobbering existing content. 3. **Version constants.** Update `src/frontend/config/aspire-versions.mjs`: - `currentAspireMajorMinorVersion = 'N.N'` and `currentAspireVersion = 'N.N.0'` (only - when N.N is the new current release). This drives the `%ASPIRE_VERSION%` remark + `currentAspireMajorMinorVersion = 'N.N'`, `currentAspireVersion` to the latest + stable `N.N.PATCH`, and `currentAspirePreviewVersion` to the matching full + `N.N.PATCH-preview.*` package version. Set both package versions to the initial + release patch when N.N becomes current, then keep them aligned with the site + AppHost during servicing updates. These drive the Aspire version remark placeholders site-wide. 4. **Site-wide announcement banner.** The banner is **per-page frontmatter**, not a global config. Update the `banner.content` string **and its link** to point at diff --git a/.agents/skills/whatsnew/references/02-research.md b/.agents/skills/whatsnew/references/02-research.md index 1ec421858..b39a82d90 100644 --- a/.agents/skills/whatsnew/references/02-research.md +++ b/.agents/skills/whatsnew/references/02-research.md @@ -47,8 +47,8 @@ This is the phase that turns the skeleton into a real, reviewable page. the section (next step). 7. **Author the draft.** Populate the scaffolded MDX from the dossier: write the lede, the "This release introduces" bullets (1:1 with the `##` sections, same order), and - each section body with impact-first prose, `LearnMore` deep-links, and C#/TypeScript - `` where a feature spans AppHost languages. Credit each + each section body with impact-first prose, `LearnMore` deep-links, and TypeScript/C# + `` with TypeScript first where a feature spans AppHost languages. Credit each merged community PR by `@handle`. **Only include sections that apply** — delete any standard section with no content. In particular, when the release has **no breaking changes**, remove the "⚠️ Breaking changes" section *and* the breaking-changes diff --git a/.agents/skills/whatsnew/references/03-critique.md b/.agents/skills/whatsnew/references/03-critique.md index 85dd7392e..b945bb0f7 100644 --- a/.agents/skills/whatsnew/references/03-critique.md +++ b/.agents/skills/whatsnew/references/03-critique.md @@ -28,7 +28,7 @@ actionable, severity-ranked findings report. **Makes no edits** — {polish} act - `