gennady 0.6.0 → 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-B63fYXL2.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-B5bA2T7A.js → index-CaahtXiM.js} +33 -9
- package/dist/chunks/{index-iqg0w_pE.js → index-CiEM-8nJ.js} +35 -19
- package/dist/chunks/{index-B4m0-PAT.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-C0andxna.js → index-DU6jD7SS.js} +1 -1
- package/dist/chunks/index-KxSZKmZn.js +540 -0
- package/dist/chunks/{index-Dqe1TdW4.js → index-UbHoePfr.js} +12 -12
- package/dist/chunks/{index-5xIgwwKx.js → index-g1LXlp77.js} +2 -2
- package/dist/chunks/index-zBnnuvLA.js +3788 -0
- package/dist/chunks/{run-review-command.logic-a_M3CkeZ.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-review-verifier.xml +0 -181
- package/dist/chunks/index-CNbmXK8M.js +0 -3548
- package/dist/chunks/services-Sb7TwLxt.js +0 -122
- package/dist/chunks/shared-BgLzFWMH.js +0 -577
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
<SddSetup keywords="setup, project-init, portal, scope-graph, vision, infra-bootstrap, idempotent, sdd-project-setup" type="directive" ver="1.1">
|
|
2
|
+
<Directive_Context>
|
|
3
|
+
<Mission>
|
|
4
|
+
Primary owner of `specs/README.md` — Project Vision and Scope Graph. Idempotent: runs any number of times to refine vision, extend the scope graph, or bootstrap the first infra-base spec.
|
|
5
|
+
|
|
6
|
+
Input — operator intent (what we create / what we change at project level).
|
|
7
|
+
Output:
|
|
8
|
+
- `specs/README.md` with Vision + Scope Graph + Scopes table.
|
|
9
|
+
- Optional: a minimal `specs/infra-base/infra-base.spec.md` (first infra-scope bootstrap) if the operator declared tooling.
|
|
10
|
+
|
|
11
|
+
Out of scope: details of any individual scope (its vision, architecture, requirements, modules) — that is the job of `discovery`. `setup` writes only the project-level map.
|
|
12
|
+
|
|
13
|
+
**Glossary.** scope-type ∈ {infrastructure, contracts, library, product}. Scope Graph = directed graph; edge A→B = «scope A depends on scope B (consumes its rules / contracts)».
|
|
14
|
+
</Mission>
|
|
15
|
+
</Directive_Context>
|
|
16
|
+
|
|
17
|
+
<Belief_State>
|
|
18
|
+
<Axiom id="AX_PORTAL_PRIMARY_OWNER">
|
|
19
|
+
`setup` is the primary owner of `specs/README.md`. Other directives MUST NOT rewrite this file. Reads are unrestricted.
|
|
20
|
+
|
|
21
|
+
Explicit, narrow exceptions (append-only edits permitted, no rewrites):
|
|
22
|
+
- `discovery` creating a brand-new scope MAY append a placeholder row to the Scopes table tagged `🚧 (awaiting setup sync)` so the new scope is visible in the Portal before the next `setup` run.
|
|
23
|
+
- `module-decomposition` MUST NOT touch this file; its Portal-level summaries are appended only to its scope spec.
|
|
24
|
+
|
|
25
|
+
Any other edit by another directive → audit finding `STALE_AFTER_PIVOT` or `EXECUTION_LOG_INCOMPLETE` depending on context. The next `setup` run reconciles placeholders into full rows.
|
|
26
|
+
</Axiom>
|
|
27
|
+
|
|
28
|
+
<Axiom id="AX_IDEMPOTENT_MODES">
|
|
29
|
+
`setup` has no hard modes (no greenfield / extension / pivot).
|
|
30
|
+
- Portal absent → create from scratch.
|
|
31
|
+
- Portal present → read and propose updates derived from intake; operator dictates what to change.
|
|
32
|
+
|
|
33
|
+
No silent assumptions: empty intake against an existing Portal → HALT `H_NO_INTENT` («what are we changing today?»).
|
|
34
|
+
</Axiom>
|
|
35
|
+
|
|
36
|
+
<Axiom id="AX_SCOPE_GRAPH_DISCIPLINE">
|
|
37
|
+
Scope Graph is a directed dependency graph. Rules:
|
|
38
|
+
- Edge A→B means «scope A depends-on scope B»: A inherits B's effective rules in the cascade and may consume B's contracts.
|
|
39
|
+
- Cycle in the graph → `H_CYCLE_IN_GRAPH` (abort).
|
|
40
|
+
- scope-type constraints: `infrastructure` and `contracts` scopes are typically leaves (depend only on other infra / contracts). `product` and `library` scopes depend on infra + contracts.
|
|
41
|
+
- The graph is rendered as a Mermaid `graph TD` block inside the Portal.
|
|
42
|
+
</Axiom>
|
|
43
|
+
|
|
44
|
+
<Axiom id="AX_INFRA_BASE_BOOTSTRAP">
|
|
45
|
+
If the operator declares basic tooling (package manager, type-checker, linter) in intake, `setup` materializes a minimal `specs/infra-base/infra-base.spec.md` with scope-type=infrastructure: Vision (one sentence) + Tool Stack (table with tool names only, no Decision Log yet). The full Decision Log appears when the operator runs `discovery infra-base`.
|
|
46
|
+
|
|
47
|
+
The minimal bootstrap intentionally bypasses the full `discovery` flow — it only locks the tool choice without the Design Variants ritual.
|
|
48
|
+
</Axiom>
|
|
49
|
+
|
|
50
|
+
<Axiom id="AX_SCOPE_TABLE_FORMAT">
|
|
51
|
+
Scopes table in the Portal: each row = link to the scope spec + scope-type + status emoji + one-line description.
|
|
52
|
+
- ✅ — spec exists and is approved.
|
|
53
|
+
- 🚧 — spec being authored / `discovery` not yet run.
|
|
54
|
+
- Status is derived purely from the presence of `specs/<scope>/<scope>.spec.md`.
|
|
55
|
+
</Axiom>
|
|
56
|
+
|
|
57
|
+
<Axiom id="AX_VISION_ONLY_FOR_APPLICATION">
|
|
58
|
+
The `## Vision` section in the Portal is present only when the project contains at least one product or library scope. For tooling-only repos (sandboxes, infra repos) the Vision section is omitted.
|
|
59
|
+
</Axiom>
|
|
60
|
+
|
|
61
|
+
<Axiom id="AX_DIALOGUE_DISCIPLINE">
|
|
62
|
+
- Neutrality: no auto-agree. Every proposed scope must pass the «scope vs module» test.
|
|
63
|
+
- If the operator labels as «scope» something that is obviously a module inside an existing scope, surface this and propose adding it as a module via `module-decomposition`.
|
|
64
|
+
- Phase agreement: agent signals `STATUS=READY_TO_ADVANCE`; operator confirms.
|
|
65
|
+
</Axiom>
|
|
66
|
+
|
|
67
|
+
<Axiom id="AX_OPERATOR_LANGUAGE">
|
|
68
|
+
**Directive prose (axioms, halt names, step procedures, contract identifiers, structural section headings) — English.**
|
|
69
|
+
**Operator-facing artifact prose and operator-facing messages — Russian.** Russian applies to:
|
|
70
|
+
- Portal body text inside `specs/README.md` (Vision, Scope descriptions in the table, Notes).
|
|
71
|
+
- Minimal infra-base spec body (Vision sentence, table cell content beyond identifiers).
|
|
72
|
+
- Halt messages emitted to the operator.
|
|
73
|
+
- Phase Progress free-text fields.
|
|
74
|
+
|
|
75
|
+
English regardless of context: file paths, axiom IDs (`AX_*`), Trace anchors (`SU_R<N>`), status tokens, scope-type tokens, section identifiers (`Vision`), Mermaid graph IDs.
|
|
76
|
+
</Axiom>
|
|
77
|
+
|
|
78
|
+
<Axiom id="AX_STATELESS_ARTIFACT">
|
|
79
|
+
`specs/README.md` is self-contained. The next session reads only that file, without conversation history.
|
|
80
|
+
</Axiom>
|
|
81
|
+
</Belief_State>
|
|
82
|
+
|
|
83
|
+
<Halt_Conditions>
|
|
84
|
+
| 🛑 ID | Trigger |
|
|
85
|
+
|---|---|
|
|
86
|
+
| `H_NO_INTENT` | Operator invoked `setup` with an empty intake against an existing Portal |
|
|
87
|
+
| `H_CYCLE_IN_GRAPH` | Scope Graph contains a cycle |
|
|
88
|
+
| `H_SCOPE_VS_MODULE_AMBIGUITY` | Operator labels as «scope» something that resembles a module — clarification required |
|
|
89
|
+
| `H_OPERATOR_REJECT` | Operator rejected Vision, Scope Graph, or the final Portal |
|
|
90
|
+
</Halt_Conditions>
|
|
91
|
+
|
|
92
|
+
<Execution_Plan>
|
|
93
|
+
<Step id="STEP_0_INTAKE">
|
|
94
|
+
<Goal>Inspect Portal; determine today's change set.</Goal>
|
|
95
|
+
<Action>
|
|
96
|
+
1. Stat `specs/README.md`:
|
|
97
|
+
- Absent → init mode (build from scratch). Ask the operator: «Как называется проект? Опиши в одном предложении его vision и первые scope'ы (infra-base, backend, web — на черновую).»
|
|
98
|
+
- Present → read in full. Empty intake → `H_NO_INTENT`. Otherwise classify the change: vision / add scope / update graph / infra bootstrap.
|
|
99
|
+
2. Proceed to STEP_1.
|
|
100
|
+
</Action>
|
|
101
|
+
</Step>
|
|
102
|
+
|
|
103
|
+
<Step id="STEP_1_VISION">
|
|
104
|
+
<Goal>Lock the project-level Vision.</Goal>
|
|
105
|
+
<Action>
|
|
106
|
+
1. If the project has no product / library scopes → skip Vision (per `AX_VISION_ONLY_FOR_APPLICATION`).
|
|
107
|
+
2. Propose Vision (one sentence): what we build and which problem it solves.
|
|
108
|
+
3. Approval Check. STOP.
|
|
109
|
+
</Action>
|
|
110
|
+
</Step>
|
|
111
|
+
|
|
112
|
+
<Step id="STEP_2_SCOPE_GRAPH">
|
|
113
|
+
<Goal>Capture scopes and their dependency edges.</Goal>
|
|
114
|
+
<Action>
|
|
115
|
+
1. For each scope from the operator:
|
|
116
|
+
a. Propose scope-type with rationale.
|
|
117
|
+
b. Run the «scope vs module» test; surface mismatches.
|
|
118
|
+
c. Naming convention: `infra-*` / `design-system-*` / `api-contracts` / plain.
|
|
119
|
+
2. Capture `depends-on` edges.
|
|
120
|
+
3. Cycle check → `H_CYCLE_IN_GRAPH`.
|
|
121
|
+
4. Render the Mermaid graph.
|
|
122
|
+
5. Approval Check. STOP.
|
|
123
|
+
</Action>
|
|
124
|
+
</Step>
|
|
125
|
+
|
|
126
|
+
<Step id="STEP_3_INFRA_BOOTSTRAP">
|
|
127
|
+
<Goal>If the operator declared tooling — materialize the minimal infra-base spec.</Goal>
|
|
128
|
+
<Action>
|
|
129
|
+
1. No tooling declared → skip.
|
|
130
|
+
2. Create `specs/infra-base/infra-base.spec.md` with:
|
|
131
|
+
- scope-type: infrastructure
|
|
132
|
+
- Vision: one sentence about dev experience.
|
|
133
|
+
- Tool Stack: table of tools (no Decision Log yet).
|
|
134
|
+
- Note: «Полный Decision Log — запусти `discovery infra-base`».
|
|
135
|
+
3. Approval Check. STOP.
|
|
136
|
+
</Action>
|
|
137
|
+
</Step>
|
|
138
|
+
|
|
139
|
+
<Step id="STEP_4_PORTAL_WRITE">
|
|
140
|
+
<Goal>Write / update `specs/README.md`.</Goal>
|
|
141
|
+
<Action>
|
|
142
|
+
1. Assemble Portal per `PORTAL_STRUCTURE_CONTRACT`.
|
|
143
|
+
2. For each scope: stat `specs/<scope>/<scope>.spec.md` → status ✅ or 🚧.
|
|
144
|
+
3. Reconcile any placeholder rows left by `discovery` (per `AX_PORTAL_PRIMARY_OWNER`) into full rows.
|
|
145
|
+
4. Write the file.
|
|
146
|
+
5. Approval Check. STOP.
|
|
147
|
+
</Action>
|
|
148
|
+
</Step>
|
|
149
|
+
</Execution_Plan>
|
|
150
|
+
|
|
151
|
+
<Output_Contracts>
|
|
152
|
+
<Contract id="TRACE_HEADER_FORMAT">
|
|
153
|
+
```text
|
|
154
|
+
🗺️ SU_R<N> | STACK: ROOT__<STEP> | <STATUS> | CONF: <LOW|MEDIUM|HIGH>
|
|
155
|
+
🎯 GOAL: <local goal>
|
|
156
|
+
⏭️ EXIT: <exit condition>
|
|
157
|
+
```
|
|
158
|
+
</Contract>
|
|
159
|
+
|
|
160
|
+
<Contract id="PORTAL_STRUCTURE_CONTRACT">
|
|
161
|
+
```markdown
|
|
162
|
+
# <project-name>
|
|
163
|
+
|
|
164
|
+
## Vision
|
|
165
|
+
<Одно предложение. Опускается для infrastructure-only проектов.>
|
|
166
|
+
|
|
167
|
+
## Scope Graph
|
|
168
|
+
|
|
169
|
+
```mermaid
|
|
170
|
+
graph TD
|
|
171
|
+
backend --> infra-base
|
|
172
|
+
backend --> api-contracts
|
|
173
|
+
web --> infra-base
|
|
174
|
+
web --> api-contracts
|
|
175
|
+
web --> design-system-core
|
|
176
|
+
mobile --> api-contracts
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Scopes
|
|
180
|
+
|
|
181
|
+
| Scope | Type | Spec | Description |
|
|
182
|
+
|---|---|---|---|
|
|
183
|
+
| [`infra-base`](./infra-base/infra-base.spec.md) | infrastructure | ✅ | TS + pnpm + vitest + biome |
|
|
184
|
+
| [`api-contracts`](./api-contracts/api-contracts.spec.md) | contracts | 🚧 | REST API v1 |
|
|
185
|
+
| [`backend`](./backend/backend.spec.md) | product | ✅ | Node.js IMAP-сервис |
|
|
186
|
+
| [`web`](./web/web.spec.md) | product | 🚧 | React SPA |
|
|
187
|
+
```
|
|
188
|
+
</Contract>
|
|
189
|
+
|
|
190
|
+
<Contract id="INFRA_BASE_MINIMAL_SPEC">
|
|
191
|
+
```markdown
|
|
192
|
+
# <scope-name>: Infrastructure Specification
|
|
193
|
+
|
|
194
|
+
## scope-type
|
|
195
|
+
infrastructure
|
|
196
|
+
|
|
197
|
+
## 1. Vision
|
|
198
|
+
<Одно предложение про dev-experience.>
|
|
199
|
+
|
|
200
|
+
## 2. Tool Stack (minimal bootstrap)
|
|
201
|
+
| Category | Tool |
|
|
202
|
+
|---|---|
|
|
203
|
+
| package-management | <tool> |
|
|
204
|
+
| type-check | <tool> |
|
|
205
|
+
| linting+formatting | <tool> |
|
|
206
|
+
| test-unit | <tool> |
|
|
207
|
+
| git-hooks | <tool> |
|
|
208
|
+
|
|
209
|
+
> Полный Decision Log (Design Variants, rationale, Effective Rules для cascade) — запусти `discovery <scope-name>`.
|
|
210
|
+
```
|
|
211
|
+
</Contract>
|
|
212
|
+
</Output_Contracts>
|
|
213
|
+
</SddSetup>
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
<SvelteUiDiscovery keywords="svelte, ui-component, figma, svg, design-tokens, vkui, paradigm, storybook, sdd, component-discovery" type="directive" ver="1.0">
|
|
2
|
+
<Directive_Context>
|
|
3
|
+
<Mission>
|
|
4
|
+
Провести оператора через создание SDD-спеки Svelte UI-компонента: от Figma SVG-макета до утверждённого `.ui.spec.md`, готового к scaffold.
|
|
5
|
+
|
|
6
|
+
Вход: имя компонента + SVG-макет в `specs/<scope>/_figma/<name>.svg`.
|
|
7
|
+
Выход: `specs/<scope>/components/<name>.ui.spec.md` — самодостаточная спека компонента по секциям SPEC_STRUCTURE.
|
|
8
|
+
|
|
9
|
+
Не scope-level, не module-level — компонент-level. Директива дополняет основной SDD flow: используется при запуске discovery для UI-компонента внутри любого scope (uikit, app, etc.).
|
|
10
|
+
|
|
11
|
+
Процесс многоступенчатый: на каждом шаге агент извлекает данные из SVG через figma-utils, показывает вывод оператору, оператор подтверждает или поправляет. Без подтверждения — не идём дальше.
|
|
12
|
+
|
|
13
|
+
Как активируется: оператор запускает SDD-сессию с указанием этой директивы — «создать компонент Button по svelte-ui-discovery».
|
|
14
|
+
</Mission>
|
|
15
|
+
</Directive_Context>
|
|
16
|
+
|
|
17
|
+
<Belief_State>
|
|
18
|
+
<Axiom id="AX_TOOLS_AS_HANDS">
|
|
19
|
+
figma-utils — руки агента в SVG, не источник истины. Агент использует команды для извлечения контекста, но решения принимает сам:
|
|
20
|
+
|
|
21
|
+
- `figma:extract <name>` — полный JSON со всеми вариантами, измерениями, токен-кандидатами
|
|
22
|
+
- `figma:inspect <name> <pattern>` — точечный зум в конкретный вариант: размеры, элементы, fill/stroke
|
|
23
|
+
- `figma:tokens find <pattern>` — grep по именам токенов дизайн-системы
|
|
24
|
+
- `figma:tokens near <value> [delta]` — найти токены, близкие к измеренному значению
|
|
25
|
+
- `figma:tokens groups` — категории токенов
|
|
26
|
+
|
|
27
|
+
Агент НЕ должен полагаться только на extract. Если данные неполны или противоречивы — запустить inspect для конкретных вариантов, найти токены near, перепроверить.
|
|
28
|
+
</Axiom>
|
|
29
|
+
|
|
30
|
+
<Axiom id="AX_STEP_BY_STEP_APPROVAL">
|
|
31
|
+
Многоступенчатый flow. Каждый шаг завершается Approval Check — оператор подтверждает или поправляет. Без подтверждения следующий шаг не начинается.
|
|
32
|
+
|
|
33
|
+
Шаги:
|
|
34
|
+
1. SKELETON — скелет компонента (иерархия, слоты)
|
|
35
|
+
2. AXES — оси вариативности (size, appearance, mode, state)
|
|
36
|
+
3. TOKENS — дизайн-токены (маппинг, overrides)
|
|
37
|
+
4. API — пропсы, события, слоты
|
|
38
|
+
5. A11Y — доступность
|
|
39
|
+
6. STORYBOOK — план stories
|
|
40
|
+
7. FINAL — утверждение спеки
|
|
41
|
+
</Axiom>
|
|
42
|
+
|
|
43
|
+
<Axiom id="AX_EXISTING_COMPONENTS_CHECK">
|
|
44
|
+
Перед созданием нового компонента — проверить существующие. Шаг 0:
|
|
45
|
+
- Есть ли в `specs/<scope>/components/` спека с похожим именем?
|
|
46
|
+
- Можно ли собрать нужный вариант из existing компонента (композиция)?
|
|
47
|
+
- Можно ли доработать existing (добавить mode/appearance/size)?
|
|
48
|
+
|
|
49
|
+
Если existing подходит — не создаём новый, а запускаем refine existing. Результат фиксируется в Decision Log.
|
|
50
|
+
</Axiom>
|
|
51
|
+
|
|
52
|
+
<Axiom id="AX_SVELTE_CONVENTIONS">
|
|
53
|
+
Компонент — Svelte 5 с runes. Конвенции из `infra-ui`:
|
|
54
|
+
- data-атрибуты: `.btn[data-mode="primary"]`, не `:host()`
|
|
55
|
+
- CSS custom properties: `var(--vkui--...)` через `:root`
|
|
56
|
+
- Файлы: `<name>.svelte` + `<name>.module.css` + `<name>.tokens.css` + `<name>.stories.ts`
|
|
57
|
+
- Именование: kebab-case, lower-case
|
|
58
|
+
- `data-state` для тестируемости hover/active/disabled
|
|
59
|
+
- Counter: `box-sizing: border-box`
|
|
60
|
+
</Axiom>
|
|
61
|
+
|
|
62
|
+
<Axiom id="AX_TOKEN_DISCIPLINE">
|
|
63
|
+
Токены — семантический маппинг, не числовой:
|
|
64
|
+
- Маппинг по имени токена (height → `--vkui--size_button_small_height--compact`)
|
|
65
|
+
- diff ≤ 1px → OK (субпиксельный рендеринг)
|
|
66
|
+
- diff > 1px → OVERRIDE с комментарием `/* override: was Xpx */`
|
|
67
|
+
- Токен не найден → новый компонентный токен `--paradigm--<component>-*`
|
|
68
|
+
- Цвета — через VKUI-токены, не хардкод
|
|
69
|
+
</Axiom>
|
|
70
|
+
|
|
71
|
+
<Axiom id="AX_EVIDENCE_HYGIENE">
|
|
72
|
+
Факты / Предположения / Гипотезы — разделены в каждом intake-фрейме.
|
|
73
|
+
- Факты — из figma:extract (измерения, цвета, классификация)
|
|
74
|
+
- Предположения — семантическая интерпретация (этот элемент — иконка, этот — счётчик)
|
|
75
|
+
- Гипотезы — требуют валидации оператором (disabled определяется по opacity группы)
|
|
76
|
+
</Axiom>
|
|
77
|
+
|
|
78
|
+
<Axiom id="AX_SPEC_STRUCTURE">
|
|
79
|
+
Формат `.ui.spec.md` — секции SPEC_STRUCTURE:
|
|
80
|
+
1. Vision & Purpose — назначение компонента
|
|
81
|
+
2. Anatomy — ASCII-дерево слотов + таблица (имя, назначение, обязательность)
|
|
82
|
+
3. Variant Axes — оси вариативности (size, appearance, mode, state) с таблицами значений
|
|
83
|
+
4. States — состояния (default, hover, active, disabled, loading) с поведением
|
|
84
|
+
5. Design Tokens — таблица токенов (роль → VKUI-токен → значение → override)
|
|
85
|
+
6. API — пропсы (имя, тип, по умолчанию, описание)
|
|
86
|
+
7. Accessibility — role, aria, keyboard
|
|
87
|
+
8. Storybook Plan — иерархия stories, количество вариантов
|
|
88
|
+
9. BDD Scenarios — по одному на состояние × appearance × mode
|
|
89
|
+
</Axiom>
|
|
90
|
+
|
|
91
|
+
<Axiom id="AX_OPERATOR_LANGUAGE">
|
|
92
|
+
Директивная проза — English. Артефакты и сообщения оператору — Russian.
|
|
93
|
+
</Axiom>
|
|
94
|
+
</Belief_State>
|
|
95
|
+
|
|
96
|
+
<Execution_Plan>
|
|
97
|
+
<Step id="STEP_0_EXISTING_CHECK">
|
|
98
|
+
<Goal>Проверить существующие компоненты. Можно ли переиспользовать?</Goal>
|
|
99
|
+
<Action>
|
|
100
|
+
1. Прочитать `specs/<scope>/components/` — список существующих спек.
|
|
101
|
+
2. Если есть компонент с похожим именем — предложить refine вместо create.
|
|
102
|
+
3. Если можно скомпоновать из existing — предложить композицию.
|
|
103
|
+
4. Результат → Decision Log.
|
|
104
|
+
5. Approval Check. STOP.
|
|
105
|
+
</Action>
|
|
106
|
+
</Step>
|
|
107
|
+
|
|
108
|
+
<Step id="STEP_1_SKELETON">
|
|
109
|
+
<Goal>Понять анатомию компонента из SVG.</Goal>
|
|
110
|
+
<Action>
|
|
111
|
+
1. `figma:extract <name>` — получить все варианты.
|
|
112
|
+
2. `figma:inspect <name> <first-variant>` — посмотреть конкретный вариант.
|
|
113
|
+
3. Предложить ASCII-дерево слотов (icon, label, counter, indicator).
|
|
114
|
+
4. Таблица: слот, назначение, обязательность.
|
|
115
|
+
5. Approval Check. STOP.
|
|
116
|
+
</Action>
|
|
117
|
+
</Step>
|
|
118
|
+
|
|
119
|
+
<Step id="STEP_2_AXES">
|
|
120
|
+
<Goal>Определить оси вариативности.</Goal>
|
|
121
|
+
<Action>
|
|
122
|
+
1. Из extract: уникальные size, appearance, mode, state.
|
|
123
|
+
2. Предложить таблицы значений для каждой оси.
|
|
124
|
+
3. Указать невалидные комбинации (если есть).
|
|
125
|
+
4. Approval Check. STOP.
|
|
126
|
+
</Action>
|
|
127
|
+
</Step>
|
|
128
|
+
|
|
129
|
+
<Step id="STEP_3_TOKENS">
|
|
130
|
+
<Goal>Смаппить измерения на дизайн-токены.</Goal>
|
|
131
|
+
<Action>
|
|
132
|
+
1. Из extract: tokenOverrides для каждого измерения.
|
|
133
|
+
2. `figma:tokens near <value>` — найти токены по значению.
|
|
134
|
+
3. `figma:tokens find <pattern>` — найти токены по имени.
|
|
135
|
+
4. Предложить таблицу: роль → VKUI-токен → значение SVG → значение токена → diff → решение (OK/OVERRIDE/NEW).
|
|
136
|
+
5. Для отсутствующих токенов — предложить `--paradigm--<component>-*`.
|
|
137
|
+
6. Approval Check. STOP.
|
|
138
|
+
</Action>
|
|
139
|
+
</Step>
|
|
140
|
+
|
|
141
|
+
<Step id="STEP_4_API">
|
|
142
|
+
<Goal>Спроектировать API компонента.</Goal>
|
|
143
|
+
<Action>
|
|
144
|
+
1. Пропсы: из осей (appearance, mode, size, state) + контентные (before/after, label, counter) + поведенческие (disabled, loading, stretched).
|
|
145
|
+
2. Типы, значения по умолчанию.
|
|
146
|
+
3. События: click, нет специфичных.
|
|
147
|
+
4. Слоты: соответствие анатомии.
|
|
148
|
+
5. Approval Check. STOP.
|
|
149
|
+
</Action>
|
|
150
|
+
</Step>
|
|
151
|
+
|
|
152
|
+
<Step id="STEP_5_A11Y">
|
|
153
|
+
<Goal>Определить требования доступности.</Goal>
|
|
154
|
+
<Action>
|
|
155
|
+
1. Role: button.
|
|
156
|
+
2. aria-label, aria-disabled, aria-busy.
|
|
157
|
+
3. Keyboard: Enter, Space.
|
|
158
|
+
4. Focus: outline.
|
|
159
|
+
5. Approval Check. STOP.
|
|
160
|
+
</Action>
|
|
161
|
+
</Step>
|
|
162
|
+
|
|
163
|
+
<Step id="STEP_6_STORYBOOK">
|
|
164
|
+
<Goal>Спланировать Storybook-истории.</Goal>
|
|
165
|
+
<Action>
|
|
166
|
+
1. Иерархия: Component / Appearance / Mode / Size × State.
|
|
167
|
+
2. Количество stories: уникальные комбинации из осей.
|
|
168
|
+
3. Play-функции: render + interaction + expect.
|
|
169
|
+
4. A11y-аудит: parameters.
|
|
170
|
+
5. Approval Check. STOP.
|
|
171
|
+
</Action>
|
|
172
|
+
</Step>
|
|
173
|
+
|
|
174
|
+
<Step id="STEP_7_FINAL">
|
|
175
|
+
<Goal>Сгенерировать и утвердить `.ui.spec.md`.</Goal>
|
|
176
|
+
<Action>
|
|
177
|
+
1. Собрать все секции по SPEC_STRUCTURE.
|
|
178
|
+
2. Записать `specs/<scope>/components/<name>.ui.spec.md`.
|
|
179
|
+
3. Decision Log: D-001 (decomposition axis), D-002 (token overrides).
|
|
180
|
+
4. Handoff: готово к scaffold.
|
|
181
|
+
5. Approval Check. STOP.
|
|
182
|
+
</Action>
|
|
183
|
+
</Step>
|
|
184
|
+
</Execution_Plan>
|
|
185
|
+
|
|
186
|
+
<Halt_Conditions>
|
|
187
|
+
| 🛑 ID | Trigger |
|
|
188
|
+
|---|---|
|
|
189
|
+
| `H_NO_SVG` | SVG-макет не найден в `_figma/` |
|
|
190
|
+
| `H_EXTRACT_FAILED` | `figma:extract` упал — починить инструменты перед продолжением |
|
|
191
|
+
| `H_OPERATOR_REJECT` | Оператор отверг предложение на любом шаге |
|
|
192
|
+
| `H_EXISTING_BETTER` | Существующий компонент покрывает потребность — refine вместо create |
|
|
193
|
+
</Halt_Conditions>
|
|
194
|
+
|
|
195
|
+
<Output_Contracts>
|
|
196
|
+
<Contract id="SPEC_STRUCTURE">
|
|
197
|
+
```markdown
|
|
198
|
+
# <ComponentName> — спецификация компонента
|
|
199
|
+
|
|
200
|
+
## 1. Vision & Purpose
|
|
201
|
+
[Назначение, контекст использования, отличия от похожих компонентов.]
|
|
202
|
+
|
|
203
|
+
## 2. Anatomy
|
|
204
|
+
[ASCII-дерево слотов.]
|
|
205
|
+
|
|
206
|
+
| Слот | Назначение | Обязательность |
|
|
207
|
+
|---|---|---|
|
|
208
|
+
| `<name>` | `<purpose>` | yes / no |
|
|
209
|
+
|
|
210
|
+
[Нюансы реализации.]
|
|
211
|
+
|
|
212
|
+
## 3. Variant Axes
|
|
213
|
+
### `size` — размер
|
|
214
|
+
| Значение | Высота | Padding X | Gap | Описание |
|
|
215
|
+
|---|---|---|---|---|
|
|
216
|
+
|
|
217
|
+
### `appearance` — цветовая тема
|
|
218
|
+
### `mode` — степень акцента
|
|
219
|
+
|
|
220
|
+
[Невалидные комбинации, если есть.]
|
|
221
|
+
|
|
222
|
+
## 4. States
|
|
223
|
+
| Состояние | Поведение |
|
|
224
|
+
|---|---|
|
|
225
|
+
| default | ... |
|
|
226
|
+
| hover | ... |
|
|
227
|
+
| active | ... |
|
|
228
|
+
| disabled | ... |
|
|
229
|
+
| loading | ... |
|
|
230
|
+
|
|
231
|
+
## 5. Design Tokens
|
|
232
|
+
| Роль | VKUI-токен | Значение SVG | Значение токена | Diff | Решение |
|
|
233
|
+
|---|---|---|---|---|---|
|
|
234
|
+
|
|
235
|
+
[Override-токены с комментариями.]
|
|
236
|
+
[Новые токены: `--paradigm--<component>-*`.]
|
|
237
|
+
|
|
238
|
+
## 6. API
|
|
239
|
+
| Проп | Тип | По умолчанию | Описание |
|
|
240
|
+
|---|---|---|---|
|
|
241
|
+
|
|
242
|
+
## 7. Accessibility
|
|
243
|
+
- Role: button
|
|
244
|
+
- aria-label: ...
|
|
245
|
+
- Keyboard: Enter, Space
|
|
246
|
+
|
|
247
|
+
## 8. Storybook Plan
|
|
248
|
+
[Иерархия: Component / Appearance / Mode / Size × State.]
|
|
249
|
+
[Количество stories.]
|
|
250
|
+
|
|
251
|
+
## 9. BDD Scenarios
|
|
252
|
+
### <appearance> / <mode> / <state>
|
|
253
|
+
- **Given** ...
|
|
254
|
+
- **When** ...
|
|
255
|
+
- **Then** ...
|
|
256
|
+
|
|
257
|
+
## 10. Decision Log
|
|
258
|
+
### D-001 — ...
|
|
259
|
+
## 11. Handoff
|
|
260
|
+
```
|
|
261
|
+
</Contract>
|
|
262
|
+
</Output_Contracts>
|
|
263
|
+
</SvelteUiDiscovery>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<Semantic_Change_Extractor keywords="git, semantic diff, code analysis, reverse engineering, intent extraction, merge conflict resolution, semantic rebase" type="directive" ver="2.0">
|
|
2
|
+
<Mission>
|
|
3
|
+
Analyze git branch changes from the branching point to current HEAD, extract semantic intent, map cross-file dependencies, and emit a portable, intent-based XML/Markdown artifact for another agent to implement.
|
|
4
|
+
|
|
5
|
+
Reverse-engineering, not syntactic diff: abstract away from raw lines; focus on business logic, data flow, cross-file dependencies, developer's underlying intent.
|
|
6
|
+
</Mission>
|
|
7
|
+
|
|
8
|
+
<Belief_State>
|
|
9
|
+
<Axiom id="AX_INTENT_OVER_LINES">Raw git diffs (line/column numbers) are fragile and useless for transferring changes to heavily modified branches. Extract the *intent* and *semantic location* (e.g., «inside the user authentication loop», «before the database commit»), not raw lines.</Axiom>
|
|
10
|
+
<Axiom id="AX_CONTEXT_IS_KING">Change without a consumer is a bug. Always identify *why* a change was made and *who/what* consumes it (e.g., «Frontend expects a new JSON field», «Fixes a memory leak in the worker»).</Axiom>
|
|
11
|
+
<Axiom id="AX_GROUPING_REDUCES_NOISE">Multiple scattered changes in a file with one shared intent (mass renaming, parameter added to many calls) MUST be grouped into a single logical task. Per-line entries are noise.</Axiom>
|
|
12
|
+
<Axiom id="AX_CROSS_FILE_COHESION">Changes rarely happen in isolation. Service signature change → controller calling it must change. Map dependencies explicitly via `<depends_on>` so the implementing agent applies them in correct order.</Axiom>
|
|
13
|
+
<Axiom id="AX_AUTONOMOUS_DISCOVERY">Fetch own context. Target branch unknown → auto-detect default branch (`git symbolic-ref refs/remotes/origin/HEAD` or branch analysis) to find the correct merge base.</Axiom>
|
|
14
|
+
</Belief_State>
|
|
15
|
+
|
|
16
|
+
<Execution_Plan>
|
|
17
|
+
1. Auto-detect main/target branch via bash if not provided.
|
|
18
|
+
2. Find merge base: `git merge-base <target> HEAD`.
|
|
19
|
+
3. List changed files: `git diff --name-only <merge-base> HEAD`.
|
|
20
|
+
4. For each file, extract diff AND read full file content (`cat <file>`) for surrounding context — not only diff chunks.
|
|
21
|
+
5. Emit `<Context_Analysis>` mapping intents, groupings, cross-file dependencies.
|
|
22
|
+
6. Emit `<Branch_Changes>` artifact.
|
|
23
|
+
</Execution_Plan>
|
|
24
|
+
|
|
25
|
+
<Output_Format>
|
|
26
|
+
Two phases.
|
|
27
|
+
- **Phase 1**: `<Context_Analysis>` — English or Russian.
|
|
28
|
+
- **Phase 2**: `<Branch_Changes>` — content inside the artifact tags MUST be in RUSSIAN; use Markdown directly inside the tags. File-tag name = sanitized path (slashes/dots → underscores).
|
|
29
|
+
|
|
30
|
+
```xml
|
|
31
|
+
<Context_Analysis>
|
|
32
|
+
1. Target Branch & Merge Base Identification.
|
|
33
|
+
2. High-level summary of what this branch achieves (the «Epic»).
|
|
34
|
+
3. File → logical intent mapping (grouping strategy).
|
|
35
|
+
4. Cross-file dependencies (e.g., «UserService change dictates UserController change»).
|
|
36
|
+
</Context_Analysis>
|
|
37
|
+
|
|
38
|
+
<Branch_Changes source="[current_branch_name]" base="[merge_base_hash]">
|
|
39
|
+
<src_services_UserService_ts>
|
|
40
|
+
<changes id="add_role_validation">
|
|
41
|
+
<purpose>Добавить проверку ролей при создании пользователя.</purpose>
|
|
42
|
+
<consumer>API Gateway, Middleware авторизации.</consumer>
|
|
43
|
+
<location file="src/services/UserService.ts">Внутри метода `createUser`, после валидации email, перед сохранением в БД. В блоке импортов добавить `RoleValidator`.</location>
|
|
44
|
+
<description>
|
|
45
|
+
**General:** Интегрировать `RoleValidator.check(user.role)` в процесс создания.
|
|
46
|
+
|
|
47
|
+
**Insights:** Если валидатор кидает ошибку — обернуть в `CustomAuthError` для корректного HTTP 403.
|
|
48
|
+
|
|
49
|
+
**Snippet:**
|
|
50
|
+
```typescript
|
|
51
|
+
if (!RoleValidator.check(payload.role)) {
|
|
52
|
+
throw new CustomAuthError("Invalid role assignment");
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
</description>
|
|
56
|
+
</changes>
|
|
57
|
+
</src_services_UserService_ts>
|
|
58
|
+
|
|
59
|
+
<src_controllers_UserController_ts>
|
|
60
|
+
<changes id="pass_role_to_service">
|
|
61
|
+
<purpose>Передать `role` из тела запроса в сервис создания.</purpose>
|
|
62
|
+
<consumer>`UserService.createUser`.</consumer>
|
|
63
|
+
<depends_on>add_role_validation</depends_on>
|
|
64
|
+
<location file="src/controllers/UserController.ts">Внутри обработчика POST `registerUser`, при формировании `payload` для сервиса.</location>
|
|
65
|
+
<description>Извлечь `req.body.role`, добавить в payload. Default `"user"` если не передан.</description>
|
|
66
|
+
</changes>
|
|
67
|
+
</src_controllers_UserController_ts>
|
|
68
|
+
|
|
69
|
+
<src_utils_oldLogger_js>
|
|
70
|
+
<changes id="remove_legacy_logger">
|
|
71
|
+
<purpose>Удалить устаревший логгер; проект полностью на Winston.</purpose>
|
|
72
|
+
<consumer>Система логирования.</consumer>
|
|
73
|
+
<location file="src/utils/oldLogger.js">Весь файл.</location>
|
|
74
|
+
<description>Файл удалить полностью. Вычистить импорты `oldLogger.js` в целевой ветке.</description>
|
|
75
|
+
</changes>
|
|
76
|
+
</src_utils_oldLogger_js>
|
|
77
|
+
</Branch_Changes>
|
|
78
|
+
```
|
|
79
|
+
</Output_Format>
|
|
80
|
+
|
|
81
|
+
<Invariants>
|
|
82
|
+
- Semantic anchor for `<location>` («in the class constructor»), never absolute line numbers.
|
|
83
|
+
- Logically connected changes grouped into single `<changes>` block.
|
|
84
|
+
- Cross-file dependencies linked via `<depends_on>`.
|
|
85
|
+
- Markdown inside XML tags is direct (no CDATA, no over-escaping).
|
|
86
|
+
- `<Context_Analysis>` MUST precede `<Branch_Changes>` emission (Phase 1 before Phase 2).
|
|
87
|
+
- File-tag name is unique sanitized path (slashes/dots → underscores).
|
|
88
|
+
- Forbidden: copy-pasting raw `git diff` output with `+`/`-` signs; absolute line numbers as primary locator.
|
|
89
|
+
</Invariants>
|
|
90
|
+
|
|
91
|
+
<Self_Check>
|
|
92
|
+
Before emitting `<Branch_Changes>`:
|
|
93
|
+
1. Did `<Context_Analysis>` map intents, groupings, cross-file dependencies?
|
|
94
|
+
2. Are file-tag names unique and derived from sanitized paths?
|
|
95
|
+
3. Is every `<location>` semantic (immune to line drift)?
|
|
96
|
+
4. Is every multi-file change linked via `<depends_on>` where applicable?
|
|
97
|
+
5. Are scattered same-intent changes grouped into one `<changes>` block?
|
|
98
|
+
</Self_Check>
|
|
99
|
+
</Semantic_Change_Extractor>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Testing rules
|
|
2
|
+
|
|
3
|
+
Test framework usage policy: structure, fixtures, isolation, naming.
|
|
4
|
+
|
|
5
|
+
## Currently available
|
|
6
|
+
|
|
7
|
+
- [`common.xml`](common.xml) — **Shared testing core** inherited by every runner-specific directive. Contract boundary, case flow, phase anchors, unified context + factory, BDD mapping, snapshot operator-confirm, file budget. Read first.
|
|
8
|
+
- [`node-test.xml`](node-test.xml) — Node.js built-in `node:test` runner specifics on top of `common`: assert API, native `mock.fn()`, HTTP mock-agent, snapshot file location.
|
|
9
|
+
- [`vitest-rules.xml`](vitest-rules.xml) — Vitest runner specifics on top of `common`: `vitest run` (not watch), `vi`-matcher API, `vi.mock` confirm-gate, mock hygiene, time/env lifecycle, explicit imports.
|
|
10
|
+
- [`playwright-cli.xml`](playwright-cli.xml) — Playwright CLI exploration & debugging: AX Tree vision, aria snapshots, trace viewer, codegen, headless self-verification. **Prerequisite for playwright-e2e.**
|
|
11
|
+
- [`playwright-e2e.xml`](playwright-e2e.xml) — Playwright e2e test authoring: aria-snapshot-first contracts, role-based locators, fixture-based POM, auth via storageState, network mocking. **Activated after CLI exploration.**
|
|
12
|
+
- [`storybook-usage.xml`](storybook-usage.xml) — Storybook MCP tools for component development: reading manifests (component docs, props, stories), writing stories, running tests, self-verifying component rendering. **Activated when MCP server is running.**
|
|
13
|
+
- [`svelte-testing.xml`](svelte-testing.xml) — Testing Svelte 5 components: `.svelte.test.ts` extension, `$effect.root`, `flushSync`, `mount`/`unmount`, `@testing-library/svelte`. **Inherits node-test + vitest-rules.**
|
|
14
|
+
|
|
15
|
+
## Planned
|
|
16
|
+
|
|
17
|
+
- `jest.xml` — Jest usage (legacy projects).
|
|
18
|
+
- `cypress.xml` — alternative E2E runner.
|
|
19
|
+
- `storybook.xml` — UI component testing in isolation.
|
|
20
|
+
- `pytest.xml` — Python testing: fixtures, parametrization, conftest patterns.
|
|
21
|
+
- `go-test.xml` — Go testing: table-driven tests, subtests, golden files.
|
|
22
|
+
|
|
23
|
+
## Activation default
|
|
24
|
+
|
|
25
|
+
Testing rules activate `later` by default per `AX_RULE_ACTIVATION_DEFAULTS` — they're consumed by execution agents when test files are written, not walked through with the operator at selection time. Override to `now` if a test rule has strong opinions worth surfacing (e.g., snapshot-discipline policy for a UI library).
|