Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Eight coverage files are generated. The testing page (`docs/src/pages/internals/

### Public Agent Skills (`skills/`)

The repo-root `skills/` folder is the source of truth for the user-facing agent skills (`bascik`, `bascik-components`, `bascik-compatibility`, `bascik-scripts`, `bascik-seo`, `bascik-config`, `bascik-images`, `bascik-testing`, `bascik-migrate`, and the opt-in `bascik-refactor`) and their `scripts/`. Skills hold rules and route to docs pages; they hold no reference copies of the docs. Example code lives once, in the repo-root `examples/` folder, rendered on `/example-components/*` docs pages and published as `/assets/examples.json` for `skills/bascik/scripts/add-example.mjs` (see `.github/instructions/docs.instructions.md`, "Examples"). It is distributed these ways: `npx skills add bascikdev/bascik` (reads GitHub), `npx skills add https://bascik.dev` (reads `/.well-known/agent-skills/index.json`), `https://bascik.dev/assets/skills.tar.gz` and `https://bascik.dev/assets/SKILL.md` (all three published by `docs/scripts/publish-agent-skill.ts`), and `npm create bascik@rc` / `bascik init`, which run the skills CLI on GitHub at the matching release tag.
The repo-root `skills/` folder is the source of truth for the user-facing agent skills (`bascik`, `bascik-components`, `bascik-compatibility`, `bascik-scripts`, `bascik-seo`, `bascik-config`, `bascik-images`, `bascik-testing`, `bascik-migrate`, and the opt-in `bascik-refactor`) and their `scripts/`. Skills hold rules and route to docs pages; they hold no reference copies of the docs. Example code lives once, in the repo-root `examples/` folder, rendered on `/example-components/*` docs pages and published as `/assets/examples.json` for `skills/bascik/scripts/add-example.mjs` (see `.github/instructions/docs.instructions.md`, "Examples"). It is distributed these ways: `npx skills add bascikdev/bascik` (reads GitHub), `npx skills add https://bascik.dev` (reads `/.well-known/agent-skills/index.json`), `https://bascik.dev/assets/skills.tar.gz` and `https://bascik.dev/assets/SKILL.md` (all three published by `docs/scripts/publish-agent-skill.ts`), and `npm create bascik` / `bascik init`, which run the skills CLI on GitHub at the matching release tag.

- `create-bascik` bundles no copy of the skills. `PROJECT_SKILLS` in `create/src/agent-setup.ts` (identical copy at `pkg/src/lib/agent-setup.ts`) names the skills new projects get: every `skills/` folder minus the opt-in `bascik-refactor`, enforced by `create/src/agent-setup.test.ts`. When you add or rename a skill, update that list in both copies. Readers install `bascik-refactor` with `npx skills add bascikdev/bascik --skill bascik-refactor`.
- The skills' tests and fixtures live in the `skills-tests/` workspace (`bascik-skills-tests`: `yarn skills:unit`, `yarn skills:integration`, `yarn skills:typecheck`), not in `skills/` (it ships to users) and not in `docs/`. Every `bascik-refactor` script has a `skills-tests/tests/refactor-<script>.test.ts`; the parity check browser tests (`*.integration.test.ts`, Chromium) read `skills-tests/tests/fixtures/refactor-parity/`. Only tests of how the docs site publishes the skills (`docs/scripts/skill-bundle.test.ts`, `docs/scripts/publish-agent-skill.test.ts`) and the docs e2e specs stay in `docs/`.
Expand Down
4 changes: 3 additions & 1 deletion .github/instructions/docs.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ The `renderMd` helper (`docs/src/lib/md-renderer.ts`) applies these transformati

Both folders are served with `Cache-Control: public, max-age=31536000, immutable` by Cloudflare (a `_headers` rule written by `docs/scripts/generate-pages-headers.ts`; Workers static assets and Pages read it the same way). That is only safe because every reference gets a `?v=<content hash>` from the image helper in `docs/src/lib/md-renderer.ts`. Always reference these images through a Markdown image (`![alt](/assets/demos/x@2x.webp)`) or `demoImage()` in a `data-bascik-build` script. Never write a raw `<img src>`, `<link href>`, or CSS `url()` into them: `docs/src/lib/versioned-image-references.test.ts` fails if you do. When re-recording a demo, keep the same file name; the hash changes on its own.

**Width variants.** Every still image in these folders (a showcase screenshot, a thumbnail, the `-still` copy of a recording) has narrower copies beside it, `<name>-<width>.webp`, which `renderImage` lists in a `srcset` so a phone or a 1x screen downloads a file near the size it shows. After adding or re-recording a still, run `yarn workspace bascik-docs images:responsive` (`docs/scripts/responsive-images.ts`) and commit what it writes; `docs/src/lib/responsive-images.test.ts` fails otherwise. Commit the image at the widest size it will be shown at on a dense screen, as WebP only, with no JPEG or PNG master. An image placed with `demoImage()` gets its `srcset` only when the call passes `sizes`, the CSS width it is laid out at; a Markdown image gets the content column's. Animated recordings have no variants: a resized lossless animation is larger than the original.

## Visuals

Three kinds of visual, each with one home. Do not mix them up, and do not add a fourth.
Expand Down Expand Up @@ -151,7 +153,7 @@ The public skills live in the repo-root `skills/` folder, one directory per skil

- `npx skills add bascikdev/bascik` reads it straight from GitHub.
- `docs/scripts/publish-agent-skill.ts` (an `exec` producer) writes `/assets/skills.tar.gz`, the RFC 8615 discovery index `/.well-known/agent-skills/index.json` with one `<name>.tar.gz` per skill (so `npx skills add https://bascik.dev` works), and copies `skills/bascik/SKILL.md` to `/assets/SKILL.md`.
- `npm create bascik@rc` and `bascik init` ask (default yes) and run the skills CLI, which installs every skill except the opt-in `bascik-refactor` from GitHub at the matching release tag into `.agents/skills/` and `.claude/skills/`. No copy is bundled. `PROJECT_SKILLS` in `create/src/agent-setup.ts` names those skills, and `create/src/agent-setup.test.ts` fails when it stops matching the `skills/` folders minus the opt-in ones. Readers install `bascik-refactor` with `npx skills add bascikdev/bascik --skill bascik-refactor`.
- `npm create bascik` and `bascik init` ask (default yes) and run the skills CLI, which installs every skill except the opt-in `bascik-refactor` from GitHub at the matching release tag into `.agents/skills/` and `.claude/skills/`. No copy is bundled. `PROJECT_SKILLS` in `create/src/agent-setup.ts` names those skills, and `create/src/agent-setup.test.ts` fails when it stops matching the `skills/` folders minus the opt-in ones. Readers install `bascik-refactor` with `npx skills add bascikdev/bascik --skill bascik-refactor`.

**The docs are the reference; the skills are a router.** A skill holds only the must-follow rules an assistant gets wrong without them, short decision tables, and "How do I..." tables that point to docs pages (`read-doc.mjs /path`). Explanations, option lists, and code examples belong in `docs/content/`, never in a skill. There are no `references/` folders, except in `bascik-refactor`: its `references/` hold the prompt templates and the production-parity contract that the `/how-to/agent-migration` page hands to coding agents. When a docs change alters a rule, default, API, or pitfall that a skill states, update that rule in the same task. When a skill needs guidance the docs do not have, add it to the docs and link to it.

Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/publish-npm.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
# Publishes the package in the current directory. Usage: publish-npm.sh <tag-prefix>
# Requires the git tag (GITHUB_REF_NAME) to equal <tag-prefix> + package.json version.
# Prerelease versions (1.0.0-rc.1) publish under the matching dist-tag (rc), never latest.
# Stable versions (1.0.0) publish under latest. A prerelease (1.1.0-rc.1) publishes under the dist-tag named by
# its identifier (rc), never latest.
set -euo pipefail

prefix="${1:?tag prefix required, e.g. v or create-v}"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/publish-vsce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Publishes the VS Code extension in the current directory. Usage: publish-vsce.sh <tag-prefix>
# Prefix ext-v publishes a stable release; ext-pre-v publishes a Marketplace pre-release.
# The git tag (GITHUB_REF_NAME) must equal <tag-prefix> + package.json version.
# The Marketplace rejects semver prerelease identifiers (0.1.0-rc.1), so versions must be plain x.y.z.
# The Marketplace rejects semver prerelease identifiers (1.1.0-rc.1), so versions must be plain x.y.z.
set -euo pipefail

prefix="${1:?tag prefix required, e.g. ext-v or ext-pre-v}"
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: Release

# The tag must be <prefix><version in that package's package.json>.
# Prerelease versions (1.0.0-rc.1) publish under the matching dist-tag (rc), not latest.
# Push each tag by name, never with --tags, and in the publish order in RELEASING.md.
# Stable versions (1.0.0) publish under the latest dist-tag. A prerelease (1.1.0-rc.1) publishes under the dist-tag
# named by its identifier (rc), never latest, so a plain install keeps getting the stable release.
# Push each tag by name, never with --tags, and in the publish order in RELEASING.md. `yarn release` does both.
# Tag only commits on main: every job fails before building when the tagged commit is not an ancestor of
# origin/main (.github/scripts/release-on-main.mjs), so a tag on an unmerged branch publishes nothing.
# Run `git fetch origin main` first; each example tags origin/main, not the current checkout.
# npm jobs use OIDC trusted publishing; configure each package on npmjs.com as documented in RELEASING.md.
# pkg: git tag v1.0.0-rc.1 origin/main && git push origin v1.0.0-rc.1
# create: git tag create-v1.0.0-rc.1 origin/main && git push origin create-v1.0.0-rc.1
# adapter: git tag adapter-cloudflare-v1.0.0-rc.1 origin/main && git push origin adapter-cloudflare-v1.0.0-rc.1
# git tag adapter-netlify-v1.0.0-rc.1 origin/main && git push origin adapter-netlify-v1.0.0-rc.1
# lsp: git tag lsp-v0.1.0-rc.1 origin/main && git push origin lsp-v0.1.0-rc.1
# ext: git tag ext-v0.2.0 origin/main && git push origin ext-v0.2.0 (Marketplace stable, even minor)
# git tag ext-pre-v0.1.0 origin/main && git push origin ext-pre-v0.1.0 (Marketplace pre-release, odd minor)
# pkg: git tag v1.0.0 origin/main && git push origin v1.0.0
# create: git tag create-v1.0.0 origin/main && git push origin create-v1.0.0
# adapter: git tag adapter-cloudflare-v1.0.0 origin/main && git push origin adapter-cloudflare-v1.0.0
# git tag adapter-netlify-v1.0.0 origin/main && git push origin adapter-netlify-v1.0.0
# lsp: git tag lsp-v1.0.0 origin/main && git push origin lsp-v1.0.0
# ext: git tag ext-v1.0.0 origin/main && git push origin ext-v1.0.0 (Marketplace stable, even minor)
# git tag ext-pre-v1.1.0 origin/main && git push origin ext-pre-v1.1.0 (Marketplace pre-release, odd minor)
on:
push:
tags:
Expand Down
Loading
Loading