@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,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Security baseline: no secrets in code, parameterized queries, input validation at boundaries, dependency hygiene. Use when writing any code that handles user input, credentials, or external data."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security Baseline
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Prevent the most common and highest-impact security vulnerabilities: hardcoded secrets, SQL injection, missing input validation, and exposed sensitive data.
|
|
10
|
+
|
|
11
|
+
## When To Apply
|
|
12
|
+
Apply when handling user input, writing queries, managing authentication, reading/writing files, or calling external services.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
### Rule 1: No Secrets in Code or Version Control
|
|
19
|
+
|
|
20
|
+
**FORBIDDEN in any committed file:**
|
|
21
|
+
- Passwords, API keys, tokens, connection strings
|
|
22
|
+
- Private keys (RSA, EC, SSH)
|
|
23
|
+
- JWT secrets, session secrets
|
|
24
|
+
- Webhook secrets
|
|
25
|
+
- Database credentials
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// BAD — secret hardcoded
|
|
29
|
+
const client = new S3Client({ credentials: { accessKeyId: 'AKIAIOSFODNN7EXAMPLE', secretAccessKey: 'wJalrXUtn...' } });
|
|
30
|
+
|
|
31
|
+
// GOOD — read from environment
|
|
32
|
+
const client = new S3Client({
|
|
33
|
+
credentials: {
|
|
34
|
+
accessKeyId: process.env.AWS_ACCESS_KEY_ID!,
|
|
35
|
+
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Required:**
|
|
41
|
+
- All secrets via environment variables or secret manager (Vault, AWS SSM, etc.)
|
|
42
|
+
- `.env` files listed in `.gitignore` before any credential is added
|
|
43
|
+
- `process.env.SECRET` access guarded with startup validation (fail-fast if missing)
|
|
44
|
+
|
|
45
|
+
### Rule 2: Parameterized Queries — No String Interpolation
|
|
46
|
+
SQL injection is the #1 critical vulnerability. Never build queries by string concatenation.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// BAD — SQL injection
|
|
50
|
+
const result = await db.query(`SELECT * FROM users WHERE id = '${userId}'`);
|
|
51
|
+
|
|
52
|
+
// GOOD — parameterized
|
|
53
|
+
const result = await db.query('SELECT * FROM users WHERE id = $1', [userId]);
|
|
54
|
+
|
|
55
|
+
// GOOD with ORM
|
|
56
|
+
const user = await User.findOne({ where: { id: userId } });
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The same rule applies to NoSQL queries: never use `$where` with interpolated strings in MongoDB, never eval-based queries.
|
|
60
|
+
|
|
61
|
+
### Rule 3: Validate All External Input
|
|
62
|
+
|
|
63
|
+
Every value from HTTP requests, CLI args, environment variables, and file reads is untrusted. Validate at the boundary before it enters the application:
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
// Bad — raw body passed to domain
|
|
67
|
+
app.post('/users', async (req, res) => {
|
|
68
|
+
await createUser(req.body); // unvalidated
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// Good — validate schema at boundary
|
|
72
|
+
import { z } from 'zod';
|
|
73
|
+
const CreateUserSchema = z.object({
|
|
74
|
+
name: z.string().min(1).max(100),
|
|
75
|
+
email: z.string().email(),
|
|
76
|
+
age: z.number().int().min(0).max(150),
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
app.post('/users', async (req, res) => {
|
|
80
|
+
const result = CreateUserSchema.safeParse(req.body);
|
|
81
|
+
if (!result.success) return res.status(400).json({ errors: result.error.issues });
|
|
82
|
+
await createUser(result.data); // typed, validated
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Validation requirements:**
|
|
87
|
+
- Type coercion is not validation — validate types AND constraints
|
|
88
|
+
- Validate string length bounds (prevent oversized payloads)
|
|
89
|
+
- Validate numeric ranges (prevent overflow attacks)
|
|
90
|
+
- Sanitize HTML if any user input is ever rendered in a browser
|
|
91
|
+
|
|
92
|
+
### Rule 4: Least Privilege for Database Access
|
|
93
|
+
- Application database user has only the permissions it needs (no `DROP TABLE`, no `CREATE DATABASE`)
|
|
94
|
+
- Separate read and write credentials where possible
|
|
95
|
+
- Never use `root` or `admin` database user in application code
|
|
96
|
+
|
|
97
|
+
### Rule 5: Never Log Sensitive Data
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// BAD
|
|
101
|
+
logger.info('User login', { user, password: req.body.password });
|
|
102
|
+
logger.debug('Payment processed', { card: payment.cardNumber });
|
|
103
|
+
|
|
104
|
+
// GOOD — log identifiers, not secrets
|
|
105
|
+
logger.info('User login', { userId: user.id, email: user.email });
|
|
106
|
+
logger.debug('Payment processed', { paymentId: payment.id, last4: payment.cardLast4 });
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Never log:** passwords, tokens, full credit card numbers, SSNs, private keys, full session cookies.
|
|
110
|
+
|
|
111
|
+
### Rule 6: Dependency Hygiene
|
|
112
|
+
- Run `npm audit` / `bun audit` before shipping any new dependency
|
|
113
|
+
- Pin major versions in `package.json` (no `*` or `latest`)
|
|
114
|
+
- Prefer dependencies with active maintenance (last commit < 1 year)
|
|
115
|
+
- Minimize dependency tree — if you can implement it in 10 lines, don't add a package
|
|
116
|
+
|
|
117
|
+
### Rule 7: Secure Defaults for HTTP
|
|
118
|
+
Every HTTP API must have:
|
|
119
|
+
- Rate limiting on authentication endpoints
|
|
120
|
+
- CORS configured explicitly (not `*` in production)
|
|
121
|
+
- Security headers: `X-Content-Type-Options`, `X-Frame-Options`, `Strict-Transport-Security`
|
|
122
|
+
- Request size limits (prevent DoS via oversized payloads)
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Pre-Commit Security Check
|
|
127
|
+
|
|
128
|
+
Before committing, verify:
|
|
129
|
+
- [ ] No API keys, tokens, or passwords in diff
|
|
130
|
+
- [ ] No `console.log` with sensitive data
|
|
131
|
+
- [ ] New environment variables documented in `.env.example`
|
|
132
|
+
- [ ] No `eval()`, `new Function()`, or dynamic `require()` with user input
|
|
133
|
+
- [ ] No `dangerouslySetInnerHTML` with unescaped user input (React)
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Iron Laws
|
|
138
|
+
|
|
139
|
+
**IRON LAW 1: A hardcoded secret in source code is a production security incident the moment it is committed.**
|
|
140
|
+
**IRON LAW 2: String interpolation in SQL queries is forbidden. No exceptions for "internal" data.**
|
|
141
|
+
**IRON LAW 3: External input that reaches the database, filesystem, or shell without validation is an attack surface.**
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Red Flags — Stop and re-read this rule if you are thinking:
|
|
146
|
+
|
|
147
|
+
| Rationalization | Why it's wrong |
|
|
148
|
+
|---|---|
|
|
149
|
+
| "It's just a dev key, I'll replace it before production" | Dev keys get forgotten in repos — automated secret scanners find them in minutes after push |
|
|
150
|
+
| "The input comes from our own frontend, so it's trusted" | Frontends can be bypassed — always validate at the server boundary |
|
|
151
|
+
| "SQL injection requires a specific pattern, my query is safe" | Every string-interpolated query is vulnerable — parameterize unconditionally |
|
|
152
|
+
| "Logging the token is fine, our logs are private" | Logs are exfiltrated in breaches — sensitive data in logs amplifies every incident |
|
|
153
|
+
| "This package has a known CVE but it's not on the attack path" | "Not on the attack path" is an assumption that changes when the system evolves |
|
|
154
|
+
|
|
155
|
+
**IRON LAW: SECURITY VULNERABILITIES DO NOT WAIT FOR CONVENIENT TIMING TO BE EXPLOITED.**
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "When two places must agree on a format, pattern, protocol or constant, connect them with an import — not with a comment saying they agree."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Shared Definitions
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Stop one piece of knowledge from living in several places and quietly
|
|
11
|
+
diverging. A comment asserting that two modules agree is not a mechanism: it
|
|
12
|
+
is a claim, it is not checked, and it is read by its author as what they meant
|
|
13
|
+
rather than as what the code does.
|
|
14
|
+
|
|
15
|
+
## When To Apply
|
|
16
|
+
|
|
17
|
+
Three situations:
|
|
18
|
+
|
|
19
|
+
1. A comment refers to another module by name — "the same signals X uses",
|
|
20
|
+
"matches Y", "as Z does".
|
|
21
|
+
2. A regular expression, format string or constant is added that already
|
|
22
|
+
exists somewhere in the project.
|
|
23
|
+
3. Something is extracted into a shared module — in which case the question is
|
|
24
|
+
not only "does the new home work" but "is every old copy gone".
|
|
25
|
+
|
|
26
|
+
## Mandatory Behavior
|
|
27
|
+
|
|
28
|
+
1. **If two places must agree, connect them with an import.** One definition,
|
|
29
|
+
both consumers referencing it. This is the default and it removes the
|
|
30
|
+
possibility rather than warning about it.
|
|
31
|
+
2. **If an import is genuinely impossible** — different runtime, different
|
|
32
|
+
package, a protocol shared with something outside the repository — the
|
|
33
|
+
claim needs a test that fails when the two diverge. The test names both
|
|
34
|
+
sides.
|
|
35
|
+
3. **A comment is not sufficient.** Do not write "same as <module>" and stop
|
|
36
|
+
there. Either the import or the test must exist alongside it.
|
|
37
|
+
4. **When extracting, search for the copies you are replacing** and remove
|
|
38
|
+
them in the same change. An extraction that leaves a second consumer on the
|
|
39
|
+
old copy has made the divergence more likely, not less: the shared version
|
|
40
|
+
will now be maintained and the leftover will not.
|
|
41
|
+
5. **When a shared definition is edited, check every consumer** rather than
|
|
42
|
+
assuming the import list is the whole story — a copy that was never
|
|
43
|
+
imported will not appear in it.
|
|
44
|
+
|
|
45
|
+
## Why This Is A Rule And Not Advice
|
|
46
|
+
|
|
47
|
+
Review does not reliably catch it. The copies are outside the diff, so a
|
|
48
|
+
reviewer reading the change sees the new shared version and not the old one
|
|
49
|
+
left behind. In one repository this rule came from, a duplicated pattern
|
|
50
|
+
survived eight review rounds specifically about that pattern, and was found in
|
|
51
|
+
one run of a mechanical search.
|
|
52
|
+
|
|
53
|
+
The failure is also quiet. Two copies that agree today behave identically, so
|
|
54
|
+
nothing surfaces until one of them is edited — usually long after, by someone
|
|
55
|
+
who does not know the other exists.
|
|
56
|
+
|
|
57
|
+
## Output Contract
|
|
58
|
+
|
|
59
|
+
When reporting on work that touched a shared definition, state:
|
|
60
|
+
|
|
61
|
+
- where the single definition now lives;
|
|
62
|
+
- which consumers import it;
|
|
63
|
+
- for any place that could not import it, the test that pins the agreement.
|
|
64
|
+
|
|
65
|
+
## Example
|
|
66
|
+
|
|
67
|
+
Two modules must recognise the same terminal prompt.
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
// Wrong — a claim, unchecked. Four attempts to restate this rule from a
|
|
71
|
+
// reading of the other module each got it wrong in a different way.
|
|
72
|
+
/** Same signals scripts/watchdog.ts uses. */
|
|
73
|
+
const SIGNAL = /do you want to proceed\?/i;
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
// Right — there is no second copy to get wrong.
|
|
78
|
+
import { isPermissionPrompt } from "../utils/permission-prompt.ts";
|
|
79
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "When and how agents verify and re-learn project-skills during implementation and review. Verify/learn live in the agent loop, not in git hooks."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Lifecycle — verify & learn in the loop
|
|
7
|
+
|
|
8
|
+
Project-skills (`.metaproject/project-skills/<module>/<entity>/`) capture how a
|
|
9
|
+
module/component/store/service actually works. They drift as code changes.
|
|
10
|
+
Keeping them true is an **agent-loop** responsibility: the implementer, reviewer,
|
|
11
|
+
or orchestrator who is already in the code catches drift at the right moment,
|
|
12
|
+
with context. It is NOT a git hook — the `gdskills` post-commit hook only runs
|
|
13
|
+
`skills verify --all --dry-run` as an advisory staleness signal and never
|
|
14
|
+
mutates.
|
|
15
|
+
|
|
16
|
+
## Verify — cheap, inline, before you trust a skill
|
|
17
|
+
|
|
18
|
+
Whoever is about to rely on a project-skill verifies it first:
|
|
19
|
+
|
|
20
|
+
- Find it: `keryx skills route <target>`.
|
|
21
|
+
- Check freshness: `keryx skills verify <module>/<skill>` (or
|
|
22
|
+
`skill-verify-skill`). It classifies the skill `fresh | stale | needs-review |
|
|
23
|
+
blocked` against current code, graph, wiki, health, memory, and tests.
|
|
24
|
+
- If not `fresh`: do NOT follow it blindly — verify each claim against the code
|
|
25
|
+
and record the drift so it feeds the learn step below.
|
|
26
|
+
|
|
27
|
+
Verification is read-only and inline; it does not need a subagent.
|
|
28
|
+
|
|
29
|
+
## Learn — triggered by drift, produces a proposal, applied with review
|
|
30
|
+
|
|
31
|
+
Trigger `learn` when drift is **confirmed**, not on every commit:
|
|
32
|
+
|
|
33
|
+
- a reviewer finds a recurring issue a project-skill should have prevented;
|
|
34
|
+
- an implementer's work diverged from what a skill documents;
|
|
35
|
+
- `verify` reported `stale` / `needs-review` for a skill in scope.
|
|
36
|
+
|
|
37
|
+
Flow:
|
|
38
|
+
|
|
39
|
+
1. `keryx skills learn --from-review <report> --skill <m>/<s>` (or
|
|
40
|
+
`--from-health` / `--from-test` / `--from-failure` / `--from-memory`) — writes
|
|
41
|
+
a **proposal** (JSON). Nothing is mutated yet.
|
|
42
|
+
2. Read the proposal, then `keryx skills learn apply <proposal.json>`
|
|
43
|
+
(version bump + `skill-changelog.md` with provenance, respects manual
|
|
44
|
+
sections, file-locked).
|
|
45
|
+
|
|
46
|
+
`learn` is bounded, mechanical synthesis. **Dispatch it as a subagent; if a
|
|
47
|
+
cheaper / non-flagship model is available in this environment, use it
|
|
48
|
+
(see `model-selection.mdc`), otherwise use the session model.** The flagship's
|
|
49
|
+
only job here is to review the proposal before apply.
|
|
50
|
+
|
|
51
|
+
## Never
|
|
52
|
+
|
|
53
|
+
- Do not put `learn` (or any mutation) in a hook.
|
|
54
|
+
- Do not `apply` a proposal without reading it.
|
|
55
|
+
- Do not trust a `stale` / `needs-review` skill as ground truth.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Skill authoring, storage, and sync workflow for Cursor, Codex, Zed, and OpenCode."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skills Storage Workflow
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Keep skill definitions consistent across master source and global agent directories.
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
Apply when user asks to create, update, or sync a skill.
|
|
13
|
+
|
|
14
|
+
## Mandatory Clarification Step
|
|
15
|
+
Before creating or editing a skill, ask and confirm:
|
|
16
|
+
1. Target location
|
|
17
|
+
2. Skill folder name
|
|
18
|
+
3. Agent profile scope (`Cursor`, `Codex`, `Zed`, `OpenCode`, or all)
|
|
19
|
+
|
|
20
|
+
## Source of Truth
|
|
21
|
+
`.metaproject/skills/gdskills/<skill-name>/`
|
|
22
|
+
|
|
23
|
+
## Required Source Layout
|
|
24
|
+
- `SKILL.md` — canonical source of truth
|
|
25
|
+
- `SKILL.cursor.md` — Cursor-specific variant (optional; falls back to SKILL.md)
|
|
26
|
+
- `SKILL.codex.md` — Codex-specific variant (optional; falls back to SKILL.md)
|
|
27
|
+
- `SKILL.zed.md` — Zed-specific variant (optional; falls back to SKILL.md)
|
|
28
|
+
- `SKILL.opencode.md` — OpenCode-specific variant (optional; falls back to SKILL.md)
|
|
29
|
+
|
|
30
|
+
`SKILL.md` is always required. Platform variants are optional — if absent, `keryx update` installs `SKILL.md` as fallback.
|
|
31
|
+
|
|
32
|
+
## Global Sync Mapping
|
|
33
|
+
- `SKILL.cursor.md` (or `SKILL.md`) → `~/.cursor/skills/<skill-name>/SKILL.md`
|
|
34
|
+
- `SKILL.codex.md` (or `SKILL.md`) → `${CODEX_HOME:-~/.codex}/skills/<skill-name>/SKILL.md`
|
|
35
|
+
- `SKILL.antigravity.md` (or `SKILL.md`) → `~/.antigravity/skills/<skill-name>/SKILL.md`
|
|
36
|
+
- `SKILL.zed.md` (or `SKILL.md`) → `~/.config/zed/skills/<skill-name>/SKILL.md`
|
|
37
|
+
- `SKILL.opencode.md` (or `SKILL.md`) → `~/.config/opencode/skills/<skill-name>/SKILL.md`
|
|
38
|
+
|
|
39
|
+
## Mandatory Behavior
|
|
40
|
+
1. Always create/update `SKILL.md` as the canonical source.
|
|
41
|
+
2. Create platform variants only when platform-specific adaptations are needed; otherwise `SKILL.md` serves all platforms via fallback.
|
|
42
|
+
3. Keep all profiles aligned in structure and intent.
|
|
43
|
+
3. Validate skills before sync.
|
|
44
|
+
4. Sync both global destinations after source update.
|
|
45
|
+
5. Ensure `agents/openai.yaml` exists where required by the target agent UI.
|
|
46
|
+
6. For create/update/sync workflows, produce a machine-readable final result for orchestrators.
|
|
47
|
+
|
|
48
|
+
## Machine-Readable Contract
|
|
49
|
+
Use canonical schema:
|
|
50
|
+
- `.metaproject/rules/schemas/skill-workflow-result.schema.json`
|
|
51
|
+
|
|
52
|
+
Contract requirements:
|
|
53
|
+
- One top-level JSON object only.
|
|
54
|
+
- Stable required keys.
|
|
55
|
+
- Closed objects (`additionalProperties: false`).
|
|
56
|
+
- `contract_version` in semver.
|
|
57
|
+
- `timestamp_utc` in RFC 3339 UTC.
|
|
58
|
+
|
|
59
|
+
### Decision Mapping for Orchestrator
|
|
60
|
+
- `status=needs_input` -> `decision=ask_clarification`
|
|
61
|
+
- `status=ready_for_implementation` -> `decision=proceed_to_implementation`
|
|
62
|
+
- `status=implemented` -> `decision=proceed_to_sync` or `stop`
|
|
63
|
+
- `status=blocked|failed` -> `decision=stop`
|
|
64
|
+
|
|
65
|
+
## Pre-Sync Validation (Mandatory)
|
|
66
|
+
Run before syncing skills:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
keryx skills verify --all
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then run sync:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
keryx update
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If validation fails, do not sync.
|
|
79
|
+
|
|
80
|
+
## Naming
|
|
81
|
+
- `skill-name` must be lowercase with numbers/hyphens only.
|
|
82
|
+
- Keep names semantic and stable.
|
|
83
|
+
|
|
84
|
+
## Forbidden
|
|
85
|
+
- Do not create skills in `~/.cursor/skills-cursor/`.
|
|
86
|
+
|
|
87
|
+
## Apply Changes Workflow
|
|
88
|
+
Changes under `.metaproject/skills/gdskills/*` should be synced to tool directories using `keryx update`.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "SOLID principles for agent-generated code — focus on Single Responsibility, Open/Closed, and Dependency Inversion as the most commonly violated. Use when designing classes, modules, or service interfaces."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SOLID Principles
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Prevent the three most common SOLID violations in AI-generated code: god classes, hardcoded dependencies, and modification-on-every-change designs.
|
|
10
|
+
|
|
11
|
+
## When To Apply
|
|
12
|
+
Apply when creating new classes, services, or modules; when adding logic to an existing class; when wiring up dependencies.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## S — Single Responsibility Principle
|
|
17
|
+
|
|
18
|
+
**One class/module = one reason to change.**
|
|
19
|
+
|
|
20
|
+
### Rules
|
|
21
|
+
- A class that does more than one thing must be split
|
|
22
|
+
- A function that is longer than ~30 lines almost certainly has multiple responsibilities
|
|
23
|
+
- Mixins of data-fetching + business logic + rendering are always a violation
|
|
24
|
+
- If you cannot name a class in ≤3 words without "and", it has too many responsibilities
|
|
25
|
+
|
|
26
|
+
### Signals of violation
|
|
27
|
+
- Class name contains "Manager", "Handler", "Util", "Helper" (often catch-alls)
|
|
28
|
+
- Constructor receives >5 dependencies
|
|
29
|
+
- File is longer than 300 lines and is not a config or generated file
|
|
30
|
+
- Method count exceeds 10 on a non-entity class
|
|
31
|
+
|
|
32
|
+
### Correct pattern
|
|
33
|
+
```typescript
|
|
34
|
+
// BAD — does everything
|
|
35
|
+
class UserService {
|
|
36
|
+
fetchUser() { /* HTTP */ }
|
|
37
|
+
validateUser() { /* domain logic */ }
|
|
38
|
+
formatUserForUI() { /* presentation */ }
|
|
39
|
+
saveToCache() { /* infrastructure */ }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// GOOD — each class has one job
|
|
43
|
+
class UserRepository { fetchUser() {} }
|
|
44
|
+
class UserValidator { validate() {} }
|
|
45
|
+
class UserPresenter { format() {} }
|
|
46
|
+
class UserCache { save() {} }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## O — Open/Closed Principle
|
|
52
|
+
|
|
53
|
+
**Open for extension, closed for modification.**
|
|
54
|
+
|
|
55
|
+
### Rules
|
|
56
|
+
- New behaviour must be addable without editing existing classes
|
|
57
|
+
- Use polymorphism, strategy pattern, or configuration — not if/else chains
|
|
58
|
+
- Every time you add an `else if` to handle a new variant, ask: "should this be a new strategy?"
|
|
59
|
+
- Enums as switch-statement keys are the canonical violation — add a new enum value → touch N files
|
|
60
|
+
|
|
61
|
+
### Signals of violation
|
|
62
|
+
- Switch/if-else over a type enum with 3+ cases
|
|
63
|
+
- Adding a new payment provider / notification channel / export format requires editing core logic
|
|
64
|
+
- A "type" field drives behaviour throughout the codebase
|
|
65
|
+
|
|
66
|
+
### Correct pattern
|
|
67
|
+
```typescript
|
|
68
|
+
// BAD — every new type requires editing this function
|
|
69
|
+
function notify(type: string, msg: string) {
|
|
70
|
+
if (type === 'email') sendEmail(msg);
|
|
71
|
+
else if (type === 'sms') sendSMS(msg);
|
|
72
|
+
else if (type === 'push') sendPush(msg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// GOOD — new channels added without touching existing code
|
|
76
|
+
interface Notifier { send(msg: string): Promise<void>; }
|
|
77
|
+
class EmailNotifier implements Notifier { send() {} }
|
|
78
|
+
class SMSNotifier implements Notifier { send() {} }
|
|
79
|
+
// registry → inject the right one
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## D — Dependency Inversion Principle
|
|
85
|
+
|
|
86
|
+
**Depend on abstractions, not concretions.**
|
|
87
|
+
|
|
88
|
+
### Rules
|
|
89
|
+
- High-level modules must not import low-level modules directly
|
|
90
|
+
- Dependencies are injected, not constructed inside the class
|
|
91
|
+
- `new ConcreteService()` inside a business-logic class is always a violation
|
|
92
|
+
- Tests become trivially easy when DIP is followed — if mocking is hard, DIP is violated
|
|
93
|
+
|
|
94
|
+
### Signals of violation
|
|
95
|
+
- `new` keyword used inside a service or use-case class body
|
|
96
|
+
- Direct imports of `axios`, `prisma`, `fetch` in business logic layers
|
|
97
|
+
- Constructor creates its own dependencies instead of receiving them
|
|
98
|
+
- Testing requires monkey-patching module imports
|
|
99
|
+
|
|
100
|
+
### Correct pattern
|
|
101
|
+
```typescript
|
|
102
|
+
// BAD — hard dependency on concrete HTTP client
|
|
103
|
+
class OrderService {
|
|
104
|
+
async createOrder(data: OrderDTO) {
|
|
105
|
+
const client = new HttpClient(); // ← violation
|
|
106
|
+
return client.post('/orders', data);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// GOOD — depends on abstraction, injected externally
|
|
111
|
+
interface HttpClient { post(url: string, body: unknown): Promise<unknown>; }
|
|
112
|
+
|
|
113
|
+
class OrderService {
|
|
114
|
+
constructor(private readonly http: HttpClient) {}
|
|
115
|
+
async createOrder(data: OrderDTO) {
|
|
116
|
+
return this.http.post('/orders', data);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## L & I (Brief Notes)
|
|
124
|
+
|
|
125
|
+
**Liskov Substitution (L):** A subclass must be usable wherever the parent is expected. If overriding a method throws where the parent would not — that is a violation.
|
|
126
|
+
|
|
127
|
+
**Interface Segregation (I):** Prefer small, focused interfaces. A class should not be forced to implement methods it does not use. Split fat interfaces into role interfaces.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Iron Laws
|
|
132
|
+
|
|
133
|
+
**IRON LAW 1: A class with a name ending in "Manager", "Helper", or "Utils" MUST be reviewed for SRP before committing.**
|
|
134
|
+
**IRON LAW 2: `new ConcreteClass()` inside business logic is forbidden. Pass dependencies via constructor.**
|
|
135
|
+
**IRON LAW 3: Adding a new variant must not require editing more than 1 existing file. If it does, refactor first.**
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Red Flags — Stop and re-read this rule if you are thinking:
|
|
140
|
+
|
|
141
|
+
| Rationalization | Why it's wrong |
|
|
142
|
+
|---|---|
|
|
143
|
+
| "It's just one extra method, I'll add it here" | Each small addition is how god classes are built — one method at a time |
|
|
144
|
+
| "I'll inject it later, for now I'll just `new` it" | "Later" never comes; the hard dependency ships to production |
|
|
145
|
+
| "An interface is overkill for this simple case" | Interfaces cost nothing at compile time and enable testing at zero extra effort |
|
|
146
|
+
| "I'll use a switch, there are only 3 cases" | 3 cases becomes 10 over time — the OCP violation compounds |
|
|
147
|
+
| "The constructor is getting long but refactoring is risky" | A long constructor is a signal the class has too many responsibilities — refactor now, not later |
|
|
148
|
+
|
|
149
|
+
**IRON LAW: CODE THAT CANNOT BE TESTED WITHOUT MOCKING FILESYSTEM OR NETWORK IN BUSINESS LOGIC HAS A DIP VIOLATION.**
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Storybook setup, story authoring, and review checklist."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
globs:
|
|
5
|
+
- ".storybook/**"
|
|
6
|
+
- "**/*.stories.tsx"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Storybook Guidelines
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
Standardize story creation, validation, and visual regression readiness.
|
|
13
|
+
|
|
14
|
+
## When To Apply
|
|
15
|
+
Apply when creating, reviewing, or updating Storybook stories (`*.stories.tsx`).
|
|
16
|
+
|
|
17
|
+
## Run Commands
|
|
18
|
+
- Local: `npm run storybook`
|
|
19
|
+
- Clean restart: `npm run storybook:clean`
|
|
20
|
+
- Static build: `npm run build-storybook`
|
|
21
|
+
- Static preview: `npm run storybook:preview`
|
|
22
|
+
|
|
23
|
+
## Story Authoring Rules
|
|
24
|
+
- Use `*.stories.tsx` with `Meta` and `StoryObj` typing.
|
|
25
|
+
- Prefer `args` for state variants.
|
|
26
|
+
- Use `fn()` from `@storybook/test` for actions.
|
|
27
|
+
- Use decorators for providers/context.
|
|
28
|
+
|
|
29
|
+
## Review Checklist
|
|
30
|
+
- Cover key states: default/loading/error/empty.
|
|
31
|
+
- Avoid side effects during render.
|
|
32
|
+
- Respect global theme/locale decorators.
|
|
33
|
+
- Update screenshot tests when visual behavior changes.
|
|
34
|
+
|
|
35
|
+
## Output Contract
|
|
36
|
+
- Story examples in responses must be fenced Markdown code blocks.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Subagent Context Construction
|
|
3
|
+
category: orchestration
|
|
4
|
+
applies_to: job-orchestrator, any orchestrator that dispatches subagents
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Subagent Context Construction
|
|
8
|
+
|
|
9
|
+
## The Principle
|
|
10
|
+
|
|
11
|
+
Every subagent dispatch must include an **explicitly constructed context block**. Subagents must not rely on inherited session history. The orchestrator constructs context — the subagent receives it, never retrieves it on its own.
|
|
12
|
+
|
|
13
|
+
This is not a best practice. It is a hard requirement.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Required Fields in Every Subagent Dispatch
|
|
18
|
+
|
|
19
|
+
Every prompt sent to a subagent must contain all of the following fields:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
## Task
|
|
23
|
+
[Specific task — what exactly to do, no ambiguity]
|
|
24
|
+
|
|
25
|
+
## Acceptance Criteria
|
|
26
|
+
[List of criteria — when is this task considered done]
|
|
27
|
+
|
|
28
|
+
## Context
|
|
29
|
+
[Only relevant information — decisions made, constraints, background]
|
|
30
|
+
|
|
31
|
+
## Files to read
|
|
32
|
+
[Specific list of file paths the subagent must read before acting]
|
|
33
|
+
|
|
34
|
+
## Constraints
|
|
35
|
+
[What must NOT be done — files to avoid, patterns to not introduce, etc.]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**None of these fields may be omitted.** A dispatch without all five fields is incomplete.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Principles of Context Construction
|
|
43
|
+
|
|
44
|
+
### 1. Minimality
|
|
45
|
+
Pass only what this specific task needs. Do not dump job state, prior agent output, or full conversation history into the prompt. Every extraneous token increases hallucination risk and degrades the subagent's focus.
|
|
46
|
+
|
|
47
|
+
### 2. Explicitness
|
|
48
|
+
Better to be overly explicit than implicit. If you think the subagent "obviously" knows something, spell it out anyway. The subagent has no session memory. It only knows what you give it.
|
|
49
|
+
|
|
50
|
+
### 3. Isolation
|
|
51
|
+
The subagent must not assume anything about the state of the world that you have not explicitly told it. It cannot see what previous agents did, what decisions were made in earlier phases, or what files were modified — unless you include that information in the prompt.
|
|
52
|
+
|
|
53
|
+
### 4. Concreteness
|
|
54
|
+
Use absolute file paths, not vague pointers. Write `.metaproject/skills/gdskills/orchestration/task-implementer/SKILL.md`, not "look in the skills directory". Write `src/store/PipelineStore.ts`, not "the store file".
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Template Dispatch Block
|
|
59
|
+
|
|
60
|
+
Use this template for every subagent dispatch:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Task({
|
|
64
|
+
description: "<one-line summary for logs>",
|
|
65
|
+
subagent_type: "general",
|
|
66
|
+
prompt: |
|
|
67
|
+
## Task
|
|
68
|
+
<Exactly what to do — no ambiguity>
|
|
69
|
+
|
|
70
|
+
## Acceptance Criteria
|
|
71
|
+
- <criterion 1>
|
|
72
|
+
- <criterion 2>
|
|
73
|
+
- <criterion 3>
|
|
74
|
+
|
|
75
|
+
## Context
|
|
76
|
+
<Relevant decisions, constraints, and background — only what matters for THIS task>
|
|
77
|
+
|
|
78
|
+
## Files to read
|
|
79
|
+
- <absolute/path/to/file1.ts>
|
|
80
|
+
- <absolute/path/to/file2.ts>
|
|
81
|
+
|
|
82
|
+
## Constraints
|
|
83
|
+
- Do NOT modify <file or pattern>
|
|
84
|
+
- Do NOT introduce <pattern>
|
|
85
|
+
- <other hard stops>
|
|
86
|
+
})
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Red Flags — Stop and fix your dispatch if you are thinking:
|
|
92
|
+
|
|
93
|
+
| Rationalization | Why it's wrong |
|
|
94
|
+
|---|---|
|
|
95
|
+
| "The subagent will figure out what it needs" | BLOCKED — the subagent has no session context. It will hallucinate or produce generic output. |
|
|
96
|
+
| "I'll pass the full conversation history" | Wastes the subagent's context window with irrelevant history and creates hallucination surface area. Pass only what is needed. |
|
|
97
|
+
| "The task is obvious, minimal context needed" | Missing context = missing output. Obviousness to you (with full session context) means nothing to an isolated subagent. |
|
|
98
|
+
| "Context from the previous subagent will carry over" | It won't. Each subagent starts fresh. The orchestrator bridges state between agents — explicitly. |
|
|
99
|
+
| "I'll tell it to read state.json if it needs more context" | The subagent should not be retrieving orchestrator state. The orchestrator constructs context. The subagent receives it. |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Iron Law
|
|
104
|
+
|
|
105
|
+
**EVERY SUBAGENT DISPATCH MUST INCLUDE AN EXPLICITLY CONSTRUCTED CONTEXT BLOCK WITH ALL FIVE FIELDS: TASK, ACCEPTANCE CRITERIA, CONTEXT, FILES TO READ, AND CONSTRAINTS.**
|
|
106
|
+
|
|
107
|
+
A dispatch that omits any of these five fields is invalid and must not be executed.
|