bmm-opencode 1.5.0 → 1.6.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/_bmad/_config/agent-manifest.csv +18 -0
- package/_bmad/_config/agents/bmm-analyst.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-architect.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-dev.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-pm.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-qa.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-quick-flow-solo-dev.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-sm.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-tech-writer.customize.yaml +41 -0
- package/_bmad/_config/agents/bmm-ux-designer.customize.yaml +41 -0
- package/_bmad/_config/agents/cis-brainstorming-coach.customize.yaml +41 -0
- package/_bmad/_config/agents/cis-creative-problem-solver.customize.yaml +41 -0
- package/_bmad/_config/agents/cis-design-thinking-coach.customize.yaml +41 -0
- package/_bmad/_config/agents/cis-innovation-strategist.customize.yaml +41 -0
- package/_bmad/_config/agents/cis-presentation-master.customize.yaml +41 -0
- package/_bmad/_config/agents/cis-storyteller.customize.yaml +41 -0
- package/_bmad/_config/agents/core-bmad-master.customize.yaml +41 -0
- package/_bmad/_config/agents/tea-tea.customize.yaml +41 -0
- package/_bmad/_config/bmad-help.csv +53 -0
- package/_bmad/_config/files-manifest.csv +443 -0
- package/_bmad/_config/manifest.yaml +34 -0
- package/_bmad/_config/task-manifest.csv +7 -0
- package/_bmad/_config/tool-manifest.csv +1 -0
- package/_bmad/_config/workflow-manifest.csv +39 -0
- package/_bmad/_memory/config.yaml +11 -0
- package/_bmad/_memory/storyteller-sidecar/stories-told.md +7 -0
- package/_bmad/_memory/storyteller-sidecar/story-preferences.md +7 -0
- package/_bmad/_memory/tech-writer-sidecar/documentation-standards.md +224 -0
- package/_bmad/bmm/agents/analyst.md +78 -0
- package/_bmad/bmm/agents/architect.md +58 -0
- package/_bmad/bmm/agents/dev.md +69 -0
- package/_bmad/bmm/agents/pm.md +72 -0
- package/_bmad/bmm/agents/qa.md +92 -0
- package/_bmad/bmm/agents/quick-flow-solo-dev.md +69 -0
- package/_bmad/bmm/agents/sm.md +70 -0
- package/_bmad/bmm/agents/tech-writer/tech-writer.md +70 -0
- package/_bmad/bmm/agents/ux-designer.md +57 -0
- package/_bmad/bmm/config.yaml +16 -0
- package/_bmad/bmm/data/project-context-template.md +26 -0
- package/_bmad/bmm/module-help.csv +31 -0
- package/_bmad/bmm/teams/default-party.csv +20 -0
- package/_bmad/bmm/teams/team-fullstack.yaml +12 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/product-brief.template.md +10 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-01-init.md +177 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-01b-continue.md +161 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +199 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +202 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +205 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +219 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +162 -0
- package/_bmad/bmm/workflows/1-analysis/create-product-brief/workflow.md +57 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-01-init.md +137 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-02-domain-analysis.md +229 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-03-competitive-landscape.md +238 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-04-regulatory-focus.md +206 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-05-technical-trends.md +234 -0
- package/_bmad/bmm/workflows/1-analysis/research/domain-steps/step-06-research-synthesis.md +443 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +182 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +237 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +249 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +259 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +177 -0
- package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +475 -0
- package/_bmad/bmm/workflows/1-analysis/research/research.template.md +29 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-01-init.md +137 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-02-technical-overview.md +239 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-03-integration-patterns.md +248 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-04-architectural-patterns.md +202 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-05-implementation-research.md +239 -0
- package/_bmad/bmm/workflows/1-analysis/research/technical-steps/step-06-research-synthesis.md +486 -0
- package/_bmad/bmm/workflows/1-analysis/research/workflow-domain-research.md +54 -0
- package/_bmad/bmm/workflows/1-analysis/research/workflow-market-research.md +54 -0
- package/_bmad/bmm/workflows/1-analysis/research/workflow-technical-research.md +54 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/domain-complexity.csv +15 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +197 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/project-types.csv +11 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-01-init.md +191 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-01b-continue.md +153 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +224 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +226 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +213 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +207 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +226 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +237 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +228 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +231 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +242 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +217 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +124 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +247 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01b-legacy-conversion.md +208 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +249 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-03-edit.md +253 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-04-complete.md +168 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +218 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +191 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +209 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +174 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md +214 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md +228 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md +217 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md +205 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md +243 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md +263 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +209 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +264 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md +242 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +231 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/templates/prd-template.md +10 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow-create-prd.md +63 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow-edit-prd.md +65 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +65 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01-init.md +135 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-01b-continue.md +127 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +190 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +216 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +219 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +234 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +252 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +254 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +224 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +224 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +241 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +248 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +237 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +264 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +171 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/ux-design-template.md +13 -0
- package/_bmad/bmm/workflows/2-plan-workflows/create-ux-design/workflow.md +42 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-01-document-discovery.md +190 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-02-prd-analysis.md +178 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-03-epic-coverage-validation.md +179 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-04-ux-alignment.md +139 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-05-epic-quality-review.md +252 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +135 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/templates/readiness-report-template.md +4 -0
- package/_bmad/bmm/workflows/3-solutioning/check-implementation-readiness/workflow.md +54 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/architecture-decision-template.md +12 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/data/domain-complexity.csv +13 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/data/project-types.csv +7 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-01-init.md +153 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-01b-continue.md +164 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +224 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +331 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +318 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +359 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +379 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +359 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +76 -0
- package/_bmad/bmm/workflows/3-solutioning/create-architecture/workflow.md +49 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +259 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +233 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +282 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +149 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/templates/epics-template.md +63 -0
- package/_bmad/bmm/workflows/3-solutioning/create-epics-and-stories/workflow.md +58 -0
- package/_bmad/bmm/workflows/4-implementation/code-review/checklist.md +23 -0
- package/_bmad/bmm/workflows/4-implementation/code-review/instructions.xml +227 -0
- package/_bmad/bmm/workflows/4-implementation/code-review/workflow.yaml +48 -0
- package/_bmad/bmm/workflows/4-implementation/correct-course/checklist.md +288 -0
- package/_bmad/bmm/workflows/4-implementation/correct-course/instructions.md +206 -0
- package/_bmad/bmm/workflows/4-implementation/correct-course/workflow.yaml +56 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/checklist.md +358 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/instructions.xml +345 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/template.md +50 -0
- package/_bmad/bmm/workflows/4-implementation/create-story/workflow.yaml +57 -0
- package/_bmad/bmm/workflows/4-implementation/dev-story/checklist.md +80 -0
- package/_bmad/bmm/workflows/4-implementation/dev-story/instructions.xml +410 -0
- package/_bmad/bmm/workflows/4-implementation/dev-story/workflow.yaml +23 -0
- package/_bmad/bmm/workflows/4-implementation/retrospective/instructions.md +1443 -0
- package/_bmad/bmm/workflows/4-implementation/retrospective/workflow.yaml +55 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/checklist.md +33 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/instructions.md +265 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +81 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +51 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-status/instructions.md +229 -0
- package/_bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml +30 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-01-mode-detection.md +176 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-02-context-gathering.md +120 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-03-execute.md +113 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-04-self-check.md +113 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +106 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-06-resolve-findings.md +149 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +50 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-01-understand.md +192 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-02-investigate.md +145 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-03-generate.md +128 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +201 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/tech-spec-template.md +74 -0
- package/_bmad/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +78 -0
- package/_bmad/bmm/workflows/document-project/checklist.md +245 -0
- package/_bmad/bmm/workflows/document-project/documentation-requirements.csv +12 -0
- package/_bmad/bmm/workflows/document-project/instructions.md +221 -0
- package/_bmad/bmm/workflows/document-project/templates/deep-dive-template.md +345 -0
- package/_bmad/bmm/workflows/document-project/templates/index-template.md +169 -0
- package/_bmad/bmm/workflows/document-project/templates/project-overview-template.md +103 -0
- package/_bmad/bmm/workflows/document-project/templates/project-scan-report-schema.json +160 -0
- package/_bmad/bmm/workflows/document-project/templates/source-tree-template.md +135 -0
- package/_bmad/bmm/workflows/document-project/workflow.yaml +22 -0
- package/_bmad/bmm/workflows/document-project/workflows/deep-dive-instructions.md +298 -0
- package/_bmad/bmm/workflows/document-project/workflows/deep-dive.yaml +31 -0
- package/_bmad/bmm/workflows/document-project/workflows/full-scan-instructions.md +1106 -0
- package/_bmad/bmm/workflows/document-project/workflows/full-scan.yaml +31 -0
- package/_bmad/bmm/workflows/generate-project-context/project-context-template.md +21 -0
- package/_bmad/bmm/workflows/generate-project-context/steps/step-01-discover.md +184 -0
- package/_bmad/bmm/workflows/generate-project-context/steps/step-02-generate.md +318 -0
- package/_bmad/bmm/workflows/generate-project-context/steps/step-03-complete.md +278 -0
- package/_bmad/bmm/workflows/generate-project-context/workflow.md +49 -0
- package/_bmad/bmm/workflows/qa/automate/checklist.md +33 -0
- package/_bmad/bmm/workflows/qa/automate/instructions.md +110 -0
- package/_bmad/bmm/workflows/qa/automate/workflow.yaml +47 -0
- package/_bmad/cis/agents/brainstorming-coach.md +61 -0
- package/_bmad/cis/agents/creative-problem-solver.md +61 -0
- package/_bmad/cis/agents/design-thinking-coach.md +61 -0
- package/_bmad/cis/agents/innovation-strategist.md +61 -0
- package/_bmad/cis/agents/presentation-master.md +67 -0
- package/_bmad/cis/agents/storyteller/storyteller.md +58 -0
- package/_bmad/cis/config.yaml +12 -0
- package/_bmad/cis/module-help.csv +6 -0
- package/_bmad/cis/teams/creative-squad.yaml +7 -0
- package/_bmad/cis/teams/default-party.csv +12 -0
- package/_bmad/cis/workflows/README.md +139 -0
- package/_bmad/cis/workflows/design-thinking/README.md +56 -0
- package/_bmad/cis/workflows/design-thinking/design-methods.csv +31 -0
- package/_bmad/cis/workflows/design-thinking/instructions.md +202 -0
- package/_bmad/cis/workflows/design-thinking/template.md +111 -0
- package/_bmad/cis/workflows/design-thinking/workflow.yaml +27 -0
- package/_bmad/cis/workflows/innovation-strategy/README.md +56 -0
- package/_bmad/cis/workflows/innovation-strategy/innovation-frameworks.csv +31 -0
- package/_bmad/cis/workflows/innovation-strategy/instructions.md +276 -0
- package/_bmad/cis/workflows/innovation-strategy/template.md +189 -0
- package/_bmad/cis/workflows/innovation-strategy/workflow.yaml +27 -0
- package/_bmad/cis/workflows/problem-solving/README.md +56 -0
- package/_bmad/cis/workflows/problem-solving/instructions.md +252 -0
- package/_bmad/cis/workflows/problem-solving/solving-methods.csv +31 -0
- package/_bmad/cis/workflows/problem-solving/template.md +165 -0
- package/_bmad/cis/workflows/problem-solving/workflow.yaml +27 -0
- package/_bmad/cis/workflows/storytelling/README.md +58 -0
- package/_bmad/cis/workflows/storytelling/instructions.md +293 -0
- package/_bmad/cis/workflows/storytelling/story-types.csv +26 -0
- package/_bmad/cis/workflows/storytelling/template.md +113 -0
- package/_bmad/cis/workflows/storytelling/workflow.yaml +27 -0
- package/_bmad/core/agents/bmad-master.md +56 -0
- package/_bmad/core/config.yaml +9 -0
- package/_bmad/core/module-help.csv +9 -0
- package/_bmad/core/tasks/editorial-review-prose.xml +102 -0
- package/_bmad/core/tasks/editorial-review-structure.xml +209 -0
- package/_bmad/core/tasks/help.md +82 -0
- package/_bmad/core/tasks/index-docs.xml +65 -0
- package/_bmad/core/tasks/review-adversarial-general.xml +48 -0
- package/_bmad/core/tasks/shard-doc.xml +108 -0
- package/_bmad/core/tasks/workflow.xml +235 -0
- package/_bmad/core/workflows/advanced-elicitation/methods.csv +51 -0
- package/_bmad/core/workflows/advanced-elicitation/workflow.xml +117 -0
- package/_bmad/core/workflows/brainstorming/brain-methods.csv +62 -0
- package/_bmad/core/workflows/brainstorming/steps/step-01-session-setup.md +197 -0
- package/_bmad/core/workflows/brainstorming/steps/step-01b-continue.md +122 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02a-user-selected.md +225 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02b-ai-recommended.md +237 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02c-random-selection.md +209 -0
- package/_bmad/core/workflows/brainstorming/steps/step-02d-progressive-flow.md +264 -0
- package/_bmad/core/workflows/brainstorming/steps/step-03-technique-execution.md +399 -0
- package/_bmad/core/workflows/brainstorming/steps/step-04-idea-organization.md +303 -0
- package/_bmad/core/workflows/brainstorming/template.md +15 -0
- package/_bmad/core/workflows/brainstorming/workflow.md +58 -0
- package/_bmad/core/workflows/party-mode/steps/step-01-agent-loading.md +138 -0
- package/_bmad/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +261 -0
- package/_bmad/core/workflows/party-mode/steps/step-03-graceful-exit.md +166 -0
- package/_bmad/core/workflows/party-mode/workflow.md +219 -0
- package/_bmad/tea/agents/tea.md +71 -0
- package/_bmad/tea/config.yaml +19 -0
- package/_bmad/tea/module-help.csv +10 -0
- package/_bmad/tea/teams/default-party.csv +2 -0
- package/_bmad/tea/testarch/knowledge/adr-quality-readiness-checklist.md +377 -0
- package/_bmad/tea/testarch/knowledge/api-request.md +442 -0
- package/_bmad/tea/testarch/knowledge/api-testing-patterns.md +851 -0
- package/_bmad/tea/testarch/knowledge/auth-session.md +548 -0
- package/_bmad/tea/testarch/knowledge/burn-in.md +273 -0
- package/_bmad/tea/testarch/knowledge/ci-burn-in.md +675 -0
- package/_bmad/tea/testarch/knowledge/component-tdd.md +486 -0
- package/_bmad/tea/testarch/knowledge/contract-testing.md +957 -0
- package/_bmad/tea/testarch/knowledge/data-factories.md +500 -0
- package/_bmad/tea/testarch/knowledge/email-auth.md +721 -0
- package/_bmad/tea/testarch/knowledge/error-handling.md +725 -0
- package/_bmad/tea/testarch/knowledge/feature-flags.md +750 -0
- package/_bmad/tea/testarch/knowledge/file-utils.md +456 -0
- package/_bmad/tea/testarch/knowledge/fixture-architecture.md +401 -0
- package/_bmad/tea/testarch/knowledge/fixtures-composition.md +382 -0
- package/_bmad/tea/testarch/knowledge/intercept-network-call.md +426 -0
- package/_bmad/tea/testarch/knowledge/log.md +426 -0
- package/_bmad/tea/testarch/knowledge/network-error-monitor.md +401 -0
- package/_bmad/tea/testarch/knowledge/network-first.md +486 -0
- package/_bmad/tea/testarch/knowledge/network-recorder.md +527 -0
- package/_bmad/tea/testarch/knowledge/nfr-criteria.md +670 -0
- package/_bmad/tea/testarch/knowledge/overview.md +286 -0
- package/_bmad/tea/testarch/knowledge/playwright-config.md +730 -0
- package/_bmad/tea/testarch/knowledge/probability-impact.md +601 -0
- package/_bmad/tea/testarch/knowledge/recurse.md +421 -0
- package/_bmad/tea/testarch/knowledge/risk-governance.md +615 -0
- package/_bmad/tea/testarch/knowledge/selective-testing.md +732 -0
- package/_bmad/tea/testarch/knowledge/selector-resilience.md +527 -0
- package/_bmad/tea/testarch/knowledge/test-healing-patterns.md +644 -0
- package/_bmad/tea/testarch/knowledge/test-levels-framework.md +473 -0
- package/_bmad/tea/testarch/knowledge/test-priorities-matrix.md +373 -0
- package/_bmad/tea/testarch/knowledge/test-quality.md +664 -0
- package/_bmad/tea/testarch/knowledge/timing-debugging.md +372 -0
- package/_bmad/tea/testarch/knowledge/visual-debugging.md +524 -0
- package/_bmad/tea/testarch/tea-index.csv +35 -0
- package/_bmad/tea/workflows/testarch/README.md +74 -0
- package/_bmad/tea/workflows/testarch/atdd/atdd-checklist-template.md +363 -0
- package/_bmad/tea/workflows/testarch/atdd/checklist.md +374 -0
- package/_bmad/tea/workflows/testarch/atdd/instructions.md +38 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-01-preflight-and-context.md +110 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-02-generation-mode.md +79 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-03-test-strategy.md +76 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-04-generate-tests.md +228 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-04a-subprocess-api-failing.md +215 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-04b-subprocess-e2e-failing.md +212 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-04c-aggregate.md +329 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-c/step-05-validate-and-complete.md +68 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/atdd/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/atdd/validation-report-20260127-095021.md +73 -0
- package/_bmad/tea/workflows/testarch/atdd/validation-report-20260127-102401.md +116 -0
- package/_bmad/tea/workflows/testarch/atdd/workflow-plan.md +21 -0
- package/_bmad/tea/workflows/testarch/atdd/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/atdd/workflow.yaml +45 -0
- package/_bmad/tea/workflows/testarch/automate/checklist.md +582 -0
- package/_bmad/tea/workflows/testarch/automate/instructions.md +43 -0
- package/_bmad/tea/workflows/testarch/automate/steps-c/step-01-preflight-and-context.md +127 -0
- package/_bmad/tea/workflows/testarch/automate/steps-c/step-02-identify-targets.md +95 -0
- package/_bmad/tea/workflows/testarch/automate/steps-c/step-03-generate-tests.md +199 -0
- package/_bmad/tea/workflows/testarch/automate/steps-c/step-03a-subprocess-api.md +183 -0
- package/_bmad/tea/workflows/testarch/automate/steps-c/step-03b-subprocess-e2e.md +181 -0
- package/_bmad/tea/workflows/testarch/automate/steps-c/step-03c-aggregate.md +300 -0
- package/_bmad/tea/workflows/testarch/automate/steps-c/step-04-validate-and-summarize.md +69 -0
- package/_bmad/tea/workflows/testarch/automate/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/automate/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/automate/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/automate/validation-report-20260127-095021.md +72 -0
- package/_bmad/tea/workflows/testarch/automate/validation-report-20260127-102401.md +114 -0
- package/_bmad/tea/workflows/testarch/automate/workflow-plan.md +20 -0
- package/_bmad/tea/workflows/testarch/automate/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/automate/workflow.yaml +52 -0
- package/_bmad/tea/workflows/testarch/ci/checklist.md +247 -0
- package/_bmad/tea/workflows/testarch/ci/github-actions-template.yaml +198 -0
- package/_bmad/tea/workflows/testarch/ci/gitlab-ci-template.yaml +149 -0
- package/_bmad/tea/workflows/testarch/ci/instructions.md +38 -0
- package/_bmad/tea/workflows/testarch/ci/steps-c/step-01-preflight.md +92 -0
- package/_bmad/tea/workflows/testarch/ci/steps-c/step-02-generate-pipeline.md +82 -0
- package/_bmad/tea/workflows/testarch/ci/steps-c/step-03-configure-quality-gates.md +75 -0
- package/_bmad/tea/workflows/testarch/ci/steps-c/step-04-validate-and-summary.md +67 -0
- package/_bmad/tea/workflows/testarch/ci/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/ci/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/ci/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/ci/validation-report-20260127-095021.md +72 -0
- package/_bmad/tea/workflows/testarch/ci/validation-report-20260127-102401.md +114 -0
- package/_bmad/tea/workflows/testarch/ci/workflow-plan.md +20 -0
- package/_bmad/tea/workflows/testarch/ci/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/ci/workflow.yaml +45 -0
- package/_bmad/tea/workflows/testarch/framework/checklist.md +320 -0
- package/_bmad/tea/workflows/testarch/framework/instructions.md +38 -0
- package/_bmad/tea/workflows/testarch/framework/steps-c/step-01-preflight.md +75 -0
- package/_bmad/tea/workflows/testarch/framework/steps-c/step-02-select-framework.md +73 -0
- package/_bmad/tea/workflows/testarch/framework/steps-c/step-03-scaffold-framework.md +120 -0
- package/_bmad/tea/workflows/testarch/framework/steps-c/step-04-docs-and-scripts.md +70 -0
- package/_bmad/tea/workflows/testarch/framework/steps-c/step-05-validate-and-summary.md +68 -0
- package/_bmad/tea/workflows/testarch/framework/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/framework/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/framework/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/framework/validation-report-20260127-095021.md +73 -0
- package/_bmad/tea/workflows/testarch/framework/validation-report-20260127-102401.md +116 -0
- package/_bmad/tea/workflows/testarch/framework/workflow-plan.md +22 -0
- package/_bmad/tea/workflows/testarch/framework/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/framework/workflow.yaml +47 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/checklist.md +407 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/instructions.md +36 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/nfr-report-template.md +462 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-01-load-context.md +85 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-02-define-thresholds.md +82 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-03-gather-evidence.md +64 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04-evaluate-and-score.md +140 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04a-subprocess-security.md +138 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04b-subprocess-performance.md +84 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04c-subprocess-reliability.md +85 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04d-subprocess-scalability.md +88 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-04e-aggregate-nfr.md +219 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-c/step-05-generate-report.md +71 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/validation-report-20260127-095021.md +73 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/validation-report-20260127-102401.md +116 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/workflow-plan.md +19 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/nfr-assess/workflow.yaml +47 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/checklist.md +197 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/data/curriculum.yaml +129 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/data/quiz-questions.yaml +206 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/data/role-paths.yaml +136 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/data/session-content-map.yaml +204 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/data/tea-resources-index.yaml +359 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/instructions.md +130 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-01-init.md +235 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-01b-continue.md +147 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-02-assess.md +258 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-03-session-menu.md +219 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-04-session-01.md +460 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-04-session-02.md +465 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-04-session-03.md +301 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-04-session-04.md +234 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-04-session-05.md +234 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-04-session-06.md +209 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-04-session-07.md +212 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-c/step-05-completion.md +339 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-e/step-e-01-assess-workflow.md +141 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-e/step-e-02-apply-edits.md +122 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/steps-v/step-v-01-validate.md +263 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/templates/certificate-template.md +86 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/templates/progress-template.yaml +95 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/templates/session-notes-template.md +83 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/workflow-plan-teach-me-testing.md +950 -0
- package/_bmad/tea/workflows/testarch/teach-me-testing/workflow.md +90 -0
- package/_bmad/tea/workflows/testarch/test-design/checklist.md +410 -0
- package/_bmad/tea/workflows/testarch/test-design/instructions.md +52 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-c/step-01-detect-mode.md +109 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-c/step-02-load-context.md +127 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-c/step-03-risk-and-testability.md +85 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-c/step-04-coverage-plan.md +98 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-c/step-05-generate-output.md +97 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/test-design/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/test-design/test-design-architecture-template.md +222 -0
- package/_bmad/tea/workflows/testarch/test-design/test-design-qa-template.md +296 -0
- package/_bmad/tea/workflows/testarch/test-design/test-design-template.md +294 -0
- package/_bmad/tea/workflows/testarch/test-design/validation-report-20260127-095021.md +73 -0
- package/_bmad/tea/workflows/testarch/test-design/validation-report-20260127-102401.md +116 -0
- package/_bmad/tea/workflows/testarch/test-design/workflow-plan.md +22 -0
- package/_bmad/tea/workflows/testarch/test-design/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/test-design/workflow.yaml +69 -0
- package/_bmad/tea/workflows/testarch/test-review/checklist.md +472 -0
- package/_bmad/tea/workflows/testarch/test-review/instructions.md +36 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-01-load-context.md +101 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-02-discover-tests.md +69 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-03-quality-evaluation.md +184 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-03a-subprocess-determinism.md +214 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-03b-subprocess-isolation.md +125 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-03c-subprocess-maintainability.md +102 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-03d-subprocess-coverage.md +111 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-03e-subprocess-performance.md +117 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-03f-aggregate-scores.md +246 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-c/step-04-generate-report.md +72 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/test-review/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/test-review/test-review-template.md +390 -0
- package/_bmad/tea/workflows/testarch/test-review/validation-report-20260127-095021.md +72 -0
- package/_bmad/tea/workflows/testarch/test-review/validation-report-20260127-102401.md +114 -0
- package/_bmad/tea/workflows/testarch/test-review/workflow-plan.md +18 -0
- package/_bmad/tea/workflows/testarch/test-review/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/test-review/workflow.yaml +46 -0
- package/_bmad/tea/workflows/testarch/trace/checklist.md +642 -0
- package/_bmad/tea/workflows/testarch/trace/instructions.md +36 -0
- package/_bmad/tea/workflows/testarch/trace/steps-c/step-01-load-context.md +80 -0
- package/_bmad/tea/workflows/testarch/trace/steps-c/step-02-discover-tests.md +69 -0
- package/_bmad/tea/workflows/testarch/trace/steps-c/step-03-map-criteria.md +65 -0
- package/_bmad/tea/workflows/testarch/trace/steps-c/step-04-analyze-gaps.md +244 -0
- package/_bmad/tea/workflows/testarch/trace/steps-c/step-05-gate-decision.md +232 -0
- package/_bmad/tea/workflows/testarch/trace/steps-e/step-01-assess.md +65 -0
- package/_bmad/tea/workflows/testarch/trace/steps-e/step-02-apply-edit.md +60 -0
- package/_bmad/tea/workflows/testarch/trace/steps-v/step-01-validate.md +67 -0
- package/_bmad/tea/workflows/testarch/trace/trace-template.md +675 -0
- package/_bmad/tea/workflows/testarch/trace/validation-report-20260127-095021.md +73 -0
- package/_bmad/tea/workflows/testarch/trace/validation-report-20260127-102401.md +116 -0
- package/_bmad/tea/workflows/testarch/trace/workflow-plan.md +21 -0
- package/_bmad/tea/workflows/testarch/trace/workflow.md +39 -0
- package/_bmad/tea/workflows/testarch/trace/workflow.yaml +55 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +201 -11
- package/package.json +2 -1
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
# File Utilities
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
4
|
+
|
|
5
|
+
Read and validate files (CSV, XLSX, PDF, ZIP) with automatic parsing, type-safe results, and download handling. Simplify file operations in Playwright tests with built-in format support and validation helpers.
|
|
6
|
+
|
|
7
|
+
## Rationale
|
|
8
|
+
|
|
9
|
+
Testing file operations in Playwright requires boilerplate:
|
|
10
|
+
|
|
11
|
+
- Manual download handling
|
|
12
|
+
- External parsing libraries for each format
|
|
13
|
+
- No validation helpers
|
|
14
|
+
- Type-unsafe results
|
|
15
|
+
- Repetitive path handling
|
|
16
|
+
|
|
17
|
+
The `file-utils` module provides:
|
|
18
|
+
|
|
19
|
+
- **Auto-parsing**: CSV, XLSX, PDF, ZIP automatically parsed
|
|
20
|
+
- **Download handling**: Single function for UI or API-triggered downloads
|
|
21
|
+
- **Type-safe**: TypeScript interfaces for parsed results
|
|
22
|
+
- **Validation helpers**: Row count, header checks, content validation
|
|
23
|
+
- **Format support**: Multiple sheet support (XLSX), text extraction (PDF), archive extraction (ZIP)
|
|
24
|
+
|
|
25
|
+
## Why Use This Instead of Vanilla Playwright?
|
|
26
|
+
|
|
27
|
+
| Vanilla Playwright | File Utils |
|
|
28
|
+
| ------------------------------------------- | ------------------------------------------------ |
|
|
29
|
+
| ~80 lines per CSV flow (download + parse) | ~10 lines end-to-end |
|
|
30
|
+
| Manual event orchestration for downloads | Encapsulated in `handleDownload()` |
|
|
31
|
+
| Manual path handling and `saveAs` | Returns a ready-to-use file path |
|
|
32
|
+
| Manual existence checks and error handling | Centralized in one place via utility patterns |
|
|
33
|
+
| Manual CSV parsing config (headers, typing) | `readCSV()` returns `{ data, headers }` directly |
|
|
34
|
+
|
|
35
|
+
## Pattern Examples
|
|
36
|
+
|
|
37
|
+
### Example 1: UI-Triggered CSV Download
|
|
38
|
+
|
|
39
|
+
**Context**: User clicks button, CSV downloads, validate contents.
|
|
40
|
+
|
|
41
|
+
**Implementation**:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { handleDownload, readCSV } from '@seontechnologies/playwright-utils/file-utils';
|
|
45
|
+
import path from 'node:path';
|
|
46
|
+
|
|
47
|
+
const DOWNLOAD_DIR = path.join(__dirname, '../downloads');
|
|
48
|
+
|
|
49
|
+
test('should download and validate CSV', async ({ page }) => {
|
|
50
|
+
const downloadPath = await handleDownload({
|
|
51
|
+
page,
|
|
52
|
+
downloadDir: DOWNLOAD_DIR,
|
|
53
|
+
trigger: () => page.getByTestId('download-button-text/csv').click(),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const csvResult = await readCSV({ filePath: downloadPath });
|
|
57
|
+
|
|
58
|
+
// Access parsed data and headers
|
|
59
|
+
const { data, headers } = csvResult.content;
|
|
60
|
+
expect(headers).toEqual(['ID', 'Name', 'Email']);
|
|
61
|
+
expect(data[0]).toMatchObject({
|
|
62
|
+
ID: expect.any(String),
|
|
63
|
+
Name: expect.any(String),
|
|
64
|
+
Email: expect.any(String),
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Key Points**:
|
|
70
|
+
|
|
71
|
+
- `handleDownload` waits for download, returns file path
|
|
72
|
+
- `readCSV` auto-parses to `{ headers, data }`
|
|
73
|
+
- Type-safe access to parsed content
|
|
74
|
+
- Clean up downloads in `afterEach`
|
|
75
|
+
|
|
76
|
+
### Example 2: XLSX with Multiple Sheets
|
|
77
|
+
|
|
78
|
+
**Context**: Excel file with multiple sheets (e.g., Summary, Details, Errors).
|
|
79
|
+
|
|
80
|
+
**Implementation**:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
import { readXLSX } from '@seontechnologies/playwright-utils/file-utils';
|
|
84
|
+
|
|
85
|
+
test('should read multi-sheet XLSX', async () => {
|
|
86
|
+
const downloadPath = await handleDownload({
|
|
87
|
+
page,
|
|
88
|
+
downloadDir: DOWNLOAD_DIR,
|
|
89
|
+
trigger: () => page.click('[data-testid="export-xlsx"]'),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const xlsxResult = await readXLSX({ filePath: downloadPath });
|
|
93
|
+
|
|
94
|
+
// Verify worksheet structure
|
|
95
|
+
expect(xlsxResult.content.worksheets.length).toBeGreaterThan(0);
|
|
96
|
+
const worksheet = xlsxResult.content.worksheets[0];
|
|
97
|
+
expect(worksheet).toBeDefined();
|
|
98
|
+
expect(worksheet).toHaveProperty('name');
|
|
99
|
+
|
|
100
|
+
// Access sheet data
|
|
101
|
+
const sheetData = worksheet?.data;
|
|
102
|
+
expect(Array.isArray(sheetData)).toBe(true);
|
|
103
|
+
|
|
104
|
+
// Use type assertion for type safety
|
|
105
|
+
const firstRow = sheetData![0] as Record<string, unknown>;
|
|
106
|
+
expect(firstRow).toHaveProperty('id');
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Key Points**:
|
|
111
|
+
|
|
112
|
+
- `worksheets` array with `name` and `data` properties
|
|
113
|
+
- Access sheets by name
|
|
114
|
+
- Each sheet has its own headers and data
|
|
115
|
+
- Type-safe sheet iteration
|
|
116
|
+
|
|
117
|
+
### Example 3: PDF Text Extraction
|
|
118
|
+
|
|
119
|
+
**Context**: Validate PDF report contains expected content.
|
|
120
|
+
|
|
121
|
+
**Implementation**:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import { readPDF } from '@seontechnologies/playwright-utils/file-utils';
|
|
125
|
+
|
|
126
|
+
test('should validate PDF report', async () => {
|
|
127
|
+
const downloadPath = await handleDownload({
|
|
128
|
+
page,
|
|
129
|
+
downloadDir: DOWNLOAD_DIR,
|
|
130
|
+
trigger: () => page.getByTestId('download-button-Text-based PDF Document').click(),
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const pdfResult = await readPDF({ filePath: downloadPath });
|
|
134
|
+
|
|
135
|
+
// content is extracted text from all pages
|
|
136
|
+
expect(pdfResult.pagesCount).toBe(1);
|
|
137
|
+
expect(pdfResult.fileName).toContain('.pdf');
|
|
138
|
+
expect(pdfResult.content).toContain('All you need is the free Adobe Acrobat Reader');
|
|
139
|
+
});
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**PDF Reader Options:**
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
const result = await readPDF({
|
|
146
|
+
filePath: '/path/to/document.pdf',
|
|
147
|
+
mergePages: false, // Keep pages separate (default: true)
|
|
148
|
+
debug: true, // Enable debug logging
|
|
149
|
+
maxPages: 10, // Limit processing to first 10 pages
|
|
150
|
+
});
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Important Limitation - Vector-based PDFs:**
|
|
154
|
+
|
|
155
|
+
Text extraction may fail for PDFs that store text as vector graphics (e.g., those generated by jsPDF):
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
// Vector-based PDF example (extraction fails gracefully)
|
|
159
|
+
const pdfResult = await readPDF({ filePath: downloadPath });
|
|
160
|
+
|
|
161
|
+
expect(pdfResult.pagesCount).toBe(1);
|
|
162
|
+
expect(pdfResult.info.extractionNotes).toContain('Text extraction from vector-based PDFs is not supported.');
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Such PDFs will have:
|
|
166
|
+
|
|
167
|
+
- `textExtractionSuccess: false`
|
|
168
|
+
- `isVectorBased: true`
|
|
169
|
+
- Explanatory message in `extractionNotes`
|
|
170
|
+
|
|
171
|
+
### Example 4: ZIP Archive Validation
|
|
172
|
+
|
|
173
|
+
**Context**: Validate ZIP contains expected files and extract specific file.
|
|
174
|
+
|
|
175
|
+
**Implementation**:
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
import { readZIP } from '@seontechnologies/playwright-utils/file-utils';
|
|
179
|
+
|
|
180
|
+
test('should validate ZIP archive', async () => {
|
|
181
|
+
const downloadPath = await handleDownload({
|
|
182
|
+
page,
|
|
183
|
+
downloadDir: DOWNLOAD_DIR,
|
|
184
|
+
trigger: () => page.click('[data-testid="download-backup"]'),
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
const zipResult = await readZIP({ filePath: downloadPath });
|
|
188
|
+
|
|
189
|
+
// Check file list
|
|
190
|
+
expect(Array.isArray(zipResult.content.entries)).toBe(true);
|
|
191
|
+
expect(zipResult.content.entries).toContain('Case_53125_10-19-22_AM/Case_53125_10-19-22_AM_case_data.csv');
|
|
192
|
+
|
|
193
|
+
// Extract specific file
|
|
194
|
+
const targetFile = 'Case_53125_10-19-22_AM/Case_53125_10-19-22_AM_case_data.csv';
|
|
195
|
+
const zipWithExtraction = await readZIP({
|
|
196
|
+
filePath: downloadPath,
|
|
197
|
+
fileToExtract: targetFile,
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// Access extracted file buffer
|
|
201
|
+
const extractedFiles = zipWithExtraction.content.extractedFiles || {};
|
|
202
|
+
const fileBuffer = extractedFiles[targetFile];
|
|
203
|
+
expect(fileBuffer).toBeInstanceOf(Buffer);
|
|
204
|
+
expect(fileBuffer?.length).toBeGreaterThan(0);
|
|
205
|
+
});
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Key Points**:
|
|
209
|
+
|
|
210
|
+
- `content.entries` lists all files in archive
|
|
211
|
+
- `fileToExtract` extracts specific files to Buffer
|
|
212
|
+
- Validate archive structure
|
|
213
|
+
- Read and parse individual files from ZIP
|
|
214
|
+
|
|
215
|
+
### Example 5: API-Triggered Download
|
|
216
|
+
|
|
217
|
+
**Context**: API endpoint returns file download (not UI click).
|
|
218
|
+
|
|
219
|
+
**Implementation**:
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
test('should download via API', async ({ page, request }) => {
|
|
223
|
+
const downloadPath = await handleDownload({
|
|
224
|
+
page, // Still need page for download events
|
|
225
|
+
downloadDir: DOWNLOAD_DIR,
|
|
226
|
+
trigger: async () => {
|
|
227
|
+
const response = await request.get('/api/export/csv', {
|
|
228
|
+
headers: { Authorization: 'Bearer token' },
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
if (!response.ok()) {
|
|
232
|
+
throw new Error(`Export failed: ${response.status()}`);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
const { content } = await readCSV({ filePath: downloadPath });
|
|
238
|
+
|
|
239
|
+
expect(content.data).toHaveLength(100);
|
|
240
|
+
});
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Key Points**:
|
|
244
|
+
|
|
245
|
+
- `trigger` can be async API call
|
|
246
|
+
- API must return `Content-Disposition` header
|
|
247
|
+
- Still need `page` for download events
|
|
248
|
+
- Works with authenticated endpoints
|
|
249
|
+
|
|
250
|
+
### Example 6: Reading CSV from Buffer (ZIP extraction)
|
|
251
|
+
|
|
252
|
+
**Context**: Read CSV content directly from a Buffer (e.g., extracted from ZIP).
|
|
253
|
+
|
|
254
|
+
**Implementation**:
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
// Read from a Buffer (e.g., extracted from a ZIP)
|
|
258
|
+
const zipResult = await readZIP({
|
|
259
|
+
filePath: 'archive.zip',
|
|
260
|
+
fileToExtract: 'data.csv',
|
|
261
|
+
});
|
|
262
|
+
const fileBuffer = zipResult.content.extractedFiles?.['data.csv'];
|
|
263
|
+
const csvFromBuffer = await readCSV({ content: fileBuffer });
|
|
264
|
+
|
|
265
|
+
// Read from a string
|
|
266
|
+
const csvString = 'name,age\nJohn,30\nJane,25';
|
|
267
|
+
const csvFromString = await readCSV({ content: csvString });
|
|
268
|
+
|
|
269
|
+
const { data, headers } = csvFromString.content;
|
|
270
|
+
expect(headers).toContain('name');
|
|
271
|
+
expect(headers).toContain('age');
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## API Reference
|
|
275
|
+
|
|
276
|
+
### CSV Reader Options
|
|
277
|
+
|
|
278
|
+
| Option | Type | Default | Description |
|
|
279
|
+
| -------------- | ------------------ | -------- | -------------------------------------- |
|
|
280
|
+
| `filePath` | `string` | - | Path to CSV file (mutually exclusive) |
|
|
281
|
+
| `content` | `string \| Buffer` | - | Direct content (mutually exclusive) |
|
|
282
|
+
| `delimiter` | `string \| 'auto'` | `','` | Value separator, auto-detect if 'auto' |
|
|
283
|
+
| `encoding` | `string` | `'utf8'` | File encoding |
|
|
284
|
+
| `parseHeaders` | `boolean` | `true` | Use first row as headers |
|
|
285
|
+
| `trim` | `boolean` | `true` | Trim whitespace from values |
|
|
286
|
+
|
|
287
|
+
### XLSX Reader Options
|
|
288
|
+
|
|
289
|
+
| Option | Type | Description |
|
|
290
|
+
| ----------- | -------- | ------------------------------ |
|
|
291
|
+
| `filePath` | `string` | Path to XLSX file |
|
|
292
|
+
| `sheetName` | `string` | Name of sheet to set as active |
|
|
293
|
+
|
|
294
|
+
### PDF Reader Options
|
|
295
|
+
|
|
296
|
+
| Option | Type | Default | Description |
|
|
297
|
+
| ------------ | --------- | ------- | --------------------------- |
|
|
298
|
+
| `filePath` | `string` | - | Path to PDF file (required) |
|
|
299
|
+
| `mergePages` | `boolean` | `true` | Merge text from all pages |
|
|
300
|
+
| `maxPages` | `number` | - | Maximum pages to extract |
|
|
301
|
+
| `debug` | `boolean` | `false` | Enable debug logging |
|
|
302
|
+
|
|
303
|
+
### ZIP Reader Options
|
|
304
|
+
|
|
305
|
+
| Option | Type | Description |
|
|
306
|
+
| --------------- | -------- | ---------------------------------- |
|
|
307
|
+
| `filePath` | `string` | Path to ZIP file |
|
|
308
|
+
| `fileToExtract` | `string` | Specific file to extract to Buffer |
|
|
309
|
+
|
|
310
|
+
### Return Values
|
|
311
|
+
|
|
312
|
+
#### CSV Reader Return Value
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
{
|
|
316
|
+
content: {
|
|
317
|
+
data: Array<Array<string | number>>, // Parsed rows (excludes header row if parseHeaders: true)
|
|
318
|
+
headers: string[] | null // Column headers (null if parseHeaders: false)
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
#### XLSX Reader Return Value
|
|
324
|
+
|
|
325
|
+
```typescript
|
|
326
|
+
{
|
|
327
|
+
content: {
|
|
328
|
+
worksheets: Array<{
|
|
329
|
+
name: string; // Sheet name
|
|
330
|
+
rows: Array<Array<any>>; // All rows including headers
|
|
331
|
+
headers?: string[]; // First row as headers (if present)
|
|
332
|
+
}>;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
#### PDF Reader Return Value
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
{
|
|
341
|
+
content: string, // Extracted text (merged or per-page based on mergePages)
|
|
342
|
+
pagesCount: number, // Total pages in PDF
|
|
343
|
+
fileName?: string, // Original filename if available
|
|
344
|
+
info?: Record<string, any> // PDF metadata (author, title, etc.)
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
> **Note**: When `mergePages: false`, `content` is an array of strings (one per page). When `maxPages` is set, only that many pages are extracted.
|
|
349
|
+
|
|
350
|
+
#### ZIP Reader Return Value
|
|
351
|
+
|
|
352
|
+
```typescript
|
|
353
|
+
{
|
|
354
|
+
content: {
|
|
355
|
+
entries: Array<{
|
|
356
|
+
name: string, // File/directory path within ZIP
|
|
357
|
+
size: number, // Uncompressed size in bytes
|
|
358
|
+
isDirectory: boolean // True for directories
|
|
359
|
+
}>,
|
|
360
|
+
extractedFiles: Record<string, Buffer | string> // Extracted file contents by path
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
> **Note**: When `fileToExtract` is specified, only that file appears in `extractedFiles`.
|
|
366
|
+
|
|
367
|
+
## Download Cleanup Pattern
|
|
368
|
+
|
|
369
|
+
```typescript
|
|
370
|
+
test.afterEach(async () => {
|
|
371
|
+
// Clean up downloaded files
|
|
372
|
+
await fs.remove(DOWNLOAD_DIR);
|
|
373
|
+
});
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Comparison with Vanilla Playwright
|
|
377
|
+
|
|
378
|
+
Vanilla Playwright (real test) snippet:
|
|
379
|
+
|
|
380
|
+
```typescript
|
|
381
|
+
// ~80 lines of boilerplate!
|
|
382
|
+
const [download] = await Promise.all([page.waitForEvent('download'), page.getByTestId('download-button-CSV Export').click()]);
|
|
383
|
+
|
|
384
|
+
const failure = await download.failure();
|
|
385
|
+
expect(failure).toBeNull();
|
|
386
|
+
|
|
387
|
+
const filePath = testInfo.outputPath(download.suggestedFilename());
|
|
388
|
+
await download.saveAs(filePath);
|
|
389
|
+
|
|
390
|
+
await expect
|
|
391
|
+
.poll(
|
|
392
|
+
async () => {
|
|
393
|
+
try {
|
|
394
|
+
await fs.access(filePath);
|
|
395
|
+
return true;
|
|
396
|
+
} catch {
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{ timeout: 5000, intervals: [100, 200, 500] },
|
|
401
|
+
)
|
|
402
|
+
.toBe(true);
|
|
403
|
+
|
|
404
|
+
const csvContent = await fs.readFile(filePath, 'utf-8');
|
|
405
|
+
|
|
406
|
+
const parseResult = parse(csvContent, {
|
|
407
|
+
header: true,
|
|
408
|
+
skipEmptyLines: true,
|
|
409
|
+
dynamicTyping: true,
|
|
410
|
+
transformHeader: (header: string) => header.trim(),
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
if (parseResult.errors.length > 0) {
|
|
414
|
+
throw new Error(`CSV parsing errors: ${JSON.stringify(parseResult.errors)}`);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const data = parseResult.data as Array<Record<string, unknown>>;
|
|
418
|
+
const headers = parseResult.meta.fields || [];
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
With File Utils, the same flow becomes:
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
const downloadPath = await handleDownload({
|
|
425
|
+
page,
|
|
426
|
+
downloadDir: DOWNLOAD_DIR,
|
|
427
|
+
trigger: () => page.getByTestId('download-button-text/csv').click(),
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
const { data, headers } = (await readCSV({ filePath: downloadPath })).content;
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
## Related Fragments
|
|
434
|
+
|
|
435
|
+
- `overview.md` - Installation and imports
|
|
436
|
+
- `api-request.md` - API-triggered downloads
|
|
437
|
+
- `recurse.md` - Poll for file generation completion
|
|
438
|
+
|
|
439
|
+
## Anti-Patterns
|
|
440
|
+
|
|
441
|
+
**DON'T leave downloads in place:**
|
|
442
|
+
|
|
443
|
+
```typescript
|
|
444
|
+
test('creates file', async () => {
|
|
445
|
+
await handleDownload({ ... })
|
|
446
|
+
// File left in downloads folder
|
|
447
|
+
})
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**DO clean up after tests:**
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
test.afterEach(async () => {
|
|
454
|
+
await fs.remove(DOWNLOAD_DIR);
|
|
455
|
+
});
|
|
456
|
+
```
|