drt-method 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +45 -0
- package/GETTING-STARTED.md +269 -0
- package/README.md +233 -0
- package/drt-method-1.0.0.tgz +0 -0
- package/drt-modules.yaml +1 -0
- package/package.json +51 -0
- package/scripts/install-from-github.ps1 +22 -0
- package/scripts/install-from-github.sh +17 -0
- package/src/core-skills/drt-advanced-elicitation/SKILL.md +142 -0
- package/src/core-skills/drt-advanced-elicitation/methods.csv +72 -0
- package/src/core-skills/drt-brainstorming/SKILL.md +80 -0
- package/src/core-skills/drt-brainstorming/assets/brain-icons.json +166 -0
- package/src/core-skills/drt-brainstorming/assets/brain-methods.csv +109 -0
- package/src/core-skills/drt-brainstorming/assets/brain-selector.html +326 -0
- package/src/core-skills/drt-brainstorming/customize.toml +84 -0
- package/src/core-skills/drt-brainstorming/references/converge.md +24 -0
- package/src/core-skills/drt-brainstorming/references/finalize.md +26 -0
- package/src/core-skills/drt-brainstorming/references/headless.md +54 -0
- package/src/core-skills/drt-brainstorming/references/in-chat-techniques.md +18 -0
- package/src/core-skills/drt-brainstorming/references/mode-autonomous.md +10 -0
- package/src/core-skills/drt-brainstorming/references/mode-facilitator.md +11 -0
- package/src/core-skills/drt-brainstorming/references/mode-partner.md +16 -0
- package/src/core-skills/drt-brainstorming/references/resume.md +5 -0
- package/src/core-skills/drt-brainstorming/scripts/brain.py +740 -0
- package/src/core-skills/drt-customize/SKILL.md +111 -0
- package/src/core-skills/drt-customize/scripts/list_customizable_skills.py +231 -0
- package/src/core-skills/drt-editorial-review-prose/SKILL.md +86 -0
- package/src/core-skills/drt-editorial-review-structure/SKILL.md +179 -0
- package/src/core-skills/drt-forge-idea/SKILL.md +107 -0
- package/src/core-skills/drt-forge-idea/customize.toml +42 -0
- package/src/core-skills/drt-forge-idea/scripts/resolve_personas.py +270 -0
- package/src/core-skills/drt-help/SKILL.md +75 -0
- package/src/core-skills/drt-index-docs/SKILL.md +66 -0
- package/src/core-skills/drt-party-mode/SKILL.md +60 -0
- package/src/core-skills/drt-party-mode/customize.toml +211 -0
- package/src/core-skills/drt-party-mode/references/create-party.md +70 -0
- package/src/core-skills/drt-party-mode/references/mode-agent-team.md +13 -0
- package/src/core-skills/drt-party-mode/references/mode-auto.md +13 -0
- package/src/core-skills/drt-party-mode/references/mode-subagent.md +31 -0
- package/src/core-skills/drt-party-mode/references/party-memory.md +51 -0
- package/src/core-skills/drt-party-mode/scripts/resolve_party.py +272 -0
- package/src/core-skills/drt-review-adversarial-general/SKILL.md +37 -0
- package/src/core-skills/drt-review-edge-case-hunter/SKILL.md +73 -0
- package/src/core-skills/drt-review-edge-case-hunter/references/deletion-check.md +14 -0
- package/src/core-skills/drt-review-verification-gap/SKILL.md +106 -0
- package/src/core-skills/drt-shard-doc/SKILL.md +105 -0
- package/src/core-skills/drt-spec/SKILL.md +160 -0
- package/src/core-skills/drt-spec/assets/headless-schemas.md +33 -0
- package/src/core-skills/drt-spec/assets/spec-template.md +49 -0
- package/src/core-skills/drt-spec/assets/stories-schema.md +44 -0
- package/src/core-skills/drt-spec/customize.toml +53 -0
- package/src/core-skills/module-help.csv +14 -0
- package/src/core-skills/module.yaml +33 -0
- package/src/drt-skills/1-analysis/drt-agent-analyst/SKILL.md +76 -0
- package/src/drt-skills/1-analysis/drt-agent-analyst/customize.toml +90 -0
- package/src/drt-skills/1-analysis/drt-agent-tech-writer/SKILL.md +76 -0
- package/src/drt-skills/1-analysis/drt-agent-tech-writer/customize.toml +81 -0
- package/src/drt-skills/1-analysis/drt-agent-tech-writer/explain-concept.md +20 -0
- package/src/drt-skills/1-analysis/drt-agent-tech-writer/mermaid-gen.md +20 -0
- package/src/drt-skills/1-analysis/drt-agent-tech-writer/validate-doc.md +19 -0
- package/src/drt-skills/1-analysis/drt-agent-tech-writer/write-document.md +20 -0
- package/src/drt-skills/1-analysis/drt-document-project/SKILL.md +62 -0
- package/src/drt-skills/1-analysis/drt-document-project/checklist.md +245 -0
- package/src/drt-skills/1-analysis/drt-document-project/customize.toml +41 -0
- package/src/drt-skills/1-analysis/drt-document-project/documentation-requirements.csv +12 -0
- package/src/drt-skills/1-analysis/drt-document-project/instructions.md +128 -0
- package/src/drt-skills/1-analysis/drt-document-project/templates/deep-dive-template.md +345 -0
- package/src/drt-skills/1-analysis/drt-document-project/templates/index-template.md +169 -0
- package/src/drt-skills/1-analysis/drt-document-project/templates/project-overview-template.md +103 -0
- package/src/drt-skills/1-analysis/drt-document-project/templates/project-scan-report-schema.json +160 -0
- package/src/drt-skills/1-analysis/drt-document-project/templates/source-tree-template.md +135 -0
- package/src/drt-skills/1-analysis/drt-document-project/workflows/deep-dive-instructions.md +300 -0
- package/src/drt-skills/1-analysis/drt-document-project/workflows/deep-dive-workflow.md +34 -0
- package/src/drt-skills/1-analysis/drt-document-project/workflows/full-scan-instructions.md +1111 -0
- package/src/drt-skills/1-analysis/drt-document-project/workflows/full-scan-workflow.md +34 -0
- package/src/drt-skills/1-analysis/drt-prfaq/SKILL.md +135 -0
- package/src/drt-skills/1-analysis/drt-prfaq/agents/artifact-analyzer.md +60 -0
- package/src/drt-skills/1-analysis/drt-prfaq/agents/web-researcher.md +49 -0
- package/src/drt-skills/1-analysis/drt-prfaq/assets/prfaq-template.md +62 -0
- package/src/drt-skills/1-analysis/drt-prfaq/bmad-manifest.json +16 -0
- package/src/drt-skills/1-analysis/drt-prfaq/customize.toml +41 -0
- package/src/drt-skills/1-analysis/drt-prfaq/references/customer-faq.md +55 -0
- package/src/drt-skills/1-analysis/drt-prfaq/references/internal-faq.md +51 -0
- package/src/drt-skills/1-analysis/drt-prfaq/references/press-release.md +60 -0
- package/src/drt-skills/1-analysis/drt-prfaq/references/verdict.md +83 -0
- package/src/drt-skills/1-analysis/drt-product-brief/SKILL.md +91 -0
- package/src/drt-skills/1-analysis/drt-product-brief/assets/brief-template.md +41 -0
- package/src/drt-skills/1-analysis/drt-product-brief/customize.toml +99 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/SKILL.md +96 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/customize.toml +41 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/domain-steps/step-01-init.md +137 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/domain-steps/step-02-domain-analysis.md +229 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/domain-steps/step-03-competitive-landscape.md +238 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/domain-steps/step-04-regulatory-focus.md +206 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/domain-steps/step-05-technical-trends.md +234 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/domain-steps/step-06-research-synthesis.md +450 -0
- package/src/drt-skills/1-analysis/research/drt-domain-research/research.template.md +29 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/SKILL.md +96 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/customize.toml +41 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/research.template.md +29 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/steps/step-01-init.md +184 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/steps/step-02-customer-behavior.md +239 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/steps/step-03-customer-pain-points.md +251 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/steps/step-04-customer-decisions.md +261 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/steps/step-05-competitive-analysis.md +173 -0
- package/src/drt-skills/1-analysis/research/drt-market-research/steps/step-06-research-completion.md +484 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/SKILL.md +96 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/customize.toml +41 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/research.template.md +29 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/technical-steps/step-01-init.md +137 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/technical-steps/step-02-technical-overview.md +239 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/technical-steps/step-03-integration-patterns.md +248 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/technical-steps/step-04-architectural-patterns.md +202 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/technical-steps/step-05-implementation-research.md +233 -0
- package/src/drt-skills/1-analysis/research/drt-technical-research/technical-steps/step-06-research-synthesis.md +493 -0
- package/src/drt-skills/2-plan-workflows/drt-agent-pm/SKILL.md +76 -0
- package/src/drt-skills/2-plan-workflows/drt-agent-pm/customize.toml +75 -0
- package/src/drt-skills/2-plan-workflows/drt-agent-ux-designer/SKILL.md +76 -0
- package/src/drt-skills/2-plan-workflows/drt-agent-ux-designer/customize.toml +60 -0
- package/src/drt-skills/2-plan-workflows/drt-create-prd/SKILL.md +30 -0
- package/src/drt-skills/2-plan-workflows/drt-create-prd/customize.toml +41 -0
- package/src/drt-skills/2-plan-workflows/drt-edit-prd/SKILL.md +30 -0
- package/src/drt-skills/2-plan-workflows/drt-edit-prd/customize.toml +42 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/SKILL.md +92 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/assets/headless-schemas.md +76 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/assets/prd-template.md +165 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/assets/prd-validation-checklist.md +135 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/assets/validation-report-template.html +325 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/customize.toml +147 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/references/headless.md +39 -0
- package/src/drt-skills/2-plan-workflows/drt-prd/references/validate.md +97 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/SKILL.md +90 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/color-themes.md +9 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/design-directions.md +9 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/design-example-editorial.md +158 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/design-example-mobile.md +93 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/design-example-shadcn.md +109 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/excalidraw-wireframe.md +19 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/experience-example-mobile.md +112 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/experience-example-shadcn.md +133 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/headless-schemas.md +84 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/key-screens.md +29 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/assets/validation-report-template.html +319 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/customize.toml +100 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/references/creative-tools.md +19 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/references/design-md-spec.md +50 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/references/headless.md +37 -0
- package/src/drt-skills/2-plan-workflows/drt-ux/references/validate.md +115 -0
- package/src/drt-skills/2-plan-workflows/drt-validate-prd/SKILL.md +30 -0
- package/src/drt-skills/2-plan-workflows/drt-validate-prd/customize.toml +42 -0
- package/src/drt-skills/3-solutioning/drt-agent-architect/SKILL.md +76 -0
- package/src/drt-skills/3-solutioning/drt-agent-architect/customize.toml +65 -0
- package/src/drt-skills/3-solutioning/drt-architecture/SKILL.md +85 -0
- package/src/drt-skills/3-solutioning/drt-architecture/assets/spine-template.md +79 -0
- package/src/drt-skills/3-solutioning/drt-architecture/customize.toml +100 -0
- package/src/drt-skills/3-solutioning/drt-architecture/references/headless.md +26 -0
- package/src/drt-skills/3-solutioning/drt-architecture/references/reviewer-gate.md +13 -0
- package/src/drt-skills/3-solutioning/drt-architecture/scripts/lint_spine.py +257 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/SKILL.md +91 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/customize.toml +41 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/steps/step-01-document-discovery.md +179 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/steps/step-02-prd-analysis.md +168 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +169 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/steps/step-04-ux-alignment.md +129 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/steps/step-05-epic-quality-review.md +241 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/steps/step-06-final-assessment.md +132 -0
- package/src/drt-skills/3-solutioning/drt-check-implementation-readiness/templates/readiness-report-template.md +4 -0
- package/src/drt-skills/3-solutioning/drt-create-architecture/SKILL.md +30 -0
- package/src/drt-skills/3-solutioning/drt-create-architecture/customize.toml +41 -0
- package/src/drt-skills/3-solutioning/drt-create-epics-and-stories/SKILL.md +93 -0
- package/src/drt-skills/3-solutioning/drt-create-epics-and-stories/customize.toml +41 -0
- package/src/drt-skills/3-solutioning/drt-create-epics-and-stories/steps/step-01-validate-prerequisites.md +263 -0
- package/src/drt-skills/3-solutioning/drt-create-epics-and-stories/steps/step-02-design-epics.md +242 -0
- package/src/drt-skills/3-solutioning/drt-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
- package/src/drt-skills/3-solutioning/drt-create-epics-and-stories/steps/step-04-final-validation.md +143 -0
- package/src/drt-skills/3-solutioning/drt-create-epics-and-stories/templates/epics-template.md +61 -0
- package/src/drt-skills/3-solutioning/drt-generate-project-context/SKILL.md +81 -0
- package/src/drt-skills/3-solutioning/drt-generate-project-context/customize.toml +41 -0
- package/src/drt-skills/3-solutioning/drt-generate-project-context/project-context-template.md +21 -0
- package/src/drt-skills/3-solutioning/drt-generate-project-context/steps/step-01-discover.md +186 -0
- package/src/drt-skills/3-solutioning/drt-generate-project-context/steps/step-02-generate.md +321 -0
- package/src/drt-skills/3-solutioning/drt-generate-project-context/steps/step-03-complete.md +284 -0
- package/src/drt-skills/4-implementation/drt-agent-dev/SKILL.md +76 -0
- package/src/drt-skills/4-implementation/drt-agent-dev/customize.toml +95 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/SKILL.md +68 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/customize.toml +41 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/generate-trail.md +38 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/step-01-orientation.md +105 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/step-02-walkthrough.md +89 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/step-03-detail-pass.md +106 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/step-04-testing.md +74 -0
- package/src/drt-skills/4-implementation/drt-checkpoint-preview/step-05-wrapup.md +30 -0
- package/src/drt-skills/4-implementation/drt-code-review/SKILL.md +90 -0
- package/src/drt-skills/4-implementation/drt-code-review/customize.toml +93 -0
- package/src/drt-skills/4-implementation/drt-code-review/steps/step-01-gather-context.md +84 -0
- package/src/drt-skills/4-implementation/drt-code-review/steps/step-02-review.md +32 -0
- package/src/drt-skills/4-implementation/drt-code-review/steps/step-03-triage.md +50 -0
- package/src/drt-skills/4-implementation/drt-code-review/steps/step-04-present.md +132 -0
- package/src/drt-skills/4-implementation/drt-correct-course/SKILL.md +301 -0
- package/src/drt-skills/4-implementation/drt-correct-course/checklist.md +288 -0
- package/src/drt-skills/4-implementation/drt-correct-course/customize.toml +41 -0
- package/src/drt-skills/4-implementation/drt-create-story/SKILL.md +432 -0
- package/src/drt-skills/4-implementation/drt-create-story/checklist.md +357 -0
- package/src/drt-skills/4-implementation/drt-create-story/customize.toml +41 -0
- package/src/drt-skills/4-implementation/drt-create-story/discover-inputs.md +88 -0
- package/src/drt-skills/4-implementation/drt-create-story/template.md +49 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/SKILL.md +123 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/compile-epic-context.md +62 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/customize.toml +108 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/spec-template.md +98 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/step-01-clarify-and-route.md +84 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/step-02-plan.md +31 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/step-03-implement.md +42 -0
- package/src/drt-skills/4-implementation/drt-dev-auto/step-04-review.md +95 -0
- package/src/drt-skills/4-implementation/drt-dev-story/SKILL.md +500 -0
- package/src/drt-skills/4-implementation/drt-dev-story/checklist.md +80 -0
- package/src/drt-skills/4-implementation/drt-dev-story/customize.toml +41 -0
- package/src/drt-skills/4-implementation/drt-implement-task/SKILL.md +101 -0
- package/src/drt-skills/4-implementation/drt-implement-task/assets/task-spec-template.md +60 -0
- package/src/drt-skills/4-implementation/drt-implement-task/customize.toml +17 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-01-gather-intent.md +42 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-02-plan-and-approve.md +43 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-03-confirm-dependencies.md +38 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-04-implement.md +42 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-05-qc-test.md +31 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-06-quality-review.md +30 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-07-fix-findings.md +33 -0
- package/src/drt-skills/4-implementation/drt-implement-task/steps/step-08-complete.md +35 -0
- package/src/drt-skills/4-implementation/drt-qa-generate-e2e-tests/SKILL.md +176 -0
- package/src/drt-skills/4-implementation/drt-qa-generate-e2e-tests/checklist.md +33 -0
- package/src/drt-skills/4-implementation/drt-qa-generate-e2e-tests/customize.toml +41 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/SKILL.md +13 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/compile-epic-context.md +62 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/customize.toml +83 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/render.js +206 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/spec-template.md +89 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/step-01-clarify-and-route.md +103 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/step-02-plan.md +47 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/step-03-implement.md +45 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/step-04-review.md +55 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/step-05-present.md +78 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/step-oneshot.md +78 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/sync-sprint-status.md +19 -0
- package/src/drt-skills/4-implementation/drt-quick-dev/workflow.md +85 -0
- package/src/drt-skills/4-implementation/drt-retrospective/SKILL.md +1527 -0
- package/src/drt-skills/4-implementation/drt-retrospective/customize.toml +41 -0
- package/src/drt-skills/4-implementation/drt-sprint-planning/SKILL.md +319 -0
- package/src/drt-skills/4-implementation/drt-sprint-planning/checklist.md +34 -0
- package/src/drt-skills/4-implementation/drt-sprint-planning/customize.toml +41 -0
- package/src/drt-skills/4-implementation/drt-sprint-planning/sprint-status-template.yaml +69 -0
- package/src/drt-skills/4-implementation/drt-sprint-status/SKILL.md +311 -0
- package/src/drt-skills/4-implementation/drt-sprint-status/customize.toml +41 -0
- package/src/drt-skills/module-help.csv +32 -0
- package/src/drt-skills/module.yaml +95 -0
- package/src/scripts/lib/load-toml.js +43 -0
- package/src/scripts/lib/merge-utils.js +89 -0
- package/src/scripts/memlog.js +184 -0
- package/src/scripts/package.json +7 -0
- package/src/scripts/resolve-config.js +56 -0
- package/src/scripts/resolve-customization.js +77 -0
- package/tools/installer/cli-utils.js +53 -0
- package/tools/installer/commands/install.js +149 -0
- package/tools/installer/commands/status.js +65 -0
- package/tools/installer/commands/uninstall.js +167 -0
- package/tools/installer/core/config.js +73 -0
- package/tools/installer/core/existing-install.js +121 -0
- package/tools/installer/core/install-paths.js +132 -0
- package/tools/installer/core/installer.js +1762 -0
- package/tools/installer/core/legacy-warnings.js +151 -0
- package/tools/installer/core/manifest-generator.js +859 -0
- package/tools/installer/core/manifest.js +433 -0
- package/tools/installer/core/uv-check.js +97 -0
- package/tools/installer/core/wsl-node-check.js +109 -0
- package/tools/installer/drt-cli.js +104 -0
- package/tools/installer/file-ops.js +204 -0
- package/tools/installer/fs-native.js +116 -0
- package/tools/installer/ide/_config-driven.js +972 -0
- package/tools/installer/ide/manager.js +324 -0
- package/tools/installer/ide/platform-codes.js +80 -0
- package/tools/installer/ide/platform-codes.yaml +343 -0
- package/tools/installer/ide/shared/installed-skills.js +50 -0
- package/tools/installer/ide/shared/path-utils.js +217 -0
- package/tools/installer/ide/shared/skill-manifest.js +57 -0
- package/tools/installer/install-messages.yaml +29 -0
- package/tools/installer/list-options.js +210 -0
- package/tools/installer/message-loader.js +83 -0
- package/tools/installer/modules/channel-plan.js +203 -0
- package/tools/installer/modules/channel-resolver.js +241 -0
- package/tools/installer/modules/custom-module-manager.js +918 -0
- package/tools/installer/modules/external-manager.js +667 -0
- package/tools/installer/modules/module-help-schema.js +13 -0
- package/tools/installer/modules/official-modules.js +2257 -0
- package/tools/installer/modules/plugin-resolver.js +398 -0
- package/tools/installer/modules/version-resolver.js +336 -0
- package/tools/installer/project-root.js +224 -0
- package/tools/installer/prompts.js +852 -0
- package/tools/installer/set-overrides.js +330 -0
- package/tools/installer/ui.js +2090 -0
- package/tools/installer/yaml-format.js +245 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# /// script
|
|
3
|
+
# requires-python = ">=3.11"
|
|
4
|
+
# ///
|
|
5
|
+
"""Resolve the party-mode roster, lazily.
|
|
6
|
+
|
|
7
|
+
Merges the installed DRT agents with the user's custom `party_members`
|
|
8
|
+
into one collective, then projects only what the moment needs:
|
|
9
|
+
|
|
10
|
+
* default (no flag) — the active roster to load on entry: the
|
|
11
|
+
`default_party` group if one is configured, else the whole collective.
|
|
12
|
+
Other groups come back as names only, so nothing you aren't using is
|
|
13
|
+
loaded into the party.
|
|
14
|
+
* --list-groups — just id + name + size for every configured group. The
|
|
15
|
+
cheap menu for "which room?", with no member detail.
|
|
16
|
+
* --party <id> — full member detail for one chosen group, on demand
|
|
17
|
+
(e.g. when the user switches rooms). Unknown id returns the available
|
|
18
|
+
names instead of an error wall.
|
|
19
|
+
|
|
20
|
+
The merge is deterministic (a keyed union; a custom member whose code
|
|
21
|
+
matches an installed agent overrides it), so the orchestrator consumes a
|
|
22
|
+
resolved roster instead of re-deriving it every session.
|
|
23
|
+
|
|
24
|
+
Stdlib only (Python 3.11+ for tomllib). Shells out to the project's
|
|
25
|
+
resolve_config.py and resolve_customization.py; falls back to reading
|
|
26
|
+
customize.toml directly if the customization resolver is unavailable.
|
|
27
|
+
|
|
28
|
+
resolve_party.py --project-root P --skill S
|
|
29
|
+
resolve_party.py --project-root P --skill S --list-groups
|
|
30
|
+
resolve_party.py --project-root P --skill S --party writers-room
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
import argparse
|
|
34
|
+
import json
|
|
35
|
+
import subprocess
|
|
36
|
+
import sys
|
|
37
|
+
from pathlib import Path
|
|
38
|
+
|
|
39
|
+
try:
|
|
40
|
+
import tomllib
|
|
41
|
+
except ImportError: # pragma: no cover - guarded for <3.11
|
|
42
|
+
sys.stderr.write("error: Python 3.11+ is required (stdlib `tomllib`).\n")
|
|
43
|
+
sys.exit(3)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _run_json(cmd):
|
|
47
|
+
"""Run a resolver script and parse its JSON stdout. None on any failure."""
|
|
48
|
+
try:
|
|
49
|
+
out = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
|
|
50
|
+
except (OSError, subprocess.SubprocessError):
|
|
51
|
+
return None
|
|
52
|
+
if out.returncode != 0 or not out.stdout.strip():
|
|
53
|
+
return None
|
|
54
|
+
try:
|
|
55
|
+
return json.loads(out.stdout)
|
|
56
|
+
except json.JSONDecodeError:
|
|
57
|
+
return None
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def load_agents(project_root: Path):
|
|
61
|
+
"""Installed agents as {code: entry}. Empty dict (with a flag) on failure."""
|
|
62
|
+
script = project_root / "_drt" / "scripts" / "resolve-config.js"
|
|
63
|
+
data = _run_json(["node", str(script), "--project-root", str(project_root), "--key", "agents"])
|
|
64
|
+
if data is None:
|
|
65
|
+
return {}, False
|
|
66
|
+
return data.get("agents", {}) or {}, True
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def load_workflow(project_root: Path, skill_root: Path):
|
|
70
|
+
"""Merged [workflow] table. Falls back to the skill's base customize.toml."""
|
|
71
|
+
script = project_root / "_drt" / "scripts" / "resolve-customization.js"
|
|
72
|
+
data = _run_json(["node", str(script), "--skill", str(skill_root), "--key", "workflow"])
|
|
73
|
+
if data is not None and "workflow" in data:
|
|
74
|
+
return data["workflow"]
|
|
75
|
+
# Fallback: read the skill's base customize.toml directly (no override merge).
|
|
76
|
+
toml_path = skill_root / "customize.toml"
|
|
77
|
+
if toml_path.exists():
|
|
78
|
+
try:
|
|
79
|
+
with toml_path.open("rb") as f:
|
|
80
|
+
return tomllib.load(f).get("workflow", {})
|
|
81
|
+
except (OSError, tomllib.TOMLDecodeError):
|
|
82
|
+
pass
|
|
83
|
+
return {}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def _alias(code: str) -> str:
|
|
87
|
+
"""Short alias for an installed agent code: drt-agent-analyst -> analyst."""
|
|
88
|
+
for prefix in ("drt-agent-", "drt-"):
|
|
89
|
+
if code.startswith(prefix):
|
|
90
|
+
return code[len(prefix):]
|
|
91
|
+
return code
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def build_collective(agents: dict, party_members: list):
|
|
95
|
+
"""One pool keyed by code. Custom members override matching installed agents.
|
|
96
|
+
|
|
97
|
+
Returns (collective, index, installed_codes):
|
|
98
|
+
* collective — every member (installed + custom), the pool groups draw
|
|
99
|
+
from and the orchestrator can summon by name.
|
|
100
|
+
* index — maps every resolvable token (code, prefix-stripped alias,
|
|
101
|
+
lower-cased name) to a canonical code.
|
|
102
|
+
* installed_codes — the codes occupying an installed-agent slot, in
|
|
103
|
+
order. This is the DEFAULT room: installed agents (with any custom
|
|
104
|
+
override applied in place), and NOT the pure-custom additions. So
|
|
105
|
+
shipping or defining custom members grows the pool without crowding
|
|
106
|
+
the default party.
|
|
107
|
+
"""
|
|
108
|
+
collective = {}
|
|
109
|
+
index = {}
|
|
110
|
+
installed_codes = []
|
|
111
|
+
|
|
112
|
+
def register(code, entry):
|
|
113
|
+
collective[code] = entry
|
|
114
|
+
index[code] = code
|
|
115
|
+
index[code.lower()] = code
|
|
116
|
+
index[_alias(code).lower()] = code
|
|
117
|
+
name = entry.get("name")
|
|
118
|
+
if name:
|
|
119
|
+
index[name.lower()] = code
|
|
120
|
+
|
|
121
|
+
for code, info in agents.items():
|
|
122
|
+
register(code, {
|
|
123
|
+
"code": code,
|
|
124
|
+
"name": info.get("name", code),
|
|
125
|
+
"icon": info.get("icon", ""),
|
|
126
|
+
"title": info.get("title", ""),
|
|
127
|
+
"description": info.get("description", ""),
|
|
128
|
+
"module": info.get("module", ""),
|
|
129
|
+
"team": info.get("team", ""),
|
|
130
|
+
"source": "installed",
|
|
131
|
+
})
|
|
132
|
+
installed_codes.append(code)
|
|
133
|
+
|
|
134
|
+
for m in party_members or []:
|
|
135
|
+
code = m.get("code")
|
|
136
|
+
if not code:
|
|
137
|
+
continue
|
|
138
|
+
# A custom member overrides an installed agent it matches by code/alias/name.
|
|
139
|
+
canonical = index.get(code) or index.get(code.lower()) or code
|
|
140
|
+
entry = {"code": canonical, "source": "custom"}
|
|
141
|
+
for field in ("name", "icon", "title", "persona", "capabilities", "model"):
|
|
142
|
+
if m.get(field) is not None:
|
|
143
|
+
entry[field] = m[field]
|
|
144
|
+
entry.setdefault("name", canonical)
|
|
145
|
+
register(canonical, entry)
|
|
146
|
+
# An override keeps the installed slot; a brand-new custom does not join it.
|
|
147
|
+
|
|
148
|
+
return collective, index, installed_codes
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def resolve_members(member_tokens, collective, index):
|
|
152
|
+
"""(resolved entries in listed order, unresolved tokens)."""
|
|
153
|
+
resolved, unresolved = [], []
|
|
154
|
+
for token in member_tokens or []:
|
|
155
|
+
code = index.get(token) or index.get(str(token).lower())
|
|
156
|
+
if code and code in collective:
|
|
157
|
+
resolved.append(collective[code])
|
|
158
|
+
else:
|
|
159
|
+
unresolved.append(token)
|
|
160
|
+
return resolved, unresolved
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def group_menu(groups):
|
|
164
|
+
"""Names only — the cheap menu. Open-cast groups (no roster) are flagged."""
|
|
165
|
+
out = []
|
|
166
|
+
for g in groups or []:
|
|
167
|
+
if not isinstance(g, dict) or not g.get("id"):
|
|
168
|
+
continue
|
|
169
|
+
members = g.get("members", []) or []
|
|
170
|
+
entry = {"id": g["id"], "name": g.get("name", g["id"]),
|
|
171
|
+
"member_count": len(members)}
|
|
172
|
+
if not members:
|
|
173
|
+
entry["open_cast"] = True
|
|
174
|
+
out.append(entry)
|
|
175
|
+
return out
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def find_group(groups, group_id):
|
|
179
|
+
for g in groups or []:
|
|
180
|
+
if isinstance(g, dict) and g.get("id") == group_id:
|
|
181
|
+
return g
|
|
182
|
+
return None
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def group_detail(g, collective, index):
|
|
186
|
+
"""Full detail for one group: resolved members + the optional scene.
|
|
187
|
+
|
|
188
|
+
`scene` is a freeform line the orchestrator plays — setting, what's
|
|
189
|
+
happening, room dynamics, in-the-moment character notes. Surfaced only
|
|
190
|
+
here (when a group is the active/chosen roster), never in the menu.
|
|
191
|
+
|
|
192
|
+
`members` is optional. With none, the group is open-cast: `open_cast`
|
|
193
|
+
is flagged and the scene describes the pool the orchestrator casts from
|
|
194
|
+
on the fly (e.g. "figures from the Star Wars Rebels universe"). A few
|
|
195
|
+
listed members anchor the room; the scene can still invite more.
|
|
196
|
+
"""
|
|
197
|
+
raw_members = g.get("members", []) or []
|
|
198
|
+
members, unresolved = resolve_members(raw_members, collective, index)
|
|
199
|
+
detail = {"active": g["id"], "name": g.get("name", g["id"]),
|
|
200
|
+
"members": members, "unresolved": unresolved,
|
|
201
|
+
"memory_enabled": bool(g.get("memory", False))}
|
|
202
|
+
if g.get("scene"):
|
|
203
|
+
detail["scene"] = g["scene"]
|
|
204
|
+
if not raw_members:
|
|
205
|
+
detail["open_cast"] = True
|
|
206
|
+
return detail
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def main():
|
|
210
|
+
ap = argparse.ArgumentParser(description="Resolve the party-mode roster, lazily.")
|
|
211
|
+
ap.add_argument("--project-root", required=True)
|
|
212
|
+
ap.add_argument("--skill", required=True, help="Path to the drt-party-mode skill dir")
|
|
213
|
+
ap.add_argument("--party", help="Resolve full detail for this group id")
|
|
214
|
+
ap.add_argument("--list-groups", action="store_true", help="Group names only")
|
|
215
|
+
args = ap.parse_args()
|
|
216
|
+
|
|
217
|
+
project_root = Path(args.project_root).resolve()
|
|
218
|
+
skill_root = Path(args.skill).resolve()
|
|
219
|
+
|
|
220
|
+
workflow = load_workflow(project_root, skill_root)
|
|
221
|
+
groups = workflow.get("party_groups", []) or []
|
|
222
|
+
default_party = workflow.get("default_party", "") or ""
|
|
223
|
+
party_mode = workflow.get("party_mode", "session") or "session"
|
|
224
|
+
# The global party_memory flag governs only the DEFAULT installed-agent room;
|
|
225
|
+
# a named group carries its own `memory` flag (resolved in group_detail).
|
|
226
|
+
party_memory = bool(workflow.get("party_memory", True))
|
|
227
|
+
|
|
228
|
+
# Group menu never needs the (more expensive) installed-agent resolve.
|
|
229
|
+
if args.list_groups:
|
|
230
|
+
_emit({
|
|
231
|
+
"party_mode": party_mode,
|
|
232
|
+
"default_party": default_party,
|
|
233
|
+
"groups": group_menu(groups),
|
|
234
|
+
})
|
|
235
|
+
return
|
|
236
|
+
|
|
237
|
+
agents, agents_ok = load_agents(project_root)
|
|
238
|
+
collective, index, installed_codes = build_collective(agents, workflow.get("party_members", []))
|
|
239
|
+
|
|
240
|
+
if args.party:
|
|
241
|
+
g = find_group(groups, args.party)
|
|
242
|
+
if g is None:
|
|
243
|
+
_emit({"error": "unknown_group", "requested": args.party,
|
|
244
|
+
"available": group_menu(groups)})
|
|
245
|
+
return
|
|
246
|
+
_emit({**group_detail(g, collective, index), "party_mode": party_mode})
|
|
247
|
+
return
|
|
248
|
+
|
|
249
|
+
# Default: the active roster to load on entry.
|
|
250
|
+
result = {"party_mode": party_mode, "groups": group_menu(groups),
|
|
251
|
+
"installed_agents_resolved": agents_ok}
|
|
252
|
+
g = find_group(groups, default_party) if default_party else None
|
|
253
|
+
if g is not None:
|
|
254
|
+
result.update(group_detail(g, collective, index))
|
|
255
|
+
else:
|
|
256
|
+
# No default group: the installed agents (custom additions stay in the
|
|
257
|
+
# pool but don't crowd the default room), exactly like a plain install.
|
|
258
|
+
result.update({"active": "installed",
|
|
259
|
+
"members": [collective[c] for c in installed_codes],
|
|
260
|
+
"memory_enabled": party_memory})
|
|
261
|
+
_emit(result)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def _emit(obj):
|
|
265
|
+
reconfigure = getattr(sys.stdout, "reconfigure", None)
|
|
266
|
+
if reconfigure is not None:
|
|
267
|
+
reconfigure(encoding="utf-8")
|
|
268
|
+
sys.stdout.write(json.dumps(obj, indent=2, ensure_ascii=False) + "\n")
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
if __name__ == "__main__":
|
|
272
|
+
main()
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drt-review-adversarial-general
|
|
3
|
+
description: 'Perform a Cynical Review and produce a findings report. Use when the user requests a critical review of something'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Adversarial Review (General)
|
|
7
|
+
|
|
8
|
+
**Goal:** Cynically review content and produce findings.
|
|
9
|
+
|
|
10
|
+
**Your Role:** You are a cynical, jaded reviewer with zero patience for sloppy work. The content was submitted by a clueless weasel and you expect to find problems. Be skeptical of everything. Look for what's missing, not just what's wrong. Use a precise, professional tone — no profanity or personal attacks.
|
|
11
|
+
|
|
12
|
+
**Inputs:**
|
|
13
|
+
- **content** — Content to review: diff, spec, story, doc, or any artifact
|
|
14
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal adversarial analysis
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## EXECUTION
|
|
18
|
+
|
|
19
|
+
### Step 1: Receive Content
|
|
20
|
+
|
|
21
|
+
- Load the content to review from provided input or context
|
|
22
|
+
- If content to review is empty, ask for clarification and abort
|
|
23
|
+
- Identify content type (diff, branch, uncommitted changes, document, etc.)
|
|
24
|
+
|
|
25
|
+
### Step 2: Adversarial Analysis
|
|
26
|
+
|
|
27
|
+
Review with extreme skepticism — assume problems exist. Find at least ten issues to fix or improve in the provided content.
|
|
28
|
+
|
|
29
|
+
### Step 3: Present Findings
|
|
30
|
+
|
|
31
|
+
Output findings as a Markdown list: descriptions only, no severity, priority, or ranking.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## HALT CONDITIONS
|
|
35
|
+
|
|
36
|
+
- HALT if zero findings — this is suspicious, re-analyze or ask for guidance
|
|
37
|
+
- HALT if content is empty or unreadable
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drt-review-edge-case-hunter
|
|
3
|
+
description: 'Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven. Use when you need exhaustive edge-case analysis of code, specs, or diffs.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Edge Case Hunter Review
|
|
7
|
+
|
|
8
|
+
**Goal:** You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
|
|
9
|
+
When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
|
|
10
|
+
When no diff is provided (full file or function), treat the entire provided content as the scope.
|
|
11
|
+
Ignore the rest of the codebase unless the provided content explicitly references external functions.
|
|
12
|
+
A brief secondary deletion check runs as Step 4 when the diff removes code.
|
|
13
|
+
|
|
14
|
+
**Inputs:**
|
|
15
|
+
- **content** — Content to review: diff, full file, or function
|
|
16
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
|
|
17
|
+
|
|
18
|
+
**MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
|
|
19
|
+
|
|
20
|
+
**Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition. Report ONLY paths and conditions that lack handling — discard handled ones silently. Do NOT editorialize or add filler. Do not assign severity labels, rankings, or priority levels.**
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## EXECUTION
|
|
24
|
+
|
|
25
|
+
### Step 1: Receive Content
|
|
26
|
+
|
|
27
|
+
- Load the content to review strictly from provided input
|
|
28
|
+
- If content is empty, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
29
|
+
- Identify content type (diff, full file, or function) to determine scope rules
|
|
30
|
+
|
|
31
|
+
### Step 2: Exhaustive Path Analysis
|
|
32
|
+
|
|
33
|
+
**Walk every branching path and boundary condition within scope — report only unhandled ones.**
|
|
34
|
+
|
|
35
|
+
- If `also_consider` input was provided, incorporate those areas into the analysis
|
|
36
|
+
- Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
37
|
+
- Consider implicit branches: the diff special-cases or changes the handling of one or more members of a fixed set of values — enums, status codes, sentinels, type tags, flags, value ranges. The rest of the set is implicit branches (e.g. the diff changes the `RED` and `YELLOW` cases of a `RED`/`YELLOW`/`GREEN` enum; `GREEN` is the implicit branch)
|
|
38
|
+
- For each path: determine whether the content handles it
|
|
39
|
+
- Collect only the unhandled paths as findings — discard handled ones silently
|
|
40
|
+
|
|
41
|
+
### Step 3: Validate Completeness
|
|
42
|
+
|
|
43
|
+
- Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
44
|
+
- Add any newly found unhandled paths to findings; discard confirmed-handled ones
|
|
45
|
+
|
|
46
|
+
### Step 4: Deletion Check
|
|
47
|
+
|
|
48
|
+
If the diff removed or replaced meaningful code (ignore pure renames and whitespace): load `references/deletion-check.md` and follow it.
|
|
49
|
+
|
|
50
|
+
### Step 5: Present Findings
|
|
51
|
+
|
|
52
|
+
Output all findings as a single JSON array following the Output Format specification exactly.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## OUTPUT FORMAT
|
|
56
|
+
|
|
57
|
+
Return ONLY a valid JSON array of objects. Each edge-case finding contains exactly these four fields:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
[{
|
|
61
|
+
"location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
|
|
62
|
+
"trigger_condition": "one-line description (max 15 words)",
|
|
63
|
+
"guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
|
|
64
|
+
"potential_consequence": "what could actually go wrong (max 15 words)"
|
|
65
|
+
}]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when nothing is found. Deletion findings from Step 4, if any, go in the same array with the extra fields defined in `references/deletion-check.md`.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## HALT CONDITIONS
|
|
72
|
+
|
|
73
|
+
- If content is empty or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Deletion Check
|
|
2
|
+
|
|
3
|
+
Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
|
|
4
|
+
|
|
5
|
+
For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
|
|
6
|
+
|
|
7
|
+
Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
|
|
8
|
+
|
|
9
|
+
- `kind`: `"deletion"`
|
|
10
|
+
- `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
|
|
11
|
+
|
|
12
|
+
For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
|
|
13
|
+
|
|
14
|
+
Add nothing if nothing qualifies.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drt-review-verification-gap
|
|
3
|
+
description: 'Review a code change for changed behavior that could regress without reliable verification catching it. Use when checking whether a change is adequately verified.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification Gap Review
|
|
7
|
+
|
|
8
|
+
**Goal:** Find changed behavior that could break without reliable verification catching it. Ask one question — "if the behavior this change is supposed to produce broke where it's actually used, would verification fail?" Do not hunt for correctness bugs, but report genuine problems you notice while tracing verification.
|
|
9
|
+
|
|
10
|
+
The main verification gap shapes are:
|
|
11
|
+
|
|
12
|
+
1. **Regression gap:** the changed code regresses where it's used, and no test covering that use would fail.
|
|
13
|
+
2. **Missing-adoption gap:** a place that should now use the new behavior doesn't; it handles the same case its own way, or not at all, and no test would flag the omission.
|
|
14
|
+
3. **Broken-verification gap:** a test appears to cover the changed behavior, but would not actually protect it because it is skipped, flaky, not run in the normal verification path, or too weak to observe the regression.
|
|
15
|
+
|
|
16
|
+
## Evidence Rules
|
|
17
|
+
|
|
18
|
+
- Read a test before claiming what it covers, runs, asserts, or misses.
|
|
19
|
+
- Before claiming no test exists, search the whole repo by the symbol under test and by import references; expected file locations are not enough.
|
|
20
|
+
- Never assert what you did not verify. If a finding cannot be grounded, drop it.
|
|
21
|
+
- In a finding, say what you actually checked — "none of the tests I read cover this" — and show how far you looked. Say a test doesn't exist anywhere only when the symbol/import-reference search actually shows that.
|
|
22
|
+
- Do not assign severity, confidence, priority, or ranking.
|
|
23
|
+
|
|
24
|
+
## Review Sequence
|
|
25
|
+
|
|
26
|
+
### Step 1: Screen for behavioral change
|
|
27
|
+
|
|
28
|
+
If the change is non-behavioral, stop here and output the clean result (see Output Format). Call it non-behavioral only when the changed code does not alter return values, thrown errors, caller-visible side effects, or observable state (including iteration order and emitted messages). After the changed code meets that test, stop; do not inspect callers or tests for extra confirmation.
|
|
29
|
+
|
|
30
|
+
Common non-behavioral examples: formatting, comments, whitespace; pure renames; trivial getters/setters and pass-throughs; type-only or compiler-enforced changes with no runtime effect; etc.
|
|
31
|
+
|
|
32
|
+
### Step 2: Find the behavior that changed
|
|
33
|
+
|
|
34
|
+
Identify what behavior changed compared to the previous version: output, side effect, branch, error path, schema/event shape, config default, validation/authorization rule, external contract, etc. If the change affects more than one behavior, handle each separately.
|
|
35
|
+
|
|
36
|
+
Treat broad-impact changes as behavioral even when no single changed line looks important: dependency, toolchain, build/config, data-file, etc.
|
|
37
|
+
|
|
38
|
+
### Step 3: Trace where that behavior is used
|
|
39
|
+
|
|
40
|
+
Trace the changed behavior to the places that observe it. Start with direct callers and registered entry points (routes, commands, DI), contract consumers (schemas, events, APIs, database readers), and reverse-dependency info if already available.
|
|
41
|
+
|
|
42
|
+
Follow a path only while the changed behavior is reachable and unverified. Stop when a test at that boundary would fail, the consumer does not observe the changed behavior, or the next hop is guesswork (dynamic dispatch, reflection, outside-repo consumers, etc.). Prefer the nearest observable boundary, often one to three hops away, especially across contract, integration, or service edges. If there are more than five similar consumers, group obvious repeats and check representative paths; expand only when a consumer observes the behavior differently.
|
|
43
|
+
|
|
44
|
+
### Step 4: Qualify the consumer, then check its test
|
|
45
|
+
|
|
46
|
+
For each consumer, name the smallest realistic regression this consumer would observe: invert the branch, drop the default, omit the field, return the old error code, skip the integration call, etc. This is the Demonstration. If no such regression exists, drop the path; untested downstream code is not a finding.
|
|
47
|
+
|
|
48
|
+
A `Missing-adoption gap` qualifies not by the adoption failure alone but by a supersession signal: the change gives clear evidence the new behavior is meant to replace the local one — PR intent, naming or docs, a replaced sibling site, deleted duplicate logic, or a test defining the new rule — and the local site shares the same observable contract. Without a supersession signal and a shared observable contract, it is a refactor suggestion, not a verification-gap finding. Once both hold, check whether any test for that site would flag the non-adoption; missing coverage of the non-adoption is the gap itself, not a disqualifier.
|
|
49
|
+
|
|
50
|
+
Find and read the relevant test. Ask whether the Demonstration would make an assertion fail.
|
|
51
|
+
|
|
52
|
+
- If yes, the behavior is verified. No finding.
|
|
53
|
+
- For a regression-style Demonstration: if no test runs the path, the test is skipped/flaky/not run normally, or the test runs the code without checking the changed result, report a `Regression gap` or `Broken-verification gap`.
|
|
54
|
+
- For a qualifying Missing-adoption case: if none of the site tests you found assert it adopts the new behavior, report a `Missing-adoption gap`.
|
|
55
|
+
|
|
56
|
+
A test counts only if it runs normally and an assertion observes the changed output, branch, or contract. These do not count: no execution; success/no-throw/snapshot-only checks; mock/log-call checks; human-only checks; tests that mock away the integration; e2e tests that pass through without checking the changed output; stale assertions or fixtures.
|
|
57
|
+
|
|
58
|
+
Common patterns:
|
|
59
|
+
|
|
60
|
+
- **Caller-path gap** — helper test covers the branch, but caller values skip it.
|
|
61
|
+
- **Contract drift** — payload/schema/event changes must be verified at the consumer.
|
|
62
|
+
- **Migration compatibility** — tests only create new-format rows or fresh schemas.
|
|
63
|
+
- **Phantom exception** — handled partial-failure path has no test.
|
|
64
|
+
- **Missing-adoption gap** — sibling site should use the new rule/helper and does not.
|
|
65
|
+
- **Removed verification** — deleted test or weakened assertion leaves behavior unpinned.
|
|
66
|
+
|
|
67
|
+
### Step 5: Confirm each finding is real
|
|
68
|
+
|
|
69
|
+
Before writing a finding, re-open the specific tests or search results the finding relies on. Verify the Demonstration would not make any test you checked fail, or that the absence claim is backed by the symbol/import-reference search. Do not claim more than you verified; drop any finding you cannot ground.
|
|
70
|
+
|
|
71
|
+
Do not report: compiler/type-checker-enforced cases; behavior already verified by an integration, contract, or e2e test; implementation-detail or mock-only tests; low coverage or a missing test file by itself; legacy untested code the change did not affect.
|
|
72
|
+
|
|
73
|
+
Report genuine problems you noticed while tracing verification, even if they are not verification gaps. Put them under `Other findings` in the output. This permits reporting what you already reached, not extra hunting.
|
|
74
|
+
|
|
75
|
+
## OUTPUT FORMAT
|
|
76
|
+
|
|
77
|
+
Emit each verification-gap finding as one block. No general advice, no severity or confidence.
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
### <one-line title naming the gap>
|
|
81
|
+
|
|
82
|
+
- **Changed surface:** the exact behavior or contract that changed — `file:line`.
|
|
83
|
+
- **Impacted consumer or site:** named concretely with `file:line` (e.g. "the `createInvoice` mutation used by the billing dashboard at `billing/dashboard.ts:88`," not "callers of this function").
|
|
84
|
+
- **Existing test evidence:**
|
|
85
|
+
- `Regression gap`: what the relevant test actually asserts, with `file:line`; or, if none, the symbol/import-reference searches run and their result.
|
|
86
|
+
- `Missing-adoption gap`: tests for the impacted site, and whether any assert it adopts the new behavior.
|
|
87
|
+
- `Broken-verification gap`: the apparent test or verification path, and why it does not count.
|
|
88
|
+
- **Missing verification:** the precise assertion or check that's absent.
|
|
89
|
+
- **Demonstration:**
|
|
90
|
+
- `Regression gap` / `Broken-verification gap`: the concrete regression that would ship undetected, and why the tests you checked would not fail.
|
|
91
|
+
- `Missing-adoption gap`: the case the site mishandles by not adopting the new behavior, and that none of the tests you read assert adoption.
|
|
92
|
+
- **Consequence:** the concrete thing that ships wrong — a regression the checked evidence would not catch, or a site that should use the new behavior and doesn't.
|
|
93
|
+
- **Suggested test shape:** (optional) the kind of test that would close the gap, fit to the repo's own way of verifying — don't impose a generic test pyramid.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If you noticed genuine non-gap problems while tracing verification, append:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
## Other findings
|
|
100
|
+
|
|
101
|
+
- <description only; no severity, confidence, priority, or ranking>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
When you find no verification gaps and no other findings, output exactly this single line, not an empty response:
|
|
105
|
+
|
|
106
|
+
`No verification gaps found.`
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drt-shard-doc
|
|
3
|
+
description: 'Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Shard Document
|
|
7
|
+
|
|
8
|
+
**Goal:** Split large markdown documents into smaller, organized files based on level 2 sections using `npx @kayvan/markdown-tree-parser`.
|
|
9
|
+
|
|
10
|
+
## CRITICAL RULES
|
|
11
|
+
|
|
12
|
+
- MANDATORY: Execute ALL steps in the EXECUTION section IN EXACT ORDER
|
|
13
|
+
- DO NOT skip steps or change the sequence
|
|
14
|
+
- HALT immediately when halt-conditions are met
|
|
15
|
+
- Each action within a step is a REQUIRED action to complete that step
|
|
16
|
+
|
|
17
|
+
## EXECUTION
|
|
18
|
+
|
|
19
|
+
### Step 1: Get Source Document
|
|
20
|
+
|
|
21
|
+
- Ask user for the source document path if not provided already
|
|
22
|
+
- Verify file exists and is accessible
|
|
23
|
+
- Verify file is markdown format (.md extension)
|
|
24
|
+
- If file not found or not markdown: HALT with error message
|
|
25
|
+
|
|
26
|
+
### Step 2: Get Destination Folder
|
|
27
|
+
|
|
28
|
+
- Determine default destination: same location as source file, folder named after source file without .md extension
|
|
29
|
+
- Example: `/path/to/architecture.md` --> `/path/to/architecture/`
|
|
30
|
+
- Ask user for the destination folder path (`[y]` to confirm use of default: `[suggested-path]`, else enter a new path)
|
|
31
|
+
- If user accepts default: use the suggested destination path
|
|
32
|
+
- If user provides custom path: use the custom destination path
|
|
33
|
+
- Verify destination folder exists or can be created
|
|
34
|
+
- Check write permissions for destination
|
|
35
|
+
- If permission denied: HALT with error message
|
|
36
|
+
|
|
37
|
+
### Step 3: Execute Sharding
|
|
38
|
+
|
|
39
|
+
- Inform user that sharding is beginning
|
|
40
|
+
- Execute command: `npx @kayvan/markdown-tree-parser explode [source-document] [destination-folder]`
|
|
41
|
+
- Capture command output and any errors
|
|
42
|
+
- If command fails: HALT and display error to user
|
|
43
|
+
|
|
44
|
+
### Step 4: Verify Output
|
|
45
|
+
|
|
46
|
+
- Check that destination folder contains sharded files
|
|
47
|
+
- Verify index.md was created in destination folder
|
|
48
|
+
- Count the number of files created
|
|
49
|
+
- If no files created: HALT with error message
|
|
50
|
+
|
|
51
|
+
### Step 5: Report Completion
|
|
52
|
+
|
|
53
|
+
- Display completion report to user including:
|
|
54
|
+
- Source document path and name
|
|
55
|
+
- Destination folder path
|
|
56
|
+
- Number of section files created
|
|
57
|
+
- Confirmation that index.md was created
|
|
58
|
+
- Any tool output or warnings
|
|
59
|
+
- Inform user that sharding completed successfully
|
|
60
|
+
|
|
61
|
+
### Step 6: Handle Original Document
|
|
62
|
+
|
|
63
|
+
> **Critical:** Keeping both the original and sharded versions defeats the purpose of sharding and can cause confusion.
|
|
64
|
+
|
|
65
|
+
Present user with options for the original document:
|
|
66
|
+
|
|
67
|
+
> What would you like to do with the original document `[source-document-name]`?
|
|
68
|
+
>
|
|
69
|
+
> Options:
|
|
70
|
+
> - `[d]` Delete - Remove the original (recommended - shards can always be recombined)
|
|
71
|
+
> - `[m]` Move to archive - Move original to a backup/archive location
|
|
72
|
+
> - `[k]` Keep - Leave original in place (NOT recommended - defeats sharding purpose)
|
|
73
|
+
>
|
|
74
|
+
> Your choice (d/m/k):
|
|
75
|
+
|
|
76
|
+
#### If user selects `d` (delete)
|
|
77
|
+
|
|
78
|
+
- Delete the original source document file
|
|
79
|
+
- Confirm deletion to user: "Original document deleted: [source-document-path]"
|
|
80
|
+
- Note: The document can be reconstructed from shards by concatenating all section files in order
|
|
81
|
+
|
|
82
|
+
#### If user selects `m` (move)
|
|
83
|
+
|
|
84
|
+
- Determine default archive location: same directory as source, in an `archive` subfolder
|
|
85
|
+
- Example: `/path/to/architecture.md` --> `/path/to/archive/architecture.md`
|
|
86
|
+
- Ask: Archive location (`[y]` to use default: `[default-archive-path]`, or provide custom path)
|
|
87
|
+
- If user accepts default: use default archive path
|
|
88
|
+
- If user provides custom path: use custom archive path
|
|
89
|
+
- Create archive directory if it does not exist
|
|
90
|
+
- Move original document to archive location
|
|
91
|
+
- Confirm move to user: "Original document moved to: [archive-path]"
|
|
92
|
+
|
|
93
|
+
#### If user selects `k` (keep)
|
|
94
|
+
|
|
95
|
+
- Display warning to user:
|
|
96
|
+
- Keeping both original and sharded versions is NOT recommended
|
|
97
|
+
- The discover_inputs protocol may load the wrong version
|
|
98
|
+
- Updates to one will not reflect in the other
|
|
99
|
+
- Duplicate content taking up space
|
|
100
|
+
- Consider deleting or archiving the original document
|
|
101
|
+
- Confirm user choice: "Original document kept at: [source-document-path]"
|
|
102
|
+
|
|
103
|
+
## HALT CONDITIONS
|
|
104
|
+
|
|
105
|
+
- HALT if npx command fails or produces no output files
|