sinapse-ai 5.0.8 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (660) hide show
  1. package/.claude/CLAUDE.md +1 -1
  2. package/.claude/rules/agent-authority.md +10 -10
  3. package/.claude/rules/agent-memory-imports.md +4 -4
  4. package/.claude/rules/coderabbit-integration.md +4 -4
  5. package/.claude/rules/ids-principles.md +5 -5
  6. package/.claude/rules/story-lifecycle.md +15 -15
  7. package/.claude/rules/workflow-execution.md +11 -11
  8. package/.sinapse-ai/constitution.md +3 -3
  9. package/.sinapse-ai/core/code-intel/helpers/dev-helper.js +1 -1
  10. package/.sinapse-ai/core/code-intel/helpers/qa-helper.js +1 -1
  11. package/.sinapse-ai/core/code-intel/helpers/story-helper.js +7 -7
  12. package/.sinapse-ai/core/config/config-loader.js +1 -1
  13. package/.sinapse-ai/core/docs/session-update-pattern.md +1 -1
  14. package/.sinapse-ai/core/ids/framework-governor.js +4 -4
  15. package/.sinapse-ai/core/ids/index.js +1 -1
  16. package/.sinapse-ai/core/memory/gotchas-memory.js +1 -1
  17. package/.sinapse-ai/core/orchestration/agent-invoker.js +1 -1
  18. package/.sinapse-ai/core/orchestration/bob-surface-criteria.yaml +2 -2
  19. package/.sinapse-ai/core/orchestration/executor-assignment.js +1 -1
  20. package/.sinapse-ai/core/orchestration/executors/epic-6-executor.js +1 -1
  21. package/.sinapse-ai/core/orchestration/executors/epic-executor.js +1 -1
  22. package/.sinapse-ai/core/orchestration/greenfield-handler.js +4 -4
  23. package/.sinapse-ai/core/orchestration/master-orchestrator.js +1 -1
  24. package/.sinapse-ai/core/orchestration/skill-dispatcher.js +3 -3
  25. package/.sinapse-ai/core/orchestration/workflow-executor.js +1 -1
  26. package/.sinapse-ai/core/quality-gates/layer2-pr-automation.js +3 -3
  27. package/.sinapse-ai/core/quality-gates/layer3-human-review.js +1 -1
  28. package/.sinapse-ai/core/quality-gates/quality-gate-config.yaml +1 -1
  29. package/.sinapse-ai/core/session/context-loader.js +1 -1
  30. package/.sinapse-ai/data/agent-config-requirements.yaml +3 -3
  31. package/.sinapse-ai/data/entity-registry.yaml +2154 -2337
  32. package/.sinapse-ai/data/registry-update-log.jsonl +316 -0
  33. package/.sinapse-ai/data/sinapse-kb.md +13 -13
  34. package/.sinapse-ai/data/tech-presets/csharp.md +2 -2
  35. package/.sinapse-ai/data/tech-presets/go.md +2 -2
  36. package/.sinapse-ai/data/tech-presets/java.md +2 -2
  37. package/.sinapse-ai/data/tech-presets/nextjs-react.md +1 -1
  38. package/.sinapse-ai/data/tech-presets/php.md +2 -2
  39. package/.sinapse-ai/data/tech-presets/rust.md +2 -2
  40. package/.sinapse-ai/data/technical-preferences.md +1 -1
  41. package/.sinapse-ai/data/workflow-chains.yaml +15 -15
  42. package/.sinapse-ai/development/README.md +1 -1
  43. package/.sinapse-ai/development/agent-teams/team-qa-focused.yaml +7 -7
  44. package/.sinapse-ai/development/agents/analyst.md +6 -6
  45. package/.sinapse-ai/development/agents/architect.md +4 -4
  46. package/.sinapse-ai/development/agents/data-engineer.md +2 -2
  47. package/.sinapse-ai/development/agents/{dev.md → developer.md} +7 -7
  48. package/.sinapse-ai/development/agents/devops.md +4 -4
  49. package/.sinapse-ai/development/agents/{po → product-lead}/MEMORY.md +3 -3
  50. package/.sinapse-ai/development/agents/{po.md → product-lead.md} +25 -25
  51. package/.sinapse-ai/development/agents/{pm → project-lead}/MEMORY.md +2 -2
  52. package/.sinapse-ai/development/agents/{pm.md → project-lead.md} +15 -15
  53. package/.sinapse-ai/development/agents/{qa.md → quality-gate.md} +8 -8
  54. package/.sinapse-ai/development/agents/{sinapse-master.md → sinapse-orqx.md} +12 -12
  55. package/.sinapse-ai/development/agents/{sm.md → sprint-lead.md} +18 -18
  56. package/.sinapse-ai/development/agents/squad-creator.md +4 -4
  57. package/.sinapse-ai/development/agents/ux-design-expert.md +2 -2
  58. package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +1 -1
  59. package/.sinapse-ai/development/checklists/memory-audit-checklist.md +1 -1
  60. package/.sinapse-ai/development/scripts/agent-config-loader.js +1 -1
  61. package/.sinapse-ai/development/scripts/apply-inline-greeting-all-agents.js +1 -1
  62. package/.sinapse-ai/development/scripts/audit-agent-config.js +2 -2
  63. package/.sinapse-ai/development/scripts/batch-update-agents-session-context.js +1 -1
  64. package/.sinapse-ai/development/scripts/dev-context-loader.js +1 -1
  65. package/.sinapse-ai/development/scripts/populate-entity-registry.js +2 -2
  66. package/.sinapse-ai/development/scripts/test-greeting-system.js +4 -4
  67. package/.sinapse-ai/development/scripts/unified-activation-pipeline.js +2 -2
  68. package/.sinapse-ai/development/scripts/verify-workflow-gaps.js +9 -9
  69. package/.sinapse-ai/development/tasks/analyze-cross-artifact.md +1 -1
  70. package/.sinapse-ai/development/tasks/analyze-project-structure.md +4 -4
  71. package/.sinapse-ai/development/tasks/apply-qa-fixes.md +1 -1
  72. package/.sinapse-ai/development/tasks/architect-analyze-impact.md +1 -1
  73. package/.sinapse-ai/development/tasks/brownfield-create-epic.md +10 -10
  74. package/.sinapse-ai/development/tasks/brownfield-create-story.md +1 -1
  75. package/.sinapse-ai/development/tasks/build-autonomous.md +1 -1
  76. package/.sinapse-ai/development/tasks/cleanup-utilities.md +6 -6
  77. package/.sinapse-ai/development/tasks/create-agent.md +1 -1
  78. package/.sinapse-ai/development/tasks/create-brownfield-story.md +4 -4
  79. package/.sinapse-ai/development/tasks/create-next-story.md +12 -12
  80. package/.sinapse-ai/development/tasks/create-service.md +2 -2
  81. package/.sinapse-ai/development/tasks/create-suite.md +1 -1
  82. package/.sinapse-ai/development/tasks/dev-backlog-debt.md +3 -3
  83. package/.sinapse-ai/development/tasks/dev-develop-story.md +5 -5
  84. package/.sinapse-ai/development/tasks/environment-bootstrap.md +2 -2
  85. package/.sinapse-ai/development/tasks/execute-checklist.md +1 -1
  86. package/.sinapse-ai/development/tasks/execute-epic-plan.md +11 -11
  87. package/.sinapse-ai/development/tasks/extract-patterns.md +2 -2
  88. package/.sinapse-ai/development/tasks/facilitate-brainstorming-session.md +2 -2
  89. package/.sinapse-ai/development/tasks/github-devops-github-pr-automation.md +1 -1
  90. package/.sinapse-ai/development/tasks/github-devops-pre-push-quality-gate.md +1 -1
  91. package/.sinapse-ai/development/tasks/ids-governor.md +3 -3
  92. package/.sinapse-ai/development/tasks/next.md +2 -2
  93. package/.sinapse-ai/development/tasks/orchestrate-resume.md +1 -1
  94. package/.sinapse-ai/development/tasks/orchestrate-status.md +1 -1
  95. package/.sinapse-ai/development/tasks/orchestrate-stop.md +1 -1
  96. package/.sinapse-ai/development/tasks/orchestrate.md +1 -1
  97. package/.sinapse-ai/development/tasks/patterns.md +2 -2
  98. package/.sinapse-ai/development/tasks/plan-create-context.md +2 -2
  99. package/.sinapse-ai/development/tasks/plan-execute-subtask.md +3 -3
  100. package/.sinapse-ai/development/tasks/po-close-story.md +3 -3
  101. package/.sinapse-ai/development/tasks/project-status.md +2 -2
  102. package/.sinapse-ai/development/tasks/qa-after-creation.md +2 -2
  103. package/.sinapse-ai/development/tasks/qa-backlog-add-followup.md +3 -3
  104. package/.sinapse-ai/development/tasks/qa-create-fix-request.md +8 -8
  105. package/.sinapse-ai/development/tasks/qa-evidence-requirements.md +1 -1
  106. package/.sinapse-ai/development/tasks/qa-false-positive-detection.md +1 -1
  107. package/.sinapse-ai/development/tasks/qa-fix-issues.md +10 -10
  108. package/.sinapse-ai/development/tasks/qa-gate.md +3 -3
  109. package/.sinapse-ai/development/tasks/qa-review-build.md +3 -3
  110. package/.sinapse-ai/development/tasks/qa-review-story.md +2 -2
  111. package/.sinapse-ai/development/tasks/qa-run-tests.md +1 -1
  112. package/.sinapse-ai/development/tasks/run-workflow-engine.md +1 -1
  113. package/.sinapse-ai/development/tasks/run-workflow.md +1 -1
  114. package/.sinapse-ai/development/tasks/security-scan.md +2 -2
  115. package/.sinapse-ai/development/tasks/setup-llm-routing.md +1 -1
  116. package/.sinapse-ai/development/tasks/spec-critique.md +4 -4
  117. package/.sinapse-ai/development/tasks/spec-gather-requirements.md +4 -4
  118. package/.sinapse-ai/development/tasks/spec-write-spec.md +2 -2
  119. package/.sinapse-ai/development/tasks/story-checkpoint.md +3 -3
  120. package/.sinapse-ai/development/tasks/sync-registry-intel.md +1 -1
  121. package/.sinapse-ai/development/tasks/validate-agents.md +1 -1
  122. package/.sinapse-ai/development/tasks/validate-next-story.md +10 -10
  123. package/.sinapse-ai/development/tasks/validate-workflow.md +1 -1
  124. package/.sinapse-ai/development/tasks/verify-subtask.md +2 -2
  125. package/.sinapse-ai/development/templates/code-intel-integration-pattern.md +3 -3
  126. package/.sinapse-ai/development/templates/subagent-step-prompt.md +2 -2
  127. package/.sinapse-ai/development/workflows/README.md +2 -2
  128. package/.sinapse-ai/development/workflows/auto-worktree.yaml +5 -5
  129. package/.sinapse-ai/development/workflows/brownfield-discovery.yaml +11 -11
  130. package/.sinapse-ai/development/workflows/brownfield-fullstack.yaml +6 -6
  131. package/.sinapse-ai/development/workflows/brownfield-service.yaml +5 -5
  132. package/.sinapse-ai/development/workflows/brownfield-ui.yaml +5 -5
  133. package/.sinapse-ai/development/workflows/development-cycle.yaml +10 -10
  134. package/.sinapse-ai/development/workflows/epic-orchestration.yaml +6 -6
  135. package/.sinapse-ai/development/workflows/greenfield-fullstack.yaml +7 -7
  136. package/.sinapse-ai/development/workflows/greenfield-service.yaml +5 -5
  137. package/.sinapse-ai/development/workflows/greenfield-ui.yaml +5 -5
  138. package/.sinapse-ai/development/workflows/qa-loop.yaml +1 -1
  139. package/.sinapse-ai/development/workflows/spec-pipeline.yaml +2 -2
  140. package/.sinapse-ai/development/workflows/story-development-cycle.yaml +1 -1
  141. package/.sinapse-ai/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +2 -2
  142. package/.sinapse-ai/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +1 -1
  143. package/.sinapse-ai/docs/standards/QUALITY-GATES-SPECIFICATION.md +1 -1
  144. package/.sinapse-ai/docs/standards/SINAPSE-LIVRO-DE-OURO-V2.1-COMPLETE.md +6 -6
  145. package/.sinapse-ai/docs/standards/STANDARDS-INDEX.md +2 -2
  146. package/.sinapse-ai/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +6 -6
  147. package/.sinapse-ai/infrastructure/scripts/config-loader.js +2 -2
  148. package/.sinapse-ai/infrastructure/scripts/gotchas-documenter.js +1 -1
  149. package/.sinapse-ai/infrastructure/scripts/ide-sync/README.md +3 -3
  150. package/.sinapse-ai/infrastructure/scripts/ide-sync/gemini-commands.js +1 -1
  151. package/.sinapse-ai/infrastructure/scripts/ide-sync/index.js +2 -2
  152. package/.sinapse-ai/infrastructure/scripts/ide-sync/redirect-generator.js +2 -2
  153. package/.sinapse-ai/infrastructure/scripts/migrate-agent.js +1 -1
  154. package/.sinapse-ai/infrastructure/scripts/performance-tracker.js +2 -2
  155. package/.sinapse-ai/infrastructure/scripts/qa-report-generator.js +1 -1
  156. package/.sinapse-ai/infrastructure/scripts/recovery-tracker.js +1 -1
  157. package/.sinapse-ai/infrastructure/scripts/rollback-manager.js +1 -1
  158. package/.sinapse-ai/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +1 -1
  159. package/.sinapse-ai/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +1 -1
  160. package/.sinapse-ai/infrastructure/templates/sinapse-sync.yaml.template +1 -1
  161. package/.sinapse-ai/install-manifest.yaml +344 -344
  162. package/.sinapse-ai/monitor/hooks/lib/enrich.py +1 -1
  163. package/.sinapse-ai/product/checklists/self-critique-checklist.md +1 -1
  164. package/.sinapse-ai/product/checklists/story-draft-checklist.md +3 -3
  165. package/.sinapse-ai/product/templates/command-rationalization-matrix.md +3 -3
  166. package/.sinapse-ai/product/templates/design-story-tmpl.yaml +4 -4
  167. package/.sinapse-ai/product/templates/ide-rules/antigravity-rules.md +1 -1
  168. package/.sinapse-ai/product/templates/ide-rules/claude-rules.md +2 -2
  169. package/.sinapse-ai/product/templates/ide-rules/codex-rules.md +6 -6
  170. package/.sinapse-ai/product/templates/ide-rules/cursor-rules.md +1 -1
  171. package/.sinapse-ai/product/templates/personalized-agent-template.md +1 -1
  172. package/.sinapse-ai/product/templates/personalized-task-template.md +1 -1
  173. package/.sinapse-ai/product/templates/personalized-template-file.yaml +1 -1
  174. package/.sinapse-ai/product/templates/personalized-workflow-template.yaml +3 -3
  175. package/.sinapse-ai/product/templates/story-tmpl.yaml +8 -8
  176. package/.sinapse-ai/schemas/README.md +15 -15
  177. package/.sinapse-ai/scripts/diagnostics/health-dashboard/package-lock.json +2 -2
  178. package/.sinapse-ai/user-guide.md +4 -4
  179. package/.sinapse-ai/working-in-the-brownfield.md +3 -3
  180. package/LICENSE +4 -4
  181. package/README.en.md +6 -6
  182. package/README.md +8 -8
  183. package/bin/cli.js +13 -11
  184. package/bin/sinapse.js +17 -0
  185. package/docs/00-shared-activation-pipeline.md +16 -16
  186. package/docs/FEATURE_PROCESS.md +1 -1
  187. package/docs/ORQX-PLAN.md +264 -0
  188. package/docs/core-architecture.md +2 -2
  189. package/docs/en/sinapse-agent-flows/README.md +2 -2
  190. package/docs/en/sinapse-agent-flows/dev-system.md +2 -2
  191. package/docs/en/sinapse-agent-flows/pm-system.md +2 -2
  192. package/docs/en/sinapse-agent-flows/qa-system.md +2 -2
  193. package/docs/en/sinapse-agent-flows/{sinapse-master-system.md → sinapse-orqx-system.md} +5 -5
  194. package/docs/en/sinapse-agent-flows/sm-system.md +2 -2
  195. package/docs/framework/entity-layer-classification.md +2 -2
  196. package/docs/framework/source-tree.md +17 -17
  197. package/docs/getting-started.md +13 -13
  198. package/docs/guides/IDS-CONCEITOS-EXPLICADOS.md +17 -17
  199. package/docs/guides/MEMORY-INTEGRATION.md +3 -3
  200. package/docs/guides/MEMORY-INTELLIGENCE-SYSTEM.md +4 -4
  201. package/docs/guides/ade-guide.md +25 -25
  202. package/docs/guides/agent-selection-guide.md +36 -36
  203. package/docs/guides/agents/ANALYST-SYSTEM.md +5 -5
  204. package/docs/guides/agents/ARCHITECT-SYSTEM.md +9 -9
  205. package/docs/guides/agents/DATA-ENGINEER-SYSTEM.md +8 -8
  206. package/docs/guides/agents/DEV-SYSTEM.md +27 -27
  207. package/docs/guides/agents/DEVOPS-SYSTEM.md +5 -5
  208. package/docs/guides/agents/PM-SYSTEM.md +24 -24
  209. package/docs/guides/agents/QA-SYSTEM.md +24 -24
  210. package/docs/guides/agents/SINAPSE-MASTER-SYSTEM.md +26 -26
  211. package/docs/guides/agents/SM-SYSTEM.md +31 -31
  212. package/docs/guides/agents/SQUAD-CREATOR-SYSTEM.md +2 -2
  213. package/docs/guides/agents/UX-DESIGN-EXPERT-SYSTEM.md +10 -10
  214. package/docs/guides/agents/traces/00-shared-activation-pipeline.md +16 -16
  215. package/docs/guides/agents/traces/00-shared-activation-pipeline.v1-act8.md +16 -16
  216. package/docs/guides/agents/traces/README.md +20 -20
  217. package/docs/guides/agents/traces/analyst-execution-trace.md +6 -6
  218. package/docs/guides/agents/traces/architect-execution-trace.md +3 -3
  219. package/docs/guides/agents/traces/data-engineer-execution-trace.md +4 -4
  220. package/docs/guides/agents/traces/dev-execution-trace.md +12 -12
  221. package/docs/guides/agents/traces/devops-execution-trace.md +6 -6
  222. package/docs/guides/agents/traces/pm-execution-trace.md +14 -14
  223. package/docs/guides/agents/traces/po-execution-trace.md +17 -17
  224. package/docs/guides/agents/traces/qa-execution-trace.md +15 -15
  225. package/docs/guides/agents/traces/{sinapse-master-execution-trace.md → sinapse-orqx-execution-trace.md} +22 -22
  226. package/docs/guides/agents/traces/sm-execution-trace.md +15 -15
  227. package/docs/guides/agents/traces/squad-creation-execution-trace.md +9 -9
  228. package/docs/guides/agents/traces/ux-design-expert-execution-trace.md +4 -4
  229. package/docs/guides/api-reference.md +27 -27
  230. package/docs/guides/coderabbit/README.md +9 -9
  231. package/docs/guides/contextual-greeting-system-guide.md +5 -5
  232. package/docs/guides/development-setup.md +1 -1
  233. package/docs/guides/project-status-feature.md +2 -2
  234. package/docs/guides/quality-dashboard.md +2 -2
  235. package/docs/guides/quality-gates.md +6 -6
  236. package/docs/guides/template-engine-v2.md +2 -2
  237. package/docs/guides/user-guide.md +13 -13
  238. package/docs/guides/workflows/AUTO-WORKTREE-WORKFLOW.md +3 -3
  239. package/docs/guides/workflows/BROWNFIELD-DISCOVERY-WORKFLOW.md +6 -6
  240. package/docs/guides/workflows/BROWNFIELD-FULLSTACK-WORKFLOW.md +30 -30
  241. package/docs/guides/workflows/BROWNFIELD-SERVICE-WORKFLOW.md +38 -38
  242. package/docs/guides/workflows/BROWNFIELD-UI-WORKFLOW.md +25 -25
  243. package/docs/guides/workflows/GREENFIELD-FULLSTACK-WORKFLOW.md +37 -37
  244. package/docs/guides/workflows/GREENFIELD-SERVICE-WORKFLOW.md +5 -5
  245. package/docs/guides/workflows/GREENFIELD-UI-WORKFLOW.md +19 -19
  246. package/docs/guides/workflows/QA-LOOP-WORKFLOW.md +13 -13
  247. package/docs/guides/workflows/SINAPSE-COMPLETE-CROSS-REFERENCE-ANALYSIS.md +19 -19
  248. package/docs/guides/workflows/SPEC-PIPELINE-WORKFLOW.md +25 -25
  249. package/docs/guides/workflows/STORY-DEVELOPMENT-CYCLE-WORKFLOW.md +28 -28
  250. package/docs/guides/workflows/WORKFLOW-TASK-AGENT-ANALYSIS.md +94 -94
  251. package/docs/guides/workflows/xref-phase2-templates.md +29 -29
  252. package/docs/guides/workflows/xref-phase3-scripts.md +33 -33
  253. package/docs/guides/workflows/xref-phase4-infra.md +2 -2
  254. package/docs/guides/workflows/xref-phase6-supporting.md +1 -1
  255. package/docs/guides/workflows-guide.md +2 -2
  256. package/docs/installation/faq.md +1 -1
  257. package/docs/installation/troubleshooting.md +2 -2
  258. package/docs/installation/v4-quick-start.md +2 -2
  259. package/docs/prd-cli-graph-dashboard.md +1 -1
  260. package/docs/pt/DOCUMENTATION-ROADMAP.md +1 -1
  261. package/docs/pt/FEATURE_PROCESS.md +1 -1
  262. package/docs/pt/README.md +2 -2
  263. package/docs/pt/agents/archetype-rationale.md +4 -4
  264. package/docs/pt/agents/persona-definitions.md +9 -9
  265. package/docs/pt/architecture/ADE-ARCHITECT-HANDOFF.md +15 -15
  266. package/docs/pt/architecture/ADE-EPIC1-HANDOFF.md +2 -2
  267. package/docs/pt/architecture/ADE-EPIC2-HANDOFF.md +2 -2
  268. package/docs/pt/architecture/ADE-EPIC3-HANDOFF.md +8 -8
  269. package/docs/pt/architecture/ade-architecture.md +4 -4
  270. package/docs/pt/architecture/adr/adr-hcs-health-check-system.md +3 -3
  271. package/docs/pt/architecture/agent-config-audit.md +4 -4
  272. package/docs/pt/architecture/agent-responsibility-matrix.md +20 -20
  273. package/docs/pt/architecture/agent-tool-integration-guide.md +8 -8
  274. package/docs/pt/architecture/contribution-workflow-research.md +1 -1
  275. package/docs/pt/architecture/dashboard-architecture.md +1 -1
  276. package/docs/pt/architecture/hcs-check-specifications.md +1 -1
  277. package/docs/pt/architecture/hcs-execution-modes.md +1 -1
  278. package/docs/pt/architecture/hcs-self-healing-spec.md +1 -1
  279. package/docs/pt/architecture/high-level-architecture.md +1 -1
  280. package/docs/pt/architecture/module-system.md +1 -1
  281. package/docs/pt/architecture/source-tree.md +1 -1
  282. package/docs/pt/architecture/squad-improvement-recommended-approach.md +2 -2
  283. package/docs/pt/architecture/utility-integration-guide.md +2 -2
  284. package/docs/pt/contributing.md +1 -1
  285. package/docs/pt/core-architecture.md +2 -2
  286. package/docs/pt/framework/source-tree.md +1 -1
  287. package/docs/pt/guides/ade-guide.md +25 -25
  288. package/docs/pt/guides/agent-selection-guide.md +36 -36
  289. package/docs/pt/guides/api-reference.md +25 -25
  290. package/docs/pt/guides/contextual-greeting-system-guide.md +5 -5
  291. package/docs/pt/guides/development-setup.md +1 -1
  292. package/docs/pt/guides/project-status-feature.md +2 -2
  293. package/docs/pt/guides/quality-dashboard.md +2 -2
  294. package/docs/pt/guides/quality-gates.md +6 -6
  295. package/docs/pt/guides/template-engine-v2.md +2 -2
  296. package/docs/pt/guides/user-guide.md +8 -8
  297. package/docs/pt/guides/workflows-guide.md +2 -2
  298. package/docs/pt/installation/faq.md +1 -1
  299. package/docs/pt/installation/troubleshooting.md +2 -2
  300. package/docs/pt/installation/v4-quick-start.md +2 -2
  301. package/docs/pt/platforms/antigravity.md +9 -9
  302. package/docs/pt/platforms/cursor.md +15 -15
  303. package/docs/pt/platforms/gemini-cli.md +3 -3
  304. package/docs/pt/roadmap.md +1 -1
  305. package/docs/pt/sinapse-nomenclature-specification.md +15 -15
  306. package/docs/pt/specifications/docs-agent-technical-specification.md +11 -11
  307. package/docs/roadmap.md +1 -1
  308. package/docs/sinapse-agent-flows/README.md +2 -2
  309. package/docs/sinapse-agent-flows/analyst-system.md +5 -5
  310. package/docs/sinapse-agent-flows/architect-system.md +9 -9
  311. package/docs/sinapse-agent-flows/data-engineer-system.md +8 -8
  312. package/docs/sinapse-agent-flows/dev-system.md +27 -27
  313. package/docs/sinapse-agent-flows/devops-system.md +5 -5
  314. package/docs/sinapse-agent-flows/pm-system.md +24 -24
  315. package/docs/sinapse-agent-flows/qa-system.md +24 -24
  316. package/docs/sinapse-agent-flows/{sinapse-master-system.md → sinapse-orqx-system.md} +26 -26
  317. package/docs/sinapse-agent-flows/sm-system.md +31 -31
  318. package/docs/sinapse-agent-flows/squad-creator-system.md +2 -2
  319. package/docs/sinapse-agent-flows/ux-design-expert-system.md +10 -10
  320. package/docs/sinapse-workflows/auto-worktree-workflow.md +3 -3
  321. package/docs/sinapse-workflows/brownfield-discovery-workflow.md +6 -6
  322. package/docs/sinapse-workflows/brownfield-fullstack-workflow.md +30 -30
  323. package/docs/sinapse-workflows/brownfield-service-workflow.md +38 -38
  324. package/docs/sinapse-workflows/brownfield-ui-workflow.md +25 -25
  325. package/docs/sinapse-workflows/greenfield-fullstack-workflow.md +37 -37
  326. package/docs/sinapse-workflows/greenfield-service-workflow.md +5 -5
  327. package/docs/sinapse-workflows/greenfield-ui-workflow.md +19 -19
  328. package/docs/sinapse-workflows/qa-loop-workflow.md +13 -13
  329. package/docs/sinapse-workflows/spec-pipeline-workflow.md +25 -25
  330. package/docs/sinapse-workflows/story-development-cycle-workflow.md +28 -28
  331. package/package.json +1 -1
  332. package/packages/gemini-sinapse-extension/README.md +1 -1
  333. package/packages/gemini-sinapse-extension/commands/lib/agent-launcher.js +1 -1
  334. package/packages/gemini-sinapse-extension/commands/{sinapse-master.js → sinapse-orqx.js} +1 -1
  335. package/packages/gemini-sinapse-extension/extension.json +3 -3
  336. package/packages/gemini-sinapse-extension/gemini-extension.json +3 -3
  337. package/packages/installer/src/config/configure-environment.js +2 -2
  338. package/packages/installer/src/updater/index.js +105 -0
  339. package/packages/installer/src/wizard/feedback.js +38 -30
  340. package/packages/installer/src/wizard/i18n.js +25 -182
  341. package/packages/installer/src/wizard/ide-config-generator.js +1 -1
  342. package/packages/installer/src/wizard/index.js +253 -69
  343. package/packages/installer/src/wizard/questions.js +35 -7
  344. package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +1 -1
  345. package/packages/sinapse-install/README.md +1 -1
  346. package/packages/sinapse-install/src/installer.js +1 -1
  347. package/scripts/package-synapse.js +1 -1
  348. package/sinapse/agents/{sinapse-master.md → sinapse-orqx.md} +18 -18
  349. package/sinapse/knowledge-base/cross-squad-patterns.md +1 -1
  350. package/sinapse/knowledge-base/routing-catalog.md +1 -1
  351. package/sinapse/squad.yaml +1 -1
  352. package/sinapse/tasks/compose-multi-squad-plan.md +2 -2
  353. package/sinapse/tasks/coordinate-cross-squad.md +2 -2
  354. package/sinapse/tasks/diagnose-and-route.md +2 -2
  355. package/sinapse/tasks/onboard-user.md +2 -2
  356. package/sinapse/tasks/resolve-conflict.md +2 -2
  357. package/sinapse/tasks/squad-status-report.md +2 -2
  358. package/sinapse/tasks/strategic-brief.md +3 -3
  359. package/squads/squad-animations/agents/animations-orqx.md +2 -2
  360. package/squads/squad-brand/agents/brand-creative-engineer.md +1 -1
  361. package/squads/squad-brand/agents/brand-motion-vfx.md +1 -1
  362. package/squads/squad-brand/agents/brand-orqx.md +2 -2
  363. package/squads/squad-brand/agents/brand-sonic-designer.md +1 -1
  364. package/squads/squad-brand/agents/brand-system-architect.md +1 -1
  365. package/squads/squad-claude/agents/claude-orqx.md +2 -2
  366. package/squads/squad-cloning/agents/cloning-orqx.md +3 -3
  367. package/squads/squad-commercial/agents/commercial-orqx.md +1 -1
  368. package/squads/squad-commercial/agents/cs-business-auditor.md +1 -1
  369. package/squads/squad-commercial/agents/cs-client-success.md +1 -1
  370. package/squads/squad-commercial/agents/cs-crm-specialist.md +1 -1
  371. package/squads/squad-commercial/agents/cs-funnel-architect.md +1 -1
  372. package/squads/squad-commercial/agents/cs-lead-generation-strategist.md +1 -1
  373. package/squads/squad-commercial/agents/cs-offer-designer.md +1 -1
  374. package/squads/squad-commercial/agents/cs-revops-analyst.md +1 -1
  375. package/squads/squad-commercial/agents/cs-sales-closer.md +1 -1
  376. package/squads/squad-commercial/agents/cs-sales-enablement.md +1 -1
  377. package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +1 -1
  378. package/squads/squad-content/agents/content-orqx.md +2 -2
  379. package/squads/squad-content/knowledge-base/ai-leverage-content-framework.md +1 -1
  380. package/squads/squad-copy/agents/copy-strategist.md +3 -3
  381. package/squads/squad-copy/knowledge-base/consequence-headline-patterns.md +1 -1
  382. package/squads/squad-council/agents/council-orqx.md +1 -1
  383. package/squads/squad-courses/agents/courses-orqx.md +1 -1
  384. package/squads/squad-cybersecurity/agents/cyber-orqx.md +2 -2
  385. package/squads/squad-design/agents/design-orqx.md +2 -2
  386. package/squads/squad-finance/agents/finance-orqx.md +2 -2
  387. package/squads/squad-growth/agents/growth-orqx.md +2 -2
  388. package/squads/squad-paidmedia/agents/paidmedia-orqx.md +2 -2
  389. package/squads/squad-product/agents/product-orqx.md +2 -2
  390. package/squads/squad-research/agents/research-orqx.md +2 -2
  391. package/squads/squad-research/tasks/create-executive-briefing.md +1 -1
  392. package/squads/squad-research/tasks/create-insight-deck.md +1 -1
  393. package/squads/squad-research/tasks/forecast-industry-trends.md +1 -1
  394. package/squads/squad-research/tasks/generate-actionable-recommendations.md +2 -2
  395. package/squads/squad-research/tasks/run-scenario-planning.md +2 -2
  396. package/squads/squad-research/tasks/synthesize-research-report.md +2 -2
  397. package/squads/squad-research/tasks/track-emerging-technologies.md +1 -1
  398. package/squads/squad-storytelling/agents/storytelling-orqx.md +2 -2
  399. package/docs/es/CHANGELOG.md +0 -117
  400. package/docs/es/DOCUMENTATION-ROADMAP.md +0 -216
  401. package/docs/es/ENVIRONMENT.md +0 -140
  402. package/docs/es/FEATURE_PROCESS.md +0 -99
  403. package/docs/es/GUIDING-PRINCIPLES.md +0 -101
  404. package/docs/es/README.md +0 -134
  405. package/docs/es/agent-reference-guide.md +0 -570
  406. package/docs/es/agents/archetype-rationale.md +0 -566
  407. package/docs/es/agents/persona-definitions.md +0 -501
  408. package/docs/es/api/squads-api.md +0 -753
  409. package/docs/es/architecture/ADE-AGENT-CHANGES.md +0 -469
  410. package/docs/es/architecture/ADE-ARCHITECT-HANDOFF.md +0 -338
  411. package/docs/es/architecture/ADE-EPIC1-HANDOFF.md +0 -85
  412. package/docs/es/architecture/ADE-EPIC2-HANDOFF.md +0 -106
  413. package/docs/es/architecture/ADE-EPIC3-HANDOFF.md +0 -327
  414. package/docs/es/architecture/ARCHITECTURE-INDEX.md +0 -188
  415. package/docs/es/architecture/ade-architecture.md +0 -586
  416. package/docs/es/architecture/adr/ADR-COLLAB-1-current-state-audit.md +0 -259
  417. package/docs/es/architecture/adr/ADR-COLLAB-2-proposed-configuration.md +0 -518
  418. package/docs/es/architecture/adr/adr-hcs-health-check-system.md +0 -489
  419. package/docs/es/architecture/adr/adr-isolated-vm-decision.md +0 -70
  420. package/docs/es/architecture/agent-config-audit.md +0 -222
  421. package/docs/es/architecture/agent-responsibility-matrix.md +0 -444
  422. package/docs/es/architecture/agent-tool-integration-guide.md +0 -334
  423. package/docs/es/architecture/ci-cd.md +0 -151
  424. package/docs/es/architecture/coding-standards.md +0 -896
  425. package/docs/es/architecture/contribution-workflow-research.md +0 -376
  426. package/docs/es/architecture/dashboard-architecture.md +0 -926
  427. package/docs/es/architecture/dashboard-realtime.md +0 -1253
  428. package/docs/es/architecture/hcs-check-specifications.md +0 -897
  429. package/docs/es/architecture/hcs-execution-modes.md +0 -519
  430. package/docs/es/architecture/hcs-self-healing-spec.md +0 -695
  431. package/docs/es/architecture/high-level-architecture.md +0 -357
  432. package/docs/es/architecture/introduction.md +0 -21
  433. package/docs/es/architecture/mcp-api-keys-management.md +0 -246
  434. package/docs/es/architecture/mcp-system-diagrams.md +0 -113
  435. package/docs/es/architecture/module-system.md +0 -382
  436. package/docs/es/architecture/multi-repo-strategy.md +0 -390
  437. package/docs/es/architecture/source-tree.md +0 -708
  438. package/docs/es/architecture/squad-improvement-analysis.md +0 -204
  439. package/docs/es/architecture/squad-improvement-recommended-approach.md +0 -390
  440. package/docs/es/architecture/tech-stack.md +0 -806
  441. package/docs/es/architecture/utility-integration-guide.md +0 -358
  442. package/docs/es/community/README-community-snippet-core.md +0 -57
  443. package/docs/es/community/README-community-snippet-mcp.md +0 -49
  444. package/docs/es/community/README-community-snippet-squads.md +0 -40
  445. package/docs/es/community.md +0 -227
  446. package/docs/es/core-architecture.md +0 -229
  447. package/docs/es/docker-mcp-setup.md +0 -426
  448. package/docs/es/framework/README.md +0 -99
  449. package/docs/es/framework/coding-standards.md +0 -892
  450. package/docs/es/framework/source-tree.md +0 -725
  451. package/docs/es/framework/tech-stack.md +0 -802
  452. package/docs/es/getting-started.md +0 -572
  453. package/docs/es/git-workflow-guide.md +0 -995
  454. package/docs/es/guides/README.md +0 -133
  455. package/docs/es/guides/ade-guide.md +0 -452
  456. package/docs/es/guides/agent-selection-guide.md +0 -295
  457. package/docs/es/guides/api-reference.md +0 -899
  458. package/docs/es/guides/build-recovery-guide.md +0 -270
  459. package/docs/es/guides/contextual-greeting-system-guide.md +0 -387
  460. package/docs/es/guides/contributing-squads.md +0 -256
  461. package/docs/es/guides/development-setup.md +0 -1111
  462. package/docs/es/guides/ide-sync-guide.md +0 -194
  463. package/docs/es/guides/installation-troubleshooting.md +0 -327
  464. package/docs/es/guides/llm-routing.md +0 -312
  465. package/docs/es/guides/mcp/desktop-commander.md +0 -368
  466. package/docs/es/guides/mcp/docker-gateway-tutorial.md +0 -336
  467. package/docs/es/guides/mcp-global-setup.md +0 -663
  468. package/docs/es/guides/permission-modes.md +0 -313
  469. package/docs/es/guides/project-status-feature.md +0 -473
  470. package/docs/es/guides/quality-dashboard.md +0 -367
  471. package/docs/es/guides/quality-gates.md +0 -614
  472. package/docs/es/guides/security-hardening.md +0 -1359
  473. package/docs/es/guides/service-discovery.md +0 -524
  474. package/docs/es/guides/squad-examples/README.md +0 -64
  475. package/docs/es/guides/squad-migration.md +0 -356
  476. package/docs/es/guides/squads-guide.md +0 -836
  477. package/docs/es/guides/squads-overview.md +0 -332
  478. package/docs/es/guides/template-engine-v2.md +0 -484
  479. package/docs/es/guides/testing-guide.md +0 -1215
  480. package/docs/es/guides/user-guide.md +0 -452
  481. package/docs/es/guides/workflows-guide.md +0 -400
  482. package/docs/es/how-to-contribute-with-pull-requests.md +0 -160
  483. package/docs/es/ide-integration.md +0 -425
  484. package/docs/es/installation/README.md +0 -108
  485. package/docs/es/installation/faq.md +0 -616
  486. package/docs/es/installation/linux.md +0 -311
  487. package/docs/es/installation/macos.md +0 -189
  488. package/docs/es/installation/troubleshooting.md +0 -735
  489. package/docs/es/installation/v4-quick-start.md +0 -269
  490. package/docs/es/installation/windows.md +0 -342
  491. package/docs/es/meta-agent-commands.md +0 -990
  492. package/docs/es/migration-guide.md +0 -310
  493. package/docs/es/npx-install.md +0 -193
  494. package/docs/es/performance-tuning-guide.md +0 -707
  495. package/docs/es/platforms/README.md +0 -283
  496. package/docs/es/platforms/antigravity.md +0 -510
  497. package/docs/es/platforms/claude-code.md +0 -650
  498. package/docs/es/platforms/cursor.md +0 -635
  499. package/docs/es/platforms/gemini-cli.md +0 -483
  500. package/docs/es/platforms/github-copilot.md +0 -480
  501. package/docs/es/roadmap.md +0 -119
  502. package/docs/es/security-best-practices.md +0 -613
  503. package/docs/es/security.md +0 -124
  504. package/docs/es/sinapse-agent-flows/README.md +0 -190
  505. package/docs/es/sinapse-agent-flows/analyst-system.md +0 -36
  506. package/docs/es/sinapse-agent-flows/architect-system.md +0 -36
  507. package/docs/es/sinapse-agent-flows/data-engineer-system.md +0 -36
  508. package/docs/es/sinapse-agent-flows/dev-system.md +0 -36
  509. package/docs/es/sinapse-agent-flows/devops-system.md +0 -36
  510. package/docs/es/sinapse-agent-flows/pm-system.md +0 -36
  511. package/docs/es/sinapse-agent-flows/qa-system.md +0 -36
  512. package/docs/es/sinapse-agent-flows/sinapse-master-system.md +0 -36
  513. package/docs/es/sinapse-agent-flows/sm-system.md +0 -36
  514. package/docs/es/sinapse-agent-flows/squad-creator-system.md +0 -36
  515. package/docs/es/sinapse-agent-flows/ux-design-expert-system.md +0 -36
  516. package/docs/es/sinapse-nomenclature-specification.md +0 -673
  517. package/docs/es/sinapse-workflows/README.md +0 -247
  518. package/docs/es/sinapse-workflows/auto-worktree-workflow.md +0 -39
  519. package/docs/es/sinapse-workflows/brownfield-discovery-workflow.md +0 -41
  520. package/docs/es/sinapse-workflows/brownfield-fullstack-workflow.md +0 -42
  521. package/docs/es/sinapse-workflows/brownfield-service-workflow.md +0 -43
  522. package/docs/es/sinapse-workflows/brownfield-ui-workflow.md +0 -42
  523. package/docs/es/sinapse-workflows/design-system-build-quality-workflow.md +0 -40
  524. package/docs/es/sinapse-workflows/greenfield-fullstack-workflow.md +0 -44
  525. package/docs/es/sinapse-workflows/greenfield-service-workflow.md +0 -43
  526. package/docs/es/sinapse-workflows/greenfield-ui-workflow.md +0 -43
  527. package/docs/es/sinapse-workflows/qa-loop-workflow.md +0 -39
  528. package/docs/es/sinapse-workflows/spec-pipeline-workflow.md +0 -40
  529. package/docs/es/sinapse-workflows/story-development-cycle-workflow.md +0 -42
  530. package/docs/es/specifications/docs-agent-technical-specification.md +0 -2161
  531. package/docs/es/troubleshooting.md +0 -887
  532. package/docs/es/uninstallation.md +0 -556
  533. package/docs/es/versioning-and-releases.md +0 -146
  534. package/docs/zh/CHANGELOG.md +0 -191
  535. package/docs/zh/ENVIRONMENT.md +0 -136
  536. package/docs/zh/FEATURE_PROCESS.md +0 -92
  537. package/docs/zh/GLOSSARY.md +0 -179
  538. package/docs/zh/GUIDING-PRINCIPLES.md +0 -97
  539. package/docs/zh/README.md +0 -133
  540. package/docs/zh/TRANSLATION-PLAN.md +0 -508
  541. package/docs/zh/agent-reference-guide.md +0 -566
  542. package/docs/zh/agents/archetype-rationale.md +0 -631
  543. package/docs/zh/agents/persona-definitions.md +0 -560
  544. package/docs/zh/api/squads-api.md +0 -753
  545. package/docs/zh/architecture/ADE-ARCHITECT-HANDOFF.md +0 -338
  546. package/docs/zh/architecture/ADE-EPIC1-HANDOFF.md +0 -85
  547. package/docs/zh/architecture/ADE-EPIC2-HANDOFF.md +0 -106
  548. package/docs/zh/architecture/ADE-EPIC3-HANDOFF.md +0 -327
  549. package/docs/zh/architecture/ARCHITECTURE-INDEX.md +0 -190
  550. package/docs/zh/architecture/SINAPSE-VISUAL-OVERVIEW.md +0 -595
  551. package/docs/zh/architecture/ade-architecture.md +0 -474
  552. package/docs/zh/architecture/adr/ADR-COLLAB-1-current-state-audit.md +0 -259
  553. package/docs/zh/architecture/adr/ADR-COLLAB-2-proposed-configuration.md +0 -518
  554. package/docs/zh/architecture/adr/adr-hcs-health-check-system.md +0 -489
  555. package/docs/zh/architecture/adr/adr-isolated-vm-decision.md +0 -70
  556. package/docs/zh/architecture/agent-config-audit.md +0 -220
  557. package/docs/zh/architecture/agent-responsibility-matrix.md +0 -444
  558. package/docs/zh/architecture/agent-tool-integration-guide.md +0 -336
  559. package/docs/zh/architecture/ci-cd.md +0 -151
  560. package/docs/zh/architecture/coding-standards.md +0 -898
  561. package/docs/zh/architecture/command-authority-matrix.md +0 -18
  562. package/docs/zh/architecture/contribution-workflow-research.md +0 -376
  563. package/docs/zh/architecture/dashboard-architecture.md +0 -569
  564. package/docs/zh/architecture/dashboard-realtime.md +0 -415
  565. package/docs/zh/architecture/hcs-check-specifications.md +0 -102
  566. package/docs/zh/architecture/hcs-execution-modes.md +0 -114
  567. package/docs/zh/architecture/hcs-self-healing-spec.md +0 -148
  568. package/docs/zh/architecture/high-level-architecture.md +0 -355
  569. package/docs/zh/architecture/introduction.md +0 -21
  570. package/docs/zh/architecture/mcp-api-keys-management.md +0 -248
  571. package/docs/zh/architecture/mcp-system-diagrams.md +0 -113
  572. package/docs/zh/architecture/module-system.md +0 -382
  573. package/docs/zh/architecture/multi-repo-strategy.md +0 -237
  574. package/docs/zh/architecture/source-tree.md +0 -710
  575. package/docs/zh/architecture/squad-improvement-analysis.md +0 -204
  576. package/docs/zh/architecture/squad-improvement-recommended-approach.md +0 -390
  577. package/docs/zh/architecture/tech-stack.md +0 -808
  578. package/docs/zh/architecture/utility-integration-guide.md +0 -358
  579. package/docs/zh/code-of-conduct.md +0 -113
  580. package/docs/zh/community/README-community-snippet-core.md +0 -57
  581. package/docs/zh/community/README-community-snippet-mcp.md +0 -49
  582. package/docs/zh/community/README-community-snippet-squads.md +0 -40
  583. package/docs/zh/community.md +0 -227
  584. package/docs/zh/contributing.md +0 -581
  585. package/docs/zh/core-architecture.md +0 -229
  586. package/docs/zh/docker-mcp-setup.md +0 -226
  587. package/docs/zh/framework/README.md +0 -97
  588. package/docs/zh/framework/coding-standards.md +0 -886
  589. package/docs/zh/framework/source-tree.md +0 -888
  590. package/docs/zh/framework/tech-stack.md +0 -796
  591. package/docs/zh/getting-started.md +0 -317
  592. package/docs/zh/git-workflow-guide.md +0 -988
  593. package/docs/zh/guides/MEMORY-INTEGRATION.md +0 -497
  594. package/docs/zh/guides/MEMORY-INTELLIGENCE-SYSTEM.md +0 -1083
  595. package/docs/zh/guides/MEMORY-SYSTEM.md +0 -1003
  596. package/docs/zh/guides/README.md +0 -127
  597. package/docs/zh/guides/ade-guide.md +0 -446
  598. package/docs/zh/guides/agent-selection-guide.md +0 -289
  599. package/docs/zh/guides/api-reference.md +0 -427
  600. package/docs/zh/guides/build-recovery-guide.md +0 -266
  601. package/docs/zh/guides/contextual-greeting-system-guide.md +0 -381
  602. package/docs/zh/guides/contributing-squads.md +0 -250
  603. package/docs/zh/guides/development-setup.md +0 -384
  604. package/docs/zh/guides/ide-sync-guide.md +0 -193
  605. package/docs/zh/guides/installation-troubleshooting.md +0 -321
  606. package/docs/zh/guides/llm-routing.md +0 -306
  607. package/docs/zh/guides/mcp/desktop-commander.md +0 -368
  608. package/docs/zh/guides/mcp/docker-gateway-tutorial.md +0 -336
  609. package/docs/zh/guides/mcp-global-setup.md +0 -696
  610. package/docs/zh/guides/permission-modes.md +0 -307
  611. package/docs/zh/guides/project-status-feature.md +0 -467
  612. package/docs/zh/guides/quality-dashboard.md +0 -361
  613. package/docs/zh/guides/quality-gates.md +0 -462
  614. package/docs/zh/guides/security-hardening.md +0 -1055
  615. package/docs/zh/guides/service-discovery.md +0 -518
  616. package/docs/zh/guides/squad-examples/README.md +0 -63
  617. package/docs/zh/guides/squad-migration.md +0 -336
  618. package/docs/zh/guides/template-engine-v2.md +0 -478
  619. package/docs/zh/guides/workflows-guide.md +0 -408
  620. package/docs/zh/how-to-contribute-with-pull-requests.md +0 -158
  621. package/docs/zh/installation/README.md +0 -106
  622. package/docs/zh/installation/faq.md +0 -611
  623. package/docs/zh/installation/linux.md +0 -447
  624. package/docs/zh/installation/macos.md +0 -187
  625. package/docs/zh/installation/troubleshooting.md +0 -729
  626. package/docs/zh/installation/windows.md +0 -475
  627. package/docs/zh/meta-agent-commands.md +0 -990
  628. package/docs/zh/security-best-practices.md +0 -610
  629. package/docs/zh/security.md +0 -124
  630. package/docs/zh/sinapse-agent-flows/README.md +0 -196
  631. package/docs/zh/sinapse-agent-flows/analyst-system.md +0 -679
  632. package/docs/zh/sinapse-agent-flows/architect-system.md +0 -246
  633. package/docs/zh/sinapse-agent-flows/data-engineer-system.md +0 -418
  634. package/docs/zh/sinapse-agent-flows/dev-system.md +0 -209
  635. package/docs/zh/sinapse-agent-flows/devops-system.md +0 -643
  636. package/docs/zh/sinapse-agent-flows/pm-system.md +0 -733
  637. package/docs/zh/sinapse-agent-flows/qa-system.md +0 -268
  638. package/docs/zh/sinapse-agent-flows/sinapse-master-system.md +0 -81
  639. package/docs/zh/sinapse-agent-flows/sm-system.md +0 -501
  640. package/docs/zh/sinapse-agent-flows/squad-creator-system.md +0 -704
  641. package/docs/zh/sinapse-agent-flows/ux-design-expert-system.md +0 -160
  642. package/docs/zh/sinapse-workflows/README.md +0 -247
  643. package/docs/zh/sinapse-workflows/auto-worktree-workflow.md +0 -793
  644. package/docs/zh/sinapse-workflows/brownfield-discovery-workflow.md +0 -915
  645. package/docs/zh/sinapse-workflows/brownfield-fullstack-workflow.md +0 -764
  646. package/docs/zh/sinapse-workflows/brownfield-service-workflow.md +0 -812
  647. package/docs/zh/sinapse-workflows/brownfield-ui-workflow.md +0 -891
  648. package/docs/zh/sinapse-workflows/design-system-build-quality-workflow.md +0 -845
  649. package/docs/zh/sinapse-workflows/greenfield-fullstack-workflow.md +0 -796
  650. package/docs/zh/sinapse-workflows/greenfield-service-workflow.md +0 -786
  651. package/docs/zh/sinapse-workflows/greenfield-ui-workflow.md +0 -922
  652. package/docs/zh/sinapse-workflows/qa-loop-workflow.md +0 -1111
  653. package/docs/zh/sinapse-workflows/spec-pipeline-workflow.md +0 -1031
  654. package/docs/zh/sinapse-workflows/story-development-cycle-workflow.md +0 -843
  655. package/docs/zh/troubleshooting.md +0 -883
  656. package/docs/zh/uninstallation.md +0 -348
  657. package/docs/zh/versioning-and-releases.md +0 -140
  658. /package/.sinapse-ai/development/agents/{dev → developer}/MEMORY.md +0 -0
  659. /package/.sinapse-ai/development/agents/{qa → quality-gate}/MEMORY.md +0 -0
  660. /package/.sinapse-ai/development/agents/{sm → sprint-lead}/MEMORY.md +0 -0
