gennady 0.6.1 → 0.7.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.
- package/README.md +2 -15
- package/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/ai/agents/agent-review-verifier.xml +6 -0
- package/ai/directives/architecture/README.md +21 -0
- package/ai/directives/coding/README.md +23 -0
- package/ai/directives/coding/result-conventions.xml +55 -0
- package/ai/directives/coding/svelte5-runes.xml +248 -0
- package/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/ai/directives/coding/typescript-rules.xml +589 -0
- package/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/ai/directives/dbc-audit.directive.xml +131 -0
- package/ai/directives/dev-review.directive.xml +148 -0
- package/ai/directives/infra/README.md +11 -0
- package/ai/directives/infra/eslint-setup.xml +467 -0
- package/ai/directives/infra/git-setup.xml +261 -0
- package/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/ai/directives/infra/storybook-setup.xml +153 -0
- package/ai/directives/knowledge.xml +206 -0
- package/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/ai/directives/sdd/README.md +49 -0
- package/ai/directives/sdd/audit.directive.xml +543 -0
- package/ai/directives/sdd/discovery.directive.xml +824 -0
- package/ai/directives/sdd/fix.directive.xml +249 -0
- package/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/ai/directives/sdd/setup.directive.xml +213 -0
- package/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/ai/directives/testing/README.md +25 -0
- package/ai/directives/testing/common.xml +234 -0
- package/ai/directives/testing/node-test.xml +288 -0
- package/ai/directives/testing/playwright-cli.xml +199 -0
- package/ai/directives/testing/playwright-e2e.xml +292 -0
- package/ai/directives/testing/storybook-usage.xml +173 -0
- package/ai/directives/testing/svelte-testing.xml +237 -0
- package/ai/directives/testing/vitest-rules.xml +326 -0
- package/ai/docs/README.md +17 -0
- package/ai/docs/ai-icl.md +538 -0
- package/ai/docs/ai-priming.md +548 -0
- package/ai/docs/ai-prompt-formats.md +406 -0
- package/ai/docs/ai-promting.md +572 -0
- package/ai/drafts/DRAFT.md +120 -0
- package/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/ai/drafts/d.md +65 -0
- package/ai/drafts/music-posts.md +105 -0
- package/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/ai/fw/v1/core/mental-model.xml +50 -0
- package/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/ai/fw/v2/arch-universal.xml +73 -0
- package/ai/fw-draft/README.md +79 -0
- package/ai/fw-draft/bin/discovery.sh +116 -0
- package/ai/fw-draft/gennady.xml +58 -0
- package/ai/fw-draft/provider/claude.xml +16 -0
- package/ai/fw-draft/provider/cursor.xml +23 -0
- package/ai/fw-draft/provider/default.xml +12 -0
- package/ai/fw-draft/roles/developer.xml +18 -0
- package/ai/fw-draft/router.xml +39 -0
- package/ai/fw-draft/routes/development.xml +32 -0
- package/ai/fw-draft/routes/universal.xml +58 -0
- package/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/dist/ai/agents/agent-review-verifier.xml +6 -0
- package/dist/ai/directives/architecture/README.md +21 -0
- package/dist/ai/directives/coding/README.md +23 -0
- package/dist/ai/directives/coding/result-conventions.xml +55 -0
- package/dist/ai/directives/coding/svelte5-runes.xml +248 -0
- package/dist/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/dist/ai/directives/coding/typescript-rules.xml +589 -0
- package/dist/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/dist/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/dist/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/dist/ai/directives/dbc-audit.directive.xml +131 -0
- package/dist/ai/directives/dev-review.directive.xml +148 -0
- package/dist/ai/directives/infra/README.md +11 -0
- package/dist/ai/directives/infra/eslint-setup.xml +467 -0
- package/dist/ai/directives/infra/git-setup.xml +261 -0
- package/dist/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/dist/ai/directives/infra/storybook-setup.xml +153 -0
- package/dist/ai/directives/knowledge.xml +206 -0
- package/dist/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/dist/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/dist/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/dist/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/dist/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/dist/ai/directives/sdd/README.md +49 -0
- package/dist/ai/directives/sdd/audit.directive.xml +543 -0
- package/dist/ai/directives/sdd/discovery.directive.xml +824 -0
- package/dist/ai/directives/sdd/fix.directive.xml +249 -0
- package/dist/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/dist/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/dist/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/dist/ai/directives/sdd/setup.directive.xml +213 -0
- package/dist/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/dist/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/dist/ai/directives/testing/README.md +25 -0
- package/dist/ai/directives/testing/common.xml +234 -0
- package/dist/ai/directives/testing/node-test.xml +288 -0
- package/dist/ai/directives/testing/playwright-cli.xml +199 -0
- package/dist/ai/directives/testing/playwright-e2e.xml +292 -0
- package/dist/ai/directives/testing/storybook-usage.xml +173 -0
- package/dist/ai/directives/testing/svelte-testing.xml +237 -0
- package/dist/ai/directives/testing/vitest-rules.xml +326 -0
- package/dist/ai/docs/README.md +17 -0
- package/dist/ai/docs/ai-icl.md +538 -0
- package/dist/ai/docs/ai-priming.md +548 -0
- package/dist/ai/docs/ai-prompt-formats.md +406 -0
- package/dist/ai/docs/ai-promting.md +572 -0
- package/dist/ai/drafts/DRAFT.md +120 -0
- package/dist/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/dist/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/dist/ai/drafts/d.md +65 -0
- package/dist/ai/drafts/music-posts.md +105 -0
- package/dist/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/dist/ai/fw/v1/core/mental-model.xml +50 -0
- package/dist/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/dist/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/dist/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/dist/ai/fw/v2/arch-universal.xml +73 -0
- package/dist/ai/fw-draft/README.md +79 -0
- package/dist/ai/fw-draft/bin/discovery.sh +116 -0
- package/dist/ai/fw-draft/gennady.xml +58 -0
- package/dist/ai/fw-draft/provider/claude.xml +16 -0
- package/dist/ai/fw-draft/provider/cursor.xml +23 -0
- package/dist/ai/fw-draft/provider/default.xml +12 -0
- package/dist/ai/fw-draft/roles/developer.xml +18 -0
- package/dist/ai/fw-draft/router.xml +39 -0
- package/dist/ai/fw-draft/routes/development.xml +32 -0
- package/dist/ai/fw-draft/routes/universal.xml +58 -0
- package/dist/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/dist/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/chunks/devtools-B-7ugZhF.js +79 -0
- package/dist/chunks/{help.cmd-CWasx25o.js → help.cmd-B_G7EWzF.js} +9 -2
- package/dist/chunks/{index-Gy1n7hRU.js → index-BeL1Zcbg.js} +1 -1
- package/dist/chunks/index-CVR66voe.js +26963 -0
- package/dist/chunks/index-CXuhZzS3.js +16979 -0
- package/dist/chunks/{index-Bh0p7rJg.js → index-CaahtXiM.js} +33 -9
- package/dist/chunks/{index-BrobNwbS.js → index-CiEM-8nJ.js} +35 -19
- package/dist/chunks/{index-D1Hurfwu.js → index-D1qsi0Uc.js} +57 -33
- package/dist/chunks/index-D9ceRUyB.js +443 -0
- package/dist/chunks/index-DJpVmyp2.js +176 -0
- package/dist/chunks/{index-B3r-YFvt.js → index-DU6jD7SS.js} +1 -1
- package/dist/chunks/index-KxSZKmZn.js +540 -0
- package/dist/chunks/{index-DgAmONSz.js → index-UbHoePfr.js} +12 -12
- package/dist/chunks/{index-Bx_P7mlL.js → index-g1LXlp77.js} +2 -2
- package/dist/chunks/index-zBnnuvLA.js +3788 -0
- package/dist/chunks/{run-review-command.logic-BQDGxh0f.js → run-review-command.logic-DpkRoEi8.js} +2 -2
- package/dist/chunks/services-CaLOhuLV.js +2889 -0
- package/dist/chunks/shared-Bjy30TeM.js +665 -0
- package/dist/cli/cmd/_shared/prompt/io/load-agent-template.io.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-first-knowledge-block.logic.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-verify-placeholders.logic.d.ts +7 -4
- package/dist/cli/cmd/_shared/prompt/logic/verify-commands/resolve-verify-commands.logic.d.ts +5 -0
- package/dist/cli/cmd/_shared/update-check-worker.d.ts +1 -0
- package/dist/cli/cmd/_shared/update-check.d.ts +38 -0
- package/dist/cli/cmd/agent-mon/cmd/create-providers.d.ts +15 -0
- package/dist/cli/cmd/agent-mon/cmd/index.d.ts +1 -0
- package/dist/cli/cmd/agent-mon/cmd/run.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/state/create-state-manager.d.ts +32 -0
- package/dist/cli/cmd/agent-mon/state/group-by-provider.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/state/index.d.ts +5 -0
- package/dist/cli/cmd/agent-mon/state/is-waiting.d.ts +9 -0
- package/dist/cli/cmd/agent-mon/state/view-model.type.d.ts +74 -0
- package/dist/cli/cmd/agent-mon/ui/app.d.ts +16 -0
- package/dist/cli/cmd/agent-mon/ui/column-view.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/index.d.ts +10 -0
- package/dist/cli/cmd/agent-mon/ui/provider-column.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/session-card.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/ui/status-badge.d.ts +10 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-parser.d.ts +18 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-runner.d.ts +32 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.cmd.d.ts +34 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.types.d.ts +88 -0
- package/dist/cli/cmd/alt-opinion/index.d.ts +1 -0
- package/dist/cli/cmd/cat/cat-url.fn.d.ts +19 -0
- package/dist/cli/cmd/lint/checks/anchor.check.d.ts +11 -0
- package/dist/cli/cmd/lint/checks/dbc-contract.check.d.ts +16 -0
- package/dist/cli/cmd/lint/checks/disables.check.d.ts +12 -0
- package/dist/cli/cmd/lint/checks/file-header.check.d.ts +10 -0
- package/dist/cli/cmd/lint/checks/language.check.d.ts +11 -0
- package/dist/cli/cmd/lint/index.d.ts +1 -0
- package/dist/cli/cmd/lint/lint.cmd.d.ts +18 -0
- package/dist/cli/cmd/lint/lint.types.d.ts +72 -0
- package/dist/cli/cmd/lint/utils/resolve-references.fn.d.ts +32 -0
- package/dist/cli/cmd/remote-console/index.d.ts +2 -0
- package/dist/cli/cmd/remote-console/remote-console.cmd.d.ts +55 -0
- package/dist/cli/cmd/resolve-conflicts/_core/io/resolve-conflicts-template-load.io.d.ts +2 -2
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-args-parse.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-run.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-context-git-build.logic.d.ts +4 -4
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-artifact.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-args.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-context-git.type.d.ts +18 -2
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-artifact-build.xml.d.ts +6 -6
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-render.xml.d.ts +4 -4
- package/dist/cli/cmd/review/_core/io/load-review-verify-template.io.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/build-review-context-git.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/build-review-context-vcs.logic.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/load-review-context-mr.logic.d.ts +5 -5
- package/dist/cli/cmd/review/_core/logic/parse-review-command-args.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/resolve-review-intent.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/run-review-command.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/types/review-artifact.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-command-args.type.d.ts +7 -1
- package/dist/cli/cmd/review/_core/types/review-command-mode.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/types/review-command-options.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/review/_core/types/review-context-git.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-context-mr.type.d.ts +22 -3
- package/dist/cli/cmd/review/_core/types/review-context-vcs.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-intent.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/xml/build-review-artifact.xml.d.ts +10 -10
- package/dist/cli/cmd/review/_core/xml/render-review-issues.xml.d.ts +3 -3
- package/dist/cli/cmd/review/_core/xml/render-review-verify.xml.d.ts +4 -4
- package/dist/cli/cmd/sync/index.d.ts +1 -0
- package/dist/cli/cmd/sync/sync-core.d.ts +65 -0
- package/dist/cli/cmd/sync/sync-formatter.d.ts +12 -0
- package/dist/cli/cmd/sync/sync.cmd.d.ts +33 -0
- package/dist/cli/cmd/sync/sync.types.d.ts +50 -0
- package/dist/cli/cmd/vcs-reply/vcs-reply.cmd.d.ts +4 -4
- package/dist/cli/utils/ai-legacy/ai-legacy-agent.d.ts +12 -11
- package/dist/cli/utils/ai-legacy/ai-legacy-core.d.ts +33 -17
- package/dist/cli/utils/ai-legacy/ai-legacy-model.d.ts +42 -23
- package/dist/cli/utils/cat-gen/cat-gen.d.ts +19 -8
- package/dist/cli/utils/commit-gen/commit-gen.d.ts +39 -15
- package/dist/cli/utils/prompts/index.d.ts +6 -6
- package/dist/cli/utils/review-gen/review-gen.d.ts +33 -9
- package/dist/gennady.js +30 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -23
- package/dist/services/agent-mon/diff/diff.d.ts +9 -0
- package/dist/services/agent-mon/diff/index.d.ts +1 -0
- package/dist/services/agent-mon/index.d.ts +10 -0
- package/dist/services/agent-mon/model/agent-provider.type.d.ts +20 -0
- package/dist/services/agent-mon/model/agent-session.type.d.ts +49 -0
- package/dist/services/agent-mon/model/errors.d.ts +20 -0
- package/dist/services/agent-mon/model/index.d.ts +7 -0
- package/dist/services/agent-mon/model/observe-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/scan-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/session-changes.type.d.ts +10 -0
- package/dist/services/agent-mon/monitor/agent-monitor.d.ts +44 -0
- package/dist/services/agent-mon/monitor/create-monitor.d.ts +6 -0
- package/dist/services/agent-mon/monitor/index.d.ts +2 -0
- package/dist/services/agent-mon/observe/index.d.ts +1 -0
- package/dist/services/agent-mon/observe/observe.d.ts +12 -0
- package/dist/services/agent-mon/providers/claude/claude-provider.d.ts +50 -0
- package/dist/services/agent-mon/providers/claude/index.d.ts +5 -0
- package/dist/services/agent-mon/providers/claude/ps.d.ts +36 -0
- package/dist/services/agent-mon/providers/claude/session-json.d.ts +37 -0
- package/dist/services/agent-mon/providers/opencode/db.d.ts +41 -0
- package/dist/services/agent-mon/providers/opencode/index.d.ts +3 -0
- package/dist/services/agent-mon/providers/opencode/model-parser.d.ts +6 -0
- package/dist/services/agent-mon/providers/opencode/opencode-provider.d.ts +45 -0
- package/dist/services/ai-client/providers/ai-model.type.d.ts +14 -0
- package/dist/services/ai-client/providers/open-router/open-router-model.type.d.ts +1 -4
- package/dist/services/ai-client/providers/open-router/open-router-provider.d.ts +17 -0
- package/dist/services/ai-client/providers/openai-like-provider.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.d.ts +17 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.types.d.ts +4 -0
- package/dist/services/data-ore/telegram/telegram-demo-music-helper.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-demo.d.ts +1 -0
- package/dist/services/dbc/linter/dbc-ast-adapter.types.d.ts +82 -0
- package/dist/services/dbc/linter/dbc-linter.types.d.ts +95 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-ast-adapter.d.ts +183 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-linter.d.ts +152 -0
- package/dist/services/dbc/parser/dbc-parser.types.d.ts +16 -16
- package/dist/services/dbc/parser/implementations/jsdoc/dbc-jsdoc-parser.d.ts +14 -4
- package/dist/services/logger/logger.d.ts +26 -6
- package/dist/services/remote-console/client/remote-console-client-serializer.d.ts +7 -0
- package/dist/services/remote-console/client/remote-console-client.d.ts +20 -0
- package/dist/services/remote-console/client/remote-console-client.types.d.ts +88 -0
- package/dist/services/remote-console/remote-console.d.ts +6 -0
- package/dist/services/remote-console/server/remote-console-server.d.ts +10 -0
- package/dist/services/remote-console/server/remote-console-server.types.d.ts +44 -0
- package/dist/services/remote-console/server/remote-console-stdout-writer.d.ts +26 -0
- package/dist/services/vcs-client/abstract/vcs-client-merge-discussions.d.ts +22 -14
- package/dist/services/vcs-client/abstract/vcs-client-merge-requests.d.ts +31 -14
- package/dist/services/vcs-client/abstract/vcs-client-repository-files.d.ts +16 -0
- package/dist/services/vcs-client/abstract/vcs-client.d.ts +9 -5
- package/dist/services/vcs-client/entities/vcs-file-content.type.d.ts +24 -0
- package/dist/services/vcs-client/entities/vcs-merge-request-changes.type.d.ts +32 -0
- package/dist/services/vcs-client/entities/vcs-url.type.d.ts +14 -0
- package/dist/services/vcs-client/entities/vcs-user.type.d.ts +3 -0
- package/dist/services/vcs-client/github/vcs-github-client.d.ts +31 -0
- package/dist/services/vcs-client/github/vcs-github-merge-requests.d.ts +40 -0
- package/dist/services/vcs-client/github/vcs-github-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/gitlab/vcs-gitlab-client.d.ts +13 -4
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-discussions.d.ts +16 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-requests.d.ts +24 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/parse-vcs-url.d.ts +3 -0
- package/dist/shared/backend/git/git-core.d.ts +24 -22
- package/dist/shared/backend/git/git-diff.d.ts +16 -5
- package/dist/shared/backend/rc/rc-config.d.ts +27 -15
- package/dist/shared/common/exec.d.ts +4 -6
- package/dist/shared/common/files.d.ts +1 -3
- package/dist/shared/common/language.d.ts +3 -6
- package/dist/shared/common/parse-args.d.ts +1 -4
- package/dist/shared/common/style.d.ts +3 -3
- package/dist/shared/common/think.d.ts +1 -5
- package/dist/shared/common/tokens.d.ts +1 -5
- package/dist/shared/common/unguard.d.ts +4 -8
- package/dist/shared/common/xml.d.ts +16 -12
- package/package.json +20 -4
- package/dist/.ai/agents/agent-resolve-conflicts.xml +0 -148
- package/dist/.ai/agents/agent-review-verifier.xml +0 -181
- package/dist/chunks/index-C4jt5WBP.js +0 -3548
- package/dist/chunks/services-Sb7TwLxt.js +0 -122
- package/dist/chunks/shared-D0kSJB49.js +0 -601
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@file: Storybook rules for uikit components — hierarchy mirroring spec, play functions with a11y, ai-generated tagging.
|
|
3
|
+
@consumers: SDD agents (story-writing phase of uikit-component tasks)
|
|
4
|
+
@tasks: TSK-26
|
|
5
|
+
-->
|
|
6
|
+
<UiKitComponentStorybook keywords="uikit, storybook, hierarchy, play-function, a11y-audit, ai-generated, spec-mirror" type="testing-rules" ver="1.0">
|
|
7
|
+
<Directive_Context>
|
|
8
|
+
<Mission>
|
|
9
|
+
Canonical rules for writing Storybook stories for uikit components. Every execution-agent MUST apply these conventions when creating or modifying `.stories.ts` files. These rules are LAYERED ON TOP of `storybook-usage.xml` — the base Storybook rules are prerequisites; this directive adds uikit-specific hierarchy, play-function, and a11y-audit constraints derived from the first component (Button).
|
|
10
|
+
|
|
11
|
+
**Base axiom:** Storybook is the executable mirror of the component spec. The story hierarchy IS the spec's variant hierarchy — not invented by the developer, not rearranged for convenience. Every story carries a `play` function that asserts visual and a11y contracts. The agent writes stories by reading the spec, not by guessing props.
|
|
12
|
+
|
|
13
|
+
You are NOT in charge of:
|
|
14
|
+
- Retrieving component documentation via MCP (delegated to `storybook-usage.xml`);
|
|
15
|
+
- The Svelte component implementation (delegated to `uikit-component-svelte.xml`);
|
|
16
|
+
- Storybook installation/setup (delegated to `storybook-setup.xml`).
|
|
17
|
+
</Mission>
|
|
18
|
+
</Directive_Context>
|
|
19
|
+
|
|
20
|
+
<Depends_On>
|
|
21
|
+
- ai/directives/testing/storybook-usage.xml
|
|
22
|
+
- ai/directives/coding/uikit-component-svelte.xml
|
|
23
|
+
</Depends_On>
|
|
24
|
+
|
|
25
|
+
<Belief_State>
|
|
26
|
+
<Axiom id="AX_HIERARCHY_MIRRORS_SPEC">
|
|
27
|
+
The Storybook sidebar hierarchy is a direct mirror of the spec's Variants table structure. For Button, the hierarchy is:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Button / Appearance / Mode
|
|
31
|
+
├── Accent
|
|
32
|
+
│ ├── Primary
|
|
33
|
+
│ │ ├── Small Normal
|
|
34
|
+
│ │ ├── Small Hover
|
|
35
|
+
│ │ ├── Small Active
|
|
36
|
+
│ │ ├── Small Disabled
|
|
37
|
+
│ │ ├── Medium Normal
|
|
38
|
+
│ │ └── ...
|
|
39
|
+
│ ├── Secondary
|
|
40
|
+
│ ├── Tertiary
|
|
41
|
+
│ └── Outline
|
|
42
|
+
├── Neutral
|
|
43
|
+
└── Contrary
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Title format: `ComponentName/Appearance/Mode` (e.g. `Button/Accent/Primary`). The spec's Variants table is the single source of truth for the hierarchy — every `(appearance, mode, size, state)` combination maps to exactly one story. No "convenience" groupings that collapse size or state, no ad-hoc categories.
|
|
47
|
+
|
|
48
|
+
The `title` field in `export default` sets the hierarchy root: `title: 'Button/Accent/Primary'` groups all stories for that appearance+mode under that sidebar node. Each size×state combination becomes a named export within that group.
|
|
49
|
+
</Axiom>
|
|
50
|
+
|
|
51
|
+
<Axiom id="AX_ONE_STORY_PER_VARIANT">
|
|
52
|
+
Each variant from the spec's Variants table becomes ONE story. A story name follows the pattern `<Size> <State>` (e.g. `SmallNormal`, `MediumHover`, `LargeDisabled`). The story's `args` encode the variant parameters:
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
export const SmallNormal: Story = {
|
|
56
|
+
args: {
|
|
57
|
+
appearance: 'accent',
|
|
58
|
+
mode: 'primary',
|
|
59
|
+
size: 's',
|
|
60
|
+
state: 'normal',
|
|
61
|
+
label: 'Button',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The `args` object must contain ALL variant parameters (appearance, mode, size, state) plus all optional props (label, icon, counter, indicator, disabled). No parameter is omitted — the story is self-describing. When `disabled: true`, `state` is set to `disabled` as well (the component resolves precedence, but the story is explicit).
|
|
67
|
+
</Axiom>
|
|
68
|
+
|
|
69
|
+
<Axiom id="AX_PLAY_FUNCTION_REQUIRED">
|
|
70
|
+
Every story MUST have a `play` function. The `play` function performs these assertions, in order:
|
|
71
|
+
|
|
72
|
+
1. **Role assertion:** `canvas.getByRole('button')` (or the component's correct role).
|
|
73
|
+
2. **Data-attribute assertion:** `expect(element).toHaveAttribute('data-state', expectedState)`.
|
|
74
|
+
3. **A11y audit:** `parameters: { a11y: { test: 'error' } }` — axe-core runs automatically; any violation fails the story.
|
|
75
|
+
4. **Visual contract:** for state-dependent stories (e.g. hover), `expect(element).toHaveStyle(...)` for critical properties (background, opacity).
|
|
76
|
+
|
|
77
|
+
Template:
|
|
78
|
+
```typescript
|
|
79
|
+
export const SmallNormal: Story = {
|
|
80
|
+
args: { appearance: 'accent', mode: 'primary', size: 's', state: 'normal', label: 'Button' },
|
|
81
|
+
parameters: { a11y: { test: 'error' } },
|
|
82
|
+
play: async ({ canvasElement, step }) => {
|
|
83
|
+
const canvas = within(canvasElement);
|
|
84
|
+
await step('Renders with correct role and state', async () => {
|
|
85
|
+
const btn = canvas.getByRole('button');
|
|
86
|
+
await expect(btn).toBeInTheDocument();
|
|
87
|
+
await expect(btn).toHaveAttribute('data-state', 'normal');
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`within`, `expect`, `userEvent` are imported from `@storybook/test`. `step` is provided by the Storybook test runner. No Vitest-specific imports.
|
|
94
|
+
</Axiom>
|
|
95
|
+
|
|
96
|
+
<Axiom id="AX_A11Y_AUDIT_PARAMETERS">
|
|
97
|
+
Every story carries `parameters: { a11y: { test: 'error' } }`. This enables the `@storybook/addon-a11y` to run axe-core automatically during `run-story-tests`. A violation at `error` level fails the story run.
|
|
98
|
+
|
|
99
|
+
The parameter can be set at the `meta` level to apply to all stories:
|
|
100
|
+
```typescript
|
|
101
|
+
const meta: Meta<typeof Button> = {
|
|
102
|
+
component: Button,
|
|
103
|
+
tags: ['autodocs'],
|
|
104
|
+
parameters: { a11y: { test: 'error' } },
|
|
105
|
+
};
|
|
106
|
+
```
|
|
107
|
+
Individual stories can override with stricter config but never less strict.
|
|
108
|
+
</Axiom>
|
|
109
|
+
|
|
110
|
+
<Axiom id="AX_AI_GENERATED_TAG">
|
|
111
|
+
Every agent-authored story file carries the `'ai-generated'` tag. This applies at the `meta` level and propagates to all stories:
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
const meta: Meta<typeof Button> = {
|
|
115
|
+
component: Button,
|
|
116
|
+
tags: ['autodocs', 'ai-generated'],
|
|
117
|
+
};
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
When composing with an existing story, the new story adds `'ai-generated'` to its own `tags` array. The base story's tags are not modified.
|
|
121
|
+
</Axiom>
|
|
122
|
+
|
|
123
|
+
<Axiom id="AX_COMPOSE_FROM_BASE_STORY">
|
|
124
|
+
New stories compose their `args` from the closest base story rather than restating the full args map:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
export const SmallHover: Story = {
|
|
128
|
+
args: { ...SmallNormal.args, state: 'hover' },
|
|
129
|
+
play: async ({ canvasElement, step }) => { /* ... */ },
|
|
130
|
+
};
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
This keeps the base variant as the single source of truth for shared args. When the base changes (e.g. a new prop added), all composed stories pick it up automatically.
|
|
134
|
+
</Axiom>
|
|
135
|
+
|
|
136
|
+
<Axiom id="AX_IMPORT_CANONICAL_FORM">
|
|
137
|
+
Imports in `.stories.ts` follow a fixed order:
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
import type { Meta, StoryObj } from '@storybook/svelte';
|
|
141
|
+
import { expect, within } from '@storybook/test';
|
|
142
|
+
import Button from './button.svelte';
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
1. Storybook Svelte framework types.
|
|
146
|
+
2. Storybook test utilities (`expect`, `within`, optionally `userEvent`).
|
|
147
|
+
3. The component under test (kebab-case import path).
|
|
148
|
+
4. No other imports unless explicitly required by the story logic.
|
|
149
|
+
</Axiom>
|
|
150
|
+
|
|
151
|
+
<Axiom id="AX_STORYBOOK_TITLE_FROM_SPEC">
|
|
152
|
+
The story title is derived from the spec's component name and variant hierarchy, not invented:
|
|
153
|
+
|
|
154
|
+
For Button, variants are grouped by `(appearance, mode)`. The story file organizes stories into title groups matching this grouping. A single `.stories.ts` file can export multiple `meta` objects (using named exports) to group stories under different titles, OR a single file groups all stories under a common root and uses story names for differentiation.
|
|
155
|
+
|
|
156
|
+
Preferred pattern for uikit: one `.stories.ts` file per component. Stories are organized by exporting a single `meta` with a root title like `'Button'`, and story names encode the variant: `AccentPrimarySmallNormal`, `AccentPrimarySmallHover`, etc. The Storybook sidebar auto-groups by title segments.
|
|
157
|
+
|
|
158
|
+
Alternative (used in Button spec examples): multiple `export default` in separate files, or named exports with different titles. Either pattern is acceptable as long as the hierarchy matches the spec.
|
|
159
|
+
</Axiom>
|
|
160
|
+
</Belief_State>
|
|
161
|
+
|
|
162
|
+
<Definitions>
|
|
163
|
+
<Definition id="DEF_SPEC_MIRROR_HIERARCHY">
|
|
164
|
+
The Storybook sidebar tree that is a 1:1 reflection of the spec's Variants table. Hierarchy format: `ComponentName / Appearance / Mode`. Every leaf is a `Size × State` story.
|
|
165
|
+
</Definition>
|
|
166
|
+
<Definition id="DEF_PLAY_CONTRACT">
|
|
167
|
+
The mandatory `play` function in every story that asserts: (1) correct ARIA role via `getByRole`, (2) correct `data-state` attribute via `toHaveAttribute`, (3) a11y violations via axe-core parameters. Combined, these three assertions form the executable component contract.
|
|
168
|
+
</Definition>
|
|
169
|
+
</Definitions>
|
|
170
|
+
|
|
171
|
+
<Code_Patterns>
|
|
172
|
+
<Pattern id="PT_CANONICAL_STORIES_FILE">
|
|
173
|
+
<Intent>Complete canonical `.stories.ts` file for a uikit Button component.</Intent>
|
|
174
|
+
<Snippet language="typescript">
|
|
175
|
+
```typescript
|
|
176
|
+
import type { Meta, StoryObj } from '@storybook/svelte';
|
|
177
|
+
import { expect, within } from '@storybook/test';
|
|
178
|
+
import Button from './button.svelte';
|
|
179
|
+
|
|
180
|
+
const meta: Meta<typeof Button> = {
|
|
181
|
+
component: Button,
|
|
182
|
+
tags: ['autodocs', 'ai-generated'],
|
|
183
|
+
parameters: { a11y: { test: 'error' } },
|
|
184
|
+
};
|
|
185
|
+
export default meta;
|
|
186
|
+
|
|
187
|
+
type Story = StoryObj<typeof meta>;
|
|
188
|
+
|
|
189
|
+
// Accent / Primary / Small
|
|
190
|
+
export const AccentPrimarySmallNormal: Story = {
|
|
191
|
+
args: {
|
|
192
|
+
appearance: 'accent',
|
|
193
|
+
mode: 'primary',
|
|
194
|
+
size: 's',
|
|
195
|
+
state: 'normal',
|
|
196
|
+
label: 'Button',
|
|
197
|
+
},
|
|
198
|
+
play: async ({ canvasElement, step }) => {
|
|
199
|
+
const canvas = within(canvasElement);
|
|
200
|
+
await step('Renders button with correct role and state', async () => {
|
|
201
|
+
const btn = canvas.getByRole('button');
|
|
202
|
+
await expect(btn).toBeInTheDocument();
|
|
203
|
+
await expect(btn).toHaveAttribute('data-state', 'normal');
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export const AccentPrimarySmallHover: Story = {
|
|
209
|
+
args: { ...AccentPrimarySmallNormal.args, state: 'hover' },
|
|
210
|
+
play: async ({ canvasElement, step }) => {
|
|
211
|
+
const canvas = within(canvasElement);
|
|
212
|
+
await step('Renders hover state with correct attribute', async () => {
|
|
213
|
+
const btn = canvas.getByRole('button');
|
|
214
|
+
await expect(btn).toHaveAttribute('data-state', 'hover');
|
|
215
|
+
});
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
export const AccentPrimarySmallActive: Story = {
|
|
220
|
+
args: { ...AccentPrimarySmallNormal.args, state: 'active' },
|
|
221
|
+
play: async ({ canvasElement, step }) => {
|
|
222
|
+
const canvas = within(canvasElement);
|
|
223
|
+
await step('Renders active state with correct attribute and aria-pressed', async () => {
|
|
224
|
+
const btn = canvas.getByRole('button');
|
|
225
|
+
await expect(btn).toHaveAttribute('data-state', 'active');
|
|
226
|
+
});
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export const AccentPrimarySmallDisabled: Story = {
|
|
231
|
+
args: { ...AccentPrimarySmallNormal.args, state: 'disabled', disabled: true },
|
|
232
|
+
play: async ({ canvasElement, step }) => {
|
|
233
|
+
const canvas = within(canvasElement);
|
|
234
|
+
await step('Renders disabled state with aria-disabled', async () => {
|
|
235
|
+
const btn = canvas.getByRole('button');
|
|
236
|
+
await expect(btn).toHaveAttribute('data-state', 'disabled');
|
|
237
|
+
await expect(btn).toHaveAttribute('aria-disabled', 'true');
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
```
|
|
242
|
+
</Snippet>
|
|
243
|
+
<Why>One file per component; `meta` with `ai-generated` tag and a11y error-level; stories compose from base; every story has `play` with `getByRole` and `toHaveAttribute`; variant params are explicit; kebab-case import path.</Why>
|
|
244
|
+
</Pattern>
|
|
245
|
+
|
|
246
|
+
<Pattern id="PT_STORY_WITH_VISUAL_CONTRACT">
|
|
247
|
+
<Intent>Story with visual style assertion for state-dependent rendering.</Intent>
|
|
248
|
+
<Snippet language="typescript">
|
|
249
|
+
```typescript
|
|
250
|
+
export const AccentPrimarySmallHover: Story = {
|
|
251
|
+
args: { ...AccentPrimarySmallNormal.args, state: 'hover' },
|
|
252
|
+
play: async ({ canvasElement, step }) => {
|
|
253
|
+
const canvas = within(canvasElement);
|
|
254
|
+
const btn = canvas.getByRole('button');
|
|
255
|
+
await step('Hover state has correct background', async () => {
|
|
256
|
+
await expect(btn).toHaveAttribute('data-state', 'hover');
|
|
257
|
+
await expect(btn).toHaveStyle({ background: 'rgb(0, 115, 247)' });
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
```
|
|
262
|
+
</Snippet>
|
|
263
|
+
<Why>Adds `toHaveStyle` assertion on top of the role+attribute baseline. Background color values come from the spec's BDD scenarios (hex → rgb conversion for jsdom). Only add when the spec specifies an exact color; don't fabricate colors.</Why>
|
|
264
|
+
</Pattern>
|
|
265
|
+
</Code_Patterns>
|
|
266
|
+
|
|
267
|
+
<Anti_Patterns>
|
|
268
|
+
<Anti_Pattern id="AP_ADHOC_HIERARCHY">
|
|
269
|
+
<Bad>Story title `'Components/Button'` or `'UI/Button/Primary'` — hierarchy invented by developer.</Bad>
|
|
270
|
+
<Why_Bad>Hierarchy not derived from spec (`AX_HIERARCHY_MIRRORS_SPEC`). When the spec adds a new appearance, the developer must manually reorganize stories. The spec and Storybook drift apart silently.</Why_Bad>
|
|
271
|
+
<Good>Title `'Button/Accent/Primary'` — matches spec's Variants table columns. Adding a new appearance is a mechanical addition of one title group.</Good>
|
|
272
|
+
</Anti_Pattern>
|
|
273
|
+
|
|
274
|
+
<Anti_Pattern id="AP_MISSING_PLAY">
|
|
275
|
+
<Bad>Story has `args: { ... }` but no `play` function.</Bad>
|
|
276
|
+
<Why_Bad>Play function required by `AX_PLAY_FUNCTION_REQUIRED`. Without `play`, `run-story-tests` passes trivially without asserting any contract. The story is documentation, not an executable spec mirror.</Why_Bad>
|
|
277
|
+
<Good>Every story has `play` with `getByRole` + `toHaveAttribute('data-state', ...)` at minimum.</Good>
|
|
278
|
+
</Anti_Pattern>
|
|
279
|
+
|
|
280
|
+
<Anti_Pattern id="AP_MISSING_A11Y_AUDIT">
|
|
281
|
+
<Bad>Story or meta lacks `parameters: { a11y: { test: 'error' } }`.</Bad>
|
|
282
|
+
<Why_Bad>A11y audit not configured (`AX_A11Y_AUDIT_PARAMETERS`). axe-core does not run during `run-story-tests`; a11y violations (missing labels, wrong contrast, invalid roles) pass silently.</Why_Bad>
|
|
283
|
+
<Good>Add `parameters: { a11y: { test: 'error' } }` to `meta` (applies to all stories) or to each individual story.</Good>
|
|
284
|
+
</Anti_Pattern>
|
|
285
|
+
|
|
286
|
+
<Anti_Pattern id="AP_RESTATED_ARGS">
|
|
287
|
+
<Bad>`SmallHover` story restates all args from `SmallNormal` instead of composing.</Bad>
|
|
288
|
+
<Why_Bad>Args restated instead of composed (`AX_COMPOSE_FROM_BASE_STORY`). When `SmallNormal` gains a new prop, `SmallHover` silently falls behind without any test pointing at the drift.</Why_Bad>
|
|
289
|
+
<Good>`args: { ...SmallNormal.args, state: 'hover' }` — composition makes the diff visible.</Good>
|
|
290
|
+
</Anti_Pattern>
|
|
291
|
+
|
|
292
|
+
<Anti_Pattern id="AP_MULTIPLE_CONCEPTS_ONE_STORY">
|
|
293
|
+
<Bad>One story named `AccentPrimaryAllSizes` with `play` that loops over sizes and asserts all of them.</Bad>
|
|
294
|
+
<Why_Bad>Multiple concepts in one story. When a test fails, the failure message says which size broke but the story name doesn't identify which variant the story was testing. The spec demands one story per variant.</Why_Bad>
|
|
295
|
+
<Good>Separate stories: `AccentPrimarySmallNormal`, `AccentPrimaryMediumNormal`, `AccentPrimaryLargeNormal`. Each fails independently.</Good>
|
|
296
|
+
</Anti_Pattern>
|
|
297
|
+
|
|
298
|
+
<Anti_Pattern id="AP_SKIP_INSTEAD_OF_FIX">
|
|
299
|
+
<Bad>Failing story is marked `.skip` or deleted to make `run-story-tests` green.</Bad>
|
|
300
|
+
<Why_Bad>Failure silenced instead of fixed. The story was the canary for a real bug — skipping it buries the bug. The self-verification loop is now blind to that variant.</Why_Bad>
|
|
301
|
+
<Good>Fix the component or the story, re-run until green. If the failure is environment-dependent, surface as a blocker with deferred-ownership reference.</Good>
|
|
302
|
+
</Anti_Pattern>
|
|
303
|
+
</Anti_Patterns>
|
|
304
|
+
|
|
305
|
+
<Verification_Hooks>
|
|
306
|
+
<Hook id="HOOK_SB_RUN_STORY_TESTS">
|
|
307
|
+
<Purpose>Run all story tests for the component file. Green run = stories pass type-check, render, and their `play` assertions succeed.</Purpose>
|
|
308
|
+
<Command>npm run test-storybook -- --url http://localhost:6006</Command>
|
|
309
|
+
<Expected>Exit 0; all stories pass. Non-zero requires fix or explicit deferred-ownership reference.</Expected>
|
|
310
|
+
</Hook>
|
|
311
|
+
<Hook id="HOOK_SB_PLAY_PRESENT">
|
|
312
|
+
<Purpose>Verify every exported story has a `play` function.</Purpose>
|
|
313
|
+
<Command>find src/ui -name '*.stories.ts' -not -path '*/node_modules/*' -print0 | xargs -0 grep -l 'play:' || echo MISSING_PLAY</Command>
|
|
314
|
+
<Expected>Every `.stories.ts` file must appear. `MISSING_PLAY` means some file has no `play` function.</Expected>
|
|
315
|
+
</Hook>
|
|
316
|
+
<Hook id="HOOK_SB_A11Y_AUDIT_CONFIG">
|
|
317
|
+
<Purpose>Verify a11y audit is configured at `error` level.</Purpose>
|
|
318
|
+
<Command>find src/ui -name '*.stories.ts' -not -path '*/node_modules/*' -print0 | xargs -0 grep -l "a11y.*test.*error" || echo MISSING_A11Y</Command>
|
|
319
|
+
<Expected>Every `.stories.ts` file must appear. `MISSING_A11Y` means a11y audit is not configured.</Expected>
|
|
320
|
+
</Hook>
|
|
321
|
+
<Hook id="HOOK_SB_AI_TAG_PRESENT">
|
|
322
|
+
<Purpose>Verify 'ai-generated' tag is present in every stories file.</Purpose>
|
|
323
|
+
<Command>find src/ui -name '*.stories.ts' -not -path '*/node_modules/*' -print0 | xargs -0 grep -l "'ai-generated'" || echo MISSING_TAG</Command>
|
|
324
|
+
<Expected>Every `.stories.ts` file must appear. `MISSING_TAG` means the reserved tag is absent.</Expected>
|
|
325
|
+
</Hook>
|
|
326
|
+
</Verification_Hooks>
|
|
327
|
+
|
|
328
|
+
<Reward_Criteria>
|
|
329
|
+
✅ Storybook hierarchy is a 1:1 mirror of the spec's Variants table — `ComponentName / Appearance / Mode`.
|
|
330
|
+
✅ One story per variant combination (size × state); story name = `<Size><State>`.
|
|
331
|
+
✅ Every story has a `play` function asserting role via `getByRole` and state via `toHaveAttribute('data-state', ...)`.
|
|
332
|
+
✅ A11y audit enabled at `error` level for all stories.
|
|
333
|
+
✅ `'ai-generated'` tag present on `meta` or on each agent-authored story.
|
|
334
|
+
✅ New stories compose args from the closest base story.
|
|
335
|
+
✅ Imports follow canonical order: Storybook types → test utilities → component.
|
|
336
|
+
✅ All stories pass `run-story-tests` before handoff.
|
|
337
|
+
|
|
338
|
+
❌ Hierarchy invented by developer (not matching spec).
|
|
339
|
+
❌ Story without `play` function.
|
|
340
|
+
❌ Missing a11y audit configuration.
|
|
341
|
+
❌ Missing `'ai-generated'` tag.
|
|
342
|
+
❌ Args restated instead of composed.
|
|
343
|
+
❌ Multiple variants collapsed into one story.
|
|
344
|
+
❌ Failing story skipped or deleted instead of fixed.
|
|
345
|
+
❌ `run-story-tests` not executed before handoff.
|
|
346
|
+
</Reward_Criteria>
|
|
347
|
+
</UiKitComponentStorybook>
|