sinapse-ai 1.19.1 → 1.20.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/.claude/CLAUDE.md +2 -2
- package/.claude/hooks/enforce-delegation.cjs +32 -36
- package/.claude/rules/agent-handoff.md +10 -21
- package/.claude/rules/mandatory-delegation.md +1 -1
- package/.claude/rules/token-economy.md +12 -5
- package/.sinapse-ai/constitution.md +2 -0
- package/.sinapse-ai/core/atlas/flows-pt.js +6 -0
- package/.sinapse-ai/core/atlas/flows.js +7 -0
- package/.sinapse-ai/core/atlas/render-markdown.js +8 -0
- package/.sinapse-ai/core/doctor/checks/constitution-consistency.js +7 -0
- package/.sinapse-ai/core/execution/autonomous-build-loop.js +10 -4
- package/.sinapse-ai/core/execution/build-orchestrator.js +104 -2
- package/.sinapse-ai/core/execution/context-injector.js +2 -0
- package/.sinapse-ai/core/execution/parallel-executor.js +2 -0
- package/.sinapse-ai/core/execution/parallel-monitor.js +2 -0
- package/.sinapse-ai/core/execution/rate-limit-manager.js +2 -0
- package/.sinapse-ai/core/execution/result-aggregator.js +2 -0
- package/.sinapse-ai/core/execution/semantic-merge-engine.js +2 -0
- package/.sinapse-ai/core/execution/wave-executor.js +2 -0
- package/.sinapse-ai/core/health-check/checks/project/constitution-consistency.js +12 -1
- package/.sinapse-ai/core/orchestration/cli-commands.js +121 -4
- package/.sinapse-ai/core/orchestration/executors/epic-4-executor.js +25 -4
- package/.sinapse-ai/core/orchestration/executors/epic-6-executor.js +53 -2
- package/.sinapse-ai/core/orchestration/gate-evaluator.js +78 -3
- package/.sinapse-ai/core/orchestration/index.js +3 -0
- package/.sinapse-ai/core/orchestration/master-orchestrator.js +116 -18
- package/.sinapse-ai/core/synapse/context/context-tracker.js +118 -11
- package/.sinapse-ai/core/synapse/engine.js +18 -3
- package/.sinapse-ai/core/synapse/layers/l0-constitution.js +189 -8
- package/.sinapse-ai/core/synapse/output/formatter.js +65 -25
- package/.sinapse-ai/core-config.yaml +8 -1
- package/.sinapse-ai/data/entity-registry.yaml +69 -68
- package/.sinapse-ai/development/agents/developer.md +18 -34
- package/.sinapse-ai/development/agents/snps-orqx.md +5 -5
- package/.sinapse-ai/development/agents/sprint-lead.md +20 -36
- package/.sinapse-ai/development/scripts/agent-exit-hooks.js +13 -4
- package/.sinapse-ai/infrastructure/integrations/ai-providers/README.md +2 -2
- package/.sinapse-ai/install-manifest.yaml +73 -73
- package/.sinapse-ai/product/templates/activation-instructions-template.md +72 -185
- package/.sinapse-ai/product/templates/ide-rules/claude-rules.md +45 -274
- package/.sinapse-ai/product/templates/statusline/agent-badges.json +2 -2
- package/.sinapse-ai/product/templates/statusline/statusline-script.js +5 -3
- package/.sinapse-ai/workflow-intelligence/engine/wave-analyzer.js +8 -0
- package/CHANGELOG.md +42 -1
- package/README.md +10 -0
- package/bin/cli.js +29 -0
- package/bin/commands/help.js +5 -0
- package/bin/commands/uninstall.js +5 -0
- package/bin/postinstall.js +7 -0
- package/bin/sinapse.js +149 -1
- package/docs/framework/atlas/OPERATING-ATLAS.md +3 -3
- package/docs/framework/atlas/atlas-data.json +6 -6
- package/docs/framework/atlas/atlas.html +2 -2
- package/docs/framework/source-tree.md +1 -1
- package/docs/framework/workflow-engine-status.md +70 -0
- package/docs/guides/ade-guide.md +4 -2
- package/docs/guides/api-reference.md +2 -0
- package/docs/guides/permission-modes.md +2 -0
- package/docs/guides/user-guide.md +21 -7
- package/docs/guides/workflows/AUTO-WORKTREE-WORKFLOW.md +2 -2
- package/docs/pt/architecture/ade-architecture.md +2 -0
- package/docs/pt/architecture/high-level-architecture.md +1 -1
- package/docs/pt/guides/ade-guide.md +4 -2
- package/docs/pt/guides/api-reference.md +2 -0
- package/docs/pt/guides/permission-modes.md +2 -0
- package/docs/pt/guides/user-guide.md +21 -7
- package/docs/pt/platforms/claude-code.md +2 -2
- package/docs/sinapse-workflows/auto-worktree-workflow.md +2 -2
- package/package.json +1 -1
- package/packages/installer/src/config/configure-environment.js +6 -0
- package/packages/installer/src/config/templates/core-config-template.js +43 -1
- package/packages/installer/src/installer/synapse-runtime-installer.js +148 -0
- package/packages/installer/src/wizard/i18n.js +294 -0
- package/packages/installer/src/wizard/index.js +26 -0
- package/packages/installer/src/wizard/validation/troubleshooting-system.js +60 -131
- package/scripts/bracket-report.js +103 -0
- package/scripts/validate-agent-codenames.js +168 -37
- package/scripts/validate-install-docs.js +23 -2
- package/sinapse/agents/sinapse-orqx.md +3 -3
- package/sinapse/agents/snps-orqx.md +3 -3
- package/sinapse/knowledge-base/routing-catalog.md +1 -1
- package/sinapse/tasks/diagnose-and-route.md +1 -1
- package/squads/claude-code-mastery/CHANGELOG.md +1 -1
- package/squads/claude-code-mastery/README.md +6 -6
- package/squads/claude-code-mastery/agents/claude-mastery-chief.md +7 -7
- package/squads/claude-code-mastery/agents/roadmap-sentinel.md +9 -9
- package/squads/claude-code-mastery/agents/swarm-orqx.md +5 -5
- package/squads/claude-code-mastery/data/claude-code-quick-ref.yaml +1 -1
- package/squads/claude-code-mastery/knowledge-base/claude-code-internals-deep.md +4 -4
- package/squads/claude-code-mastery/knowledge-base/claude-code-internals-reference.md +4 -4
- package/squads/claude-code-mastery/tasks/create-agent-definition.md +6 -6
- package/squads/claude-code-mastery/tasks/create-team-topology.md +3 -3
- package/squads/claude-code-mastery/tasks/diagnose.md +1 -1
- package/squads/claude-code-mastery/tasks/parallel-decomposition.md +1 -1
- package/squads/claude-code-mastery/tasks/worktree-strategy.md +1 -1
- package/squads/squad-animations/README.md +1 -1
- package/squads/squad-animations/agents/animation-interpreter.md +5 -5
- package/squads/squad-animations/agents/animations-orqx.md +6 -6
- package/squads/squad-animations/squad.yaml +1 -1
- package/squads/squad-animations/tasks/analyze-reference-animation.md +1 -1
- package/squads/squad-animations/tasks/build-animation-brief.md +1 -1
- package/squads/squad-animations/tasks/create-animation-storyboard.md +1 -1
- package/squads/squad-animations/tasks/cross-reference-brand-system.md +1 -1
- package/squads/squad-animations/tasks/extract-animation-intent.md +1 -1
- package/squads/squad-animations/tasks/generate-motion-vocabulary.md +1 -1
- package/squads/squad-animations/tasks/identify-website-animation.md +1 -1
- package/squads/squad-animations/tasks/interpret-animation-prompt.md +1 -1
- package/squads/squad-animations/tasks/refine-animation-specification.md +1 -1
- package/squads/squad-animations/tasks/translate-feeling-to-parameters.md +1 -1
- package/squads/squad-animations/tasks/validate-animation-feasibility.md +1 -1
- package/squads/squad-animations/workflows/prompt-to-animation-cycle.yaml +2 -2
- package/squads/squad-brand/agents/brand-auditor.md +1 -1
- package/squads/squad-brand/agents/brand-compiler.md +1 -1
- package/squads/squad-brand/agents/brand-motion-vfx.md +5 -5
- 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/squad.yaml +1 -1
- package/squads/squad-brand/tasks/create-animation-library.md +1 -1
- package/squads/squad-brand/tasks/create-brand-characters.md +2 -2
- package/squads/squad-brand/tasks/create-event-branding.md +2 -2
- package/squads/squad-brand/tasks/create-micro-interactions.md +1 -1
- package/squads/squad-brand/tasks/create-page-transitions.md +1 -1
- package/squads/squad-brand/tasks/create-video-templates.md +1 -1
- package/squads/squad-brand/tasks/create-web-templates.md +1 -1
- package/squads/squad-brand/tasks/define-motion-language.md +1 -1
- package/squads/squad-brand/tasks/design-dynamic-identity-system.md +2 -2
- package/squads/squad-brand/tasks/design-illustration-system.md +1 -1
- package/squads/squad-commercial/README.md +3 -3
- package/squads/squad-commercial/agents/commercial-orqx.md +8 -8
- package/squads/squad-commercial/agents/cs-crm-specialist.md +3 -3
- package/squads/squad-commercial/agents/cs-revops-analyst.md +3 -3
- package/squads/squad-commercial/agents/cs-sales-closer.md +1 -1
- package/squads/squad-commercial/knowledge-base/commercial-analytics-reporting.md +7 -7
- package/squads/squad-commercial/knowledge-base/sales-revenue-master-reference.md +1 -1
- package/squads/squad-commercial/squad.yaml +3 -3
- package/squads/squad-commercial/tasks/analyze-revenue-leaks.md +2 -2
- package/squads/squad-commercial/tasks/audit-commercial-tech-stack.md +1 -1
- package/squads/squad-commercial/tasks/audit-crm-data.md +1 -1
- package/squads/squad-commercial/tasks/build-deal-scoring-model.md +1 -1
- package/squads/squad-commercial/tasks/build-forecasting-model.md +1 -1
- package/squads/squad-commercial/tasks/build-pipeline-dashboard.md +2 -2
- package/squads/squad-commercial/tasks/build-unit-economics-model.md +1 -1
- package/squads/squad-commercial/tasks/conduct-commercial-retrospective.md +2 -2
- package/squads/squad-commercial/tasks/conduct-deal-review.md +1 -1
- package/squads/squad-commercial/tasks/conduct-win-loss-analysis.md +1 -1
- package/squads/squad-commercial/tasks/configure-activity-tracking.md +1 -1
- package/squads/squad-commercial/tasks/configure-crm-integrations.md +1 -1
- package/squads/squad-commercial/tasks/configure-pipeline-stages.md +1 -1
- package/squads/squad-commercial/tasks/coordinate-revenue-cycle.md +1 -1
- package/squads/squad-commercial/tasks/create-commercial-brief.md +2 -2
- package/squads/squad-commercial/tasks/create-revenue-dashboard.md +1 -1
- package/squads/squad-commercial/tasks/design-lead-routing.md +1 -1
- package/squads/squad-commercial/tasks/design-quota-model.md +1 -1
- package/squads/squad-commercial/tasks/execute-save-play.md +1 -1
- package/squads/squad-commercial/tasks/manage-commercial-handoffs.md +1 -1
- package/squads/squad-commercial/tasks/manage-pipeline-forecast.md +3 -3
- package/squads/squad-commercial/tasks/monitor-pipeline-health.md +1 -1
- package/squads/squad-commercial/tasks/monitor-saas-metrics.md +1 -1
- package/squads/squad-commercial/tasks/plan-sales-capacity.md +1 -1
- package/squads/squad-commercial/tasks/plan-territory-mapping.md +1 -1
- package/squads/squad-commercial/tasks/review-revenue-architecture.md +2 -2
- package/squads/squad-commercial/tasks/run-quarterly-commercial-review.md +3 -3
- package/squads/squad-commercial/tasks/select-commercial-workflow.md +1 -1
- package/squads/squad-commercial/tasks/setup-outreach-sequences.md +1 -1
- package/squads/squad-commercial/templates/offer-brief-template.md +2 -2
- package/squads/squad-commercial/workflows/new-offer-launch.yaml +2 -2
- package/squads/squad-commercial/workflows/quarterly-commercial-review.yaml +1 -1
- package/squads/squad-commercial/workflows/revenue-forecasting-cycle.yaml +2 -2
- package/squads/squad-content/README.md +1 -1
- package/squads/squad-content/agents/content-analyst.md +4 -4
- package/squads/squad-content/agents/content-engineer.md +2 -2
- package/squads/squad-content/agents/content-governor.md +1 -1
- package/squads/squad-content/agents/content-orqx.md +6 -6
- package/squads/squad-content/agents/editorial-strategist.md +5 -5
- package/squads/squad-content/agents/platform-specialist.md +1 -1
- package/squads/squad-content/agents/signal-intelligence.md +4 -4
- package/squads/squad-content/checklists/editorial-planning-checklist.md +1 -1
- package/squads/squad-content/checklists/onboarding-setup-checklist.md +2 -2
- package/squads/squad-content/knowledge-base/ai-native-content-loop.md +2 -2
- package/squads/squad-content/knowledge-base/content-governance-principles.md +2 -2
- package/squads/squad-content/knowledge-base/cross-squad-integration-protocol.md +1 -1
- package/squads/squad-content/knowledge-base/signal-intelligence-v2.md +1 -1
- package/squads/squad-content/knowledge-base/task-ownership-map.md +5 -5
- package/squads/squad-content/squad.yaml +2 -2
- package/squads/squad-content/tasks/alert-opportunity-windows.md +6 -6
- package/squads/squad-content/tasks/analyze-content-performance.md +2 -2
- package/squads/squad-content/tasks/batch-content-production.md +1 -1
- package/squads/squad-content/tasks/benchmark-against-competitors.md +1 -1
- package/squads/squad-content/tasks/coordinate-cross-squad.md +1 -1
- package/squads/squad-content/tasks/create-content-governance.md +1 -1
- package/squads/squad-content/tasks/create-editorial-calendar.md +1 -1
- package/squads/squad-content/tasks/curate-ugc-signals.md +2 -2
- package/squads/squad-content/tasks/define-big-idea.md +1 -1
- package/squads/squad-content/tasks/define-content-kpis.md +1 -1
- package/squads/squad-content/tasks/flag-content-for-amplification.md +2 -2
- package/squads/squad-content/tasks/generate-content-report.md +3 -3
- package/squads/squad-content/tasks/manage-content-sprint.md +1 -1
- package/squads/squad-content/tasks/measure-content-roi.md +3 -3
- package/squads/squad-content/tasks/orchestrate-content-pipeline.md +2 -2
- package/squads/squad-content/tasks/plan-content-sprint.md +3 -3
- package/squads/squad-content/tasks/predict-content-performance.md +2 -2
- package/squads/squad-content/tasks/scan-daily-signals.md +2 -2
- package/squads/squad-content/tasks/triage-content-requests.md +1 -1
- package/squads/squad-content/tasks/triage-urgent-signal.md +1 -1
- package/squads/squad-content/templates/signal-alert-template.md +2 -2
- package/squads/squad-content/templates/weekly-briefing-template.md +1 -1
- package/squads/squad-content/workflows/content-audit-cycle.yaml +1 -1
- package/squads/squad-content/workflows/content-creation-cycle.yaml +3 -3
- package/squads/squad-content/workflows/editorial-planning-cycle.yaml +3 -3
- package/squads/squad-content/workflows/onboarding-content-cycle.yaml +3 -3
- package/squads/squad-content/workflows/performance-feedback-loop.yaml +3 -3
- package/squads/squad-content/workflows/signal-to-content-cycle.yaml +5 -5
- package/squads/squad-copy/README.md +4 -4
- package/squads/squad-copy/agents/ad-copywriter.md +4 -4
- package/squads/squad-copy/agents/copy-orqx.md +3 -3
- package/squads/squad-copy/agents/copy-strategist.md +5 -5
- package/squads/squad-copy/agents/direct-response-writer.md +3 -3
- package/squads/squad-copy/agents/email-sequence-strategist.md +1 -1
- package/squads/squad-copy/agents/funnel-copywriter.md +3 -3
- package/squads/squad-copy/agents/headline-specialist.md +1 -1
- package/squads/squad-copy/agents/proof-architect.md +3 -3
- package/squads/squad-copy/squad.yaml +3 -3
- package/squads/squad-copy/tasks/build-proof-stack.md +3 -3
- package/squads/squad-copy/tasks/craft-cta-variations.md +2 -2
- package/squads/squad-copy/tasks/craft-email-nurture-sequence.md +2 -2
- package/squads/squad-copy/tasks/craft-objection-handlers.md +1 -1
- package/squads/squad-copy/tasks/craft-social-media-hooks.md +1 -1
- package/squads/squad-copy/tasks/create-cart-abandonment-sequence.md +2 -2
- package/squads/squad-copy/tasks/create-customer-story.md +2 -2
- package/squads/squad-copy/tasks/create-email-campaign.md +2 -2
- package/squads/squad-copy/tasks/create-mechanism-copy.md +4 -4
- package/squads/squad-copy/tasks/create-opening-hooks.md +1 -1
- package/squads/squad-copy/tasks/create-ugc-script.md +2 -2
- package/squads/squad-copy/tasks/create-urgency-scarcity-framework.md +1 -1
- package/squads/squad-copy/tasks/create-welcome-sequence.md +2 -2
- package/squads/squad-copy/tasks/design-headline-ab-tests.md +1 -1
- package/squads/squad-copy/tasks/design-trigger-sequence.md +1 -1
- package/squads/squad-copy/tasks/design-welcome-series.md +2 -2
- package/squads/squad-copy/tasks/optimize-existing-copy.md +2 -2
- package/squads/squad-copy/tasks/optimize-funnel-conversion-copy.md +2 -2
- package/squads/squad-copy/tasks/optimize-pricing-framing.md +2 -2
- package/squads/squad-copy/tasks/write-ad-copy-google.md +2 -2
- package/squads/squad-copy/tasks/write-ad-copy-social.md +2 -2
- package/squads/squad-copy/tasks/write-ad-copy-variations.md +4 -4
- package/squads/squad-copy/tasks/write-case-study.md +2 -2
- package/squads/squad-copy/tasks/write-comparison-piece.md +2 -2
- package/squads/squad-copy/tasks/write-email-sequence.md +1 -1
- package/squads/squad-copy/tasks/write-email-subject-lines.md +1 -1
- package/squads/squad-copy/tasks/write-funnel-copy-sequence.md +4 -4
- package/squads/squad-copy/tasks/write-landing-page-copy.md +2 -2
- package/squads/squad-copy/tasks/write-launch-sequence.md +2 -2
- package/squads/squad-copy/tasks/write-opt-in-page.md +2 -2
- package/squads/squad-copy/tasks/write-product-narrative.md +2 -2
- package/squads/squad-copy/tasks/write-retargeting-copy.md +2 -2
- package/squads/squad-copy/tasks/write-sales-letter.md +1 -1
- package/squads/squad-copy/tasks/write-social-proof-section.md +1 -1
- package/squads/squad-copy/tasks/write-subheadlines-and-deck-copy.md +1 -1
- package/squads/squad-copy/tasks/write-upsell-copy.md +2 -2
- package/squads/squad-copy/tasks/write-vsl-script.md +3 -3
- package/squads/squad-copy/tasks/write-whitepaper-persuasive.md +2 -2
- package/squads/squad-copy/workflows/campaign-copy-cycle.yaml +4 -4
- package/squads/squad-copy/workflows/conversion-copy-sprint.yaml +6 -6
- package/squads/squad-copy/workflows/sales-copy-pipeline.yaml +4 -4
- package/squads/squad-design/README.md +6 -6
- package/squads/squad-design/agents/cro-persuasion.md +3 -3
- package/squads/squad-design/agents/design-orqx.md +17 -17
- package/squads/squad-design/agents/dx-accessibility-specialist.md +5 -5
- package/squads/squad-design/agents/dx-design-system-architect.md +8 -8
- package/squads/squad-design/agents/dx-frontend-engineer.md +7 -7
- package/squads/squad-design/agents/dx-interaction-designer.md +6 -6
- package/squads/squad-design/agents/dx-performance-engineer.md +3 -3
- package/squads/squad-design/agents/dx-ui-designer.md +7 -7
- package/squads/squad-design/agents/dx-ux-strategist.md +7 -7
- package/squads/squad-design/agents/platform-aesthetic-director.md +11 -11
- package/squads/squad-design/agents/premium-packaging-strategist.md +2 -2
- package/squads/squad-design/agents/product-surface-director.md +1 -1
- package/squads/squad-design/squad.yaml +6 -6
- package/squads/squad-design/tasks/analyze-javascript-bundles.md +1 -1
- package/squads/squad-design/tasks/audit-core-web-vitals.md +1 -1
- package/squads/squad-design/tasks/audit-design-system-health.md +1 -1
- package/squads/squad-design/tasks/audit-motion-performance.md +1 -1
- package/squads/squad-design/tasks/certify-accessibility-compliance.md +2 -2
- package/squads/squad-design/tasks/compose-screen-layouts.md +3 -3
- package/squads/squad-design/tasks/conduct-competitive-ux-analysis.md +1 -1
- package/squads/squad-design/tasks/conduct-dx-quality-gate.md +3 -3
- package/squads/squad-design/tasks/conduct-usability-heuristic-review.md +1 -1
- package/squads/squad-design/tasks/conduct-visual-qa.md +1 -1
- package/squads/squad-design/tasks/conduct-wcag-audit.md +1 -1
- package/squads/squad-design/tasks/configure-cdn-strategy.md +1 -1
- package/squads/squad-design/tasks/configure-token-export-pipeline.md +1 -1
- package/squads/squad-design/tasks/create-a11y-remediation-plan.md +4 -4
- package/squads/squad-design/tasks/create-color-system.md +2 -2
- package/squads/squad-design/tasks/create-component-governance.md +1 -1
- package/squads/squad-design/tasks/create-component-tokens.md +2 -2
- package/squads/squad-design/tasks/create-dark-light-themes.md +3 -3
- package/squads/squad-design/tasks/create-easing-curve-library.md +1 -1
- package/squads/squad-design/tasks/create-empty-error-states.md +1 -1
- package/squads/squad-design/tasks/create-error-boundary-patterns.md +1 -1
- package/squads/squad-design/tasks/create-illustration-style.md +1 -1
- package/squads/squad-design/tasks/create-mobile-first-designs.md +2 -2
- package/squads/squad-design/tasks/create-motion-documentation.md +1 -1
- package/squads/squad-design/tasks/create-motion-tokens.md +2 -2
- package/squads/squad-design/tasks/create-primitive-tokens.md +1 -1
- package/squads/squad-design/tasks/create-responsive-grid-system.md +1 -1
- package/squads/squad-design/tasks/create-screen-reader-specs.md +1 -1
- package/squads/squad-design/tasks/create-scroll-animation-patterns.md +1 -1
- package/squads/squad-design/tasks/create-semantic-tokens.md +1 -1
- package/squads/squad-design/tasks/create-storybook-documentation-standards.md +1 -1
- package/squads/squad-design/tasks/create-user-personas.md +1 -1
- package/squads/squad-design/tasks/create-ux-principles.md +1 -1
- package/squads/squad-design/tasks/create-wireframe-brief.md +2 -2
- package/squads/squad-design/tasks/define-atomic-hierarchy.md +2 -2
- package/squads/squad-design/tasks/define-content-hierarchy.md +2 -2
- package/squads/squad-design/tasks/define-motion-principles.md +4 -4
- package/squads/squad-design/tasks/define-performance-budgets.md +1 -1
- package/squads/squad-design/tasks/define-token-taxonomy.md +2 -2
- package/squads/squad-design/tasks/design-accessible-form-patterns.md +2 -2
- package/squads/squad-design/tasks/design-component-api-contracts.md +3 -3
- package/squads/squad-design/tasks/design-component-visual-states.md +4 -4
- package/squads/squad-design/tasks/design-dashboard-layouts.md +1 -1
- package/squads/squad-design/tasks/design-duration-scale.md +1 -1
- package/squads/squad-design/tasks/design-feedback-animations.md +2 -2
- package/squads/squad-design/tasks/design-focus-management.md +1 -1
- package/squads/squad-design/tasks/design-form-patterns.md +2 -2
- package/squads/squad-design/tasks/design-icon-system.md +1 -1
- package/squads/squad-design/tasks/design-information-architecture.md +2 -2
- package/squads/squad-design/tasks/design-landing-page-ui.md +3 -3
- package/squads/squad-design/tasks/design-loading-choreography.md +1 -1
- package/squads/squad-design/tasks/design-multi-brand-theming.md +1 -1
- package/squads/squad-design/tasks/design-page-transitions.md +1 -1
- package/squads/squad-design/tasks/design-spacing-scale.md +3 -3
- package/squads/squad-design/tasks/design-typography-scale.md +3 -3
- package/squads/squad-design/tasks/design-user-flows.md +2 -2
- package/squads/squad-design/tasks/design-visual-hierarchy.md +2 -2
- package/squads/squad-design/tasks/eliminate-render-blocking.md +1 -1
- package/squads/squad-design/tasks/extract-critical-css.md +1 -1
- package/squads/squad-design/tasks/govern-third-party-scripts.md +1 -1
- package/squads/squad-design/tasks/implement-authentication-ui.md +1 -1
- package/squads/squad-design/tasks/implement-component-library.md +4 -4
- package/squads/squad-design/tasks/implement-form-system.md +2 -2
- package/squads/squad-design/tasks/implement-reduced-motion.md +3 -3
- package/squads/squad-design/tasks/implement-responsive-layouts.md +1 -1
- package/squads/squad-design/tasks/implement-routing-strategy.md +1 -1
- package/squads/squad-design/tasks/map-dark-mode-tokens.md +3 -3
- package/squads/squad-design/tasks/map-user-journeys.md +2 -2
- package/squads/squad-design/tasks/migrate-legacy-design-system.md +1 -1
- package/squads/squad-design/tasks/monitor-performance-regression.md +1 -1
- package/squads/squad-design/tasks/optimize-font-loading.md +1 -1
- package/squads/squad-design/tasks/optimize-image-pipeline.md +1 -1
- package/squads/squad-design/tasks/orchestrate-dx-pipeline.md +2 -2
- package/squads/squad-design/tasks/plan-ux-research-sprint.md +1 -1
- package/squads/squad-design/tasks/produce-design-handoff-specs.md +4 -4
- package/squads/squad-design/tasks/review-aria-patterns.md +1 -1
- package/squads/squad-design/tasks/setup-performance-ci-gates.md +1 -1
- package/squads/squad-design/tasks/setup-storybook-integration.md +1 -1
- package/squads/squad-design/tasks/spec-gesture-interactions.md +1 -1
- package/squads/squad-design/tasks/spec-micro-interactions.md +2 -2
- package/squads/squad-design/tasks/synthesize-user-research.md +2 -2
- package/squads/squad-design/tasks/test-keyboard-navigation.md +1 -1
- package/squads/squad-design/tasks/validate-ux-with-testing.md +1 -1
- package/squads/squad-design/tasks/verify-color-contrast.md +2 -2
- package/squads/squad-design/templates/a11y-audit-report-template.md +1 -1
- package/squads/squad-design/templates/design-handoff-template.md +1 -1
- package/squads/squad-design/templates/performance-budget-template.md +1 -1
- package/squads/squad-design/templates/ux-research-plan-template.md +1 -1
- package/squads/squad-design/workflows/a11y-compliance-cycle.yaml +8 -8
- package/squads/squad-design/workflows/design-system-build-cycle.yaml +12 -12
- package/squads/squad-design/workflows/landing-page-sprint.yaml +10 -10
- package/squads/squad-design/workflows/performance-remediation-cycle.yaml +6 -6
- package/squads/squad-design/workflows/ux-research-sprint.yaml +8 -8
- package/squads/squad-design/workflows/zero-to-digital-product-cycle.yaml +16 -16
- package/squads/squad-finance/README.md +1 -1
- package/squads/squad-finance/agents/budget-controller.md +1 -1
- package/squads/squad-finance/agents/cost-optimizer.md +2 -2
- package/squads/squad-finance/agents/finance-orqx.md +4 -4
- package/squads/squad-finance/agents/fiscal-compliance-br.md +4 -4
- package/squads/squad-finance/agents/forecast-strategist.md +6 -6
- package/squads/squad-finance/agents/pricing-strategist.md +3 -3
- package/squads/squad-finance/agents/profitability-analyst.md +1 -1
- package/squads/squad-finance/agents/revenue-analyst.md +1 -1
- package/squads/squad-finance/checklists/monthly-close-checklist.md +1 -1
- package/squads/squad-finance/checklists/quarterly-review-checklist.md +1 -1
- package/squads/squad-finance/squad.yaml +2 -2
- package/squads/squad-finance/tasks/analyze-price-sensitivity.md +1 -1
- package/squads/squad-finance/tasks/benchmark-competitor-pricing.md +1 -1
- package/squads/squad-finance/tasks/calculate-rate-card.md +1 -1
- package/squads/squad-finance/tasks/coordinate-quarterly-review.md +2 -2
- package/squads/squad-finance/tasks/create-proposal-pricing.md +1 -1
- package/squads/squad-finance/tasks/design-service-tiers.md +1 -1
- package/squads/squad-finance/tasks/design-value-based-pricing.md +1 -1
- package/squads/squad-finance/tasks/manage-financial-calendar.md +1 -1
- package/squads/squad-finance/tasks/model-pricing-scenario.md +1 -1
- package/squads/squad-finance/tasks/optimize-rate-realization.md +1 -1
- package/squads/squad-finance/tasks/simulate-pricing-impact.md +1 -1
- package/squads/squad-finance/tasks/track-pricing-performance.md +1 -1
- package/squads/squad-paidmedia/README.md +4 -4
- package/squads/squad-paidmedia/agents/campaign-analyst.md +6 -6
- package/squads/squad-paidmedia/agents/creative-strategist.md +2 -2
- package/squads/squad-paidmedia/agents/cro-specialist.md +5 -5
- package/squads/squad-paidmedia/agents/google-ads-specialist.md +2 -2
- package/squads/squad-paidmedia/agents/meta-ads-specialist.md +6 -6
- package/squads/squad-paidmedia/agents/paidmedia-orqx.md +6 -6
- package/squads/squad-paidmedia/agents/performance-engineer.md +2 -2
- package/squads/squad-paidmedia/agents/pm-creative-performance-analyst.md +2 -2
- package/squads/squad-paidmedia/knowledge-base/routing-catalog.md +21 -21
- package/squads/squad-paidmedia/squad.yaml +4 -4
- package/squads/squad-paidmedia/tasks/allocate-cross-channel-budget.md +1 -1
- package/squads/squad-paidmedia/tasks/allocate-meta-budget.md +2 -2
- package/squads/squad-paidmedia/tasks/analyze-audience-performance.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-content-performance.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-conversion-funnel.md +2 -2
- package/squads/squad-paidmedia/tasks/analyze-creative-effectiveness.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-keyword-rankings.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-landing-page.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-local-keywords.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-local-market.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-reviews-strategy.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-top-pages.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-traffic-sources.md +1 -1
- package/squads/squad-paidmedia/tasks/analyze-user-behavior.md +1 -1
- package/squads/squad-paidmedia/tasks/audit-conversion-tracking.md +1 -1
- package/squads/squad-paidmedia/tasks/audit-gmb-location.md +1 -1
- package/squads/squad-paidmedia/tasks/audit-meta-ads-account.md +1 -1
- package/squads/squad-paidmedia/tasks/audit-sitemap-health.md +1 -1
- package/squads/squad-paidmedia/tasks/build-audience-architecture.md +2 -2
- package/squads/squad-paidmedia/tasks/build-creative-scorecard.md +1 -1
- package/squads/squad-paidmedia/tasks/calculate-sample-size.md +1 -1
- package/squads/squad-paidmedia/tasks/check-indexing-status.md +1 -1
- package/squads/squad-paidmedia/tasks/create-scaling-roadmap.md +1 -1
- package/squads/squad-paidmedia/tasks/design-campaign-structure.md +2 -2
- package/squads/squad-paidmedia/tasks/design-progressive-profiling.md +1 -1
- package/squads/squad-paidmedia/tasks/detect-creative-fatigue.md +1 -1
- package/squads/squad-paidmedia/tasks/execute-launch-checklist.md +1 -1
- package/squads/squad-paidmedia/tasks/generate-monthly-report.md +1 -1
- package/squads/squad-paidmedia/tasks/generate-search-performance-overview.md +1 -1
- package/squads/squad-paidmedia/tasks/generate-weekly-summary.md +1 -1
- package/squads/squad-paidmedia/tasks/manage-pixel-capi-health.md +1 -1
- package/squads/squad-paidmedia/tasks/manage-scaling-roadmap.md +1 -1
- package/squads/squad-paidmedia/tasks/measure-activation-rate.md +1 -1
- package/squads/squad-paidmedia/tasks/optimize-ad-set-targeting.md +2 -2
- package/squads/squad-paidmedia/tasks/optimize-form-conversion.md +1 -1
- package/squads/squad-paidmedia/tasks/optimize-onboarding-activation.md +1 -1
- package/squads/squad-paidmedia/tasks/optimize-page-conversion.md +1 -1
- package/squads/squad-paidmedia/tasks/optimize-signup-flow.md +1 -1
- package/squads/squad-paidmedia/tasks/plan-customer-engagement.md +1 -1
- package/squads/squad-paidmedia/tasks/run-ab-test.md +1 -1
- package/squads/squad-paidmedia/tasks/run-creative-test.md +1 -1
- package/squads/squad-paidmedia/tasks/track-gmb-performance-trends.md +1 -1
- package/squads/squad-paidmedia/tasks/triage-campaign-issues.md +1 -1
- package/squads/squad-product/README.md +2 -2
- package/squads/squad-product/agents/product-orqx.md +4 -4
- package/squads/squad-product/agents/ps-delivery-manager.md +2 -2
- package/squads/squad-product/agents/ps-product-ops-specialist.md +2 -2
- package/squads/squad-product/squad.yaml +2 -2
- package/squads/squad-product/tasks/audit-product-tool-stack.md +1 -1
- package/squads/squad-product/tasks/build-product-knowledge-base.md +1 -1
- package/squads/squad-product/tasks/calculate-sprint-velocity.md +1 -1
- package/squads/squad-product/tasks/configure-feature-flag-rollout.md +1 -1
- package/squads/squad-product/tasks/create-product-artifact-template.md +1 -1
- package/squads/squad-product/tasks/create-product-onboarding-runbook.md +3 -3
- package/squads/squad-product/tasks/create-product-playbook.md +2 -2
- package/squads/squad-product/tasks/document-product-process.md +1 -1
- package/squads/squad-product/tasks/execute-feature-launch-checklist.md +1 -1
- package/squads/squad-product/tasks/facilitate-sprint-retrospective.md +1 -1
- package/squads/squad-product/tasks/generate-product-health-report.md +2 -2
- package/squads/squad-product/tasks/maintain-decision-log-system.md +1 -1
- package/squads/squad-product/tasks/manage-sprint-capacity-planning.md +1 -1
- package/squads/squad-product/tasks/map-cross-functional-dependencies.md +1 -1
- package/squads/squad-product/tasks/prepare-product-handoff-package.md +4 -4
- package/squads/squad-product/tasks/run-product-operations-audit.md +1 -1
- package/squads/squad-product/tasks/run-shape-up-betting-table.md +1 -1
- package/squads/squad-product/tasks/run-sprint-planning-session.md +1 -1
- package/squads/squad-product/tasks/scope-agency-mvp.md +1 -1
- package/squads/squad-product/tasks/setup-new-client-product-operations.md +1 -1
- package/squads/squad-product/tasks/standardize-cross-client-metrics.md +1 -1
- package/squads/squad-product/tasks/triage-technical-debt-backlog.md +1 -1
- package/squads/squad-product/tasks/write-release-notes.md +1 -1
- package/squads/squad-research/README.md +3 -3
- package/squads/squad-research/agents/audience-intelligence.md +9 -9
- package/squads/squad-research/agents/competitive-intelligence.md +1 -1
- package/squads/squad-research/agents/data-synthesizer.md +11 -11
- package/squads/squad-research/agents/deep-researcher.md +2 -2
- package/squads/squad-research/agents/market-analyst.md +9 -9
- package/squads/squad-research/agents/research-orqx.md +4 -4
- package/squads/squad-research/agents/trend-forecaster.md +2 -2
- package/squads/squad-research/knowledge-base/agentic-second-brain-reference.md +1 -1
- package/squads/squad-research/knowledge-base/community-platforms-reference.md +1 -1
- package/squads/squad-research/knowledge-base/cross-squad-integration-protocol.md +1 -1
- package/squads/squad-research/knowledge-base/multi-agent-research-methodology.md +3 -3
- package/squads/squad-research/squad.yaml +3 -3
- package/squads/squad-research/tasks/analyze-audience-behavior.md +2 -2
- package/squads/squad-research/tasks/analyze-audience-psychographics.md +2 -2
- package/squads/squad-research/tasks/analyze-competitor-pricing.md +1 -1
- package/squads/squad-research/tasks/analyze-industry-trends.md +2 -2
- package/squads/squad-research/tasks/analyze-macro-forces.md +1 -1
- package/squads/squad-research/tasks/analyze-pricing-landscape.md +2 -2
- package/squads/squad-research/tasks/analyze-social-listening.md +2 -2
- package/squads/squad-research/tasks/analyze-value-chain.md +2 -2
- package/squads/squad-research/tasks/answer-strategic-question.md +1 -1
- package/squads/squad-research/tasks/assess-market-maturity.md +2 -2
- package/squads/squad-research/tasks/build-audience-persona.md +2 -2
- package/squads/squad-research/tasks/build-data-narrative.md +2 -2
- package/squads/squad-research/tasks/compile-competitive-dossier.md +2 -2
- package/squads/squad-research/tasks/conduct-deep-research.md +1 -1
- package/squads/squad-research/tasks/conduct-jobs-to-be-done.md +2 -2
- package/squads/squad-research/tasks/create-empathy-map.md +2 -2
- package/squads/squad-research/tasks/create-executive-briefing.md +2 -2
- package/squads/squad-research/tasks/create-insight-deck.md +2 -2
- package/squads/squad-research/tasks/create-research-dossier.md +1 -1
- package/squads/squad-research/tasks/create-research-repository.md +2 -2
- package/squads/squad-research/tasks/create-swot-analysis.md +4 -4
- package/squads/squad-research/tasks/design-survey.md +2 -2
- package/squads/squad-research/tasks/evaluate-market-entry.md +2 -2
- package/squads/squad-research/tasks/evaluate-regulatory-landscape.md +2 -2
- package/squads/squad-research/tasks/forecast-industry-trends.md +2 -2
- package/squads/squad-research/tasks/forecast-market-growth.md +2 -2
- package/squads/squad-research/tasks/generate-actionable-recommendations.md +2 -2
- package/squads/squad-research/tasks/identify-market-segments.md +3 -3
- package/squads/squad-research/tasks/map-audience-ecosystem.md +2 -2
- package/squads/squad-research/tasks/map-audience-journey.md +2 -2
- package/squads/squad-research/tasks/map-industry-ecosystem.md +2 -2
- package/squads/squad-research/tasks/map-market-opportunity.md +2 -2
- package/squads/squad-research/tasks/map-pain-gain-matrix.md +2 -2
- package/squads/squad-research/tasks/map-strategic-implications.md +2 -2
- package/squads/squad-research/tasks/orchestrate-research-pipeline.md +4 -4
- package/squads/squad-research/tasks/predict-market-shifts.md +1 -1
- package/squads/squad-research/tasks/profile-ideal-customer.md +2 -2
- package/squads/squad-research/tasks/run-porter-five-forces.md +1 -1
- package/squads/squad-research/tasks/run-scenario-planning.md +1 -1
- package/squads/squad-research/tasks/segment-audience.md +2 -2
- package/squads/squad-research/tasks/size-market-tam-sam-som.md +2 -2
- package/squads/squad-research/tasks/synthesize-multi-source.md +1 -1
- package/squads/squad-research/tasks/synthesize-research-report.md +2 -2
- package/squads/squad-research/tasks/validate-persona-with-data.md +2 -2
- package/squads/squad-research/tasks/visualize-research-data.md +2 -2
- package/squads/squad-research/templates/audience-persona-template.md +1 -1
- package/squads/squad-research/templates/competitive-dossier-template.md +1 -1
- package/squads/squad-research/templates/market-analysis-template.md +1 -1
- package/squads/squad-research/workflows/audience-intelligence-cycle.yaml +12 -12
- package/squads/squad-research/workflows/competitive-intelligence-cycle.yaml +2 -2
- package/squads/squad-research/workflows/deep-research-cycle.yaml +2 -2
- package/squads/squad-research/workflows/full-research-sprint.yaml +8 -8
- package/squads/squad-research/workflows/market-analysis-cycle.yaml +12 -12
- package/squads/squad-research/workflows/trend-forecasting-cycle.yaml +2 -2
- package/.sinapse-ai/lib/build.json +0 -1
|
@@ -52,6 +52,9 @@ try {
|
|
|
52
52
|
* @param {number} [options.epic] - Start from specific epic (AC5)
|
|
53
53
|
* @param {boolean} [options.dryRun] - Preview without execution (AC6)
|
|
54
54
|
* @param {boolean} [options.strict] - Enable strict gate mode
|
|
55
|
+
* @param {'spec'|'plan'} [options.phaseLimit] - Stop after the given phase
|
|
56
|
+
* (Story onda2-p3): 'spec' runs Epic 3 only; 'plan' runs Epics 3+4 with a
|
|
57
|
+
* plan-only build. Both stop BEFORE build/QA.
|
|
55
58
|
* @param {string} [options.projectRoot] - Project root path
|
|
56
59
|
* @returns {Promise<Object>} Command result
|
|
57
60
|
*/
|
|
@@ -70,6 +73,16 @@ async function orchestrate(storyId, options = {}) {
|
|
|
70
73
|
console.log(chalk.cyan.bold(` 🚀 SINAPSE Orchestrator: ${storyId}`));
|
|
71
74
|
console.log(chalk.cyan('═══════════════════════════════════════════════════════════\n'));
|
|
72
75
|
|
|
76
|
+
if (options.phaseLimit) {
|
|
77
|
+
console.log(
|
|
78
|
+
chalk.yellow(
|
|
79
|
+
options.phaseLimit === 'spec'
|
|
80
|
+
? '📝 Phase limit: SPEC — generates the real spec, stops before plan/build/QA.\n'
|
|
81
|
+
: '🗺️ Phase limit: PLAN — generates real spec + plan, stops before build/QA.\n',
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
73
86
|
// Dry run mode (AC6)
|
|
74
87
|
if (options.dryRun) {
|
|
75
88
|
return await orchestrateDryRun(storyId, options);
|
|
@@ -80,6 +93,7 @@ async function orchestrate(storyId, options = {}) {
|
|
|
80
93
|
storyId,
|
|
81
94
|
strictGates: options.strict ?? false,
|
|
82
95
|
dashboardAutoUpdate: true,
|
|
96
|
+
phaseLimit: options.phaseLimit || null,
|
|
83
97
|
});
|
|
84
98
|
|
|
85
99
|
// Start dashboard
|
|
@@ -105,9 +119,14 @@ async function orchestrate(storyId, options = {}) {
|
|
|
105
119
|
// Display final result
|
|
106
120
|
displayResult(result);
|
|
107
121
|
|
|
122
|
+
// Phase-limited runs (Story onda2-p3): show where the real artifacts landed.
|
|
123
|
+
if (options.phaseLimit) {
|
|
124
|
+
displayPhaseArtifacts(result, options.phaseLimit);
|
|
125
|
+
}
|
|
126
|
+
|
|
108
127
|
return {
|
|
109
128
|
success: result.success,
|
|
110
|
-
exitCode: result
|
|
129
|
+
exitCode: computeExitCode(result),
|
|
111
130
|
result,
|
|
112
131
|
};
|
|
113
132
|
} catch (error) {
|
|
@@ -120,6 +139,80 @@ async function orchestrate(storyId, options = {}) {
|
|
|
120
139
|
}
|
|
121
140
|
}
|
|
122
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Execute the spec phase only (Story onda2-p3, audit AF-20260702 item 2.3).
|
|
144
|
+
*
|
|
145
|
+
* Thin subcommand over the SAME pipeline as `orchestrate` — runs Epic 3 (Spec)
|
|
146
|
+
* and stops BEFORE plan/build/QA. This is the hybrid's measured value (a real,
|
|
147
|
+
* quality spec for ONE story) exposed as its own product surface.
|
|
148
|
+
*
|
|
149
|
+
* @param {string} storyId - Story ID
|
|
150
|
+
* @param {Object} options - Same options as orchestrate (minus phaseLimit)
|
|
151
|
+
* @returns {Promise<Object>} Command result
|
|
152
|
+
*/
|
|
153
|
+
async function spec(storyId, options = {}) {
|
|
154
|
+
return orchestrate(storyId, { ...options, phaseLimit: 'spec' });
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Execute the spec + plan phases only (Story onda2-p3, audit AF-20260702 item 2.3).
|
|
159
|
+
*
|
|
160
|
+
* Thin subcommand over the SAME pipeline as `orchestrate` — runs Epic 3 (Spec)
|
|
161
|
+
* and Epic 4 in plan-only mode (real implementation plan, persisted
|
|
162
|
+
* story-scoped), and stops BEFORE build/QA.
|
|
163
|
+
*
|
|
164
|
+
* @param {string} storyId - Story ID
|
|
165
|
+
* @param {Object} options - Same options as orchestrate (minus phaseLimit)
|
|
166
|
+
* @returns {Promise<Object>} Command result
|
|
167
|
+
*/
|
|
168
|
+
async function plan(storyId, options = {}) {
|
|
169
|
+
return orchestrate(storyId, { ...options, phaseLimit: 'plan' });
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Map a finalized pipeline result to a process exit code.
|
|
174
|
+
*
|
|
175
|
+
* Story onda2-p3 (audit AF-20260702 item 2.2): PASS_QA_SKIPPED exits 0 — a good
|
|
176
|
+
* build whose QA could not run for INFRASTRUCTURE reasons (nested `claude`
|
|
177
|
+
* spawn failing on Windows) must not exit as a failure; the warning carries the
|
|
178
|
+
* "QA not executed" caveat. Real failures stay 1, blocked stays 2.
|
|
179
|
+
*
|
|
180
|
+
* @param {Object} result - Finalized pipeline result
|
|
181
|
+
* @returns {number} Exit code
|
|
182
|
+
* @private
|
|
183
|
+
*/
|
|
184
|
+
function computeExitCode(result) {
|
|
185
|
+
if (result.success) return 0;
|
|
186
|
+
if (result.verdict === 'PASS_QA_SKIPPED') return 0;
|
|
187
|
+
return result.blocked ? 2 : 1;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Print the real artifacts a phase-limited run produced (spec/plan paths).
|
|
192
|
+
* @param {Object} result - Finalized pipeline result (carries state.epics)
|
|
193
|
+
* @param {'spec'|'plan'} phaseLimit
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
function displayPhaseArtifacts(result, phaseLimit) {
|
|
197
|
+
const epics = result.state?.epics || {};
|
|
198
|
+
const specPath = epics[3]?.result?.specPath;
|
|
199
|
+
const planPath = epics[4]?.result?.planPath;
|
|
200
|
+
|
|
201
|
+
if (specPath) {
|
|
202
|
+
console.log(chalk.green(`📝 Spec: ${specPath}`));
|
|
203
|
+
}
|
|
204
|
+
if (phaseLimit === 'plan' && planPath) {
|
|
205
|
+
console.log(chalk.green(`🗺️ Plan: ${planPath}`));
|
|
206
|
+
}
|
|
207
|
+
if (specPath || (phaseLimit === 'plan' && planPath)) {
|
|
208
|
+
console.log(
|
|
209
|
+
chalk.gray(
|
|
210
|
+
`\nNext: review the artifact${phaseLimit === 'plan' ? 's' : ''}, then implement (natively or via sinapse orchestrate).\n`,
|
|
211
|
+
),
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
123
216
|
/**
|
|
124
217
|
* Dry run orchestration (AC6)
|
|
125
218
|
* @private
|
|
@@ -143,10 +236,12 @@ async function orchestrateDryRun(storyId, options) {
|
|
|
143
236
|
const epicConfig = orchestrator.constructor.EPIC_CONFIG;
|
|
144
237
|
const startEpic = options.epic || 3;
|
|
145
238
|
|
|
146
|
-
// Use dynamic epic list from config (excludes onDemand epics like Epic 5)
|
|
239
|
+
// Use dynamic epic list from config (excludes onDemand epics like Epic 5).
|
|
240
|
+
// Phase-limited runs (Story onda2-p3) preview only their own sequence.
|
|
241
|
+
const allowedEpics = MasterOrchestrator.phaseLimitSequence(options.phaseLimit || null);
|
|
147
242
|
const epicNums = Object.keys(epicConfig)
|
|
148
243
|
.map(Number)
|
|
149
|
-
.filter((num) => !epicConfig[num].onDemand)
|
|
244
|
+
.filter((num) => !epicConfig[num].onDemand && allowedEpics.includes(num))
|
|
150
245
|
.sort((a, b) => a - b);
|
|
151
246
|
|
|
152
247
|
for (const epicNum of epicNums) {
|
|
@@ -420,7 +515,7 @@ async function orchestrateResume(storyId, options = {}) {
|
|
|
420
515
|
|
|
421
516
|
return {
|
|
422
517
|
success: result.success,
|
|
423
|
-
exitCode: result
|
|
518
|
+
exitCode: computeExitCode(result),
|
|
424
519
|
result,
|
|
425
520
|
};
|
|
426
521
|
} catch (error) {
|
|
@@ -472,6 +567,11 @@ function displayResult(result) {
|
|
|
472
567
|
|
|
473
568
|
if (result.success) {
|
|
474
569
|
console.log(chalk.green.bold(' ✅ ORCHESTRATION COMPLETE'));
|
|
570
|
+
} else if (result.verdict === 'PASS_QA_SKIPPED') {
|
|
571
|
+
// Story onda2-p3 (audit AF-20260702 item 2.2): a good build whose QA could
|
|
572
|
+
// not execute (infrastructure — e.g. nested `claude` spawn failing on
|
|
573
|
+
// Windows) is NOT a failure. Never collapse it into FAILED.
|
|
574
|
+
console.log(chalk.yellow.bold(' ✅ BUILD OK — QA SKIPPED (infrastructure limitation)'));
|
|
475
575
|
} else if (result.blocked) {
|
|
476
576
|
console.log(chalk.red.bold(' 🚫 ORCHESTRATION BLOCKED'));
|
|
477
577
|
} else {
|
|
@@ -483,6 +583,13 @@ function displayResult(result) {
|
|
|
483
583
|
console.log(chalk.gray(`\nDuration: ${result.duration || 'N/A'}`));
|
|
484
584
|
console.log(chalk.gray(`Epics Executed: ${result.epics?.executed?.length || 0}`));
|
|
485
585
|
|
|
586
|
+
// Story onda2-p3 (audit AF-20260702 item 2.2): the pipeline's warning was
|
|
587
|
+
// computed but never shown — the one line that explains a red verdict (e.g.
|
|
588
|
+
// "QA ran in STUB mode") stayed hidden. Always surface it.
|
|
589
|
+
if (result.warning) {
|
|
590
|
+
console.log(chalk.yellow(`\n⚠️ ${result.warning}`));
|
|
591
|
+
}
|
|
592
|
+
|
|
486
593
|
if (result.errors?.length > 0) {
|
|
487
594
|
console.log(chalk.red(`\nErrors: ${result.errors.length}`));
|
|
488
595
|
for (const err of result.errors.slice(0, 3)) {
|
|
@@ -570,12 +677,22 @@ module.exports = {
|
|
|
570
677
|
orchestrateStop,
|
|
571
678
|
orchestrateResume,
|
|
572
679
|
|
|
680
|
+
// Story onda2-p3: phase-limited subcommands (spec / spec+plan, no build/QA)
|
|
681
|
+
spec,
|
|
682
|
+
plan,
|
|
683
|
+
|
|
684
|
+
// Exported for tests (Story onda2-p3 — warning visibility + honest verdict)
|
|
685
|
+
displayResult,
|
|
686
|
+
computeExitCode,
|
|
687
|
+
|
|
573
688
|
// Aliases for command parsing
|
|
574
689
|
commands: {
|
|
575
690
|
orchestrate: orchestrate,
|
|
576
691
|
'orchestrate-status': orchestrateStatus,
|
|
577
692
|
'orchestrate-stop': orchestrateStop,
|
|
578
693
|
'orchestrate-resume': orchestrateResume,
|
|
694
|
+
spec: spec,
|
|
695
|
+
plan: plan,
|
|
579
696
|
},
|
|
580
697
|
};
|
|
581
698
|
|
|
@@ -36,7 +36,12 @@ class Epic4Executor extends EpicExecutor {
|
|
|
36
36
|
_getPlanTracker() {
|
|
37
37
|
if (!this._planTracker) {
|
|
38
38
|
try {
|
|
39
|
-
|
|
39
|
+
// Path fix (audit AF-20260702 item 1.11): from executors/ this is 3
|
|
40
|
+
// levels up to .sinapse-ai/, not 2 — the old path resolved to the
|
|
41
|
+
// nonexistent core/infrastructure/. module.exports is an object, so
|
|
42
|
+
// the destructure is required too (a bare require(...) would have
|
|
43
|
+
// made `new PlanTracker(...)` explode on the exports object itself).
|
|
44
|
+
const { PlanTracker } = require('../../../infrastructure/scripts/plan-tracker');
|
|
40
45
|
this._planTracker = PlanTracker;
|
|
41
46
|
} catch (error) {
|
|
42
47
|
this._log(`PlanTracker not available: ${error.message}`, 'warn');
|
|
@@ -113,13 +118,26 @@ class Epic4Executor extends EpicExecutor {
|
|
|
113
118
|
if (this._realExecutionAllowed()) {
|
|
114
119
|
const buildResult = await this._executeViaBuildOrchestrator(storyId, context);
|
|
115
120
|
if (buildResult && buildResult.success) {
|
|
121
|
+
// Honesty invariant (epic: empty-build-honesty): do NOT set
|
|
122
|
+
// `implementationPath = planPath`. A plan path ALWAYS exists and is NOT
|
|
123
|
+
// proof of implementation — the multi-story measurement caught the gate
|
|
124
|
+
// approving an empty build because of exactly this. Surface the REAL files
|
|
125
|
+
// the build touched so the epic4_to_epic6 gate can tell an implementation
|
|
126
|
+
// apart from an empty "success".
|
|
127
|
+
const codeChanges = Array.isArray(buildResult.filesModified)
|
|
128
|
+
? buildResult.filesModified
|
|
129
|
+
: [];
|
|
116
130
|
return this._completeExecution({
|
|
117
|
-
|
|
118
|
-
|
|
131
|
+
// Story onda2-p3: a plan-only run persists the REAL plan story-scoped;
|
|
132
|
+
// prefer that path over the pre-created stub location.
|
|
133
|
+
planPath: buildResult.planPath || planPath,
|
|
134
|
+
...(buildResult.planOnly === true ? { planOnly: true } : {}),
|
|
119
135
|
// F5 (epic: orchestration-consolidation): propagate the real plan object
|
|
120
136
|
// so the downstream epic4_to_epic6 gate can verify it is not degraded/stub.
|
|
121
137
|
plan: buildResult.plan,
|
|
122
138
|
build: buildResult,
|
|
139
|
+
codeChanges,
|
|
140
|
+
filesModified: codeChanges,
|
|
123
141
|
reportPath: buildResult.reportPath,
|
|
124
142
|
phases: buildResult.phases,
|
|
125
143
|
});
|
|
@@ -144,7 +162,10 @@ class Epic4Executor extends EpicExecutor {
|
|
|
144
162
|
return this._stubExecution(
|
|
145
163
|
'Epic 4 stub mode — real build is delegated to BuildOrchestrator outside the test runner',
|
|
146
164
|
{
|
|
147
|
-
|
|
165
|
+
// Honesty invariant (epic: empty-build-honesty): no `implementationPath`
|
|
166
|
+
// here — the plan path is not an implementation. The stub already reports
|
|
167
|
+
// success:false, and `codeChanges` carries whatever real files (if any)
|
|
168
|
+
// the subtasks touched.
|
|
148
169
|
planPath,
|
|
149
170
|
progress,
|
|
150
171
|
subtaskResults,
|
|
@@ -55,6 +55,12 @@ class Epic6Executor extends EpicExecutor {
|
|
|
55
55
|
async execute(context) {
|
|
56
56
|
this._startExecution();
|
|
57
57
|
|
|
58
|
+
// Story onda2-p3 (audit AF-20260702 item 2.2): collect review-agent
|
|
59
|
+
// INVOCATION failures (spawn/CLI errors — infrastructure) separately from
|
|
60
|
+
// review verdicts, so the final result can distinguish "QA could not run"
|
|
61
|
+
// from a real QA rejection.
|
|
62
|
+
this._invocationFailures = [];
|
|
63
|
+
|
|
58
64
|
try {
|
|
59
65
|
const { buildResult, testResults, codeChanges, storyId, techStack } = context;
|
|
60
66
|
|
|
@@ -113,10 +119,26 @@ class Epic6Executor extends EpicExecutor {
|
|
|
113
119
|
|
|
114
120
|
// Honesty invariant (F0a/F7): a QA loop that only ran deterministic basic
|
|
115
121
|
// checks did NOT really review the work — it must report STUB, not success.
|
|
122
|
+
// Story onda2-p3: when the stub is caused by a FAILED agent invocation
|
|
123
|
+
// (spawn error — e.g. nested `claude` exiting 0xC0000142 on Windows), mark
|
|
124
|
+
// it as an infrastructure failure so the pipeline verdict can distinguish
|
|
125
|
+
// "QA not executable here" from a real QA rejection.
|
|
116
126
|
if (!anyRealReview) {
|
|
127
|
+
const invocationFailed =
|
|
128
|
+
Array.isArray(this._invocationFailures) && this._invocationFailures.length > 0;
|
|
117
129
|
return this._stubExecution(
|
|
118
|
-
|
|
119
|
-
|
|
130
|
+
invocationFailed
|
|
131
|
+
? 'QA could not run: review-agent invocation failed (infrastructure error, not a test rejection) — only deterministic basic checks ran'
|
|
132
|
+
: 'QA ran deterministic basic checks only — no real review agent wired',
|
|
133
|
+
{
|
|
134
|
+
...baseResult,
|
|
135
|
+
...(invocationFailed
|
|
136
|
+
? {
|
|
137
|
+
infrastructureFailure: true,
|
|
138
|
+
infrastructureErrors: [...this._invocationFailures],
|
|
139
|
+
}
|
|
140
|
+
: {}),
|
|
141
|
+
},
|
|
120
142
|
);
|
|
121
143
|
}
|
|
122
144
|
|
|
@@ -145,6 +167,9 @@ class Epic6Executor extends EpicExecutor {
|
|
|
145
167
|
const realReview = await this._reviewViaAgent(invokeAgent, context);
|
|
146
168
|
if (realReview) return realReview;
|
|
147
169
|
} catch (error) {
|
|
170
|
+
// Thrown invocation error = the review process itself could not run
|
|
171
|
+
// (spawn/CLI failure) — infrastructure, never a review verdict.
|
|
172
|
+
this._recordInvocationFailure(error.message);
|
|
148
173
|
this._log(`Real review failed, falling back to basic checks: ${error.message}`, 'warn');
|
|
149
174
|
}
|
|
150
175
|
}
|
|
@@ -197,6 +222,13 @@ class Epic6Executor extends EpicExecutor {
|
|
|
197
222
|
|
|
198
223
|
const output = result && (result.output || result.content);
|
|
199
224
|
if (!result || result.success === false || !output || output.trim().length === 0) {
|
|
225
|
+
// The dispatcher reports spawn/CLI failures by RETURNING { success:false,
|
|
226
|
+
// error } (it does not throw) — e.g. "Claude CLI exited with code
|
|
227
|
+
// 3221225794" on Windows. Record it as an infrastructure failure so the
|
|
228
|
+
// verdict never confuses "QA could not run" with a QA rejection.
|
|
229
|
+
if (result && result.success === false && result.error) {
|
|
230
|
+
this._recordInvocationFailure(result.error);
|
|
231
|
+
}
|
|
200
232
|
return null;
|
|
201
233
|
}
|
|
202
234
|
|
|
@@ -210,6 +242,25 @@ class Epic6Executor extends EpicExecutor {
|
|
|
210
242
|
};
|
|
211
243
|
}
|
|
212
244
|
|
|
245
|
+
/**
|
|
246
|
+
* Record a failed review-agent INVOCATION (spawn/CLI error).
|
|
247
|
+
*
|
|
248
|
+
* Story onda2-p3 (audit AF-20260702 item 2.2): this is the signal that lets
|
|
249
|
+
* the final pipeline verdict distinguish "QA could not run" (infrastructure —
|
|
250
|
+
* e.g. the nested `claude` spawn failing on Windows with exit 0xC0000142)
|
|
251
|
+
* from a real QA rejection, which always arrives as a review VERDICT
|
|
252
|
+
* (BLOCKED / NEEDS_REVISION), never through this path.
|
|
253
|
+
*
|
|
254
|
+
* @param {string} message - Invocation error message
|
|
255
|
+
* @private
|
|
256
|
+
*/
|
|
257
|
+
_recordInvocationFailure(message) {
|
|
258
|
+
if (!Array.isArray(this._invocationFailures)) {
|
|
259
|
+
this._invocationFailures = [];
|
|
260
|
+
}
|
|
261
|
+
this._invocationFailures.push(String(message || 'unknown invocation failure'));
|
|
262
|
+
}
|
|
263
|
+
|
|
213
264
|
/**
|
|
214
265
|
* Parse a QA verdict from free-form agent output. Defaults to NEEDS_REVISION
|
|
215
266
|
* (the safe, non-approving default) when no explicit verdict is found.
|
|
@@ -300,6 +300,69 @@ class GateEvaluator {
|
|
|
300
300
|
return null;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Collect the REAL code files an epic actually wrote/modified.
|
|
305
|
+
*
|
|
306
|
+
* Honesty invariant (epic: empty-build-honesty): a plan file is NOT an
|
|
307
|
+
* implementation. This gathers the concrete files touched from `codeChanges` /
|
|
308
|
+
* `filesModified` (and `build.filesModified` when the build result is nested),
|
|
309
|
+
* then EXCLUDES the plan artifact (`planPath` / `implementationPath`) so a build
|
|
310
|
+
* that only produced a plan yields an empty list — and the caller can block it.
|
|
311
|
+
*
|
|
312
|
+
* Entries may be strings or `{ path | file }` objects; blanks and duplicates are
|
|
313
|
+
* dropped. Returns a de-duplicated array of file paths (never the plan itself).
|
|
314
|
+
*
|
|
315
|
+
* @param {Object} epicResult - Result from the source epic
|
|
316
|
+
* @returns {string[]} Real implementation files (plan artifact excluded)
|
|
317
|
+
* @private
|
|
318
|
+
*/
|
|
319
|
+
_collectImplementationFiles(epicResult) {
|
|
320
|
+
if (!epicResult || typeof epicResult !== 'object') {
|
|
321
|
+
return [];
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const resolveSafe = (p) => {
|
|
325
|
+
try {
|
|
326
|
+
return path.resolve(p);
|
|
327
|
+
} catch {
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
// The plan artifact is explicitly NOT an implementation — exclude it.
|
|
333
|
+
const planPaths = new Set(
|
|
334
|
+
[epicResult.planPath, epicResult.implementationPath]
|
|
335
|
+
.filter((p) => typeof p === 'string' && p.trim() !== '')
|
|
336
|
+
.map(resolveSafe)
|
|
337
|
+
.filter(Boolean),
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
const raw = []
|
|
341
|
+
.concat(Array.isArray(epicResult.codeChanges) ? epicResult.codeChanges : [])
|
|
342
|
+
.concat(Array.isArray(epicResult.filesModified) ? epicResult.filesModified : [])
|
|
343
|
+
.concat(
|
|
344
|
+
epicResult.build && Array.isArray(epicResult.build.filesModified)
|
|
345
|
+
? epicResult.build.filesModified
|
|
346
|
+
: [],
|
|
347
|
+
);
|
|
348
|
+
|
|
349
|
+
const files = [];
|
|
350
|
+
for (const entry of raw) {
|
|
351
|
+
const file = typeof entry === 'string' ? entry : entry && (entry.path || entry.file);
|
|
352
|
+
if (typeof file !== 'string' || file.trim() === '') {
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
const resolved = resolveSafe(file);
|
|
356
|
+
if (resolved && planPaths.has(resolved)) {
|
|
357
|
+
continue; // a plan path masquerading as a code change — not implementation
|
|
358
|
+
}
|
|
359
|
+
if (!files.includes(file)) {
|
|
360
|
+
files.push(file);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return files;
|
|
364
|
+
}
|
|
365
|
+
|
|
303
366
|
/**
|
|
304
367
|
* Run a single check
|
|
305
368
|
* @private
|
|
@@ -380,11 +443,23 @@ class GateEvaluator {
|
|
|
380
443
|
break;
|
|
381
444
|
}
|
|
382
445
|
|
|
383
|
-
case 'implementation_exists':
|
|
384
|
-
|
|
385
|
-
|
|
446
|
+
case 'implementation_exists': {
|
|
447
|
+
// Honesty invariant (epic: empty-build-honesty): "implementation exists"
|
|
448
|
+
// MUST mean real code was written — not merely that a PLAN file exists. The
|
|
449
|
+
// multi-story measurement (2026-06-30) caught this gate APPROVING (score 5.0)
|
|
450
|
+
// a build that wrote ZERO code files: the old check trusted
|
|
451
|
+
// `implementationPath`, but epic-4 set that to the PLAN path (which ALWAYS
|
|
452
|
+
// exists), so an empty build slipped through. Base the check on the real list
|
|
453
|
+
// of files touched by the build, excluding the plan artifact itself. Empty
|
|
454
|
+
// build → zero real files → critical fail → gate BLOCKS (empty ≠ success).
|
|
455
|
+
const files = this._collectImplementationFiles(epicResult);
|
|
456
|
+
result.passed = files.length > 0;
|
|
457
|
+
result.message = result.passed
|
|
458
|
+
? `Implementation exists (${files.length} code file(s) changed)`
|
|
459
|
+
: 'No implementation found — build wrote zero code files (plan path is not implementation)';
|
|
386
460
|
result.severity = 'critical';
|
|
387
461
|
break;
|
|
462
|
+
}
|
|
388
463
|
|
|
389
464
|
case 'no_critical_errors': {
|
|
390
465
|
const criticalErrors = (epicResult.errors || []).filter((e) => e.severity === 'critical');
|
|
@@ -204,6 +204,9 @@ module.exports = {
|
|
|
204
204
|
orchestrateStatus: cliCommands.orchestrateStatus,
|
|
205
205
|
orchestrateStop: cliCommands.orchestrateStop,
|
|
206
206
|
orchestrateResume: cliCommands.orchestrateResume,
|
|
207
|
+
// Story onda2-p3: phase-limited subcommands (real spec / spec+plan, no build/QA)
|
|
208
|
+
spec: cliCommands.spec,
|
|
209
|
+
plan: cliCommands.plan,
|
|
207
210
|
|
|
208
211
|
// Story 11.1: Executor Assignment (Projeto Bob)
|
|
209
212
|
ExecutorAssignment,
|
|
@@ -166,6 +166,16 @@ class MasterOrchestrator extends EventEmitter {
|
|
|
166
166
|
this.prdPath = options.prdPath || null;
|
|
167
167
|
this.strictGates = options.strictGates ?? false;
|
|
168
168
|
|
|
169
|
+
// Story onda2-p3 (audit AF-20260702 item 2.3) — phase-limited runs expose the
|
|
170
|
+
// hybrid's MEASURED value (real spec + real plan for ONE story) as their own
|
|
171
|
+
// product surface: 'spec' runs Epic 3 only; 'plan' runs Epics 3+4 with a
|
|
172
|
+
// plan-only build. Both stop BEFORE build/QA. null = full pipeline.
|
|
173
|
+
const phaseLimit = options.phaseLimit || null;
|
|
174
|
+
if (phaseLimit !== null && !['spec', 'plan'].includes(phaseLimit)) {
|
|
175
|
+
throw new Error(`Invalid phaseLimit: ${phaseLimit} (expected 'spec' or 'plan')`);
|
|
176
|
+
}
|
|
177
|
+
this.phaseLimit = phaseLimit;
|
|
178
|
+
|
|
169
179
|
// Callbacks
|
|
170
180
|
this.onEpicStart = options.onEpicStart || this._defaultEpicStart.bind(this);
|
|
171
181
|
this.onEpicComplete = options.onEpicComplete || this._defaultEpicComplete.bind(this);
|
|
@@ -444,9 +454,10 @@ class MasterOrchestrator extends EventEmitter {
|
|
|
444
454
|
this._inFullPipeline = true;
|
|
445
455
|
|
|
446
456
|
try {
|
|
447
|
-
// Execute epics in sequence: 3 → 4 → 6
|
|
457
|
+
// Execute epics in sequence: 3 → 4 → 6 — or a phase-limited prefix
|
|
458
|
+
// (Story onda2-p3): `sinapse spec` → [3], `sinapse plan` → [3, 4].
|
|
448
459
|
// Note: Epic 5 (Recovery) is triggered on-demand, not sequentially
|
|
449
|
-
const epicSequence =
|
|
460
|
+
const epicSequence = MasterOrchestrator.phaseLimitSequence(this.phaseLimit);
|
|
450
461
|
|
|
451
462
|
for (const epicNum of epicSequence) {
|
|
452
463
|
// Check if already completed (for resume scenarios)
|
|
@@ -563,6 +574,40 @@ class MasterOrchestrator extends EventEmitter {
|
|
|
563
574
|
return [3, 4].includes(epicNum);
|
|
564
575
|
}
|
|
565
576
|
|
|
577
|
+
/**
|
|
578
|
+
* Epic sequence for a given phase limit (Story onda2-p3).
|
|
579
|
+
*
|
|
580
|
+
* - 'spec' → [3] (real spec only — stops before plan/build/QA)
|
|
581
|
+
* - 'plan' → [3, 4] (spec + real plan; Epic 4 runs plan-only — stops before build/QA)
|
|
582
|
+
* - null → [3, 4, 6] (full pipeline)
|
|
583
|
+
*
|
|
584
|
+
* Single source of truth shared by the pipeline, the dry-run preview and the
|
|
585
|
+
* CLI so the sequence can never drift between them.
|
|
586
|
+
*
|
|
587
|
+
* @param {'spec'|'plan'|null} phaseLimit
|
|
588
|
+
* @returns {number[]} Epic sequence
|
|
589
|
+
*/
|
|
590
|
+
static phaseLimitSequence(phaseLimit) {
|
|
591
|
+
if (phaseLimit === 'spec') return [3];
|
|
592
|
+
if (phaseLimit === 'plan') return [3, 4];
|
|
593
|
+
return [3, 4, 6];
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Whether this epic is the LAST epic of a phase-limited run. The transition
|
|
598
|
+
* gate after it (e.g. epic4_to_epic6 with its `implementation_exists` check)
|
|
599
|
+
* guards an epic that will NOT run — evaluating it would wrongly block a
|
|
600
|
+
* spec/plan-only result that intentionally produced no implementation files.
|
|
601
|
+
* @param {number} epicNum
|
|
602
|
+
* @returns {boolean}
|
|
603
|
+
* @private
|
|
604
|
+
*/
|
|
605
|
+
_isPhaseLimitTerminalEpic(epicNum) {
|
|
606
|
+
if (!this.phaseLimit) return false;
|
|
607
|
+
const seq = MasterOrchestrator.phaseLimitSequence(this.phaseLimit);
|
|
608
|
+
return epicNum === seq[seq.length - 1];
|
|
609
|
+
}
|
|
610
|
+
|
|
566
611
|
// ═══════════════════════════════════════════════════════════════════════════════════
|
|
567
612
|
// SINGLE EPIC EXECUTION (AC4)
|
|
568
613
|
// ═══════════════════════════════════════════════════════════════════════════════════
|
|
@@ -659,8 +704,18 @@ class MasterOrchestrator extends EventEmitter {
|
|
|
659
704
|
// Evaluate quality gate (Story 0.6) - only in full pipeline mode
|
|
660
705
|
// Skip gate evaluation if result is from stub executor
|
|
661
706
|
// (isStubResult already computed above with the failure-detection guard).
|
|
707
|
+
// Story onda2-p3: also skip for the terminal epic of a phase-limited run —
|
|
708
|
+
// the transition gate guards an epic that will not execute (e.g. the
|
|
709
|
+
// epic4_to_epic6 `implementation_exists` check would wrongly block a
|
|
710
|
+
// plan-only result that intentionally wrote no implementation files).
|
|
662
711
|
let gateResult = null;
|
|
663
|
-
if (
|
|
712
|
+
if (
|
|
713
|
+
this._inFullPipeline &&
|
|
714
|
+
result &&
|
|
715
|
+
result.success !== false &&
|
|
716
|
+
!isStubResult &&
|
|
717
|
+
!this._isPhaseLimitTerminalEpic(epicNum)
|
|
718
|
+
) {
|
|
664
719
|
gateResult = await this._evaluateGate(epicNum, result);
|
|
665
720
|
|
|
666
721
|
// Store gate result if exists
|
|
@@ -824,6 +879,10 @@ class MasterOrchestrator extends EventEmitter {
|
|
|
824
879
|
spec: this.executionState.epics[3]?.result?.specPath,
|
|
825
880
|
complexity: this.executionState.epics[3]?.result?.complexity,
|
|
826
881
|
requirements: this.executionState.epics[3]?.result?.requirements,
|
|
882
|
+
// Story onda2-p3: `sinapse plan` limits Epic 4 to the REAL plan —
|
|
883
|
+
// the BuildOrchestrator stops right after its plan phase (no build
|
|
884
|
+
// loop, no QA, no merge).
|
|
885
|
+
...(this.phaseLimit === 'plan' ? { buildOptions: { planOnly: true } } : {}),
|
|
827
886
|
};
|
|
828
887
|
|
|
829
888
|
case 5: // Recovery (on-demand)
|
|
@@ -1536,27 +1595,66 @@ class MasterOrchestrator extends EventEmitter {
|
|
|
1536
1595
|
// instead of "ORCHESTRATION COMPLETE" / exit 0.
|
|
1537
1596
|
const hasFailures = (pipelineResult.epicsFailed || []).length > 0;
|
|
1538
1597
|
const blocked = this._state === OrchestratorState.BLOCKED;
|
|
1598
|
+
|
|
1599
|
+
// Honesty invariant (epic: orchestration-consolidation, F0a): a pipeline that ran
|
|
1600
|
+
// any epic in STUB mode did NOT really build anything — it must not report success:true.
|
|
1601
|
+
// A failed epic or a non-COMPLETE terminal state is likewise never a success.
|
|
1602
|
+
const success =
|
|
1603
|
+
(pipelineResult.success ?? this._state === OrchestratorState.COMPLETE) &&
|
|
1604
|
+
!hasStubs &&
|
|
1605
|
+
!hasFailures &&
|
|
1606
|
+
!blocked;
|
|
1607
|
+
|
|
1608
|
+
// Story onda2-p3 (audit AF-20260702 item 2.2) — honest Windows verdict:
|
|
1609
|
+
// when the build epics (3 + 4) really ran and the ONLY stub is the QA epic (6)
|
|
1610
|
+
// because the review agent invocation itself failed (nested `claude` spawn —
|
|
1611
|
+
// known Windows limitation, exit 0xC0000142 / STATUS_DLL_INIT_FAILED), the
|
|
1612
|
+
// result is a GOOD build whose QA could not execute — infrastructure, not a
|
|
1613
|
+
// test rejection. Distinguish it (PASS_QA_SKIPPED) instead of collapsing it
|
|
1614
|
+
// into FAILED. `success` stays false (F0a: a stubbed QA is not a full pass);
|
|
1615
|
+
// the verdict + warning carry the distinction to the user.
|
|
1616
|
+
const stubbedList = pipelineResult.epicsStubbed || [];
|
|
1617
|
+
const executedList = pipelineResult.epicsExecuted || [];
|
|
1618
|
+
const qaInfraFailure =
|
|
1619
|
+
this.executionState.epics?.[6]?.result?.infrastructureFailure === true;
|
|
1620
|
+
const qaSkippedInfra =
|
|
1621
|
+
hasStubs &&
|
|
1622
|
+
!hasFailures &&
|
|
1623
|
+
!blocked &&
|
|
1624
|
+
stubbedList.length === 1 &&
|
|
1625
|
+
stubbedList[0] === 6 &&
|
|
1626
|
+
qaInfraFailure &&
|
|
1627
|
+
[3, 4].every((num) => executedList.includes(num));
|
|
1628
|
+
|
|
1629
|
+
const verdict = success
|
|
1630
|
+
? 'PASS'
|
|
1631
|
+
: qaSkippedInfra
|
|
1632
|
+
? 'PASS_QA_SKIPPED'
|
|
1633
|
+
: blocked
|
|
1634
|
+
? 'BLOCKED'
|
|
1635
|
+
: 'FAILED';
|
|
1636
|
+
|
|
1637
|
+
let warning;
|
|
1638
|
+
if (qaSkippedInfra) {
|
|
1639
|
+
warning =
|
|
1640
|
+
'Build succeeded, but the QA step could not run in this environment: the nested review-agent spawn failed (known Windows limitation, exit 0xC0000142). The build output is real — review/QA it manually (see docs/epics/epic-orchestration-consolidation/KNOWN-LIMITATIONS.md).';
|
|
1641
|
+
} else if (hasStubs) {
|
|
1642
|
+
warning =
|
|
1643
|
+
'Pipeline ran one or more epics in STUB mode — no real work was performed for those. This is not a successful build (see epic: orchestration-consolidation).';
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1539
1646
|
return {
|
|
1540
1647
|
workflowId: this.executionState.workflowId,
|
|
1541
1648
|
storyId: this.storyId,
|
|
1542
1649
|
status: this._state,
|
|
1543
1650
|
blocked,
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
(pipelineResult.success ?? this._state === OrchestratorState.COMPLETE) &&
|
|
1549
|
-
!hasStubs &&
|
|
1550
|
-
!hasFailures &&
|
|
1551
|
-
!blocked,
|
|
1651
|
+
success,
|
|
1652
|
+
verdict,
|
|
1653
|
+
qaSkipped: qaSkippedInfra,
|
|
1654
|
+
...(this.phaseLimit ? { phaseLimit: this.phaseLimit } : {}),
|
|
1552
1655
|
mode: hasStubs ? 'stub' : 'real',
|
|
1553
|
-
stubbedEpics:
|
|
1554
|
-
...(
|
|
1555
|
-
? {
|
|
1556
|
-
warning:
|
|
1557
|
-
'Pipeline ran one or more epics in STUB mode — no real work was performed for those. This is not a successful build (see epic: orchestration-consolidation).',
|
|
1558
|
-
}
|
|
1559
|
-
: {}),
|
|
1656
|
+
stubbedEpics: stubbedList,
|
|
1657
|
+
...(warning ? { warning } : {}),
|
|
1560
1658
|
duration: `${minutes}m ${seconds}s`,
|
|
1561
1659
|
durationMs: duration,
|
|
1562
1660
|
techStack: TechStackDetector.getSummary(this.executionState.techStackProfile || {}),
|