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
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Codex-to-Claude hook compatibility bridge.
|
|
6
|
+
*
|
|
7
|
+
* Codex reports file edits as one `apply_patch` invocation whose patch is in
|
|
8
|
+
* `tool_input.command`. Claude hooks expect one Write/Edit payload per file.
|
|
9
|
+
* This bridge expands every patch target, applies Codex-native fail-closed
|
|
10
|
+
* policies, and then invokes the existing portable Node.js guards without
|
|
11
|
+
* changing their source or their Claude registration.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const fs = require('fs');
|
|
15
|
+
const path = require('path');
|
|
16
|
+
const { spawnSync } = require('child_process');
|
|
17
|
+
|
|
18
|
+
const WRITE_GUARDS = [
|
|
19
|
+
'enforce-permission-mode.cjs',
|
|
20
|
+
'enforce-framework-boundary.cjs',
|
|
21
|
+
'enforce-architecture-first.cjs',
|
|
22
|
+
'write-path-validation.cjs',
|
|
23
|
+
'enforce-story-gate.cjs',
|
|
24
|
+
'doc-first-gate.cjs',
|
|
25
|
+
'enforce-nsn-guard.cjs',
|
|
26
|
+
'code-intel-pretool.cjs',
|
|
27
|
+
'enforce-delegation.cjs',
|
|
28
|
+
'secret-scanning.cjs',
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const BASH_GUARDS = [
|
|
32
|
+
'enforce-permission-mode.cjs',
|
|
33
|
+
'enforce-delegation.cjs',
|
|
34
|
+
'verify-packages.cjs',
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const PROTECTED_PREFIXES = [
|
|
38
|
+
'.sinapse-ai/core/',
|
|
39
|
+
'.sinapse-ai/development/tasks/',
|
|
40
|
+
'.sinapse-ai/development/templates/',
|
|
41
|
+
'.sinapse-ai/development/checklists/',
|
|
42
|
+
'.sinapse-ai/development/workflows/',
|
|
43
|
+
'.sinapse-ai/infrastructure/',
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
const PROTECTED_FILES = new Set([
|
|
47
|
+
'.sinapse-ai/constitution.md',
|
|
48
|
+
]);
|
|
49
|
+
|
|
50
|
+
const PLACEHOLDER_PATTERN = /(?:example|sample|dummy|fake|placeholder|changeme|replace[_-]?me|your[_-]?(?:key|token|secret)|redacted)/i;
|
|
51
|
+
|
|
52
|
+
function readInput() {
|
|
53
|
+
const raw = fs.readFileSync(0, 'utf8');
|
|
54
|
+
if (!raw.trim()) throw new Error('empty hook input');
|
|
55
|
+
const input = JSON.parse(raw);
|
|
56
|
+
if (!input || typeof input !== 'object' || Array.isArray(input)) {
|
|
57
|
+
throw new Error('hook input must be a JSON object');
|
|
58
|
+
}
|
|
59
|
+
return input;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function findProjectRoot(input) {
|
|
63
|
+
const starts = [input && input.cwd, process.cwd()].filter(Boolean);
|
|
64
|
+
|
|
65
|
+
for (const start of starts) {
|
|
66
|
+
let current = path.resolve(start);
|
|
67
|
+
while (true) {
|
|
68
|
+
const hasCodex = fs.existsSync(path.join(current, '.codex'));
|
|
69
|
+
const hasClaude = fs.existsSync(path.join(current, '.claude'));
|
|
70
|
+
if (hasCodex || hasClaude) return current;
|
|
71
|
+
const parent = path.dirname(current);
|
|
72
|
+
if (parent === current) break;
|
|
73
|
+
current = parent;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const git = spawnSync('git', ['rev-parse', '--show-toplevel'], {
|
|
78
|
+
cwd: starts[0] || process.cwd(),
|
|
79
|
+
encoding: 'utf8',
|
|
80
|
+
windowsHide: true,
|
|
81
|
+
});
|
|
82
|
+
if (git.status === 0 && git.stdout.trim()) return path.resolve(git.stdout.trim());
|
|
83
|
+
return path.resolve(starts[0] || process.cwd());
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function stripOptionalQuotes(value) {
|
|
87
|
+
const trimmed = String(value || '').trim();
|
|
88
|
+
if (
|
|
89
|
+
trimmed.length >= 2 &&
|
|
90
|
+
((trimmed.startsWith('"') && trimmed.endsWith('"')) ||
|
|
91
|
+
(trimmed.startsWith("'") && trimmed.endsWith("'")))
|
|
92
|
+
) {
|
|
93
|
+
return trimmed.slice(1, -1);
|
|
94
|
+
}
|
|
95
|
+
return trimmed;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function normalizeTarget(filePath, root) {
|
|
99
|
+
const raw = stripOptionalQuotes(filePath);
|
|
100
|
+
if (!raw || raw.includes('\0')) throw new Error('patch target is empty or invalid');
|
|
101
|
+
|
|
102
|
+
const looksWindowsAbsolute = /^[A-Za-z]:[\\/]/.test(raw);
|
|
103
|
+
const absolute = path.isAbsolute(raw) || looksWindowsAbsolute
|
|
104
|
+
? path.resolve(raw)
|
|
105
|
+
: path.resolve(root, raw);
|
|
106
|
+
const relative = path.relative(root, absolute).replace(/\\/g, '/');
|
|
107
|
+
|
|
108
|
+
if (!relative || relative === '..' || relative.startsWith('../') || path.isAbsolute(relative)) {
|
|
109
|
+
throw new Error(`patch target escapes the project root: ${raw}`);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return relative.replace(/^\.\//, '');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function parsePatchTargets(command, root) {
|
|
116
|
+
if (typeof command !== 'string' || !command.trim()) {
|
|
117
|
+
throw new Error('apply_patch input is missing tool_input.command');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const header = /^\*\*\* (Add|Update|Delete) File:\s*(.+?)\s*$/gm;
|
|
121
|
+
const matches = [...command.matchAll(header)];
|
|
122
|
+
if (matches.length === 0) throw new Error('apply_patch contains no file target');
|
|
123
|
+
|
|
124
|
+
const targets = [];
|
|
125
|
+
for (let index = 0; index < matches.length; index += 1) {
|
|
126
|
+
const match = matches[index];
|
|
127
|
+
const segmentStart = match.index + match[0].length;
|
|
128
|
+
const segmentEnd = index + 1 < matches.length ? matches[index + 1].index : command.length;
|
|
129
|
+
const segment = command.slice(segmentStart, segmentEnd).replace(/\*\*\* End Patch\s*$/, '');
|
|
130
|
+
const operation = match[1];
|
|
131
|
+
const target = {
|
|
132
|
+
operation,
|
|
133
|
+
filePath: normalizeTarget(match[2], root),
|
|
134
|
+
content: segment,
|
|
135
|
+
};
|
|
136
|
+
targets.push(target);
|
|
137
|
+
|
|
138
|
+
// apply_patch can rename an updated file. Treat the destination as another
|
|
139
|
+
// write target so a safe source cannot be moved into a protected path.
|
|
140
|
+
const move = segment.match(/^\*\*\* Move to:\s*(.+?)\s*$/m);
|
|
141
|
+
if (move) {
|
|
142
|
+
targets.push({
|
|
143
|
+
operation: 'Update',
|
|
144
|
+
filePath: normalizeTarget(move[1], root),
|
|
145
|
+
content: segment,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return targets;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function isProtectedPath(filePath) {
|
|
153
|
+
// Windows resolves path segments case-insensitively. Normalize policy checks
|
|
154
|
+
// on every platform so a mixed-case path cannot bypass the same protected
|
|
155
|
+
// file when the hook runs on Windows.
|
|
156
|
+
const normalized = filePath.replace(/\\/g, '/').replace(/^\.\//, '').toLowerCase();
|
|
157
|
+
if (PROTECTED_FILES.has(normalized)) return true;
|
|
158
|
+
if (PROTECTED_PREFIXES.some((prefix) => normalized.startsWith(prefix))) return true;
|
|
159
|
+
return /^bin\/sinapse[^/]*\.js$/i.test(normalized);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function fallbackSecretFindings(content) {
|
|
163
|
+
const patterns = [
|
|
164
|
+
/AKIA[0-9A-Z]{16}/,
|
|
165
|
+
/gh(?:p|o|u|s|r)_[A-Za-z0-9_]{30,}/,
|
|
166
|
+
/github_pat_[A-Za-z0-9_]{22,}/,
|
|
167
|
+
/sk-proj-[A-Za-z0-9_-]{40,}/,
|
|
168
|
+
/sk-(?:svcacct|admin)-[A-Za-z0-9_-]{20,}/,
|
|
169
|
+
/sk-ant-[A-Za-z0-9-]{20,}/,
|
|
170
|
+
/AIza[0-9A-Za-z_-]{35}/,
|
|
171
|
+
/(?:postgres(?:ql)?|mysql|mongodb|redis):\/\/[^:\s]+:[^@\s]+@/i,
|
|
172
|
+
/-----BEGIN (?:RSA |EC |DSA |OPENSSH |PGP )?PRIVATE KEY(?: BLOCK)?-----/,
|
|
173
|
+
/(?:api[_-]?key|access[_-]?token|password|passwd|secret)\s*[:=]\s*["']?[^\s"']{12,}/i,
|
|
174
|
+
];
|
|
175
|
+
|
|
176
|
+
for (const pattern of patterns) {
|
|
177
|
+
const match = pattern.exec(content);
|
|
178
|
+
if (match && !PLACEHOLDER_PATTERN.test(match[0])) return [{}];
|
|
179
|
+
}
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function findSecrets(content, filePath, root) {
|
|
184
|
+
try {
|
|
185
|
+
const scanner = require(path.join(root, 'bin', 'utils', 'secret-scanner-core.js'));
|
|
186
|
+
if (!scanner || typeof scanner.scanContent !== 'function') return fallbackSecretFindings(content);
|
|
187
|
+
return scanner.scanContent(content, { filePath });
|
|
188
|
+
} catch {
|
|
189
|
+
return fallbackSecretFindings(content);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function sqlPolicyViolation(command) {
|
|
194
|
+
const sql = command
|
|
195
|
+
.replace(/\/\*[\s\S]*?\*\//g, ' ')
|
|
196
|
+
// Preserve shell options such as `psql --command`; SQL comments written
|
|
197
|
+
// with the conventional `-- ` form are safe to remove globally. Mutation
|
|
198
|
+
// tails receive a stricter comment pass below.
|
|
199
|
+
.replace(/--(?=\s)[^\r\n]*/g, ' ');
|
|
200
|
+
|
|
201
|
+
if (/\bDROP\s+(?:TABLE|DATABASE|SCHEMA|MATERIALIZED\s+VIEW|VIEW|INDEX|FUNCTION|PROCEDURE|TRIGGER|TYPE|POLICY|ROLE|USER|EXTENSION|SEQUENCE|DOMAIN|OWNED|COLLATION|SERVER|TABLESPACE)\b/i.test(sql)) {
|
|
202
|
+
return 'DROP statement';
|
|
203
|
+
}
|
|
204
|
+
if (/\bTRUNCATE\b/i.test(sql)) return 'TRUNCATE statement';
|
|
205
|
+
if (/\bALTER\s+(?:TABLE|VIEW|TYPE|DATABASE|SEQUENCE|DOMAIN)\b[\s\S]*?\bDROP\b/i.test(sql)) {
|
|
206
|
+
return 'ALTER ... DROP statement';
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const statements = sql.split(';');
|
|
210
|
+
for (const statement of statements) {
|
|
211
|
+
const deleteMatch = /\bDELETE\s+FROM\b/i.exec(statement);
|
|
212
|
+
const updateMatch = /\bUPDATE\b[\s\S]{1,500}?\bSET\b/i.exec(statement);
|
|
213
|
+
for (const [match, violation] of [
|
|
214
|
+
[deleteMatch, 'DELETE without WHERE'],
|
|
215
|
+
[updateMatch, 'UPDATE without WHERE'],
|
|
216
|
+
]) {
|
|
217
|
+
if (!match) continue;
|
|
218
|
+
const mutation = statement
|
|
219
|
+
.slice(match.index)
|
|
220
|
+
.replace(/--[^\r\n]*/g, ' ')
|
|
221
|
+
.replace(/'(?:''|[^'])*'/g, "''")
|
|
222
|
+
.replace(/\s+/g, ' ');
|
|
223
|
+
if (!/\bWHERE\b\s+(?:[\w[\]`"($:@?])/i.test(mutation)) return violation;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function normalizePolicyCommand(command) {
|
|
230
|
+
return String(command || '')
|
|
231
|
+
// Common POSIX token separators and escape-based command obfuscation.
|
|
232
|
+
.replace(/\$\{?IFS\}?/gi, ' ')
|
|
233
|
+
.replace(/\\\r?\n/g, '')
|
|
234
|
+
.replace(/(?<=[A-Za-z0-9_])\\(?=[A-Za-z0-9_])/g, '')
|
|
235
|
+
// Shell concatenates adjacent quoted word fragments (DR""OP, p'u'sh).
|
|
236
|
+
// Remove only quotes between word characters so SQL string literals such
|
|
237
|
+
// as note='WHERE' remain quoted for the SQL policy's literal stripping.
|
|
238
|
+
.replace(/(?<=[A-Za-z0-9_])["']+(?=[A-Za-z0-9_])/g, '')
|
|
239
|
+
.replace(/\s+/g, ' ');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function gitPushPolicyViolation(command, activeAgent = process.env.SINAPSE_ACTIVE_AGENT) {
|
|
243
|
+
const pushPattern = /\bgit(?:\.exe)?(?:\s+(?!push\b)\S+){0,8}\s+push\b/ig;
|
|
244
|
+
const pushes = [...command.matchAll(pushPattern)];
|
|
245
|
+
if (pushes.length === 0) return null;
|
|
246
|
+
|
|
247
|
+
const normalizedAgent = String(activeAgent || '').trim().replace(/^@/, '').toLowerCase();
|
|
248
|
+
if (normalizedAgent !== 'devops') {
|
|
249
|
+
return 'git push is exclusive to @devops';
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
for (const push of pushes) {
|
|
253
|
+
const segment = command.slice(push.index).split(/&&|\|\||;|\r?\n/, 1)[0];
|
|
254
|
+
if (/(?:^|\s)(?:--force(?:-with-lease|-if-includes)?|-f)(?:\s|$)/i.test(segment)) {
|
|
255
|
+
return 'force-push is forbidden';
|
|
256
|
+
}
|
|
257
|
+
if (/(?:^|\s)(?:--all|--mirror|--tags|--delete|-d)(?:\s|$)/i.test(segment)) {
|
|
258
|
+
return 'git push must name an explicit non-protected branch';
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const tokens = (segment.match(/"[^"]*"|'[^']*'|\S+/g) || [])
|
|
262
|
+
.map((token) => token.replace(/^['"]|['"]$/g, ''));
|
|
263
|
+
const pushIndex = tokens.findIndex((token) => token.toLowerCase() === 'push');
|
|
264
|
+
if (pushIndex < 0) return 'git push could not be classified safely';
|
|
265
|
+
|
|
266
|
+
const positional = tokens.slice(pushIndex + 1).filter((token) => !token.startsWith('-'));
|
|
267
|
+
// Require both a remote and at least one explicit refspec. A bare push can
|
|
268
|
+
// resolve to main/master through local configuration, so it fails closed.
|
|
269
|
+
if (positional.length < 2) return 'git push must name an explicit non-protected branch';
|
|
270
|
+
|
|
271
|
+
const refspecs = positional.slice(1);
|
|
272
|
+
for (const refspec of refspecs) {
|
|
273
|
+
if (refspec.startsWith('+')) return 'force-push refspec is forbidden';
|
|
274
|
+
if (refspec.startsWith(':')) return 'branch deletion through git push is forbidden';
|
|
275
|
+
const target = (refspec.includes(':') ? refspec.split(':').pop() : refspec)
|
|
276
|
+
.replace(/^refs\/heads\//i, '');
|
|
277
|
+
if (
|
|
278
|
+
!target ||
|
|
279
|
+
/^(?:HEAD|main|master)$/i.test(target) ||
|
|
280
|
+
!/^[A-Za-z0-9][A-Za-z0-9._/-]*$/.test(target)
|
|
281
|
+
) {
|
|
282
|
+
return 'direct push to main/master or an implicit branch is forbidden';
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function commandPolicyViolation(command) {
|
|
290
|
+
if (typeof command !== 'string') return 'shell input is missing tool_input.command';
|
|
291
|
+
const normalizedCommand = normalizePolicyCommand(command);
|
|
292
|
+
const gitViolation = gitPushPolicyViolation(normalizedCommand);
|
|
293
|
+
if (gitViolation) return gitViolation;
|
|
294
|
+
return sqlPolicyViolation(normalizedCommand);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function toClaudeWritePayload(input, target) {
|
|
298
|
+
const base = {
|
|
299
|
+
...input,
|
|
300
|
+
hook_event_name: 'PreToolUse',
|
|
301
|
+
tool_name: target.operation === 'Add' ? 'Write' : 'Edit',
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
if (target.operation === 'Add') {
|
|
305
|
+
base.tool_input = { file_path: target.filePath, content: target.content };
|
|
306
|
+
} else if (target.operation === 'Delete') {
|
|
307
|
+
base.tool_input = {
|
|
308
|
+
file_path: target.filePath,
|
|
309
|
+
old_string: target.content,
|
|
310
|
+
new_string: '',
|
|
311
|
+
};
|
|
312
|
+
} else {
|
|
313
|
+
base.tool_input = {
|
|
314
|
+
file_path: target.filePath,
|
|
315
|
+
old_string: '',
|
|
316
|
+
new_string: target.content,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
return base;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function runGuard(root, guardName, payload) {
|
|
323
|
+
const guardPath = path.join(root, '.claude', 'hooks', guardName);
|
|
324
|
+
if (!fs.existsSync(guardPath)) return { status: 0, stdout: '', stderr: '' };
|
|
325
|
+
|
|
326
|
+
const result = spawnSync(process.execPath, [guardPath], {
|
|
327
|
+
cwd: root,
|
|
328
|
+
env: {
|
|
329
|
+
...process.env,
|
|
330
|
+
CLAUDE_PROJECT_DIR: root,
|
|
331
|
+
SINAPSE_PROJECT_DIR: root,
|
|
332
|
+
},
|
|
333
|
+
input: JSON.stringify(payload),
|
|
334
|
+
encoding: 'utf8',
|
|
335
|
+
timeout: 5000,
|
|
336
|
+
windowsHide: true,
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
if (result.error) {
|
|
340
|
+
return {
|
|
341
|
+
status: 2,
|
|
342
|
+
stdout: '',
|
|
343
|
+
stderr: `${guardName} failed: ${result.error.message}`,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
status: result.status == null ? 2 : result.status,
|
|
348
|
+
stdout: result.stdout || '',
|
|
349
|
+
stderr: result.stderr || '',
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function runGuards(root, guards, payloads) {
|
|
354
|
+
const context = [];
|
|
355
|
+
const warnings = [];
|
|
356
|
+
for (const payload of payloads) {
|
|
357
|
+
for (const guard of guards) {
|
|
358
|
+
const result = runGuard(root, guard, payload);
|
|
359
|
+
if (result.status === 2) {
|
|
360
|
+
return {
|
|
361
|
+
blocked: true,
|
|
362
|
+
reason: result.stderr.trim() || `${guard} blocked the operation`,
|
|
363
|
+
context,
|
|
364
|
+
warnings,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
if (result.status !== 0) {
|
|
368
|
+
return {
|
|
369
|
+
blocked: true,
|
|
370
|
+
reason: `${guard} failed closed with exit code ${result.status}`,
|
|
371
|
+
context,
|
|
372
|
+
warnings,
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
if (result.stdout.trim()) context.push(result.stdout.trim());
|
|
376
|
+
if (result.stderr.trim()) warnings.push(result.stderr.trim());
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return { blocked: false, context, warnings };
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
function deny(eventName, reason) {
|
|
383
|
+
const safeReason = String(reason || 'Blocked by SINAPSE Codex hook policy').slice(0, 4000);
|
|
384
|
+
if (eventName === 'PermissionRequest') {
|
|
385
|
+
process.stdout.write(JSON.stringify({
|
|
386
|
+
hookSpecificOutput: {
|
|
387
|
+
hookEventName: 'PermissionRequest',
|
|
388
|
+
decision: { behavior: 'deny', message: safeReason },
|
|
389
|
+
},
|
|
390
|
+
}));
|
|
391
|
+
} else {
|
|
392
|
+
process.stdout.write(JSON.stringify({
|
|
393
|
+
hookSpecificOutput: {
|
|
394
|
+
hookEventName: 'PreToolUse',
|
|
395
|
+
permissionDecision: 'deny',
|
|
396
|
+
permissionDecisionReason: safeReason,
|
|
397
|
+
},
|
|
398
|
+
}));
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function emitContext(context, warnings) {
|
|
403
|
+
const additionalContext = context.filter(Boolean).join('\n\n').slice(0, 12000);
|
|
404
|
+
const systemMessage = warnings.filter(Boolean).join('\n').slice(0, 4000);
|
|
405
|
+
if (!additionalContext && !systemMessage) return;
|
|
406
|
+
|
|
407
|
+
const output = {
|
|
408
|
+
hookSpecificOutput: {
|
|
409
|
+
hookEventName: 'PreToolUse',
|
|
410
|
+
},
|
|
411
|
+
};
|
|
412
|
+
if (additionalContext) output.hookSpecificOutput.additionalContext = additionalContext;
|
|
413
|
+
if (systemMessage) output.systemMessage = systemMessage;
|
|
414
|
+
process.stdout.write(JSON.stringify(output));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
function handlePreTool(input, eventName, root) {
|
|
418
|
+
const toolName = String(input.tool_name || '').trim();
|
|
419
|
+
const toolInput = input.tool_input && typeof input.tool_input === 'object'
|
|
420
|
+
? input.tool_input
|
|
421
|
+
: {};
|
|
422
|
+
|
|
423
|
+
if (toolName === 'apply_patch') {
|
|
424
|
+
let targets;
|
|
425
|
+
try {
|
|
426
|
+
targets = parsePatchTargets(toolInput.command, root);
|
|
427
|
+
} catch (error) {
|
|
428
|
+
deny(eventName, `Malformed apply_patch blocked (fail-closed): ${error.message}`);
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
for (const target of targets) {
|
|
433
|
+
if (isProtectedPath(target.filePath)) {
|
|
434
|
+
deny(eventName, `Protected framework path blocked: ${target.filePath}`);
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
if (findSecrets(target.content, target.filePath, root).length > 0) {
|
|
438
|
+
deny(eventName, `Secret-like content blocked in ${target.filePath}`);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
const payloads = targets.map((target) => toClaudeWritePayload(input, target));
|
|
444
|
+
const result = runGuards(root, WRITE_GUARDS, payloads);
|
|
445
|
+
if (result.blocked) deny(eventName, result.reason);
|
|
446
|
+
else emitContext(result.context, result.warnings);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (toolName === 'Bash') {
|
|
451
|
+
const violation = commandPolicyViolation(toolInput.command);
|
|
452
|
+
if (violation) {
|
|
453
|
+
deny(eventName, `Unsafe shell command blocked: ${violation}`);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
const result = runGuards(root, BASH_GUARDS, [input]);
|
|
457
|
+
if (result.blocked) deny(eventName, result.reason);
|
|
458
|
+
else emitContext(result.context, result.warnings);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function runLifecycleGuard(root, guardName, input, transformToolName) {
|
|
463
|
+
const payload = transformToolName
|
|
464
|
+
? { ...input, tool_name: transformToolName }
|
|
465
|
+
: input;
|
|
466
|
+
const result = runGuard(root, guardName, payload);
|
|
467
|
+
if (result.status === 2) {
|
|
468
|
+
process.stderr.write(result.stderr || `${guardName} blocked the event`);
|
|
469
|
+
process.exitCode = 2;
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (result.stdout) process.stdout.write(result.stdout);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function emitAuthorityContext(eventName, input, root) {
|
|
476
|
+
const agentType = String(input.agent_type || '').trim();
|
|
477
|
+
const audience = agentType ? ` for subagent ${agentType}` : '';
|
|
478
|
+
const agentsPath = fs.existsSync(path.join(root, 'AGENTS.md')) ? 'root AGENTS.md' : 'project instructions';
|
|
479
|
+
process.stdout.write(
|
|
480
|
+
`SINAPSE authority context${audience}: read ${agentsPath} before acting. ` +
|
|
481
|
+
'Canonical agents, tasks, workflows, and the Constitution remain under .sinapse-ai/ and squads/. ' +
|
|
482
|
+
'Follow the validated Story Development Cycle, preserve L1/L2 protected paths, delegate domain work, ' +
|
|
483
|
+
'and reserve git push, PR, and release operations for @devops. ' +
|
|
484
|
+
`Lifecycle event: ${eventName}.`,
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
function main() {
|
|
489
|
+
const eventFromArg = process.argv[2] || '';
|
|
490
|
+
let input;
|
|
491
|
+
try {
|
|
492
|
+
input = readInput();
|
|
493
|
+
} catch (error) {
|
|
494
|
+
if (eventFromArg === 'PreToolUse' || eventFromArg === 'PermissionRequest') {
|
|
495
|
+
deny(eventFromArg, `Invalid hook payload blocked (fail-closed): ${error.message}`);
|
|
496
|
+
}
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const eventName = eventFromArg || input.hook_event_name || '';
|
|
501
|
+
const root = findProjectRoot(input);
|
|
502
|
+
|
|
503
|
+
if (eventName === 'SessionStart' || eventName === 'SubagentStart') {
|
|
504
|
+
emitAuthorityContext(eventName, input, root);
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
if (eventName === 'SubagentStop') {
|
|
508
|
+
// Explicitly supported as a no-op. Parent orchestration consumes the
|
|
509
|
+
// subagent handoff; no continuation or recursive delegation is requested.
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
if (eventName === 'PreToolUse' || eventName === 'PermissionRequest') {
|
|
513
|
+
handlePreTool(input, eventName, root);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (eventName === 'UserPromptSubmit') {
|
|
517
|
+
runLifecycleGuard(root, 'synapse-wrapper.cjs', input);
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
if (eventName === 'PreCompact') {
|
|
521
|
+
runLifecycleGuard(root, 'precompact-wrapper.cjs', input);
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
if (eventName === 'PostToolUse') {
|
|
525
|
+
const telemetryTool = input.tool_name === 'apply_patch' ? 'Edit' : null;
|
|
526
|
+
runLifecycleGuard(root, 'telemetry-post-tool.cjs', input, telemetryTool);
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
if (eventName === 'Stop') {
|
|
530
|
+
// Telemetry only. This hook never returns a continuation decision, so Stop
|
|
531
|
+
// cannot create an implicit or unbounded loop.
|
|
532
|
+
runLifecycleGuard(root, 'telemetry-stop.cjs', input);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
main();
|
|
537
|
+
|
|
538
|
+
module.exports = {
|
|
539
|
+
commandPolicyViolation,
|
|
540
|
+
gitPushPolicyViolation,
|
|
541
|
+
isProtectedPath,
|
|
542
|
+
normalizeTarget,
|
|
543
|
+
normalizePolicyCommand,
|
|
544
|
+
parsePatchTargets,
|
|
545
|
+
sqlPolicyViolation,
|
|
546
|
+
toClaudeWritePayload,
|
|
547
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "^(?:startup|resume|clear|compact)$",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" SessionStart",
|
|
10
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') SessionStart\"",
|
|
11
|
+
"timeout": 5,
|
|
12
|
+
"statusMessage": "Loading SINAPSE authority context"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"SubagentStart": [
|
|
18
|
+
{
|
|
19
|
+
"hooks": [
|
|
20
|
+
{
|
|
21
|
+
"type": "command",
|
|
22
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" SubagentStart",
|
|
23
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') SubagentStart\"",
|
|
24
|
+
"timeout": 5,
|
|
25
|
+
"statusMessage": "Loading SINAPSE subagent authority"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"SubagentStop": [
|
|
31
|
+
{
|
|
32
|
+
"hooks": [
|
|
33
|
+
{
|
|
34
|
+
"type": "command",
|
|
35
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" SubagentStop",
|
|
36
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') SubagentStop\"",
|
|
37
|
+
"timeout": 5
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"UserPromptSubmit": [
|
|
43
|
+
{
|
|
44
|
+
"hooks": [
|
|
45
|
+
{
|
|
46
|
+
"type": "command",
|
|
47
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" UserPromptSubmit",
|
|
48
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') UserPromptSubmit\"",
|
|
49
|
+
"timeout": 10,
|
|
50
|
+
"statusMessage": "Loading SINAPSE context"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"PreToolUse": [
|
|
56
|
+
{
|
|
57
|
+
"matcher": "^(?:Bash|apply_patch|Write|Edit)$",
|
|
58
|
+
"hooks": [
|
|
59
|
+
{
|
|
60
|
+
"type": "command",
|
|
61
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" PreToolUse",
|
|
62
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') PreToolUse\"",
|
|
63
|
+
"timeout": 30,
|
|
64
|
+
"statusMessage": "Checking SINAPSE safety gates"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"PermissionRequest": [
|
|
70
|
+
{
|
|
71
|
+
"matcher": "^(?:Bash|apply_patch|Write|Edit)$",
|
|
72
|
+
"hooks": [
|
|
73
|
+
{
|
|
74
|
+
"type": "command",
|
|
75
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" PermissionRequest",
|
|
76
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') PermissionRequest\"",
|
|
77
|
+
"timeout": 30,
|
|
78
|
+
"statusMessage": "Checking SINAPSE approval policy"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"PostToolUse": [
|
|
84
|
+
{
|
|
85
|
+
"matcher": "^(?:Bash|apply_patch|Write|Edit)$",
|
|
86
|
+
"hooks": [
|
|
87
|
+
{
|
|
88
|
+
"type": "command",
|
|
89
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" PostToolUse",
|
|
90
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') PostToolUse\"",
|
|
91
|
+
"timeout": 5
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"PreCompact": [
|
|
97
|
+
{
|
|
98
|
+
"matcher": "^(?:manual|auto)$",
|
|
99
|
+
"hooks": [
|
|
100
|
+
{
|
|
101
|
+
"type": "command",
|
|
102
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" PreCompact",
|
|
103
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') PreCompact\"",
|
|
104
|
+
"timeout": 10,
|
|
105
|
+
"statusMessage": "Saving SINAPSE session context"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"Stop": [
|
|
111
|
+
{
|
|
112
|
+
"hooks": [
|
|
113
|
+
{
|
|
114
|
+
"type": "command",
|
|
115
|
+
"command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/claude-compat.cjs\" Stop",
|
|
116
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& node (Join-Path (& git rev-parse --show-toplevel) '.codex/hooks/claude-compat.cjs') Stop\"",
|
|
117
|
+
"timeout": 5
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|