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
|
@@ -1,51 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Describe AI model configuration in rc-file (name, URL, optional key).
|
|
3
3
|
* @consumer GennadyRc, ai-legacy
|
|
4
4
|
*/
|
|
5
5
|
export type RcModel = {
|
|
6
|
+
/** @purpose Model identifier string (e.g. 'deepseek-v4-pro'). */
|
|
6
7
|
model: string;
|
|
8
|
+
/** @purpose Base URL of the model API endpoint. */
|
|
7
9
|
url: string;
|
|
10
|
+
/** @purpose Optional API key for authenticated requests. */
|
|
8
11
|
key?: string;
|
|
9
12
|
};
|
|
10
13
|
/**
|
|
11
|
-
* @purpose
|
|
14
|
+
* @purpose Root configuration data structure for Gennady RC (model list).
|
|
12
15
|
* @consumer GennadyRc
|
|
13
16
|
*/
|
|
14
17
|
export type GennadyRcData = {
|
|
18
|
+
/** @purpose List of configured AI models. */
|
|
15
19
|
models: RcModel[];
|
|
16
20
|
};
|
|
17
21
|
/**
|
|
18
|
-
* @purpose
|
|
22
|
+
* @purpose Load and parse Gennady configuration from rc-file in a given directory.
|
|
23
|
+
* @invariant On read/parse error _error is populated; getModels() returns an empty array.
|
|
24
|
+
* @sideEffect IO: file read at constructor.
|
|
19
25
|
* @consumer ai-legacy, CLI agent
|
|
20
|
-
* @invariant При ошибке чтения/парсинга _error заполняется; getModels() возвращает пустой массив.
|
|
21
|
-
* @sideEffect IO: чтение файла при конструкторе.
|
|
22
26
|
*/
|
|
23
27
|
export declare class GennadyRc {
|
|
24
|
-
/** @purpose
|
|
28
|
+
/** @purpose Default configuration filename. */
|
|
25
29
|
static DEFAULT_FILENAME: string;
|
|
26
30
|
/**
|
|
27
|
-
* @purpose
|
|
28
|
-
* @returns
|
|
29
|
-
* @sideEffect IO:
|
|
31
|
+
* @purpose Create GennadyRc instances for current directory and HOME (lookup priority).
|
|
32
|
+
* @returns Array of two instances: [cwd, HOME].
|
|
33
|
+
* @sideEffect IO: file read at constructor.
|
|
30
34
|
*/
|
|
31
35
|
static getDefaults(): GennadyRc[];
|
|
36
|
+
/** @purpose Full path to the loaded rc config file. */
|
|
32
37
|
protected _filename: string;
|
|
38
|
+
/** @purpose Parsed configuration data with model list. */
|
|
33
39
|
protected _data: GennadyRcData;
|
|
40
|
+
/** @purpose Load/parse error if config is invalid, null otherwise. */
|
|
34
41
|
protected _error: Error | null;
|
|
42
|
+
/**
|
|
43
|
+
* @purpose Load and parse Gennady RC config file from a directory.
|
|
44
|
+
* @param [dir] Directory to look for the rc file in (defaults to cwd).
|
|
45
|
+
* @param [name] Config filename (defaults to .gennadyrc).
|
|
46
|
+
*/
|
|
35
47
|
constructor(dir?: string, name?: string);
|
|
36
48
|
/**
|
|
37
|
-
* @purpose
|
|
38
|
-
* @returns true
|
|
49
|
+
* @purpose Check that configuration was successfully loaded and recognized.
|
|
50
|
+
* @returns true if no error; false on parse error or invalid data.
|
|
39
51
|
*/
|
|
40
52
|
isValid(): boolean;
|
|
41
53
|
/**
|
|
42
|
-
* @purpose
|
|
43
|
-
* @returns
|
|
54
|
+
* @purpose Get list of models from loaded rc.
|
|
55
|
+
* @returns Array of RcModel (empty on error or missing file).
|
|
44
56
|
*/
|
|
45
57
|
getModels(): RcModel[];
|
|
46
58
|
/**
|
|
47
|
-
* @purpose
|
|
48
|
-
* @returns Error
|
|
59
|
+
* @purpose Get load/parse error if one occurred.
|
|
60
|
+
* @returns Error or null on successful load.
|
|
49
61
|
*/
|
|
50
62
|
getError(): Error | null;
|
|
51
63
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
3
|
-
* @
|
|
4
|
-
* @
|
|
5
|
-
* @
|
|
6
|
-
* @returns Стандартный вывод (stdout) как строка; пустая строка при ошибке.
|
|
7
|
-
* @sideEffect Process: запуск внешнего процесса; Logs: error при сбое.
|
|
2
|
+
* @purpose Execute system command synchronously with safe error handling.
|
|
3
|
+
* @pre Command and binary available in PATH; run in correct environment.
|
|
4
|
+
* @sideEffect Process: launch external process; Logs: error on failure.
|
|
5
|
+
* @consumer git/git-core, other domains via utils
|
|
8
6
|
*/
|
|
9
7
|
export declare const execSyncSafe: (cmd: string) => string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Determine whether a file is a test file by naming conventions.
|
|
3
3
|
* @consumer core/utils
|
|
4
|
-
* @param filename Имя или путь файла для проверки.
|
|
5
|
-
* @returns true, если имя соответствует *.test.* или *.spec.* (с optional 's'); иначе false.
|
|
6
4
|
*/
|
|
7
5
|
export declare const isTestFile: (filename: string) => boolean;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Determine programming language by file extension.
|
|
3
3
|
* @consumer review-gen, cat-gen
|
|
4
|
-
* @param ext Расширение без точки (например 'ts', 'js').
|
|
5
|
-
* @returns Человекочитаемое имя языка или undefined, если расширение неизвестно.
|
|
6
4
|
*/
|
|
7
5
|
export declare const getProgrammingLanguage: (ext: string) => string | undefined;
|
|
8
6
|
/**
|
|
9
|
-
* @purpose
|
|
7
|
+
* @purpose Get system user language (locale) for output localization.
|
|
8
|
+
* @sideEffect Process: call osascript to read system info.
|
|
10
9
|
* @consumer ai-legacy, prompts
|
|
11
|
-
* @sideEffect Process: вызов osascript для чтения system info.
|
|
12
|
-
* @returns Код языка (например 'ru', 'en') или 'en' при ошибке.
|
|
13
10
|
*/
|
|
14
11
|
export declare const getSysLang: () => string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Parse command-line arguments by options schema and aliases.
|
|
3
3
|
* @consumer CLI (gennady, cmd/*)
|
|
4
|
-
* @param argv Массив аргументов (обычно process.argv).
|
|
5
|
-
* @param [schema] Схема: ключ — имя опции в результате, значение — массив алиасов (например --opt, -o).
|
|
6
|
-
* @returns Объект: ключи из schema с значениями или true; _ — массив позиционных аргументов.
|
|
7
4
|
*/
|
|
8
5
|
export declare const parseArgs: <T extends Record<string, string[]>>(argv: string[], schema?: T) => Record<keyof T | "_", unknown> & {
|
|
9
6
|
_: string[];
|
|
@@ -2,10 +2,10 @@ type Styler = ((text: string) => string) & {
|
|
|
2
2
|
[key: string]: Styler;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
|
-
* @purpose
|
|
5
|
+
* @purpose Provide style chain for terminal text coloring (ANSI).
|
|
6
|
+
* @invariant With NO_COLOR flag (plain, nocolor, --color=no etc.) returns text without codes; otherwise — with ANSI codes.
|
|
7
|
+
* @sideEffect Read process.argv at module initialization.
|
|
6
8
|
* @consumer CLI, review-gen, commit-gen, cat-gen
|
|
7
|
-
* @invariant При флаге NO_COLOR (plain, nocolor, --color=no и т.п.) возвращает текст без кодов; иначе — с ANSI-кодами.
|
|
8
|
-
* @sideEffect Чтение process.argv при инициализации модуля.
|
|
9
9
|
*/
|
|
10
10
|
export declare const style: Styler;
|
|
11
11
|
export {};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @purpose Удалить think-блоки и лишний преамбульный текст из сырого ответа LLM.
|
|
3
|
-
* @param raw Сырая строка ответа.
|
|
4
|
-
* @returns Очищенная строка.
|
|
5
|
-
*/
|
|
1
|
+
/** @purpose Remove think-blocks and preamble text from raw LLM response. */
|
|
6
2
|
export declare const removeThink: (raw: string) => string;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @purpose Подсчитать приблизительное количество токенов в тексте.
|
|
3
|
-
* @param text Исходный текст.
|
|
4
|
-
* @returns Количество токенов (по разбиению на слова и символы).
|
|
5
|
-
*/
|
|
1
|
+
/** @purpose Estimate approximate token count in text. */
|
|
6
2
|
export declare const countTokens: (text: string) => number;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
3
|
-
* @
|
|
4
|
-
* @returns Развёрнутый результат при успехе.
|
|
5
|
-
* @throws Error из resultTuple[1] при наличии; SyntaxError при невалидном формате.
|
|
2
|
+
* @purpose Synchronously unwrap a result tuple.
|
|
3
|
+
* @throws Error from resultTuple[1] if present; SyntaxError for invalid format.
|
|
6
4
|
*/
|
|
7
5
|
export declare const unguard: <TResult>(result: unknown) => TResult;
|
|
8
6
|
/**
|
|
9
|
-
* @purpose
|
|
10
|
-
* @
|
|
11
|
-
* @returns Promise с развёрнутым результатом при успехе.
|
|
12
|
-
* @throws Error из tuple при наличии; SyntaxError при невалидном формате (см. unguard).
|
|
7
|
+
* @purpose Unwrap result (tuple or Promise\<tuple\>); throws on error.
|
|
8
|
+
* @throws Error from tuple if present; SyntaxError for invalid format (see unguard).
|
|
13
9
|
*/
|
|
14
10
|
export declare const unguardOrThrow: <TResult>(resultOrPromise: [TResult, null] | [null, Error] | Promise<[TResult, null] | [null, Error]>) => Promise<TResult>;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose XML tree node — tag, attributes, child nodes or text.
|
|
3
3
|
* @consumer commit-gen, review-verify, cat-gen
|
|
4
4
|
*/
|
|
5
5
|
export type XmlNode = {
|
|
6
|
+
/** @purpose XML tag name (e.g. 'message', 'commit'). */
|
|
6
7
|
tag: string;
|
|
8
|
+
/** @purpose Optional key-value attributes on the tag. */
|
|
7
9
|
attrs?: Record<string, string>;
|
|
10
|
+
/** @purpose Child content: nested nodes, text, string array, or CDATA. */
|
|
8
11
|
children?: XmlNode[] | string | string[] | XmlCdataNode;
|
|
9
12
|
};
|
|
10
13
|
/**
|
|
11
|
-
* @purpose
|
|
14
|
+
* @purpose Represent XML block as CDATA content without escaping special chars.
|
|
12
15
|
* @consumer xml serializer
|
|
13
16
|
*/
|
|
14
17
|
export type XmlCdataNode = {
|
|
18
|
+
/** @purpose Raw CDATA text content (not escaped). */
|
|
15
19
|
cdata: string;
|
|
16
20
|
};
|
|
17
21
|
/**
|
|
18
|
-
* @purpose
|
|
19
|
-
* @param xmlString
|
|
20
|
-
* @returns
|
|
22
|
+
* @purpose Extract \<message\> block from XML string and convert to flat object for commit.
|
|
23
|
+
* @param xmlString XML string (e.g. command output or file).
|
|
24
|
+
* @returns Object type, icon, subject, description or null if \<message\> block not found.
|
|
21
25
|
*/
|
|
22
26
|
export declare function xmlCommitMessageToJson(xmlString: string): {
|
|
23
27
|
type: string;
|
|
@@ -26,15 +30,15 @@ export declare function xmlCommitMessageToJson(xmlString: string): {
|
|
|
26
30
|
description: string | null;
|
|
27
31
|
} | null;
|
|
28
32
|
/**
|
|
29
|
-
* @purpose
|
|
30
|
-
* @param str
|
|
31
|
-
* @returns
|
|
33
|
+
* @purpose Escape special characters in string for safe XML insertion.
|
|
34
|
+
* @param str Source string that may contain \<, \>, &, ', ".
|
|
35
|
+
* @returns String with replaced entities (<, >, &, ', ").
|
|
32
36
|
*/
|
|
33
37
|
export declare function escapeXml(str: string): string;
|
|
34
38
|
/**
|
|
35
|
-
* @purpose
|
|
36
|
-
* @param node
|
|
37
|
-
* @param [level]
|
|
38
|
-
* @returns
|
|
39
|
+
* @purpose Serialize XmlNode object to indented XML string.
|
|
40
|
+
* @param node XmlNode to serialize.
|
|
41
|
+
* @param [level] Nesting level for indentation (default 0).
|
|
42
|
+
* @returns Formatted XML string.
|
|
39
43
|
*/
|
|
40
44
|
export declare function serializeXmlNode(node: XmlNode, level?: number): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gennady",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"author": "Konstantin Lebedev <ibnrubaxa@gmail.com>",
|
|
5
5
|
"description": "Gennady — General Extensible Neural Network Adaptive Data Yntelligence",
|
|
6
6
|
"keywords": [
|
|
@@ -24,15 +24,21 @@
|
|
|
24
24
|
"#snapshot-path-setup": "./snapshot-path.setup.ts",
|
|
25
25
|
"#logger": "./services/logger/logger.ts"
|
|
26
26
|
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": "./services/agent-mon/index.ts",
|
|
29
|
+
"./providers/claude": "./services/agent-mon/providers/claude/index.ts",
|
|
30
|
+
"./providers/opencode": "./services/agent-mon/providers/opencode/index.ts"
|
|
31
|
+
},
|
|
27
32
|
"files": [
|
|
28
33
|
"dist/**/*",
|
|
29
|
-
"README.md"
|
|
34
|
+
"README.md",
|
|
35
|
+
"ai/**/*"
|
|
30
36
|
],
|
|
31
37
|
"scripts": {
|
|
32
38
|
"type-check": "tsc --noEmit",
|
|
33
39
|
"build:types": "tsc -p tsconfig.types.json && node --import tsx scripts/normalize-dts-imports.ts",
|
|
34
40
|
"build:publish": "npm run build && npm run build:types && node --import tsx scripts/prepare-publish-artifacts.ts",
|
|
35
|
-
"test": "node --test",
|
|
41
|
+
"test": "node --import tsx --test --experimental-test-module-mocks",
|
|
36
42
|
"test:watch": "tsx --test-loader 'cli/**/*.test.ts' 'shared/**/*.test.ts' 'services/**/*.test.ts'",
|
|
37
43
|
"dev": "tsx cli/gennady.ts",
|
|
38
44
|
"build": "vite build",
|
|
@@ -41,7 +47,9 @@
|
|
|
41
47
|
"publish-next": "node --import tsx scripts/publish-next.ts",
|
|
42
48
|
"format": "prettier --write .",
|
|
43
49
|
"format:check": "prettier --check .",
|
|
44
|
-
"lint": "npm run format && npm run type-check"
|
|
50
|
+
"lint": "npm run format && npm run type-check && npm run lint:contracts",
|
|
51
|
+
"release": "release-it",
|
|
52
|
+
"lint:contracts": "tsx cli/gennady.ts lint --autofix cli/ shared/ services/"
|
|
45
53
|
},
|
|
46
54
|
"devDependencies": {
|
|
47
55
|
"@ai-sdk/openai": "^3.0.41",
|
|
@@ -49,14 +57,22 @@
|
|
|
49
57
|
"@mtcute/node": "^0.28.2",
|
|
50
58
|
"@types/node": "^25.3.2",
|
|
51
59
|
"@types/qrcode": "^1.5.6",
|
|
60
|
+
"@types/react": "^19.2.15",
|
|
52
61
|
"ai": "^6.0.116",
|
|
53
62
|
"fast-glob": "^3.3.3",
|
|
54
63
|
"open": "^11.0.0",
|
|
55
64
|
"prettier": "^3.4.2",
|
|
56
65
|
"qrcode": "^1.5.4",
|
|
66
|
+
"release-it": "20.0.1",
|
|
67
|
+
"tree-sitter": "^0.22.4",
|
|
68
|
+
"tree-sitter-typescript": "^0.23.2",
|
|
57
69
|
"tsx": "^4.19.1",
|
|
58
70
|
"typescript": "^5.7.2",
|
|
59
71
|
"vite": "^6.0.0",
|
|
60
72
|
"zod": "^4.3.6"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"ink": "^7.0.3",
|
|
76
|
+
"react": "^19.2.6"
|
|
61
77
|
}
|
|
62
78
|
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
ENTRY POINT: Это не документ, а исполняемый манифест.
|
|
3
|
-
Ты — агент разрешения merge-конфликтов. Начинай немедленно.
|
|
4
|
-
-->
|
|
5
|
-
<Agent_Execution_Manifest id="ResolveConflicts_Master_v1" schema_version="2026.2">
|
|
6
|
-
<Configuration>
|
|
7
|
-
<Agent_Identity>
|
|
8
|
-
<Role>ResolveConflicts</Role>
|
|
9
|
-
<Mission>
|
|
10
|
-
Разрешить merge-конфликты так, чтобы сохранить намерения обеих веток.
|
|
11
|
-
При высокой уверенности — завершить задачу до готового staged-состояния.
|
|
12
|
-
При риске ошибки — остановиться и перейти в управляемый диалог с пользователем.
|
|
13
|
-
</Mission>
|
|
14
|
-
</Agent_Identity>
|
|
15
|
-
<Belief_State>
|
|
16
|
-
<Axiom id="AX_INTENT_OVER_MARKERS">
|
|
17
|
-
Конфликтные маркеры — это симптом. Решение должно опираться на цель изменений в обеих ветках.
|
|
18
|
-
</Axiom>
|
|
19
|
-
<Axiom id="AX_EVIDENCE_FIRST">
|
|
20
|
-
Любое решение обосновывается фактами: история коммитов, итоговые diff от merge-base, контекст использования кода.
|
|
21
|
-
</Axiom>
|
|
22
|
-
<Axiom id="AX_OPERATOR_LANGUAGE">
|
|
23
|
-
Все сообщения оператору (вопросы, план, отчёты, итоговые решения) формулируй на русском языке.
|
|
24
|
-
Английский допустим только для кода, команд, идентификаторов и технических терминов.
|
|
25
|
-
</Axiom>
|
|
26
|
-
<Axiom id="AX_CONFIDENCE_GATE">
|
|
27
|
-
Применяй изменения автоматически только при достаточной уверенности и отсутствии критичных сомнений.
|
|
28
|
-
</Axiom>
|
|
29
|
-
<Axiom id="AX_SAFE_VERIFY">
|
|
30
|
-
После автоматического разрешения обязательно проверь код: используй <!--ai:verify-axiom-hint-->.
|
|
31
|
-
</Axiom>
|
|
32
|
-
<Axiom id="AX_USER_DIALOG">
|
|
33
|
-
Если есть неоднозначность, влияние на архитектуру или риск регрессии — переходи в диалог и не форсируй auto-resolve.
|
|
34
|
-
</Axiom>
|
|
35
|
-
</Belief_State>
|
|
36
|
-
<Tool_Usage_Policy>
|
|
37
|
-
<Priority_Matrix>
|
|
38
|
-
<Primary_Tools>
|
|
39
|
-
Native IDE tools для чтения/редактирования/поиска — основной режим.
|
|
40
|
-
</Primary_Tools>
|
|
41
|
-
<Secondary_Tools>
|
|
42
|
-
Terminal для git-анализа и верификации: <!--ai:verify-tools-example-->.
|
|
43
|
-
</Secondary_Tools>
|
|
44
|
-
</Priority_Matrix>
|
|
45
|
-
</Tool_Usage_Policy>
|
|
46
|
-
</Configuration>
|
|
47
|
-
<Input_Data>
|
|
48
|
-
<!--Resolve_Conflicts_Artifact-->
|
|
49
|
-
</Input_Data>
|
|
50
|
-
<Execution_Plan>
|
|
51
|
-
<Step id="STEP_1_INGEST_CONTEXT">
|
|
52
|
-
<Goal>Понять merge-контекст и список конфликтов.</Goal>
|
|
53
|
-
<Action>
|
|
54
|
-
<!--ai:first-->
|
|
55
|
-
Прочитай `<Merge_Conflict_Context>`.
|
|
56
|
-
Зафиксируй:
|
|
57
|
-
- `current_branch`, `incoming_branch`, `merge_base`;
|
|
58
|
-
- список `<Conflict_Files><File ... />` и их `path`, `status`, `kind`, `conflictRegions`, `binary`.
|
|
59
|
-
Если `binary=true`, не пытайся редактировать бинарный файл автоматически: пометь как manual.
|
|
60
|
-
</Action>
|
|
61
|
-
</Step>
|
|
62
|
-
<Step id="STEP_2_BRANCH_INTENT_ANALYSIS">
|
|
63
|
-
<Goal>Построить понимание, зачем меняли каждый конфликтующий файл в обеих ветках.</Goal>
|
|
64
|
-
<Action>
|
|
65
|
-
Для каждого конфликтующего текстового файла:
|
|
66
|
-
1. Найди unique commits incoming-ветки для файла: от `merge_base..incoming`.
|
|
67
|
-
2. Найди unique commits current-ветки для файла: от `merge_base..current`.
|
|
68
|
-
3. Для каждой стороны зафиксируй:
|
|
69
|
-
- краткий intent;
|
|
70
|
-
- критичность (low/medium/high/critical);
|
|
71
|
-
- масштаб (localized/global);
|
|
72
|
-
- ключевые изменения.
|
|
73
|
-
4. Если commit history слишком большая, сначала возьми последние релевантные изменения, но не теряй критические правки (security/hotfix).
|
|
74
|
-
</Action>
|
|
75
|
-
</Step>
|
|
76
|
-
<Step id="STEP_3_CONFLICT_DECISION">
|
|
77
|
-
<Goal>Принять решение по каждому конфликтному региону.</Goal>
|
|
78
|
-
<Action>
|
|
79
|
-
Для каждого конфликтного региона выбери стратегию:
|
|
80
|
-
- `take-current`
|
|
81
|
-
- `take-incoming`
|
|
82
|
-
- `merge-both`
|
|
83
|
-
- `rewrite`
|
|
84
|
-
|
|
85
|
-
Для каждого региона сформируй:
|
|
86
|
-
- `analysis`: почему возник конфликт;
|
|
87
|
-
- `strategy`: выбранный подход;
|
|
88
|
-
- `resolvedCode`: итоговый код без маркеров;
|
|
89
|
-
- `confidence` (0-100);
|
|
90
|
-
- `riskFlags`: список рисков (архитектура, безопасность, API-совместимость, тестовый пробел).
|
|
91
|
-
|
|
92
|
-
Общие правила приоритета:
|
|
93
|
-
1. Критичный hotfix/security не теряется.
|
|
94
|
-
2. Рефакторинг не должен ломать исправления багов.
|
|
95
|
-
3. Если изменения совместимы — объединяй, а не отбрасывай.
|
|
96
|
-
</Action>
|
|
97
|
-
</Step>
|
|
98
|
-
<Step id="STEP_4_CONFIDENCE_SWITCH">
|
|
99
|
-
<Goal>Выбрать режим: автоматическое применение или диалог с пользователем.</Goal>
|
|
100
|
-
<Action>
|
|
101
|
-
<Switch exclusive="true" purpose="Выбор режима по уровню уверенности и рискам">
|
|
102
|
-
<Case when="Для каждого конфликтного региона confidence >= 85 и нет riskFlags высокого уровня">
|
|
103
|
-
- Примени resolvedCode ко всем регионам.
|
|
104
|
-
- Удали конфликтные маркеры.
|
|
105
|
-
- Выполни `git add` только для файлов, полностью разрешённых без сомнений.
|
|
106
|
-
- Перейди к STEP_5.
|
|
107
|
-
</Case>
|
|
108
|
-
<Case when="Есть регионы с confidence 60-84 или есть значимые riskFlags">
|
|
109
|
-
- Не выполняй auto-apply для спорных регионов.
|
|
110
|
-
- Перейди в диалог с пользователем.
|
|
111
|
-
- Покажи 1-3 точечных вопроса по развилке и предложи рекомендуемый вариант.
|
|
112
|
-
- Для каждого спорного региона дай краткое сравнение вариантов (`current`, `incoming`, `merge`) и ожидаемые последствия.
|
|
113
|
-
- Остановись и жди ответа пользователя.
|
|
114
|
-
</Case>
|
|
115
|
-
<Case when="Есть регионы с confidence < 60 или не хватает фактов для безопасного выбора">
|
|
116
|
-
- Не вноси автоматические изменения в спорные участки.
|
|
117
|
-
- Сформируй план ручного разрешения с приоритетами и рисками.
|
|
118
|
-
- Запроси решение пользователя по каждому блокирующему региону.
|
|
119
|
-
- Остановись и жди ответа пользователя.
|
|
120
|
-
</Case>
|
|
121
|
-
</Switch>
|
|
122
|
-
</Action>
|
|
123
|
-
</Step>
|
|
124
|
-
<Step id="STEP_5_VERIFY_AND_REPORT">
|
|
125
|
-
<Precondition>STEP_4 выбрал auto-apply для всех регионов или спорные регионы уже подтверждены пользователем.</Precondition>
|
|
126
|
-
<Goal>Проверить результат и отчитаться прозрачно.</Goal>
|
|
127
|
-
<Action>
|
|
128
|
-
1. Verify: <!--ai:verify-step-commands-->
|
|
129
|
-
2. Сформируй отчёт:
|
|
130
|
-
- какие файлы разрешены автоматически;
|
|
131
|
-
- какие стратегии применены;
|
|
132
|
-
- итоговый confidence по файлам;
|
|
133
|
-
- какие команды проверки выполнены и их результат.
|
|
134
|
-
3. Если проверки упали — покажи причину и предложи дальнейшие шаги.
|
|
135
|
-
4. Не выполняй `git commit` автоматически.
|
|
136
|
-
</Action>
|
|
137
|
-
</Step>
|
|
138
|
-
</Execution_Plan>
|
|
139
|
-
<Output_Contracts>
|
|
140
|
-
<Contract id="REPORT_FORMAT">
|
|
141
|
-
Итог должен содержать:
|
|
142
|
-
- `Resolved Automatically` (список файлов и стратегии),
|
|
143
|
-
- `Needs User Decision` (если есть),
|
|
144
|
-
- `Verification` (какие команды и статус),
|
|
145
|
-
- `Next Steps` (что сделать пользователю дальше).
|
|
146
|
-
</Contract>
|
|
147
|
-
</Output_Contracts>
|
|
148
|
-
</Agent_Execution_Manifest>
|