Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .agents/skills/spacefast-product-naming/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: spacefast-product-naming
description: Enforce consistent Spacefast product names, exact capitalization, vocabulary boundaries, and single-source Glossary definitions whenever authoring or editing Spacefast documentation.
---

# Spacefast Product Naming and Consistency

Use this skill whenever writing, reviewing, or updating Spacefast docs, pricing tables, migration guides, or agent prompts.

## Single-source rule (do not duplicate)

- **Canonical public definitions live in `content/(reference)/glossary.mdx` only.**
- Never copy full product definitions onto multiple pages. Introduce a feature in one crisp clause if needed, then link directly to its primary page or `/glossary#<anchor>`.
- When a new product or feature ships, add it to `content/(reference)/glossary.mdx` and `scripts/pricing-next.mjs` (with a one-line `tip` and `href`), and verify `bun run verify:prose`.

## Canonical product names

| Product / feature | Exact spelling in prose | Never write |
| --- | --- | --- |
| Platform | **Spacefast** | SpaceFast, spacefast (in prose), "hosting platform" |
| Resource unit | **Space** / **Spaces** | site (except external WordPress/source sites), project (for the deployed Spacefast resource) |
| App framework | **SpacePress** | Spacepress, space press, TypedPress (legacy only) |
| Modern editor | **SpacePress Admin** | TypedPress Admin, Spacepress admin |
| CLI | **Spacefast CLI** or `` `sf` `` | SF CLI |
| Remote builds | **Spacefast Builds** | E2B, Pierre, build host |
| Managed DNS | **Spacefast DNS** | DNS hosting |
| Sharing & access | **Spacefast Share** | ShareFast |
| Browser analytics | **Spacefast Stats** (Private Beta) | Spacefast Analytics (distinguish from **edge traffic stats**) |
| Tag governance | **Spacefast Tag Manager** (short: **Tag Manager**) | GTM replacement |
| Multi-tenant | **Spacefast for Platforms** / **Partner API** | White-label API |
| Auth flow | **Sign in with Spacefast** | Login with Spacefast, Spacefast Login |
| Drag-and-drop | **Drop** (`drop.fast`) | Drop.fast (capitalized in URL) |
| Serverless runtime | **Functions** (runtime) / **Worker** (compiled handler) | Edge Functions (as the product name), Lambda |
| External tools | **Connectors** | Integrations hub |
| Edge rules | **Traffic Rules** | WAF rules (as the product name) |
| HTML overlays | **Page Enhancements** | Superpowers (code key `superpowers` stays backticked only) |
| Per-Space add-on | **Per-Space Boost** (short: **Boost**) | Space Boost |
| Early access | **Labs** | Beta Program |
| Team context | **Team Memories**, **Team Skills**, **Design System** | Agent Memories, Shared Skills |
| Agent protocol | **Poppy** (`Poppy 1.0`) | POPPY |
| Credentials | **API key** (`sfa_`), **deploy token** (`sfm_`), **Space key** (`sfc_`) | access token (except literal "OAuth access token") |
| Legacy runtime | **Zero** / **capsule** | Zero v2 as a recommended path |

## Vocabulary boundaries (enforced by Vale & public-safety)

1. **Never use "hosting" in prose.** Say publish, serve, live, infrastructure, runtime, or Spacefast DNS (`styles/Spacefast/Hosting.yml`).
2. **Say "publish" and "version", not "deploy" and "deployment"** in fresh prose, except when naming GitHub's Deployments API or compatibility API fields.
3. **Prefer "infra" over "WP Cloud".** Only name **WP Cloud** (exact spelling, never `WP.Cloud` or `wp-cloud`) when an external reference is genuinely necessary.
4. **Never leak internal infra or vendor names** (`NGINX`, `Web server`, `Batcache`, `PlanetScale`, `pgbouncer`, `Caddy`, `E2B`, `Pierre`, `code.storage`, `monorepo`, local filesystem paths).
5. **SpacePress is a managed application server.** No custom origin code runs outside SpacePress (never imply users can run arbitrary PHP, install third-party WordPress plugins, upload theme ZIPs, edit `.htaccess`/`.user.ini`, or SSH into a Space).
6. **Backtick all identifiers.** Commands (`sf publish`), file paths (`spacefast.config.ts`), HTTP headers (`Cache-Control`), enum values, and config keys go in code spans.
7. **Use direct technical headings.** Name the concrete concept or task (`Expiry and recovery window`, `Indexing delay and empty pages`, `Authorization header`) — never clever or vague headings (`The clock`, `The gotcha`, `Two things that surprise people`, `The shape`, `Claim it`).

## Pre-handoff check

Run before committing any copy change:

