@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,567 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-collector
|
|
3
|
+
description: "Collects, summarizes, and maintains a unified context document for a job. Gathers relevant local documentation (docs/, jobs/, rules), identifies libraries/patterns/references, fetches external documentation via web, extracts best practices, and produces a single context document that all sub-agents can reference during the job lifecycle. Can be invoked by job-orchestrator or directly by user."
|
|
4
|
+
triggers:
|
|
5
|
+
- "Collect context"
|
|
6
|
+
- "Build context"
|
|
7
|
+
- "Gather context"
|
|
8
|
+
- "Update context"
|
|
9
|
+
- "Refresh context"
|
|
10
|
+
- "Context for job"
|
|
11
|
+
- "Research context"
|
|
12
|
+
metadata:
|
|
13
|
+
author: "MrCipherSmith"
|
|
14
|
+
version: "1.0.0"
|
|
15
|
+
category: "context"
|
|
16
|
+
license: "MIT"
|
|
17
|
+
compatibility: "cursor,codex,zed,opencode"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Context Collector
|
|
21
|
+
|
|
22
|
+
## Purpose
|
|
23
|
+
|
|
24
|
+
Collects and maintains a **unified context document** for a job. The context document is a curated, focused summary that all sub-agents can reference — it eliminates redundant research and ensures consistent understanding of the task across the entire job pipeline.
|
|
25
|
+
|
|
26
|
+
**Key responsibilities:**
|
|
27
|
+
1. Gather relevant local documentation (`docs/`, `jobs/`, `rules/core/`)
|
|
28
|
+
2. Identify libraries, patterns, and references used in the task area
|
|
29
|
+
3. Fetch external documentation (library docs, API references, best practices) via web
|
|
30
|
+
4. Extract and summarize only what is relevant to the specific task
|
|
31
|
+
5. Assemble everything into a single `context.md` document
|
|
32
|
+
6. Keep the context document up-to-date as the job evolves (version-tracked updates)
|
|
33
|
+
|
|
34
|
+
**Input:** Task description + job name + project path (from orchestrator or user)
|
|
35
|
+
**Output:** `context.md` document in `.metaproject/jobs/<job-name>/ai/` and `.metaproject/jobs/<job-name>/man/`, documented via `job-documenter`
|
|
36
|
+
|
|
37
|
+
## When to Use
|
|
38
|
+
|
|
39
|
+
- Called by `job-orchestrator` as an early plan step (after analysis, before implementation)
|
|
40
|
+
- Called directly by user when they need a research/context document for a task
|
|
41
|
+
- Called again during a job when additional context is needed (e.g., new library discovered during implementation)
|
|
42
|
+
- When any sub-agent reports missing context or encounters unfamiliar patterns
|
|
43
|
+
|
|
44
|
+
## Architecture: 5 Phases
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Phase 1: RECEIVE -> Parse input, determine scope and focus areas
|
|
48
|
+
Phase 2: LOCAL -> Scan local docs, jobs, rules, codebase for relevant context
|
|
49
|
+
Phase 3: EXTERNAL -> Fetch external docs for libraries, APIs, best practices
|
|
50
|
+
Phase 4: SYNTHESIZE -> Merge all findings into a single context document
|
|
51
|
+
Phase 5: DOCUMENT -> Save via job-documenter, return result
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Input Contract
|
|
57
|
+
|
|
58
|
+
### When called by orchestrator:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
ACTION: collect | update
|
|
62
|
+
JOB_NAME: <kebab-case job folder name>
|
|
63
|
+
JOBS_ROOT: <JOBS_ROOT>
|
|
64
|
+
PROJECT_DIR: <absolute path to project directory>
|
|
65
|
+
|
|
66
|
+
DATA:
|
|
67
|
+
TASK_DESCRIPTION: <what the job is about — from issue, user request, or analysis>
|
|
68
|
+
FOCUS_AREAS: <optional — specific areas to focus on, e.g. "MobX stores", "pipeline validation">
|
|
69
|
+
ANALYSIS_RESULT: <optional — output from issue-analyzer, if available>
|
|
70
|
+
KNOWN_LIBRARIES: <optional — libraries already identified>
|
|
71
|
+
UPDATE_REASON: <required for ACTION=update — why context needs refreshing>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### When called directly by user:
|
|
75
|
+
|
|
76
|
+
The agent should ask for:
|
|
77
|
+
1. **What is the task?** — description of what needs to be done
|
|
78
|
+
2. **Project directory** — which project to analyze
|
|
79
|
+
3. **Job name** — if context should be saved to a job folder (optional for standalone use)
|
|
80
|
+
4. **Focus areas** — any specific libraries, patterns, or areas to prioritize
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Phase 1: RECEIVE
|
|
85
|
+
|
|
86
|
+
### 1.1 Parse Input
|
|
87
|
+
|
|
88
|
+
Extract the scope from the input:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
SCOPE:
|
|
92
|
+
task_description: <what we're building/fixing/analyzing>
|
|
93
|
+
focus_areas: [<specific areas to research>]
|
|
94
|
+
project_dir: <project path>
|
|
95
|
+
job_name: <job folder name, if any>
|
|
96
|
+
action: collect | update
|
|
97
|
+
analysis_available: <bool — was analysis result provided?>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 1.2 Determine Research Targets
|
|
101
|
+
|
|
102
|
+
From the task description and focus areas, build a research plan:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
RESEARCH_PLAN:
|
|
106
|
+
local_targets:
|
|
107
|
+
- docs: [<relevant doc topics to look for>]
|
|
108
|
+
- rules: [<relevant rules to check>]
|
|
109
|
+
- jobs: [<previous related jobs to reference>]
|
|
110
|
+
- code: [<codebase areas to examine for patterns>]
|
|
111
|
+
external_targets:
|
|
112
|
+
- libraries: [<npm packages / libraries to document>]
|
|
113
|
+
- apis: [<API references to fetch>]
|
|
114
|
+
- best_practices: [<patterns / approaches to research>]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 1.3 For ACTION=update
|
|
118
|
+
|
|
119
|
+
If this is an update:
|
|
120
|
+
1. Read the existing `context.md` from `.metaproject/jobs/<JOB_NAME>/ai/context.md`
|
|
121
|
+
2. Identify what sections need refreshing based on UPDATE_REASON
|
|
122
|
+
3. Preserve unchanged sections, only update/add relevant ones
|
|
123
|
+
4. Increment version in metadata
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Phase 2: LOCAL
|
|
128
|
+
|
|
129
|
+
Scan local sources for relevant context. Be selective — only include what is directly relevant to the task.
|
|
130
|
+
|
|
131
|
+
### 2.1 Documentation (`<DOCS_ROOT>/`)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
1. List available docs:
|
|
135
|
+
- Glob: docs/**/*.md
|
|
136
|
+
|
|
137
|
+
2. For each doc, check title and first 20 lines for relevance to task_description
|
|
138
|
+
|
|
139
|
+
3. For relevant docs:
|
|
140
|
+
- Read full content
|
|
141
|
+
- Extract: key decisions, constraints, architecture patterns, requirements
|
|
142
|
+
- Summarize: 3-5 bullet points per doc, only task-relevant info
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 2.2 Previous Jobs (`<JOBS_ROOT>/`)
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
1. List existing job folders:
|
|
149
|
+
- Read each jobs/*/README.md — check if related to current task
|
|
150
|
+
|
|
151
|
+
2. For related jobs:
|
|
152
|
+
- Read their context.md (if exists) — reuse applicable context
|
|
153
|
+
- Read their analysis.md — extract relevant patterns or decisions
|
|
154
|
+
- Note: "Previous job <name> addressed <related topic>"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 2.3 Rules (`<PROJECT_DIR>/rules/core/` or repo rules path)
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
1. Based on focus_areas and task_description, identify applicable rules:
|
|
161
|
+
|
|
162
|
+
| Focus Area | Relevant Rules |
|
|
163
|
+
|------------|---------------|
|
|
164
|
+
| React components | code-style-patterns.mdc, frontend-assistant.mdc, storybook-guidelines.mdc |
|
|
165
|
+
| MobX stores | code-style-patterns.mdc, mobx-store-template.mdc |
|
|
166
|
+
| API / DTOs | nestjs-dto.mdc, code-style-patterns.mdc |
|
|
167
|
+
| Testing | playwright-testing.mdc, storybook-guidelines.mdc |
|
|
168
|
+
| General code | code-style-patterns.mdc, frontend-assistant.mdc |
|
|
169
|
+
|
|
170
|
+
2. Read each applicable rule
|
|
171
|
+
3. Extract: specific conventions, required patterns, prohibited practices
|
|
172
|
+
4. Summarize: only the rules that directly apply to this task
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### 2.4 Codebase Patterns (`PROJECT_DIR`)
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
1. Based on analysis_result (if available) or focus_areas:
|
|
179
|
+
- Identify 2-3 files that are similar to what we're building/changing
|
|
180
|
+
- Read them to extract patterns:
|
|
181
|
+
* Import conventions (aliases, ordering)
|
|
182
|
+
* Component structure (observer wrapping, props naming)
|
|
183
|
+
* Store patterns (makeObservable(this), explicit decorators, thin @action.bound public actions, private API/IO methods, runInAction)
|
|
184
|
+
* Test patterns (describe/it, mocks, fixtures)
|
|
185
|
+
* File naming and organization
|
|
186
|
+
|
|
187
|
+
2. Summarize as "Codebase Conventions":
|
|
188
|
+
- How similar code is structured in this project
|
|
189
|
+
- Key patterns to follow for consistency
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Output of Phase 2:**
|
|
193
|
+
```
|
|
194
|
+
LOCAL_CONTEXT:
|
|
195
|
+
docs_summary: [{source, key_points: [string]}]
|
|
196
|
+
related_jobs: [{job_name, relevance, key_findings}]
|
|
197
|
+
applicable_rules: [{rule, key_conventions: [string]}]
|
|
198
|
+
codebase_patterns: [{area, patterns: [string], example_files: [path]}]
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Phase 3: EXTERNAL
|
|
204
|
+
|
|
205
|
+
Fetch external documentation for identified libraries, APIs, and best practices.
|
|
206
|
+
|
|
207
|
+
### 3.1 Identify External Targets
|
|
208
|
+
|
|
209
|
+
From the task description, analysis result, and codebase examination:
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
1. Scan package.json in PROJECT_DIR for dependencies
|
|
213
|
+
2. Cross-reference with focus_areas and affected files
|
|
214
|
+
3. Build external research list:
|
|
215
|
+
|
|
216
|
+
EXTERNAL_TARGETS:
|
|
217
|
+
libraries:
|
|
218
|
+
- name: <package name>
|
|
219
|
+
reason: <why this library is relevant>
|
|
220
|
+
docs_url: <official docs URL, if known>
|
|
221
|
+
best_practices:
|
|
222
|
+
- topic: <e.g., "MobX computed vs autorun", "React memoization patterns">
|
|
223
|
+
reason: <why this is relevant to the task>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### 3.2 Fetch Library Documentation
|
|
227
|
+
|
|
228
|
+
For each identified library:
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
1. Try fetching official documentation:
|
|
232
|
+
- Use WebFetch to get the library's docs page
|
|
233
|
+
- Focus on: API reference for the specific features we need
|
|
234
|
+
- Skip: installation guides, getting started (unless relevant)
|
|
235
|
+
|
|
236
|
+
2. Extract only task-relevant sections:
|
|
237
|
+
- API methods/hooks we'll use
|
|
238
|
+
- Configuration options that apply
|
|
239
|
+
- Known gotchas or migration notes
|
|
240
|
+
- TypeScript types and interfaces
|
|
241
|
+
|
|
242
|
+
3. Summarize: 5-10 bullet points per library
|
|
243
|
+
- Function signatures we'll use
|
|
244
|
+
- Required patterns (e.g., cleanup, error handling)
|
|
245
|
+
- Version-specific behavior if applicable
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### 3.3 Fetch Best Practices
|
|
249
|
+
|
|
250
|
+
For each identified best practice topic:
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
1. Search for authoritative sources:
|
|
254
|
+
- Official docs of the framework/library
|
|
255
|
+
- Well-known pattern documentation (e.g., MobX official guides)
|
|
256
|
+
|
|
257
|
+
2. Extract actionable practices:
|
|
258
|
+
- DO / DON'T patterns
|
|
259
|
+
- Performance considerations
|
|
260
|
+
- Common pitfalls to avoid
|
|
261
|
+
|
|
262
|
+
3. Summarize: 3-5 bullet points per topic, with code examples where helpful
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### 3.4 Rate and Filter
|
|
266
|
+
|
|
267
|
+
Not all fetched content is equally useful. Rate each finding:
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
For each external finding:
|
|
271
|
+
relevance: HIGH | MEDIUM | LOW
|
|
272
|
+
- HIGH: Directly answers a question about our implementation
|
|
273
|
+
- MEDIUM: Provides useful background or alternative approaches
|
|
274
|
+
- LOW: Tangentially related, might be useful later
|
|
275
|
+
|
|
276
|
+
Include only HIGH and MEDIUM findings in the context document.
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Output of Phase 3:**
|
|
280
|
+
```
|
|
281
|
+
EXTERNAL_CONTEXT:
|
|
282
|
+
libraries: [{name, version, key_apis: [string], gotchas: [string], docs_url}]
|
|
283
|
+
best_practices: [{topic, dos: [string], donts: [string], examples: [string]}]
|
|
284
|
+
references: [{url, title, relevance, summary}]
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Phase 4: SYNTHESIZE
|
|
290
|
+
|
|
291
|
+
Merge all findings into a single, focused context document.
|
|
292
|
+
|
|
293
|
+
### 4.1 Context Document Structure
|
|
294
|
+
|
|
295
|
+
```markdown
|
|
296
|
+
# Context: <Job Title / Task Description>
|
|
297
|
+
|
|
298
|
+
## Task Overview
|
|
299
|
+
<2-3 sentences: what we're doing and why>
|
|
300
|
+
|
|
301
|
+
## Key Decisions & Constraints
|
|
302
|
+
<!-- From docs, rules, and previous jobs -->
|
|
303
|
+
- <decision or constraint 1>
|
|
304
|
+
- <decision or constraint 2>
|
|
305
|
+
- ...
|
|
306
|
+
|
|
307
|
+
## Applicable Rules & Conventions
|
|
308
|
+
<!-- From rules/core/ — only task-relevant extracts -->
|
|
309
|
+
|
|
310
|
+
### Code Style
|
|
311
|
+
- <convention 1>
|
|
312
|
+
- <convention 2>
|
|
313
|
+
|
|
314
|
+
### Architecture Patterns
|
|
315
|
+
- <pattern 1>
|
|
316
|
+
- <pattern 2>
|
|
317
|
+
|
|
318
|
+
### Testing Requirements
|
|
319
|
+
- <requirement 1>
|
|
320
|
+
- <requirement 2>
|
|
321
|
+
|
|
322
|
+
## Codebase Patterns
|
|
323
|
+
<!-- How similar code is written in this project -->
|
|
324
|
+
|
|
325
|
+
### File Structure
|
|
326
|
+
- <pattern>
|
|
327
|
+
|
|
328
|
+
### Component Patterns
|
|
329
|
+
- <pattern with brief code example>
|
|
330
|
+
|
|
331
|
+
### Store Patterns
|
|
332
|
+
- <pattern with brief code example>
|
|
333
|
+
|
|
334
|
+
## Libraries & APIs
|
|
335
|
+
<!-- External library documentation relevant to this task -->
|
|
336
|
+
|
|
337
|
+
### <Library Name> (v<version>)
|
|
338
|
+
- **Relevant APIs:** <list>
|
|
339
|
+
- **Key patterns:**
|
|
340
|
+
- <pattern>
|
|
341
|
+
- **Gotchas:**
|
|
342
|
+
- <gotcha>
|
|
343
|
+
|
|
344
|
+
### <Another Library>
|
|
345
|
+
- ...
|
|
346
|
+
|
|
347
|
+
## Best Practices
|
|
348
|
+
<!-- Researched best practices for the specific patterns we're using -->
|
|
349
|
+
|
|
350
|
+
### <Topic>
|
|
351
|
+
- DO: <practice>
|
|
352
|
+
- DON'T: <anti-pattern>
|
|
353
|
+
- Example:
|
|
354
|
+
```typescript
|
|
355
|
+
// brief code example if helpful
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
## References
|
|
359
|
+
<!-- Links to source documentation -->
|
|
360
|
+
| Source | URL | Relevance |
|
|
361
|
+
|--------|-----|-----------|
|
|
362
|
+
| <title> | <url> | <HIGH/MEDIUM> |
|
|
363
|
+
|
|
364
|
+
## Previous Related Work
|
|
365
|
+
<!-- From previous jobs, if any -->
|
|
366
|
+
- <Job name>: <what was learned, what to reuse>
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
<!-- Document Metadata -->
|
|
371
|
+
| Key | Value |
|
|
372
|
+
|-----|-------|
|
|
373
|
+
| Created | <ISO 8601 UTC timestamp> |
|
|
374
|
+
| Updated | <ISO 8601 UTC timestamp> |
|
|
375
|
+
| Agent | context-collector |
|
|
376
|
+
| Task | <task description> |
|
|
377
|
+
| Job | <JOB_NAME> |
|
|
378
|
+
| Version | 1.0 |
|
|
379
|
+
| Status | final |
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### 4.2 Quality Criteria
|
|
383
|
+
|
|
384
|
+
Before finalizing, validate the context document:
|
|
385
|
+
|
|
386
|
+
- [ ] Every section is directly relevant to the task — no padding
|
|
387
|
+
- [ ] Code examples are minimal but illustrative
|
|
388
|
+
- [ ] Library documentation covers the specific APIs we need, not generic overviews
|
|
389
|
+
- [ ] Rules and conventions are actionable (DO/DON'T format)
|
|
390
|
+
- [ ] References are linked and accessible
|
|
391
|
+
- [ ] Total document length is reasonable (aim for 200-500 lines, not 1000+)
|
|
392
|
+
- [ ] No duplicate information across sections
|
|
393
|
+
|
|
394
|
+
### 4.3 For ACTION=update
|
|
395
|
+
|
|
396
|
+
When updating an existing context:
|
|
397
|
+
|
|
398
|
+
1. Read existing `context.md`
|
|
399
|
+
2. Identify sections affected by UPDATE_REASON
|
|
400
|
+
3. Research only the new/changed areas (Phases 2-3, scoped)
|
|
401
|
+
4. Merge new findings into existing document:
|
|
402
|
+
- Update affected sections in place
|
|
403
|
+
- Add new sections if needed
|
|
404
|
+
- Do NOT remove existing sections unless explicitly outdated
|
|
405
|
+
5. Increment Version in metadata (e.g., `1.0` -> `1.1`)
|
|
406
|
+
6. Update the `Updated` timestamp
|
|
407
|
+
7. Add update note to metadata or end of document:
|
|
408
|
+
```
|
|
409
|
+
## Update Log
|
|
410
|
+
- v1.1 (<timestamp>): Added <library> documentation per <reason>. Agent: context-collector.
|
|
411
|
+
- v1.0 (<timestamp>): Initial context. Agent: context-collector.
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Phase 5: DOCUMENT
|
|
417
|
+
|
|
418
|
+
Save the context document and notify orchestrator.
|
|
419
|
+
|
|
420
|
+
### 5.1 Save via job-documenter (when running within a job)
|
|
421
|
+
|
|
422
|
+
If JOB_NAME is provided, dispatch `job-documenter`:
|
|
423
|
+
|
|
424
|
+
```
|
|
425
|
+
ACTION: add-document
|
|
426
|
+
JOB_NAME: <JOB_NAME>
|
|
427
|
+
JOBS_ROOT: <JOBS_ROOT>
|
|
428
|
+
|
|
429
|
+
DATA:
|
|
430
|
+
DOC_TYPE: context
|
|
431
|
+
TARGET: both
|
|
432
|
+
TITLE: Context — <task description short>
|
|
433
|
+
CONTENT: <full context document>
|
|
434
|
+
AGENT: context-collector
|
|
435
|
+
TASK: Collect context for <task description>
|
|
436
|
+
VERSION: <1.0 for new, incremented for update>
|
|
437
|
+
DOC_STATUS: final
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
For ACTION=update, use the same flow — `job-documenter` will overwrite the existing `context.md`.
|
|
441
|
+
|
|
442
|
+
### 5.2 Save directly (when running standalone without a job)
|
|
443
|
+
|
|
444
|
+
If no JOB_NAME is provided:
|
|
445
|
+
- Write context to `<DOCS_ROOT>/context/<descriptive-slug>.md`
|
|
446
|
+
- Include full metadata block
|
|
447
|
+
|
|
448
|
+
### 5.3 Return Result
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
CONTEXT_RESULT:
|
|
452
|
+
action: collect | update
|
|
453
|
+
status: success | error
|
|
454
|
+
job_name: <JOB_NAME or null>
|
|
455
|
+
context_path: <path to context.md>
|
|
456
|
+
version: <document version>
|
|
457
|
+
sections:
|
|
458
|
+
local_sources: <count of local sources used>
|
|
459
|
+
external_sources: <count of external sources fetched>
|
|
460
|
+
rules_applied: <count of rules extracted>
|
|
461
|
+
libraries_documented: <count of libraries documented>
|
|
462
|
+
summary: <2-3 sentence summary of what context was collected>
|
|
463
|
+
error_details: <if status is error>
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
## Error Handling
|
|
469
|
+
|
|
470
|
+
| Error | Action |
|
|
471
|
+
|-------|--------|
|
|
472
|
+
| Job folder doesn't exist | If orchestrator call — ABORT, orchestrator must init job first. If user call — offer to create. |
|
|
473
|
+
| External URL fetch fails | Skip that source, note as "unavailable" in References, continue with remaining sources |
|
|
474
|
+
| No relevant local docs found | Proceed with external only, note "No local documentation found for this topic" |
|
|
475
|
+
| No relevant external docs found | Proceed with local only, note "External documentation not found — manual research may be needed" |
|
|
476
|
+
| Context document too large (>500 lines) | Aggressively summarize, move detailed info to separate `ai/context-details.md` |
|
|
477
|
+
| package.json not found | Skip library identification from deps, rely on focus_areas and analysis |
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## Update Protocol
|
|
482
|
+
|
|
483
|
+
The context-collector is designed to be called **multiple times** during a job:
|
|
484
|
+
|
|
485
|
+
### When to trigger an update
|
|
486
|
+
|
|
487
|
+
| Trigger | Who Calls | What Happens |
|
|
488
|
+
|---------|-----------|--------------|
|
|
489
|
+
| New library discovered during implementation | Orchestrator or task-implementer (via orchestrator) | ACTION=update with FOCUS_AREAS=<new library> |
|
|
490
|
+
| Review finding suggests different pattern | Orchestrator after review step | ACTION=update with UPDATE_REASON=<review finding> |
|
|
491
|
+
| Sub-agent reports insufficient context | Orchestrator | ACTION=update with UPDATE_REASON=<what's missing> |
|
|
492
|
+
| User requests context refresh | User directly | ACTION=update with UPDATE_REASON=<user request> |
|
|
493
|
+
|
|
494
|
+
### Update flow
|
|
495
|
+
|
|
496
|
+
```
|
|
497
|
+
1. Read existing context.md
|
|
498
|
+
2. Parse UPDATE_REASON to determine scope
|
|
499
|
+
3. Run Phases 2-3 (LOCAL + EXTERNAL) with narrowed scope
|
|
500
|
+
4. Merge new findings into existing document (Phase 4.3)
|
|
501
|
+
5. Save updated document (Phase 5) with incremented version
|
|
502
|
+
6. Return CONTEXT_RESULT with updated section counts
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
507
|
+
## Prompt Template for Orchestrator
|
|
508
|
+
|
|
509
|
+
When the orchestrator dispatches this skill as a sub-agent:
|
|
510
|
+
|
|
511
|
+
```
|
|
512
|
+
You are the context-collector agent. Your task is to research and build
|
|
513
|
+
a context document for the current job.
|
|
514
|
+
|
|
515
|
+
Load the skill from: skills/context-collector/SKILL.md
|
|
516
|
+
|
|
517
|
+
ACTION: collect
|
|
518
|
+
JOB_NAME: <job-name>
|
|
519
|
+
JOBS_ROOT: <JOBS_ROOT>
|
|
520
|
+
PROJECT_DIR: <project path>
|
|
521
|
+
|
|
522
|
+
DATA:
|
|
523
|
+
TASK_DESCRIPTION: <description from issue or user>
|
|
524
|
+
FOCUS_AREAS: <areas to research>
|
|
525
|
+
ANALYSIS_RESULT: <output from issue-analyzer, if available>
|
|
526
|
+
KNOWN_LIBRARIES: <libraries already identified>
|
|
527
|
+
|
|
528
|
+
Execute all phases and return a CONTEXT_RESULT block.
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
For updates:
|
|
532
|
+
|
|
533
|
+
```
|
|
534
|
+
You are the context-collector agent. Your task is to update the existing
|
|
535
|
+
context document for this job.
|
|
536
|
+
|
|
537
|
+
Load the skill from: skills/context-collector/SKILL.md
|
|
538
|
+
|
|
539
|
+
ACTION: update
|
|
540
|
+
JOB_NAME: <job-name>
|
|
541
|
+
JOBS_ROOT: <JOBS_ROOT>
|
|
542
|
+
PROJECT_DIR: <project path>
|
|
543
|
+
|
|
544
|
+
DATA:
|
|
545
|
+
TASK_DESCRIPTION: <original task description>
|
|
546
|
+
UPDATE_REASON: <why context needs updating>
|
|
547
|
+
FOCUS_AREAS: <new areas to research>
|
|
548
|
+
|
|
549
|
+
Execute update flow and return a CONTEXT_RESULT block.
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
---
|
|
553
|
+
|
|
554
|
+
## Rules of Engagement
|
|
555
|
+
|
|
556
|
+
1. **DO** focus on relevance — every line in the context document should help with the specific task.
|
|
557
|
+
2. **DO** include actionable information — patterns, conventions, API signatures, gotchas.
|
|
558
|
+
3. **DO** version-track every update with timestamp, version increment, and agent attribution.
|
|
559
|
+
4. **DO** preserve existing sections during updates unless they are explicitly outdated.
|
|
560
|
+
5. **DO** include code examples where they clarify a pattern (keep them minimal).
|
|
561
|
+
6. **DO** cross-reference with previous jobs to avoid rediscovering the same patterns.
|
|
562
|
+
7. **DO** return structured CONTEXT_RESULT for every action.
|
|
563
|
+
8. **DO NOT** include generic or obvious information (e.g., "React is a UI library").
|
|
564
|
+
9. **DO NOT** exceed ~500 lines in context.md — be aggressive with summarization.
|
|
565
|
+
10. **DO NOT** fetch external docs for standard well-known patterns already covered by project rules.
|
|
566
|
+
11. **DO NOT** modify any project files — this is a read + research + write-to-jobs skill only.
|
|
567
|
+
12. **DO NOT** skip the metadata block and update log — they are mandatory for version tracking.
|