@mrciphersmith/keryx 0.2.9
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/LICENSE +21 -0
- package/README.md +351 -0
- package/dist/cli.js +48427 -0
- package/dist/proxy-worker.js +381 -0
- package/package.json +63 -0
- package/src/gdgraph/affected.test.ts +100 -0
- package/src/gdgraph/affected.ts +135 -0
- package/src/gdgraph/build-integrity.test.ts +193 -0
- package/src/gdgraph/build-lang.test.ts +399 -0
- package/src/gdgraph/build.test.ts +120 -0
- package/src/gdgraph/build.ts +804 -0
- package/src/gdgraph/config.test.ts +47 -0
- package/src/gdgraph/config.ts +113 -0
- package/src/gdgraph/core-sources.test.ts +99 -0
- package/src/gdgraph/core-sources.ts +20 -0
- package/src/gdgraph/enrich.ts +79 -0
- package/src/gdgraph/fallback.test.ts +153 -0
- package/src/gdgraph/find.test.ts +78 -0
- package/src/gdgraph/find.ts +107 -0
- package/src/gdgraph/pagerank.ts +129 -0
- package/src/gdgraph/path.test.ts +56 -0
- package/src/gdgraph/path.ts +112 -0
- package/src/gdgraph/query.ts +133 -0
- package/src/gdgraph/repomap.test.ts +110 -0
- package/src/gdgraph/repomap.ts +193 -0
- package/src/gdgraph/service.test.ts +59 -0
- package/src/gdgraph/service.ts +51 -0
- package/src/gdgraph/staleness.ts +20 -0
- package/src/gdgraph/symbol.test.ts +89 -0
- package/src/gdgraph/symbol.ts +123 -0
- package/src/gdgraph/symbols-capability.test.ts +41 -0
- package/src/gdgraph/symbols-capability.ts +49 -0
- package/src/gdgraph/target.ts +56 -0
- package/src/gdgraph/treesitter/adapter.test.ts +249 -0
- package/src/gdgraph/treesitter/adapter.ts +213 -0
- package/src/gdgraph/treesitter/extract.test.ts +278 -0
- package/src/gdgraph/treesitter/extract.ts +389 -0
- package/src/gdgraph/treesitter/grammars.ts +110 -0
- package/src/gdgraph/treesitter/no-treesitter-import.test.ts +51 -0
- package/src/gdgraph/treesitter/resolve-calls.test.ts +38 -0
- package/src/gdgraph/types.ts +63 -0
- package/src/gdskills/bundled/rules/core/api-contracts.mdc +148 -0
- package/src/gdskills/bundled/rules/core/async-patterns.mdc +185 -0
- package/src/gdskills/bundled/rules/core/clean-architecture.mdc +163 -0
- package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +49 -0
- package/src/gdskills/bundled/rules/core/code-review-b091-profile.mdc +48 -0
- package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +54 -0
- package/src/gdskills/bundled/rules/core/commit-message-formatting.mdc +25 -0
- package/src/gdskills/bundled/rules/core/database-patterns.mdc +162 -0
- package/src/gdskills/bundled/rules/core/documentation-management.mdc +106 -0
- package/src/gdskills/bundled/rules/core/error-handling.mdc +163 -0
- package/src/gdskills/bundled/rules/core/execution-metrics.md +99 -0
- package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +40 -0
- package/src/gdskills/bundled/rules/core/git-rules.mdc +37 -0
- package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +198 -0
- package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +149 -0
- package/src/gdskills/bundled/rules/core/implementation-plans.mdc +58 -0
- package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +221 -0
- package/src/gdskills/bundled/rules/core/mobx-store-template.mdc +561 -0
- package/src/gdskills/bundled/rules/core/model-selection.mdc +53 -0
- package/src/gdskills/bundled/rules/core/nestjs-dto.mdc +50 -0
- package/src/gdskills/bundled/rules/core/playwright-testing.mdc +321 -0
- package/src/gdskills/bundled/rules/core/requirements-management.mdc +35 -0
- package/src/gdskills/bundled/rules/core/requirements-package-standard.mdc +103 -0
- package/src/gdskills/bundled/rules/core/review-agent-profile.mdc +49 -0
- package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +44 -0
- package/src/gdskills/bundled/rules/core/rule-management-workflow.mdc +62 -0
- package/src/gdskills/bundled/rules/core/security-baseline.mdc +155 -0
- package/src/gdskills/bundled/rules/core/shared-definitions.mdc +79 -0
- package/src/gdskills/bundled/rules/core/skill-lifecycle.mdc +55 -0
- package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +88 -0
- package/src/gdskills/bundled/rules/core/solid-principles.mdc +149 -0
- package/src/gdskills/bundled/rules/core/storybook-guidelines.mdc +36 -0
- package/src/gdskills/bundled/rules/core/subagent-context-construction.md +107 -0
- package/src/gdskills/bundled/rules/core/subagent-status-protocol.md +169 -0
- package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +96 -0
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +47 -0
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +55 -0
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +352 -0
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +39 -0
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +29 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +567 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +567 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +655 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +567 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +567 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/input-contract.schema.json +134 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +183 -0
- package/src/gdskills/bundled/skills/orchestration/context-collector/output-contract.schema.json +208 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +1412 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +1412 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.detail.md +735 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +468 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +1412 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +1412 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.md +62 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.template.md +79 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/input-contract.schema.json +247 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +362 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/output-contract.schema.json +87 -0
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +105 -0
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +105 -0
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +165 -0
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +379 -0
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +33 -0
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/output-contract.schema.json +41 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +307 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +307 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +373 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +307 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +307 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/input-contract.schema.json +130 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/issue-request.template.md +50 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +155 -0
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/output-contract.schema.json +61 -0
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +365 -0
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +365 -0
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +373 -0
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +365 -0
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +365 -0
- package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +55 -0
- package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +58 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +1701 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +1701 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1734 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +1701 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +1701 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/input-contract.schema.json +188 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +179 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/output-contract.schema.json +103 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/state.schema.json +164 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +395 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +395 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +556 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +395 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +395 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +204 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +206 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +51 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +111 -0
- package/src/gdskills/bundled/skills/planning/autodoc-analyst/SKILL.md +163 -0
- package/src/gdskills/bundled/skills/planning/autodoc-architect/SKILL.md +161 -0
- package/src/gdskills/bundled/skills/planning/autodoc-assembler/SKILL.md +128 -0
- package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +321 -0
- package/src/gdskills/bundled/skills/planning/autodoc-scanner/SKILL.md +166 -0
- package/src/gdskills/bundled/skills/planning/autodoc-writer/SKILL.md +253 -0
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +46 -0
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +90 -0
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +90 -0
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +90 -0
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +33 -0
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +33 -0
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +190 -0
- package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +142 -0
- package/src/gdskills/bundled/skills/planning/docpack-orchestrator/input-contract.schema.json +31 -0
- package/src/gdskills/bundled/skills/planning/docpack-orchestrator/output-contract.schema.json +31 -0
- package/src/gdskills/bundled/skills/planning/docpack-review/SKILL.md +80 -0
- package/src/gdskills/bundled/skills/planning/docpack-review/input-contract.schema.json +20 -0
- package/src/gdskills/bundled/skills/planning/docpack-review/output-contract.schema.json +36 -0
- package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +181 -0
- package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +181 -0
- package/src/gdskills/bundled/skills/planning/interview/SKILL.md +187 -0
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +94 -0
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +99 -0
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +99 -0
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +105 -0
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +33 -0
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +33 -0
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +237 -0
- package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +33 -0
- package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +33 -0
- package/src/gdskills/bundled/skills/planning/planner/SKILL.md +190 -0
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +193 -0
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +193 -0
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +193 -0
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +193 -0
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +193 -0
- package/src/gdskills/bundled/skills/planning/prd-creator/input-contract.schema.json +63 -0
- package/src/gdskills/bundled/skills/planning/prd-creator/output-contract.schema.json +175 -0
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +31 -0
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +31 -0
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +153 -0
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +32 -0
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +32 -0
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +166 -0
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +44 -0
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +44 -0
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +243 -0
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +43 -0
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +43 -0
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +193 -0
- package/src/gdskills/bundled/skills/platform/agent-entrypoint-distiller/SKILL.md +47 -0
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +87 -0
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +87 -0
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +87 -0
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +100 -0
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +100 -0
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +100 -0
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +45 -0
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +84 -0
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +84 -0
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +84 -0
- package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +66 -0
- package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +66 -0
- package/src/gdskills/bundled/skills/quality/commit/SKILL.md +66 -0
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +40 -0
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +66 -0
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +66 -0
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +66 -0
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +45 -0
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +81 -0
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +81 -0
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +81 -0
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +42 -0
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +70 -0
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +70 -0
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +70 -0
- package/src/gdskills/bundled/skills/quality/metaproject-security/SKILL.md +103 -0
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +48 -0
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +83 -0
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +83 -0
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +83 -0
- package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +75 -0
- package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +75 -0
- package/src/gdskills/bundled/skills/quality/pr/SKILL.md +75 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +364 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +295 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +378 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +364 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +38 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/input-contract.schema.json +53 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/output-contract.schema.json +46 -0
- package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +52 -0
- package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +52 -0
- package/src/gdskills/bundled/skills/quality/push/SKILL.md +52 -0
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +40 -0
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +61 -0
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +61 -0
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.md +61 -0
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +30 -0
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +75 -0
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +75 -0
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +75 -0
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +64 -0
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +74 -0
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +339 -0
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +48 -0
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +44 -0
- package/src/gdskills/bundled/skills/quality/tests-creator/input-contract.schema.json +121 -0
- package/src/gdskills/bundled/skills/quality/tests-creator/output-contract.schema.json +127 -0
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +204 -0
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +204 -0
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +203 -0
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +204 -0
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +204 -0
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +209 -0
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +209 -0
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +208 -0
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +209 -0
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +209 -0
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +263 -0
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +263 -0
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +258 -0
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +263 -0
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +263 -0
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +175 -0
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +175 -0
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +168 -0
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +175 -0
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +175 -0
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +360 -0
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +337 -0
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +477 -0
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +93 -0
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +119 -0
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +595 -0
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +144 -0
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +519 -0
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +323 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +927 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/input-contract.schema.json +153 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/output-contract.schema.json +77 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/review-context.schema.json +389 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +189 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +241 -0
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +344 -0
- package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +327 -0
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +348 -0
- package/src/gdskills/bundled/skills/review/review-strict/SKILL.md +328 -0
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +343 -0
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +134 -0
- package/src/gdskills/bundled/skills/shared/git-merge-base.md +33 -0
- package/src/gdskills/contracts/agent-event.schema.json +32 -0
- package/src/gdskills/contracts/orchestrator-state.schema.json +58 -0
- package/src/gdskills/contracts/review-finding.schema.json +59 -0
- package/src/gdskills/contracts/subagent-dispatch.schema.json +123 -0
- package/src/gdskills/contracts/subagent-result.schema.json +136 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-b091-review
|
|
3
|
+
description: "Performs strict b091-style code review following code-review-b091-profile.mdc. Reviews current branch changes from merge-base. Direct, no-fluff feedback focused on logic correctness. Use when: b091 review requested, strict validation needed."
|
|
4
|
+
triggers:
|
|
5
|
+
- "Review as b091"
|
|
6
|
+
- "b091 style review"
|
|
7
|
+
- "b091 review"
|
|
8
|
+
metadata:
|
|
9
|
+
author: "MrCipherSmith"
|
|
10
|
+
version: "1.0.0"
|
|
11
|
+
category: "review"
|
|
12
|
+
license: "MIT"
|
|
13
|
+
compatibility: "cursor,codex,zed,opencode"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# Code Review as b091 (только текущая ветка)
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
Copy this checklist and track progress:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
b091 Review Progress:
|
|
25
|
+
- [ ] Step 1: Determine parent branch and calculate merge-base
|
|
26
|
+
- [ ] Step 2: Collect git diff (committed + local changes)
|
|
27
|
+
- [ ] Step 3: Apply b091 principles (logic in correct layer, no ducttape)
|
|
28
|
+
- [ ] Step 4: Check types (no any, typed mocks)
|
|
29
|
+
- [ ] Step 5: Verify conventions (currentState, I prefix, etc.)
|
|
30
|
+
- [ ] Step 6: Challenge all assumptions
|
|
31
|
+
- [ ] Step 7: Generate direct report with patches
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Обязательные правила
|
|
35
|
+
|
|
36
|
+
1) **Скоуп по умолчанию (без commit hash/range в запросе)**: ревью включает **все** изменения в текущей ветке от точки ответвления (merge-base) от родительской ветки:
|
|
37
|
+
- закоммиченные (`BASE_SHA..HEAD`)
|
|
38
|
+
- локальные незакоммиченные (staged/unstaged/untracked)
|
|
39
|
+
2) **Скоуп при явном commit hash/range**: если пользователь явно передал hash или диапазон, ревьюй только запрошенный диапазон; локальные незакоммиченные изменения не добавляй, если это отдельно не попросили.
|
|
40
|
+
3) **Стиль/принципы b091**: ревью строго по `.metaproject/rules/core/code-review-b091-profile.mdc` (разделы правил и промпт).
|
|
41
|
+
4) **Результат**: подробный отчёт по проблемам с объяснением и предложением исправлений (минимальные патчи там, где это просто).
|
|
42
|
+
|
|
43
|
+
## Определение parent ref (детерминированно, именно родитель ветки)
|
|
44
|
+
|
|
45
|
+
Используй первый существующий вариант:
|
|
46
|
+
|
|
47
|
+
1. `origin/main`
|
|
48
|
+
2. `origin/master`
|
|
49
|
+
3. `main`
|
|
50
|
+
4. `master`
|
|
51
|
+
5. `@{upstream}` **только если это не текущая feature-ветка**
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
|
55
|
+
UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"
|
|
56
|
+
|
|
57
|
+
PARENT=""
|
|
58
|
+
if git rev-parse --verify -q "origin/main" >/dev/null; then
|
|
59
|
+
PARENT="origin/main"
|
|
60
|
+
elif git rev-parse --verify -q "origin/master" >/dev/null; then
|
|
61
|
+
PARENT="origin/master"
|
|
62
|
+
elif git rev-parse --verify -q "main" >/dev/null; then
|
|
63
|
+
PARENT="main"
|
|
64
|
+
elif git rev-parse --verify -q "master" >/dev/null; then
|
|
65
|
+
PARENT="master"
|
|
66
|
+
elif [ -n "$UPSTREAM_REF" ] && [ "$UPSTREAM_REF" != "$BRANCH" ] && [ "$UPSTREAM_REF" != "origin/$BRANCH" ]; then
|
|
67
|
+
PARENT="@{upstream}"
|
|
68
|
+
else
|
|
69
|
+
echo "Cannot determine parent ref" >&2
|
|
70
|
+
exit 1
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
BASE_SHA="$(git merge-base HEAD "$PARENT")"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Команды, чтобы собрать “срез” для ревью
|
|
77
|
+
|
|
78
|
+
### A) Режим по умолчанию (пользователь НЕ дал hash/range)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git status
|
|
82
|
+
|
|
83
|
+
# Закоммиченная часть ветки
|
|
84
|
+
git log --oneline "${BASE_SHA}..HEAD"
|
|
85
|
+
git diff --stat "${BASE_SHA}..HEAD"
|
|
86
|
+
git diff --name-status "${BASE_SHA}..HEAD"
|
|
87
|
+
git diff "${BASE_SHA}..HEAD"
|
|
88
|
+
|
|
89
|
+
# Полный текущий срез от merge-base до рабочего дерева:
|
|
90
|
+
# включает commit'ы + staged + unstaged
|
|
91
|
+
# (untracked смотри через git status / git ls-files)
|
|
92
|
+
git diff --stat "${BASE_SHA}"
|
|
93
|
+
git diff --name-status "${BASE_SHA}"
|
|
94
|
+
git diff "${BASE_SHA}"
|
|
95
|
+
git ls-files --others --exclude-standard
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### B) Режим с явным hash/range
|
|
99
|
+
|
|
100
|
+
Если пользователь дал конкретный hash/range, используй его буквально:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Примеры:
|
|
104
|
+
git show --stat --name-status --patch <COMMIT_SHA>
|
|
105
|
+
git log --oneline <FROM_SHA>..<TO_SHA>
|
|
106
|
+
git diff --stat <FROM_SHA>..<TO_SHA>
|
|
107
|
+
git diff --name-status <FROM_SHA>..<TO_SHA>
|
|
108
|
+
git diff <FROM_SHA>..<TO_SHA>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Как ревьюить (по b091)
|
|
112
|
+
|
|
113
|
+
Применяй чек-лист и промпт из `.metaproject/rules/core/code-review-b091-profile.mdc`. Ключевые акценты b091:
|
|
114
|
+
|
|
115
|
+
- Логика должна жить в правильном слое (часто — в store), чтобы её можно было нормально тестировать.
|
|
116
|
+
- Против “patch/glue/ducttape”: требуй чинить причину, а не маскировать симптомы.
|
|
117
|
+
- В новом коде никаких `any`, `as any`, небезопасных кастов; моки — типизированные и не наследуются от реальных реализаций.
|
|
118
|
+
- Не плодить дублирование правил/проверок: один источник правды, переиспользовать сеттеры/методы.
|
|
119
|
+
- Конвенции проекта обязательны (например, `currentState`, `I` для интерфейсов, консистентные типы).
|
|
120
|
+
- Магические числа / `setTimeout(0)` / "страшные" хаки — только с чётким "почему", либо перепроектировать.
|
|
121
|
+
- **Accessibility модификаторы в сторах**: inter-store callbacks (`onChangeX`, `onFireX`, `handleX`, `syncX`) обязаны быть `private`. Публичный метод допустим только если он вызывается из React-компонента. Спросить: "Вызывается ли этот метод из JSX?" Если нет — `private`.
|
|
122
|
+
- С MobX по умолчанию **не добавлять** `useCallback`/`useMemo` без явной необходимости.
|
|
123
|
+
- Предложения должны проходить линт; не нитпикать автоформатирование.
|
|
124
|
+
- Не раздувать scope: большие рефакторы “not today”, если вне задачи.
|
|
125
|
+
|
|
126
|
+
## Формат вывода (подробный отчёт + тон b091)
|
|
127
|
+
|
|
128
|
+
Пиши по-русски, но допускай короткие b091-маркеры (например, `not today ;P`, “ducttape”, “broken thinking”) только по делу и без перехода на личности.
|
|
129
|
+
|
|
130
|
+
Используй структуру:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
## Вердикт (b091)
|
|
134
|
+
<OK / needs work / fundamentally wrong> + 1–3 самых важных тезиса.
|
|
135
|
+
|
|
136
|
+
## Скоуп ревью (только текущая ветка)
|
|
137
|
+
- Ветка: `<BRANCH>`
|
|
138
|
+
- Parent ref: `<PARENT>`
|
|
139
|
+
- Merge-base: `<BASE_SHA>`
|
|
140
|
+
- Режим скоупа: `<default-with-uncommitted | explicit-hash-range>`
|
|
141
|
+
- Коммиты (merge-base..HEAD): <N>
|
|
142
|
+
- Изменённые файлы: <список или количество>
|
|
143
|
+
|
|
144
|
+
## Находки (подробно)
|
|
145
|
+
### Архитектура и место логики
|
|
146
|
+
<находки>
|
|
147
|
+
|
|
148
|
+
### Типы, касты, моки
|
|
149
|
+
<находки>
|
|
150
|
+
|
|
151
|
+
### Корректность и семантика состояний
|
|
152
|
+
<находки>
|
|
153
|
+
|
|
154
|
+
### Конвенции и консистентность
|
|
155
|
+
<находки>
|
|
156
|
+
|
|
157
|
+
### Линт/формат/шум
|
|
158
|
+
<находки>
|
|
159
|
+
|
|
160
|
+
### UX/edge cases
|
|
161
|
+
<находки>
|
|
162
|
+
|
|
163
|
+
### Тестируемость
|
|
164
|
+
<находки>
|
|
165
|
+
|
|
166
|
+
## Предложенные исправления (patches)
|
|
167
|
+
<минимальные unified diff-патчи для очевидных правок>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Формат каждой находки (обязательно)
|
|
171
|
+
|
|
172
|
+
Для каждой находки укажи:
|
|
173
|
+
|
|
174
|
+
- **Severity**: `blocker` / `major` / `minor`
|
|
175
|
+
- **Location**: путь файла + релевантный hunk/фрагмент из diff
|
|
176
|
+
- **Problem**: что не так
|
|
177
|
+
- **Why it matters**: почему это важно (корректность/тестируемость/конвенции/поддерживаемость)
|
|
178
|
+
- **Suggested fix**: что конкретно сделать (точечно, без раздувания scope)
|
|
179
|
+
- **Optional patch**: если фикс простой — unified diff
|
|
180
|
+
|
|
181
|
+
Пример блока патча:
|
|
182
|
+
|
|
183
|
+
```diff
|
|
184
|
+
diff --git a/path/file.ts b/path/file.ts
|
|
185
|
+
index 0000000..1111111 100644
|
|
186
|
+
--- a/path/file.ts
|
|
187
|
+
+++ b/path/file.ts
|
|
188
|
+
@@ -1,3 +1,3 @@
|
|
189
|
+
-const x = 1;
|
|
190
|
+
+const x = 2;
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Job Context Awareness
|
|
196
|
+
|
|
197
|
+
When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY include:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
JOB_NAME: <job-name>
|
|
201
|
+
CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
If provided and the file exists, read the context document before starting the review. Use it to:
|
|
205
|
+
- Understand which libraries and patterns were intentionally chosen for the implementation
|
|
206
|
+
- Avoid flagging correct library usage as issues
|
|
207
|
+
- Provide more accurate findings by understanding the project's architectural decisions
|
|
208
|
+
|
|
209
|
+
If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-mobx-store-review
|
|
3
|
+
description: "Targeted MobX store and state logic review. Checks store/actions/computed/reactions, async runInAction, state typing, View↔Store boundaries. Use when: reviewing MobX changes, state management validation."
|
|
4
|
+
triggers:
|
|
5
|
+
- "Review MobX store"
|
|
6
|
+
- "Check store changes"
|
|
7
|
+
- "MobX review"
|
|
8
|
+
metadata:
|
|
9
|
+
author: "MrCipherSmith"
|
|
10
|
+
version: "1.1.0"
|
|
11
|
+
category: "review"
|
|
12
|
+
license: "MIT"
|
|
13
|
+
compatibility: "cursor,codex,zed,opencode"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Code MobX Store Review (только текущая ветка)
|
|
19
|
+
|
|
20
|
+
Проводи ревью только изменений текущей ветки от merge-base с родительской веткой. Фокусируйся на корректности состояния, MobX-паттернах и границах архитектуры.
|
|
21
|
+
|
|
22
|
+
## Scope
|
|
23
|
+
|
|
24
|
+
- Если пользователь **не передал commit hash/range**, ревьюируй полный срез от merge-base до рабочего дерева:
|
|
25
|
+
- закоммиченные изменения (`BASE_SHA..HEAD`)
|
|
26
|
+
- локальные (`staged/unstaged/untracked`)
|
|
27
|
+
- Если пользователь **явно передал commit hash/range**, ревьюируй только его.
|
|
28
|
+
- Не ревьюй легаси вне измененного скоупа.
|
|
29
|
+
- Привязывай замечания к измененным строкам в diff.
|
|
30
|
+
|
|
31
|
+
## Git workflow (определение parent и merge-base)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
|
35
|
+
UPSTREAM_REF="$(git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || true)"
|
|
36
|
+
|
|
37
|
+
PARENT=""
|
|
38
|
+
if git rev-parse --verify -q "origin/main" >/dev/null; then
|
|
39
|
+
PARENT="origin/main"
|
|
40
|
+
elif git rev-parse --verify -q "origin/master" >/dev/null; then
|
|
41
|
+
PARENT="origin/master"
|
|
42
|
+
elif git rev-parse --verify -q "main" >/dev/null; then
|
|
43
|
+
PARENT="main"
|
|
44
|
+
elif git rev-parse --verify -q "master" >/dev/null; then
|
|
45
|
+
PARENT="master"
|
|
46
|
+
elif [ -n "$UPSTREAM_REF" ] && [ "$UPSTREAM_REF" != "$BRANCH" ] && [ "$UPSTREAM_REF" != "origin/$BRANCH" ]; then
|
|
47
|
+
PARENT="@{upstream}"
|
|
48
|
+
else
|
|
49
|
+
echo "Cannot determine parent ref" >&2
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
BASE_SHA="$(git merge-base HEAD "$PARENT")"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Команды сбора изменений
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git status
|
|
60
|
+
git log --oneline "${BASE_SHA}..HEAD"
|
|
61
|
+
git diff --name-status --find-renames "${BASE_SHA}..HEAD"
|
|
62
|
+
git diff --find-renames "${BASE_SHA}..HEAD"
|
|
63
|
+
git diff --name-status --find-renames "${BASE_SHA}"
|
|
64
|
+
git diff --find-renames "${BASE_SHA}"
|
|
65
|
+
git ls-files --others --exclude-standard
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## MobX review checklist
|
|
69
|
+
|
|
70
|
+
### Store structure
|
|
71
|
+
- Store-класс должен иметь `makeObservable(this)` в конструкторе.
|
|
72
|
+
- Состояние хранится в `@observable`/`@observable.shallow`/`@observable.ref`.
|
|
73
|
+
- Производные значения в `@computed`, а не в View.
|
|
74
|
+
|
|
75
|
+
### Member ordering
|
|
76
|
+
Проверяй порядок членов класса (соответствие `@typescript-eslint/member-ordering` и проектной конвенции):
|
|
77
|
+
1. `@observable` поля (публичное состояние, без модификатора)
|
|
78
|
+
2. `private` поля (внутреннее состояние: `disposed`, `initialized`, и т.д.)
|
|
79
|
+
3. `constructor`
|
|
80
|
+
4. `@computed` геттеры
|
|
81
|
+
5. `dispose()` — lifecycle очистки
|
|
82
|
+
6. `init()` / `onMount()` — lifecycle инициализации
|
|
83
|
+
7. `@action.bound` методы — UI-facing actions
|
|
84
|
+
8. `private` методы — API-вызовы и внутренняя логика
|
|
85
|
+
|
|
86
|
+
### Member accessibility modifiers
|
|
87
|
+
ESLint: `@typescript-eslint/explicit-member-accessibility: ["error", { accessibility: "no-public" }]` — слово `public` **запрещено**.
|
|
88
|
+
|
|
89
|
+
- *(без модификатора)*: `@observable` поля, `@computed` геттеры, `@action.bound` методы, `dispose()`, `init()` — публичный API стора.
|
|
90
|
+
- `private`: внутреннее состояние (`disposed`, `initialized`), хелпер-методы, методы с API-вызовами (`fetchX`, `performX`), inter-store callbacks (`onChangeX`, `onFireX`, `handleX`, `syncX`).
|
|
91
|
+
- `private readonly`: инжектированные через конструктор зависимости, неизменяемая конфигурация (`id`, `context`).
|
|
92
|
+
- `readonly`: неизменяемые публичные identity-поля (`pipelineType`, `contextActions`).
|
|
93
|
+
- `protected`: только в абстрактных базовых классах для точек расширения.
|
|
94
|
+
|
|
95
|
+
Флаги ревью:
|
|
96
|
+
- Использование слова `public` — **ошибка ESLint** (error level).
|
|
97
|
+
- `private` поле которое можно сделать `private readonly` — предложи `readonly`.
|
|
98
|
+
- Отсутствие `private` на внутреннем состоянии или хелпер-методах — **warning**.
|
|
99
|
+
|
|
100
|
+
### Actions and async
|
|
101
|
+
- Любая мутация состояния в действиях (`@action.bound` или через `runInAction`).
|
|
102
|
+
- После `await` для мутаций использовать `runInAction`.
|
|
103
|
+
- Избегать прямых мутаций store извне action-слоя.
|
|
104
|
+
|
|
105
|
+
### Action binding rules
|
|
106
|
+
- **`@action.bound`**: только для методов вызываемых из UI (компонентов). Это тонкие обёртки которые делегируют в private-методы.
|
|
107
|
+
- **Private метод + `runInAction`**: для методов содержащих API-вызовы и мутации состояния.
|
|
108
|
+
- **Никогда** не использовать `@action.bound` на private-методах.
|
|
109
|
+
- **Исключение**: `@action.bound private` допустим для inter-store callbacks — методов, передаваемых как bound-ссылки в дочерние/сиблинг сторы (например `new CodeEditorStore(this.onChangeEditorState)`).
|
|
110
|
+
|
|
111
|
+
Флаги ревью:
|
|
112
|
+
- `@action.bound` метод содержит API-вызов напрямую — **warning**: вынести API в private метод.
|
|
113
|
+
- `@action.bound` на private методе (кроме inter-store callbacks) — **warning**: убрать декоратор, использовать `runInAction` внутри.
|
|
114
|
+
- Метод вызываемый из другого стора помечен `@action.bound` вместо plain method — **suggestion**.
|
|
115
|
+
|
|
116
|
+
### Inter-store callbacks and internal handlers
|
|
117
|
+
Методы служащие **внутренними callback'ами** между сторами или внутренними обработчиками событий ОБЯЗАНЫ быть `private`. Они НЕ являются частью публичного API стора.
|
|
118
|
+
|
|
119
|
+
**Паттерны имён которые ОБЯЗАНЫ быть `private`:**
|
|
120
|
+
- `onChangeEditorState(state)` — callback получающий состояние от дочернего/сиблинг стора
|
|
121
|
+
- `onFireExecutorChange()` — внутренний sync-обработчик при смене executor
|
|
122
|
+
- `onChangeX(value)` — обработчик для внутренней синхронизации состояния между сторами
|
|
123
|
+
- `handleX()`, `syncX()` — любой метод внутренней координации
|
|
124
|
+
|
|
125
|
+
**Правило решения:** Спроси "Этот метод вызывается из React-компонента через JSX/event handler?" Если НЕТ — он `private`.
|
|
126
|
+
|
|
127
|
+
Флаги ревью:
|
|
128
|
+
- Публичный метод с паттерном `onChangeX`, `onFireX`, `handleX`, `syncX` который не вызывается из компонентов — **warning**: сделать `private`.
|
|
129
|
+
- Inter-store callback без `private` — **warning**: нарушение инкапсуляции стора.
|
|
130
|
+
|
|
131
|
+
### Bidirectional sync bounce protection
|
|
132
|
+
Когда два стора синхронизируют состояние **в обоих направлениях** (Store A → Store B и Store B → Store A), как минимум одно направление ОБЯЗАНО иметь equality guard (`if (newValue !== currentValue)`) перед записью в другой стор, чтобы предотвратить бесконечный цикл callback'ов.
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
// CORRECT — equality guard prevents bounce
|
|
136
|
+
private onChangeEditorState(editorState: ICodeEditorState) {
|
|
137
|
+
this.setRawScript(editorState.script);
|
|
138
|
+
const codeExecutorId = this.codeExecutor?.id;
|
|
139
|
+
if (codeExecutorId && this.codeEditorStore.executorId !== codeExecutorId) {
|
|
140
|
+
this.codeEditorStore.setExecutorId(codeExecutorId);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// WRONG — no guard, infinite loop
|
|
145
|
+
private onChangeEditorState(editorState: ICodeEditorState) {
|
|
146
|
+
this.setRawScript(editorState.script);
|
|
147
|
+
const codeExecutorId = this.codeExecutor?.id;
|
|
148
|
+
if (codeExecutorId) {
|
|
149
|
+
this.codeEditorStore.setExecutorId(codeExecutorId); // bounces back
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Флаги ревью:
|
|
155
|
+
- Bidirectional store sync без equality guard — **critical**: риск бесконечного цикла callback'ов.
|
|
156
|
+
- Store A пишет в Store B в callback'е от Store B без проверки `!==` — **critical**.
|
|
157
|
+
|
|
158
|
+
### Truthy vs equality guards for optional values
|
|
159
|
+
Для guard'ов обновления состояния предпочитай **equality comparison** (`!==`) вместо **truthy checks** (`if (value && ...)`) для optional/nullable полей. Truthy guard блокирует пропагацию легитимных `undefined`/`null`/`0`/`""` значений.
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// WRONG — truthy guard blocks clearing
|
|
163
|
+
if (executor && executor.id !== this.executorId) {
|
|
164
|
+
this.setExecutorId(executor.id);
|
|
165
|
+
}
|
|
166
|
+
// executor = undefined → ничего не происходит → stale value
|
|
167
|
+
|
|
168
|
+
// CORRECT — equality guard allows clearing
|
|
169
|
+
if (executor?.id !== this.executorId) {
|
|
170
|
+
this.setExecutorId(executor?.id);
|
|
171
|
+
}
|
|
172
|
+
// executor = undefined → executorId = undefined → поле очищено
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Флаги ревью:
|
|
176
|
+
- Truthy guard (`if (x && x !== y)`) на optional/nullable поле — **warning**: блокирует пропагацию `undefined`/falsy clearing.
|
|
177
|
+
- `if (value)` вместо `if (value !== currentValue)` в sync-логике между сторами — **warning**: потенциально блокирует clearing.
|
|
178
|
+
|
|
179
|
+
### API calls placement
|
|
180
|
+
- API/IO вызовы **только** в `private` методах стора.
|
|
181
|
+
- `@action.bound` методы — тонкие: guard-check → делегирование в private метод.
|
|
182
|
+
- Компоненты **никогда** не вызывают API напрямую.
|
|
183
|
+
|
|
184
|
+
Флаги ревью:
|
|
185
|
+
- API-вызов внутри `@action.bound` метода — **warning**: вынести в private метод.
|
|
186
|
+
- API-вызов в компоненте — **critical**: перенести в стор.
|
|
187
|
+
|
|
188
|
+
### Lifecycle initialization
|
|
189
|
+
- `init()` / `onMount()` дочернего стора вызывается из **родительского стора**, не из component `useEffect`.
|
|
190
|
+
- Компоненты **не должны** триггерить загрузку данных стора через `useEffect`. Родительский стор оркестрирует lifecycle дочерних сторов.
|
|
191
|
+
- `dispose()` вызывается родительским стором в его `onUnmount()` для предотвращения stale-state обновлений.
|
|
192
|
+
|
|
193
|
+
Флаги ревью:
|
|
194
|
+
- Component `useEffect` вызывает `store.loadX()` или `store.init()` — **warning**: перенести вызов в родительский стор `onMount`.
|
|
195
|
+
- Отсутствие `dispose()` / disposed guard в сторе с async операциями — **warning**.
|
|
196
|
+
- Parent store не вызывает `child.dispose()` в `onUnmount()` — **warning**.
|
|
197
|
+
|
|
198
|
+
### View ↔ Store boundaries
|
|
199
|
+
- Бизнес-логика и IO остаются в Store/Service, не во View.
|
|
200
|
+
- Компоненты, читающие observable, должны быть `observer(...)`.
|
|
201
|
+
- `useEffect` не должен подменять lifecycle store-логики.
|
|
202
|
+
|
|
203
|
+
### TypeScript safety
|
|
204
|
+
- Не использовать `any` и небезопасные касты.
|
|
205
|
+
- Использовать явные интерфейсы для state и публичного API store.
|
|
206
|
+
- Избегать `!` без строгого доказательства инициализации.
|
|
207
|
+
|
|
208
|
+
## Output format
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
## Summary
|
|
212
|
+
- [1-3 bullets по итогам]
|
|
213
|
+
|
|
214
|
+
## Scope
|
|
215
|
+
- Branch: `<BRANCH>`
|
|
216
|
+
- Parent ref: `<PARENT>`
|
|
217
|
+
- Merge-base: `<BASE_SHA>`
|
|
218
|
+
- Scope mode: `<default-with-uncommitted | explicit-hash-range>`
|
|
219
|
+
|
|
220
|
+
## Critical issues (must fix)
|
|
221
|
+
### [Короткий заголовок]
|
|
222
|
+
- **Rule**: [core/mobx-store-template.mdc / core/code-style-patterns.mdc]
|
|
223
|
+
- **Why**: [почему это риск]
|
|
224
|
+
- **Where**: `path/to/file.ts` (строки из diff)
|
|
225
|
+
- **Fix**: [минимальное исправление]
|
|
226
|
+
- **Proposed patch**:
|
|
227
|
+
```diff
|
|
228
|
+
[unified diff]
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Warnings
|
|
232
|
+
[тот же формат]
|
|
233
|
+
|
|
234
|
+
## Suggestions
|
|
235
|
+
[точечные улучшения без расширения scope]
|
|
236
|
+
|
|
237
|
+
## File-by-file notes
|
|
238
|
+
- `path/to/file`: [краткие заметки]
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Rules of engagement
|
|
242
|
+
|
|
243
|
+
- Не предлагай новые библиотеки без запроса.
|
|
244
|
+
- Если есть несколько вариантов, дай один default и один краткий альтернативный.
|
|
245
|
+
- Исправления предлагай как минимальные патчи, не переписывай крупные блоки без необходимости.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Job Context Awareness
|
|
250
|
+
|
|
251
|
+
When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY include:
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
JOB_NAME: <job-name>
|
|
255
|
+
CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
If provided and the file exists, read the context document before starting the review. Use it to:
|
|
259
|
+
- Understand which libraries and patterns were intentionally chosen for the implementation
|
|
260
|
+
- Validate MobX patterns against documented project conventions
|
|
261
|
+
- Avoid flagging intentional architectural decisions as issues
|
|
262
|
+
|
|
263
|
+
If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.
|