```bash
bun run validate
bun run verify:public-safety
bun run verify:prose
```
13 changes: 13 additions & 0 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ safe. The credential-prefix table can stay below; the rotation condition cannot.
"after this page" framing. The intermediate step, where the sentence was
merely shorter but still templated, is history now; don't resurrect it.)

## Use direct technical headings

Name the concrete technical concept, resource, or task in every `##` and `###` heading so readers and agents can scan the table of contents and link to stable anchors. Never use cute, cryptic, or essay-style headings.

| Avoid | Use instead |
| --- | --- |
| `The clock` | `Expiry and recovery window` |
| `The gotcha` | `Routing validation (failOnRoutingError)` / `Static vs. SPA mode` |
| `Two things that surprise people` | `Indexing delay and empty pages` |
| `The shape` / `The loop` / `The header` | `Problem Details format` / `Paginate through all results` / `Authorization header` |
| `Claim it` / `Checking on it` / `Set it up` | `Claim an anonymous Space` / `Check Space and claim status` / `Create a CI credential` |

## Don't template the opening sentence

The example above still has a problem, caught in a later pass: "After this
Expand Down Expand Up @@ -204,6 +216,7 @@ that is.

## Brand and vocabulary

- **Canonical product names live in the Glossary.** Every Spacefast product and feature name, its exact capitalization, and its one-line definition lives in [content/(reference)/glossary.mdx](content/(reference)/glossary.mdx). Define terms once there and link to `/glossary` instead of duplicating product definitions across guides. For agent-oriented naming checklists, see [.agents/skills/spacefast-product-naming/SKILL.md](.agents/skills/spacefast-product-naming/SKILL.md).
- **GitHub, JavaScript, TypeScript, npm, Node.js, macOS, OpenAPI, email,
website** — exact casing, every time (`Branding.yml`).
- **Spacefast** is capitalized in prose. Identifiers stay lowercase and get
Expand Down
14 changes: 10 additions & 4 deletions blume.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { pagefind } from "blume/search";
import { loadPricing, pricingVariables } from "./scripts/pricing.mjs";

import { redirects } from "./redirects.ts";
import { interfaceExamplesMarkdown } from "./scripts/interface-examples.mjs";
import { planVariables, pricingTableMarkdown } from "./scripts/pricing-next.mjs";
import { requestLifecycleMarkdown } from "./scripts/request-lifecycle.mjs";
import { statusBadgeMarkdown } from "./scripts/status-badge.mjs";

