sinapse-ai 1.19.2 → 1.20.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 +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-html.js +10 -8
- 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 +73 -2
- 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/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 +10 -2
- package/.sinapse-ai/core/orchestration/executors/epic-6-executor.js +53 -2
- package/.sinapse-ai/core/orchestration/index.js +3 -0
- package/.sinapse-ai/core/orchestration/master-orchestrator.js +116 -18
- package/.sinapse-ai/core/registry/service-registry.json +2 -32
- 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 +492 -246
- package/.sinapse-ai/development/agents/analyst.md +18 -34
- package/.sinapse-ai/development/agents/architect.md +18 -34
- package/.sinapse-ai/development/agents/data-engineer.md +15 -28
- package/.sinapse-ai/development/agents/developer.md +18 -40
- package/.sinapse-ai/development/agents/devops.md +15 -28
- package/.sinapse-ai/development/agents/product-lead.md +18 -34
- package/.sinapse-ai/development/agents/project-lead.md +18 -34
- package/.sinapse-ai/development/agents/quality-gate.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/agents/squad-creator.md +15 -27
- package/.sinapse-ai/development/agents/ux-design-expert.md +15 -27
- package/.sinapse-ai/development/scripts/agent-exit-hooks.js +13 -4
- package/.sinapse-ai/development/scripts/populate-entity-registry.js +3 -0
- package/.sinapse-ai/development/tasks/execute-epic-plan.md +0 -4
- package/.sinapse-ai/development/workflows/epic-orchestration.yaml +0 -1
- package/.sinapse-ai/git-hooks/lib/staged-secret-scan.js +3 -1
- package/.sinapse-ai/infrastructure/integrations/ai-providers/README.md +2 -2
- package/.sinapse-ai/install-manifest.yaml +94 -126
- 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/personalized-agent-template.md +3 -5
- 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/index.js +3 -21
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +50 -2
- package/README.md +10 -0
- package/bin/cli.js +29 -0
- package/bin/commands/help.js +5 -0
- package/bin/commands/install.js +5 -4
- package/bin/commands/uninstall.js +5 -0
- package/bin/lib/command-generator.js +4 -4
- package/bin/lib/fs-utils.js +18 -0
- package/bin/lib/setup-statusline.js +3 -1
- package/bin/modules/chrome-brain-installer.js +5 -3
- package/bin/modules/mcp-installer.js +3 -6
- package/bin/postinstall.js +9 -1
- package/bin/sinapse-init.js +8 -9
- package/bin/sinapse.js +152 -2
- package/bin/utils/staged-secret-scan.js +3 -1
- package/docs/framework/atlas/OPERATING-ATLAS.md +3 -3
- package/docs/framework/atlas/atlas-data.json +27 -27
- package/docs/framework/atlas/atlas.html +12 -10
- package/docs/framework/source-tree.md +2 -3
- 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 +14 -6
- package/packages/installer/src/config/templates/core-config-template.js +43 -1
- package/packages/installer/src/installer/brownfield-upgrader.js +5 -3
- package/packages/installer/src/installer/file-hasher.js +29 -21
- package/packages/installer/src/installer/manifest-signature.js +61 -49
- package/packages/installer/src/installer/post-install-validator.js +24 -17
- package/packages/installer/src/installer/synapse-runtime-installer.js +148 -0
- package/packages/installer/src/merger/parsers/markdown-section-parser.js +3 -2
- package/packages/installer/src/updater/index.js +7 -1
- package/packages/installer/src/utils/atomic-write.js +35 -0
- package/packages/installer/src/wizard/i18n.js +294 -0
- package/packages/installer/src/wizard/index.js +31 -3
- package/packages/installer/src/wizard/validation/troubleshooting-system.js +60 -131
- package/packages/sinapse-install/src/capabilities/chrome-brain.js +5 -3
- package/packages/sinapse-install/src/installer.js +3 -1
- package/packages/sinapse-install/src/utils/atomic-write.js +67 -0
- package/scripts/apply-persona-disclaimer.js +2 -1
- package/scripts/bracket-report.js +103 -0
- package/scripts/sinapse-patch.js +2 -1
- package/scripts/sync-squad-yaml-components.js +2 -1
- package/scripts/validate-agent-codenames.js +168 -37
- package/scripts/validate-agents-md.js +2 -1
- package/scripts/validate-article-xi.js +10 -8
- package/scripts/validate-install-docs.js +23 -2
- package/scripts/validate-no-external-refs.js +14 -8
- 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 +10 -15
- package/squads/claude-code-mastery/agents/config-engineer.md +5 -12
- package/squads/claude-code-mastery/agents/hooks-architect.md +5 -11
- package/squads/claude-code-mastery/agents/mcp-integrator.md +5 -12
- package/squads/claude-code-mastery/agents/project-integrator.md +5 -12
- package/squads/claude-code-mastery/agents/roadmap-sentinel.md +14 -21
- package/squads/claude-code-mastery/agents/skill-craftsman.md +5 -11
- package/squads/claude-code-mastery/agents/swarm-orqx.md +20 -33
- 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/core/execution/context-injector.js +0 -537
- package/.sinapse-ai/core/execution/parallel-executor.js +0 -299
- package/.sinapse-ai/core/execution/parallel-monitor.js +0 -430
- package/.sinapse-ai/core/execution/semantic-merge-engine.js +0 -1748
- package/.sinapse-ai/core/execution/wave-executor.js +0 -401
- package/.sinapse-ai/development/tasks/waves.md +0 -205
- package/.sinapse-ai/lib/build.json +0 -1
- package/.sinapse-ai/workflow-intelligence/engine/wave-analyzer.js +0 -684
package/bin/cli.js
CHANGED
|
@@ -29,6 +29,11 @@ const KNOWN_COMMANDS = [
|
|
|
29
29
|
'ideate',
|
|
30
30
|
'agents',
|
|
31
31
|
'chrome-brain',
|
|
32
|
+
// Story onda2-p3 (audit AF-20260702 item 2.4) — the orchestration engine,
|
|
33
|
+
// reachable from the canonical binary users actually install.
|
|
34
|
+
'orchestrate',
|
|
35
|
+
'spec',
|
|
36
|
+
'plan',
|
|
32
37
|
'help',
|
|
33
38
|
];
|
|
34
39
|
const {
|
|
@@ -160,6 +165,30 @@ function runRouter() {
|
|
|
160
165
|
cmdDoctor(doctorOpts).catch(e => { logger.error(`${RED}Erro no doctor:${NC} ${e.message}`); process.exit(1); });
|
|
161
166
|
break;
|
|
162
167
|
}
|
|
168
|
+
case 'orchestrate':
|
|
169
|
+
case 'spec':
|
|
170
|
+
case 'plan': {
|
|
171
|
+
// Story onda2-p3 (audit AF-20260702 item 2.4) — the orchestration engine
|
|
172
|
+
// (the one capability validated by the HYBRID verdict) was unreachable
|
|
173
|
+
// from the canonical binary: users who install as the README teaches
|
|
174
|
+
// (`npx sinapse-ai ...`) never discover bin/sinapse.js. Delegates via
|
|
175
|
+
// spawnSync to bin/sinapse.js, which owns the arg parsing — same
|
|
176
|
+
// single-source-of-truth pattern as `init` (cli→sinapse) and the
|
|
177
|
+
// S1/#321 `agents`/`ideate` delegation (sinapse→cli).
|
|
178
|
+
const { spawnSync } = require('child_process');
|
|
179
|
+
const result = spawnSync(
|
|
180
|
+
process.execPath,
|
|
181
|
+
[path.join(__dirname, 'sinapse.js'), ...args],
|
|
182
|
+
{ stdio: 'inherit' },
|
|
183
|
+
);
|
|
184
|
+
if (result.error) {
|
|
185
|
+
logger.error(`${RED}Erro no ${command}:${NC} ${result.error.message}`);
|
|
186
|
+
logger.error(`Tente: ${CYAN}npx sinapse-ai ${command} --help${NC}`);
|
|
187
|
+
process.exit(1);
|
|
188
|
+
}
|
|
189
|
+
process.exit(result.status ?? 0);
|
|
190
|
+
}
|
|
191
|
+
// eslint-disable-next-line no-fallthrough -- process.exit above terminates; same pattern as `init`.
|
|
163
192
|
case 'chrome-brain': {
|
|
164
193
|
// Story 10.13 — chrome-brain is the canonical sub-capability for browser
|
|
165
194
|
// automation. Delegating to the shared chrome-brain-installer module keeps
|
package/bin/commands/help.js
CHANGED
|
@@ -19,6 +19,11 @@ function cmdHelp() {
|
|
|
19
19
|
logger.always('');
|
|
20
20
|
logger.always(` ${DIM}Funciona em CI / ambientes não-interativos (usa defaults sensatos).${NC}`);
|
|
21
21
|
logger.always('');
|
|
22
|
+
logger.always(`${BOLD}Motor de orquestração (avançado — 1 story por vez):${NC}\n`);
|
|
23
|
+
logger.always(` ${CYAN}npx sinapse-ai spec <story-id>${NC} Gera a spec REAL de uma story (para antes de plano/build/QA)`);
|
|
24
|
+
logger.always(` ${CYAN}npx sinapse-ai plan <story-id>${NC} Spec + plano de implementação REAL (para antes de build/QA)`);
|
|
25
|
+
logger.always(` ${CYAN}npx sinapse-ai orchestrate <story-id>${NC} Pipeline completo de 1 story (${DIM}--dry-run pra prever${NC})`);
|
|
26
|
+
logger.always('');
|
|
22
27
|
logger.always(`${BOLD}Diagnóstico:${NC}\n`);
|
|
23
28
|
logger.always(` ${CYAN}npx sinapse-ai status${NC} Mostra estado da instalação`);
|
|
24
29
|
logger.always(` ${CYAN}npx sinapse-ai doctor${NC} Roda health checks (--fix --dry-run --json --deep)`);
|
package/bin/commands/install.js
CHANGED
|
@@ -27,6 +27,7 @@ const {
|
|
|
27
27
|
copyDirSync,
|
|
28
28
|
rmDirSync,
|
|
29
29
|
syncDirSync,
|
|
30
|
+
atomicWriteFileSync,
|
|
30
31
|
toForwardSlash,
|
|
31
32
|
} = require('../lib/fs-utils');
|
|
32
33
|
const {
|
|
@@ -112,7 +113,7 @@ async function cmdInstallGlobal(opts = {}) {
|
|
|
112
113
|
}
|
|
113
114
|
if (!parseFailed) {
|
|
114
115
|
settings.language = language === 'pt' ? 'portuguese' : 'english';
|
|
115
|
-
|
|
116
|
+
atomicWriteFileSync(claudeSettingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
116
117
|
}
|
|
117
118
|
} catch { /* non-critical */ }
|
|
118
119
|
|
|
@@ -587,7 +588,7 @@ function installFatalPhases({ squads, squadsDir, isUpsert, llmChoice, existing,
|
|
|
587
588
|
if (isUpsert) {
|
|
588
589
|
meta.updatedAt = nowIso;
|
|
589
590
|
}
|
|
590
|
-
|
|
591
|
+
atomicWriteFileSync(path.join(SINAPSE_HOME, 'metadata.json'), JSON.stringify(meta, null, 2));
|
|
591
592
|
|
|
592
593
|
return { writtenAgents, totalAgents, totalDelta, squadsRefreshed, squadsAdded, meta };
|
|
593
594
|
}
|
|
@@ -735,14 +736,14 @@ function createLauncher() {
|
|
|
735
736
|
exec claude --add-dir "${sinapsePathForBash}" --agent sinapse-orqx "$@"
|
|
736
737
|
`;
|
|
737
738
|
const bashPath = path.join(BIN_DIR, 'sinapse');
|
|
738
|
-
|
|
739
|
+
atomicWriteFileSync(bashPath, bashLauncher);
|
|
739
740
|
try { fs.chmodSync(bashPath, 0o755); } catch { /* chmod is best-effort (no-op on non-POSIX) */ }
|
|
740
741
|
logger.always(` ${GREEN}OK${NC} ~/bin/sinapse`);
|
|
741
742
|
|
|
742
743
|
// Windows CMD launcher
|
|
743
744
|
if (IS_WIN) {
|
|
744
745
|
const cmdLauncher = '@echo off\r\nclaude --add-dir "%USERPROFILE%\\.sinapse" --agent sinapse-orqx %*\r\n';
|
|
745
|
-
|
|
746
|
+
atomicWriteFileSync(path.join(BIN_DIR, 'sinapse.cmd'), cmdLauncher);
|
|
746
747
|
logger.always(` ${GREEN}OK${NC} ~/bin/sinapse.cmd`);
|
|
747
748
|
}
|
|
748
749
|
}
|
|
@@ -183,6 +183,11 @@ async function cmdUninstall(opts = {}) {
|
|
|
183
183
|
[path.join(HOME, '.claude', 'commands', 'SINAPSE'), '~/.claude/commands/SINAPSE/'],
|
|
184
184
|
[path.join(BIN_DIR, 'sinapse'), '~/bin/sinapse'],
|
|
185
185
|
[path.join(BIN_DIR, 'sinapse.cmd'), '~/bin/sinapse.cmd'],
|
|
186
|
+
// Story onda2-p9 — project-level context-engine runtime at cwd (parity
|
|
187
|
+
// with runUninstall in bin/sinapse.js). Fully SINAPSE-generated
|
|
188
|
+
// (constitution derived from .sinapse-ai/constitution.md + sessions/
|
|
189
|
+
// metrics runtime state); regenerated by any future install.
|
|
190
|
+
[path.join(process.cwd(), '.synapse'), './.synapse/ (context engine runtime)'],
|
|
186
191
|
];
|
|
187
192
|
|
|
188
193
|
for (const [p, label] of ownedItems) {
|
|
@@ -11,7 +11,7 @@ const path = require('path');
|
|
|
11
11
|
|
|
12
12
|
const { SINAPSE_HOME, CLAUDE_COMMANDS_DIR, ROOT } = require('./constants');
|
|
13
13
|
const { extractAgentMeta } = require('./squads');
|
|
14
|
-
const { toForwardSlash } = require('./fs-utils');
|
|
14
|
+
const { toForwardSlash, atomicWriteFileSync } = require('./fs-utils');
|
|
15
15
|
|
|
16
16
|
// Framework "core" agents (developer, architect, quality-gate, devops, …) live
|
|
17
17
|
// OUTSIDE the squads/ tree, under .sinapse-ai/development/agents/*.md. `scripts/
|
|
@@ -239,7 +239,7 @@ function regenerateAgentCommands(deps = {}) {
|
|
|
239
239
|
const agentId = file.replace('.md', '');
|
|
240
240
|
const meta = extractAgentMeta(path.join(agentsDir, file));
|
|
241
241
|
const cmdContent = generateCommandMd(agentId, meta.name, meta.icon, squad.name, squadPath, file);
|
|
242
|
-
|
|
242
|
+
atomicWriteFileSync(path.join(commandsDir, `${agentId}.md`), cmdContent);
|
|
243
243
|
writtenAgents.add(file);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -254,7 +254,7 @@ function regenerateAgentCommands(deps = {}) {
|
|
|
254
254
|
const meta = extractAgentMeta(path.join(masterAgentsDir, file));
|
|
255
255
|
const squadPath = `${sinapseBase}/sinapse`;
|
|
256
256
|
const cmdContent = generateCommandMd(agentId, meta.name, meta.icon, 'sinapse', squadPath, file);
|
|
257
|
-
|
|
257
|
+
atomicWriteFileSync(path.join(commandsDir, `${agentId}.md`), cmdContent);
|
|
258
258
|
writtenAgents.add(file);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -274,7 +274,7 @@ function regenerateAgentCommands(deps = {}) {
|
|
|
274
274
|
for (const [id, personaFile] of masterEntryPoints) {
|
|
275
275
|
const personaPath = `${masterSquadPath}/agents/${personaFile}`;
|
|
276
276
|
const stub = generateMasterStub(id, personaPath, masterSquadPath, squads);
|
|
277
|
-
|
|
277
|
+
atomicWriteFileSync(path.join(commandsDir, `${id}.md`), stub);
|
|
278
278
|
writtenAgents.add(`${id}.md`);
|
|
279
279
|
}
|
|
280
280
|
}
|
package/bin/lib/fs-utils.js
CHANGED
|
@@ -97,6 +97,23 @@ function syncDirSync(src, dest, delta = { added: 0, updated: 0, unchanged: 0, re
|
|
|
97
97
|
return delta;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
// atomicWriteFileSync — Onda B2 (AF-20260703): tmp+rename via the canonical
|
|
101
|
+
// core util so a crash or concurrent reader never sees a torn config file.
|
|
102
|
+
// Fail-open: if the util can't be loaded, fall back to a plain write (the
|
|
103
|
+
// pre-hardening behavior) rather than breaking the installer.
|
|
104
|
+
let _atomicWriteSync = null;
|
|
105
|
+
try {
|
|
106
|
+
_atomicWriteSync = require('../../.sinapse-ai/core/synapse/utils/atomic-write').atomicWriteSync;
|
|
107
|
+
} catch { /* fallback below */ }
|
|
108
|
+
|
|
109
|
+
function atomicWriteFileSync(filePath, data, encoding = 'utf8') {
|
|
110
|
+
if (_atomicWriteSync) {
|
|
111
|
+
_atomicWriteSync(filePath, data, encoding);
|
|
112
|
+
} else {
|
|
113
|
+
fs.writeFileSync(filePath, data, encoding);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
100
117
|
function toForwardSlash(p) {
|
|
101
118
|
return p.replace(/\\/g, '/');
|
|
102
119
|
}
|
|
@@ -112,6 +129,7 @@ module.exports = {
|
|
|
112
129
|
copyDirSync,
|
|
113
130
|
rmDirSync,
|
|
114
131
|
syncDirSync,
|
|
132
|
+
atomicWriteFileSync,
|
|
115
133
|
toForwardSlash,
|
|
116
134
|
toPosixPath,
|
|
117
135
|
};
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
const os = require('os');
|
|
31
31
|
const path = require('path');
|
|
32
32
|
const fse = require('fs-extra');
|
|
33
|
+
const { atomicWriteFileSync } = require('./fs-utils');
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Resolve the canonical source paths for the statusline templates.
|
|
@@ -182,7 +183,8 @@ async function setupStatusline(opts = {}) {
|
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
await fse.ensureDir(path.dirname(globalSettingsPath));
|
|
185
|
-
|
|
186
|
+
// Atomic (tmp+rename): a crash mid-write must never leave a torn settings.json
|
|
187
|
+
atomicWriteFileSync(globalSettingsPath, JSON.stringify(settings, null, 2), 'utf8');
|
|
186
188
|
|
|
187
189
|
result.installed = true;
|
|
188
190
|
return result;
|
|
@@ -12,6 +12,7 @@ const path = require('path');
|
|
|
12
12
|
const fs = require('fs');
|
|
13
13
|
const os = require('os');
|
|
14
14
|
const { execSync } = require('child_process');
|
|
15
|
+
const { atomicWriteFileSync } = require('../lib/fs-utils');
|
|
15
16
|
|
|
16
17
|
// ============================================================================
|
|
17
18
|
// Constants
|
|
@@ -134,7 +135,8 @@ function readJson(filePath) {
|
|
|
134
135
|
function writeJson(filePath, data) {
|
|
135
136
|
const dir = path.dirname(filePath);
|
|
136
137
|
fs.mkdirSync(dir, { recursive: true });
|
|
137
|
-
|
|
138
|
+
// Atomic (tmp+rename): these are user config files (settings.json, .mcp.json)
|
|
139
|
+
atomicWriteFileSync(filePath, JSON.stringify(data, null, 2) + '\n', 'utf8');
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
function mergeHooks(settingsPath, hookDefs) {
|
|
@@ -432,7 +434,7 @@ function createMinimalKB() {
|
|
|
432
434
|
fs.mkdirSync(kbDir, { recursive: true });
|
|
433
435
|
const kbPath = path.join(kbDir, 'chrome-brain.md');
|
|
434
436
|
if (!fs.existsSync(kbPath)) {
|
|
435
|
-
|
|
437
|
+
atomicWriteFileSync(kbPath, [
|
|
436
438
|
'# Chrome Brain — Browser Automation Capability',
|
|
437
439
|
'',
|
|
438
440
|
'> Cross-squad capability for browser automation.',
|
|
@@ -462,7 +464,7 @@ function createMinimalKB() {
|
|
|
462
464
|
// Create claude-in-chrome.md KB (Story 7.4.2)
|
|
463
465
|
const cicKbPath = path.join(kbDir, 'claude-in-chrome.md');
|
|
464
466
|
if (!fs.existsSync(cicKbPath)) {
|
|
465
|
-
|
|
467
|
+
atomicWriteFileSync(cicKbPath, [
|
|
466
468
|
'# claude-in-chrome — Chrome Extension for Visual Browser Interaction',
|
|
467
469
|
'',
|
|
468
470
|
'> Manual install required. This extension cannot be auto-installed via CLI.',
|
|
@@ -18,6 +18,7 @@ const path = require('path');
|
|
|
18
18
|
const { exec } = require('child_process');
|
|
19
19
|
const { promisify } = require('util');
|
|
20
20
|
const chalk = require('chalk');
|
|
21
|
+
const { atomicWriteFileSync } = require('../lib/fs-utils');
|
|
21
22
|
|
|
22
23
|
const execAsync = promisify(exec);
|
|
23
24
|
|
|
@@ -322,12 +323,8 @@ async function addMCPToConfig(mcpId, config, configPath) {
|
|
|
322
323
|
// Add new MCP config
|
|
323
324
|
mcpConfig.mcpServers[mcpId] = config;
|
|
324
325
|
|
|
325
|
-
// Write updated config
|
|
326
|
-
|
|
327
|
-
configPath,
|
|
328
|
-
JSON.stringify(mcpConfig, null, 2) + '\n',
|
|
329
|
-
'utf8',
|
|
330
|
-
);
|
|
326
|
+
// Write updated config — atomic (tmp+rename): .mcp.json must never be torn
|
|
327
|
+
atomicWriteFileSync(configPath, JSON.stringify(mcpConfig, null, 2) + '\n', 'utf8');
|
|
331
328
|
}
|
|
332
329
|
|
|
333
330
|
/**
|
package/bin/postinstall.js
CHANGED
|
@@ -45,6 +45,7 @@ const fs = require('fs');
|
|
|
45
45
|
const os = require('os');
|
|
46
46
|
const path = require('path');
|
|
47
47
|
const { spawnSync } = require('child_process');
|
|
48
|
+
const { atomicWriteFileSync } = require('./lib/fs-utils');
|
|
48
49
|
|
|
49
50
|
const PROJECT_ROOT = path.resolve(__dirname, '..');
|
|
50
51
|
|
|
@@ -161,7 +162,7 @@ function markFirstRunDone() {
|
|
|
161
162
|
}
|
|
162
163
|
const flag = firstRunFlag();
|
|
163
164
|
if (!fs.existsSync(flag)) {
|
|
164
|
-
|
|
165
|
+
atomicWriteFileSync(flag, `${new Date().toISOString()}\n`, 'utf8');
|
|
165
166
|
}
|
|
166
167
|
return true;
|
|
167
168
|
} catch {
|
|
@@ -361,6 +362,13 @@ function stepCreateRuntimeDirs() {
|
|
|
361
362
|
* UserPromptSubmit context engine actually injects rules. Without this, the
|
|
362
363
|
* engine is inert (the hook silently emits no context). Tolerant + non-critical:
|
|
363
364
|
* the wrapper always exits 0 and the engine degrades gracefully if absent.
|
|
365
|
+
*
|
|
366
|
+
* NOTE (Story onda2-p9 / DEC-01 option A): user-facing installs now get
|
|
367
|
+
* .synapse/ from the CANONICAL path — packages/installer/src/installer/
|
|
368
|
+
* synapse-runtime-installer.js, wired into the wizard (covers `install` and
|
|
369
|
+
* `init`). This step remains for the repo-source `npm run setup` flow (it
|
|
370
|
+
* writes at PROJECT_ROOT, i.e. the package/repo itself — see DEC-01 evidence).
|
|
371
|
+
* Do NOT delete without a deliberate DEC-03-like decision.
|
|
364
372
|
*/
|
|
365
373
|
function stepGenerateSynapse() {
|
|
366
374
|
if (isGlobalInstall()) {
|
package/bin/sinapse-init.js
CHANGED
|
@@ -24,7 +24,8 @@ const path = require('path');
|
|
|
24
24
|
const fs = require('fs');
|
|
25
25
|
const fse = require('fs-extra');
|
|
26
26
|
const yaml = require('js-yaml');
|
|
27
|
-
const {
|
|
27
|
+
const { exec, spawn } = require('child_process');
|
|
28
|
+
const { atomicWriteFileSync } = require('./lib/fs-utils');
|
|
28
29
|
const { promisify } = require('util');
|
|
29
30
|
const inquirer = require('inquirer');
|
|
30
31
|
const chalk = require('chalk');
|
|
@@ -172,8 +173,8 @@ async function main() {
|
|
|
172
173
|
author: '',
|
|
173
174
|
license: 'ISC',
|
|
174
175
|
};
|
|
175
|
-
//
|
|
176
|
-
|
|
176
|
+
// Atomic (tmp+rename): never leave a torn package.json
|
|
177
|
+
atomicWriteFileSync(packageJsonPath, JSON.stringify(defaultPackage, null, 2));
|
|
177
178
|
console.log(chalk.green('✓') + ' package.json created');
|
|
178
179
|
}
|
|
179
180
|
|
|
@@ -582,7 +583,8 @@ async function main() {
|
|
|
582
583
|
const existing = await fse.readFile(targetRules, 'utf8');
|
|
583
584
|
const incoming = await fse.readFile(sourceRules, 'utf8');
|
|
584
585
|
const mergeResult = await markdownMerger.merge(existing, incoming);
|
|
585
|
-
|
|
586
|
+
// Atomic (tmp+rename): merged user rules must never be half-written
|
|
587
|
+
atomicWriteFileSync(targetRules, mergeResult.content, 'utf8');
|
|
586
588
|
console.log(
|
|
587
589
|
chalk.green('✓') +
|
|
588
590
|
` ${ide.charAt(0).toUpperCase() + ide.slice(1)} rules merged (existing content preserved)`
|
|
@@ -830,7 +832,6 @@ See .sinapse-ai/user-guide.md for complete documentation.
|
|
|
830
832
|
// INS-2 Performance: Add spinner for validation (AC9)
|
|
831
833
|
const validationSpinner = ora('Validating installation integrity...').start();
|
|
832
834
|
|
|
833
|
-
let validationPassed = true;
|
|
834
835
|
try {
|
|
835
836
|
const { PostInstallValidator } = require('../packages/installer/src/installer/post-install-validator');
|
|
836
837
|
const validator = new PostInstallValidator(context.projectRoot, context.frameworkLocation, {
|
|
@@ -851,7 +852,6 @@ See .sinapse-ai/user-guide.md for complete documentation.
|
|
|
851
852
|
report.stats.missingFiles > 0 ||
|
|
852
853
|
report.stats.corruptedFiles > 0
|
|
853
854
|
) {
|
|
854
|
-
validationPassed = false;
|
|
855
855
|
validationSpinner.warn('Installation validation found issues:');
|
|
856
856
|
console.log(chalk.dim(` - Missing files: ${report.stats.missingFiles}`));
|
|
857
857
|
console.log(chalk.dim(` - Corrupted files: ${report.stats.corruptedFiles}`));
|
|
@@ -868,7 +868,6 @@ See .sinapse-ai/user-guide.md for complete documentation.
|
|
|
868
868
|
// Log validation errors but don't fail installation
|
|
869
869
|
// This allows installation to proceed even if validator module has issues
|
|
870
870
|
// However, users should investigate validation errors manually
|
|
871
|
-
validationPassed = false;
|
|
872
871
|
validationSpinner.warn('Post-installation validation encountered an error');
|
|
873
872
|
console.log(chalk.dim(` Error: ${validationError.message}`));
|
|
874
873
|
if (process.env.DEBUG || process.env.SINAPSE_DEBUG) {
|
|
@@ -972,8 +971,8 @@ async function updateGitIgnore(mode, projectRoot) {
|
|
|
972
971
|
|
|
973
972
|
if (!hasFrameworkSection) {
|
|
974
973
|
gitignore += frameworkRules.join('\n');
|
|
975
|
-
//
|
|
976
|
-
|
|
974
|
+
// Atomic (tmp+rename): appended .gitignore must never be half-written
|
|
975
|
+
atomicWriteFileSync(gitignorePath, gitignore);
|
|
977
976
|
}
|
|
978
977
|
}
|
|
979
978
|
}
|
package/bin/sinapse.js
CHANGED
|
@@ -11,6 +11,10 @@ const fs = require('fs');
|
|
|
11
11
|
const os = require('os');
|
|
12
12
|
const { execSync, spawnSync } = require('child_process');
|
|
13
13
|
const { emitDeprecationWarning } = require('./utils/deprecation-warning');
|
|
14
|
+
// Story onda2-p6 — shared, TTY-detection used by `init` to fall back to the
|
|
15
|
+
// wizard's quiet/default path in non-interactive shells (see shouldRunInitQuiet below).
|
|
16
|
+
const { detectInteractiveMode } = require('./lib/detection');
|
|
17
|
+
const { atomicWriteFileSync } = require('./lib/fs-utils');
|
|
14
18
|
|
|
15
19
|
// Story A.2 — unified logger. Levels: error/warn/info/debug.
|
|
16
20
|
// Flags: --verbose, --debug, --quiet, --json. Default level: warn.
|
|
@@ -112,6 +116,8 @@ USAGE:
|
|
|
112
116
|
sinapse validate # Validate installation integrity
|
|
113
117
|
sinapse info # Show system info
|
|
114
118
|
sinapse doctor # Run diagnostics
|
|
119
|
+
sinapse agents list # List all framework agents (roster)
|
|
120
|
+
sinapse ideate # Run self-improvement analyzers (IdeationEngine)
|
|
115
121
|
sinapse telemetry status # Show telemetry state (disabled by default)
|
|
116
122
|
sinapse telemetry enable # Opt in to anonymized telemetry
|
|
117
123
|
sinapse telemetry disable # Opt out of telemetry
|
|
@@ -159,8 +165,16 @@ GENERATE & CREATE:
|
|
|
159
165
|
sinapse create <agent|task|workflow> # Scaffold a new framework component
|
|
160
166
|
|
|
161
167
|
ORCHESTRATION:
|
|
168
|
+
sinapse spec <story-id> # Story assistant: generate the REAL spec for one story
|
|
169
|
+
# (stops before plan/build/QA)
|
|
170
|
+
sinapse plan <story-id> # Story assistant: real spec + implementation PLAN
|
|
171
|
+
# (stops before build/QA)
|
|
162
172
|
sinapse orchestrate <story-id> # Run the autonomous dev pipeline for a story
|
|
173
|
+
sinapse orchestrate <story-id> --dry-run # Preview the pipeline (epics + tech stack), no execution
|
|
163
174
|
sinapse orchestrate --status # Show / --stop / --resume a running pipeline
|
|
175
|
+
# Scope: 1 story per run — sequential multi-story in the
|
|
176
|
+
# same directory is not supported (measured limitation;
|
|
177
|
+
# see docs/epics/epic-orchestration-consolidation/KNOWN-LIMITATIONS.md)
|
|
164
178
|
sinapse route "<brief>" # Doc-first routing: type -> workflow -> what's missing
|
|
165
179
|
sinapse build "<brief>" # Guided orchestration: RUN the route (--dry-run, --type)
|
|
166
180
|
sinapse mode [explore|ask|auto] # Show or set the agent permission mode (--cycle)
|
|
@@ -493,7 +507,8 @@ function cleanGitignore(gitignorePath) {
|
|
|
493
507
|
}
|
|
494
508
|
|
|
495
509
|
if (removedLines > 0) {
|
|
496
|
-
|
|
510
|
+
// Atomic (tmp+rename): never leave a half-written .gitignore
|
|
511
|
+
atomicWriteFileSync(gitignorePath, newLines.join('\n'));
|
|
497
512
|
return { removed: true, lines: removedLines };
|
|
498
513
|
}
|
|
499
514
|
return { removed: false };
|
|
@@ -704,6 +719,11 @@ async function runUninstall(options = {}) {
|
|
|
704
719
|
// Optionally remove .sinapse
|
|
705
720
|
if (!keepData) {
|
|
706
721
|
itemsToRemove.push({ path: '.sinapse', description: 'Project data and settings' });
|
|
722
|
+
// Story onda2-p9 — .synapse/ is the context-engine runtime (generated
|
|
723
|
+
// constitution + sessions/metrics). Grouped with project data for parity
|
|
724
|
+
// with .sinapse: removed by default, preserved under --keep-data.
|
|
725
|
+
// Regenerated automatically by any future `sinapse install`/`init`.
|
|
726
|
+
itemsToRemove.push({ path: '.synapse', description: 'Context engine runtime (constitution + sessions/metrics)' });
|
|
707
727
|
}
|
|
708
728
|
|
|
709
729
|
// Check what exists
|
|
@@ -836,6 +856,20 @@ async function runUninstall(options = {}) {
|
|
|
836
856
|
logger.always(` ✓ Cleaned ${gitignoreResult.lines} SINAPSE entries from .gitignore`);
|
|
837
857
|
}
|
|
838
858
|
|
|
859
|
+
// UNINSTALL-GIT-HOOKS (audit AF-20260702 item 1.3) — reset git core.hooksPath
|
|
860
|
+
// so future commits don't point at the just-removed .sinapse-ai/git-hooks
|
|
861
|
+
// dir. Reuses the exact helper bin/commands/uninstall.js already ships
|
|
862
|
+
// (parity fix) instead of duplicating the logic here.
|
|
863
|
+
const { removeGitHooksConfig } = require('./commands/uninstall');
|
|
864
|
+
const hooksResult = await removeGitHooksConfig(cwd);
|
|
865
|
+
if (!quiet) {
|
|
866
|
+
if (hooksResult.unset) {
|
|
867
|
+
logger.always(' ✓ Reset git core.hooksPath (was SINAPSE-managed)');
|
|
868
|
+
} else if (hooksResult.value) {
|
|
869
|
+
logger.always(' - git core.hooksPath kept (custom, not SINAPSE-managed)');
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
839
873
|
// Summary
|
|
840
874
|
if (!quiet) {
|
|
841
875
|
logger.always('\n✅ SINAPSE has been uninstalled.');
|
|
@@ -917,6 +951,26 @@ Examples:
|
|
|
917
951
|
`);
|
|
918
952
|
}
|
|
919
953
|
|
|
954
|
+
/**
|
|
955
|
+
* Resolve whether `sinapse init` should run the wizard in quiet/default mode.
|
|
956
|
+
*
|
|
957
|
+
* Story onda2-p6 (bug found in S4): `install` already avoids crashing in a
|
|
958
|
+
* non-interactive shell because bin/commands/install.js passes `quiet: true`
|
|
959
|
+
* unconditionally to the wizard (language/LLM are resolved upstream via its
|
|
960
|
+
* own TTY-safe prompts). `init` had no such fallback — it called the wizard
|
|
961
|
+
* with no `quiet` flag at all, so a CI runner, piped stdin, or an AI agent
|
|
962
|
+
* invoking `npx sinapse-ai init` hit the wizard's language+LLM
|
|
963
|
+
* `inquirer.prompt()` and crashed with `ERR_USE_AFTER_CLOSE`. This mirrors
|
|
964
|
+
* install's fallback: no TTY -> quiet mode -> wizard uses its own defaults
|
|
965
|
+
* (pt + claude-code, see packages/installer/src/wizard/index.js).
|
|
966
|
+
*
|
|
967
|
+
* @param {boolean} [interactive] - Defaults to the real TTY/env/argv detection.
|
|
968
|
+
* @returns {boolean} true when the wizard should skip prompts and use defaults
|
|
969
|
+
*/
|
|
970
|
+
function shouldRunInitQuiet(interactive = detectInteractiveMode()) {
|
|
971
|
+
return !interactive;
|
|
972
|
+
}
|
|
973
|
+
|
|
920
974
|
async function initProject() {
|
|
921
975
|
// 1. Parse ALL args after 'init'
|
|
922
976
|
const initArgs = args.slice(1);
|
|
@@ -1009,6 +1063,9 @@ async function initProject() {
|
|
|
1009
1063
|
template,
|
|
1010
1064
|
skipInstall,
|
|
1011
1065
|
force: isForce,
|
|
1066
|
+
// Story onda2-p6 — fall back to quiet/default mode without a TTY (see
|
|
1067
|
+
// shouldRunInitQuiet doc comment above for the crash this prevents).
|
|
1068
|
+
quiet: shouldRunInitQuiet(),
|
|
1012
1069
|
});
|
|
1013
1070
|
}
|
|
1014
1071
|
|
|
@@ -1359,6 +1416,29 @@ async function main() {
|
|
|
1359
1416
|
// Without this case the most powerful pipeline (executeFullPipeline) was
|
|
1360
1417
|
// only reachable programmatically — violating Art. I (CLI First).
|
|
1361
1418
|
try {
|
|
1419
|
+
// Story onda2-p3 (AC2): `--help` answers with usage instead of failing
|
|
1420
|
+
// on a missing story-id — also what `npx sinapse-ai orchestrate --help`
|
|
1421
|
+
// reaches through the canonical binary's delegation.
|
|
1422
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
1423
|
+
logger.always(`Usage: sinapse orchestrate <story-id> [options]
|
|
1424
|
+
|
|
1425
|
+
Runs the autonomous dev pipeline for ONE story: spec -> plan -> build -> QA.
|
|
1426
|
+
Scope: 1 story per run (multi-story chaining in the same directory is not
|
|
1427
|
+
supported — see docs/epics/epic-orchestration-consolidation/KNOWN-LIMITATIONS.md).
|
|
1428
|
+
|
|
1429
|
+
Options:
|
|
1430
|
+
--dry-run Preview the pipeline (epics + detected tech stack), no execution
|
|
1431
|
+
--epic <N> Start from a specific epic (3=Spec, 4=Plan/Build, 6=QA)
|
|
1432
|
+
--strict Fail on any gate failure
|
|
1433
|
+
--status Show pipeline status for the story
|
|
1434
|
+
--stop Stop a running pipeline
|
|
1435
|
+
--resume Resume a stopped pipeline
|
|
1436
|
+
|
|
1437
|
+
Related:
|
|
1438
|
+
sinapse spec <story-id> Real spec only (stops before plan/build/QA)
|
|
1439
|
+
sinapse plan <story-id> Real spec + plan (stops before build/QA)`);
|
|
1440
|
+
process.exit(0);
|
|
1441
|
+
}
|
|
1362
1442
|
const orchestration = require('../.sinapse-ai/core/orchestration');
|
|
1363
1443
|
const epicIdx = args.indexOf('--epic');
|
|
1364
1444
|
// The story-id is the first positional arg after `orchestrate` — i.e.
|
|
@@ -1401,6 +1481,63 @@ async function main() {
|
|
|
1401
1481
|
break; // unreachable (both branches process.exit) — satisfies no-fallthrough
|
|
1402
1482
|
}
|
|
1403
1483
|
|
|
1484
|
+
case 'spec':
|
|
1485
|
+
case 'plan': {
|
|
1486
|
+
// Story onda2-p3 (audit AF-20260702 item 2.3) — the hybrid's MEASURED
|
|
1487
|
+
// value (real spec + real plan for ONE story) as first-class commands.
|
|
1488
|
+
// Thin subcommands over the SAME orchestrate pipeline with a phase limit:
|
|
1489
|
+
// `spec` stops after Epic 3; `plan` stops after Epic 4's plan phase —
|
|
1490
|
+
// both stop BEFORE build/QA. No duplicated pipeline.
|
|
1491
|
+
try {
|
|
1492
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
1493
|
+
logger.always(
|
|
1494
|
+
command === 'spec'
|
|
1495
|
+
? `Usage: sinapse spec <story-id> [--dry-run]
|
|
1496
|
+
|
|
1497
|
+
Generates the REAL specification (spec.md) for one story and stops there —
|
|
1498
|
+
no plan, no build, no QA. Same pipeline as \`sinapse orchestrate\`, limited to
|
|
1499
|
+
the spec phase. Artifact: docs/stories/<story-id>/spec.md
|
|
1500
|
+
|
|
1501
|
+
Next step: sinapse plan <story-id> (spec + implementation plan)`
|
|
1502
|
+
: `Usage: sinapse plan <story-id> [--dry-run]
|
|
1503
|
+
|
|
1504
|
+
Generates the REAL specification AND the implementation plan for one story,
|
|
1505
|
+
then stops — no build, no QA. Same pipeline as \`sinapse orchestrate\`, limited
|
|
1506
|
+
to the plan phase. Artifacts: docs/stories/<story-id>/spec.md and
|
|
1507
|
+
docs/stories/<story-id>/plan/implementation.yaml
|
|
1508
|
+
|
|
1509
|
+
Next step: review the plan, then implement (natively or via sinapse orchestrate).`,
|
|
1510
|
+
);
|
|
1511
|
+
process.exit(0);
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
const orchestration = require('../.sinapse-ai/core/orchestration');
|
|
1515
|
+
const storyId = args.slice(1).find((a) => !a.startsWith('--'));
|
|
1516
|
+
const options = {
|
|
1517
|
+
projectRoot: process.cwd(),
|
|
1518
|
+
dryRun: args.includes('--dry-run'),
|
|
1519
|
+
strict: args.includes('--strict'),
|
|
1520
|
+
};
|
|
1521
|
+
|
|
1522
|
+
const result =
|
|
1523
|
+
command === 'spec'
|
|
1524
|
+
? await orchestration.spec(storyId, options)
|
|
1525
|
+
: await orchestration.plan(storyId, options);
|
|
1526
|
+
|
|
1527
|
+
const exitCode =
|
|
1528
|
+
result && typeof result.exitCode === 'number'
|
|
1529
|
+
? result.exitCode
|
|
1530
|
+
: result && result.success === false
|
|
1531
|
+
? 1
|
|
1532
|
+
: 0;
|
|
1533
|
+
process.exit(exitCode);
|
|
1534
|
+
} catch (error) {
|
|
1535
|
+
logger.error(`❌ ${command} command error: ${error.message}`);
|
|
1536
|
+
process.exit(1);
|
|
1537
|
+
}
|
|
1538
|
+
break; // unreachable (both branches process.exit) — satisfies no-fallthrough
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1404
1541
|
case 'route': {
|
|
1405
1542
|
// Doc-first routing observability (READ-ONLY) — Art. I (CLI First).
|
|
1406
1543
|
// Usage: sinapse route "<brief>" [--type <project_type>]
|
|
@@ -1518,6 +1655,19 @@ async function main() {
|
|
|
1518
1655
|
break; // unreachable (process.exit above) — satisfies no-fallthrough
|
|
1519
1656
|
}
|
|
1520
1657
|
|
|
1658
|
+
case 'agents':
|
|
1659
|
+
case 'ideate': {
|
|
1660
|
+
// `agents`/`ideate` are owned by bin/cli.js (SCHEMA-001 agent roster +
|
|
1661
|
+
// IdeationEngine). Without this, an unknown command here fell through to
|
|
1662
|
+
// launchSinapse and was silently passed as a raw prompt to Claude Code —
|
|
1663
|
+
// same bug class the `ids:*` delegation below already fixes, so it's
|
|
1664
|
+
// fixed the same way (spawnSync into the module that really owns it).
|
|
1665
|
+
const cliBin = path.join(__dirname, 'cli.js');
|
|
1666
|
+
const result = spawnSync(process.execPath, [cliBin, ...args], { stdio: 'inherit' });
|
|
1667
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
1668
|
+
break; // unreachable (process.exit above) — satisfies no-fallthrough
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1521
1671
|
case undefined:
|
|
1522
1672
|
// No arguments - launch Claude Code with SINAPSE branding
|
|
1523
1673
|
launchSinapse([]);
|
|
@@ -1547,4 +1697,4 @@ if (require.main === module) {
|
|
|
1547
1697
|
});
|
|
1548
1698
|
}
|
|
1549
1699
|
|
|
1550
|
-
module.exports = { nodeSatisfies };
|
|
1700
|
+
module.exports = { nodeSatisfies, shouldRunInitQuiet };
|
|
@@ -50,7 +50,9 @@ const SCANNER_SELF_FILES = new Set([
|
|
|
50
50
|
'bin/utils/staged-secret-scan.js',
|
|
51
51
|
'.claude/hooks/secret-scanning.cjs',
|
|
52
52
|
]);
|
|
53
|
-
|
|
53
|
+
// Each alternative carries its own anchors (grouped explicitly) so neither
|
|
54
|
+
// branch can accidentally match a substring of the other's context.
|
|
55
|
+
const TEST_FILE_PATTERN = /((^|\/)(tests?|__tests__)\/)|(\.(test|spec)\.[cm]?[jt]s$)/i;
|
|
54
56
|
|
|
55
57
|
function isScanExemptPath(filePath) {
|
|
56
58
|
const norm = String(filePath).replace(/\\/g, '/');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> Single, generated map of how the SINAPSE framework works: routing, models,
|
|
4
4
|
> constitution, workflows, agents, squads. Regenerate with `sinapse atlas`.
|
|
5
5
|
> Counts are read from disk (Article VII — always exact).
|
|
6
|
-
> Generated: 2026-
|
|
6
|
+
> Generated: 2026-07-03T03:44:39.813Z
|
|
7
7
|
|
|
8
8
|
**At a glance:** 17 squads · 172 agents
|
|
9
9
|
(12 framework + 160 squad) ·
|
|
@@ -488,13 +488,13 @@ squad workflows**. The 13 primary framework workflows have detailed docs in
|
|
|
488
488
|
|
|
489
489
|
| Orchestrator | Persona | Squad | Role |
|
|
490
490
|
|---|---|---|---|
|
|
491
|
-
| `swarm-orqx` |
|
|
491
|
+
| `swarm-orqx` | Relay | claude-code-mastery | Multi-Agent Systems Architect & Swarm Orchestration Specialist |
|
|
492
492
|
| `snps-orqx` | Imperator | framework | Supreme Orchestrator of all 17 SINAPSE Squads (172 agents) |
|
|
493
493
|
| `animations-orqx` | Kinetic | squad-animations | Animation Squad Orchestrator |
|
|
494
494
|
| `squad-brand` | Meridian | squad-brand | Brand Squad Orchestrator — coordena os 14 agentes especialistas do squad |
|
|
495
495
|
| `squad-cloning` | Helix | squad-cloning | Clone Pipeline Orchestrator — coordena o pipeline completo de clonagem cognitiva |
|
|
496
496
|
| `commercial-orqx` | — | squad-commercial | Revenue Cycle Orchestrator |
|
|
497
|
-
| `squad-content` |
|
|
497
|
+
| `squad-content` | Bulletin | squad-content | Content Pipeline Orchestrator — coordena todo o fluxo de deteccao, producao, publicacao e analise |
|
|
498
498
|
| `squad-copy` | Quill Prime | squad-copy | Copy Squad Orchestrator — coordena os 12 agentes especialistas do squad |
|
|
499
499
|
| `council-orqx` | Zenith | squad-council | Strategic Council Orchestrator & Wisdom Synthesizer |
|
|
500
500
|
| `squad-courses` | Syllabus | squad-courses | Course Project Orchestrator — coordena o ciclo completo de criacao de cursos |
|