Skip to content
Closed
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
105 changes: 105 additions & 0 deletions .github/workflows/check-skills.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# check-skills.yml — Drop this into your library repo's .github/workflows/
#
# Validates intent skills on PRs. After a release or manual run, opens or
# updates one review PR when existing skills, artifact coverage, or workspace
# package coverage need review.
#
# Triggers: pull requests touching skills/artifacts, new release published, or
# manual workflow_dispatch.
#
# intent-workflow-version: 3
#
# Template variables (replaced by `intent setup`):
# @tanstack/form — e.g. @tanstack/query or my-workspace workspace

name: Check Skills

on:
pull_request:
paths:
- 'skills/**'
- '**/skills/**'
- '_artifacts/**'
- '**/_artifacts/**'
release:
types: [published]
workflow_dispatch: {}

permissions:
contents: write

Check failure on line 29 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

excessive-permissions

check-skills.yml:29: overly broad permissions: contents: write is overly broad at the workflow level
pull-requests: write

Check failure on line 30 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

excessive-permissions

check-skills.yml:30: overly broad permissions: pull-requests: write is overly broad at the workflow level

jobs:
validate:
name: Validate intent skills
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout

Check warning on line 38 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

artipacked

check-skills.yml:38: credential persistence through GitHub Actions artifacts: does not set persist-credentials: false
uses: actions/checkout@v4

Check failure on line 39 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

unpinned-uses

check-skills.yml:39: unpinned action reference: action is not pinned to a hash (required by blanket policy)

- name: Setup Node
uses: actions/setup-node@v4

Check failure on line 42 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

unpinned-uses

check-skills.yml:42: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
node-version: 20

- name: Install intent
run: npm install -g @tanstack/intent

- name: Validate skills
run: intent validate --github-summary

review:
name: Check intent skill coverage
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout

Check warning on line 57 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

artipacked

check-skills.yml:57: credential persistence through GitHub Actions artifacts: does not set persist-credentials: false
uses: actions/checkout@v4

Check failure on line 58 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

unpinned-uses

check-skills.yml:58: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4

Check failure on line 63 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

unpinned-uses

check-skills.yml:63: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
node-version: 20

- name: Install intent
run: npm install -g @tanstack/intent

- name: Check skills
id: stale
run: |
intent stale --github-review --package-label "@tanstack/form"

- name: Open or update review PR
if: steps.stale.outputs.has_review == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ github.event.release.tag_name || 'manual' }}"

Check failure on line 80 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

template-injection

check-skills.yml:80: code injection via template expansion: may expand into attacker-controllable code
BRANCH="skills/review-${VERSION}"
BASE_BRANCH="${{ github.event.repository.default_branch }}"

Check failure on line 82 in .github/workflows/check-skills.yml

View workflow job for this annotation

GitHub Actions / Run zizmor

template-injection

check-skills.yml:82: code injection via template expansion: may expand into attacker-controllable code

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git fetch origin "$BRANCH" || true
if git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then
git checkout -B "$BRANCH" "origin/$BRANCH"
else
git checkout -b "$BRANCH"
git commit --allow-empty -m "chore: review intent skills for ${VERSION}"
git push origin "$BRANCH"
fi

