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
7 changes: 7 additions & 0 deletions .changeset/fresh-ui-intent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@inkcre/ui-web": minor
---

Give the web package first-class Oxc and native TypeScript development
workflows, and replace the non-discoverable `agent-skills/` folders with the
installed, validated `@inkcre/ui-web#ui-web` TanStack Intent skill.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ yarn.lock

# IDE files
.vscode/*
!.vscode/*.example.jsonc
!.vscode/*.code-snippets
!.vscode/extensions.json
!.vscode/*.example.jsonc
!.vscode/*.code-snippets
!.vscode/extensions.json
!.vscode/settings.json

# temp files
tmp
Expand All @@ -29,4 +30,4 @@ coverage/

# images
*.png
*.jpg
*.jpg
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"recommendations": [
"Vue.volar",
"esbenp.prettier-vscode",
"oxc.oxc-vscode",
"mrmlnc.vscode-scss",
"lokalise.i18n-ally",
"antfu.iconify",
"antfu.unocss",
"vitest.explorer"
]
}
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "explicit"
},
"js/ts.tsdk.path": "node_modules/typescript/lib",
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"oxc.fixKind": "safe_fix",
"oxc.requireConfig": true
}
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "pnpm --filter @inkcre/ui-web build",
"build-tokens": "tsx scripts/build-tokens.ts",
"build-package-metadata": "tsx scripts/build-package-metadata.ts",
"build-skills": "tsx scripts/build-agent-skills.ts",
"build-skills": "pnpm --filter @inkcre/ui-web skill:generate",
"generate": "pnpm build-tokens && pnpm build-package-metadata && pnpm build-skills",
"check:generated": "tsx scripts/check-generated.ts",
"check:stories": "tsx scripts/check-story-coverage.ts",
Expand All @@ -21,10 +21,11 @@
"test": "pnpm --filter @inkcre/ui-web test",
"story": "pnpm --filter @inkcre/ui-web story:build",
"story:dev": "pnpm --filter @inkcre/ui-web story:dev",
"format": "oxfmt .oxfmtrc.json package.json pnpm-workspace.yaml tsconfig.json scripts packages/web/package.json packages/web/component-manifest.json packages/web/component-manifest.schema.json packages/web/tsconfig.json packages/web/tsconfig.check.json packages/web/tsconfig.exports.json packages/web/vite.config.js packages/web/vite.subpaths.config.js packages/web/vitest.config.ts packages/web/histoire.config.ts packages/web/stories .github/workflows/*.yml README.md",
"format:check": "pnpm format --check",
"lint": "oxlint --quiet scripts packages/web/src packages/web/stories packages/web/histoire.config.ts packages/web/vite.config.js packages/web/vite.subpaths.config.js packages/web/vitest.config.ts",
"check": "pnpm format:check && pnpm lint && pnpm check:generated && pnpm check:stories && pnpm check:token-workflow && pnpm type-check && pnpm test && pnpm build && pnpm check:package && pnpm story",
"check:skills": "pnpm --filter @inkcre/ui-web skill:generate:check && pnpm --filter @inkcre/ui-web skill:validate",
"format": "oxfmt .oxfmtrc.json package.json pnpm-workspace.yaml tsconfig.json scripts .github/workflows/*.yml README.md && pnpm --filter @inkcre/ui-web format",
"format:check": "oxfmt --check .oxfmtrc.json package.json pnpm-workspace.yaml tsconfig.json scripts .github/workflows/*.yml README.md && pnpm --filter @inkcre/ui-web format:check",
"lint": "oxlint --deny-warnings scripts && pnpm --filter @inkcre/ui-web lint",
"check": "pnpm format:check && pnpm lint && pnpm check:generated && pnpm check:skills && pnpm check:stories && pnpm check:token-workflow && pnpm type-check && pnpm test && pnpm build && pnpm check:package && pnpm story",
"changeset": "changeset",
"changeset:add": "changeset add",
"changeset:version": "changeset version && pnpm build-package-metadata",
Expand Down
10 changes: 10 additions & 0 deletions packages/web/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "../../node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": [
"src/components.d.ts",
"src/public-components.ts",
"src/version.ts",
"styles/tokens/**",
"styles/uno/preset-ink.ts"
]
}
17 changes: 17 additions & 0 deletions packages/web/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"plugins": ["eslint", "oxc", "typescript", "unicorn", "vue", "vitest"],
"options": {
"denyWarnings": true,
"reportUnusedDisableDirectives": "error"
},
"overrides": [
{
"files": ["src/components/inkPicker/inkPicker.vue"],
"rules": {
"vue/valid-define-emits": "off",
"vue/valid-define-props": "off"
}
}
]
}
21 changes: 21 additions & 0 deletions packages/web/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ peer for `InkJsonEditor`; consumers do not import it directly, but their
package manager must resolve it in the installation graph. Execution 06 must
verify this through the committed consumer lockfile and frozen installation.

## Installed Agent Skill

The non-discoverable `agent-skills/` documentation path is replaced by one
TanStack Intent skill at `skills/ui-web`. No compatibility mirror is shipped:
known consumers did not use the old path, and preserving it would double the
generated stale-output surface without creating an Intent contract.

Consumers that want agent guidance explicitly allowlist the trusted package:

```json
{
"intent": {
"skills": ["@inkcre/ui-web"]
}
}
```

Then load the installed skill with
`intent load @inkcre/ui-web#ui-web`. This changes packaged documentation only;
it does not add a runtime JavaScript export.

## Compatibility and rollback

- `@inkcre/web-design@1.2.2` is the immutable rollback artifact. It will not be
Expand Down
40 changes: 31 additions & 9 deletions packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ pnpm add @inkcre/ui-web

```typescript
// main.ts
import { createApp } from 'vue'
import InKCreUIWeb from '@inkcre/ui-web' // optional
import "@inkcre/ui-web/styles" // must
import { createApp } from "vue";
import InKCreUIWeb from "@inkcre/ui-web"; // optional
import "@inkcre/ui-web/styles"; // required once

const app = createApp(App)
app.use(InKCreUIWeb)
const app = createApp(App);
app.use(InKCreUIWeb);
```

```scss
Expand Down Expand Up @@ -59,11 +59,15 @@ export default defineConfig({

### Use routing

InkHeader and some other components can integrate with your router. See `agent-skills/router/SKILL.md` for setup instructions.
InkHeader and other components can consume a router adapter. Load
`@inkcre/ui-web#ui-web` through TanStack Intent and read
`references/integration.md` for the package boundary.

### Use internationalization (i18n)

The design system supports internationalization. See `agent-skills/i18n/SKILL.md` for setup instructions with vue-i18n.
The design system supports internationalization through the same adapter
boundary. The installed UI skill documents the provider contract and locale
subpath.

## Features

Expand All @@ -77,6 +81,24 @@ The design system supports internationalization. See `agent-skills/i18n/SKILL.md

## Agent Skills

The package includes [Agent Skills](https://agentskills.io) - standardized packages of domain expertise that AI agents can discover and load dynamically. Located in `agent-skills/`, component skills are automatically generated from source code during the build process.
The package ships one progressively disclosed Agent Skill under
`skills/ui-web`. Consumers explicitly trust the package through
`package.json#intent.skills`, then discover and load it with the pinned
[TanStack Intent](https://tanstack.com/intent) CLI:

Skills work with Claude Code, GitHub Copilot, and other AI agents supporting the agentskills.io standard.
```json
{
"intent": {
"skills": ["@inkcre/ui-web"]
}
}
```

```bash
intent list
intent load @inkcre/ui-web#ui-web
```

The generated component facts come from the public component manifest and
source/story contracts. Selection and composition guidance is reviewed in
`skill.seed.json`.
76 changes: 0 additions & 76 deletions packages/web/agent-skills/best-practices/SKILL.md

This file was deleted.

79 changes: 0 additions & 79 deletions packages/web/agent-skills/components/SKILL.md

This file was deleted.

Loading