sinapse-ai 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/sinapse/SKILL.md +10 -0
- package/.agents/skills/sinapse-agent/SKILL.md +22 -0
- package/.agents/skills/sinapse-analyst/SKILL.md +29 -0
- package/.agents/skills/sinapse-animations/SKILL.md +28 -0
- package/.agents/skills/sinapse-architect/SKILL.md +31 -0
- package/.agents/skills/sinapse-brand/SKILL.md +28 -0
- package/.agents/skills/sinapse-claude/SKILL.md +28 -0
- package/.agents/skills/sinapse-cloning/SKILL.md +28 -0
- package/.agents/skills/sinapse-commercial/SKILL.md +28 -0
- package/.agents/skills/sinapse-content/SKILL.md +28 -0
- package/.agents/skills/sinapse-copy/SKILL.md +28 -0
- package/.agents/skills/sinapse-council/SKILL.md +28 -0
- package/.agents/skills/sinapse-courses/SKILL.md +28 -0
- package/.agents/skills/sinapse-cyber/SKILL.md +28 -0
- package/.agents/skills/sinapse-data-engineer/SKILL.md +31 -0
- package/.agents/skills/sinapse-design/SKILL.md +28 -0
- package/.agents/skills/sinapse-dev/SKILL.md +31 -0
- package/.agents/skills/sinapse-devops/SKILL.md +31 -0
- package/.agents/skills/sinapse-finance/SKILL.md +28 -0
- package/.agents/skills/sinapse-growth/SKILL.md +28 -0
- package/.agents/skills/sinapse-loop/SKILL.md +35 -0
- package/.agents/skills/sinapse-orqx/SKILL.md +44 -0
- package/.agents/skills/sinapse-paidmedia/SKILL.md +28 -0
- package/.agents/skills/sinapse-pm/SKILL.md +31 -0
- package/.agents/skills/sinapse-po/SKILL.md +31 -0
- package/.agents/skills/sinapse-product/SKILL.md +28 -0
- package/.agents/skills/sinapse-qa/SKILL.md +31 -0
- package/.agents/skills/sinapse-research/SKILL.md +28 -0
- package/.agents/skills/sinapse-sm/SKILL.md +27 -0
- package/.agents/skills/sinapse-spec-driven/SKILL.md +35 -0
- package/.agents/skills/sinapse-squad-creator/SKILL.md +31 -0
- package/.agents/skills/sinapse-storytelling/SKILL.md +28 -0
- package/.agents/skills/sinapse-swarm/SKILL.md +28 -0
- package/.agents/skills/sinapse-ux-design-expert/SKILL.md +24 -0
- package/.agents/skills/snps/SKILL.md +10 -0
- package/.agents/skills/snps-orqx/SKILL.md +10 -0
- package/.claude/agents/README.md +67 -0
- package/.claude/agents/sinapse-ad-copywriter.md +14 -0
- package/.claude/agents/sinapse-agent-forger.md +14 -0
- package/.claude/agents/sinapse-analyst.md +14 -0
- package/.claude/agents/sinapse-animation-interpreter.md +14 -0
- package/.claude/agents/sinapse-animation-performance-engineer.md +14 -0
- package/.claude/agents/sinapse-animations-orqx.md +14 -0
- package/.claude/agents/sinapse-architect.md +14 -0
- package/.claude/agents/sinapse-assessment-creator.md +14 -0
- package/.claude/agents/sinapse-audience-intelligence.md +14 -0
- package/.claude/agents/sinapse-blake-snyder.md +14 -0
- package/.claude/agents/sinapse-brand-archetype-strategist.md +14 -0
- package/.claude/agents/sinapse-brand-auditor.md +14 -0
- package/.claude/agents/sinapse-brand-collateral-designer.md +14 -0
- package/.claude/agents/sinapse-brand-compiler.md +14 -0
- package/.claude/agents/sinapse-brand-creative-engineer.md +14 -0
- package/.claude/agents/sinapse-brand-culture-architect.md +14 -0
- package/.claude/agents/sinapse-brand-growth-strategist.md +14 -0
- package/.claude/agents/sinapse-brand-identity-designer.md +14 -0
- package/.claude/agents/sinapse-brand-motion-vfx.md +14 -0
- package/.claude/agents/sinapse-brand-naming-specialist.md +14 -0
- package/.claude/agents/sinapse-brand-orqx.md +14 -0
- package/.claude/agents/sinapse-brand-positioning-strategist.md +14 -0
- package/.claude/agents/sinapse-brand-sonic-designer.md +14 -0
- package/.claude/agents/sinapse-brand-strategist.md +14 -0
- package/.claude/agents/sinapse-brand-system-architect.md +14 -0
- package/.claude/agents/sinapse-brand-voice-writer.md +14 -0
- package/.claude/agents/sinapse-brene-brown.md +14 -0
- package/.claude/agents/sinapse-budget-controller.md +14 -0
- package/.claude/agents/sinapse-campaign-analyst.md +14 -0
- package/.claude/agents/sinapse-charlie-munger.md +14 -0
- package/.claude/agents/sinapse-claude-mastery-chief.md +14 -0
- package/.claude/agents/sinapse-cloning-orqx.md +14 -0
- package/.claude/agents/sinapse-cloud-security-engineer.md +14 -0
- package/.claude/agents/sinapse-cognitive-extractor.md +14 -0
- package/.claude/agents/sinapse-commercial-orqx.md +14 -0
- package/.claude/agents/sinapse-competitive-intelligence.md +14 -0
- package/.claude/agents/sinapse-compliance-officer.md +14 -0
- package/.claude/agents/sinapse-config-engineer.md +14 -0
- package/.claude/agents/sinapse-content-analyst.md +14 -0
- package/.claude/agents/sinapse-content-capturer.md +14 -0
- package/.claude/agents/sinapse-content-engineer.md +14 -0
- package/.claude/agents/sinapse-content-governor.md +14 -0
- package/.claude/agents/sinapse-content-orqx.md +14 -0
- package/.claude/agents/sinapse-content-writer.md +14 -0
- package/.claude/agents/sinapse-conversion-writer.md +14 -0
- package/.claude/agents/sinapse-copy-editor.md +14 -0
- package/.claude/agents/sinapse-copy-orqx.md +14 -0
- package/.claude/agents/sinapse-copy-strategist.md +14 -0
- package/.claude/agents/sinapse-cost-optimizer.md +14 -0
- package/.claude/agents/sinapse-council-orqx.md +14 -0
- package/.claude/agents/sinapse-courses-orqx.md +14 -0
- package/.claude/agents/sinapse-creative-strategist.md +14 -0
- package/.claude/agents/sinapse-cro-persuasion.md +14 -0
- package/.claude/agents/sinapse-cro-specialist.md +14 -0
- package/.claude/agents/sinapse-cs-business-auditor.md +14 -0
- package/.claude/agents/sinapse-cs-client-success.md +14 -0
- package/.claude/agents/sinapse-cs-crm-specialist.md +14 -0
- package/.claude/agents/sinapse-cs-funnel-architect.md +14 -0
- package/.claude/agents/sinapse-cs-lead-generation-strategist.md +14 -0
- package/.claude/agents/sinapse-cs-offer-designer.md +14 -0
- package/.claude/agents/sinapse-cs-revops-analyst.md +14 -0
- package/.claude/agents/sinapse-cs-sales-closer.md +14 -0
- package/.claude/agents/sinapse-cs-sales-enablement.md +14 -0
- package/.claude/agents/sinapse-css-motion-artist.md +14 -0
- package/.claude/agents/sinapse-curriculum-designer.md +14 -0
- package/.claude/agents/sinapse-cyber-orqx.md +14 -0
- package/.claude/agents/sinapse-dan-harmon.md +14 -0
- package/.claude/agents/sinapse-data-engineer.md +14 -0
- package/.claude/agents/sinapse-data-synthesizer.md +14 -0
- package/.claude/agents/sinapse-deep-researcher.md +14 -0
- package/.claude/agents/sinapse-derek-sivers.md +14 -0
- package/.claude/agents/sinapse-design-orqx.md +14 -0
- package/.claude/agents/sinapse-design-system.md +14 -0
- package/.claude/agents/sinapse-developer.md +14 -0
- package/.claude/agents/sinapse-devops.md +14 -0
- package/.claude/agents/sinapse-direct-response-writer.md +14 -0
- package/.claude/agents/sinapse-dx-accessibility-specialist.md +14 -0
- package/.claude/agents/sinapse-dx-design-system-architect.md +14 -0
- package/.claude/agents/sinapse-dx-frontend-engineer.md +14 -0
- package/.claude/agents/sinapse-dx-interaction-designer.md +14 -0
- package/.claude/agents/sinapse-dx-performance-engineer.md +14 -0
- package/.claude/agents/sinapse-dx-ui-designer.md +14 -0
- package/.claude/agents/sinapse-dx-ux-strategist.md +14 -0
- package/.claude/agents/sinapse-editorial-strategist.md +14 -0
- package/.claude/agents/sinapse-email-sequence-strategist.md +14 -0
- package/.claude/agents/sinapse-finance-orqx.md +14 -0
- package/.claude/agents/sinapse-fiscal-compliance-br.md +14 -0
- package/.claude/agents/sinapse-forecast-strategist.md +14 -0
- package/.claude/agents/sinapse-funnel-copywriter.md +14 -0
- package/.claude/agents/sinapse-ga-analytics-engineer.md +14 -0
- package/.claude/agents/sinapse-ga-campaign-analyst.md +14 -0
- package/.claude/agents/sinapse-ga-cro-specialist.md +14 -0
- package/.claude/agents/sinapse-ga-data-analyst.md +14 -0
- package/.claude/agents/sinapse-ga-growth-hacker.md +14 -0
- package/.claude/agents/sinapse-ga-seo-strategist.md +14 -0
- package/.claude/agents/sinapse-generative-particle-engineer.md +14 -0
- package/.claude/agents/sinapse-google-ads-specialist.md +14 -0
- package/.claude/agents/sinapse-growth-orqx.md +14 -0
- package/.claude/agents/sinapse-headline-specialist.md +14 -0
- package/.claude/agents/sinapse-hooks-architect.md +14 -0
- package/.claude/agents/sinapse-incident-responder.md +14 -0
- package/.claude/agents/sinapse-joseph-campbell.md +14 -0
- package/.claude/agents/sinapse-kb-architect.md +14 -0
- package/.claude/agents/sinapse-keith-johnstone.md +14 -0
- package/.claude/agents/sinapse-kindra-hall.md +14 -0
- package/.claude/agents/sinapse-launch-strategist.md +14 -0
- package/.claude/agents/sinapse-lesson-architect.md +14 -0
- package/.claude/agents/sinapse-long-form-writer.md +14 -0
- package/.claude/agents/sinapse-market-analyst.md +14 -0
- package/.claude/agents/sinapse-marshall-ganz.md +14 -0
- package/.claude/agents/sinapse-mcp-integrator.md +14 -0
- package/.claude/agents/sinapse-meta-ads-specialist.md +14 -0
- package/.claude/agents/sinapse-mind-synthesizer.md +14 -0
- package/.claude/agents/sinapse-motion-choreographer.md +14 -0
- package/.claude/agents/sinapse-nancy-duarte.md +14 -0
- package/.claude/agents/sinapse-naval-ravikant.md +14 -0
- package/.claude/agents/sinapse-network-security-engineer.md +14 -0
- package/.claude/agents/sinapse-oren-klaff.md +14 -0
- package/.claude/agents/sinapse-paidmedia-orqx.md +14 -0
- package/.claude/agents/sinapse-park-howell.md +14 -0
- package/.claude/agents/sinapse-patrick-lencioni.md +14 -0
- package/.claude/agents/sinapse-penetration-tester.md +14 -0
- package/.claude/agents/sinapse-performance-engineer.md +14 -0
- package/.claude/agents/sinapse-persuasion-psychologist.md +14 -0
- package/.claude/agents/sinapse-peter-thiel.md +14 -0
- package/.claude/agents/sinapse-platform-aesthetic-director.md +14 -0
- package/.claude/agents/sinapse-platform-specialist.md +14 -0
- package/.claude/agents/sinapse-pm-creative-performance-analyst.md +14 -0
- package/.claude/agents/sinapse-pm-youtube-ads-specialist.md +14 -0
- package/.claude/agents/sinapse-premium-packaging-strategist.md +14 -0
- package/.claude/agents/sinapse-pricing-strategist.md +14 -0
- package/.claude/agents/sinapse-product-lead.md +14 -0
- package/.claude/agents/sinapse-product-orqx.md +14 -0
- package/.claude/agents/sinapse-product-surface-director.md +14 -0
- package/.claude/agents/sinapse-production-director.md +14 -0
- package/.claude/agents/sinapse-profitability-analyst.md +14 -0
- package/.claude/agents/sinapse-project-integrator.md +14 -0
- package/.claude/agents/sinapse-project-lead.md +14 -0
- package/.claude/agents/sinapse-proof-architect.md +14 -0
- package/.claude/agents/sinapse-ps-client-product-manager.md +14 -0
- package/.claude/agents/sinapse-ps-delivery-manager.md +14 -0
- package/.claude/agents/sinapse-ps-discovery-lead.md +14 -0
- package/.claude/agents/sinapse-ps-product-analyst.md +14 -0
- package/.claude/agents/sinapse-ps-product-ops-specialist.md +14 -0
- package/.claude/agents/sinapse-ps-product-strategist.md +14 -0
- package/.claude/agents/sinapse-quality-gate.md +14 -0
- package/.claude/agents/sinapse-ray-dalio.md +14 -0
- package/.claude/agents/sinapse-reid-hoffman.md +14 -0
- package/.claude/agents/sinapse-research-orqx.md +14 -0
- package/.claude/agents/sinapse-revenue-analyst.md +14 -0
- package/.claude/agents/sinapse-roadmap-sentinel.md +14 -0
- package/.claude/agents/sinapse-scroll-narrative-engineer.md +14 -0
- package/.claude/agents/sinapse-shader-artist.md +14 -0
- package/.claude/agents/sinapse-signal-intelligence.md +14 -0
- package/.claude/agents/sinapse-simon-sinek.md +14 -0
- package/.claude/agents/sinapse-skill-craftsman.md +14 -0
- package/.claude/agents/sinapse-slide-designer.md +14 -0
- package/.claude/agents/sinapse-snps-orqx.md +14 -0
- package/.claude/agents/sinapse-soc-analyst.md +14 -0
- package/.claude/agents/sinapse-sop-extractor.md +14 -0
- package/.claude/agents/sinapse-source-hunter.md +14 -0
- package/.claude/agents/sinapse-sprint-lead.md +14 -0
- package/.claude/agents/sinapse-squad-assembler.md +14 -0
- package/.claude/agents/sinapse-squad-creator.md +14 -0
- package/.claude/agents/sinapse-storytelling-orqx.md +14 -0
- package/.claude/agents/sinapse-swarm-orqx.md +14 -0
- package/.claude/agents/sinapse-threat-analyst.md +14 -0
- package/.claude/agents/sinapse-threejs-architect.md +14 -0
- package/.claude/agents/sinapse-trend-forecaster.md +14 -0
- package/.claude/agents/sinapse-ux-design-expert.md +14 -0
- package/.claude/agents/sinapse-ux-designer.md +14 -0
- package/.claude/agents/sinapse-yvon-chouinard.md +14 -0
- package/.claude/rules/software-engineering-applicability.md +13 -0
- package/.claude/skill-manifest.json +41 -0
- package/.claude/skills/api-review.md +50 -0
- package/.claude/skills/component-check.md +47 -0
- package/.claude/skills/db-review.md +41 -0
- package/.claude/skills/sinapse/SKILL.md +11 -0
- package/.claude/skills/sinapse-agent/SKILL.md +11 -0
- package/.claude/skills/sinapse-analyst/SKILL.md +11 -0
- package/.claude/skills/sinapse-animations/SKILL.md +11 -0
- package/.claude/skills/sinapse-architect/SKILL.md +11 -0
- package/.claude/skills/sinapse-brand/SKILL.md +11 -0
- package/.claude/skills/sinapse-claude/SKILL.md +11 -0
- package/.claude/skills/sinapse-cloning/SKILL.md +11 -0
- package/.claude/skills/sinapse-commercial/SKILL.md +11 -0
- package/.claude/skills/sinapse-content/SKILL.md +11 -0
- package/.claude/skills/sinapse-copy/SKILL.md +11 -0
- package/.claude/skills/sinapse-council/SKILL.md +11 -0
- package/.claude/skills/sinapse-courses/SKILL.md +11 -0
- package/.claude/skills/sinapse-cyber/SKILL.md +11 -0
- package/.claude/skills/sinapse-data-engineer/SKILL.md +11 -0
- package/.claude/skills/sinapse-design/SKILL.md +11 -0
- package/.claude/skills/sinapse-dev/SKILL.md +11 -0
- package/.claude/skills/sinapse-devops/SKILL.md +11 -0
- package/.claude/skills/sinapse-finance/SKILL.md +11 -0
- package/.claude/skills/sinapse-growth/SKILL.md +11 -0
- package/.claude/skills/sinapse-loop/SKILL.md +11 -0
- package/.claude/skills/sinapse-orqx/SKILL.md +11 -0
- package/.claude/skills/sinapse-paidmedia/SKILL.md +11 -0
- package/.claude/skills/sinapse-pm/SKILL.md +11 -0
- package/.claude/skills/sinapse-po/SKILL.md +11 -0
- package/.claude/skills/sinapse-product/SKILL.md +11 -0
- package/.claude/skills/sinapse-qa/SKILL.md +11 -0
- package/.claude/skills/sinapse-research/SKILL.md +11 -0
- package/.claude/skills/sinapse-sm/SKILL.md +11 -0
- package/.claude/skills/sinapse-spec-driven/SKILL.md +11 -0
- package/.claude/skills/sinapse-squad-creator/SKILL.md +11 -0
- package/.claude/skills/sinapse-storytelling/SKILL.md +11 -0
- package/.claude/skills/sinapse-swarm/SKILL.md +11 -0
- package/.claude/skills/sinapse-ux-design-expert/SKILL.md +11 -0
- package/.claude/skills/snps/SKILL.md +11 -0
- package/.claude/skills/snps-orqx/SKILL.md +11 -0
- package/.claude/skills/story-update.md +52 -0
- package/.claude/skills/test-guard.md +41 -0
- package/.codex/agents/ad-copywriter.toml +3 -0
- package/.codex/agents/agent-forger.toml +3 -0
- package/.codex/agents/analyst.toml +3 -0
- package/.codex/agents/animation-interpreter.toml +3 -0
- package/.codex/agents/animation-performance-engineer.toml +3 -0
- package/.codex/agents/animations-orqx.toml +3 -0
- package/.codex/agents/architect.toml +3 -0
- package/.codex/agents/assessment-creator.toml +3 -0
- package/.codex/agents/audience-intelligence.toml +3 -0
- package/.codex/agents/blake-snyder.toml +3 -0
- package/.codex/agents/brand-archetype-strategist.toml +3 -0
- package/.codex/agents/brand-auditor.toml +3 -0
- package/.codex/agents/brand-collateral-designer.toml +3 -0
- package/.codex/agents/brand-compiler.toml +3 -0
- package/.codex/agents/brand-creative-engineer.toml +3 -0
- package/.codex/agents/brand-culture-architect.toml +3 -0
- package/.codex/agents/brand-growth-strategist.toml +3 -0
- package/.codex/agents/brand-identity-designer.toml +3 -0
- package/.codex/agents/brand-motion-vfx.toml +3 -0
- package/.codex/agents/brand-naming-specialist.toml +3 -0
- package/.codex/agents/brand-orqx.toml +3 -0
- package/.codex/agents/brand-positioning-strategist.toml +3 -0
- package/.codex/agents/brand-sonic-designer.toml +3 -0
- package/.codex/agents/brand-strategist.toml +3 -0
- package/.codex/agents/brand-system-architect.toml +3 -0
- package/.codex/agents/brand-voice-writer.toml +3 -0
- package/.codex/agents/brene-brown.toml +3 -0
- package/.codex/agents/budget-controller.toml +3 -0
- package/.codex/agents/campaign-analyst.toml +3 -0
- package/.codex/agents/charlie-munger.toml +3 -0
- package/.codex/agents/claude-mastery-chief.toml +3 -0
- package/.codex/agents/cloning-orqx.toml +3 -0
- package/.codex/agents/cloud-security-engineer.toml +3 -0
- package/.codex/agents/cognitive-extractor.toml +3 -0
- package/.codex/agents/commercial-orqx.toml +3 -0
- package/.codex/agents/competitive-intelligence.toml +3 -0
- package/.codex/agents/compliance-officer.toml +3 -0
- package/.codex/agents/config-engineer.toml +3 -0
- package/.codex/agents/content-analyst.toml +3 -0
- package/.codex/agents/content-capturer.toml +3 -0
- package/.codex/agents/content-engineer.toml +3 -0
- package/.codex/agents/content-governor.toml +3 -0
- package/.codex/agents/content-orqx.toml +3 -0
- package/.codex/agents/content-writer.toml +3 -0
- package/.codex/agents/conversion-writer.toml +3 -0
- package/.codex/agents/copy-editor.toml +3 -0
- package/.codex/agents/copy-orqx.toml +3 -0
- package/.codex/agents/copy-strategist.toml +3 -0
- package/.codex/agents/cost-optimizer.toml +3 -0
- package/.codex/agents/council-orqx.toml +3 -0
- package/.codex/agents/courses-orqx.toml +3 -0
- package/.codex/agents/creative-strategist.toml +3 -0
- package/.codex/agents/cro-persuasion.toml +3 -0
- package/.codex/agents/cro-specialist.toml +3 -0
- package/.codex/agents/cs-business-auditor.toml +3 -0
- package/.codex/agents/cs-client-success.toml +3 -0
- package/.codex/agents/cs-crm-specialist.toml +3 -0
- package/.codex/agents/cs-funnel-architect.toml +3 -0
- package/.codex/agents/cs-lead-generation-strategist.toml +3 -0
- package/.codex/agents/cs-offer-designer.toml +3 -0
- package/.codex/agents/cs-revops-analyst.toml +3 -0
- package/.codex/agents/cs-sales-closer.toml +3 -0
- package/.codex/agents/cs-sales-enablement.toml +3 -0
- package/.codex/agents/css-motion-artist.toml +3 -0
- package/.codex/agents/curriculum-designer.toml +3 -0
- package/.codex/agents/cyber-orqx.toml +3 -0
- package/.codex/agents/dan-harmon.toml +3 -0
- package/.codex/agents/data-engineer.toml +3 -0
- package/.codex/agents/data-synthesizer.toml +3 -0
- package/.codex/agents/deep-researcher.toml +3 -0
- package/.codex/agents/derek-sivers.toml +3 -0
- package/.codex/agents/design-orqx.toml +3 -0
- package/.codex/agents/design-system.toml +3 -0
- package/.codex/agents/developer.toml +3 -0
- package/.codex/agents/devops.toml +3 -0
- package/.codex/agents/direct-response-writer.toml +3 -0
- package/.codex/agents/dx-accessibility-specialist.toml +3 -0
- package/.codex/agents/dx-design-system-architect.toml +3 -0
- package/.codex/agents/dx-frontend-engineer.toml +3 -0
- package/.codex/agents/dx-interaction-designer.toml +3 -0
- package/.codex/agents/dx-performance-engineer.toml +3 -0
- package/.codex/agents/dx-ui-designer.toml +3 -0
- package/.codex/agents/dx-ux-strategist.toml +3 -0
- package/.codex/agents/editorial-strategist.toml +3 -0
- package/.codex/agents/email-sequence-strategist.toml +3 -0
- package/.codex/agents/finance-orqx.toml +3 -0
- package/.codex/agents/fiscal-compliance-br.toml +3 -0
- package/.codex/agents/forecast-strategist.toml +3 -0
- package/.codex/agents/funnel-copywriter.toml +3 -0
- package/.codex/agents/ga-analytics-engineer.toml +3 -0
- package/.codex/agents/ga-campaign-analyst.toml +3 -0
- package/.codex/agents/ga-cro-specialist.toml +3 -0
- package/.codex/agents/ga-data-analyst.toml +3 -0
- package/.codex/agents/ga-growth-hacker.toml +3 -0
- package/.codex/agents/ga-seo-strategist.toml +3 -0
- package/.codex/agents/generative-particle-engineer.toml +3 -0
- package/.codex/agents/google-ads-specialist.toml +3 -0
- package/.codex/agents/growth-orqx.toml +3 -0
- package/.codex/agents/headline-specialist.toml +3 -0
- package/.codex/agents/hooks-architect.toml +3 -0
- package/.codex/agents/incident-responder.toml +3 -0
- package/.codex/agents/joseph-campbell.toml +3 -0
- package/.codex/agents/kb-architect.toml +3 -0
- package/.codex/agents/keith-johnstone.toml +3 -0
- package/.codex/agents/kindra-hall.toml +3 -0
- package/.codex/agents/launch-strategist.toml +3 -0
- package/.codex/agents/lesson-architect.toml +3 -0
- package/.codex/agents/long-form-writer.toml +3 -0
- package/.codex/agents/market-analyst.toml +3 -0
- package/.codex/agents/marshall-ganz.toml +3 -0
- package/.codex/agents/mcp-integrator.toml +3 -0
- package/.codex/agents/meta-ads-specialist.toml +3 -0
- package/.codex/agents/mind-synthesizer.toml +3 -0
- package/.codex/agents/motion-choreographer.toml +3 -0
- package/.codex/agents/nancy-duarte.toml +3 -0
- package/.codex/agents/naval-ravikant.toml +3 -0
- package/.codex/agents/network-security-engineer.toml +3 -0
- package/.codex/agents/oren-klaff.toml +3 -0
- package/.codex/agents/paidmedia-orqx.toml +3 -0
- package/.codex/agents/park-howell.toml +3 -0
- package/.codex/agents/patrick-lencioni.toml +3 -0
- package/.codex/agents/penetration-tester.toml +3 -0
- package/.codex/agents/performance-engineer.toml +3 -0
- package/.codex/agents/persuasion-psychologist.toml +3 -0
- package/.codex/agents/peter-thiel.toml +3 -0
- package/.codex/agents/platform-aesthetic-director.toml +3 -0
- package/.codex/agents/platform-specialist.toml +3 -0
- package/.codex/agents/pm-creative-performance-analyst.toml +3 -0
- package/.codex/agents/pm-youtube-ads-specialist.toml +3 -0
- package/.codex/agents/premium-packaging-strategist.toml +3 -0
- package/.codex/agents/pricing-strategist.toml +3 -0
- package/.codex/agents/product-lead.toml +3 -0
- package/.codex/agents/product-orqx.toml +3 -0
- package/.codex/agents/product-surface-director.toml +3 -0
- package/.codex/agents/production-director.toml +3 -0
- package/.codex/agents/profitability-analyst.toml +3 -0
- package/.codex/agents/project-integrator.toml +3 -0
- package/.codex/agents/project-lead.toml +3 -0
- package/.codex/agents/proof-architect.toml +3 -0
- package/.codex/agents/ps-client-product-manager.toml +3 -0
- package/.codex/agents/ps-delivery-manager.toml +3 -0
- package/.codex/agents/ps-discovery-lead.toml +3 -0
- package/.codex/agents/ps-product-analyst.toml +3 -0
- package/.codex/agents/ps-product-ops-specialist.toml +3 -0
- package/.codex/agents/ps-product-strategist.toml +3 -0
- package/.codex/agents/quality-gate.toml +3 -0
- package/.codex/agents/ray-dalio.toml +3 -0
- package/.codex/agents/reid-hoffman.toml +3 -0
- package/.codex/agents/research-orqx.toml +3 -0
- package/.codex/agents/revenue-analyst.toml +3 -0
- package/.codex/agents/roadmap-sentinel.toml +3 -0
- package/.codex/agents/scroll-narrative-engineer.toml +3 -0
- package/.codex/agents/shader-artist.toml +3 -0
- package/.codex/agents/signal-intelligence.toml +3 -0
- package/.codex/agents/simon-sinek.toml +3 -0
- package/.codex/agents/skill-craftsman.toml +3 -0
- package/.codex/agents/slide-designer.toml +3 -0
- package/.codex/agents/snps-orqx.toml +3 -0
- package/.codex/agents/soc-analyst.toml +3 -0
- package/.codex/agents/sop-extractor.toml +3 -0
- package/.codex/agents/source-hunter.toml +3 -0
- package/.codex/agents/sprint-lead.toml +3 -0
- package/.codex/agents/squad-assembler.toml +3 -0
- package/.codex/agents/squad-creator.toml +3 -0
- package/.codex/agents/storytelling-orqx.toml +3 -0
- package/.codex/agents/swarm-orqx.toml +3 -0
- package/.codex/agents/threat-analyst.toml +3 -0
- package/.codex/agents/threejs-architect.toml +3 -0
- package/.codex/agents/trend-forecaster.toml +3 -0
- package/.codex/agents/ux-design-expert.toml +3 -0
- package/.codex/agents/ux-designer.toml +3 -0
- package/.codex/agents/yvon-chouinard.toml +3 -0
- package/.codex/catalog.json +19 -4
- package/.codex/command-registry.json +94 -0
- package/.codex/config.toml +8 -0
- package/.codex/delegation-matrix.json +39 -25
- package/.codex/delegation-parity.json +46 -41
- package/.codex/hooks/claude-compat.cjs +547 -0
- package/.codex/hooks.json +123 -0
- package/.codex/scripts/resolve-codex-agent.js +30 -1
- package/.codex/scripts/resolve-codex-workflow.js +283 -0
- package/.codex/scripts/sinapse-codex.js +309 -0
- package/.codex/scripts/sync-codex-native.js +614 -0
- package/.codex/scripts/validate-codex-native.js +287 -0
- package/.codex/skills/react-bits-frontend/SKILL.md +66 -0
- package/.codex/skills/react-bits-frontend/agents/openai.yaml +4 -0
- package/.codex/skills/react-bits-frontend/references/corpus-map.md +29 -0
- package/.codex/skills/sinapse/SKILL.md +10 -0
- package/.codex/skills/sinapse-agent/SKILL.md +22 -0
- package/.codex/skills/sinapse-claude/SKILL.md +1 -1
- package/.codex/skills/sinapse-loop/SKILL.md +35 -0
- package/.codex/skills/sinapse-orqx/SKILL.md +33 -14
- package/.codex/skills/sinapse-spec-driven/SKILL.md +35 -0
- package/.codex/skills/snps/SKILL.md +10 -0
- package/.codex/skills/snps-orqx/SKILL.md +10 -0
- package/.sinapse-ai/data/entity-registry.yaml +57 -31
- package/.sinapse-ai/install-manifest.yaml +5 -5
- package/.sinapse-ai/product/templates/statusline/agent-badges.json +37 -37
- package/AGENTS.md +5 -4
- package/CHANGELOG.md +27 -3
- package/README.en.md +1 -1
- package/README.md +25 -10
- package/bin/commands/install.js +56 -41
- package/bin/commands/uninstall.js +57 -4
- package/bin/commands/update.js +32 -21
- package/bin/lib/command-generator.js +25 -3
- package/bin/lib/global-provider-adapters.js +136 -0
- package/bin/utils/validate-publish.js +43 -10
- package/docs/framework/codex-parity/codex-native-runtime-v2.md +230 -0
- package/docs/framework/codex-parity/codex-workflow-task-parity.md +21 -7
- package/docs/framework/react-bits/animations.md +49 -0
- package/docs/framework/react-bits/audit-findings.md +103 -0
- package/docs/framework/react-bits/backgrounds.md +63 -0
- package/docs/framework/react-bits/catalog-summary.json +61 -0
- package/docs/framework/react-bits/components.md +58 -0
- package/docs/framework/react-bits/implementation-playbook.md +161 -0
- package/docs/framework/react-bits/index.md +130 -0
- package/docs/framework/react-bits/inventory.json +9333 -0
- package/docs/framework/react-bits/text-animations.md +41 -0
- package/docs/framework/software-engineering-applicability.md +31 -0
- package/docs/getting-started.md +6 -2
- package/docs/installation/README.md +2 -2
- package/package.json +18 -5
- package/packages/engineering-applicability/fixtures.json +52 -0
- package/packages/engineering-applicability/index.js +150 -0
- package/packages/installer/src/installer/sinapse-ai-installer.js +87 -2
- package/packages/installer/src/updater/index.js +34 -13
- package/packages/installer/src/wizard/feedback.js +1 -1
- package/packages/installer/src/wizard/ide-config-generator.js +18 -0
- package/packages/installer/src/wizard/index.js +101 -74
- package/scripts/gen-agent-badges.js +17 -1
- package/scripts/release-readiness.js +9 -3
- package/scripts/research/generate-react-bits-catalog.mjs +206 -0
- package/scripts/sync-provider-adapters.js +203 -0
- package/scripts/validate-provider-adapters.js +127 -0
- package/squads/squad-animations/knowledge-base/react-bits-operational-guide.md +43 -0
- package/squads/squad-animations/squad.yaml +10 -5
- package/squads/squad-animations/tasks/orchestrate-react-bits-frontend.md +60 -0
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
SINAPSE é um meta-framework open source que organiza **172 agentes de IA em 17 squads especializados**, operando direto no terminal via Claude Code ou Codex CLI. Cada agente tem um papel definido, cada squad domina uma disciplina, e o sistema inteiro é governado por uma **Constitution com enforcement real** — 20 hooks registrados que bloqueiam violações em tempo de execução.
|
|
25
25
|
|
|
26
|
-
O conceito central é simples: em vez de um único assistente de IA tentando fazer tudo, o SINAPSE estrutura o trabalho em equipes especializadas. Um squad de branding cuida da identidade visual. Um squad de cybersecurity cuida de compliance e pentest. Um squad de copywriting cuida de persuasão e conversão. Cada um com sua própria knowledge base, workflows e tasks — totalizando **1.
|
|
26
|
+
O conceito central é simples: em vez de um único assistente de IA tentando fazer tudo, o SINAPSE estrutura o trabalho em equipes especializadas. Um squad de branding cuida da identidade visual. Um squad de cybersecurity cuida de compliance e pentest. Um squad de copywriting cuida de persuasão e conversão. Cada um com sua própria knowledge base, workflows e tasks — totalizando **1.201 tasks executáveis** prontas para uso, distribuídas pelos 17 squads.
|
|
27
27
|
|
|
28
28
|
Diferente de ferramentas que apenas conversam com IA, o SINAPSE impõe disciplina. O pipeline **Documentation-First** exige que uma story seja criada e validada antes de qualquer linha de código. Quality gates rodam automaticamente antes de merge. Agentes não autorizados são bloqueados de fazer push. Tudo isso via hooks que interceptam operações em tempo real — não depois.
|
|
29
29
|
|
|
@@ -41,10 +41,13 @@ O diferencial não é apenas a quantidade de agentes. É **governança real**: 2
|
|
|
41
41
|
|
|
42
42
|
## Quick Start
|
|
43
43
|
|
|
44
|
+
> Use `@latest` nos comandos publicos para evitar que o cache do `npx` execute
|
|
45
|
+
> uma versao anterior durante instalacoes e atualizacoes.
|
|
46
|
+
|
|
44
47
|
### 1. Instale
|
|
45
48
|
|
|
46
49
|
```bash
|
|
47
|
-
npx sinapse-ai install
|
|
50
|
+
npx sinapse-ai@latest install
|
|
48
51
|
```
|
|
49
52
|
|
|
50
53
|
O wizard detecta seu ambiente, escolhe a IDE (Claude Code ou Codex) e instala os 17 squads automaticamente. Re-rodar o comando faz upsert idempotente — preserva suas customizações e só atualiza o que mudou.
|
|
@@ -52,8 +55,8 @@ O wizard detecta seu ambiente, escolhe a IDE (Claude Code ou Codex) e instala os
|
|
|
52
55
|
### 2. Verifique
|
|
53
56
|
|
|
54
57
|
```bash
|
|
55
|
-
npx sinapse-ai status # Lista de squads + agentes instalados
|
|
56
|
-
npx sinapse-ai doctor # 16 health checks contra o ambiente
|
|
58
|
+
npx sinapse-ai@latest status # Lista de squads + agentes instalados
|
|
59
|
+
npx sinapse-ai@latest doctor # 16 health checks contra o ambiente
|
|
57
60
|
```
|
|
58
61
|
|
|
59
62
|
Se algo estiver fora do lugar, `doctor --fix` corrige automaticamente.
|
|
@@ -120,7 +123,7 @@ Cada release passa por uma matriz de instalação de 27 combinações (3 OSes ×
|
|
|
120
123
|
### "Como atualizar sem perder minhas customizações?"
|
|
121
124
|
|
|
122
125
|
```bash
|
|
123
|
-
npx sinapse-ai update
|
|
126
|
+
npx sinapse-ai@latest update
|
|
124
127
|
```
|
|
125
128
|
|
|
126
129
|
O update é **idempotente por design**. L1 (framework core) e L2 (templates) são atualizados. L3 (configuração) e L4 (suas stories, packages, customizações) **nunca são tocados**. Você pode rodar `update` quantas vezes quiser, inclusive após customizar rules localmente. Nada se perde.
|
|
@@ -282,7 +285,7 @@ Cada squad é uma equipe autônoma com orquestrador, agentes especialistas, know
|
|
|
282
285
|
| **squad-growth** | Analytics, CRO, SEO, growth hacking | 7 |
|
|
283
286
|
| **squad-finance** | Budget, pricing, profitability analysis | 8 |
|
|
284
287
|
|
|
285
|
-
**Total: 17 squads, 172 agentes especializados, 1.
|
|
288
|
+
**Total: 17 squads, 172 agentes especializados, 1.201 tasks**
|
|
286
289
|
|
|
287
290
|
Cada squad é ativado via seu orquestrador:
|
|
288
291
|
|
|
@@ -303,8 +306,8 @@ O SINAPSE suporta duas IDEs com integrações profundas:
|
|
|
303
306
|
|
|
304
307
|
| IDE | Ativação | Destaques |
|
|
305
308
|
|-----|----------|-----------|
|
|
306
|
-
| **Claude Code** | `@agent-name` |
|
|
307
|
-
| **Codex CLI** |
|
|
309
|
+
| **Claude Code** | `@agent-name` ou `/skill-name` | Subagentes e skills nativos, hooks e rules contextuais |
|
|
310
|
+
| **Codex CLI** | `$snps` ou `$sinapse-agent agent-id` | Agentes TOML, skills nativas e `codex exec` para CI/CD |
|
|
308
311
|
|
|
309
312
|
Ambas as IDEs têm acesso a todos os 17 squads, 172 agentes, workflows e knowledge bases. O installer detecta e configura automaticamente.
|
|
310
313
|
|
|
@@ -312,7 +315,7 @@ Ambas as IDEs têm acesso a todos os 17 squads, 172 agentes, workflows e knowled
|
|
|
312
315
|
|
|
313
316
|
| Funcionalidade | Claude Code | Codex CLI |
|
|
314
317
|
|---------------|:-----------:|:---------:|
|
|
315
|
-
| Ativação
|
|
318
|
+
| Ativação dos 172 agentes | `@agent-name` | `$sinapse-agent agent-id` |
|
|
316
319
|
| Hooks constitucionais (20) | Completo | Parcial (5) |
|
|
317
320
|
| Story-driven development | Completo | Completo |
|
|
318
321
|
| Quality gates | Completo | Completo |
|
|
@@ -401,6 +404,18 @@ Pre-commit e pre-push hooks validam automaticamente antes de cada operação.
|
|
|
401
404
|
|
|
402
405
|
## CLI Reference
|
|
403
406
|
|
|
407
|
+
Comandos deterministas para o pacote publico:
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
# Projeto novo ou existente
|
|
411
|
+
npx sinapse-ai@latest install
|
|
412
|
+
npx sinapse-ai@latest update
|
|
413
|
+
|
|
414
|
+
# Instalacao global existente
|
|
415
|
+
npm install -g sinapse-ai@latest
|
|
416
|
+
sinapse-ai update
|
|
417
|
+
```
|
|
418
|
+
|
|
404
419
|
A superfície pública é proposital — quatro comandos canônicos de lifecycle, dois diagnósticos, um sub-comando avançado.
|
|
405
420
|
|
|
406
421
|
```bash
|
|
@@ -421,7 +436,7 @@ npx sinapse-ai doctor --dry-run # Mostra o que `--fix` faria sem aplicar
|
|
|
421
436
|
npx sinapse-ai chrome-brain install # Instala browser automation
|
|
422
437
|
```
|
|
423
438
|
|
|
424
|
-
Todos os comandos são seguros para re-rodar.
|
|
439
|
+
Todos os comandos são seguros para re-rodar. No Claude Code, digite `@` para selecionar um subagente ou use `/snps`. No Codex, use `$snps` para o orquestrador supremo e `$sinapse-agent <id>` para qualquer agente do catálogo.
|
|
425
440
|
|
|
426
441
|
### Orquestração (avançado)
|
|
427
442
|
|
package/bin/commands/install.js
CHANGED
|
@@ -36,7 +36,11 @@ const {
|
|
|
36
36
|
warnNonInteractive,
|
|
37
37
|
} = require('../lib/detection');
|
|
38
38
|
const { promptLlmChoice } = require('../lib/prompts');
|
|
39
|
-
const {
|
|
39
|
+
const {
|
|
40
|
+
recordInstalledAgents,
|
|
41
|
+
reconcileInstalledAgents,
|
|
42
|
+
removeManagedGlobalSkills,
|
|
43
|
+
} = require('./uninstall');
|
|
40
44
|
const { verifyInstall } = require('./status');
|
|
41
45
|
// generateCommandMd is re-exported below for backward-compat (update.js imports it
|
|
42
46
|
// from ./install). regenerateAgentCommands is the shared Phase 2 helper.
|
|
@@ -44,6 +48,7 @@ const {
|
|
|
44
48
|
generateCommandMd,
|
|
45
49
|
regenerateAgentCommands,
|
|
46
50
|
} = require('../lib/command-generator');
|
|
51
|
+
const { deliverGlobalProviderAdapters, getGlobalCommandStagingDir } = require('../lib/global-provider-adapters');
|
|
47
52
|
// Follow-up #13 — wire the transactional backup/rollback engine into the
|
|
48
53
|
// installer so an in-place UPGRADE (upsert) that fails mid-flight is restored
|
|
49
54
|
// to its previous state instead of leaving ~/.sinapse half-updated.
|
|
@@ -300,19 +305,10 @@ async function cmdInstallGlobal(opts = {}) {
|
|
|
300
305
|
// greeting on @sinapse/@snps/-orqx). Re-copy the generated command files LAST so the
|
|
301
306
|
// rich, frontmatter'd stubs are always the final word. Idempotent.
|
|
302
307
|
try {
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
if (
|
|
307
|
-
const cmdFiles = fs.readdirSync(CLAUDE_COMMANDS_DIR).filter(f => f.endsWith('.md'));
|
|
308
|
-
for (const dir of reTargets) {
|
|
309
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
310
|
-
for (const f of cmdFiles) {
|
|
311
|
-
fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(dir, f));
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
logger.always(` ${GREEN}OK${NC} Global agents reconciled (${cmdFiles.length} files — rich stubs authoritative)`);
|
|
315
|
-
}
|
|
308
|
+
const commandsDir = getGlobalCommandStagingDir({ llmChoice, sinapseHome: SINAPSE_HOME, claudeCommandsDir: CLAUDE_COMMANDS_DIR });
|
|
309
|
+
const reconciled = deliverGlobalProviderAdapters({ llmChoice, home: HOME, commandsDir });
|
|
310
|
+
const total = reconciled.claude.length + reconciled.codex.length + reconciled.skills.length;
|
|
311
|
+
if (total) logger.always(` ${GREEN}OK${NC} Global provider adapters reconciled (${total} artifacts)`);
|
|
316
312
|
} catch (e) {
|
|
317
313
|
logger.always(` ${YELLOW}WARN${NC} Global agent reconciliation: ${e.message}`);
|
|
318
314
|
}
|
|
@@ -324,9 +320,14 @@ async function cmdInstallGlobal(opts = {}) {
|
|
|
324
320
|
// printed above: if any check failed (✗), show a warning banner instead of an
|
|
325
321
|
// unconditional success banner. The exit code is intentionally left unchanged —
|
|
326
322
|
// this only changes the message, not the process result.
|
|
323
|
+
const verificationCommandsDir = getGlobalCommandStagingDir({
|
|
324
|
+
llmChoice,
|
|
325
|
+
sinapseHome: SINAPSE_HOME,
|
|
326
|
+
claudeCommandsDir: CLAUDE_COMMANDS_DIR,
|
|
327
|
+
});
|
|
327
328
|
const installVerified =
|
|
328
329
|
fs.existsSync(SINAPSE_HOME) &&
|
|
329
|
-
fs.existsSync(
|
|
330
|
+
fs.existsSync(verificationCommandsDir) &&
|
|
330
331
|
fs.existsSync(path.join(BIN_DIR, 'sinapse')) &&
|
|
331
332
|
fs.existsSync(path.join(SINAPSE_HOME, '.claude', 'rules', 'squad-awareness.md'));
|
|
332
333
|
|
|
@@ -351,8 +352,13 @@ async function cmdInstallGlobal(opts = {}) {
|
|
|
351
352
|
logger.always(` ${startCmd}`);
|
|
352
353
|
logger.always('');
|
|
353
354
|
logger.always(` ${BOLD}Try an agent:${NC}`);
|
|
354
|
-
|
|
355
|
-
|
|
355
|
+
if (llmChoice === 'codex') {
|
|
356
|
+
logger.always(` ${CYAN}$snps${NC}`);
|
|
357
|
+
logger.always(` ${CYAN}$sinapse-agent brand-orqx${NC}`);
|
|
358
|
+
} else {
|
|
359
|
+
logger.always(` ${CYAN}@sinapse-orqx${NC}`);
|
|
360
|
+
logger.always(` ${CYAN}@brand-orqx${NC}`);
|
|
361
|
+
}
|
|
356
362
|
logger.always('');
|
|
357
363
|
}
|
|
358
364
|
|
|
@@ -396,7 +402,10 @@ function buildTransactionPaths(llmChoice) {
|
|
|
396
402
|
CLAUDE_COMMANDS_DIR, // Phase 2 — generated /SINAPSE:agents:* command files
|
|
397
403
|
];
|
|
398
404
|
if (llmChoice === 'claude-code' || llmChoice === 'both') dirs.push(path.join(HOME, '.claude', 'agents'));
|
|
399
|
-
if (llmChoice === 'codex' || llmChoice === 'both')
|
|
405
|
+
if (llmChoice === 'codex' || llmChoice === 'both') {
|
|
406
|
+
dirs.push(path.join(HOME, '.codex', 'agents'));
|
|
407
|
+
dirs.push(path.join(HOME, '.agents', 'skills'));
|
|
408
|
+
}
|
|
400
409
|
dirs.push(BIN_DIR); // Phase 4 — launcher(s)
|
|
401
410
|
|
|
402
411
|
const files = [path.join(HOME, '.claude', 'settings.json')]; // language save
|
|
@@ -520,43 +529,49 @@ function installFatalPhases({ squads, squadsDir, isUpsert, llmChoice, existing,
|
|
|
520
529
|
logger.always(` ${GREEN}OK${NC} sinapse (master, ${masterAgents} agents)`);
|
|
521
530
|
}
|
|
522
531
|
|
|
532
|
+
const coreDevelopmentSrc = path.join(ROOT, '.sinapse-ai', 'development');
|
|
533
|
+
const coreDevelopmentDest = path.join(SINAPSE_HOME, 'core');
|
|
534
|
+
if (fs.existsSync(coreDevelopmentSrc)) {
|
|
535
|
+
if (isUpsert) {
|
|
536
|
+
const delta = syncDirSync(coreDevelopmentSrc, coreDevelopmentDest);
|
|
537
|
+
totalDelta.added += delta.added;
|
|
538
|
+
totalDelta.updated += delta.updated;
|
|
539
|
+
totalDelta.unchanged += delta.unchanged;
|
|
540
|
+
totalDelta.removed += delta.removed;
|
|
541
|
+
} else {
|
|
542
|
+
rmDirSync(coreDevelopmentDest);
|
|
543
|
+
copyDirSync(coreDevelopmentSrc, coreDevelopmentDest);
|
|
544
|
+
}
|
|
545
|
+
const coreAgents = getAgentFiles(coreDevelopmentDest).length;
|
|
546
|
+
totalAgents += coreAgents;
|
|
547
|
+
logger.always(` ${GREEN}OK${NC} core development (${coreAgents} agents)`);
|
|
548
|
+
}
|
|
549
|
+
|
|
523
550
|
// Phase 2: Generate agent commands (shared with `update` via command-generator).
|
|
524
551
|
logger.always(`\n${CYAN}Phase 2:${NC} Generating agent commands`);
|
|
552
|
+
const commandStagingDir = getGlobalCommandStagingDir({ llmChoice, sinapseHome: SINAPSE_HOME, claudeCommandsDir: CLAUDE_COMMANDS_DIR });
|
|
525
553
|
const { writtenAgents } = regenerateAgentCommands({
|
|
526
554
|
sinapseHome: SINAPSE_HOME,
|
|
527
|
-
commandsDir:
|
|
555
|
+
commandsDir: commandStagingDir,
|
|
528
556
|
squads,
|
|
529
557
|
sinapseMasterDest,
|
|
558
|
+
coreDevelopmentDest,
|
|
530
559
|
});
|
|
531
560
|
logger.always(` ${GREEN}OK${NC} ${writtenAgents.size} total command files`);
|
|
532
561
|
|
|
533
562
|
// Phase 2b: Install global agents based on LLM choice
|
|
534
|
-
const
|
|
563
|
+
const globalAdapters = deliverGlobalProviderAdapters({ llmChoice, home: HOME, commandsDir: commandStagingDir });
|
|
564
|
+
const installedAgentFilenames = new Set([...globalAdapters.claude, ...globalAdapters.codex]);
|
|
535
565
|
const installedIdes = [];
|
|
536
|
-
if (
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(globalAgentsDir, f));
|
|
541
|
-
installedAgentFilenames.add(f);
|
|
542
|
-
}
|
|
543
|
-
installedIdes.push('claude-code');
|
|
544
|
-
logger.always(` ${GREEN}OK${NC} Claude Code global agents (${writtenAgents.size})`);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
if (llmChoice === 'codex' || llmChoice === 'both') {
|
|
548
|
-
const codexAgentsDir = path.join(HOME, '.codex', 'agents');
|
|
549
|
-
fs.mkdirSync(codexAgentsDir, { recursive: true });
|
|
550
|
-
for (const f of fs.readdirSync(CLAUDE_COMMANDS_DIR).filter(f => f.endsWith('.md'))) {
|
|
551
|
-
fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(codexAgentsDir, f));
|
|
552
|
-
installedAgentFilenames.add(f);
|
|
553
|
-
}
|
|
554
|
-
installedIdes.push('codex');
|
|
555
|
-
logger.always(` ${GREEN}OK${NC} Codex global agents (${writtenAgents.size})`);
|
|
556
|
-
}
|
|
566
|
+
if (globalAdapters.claude.length) installedIdes.push('claude-code');
|
|
567
|
+
if (globalAdapters.codex.length) installedIdes.push('codex');
|
|
568
|
+
if (globalAdapters.claude.length) logger.always(` ${GREEN}OK${NC} Claude Code global agents (${globalAdapters.claude.length})`);
|
|
569
|
+
if (globalAdapters.codex.length) logger.always(` ${GREEN}OK${NC} Codex global agents (${globalAdapters.codex.length} TOML, ${globalAdapters.skills.length} skills)`);
|
|
557
570
|
|
|
558
571
|
// Audit 1 P0 (UN-1) — record manifest so uninstall can remove every file
|
|
559
572
|
// we wrote (not just `*-orqx.md`). Idempotent: re-install overwrites.
|
|
573
|
+
reconcileInstalledAgents(HOME, installedAgentFilenames);
|
|
574
|
+
if (llmChoice === 'claude-code') removeManagedGlobalSkills(HOME);
|
|
560
575
|
recordInstalledAgents(installedAgentFilenames, installedIdes);
|
|
561
576
|
|
|
562
577
|
// Phase 3: Generate squad-awareness.md
|
|
@@ -82,12 +82,12 @@ function readInstalledAgentsManifest() {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
function removeInstalledAgentsFrom(dir) {
|
|
85
|
+
function removeInstalledAgentsFrom(dir, manifestOverride = null) {
|
|
86
86
|
if (!fs.existsSync(dir)) return { removed: 0, existed: false };
|
|
87
87
|
let removed = 0;
|
|
88
88
|
let candidates;
|
|
89
89
|
|
|
90
|
-
const manifest = readInstalledAgentsManifest();
|
|
90
|
+
const manifest = manifestOverride || readInstalledAgentsManifest();
|
|
91
91
|
if (manifest && Array.isArray(manifest.filenames)) {
|
|
92
92
|
// Manifest path — surgical removal of exactly what install wrote.
|
|
93
93
|
candidates = manifest.filenames;
|
|
@@ -97,6 +97,9 @@ function removeInstalledAgentsFrom(dir) {
|
|
|
97
97
|
// `-orqx.md`, OR start with `name: sinapse-` in their frontmatter.
|
|
98
98
|
try {
|
|
99
99
|
candidates = fs.readdirSync(dir).filter((f) => {
|
|
100
|
+
if (f.endsWith('.toml')) {
|
|
101
|
+
try { return /SINAPSE/i.test(fs.readFileSync(path.join(dir, f), 'utf8').slice(0, 4000)); } catch { return false; }
|
|
102
|
+
}
|
|
100
103
|
if (!f.endsWith('.md')) return false;
|
|
101
104
|
if (/-orqx\.md$/.test(f)) return true;
|
|
102
105
|
try {
|
|
@@ -125,6 +128,46 @@ function removeOrqxAgentsFrom(dir) {
|
|
|
125
128
|
return removeInstalledAgentsFrom(dir);
|
|
126
129
|
}
|
|
127
130
|
|
|
131
|
+
const MANAGED_GLOBAL_SKILL_IDS = ['snps', 'sinapse', 'snps-orqx', 'sinapse-agent'];
|
|
132
|
+
const MANAGED_GLOBAL_SKILL_MARKER = 'SINAPSE-MANAGED:global-skill';
|
|
133
|
+
|
|
134
|
+
function removeManagedGlobalSkills(home = HOME) {
|
|
135
|
+
let removed = 0;
|
|
136
|
+
for (const skillId of MANAGED_GLOBAL_SKILL_IDS) {
|
|
137
|
+
const skillDir = path.join(home, '.agents', 'skills', skillId);
|
|
138
|
+
const skillPath = path.join(skillDir, 'SKILL.md');
|
|
139
|
+
if (!fs.existsSync(skillPath)) continue;
|
|
140
|
+
try {
|
|
141
|
+
const content = fs.readFileSync(skillPath, 'utf8');
|
|
142
|
+
if (!content.includes(MANAGED_GLOBAL_SKILL_MARKER)) continue;
|
|
143
|
+
fs.unlinkSync(skillPath);
|
|
144
|
+
if (fs.readdirSync(skillDir).length === 0) fs.rmdirSync(skillDir);
|
|
145
|
+
removed++;
|
|
146
|
+
} catch { /* best-effort */ }
|
|
147
|
+
}
|
|
148
|
+
return { removed };
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function reconcileInstalledAgents(home, desiredFilenames) {
|
|
152
|
+
const manifest = readInstalledAgentsManifest();
|
|
153
|
+
if (!manifest) return { removed: 0 };
|
|
154
|
+
const desired = new Set(desiredFilenames);
|
|
155
|
+
let removed = 0;
|
|
156
|
+
for (const filename of manifest.filenames) {
|
|
157
|
+
if (desired.has(filename)) continue;
|
|
158
|
+
const providerDir = filename.endsWith('.toml')
|
|
159
|
+
? path.join(home, '.codex', 'agents')
|
|
160
|
+
: path.join(home, '.claude', 'agents');
|
|
161
|
+
const filepath = path.join(providerDir, filename);
|
|
162
|
+
if (!fs.existsSync(filepath)) continue;
|
|
163
|
+
try {
|
|
164
|
+
fs.unlinkSync(filepath);
|
|
165
|
+
removed++;
|
|
166
|
+
} catch { /* best-effort */ }
|
|
167
|
+
}
|
|
168
|
+
return { removed };
|
|
169
|
+
}
|
|
170
|
+
|
|
128
171
|
// Story 10.40 — Strip SINAPSE-owned keys from ~/.claude/settings.json without
|
|
129
172
|
// touching anything else the user put there. Safe if the file is missing or
|
|
130
173
|
// already clean.
|
|
@@ -176,6 +219,7 @@ async function cmdUninstall(opts = {}) {
|
|
|
176
219
|
}
|
|
177
220
|
|
|
178
221
|
logger.always(`${BOLD}Uninstalling Sinapse...${NC}\n`);
|
|
222
|
+
const installedAgentsManifest = readInstalledAgentsManifest();
|
|
179
223
|
|
|
180
224
|
// Paths that are fully SINAPSE-owned (directory or launcher file)
|
|
181
225
|
const ownedItems = [
|
|
@@ -210,7 +254,7 @@ async function cmdUninstall(opts = {}) {
|
|
|
210
254
|
const claudeAgentsDir = path.join(HOME, '.claude', 'agents');
|
|
211
255
|
const codexAgentsDir = path.join(HOME, '.codex', 'agents');
|
|
212
256
|
|
|
213
|
-
const claudeRemoved = removeInstalledAgentsFrom(claudeAgentsDir);
|
|
257
|
+
const claudeRemoved = removeInstalledAgentsFrom(claudeAgentsDir, installedAgentsManifest);
|
|
214
258
|
if (!claudeRemoved.existed) {
|
|
215
259
|
logger.always(` ${YELLOW}-${NC} ~/.claude/agents/ SINAPSE files (dir not found)`);
|
|
216
260
|
} else if (claudeRemoved.removed === 0) {
|
|
@@ -219,7 +263,7 @@ async function cmdUninstall(opts = {}) {
|
|
|
219
263
|
logger.always(` ${GREEN}✓${NC} Removed ~/.claude/agents/ SINAPSE files (${claudeRemoved.removed} files)`);
|
|
220
264
|
}
|
|
221
265
|
|
|
222
|
-
const codexRemoved = removeInstalledAgentsFrom(codexAgentsDir);
|
|
266
|
+
const codexRemoved = removeInstalledAgentsFrom(codexAgentsDir, installedAgentsManifest);
|
|
223
267
|
if (!codexRemoved.existed) {
|
|
224
268
|
logger.always(` ${YELLOW}-${NC} ~/.codex/agents/ SINAPSE files (dir not found)`);
|
|
225
269
|
} else if (codexRemoved.removed === 0) {
|
|
@@ -229,6 +273,13 @@ async function cmdUninstall(opts = {}) {
|
|
|
229
273
|
}
|
|
230
274
|
|
|
231
275
|
// Story 10.40 — clean SINAPSE-owned keys from ~/.claude/settings.json
|
|
276
|
+
const skillsRemoved = removeManagedGlobalSkills(HOME);
|
|
277
|
+
if (skillsRemoved.removed > 0) {
|
|
278
|
+
logger.always(` ${GREEN}OK${NC} Removed global SINAPSE skills (${skillsRemoved.removed})`);
|
|
279
|
+
} else {
|
|
280
|
+
logger.always(` ${YELLOW}-${NC} Global SINAPSE skills (none present)`);
|
|
281
|
+
}
|
|
282
|
+
|
|
232
283
|
const settingsPath = path.join(HOME, '.claude', 'settings.json');
|
|
233
284
|
const settingsClean = cleanClaudeSettingsJson(settingsPath);
|
|
234
285
|
if (settingsClean.touched) {
|
|
@@ -259,6 +310,8 @@ module.exports = {
|
|
|
259
310
|
readInstalledAgentsManifest,
|
|
260
311
|
removeInstalledAgentsFrom,
|
|
261
312
|
removeOrqxAgentsFrom,
|
|
313
|
+
removeManagedGlobalSkills,
|
|
314
|
+
reconcileInstalledAgents,
|
|
262
315
|
cleanClaudeSettingsJson,
|
|
263
316
|
removeGitHooksConfig,
|
|
264
317
|
INSTALLED_AGENTS_MANIFEST,
|
package/bin/commands/update.js
CHANGED
|
@@ -29,7 +29,13 @@ const {
|
|
|
29
29
|
} = require('../lib/detection');
|
|
30
30
|
const { promptLlmChoice } = require('../lib/prompts');
|
|
31
31
|
const { generateSquadAwareness } = require('./install');
|
|
32
|
+
const {
|
|
33
|
+
recordInstalledAgents,
|
|
34
|
+
reconcileInstalledAgents,
|
|
35
|
+
removeManagedGlobalSkills,
|
|
36
|
+
} = require('./uninstall');
|
|
32
37
|
const { regenerateAgentCommands } = require('../lib/command-generator');
|
|
38
|
+
const { deliverGlobalProviderAdapters, getGlobalCommandStagingDir } = require('../lib/global-provider-adapters');
|
|
33
39
|
const { execSync } = require('child_process');
|
|
34
40
|
|
|
35
41
|
// Query the latest version published to npm. Returns null when npm is unreachable.
|
|
@@ -146,39 +152,44 @@ async function cmdUpdateGlobal() {
|
|
|
146
152
|
logger.always(` ${GREEN}OK${NC} sinapse (orqx)`);
|
|
147
153
|
}
|
|
148
154
|
|
|
155
|
+
const coreDevelopmentSrc = path.join(ROOT, '.sinapse-ai', 'development');
|
|
156
|
+
const coreDevelopmentDest = path.join(SINAPSE_HOME, 'core');
|
|
157
|
+
if (fs.existsSync(coreDevelopmentSrc)) {
|
|
158
|
+
const delta = syncDirSync(coreDevelopmentSrc, coreDevelopmentDest);
|
|
159
|
+
totalDelta.added += delta.added;
|
|
160
|
+
totalDelta.updated += delta.updated;
|
|
161
|
+
totalDelta.unchanged += delta.unchanged;
|
|
162
|
+
totalDelta.removed += delta.removed;
|
|
163
|
+
logger.always(` ${GREEN}OK${NC} core development`);
|
|
164
|
+
}
|
|
165
|
+
|
|
149
166
|
// Phase 2: Regenerate commands — shared with `install` so `update` produces the
|
|
150
167
|
// SAME complete set (every specialist command + the rich master Imperator stubs),
|
|
151
168
|
// not just the `-orqx` subset it used to write.
|
|
152
169
|
logger.always(`\n${CYAN}Phase 2:${NC} Regenerating commands`);
|
|
153
|
-
|
|
170
|
+
const commandStagingDir = getGlobalCommandStagingDir({ llmChoice, sinapseHome: SINAPSE_HOME, claudeCommandsDir: CLAUDE_COMMANDS_DIR });
|
|
171
|
+
rmDirSync(commandStagingDir);
|
|
154
172
|
const { writtenAgents, totalAgents } = regenerateAgentCommands({
|
|
155
173
|
sinapseHome: SINAPSE_HOME,
|
|
156
|
-
commandsDir:
|
|
174
|
+
commandsDir: commandStagingDir,
|
|
157
175
|
squads,
|
|
158
176
|
sinapseMasterDest: path.join(SINAPSE_HOME, 'sinapse'),
|
|
177
|
+
coreDevelopmentDest,
|
|
159
178
|
});
|
|
160
179
|
logger.always(` ${GREEN}OK${NC} ${writtenAgents.size} command files (${totalAgents} agents total)`);
|
|
161
180
|
|
|
162
181
|
// Phase 2b: Install global agents based on LLM choice
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
const codexAgentsDir = path.join(HOME, '.codex', 'agents');
|
|
175
|
-
fs.mkdirSync(codexAgentsDir, { recursive: true });
|
|
176
|
-
// Copy all generated agent commands for Codex
|
|
177
|
-
for (const f of fs.readdirSync(CLAUDE_COMMANDS_DIR).filter(f => f.endsWith('.md'))) {
|
|
178
|
-
fs.copyFileSync(path.join(CLAUDE_COMMANDS_DIR, f), path.join(codexAgentsDir, f));
|
|
179
|
-
}
|
|
180
|
-
logger.always(` ${GREEN}OK${NC} Codex global agents (${writtenAgents.size})`);
|
|
181
|
-
}
|
|
182
|
+
const globalAdapters = deliverGlobalProviderAdapters({ llmChoice, home: HOME, commandsDir: commandStagingDir });
|
|
183
|
+
if (globalAdapters.claude.length) logger.always(` ${GREEN}OK${NC} Claude Code global agents (${globalAdapters.claude.length})`);
|
|
184
|
+
if (globalAdapters.codex.length) logger.always(` ${GREEN}OK${NC} Codex global agents (${globalAdapters.codex.length} TOML, ${globalAdapters.skills.length} skills)`);
|
|
185
|
+
|
|
186
|
+
const installedAgentFilenames = new Set([...globalAdapters.claude, ...globalAdapters.codex]);
|
|
187
|
+
reconcileInstalledAgents(HOME, installedAgentFilenames);
|
|
188
|
+
if (llmChoice === 'claude-code') removeManagedGlobalSkills(HOME);
|
|
189
|
+
const installedIdes = [];
|
|
190
|
+
if (globalAdapters.claude.length) installedIdes.push('claude-code');
|
|
191
|
+
if (globalAdapters.codex.length) installedIdes.push('codex');
|
|
192
|
+
recordInstalledAgents(installedAgentFilenames, installedIdes);
|
|
182
193
|
|
|
183
194
|
// Phase 3: Regenerate awareness
|
|
184
195
|
logger.always(`\n${CYAN}Phase 3:${NC} Updating squad-awareness`);
|
|
@@ -116,7 +116,7 @@ Tasks: \`${squadPath}/tasks/\` · Workflows: \`${squadPath}/workflows/\` · Mani
|
|
|
116
116
|
`;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
function generateCommandMd(agentId, agentName, agentIcon, squadName, squadPath, agentFile) {
|
|
119
|
+
function generateCommandMd(agentId, agentName, agentIcon, squadName, squadPath, agentFile, options = {}) {
|
|
120
120
|
// Detecta se é orquestrador: id termina em -orqx OU é Imperator (snps-orqx/sinapse-orqx)
|
|
121
121
|
// ou um dos apelidos curtos do master (sinapse/snps).
|
|
122
122
|
const isOrchestrator = /-orqx$/.test(agentId) || agentId === 'snps-orqx' || agentId === 'sinapse-orqx' || agentId === 'sinapse' || agentId === 'snps';
|
|
@@ -139,6 +139,12 @@ function generateCommandMd(agentId, agentName, agentIcon, squadName, squadPath,
|
|
|
139
139
|
const fmDesc = (isOrchestrator
|
|
140
140
|
? `${agentName || agentId} — orchestrator for ${squadName}; diagnoses, routes to specialists and auto-generates an orchestration plan`
|
|
141
141
|
: `${agentName || agentId} — ${squadName} specialist`).replace(/["\n\r]/g, ' ').trim();
|
|
142
|
+
const manifestActivation = options.hasManifest === false
|
|
143
|
+
? '2. Use the installed core development module as canonical context'
|
|
144
|
+
: `2. Load the squad manifest at \`${squadPath}/squad.yaml\` for context`;
|
|
145
|
+
const manifestReference = options.hasManifest === false
|
|
146
|
+
? `- **Canonical module:** \`${squadPath}/\``
|
|
147
|
+
: `- **Squad Manifest:** \`${squadPath}/squad.yaml\``;
|
|
142
148
|
|
|
143
149
|
return `---
|
|
144
150
|
name: ${agentId}
|
|
@@ -151,7 +157,7 @@ ACTIVATION-NOTICE: This command activates an agent from ${squadName}.
|
|
|
151
157
|
|
|
152
158
|
CRITICAL: Read the agent definition file at \`${squadPath}/agents/${agentFile}\` to understand your full operating parameters. Then:
|
|
153
159
|
1. Adopt the persona defined in that file (name: ${agentName}, icon: ${agentIcon})
|
|
154
|
-
|
|
160
|
+
${manifestActivation}
|
|
155
161
|
3. Display a greeting showing your agent name, role, and available commands
|
|
156
162
|
${step4}
|
|
157
163
|
|
|
@@ -159,7 +165,7 @@ ${step4}
|
|
|
159
165
|
- **Agent ID:** ${agentId}
|
|
160
166
|
- **Squad:** ${squadName}
|
|
161
167
|
- **Definition:** \`${squadPath}/agents/${agentFile}\`
|
|
162
|
-
|
|
168
|
+
${manifestReference}
|
|
163
169
|
- **Tasks:** \`${squadPath}/tasks/\`
|
|
164
170
|
- **Knowledge Bases:** \`${squadPath}/knowledge-base/\`
|
|
165
171
|
- **Workflows:** \`${squadPath}/workflows/\`
|
|
@@ -209,6 +215,7 @@ function regenerateAgentCommands(deps = {}) {
|
|
|
209
215
|
commandsDir = CLAUDE_COMMANDS_DIR,
|
|
210
216
|
squads,
|
|
211
217
|
sinapseMasterDest = path.join(sinapseHome, 'sinapse'),
|
|
218
|
+
coreDevelopmentDest = path.join(sinapseHome, 'core'),
|
|
212
219
|
} = deps;
|
|
213
220
|
|
|
214
221
|
if (!Array.isArray(squads)) {
|
|
@@ -244,6 +251,21 @@ function regenerateAgentCommands(deps = {}) {
|
|
|
244
251
|
}
|
|
245
252
|
}
|
|
246
253
|
|
|
254
|
+
// Core agents are mirrored by the global installer so definitions and tasks
|
|
255
|
+
// remain resolvable after the npm process exits.
|
|
256
|
+
const coreAgentsDir = path.join(coreDevelopmentDest, 'agents');
|
|
257
|
+
if (fs.existsSync(coreAgentsDir)) {
|
|
258
|
+
const coreBase = toForwardSlash(coreDevelopmentDest);
|
|
259
|
+
for (const file of fs.readdirSync(coreAgentsDir).filter(f => f.endsWith('.md'))) {
|
|
260
|
+
if (file === 'README.md' || file === 'MEMORY.md' || file.startsWith('_') || writtenAgents.has(file)) continue;
|
|
261
|
+
const agentId = file.replace('.md', '');
|
|
262
|
+
const meta = extractAgentMeta(path.join(coreAgentsDir, file));
|
|
263
|
+
const cmdContent = generateCommandMd(agentId, meta.name, meta.icon, 'core', coreBase, file, { hasManifest: false });
|
|
264
|
+
atomicWriteFileSync(path.join(commandsDir, `${agentId}.md`), cmdContent);
|
|
265
|
+
writtenAgents.add(file);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
247
269
|
// 2. Commands for sinapse/ master squad agents.
|
|
248
270
|
if (fs.existsSync(sinapseMasterDest)) {
|
|
249
271
|
const masterAgentsDir = path.join(sinapseMasterDest, 'agents');
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
function parseAgentMarkdown(content, fallbackName) {
|
|
7
|
+
const name = content.match(/^name:\s*([^\r\n]+)$/m)?.[1]?.trim() || fallbackName;
|
|
8
|
+
const raw = content.match(/^description:\s*(.+)$/m)?.[1]?.trim() || `SINAPSE ${name} agent`;
|
|
9
|
+
return { name, description: raw.replace(/^['"]|['"]$/g, '') };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function renderCodexToml(name, description, instructions) {
|
|
13
|
+
return [
|
|
14
|
+
`name = ${JSON.stringify(name)}`,
|
|
15
|
+
`description = ${JSON.stringify(description)}`,
|
|
16
|
+
`developer_instructions = ${JSON.stringify(instructions)}`,
|
|
17
|
+
'',
|
|
18
|
+
].join('\n');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function renderGlobalSkill(skillId) {
|
|
22
|
+
const generic = skillId === 'sinapse-agent';
|
|
23
|
+
return [
|
|
24
|
+
'---',
|
|
25
|
+
`name: ${skillId}`,
|
|
26
|
+
`description: ${generic ? 'Resolve and activate any globally installed SINAPSE agent by ID.' : 'Activate the globally installed SINAPSE supreme orchestrator.'}`,
|
|
27
|
+
'---', '',
|
|
28
|
+
'<!-- SINAPSE-MANAGED:global-skill -->', '',
|
|
29
|
+
generic ? '# SINAPSE Global Agent Activator' : '# SINAPSE Global Orchestrator', '',
|
|
30
|
+
generic
|
|
31
|
+
? 'Use the requested ID from `~/.codex/agents/<id>.toml`; reject unknown IDs without guessing.'
|
|
32
|
+
: 'Resolve this alias to the `sinapse-orqx` custom agent and preserve its delegation-only authority.',
|
|
33
|
+
'Canonical global persona and task sources live under `~/.sinapse/`.',
|
|
34
|
+
'Use native Codex delegation and never start a nested CLI.', '',
|
|
35
|
+
].join('\n');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function writeFileAtomically(filePath, content) {
|
|
39
|
+
const temporaryPath = `${filePath}.${process.pid}.${Date.now()}.tmp`;
|
|
40
|
+
let handle;
|
|
41
|
+
try {
|
|
42
|
+
handle = fs.openSync(temporaryPath, 'wx', 0o600);
|
|
43
|
+
fs.writeFileSync(handle, content, 'utf8');
|
|
44
|
+
fs.fsyncSync(handle);
|
|
45
|
+
fs.closeSync(handle);
|
|
46
|
+
handle = undefined;
|
|
47
|
+
fs.renameSync(temporaryPath, filePath);
|
|
48
|
+
} finally {
|
|
49
|
+
if (handle !== undefined) fs.closeSync(handle);
|
|
50
|
+
try { fs.unlinkSync(temporaryPath); } catch { /* already published or cleanup is best-effort */ }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function writeGlobalSkillIfManaged(skillPath, content) {
|
|
55
|
+
fs.mkdirSync(path.dirname(skillPath), { recursive: true });
|
|
56
|
+
|
|
57
|
+
let handle;
|
|
58
|
+
try {
|
|
59
|
+
const noFollow = fs.constants.O_NOFOLLOW || 0;
|
|
60
|
+
handle = fs.openSync(skillPath, fs.constants.O_RDONLY | noFollow);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
if (error.code === 'ELOOP') return false;
|
|
63
|
+
if (error.code !== 'ENOENT') throw error;
|
|
64
|
+
try {
|
|
65
|
+
handle = fs.openSync(skillPath, 'wx');
|
|
66
|
+
} catch (createError) {
|
|
67
|
+
if (createError.code === 'EEXIST') return writeGlobalSkillIfManaged(skillPath, content);
|
|
68
|
+
throw createError;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
fs.writeFileSync(handle, content, 'utf8');
|
|
72
|
+
return true;
|
|
73
|
+
} finally {
|
|
74
|
+
fs.closeSync(handle);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
if (!fs.fstatSync(handle).isFile()) return false;
|
|
80
|
+
const existing = fs.readFileSync(handle, 'utf8');
|
|
81
|
+
if (!existing.includes('SINAPSE-MANAGED:global-skill')) return false;
|
|
82
|
+
fs.closeSync(handle);
|
|
83
|
+
handle = undefined;
|
|
84
|
+
writeFileAtomically(skillPath, content);
|
|
85
|
+
return true;
|
|
86
|
+
} finally {
|
|
87
|
+
if (handle !== undefined) fs.closeSync(handle);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function deliverGlobalProviderAdapters({ llmChoice, home, commandsDir }) {
|
|
92
|
+
const commandFiles = fs.existsSync(commandsDir)
|
|
93
|
+
? fs.readdirSync(commandsDir).filter((file) => file.endsWith('.md')).sort()
|
|
94
|
+
: [];
|
|
95
|
+
const written = { claude: [], codex: [], skills: [] };
|
|
96
|
+
|
|
97
|
+
if (llmChoice === 'claude-code' || llmChoice === 'both') {
|
|
98
|
+
const targetDir = path.join(home, '.claude', 'agents');
|
|
99
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
100
|
+
for (const file of commandFiles) {
|
|
101
|
+
fs.copyFileSync(path.join(commandsDir, file), path.join(targetDir, file));
|
|
102
|
+
written.claude.push(file);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (llmChoice === 'codex' || llmChoice === 'both') {
|
|
106
|
+
const targetDir = path.join(home, '.codex', 'agents');
|
|
107
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
108
|
+
for (const file of commandFiles) {
|
|
109
|
+
const markdown = fs.readFileSync(path.join(commandsDir, file), 'utf8');
|
|
110
|
+
const id = file.replace(/\.md$/, '');
|
|
111
|
+
const metadata = parseAgentMarkdown(markdown, id);
|
|
112
|
+
const tomlName = `${id}.toml`;
|
|
113
|
+
fs.writeFileSync(path.join(targetDir, tomlName), renderCodexToml(metadata.name, metadata.description, markdown), 'utf8');
|
|
114
|
+
const staleMarkdown = path.join(targetDir, file);
|
|
115
|
+
if (fs.existsSync(staleMarkdown)) fs.unlinkSync(staleMarkdown);
|
|
116
|
+
written.codex.push(tomlName);
|
|
117
|
+
}
|
|
118
|
+
const skillsRoot = path.join(home, '.agents', 'skills');
|
|
119
|
+
for (const skillId of ['snps', 'sinapse', 'snps-orqx', 'sinapse-agent']) {
|
|
120
|
+
const skillDir = path.join(skillsRoot, skillId);
|
|
121
|
+
const skillPath = path.join(skillDir, 'SKILL.md');
|
|
122
|
+
if (writeGlobalSkillIfManaged(skillPath, renderGlobalSkill(skillId))) {
|
|
123
|
+
written.skills.push(skillId);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return written;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function getGlobalCommandStagingDir({ llmChoice, sinapseHome, claudeCommandsDir }) {
|
|
131
|
+
return llmChoice === 'codex'
|
|
132
|
+
? path.join(sinapseHome, '.generated', 'agents')
|
|
133
|
+
: claudeCommandsDir;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
module.exports = { parseAgentMarkdown, renderCodexToml, renderGlobalSkill, writeGlobalSkillIfManaged, deliverGlobalProviderAdapters, getGlobalCommandStagingDir };
|