PR_URL="$(gh pr list --head "$BRANCH" --json url --jq '.[0].url')"
if [ -n "$PR_URL" ]; then
gh pr edit "$PR_URL" --body-file pr-body.md
else
gh pr create \
--title "Review intent skills (${VERSION})" \
--body-file pr-body.md \
--head "$BRANCH" \
--base "$BASE_BRANCH"
fi
36 changes: 31 additions & 5 deletions _artifacts/domain_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ generated_from:
workflow: '@tanstack/intent domain-discovery'
phase: 5
repository:
root: /home/luca/repos/tanstack/form-v2
package_manager: pnpm@11.8.0
root: /home/luca/repos/tanstack/form
package_manager: pnpm@11.21.0
monorepo: true
workspace_sources:
- package.json
Expand Down Expand Up @@ -130,6 +130,32 @@ maintainer_guidance:
- non_validation_error_state_ownership
- ui_library_behavior_itself
- solid_first_examples
coverage:
ignored_packages:
- name: '@tanstack/angular-form'
reason: 'Current reviewed skills are React adapter-first.'
- name: '@tanstack/form-core'
reason: 'Covered as the behavior source for React adapter skills, not as a direct user workflow entrypoint.'
- name: '@tanstack/form-devtools'
reason: 'Devtools workflows are excluded while the package is still changing.'
- name: '@tanstack/lit-form'
reason: 'Current reviewed skills are React adapter-first.'
- name: '@tanstack/preact-form'
reason: 'Current reviewed skills are React adapter-first.'
- name: '@tanstack/react-form-devtools'
reason: 'Devtools workflows are excluded while the package is still changing.'
- name: '@tanstack/react-form-nextjs'
reason: 'Framework-server integrations are outside the current reviewed skill scope.'
- name: '@tanstack/react-form-start'
reason: 'Framework-server integrations are outside the current reviewed skill scope.'
- name: '@tanstack/solid-form'
reason: 'Solid-first coverage remains deferred until the adapter has the planned pieces.'
- name: '@tanstack/solid-form-devtools'
reason: 'Devtools workflows are excluded while the package is still changing.'
- name: '@tanstack/svelte-form'
reason: 'Current reviewed skills are React adapter-first.'
- name: '@tanstack/vue-form'
reason: 'Current reviewed skills are React adapter-first.'
domain_boundaries:
in_scope:
- 'React adapter-first form setup.'
Expand Down Expand Up @@ -762,7 +788,7 @@ skill_candidates:
- 'fieldComponent.loose'
- 'fieldBrand.strict'
- 'fieldBrand.loose'
- 'getFieldGroupHelpers'
- 'defineFieldGroup'
- 'DeepKeys'
- 'DeepValue'
sources:
Expand Down Expand Up @@ -817,11 +843,11 @@ skill_candidates:
- packages/react-form/tests/FormGroup.test-d.tsx
- name: field_group_virtual_path_mismatch
symptom: 'A field group method, watchFields entry, Field, or ArrayField rejects a real form path.'
correction: 'Use the virtual paths defined by defineFields inside the field group; map them to real paths only through withFields bindings.'
correction: 'Use the virtual paths declared by defineFieldGroup inside the field group; map them to real paths only through the bindings passed to a bindComponent result.'
evidence:
- packages/react-form/tests/FieldGroupApi.test-d.tsx
- name: field_group_binding_map_mismatch
symptom: 'withFields rejects a binding map as incomplete, wrong, or as the internal defineFields object.'
symptom: 'A component created by bindComponent rejects a binding map as incomplete or incompatible.'
correction: 'Provide every defined field binding, pass real form paths as bindings, and include the required form prop.'
evidence:
- packages/react-form/tests/FieldGroupApi.test-d.tsx
Expand Down
4 changes: 2 additions & 2 deletions _artifacts/skill_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Primary APIs:
- `form.ArrayField`
- `form.Subscribe`
- `form.FormGroup`
- `withFields`
- `defineFieldGroup`

Core guidance:

