Maintenance Guide
This guide records local development, verification, builds, and documentation maintenance for DynamicForm. It is for project maintainers, not component users.
Local Commands
npm run start # Vite demo server
npm run build # tsup package build
npm run type-check # TypeScript check
npm run lint:check # ESLint check without fixes
npm run lint # ESLint with fixes
npm run format # Prettier for src and demos
npm run test # Node test runner
The repository has package-lock.json, so npm is the default package manager.
Demos and Verification
Vite demos live in demos/ and are used for manual behavior checks. The current DemoSelector exposes storeBoundary, customHandlers, customComponents, formValidation, uiConfig, renderExtension, and compilerFoundation.
Run demos with:
npm run start
Tests
Run tests with:
npm run test
Current tests include a store boundary check documenting that reducer/effect store state must not hold Ant Design Form runtime values, errors, touched state, warnings, or validating state.
For source changes, prefer:
npm run type-checknpm run lint:checknpm run testnpm run build
For UI behavior, also inspect the relevant demo in the browser.
Documentation Maintenance
When source behavior changes, update the closest topic file in docs/. Update the root README.md if public API, high-level feature summaries, or documentation entry points change. Update AGENTS.md when the change creates useful project knowledge for future agents.
Docs use a bilingual structure: Chinese content first, followed by the English translation.
Do not reintroduce the old overlapping documentation set.
Implementation Guardrails
Preserve the Config -> State -> Runtime -> Consumer architecture. Do not add a reducer-side value store. Use fieldRegistry to locate fields because fields can be flat or grouped. Normalize behavior meta through shared utilities. Keep validation filtered by runtime capabilities. Put business-specific behavior in custom components, handlers, or render hooks rather than hard-coding it in core rendering.
Build Output
dist/ is generated by npm run build and is a reproducible artifact. Do not treat it as source documentation.