const deploymentBase = "/docs";
// Agent guidance for llms.txt, kept as Markdown so Vale lints it with the pages.
Expand Down Expand Up @@ -174,14 +177,17 @@ export default defineConfig({
},
agents: {
llmsTxt: { details: llmsDetails },
// The upstream reference footer, written out as Markdown for .md pages, llms-full.txt
// and MCP: without this the component ships as raw JSX.
// Custom MDX components written out as Markdown for .md pages, llms-full.txt
// and MCP: without this the components ship as raw JSX.
markdownComponents: {
InterfaceExamples: ({ props }) =>
interfaceExamplesMarkdown(String(props.id), deploymentBase),
PricingTable: ({ props }) => pricingTableMarkdown(String(props.table), props.row ? String(props.row) : undefined),
RequestLifecycle: () => requestLifecycleMarkdown(),
SpacefastStage: () =>
`\`\`\`ts\nimport { defineConfig } from "spacefast/config";\n\nexport default defineConfig({\n name: "quiet-harbor",\n app: {\n collections: { posts: { title: "Posts" } },\n actions: { subscribe: { access: "anyone" } },\n },\n crons: [{ path: "/api/digest", schedule: "daily" }],\n});\n\`\`\``,
WpCloudDocs: ({ props }) =>
`Using the [Partner API](${deploymentBase}/platforms/partner-api)? See [${String(props.title)}](${String(props.href)}) in the upstream infrastructure reference.`,
StatusBadge: ({ props }) =>
statusBadgeMarkdown(String(props.status), props.note ? String(props.note) : undefined),
},
// The Website publishes Spacefast's agent skill at the site root; a second,
// generated Docs skill would compete with it.
Expand Down
9 changes: 9 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { defineComponents } from "blume";

import Breadcrumbs from "./components/Breadcrumbs.astro";
import Header from "./components/Header.astro";
import InterfaceExamples from "./components/InterfaceExamples.astro";
import Logo from "./components/Logo.astro";
import Pagination from "./components/Pagination.astro";
import Sidebar from "./components/Sidebar.astro";
import PricingTable from "./components/PricingTable.astro";
import SpacefastStage from "./components/SpacefastStage.astro";
import WpCloudDocs from "./components/WpCloudDocs.astro";
import StatusBadge from "./components/StatusBadge.astro";

export default defineComponents({
layout: { Breadcrumbs, Header, Logo, Pagination, Sidebar },
mdx: { PricingTable, SpacefastStage, WpCloudDocs },
mdx: { InterfaceExamples, PricingTable, SpacefastStage, StatusBadge },
});
158 changes: 158 additions & 0 deletions components/InterfaceExamples.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
---
/*
* Centralized CLI / API / MCP / JS SDK switcher backed by
* scripts/interface-examples.mjs. Every reference link is resolved directly
* from generated/openapi/api.json and generated/cli/index.md so links stay
* pinned to shipped contracts. Uses Blume's synced <Tabs> so picking an
* interface switches every example across the page.
*/
import CodeBlock from "blume/components/content/CodeBlock.astro";
import Tab from "blume/components/content/Tab.astro";
import Tabs from "blume/components/content/Tabs.astro";
import { contentHref } from "blume/components/content/base-href.ts";

import { resolveInterfaceExample } from "../scripts/interface-examples.mjs";

interface Props {
id: string;
}

const { id } = Astro.props;
const example = resolveInterfaceExample(id);
---

<div class="sf-interface-examples not-prose" data-interface-example={example.id}>
<Tabs syncKey="sf-interface" hash={false}>
{example.surfaces.map((surface) => (
<Tab title={surface.label} class="sf-ex-panel">
<CodeBlock code={surface.code} lang={surface.lang} icons={false} />
<nav class="sf-ex-refs" aria-label={`${surface.label} references`}>
<div class="sf-ex-primary-refs">
{surface.refs.map((ref, index) => (
<>
{index > 0 && <span class="sf-ex-sep" aria-hidden="true">·</span>}
<a class="sf-ex-link" href={contentHref(ref.href)}>{ref.label}</a>
</>
))}
</div>
<div class="sf-ex-all-refs" role="group" aria-label="All interface references">
{example.allRefs.map((ref) => (
<a
class:list={["sf-ex-pill", { "sf-ex-pill-active": ref.surface === surface.label }]}
href={contentHref(ref.href)}
title={`${ref.surface}: ${ref.label}`}
>
{ref.surface}
</a>
))}
</div>
</nav>
</Tab>
))}
</Tabs>
</div>

<style>
.sf-interface-examples {
margin: 1.25rem 0 1.75rem;
}

.sf-interface-examples :global(blume-tabs) {
margin: 0;
}

.sf-interface-examples :global(.sf-ex-panel) {
padding: 0 !important;
}

.sf-interface-examples :global(.sf-ex-panel > .prose) {
margin: 0;
}

.sf-interface-examples :global(.sf-ex-panel pre) {
margin: 0 !important;
border: 0 !important;
border-radius: 0 !important;
}

.sf-ex-refs {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.5rem 1rem;
padding: 0.6rem 0.9rem;
border-top: 1px solid var(--blume-border);
background: color-mix(in oklch, var(--blume-code-background) 65%, var(--blume-background));
font-size: 0.78rem;
line-height: 1.4;
}

.sf-ex-primary-refs {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.4rem;
min-width: 0;
overflow-wrap: anywhere;
color: var(--blume-muted-foreground);
}

.sf-ex-link {
color: var(--blume-foreground);
font-family: var(--blume-font-mono);
font-size: 0.75rem;
text-decoration: underline;
text-decoration-color: color-mix(in oklch, currentColor 28%, transparent);
text-underline-offset: 3px;
touch-action: manipulation;
transition: text-decoration-color 140ms ease;
}

.sf-ex-link:hover {
text-decoration-color: currentColor;
}

.sf-ex-link:focus-visible,
.sf-ex-pill:focus-visible {
outline: 2px solid var(--blume-foreground);
outline-offset: 2px;
border-radius: 3px;
}

.sf-ex-sep {
color: var(--blume-muted-foreground);
}

.sf-ex-all-refs {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.35rem;
}

.sf-ex-pill {
display: inline-flex;
align-items: center;
padding: 0.14rem 0.45rem;
border-radius: 999px;
border: 1px solid var(--blume-border);
color: var(--blume-muted-foreground);
font-size: 0.7rem;
font-weight: 500;
text-decoration: none;
touch-action: manipulation;
transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.sf-ex-pill:hover {
border-color: color-mix(in oklch, var(--blume-foreground) 28%, transparent);
color: var(--blume-foreground);
}

.sf-ex-pill-active {
border-color: color-mix(in oklch, var(--blume-foreground) 22%, transparent);
background: var(--blume-muted);
color: var(--blume-foreground);
}
</style>
Loading
Loading