@riebeckite/ai 0.0.0-stage → 0.2.0

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.
Files changed (38) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +8 -2
  3. package/README_ja.md +9 -0
  4. package/assets/skills/assets/riebeckite-component.md +16 -0
  5. package/assets/skills/assets/riebeckite-configuration.md +13 -0
  6. package/assets/skills/assets/riebeckite-content-migration.md +15 -0
  7. package/assets/skills/assets/riebeckite-deployment.md +15 -0
  8. package/assets/skills/assets/riebeckite-plugin-catalog.md +14 -0
  9. package/assets/skills/assets/riebeckite-plugin.md +16 -0
  10. package/assets/skills/assets/riebeckite-site.md +14 -0
  11. package/assets/skills/assets/riebeckite-theme.md +15 -0
  12. package/assets/skills/assets/riebeckite-troubleshooting.md +15 -0
  13. package/assets/skills/assets/riebeckite-upgrade.md +16 -0
  14. package/assets/skills/references/riebeckite-component.md +124 -0
  15. package/assets/skills/references/riebeckite-configuration.md +96 -0
  16. package/assets/skills/references/riebeckite-content-migration.md +89 -0
  17. package/assets/skills/references/riebeckite-deployment.md +101 -0
  18. package/assets/skills/references/riebeckite-plugin-catalog.md +77 -0
  19. package/assets/skills/references/riebeckite-plugin.md +132 -0
  20. package/assets/skills/references/riebeckite-site.md +111 -0
  21. package/assets/skills/references/riebeckite-theme.md +145 -0
  22. package/assets/skills/references/riebeckite-troubleshooting.md +53 -0
  23. package/assets/skills/references/riebeckite-upgrade.md +71 -0
  24. package/assets/skills/riebeckite-component.md +20 -0
  25. package/assets/skills/riebeckite-configuration.md +19 -0
  26. package/assets/skills/riebeckite-content-migration.md +20 -0
  27. package/assets/skills/riebeckite-deployment.md +20 -0
  28. package/assets/skills/riebeckite-plugin-catalog.md +20 -0
  29. package/assets/skills/riebeckite-plugin.md +21 -0
  30. package/assets/skills/riebeckite-site-external.md +23 -0
  31. package/assets/skills/riebeckite-site.md +22 -0
  32. package/assets/skills/riebeckite-theme.md +19 -0
  33. package/assets/skills/riebeckite-troubleshooting.md +20 -0
  34. package/assets/skills/riebeckite-upgrade.md +20 -0
  35. package/dist/clients.d.ts +17 -0
  36. package/dist/index.d.ts +48 -0
  37. package/dist/index.js +260 -0
  38. package/package.json +52 -3