@@ -1,1055 +0,0 @@
1
- # SINAPSE安全加固指南
2
-
3
- > **EN** | [PT](../pt/guides/security-hardening.md) | [ES](../es/guides/security-hardening.md)
4
-
5
- ---
6
-
7
- > 完整指南,用于加固SINAPSE部署的安全性 - 从开发到生产。
8
-
9
- **版本:** 2.1.0
10
- **最后更新:** 2026-01-29
11
-
12
- ---
13
-
14
- ## 目录
15
-
16
- 1. [安全概述](#安全概述)
17
- 2. [API密钥管理](#api密钥管理)
18
- 3. [环境变量和机密](#环境变量和机密)
19
- 4. [文件和目录权限](#文件和目录权限)
20
- 5. [沙箱和隔离](#沙箱和隔离)
21
- 6. [输入验证](#输入验证)
22
- 7. [注入保护](#注入保护)
23
- 8. [日志和审计](#日志和审计)
24
- 9. [生产与开发配置](#生产与开发配置)
25
- 10. [安全检查表](#安全检查表)
26
- 11. [漏洞报告](#漏洞报告)
27
-
28
- ---
29
-
30
- ## 安全概述
31
-
32
- SINAPSE在AI模型和您的系统之间的特权层运行。本指南涵盖特定于AI编排开发环境的加固策略。
33
-
34
- ### 安全架构
35
-
36
- ```
37
- ┌─────────────────────────────────────────────────────────────────┐
38
- │ 外部层 │
39
- │ 网络防火墙 | WAF | TLS终止 | 速率限制 │
40
- ├─────────────────────────────────────────────────────────────────┤
41
- │ 应用层 │
42
- │ 权限模式 | 输入验证 | 命令净化 │
43
- ├─────────────────────────────────────────────────────────────────┤
44
- │ 执行层 │
45
- │ 沙箱 | 流程隔离 | 资源限制 | 钩子 │
46
- ├─────────────────────────────────────────────────────────────────┤
47
- │ 数据层 │
48
- │ 静态加密 | 安全存储 | 审计日志 │
49
- └─────────────────────────────────────────────────────────────────┘
50
- ```
51
-
52
- ### SINAPSE特定的安全问题
53
-
54
- | 问题 | 风险级别 | 缓解 |
55
- |------|---------|------|
56
- | 代理代码执行 | 严重 | 权限模式、沙箱 |
57
- | API密钥暴露 | 严重 | 环境隔离、加密 |
58
- | 通过AI的命令注入 | 高 | 输入净化、钩子 |
59
- | 未授权文件访问 | 高 | 目录限制 |
60
- | 会话劫持 | 中等 | 令牌轮换、安全存储 |
61
- | 信息泄露 | 中等 | 审计日志、访问控制 |
62
-
63
- ### 深度防御
64
-
65
- SINAPSE实现了多层保护:
66
-
67
- 1. **权限模式** - 控制代理自主权(探索/询问/自动)
68
- 2. **Claude钩子** - 执行前验证(读取保护、SQL治理)
69
- 3. **输入净化** - 所有用户/AI输入都经过验证
70
- 4. **流程隔离** - MCP服务器在容器中运行
71
- 5. **审计日志** - 所有操作都被记录
72
-
73
- ---
74
-
75
- ## API密钥管理
76
-
77
- API密钥是SINAPSE中最关键的机密。受损密钥可能导致未授权使用、数据泄露和重大财务影响。
78
-
79
- ### 存储层级
80
-
81
- ```
82
- ┌────────────────────────────────────────────────────────────────┐
83
- │ 从不 │
84
- │ ❌ 源代码 │
85
- │ ❌ Git存储库 │
86
- │ ❌ 配置文件(已提交) │
87
- │ ❌ 日志文件 │
88
- │ ❌ 错误消息 │
89
- ├────────────────────────────────────────────────────────────────┤
90
- │ 可接受(开发) │
91
- │ ⚠️ .env文件(gitignored) │
92
- │ ⚠️ 本地环境变量 │
93
- ├────────────────────────────────────────────────────────────────┤
94
- │ 推荐(生产) │
95
- │ ✅ 密钥管理器(Vault、AWS Secrets等) │
96
- │ ✅ CI/CD密钥注入 │
97
- │ ✅ Kubernetes机密 │
98
- │ ✅ 加密凭证存储 │
99
- └────────────────────────────────────────────────────────────────┘
100
- ```
101
-
102
- ### 安全的API密钥配置
103
-
104
- **开发(.env文件 - 永不提交)**
105
-
106
- ```bash
107
- # .env - 立即添加到.gitignore
108
- # API提供商密钥
109
- ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
110
- OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
111
-
112
- # MCP服务器密钥
113
- EXA_API_KEY=exa-xxxxxxxxxxxxxxxxxxxxxxxx
114
- GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
115
- APIFY_TOKEN=apify_api_xxxxxxxxxxxxxxxxxxxxx
116
-
117
- # 永不使用默认或弱值
118
- JWT_SECRET=your-256-bit-cryptographically-secure-random-key
119
- ```
120
-
121
- **生产(使用密钥管理器)**
122
-
123
- ```javascript
124
- // 从安全保险库加载机密
125
- const secrets = await SecretManager.loadSecrets({
126
- provider: 'aws-secrets-manager', // 或'hashicorp-vault'、'gcp-secrets'
127
- secretName: 'sinapse/production/api-keys',
128
- region: process.env.AWS_REGION,
129
- });
130
-
131
- process.env.ANTHROPIC_API_KEY = secrets.ANTHROPIC_API_KEY;
132
- process.env.OPENAI_API_KEY = secrets.OPENAI_API_KEY;
133
- ```
134
-
135
- ### 密钥轮换策略
136
-
137
- | 密钥类型 | 轮换频率 | 泄露时 |
138
- |---------|---------|--------|
139
- | AI提供商密钥 | 90天 | 立即 |
140
- | JWT机密 | 30天 | 立即 |
141
- | MCP服务器密钥 | 90天 | 立即 |
142
- | 服务令牌 | 7天 | 立即 |
143
- | 开发密钥 | 永不重用 | 立即撤销 |
144
-
145
- ### 启动时的密钥验证
146
-
147
- ```javascript
148
- // .sinapse-ai/core/security/key-validator.js
149
- const requiredKeys = [
150
- { name: 'ANTHROPIC_API_KEY', pattern: /^sk-ant-[a-zA-Z0-9_-]+$/ },
151
- { name: 'JWT_SECRET', minLength: 32 },
152
- ];
153
-
154
- function validateApiKeys() {
155
- const errors = [];
156
-
157
- for (const key of requiredKeys) {
158
- const value = process.env[key.name];
159
-
160
- if (!value) {
161
- errors.push(`缺少必需密钥: ${key.name}`);
162
- continue;
163
- }
164
-
165
- if (key.pattern && !key.pattern.test(value)) {
166
- errors.push(`${key.name}格式无效`);
167
- }
168
-
169
- if (key.minLength && value.length < key.minLength) {
170
- errors.push(`${key.name}必须至少${key.minLength}个字符`);
171
- }
172
- }
173
-
174
- if (errors.length > 0) {
175
- throw new Error(`API密钥验证失败:\n${errors.join('\n')}`);
176
- }
177
- }
178
- ```
179
-
180
- ---
181
-
182
- ## 环境变量和机密
183
-
184
- ### 安全的.env文件模板
185
-
186
- ```bash
187
- # ============================================================
188
- # SINAPSE环境配置
189
- # ============================================================
190
- # 安全: 此文件必须永不提交到版本控制
191
- # 添加到.gitignore: .env, .env.local, .env.*.local
192
- # ============================================================
193
-
194
- # -------- 环境 --------
195
- NODE_ENV=development
196
- SINAPSE_DEBUG=false
197
- LOG_LEVEL=info
198
-
199
- # -------- AI提供商配置 --------
200
- # 主要提供商
201
- AI_PROVIDER=anthropic
202
- ANTHROPIC_API_KEY=
203
-
204
- # 后备提供商(可选)
205
- OPENAI_API_KEY=
206
-
207
- # -------- 认证和会话 --------
208
- # 生成使用: openssl rand -hex 32
209
- JWT_SECRET=
210
- JWT_EXPIRY=1h
211
- REFRESH_TOKEN_EXPIRY=7d
212
-
213
- # 会话配置
214
- SESSION_SECRET=
215
- SESSION_TIMEOUT=3600000
216
-
217
- # -------- 加密 --------
218
- # 生成使用: openssl rand -hex 32
219
- DATABASE_ENCRYPTION_KEY=
220
- FILE_ENCRYPTION_KEY=
221
-
222
- # -------- MCP服务器 --------
223
- # EXA网络搜索
224
- EXA_API_KEY=
225
-
226
- # GitHub集成
227
- GITHUB_TOKEN=
228
-
229
- # Apify网页爬虫
230
- APIFY_TOKEN=
231
-
232
- # -------- 安全设置 --------
233
- # 速率限制
234
- RATE_LIMIT_WINDOW=900000
235
- RATE_LIMIT_MAX_REQUESTS=1000
236
-
237
- # CORS(仅生产)
238
- CORS_ORIGIN=https://your-domain.com
239
-
240
- # 内容安全策略
241
- CSP_ENABLED=true
242
-
243
- # -------- 审计和日志 --------
244
- AUDIT_LOG_ENABLED=true
245
- AUDIT_LOG_PATH=/var/log/sinapse/audit.log
246
- AUDIT_LOG_RETENTION_DAYS=90
247
- ```
248
-
249
- ### 机密文件保护
250
-
251
- ```bash
252
- # 为机密创建安全目录
253
- mkdir -p ~/.sinapse/secrets
254
- chmod 700 ~/.sinapse/secrets
255
-
256
- # 创建加密机密文件
257
- # 永不存储明文机密
258
- openssl enc -aes-256-cbc -salt -pbkdf2 \
259
- -in secrets.txt \
260
- -out ~/.sinapse/secrets/encrypted.dat
261
-
262
- # 设置正确权限
263
- chmod 600 ~/.sinapse/secrets/*
264
-
265
- # 验证git历史中没有机密
266
- git log -p --all -S "API_KEY" -- .
267
- ```
268
-
269
- ### 环境隔离
270
-
271
- ```javascript
272
- // 验证环境隔离
273
- function validateEnvironment() {
274
- // 确保生产机密不在开发环境中使用
275
- if (process.env.NODE_ENV === 'development') {
276
- if (process.env.ANTHROPIC_API_KEY?.includes('prod')) {
277
- throw new Error('在开发环境中检测到生产API密钥');
278
- }
279
- }
280
-
281
- // 确保调试模式在生产环境中关闭
282
- if (process.env.NODE_ENV === 'production') {
283
- if (process.env.SINAPSE_DEBUG === 'true') {
284
- console.warn('警告: 生产环境中启用了调试模式');
285
- }
286
- }
287
- }
288
- ```
289
-
290
- ---
291
-
292
- ## 文件和目录权限
293
-
294
- ### SINAPSE目录结构权限
295
-
296
- ```bash
297
- # ============================================================
298
- # 推荐权限
299
- # ============================================================
300
-
301
- # 项目根(标准)
302
- chmod 755 /path/to/project
303
-
304
- # SINAPSE配置目录
305
- chmod 700 .sinapse/ # 仅所有者可访问
306
- chmod 700 .sinapse-ai/ # 框架源
307
- chmod 700 .claude/ # Claude配置
308
-
309
- # 敏感配置文件
310
- chmod 600 .env # 环境变量
311
- chmod 600 .sinapse/config.yaml # 主配置
312
- chmod 600 .sinapse/users.json # 用户数据库
313
- chmod 600 .sinapse/sessions.json # 活跃会话
314
-
315
- # 机密目录
316
- chmod 700 ~/.sinapse/secrets/
317
- chmod 600 ~/.sinapse/secrets/*
318
-
319
- # 日志文件
320
- chmod 640 logs/*.log # 所有者读/写、组读
321
- chmod 750 logs/ # 所有者完全、组读/执行
322
-
323
- # 临时文件
324
- chmod 700 .sinapse/temp/
325
- chmod 600 .sinapse/temp/*
326
- ```
327
-
328
- ### 目录访问控制
329
-
330
- ```yaml
331
- # .sinapse/config.yaml - 允许的目录配置
332
- security:
333
- allowedDirectories:
334
- read:
335
- - '${PROJECT_ROOT}'
336
- - '${HOME}/.sinapse'
337
- write:
338
- - '${PROJECT_ROOT}/src'
339
- - '${PROJECT_ROOT}/docs'
340
- - '${PROJECT_ROOT}/tests'
341
- execute:
342
- - '${PROJECT_ROOT}/scripts'
343
- - '${PROJECT_ROOT}/node_modules/.bin'
344
-
345
- blockedPaths:
346
- - '/etc'
347
- - '/var'
348
- - '/usr'
349
- - '${HOME}/.ssh'
350
- - '${HOME}/.gnupg'
351
- - '${HOME}/.aws'
352
- ```
353
-
354
- ---
355
-
356
- ## 沙箱和隔离
357
-
358
- ### Docker MCP隔离
359
-
360
- SINAPSE使用Docker容器将MCP服务器与主机系统隔离:
361
-
362
- ```
363
- ┌─────────────────────────────────────────────────────────────┐
364
- │ 主机系统 │
365
- │ │
366
- │ ┌────────────────┐ ┌────────────────────────────────┐ │
367
- │ │ Claude Code │ │ Docker容器 │ │
368
- │ │ │ │ ┌──────────────────────────┐ │ │
369
- │ │ ┌──────────┐ │ │ │ docker-gateway │ │ │
370
- │ │ │ 本地 │ │ │ │ ┌─────┐ ┌─────────┐ │ │ │
371
- │ │ │ 工具 │ │◄──►│ │ │ EXA │ │Context7 │ │ │ │
372
- │ │ └──────────┘ │ │ │ └─────┘ └─────────┘ │ │ │
373
- │ │ │ │ │ ┌─────────┐ │ │ │
374
- │ │ ┌──────────┐ │ │ │ │ Apify │ │ │ │
375
- │ │ │Playwright│ │ │ │ └─────────┘ │ │ │
376
- │ │ └──────────┘ │ │ └──────────────────────────┘ │ │
377
- │ └────────────────┘ └────────────────────────────────┘ │
378
- │ │
379
- └─────────────────────────────────────────────────────────────┘
380
- ```
381
-
382
- ### 容器安全配置
383
-
384
- ```yaml
385
- # docker-compose.security.yml
386
- version: '3.8'
387
-
388
- services:
389
- mcp-gateway:
390
- image: docker-mcp-gateway:latest
391
- security_opt:
392
- - no-new-privileges:true
393
- - seccomp:./seccomp-profile.json
394
- cap_drop:
395
- - ALL
396
- cap_add:
397
- - NET_BIND_SERVICE
398
- read_only: true
399
- tmpfs:
400
- - /tmp:noexec,nosuid,nodev
401
- networks:
402
- - mcp-isolated
403
- deploy:
404
- resources:
405
- limits:
406
- cpus: '1.0'
407
- memory: 512M
408
- reservations:
409
- cpus: '0.25'
410
- memory: 128M
411
-
412
- networks:
413
- mcp-isolated:
414
- driver: bridge
415
- internal: true # 无外部访问
416
- ```
417
-
418
- ---
419
-
420
- ## 输入验证
421
-
422
- ### 按输入类型的验证规则
423
-
424
- | 输入类型 | 验证规则 | 示例 |
425
- |---------|---------|------|
426
- | **文件路径** | 无遍历、白名单目录、规范化 | `/project/src/file.ts` |
427
- | **命令** | 白名单命令、净化参数 | `npm run build` |
428
- | **项目名称** | 字母数字、破折号、下划线 | `my-project-01` |
429
- | **URL** | 协议白名单、域验证 | `https://api.example.com` |
430
- | **用户输入** | 长度限制、字符过滤 | `用户评论在这里` |
431
- | **配置** | 类型检查、枚举验证 | `{ mode: "ask" }` |
432
-
433
- ### 输入净化器实现
434
-
435
- ```javascript
436
- // .sinapse-ai/core/security/input-sanitizer.js
437
-
438
- class InputSanitizer {
439
- /**
440
- * 净化文件路径以防止目录遍历
441
- */
442
- static sanitizePath(inputPath, basePath) {
443
- // 删除空字节
444
- let sanitized = inputPath.replace(/\0/g, '');
445
-
446
- // 规范化路径分隔符
447
- sanitized = sanitized.replace(/\\/g, '/');
448
-
449
- // 删除目录遍历尝试
450
- sanitized = sanitized.replace(/\.\.+\//g, '');
451
- sanitized = sanitized.replace(/\/\.\.+/g, '');
452
-
453
- // 解析为绝对路径
454
- const resolved = path.resolve(basePath, sanitized);
455
-
456
- // 验证路径在允许的目录内
457
- if (!resolved.startsWith(path.resolve(basePath))) {
458
- throw new SecurityError('检测到路径遍历尝试');
459
- }
460
-
461
- return resolved;
462
- }
463
-
464
- /**
465
- * 净化命令以安全执行
466
- */
467
- static sanitizeCommand(command) {
468
- // 阻止危险模式
469
- const dangerousPatterns = [
470
- /;/g, // 命令链接
471
- /\|/g, // 管道
472
- /&/g, // 后台/AND
473
- /`/g, // 命令替换
474
- /\$\(/g, // 命令替换
475
- />/g, // 重定向
476
- /</g, // 重定向
477
- /\n/g, // 换行
478
- /\r/g, // 回车
479
- ];
480
-
481
- let sanitized = command;
482
- for (const pattern of dangerousPatterns) {
483
- sanitized = sanitized.replace(pattern, '');
484
- }
485
-
486
- // 限制长度
487
- if (sanitized.length > 1000) {
488
- throw new SecurityError('命令过长');
489
- }
490
-
491
- return sanitized;
492
- }
493
-
494
- /**
495
- * 验证和净化项目名称
496
- */
497
- static sanitizeProjectName(name) {
498
- // 仅允许字母数字、破折号和下划线
499
- const sanitized = name.replace(/[^a-zA-Z0-9-_]/g, '');
500
-
501
- if (sanitized.length === 0) {
502
- throw new SecurityError('项目名称无效');
503
- }
504
-
505
- if (sanitized.length > 64) {
506
- throw new SecurityError('项目名称过长');
507
- }
508
-
509
- return sanitized;
510
- }
511
-
512
- /**
513
- * 验证URL
514
- */
515
- static validateUrl(url) {
516
- const allowedProtocols = ['https:', 'http:'];
517
-
518
- try {
519
- const parsed = new URL(url);
520
-
521
- if (!allowedProtocols.includes(parsed.protocol)) {
522
- throw new SecurityError('无效的URL协议');
523
- }
524
-
525
- // 在生产环境中阻止localhost
526
- if (process.env.NODE_ENV === 'production') {
527
- if (parsed.hostname === 'localhost' || parsed.hostname === '127.0.0.1') {
528
- throw new SecurityError('生产环境中不允许localhost URL');
529
- }
530
- }
531
-
532
- return parsed.toString();
533
- } catch (error) {
534
- throw new SecurityError(`无效URL: ${error.message}`);
535
- }
536
- }
537
- }
538
- ```
539
-
540
-
541
- ---
542
-
543
- ## 注入保护
544
-
545
- ### 命令注入防护
546
-
547
- ```javascript
548
- // 危险 - 永远不要这样做
549
- const userInput = req.query.file;
550
- exec(`cat ${userInput}`); // 命令注入漏洞!
551
-
552
- // 安全 - 使用参数化执行
553
- const { execFile } = require('child_process');
554
- const userInput = sanitizePath(req.query.file, PROJECT_ROOT);
555
- execFile('cat', [userInput], (error, stdout) => {
556
- // 安全执行
557
- });
558
-
559
- // 最安全 - 使用内置文件操作
560
- const fs = require('fs').promises;
561
- const safePath = sanitizePath(req.query.file, PROJECT_ROOT);
562
- const content = await fs.readFile(safePath, 'utf8');
563
- ```
564
-
565
- ### SQL注入防护(SQL治理钩子)
566
-
567
- ```python
568
- # .claude/hooks/sql-governance.py
569
- # 此钩子自动强制执行
570
-
571
- BLOCKED_PATTERNS = [
572
- r'CREATE\s+TABLE',
573
- r'DROP\s+TABLE',
574
- r'ALTER\s+TABLE',
575
- r'TRUNCATE',
576
- r'DELETE\s+FROM',
577
- r'UPDATE\s+.*\s+SET',
578
- r'INSERT\s+INTO',
579
- ]
580
-
581
- def validate_sql(query: str) -> bool:
582
- """阻止危险的SQL操作而不显式批准"""
583
- for pattern in BLOCKED_PATTERNS:
584
- if re.search(pattern, query, re.IGNORECASE):
585
- raise SecurityError(f"检测到被阻止的SQL模式: {pattern}")
586
- return True
587
- ```
588
-
589
- ### 模板注入防护
590
-
591
- ```javascript
592
- // 危险 - 直接模板插值
593
- const template = `Hello ${userInput}!`; // XSS漏洞!
594
-
595
- // 安全 - HTML编码
596
- const { escape } = require('html-escaper');
597
- const template = `Hello ${escape(userInput)}!`;
598
-
599
- // 对于Markdown模板
600
- function safeMarkdownInterpolation(template, data) {
601
- return template.replace(/\{\{(\w+)\}\}/g, (match, key) => {
602
- const value = data[key];
603
- if (value === undefined) return match;
604
-
605
- // 转义特殊Markdown字符
606
- return String(value).replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
607
- });
608
- }
609
- ```
610
-
611
- ### 路径遍历防护
612
-
613
- ```javascript
614
- // 受保护文件的钩子强制
615
- // .claude/hooks/read-protection.py
616
-
617
- PROTECTED_FILES = [
618
- '.claude/CLAUDE.md',
619
- '.claude/rules/*.md',
620
- '.sinapse-ai/development/agents/*.md',
621
- 'package.json',
622
- 'tsconfig.json'
623
- ]
624
-
625
- def validate_read(file_path: str, params: dict) -> bool:
626
- """阻止受保护文件的部分读取"""
627
- for pattern in PROTECTED_FILES:
628
- if fnmatch.fnmatch(file_path, pattern):
629
- if params.get('limit') or params.get('offset'):
630
- raise SecurityError(
631
- f"受保护文件上的部分读取被阻止: {file_path}\n"
632
- "必须读取完整文件。"
633
- )
634
- return True
635
- ```
636
-
637
- ### 原型污染防护
638
-
639
- ```javascript
640
- // 防止原型污染攻击
641
- function safeObjectMerge(target, source) {
642
- const blockedKeys = ['__proto__', 'constructor', 'prototype'];
643
-
644
- function merge(t, s, depth = 0) {
645
- if (depth > 10) {
646
- throw new SecurityError('对象合并深度超出');
647
- }
648
-
649
- for (const key of Object.keys(s)) {
650
- if (blockedKeys.includes(key)) {
651
- throw new SecurityError(`被阻止的属性: ${key}`);
652
- }
653
-
654
- if (typeof s[key] === 'object' && s[key] !== null) {
655
- t[key] = t[key] || {};
656
- merge(t[key], s[key], depth + 1);
657
- } else {
658
- t[key] = s[key];
659
- }
660
- }
661
-
662
- return t;
663
- }
664
-
665
- return merge(target, source);
666
- }
667
- ```
668
-
669
- ---
670
-
671
- ## 日志和审计
672
-
673
- ### 审计日志配置
674
-
675
- ```yaml
676
- # .sinapse/config.yaml - 审计配置
677
- audit:
678
- enabled: true
679
- level: info # debug, info, warn, error
680
-
681
- # 要记录什么
682
- events:
683
- - authentication
684
- - authorization
685
- - fileAccess
686
- - commandExecution
687
- - configChange
688
- - agentActivation
689
- - modeChange
690
- - error
691
-
692
- # 输出配置
693
- output:
694
- file:
695
- enabled: true
696
- path: .sinapse/logs/audit.log
697
- maxSize: 10M
698
- maxFiles: 10
699
- compress: true
700
- console:
701
- enabled: false
702
- remote:
703
- enabled: false
704
- endpoint: https://logs.example.com/audit
705
-
706
- # 保留
707
- retention:
708
- days: 90
709
- archivePath: .sinapse/logs/archive
710
- ```
711
-
712
- ### 审计日志格式
713
-
714
- ```json
715
- {
716
- "timestamp": "2026-01-29T14:30:00.000Z",
717
- "level": "info",
718
- "event": "commandExecution",
719
- "actor": {
720
- "type": "agent",
721
- "id": "dev",
722
- "name": "Dex"
723
- },
724
- "action": {
725
- "type": "execute",
726
- "tool": "Bash",
727
- "command": "npm run build"
728
- },
729
- "context": {
730
- "mode": "ask",
731
- "project": "my-project",
732
- "story": "1.1"
733
- },
734
- "result": {
735
- "status": "success",
736
- "duration": 12500
737
- },
738
- "security": {
739
- "approved": true,
740
- "approvedBy": "user",
741
- "riskLevel": "low"
742
- }
743
- }
744
- ```
745
-
746
- ### 日志分析查询
747
-
748
- ```bash
749
- # 查找所有失败的身份验证
750
- jq 'select(.event == "authentication" and .result.status == "failure")' audit.log
751
-
752
- # 查找代理执行的所有命令
753
- jq 'select(.event == "commandExecution" and .actor.type == "agent")' audit.log
754
-
755
- # 查找最后24小时内的所有安全事件
756
- jq 'select(.event == "security" and (.timestamp | fromdateiso8601) > (now - 86400))' audit.log
757
-
758
- # 按类型计数事件
759
- jq -s 'group_by(.event) | map({event: .[0].event, count: length})' audit.log
760
- ```
761
-
762
- ---
763
-
764
- ## 生产与开发配置
765
-
766
- ### 环境检测
767
-
768
- ```javascript
769
- // 环境感知的配置加载
770
- function loadSecurityConfig() {
771
- const env = process.env.NODE_ENV || 'development';
772
-
773
- const baseConfig = require('./security-config.base.json');
774
- const envConfig = require(`./security-config.${env}.json`);
775
-
776
- return deepMerge(baseConfig, envConfig);
777
- }
778
- ```
779
-
780
- ### 配置比较
781
-
782
- | 设置 | 开发 | 生产 |
783
- |------|------|------|
784
- | **SINAPSE_DEBUG** | `true` | `false` |
785
- | **LOG_LEVEL** | `debug` | `info` |
786
- | **权限模式** | `auto` | `ask` |
787
- | **速率限制** | 宽松 | 严格 |
788
- | **CORS** | `*` | 特定来源 |
789
- | **错误详情** | 完整堆栈跟踪 | 通用消息 |
790
- | **API密钥验证** | 仅警告 | 无效时阻止 |
791
- | **SSL/TLS** | 可选 | 必需 |
792
- | **审计日志** | 可选 | 必需 |
793
- | **会话超时** | 24小时 | 1小时 |
794
-
795
- ### 开发配置
796
-
797
- ```yaml
798
- # .sinapse/config.development.yaml
799
- security:
800
- debug: true
801
-
802
- validation:
803
- strict: false
804
- warnOnly: true
805
-
806
- rateLimiting:
807
- enabled: false
808
-
809
- cors:
810
- origin: '*'
811
- credentials: true
812
-
813
- session:
814
- timeout: 86400000 # 24小时
815
- secure: false
816
-
817
- audit:
818
- enabled: true
819
- level: debug
820
- console: true
821
-
822
- permissions:
823
- mode: auto
824
- ```
825
-
826
- ### 生产配置
827
-
828
- ```yaml
829
- # .sinapse/config.production.yaml
830
- security:
831
- debug: false
832
-
833
- validation:
834
- strict: true
835
- warnOnly: false
836
-
837
- rateLimiting:
838
- enabled: true
839
- windowMs: 900000 # 15分钟
840
- maxRequests: 1000
841
-
842
- cors:
843
- origin:
844
- - https://app.example.com
845
- - https://admin.example.com
846
- credentials: true
847
-
848
- session:
849
- timeout: 3600000 # 1小时
850
- secure: true
851
- sameSite: strict
852
-
853
- tls:
854
- enabled: true
855
- minVersion: TLSv1.2
856
- ciphers: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384
857
-
858
- headers:
859
- hsts: true
860
- hstsMaxAge: 31536000
861
- xssProtection: true
862
- noSniff: true
863
- frameOptions: DENY
864
-
865
- audit:
866
- enabled: true
867
- level: info
868
- console: false
869
- remote:
870
- enabled: true
871
- endpoint: https://logs.example.com/audit
872
-
873
- permissions:
874
- mode: ask
875
- requireApprovalFor:
876
- - delete
877
- - execute
878
- ```
879
-
880
- ---
881
-
882
- ## 安全检查表
883
-
884
- ### 部署前安全检查表
885
-
886
- ```markdown
887
- ## 部署前安全检查表
888
-
889
- ### 机密管理
890
-
891
- - [ ] 所有API密钥存储在环境变量或密钥管理器中
892
- - [ ] 源代码或git历史中没有机密
893
- - [ ] .env文件添加到.gitignore
894
- - [ ] 生产机密使用与开发不同的密钥
895
- - [ ] 建立密钥轮换计划
896
-
897
- ### 配置
898
-
899
- - [ ] NODE_ENV设置为'production'
900
- - [ ] 调试模式禁用
901
- - [ ] 错误消息不暴露内部详情
902
- - [ ] 速率限制配置和测试
903
- - [ ] CORS为生产域名正确配置
904
-
905
- ### 身份验证和授权
906
-
907
- - [ ] 强密码策略实施
908
- - [ ] JWT密钥在加密上强(32+个字符)
909
- - [ ] 令牌过期适当设置
910
- - [ ] 实现会话管理
911
- - [ ] 配置权限模式(默认:询问)
912
-
913
- ### 输入验证
914
-
915
- - [ ] 所有用户输入都被净化
916
- - [ ] 文件路径验证启用
917
- - [ ] 命令注入保护活跃
918
- - [ ] SQL治理钩子安装
919
- - [ ] 配置的架构验证
920
-
921
- ### 网络安全
922
-
923
- - [ ] 需要TLS 1.2+
924
- - [ ] 配置了安全头(HSTS、CSP等)
925
- - [ ] 不必要的端口关闭
926
- - [ ] 防火墙规则已就位
927
-
928
- ### 日志和监控
929
-
930
- - [ ] 审计日志启用
931
- - [ ] 日志文件安全(权限640)
932
- - [ ] 机密数据从日志中编辑
933
- - [ ] 为安全事件配置警报
934
- - [ ] 建立日志保留策略
935
-
936
- ### 依赖安全
937
-
938
- - [ ] npm audit显示没有严重漏洞
939
- - [ ] 启用了Dependabot或类似
940
- - [ ] 锁文件已提交并验证
941
- ```
942
-
943
- ### 持续安全检查表
944
-
945
- ```markdown
946
- ## 持续安全维护
947
-
948
- ### 每周
949
-
950
- - [ ] 审查来自监控的安全警报
951
- - [ ] 检查新的依赖漏洞
952
- - [ ] 审查访问日志中的异常
953
-
954
- ### 每月
955
-
956
- - [ ] 运行完整安全扫描(npm audit、snyk)
957
- - [ ] 更新带有安全补丁的依赖
958
- - [ ] 审查和轮换服务令牌
959
- - [ ] 审计用户访问和权限
960
-
961
- ### 每季度
962
-
963
- - [ ] 完整渗透测试
964
- - [ ] 审查和更新安全策略
965
- - [ ] 轮换长期机密(API密钥、JWT机密)
966
- - [ ] 安全培训刷新
967
-
968
- ### 每年
969
-
970
- - [ ] 第三方安全审计
971
- - [ ] 灾难恢复测试
972
- - [ ] 完整机密轮换
973
- - [ ] 安全架构审查
974
- ```
975
-
976
- ---
977
-
978
- ## 漏洞报告
979
-
980
- ### 负责披露政策
981
-
982
- 如果您在SINAPSE中发现安全漏洞,请遵循负责任的披露做法:
983
-
984
- ### 报告流程
985
-
986
- 1. **不要**为安全漏洞创建公共GitHub问题
987
- 2. 将安全问题发送至: **security@sinapse.ai**
988
- 3. 在报告中包括以下内容:
989
- - 漏洞描述
990
- - 复现步骤
991
- - 潜在影响评估
992
- - 任何建议的修复(可选)
993
-
994
- ### 漏洞报告模板
995
-
996
- ```markdown
997
- ## 漏洞报告模板
998
-
999
- **漏洞类型:** [例如,命令注入、XSS、身份验证绕过]
1000
-
1001
- **严重程度:** [严重 / 高 / 中 / 低]
1002
-
1003
- **受影响组件:** [例如,InputSanitizer、AuthSystem、MCP网关]
1004
-
1005
- **SINAPSE版本:** [例如,2.1.0]
1006
-
1007
- **描述:**
1008
- [漏洞的详细描述]
1009
-
1010
- **复现步骤:**
1011
-
1012
- 1. [步骤1]
1013
- 2. [步骤2]
1014
- 3. [步骤3]
1015
-
1016
- **概念证明:**
1017
- [演示漏洞的代码或命令]
1018
-
1019
- **影响:**
1020
- [攻击者可以使用此漏洞实现的目标]
1021
-
1022
- **建议修复:**
1023
- [可选: 您对修复问题的建议]
1024
- ```
1025
-
1026
- ### 响应时间表
1027
-
1028
- | 阶段 | 时间框架 |
1029
- |------|---------|
1030
- | 初始确认 | 24小时 |
1031
- | 初步评估 | 72小时 |
1032
- | 修复开发 | 7-14天 |
1033
- | 补丁发布 | 14-30天 |
1034
- | 公开披露 | 90天(或修复后) |
1035
-
1036
- ### 安全名人堂
1037
-
1038
- 负责任地披露漏洞的贡献者在我们的安全名人堂中被认可(征得许可)。
1039
-
1040
- ### Bug赏金计划
1041
-
1042
- 目前,SINAPSE没有正式的Bug赏金计划。但是,重大安全贡献会被认可,可能会获得SINAPSE Pro许可或其他认可。
1043
-
1044
- ---
1045
-
1046
- ## 相关文档
1047
-
1048
- - [安全最佳实践](../security-best-practices.md) - 一般安全准则
1049
- - [权限模式指南](./permission-modes.md) - 代理自主权控制
1050
- - [MCP全局设置](./mcp-global-setup.md) - 安全的MCP配置
1051
- - [质量门](./quality-gates.md) - CI/CD中的安全检查
1052
-
1053
- ---
1054
-
1055
- _SINAPSE安全加固指南 v4.0.4_