Expand Down Expand Up @@ -377,7 +377,7 @@ Important failure modes:
- Calling `createValidators` with fewer or more run functions than option configs.
- Using root-form field names or values inside a `FormGroup` validator or grouped field.
- Passing real form paths into a field group API where virtual paths are required.
- Providing an incomplete `withFields` binding map, passing the internal defined-fields object as a binding, or omitting the required `form` prop.
- Providing an incomplete `bindComponent` binding map or omitting the required `form` prop.
- Reading `form.store` or `field.store` instead of public `atom` APIs.
- Treating `fieldComponent.strict/loose` as schema mode selection.
- Passing a submit-specific form type to a reusable child that should accept several submit handlers.
Expand Down
109 changes: 43 additions & 66 deletions _artifacts/skill_tree.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ schema_version: 1
status: reviewed
library:
name: TanStack Form v2
version: '0.0.0'
repository: https://github.com/TanStack/form-v2
version: '2.0.0-alpha.0'
repository: https://github.com/TanStack/form
description: 'Headless form state, validation, schema, and adapter APIs for TanStack Form v2, with React as the primary skill target.'
generated_from:
domain_map: _artifacts/domain_map.yaml
skill_spec: _artifacts/skill_spec.md
generated_at: '2026-06-25'
generated_at: '2026-08-12'
layout:
kind: flat
reason: 'The reviewed skills are task-focused and independently discoverable; no router skill is needed for 8 skills.'
Expand All @@ -23,16 +23,11 @@ skills:
package: packages/react-form
description: 'Use when building adapter-first React forms with useForm, form.Field, form.ArrayField, form.Subscribe, AppForm, ReactFormType, field groups, reusable field components, or UI-library bindings.'
sources:
- packages/react-form/src/ReactForm/Components.public.ts
- packages/react-form/src/ReactForm/fieldSubscriptions.lib.ts
- packages/react-form/src/AppForm/createFormHook.public.ts
- packages/react-form/src/FieldGroup/withFields.public.ts
- packages/react-form/tests/submit-return.test-d.tsx
- packages/form-core/src/FormApi/FormApiArrayMethods.types.public.ts
- packages/form-core/src/FieldApi/fieldState.lib.ts
- examples/react/array/src/index.tsx
- examples/react/basic-splitting-form/src/index.tsx
- examples/react/ui-integration-shadcn/src/components/form/app-form.ts
- TanStack/form:packages/react-form/src/ReactForm/Components.public.ts
- TanStack/form:packages/react-form/src/ReactForm/fieldSubscriptions.lib.ts
- TanStack/form:packages/react-form/src/AppForm/createFormHook.public.ts
- TanStack/form:packages/react-form/src/FieldGroup/withFields.public.ts
- TanStack/form:examples/react/array/src/index.tsx
- name: Reusable Form Policies
slug: reusable-form-policies
type: framework
Expand All @@ -44,12 +39,11 @@ skills:
- react-form-composition-setup
- error-visibility-workflows
sources:
- examples/react/basic-splitting-form/src/FormSection.tsx
- examples/react/basic-splitting-form/src/sharedForm.ts
- packages/react-form/tests/submit-return.test-d.tsx
- packages/form-core/tests/validation.test.ts
- packages/form-core/tests/validation.test-d.ts
- examples/react/ui-integration-shadcn/src/app/booking/shared-form.tsx
- TanStack/form:examples/react/basic-splitting-form/src/FormSection.tsx
- TanStack/form:examples/react/basic-splitting-form/src/sharedForm.ts
- TanStack/form:packages/react-form/tests/submit-return.test-d.tsx
- TanStack/form:packages/form-core/src/validation.public.ts
- TanStack/form:examples/react/ui-integration-shadcn/src/app/booking/shared-form.tsx
references:
- references/reusable-policy-boundaries.md
- name: Choosing Form Options Modes
Expand All @@ -60,17 +54,10 @@ skills:
package: packages/react-form
description: 'Use when choosing between default formOptions, formOptions.strictSchema, formOptions.looseSchema, appFormOptions, and schema-source typing for React forms.'
sources:
- packages/form-core/src/utils.public.ts
- packages/react-form/src/AppForm/appFormOptions.public.ts
- packages/form-core/tests/validation.test.ts
- packages/form-core/tests/validation.test-d.ts
- examples/react/ui-integration-shadcn/src/app/booking/schema.ts
- examples/react/ui-integration-shadcn/src/app/booking/shared-form.tsx
- https://standardschema.dev/
- https://zod.dev/library-authors
- https://valibot.dev/guides/integrate-valibot/
- https://arktype.io/docs/integrations
- https://effect.website/docs/schema/standard-schema/
- TanStack/form:packages/form-core/src/utils.public.ts
- TanStack/form:packages/react-form/src/AppForm/appFormOptions.public.ts
- TanStack/form:packages/form-core/tests/validation.test-d.ts
- TanStack/form:examples/react/ui-integration-shadcn/src/app/booking/schema.ts
references:
- references/schema-option-modes.md
- references/standard-schema-library-leanings.md
Expand All @@ -84,13 +71,11 @@ skills:
requires:
- choosing-form-options-modes
sources:
- packages/form-core/src/standardSchema.public.ts
- packages/form-core/src/standardSchema.lib.ts
- packages/form-core/src/FormApi/FormApi.public.ts
- packages/form-core/tests/validation.test.ts
- packages/form-core/tests/validation.test-d.ts
- packages/form-core/tests/FormApi/submission-handling.spec.ts
- examples/react/field-groups/src/index.tsx
- TanStack/form:packages/form-core/src/standardSchema.public.ts
- TanStack/form:packages/form-core/src/standardSchema.lib.ts
- TanStack/form:packages/form-core/src/FormApi/FormApi.public.ts
- TanStack/form:packages/form-core/tests/validation.test.ts
- TanStack/form:packages/form-core/tests/FormApi/submission-handling.spec.ts
references:
- references/schema-validation-and-submit-output.md
- name: Query Backed Forms
Expand All @@ -103,13 +88,11 @@ skills:
requires:
- react-form-composition-setup
sources:
- packages/react-form/tests/useForm.spec.tsx
- packages/form-core/src/FormApi/FormApi.lib.ts
- packages/form-core/src/FormApi/FormApi.public.ts
- packages/form-core/src/FormApi/handleSubmit.lib.ts
- packages/form-core/tests/FormApi/default-value.spec.ts
- packages/form-core/tests/FormApi/submission-handling.spec.ts
- maintainer_guidance.query_shape
- TanStack/form:packages/react-form/tests/useForm.spec.tsx
- TanStack/form:packages/form-core/src/FormApi/FormApi.lib.ts
- TanStack/form:packages/form-core/src/FormApi/FormApi.public.ts
- TanStack/form:packages/form-core/src/FormApi/handleSubmit.lib.ts
- TanStack/form:packages/form-core/tests/FormApi/submission-handling.spec.ts
references:
- references/query-backed-defaults-and-submit.md
- name: Error Visibility Workflows
Expand All @@ -120,13 +103,11 @@ skills:
package: packages/react-form
description: 'Use when implementing errorVisibility callbacks, createErrorVisibility helpers, show-after-blur, show-after-submit, grouped submission attempts, fieldState.meta visibility, or reusable validation trigger policies.'
sources:
- packages/form-core/src/validation.public.ts
- packages/form-core/src/FieldApi/fieldState.lib.ts
- packages/form-core/src/utils.public.ts
- packages/form-core/tests/validation.test-d.ts
- packages/form-core/tests/FormApi/validation.spec.ts
- packages/form-core/tests/FormGroupApi/FormGroupApi.spec.ts
- examples/react/ui-integration-shadcn/src/app/booking/shared-form.tsx
- TanStack/form:packages/form-core/src/validation.public.ts
- TanStack/form:packages/form-core/src/FieldApi/fieldState.lib.ts
- TanStack/form:packages/form-core/tests/validation.test-d.ts
- TanStack/form:packages/form-core/tests/FormGroupApi/FormGroupApi.spec.ts
- TanStack/form:examples/react/ui-integration-shadcn/src/app/booking/shared-form.tsx
references:
- references/error-visibility-policies.md
- name: Type Error Debugging
Expand All @@ -140,13 +121,11 @@ skills:
- react-form-composition-setup
- choosing-form-options-modes
sources:
- packages/form-core/tests/validation.test-d.ts
- packages/form-core/tests/deep-keys.test-d.ts
- packages/react-form/tests/submit-return.test-d.tsx
- packages/react-form/tests/FormGroup.test-d.tsx
- packages/react-form/tests/FieldGroupApi.test-d.tsx
- packages/react-form/src/AppForm/getFormHookHelpers.public.ts
- packages/react-form/src/FieldGroup/withFields.public.ts
- TanStack/form:packages/form-core/tests/validation.test-d.ts
- TanStack/form:packages/form-core/tests/deep-keys.test-d.ts
- TanStack/form:packages/react-form/tests/submit-return.test-d.tsx
- TanStack/form:packages/react-form/tests/FormGroup.test-d.tsx
- TanStack/form:packages/react-form/tests/FieldGroupApi.test-d.tsx
references:
- references/type-error-boundaries.md
- name: Examples Authoring
Expand All @@ -159,14 +138,12 @@ skills:
requires:
- react-form-composition-setup
sources:
- examples/react/basic/src/index.tsx
- examples/react/array/src/index.tsx
- examples/react/basic-splitting-form/src/index.tsx
- examples/react/field-groups/src/index.tsx
- examples/react/ui-integration-shadcn/src/app/booking/shared-form.tsx
- examples/react/ui-integration-shadcn/src/app/booking/booking-form.tsx
- examples/react/ui-integration-dnd-kit/src/singleList/index.tsx
- examples/react/ui-integration-dnd-kit/src/twoLists/index.tsx
- TanStack/form:examples/react/basic/src/index.tsx
- TanStack/form:examples/react/array/src/index.tsx
- TanStack/form:examples/react/basic-splitting-form/src/index.tsx
- TanStack/form:examples/react/field-groups/src/index.tsx
- TanStack/form:examples/react/ui-integration-shadcn/src/app/booking/booking-form.tsx
- TanStack/form:examples/react/ui-integration-dnd-kit/src/twoLists/index.tsx
references:
- references/example-scenarios.md
tensions:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@changesets/changelog-github": "^0.7.0",
"@changesets/cli": "^2.30.0",
"@tanstack/eslint-config": "0.4.0",
"@tanstack/intent": "^0.3.6",
"@tanstack/typedoc-config": "0.3.4",
"@tanstack/vite-config": "0.6.0",
"@testing-library/jest-dom": "^7.0.0",
Expand Down Expand Up @@ -89,4 +90,4 @@
"@tanstack/form-example-react-expo"
]
}
}
}
1 change: 1 addition & 0 deletions packages/react-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^5.18.3",
"@tanstack/intent": "^0.3.6",
"@types/react": "^19.2.8",
"@vitejs/plugin-react": "^6.0.1",
"eslint-plugin-react-compiler": "19.1.0-rc.2",
Expand Down
Loading
Loading