@@ -0,0 +1,53 @@
1
+ # Troubleshooting guide
2
+
3
+ Diagnose from evidence. Do not change configuration or content until the failing stage is identified.
4
+
5
+ ## Capture the failure
6
+
7
+ Record:
8
+
9
+ - Exact command and arguments.
10
+ - Full error output, including the first error.
11
+ - Working directory and project root.
12
+ - Riebeckite, Node.js, and package-manager versions.
13
+ - Recent changes and whether the failure is local, CI-only, or deployed.
14
+
15
+ A later error is often a consequence of the first. Fix or explain the first one.
16
+
17
+ ## Verification order
18
+
19
+ 1. `npm run check` — configuration, Plugin contracts, and content validation.
20
+ 2. `npm run doctor` — content-source discovery, unreadable or invalid files, environment, and build state.
21
+ 3. `npm exec riebeckite inspect config` — resolved content directory and project values.
22
+ 4. `npm exec riebeckite inspect content --list` — logical content paths before WikiLink or embed diagnosis.
23
+ 5. `npm run build` — routes, rendering, assets, and output.
24
+ 6. `npm run build -- --full` — bypass incremental reuse when a stale result is suspected.
25
+
26
+ Use `npm exec riebeckite doctor --fail-on warning` when a deprecation warning should fail CI.
27
+
28
+ ## Failure classes
29
+
30
+ | Symptom | Inspect first |
31
+ | --- | --- |
32
+ | Config file not found | Working directory, config filename, `requiresProject` command context. |
33
+ | Content file missing | `content.directory`, excludes, file extension, case, and symlinks. |
34
+ | Frontmatter rejected | Field type, unknown value, content format, Plugin options. |
35
+ | WikiLink or embed unresolved | `inspect content --list`, aliases, locale, and the resolved target. |
36
+ | Plugin check fails | Package contract, peer dependency, option shape, and supported version. |
37
+ | Build fails after check passes | Route/render boundary, asset import, client/server code, or environment. |
38
+ | Works locally, fails in CI | External content checkout, lockfile, environment variables, Node version. |
39
+ | Deployed asset 404 | `baseUrl`, base path, output directory, or cache. |
40
+ | Stale output | Incremental cache, content-source changes, or an incorrect Plugin cache mode. |
41
+
42
+ ## Root-cause rules
43
+
44
+ - Fix the shared cause once, not every occurrence.
45
+ - Do not delete content or disable a check to make the error disappear.
46
+ - Do not weaken validation or catch an error without reporting it.
47
+ - If a dependency is the cause, verify the supported version before changing project code.
48
+ - If the failure is environmental, document the required variable or tool rather than hard-coding a local path.
49
+ - Keep the fix scoped; unrelated cleanup makes the diagnosis harder to trust.
50
+
51
+ ## Report
52
+
53
+ State the failing stage, root cause, evidence, files changed, commands run, verification result, and any unresolved risk or follow-up.
@@ -0,0 +1,71 @@
1
+ # Riebeckite upgrade guide
2
+
3
+ An upgrade is two separate steps: a preflight check, then a dependency and migration change. Do not confuse them.
4
+
5
+ ## Preflight check
6
+
7
+ ```sh
8
+ npm exec riebeckite upgrade --to <version>
9
+ ```
10
+
11
+ This command creates an isolated, reproducible candidate and runs baseline and candidate checks in temporary copies. It reports:
12
+
13
+ - `READY` — the project can likely move to the candidate.
14
+ - `BLOCKED` — a dependency, peer, engine, typecheck, check, or build issue must be resolved.
15
+ - `UNVERIFIED` — the check could not establish a reliable result.
16
+
17
+ It does not install packages, edit `package.json`, or change the project. Treat its output as evidence for the next step.
18
+
19
+ ## Inspect the project
20
+
21
+ Record:
22
+
23
+ - Every `@riebeckite/*` dependency and its current range.
24
+ - The lockfile and package manager.
25
+ - Local Plugins, Themes, content formats, and custom scripts.
26
+ - Generated Skills and any local edits.
27
+ - Deployment configuration and external content.
28
+ - Current `npm run check`, `npm run doctor`, and `npm run build` results.
29
+
30
+ Capture a baseline before changing versions so regressions are distinguishable from pre-existing failures.
31
+
32
+ ## Upgrade sequence
33
+
34
+ 1. Read release notes and migration guides for the target version.
35
+ 2. Run `npm exec riebeckite upgrade --to <version>`.
36
+ 3. Resolve blockers in the current project or adjust the target version.
37
+ 4. Update all `@riebeckite/*` packages together with the project's package manager.
38
+ 5. Let the package manager update the lockfile. Do not hand-edit it.
39
+ 6. Apply required configuration, Plugin, Theme, or content migrations.
40
+ 7. Run `npm run check`, `npm run doctor`, and `npm run build`.
41
+ 8. Inspect representative routes, assets, feeds, redirects, and publication state.
42
+ 9. Sync generated Skills only after review and user consent.
43
+
44
+ Before 1.0, minor releases may contain breaking changes. From 1.0, semantic versioning applies. Deprecated APIs may be reported by `check`, `doctor`, the Inspector, or lifecycle metadata.
45
+
46
+ ## Generated Skills
47
+
48
+ `npm exec riebeckite skills sync` can add missing Skills, restore missing files, and replace outdated generated Skills. It can overwrite local edits to generated `SKILL.md` and reference files after confirmation.
49
+
50
+ - Review the shown diff first.
51
+ - Keep intentional local guidance instead of accepting a replacement.
52
+ - Do not sync Skills silently as part of an upgrade.
53
+
54
+ ## Rollback
55
+
56
+ Record the previous dependency versions and lockfile revision before changing them. If check or build regresses, restore the previous dependency set and lockfile, then diagnose. Do not stack a second upgrade on an unverified one.
57
+
58
+ ## Common failures
59
+
60
+ | Symptom | Likely cause |
61
+ | --- | --- |
62
+ | Preflight is BLOCKED | Peer dependency, engine, or build incompatibility in the candidate. |
63
+ | Preflight is UNVERIFIED | The environment could not install or run the isolated check. |
64
+ | Check fails after upgrade | Deprecated API, changed option shape, or Plugin contract change. |
65
+ | Build fails after check passes | Route, asset, or renderer migration not applied. |
66
+ | Site looks unchanged but output is stale | Old lockfile, partial dependency update, or cached build. |
67
+ | Skills changed unexpectedly | Sync replaced generated files or lost local edits. |
68
+
69
+ ## Report
70
+
71
+ State old and new versions, preflight result, migrations applied, commands run, verification, Skill sync decision, and rollback path.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: riebeckite-component
3
+ description: Use when adding or changing site-specific Riebeckite application components or routes.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Application component workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Inspect the affected route, existing components, active Theme, Plugins, and the content it renders. Record the current public URL and route params.
12
+ 2. Decide the ownership boundary before coding: official Plugin, local Plugin, Theme, application component, or content/config.
13
+ 3. Reuse the project's existing UI primitives and layout rather than creating a parallel design system.
14
+ 4. Preserve route data, params, error states, and public URLs. Do not change content routing as a side effect of a UI edit.
15
+ 5. Use semantic HTML and preserve keyboard operation, labels, focus order, landmarks, and heading hierarchy.
16
+ 6. Check narrow layouts, long content, missing content, and reduced-motion preferences. Do not encode meaning in colour alone.
17
+ 7. Add or update a focused test for the component's data, input, loading, and error branches where the project has a test setup.
18
+ 8. Run `npm run check`; run `npm run build` when routes, rendering, or assets changed.
19
+ 9. Inspect the rendered page at the affected route in a browser and confirm no unrelated route regressed.
20
+ 10. Report changed components/routes, URL and accessibility impact, tests, and any remaining visual risk.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: riebeckite-configuration
3
+ description: Use when changing Riebeckite site configuration, scripts, content paths, or integration settings.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Configuration workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Inspect `riebeckite.config.ts`, `package.json`, the content directory, deployment files, and installed extensions.
12
+ 2. Identify the smallest setting that solves the need. Prefer an existing option over a new abstraction or script.
13
+ 3. Preserve unknown configuration fields and unrelated settings.
14
+ 4. Check path, locale, base URL, publish strategy, and extension changes for route or publication impact.
15
+ 5. Keep secrets in environment variables or the provider's secret store. Report names only.
16
+ 6. Update the configuration in the project's existing style and keep TypeScript types valid.
17
+ 7. Run `npm run check`; run `npm run build` when paths, routes, extensions, or deployment output changed.
18
+ 8. Use `npm exec riebeckite inspect config` to confirm the resolved values when behaviour is unclear.
19
+ 9. Report the changed setting, reason, validation results, and any migration or deployment implication.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: riebeckite-content-migration
3
+ description: Use when changing frontmatter, paths, permalinks, links, or publication state across multiple Riebeckite content files.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Content migration workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Write down the exact source set, transformation, expected route changes, exclusions, and rollback method before editing content.
12
+ 2. Inspect project conventions and representative files. Preserve unknown frontmatter keys, formatting, and all content outside the requested transformation.
13
+ 3. Determine the publish strategy and current visibility of every affected page before changing frontmatter.
14
+ 4. Prefer `@riebeckite/plugin-frontmatter-transformer` for supported bulk frontmatter changes. Do not write an unreviewed one-off rewrite script.
15
+ 5. Treat moves, renames, permalink changes, aliases, locales, and publication changes as route-affecting. Find inbound links, embeds, redirects, and external references first.
16
+ 6. Apply the smallest reversible batch. Record changed paths, skipped files, and the reason for each exclusion.
17
+ 7. Run `npm run check` after each batch; run `npm run build` before completion.
18
+ 8. Inspect the resulting routes, redirects, publication state, feeds, and unresolved links.
19
+ 9. Stop and restore from version control or backup if results differ from the plan. Do not improvise a second migration to hide the first.
20
+ 10. Report scope, transformation, exclusions, route impact, validation results, and the rollback path.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: riebeckite-deployment
3
+ description: Use when configuring, changing, or verifying a Riebeckite site deployment.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Deployment workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Identify the deployment provider, build command, output directory, public origin, and content source before changing anything.
12
+ 2. Inspect the existing workflow, provider configuration, scripts, and environment variable names. Preserve the working deployment path.
13
+ 3. Keep secrets in the provider's secret store. Report only secret names, never values, and never commit them.
14
+ 4. For external content, verify the checkout path, repository permissions, fetch order, and `content.directory` alignment.
15
+ 5. Preserve base paths, locales, redirects, canonical URLs, asset URLs, and cache headers.
16
+ 6. Run `npm run check` and `npm run build` locally. Inspect `dist/` for the expected routes, assets, feeds, and redirects.
17
+ 7. Deploy through the project's existing command or CI workflow. Do not replace a working provider setup without an explicit request.
18
+ 8. Verify the public origin, a representative page, assets, feeds/sitemap, redirects, and one deep link after deployment.
19
+ 9. Identify the previous artifact, revision, or provider deployment as the rollback target before declaring success.
20
+ 10. Report the deployment target, changes, verification URLs/results, secret names, and rollback path.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: riebeckite-plugin-catalog
3
+ description: Use before writing local code for a reusable Riebeckite feature, to find and evaluate an official Plugin.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Official Plugin selection workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. State the capability in one sentence, including the content or route it must affect and whether it needs build-time output or runtime interaction.
12
+ 2. Inspect `riebeckite.config.ts` and `package.json` for existing Plugins, Themes, local extensions, and overlapping capabilities.
13
+ 3. Consult the official catalog before writing local code. When MCP is connected, call `riebeckite_plugin_catalog` with a short capability query. Otherwise use <https://riebeckite.dev/docs/plugins/>.
14
+ 4. Compare candidates by supported input, output shape, configuration syntax, required companion packages, route or asset impact, and maintenance status.
15
+ 5. Choose the narrowest Plugin that satisfies the need. Do not add a broad bundle for one feature.
16
+ 6. Read the candidate's current documentation and version requirements. Do not rely on a remembered API or an old example.
17
+ 7. Install only the required package and register it with the project's existing configuration pattern.
18
+ 8. Run `npm run check` and `npm run build`; inspect the affected content, route, and assets.
19
+ 9. If no catalog Plugin fits, report the gap and explain why local Plugin or application code is the next option. Do not silently build a duplicate.
20
+ 10. Report the capability, candidates considered, chosen package and version, configuration changes, and verification results.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: riebeckite-plugin
3
+ description: Use when creating or changing a local Riebeckite Plugin.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Local Plugin workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Inspect `riebeckite.config.ts`, existing Plugins, and `package.json`. Confirm the feature belongs in a Plugin rather than a Theme, application component, or configuration.
12
+ 2. Create or locate the Plugin with `npm exec riebeckite create plugin <name> --features transform` when a scaffold is appropriate. Never edit `node_modules`.
13
+ 3. Implement a named factory around `definePlugin`. Type the options, set a stable `name`, and validate user input at the boundary.
14
+ 4. Choose the narrowest extension point: direct `remarkPlugins`/`rehypePlugins`, a pipeline extension, a lifecycle hook, or an explicitly needed endpoint or renderer.
15
+ 5. Declare `processedContentCache` honestly. Use `none`, `tracked`, `global`, or `unsafe` according to what the transform actually reads; do not invent local incremental invalidation.
16
+ 6. Declare output dependencies when the Plugin emits content-derived output. Use `content`, `tag`, `folder`, `global`, or `unknown` as appropriate.
17
+ 7. Use `rr-*` hooks and `--rr-*` tokens for extension-owned CSS. Leave `rb-*` and `--rb-*` framework contracts unchanged.
18
+ 8. Add a focused test for the transform, option validation, cache declaration, and any output dependency. Test a real content fixture, not only a unit stub.
19
+ 9. Run `npm exec riebeckite plugin verify <path> --level full`, then `npm run check` and `npm run build` when the Plugin is registered in the site.
20
+ 10. Use `npm exec riebeckite plugin dev <path>` for an isolated development loop. Inspect diagnostics and the affected output.
21
+ 11. Report the Plugin API used, cache mode, output dependencies, tests and verification, and any unresolved compatibility risk.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: riebeckite-site
3
+ description: Use when adding or editing pages, frontmatter, or internal links in a Riebeckite site with external content.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ <!-- riebeckite:content-source external -->
8
+
9
+ # Site content workflow
10
+
11
+ Read `references/guide.md` and use `assets/checklist.md` for every change.
12
+
13
+ 1. Read `riebeckite.config.ts`, the resolved content directory, and two or three neighbouring pages before editing. Record the project's frontmatter, slug, link, and formatting conventions.
14
+ 2. Check `filters.publishStrategy` and any per-page publishing fields. Do not assume `publish: true` is required when the project uses selective publishing.
15
+ 3. When MCP is connected, obtain `riebeckite_context`, `riebeckite_diagnostics`, and `riebeckite_links` before editing. Otherwise run `npm run check` to establish a baseline.
16
+ 4. Resolve an ambiguous link, embed, alias, or source before changing it. Use the resolved Public Location; never guess a target from a filename.
17
+ 5. Keep content inside `{{content-directory}}/`; preserve unknown frontmatter keys and the original line endings and Markdown style.
18
+ 6. Before renaming, moving, or deleting a page, find inbound links, embeds, aliases, redirects, locale variants, and external references.
19
+ 7. Make the smallest edit. Keep unrelated content and generated output unchanged.
20
+ 8. This project uses a git-ignored external content repository. Make content commits in that repository, not in the site repository, and never rewrite its history.
21
+ 9. Run `npm run check`. Run `npm run build` when routing, configuration, assets, or publication state changed.
22
+ 10. Inspect the resulting route, redirects, unpublished pages, and unresolved links. Stop and report if a public URL changed without an approved redirect.
23
+ 11. Report changed files, validation results, unresolved diagnostics, the content repository commit, and any publication or link risk.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: riebeckite-site
3
+ description: Use when adding or editing pages, frontmatter, or internal links in a Riebeckite site.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ <!-- riebeckite:content-source local -->
8
+
9
+ # Site content workflow
10
+
11
+ Read `references/guide.md` and use `assets/checklist.md` for every change.
12
+
13
+ 1. Read `riebeckite.config.ts`, the resolved content directory, and two or three neighbouring pages before editing. Record the project's frontmatter, slug, link, and formatting conventions.
14
+ 2. Check `filters.publishStrategy` and any per-page publishing fields. Do not assume `publish: true` is required when the project uses selective publishing.
15
+ 3. When MCP is connected, obtain `riebeckite_context`, `riebeckite_diagnostics`, and `riebeckite_links` before editing. Otherwise run `npm run check` to establish a baseline.
16
+ 4. Resolve an ambiguous link, embed, alias, or source before changing it. Use the resolved Public Location; never guess a target from a filename.
17
+ 5. Keep content inside `{{content-directory}}/`; preserve unknown frontmatter keys and the original line endings and Markdown style.
18
+ 6. Before renaming, moving, or deleting a page, find inbound links, embeds, aliases, redirects, locale variants, and external references.
19
+ 7. Make the smallest edit. Keep unrelated content and generated output unchanged.
20
+ 8. Run `npm run check`. Run `npm run build` when routing, configuration, assets, or publication state changed.
21
+ 9. Inspect the resulting route, redirects, unpublished pages, and unresolved links. Stop and report if a public URL changed without an approved redirect.
22
+ 10. Report changed files, validation results, unresolved diagnostics, and any publication or link risk.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: riebeckite-theme
3
+ description: Use when creating or changing a Riebeckite theme or its presentation.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Theme workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Inspect the active Theme, site CSS, layout, and representative pages. Create a local Theme with `npm exec riebeckite create theme <name> --register`; never edit `node_modules`.
12
+ 2. Use `defineTheme` and typed `defineThemeSettings`. Define semantic `--rb-*` tokens before styling components.
13
+ 3. Keep Theme work presentational. Do not add Plugin behaviour or copy a Plugin's internal CSS.
14
+ 4. Preserve `rb-*` structural hooks; add only `rr-*` extension hooks. Put project-specific overrides in unlayered site CSS intentionally.
15
+ 5. Test token changes in light, dark, and system modes, and every affected component state. Do not infer accessibility from colour values alone.
16
+ 6. Check semantic HTML, keyboard focus, contrast, long content, narrow layouts, and reduced motion.
17
+ 7. Run `npm exec riebeckite theme preview <name>` and inspect mobile and desktop views.
18
+ 8. Run `npm run check` and `npm run build` when the Theme is registered in the site.
19
+ 9. Report affected tokens and hooks, tested modes/viewports, and remaining visual or accessibility risk.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: riebeckite-troubleshooting
3
+ description: Use when a Riebeckite check, build, preview, or content resolution fails.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Troubleshooting workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Capture the exact failing command, full error, project root, Riebeckite version, and recent changes. Do not start by editing files.
12
+ 2. Reproduce with the smallest command that fails. Prefer `npm run check`, then `npm run doctor`, then `npm run build`.
13
+ 3. Use `npm exec riebeckite inspect config` to confirm the resolved project and content paths.
14
+ 4. Use `npm exec riebeckite inspect content --list` before diagnosing a missing file, WikiLink, embed, or route.
15
+ 5. Classify the failure: configuration, content source, frontmatter/format, Plugin contract, route/render, asset, environment, or deployment.
16
+ 6. Form one concrete hypothesis and test it with the smallest read-only inspection. Do not make several unrelated changes at once.
17
+ 7. Fix the root cause in shared code or configuration, not just the first symptom.
18
+ 8. Re-run the failing command and the broader check/build verification. Confirm the fix does not suppress diagnostics.
19
+ 9. If the cause is unclear, stop and report the evidence and the next discriminating check.
20
+ 10. Report the cause, changed files, commands run, verification, and any remaining risk.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: riebeckite-upgrade
3
+ description: Use when upgrading Riebeckite packages or reconciling a project with a newer release.
4
+ riebeckiteVersion: "{{riebeckite-version}}"
5
+ ---
6
+
7
+ # Riebeckite upgrade workflow
8
+
9
+ Read `references/guide.md` and complete `assets/checklist.md`.
10
+
11
+ 1. Inspect `package.json`, the lockfile, local extensions, Plugins, Theme, and generated Skills. Record the current `@riebeckite/*` versions.
12
+ 2. Read the release notes and migration guidance for every package being changed.
13
+ 3. Run `npm exec riebeckite upgrade --to <version>` as a preflight. It checks isolated baseline and candidate copies and reports READY, BLOCKED, or UNVERIFIED; it does not install or modify the project.
14
+ 4. Resolve the reported blockers before changing dependencies. Do not treat a preflight result as an upgrade.
15
+ 5. Update all `@riebeckite/*` packages together with the project's package manager. Do not hand-edit the lockfile or update one package in isolation.
16
+ 6. Apply required configuration, Plugin, Theme, or content migrations using the release guidance.
17
+ 7. Run `npm run check`, `npm run doctor`, and `npm run build`.
18
+ 8. Review generated Skills before syncing. Run `npm exec riebeckite skills sync` and accept replacement only when the user agrees; keep local guidance otherwise.
19
+ 9. Inspect changed routes, assets, and publication behaviour against the pre-upgrade baseline.
20
+ 10. Report old/new versions, preflight result, migrations, commands run, Skill decision, and rollback path.
@@ -0,0 +1,17 @@
1
+ export declare const AI_CLIENTS: readonly ["claude", "cursor", "vscode", "opencode"];
2
+ export type AiClient = (typeof AI_CLIENTS)[number];
3
+ export type AiPackageManager = "npm" | "pnpm";
4
+ export type AiClientConfigResult = {
5
+ readonly status: "write";
6
+ readonly path: string;
7
+ readonly content: string;
8
+ } | {
9
+ readonly status: "unchanged";
10
+ readonly path: string;
11
+ } | {
12
+ readonly status: "invalid";
13
+ readonly path: string;
14
+ readonly message: string;
15
+ };
16
+ export declare function aiClientConfigPath(client: AiClient): string;
17
+ export declare function mergeAiClientConfig(client: AiClient, existing: string | undefined, packageManager?: AiPackageManager): AiClientConfigResult;
@@ -0,0 +1,48 @@
1
+ import { type ConfigValidationIssue } from "@riebeckite/core";
2
+ import type { AiPackageManager } from "./clients.js";
3
+ export * from "./clients.js";
4
+ export type AiMutationPolicy = {
5
+ writable?: readonly string[];
6
+ protected?: readonly string[];
7
+ };
8
+ export type AiIntegrationConfig = {
9
+ mutationPolicy?: AiMutationPolicy;
10
+ };
11
+ export type ResolvedAiIntegrationConfig = {
12
+ mutationPolicy: {
13
+ writable: readonly string[];
14
+ protected: readonly string[];
15
+ };
16
+ };
17
+ export type AiSetupContext = {
18
+ name: string;
19
+ title: string;
20
+ description: string;
21
+ baseUrl: string;
22
+ locale: string;
23
+ externalContent?: boolean;
24
+ };
25
+ export type AiSetupOptions = {
26
+ mcp?: boolean;
27
+ lint?: boolean;
28
+ rules?: boolean;
29
+ skills?: boolean;
30
+ contentDirectory?: string;
31
+ packageManager?: AiPackageManager;
32
+ };
33
+ export type AiSetupFile = {
34
+ path: string;
35
+ content: string;
36
+ };
37
+ declare module "@riebeckite/core" {
38
+ interface RiebeckiteIntegrations {
39
+ ai?: AiIntegrationConfig;
40
+ }
41
+ }
42
+ export declare function defineAiIntegration(config: AiIntegrationConfig): AiIntegrationConfig;
43
+ export declare function getAiSetupFiles(context: AiSetupContext, options?: AiSetupOptions, version?: string): readonly AiSetupFile[];
44
+ export declare function aiRuleFiles(context: AiSetupContext, options?: AiSetupOptions, version?: string): readonly AiSetupFile[];
45
+ export declare function aiSkillFiles(context: AiSetupContext, options?: AiSetupOptions, version?: string): readonly AiSetupFile[];
46
+ export declare function resolveAiIntegration(value: unknown): ResolvedAiIntegrationConfig;
47
+ export declare function createMutationPathPolicy(policy: ResolvedAiIntegrationConfig["mutationPolicy"]): (path: string) => boolean;
48
+ export declare function validateAiIntegration(value: unknown): ConfigValidationIssue[];