بنقرة واحدة
repo-website-api-review
// Review and verify API documentation routes on the Formisch website. Use when checking documentation accuracy, completeness, and consistency with source code.
// Review and verify API documentation routes on the Formisch website. Use when checking documentation accuracy, completeness, and consistency with source code.
Document Formisch source code with JSDoc and inline comments. Use when writing or updating documentation comments in packages/core, packages/methods, or frameworks/* source files.
Review PRs and source code changes in Formisch packages/ and frameworks/. Use when reviewing pull requests, validating implementation patterns, or checking code quality before merging.
Create new API documentation routes for the Formisch website. Use when adding documentation for new exported functions, types, components, or methods that don't yet have website documentation.
Update existing API documentation when Formisch source code changes. Use when function signatures, types, interfaces, or JSDoc comments change in the library source.
Write unit and type tests for Formisch framework packages (frameworks/preact, frameworks/solid, frameworks/svelte, frameworks/vue, frameworks/react). Use when adding tests for hooks/composables/runes (useForm/createForm, useField, useFieldArray) or components (Form, Field, FieldArray) in any framework wrapper.
Write unit tests for Formisch packages (packages/core and packages/methods) with proper TypeScript types. Use when creating new tests, fixing type errors in tests, or adding test coverage for core/methods functions.
| name | repo-website-api-review |
| description | Review and verify API documentation routes on the Formisch website. Use when checking documentation accuracy, completeness, and consistency with source code. |
| metadata | {"author":"formisch","version":"1.0"} |
This skill provides a systematic approach to reviewing API documentation routes for accuracy and consistency.
For each documented API:
Verify each property:
href links are validVerify content:
// Source code
export function validate(form: FormStore, config?: Config): void;
// ❌ Documentation shows different signature
const result = validate(form); // Missing config, wrong return
Documentation should include ALL parameters from source:
## Parameters
- `form` <Property {...properties.form} />
- `config` <Property {...properties.config} /> <!-- Don't forget optional params -->
| API Type | Heading |
|---|---|
| Functions | ## Parameters |
| Components | ## Properties |
Examples must work with current API:
// ❌ Old API usage
const form = createForm(schema);
// ✅ Current API
const form = createForm({ schema });
| Framework | Related Section Heading |
|---|---|
| Solid | ### Primitives |
| Qwik | ### Hooks |
| Preact | ### Hooks |
| Vue | ### Composables |
| Svelte | ### Runes |
// ❌ Wrong - using constraint type name
generics: [{ type: 'custom', name: 'RequiredPath' }];
// ✅ Correct - using parameter name
generics: [{ type: 'custom', name: 'TFieldPath' }];
// ❌ Wrong - relative across packages
href: '../../../core/api/FormSchema/';
// ✅ Correct - absolute path
href: '/core/api/FormSchema/';
modifier: 'extends'href linksname, href, genericshref in properties.ts resolveDocument issues found:
## Review: createForm
### Issues Found
1. **Signature mismatch** (L15)
- Source shows `config: FormConfig<TSchema>`
- Docs show `config: Config`
2. **Missing parameter** (Parameters section)
- `initialInput` not documented
3. **Broken link** (properties.ts L23)
- `href: '../FormConfig/'` - FormConfig not documented
### Recommendations
- Update properties.ts with correct FormConfig type
- Add initialInput to Parameters section
- Create FormConfig type documentation