sinapse-ai 5.0.8 → 6.0.1
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/.claude/CLAUDE.md +1 -1
- package/.claude/rules/agent-authority.md +10 -10
- package/.claude/rules/agent-memory-imports.md +4 -4
- package/.claude/rules/coderabbit-integration.md +4 -4
- package/.claude/rules/ids-principles.md +5 -5
- package/.claude/rules/story-lifecycle.md +15 -15
- package/.claude/rules/workflow-execution.md +11 -11
- package/.sinapse-ai/constitution.md +3 -3
- package/.sinapse-ai/core/code-intel/helpers/dev-helper.js +1 -1
- package/.sinapse-ai/core/code-intel/helpers/qa-helper.js +1 -1
- package/.sinapse-ai/core/code-intel/helpers/story-helper.js +7 -7
- package/.sinapse-ai/core/config/config-loader.js +1 -1
- package/.sinapse-ai/core/docs/session-update-pattern.md +1 -1
- package/.sinapse-ai/core/ids/framework-governor.js +4 -4
- package/.sinapse-ai/core/ids/index.js +1 -1
- package/.sinapse-ai/core/memory/gotchas-memory.js +1 -1
- package/.sinapse-ai/core/orchestration/agent-invoker.js +1 -1
- package/.sinapse-ai/core/orchestration/bob-surface-criteria.yaml +2 -2
- package/.sinapse-ai/core/orchestration/executor-assignment.js +1 -1
- package/.sinapse-ai/core/orchestration/executors/epic-6-executor.js +1 -1
- package/.sinapse-ai/core/orchestration/executors/epic-executor.js +1 -1
- package/.sinapse-ai/core/orchestration/greenfield-handler.js +4 -4
- package/.sinapse-ai/core/orchestration/master-orchestrator.js +1 -1
- package/.sinapse-ai/core/orchestration/skill-dispatcher.js +3 -3
- package/.sinapse-ai/core/orchestration/workflow-executor.js +1 -1
- package/.sinapse-ai/core/quality-gates/layer2-pr-automation.js +3 -3
- package/.sinapse-ai/core/quality-gates/layer3-human-review.js +1 -1
- package/.sinapse-ai/core/quality-gates/quality-gate-config.yaml +1 -1
- package/.sinapse-ai/core/session/context-loader.js +1 -1
- package/.sinapse-ai/data/agent-config-requirements.yaml +3 -3
- package/.sinapse-ai/data/entity-registry.yaml +2154 -2337
- package/.sinapse-ai/data/registry-update-log.jsonl +316 -0
- package/.sinapse-ai/data/sinapse-kb.md +13 -13
- package/.sinapse-ai/data/tech-presets/csharp.md +2 -2
- package/.sinapse-ai/data/tech-presets/go.md +2 -2
- package/.sinapse-ai/data/tech-presets/java.md +2 -2
- package/.sinapse-ai/data/tech-presets/nextjs-react.md +1 -1
- package/.sinapse-ai/data/tech-presets/php.md +2 -2
- package/.sinapse-ai/data/tech-presets/rust.md +2 -2
- package/.sinapse-ai/data/technical-preferences.md +1 -1
- package/.sinapse-ai/data/workflow-chains.yaml +15 -15
- package/.sinapse-ai/development/README.md +1 -1
- package/.sinapse-ai/development/agent-teams/team-qa-focused.yaml +7 -7
- package/.sinapse-ai/development/agents/analyst.md +6 -6
- package/.sinapse-ai/development/agents/architect.md +4 -4
- package/.sinapse-ai/development/agents/data-engineer.md +2 -2
- package/.sinapse-ai/development/agents/{dev.md → developer.md} +7 -7
- package/.sinapse-ai/development/agents/devops.md +4 -4
- package/.sinapse-ai/development/agents/{po → product-lead}/MEMORY.md +3 -3
- package/.sinapse-ai/development/agents/{po.md → product-lead.md} +25 -25
- package/.sinapse-ai/development/agents/{pm → project-lead}/MEMORY.md +2 -2
- package/.sinapse-ai/development/agents/{pm.md → project-lead.md} +15 -15
- package/.sinapse-ai/development/agents/{qa.md → quality-gate.md} +8 -8
- package/.sinapse-ai/development/agents/{sinapse-master.md → sinapse-orqx.md} +12 -12
- package/.sinapse-ai/development/agents/{sm.md → sprint-lead.md} +18 -18
- package/.sinapse-ai/development/agents/squad-creator.md +4 -4
- package/.sinapse-ai/development/agents/ux-design-expert.md +2 -2
- package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +1 -1
- package/.sinapse-ai/development/checklists/memory-audit-checklist.md +1 -1
- package/.sinapse-ai/development/scripts/agent-config-loader.js +1 -1
- package/.sinapse-ai/development/scripts/apply-inline-greeting-all-agents.js +1 -1
- package/.sinapse-ai/development/scripts/audit-agent-config.js +2 -2
- package/.sinapse-ai/development/scripts/batch-update-agents-session-context.js +1 -1
- package/.sinapse-ai/development/scripts/dev-context-loader.js +1 -1
- package/.sinapse-ai/development/scripts/populate-entity-registry.js +2 -2
- package/.sinapse-ai/development/scripts/test-greeting-system.js +4 -4
- package/.sinapse-ai/development/scripts/unified-activation-pipeline.js +2 -2
- package/.sinapse-ai/development/scripts/verify-workflow-gaps.js +9 -9
- package/.sinapse-ai/development/tasks/analyze-cross-artifact.md +1 -1
- package/.sinapse-ai/development/tasks/analyze-project-structure.md +4 -4
- package/.sinapse-ai/development/tasks/apply-qa-fixes.md +1 -1
- package/.sinapse-ai/development/tasks/architect-analyze-impact.md +1 -1
- package/.sinapse-ai/development/tasks/brownfield-create-epic.md +10 -10
- package/.sinapse-ai/development/tasks/brownfield-create-story.md +1 -1
- package/.sinapse-ai/development/tasks/build-autonomous.md +1 -1
- package/.sinapse-ai/development/tasks/cleanup-utilities.md +6 -6
- package/.sinapse-ai/development/tasks/create-agent.md +1 -1
- package/.sinapse-ai/development/tasks/create-brownfield-story.md +4 -4
- package/.sinapse-ai/development/tasks/create-next-story.md +12 -12
- package/.sinapse-ai/development/tasks/create-service.md +2 -2
- package/.sinapse-ai/development/tasks/create-suite.md +1 -1
- package/.sinapse-ai/development/tasks/dev-backlog-debt.md +3 -3
- package/.sinapse-ai/development/tasks/dev-develop-story.md +5 -5
- package/.sinapse-ai/development/tasks/environment-bootstrap.md +2 -2
- package/.sinapse-ai/development/tasks/execute-checklist.md +1 -1
- package/.sinapse-ai/development/tasks/execute-epic-plan.md +11 -11
- package/.sinapse-ai/development/tasks/extract-patterns.md +2 -2
- package/.sinapse-ai/development/tasks/facilitate-brainstorming-session.md +2 -2
- package/.sinapse-ai/development/tasks/github-devops-github-pr-automation.md +1 -1
- package/.sinapse-ai/development/tasks/github-devops-pre-push-quality-gate.md +1 -1
- package/.sinapse-ai/development/tasks/ids-governor.md +3 -3
- package/.sinapse-ai/development/tasks/next.md +2 -2
- package/.sinapse-ai/development/tasks/orchestrate-resume.md +1 -1
- package/.sinapse-ai/development/tasks/orchestrate-status.md +1 -1
- package/.sinapse-ai/development/tasks/orchestrate-stop.md +1 -1
- package/.sinapse-ai/development/tasks/orchestrate.md +1 -1
- package/.sinapse-ai/development/tasks/patterns.md +2 -2
- package/.sinapse-ai/development/tasks/plan-create-context.md +2 -2
- package/.sinapse-ai/development/tasks/plan-execute-subtask.md +3 -3
- package/.sinapse-ai/development/tasks/po-close-story.md +3 -3
- package/.sinapse-ai/development/tasks/project-status.md +2 -2
- package/.sinapse-ai/development/tasks/qa-after-creation.md +2 -2
- package/.sinapse-ai/development/tasks/qa-backlog-add-followup.md +3 -3
- package/.sinapse-ai/development/tasks/qa-create-fix-request.md +8 -8
- package/.sinapse-ai/development/tasks/qa-evidence-requirements.md +1 -1
- package/.sinapse-ai/development/tasks/qa-false-positive-detection.md +1 -1
- package/.sinapse-ai/development/tasks/qa-fix-issues.md +10 -10
- package/.sinapse-ai/development/tasks/qa-gate.md +3 -3
- package/.sinapse-ai/development/tasks/qa-review-build.md +3 -3
- package/.sinapse-ai/development/tasks/qa-review-story.md +2 -2
- package/.sinapse-ai/development/tasks/qa-run-tests.md +1 -1
- package/.sinapse-ai/development/tasks/run-workflow-engine.md +1 -1
- package/.sinapse-ai/development/tasks/run-workflow.md +1 -1
- package/.sinapse-ai/development/tasks/security-scan.md +2 -2
- package/.sinapse-ai/development/tasks/setup-llm-routing.md +1 -1
- package/.sinapse-ai/development/tasks/spec-critique.md +4 -4
- package/.sinapse-ai/development/tasks/spec-gather-requirements.md +4 -4
- package/.sinapse-ai/development/tasks/spec-write-spec.md +2 -2
- package/.sinapse-ai/development/tasks/story-checkpoint.md +3 -3
- package/.sinapse-ai/development/tasks/sync-registry-intel.md +1 -1
- package/.sinapse-ai/development/tasks/validate-agents.md +1 -1
- package/.sinapse-ai/development/tasks/validate-next-story.md +10 -10
- package/.sinapse-ai/development/tasks/validate-workflow.md +1 -1
- package/.sinapse-ai/development/tasks/verify-subtask.md +2 -2
- package/.sinapse-ai/development/templates/code-intel-integration-pattern.md +3 -3
- package/.sinapse-ai/development/templates/subagent-step-prompt.md +2 -2
- package/.sinapse-ai/development/workflows/README.md +2 -2
- package/.sinapse-ai/development/workflows/auto-worktree.yaml +5 -5
- package/.sinapse-ai/development/workflows/brownfield-discovery.yaml +11 -11
- package/.sinapse-ai/development/workflows/brownfield-fullstack.yaml +6 -6
- package/.sinapse-ai/development/workflows/brownfield-service.yaml +5 -5
- package/.sinapse-ai/development/workflows/brownfield-ui.yaml +5 -5
- package/.sinapse-ai/development/workflows/development-cycle.yaml +10 -10
- package/.sinapse-ai/development/workflows/epic-orchestration.yaml +6 -6
- package/.sinapse-ai/development/workflows/greenfield-fullstack.yaml +7 -7
- package/.sinapse-ai/development/workflows/greenfield-service.yaml +5 -5
- package/.sinapse-ai/development/workflows/greenfield-ui.yaml +5 -5
- package/.sinapse-ai/development/workflows/qa-loop.yaml +1 -1
- package/.sinapse-ai/development/workflows/spec-pipeline.yaml +2 -2
- package/.sinapse-ai/development/workflows/story-development-cycle.yaml +1 -1
- package/.sinapse-ai/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +2 -2
- package/.sinapse-ai/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +1 -1
- package/.sinapse-ai/docs/standards/QUALITY-GATES-SPECIFICATION.md +1 -1
- package/.sinapse-ai/docs/standards/SINAPSE-LIVRO-DE-OURO-V2.1-COMPLETE.md +6 -6
- package/.sinapse-ai/docs/standards/STANDARDS-INDEX.md +2 -2
- package/.sinapse-ai/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +6 -6
- package/.sinapse-ai/infrastructure/scripts/config-loader.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/gotchas-documenter.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/ide-sync/README.md +3 -3
- package/.sinapse-ai/infrastructure/scripts/ide-sync/gemini-commands.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/ide-sync/index.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/ide-sync/redirect-generator.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/migrate-agent.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/performance-tracker.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/qa-report-generator.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/recovery-tracker.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/rollback-manager.js +1 -1
- package/.sinapse-ai/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +1 -1
- package/.sinapse-ai/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +1 -1
- package/.sinapse-ai/infrastructure/templates/sinapse-sync.yaml.template +1 -1
- package/.sinapse-ai/install-manifest.yaml +344 -344
- package/.sinapse-ai/monitor/hooks/lib/enrich.py +1 -1
- package/.sinapse-ai/product/checklists/self-critique-checklist.md +1 -1
- package/.sinapse-ai/product/checklists/story-draft-checklist.md +3 -3
- package/.sinapse-ai/product/templates/command-rationalization-matrix.md +3 -3
- package/.sinapse-ai/product/templates/design-story-tmpl.yaml +4 -4
- package/.sinapse-ai/product/templates/ide-rules/antigravity-rules.md +1 -1
- package/.sinapse-ai/product/templates/ide-rules/claude-rules.md +2 -2
- package/.sinapse-ai/product/templates/ide-rules/codex-rules.md +6 -6
- package/.sinapse-ai/product/templates/ide-rules/cursor-rules.md +1 -1
- package/.sinapse-ai/product/templates/personalized-agent-template.md +1 -1
- package/.sinapse-ai/product/templates/personalized-task-template.md +1 -1
- package/.sinapse-ai/product/templates/personalized-template-file.yaml +1 -1
- package/.sinapse-ai/product/templates/personalized-workflow-template.yaml +3 -3
- package/.sinapse-ai/product/templates/story-tmpl.yaml +8 -8
- package/.sinapse-ai/schemas/README.md +15 -15
- package/.sinapse-ai/scripts/diagnostics/health-dashboard/package-lock.json +2 -2
- package/.sinapse-ai/user-guide.md +4 -4
- package/.sinapse-ai/working-in-the-brownfield.md +3 -3
- package/LICENSE +4 -4
- package/README.en.md +6 -6
- package/README.md +8 -8
- package/bin/cli.js +13 -11
- package/bin/sinapse.js +17 -0
- package/docs/00-shared-activation-pipeline.md +16 -16
- package/docs/FEATURE_PROCESS.md +1 -1
- package/docs/ORQX-PLAN.md +264 -0
- package/docs/core-architecture.md +2 -2
- package/docs/en/sinapse-agent-flows/README.md +2 -2
- package/docs/en/sinapse-agent-flows/dev-system.md +2 -2
- package/docs/en/sinapse-agent-flows/pm-system.md +2 -2
- package/docs/en/sinapse-agent-flows/qa-system.md +2 -2
- package/docs/en/sinapse-agent-flows/{sinapse-master-system.md → sinapse-orqx-system.md} +5 -5
- package/docs/en/sinapse-agent-flows/sm-system.md +2 -2
- package/docs/framework/entity-layer-classification.md +2 -2
- package/docs/framework/source-tree.md +17 -17
- package/docs/getting-started.md +13 -13
- package/docs/guides/IDS-CONCEITOS-EXPLICADOS.md +17 -17
- package/docs/guides/MEMORY-INTEGRATION.md +3 -3
- package/docs/guides/MEMORY-INTELLIGENCE-SYSTEM.md +4 -4
- package/docs/guides/ade-guide.md +25 -25
- package/docs/guides/agent-selection-guide.md +36 -36
- package/docs/guides/agents/ANALYST-SYSTEM.md +5 -5
- package/docs/guides/agents/ARCHITECT-SYSTEM.md +9 -9
- package/docs/guides/agents/DATA-ENGINEER-SYSTEM.md +8 -8
- package/docs/guides/agents/DEV-SYSTEM.md +27 -27
- package/docs/guides/agents/DEVOPS-SYSTEM.md +5 -5
- package/docs/guides/agents/PM-SYSTEM.md +24 -24
- package/docs/guides/agents/QA-SYSTEM.md +24 -24
- package/docs/guides/agents/SINAPSE-MASTER-SYSTEM.md +26 -26
- package/docs/guides/agents/SM-SYSTEM.md +31 -31
- package/docs/guides/agents/SQUAD-CREATOR-SYSTEM.md +2 -2
- package/docs/guides/agents/UX-DESIGN-EXPERT-SYSTEM.md +10 -10
- package/docs/guides/agents/traces/00-shared-activation-pipeline.md +16 -16
- package/docs/guides/agents/traces/00-shared-activation-pipeline.v1-act8.md +16 -16
- package/docs/guides/agents/traces/README.md +20 -20
- package/docs/guides/agents/traces/analyst-execution-trace.md +6 -6
- package/docs/guides/agents/traces/architect-execution-trace.md +3 -3
- package/docs/guides/agents/traces/data-engineer-execution-trace.md +4 -4
- package/docs/guides/agents/traces/dev-execution-trace.md +12 -12
- package/docs/guides/agents/traces/devops-execution-trace.md +6 -6
- package/docs/guides/agents/traces/pm-execution-trace.md +14 -14
- package/docs/guides/agents/traces/po-execution-trace.md +17 -17
- package/docs/guides/agents/traces/qa-execution-trace.md +15 -15
- package/docs/guides/agents/traces/{sinapse-master-execution-trace.md → sinapse-orqx-execution-trace.md} +22 -22
- package/docs/guides/agents/traces/sm-execution-trace.md +15 -15
- package/docs/guides/agents/traces/squad-creation-execution-trace.md +9 -9
- package/docs/guides/agents/traces/ux-design-expert-execution-trace.md +4 -4
- package/docs/guides/api-reference.md +27 -27
- package/docs/guides/coderabbit/README.md +9 -9
- package/docs/guides/contextual-greeting-system-guide.md +5 -5
- package/docs/guides/development-setup.md +1 -1
- package/docs/guides/project-status-feature.md +2 -2
- package/docs/guides/quality-dashboard.md +2 -2
- package/docs/guides/quality-gates.md +6 -6
- package/docs/guides/template-engine-v2.md +2 -2
- package/docs/guides/user-guide.md +13 -13
- package/docs/guides/workflows/AUTO-WORKTREE-WORKFLOW.md +3 -3
- package/docs/guides/workflows/BROWNFIELD-DISCOVERY-WORKFLOW.md +6 -6
- package/docs/guides/workflows/BROWNFIELD-FULLSTACK-WORKFLOW.md +30 -30
- package/docs/guides/workflows/BROWNFIELD-SERVICE-WORKFLOW.md +38 -38
- package/docs/guides/workflows/BROWNFIELD-UI-WORKFLOW.md +25 -25
- package/docs/guides/workflows/GREENFIELD-FULLSTACK-WORKFLOW.md +37 -37
- package/docs/guides/workflows/GREENFIELD-SERVICE-WORKFLOW.md +5 -5
- package/docs/guides/workflows/GREENFIELD-UI-WORKFLOW.md +19 -19
- package/docs/guides/workflows/QA-LOOP-WORKFLOW.md +13 -13
- package/docs/guides/workflows/SINAPSE-COMPLETE-CROSS-REFERENCE-ANALYSIS.md +19 -19
- package/docs/guides/workflows/SPEC-PIPELINE-WORKFLOW.md +25 -25
- package/docs/guides/workflows/STORY-DEVELOPMENT-CYCLE-WORKFLOW.md +28 -28
- package/docs/guides/workflows/WORKFLOW-TASK-AGENT-ANALYSIS.md +94 -94
- package/docs/guides/workflows/xref-phase2-templates.md +29 -29
- package/docs/guides/workflows/xref-phase3-scripts.md +33 -33
- package/docs/guides/workflows/xref-phase4-infra.md +2 -2
- package/docs/guides/workflows/xref-phase6-supporting.md +1 -1
- package/docs/guides/workflows-guide.md +2 -2
- package/docs/installation/faq.md +1 -1
- package/docs/installation/troubleshooting.md +2 -2
- package/docs/installation/v4-quick-start.md +2 -2
- package/docs/prd-cli-graph-dashboard.md +1 -1
- package/docs/pt/DOCUMENTATION-ROADMAP.md +1 -1
- package/docs/pt/FEATURE_PROCESS.md +1 -1
- package/docs/pt/README.md +2 -2
- package/docs/pt/agents/archetype-rationale.md +4 -4
- package/docs/pt/agents/persona-definitions.md +9 -9
- package/docs/pt/architecture/ADE-ARCHITECT-HANDOFF.md +15 -15
- package/docs/pt/architecture/ADE-EPIC1-HANDOFF.md +2 -2
- package/docs/pt/architecture/ADE-EPIC2-HANDOFF.md +2 -2
- package/docs/pt/architecture/ADE-EPIC3-HANDOFF.md +8 -8
- package/docs/pt/architecture/ade-architecture.md +4 -4
- package/docs/pt/architecture/adr/adr-hcs-health-check-system.md +3 -3
- package/docs/pt/architecture/agent-config-audit.md +4 -4
- package/docs/pt/architecture/agent-responsibility-matrix.md +20 -20
- package/docs/pt/architecture/agent-tool-integration-guide.md +8 -8
- package/docs/pt/architecture/contribution-workflow-research.md +1 -1
- package/docs/pt/architecture/dashboard-architecture.md +1 -1
- package/docs/pt/architecture/hcs-check-specifications.md +1 -1
- package/docs/pt/architecture/hcs-execution-modes.md +1 -1
- package/docs/pt/architecture/hcs-self-healing-spec.md +1 -1
- package/docs/pt/architecture/high-level-architecture.md +1 -1
- package/docs/pt/architecture/module-system.md +1 -1
- package/docs/pt/architecture/source-tree.md +1 -1
- package/docs/pt/architecture/squad-improvement-recommended-approach.md +2 -2
- package/docs/pt/architecture/utility-integration-guide.md +2 -2
- package/docs/pt/contributing.md +1 -1
- package/docs/pt/core-architecture.md +2 -2
- package/docs/pt/framework/source-tree.md +1 -1
- package/docs/pt/guides/ade-guide.md +25 -25
- package/docs/pt/guides/agent-selection-guide.md +36 -36
- package/docs/pt/guides/api-reference.md +25 -25
- package/docs/pt/guides/contextual-greeting-system-guide.md +5 -5
- package/docs/pt/guides/development-setup.md +1 -1
- package/docs/pt/guides/project-status-feature.md +2 -2
- package/docs/pt/guides/quality-dashboard.md +2 -2
- package/docs/pt/guides/quality-gates.md +6 -6
- package/docs/pt/guides/template-engine-v2.md +2 -2
- package/docs/pt/guides/user-guide.md +8 -8
- package/docs/pt/guides/workflows-guide.md +2 -2
- package/docs/pt/installation/faq.md +1 -1
- package/docs/pt/installation/troubleshooting.md +2 -2
- package/docs/pt/installation/v4-quick-start.md +2 -2
- package/docs/pt/platforms/antigravity.md +9 -9
- package/docs/pt/platforms/cursor.md +15 -15
- package/docs/pt/platforms/gemini-cli.md +3 -3
- package/docs/pt/roadmap.md +1 -1
- package/docs/pt/sinapse-nomenclature-specification.md +15 -15
- package/docs/pt/specifications/docs-agent-technical-specification.md +11 -11
- package/docs/roadmap.md +1 -1
- package/docs/sinapse-agent-flows/README.md +2 -2
- package/docs/sinapse-agent-flows/analyst-system.md +5 -5
- package/docs/sinapse-agent-flows/architect-system.md +9 -9
- package/docs/sinapse-agent-flows/data-engineer-system.md +8 -8
- package/docs/sinapse-agent-flows/dev-system.md +27 -27
- package/docs/sinapse-agent-flows/devops-system.md +5 -5
- package/docs/sinapse-agent-flows/pm-system.md +24 -24
- package/docs/sinapse-agent-flows/qa-system.md +24 -24
- package/docs/sinapse-agent-flows/{sinapse-master-system.md → sinapse-orqx-system.md} +26 -26
- package/docs/sinapse-agent-flows/sm-system.md +31 -31
- package/docs/sinapse-agent-flows/squad-creator-system.md +2 -2
- package/docs/sinapse-agent-flows/ux-design-expert-system.md +10 -10
- package/docs/sinapse-workflows/auto-worktree-workflow.md +3 -3
- package/docs/sinapse-workflows/brownfield-discovery-workflow.md +6 -6
- package/docs/sinapse-workflows/brownfield-fullstack-workflow.md +30 -30
- package/docs/sinapse-workflows/brownfield-service-workflow.md +38 -38
- package/docs/sinapse-workflows/brownfield-ui-workflow.md +25 -25
- package/docs/sinapse-workflows/greenfield-fullstack-workflow.md +37 -37
- package/docs/sinapse-workflows/greenfield-service-workflow.md +5 -5
- package/docs/sinapse-workflows/greenfield-ui-workflow.md +19 -19
- package/docs/sinapse-workflows/qa-loop-workflow.md +13 -13
- package/docs/sinapse-workflows/spec-pipeline-workflow.md +25 -25
- package/docs/sinapse-workflows/story-development-cycle-workflow.md +28 -28
- package/package.json +1 -1
- package/packages/gemini-sinapse-extension/README.md +1 -1
- package/packages/gemini-sinapse-extension/commands/lib/agent-launcher.js +1 -1
- package/packages/gemini-sinapse-extension/commands/{sinapse-master.js → sinapse-orqx.js} +1 -1
- package/packages/gemini-sinapse-extension/extension.json +3 -3
- package/packages/gemini-sinapse-extension/gemini-extension.json +3 -3
- package/packages/installer/src/config/configure-environment.js +2 -2
- package/packages/installer/src/updater/index.js +105 -0
- package/packages/installer/src/wizard/feedback.js +38 -30
- package/packages/installer/src/wizard/i18n.js +25 -182
- package/packages/installer/src/wizard/ide-config-generator.js +1 -1
- package/packages/installer/src/wizard/index.js +253 -69
- package/packages/installer/src/wizard/questions.js +35 -7
- package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +1 -1
- package/packages/sinapse-install/README.md +1 -1
- package/packages/sinapse-install/src/installer.js +1 -1
- package/scripts/package-synapse.js +1 -1
- package/sinapse/agents/{sinapse-master.md → sinapse-orqx.md} +18 -18
- package/sinapse/knowledge-base/cross-squad-patterns.md +1 -1
- package/sinapse/knowledge-base/routing-catalog.md +1 -1
- package/sinapse/squad.yaml +1 -1
- package/sinapse/tasks/compose-multi-squad-plan.md +2 -2
- package/sinapse/tasks/coordinate-cross-squad.md +2 -2
- package/sinapse/tasks/diagnose-and-route.md +2 -2
- package/sinapse/tasks/onboard-user.md +2 -2
- package/sinapse/tasks/resolve-conflict.md +2 -2
- package/sinapse/tasks/squad-status-report.md +2 -2
- package/sinapse/tasks/strategic-brief.md +3 -3
- package/squads/squad-animations/agents/animations-orqx.md +2 -2
- package/squads/squad-brand/agents/brand-creative-engineer.md +1 -1
- package/squads/squad-brand/agents/brand-motion-vfx.md +1 -1
- package/squads/squad-brand/agents/brand-orqx.md +2 -2
- package/squads/squad-brand/agents/brand-sonic-designer.md +1 -1
- package/squads/squad-brand/agents/brand-system-architect.md +1 -1
- package/squads/squad-claude/agents/claude-orqx.md +2 -2
- package/squads/squad-cloning/agents/cloning-orqx.md +3 -3
- package/squads/squad-commercial/agents/commercial-orqx.md +1 -1
- package/squads/squad-commercial/agents/cs-business-auditor.md +1 -1
- package/squads/squad-commercial/agents/cs-client-success.md +1 -1
- package/squads/squad-commercial/agents/cs-crm-specialist.md +1 -1
- package/squads/squad-commercial/agents/cs-funnel-architect.md +1 -1
- package/squads/squad-commercial/agents/cs-lead-generation-strategist.md +1 -1
- package/squads/squad-commercial/agents/cs-offer-designer.md +1 -1
- package/squads/squad-commercial/agents/cs-revops-analyst.md +1 -1
- package/squads/squad-commercial/agents/cs-sales-closer.md +1 -1
- package/squads/squad-commercial/agents/cs-sales-enablement.md +1 -1
- package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +1 -1
- package/squads/squad-content/agents/content-orqx.md +2 -2
- package/squads/squad-content/knowledge-base/ai-leverage-content-framework.md +1 -1
- package/squads/squad-copy/agents/copy-strategist.md +3 -3
- package/squads/squad-copy/knowledge-base/consequence-headline-patterns.md +1 -1
- package/squads/squad-council/agents/council-orqx.md +1 -1
- package/squads/squad-courses/agents/courses-orqx.md +1 -1
- package/squads/squad-cybersecurity/agents/cyber-orqx.md +2 -2
- package/squads/squad-design/agents/design-orqx.md +2 -2
- package/squads/squad-finance/agents/finance-orqx.md +2 -2
- package/squads/squad-growth/agents/growth-orqx.md +2 -2
- package/squads/squad-paidmedia/agents/paidmedia-orqx.md +2 -2
- package/squads/squad-product/agents/product-orqx.md +2 -2
- package/squads/squad-research/agents/research-orqx.md +2 -2
- package/squads/squad-research/tasks/create-executive-briefing.md +1 -1
- package/squads/squad-research/tasks/create-insight-deck.md +1 -1
- package/squads/squad-research/tasks/forecast-industry-trends.md +1 -1
- package/squads/squad-research/tasks/generate-actionable-recommendations.md +2 -2
- package/squads/squad-research/tasks/run-scenario-planning.md +2 -2
- package/squads/squad-research/tasks/synthesize-research-report.md +2 -2
- package/squads/squad-research/tasks/track-emerging-technologies.md +1 -1
- package/squads/squad-storytelling/agents/storytelling-orqx.md +2 -2
- package/docs/es/CHANGELOG.md +0 -117
- package/docs/es/DOCUMENTATION-ROADMAP.md +0 -216
- package/docs/es/ENVIRONMENT.md +0 -140
- package/docs/es/FEATURE_PROCESS.md +0 -99
- package/docs/es/GUIDING-PRINCIPLES.md +0 -101
- package/docs/es/README.md +0 -134
- package/docs/es/agent-reference-guide.md +0 -570
- package/docs/es/agents/archetype-rationale.md +0 -566
- package/docs/es/agents/persona-definitions.md +0 -501
- package/docs/es/api/squads-api.md +0 -753
- package/docs/es/architecture/ADE-AGENT-CHANGES.md +0 -469
- package/docs/es/architecture/ADE-ARCHITECT-HANDOFF.md +0 -338
- package/docs/es/architecture/ADE-EPIC1-HANDOFF.md +0 -85
- package/docs/es/architecture/ADE-EPIC2-HANDOFF.md +0 -106
- package/docs/es/architecture/ADE-EPIC3-HANDOFF.md +0 -327
- package/docs/es/architecture/ARCHITECTURE-INDEX.md +0 -188
- package/docs/es/architecture/ade-architecture.md +0 -586
- package/docs/es/architecture/adr/ADR-COLLAB-1-current-state-audit.md +0 -259
- package/docs/es/architecture/adr/ADR-COLLAB-2-proposed-configuration.md +0 -518
- package/docs/es/architecture/adr/adr-hcs-health-check-system.md +0 -489
- package/docs/es/architecture/adr/adr-isolated-vm-decision.md +0 -70
- package/docs/es/architecture/agent-config-audit.md +0 -222
- package/docs/es/architecture/agent-responsibility-matrix.md +0 -444
- package/docs/es/architecture/agent-tool-integration-guide.md +0 -334
- package/docs/es/architecture/ci-cd.md +0 -151
- package/docs/es/architecture/coding-standards.md +0 -896
- package/docs/es/architecture/contribution-workflow-research.md +0 -376
- package/docs/es/architecture/dashboard-architecture.md +0 -926
- package/docs/es/architecture/dashboard-realtime.md +0 -1253
- package/docs/es/architecture/hcs-check-specifications.md +0 -897
- package/docs/es/architecture/hcs-execution-modes.md +0 -519
- package/docs/es/architecture/hcs-self-healing-spec.md +0 -695
- package/docs/es/architecture/high-level-architecture.md +0 -357
- package/docs/es/architecture/introduction.md +0 -21
- package/docs/es/architecture/mcp-api-keys-management.md +0 -246
- package/docs/es/architecture/mcp-system-diagrams.md +0 -113
- package/docs/es/architecture/module-system.md +0 -382
- package/docs/es/architecture/multi-repo-strategy.md +0 -390
- package/docs/es/architecture/source-tree.md +0 -708
- package/docs/es/architecture/squad-improvement-analysis.md +0 -204
- package/docs/es/architecture/squad-improvement-recommended-approach.md +0 -390
- package/docs/es/architecture/tech-stack.md +0 -806
- package/docs/es/architecture/utility-integration-guide.md +0 -358
- package/docs/es/community/README-community-snippet-core.md +0 -57
- package/docs/es/community/README-community-snippet-mcp.md +0 -49
- package/docs/es/community/README-community-snippet-squads.md +0 -40
- package/docs/es/community.md +0 -227
- package/docs/es/core-architecture.md +0 -229
- package/docs/es/docker-mcp-setup.md +0 -426
- package/docs/es/framework/README.md +0 -99
- package/docs/es/framework/coding-standards.md +0 -892
- package/docs/es/framework/source-tree.md +0 -725
- package/docs/es/framework/tech-stack.md +0 -802
- package/docs/es/getting-started.md +0 -572
- package/docs/es/git-workflow-guide.md +0 -995
- package/docs/es/guides/README.md +0 -133
- package/docs/es/guides/ade-guide.md +0 -452
- package/docs/es/guides/agent-selection-guide.md +0 -295
- package/docs/es/guides/api-reference.md +0 -899
- package/docs/es/guides/build-recovery-guide.md +0 -270
- package/docs/es/guides/contextual-greeting-system-guide.md +0 -387
- package/docs/es/guides/contributing-squads.md +0 -256
- package/docs/es/guides/development-setup.md +0 -1111
- package/docs/es/guides/ide-sync-guide.md +0 -194
- package/docs/es/guides/installation-troubleshooting.md +0 -327
- package/docs/es/guides/llm-routing.md +0 -312
- package/docs/es/guides/mcp/desktop-commander.md +0 -368
- package/docs/es/guides/mcp/docker-gateway-tutorial.md +0 -336
- package/docs/es/guides/mcp-global-setup.md +0 -663
- package/docs/es/guides/permission-modes.md +0 -313
- package/docs/es/guides/project-status-feature.md +0 -473
- package/docs/es/guides/quality-dashboard.md +0 -367
- package/docs/es/guides/quality-gates.md +0 -614
- package/docs/es/guides/security-hardening.md +0 -1359
- package/docs/es/guides/service-discovery.md +0 -524
- package/docs/es/guides/squad-examples/README.md +0 -64
- package/docs/es/guides/squad-migration.md +0 -356
- package/docs/es/guides/squads-guide.md +0 -836
- package/docs/es/guides/squads-overview.md +0 -332
- package/docs/es/guides/template-engine-v2.md +0 -484
- package/docs/es/guides/testing-guide.md +0 -1215
- package/docs/es/guides/user-guide.md +0 -452
- package/docs/es/guides/workflows-guide.md +0 -400
- package/docs/es/how-to-contribute-with-pull-requests.md +0 -160
- package/docs/es/ide-integration.md +0 -425
- package/docs/es/installation/README.md +0 -108
- package/docs/es/installation/faq.md +0 -616
- package/docs/es/installation/linux.md +0 -311
- package/docs/es/installation/macos.md +0 -189
- package/docs/es/installation/troubleshooting.md +0 -735
- package/docs/es/installation/v4-quick-start.md +0 -269
- package/docs/es/installation/windows.md +0 -342
- package/docs/es/meta-agent-commands.md +0 -990
- package/docs/es/migration-guide.md +0 -310
- package/docs/es/npx-install.md +0 -193
- package/docs/es/performance-tuning-guide.md +0 -707
- package/docs/es/platforms/README.md +0 -283
- package/docs/es/platforms/antigravity.md +0 -510
- package/docs/es/platforms/claude-code.md +0 -650
- package/docs/es/platforms/cursor.md +0 -635
- package/docs/es/platforms/gemini-cli.md +0 -483
- package/docs/es/platforms/github-copilot.md +0 -480
- package/docs/es/roadmap.md +0 -119
- package/docs/es/security-best-practices.md +0 -613
- package/docs/es/security.md +0 -124
- package/docs/es/sinapse-agent-flows/README.md +0 -190
- package/docs/es/sinapse-agent-flows/analyst-system.md +0 -36
- package/docs/es/sinapse-agent-flows/architect-system.md +0 -36
- package/docs/es/sinapse-agent-flows/data-engineer-system.md +0 -36
- package/docs/es/sinapse-agent-flows/dev-system.md +0 -36
- package/docs/es/sinapse-agent-flows/devops-system.md +0 -36
- package/docs/es/sinapse-agent-flows/pm-system.md +0 -36
- package/docs/es/sinapse-agent-flows/qa-system.md +0 -36
- package/docs/es/sinapse-agent-flows/sinapse-master-system.md +0 -36
- package/docs/es/sinapse-agent-flows/sm-system.md +0 -36
- package/docs/es/sinapse-agent-flows/squad-creator-system.md +0 -36
- package/docs/es/sinapse-agent-flows/ux-design-expert-system.md +0 -36
- package/docs/es/sinapse-nomenclature-specification.md +0 -673
- package/docs/es/sinapse-workflows/README.md +0 -247
- package/docs/es/sinapse-workflows/auto-worktree-workflow.md +0 -39
- package/docs/es/sinapse-workflows/brownfield-discovery-workflow.md +0 -41
- package/docs/es/sinapse-workflows/brownfield-fullstack-workflow.md +0 -42
- package/docs/es/sinapse-workflows/brownfield-service-workflow.md +0 -43
- package/docs/es/sinapse-workflows/brownfield-ui-workflow.md +0 -42
- package/docs/es/sinapse-workflows/design-system-build-quality-workflow.md +0 -40
- package/docs/es/sinapse-workflows/greenfield-fullstack-workflow.md +0 -44
- package/docs/es/sinapse-workflows/greenfield-service-workflow.md +0 -43
- package/docs/es/sinapse-workflows/greenfield-ui-workflow.md +0 -43
- package/docs/es/sinapse-workflows/qa-loop-workflow.md +0 -39
- package/docs/es/sinapse-workflows/spec-pipeline-workflow.md +0 -40
- package/docs/es/sinapse-workflows/story-development-cycle-workflow.md +0 -42
- package/docs/es/specifications/docs-agent-technical-specification.md +0 -2161
- package/docs/es/troubleshooting.md +0 -887
- package/docs/es/uninstallation.md +0 -556
- package/docs/es/versioning-and-releases.md +0 -146
- package/docs/zh/CHANGELOG.md +0 -191
- package/docs/zh/ENVIRONMENT.md +0 -136
- package/docs/zh/FEATURE_PROCESS.md +0 -92
- package/docs/zh/GLOSSARY.md +0 -179
- package/docs/zh/GUIDING-PRINCIPLES.md +0 -97
- package/docs/zh/README.md +0 -133
- package/docs/zh/TRANSLATION-PLAN.md +0 -508
- package/docs/zh/agent-reference-guide.md +0 -566
- package/docs/zh/agents/archetype-rationale.md +0 -631
- package/docs/zh/agents/persona-definitions.md +0 -560
- package/docs/zh/api/squads-api.md +0 -753
- package/docs/zh/architecture/ADE-ARCHITECT-HANDOFF.md +0 -338
- package/docs/zh/architecture/ADE-EPIC1-HANDOFF.md +0 -85
- package/docs/zh/architecture/ADE-EPIC2-HANDOFF.md +0 -106
- package/docs/zh/architecture/ADE-EPIC3-HANDOFF.md +0 -327
- package/docs/zh/architecture/ARCHITECTURE-INDEX.md +0 -190
- package/docs/zh/architecture/SINAPSE-VISUAL-OVERVIEW.md +0 -595
- package/docs/zh/architecture/ade-architecture.md +0 -474
- package/docs/zh/architecture/adr/ADR-COLLAB-1-current-state-audit.md +0 -259
- package/docs/zh/architecture/adr/ADR-COLLAB-2-proposed-configuration.md +0 -518
- package/docs/zh/architecture/adr/adr-hcs-health-check-system.md +0 -489
- package/docs/zh/architecture/adr/adr-isolated-vm-decision.md +0 -70
- package/docs/zh/architecture/agent-config-audit.md +0 -220
- package/docs/zh/architecture/agent-responsibility-matrix.md +0 -444
- package/docs/zh/architecture/agent-tool-integration-guide.md +0 -336
- package/docs/zh/architecture/ci-cd.md +0 -151
- package/docs/zh/architecture/coding-standards.md +0 -898
- package/docs/zh/architecture/command-authority-matrix.md +0 -18
- package/docs/zh/architecture/contribution-workflow-research.md +0 -376
- package/docs/zh/architecture/dashboard-architecture.md +0 -569
- package/docs/zh/architecture/dashboard-realtime.md +0 -415
- package/docs/zh/architecture/hcs-check-specifications.md +0 -102
- package/docs/zh/architecture/hcs-execution-modes.md +0 -114
- package/docs/zh/architecture/hcs-self-healing-spec.md +0 -148
- package/docs/zh/architecture/high-level-architecture.md +0 -355
- package/docs/zh/architecture/introduction.md +0 -21
- package/docs/zh/architecture/mcp-api-keys-management.md +0 -248
- package/docs/zh/architecture/mcp-system-diagrams.md +0 -113
- package/docs/zh/architecture/module-system.md +0 -382
- package/docs/zh/architecture/multi-repo-strategy.md +0 -237
- package/docs/zh/architecture/source-tree.md +0 -710
- package/docs/zh/architecture/squad-improvement-analysis.md +0 -204
- package/docs/zh/architecture/squad-improvement-recommended-approach.md +0 -390
- package/docs/zh/architecture/tech-stack.md +0 -808
- package/docs/zh/architecture/utility-integration-guide.md +0 -358
- package/docs/zh/code-of-conduct.md +0 -113
- package/docs/zh/community/README-community-snippet-core.md +0 -57
- package/docs/zh/community/README-community-snippet-mcp.md +0 -49
- package/docs/zh/community/README-community-snippet-squads.md +0 -40
- package/docs/zh/community.md +0 -227
- package/docs/zh/contributing.md +0 -581
- package/docs/zh/core-architecture.md +0 -229
- package/docs/zh/docker-mcp-setup.md +0 -226
- package/docs/zh/framework/README.md +0 -97
- package/docs/zh/framework/coding-standards.md +0 -886
- package/docs/zh/framework/source-tree.md +0 -888
- package/docs/zh/framework/tech-stack.md +0 -796
- package/docs/zh/getting-started.md +0 -317
- package/docs/zh/git-workflow-guide.md +0 -988
- package/docs/zh/guides/MEMORY-INTEGRATION.md +0 -497
- package/docs/zh/guides/MEMORY-INTELLIGENCE-SYSTEM.md +0 -1083
- package/docs/zh/guides/MEMORY-SYSTEM.md +0 -1003
- package/docs/zh/guides/README.md +0 -127
- package/docs/zh/guides/ade-guide.md +0 -446
- package/docs/zh/guides/agent-selection-guide.md +0 -289
- package/docs/zh/guides/api-reference.md +0 -427
- package/docs/zh/guides/build-recovery-guide.md +0 -266
- package/docs/zh/guides/contextual-greeting-system-guide.md +0 -381
- package/docs/zh/guides/contributing-squads.md +0 -250
- package/docs/zh/guides/development-setup.md +0 -384
- package/docs/zh/guides/ide-sync-guide.md +0 -193
- package/docs/zh/guides/installation-troubleshooting.md +0 -321
- package/docs/zh/guides/llm-routing.md +0 -306
- package/docs/zh/guides/mcp/desktop-commander.md +0 -368
- package/docs/zh/guides/mcp/docker-gateway-tutorial.md +0 -336
- package/docs/zh/guides/mcp-global-setup.md +0 -696
- package/docs/zh/guides/permission-modes.md +0 -307
- package/docs/zh/guides/project-status-feature.md +0 -467
- package/docs/zh/guides/quality-dashboard.md +0 -361
- package/docs/zh/guides/quality-gates.md +0 -462
- package/docs/zh/guides/security-hardening.md +0 -1055
- package/docs/zh/guides/service-discovery.md +0 -518
- package/docs/zh/guides/squad-examples/README.md +0 -63
- package/docs/zh/guides/squad-migration.md +0 -336
- package/docs/zh/guides/template-engine-v2.md +0 -478
- package/docs/zh/guides/workflows-guide.md +0 -408
- package/docs/zh/how-to-contribute-with-pull-requests.md +0 -158
- package/docs/zh/installation/README.md +0 -106
- package/docs/zh/installation/faq.md +0 -611
- package/docs/zh/installation/linux.md +0 -447
- package/docs/zh/installation/macos.md +0 -187
- package/docs/zh/installation/troubleshooting.md +0 -729
- package/docs/zh/installation/windows.md +0 -475
- package/docs/zh/meta-agent-commands.md +0 -990
- package/docs/zh/security-best-practices.md +0 -610
- package/docs/zh/security.md +0 -124
- package/docs/zh/sinapse-agent-flows/README.md +0 -196
- package/docs/zh/sinapse-agent-flows/analyst-system.md +0 -679
- package/docs/zh/sinapse-agent-flows/architect-system.md +0 -246
- package/docs/zh/sinapse-agent-flows/data-engineer-system.md +0 -418
- package/docs/zh/sinapse-agent-flows/dev-system.md +0 -209
- package/docs/zh/sinapse-agent-flows/devops-system.md +0 -643
- package/docs/zh/sinapse-agent-flows/pm-system.md +0 -733
- package/docs/zh/sinapse-agent-flows/qa-system.md +0 -268
- package/docs/zh/sinapse-agent-flows/sinapse-master-system.md +0 -81
- package/docs/zh/sinapse-agent-flows/sm-system.md +0 -501
- package/docs/zh/sinapse-agent-flows/squad-creator-system.md +0 -704
- package/docs/zh/sinapse-agent-flows/ux-design-expert-system.md +0 -160
- package/docs/zh/sinapse-workflows/README.md +0 -247
- package/docs/zh/sinapse-workflows/auto-worktree-workflow.md +0 -793
- package/docs/zh/sinapse-workflows/brownfield-discovery-workflow.md +0 -915
- package/docs/zh/sinapse-workflows/brownfield-fullstack-workflow.md +0 -764
- package/docs/zh/sinapse-workflows/brownfield-service-workflow.md +0 -812
- package/docs/zh/sinapse-workflows/brownfield-ui-workflow.md +0 -891
- package/docs/zh/sinapse-workflows/design-system-build-quality-workflow.md +0 -845
- package/docs/zh/sinapse-workflows/greenfield-fullstack-workflow.md +0 -796
- package/docs/zh/sinapse-workflows/greenfield-service-workflow.md +0 -786
- package/docs/zh/sinapse-workflows/greenfield-ui-workflow.md +0 -922
- package/docs/zh/sinapse-workflows/qa-loop-workflow.md +0 -1111
- package/docs/zh/sinapse-workflows/spec-pipeline-workflow.md +0 -1031
- package/docs/zh/sinapse-workflows/story-development-cycle-workflow.md +0 -843
- package/docs/zh/troubleshooting.md +0 -883
- package/docs/zh/uninstallation.md +0 -348
- package/docs/zh/versioning-and-releases.md +0 -140
- /package/.sinapse-ai/development/agents/{dev → developer}/MEMORY.md +0 -0
- /package/.sinapse-ai/development/agents/{qa → quality-gate}/MEMORY.md +0 -0
- /package/.sinapse-ai/development/agents/{sm → sprint-lead}/MEMORY.md +0 -0
|
@@ -1,1215 +0,0 @@
|
|
|
1
|
-
# Guia de Testing de SINAPSE
|
|
2
|
-
|
|
3
|
-
> [EN](../../guides/testing-guide.md) | [PT](../../pt/guides/testing-guide.md) | **ES**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
> Guia completa de la estrategia de testing, herramientas y mejores practicas para SINAPSE.
|
|
8
|
-
|
|
9
|
-
**Version:** 2.1.0
|
|
10
|
-
**Ultima Actualizacion:** 2026-01-29
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Tabla de Contenidos
|
|
15
|
-
|
|
16
|
-
1. [Vision General](#vision-general)
|
|
17
|
-
2. [Estrategia de Testing](#estrategia-de-testing)
|
|
18
|
-
3. [Tests Unitarios](#tests-unitarios)
|
|
19
|
-
4. [Tests de Integracion](#tests-de-integracion)
|
|
20
|
-
5. [Tests End-to-End](#tests-end-to-end)
|
|
21
|
-
6. [Tests de Agentes](#tests-de-agentes)
|
|
22
|
-
7. [Testing Cross-Platform](#testing-cross-platform)
|
|
23
|
-
8. [Cobertura y Metricas](#cobertura-y-metricas)
|
|
24
|
-
9. [Integracion CI/CD](#integracion-cicd)
|
|
25
|
-
10. [Escribiendo Buenos Tests](#escribiendo-buenos-tests)
|
|
26
|
-
11. [Mocking y Fixtures](#mocking-y-fixtures)
|
|
27
|
-
12. [Referencia de Comandos NPM](#referencia-de-comandos-npm)
|
|
28
|
-
13. [Solucion de Problemas](#solucion-de-problemas)
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Vision General
|
|
33
|
-
|
|
34
|
-
SINAPSE sigue una estrategia de testing integral que asegura la calidad del codigo en todas las capas del framework. Nuestra filosofia de testing esta construida sobre:
|
|
35
|
-
|
|
36
|
-
- **Desarrollo Guiado por Tests (TDD)** para funcionalidad core
|
|
37
|
-
- **Testing por Capas** con tests unitarios, de integracion y E2E
|
|
38
|
-
- **Verificacion Cross-Platform** para Windows, macOS y Linux
|
|
39
|
-
- **Testing Especifico de Agentes** para comportamientos de agentes IA
|
|
40
|
-
- **Quality Gates Automatizados** integrados con CI/CD
|
|
41
|
-
|
|
42
|
-
### Piramide de Testing
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
┌─────────────┐
|
|
46
|
-
│ E2E │ ← Pocos, Lentos, Costosos
|
|
47
|
-
│ Tests │
|
|
48
|
-
├─────────────┤
|
|
49
|
-
│ Integracion │ ← Algunos, Velocidad Media
|
|
50
|
-
│ Tests │
|
|
51
|
-
├─────────────┤
|
|
52
|
-
│ Unitarios │ ← Muchos, Rapidos, Economicos
|
|
53
|
-
│ Tests │
|
|
54
|
-
└─────────────┘
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
| Capa | Cantidad | Velocidad | Objetivo de Cobertura |
|
|
58
|
-
| ----------- | -------- | --------- | --------------------- |
|
|
59
|
-
| Unitarios | 100+ | < 30s | 80%+ lineas |
|
|
60
|
-
| Integracion | 30-50 | 1-5m | Rutas criticas |
|
|
61
|
-
| E2E | 10-20 | 5-15m | Flujos de usuario |
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Estrategia de Testing
|
|
66
|
-
|
|
67
|
-
### Estructura de Directorios
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
tests/
|
|
71
|
-
├── unit/ # Tests unitarios
|
|
72
|
-
│ ├── quality-gates/ # Componentes de quality gate
|
|
73
|
-
│ ├── squad/ # Tests del sistema de squads
|
|
74
|
-
│ ├── mcp/ # Tests de configuracion MCP
|
|
75
|
-
│ ├── manifest/ # Tests de manejo de manifests
|
|
76
|
-
│ └── documentation-integrity/ # Tests del generador de docs
|
|
77
|
-
├── integration/ # Tests de integracion
|
|
78
|
-
│ ├── squad/ # Integracion del squad designer
|
|
79
|
-
│ ├── windows/ # Tests especificos de Windows
|
|
80
|
-
│ └── *.test.js # Tests de integracion generales
|
|
81
|
-
├── e2e/ # Tests end-to-end
|
|
82
|
-
│ └── story-creation-clickup.test.js
|
|
83
|
-
├── performance/ # Benchmarks de rendimiento
|
|
84
|
-
│ ├── decision-logging-benchmark.test.js
|
|
85
|
-
│ └── tools-system-benchmark.test.js
|
|
86
|
-
├── security/ # Tests de seguridad
|
|
87
|
-
│ └── core-security.test.js
|
|
88
|
-
├── health-check/ # Tests del sistema de health check
|
|
89
|
-
│ ├── engine.test.js
|
|
90
|
-
│ └── healers.test.js
|
|
91
|
-
├── regression/ # Tests de regresion
|
|
92
|
-
│ └── tools-migration.test.js
|
|
93
|
-
├── setup.js # Setup global de tests
|
|
94
|
-
└── fixtures/ # Fixtures y mocks de tests
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Convencion de Nombres de Tests
|
|
98
|
-
|
|
99
|
-
| Tipo | Patron | Ejemplo |
|
|
100
|
-
| ----------- | ----------------------------- | ------------------------------------ |
|
|
101
|
-
| Unitario | `*.test.js` o `*.spec.js` | `greeting-builder.test.js` |
|
|
102
|
-
| Integracion | `*.test.js` en `integration/` | `contextual-greeting.test.js` |
|
|
103
|
-
| E2E | `*.test.js` en `e2e/` | `story-creation-clickup.test.js` |
|
|
104
|
-
| Benchmark | `*-benchmark.test.js` | `decision-logging-benchmark.test.js` |
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## Tests Unitarios
|
|
109
|
-
|
|
110
|
-
Los tests unitarios verifican funciones y clases individuales de forma aislada.
|
|
111
|
-
|
|
112
|
-
### Configuracion (jest.config.js)
|
|
113
|
-
|
|
114
|
-
```javascript
|
|
115
|
-
module.exports = {
|
|
116
|
-
testEnvironment: 'node',
|
|
117
|
-
coverageDirectory: 'coverage',
|
|
118
|
-
|
|
119
|
-
testMatch: [
|
|
120
|
-
'**/tests/**/*.test.js',
|
|
121
|
-
'**/tests/**/*.spec.js',
|
|
122
|
-
'**/.sinapse-ai/**/__tests__/**/*.test.js',
|
|
123
|
-
],
|
|
124
|
-
|
|
125
|
-
testTimeout: 30000,
|
|
126
|
-
verbose: true,
|
|
127
|
-
|
|
128
|
-
setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
|
|
129
|
-
|
|
130
|
-
coverageThreshold: {
|
|
131
|
-
global: {
|
|
132
|
-
branches: 25,
|
|
133
|
-
functions: 30,
|
|
134
|
-
lines: 30,
|
|
135
|
-
statements: 30,
|
|
136
|
-
},
|
|
137
|
-
'.sinapse-ai/core/': {
|
|
138
|
-
lines: 45,
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Escribiendo Tests Unitarios
|
|
145
|
-
|
|
146
|
-
```javascript
|
|
147
|
-
/**
|
|
148
|
-
* Tests Unitarios del Quality Gate Manager
|
|
149
|
-
*
|
|
150
|
-
* @story 2.10 - Quality Gate Manager
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
const {
|
|
154
|
-
QualityGateManager,
|
|
155
|
-
} = require('../../../.sinapse-ai/core/quality-gates/quality-gate-manager');
|
|
156
|
-
|
|
157
|
-
describe('QualityGateManager', () => {
|
|
158
|
-
let manager;
|
|
159
|
-
|
|
160
|
-
beforeEach(() => {
|
|
161
|
-
manager = new QualityGateManager({
|
|
162
|
-
layer1: { enabled: true },
|
|
163
|
-
layer2: { enabled: true },
|
|
164
|
-
layer3: { enabled: true },
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
describe('constructor', () => {
|
|
169
|
-
it('deberia crear manager con config por defecto', () => {
|
|
170
|
-
const defaultManager = new QualityGateManager();
|
|
171
|
-
expect(defaultManager).toBeDefined();
|
|
172
|
-
expect(defaultManager.layers).toBeDefined();
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
it('deberia crear manager con config personalizada', () => {
|
|
176
|
-
const customManager = new QualityGateManager({
|
|
177
|
-
layer1: { enabled: false },
|
|
178
|
-
});
|
|
179
|
-
expect(customManager.layers.layer1.enabled).toBe(false);
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
describe('runLayer', () => {
|
|
184
|
-
it('deberia lanzar error para numero de capa invalido', async () => {
|
|
185
|
-
await expect(manager.runLayer(4)).rejects.toThrow('Invalid layer number: 4');
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
describe('formatDuration', () => {
|
|
190
|
-
it('deberia formatear milisegundos', () => {
|
|
191
|
-
expect(manager.formatDuration(500)).toBe('500ms');
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
it('deberia formatear segundos', () => {
|
|
195
|
-
expect(manager.formatDuration(5000)).toBe('5.0s');
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
it('deberia formatear minutos', () => {
|
|
199
|
-
expect(manager.formatDuration(120000)).toBe('2.0m');
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### Mejores Practicas de Organizacion de Tests
|
|
206
|
-
|
|
207
|
-
```javascript
|
|
208
|
-
describe('ComponentName', () => {
|
|
209
|
-
// Setup y teardown
|
|
210
|
-
beforeAll(() => {
|
|
211
|
-
/* Setup global */
|
|
212
|
-
});
|
|
213
|
-
afterAll(() => {
|
|
214
|
-
/* Limpieza global */
|
|
215
|
-
});
|
|
216
|
-
beforeEach(() => {
|
|
217
|
-
/* Setup por test */
|
|
218
|
-
});
|
|
219
|
-
afterEach(() => {
|
|
220
|
-
/* Limpieza por test */
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
// Agrupar por metodo/funcionalidad
|
|
224
|
-
describe('methodName', () => {
|
|
225
|
-
it('deberia manejar entrada valida', () => {});
|
|
226
|
-
it('deberia lanzar error con entrada invalida', () => {});
|
|
227
|
-
it('deberia manejar casos limite', () => {});
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
describe('otro metodo', () => {
|
|
231
|
-
// Mas tests...
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
## Tests de Integracion
|
|
239
|
-
|
|
240
|
-
Los tests de integracion verifican que multiples componentes funcionen correctamente juntos.
|
|
241
|
-
|
|
242
|
-
### Setup para Tests de Integracion
|
|
243
|
-
|
|
244
|
-
```javascript
|
|
245
|
-
// tests/setup.js
|
|
246
|
-
process.env.NODE_ENV = 'test';
|
|
247
|
-
process.env.SINAPSE_DEBUG = 'false';
|
|
248
|
-
|
|
249
|
-
// Omitir tests de integracion por defecto
|
|
250
|
-
if (process.env.SKIP_INTEGRATION_TESTS === undefined) {
|
|
251
|
-
process.env.SKIP_INTEGRATION_TESTS = 'true';
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// Timeout global de tests (aumentado para CI)
|
|
255
|
-
jest.setTimeout(process.env.CI ? 30000 : 10000);
|
|
256
|
-
|
|
257
|
-
// Helper para omitir condicionalmente tests de integracion
|
|
258
|
-
global.describeIntegration =
|
|
259
|
-
process.env.SKIP_INTEGRATION_TESTS === 'true' ? describe.skip : describe;
|
|
260
|
-
|
|
261
|
-
global.testIntegration = process.env.SKIP_INTEGRATION_TESTS === 'true' ? test.skip : test;
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### Escribiendo Tests de Integracion
|
|
265
|
-
|
|
266
|
-
```javascript
|
|
267
|
-
/**
|
|
268
|
-
* Tests de Integracion para Sistema de Saludo Contextual
|
|
269
|
-
*
|
|
270
|
-
* Testing end-to-end de:
|
|
271
|
-
* - Los 3 tipos de sesion
|
|
272
|
-
* - Git configurado vs no configurado
|
|
273
|
-
* - Filtrado de visibilidad de comandos
|
|
274
|
-
* - Escenarios de fallback
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
const GreetingBuilder = require('../../.sinapse-ai/development/scripts/greeting-builder');
|
|
278
|
-
|
|
279
|
-
describe('Tests de Integracion de Saludo Contextual', () => {
|
|
280
|
-
let builder;
|
|
281
|
-
|
|
282
|
-
beforeEach(() => {
|
|
283
|
-
builder = new GreetingBuilder();
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
describeIntegration('Generacion de Saludo End-to-End', () => {
|
|
287
|
-
test('deberia generar saludo completo de sesion nueva', async () => {
|
|
288
|
-
const greeting = await builder.build({
|
|
289
|
-
sessionType: 'new',
|
|
290
|
-
agent: 'dev',
|
|
291
|
-
gitConfigured: true,
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
expect(greeting).toContain('Welcome');
|
|
295
|
-
expect(greeting).toContain('Quick Commands');
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
test('deberia manejar git no configurado graciosamente', async () => {
|
|
299
|
-
const greeting = await builder.build({
|
|
300
|
-
sessionType: 'new',
|
|
301
|
-
agent: 'dev',
|
|
302
|
-
gitConfigured: false,
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
expect(greeting).not.toContain('git commit');
|
|
306
|
-
});
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
### Ejecutando Tests de Integracion
|
|
312
|
-
|
|
313
|
-
```bash
|
|
314
|
-
# Ejecutar todos los tests incluyendo integracion
|
|
315
|
-
SKIP_INTEGRATION_TESTS=false npm test
|
|
316
|
-
|
|
317
|
-
# Ejecutar solo tests de integracion
|
|
318
|
-
npm test -- --testPathPattern=integration
|
|
319
|
-
|
|
320
|
-
# Ejecutar test de integracion especifico
|
|
321
|
-
npm test -- tests/integration/contextual-greeting.test.js
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## Tests End-to-End
|
|
327
|
-
|
|
328
|
-
Los tests E2E verifican flujos de usuario completos de principio a fin.
|
|
329
|
-
|
|
330
|
-
### Estructura de Tests E2E
|
|
331
|
-
|
|
332
|
-
```javascript
|
|
333
|
-
/**
|
|
334
|
-
* Test E2E: Creacion de Story con ClickUp
|
|
335
|
-
*
|
|
336
|
-
* Prueba el flujo completo:
|
|
337
|
-
* 1. Usuario inicia creacion de story
|
|
338
|
-
* 2. Story se genera desde template
|
|
339
|
-
* 3. Story se sincroniza a ClickUp
|
|
340
|
-
* 4. Archivo local se actualiza con ID de ClickUp
|
|
341
|
-
*/
|
|
342
|
-
|
|
343
|
-
describe('E2E Creacion de Story', () => {
|
|
344
|
-
const TEST_PROJECT = 'test-project';
|
|
345
|
-
|
|
346
|
-
beforeAll(async () => {
|
|
347
|
-
// Configurar entorno de test
|
|
348
|
-
await setupTestProject(TEST_PROJECT);
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
afterAll(async () => {
|
|
352
|
-
// Limpiar artefactos de test
|
|
353
|
-
await cleanupTestProject(TEST_PROJECT);
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
test('deberia crear story y sincronizar a ClickUp', async () => {
|
|
357
|
-
// Paso 1: Crear story
|
|
358
|
-
const story = await createStory({
|
|
359
|
-
title: 'Test Story',
|
|
360
|
-
type: 'feature',
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
expect(story.id).toBeDefined();
|
|
364
|
-
expect(story.file).toMatch(/\.md$/);
|
|
365
|
-
|
|
366
|
-
// Paso 2: Verificar sincronizacion con ClickUp
|
|
367
|
-
const clickupTask = await getClickUpTask(story.clickupId);
|
|
368
|
-
expect(clickupTask.name).toBe('Test Story');
|
|
369
|
-
|
|
370
|
-
// Paso 3: Verificar actualizacion de archivo local
|
|
371
|
-
const localContent = await readFile(story.file);
|
|
372
|
-
expect(localContent).toContain(story.clickupId);
|
|
373
|
-
}, 60000); // Timeout extendido para E2E
|
|
374
|
-
});
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
### Mejores Practicas de Tests E2E
|
|
378
|
-
|
|
379
|
-
| Practica | Descripcion |
|
|
380
|
-
| ------------------------- | ------------------------------------------------ |
|
|
381
|
-
| **Entorno Aislado** | Cada test E2E debe tener sus propios datos |
|
|
382
|
-
| **Limpieza Explicita** | Siempre limpiar recursos creados |
|
|
383
|
-
| **Timeouts Extendidos** | Tests E2E necesitan timeouts mas largos (30-60s) |
|
|
384
|
-
| **Servicios Reales** | Usar servicios reales, no mocks |
|
|
385
|
-
| **Idempotente** | Los tests deben ser repetibles |
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## Tests de Agentes
|
|
390
|
-
|
|
391
|
-
Probar agentes IA requiere consideraciones especiales para comportamiento de persona y ejecucion de comandos.
|
|
392
|
-
|
|
393
|
-
### Categorias de Tests de Agentes
|
|
394
|
-
|
|
395
|
-
| Categoria | Prueba | Proposito |
|
|
396
|
-
| ----------------- | -------------------- | -------------------------------------- |
|
|
397
|
-
| **Persona** | Estilo de respuesta | Verificar que agente mantiene caracter |
|
|
398
|
-
| **Comandos** | Ejecucion de tareas | Verificar que comandos funcionan |
|
|
399
|
-
| **Fallback** | Manejo de errores | Verificar degradacion gracil |
|
|
400
|
-
| **Compatibilidad**| Soporte legacy | Verificar que agentes viejos funcionan |
|
|
401
|
-
|
|
402
|
-
### Tests de Compatibilidad Retroactiva de Agentes
|
|
403
|
-
|
|
404
|
-
```javascript
|
|
405
|
-
/**
|
|
406
|
-
* Tests de Compatibilidad Retroactiva de Agentes
|
|
407
|
-
*
|
|
408
|
-
* Asegura que agentes de versiones anteriores de SINAPSE continuen funcionando.
|
|
409
|
-
*/
|
|
410
|
-
|
|
411
|
-
const { loadAgent } = require('../../.sinapse-ai/core/registry/agent-loader');
|
|
412
|
-
|
|
413
|
-
describe('Compatibilidad Retroactiva de Agentes', () => {
|
|
414
|
-
describe('Formato de Agente Legacy (v1.x)', () => {
|
|
415
|
-
test('deberia cargar agente sin metadata de visibilidad', async () => {
|
|
416
|
-
const agent = await loadAgent('legacy-agent-v1');
|
|
417
|
-
|
|
418
|
-
expect(agent).toBeDefined();
|
|
419
|
-
expect(agent.name).toBeDefined();
|
|
420
|
-
expect(agent.commands).toBeDefined();
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
test('deberia aplicar visibilidad por defecto cuando falta', async () => {
|
|
424
|
-
const agent = await loadAgent('legacy-agent-v1');
|
|
425
|
-
|
|
426
|
-
// Visibilidad por defecto deberia aplicarse
|
|
427
|
-
agent.commands.forEach((cmd) => {
|
|
428
|
-
expect(cmd.visibility).toBeDefined();
|
|
429
|
-
});
|
|
430
|
-
});
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
describe('Formato de Agente Actual (v2.x)', () => {
|
|
434
|
-
test('deberia cargar agente con metadata completa', async () => {
|
|
435
|
-
const agent = await loadAgent('dev');
|
|
436
|
-
|
|
437
|
-
expect(agent.slashPrefix).toBeDefined();
|
|
438
|
-
expect(agent.icon).toBeDefined();
|
|
439
|
-
expect(agent.persona).toBeDefined();
|
|
440
|
-
});
|
|
441
|
-
});
|
|
442
|
-
});
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
### Probando Comandos de Agentes
|
|
446
|
-
|
|
447
|
-
```javascript
|
|
448
|
-
describe('Comandos de Agentes', () => {
|
|
449
|
-
let agent;
|
|
450
|
-
|
|
451
|
-
beforeAll(async () => {
|
|
452
|
-
agent = await activateAgent('dev');
|
|
453
|
-
});
|
|
454
|
-
|
|
455
|
-
test('*help deberia mostrar comandos disponibles', async () => {
|
|
456
|
-
const result = await agent.executeCommand('*help');
|
|
457
|
-
|
|
458
|
-
expect(result.output).toContain('Available Commands');
|
|
459
|
-
expect(result.exitCode).toBe(0);
|
|
460
|
-
});
|
|
461
|
-
|
|
462
|
-
test('*create-story deberia validar campos requeridos', async () => {
|
|
463
|
-
await expect(agent.executeCommand('*create-story')).rejects.toThrow(
|
|
464
|
-
'Missing required field: title'
|
|
465
|
-
);
|
|
466
|
-
});
|
|
467
|
-
});
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
---
|
|
471
|
-
|
|
472
|
-
## Testing Cross-Platform
|
|
473
|
-
|
|
474
|
-
SINAPSE soporta Windows, macOS y Linux. El testing cross-platform asegura comportamiento consistente.
|
|
475
|
-
|
|
476
|
-
### Archivos de Test Especificos por Plataforma
|
|
477
|
-
|
|
478
|
-
```
|
|
479
|
-
tests/
|
|
480
|
-
├── integration/
|
|
481
|
-
│ ├── windows/
|
|
482
|
-
│ │ └── shell-compat.test.js # Tests de shell Windows
|
|
483
|
-
│ ├── macos/
|
|
484
|
-
│ │ └── permission.test.js # Tests de permisos macOS
|
|
485
|
-
│ └── linux/
|
|
486
|
-
│ └── symlink.test.js # Tests de symlinks Linux
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
### Utilidades de Test Cross-Platform
|
|
490
|
-
|
|
491
|
-
```javascript
|
|
492
|
-
/**
|
|
493
|
-
* Utilidades de test cross-platform
|
|
494
|
-
*/
|
|
495
|
-
|
|
496
|
-
const os = require('os');
|
|
497
|
-
const path = require('path');
|
|
498
|
-
|
|
499
|
-
const isWindows = process.platform === 'win32';
|
|
500
|
-
const isMacOS = process.platform === 'darwin';
|
|
501
|
-
const isLinux = process.platform === 'linux';
|
|
502
|
-
|
|
503
|
-
// Describe especifico por plataforma
|
|
504
|
-
const describeWindows = isWindows ? describe : describe.skip;
|
|
505
|
-
const describeMacOS = isMacOS ? describe : describe.skip;
|
|
506
|
-
const describeLinux = isLinux ? describe : describe.skip;
|
|
507
|
-
|
|
508
|
-
// Normalizar separadores de path para assertions
|
|
509
|
-
function normalizePath(p) {
|
|
510
|
-
return p.replace(/\\/g, '/');
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
// Obtener directorio temporal apropiado para la plataforma
|
|
514
|
-
function getTempDir() {
|
|
515
|
-
return path.join(os.tmpdir(), 'sinapse-tests');
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
module.exports = {
|
|
519
|
-
isWindows,
|
|
520
|
-
isMacOS,
|
|
521
|
-
isLinux,
|
|
522
|
-
describeWindows,
|
|
523
|
-
describeMacOS,
|
|
524
|
-
describeLinux,
|
|
525
|
-
normalizePath,
|
|
526
|
-
getTempDir,
|
|
527
|
-
};
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### Tests Especificos de Windows
|
|
531
|
-
|
|
532
|
-
```javascript
|
|
533
|
-
/**
|
|
534
|
-
* Tests de Compatibilidad de Shell de Windows
|
|
535
|
-
*/
|
|
536
|
-
|
|
537
|
-
const { describeWindows } = require('../utils/platform');
|
|
538
|
-
|
|
539
|
-
describeWindows('Compatibilidad de Shell de Windows', () => {
|
|
540
|
-
test('deberia manejar separadores de path de Windows', () => {
|
|
541
|
-
const path = 'C:\\Users\\test\\project';
|
|
542
|
-
const normalized = normalizePath(path);
|
|
543
|
-
|
|
544
|
-
expect(normalized).toBe('C:/Users/test/project');
|
|
545
|
-
});
|
|
546
|
-
|
|
547
|
-
test('deberia ejecutar comandos PowerShell', async () => {
|
|
548
|
-
const result = await executeShell('Get-Location', { shell: 'powershell' });
|
|
549
|
-
|
|
550
|
-
expect(result.exitCode).toBe(0);
|
|
551
|
-
});
|
|
552
|
-
|
|
553
|
-
test('deberia manejar fallback a cmd.exe', async () => {
|
|
554
|
-
const result = await executeShell('dir', { shell: 'cmd' });
|
|
555
|
-
|
|
556
|
-
expect(result.exitCode).toBe(0);
|
|
557
|
-
});
|
|
558
|
-
});
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
### Configuracion de Matriz CI
|
|
562
|
-
|
|
563
|
-
```yaml
|
|
564
|
-
# .github/workflows/test.yml
|
|
565
|
-
name: Tests Cross-Platform
|
|
566
|
-
|
|
567
|
-
on: [push, pull_request]
|
|
568
|
-
|
|
569
|
-
jobs:
|
|
570
|
-
test:
|
|
571
|
-
strategy:
|
|
572
|
-
matrix:
|
|
573
|
-
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
574
|
-
node-version: [18, 20, 22]
|
|
575
|
-
|
|
576
|
-
runs-on: ${{ matrix.os }}
|
|
577
|
-
|
|
578
|
-
steps:
|
|
579
|
-
- uses: actions/checkout@v4
|
|
580
|
-
- uses: actions/setup-node@v4
|
|
581
|
-
with:
|
|
582
|
-
node-version: ${{ matrix.node-version }}
|
|
583
|
-
|
|
584
|
-
- run: npm ci
|
|
585
|
-
- run: npm test
|
|
586
|
-
|
|
587
|
-
- name: Ejecutar Tests Especificos de Plataforma
|
|
588
|
-
run: npm run test:platform
|
|
589
|
-
```
|
|
590
|
-
|
|
591
|
-
---
|
|
592
|
-
|
|
593
|
-
## Cobertura y Metricas
|
|
594
|
-
|
|
595
|
-
### Configuracion de Cobertura
|
|
596
|
-
|
|
597
|
-
```javascript
|
|
598
|
-
// jest.config.js - Seccion de cobertura
|
|
599
|
-
module.exports = {
|
|
600
|
-
collectCoverageFrom: [
|
|
601
|
-
'src/**/*.js',
|
|
602
|
-
'.sinapse-ai/**/*.js',
|
|
603
|
-
'bin/**/*.js',
|
|
604
|
-
'packages/**/*.js',
|
|
605
|
-
'scripts/**/*.js',
|
|
606
|
-
'!**/node_modules/**',
|
|
607
|
-
'!**/tests/**',
|
|
608
|
-
'!**/coverage/**',
|
|
609
|
-
'!**/__tests__/**',
|
|
610
|
-
'!**/*.test.js',
|
|
611
|
-
'!**/*.spec.js',
|
|
612
|
-
// Excluir templates y archivos generados
|
|
613
|
-
'!.sinapse-ai/development/templates/**',
|
|
614
|
-
'!.sinapse-ai/product/templates/**',
|
|
615
|
-
'!**/dist/**',
|
|
616
|
-
// Excluir modulos con I/O intensivo (mejor para tests de integracion)
|
|
617
|
-
'!.sinapse-ai/core/health-check/checks/**',
|
|
618
|
-
'!.sinapse-ai/core/config/**',
|
|
619
|
-
'!.sinapse-ai/core/manifest/**',
|
|
620
|
-
'!.sinapse-ai/core/registry/**',
|
|
621
|
-
'!.sinapse-ai/core/utils/**',
|
|
622
|
-
],
|
|
623
|
-
|
|
624
|
-
coverageThreshold: {
|
|
625
|
-
global: {
|
|
626
|
-
branches: 25,
|
|
627
|
-
functions: 30,
|
|
628
|
-
lines: 30,
|
|
629
|
-
statements: 30,
|
|
630
|
-
},
|
|
631
|
-
'.sinapse-ai/core/': {
|
|
632
|
-
lines: 45,
|
|
633
|
-
},
|
|
634
|
-
},
|
|
635
|
-
|
|
636
|
-
coveragePathIgnorePatterns: ['/node_modules/', '/coverage/', '/.husky/', '/dist/'],
|
|
637
|
-
};
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
### Objetivos de Cobertura
|
|
641
|
-
|
|
642
|
-
| Modulo | Objetivo | Actual | Notas |
|
|
643
|
-
| ----------------- | -------- | ------ | ------------------- |
|
|
644
|
-
| **Global** | 30% | ~31% | Linea base minima |
|
|
645
|
-
| **Core** | 45% | ~47% | Logica de negocio |
|
|
646
|
-
| **Quality Gates** | 80% | TBD | Ruta critica |
|
|
647
|
-
| **Sistema Squad** | 70% | TBD | Cara al usuario |
|
|
648
|
-
|
|
649
|
-
### Viendo Reportes de Cobertura
|
|
650
|
-
|
|
651
|
-
```bash
|
|
652
|
-
# Generar reporte de cobertura
|
|
653
|
-
npm run test:coverage
|
|
654
|
-
|
|
655
|
-
# Abrir reporte HTML (macOS)
|
|
656
|
-
open coverage/lcov-report/index.html
|
|
657
|
-
|
|
658
|
-
# Abrir reporte HTML (Windows)
|
|
659
|
-
start coverage/lcov-report/index.html
|
|
660
|
-
|
|
661
|
-
# Abrir reporte HTML (Linux)
|
|
662
|
-
xdg-open coverage/lcov-report/index.html
|
|
663
|
-
```
|
|
664
|
-
|
|
665
|
-
### Estructura del Reporte de Cobertura
|
|
666
|
-
|
|
667
|
-
```
|
|
668
|
-
coverage/
|
|
669
|
-
├── lcov-report/ # Reporte HTML
|
|
670
|
-
│ ├── index.html # Vista general
|
|
671
|
-
│ └── .sinapse-ai/ # Cobertura por modulo
|
|
672
|
-
├── lcov.info # Formato LCOV (para CI)
|
|
673
|
-
├── coverage-summary.json # Resumen JSON
|
|
674
|
-
└── clover.xml # Formato Clover
|
|
675
|
-
```
|
|
676
|
-
|
|
677
|
-
---
|
|
678
|
-
|
|
679
|
-
## Integracion CI/CD
|
|
680
|
-
|
|
681
|
-
### Workflow de GitHub Actions
|
|
682
|
-
|
|
683
|
-
```yaml
|
|
684
|
-
# .github/workflows/test.yml
|
|
685
|
-
name: Tests
|
|
686
|
-
|
|
687
|
-
on:
|
|
688
|
-
push:
|
|
689
|
-
branches: [main, develop]
|
|
690
|
-
pull_request:
|
|
691
|
-
branches: [main, develop]
|
|
692
|
-
|
|
693
|
-
jobs:
|
|
694
|
-
unit-tests:
|
|
695
|
-
name: Tests Unitarios
|
|
696
|
-
runs-on: ubuntu-latest
|
|
697
|
-
|
|
698
|
-
steps:
|
|
699
|
-
- uses: actions/checkout@v4
|
|
700
|
-
|
|
701
|
-
- name: Setup Node.js
|
|
702
|
-
uses: actions/setup-node@v4
|
|
703
|
-
with:
|
|
704
|
-
node-version: '18'
|
|
705
|
-
cache: 'npm'
|
|
706
|
-
|
|
707
|
-
- name: Instalar dependencias
|
|
708
|
-
run: npm ci
|
|
709
|
-
|
|
710
|
-
- name: Ejecutar tests unitarios
|
|
711
|
-
run: npm test
|
|
712
|
-
|
|
713
|
-
- name: Subir cobertura
|
|
714
|
-
uses: codecov/codecov-action@v4
|
|
715
|
-
with:
|
|
716
|
-
files: ./coverage/lcov.info
|
|
717
|
-
fail_ci_if_error: true
|
|
718
|
-
|
|
719
|
-
integration-tests:
|
|
720
|
-
name: Tests de Integracion
|
|
721
|
-
runs-on: ubuntu-latest
|
|
722
|
-
needs: unit-tests
|
|
723
|
-
|
|
724
|
-
steps:
|
|
725
|
-
- uses: actions/checkout@v4
|
|
726
|
-
|
|
727
|
-
- name: Setup Node.js
|
|
728
|
-
uses: actions/setup-node@v4
|
|
729
|
-
with:
|
|
730
|
-
node-version: '18'
|
|
731
|
-
cache: 'npm'
|
|
732
|
-
|
|
733
|
-
- name: Instalar dependencias
|
|
734
|
-
run: npm ci
|
|
735
|
-
|
|
736
|
-
- name: Ejecutar tests de integracion
|
|
737
|
-
run: SKIP_INTEGRATION_TESTS=false npm test -- --testPathPattern=integration
|
|
738
|
-
env:
|
|
739
|
-
CLICKUP_API_KEY: ${{ secrets.CLICKUP_API_KEY }}
|
|
740
|
-
|
|
741
|
-
quality-gate:
|
|
742
|
-
name: Quality Gate
|
|
743
|
-
runs-on: ubuntu-latest
|
|
744
|
-
needs: [unit-tests, integration-tests]
|
|
745
|
-
|
|
746
|
-
steps:
|
|
747
|
-
- uses: actions/checkout@v4
|
|
748
|
-
|
|
749
|
-
- name: Setup Node.js
|
|
750
|
-
uses: actions/setup-node@v4
|
|
751
|
-
with:
|
|
752
|
-
node-version: '18'
|
|
753
|
-
|
|
754
|
-
- run: npm ci
|
|
755
|
-
|
|
756
|
-
- name: Lint
|
|
757
|
-
run: npm run lint
|
|
758
|
-
|
|
759
|
-
- name: TypeCheck
|
|
760
|
-
run: npm run typecheck
|
|
761
|
-
|
|
762
|
-
- name: Umbral de cobertura
|
|
763
|
-
run: npm run test:coverage -- --coverageReporters=text-summary
|
|
764
|
-
```
|
|
765
|
-
|
|
766
|
-
### Hook Pre-commit
|
|
767
|
-
|
|
768
|
-
```bash
|
|
769
|
-
#!/bin/sh
|
|
770
|
-
# .husky/pre-commit
|
|
771
|
-
|
|
772
|
-
# Ejecutar lint-staged
|
|
773
|
-
npx lint-staged
|
|
774
|
-
|
|
775
|
-
# Ejecutar tests unitarios rapidos
|
|
776
|
-
npm test -- --passWithNoTests --testPathIgnorePatterns=integration,e2e
|
|
777
|
-
```
|
|
778
|
-
|
|
779
|
-
### Integracion con Quality Gate
|
|
780
|
-
|
|
781
|
-
El Sistema de Quality Gate de SINAPSE (ver [Guia de Quality Gates](./quality-gates.md)) integra testing en multiples capas:
|
|
782
|
-
|
|
783
|
-
| Capa | Tipo de Test | Cuando |
|
|
784
|
-
| ----------- | ----------------------------- | -------------- |
|
|
785
|
-
| **Capa 1** | Unitario + Lint + TypeCheck | Pre-commit |
|
|
786
|
-
| **Capa 2** | Integracion + Review IA | Creacion de PR |
|
|
787
|
-
| **Capa 3** | E2E + Review Humano | Antes de merge |
|
|
788
|
-
|
|
789
|
-
---
|
|
790
|
-
|
|
791
|
-
## Escribiendo Buenos Tests
|
|
792
|
-
|
|
793
|
-
### Estructura de Test (Patron AAA)
|
|
794
|
-
|
|
795
|
-
```javascript
|
|
796
|
-
test('deberia calcular precio total con descuento', () => {
|
|
797
|
-
// Arrange - Configurar datos y condiciones de test
|
|
798
|
-
const cart = new ShoppingCart();
|
|
799
|
-
cart.addItem({ name: 'Widget', price: 100 });
|
|
800
|
-
cart.addItem({ name: 'Gadget', price: 50 });
|
|
801
|
-
const discount = 0.1; // 10% de descuento
|
|
802
|
-
|
|
803
|
-
// Act - Ejecutar el codigo bajo prueba
|
|
804
|
-
const total = cart.calculateTotal(discount);
|
|
805
|
-
|
|
806
|
-
// Assert - Verificar los resultados
|
|
807
|
-
expect(total).toBe(135); // (100 + 50) * 0.9
|
|
808
|
-
});
|
|
809
|
-
```
|
|
810
|
-
|
|
811
|
-
### Guias de Nombres de Tests
|
|
812
|
-
|
|
813
|
-
| Malo | Bueno |
|
|
814
|
-
| --------------- | ----------------------------------------------------------- |
|
|
815
|
-
| `test('test1')` | `test('deberia retornar null para entrada vacia')` |
|
|
816
|
-
| `test('works')` | `test('deberia calcular impuesto correctamente')` |
|
|
817
|
-
| `test('error')` | `test('deberia lanzar ValidationError para email invalido')`|
|
|
818
|
-
|
|
819
|
-
### Casos Limite a Probar
|
|
820
|
-
|
|
821
|
-
```javascript
|
|
822
|
-
describe('validateEmail', () => {
|
|
823
|
-
// Camino feliz
|
|
824
|
-
test('deberia aceptar email valido', () => {
|
|
825
|
-
expect(validateEmail('user@example.com')).toBe(true);
|
|
826
|
-
});
|
|
827
|
-
|
|
828
|
-
// Casos limite
|
|
829
|
-
test('deberia rechazar string vacio', () => {
|
|
830
|
-
expect(validateEmail('')).toBe(false);
|
|
831
|
-
});
|
|
832
|
-
|
|
833
|
-
test('deberia rechazar null', () => {
|
|
834
|
-
expect(validateEmail(null)).toBe(false);
|
|
835
|
-
});
|
|
836
|
-
|
|
837
|
-
test('deberia rechazar undefined', () => {
|
|
838
|
-
expect(validateEmail(undefined)).toBe(false);
|
|
839
|
-
});
|
|
840
|
-
|
|
841
|
-
// Condiciones de frontera
|
|
842
|
-
test('deberia aceptar email con parte local de un caracter', () => {
|
|
843
|
-
expect(validateEmail('a@example.com')).toBe(true);
|
|
844
|
-
});
|
|
845
|
-
|
|
846
|
-
test('deberia rechazar email sin simbolo @', () => {
|
|
847
|
-
expect(validateEmail('userexample.com')).toBe(false);
|
|
848
|
-
});
|
|
849
|
-
|
|
850
|
-
// Caracteres especiales
|
|
851
|
-
test('deberia aceptar email con signo mas', () => {
|
|
852
|
-
expect(validateEmail('user+tag@example.com')).toBe(true);
|
|
853
|
-
});
|
|
854
|
-
});
|
|
855
|
-
```
|
|
856
|
-
|
|
857
|
-
### Patrones de Tests Asincronos
|
|
858
|
-
|
|
859
|
-
```javascript
|
|
860
|
-
// Usando async/await (recomendado)
|
|
861
|
-
test('deberia obtener datos de usuario', async () => {
|
|
862
|
-
const user = await fetchUser(123);
|
|
863
|
-
expect(user.name).toBe('John');
|
|
864
|
-
});
|
|
865
|
-
|
|
866
|
-
// Probando rechazo de promesa
|
|
867
|
-
test('deberia rechazar para usuario inexistente', async () => {
|
|
868
|
-
await expect(fetchUser(999)).rejects.toThrow('User not found');
|
|
869
|
-
});
|
|
870
|
-
|
|
871
|
-
// Probando con callback done (legacy)
|
|
872
|
-
test('deberia llamar callback con datos', (done) => {
|
|
873
|
-
fetchUserCallback(123, (err, user) => {
|
|
874
|
-
expect(err).toBeNull();
|
|
875
|
-
expect(user.name).toBe('John');
|
|
876
|
-
done();
|
|
877
|
-
});
|
|
878
|
-
});
|
|
879
|
-
```
|
|
880
|
-
|
|
881
|
-
### Aislamiento de Tests
|
|
882
|
-
|
|
883
|
-
```javascript
|
|
884
|
-
describe('FileManager', () => {
|
|
885
|
-
let tempDir;
|
|
886
|
-
let fileManager;
|
|
887
|
-
|
|
888
|
-
beforeEach(async () => {
|
|
889
|
-
// Crear directorio temporal aislado para cada test
|
|
890
|
-
tempDir = await createTempDir();
|
|
891
|
-
fileManager = new FileManager(tempDir);
|
|
892
|
-
});
|
|
893
|
-
|
|
894
|
-
afterEach(async () => {
|
|
895
|
-
// Limpiar despues de cada test
|
|
896
|
-
await removeTempDir(tempDir);
|
|
897
|
-
});
|
|
898
|
-
|
|
899
|
-
test('deberia crear archivo', async () => {
|
|
900
|
-
await fileManager.write('test.txt', 'content');
|
|
901
|
-
const exists = await fileManager.exists('test.txt');
|
|
902
|
-
expect(exists).toBe(true);
|
|
903
|
-
});
|
|
904
|
-
|
|
905
|
-
test('no deberia ver archivos de otros tests', async () => {
|
|
906
|
-
// Este test comienza con un directorio limpio
|
|
907
|
-
const files = await fileManager.list();
|
|
908
|
-
expect(files).toHaveLength(0);
|
|
909
|
-
});
|
|
910
|
-
});
|
|
911
|
-
```
|
|
912
|
-
|
|
913
|
-
---
|
|
914
|
-
|
|
915
|
-
## Mocking y Fixtures
|
|
916
|
-
|
|
917
|
-
### Basicos de Mocking en Jest
|
|
918
|
-
|
|
919
|
-
```javascript
|
|
920
|
-
// Mock de un modulo
|
|
921
|
-
jest.mock('fs-extra');
|
|
922
|
-
const fs = require('fs-extra');
|
|
923
|
-
|
|
924
|
-
// Implementacion mock
|
|
925
|
-
fs.readFile.mockResolvedValue('file content');
|
|
926
|
-
fs.writeFile.mockResolvedValue(undefined);
|
|
927
|
-
|
|
928
|
-
// Valor de retorno mock
|
|
929
|
-
fs.existsSync.mockReturnValue(true);
|
|
930
|
-
|
|
931
|
-
// Implementacion mock para llamada especifica
|
|
932
|
-
fs.readFile.mockImplementation((path) => {
|
|
933
|
-
if (path === 'config.json') {
|
|
934
|
-
return Promise.resolve('{"key": "value"}');
|
|
935
|
-
}
|
|
936
|
-
return Promise.reject(new Error('File not found'));
|
|
937
|
-
});
|
|
938
|
-
```
|
|
939
|
-
|
|
940
|
-
### Creando Fixtures de Test
|
|
941
|
-
|
|
942
|
-
```javascript
|
|
943
|
-
// tests/fixtures/agent-fixtures.js
|
|
944
|
-
const MOCK_AGENT = {
|
|
945
|
-
name: 'test-agent',
|
|
946
|
-
slashPrefix: 'test',
|
|
947
|
-
icon: '🧪',
|
|
948
|
-
persona: {
|
|
949
|
-
role: 'Test Agent',
|
|
950
|
-
expertise: ['testing'],
|
|
951
|
-
},
|
|
952
|
-
commands: [
|
|
953
|
-
{
|
|
954
|
-
name: '*test',
|
|
955
|
-
description: 'Run tests',
|
|
956
|
-
visibility: 'all',
|
|
957
|
-
},
|
|
958
|
-
],
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
const MOCK_SQUAD = {
|
|
962
|
-
name: 'test-squad',
|
|
963
|
-
version: '1.0.0',
|
|
964
|
-
agents: [MOCK_AGENT],
|
|
965
|
-
tasks: [],
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
module.exports = {
|
|
969
|
-
MOCK_AGENT,
|
|
970
|
-
MOCK_SQUAD,
|
|
971
|
-
};
|
|
972
|
-
```
|
|
973
|
-
|
|
974
|
-
### Usando Fixtures en Tests
|
|
975
|
-
|
|
976
|
-
```javascript
|
|
977
|
-
const { MOCK_AGENT, MOCK_SQUAD } = require('../fixtures/agent-fixtures');
|
|
978
|
-
|
|
979
|
-
describe('AgentLoader', () => {
|
|
980
|
-
test('deberia cargar agente desde fixture', async () => {
|
|
981
|
-
// Mock del sistema de archivos para retornar datos de fixture
|
|
982
|
-
jest.spyOn(fs, 'readFile').mockResolvedValue(JSON.stringify(MOCK_AGENT));
|
|
983
|
-
|
|
984
|
-
const agent = await loadAgent('test-agent');
|
|
985
|
-
|
|
986
|
-
expect(agent.name).toBe(MOCK_AGENT.name);
|
|
987
|
-
expect(agent.commands).toHaveLength(1);
|
|
988
|
-
});
|
|
989
|
-
});
|
|
990
|
-
```
|
|
991
|
-
|
|
992
|
-
### Mocking de Servicios Externos
|
|
993
|
-
|
|
994
|
-
```javascript
|
|
995
|
-
// Mock de API de ClickUp
|
|
996
|
-
jest.mock('../../.sinapse-ai/integrations/clickup-client');
|
|
997
|
-
const clickupClient = require('../../.sinapse-ai/integrations/clickup-client');
|
|
998
|
-
|
|
999
|
-
describe('Sincronizacion de Story', () => {
|
|
1000
|
-
beforeEach(() => {
|
|
1001
|
-
// Resetear mocks antes de cada test
|
|
1002
|
-
jest.clearAllMocks();
|
|
1003
|
-
|
|
1004
|
-
// Configurar implementaciones mock por defecto
|
|
1005
|
-
clickupClient.createTask.mockResolvedValue({
|
|
1006
|
-
id: 'task-123',
|
|
1007
|
-
name: 'Test Task',
|
|
1008
|
-
});
|
|
1009
|
-
|
|
1010
|
-
clickupClient.updateTask.mockResolvedValue({
|
|
1011
|
-
id: 'task-123',
|
|
1012
|
-
status: 'in progress',
|
|
1013
|
-
});
|
|
1014
|
-
});
|
|
1015
|
-
|
|
1016
|
-
test('deberia crear tarea en ClickUp', async () => {
|
|
1017
|
-
const result = await syncStory({ title: 'New Feature' });
|
|
1018
|
-
|
|
1019
|
-
expect(clickupClient.createTask).toHaveBeenCalledWith({
|
|
1020
|
-
name: 'New Feature',
|
|
1021
|
-
list_id: expect.any(String),
|
|
1022
|
-
});
|
|
1023
|
-
expect(result.clickupId).toBe('task-123');
|
|
1024
|
-
});
|
|
1025
|
-
|
|
1026
|
-
test('deberia manejar errores de API de ClickUp', async () => {
|
|
1027
|
-
clickupClient.createTask.mockRejectedValue(new Error('API rate limited'));
|
|
1028
|
-
|
|
1029
|
-
await expect(syncStory({ title: 'New Feature' })).rejects.toThrow(
|
|
1030
|
-
'Failed to sync: API rate limited'
|
|
1031
|
-
);
|
|
1032
|
-
});
|
|
1033
|
-
});
|
|
1034
|
-
```
|
|
1035
|
-
|
|
1036
|
-
### Testing de Snapshots
|
|
1037
|
-
|
|
1038
|
-
```javascript
|
|
1039
|
-
describe('GreetingBuilder', () => {
|
|
1040
|
-
test('deberia generar formato de saludo consistente', async () => {
|
|
1041
|
-
const builder = new GreetingBuilder();
|
|
1042
|
-
const greeting = await builder.build({
|
|
1043
|
-
agent: 'dev',
|
|
1044
|
-
sessionType: 'new',
|
|
1045
|
-
timestamp: new Date('2025-01-01T00:00:00Z'), // Timestamp fijo
|
|
1046
|
-
});
|
|
1047
|
-
|
|
1048
|
-
// Comparacion de snapshot
|
|
1049
|
-
expect(greeting).toMatchSnapshot();
|
|
1050
|
-
});
|
|
1051
|
-
});
|
|
1052
|
-
```
|
|
1053
|
-
|
|
1054
|
-
---
|
|
1055
|
-
|
|
1056
|
-
## Referencia de Comandos NPM
|
|
1057
|
-
|
|
1058
|
-
### Comandos Basicos
|
|
1059
|
-
|
|
1060
|
-
| Comando | Descripcion |
|
|
1061
|
-
| ----------------------- | ------------------------------------ |
|
|
1062
|
-
| `npm test` | Ejecutar todos los tests |
|
|
1063
|
-
| `npm run test:watch` | Ejecutar tests en modo watch |
|
|
1064
|
-
| `npm run test:coverage` | Ejecutar tests con reporte cobertura |
|
|
1065
|
-
|
|
1066
|
-
### Comandos de Tests Filtrados
|
|
1067
|
-
|
|
1068
|
-
```bash
|
|
1069
|
-
# Ejecutar tests que coincidan con patron
|
|
1070
|
-
npm test -- --testPathPattern=unit
|
|
1071
|
-
|
|
1072
|
-
# Ejecutar archivo de test especifico
|
|
1073
|
-
npm test -- tests/unit/greeting-builder.test.js
|
|
1074
|
-
|
|
1075
|
-
# Ejecutar tests que coincidan con nombre
|
|
1076
|
-
npm test -- --testNamePattern="should validate"
|
|
1077
|
-
|
|
1078
|
-
# Ejecutar tests en directorio especifico
|
|
1079
|
-
npm test -- tests/integration/
|
|
1080
|
-
```
|
|
1081
|
-
|
|
1082
|
-
### Comandos de Cobertura
|
|
1083
|
-
|
|
1084
|
-
```bash
|
|
1085
|
-
# Generar reporte completo de cobertura
|
|
1086
|
-
npm run test:coverage
|
|
1087
|
-
|
|
1088
|
-
# Cobertura con reporter especifico
|
|
1089
|
-
npm test -- --coverage --coverageReporters=text
|
|
1090
|
-
|
|
1091
|
-
# Cobertura para archivos especificos
|
|
1092
|
-
npm test -- --coverage --collectCoverageFrom="src/**/*.js"
|
|
1093
|
-
```
|
|
1094
|
-
|
|
1095
|
-
### Opciones de Modo Watch
|
|
1096
|
-
|
|
1097
|
-
```bash
|
|
1098
|
-
# Watch todos los tests
|
|
1099
|
-
npm run test:watch
|
|
1100
|
-
|
|
1101
|
-
# Watch archivos especificos
|
|
1102
|
-
npm test -- --watch --testPathPattern=unit
|
|
1103
|
-
|
|
1104
|
-
# Watch solo archivos modificados
|
|
1105
|
-
npm test -- --watchAll=false --watch
|
|
1106
|
-
```
|
|
1107
|
-
|
|
1108
|
-
### Modo Debug
|
|
1109
|
-
|
|
1110
|
-
```bash
|
|
1111
|
-
# Ejecutar con salida verbose
|
|
1112
|
-
npm test -- --verbose
|
|
1113
|
-
|
|
1114
|
-
# Ejecutar test individual para debugging
|
|
1115
|
-
npm test -- --runInBand tests/unit/specific.test.js
|
|
1116
|
-
|
|
1117
|
-
# Ejecutar con debugger de Node
|
|
1118
|
-
node --inspect-brk node_modules/.bin/jest --runInBand
|
|
1119
|
-
```
|
|
1120
|
-
|
|
1121
|
-
### Comandos Especificos de CI
|
|
1122
|
-
|
|
1123
|
-
```bash
|
|
1124
|
-
# Ejecutar en modo CI (sin colores, cobertura, etc.)
|
|
1125
|
-
npm test -- --ci
|
|
1126
|
-
|
|
1127
|
-
# Ejecutar con max workers
|
|
1128
|
-
npm test -- --maxWorkers=4
|
|
1129
|
-
|
|
1130
|
-
# Detener en primer fallo
|
|
1131
|
-
npm test -- --bail
|
|
1132
|
-
|
|
1133
|
-
# Ejecutar solo archivos modificados (Git)
|
|
1134
|
-
npm test -- --changedSince=main
|
|
1135
|
-
```
|
|
1136
|
-
|
|
1137
|
-
---
|
|
1138
|
-
|
|
1139
|
-
## Solucion de Problemas
|
|
1140
|
-
|
|
1141
|
-
### Problemas Comunes
|
|
1142
|
-
|
|
1143
|
-
| Problema | Solucion |
|
|
1144
|
-
| -------------------- | ---------------------------------------------------- |
|
|
1145
|
-
| Tests timeout | Aumentar `testTimeout` en config o test especifico |
|
|
1146
|
-
| Tests async cuelgan | Asegurar que todas las promesas estan awaited |
|
|
1147
|
-
| Mock no funciona | Verificar que mock esta antes de `require()` |
|
|
1148
|
-
| Cobertura baja | Agregar patrones `--collectCoverageFrom` |
|
|
1149
|
-
| Tests inestables | Verificar estado compartido, usar limpieza `beforeEach` |
|
|
1150
|
-
|
|
1151
|
-
### Debuggeando Tests que Cuelgan
|
|
1152
|
-
|
|
1153
|
-
```javascript
|
|
1154
|
-
// Agregar timeout a test especifico
|
|
1155
|
-
test('operacion lenta', async () => {
|
|
1156
|
-
// ...
|
|
1157
|
-
}, 60000); // 60 segundos de timeout
|
|
1158
|
-
|
|
1159
|
-
// Debug con salida de consola
|
|
1160
|
-
test('debug test', async () => {
|
|
1161
|
-
console.log('Paso 1');
|
|
1162
|
-
await step1();
|
|
1163
|
-
console.log('Paso 2');
|
|
1164
|
-
await step2();
|
|
1165
|
-
console.log('Listo');
|
|
1166
|
-
});
|
|
1167
|
-
```
|
|
1168
|
-
|
|
1169
|
-
### Arreglando Problemas de Mock
|
|
1170
|
-
|
|
1171
|
-
```javascript
|
|
1172
|
-
// Incorrecto: Mock despues de require
|
|
1173
|
-
const myModule = require('./myModule');
|
|
1174
|
-
jest.mock('./myModule');
|
|
1175
|
-
|
|
1176
|
-
// Correcto: Mock antes de require
|
|
1177
|
-
jest.mock('./myModule');
|
|
1178
|
-
const myModule = require('./myModule');
|
|
1179
|
-
|
|
1180
|
-
// O usar jest.doMock para mocking dinamico
|
|
1181
|
-
beforeEach(() => {
|
|
1182
|
-
jest.resetModules();
|
|
1183
|
-
jest.doMock('./myModule', () => ({
|
|
1184
|
-
func: jest.fn().mockReturnValue('mocked'),
|
|
1185
|
-
}));
|
|
1186
|
-
});
|
|
1187
|
-
```
|
|
1188
|
-
|
|
1189
|
-
### Resolviendo Problemas de Cobertura
|
|
1190
|
-
|
|
1191
|
-
```javascript
|
|
1192
|
-
// Cobertura no recolecta? Verificar paths
|
|
1193
|
-
module.exports = {
|
|
1194
|
-
collectCoverageFrom: [
|
|
1195
|
-
// Usar paths relativos desde raiz del proyecto
|
|
1196
|
-
'src/**/*.js',
|
|
1197
|
-
// Patrones de exclusion
|
|
1198
|
-
'!**/node_modules/**',
|
|
1199
|
-
],
|
|
1200
|
-
// Directorios raiz para buscar
|
|
1201
|
-
roots: ['<rootDir>'],
|
|
1202
|
-
};
|
|
1203
|
-
```
|
|
1204
|
-
|
|
1205
|
-
---
|
|
1206
|
-
|
|
1207
|
-
## Documentacion Relacionada
|
|
1208
|
-
|
|
1209
|
-
- [Guia de Quality Gates](./quality-gates.md) - Chequeos automatizados de calidad
|
|
1210
|
-
- [Arquitectura CI/CD](../../architecture/ci-cd.md) - Configuracion de pipeline
|
|
1211
|
-
- [Guia de Contribucion](../../how-to-contribute-with-pull-requests.md) - Workflow de desarrollo
|
|
1212
|
-
|
|
1213
|
-
---
|
|
1214
|
-
|
|
1215
|
-
_Guia de Testing de SINAPSE v4_
|