sinapse-ai 5.0.8 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +1 -1
- package/.claude/rules/agent-authority.md +10 -10
- package/.claude/rules/agent-memory-imports.md +4 -4
- package/.claude/rules/coderabbit-integration.md +4 -4
- package/.claude/rules/ids-principles.md +5 -5
- package/.claude/rules/story-lifecycle.md +15 -15
- package/.claude/rules/workflow-execution.md +11 -11
- package/.sinapse-ai/constitution.md +3 -3
- package/.sinapse-ai/core/code-intel/helpers/dev-helper.js +1 -1
- package/.sinapse-ai/core/code-intel/helpers/qa-helper.js +1 -1
- package/.sinapse-ai/core/code-intel/helpers/story-helper.js +7 -7
- package/.sinapse-ai/core/config/config-loader.js +1 -1
- package/.sinapse-ai/core/docs/session-update-pattern.md +1 -1
- package/.sinapse-ai/core/ids/framework-governor.js +4 -4
- package/.sinapse-ai/core/ids/index.js +1 -1
- package/.sinapse-ai/core/memory/gotchas-memory.js +1 -1
- package/.sinapse-ai/core/orchestration/agent-invoker.js +1 -1
- package/.sinapse-ai/core/orchestration/bob-surface-criteria.yaml +2 -2
- package/.sinapse-ai/core/orchestration/executor-assignment.js +1 -1
- package/.sinapse-ai/core/orchestration/executors/epic-6-executor.js +1 -1
- package/.sinapse-ai/core/orchestration/executors/epic-executor.js +1 -1
- package/.sinapse-ai/core/orchestration/greenfield-handler.js +4 -4
- package/.sinapse-ai/core/orchestration/master-orchestrator.js +1 -1
- package/.sinapse-ai/core/orchestration/skill-dispatcher.js +3 -3
- package/.sinapse-ai/core/orchestration/workflow-executor.js +1 -1
- package/.sinapse-ai/core/quality-gates/layer2-pr-automation.js +3 -3
- package/.sinapse-ai/core/quality-gates/layer3-human-review.js +1 -1
- package/.sinapse-ai/core/quality-gates/quality-gate-config.yaml +1 -1
- package/.sinapse-ai/core/session/context-loader.js +1 -1
- package/.sinapse-ai/data/agent-config-requirements.yaml +3 -3
- package/.sinapse-ai/data/entity-registry.yaml +2126 -2570
- package/.sinapse-ai/data/registry-update-log.jsonl +316 -0
- package/.sinapse-ai/data/sinapse-kb.md +13 -13
- package/.sinapse-ai/data/tech-presets/csharp.md +2 -2
- package/.sinapse-ai/data/tech-presets/go.md +2 -2
- package/.sinapse-ai/data/tech-presets/java.md +2 -2
- package/.sinapse-ai/data/tech-presets/nextjs-react.md +1 -1
- package/.sinapse-ai/data/tech-presets/php.md +2 -2
- package/.sinapse-ai/data/tech-presets/rust.md +2 -2
- package/.sinapse-ai/data/technical-preferences.md +1 -1
- package/.sinapse-ai/data/workflow-chains.yaml +15 -15
- package/.sinapse-ai/development/README.md +1 -1
- package/.sinapse-ai/development/agent-teams/team-qa-focused.yaml +7 -7
- package/.sinapse-ai/development/agents/analyst.md +6 -6
- package/.sinapse-ai/development/agents/architect.md +4 -4
- package/.sinapse-ai/development/agents/data-engineer.md +2 -2
- package/.sinapse-ai/development/agents/{dev.md → developer.md} +7 -7
- package/.sinapse-ai/development/agents/devops.md +4 -4
- package/.sinapse-ai/development/agents/{po → product-lead}/MEMORY.md +3 -3
- package/.sinapse-ai/development/agents/{po.md → product-lead.md} +25 -25
- package/.sinapse-ai/development/agents/{pm → project-lead}/MEMORY.md +2 -2
- package/.sinapse-ai/development/agents/{pm.md → project-lead.md} +15 -15
- package/.sinapse-ai/development/agents/{qa.md → quality-gate.md} +8 -8
- package/.sinapse-ai/development/agents/{sinapse-master.md → sinapse-orqx.md} +12 -12
- package/.sinapse-ai/development/agents/{sm.md → sprint-lead.md} +18 -18
- package/.sinapse-ai/development/agents/squad-creator.md +4 -4
- package/.sinapse-ai/development/agents/ux-design-expert.md +2 -2
- package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +1 -1
- package/.sinapse-ai/development/checklists/memory-audit-checklist.md +1 -1
- package/.sinapse-ai/development/scripts/agent-config-loader.js +1 -1
- package/.sinapse-ai/development/scripts/apply-inline-greeting-all-agents.js +1 -1
- package/.sinapse-ai/development/scripts/audit-agent-config.js +2 -2
- package/.sinapse-ai/development/scripts/batch-update-agents-session-context.js +1 -1
- package/.sinapse-ai/development/scripts/dev-context-loader.js +1 -1
- package/.sinapse-ai/development/scripts/populate-entity-registry.js +2 -2
- package/.sinapse-ai/development/scripts/test-greeting-system.js +4 -4
- package/.sinapse-ai/development/scripts/unified-activation-pipeline.js +2 -2
- package/.sinapse-ai/development/scripts/verify-workflow-gaps.js +9 -9
- package/.sinapse-ai/development/tasks/analyze-cross-artifact.md +1 -1
- package/.sinapse-ai/development/tasks/analyze-project-structure.md +4 -4
- package/.sinapse-ai/development/tasks/apply-qa-fixes.md +1 -1
- package/.sinapse-ai/development/tasks/architect-analyze-impact.md +1 -1
- package/.sinapse-ai/development/tasks/brownfield-create-epic.md +10 -10
- package/.sinapse-ai/development/tasks/brownfield-create-story.md +1 -1
- package/.sinapse-ai/development/tasks/build-autonomous.md +1 -1
- package/.sinapse-ai/development/tasks/cleanup-utilities.md +6 -6
- package/.sinapse-ai/development/tasks/create-agent.md +1 -1
- package/.sinapse-ai/development/tasks/create-brownfield-story.md +4 -4
- package/.sinapse-ai/development/tasks/create-next-story.md +12 -12
- package/.sinapse-ai/development/tasks/create-service.md +2 -2
- package/.sinapse-ai/development/tasks/create-suite.md +1 -1
- package/.sinapse-ai/development/tasks/dev-backlog-debt.md +3 -3
- package/.sinapse-ai/development/tasks/dev-develop-story.md +5 -5
- package/.sinapse-ai/development/tasks/environment-bootstrap.md +2 -2
- package/.sinapse-ai/development/tasks/execute-checklist.md +1 -1
- package/.sinapse-ai/development/tasks/execute-epic-plan.md +11 -11
- package/.sinapse-ai/development/tasks/extract-patterns.md +2 -2
- package/.sinapse-ai/development/tasks/facilitate-brainstorming-session.md +2 -2
- package/.sinapse-ai/development/tasks/github-devops-github-pr-automation.md +1 -1
- package/.sinapse-ai/development/tasks/github-devops-pre-push-quality-gate.md +1 -1
- package/.sinapse-ai/development/tasks/ids-governor.md +3 -3
- package/.sinapse-ai/development/tasks/next.md +2 -2
- package/.sinapse-ai/development/tasks/orchestrate-resume.md +1 -1
- package/.sinapse-ai/development/tasks/orchestrate-status.md +1 -1
- package/.sinapse-ai/development/tasks/orchestrate-stop.md +1 -1
- package/.sinapse-ai/development/tasks/orchestrate.md +1 -1
- package/.sinapse-ai/development/tasks/patterns.md +2 -2
- package/.sinapse-ai/development/tasks/plan-create-context.md +2 -2
- package/.sinapse-ai/development/tasks/plan-execute-subtask.md +3 -3
- package/.sinapse-ai/development/tasks/po-close-story.md +3 -3
- package/.sinapse-ai/development/tasks/project-status.md +2 -2
- package/.sinapse-ai/development/tasks/qa-after-creation.md +2 -2
- package/.sinapse-ai/development/tasks/qa-backlog-add-followup.md +3 -3
- package/.sinapse-ai/development/tasks/qa-create-fix-request.md +8 -8
- package/.sinapse-ai/development/tasks/qa-evidence-requirements.md +1 -1
- package/.sinapse-ai/development/tasks/qa-false-positive-detection.md +1 -1
- package/.sinapse-ai/development/tasks/qa-fix-issues.md +10 -10
- package/.sinapse-ai/development/tasks/qa-gate.md +3 -3
- package/.sinapse-ai/development/tasks/qa-review-build.md +3 -3
- package/.sinapse-ai/development/tasks/qa-review-story.md +2 -2
- package/.sinapse-ai/development/tasks/qa-run-tests.md +1 -1
- package/.sinapse-ai/development/tasks/run-workflow-engine.md +1 -1
- package/.sinapse-ai/development/tasks/run-workflow.md +1 -1
- package/.sinapse-ai/development/tasks/security-scan.md +2 -2
- package/.sinapse-ai/development/tasks/setup-llm-routing.md +1 -1
- package/.sinapse-ai/development/tasks/spec-critique.md +4 -4
- package/.sinapse-ai/development/tasks/spec-gather-requirements.md +4 -4
- package/.sinapse-ai/development/tasks/spec-write-spec.md +2 -2
- package/.sinapse-ai/development/tasks/story-checkpoint.md +3 -3
- package/.sinapse-ai/development/tasks/sync-registry-intel.md +1 -1
- package/.sinapse-ai/development/tasks/validate-agents.md +1 -1
- package/.sinapse-ai/development/tasks/validate-next-story.md +10 -10
- package/.sinapse-ai/development/tasks/validate-workflow.md +1 -1
- package/.sinapse-ai/development/tasks/verify-subtask.md +2 -2
- package/.sinapse-ai/development/templates/code-intel-integration-pattern.md +3 -3
- package/.sinapse-ai/development/templates/subagent-step-prompt.md +2 -2
- package/.sinapse-ai/development/workflows/README.md +2 -2
- package/.sinapse-ai/development/workflows/auto-worktree.yaml +5 -5
- package/.sinapse-ai/development/workflows/brownfield-discovery.yaml +11 -11
- package/.sinapse-ai/development/workflows/brownfield-fullstack.yaml +6 -6
- package/.sinapse-ai/development/workflows/brownfield-service.yaml +5 -5
- package/.sinapse-ai/development/workflows/brownfield-ui.yaml +5 -5
- package/.sinapse-ai/development/workflows/development-cycle.yaml +10 -10
- package/.sinapse-ai/development/workflows/epic-orchestration.yaml +6 -6
- package/.sinapse-ai/development/workflows/greenfield-fullstack.yaml +7 -7
- package/.sinapse-ai/development/workflows/greenfield-service.yaml +5 -5
- package/.sinapse-ai/development/workflows/greenfield-ui.yaml +5 -5
- package/.sinapse-ai/development/workflows/qa-loop.yaml +1 -1
- package/.sinapse-ai/development/workflows/spec-pipeline.yaml +2 -2
- package/.sinapse-ai/development/workflows/story-development-cycle.yaml +1 -1
- package/.sinapse-ai/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +2 -2
- package/.sinapse-ai/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +1 -1
- package/.sinapse-ai/docs/standards/QUALITY-GATES-SPECIFICATION.md +1 -1
- package/.sinapse-ai/docs/standards/SINAPSE-LIVRO-DE-OURO-V2.1-COMPLETE.md +6 -6
- package/.sinapse-ai/docs/standards/STANDARDS-INDEX.md +2 -2
- package/.sinapse-ai/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +6 -6
- package/.sinapse-ai/infrastructure/scripts/config-loader.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/gotchas-documenter.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/ide-sync/README.md +3 -3
- package/.sinapse-ai/infrastructure/scripts/ide-sync/gemini-commands.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/ide-sync/index.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/ide-sync/redirect-generator.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/migrate-agent.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/performance-tracker.js +2 -2
- package/.sinapse-ai/infrastructure/scripts/qa-report-generator.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/recovery-tracker.js +1 -1
- package/.sinapse-ai/infrastructure/scripts/rollback-manager.js +1 -1
- package/.sinapse-ai/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +1 -1
- package/.sinapse-ai/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +1 -1
- package/.sinapse-ai/infrastructure/templates/sinapse-sync.yaml.template +1 -1
- package/.sinapse-ai/install-manifest.yaml +344 -344
- package/.sinapse-ai/monitor/hooks/lib/enrich.py +1 -1
- package/.sinapse-ai/product/checklists/self-critique-checklist.md +1 -1
- package/.sinapse-ai/product/checklists/story-draft-checklist.md +3 -3
- package/.sinapse-ai/product/templates/command-rationalization-matrix.md +3 -3
- package/.sinapse-ai/product/templates/design-story-tmpl.yaml +4 -4
- package/.sinapse-ai/product/templates/ide-rules/antigravity-rules.md +1 -1
- package/.sinapse-ai/product/templates/ide-rules/claude-rules.md +2 -2
- package/.sinapse-ai/product/templates/ide-rules/codex-rules.md +6 -6
- package/.sinapse-ai/product/templates/ide-rules/cursor-rules.md +1 -1
- package/.sinapse-ai/product/templates/personalized-agent-template.md +1 -1
- package/.sinapse-ai/product/templates/personalized-task-template.md +1 -1
- package/.sinapse-ai/product/templates/personalized-template-file.yaml +1 -1
- package/.sinapse-ai/product/templates/personalized-workflow-template.yaml +3 -3
- package/.sinapse-ai/product/templates/story-tmpl.yaml +8 -8
- package/.sinapse-ai/schemas/README.md +15 -15
- package/.sinapse-ai/scripts/diagnostics/health-dashboard/package-lock.json +2 -2
- package/.sinapse-ai/user-guide.md +4 -4
- package/.sinapse-ai/working-in-the-brownfield.md +3 -3
- package/LICENSE +4 -4
- package/README.en.md +6 -6
- package/README.md +8 -8
- package/bin/cli.js +9 -9
- package/bin/sinapse.js +17 -0
- package/docs/00-shared-activation-pipeline.md +16 -16
- package/docs/FEATURE_PROCESS.md +1 -1
- package/docs/ORQX-PLAN.md +264 -0
- package/docs/core-architecture.md +2 -2
- package/docs/en/sinapse-agent-flows/README.md +2 -2
- package/docs/en/sinapse-agent-flows/dev-system.md +2 -2
- package/docs/en/sinapse-agent-flows/pm-system.md +2 -2
- package/docs/en/sinapse-agent-flows/qa-system.md +2 -2
- package/docs/en/sinapse-agent-flows/{sinapse-master-system.md → sinapse-orqx-system.md} +5 -5
- package/docs/en/sinapse-agent-flows/sm-system.md +2 -2
- package/docs/framework/entity-layer-classification.md +2 -2
- package/docs/framework/source-tree.md +17 -17
- package/docs/getting-started.md +13 -13
- package/docs/guides/IDS-CONCEITOS-EXPLICADOS.md +17 -17
- package/docs/guides/MEMORY-INTEGRATION.md +3 -3
- package/docs/guides/MEMORY-INTELLIGENCE-SYSTEM.md +4 -4
- package/docs/guides/ade-guide.md +25 -25
- package/docs/guides/agent-selection-guide.md +36 -36
- package/docs/guides/agents/ANALYST-SYSTEM.md +5 -5
- package/docs/guides/agents/ARCHITECT-SYSTEM.md +9 -9
- package/docs/guides/agents/DATA-ENGINEER-SYSTEM.md +8 -8
- package/docs/guides/agents/DEV-SYSTEM.md +27 -27
- package/docs/guides/agents/DEVOPS-SYSTEM.md +5 -5
- package/docs/guides/agents/PM-SYSTEM.md +24 -24
- package/docs/guides/agents/QA-SYSTEM.md +24 -24
- package/docs/guides/agents/SINAPSE-MASTER-SYSTEM.md +26 -26
- package/docs/guides/agents/SM-SYSTEM.md +31 -31
- package/docs/guides/agents/SQUAD-CREATOR-SYSTEM.md +2 -2
- package/docs/guides/agents/UX-DESIGN-EXPERT-SYSTEM.md +10 -10
- package/docs/guides/agents/traces/00-shared-activation-pipeline.md +16 -16
- package/docs/guides/agents/traces/00-shared-activation-pipeline.v1-act8.md +16 -16
- package/docs/guides/agents/traces/README.md +20 -20
- package/docs/guides/agents/traces/analyst-execution-trace.md +6 -6
- package/docs/guides/agents/traces/architect-execution-trace.md +3 -3
- package/docs/guides/agents/traces/data-engineer-execution-trace.md +4 -4
- package/docs/guides/agents/traces/dev-execution-trace.md +12 -12
- package/docs/guides/agents/traces/devops-execution-trace.md +6 -6
- package/docs/guides/agents/traces/pm-execution-trace.md +14 -14
- package/docs/guides/agents/traces/po-execution-trace.md +17 -17
- package/docs/guides/agents/traces/qa-execution-trace.md +15 -15
- package/docs/guides/agents/traces/{sinapse-master-execution-trace.md → sinapse-orqx-execution-trace.md} +22 -22
- package/docs/guides/agents/traces/sm-execution-trace.md +15 -15
- package/docs/guides/agents/traces/squad-creation-execution-trace.md +9 -9
- package/docs/guides/agents/traces/ux-design-expert-execution-trace.md +4 -4
- package/docs/guides/api-reference.md +27 -27
- package/docs/guides/coderabbit/README.md +9 -9
- package/docs/guides/contextual-greeting-system-guide.md +5 -5
- package/docs/guides/development-setup.md +1 -1
- package/docs/guides/project-status-feature.md +2 -2
- package/docs/guides/quality-dashboard.md +2 -2
- package/docs/guides/quality-gates.md +6 -6
- package/docs/guides/template-engine-v2.md +2 -2
- package/docs/guides/user-guide.md +13 -13
- package/docs/guides/workflows/AUTO-WORKTREE-WORKFLOW.md +3 -3
- package/docs/guides/workflows/BROWNFIELD-DISCOVERY-WORKFLOW.md +6 -6
- package/docs/guides/workflows/BROWNFIELD-FULLSTACK-WORKFLOW.md +30 -30
- package/docs/guides/workflows/BROWNFIELD-SERVICE-WORKFLOW.md +38 -38
- package/docs/guides/workflows/BROWNFIELD-UI-WORKFLOW.md +25 -25
- package/docs/guides/workflows/GREENFIELD-FULLSTACK-WORKFLOW.md +37 -37
- package/docs/guides/workflows/GREENFIELD-SERVICE-WORKFLOW.md +5 -5
- package/docs/guides/workflows/GREENFIELD-UI-WORKFLOW.md +19 -19
- package/docs/guides/workflows/QA-LOOP-WORKFLOW.md +13 -13
- package/docs/guides/workflows/SINAPSE-COMPLETE-CROSS-REFERENCE-ANALYSIS.md +19 -19
- package/docs/guides/workflows/SPEC-PIPELINE-WORKFLOW.md +25 -25
- package/docs/guides/workflows/STORY-DEVELOPMENT-CYCLE-WORKFLOW.md +28 -28
- package/docs/guides/workflows/WORKFLOW-TASK-AGENT-ANALYSIS.md +94 -94
- package/docs/guides/workflows/xref-phase2-templates.md +29 -29
- package/docs/guides/workflows/xref-phase3-scripts.md +33 -33
- package/docs/guides/workflows/xref-phase4-infra.md +2 -2
- package/docs/guides/workflows/xref-phase6-supporting.md +1 -1
- package/docs/guides/workflows-guide.md +2 -2
- package/docs/installation/faq.md +1 -1
- package/docs/installation/troubleshooting.md +2 -2
- package/docs/installation/v4-quick-start.md +2 -2
- package/docs/prd-cli-graph-dashboard.md +1 -1
- package/docs/pt/DOCUMENTATION-ROADMAP.md +1 -1
- package/docs/pt/FEATURE_PROCESS.md +1 -1
- package/docs/pt/README.md +2 -2
- package/docs/pt/agents/archetype-rationale.md +4 -4
- package/docs/pt/agents/persona-definitions.md +9 -9
- package/docs/pt/architecture/ADE-ARCHITECT-HANDOFF.md +15 -15
- package/docs/pt/architecture/ADE-EPIC1-HANDOFF.md +2 -2
- package/docs/pt/architecture/ADE-EPIC2-HANDOFF.md +2 -2
- package/docs/pt/architecture/ADE-EPIC3-HANDOFF.md +8 -8
- package/docs/pt/architecture/ade-architecture.md +4 -4
- package/docs/pt/architecture/adr/adr-hcs-health-check-system.md +3 -3
- package/docs/pt/architecture/agent-config-audit.md +4 -4
- package/docs/pt/architecture/agent-responsibility-matrix.md +20 -20
- package/docs/pt/architecture/agent-tool-integration-guide.md +8 -8
- package/docs/pt/architecture/contribution-workflow-research.md +1 -1
- package/docs/pt/architecture/dashboard-architecture.md +1 -1
- package/docs/pt/architecture/hcs-check-specifications.md +1 -1
- package/docs/pt/architecture/hcs-execution-modes.md +1 -1
- package/docs/pt/architecture/hcs-self-healing-spec.md +1 -1
- package/docs/pt/architecture/high-level-architecture.md +1 -1
- package/docs/pt/architecture/module-system.md +1 -1
- package/docs/pt/architecture/source-tree.md +1 -1
- package/docs/pt/architecture/squad-improvement-recommended-approach.md +2 -2
- package/docs/pt/architecture/utility-integration-guide.md +2 -2
- package/docs/pt/contributing.md +1 -1
- package/docs/pt/core-architecture.md +2 -2
- package/docs/pt/framework/source-tree.md +1 -1
- package/docs/pt/guides/ade-guide.md +25 -25
- package/docs/pt/guides/agent-selection-guide.md +36 -36
- package/docs/pt/guides/api-reference.md +25 -25
- package/docs/pt/guides/contextual-greeting-system-guide.md +5 -5
- package/docs/pt/guides/development-setup.md +1 -1
- package/docs/pt/guides/project-status-feature.md +2 -2
- package/docs/pt/guides/quality-dashboard.md +2 -2
- package/docs/pt/guides/quality-gates.md +6 -6
- package/docs/pt/guides/template-engine-v2.md +2 -2
- package/docs/pt/guides/user-guide.md +8 -8
- package/docs/pt/guides/workflows-guide.md +2 -2
- package/docs/pt/installation/faq.md +1 -1
- package/docs/pt/installation/troubleshooting.md +2 -2
- package/docs/pt/installation/v4-quick-start.md +2 -2
- package/docs/pt/platforms/antigravity.md +9 -9
- package/docs/pt/platforms/cursor.md +15 -15
- package/docs/pt/platforms/gemini-cli.md +3 -3
- package/docs/pt/roadmap.md +1 -1
- package/docs/pt/sinapse-nomenclature-specification.md +15 -15
- package/docs/pt/specifications/docs-agent-technical-specification.md +11 -11
- package/docs/roadmap.md +1 -1
- package/docs/sinapse-agent-flows/README.md +2 -2
- package/docs/sinapse-agent-flows/analyst-system.md +5 -5
- package/docs/sinapse-agent-flows/architect-system.md +9 -9
- package/docs/sinapse-agent-flows/data-engineer-system.md +8 -8
- package/docs/sinapse-agent-flows/dev-system.md +27 -27
- package/docs/sinapse-agent-flows/devops-system.md +5 -5
- package/docs/sinapse-agent-flows/pm-system.md +24 -24
- package/docs/sinapse-agent-flows/qa-system.md +24 -24
- package/docs/sinapse-agent-flows/{sinapse-master-system.md → sinapse-orqx-system.md} +26 -26
- package/docs/sinapse-agent-flows/sm-system.md +31 -31
- package/docs/sinapse-agent-flows/squad-creator-system.md +2 -2
- package/docs/sinapse-agent-flows/ux-design-expert-system.md +10 -10
- package/docs/sinapse-workflows/auto-worktree-workflow.md +3 -3
- package/docs/sinapse-workflows/brownfield-discovery-workflow.md +6 -6
- package/docs/sinapse-workflows/brownfield-fullstack-workflow.md +30 -30
- package/docs/sinapse-workflows/brownfield-service-workflow.md +38 -38
- package/docs/sinapse-workflows/brownfield-ui-workflow.md +25 -25
- package/docs/sinapse-workflows/greenfield-fullstack-workflow.md +37 -37
- package/docs/sinapse-workflows/greenfield-service-workflow.md +5 -5
- package/docs/sinapse-workflows/greenfield-ui-workflow.md +19 -19
- package/docs/sinapse-workflows/qa-loop-workflow.md +13 -13
- package/docs/sinapse-workflows/spec-pipeline-workflow.md +25 -25
- package/docs/sinapse-workflows/story-development-cycle-workflow.md +28 -28
- package/package.json +1 -1
- package/packages/gemini-sinapse-extension/README.md +1 -1
- package/packages/gemini-sinapse-extension/commands/lib/agent-launcher.js +1 -1
- package/packages/gemini-sinapse-extension/commands/{sinapse-master.js → sinapse-orqx.js} +1 -1
- package/packages/gemini-sinapse-extension/extension.json +3 -3
- package/packages/gemini-sinapse-extension/gemini-extension.json +3 -3
- package/packages/installer/src/config/configure-environment.js +2 -2
- package/packages/installer/src/updater/index.js +105 -0
- package/packages/installer/src/wizard/feedback.js +38 -30
- package/packages/installer/src/wizard/i18n.js +25 -182
- package/packages/installer/src/wizard/ide-config-generator.js +1 -1
- package/packages/installer/src/wizard/index.js +253 -69
- package/packages/installer/src/wizard/questions.js +35 -7
- package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +1 -1
- package/packages/sinapse-install/README.md +1 -1
- package/packages/sinapse-install/src/installer.js +1 -1
- package/scripts/package-synapse.js +1 -1
- package/sinapse/agents/{sinapse-master.md → sinapse-orqx.md} +16 -16
- package/sinapse/knowledge-base/cross-squad-patterns.md +1 -1
- package/sinapse/knowledge-base/routing-catalog.md +1 -1
- package/sinapse/squad.yaml +1 -1
- package/sinapse/tasks/compose-multi-squad-plan.md +2 -2
- package/sinapse/tasks/coordinate-cross-squad.md +2 -2
- package/sinapse/tasks/diagnose-and-route.md +2 -2
- package/sinapse/tasks/onboard-user.md +2 -2
- package/sinapse/tasks/resolve-conflict.md +2 -2
- package/sinapse/tasks/squad-status-report.md +2 -2
- package/sinapse/tasks/strategic-brief.md +3 -3
- package/squads/squad-animations/agents/animations-orqx.md +2 -2
- package/squads/squad-brand/agents/brand-creative-engineer.md +1 -1
- package/squads/squad-brand/agents/brand-motion-vfx.md +1 -1
- package/squads/squad-brand/agents/brand-orqx.md +2 -2
- package/squads/squad-brand/agents/brand-sonic-designer.md +1 -1
- package/squads/squad-brand/agents/brand-system-architect.md +1 -1
- package/squads/squad-claude/agents/claude-orqx.md +2 -2
- package/squads/squad-cloning/agents/cloning-orqx.md +3 -3
- package/squads/squad-commercial/agents/commercial-orqx.md +1 -1
- package/squads/squad-commercial/agents/cs-business-auditor.md +1 -1
- package/squads/squad-commercial/agents/cs-client-success.md +1 -1
- package/squads/squad-commercial/agents/cs-crm-specialist.md +1 -1
- package/squads/squad-commercial/agents/cs-funnel-architect.md +1 -1
- package/squads/squad-commercial/agents/cs-lead-generation-strategist.md +1 -1
- package/squads/squad-commercial/agents/cs-offer-designer.md +1 -1
- package/squads/squad-commercial/agents/cs-revops-analyst.md +1 -1
- package/squads/squad-commercial/agents/cs-sales-closer.md +1 -1
- package/squads/squad-commercial/agents/cs-sales-enablement.md +1 -1
- package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +1 -1
- package/squads/squad-content/agents/content-orqx.md +2 -2
- package/squads/squad-content/knowledge-base/ai-leverage-content-framework.md +1 -1
- package/squads/squad-copy/agents/copy-strategist.md +3 -3
- package/squads/squad-copy/knowledge-base/consequence-headline-patterns.md +1 -1
- package/squads/squad-council/agents/council-orqx.md +1 -1
- package/squads/squad-courses/agents/courses-orqx.md +1 -1
- package/squads/squad-cybersecurity/agents/cyber-orqx.md +2 -2
- package/squads/squad-design/agents/design-orqx.md +2 -2
- package/squads/squad-finance/agents/finance-orqx.md +2 -2
- package/squads/squad-growth/agents/growth-orqx.md +2 -2
- package/squads/squad-paidmedia/agents/paidmedia-orqx.md +2 -2
- package/squads/squad-product/agents/product-orqx.md +2 -2
- package/squads/squad-research/agents/research-orqx.md +2 -2
- package/squads/squad-research/tasks/create-executive-briefing.md +1 -1
- package/squads/squad-research/tasks/create-insight-deck.md +1 -1
- package/squads/squad-research/tasks/forecast-industry-trends.md +1 -1
- package/squads/squad-research/tasks/generate-actionable-recommendations.md +2 -2
- package/squads/squad-research/tasks/run-scenario-planning.md +2 -2
- package/squads/squad-research/tasks/synthesize-research-report.md +2 -2
- package/squads/squad-research/tasks/track-emerging-technologies.md +1 -1
- package/squads/squad-storytelling/agents/storytelling-orqx.md +2 -2
- package/docs/es/CHANGELOG.md +0 -117
- package/docs/es/DOCUMENTATION-ROADMAP.md +0 -216
- package/docs/es/ENVIRONMENT.md +0 -140
- package/docs/es/FEATURE_PROCESS.md +0 -99
- package/docs/es/GUIDING-PRINCIPLES.md +0 -101
- package/docs/es/README.md +0 -134
- package/docs/es/agent-reference-guide.md +0 -570
- package/docs/es/agents/archetype-rationale.md +0 -566
- package/docs/es/agents/persona-definitions.md +0 -501
- package/docs/es/api/squads-api.md +0 -753
- package/docs/es/architecture/ADE-AGENT-CHANGES.md +0 -469
- package/docs/es/architecture/ADE-ARCHITECT-HANDOFF.md +0 -338
- package/docs/es/architecture/ADE-EPIC1-HANDOFF.md +0 -85
- package/docs/es/architecture/ADE-EPIC2-HANDOFF.md +0 -106
- package/docs/es/architecture/ADE-EPIC3-HANDOFF.md +0 -327
- package/docs/es/architecture/ARCHITECTURE-INDEX.md +0 -188
- package/docs/es/architecture/ade-architecture.md +0 -586
- package/docs/es/architecture/adr/ADR-COLLAB-1-current-state-audit.md +0 -259
- package/docs/es/architecture/adr/ADR-COLLAB-2-proposed-configuration.md +0 -518
- package/docs/es/architecture/adr/adr-hcs-health-check-system.md +0 -489
- package/docs/es/architecture/adr/adr-isolated-vm-decision.md +0 -70
- package/docs/es/architecture/agent-config-audit.md +0 -222
- package/docs/es/architecture/agent-responsibility-matrix.md +0 -444
- package/docs/es/architecture/agent-tool-integration-guide.md +0 -334
- package/docs/es/architecture/ci-cd.md +0 -151
- package/docs/es/architecture/coding-standards.md +0 -896
- package/docs/es/architecture/contribution-workflow-research.md +0 -376
- package/docs/es/architecture/dashboard-architecture.md +0 -926
- package/docs/es/architecture/dashboard-realtime.md +0 -1253
- package/docs/es/architecture/hcs-check-specifications.md +0 -897
- package/docs/es/architecture/hcs-execution-modes.md +0 -519
- package/docs/es/architecture/hcs-self-healing-spec.md +0 -695
- package/docs/es/architecture/high-level-architecture.md +0 -357
- package/docs/es/architecture/introduction.md +0 -21
- package/docs/es/architecture/mcp-api-keys-management.md +0 -246
- package/docs/es/architecture/mcp-system-diagrams.md +0 -113
- package/docs/es/architecture/module-system.md +0 -382
- package/docs/es/architecture/multi-repo-strategy.md +0 -390
- package/docs/es/architecture/source-tree.md +0 -708
- package/docs/es/architecture/squad-improvement-analysis.md +0 -204
- package/docs/es/architecture/squad-improvement-recommended-approach.md +0 -390
- package/docs/es/architecture/tech-stack.md +0 -806
- package/docs/es/architecture/utility-integration-guide.md +0 -358
- package/docs/es/community/README-community-snippet-core.md +0 -57
- package/docs/es/community/README-community-snippet-mcp.md +0 -49
- package/docs/es/community/README-community-snippet-squads.md +0 -40
- package/docs/es/community.md +0 -227
- package/docs/es/core-architecture.md +0 -229
- package/docs/es/docker-mcp-setup.md +0 -426
- package/docs/es/framework/README.md +0 -99
- package/docs/es/framework/coding-standards.md +0 -892
- package/docs/es/framework/source-tree.md +0 -725
- package/docs/es/framework/tech-stack.md +0 -802
- package/docs/es/getting-started.md +0 -572
- package/docs/es/git-workflow-guide.md +0 -995
- package/docs/es/guides/README.md +0 -133
- package/docs/es/guides/ade-guide.md +0 -452
- package/docs/es/guides/agent-selection-guide.md +0 -295
- package/docs/es/guides/api-reference.md +0 -899
- package/docs/es/guides/build-recovery-guide.md +0 -270
- package/docs/es/guides/contextual-greeting-system-guide.md +0 -387
- package/docs/es/guides/contributing-squads.md +0 -256
- package/docs/es/guides/development-setup.md +0 -1111
- package/docs/es/guides/ide-sync-guide.md +0 -194
- package/docs/es/guides/installation-troubleshooting.md +0 -327
- package/docs/es/guides/llm-routing.md +0 -312
- package/docs/es/guides/mcp/desktop-commander.md +0 -368
- package/docs/es/guides/mcp/docker-gateway-tutorial.md +0 -336
- package/docs/es/guides/mcp-global-setup.md +0 -663
- package/docs/es/guides/permission-modes.md +0 -313
- package/docs/es/guides/project-status-feature.md +0 -473
- package/docs/es/guides/quality-dashboard.md +0 -367
- package/docs/es/guides/quality-gates.md +0 -614
- package/docs/es/guides/security-hardening.md +0 -1359
- package/docs/es/guides/service-discovery.md +0 -524
- package/docs/es/guides/squad-examples/README.md +0 -64
- package/docs/es/guides/squad-migration.md +0 -356
- package/docs/es/guides/squads-guide.md +0 -836
- package/docs/es/guides/squads-overview.md +0 -332
- package/docs/es/guides/template-engine-v2.md +0 -484
- package/docs/es/guides/testing-guide.md +0 -1215
- package/docs/es/guides/user-guide.md +0 -452
- package/docs/es/guides/workflows-guide.md +0 -400
- package/docs/es/how-to-contribute-with-pull-requests.md +0 -160
- package/docs/es/ide-integration.md +0 -425
- package/docs/es/installation/README.md +0 -108
- package/docs/es/installation/faq.md +0 -616
- package/docs/es/installation/linux.md +0 -311
- package/docs/es/installation/macos.md +0 -189
- package/docs/es/installation/troubleshooting.md +0 -735
- package/docs/es/installation/v4-quick-start.md +0 -269
- package/docs/es/installation/windows.md +0 -342
- package/docs/es/meta-agent-commands.md +0 -990
- package/docs/es/migration-guide.md +0 -310
- package/docs/es/npx-install.md +0 -193
- package/docs/es/performance-tuning-guide.md +0 -707
- package/docs/es/platforms/README.md +0 -283
- package/docs/es/platforms/antigravity.md +0 -510
- package/docs/es/platforms/claude-code.md +0 -650
- package/docs/es/platforms/cursor.md +0 -635
- package/docs/es/platforms/gemini-cli.md +0 -483
- package/docs/es/platforms/github-copilot.md +0 -480
- package/docs/es/roadmap.md +0 -119
- package/docs/es/security-best-practices.md +0 -613
- package/docs/es/security.md +0 -124
- package/docs/es/sinapse-agent-flows/README.md +0 -190
- package/docs/es/sinapse-agent-flows/analyst-system.md +0 -36
- package/docs/es/sinapse-agent-flows/architect-system.md +0 -36
- package/docs/es/sinapse-agent-flows/data-engineer-system.md +0 -36
- package/docs/es/sinapse-agent-flows/dev-system.md +0 -36
- package/docs/es/sinapse-agent-flows/devops-system.md +0 -36
- package/docs/es/sinapse-agent-flows/pm-system.md +0 -36
- package/docs/es/sinapse-agent-flows/qa-system.md +0 -36
- package/docs/es/sinapse-agent-flows/sinapse-master-system.md +0 -36
- package/docs/es/sinapse-agent-flows/sm-system.md +0 -36
- package/docs/es/sinapse-agent-flows/squad-creator-system.md +0 -36
- package/docs/es/sinapse-agent-flows/ux-design-expert-system.md +0 -36
- package/docs/es/sinapse-nomenclature-specification.md +0 -673
- package/docs/es/sinapse-workflows/README.md +0 -247
- package/docs/es/sinapse-workflows/auto-worktree-workflow.md +0 -39
- package/docs/es/sinapse-workflows/brownfield-discovery-workflow.md +0 -41
- package/docs/es/sinapse-workflows/brownfield-fullstack-workflow.md +0 -42
- package/docs/es/sinapse-workflows/brownfield-service-workflow.md +0 -43
- package/docs/es/sinapse-workflows/brownfield-ui-workflow.md +0 -42
- package/docs/es/sinapse-workflows/design-system-build-quality-workflow.md +0 -40
- package/docs/es/sinapse-workflows/greenfield-fullstack-workflow.md +0 -44
- package/docs/es/sinapse-workflows/greenfield-service-workflow.md +0 -43
- package/docs/es/sinapse-workflows/greenfield-ui-workflow.md +0 -43
- package/docs/es/sinapse-workflows/qa-loop-workflow.md +0 -39
- package/docs/es/sinapse-workflows/spec-pipeline-workflow.md +0 -40
- package/docs/es/sinapse-workflows/story-development-cycle-workflow.md +0 -42
- package/docs/es/specifications/docs-agent-technical-specification.md +0 -2161
- package/docs/es/troubleshooting.md +0 -887
- package/docs/es/uninstallation.md +0 -556
- package/docs/es/versioning-and-releases.md +0 -146
- package/docs/zh/CHANGELOG.md +0 -191
- package/docs/zh/ENVIRONMENT.md +0 -136
- package/docs/zh/FEATURE_PROCESS.md +0 -92
- package/docs/zh/GLOSSARY.md +0 -179
- package/docs/zh/GUIDING-PRINCIPLES.md +0 -97
- package/docs/zh/README.md +0 -133
- package/docs/zh/TRANSLATION-PLAN.md +0 -508
- package/docs/zh/agent-reference-guide.md +0 -566
- package/docs/zh/agents/archetype-rationale.md +0 -631
- package/docs/zh/agents/persona-definitions.md +0 -560
- package/docs/zh/api/squads-api.md +0 -753
- package/docs/zh/architecture/ADE-ARCHITECT-HANDOFF.md +0 -338
- package/docs/zh/architecture/ADE-EPIC1-HANDOFF.md +0 -85
- package/docs/zh/architecture/ADE-EPIC2-HANDOFF.md +0 -106
- package/docs/zh/architecture/ADE-EPIC3-HANDOFF.md +0 -327
- package/docs/zh/architecture/ARCHITECTURE-INDEX.md +0 -190
- package/docs/zh/architecture/SINAPSE-VISUAL-OVERVIEW.md +0 -595
- package/docs/zh/architecture/ade-architecture.md +0 -474
- package/docs/zh/architecture/adr/ADR-COLLAB-1-current-state-audit.md +0 -259
- package/docs/zh/architecture/adr/ADR-COLLAB-2-proposed-configuration.md +0 -518
- package/docs/zh/architecture/adr/adr-hcs-health-check-system.md +0 -489
- package/docs/zh/architecture/adr/adr-isolated-vm-decision.md +0 -70
- package/docs/zh/architecture/agent-config-audit.md +0 -220
- package/docs/zh/architecture/agent-responsibility-matrix.md +0 -444
- package/docs/zh/architecture/agent-tool-integration-guide.md +0 -336
- package/docs/zh/architecture/ci-cd.md +0 -151
- package/docs/zh/architecture/coding-standards.md +0 -898
- package/docs/zh/architecture/command-authority-matrix.md +0 -18
- package/docs/zh/architecture/contribution-workflow-research.md +0 -376
- package/docs/zh/architecture/dashboard-architecture.md +0 -569
- package/docs/zh/architecture/dashboard-realtime.md +0 -415
- package/docs/zh/architecture/hcs-check-specifications.md +0 -102
- package/docs/zh/architecture/hcs-execution-modes.md +0 -114
- package/docs/zh/architecture/hcs-self-healing-spec.md +0 -148
- package/docs/zh/architecture/high-level-architecture.md +0 -355
- package/docs/zh/architecture/introduction.md +0 -21
- package/docs/zh/architecture/mcp-api-keys-management.md +0 -248
- package/docs/zh/architecture/mcp-system-diagrams.md +0 -113
- package/docs/zh/architecture/module-system.md +0 -382
- package/docs/zh/architecture/multi-repo-strategy.md +0 -237
- package/docs/zh/architecture/source-tree.md +0 -710
- package/docs/zh/architecture/squad-improvement-analysis.md +0 -204
- package/docs/zh/architecture/squad-improvement-recommended-approach.md +0 -390
- package/docs/zh/architecture/tech-stack.md +0 -808
- package/docs/zh/architecture/utility-integration-guide.md +0 -358
- package/docs/zh/code-of-conduct.md +0 -113
- package/docs/zh/community/README-community-snippet-core.md +0 -57
- package/docs/zh/community/README-community-snippet-mcp.md +0 -49
- package/docs/zh/community/README-community-snippet-squads.md +0 -40
- package/docs/zh/community.md +0 -227
- package/docs/zh/contributing.md +0 -581
- package/docs/zh/core-architecture.md +0 -229
- package/docs/zh/docker-mcp-setup.md +0 -226
- package/docs/zh/framework/README.md +0 -97
- package/docs/zh/framework/coding-standards.md +0 -886
- package/docs/zh/framework/source-tree.md +0 -888
- package/docs/zh/framework/tech-stack.md +0 -796
- package/docs/zh/getting-started.md +0 -317
- package/docs/zh/git-workflow-guide.md +0 -988
- package/docs/zh/guides/MEMORY-INTEGRATION.md +0 -497
- package/docs/zh/guides/MEMORY-INTELLIGENCE-SYSTEM.md +0 -1083
- package/docs/zh/guides/MEMORY-SYSTEM.md +0 -1003
- package/docs/zh/guides/README.md +0 -127
- package/docs/zh/guides/ade-guide.md +0 -446
- package/docs/zh/guides/agent-selection-guide.md +0 -289
- package/docs/zh/guides/api-reference.md +0 -427
- package/docs/zh/guides/build-recovery-guide.md +0 -266
- package/docs/zh/guides/contextual-greeting-system-guide.md +0 -381
- package/docs/zh/guides/contributing-squads.md +0 -250
- package/docs/zh/guides/development-setup.md +0 -384
- package/docs/zh/guides/ide-sync-guide.md +0 -193
- package/docs/zh/guides/installation-troubleshooting.md +0 -321
- package/docs/zh/guides/llm-routing.md +0 -306
- package/docs/zh/guides/mcp/desktop-commander.md +0 -368
- package/docs/zh/guides/mcp/docker-gateway-tutorial.md +0 -336
- package/docs/zh/guides/mcp-global-setup.md +0 -696
- package/docs/zh/guides/permission-modes.md +0 -307
- package/docs/zh/guides/project-status-feature.md +0 -467
- package/docs/zh/guides/quality-dashboard.md +0 -361
- package/docs/zh/guides/quality-gates.md +0 -462
- package/docs/zh/guides/security-hardening.md +0 -1055
- package/docs/zh/guides/service-discovery.md +0 -518
- package/docs/zh/guides/squad-examples/README.md +0 -63
- package/docs/zh/guides/squad-migration.md +0 -336
- package/docs/zh/guides/template-engine-v2.md +0 -478
- package/docs/zh/guides/workflows-guide.md +0 -408
- package/docs/zh/how-to-contribute-with-pull-requests.md +0 -158
- package/docs/zh/installation/README.md +0 -106
- package/docs/zh/installation/faq.md +0 -611
- package/docs/zh/installation/linux.md +0 -447
- package/docs/zh/installation/macos.md +0 -187
- package/docs/zh/installation/troubleshooting.md +0 -729
- package/docs/zh/installation/windows.md +0 -475
- package/docs/zh/meta-agent-commands.md +0 -990
- package/docs/zh/security-best-practices.md +0 -610
- package/docs/zh/security.md +0 -124
- package/docs/zh/sinapse-agent-flows/README.md +0 -196
- package/docs/zh/sinapse-agent-flows/analyst-system.md +0 -679
- package/docs/zh/sinapse-agent-flows/architect-system.md +0 -246
- package/docs/zh/sinapse-agent-flows/data-engineer-system.md +0 -418
- package/docs/zh/sinapse-agent-flows/dev-system.md +0 -209
- package/docs/zh/sinapse-agent-flows/devops-system.md +0 -643
- package/docs/zh/sinapse-agent-flows/pm-system.md +0 -733
- package/docs/zh/sinapse-agent-flows/qa-system.md +0 -268
- package/docs/zh/sinapse-agent-flows/sinapse-master-system.md +0 -81
- package/docs/zh/sinapse-agent-flows/sm-system.md +0 -501
- package/docs/zh/sinapse-agent-flows/squad-creator-system.md +0 -704
- package/docs/zh/sinapse-agent-flows/ux-design-expert-system.md +0 -160
- package/docs/zh/sinapse-workflows/README.md +0 -247
- package/docs/zh/sinapse-workflows/auto-worktree-workflow.md +0 -793
- package/docs/zh/sinapse-workflows/brownfield-discovery-workflow.md +0 -915
- package/docs/zh/sinapse-workflows/brownfield-fullstack-workflow.md +0 -764
- package/docs/zh/sinapse-workflows/brownfield-service-workflow.md +0 -812
- package/docs/zh/sinapse-workflows/brownfield-ui-workflow.md +0 -891
- package/docs/zh/sinapse-workflows/design-system-build-quality-workflow.md +0 -845
- package/docs/zh/sinapse-workflows/greenfield-fullstack-workflow.md +0 -796
- package/docs/zh/sinapse-workflows/greenfield-service-workflow.md +0 -786
- package/docs/zh/sinapse-workflows/greenfield-ui-workflow.md +0 -922
- package/docs/zh/sinapse-workflows/qa-loop-workflow.md +0 -1111
- package/docs/zh/sinapse-workflows/spec-pipeline-workflow.md +0 -1031
- package/docs/zh/sinapse-workflows/story-development-cycle-workflow.md +0 -843
- package/docs/zh/troubleshooting.md +0 -883
- package/docs/zh/uninstallation.md +0 -348
- package/docs/zh/versioning-and-releases.md +0 -140
- /package/.sinapse-ai/development/agents/{dev → developer}/MEMORY.md +0 -0
- /package/.sinapse-ai/development/agents/{qa → quality-gate}/MEMORY.md +0 -0
- /package/.sinapse-ai/development/agents/{sm → sprint-lead}/MEMORY.md +0 -0
|
@@ -1,988 +0,0 @@
|
|
|
1
|
-
# SINAPSE Git 工作流指南
|
|
2
|
-
|
|
3
|
-
> 🌐 [EN](../git-workflow-guide.md) | [PT](../pt/git-workflow-guide.md) | [ES](../es/git-workflow-guide.md)
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
_Story: 2.2-git-workflow-implementation.yaml_
|
|
8
|
-
|
|
9
|
-
## 目录
|
|
10
|
-
|
|
11
|
-
- [概述](#概述)
|
|
12
|
-
- [纵深防御架构](#纵深防御架构)
|
|
13
|
-
- [第一层:提交前验证](#第一层提交前验证)
|
|
14
|
-
- [第二层:推送前验证](#第二层推送前验证)
|
|
15
|
-
- [第三层:CI/CD 流程](#第三层cicd-流程)
|
|
16
|
-
- [分支保护](#分支保护)
|
|
17
|
-
- [日常工作流](#日常工作流)
|
|
18
|
-
- [故障排除](#故障排除)
|
|
19
|
-
- [性能提示](#性能提示)
|
|
20
|
-
|
|
21
|
-
## 概述
|
|
22
|
-
|
|
23
|
-
SINAPSE 实现了**纵深防御**验证策略,具有三个渐进式层级,可以提早发现问题并确保代码质量在合并之前。
|
|
24
|
-
|
|
25
|
-
### 为什么是三层?
|
|
26
|
-
|
|
27
|
-
1. **快速反馈** - 在开发过程中立即发现问题
|
|
28
|
-
2. **本地验证** - 基本检查不依赖云
|
|
29
|
-
3. **权威验证** - 合并前的最终门关
|
|
30
|
-
4. **故事一致性** - 确保开发与故事一致
|
|
31
|
-
|
|
32
|
-
### 架构图
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
36
|
-
│ 开发工作流 │
|
|
37
|
-
└─────────────────────────────────────────────────────────────┘
|
|
38
|
-
│
|
|
39
|
-
▼
|
|
40
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
41
|
-
│ 层级 1:提交前钩子 (本地 - <5秒) │
|
|
42
|
-
│ ✓ ESLint (代码质量) │
|
|
43
|
-
│ ✓ TypeScript (类型检查) │
|
|
44
|
-
│ ✓ 缓存启用 │
|
|
45
|
-
└─────────────────────────────────────────────────────────────┘
|
|
46
|
-
│
|
|
47
|
-
▼
|
|
48
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
49
|
-
│ 层级 2:推送前钩子 (本地 - <2秒) │
|
|
50
|
-
│ ✓ 故事复选框验证 │
|
|
51
|
-
│ ✓ 状态一致性 │
|
|
52
|
-
│ ✓ 必需部分 │
|
|
53
|
-
└─────────────────────────────────────────────────────────────┘
|
|
54
|
-
│
|
|
55
|
-
▼
|
|
56
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
57
|
-
│ 层级 3:GitHub Actions CI (云 - 2-5分钟) │
|
|
58
|
-
│ ✓ 所有 lint/type 检查 │
|
|
59
|
-
│ ✓ 完整测试套件 │
|
|
60
|
-
│ ✓ 代码覆盖率 (≥80%) │
|
|
61
|
-
│ ✓ 故事验证 │
|
|
62
|
-
│ ✓ 分支保护 │
|
|
63
|
-
└─────────────────────────────────────────────────────────────┘
|
|
64
|
-
│
|
|
65
|
-
▼
|
|
66
|
-
┌──────────────┐
|
|
67
|
-
│ 准备合并 │
|
|
68
|
-
└──────────────┘
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## 纵深防御架构
|
|
72
|
-
|
|
73
|
-
### 层级 1:提交前 (本地 - 快速)
|
|
74
|
-
|
|
75
|
-
**性能目标:** <5 秒
|
|
76
|
-
**触发器:** `git commit`
|
|
77
|
-
**位置:** `.husky/pre-commit`
|
|
78
|
-
|
|
79
|
-
**验证内容:**
|
|
80
|
-
|
|
81
|
-
- ESLint 代码质量
|
|
82
|
-
- TypeScript 类型检查
|
|
83
|
-
- 语法错误
|
|
84
|
-
- 导入问题
|
|
85
|
-
|
|
86
|
-
**工作原理:**
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
# 在提交时自动触发
|
|
90
|
-
git add .
|
|
91
|
-
git commit -m "feat: add feature"
|
|
92
|
-
|
|
93
|
-
# 运行:
|
|
94
|
-
# 1. ESLint with caching (.eslintcache)
|
|
95
|
-
# 2. TypeScript incremental compilation (.tsbuildinfo)
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**好处:**
|
|
99
|
-
|
|
100
|
-
- ⚡ 快速反馈 (<5秒)
|
|
101
|
-
- 💾 缓存以获得速度
|
|
102
|
-
- 🔒 防止断裂代码提交
|
|
103
|
-
- 🚫 历史中没有无效语法
|
|
104
|
-
|
|
105
|
-
### 层级 2:推送前 (本地 - 故事验证)
|
|
106
|
-
|
|
107
|
-
**性能目标:** <2 秒
|
|
108
|
-
**触发器:** `git push`
|
|
109
|
-
**位置:** `.husky/pre-push`
|
|
110
|
-
|
|
111
|
-
**验证内容:**
|
|
112
|
-
|
|
113
|
-
- 故事复选框完成度与状态
|
|
114
|
-
- 需要的故事部分存在
|
|
115
|
-
- 状态一致性
|
|
116
|
-
- 开发代理记录
|
|
117
|
-
|
|
118
|
-
**工作原理:**
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
# 在推送时自动触发
|
|
122
|
-
git push origin feature/my-feature
|
|
123
|
-
|
|
124
|
-
# 验证 docs/stories/ 中的所有故事文件
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**验证规则:**
|
|
128
|
-
|
|
129
|
-
1. **状态一致性:**
|
|
130
|
-
|
|
131
|
-
```yaml
|
|
132
|
-
# ❌ 无效:已完成但任务未完成
|
|
133
|
-
status: "completed"
|
|
134
|
-
tasks:
|
|
135
|
-
- "[x] Task 1"
|
|
136
|
-
- "[ ] Task 2" # 错误!
|
|
137
|
-
|
|
138
|
-
# ✅ 有效:所有任务完成
|
|
139
|
-
status: "completed"
|
|
140
|
-
tasks:
|
|
141
|
-
- "[x] Task 1"
|
|
142
|
-
- "[x] Task 2"
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
2. **必需部分:**
|
|
146
|
-
|
|
147
|
-
- `id`
|
|
148
|
-
- `title`
|
|
149
|
-
- `description`
|
|
150
|
-
- `acceptance_criteria`
|
|
151
|
-
- `status`
|
|
152
|
-
|
|
153
|
-
3. **状态流:**
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
ready → in progress → Ready for Review → completed
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### 层级 3:CI/CD (云 - 权威)
|
|
160
|
-
|
|
161
|
-
**性能:** 2-5 分钟
|
|
162
|
-
**触发器:** 推送任何分支、创建 PR
|
|
163
|
-
**平台:** GitHub Actions
|
|
164
|
-
**位置:** `.github/workflows/ci.yml`
|
|
165
|
-
|
|
166
|
-
**作业:**
|
|
167
|
-
|
|
168
|
-
1. **ESLint** (`lint` 作业)
|
|
169
|
-
- 在干净环境中运行
|
|
170
|
-
- 不依赖缓存
|
|
171
|
-
|
|
172
|
-
2. **TypeScript** (`typecheck` 作业)
|
|
173
|
-
- 完整类型检查
|
|
174
|
-
- 无增量编译
|
|
175
|
-
|
|
176
|
-
3. **测试** (`test` 作业)
|
|
177
|
-
- 完整测试套件
|
|
178
|
-
- 覆盖率报告
|
|
179
|
-
- 强制执行 80% 阈值
|
|
180
|
-
|
|
181
|
-
4. **故事验证** (`story-validation` 作业)
|
|
182
|
-
- 所有故事验证
|
|
183
|
-
- 状态一致性检查
|
|
184
|
-
|
|
185
|
-
5. **验证摘要** (`validation-summary` 作业)
|
|
186
|
-
- 汇总所有结果
|
|
187
|
-
- 如果任何失败则阻止合并
|
|
188
|
-
|
|
189
|
-
**性能监控:**
|
|
190
|
-
|
|
191
|
-
- 可选的性能作业
|
|
192
|
-
- 测量验证时间
|
|
193
|
-
- 仅供参考
|
|
194
|
-
|
|
195
|
-
## 层级 1:提交前验证
|
|
196
|
-
|
|
197
|
-
### 快速参考
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
# 手动验证
|
|
201
|
-
npm run lint
|
|
202
|
-
npm run typecheck
|
|
203
|
-
|
|
204
|
-
# 自动修复 lint 问题
|
|
205
|
-
npm run lint -- --fix
|
|
206
|
-
|
|
207
|
-
# 跳过钩子(不推荐)
|
|
208
|
-
git commit --no-verify
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### ESLint 配置
|
|
212
|
-
|
|
213
|
-
**文件:** `.eslintrc.json`
|
|
214
|
-
|
|
215
|
-
```json
|
|
216
|
-
{
|
|
217
|
-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
|
218
|
-
"parser": "@typescript-eslint/parser",
|
|
219
|
-
"plugins": ["@typescript-eslint"],
|
|
220
|
-
"cache": true,
|
|
221
|
-
"cacheLocation": ".eslintcache"
|
|
222
|
-
}
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
**主要功能:**
|
|
226
|
-
|
|
227
|
-
- TypeScript 支持
|
|
228
|
-
- 缓存启用
|
|
229
|
-
- 警告 console.log
|
|
230
|
-
- 用 `_` 前缀忽略未使用的变量
|
|
231
|
-
|
|
232
|
-
### TypeScript 配置
|
|
233
|
-
|
|
234
|
-
**文件:** `tsconfig.json`
|
|
235
|
-
|
|
236
|
-
```json
|
|
237
|
-
{
|
|
238
|
-
"compilerOptions": {
|
|
239
|
-
"target": "ES2022",
|
|
240
|
-
"strict": true,
|
|
241
|
-
"incremental": true,
|
|
242
|
-
"tsBuildInfoFile": ".tsbuildinfo"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
**主要功能:**
|
|
248
|
-
|
|
249
|
-
- ES2022 目标
|
|
250
|
-
- 严格模式
|
|
251
|
-
- 增量编译
|
|
252
|
-
- CommonJS 模块
|
|
253
|
-
|
|
254
|
-
### 性能优化
|
|
255
|
-
|
|
256
|
-
**缓存文件:**
|
|
257
|
-
|
|
258
|
-
- `.eslintcache` - ESLint 结果
|
|
259
|
-
- `.tsbuildinfo` - TypeScript 增量数据
|
|
260
|
-
|
|
261
|
-
**首次运行:** ~10-15秒(无缓存)
|
|
262
|
-
**后续运行:** <5秒(缓存)
|
|
263
|
-
|
|
264
|
-
**缓存失效:**
|
|
265
|
-
|
|
266
|
-
- 配置更改
|
|
267
|
-
- 依赖更新
|
|
268
|
-
- 文件删除
|
|
269
|
-
|
|
270
|
-
## 层级 2:推送前验证
|
|
271
|
-
|
|
272
|
-
### 快速参考
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
# 手动验证
|
|
276
|
-
node .sinapse-ai/utils/sinapse-validator.js pre-push
|
|
277
|
-
node .sinapse-ai/utils/sinapse-validator.js stories
|
|
278
|
-
|
|
279
|
-
# 验证单个故事
|
|
280
|
-
node .sinapse-ai/utils/sinapse-validator.js story docs/stories/1.1-story.yaml
|
|
281
|
-
|
|
282
|
-
# 跳过钩子(不推荐)
|
|
283
|
-
git push --no-verify
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### 故事验证器
|
|
287
|
-
|
|
288
|
-
**位置:** `.sinapse-ai/utils/sinapse-validator.js`
|
|
289
|
-
|
|
290
|
-
**功能:**
|
|
291
|
-
|
|
292
|
-
- 彩色终端输出
|
|
293
|
-
- 进度指示器
|
|
294
|
-
- 清晰的错误消息
|
|
295
|
-
- 潜在问题的警告
|
|
296
|
-
|
|
297
|
-
**示例输出:**
|
|
298
|
-
|
|
299
|
-
```
|
|
300
|
-
══════════════════════════════════════════════════════════
|
|
301
|
-
故事验证: 2.2-git-workflow-implementation.yaml
|
|
302
|
-
══════════════════════════════════════════════════════════
|
|
303
|
-
|
|
304
|
-
故事: 2.2 - 带有多层验证的 Git 工作流
|
|
305
|
-
状态: in progress
|
|
306
|
-
|
|
307
|
-
进度: 12/15 任务 (80.0%)
|
|
308
|
-
|
|
309
|
-
✓ 故事验证通过,有警告
|
|
310
|
-
|
|
311
|
-
警告:
|
|
312
|
-
• 考虑将状态更新为 'Ready for Review'
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### 验证规则
|
|
316
|
-
|
|
317
|
-
#### 1. 复选框格式
|
|
318
|
-
|
|
319
|
-
支持的格式:
|
|
320
|
-
|
|
321
|
-
- `[x]` - 完成(小写)
|
|
322
|
-
- `[X]` - 完成(大写)
|
|
323
|
-
- `[ ]` - 未完成
|
|
324
|
-
|
|
325
|
-
无法识别的:
|
|
326
|
-
|
|
327
|
-
- `[o]`, `[*]`, `[-]` - 不计为完成
|
|
328
|
-
|
|
329
|
-
#### 2. 状态一致性
|
|
330
|
-
|
|
331
|
-
| 状态 | 规则 |
|
|
332
|
-
|------|------|
|
|
333
|
-
| `ready` | 不应检查任何任务 |
|
|
334
|
-
| `in progress` | 检查某些任务 |
|
|
335
|
-
| `Ready for Review` | 所有任务都已检查 |
|
|
336
|
-
| `completed` | 所有任务都已检查 |
|
|
337
|
-
|
|
338
|
-
#### 3. 必需部分
|
|
339
|
-
|
|
340
|
-
所有故事必须具有:
|
|
341
|
-
|
|
342
|
-
```yaml
|
|
343
|
-
id: "X.X"
|
|
344
|
-
title: "故事标题"
|
|
345
|
-
description: "故事描述"
|
|
346
|
-
status: "ready" | "in progress" | "Ready for Review" | "completed"
|
|
347
|
-
acceptance_criteria:
|
|
348
|
-
- name: "标准"
|
|
349
|
-
tasks:
|
|
350
|
-
- "[ ] 任务"
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
#### 4. 开发代理记录
|
|
354
|
-
|
|
355
|
-
推荐但非必需:
|
|
356
|
-
|
|
357
|
-
```yaml
|
|
358
|
-
dev_agent_record:
|
|
359
|
-
agent_model: 'claude-sonnet-4-5'
|
|
360
|
-
implementation_date: '2025-01-23'
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
缺少时出现警告。
|
|
364
|
-
|
|
365
|
-
### 错误消息
|
|
366
|
-
|
|
367
|
-
**缺少必需的部分:**
|
|
368
|
-
|
|
369
|
-
```
|
|
370
|
-
✗ 缺少必需的部分: description, acceptance_criteria
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
**状态不一致:**
|
|
374
|
-
|
|
375
|
-
```
|
|
376
|
-
✗ 故事标记为已完成,但仅 12/15 个任务已检查
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
**不存在的文件:**
|
|
380
|
-
|
|
381
|
-
```
|
|
382
|
-
✗ 找不到故事文件: docs/stories/missing.yaml
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
## 层级 3:CI/CD 流程
|
|
386
|
-
|
|
387
|
-
### 工作流结构
|
|
388
|
-
|
|
389
|
-
**文件:** `.github/workflows/ci.yml`
|
|
390
|
-
|
|
391
|
-
**作业:**
|
|
392
|
-
|
|
393
|
-
1. **lint** - ESLint 验证
|
|
394
|
-
2. **typecheck** - TypeScript 检查
|
|
395
|
-
3. **test** - Jest 测试和覆盖率
|
|
396
|
-
4. **story-validation** - 故事一致性
|
|
397
|
-
5. **validation-summary** - 汇总结果
|
|
398
|
-
6. **performance** (可选) - 性能指标
|
|
399
|
-
|
|
400
|
-
### 作业详情
|
|
401
|
-
|
|
402
|
-
#### ESLint 作业
|
|
403
|
-
|
|
404
|
-
```yaml
|
|
405
|
-
- name: Run ESLint
|
|
406
|
-
run: npm run lint
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
- 在 Ubuntu 最新版本上运行
|
|
410
|
-
- 超时:5 分钟
|
|
411
|
-
- 使用 npm 缓存
|
|
412
|
-
- 任何 lint 错误都会失败
|
|
413
|
-
|
|
414
|
-
#### TypeScript 作业
|
|
415
|
-
|
|
416
|
-
```yaml
|
|
417
|
-
- name: Run TypeScript type checking
|
|
418
|
-
run: npm run typecheck
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
- 在 Ubuntu 最新版本上运行
|
|
422
|
-
- 超时:5 分钟
|
|
423
|
-
- 类型错误时失败
|
|
424
|
-
|
|
425
|
-
#### 测试作业
|
|
426
|
-
|
|
427
|
-
```yaml
|
|
428
|
-
- name: Run tests with coverage
|
|
429
|
-
run: npm run test:coverage
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
- 在 Ubuntu 最新版本上运行
|
|
433
|
-
- 超时:10 分钟
|
|
434
|
-
- 将覆盖率上传到 Codecov
|
|
435
|
-
- 强制执行 80% 覆盖率阈值
|
|
436
|
-
|
|
437
|
-
#### 故事验证作业
|
|
438
|
-
|
|
439
|
-
```yaml
|
|
440
|
-
- name: Validate story checkboxes
|
|
441
|
-
run: node .sinapse-ai/utils/sinapse-validator.js stories
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
- 在 Ubuntu 最新版本上运行
|
|
445
|
-
- 超时:5 分钟
|
|
446
|
-
- 验证所有故事
|
|
447
|
-
|
|
448
|
-
#### 验证摘要作业
|
|
449
|
-
|
|
450
|
-
```yaml
|
|
451
|
-
needs: [lint, typecheck, test, story-validation]
|
|
452
|
-
if: always()
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
- 所有验证后运行
|
|
456
|
-
- 检查所有作业状态
|
|
457
|
-
- 如果任何验证失败则失败
|
|
458
|
-
- 提供摘要
|
|
459
|
-
|
|
460
|
-
### CI 触发器
|
|
461
|
-
|
|
462
|
-
**推送事件:**
|
|
463
|
-
|
|
464
|
-
- `master` 分支
|
|
465
|
-
- `develop` 分支
|
|
466
|
-
- `feature/**` 分支
|
|
467
|
-
- `bugfix/**` 分支
|
|
468
|
-
|
|
469
|
-
**拉取请求事件:**
|
|
470
|
-
|
|
471
|
-
- 对 `master`
|
|
472
|
-
- 对 `develop`
|
|
473
|
-
|
|
474
|
-
### 查看 CI 结果
|
|
475
|
-
|
|
476
|
-
```bash
|
|
477
|
-
# 查看 PR 检查
|
|
478
|
-
gh pr checks
|
|
479
|
-
|
|
480
|
-
# 查看工作流运行
|
|
481
|
-
gh run list
|
|
482
|
-
|
|
483
|
-
# 查看特定运行
|
|
484
|
-
gh run view <run-id>
|
|
485
|
-
|
|
486
|
-
# 重新运行失败的作业
|
|
487
|
-
gh run rerun <run-id>
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
## 分支保护
|
|
491
|
-
|
|
492
|
-
### 设置
|
|
493
|
-
|
|
494
|
-
```bash
|
|
495
|
-
# 运行设置脚本
|
|
496
|
-
node scripts/setup-branch-protection.js
|
|
497
|
-
|
|
498
|
-
# 查看当前保护
|
|
499
|
-
node scripts/setup-branch-protection.js --status
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
### 需求
|
|
503
|
-
|
|
504
|
-
- 已安装 GitHub CLI (`gh`)
|
|
505
|
-
- 使用 GitHub 进行身份验证
|
|
506
|
-
- 对存储库具有管理员访问权限
|
|
507
|
-
|
|
508
|
-
### 保护规则
|
|
509
|
-
|
|
510
|
-
**主分支保护:**
|
|
511
|
-
|
|
512
|
-
1. **必需的状态检查:**
|
|
513
|
-
- ESLint
|
|
514
|
-
- TypeScript 类型检查
|
|
515
|
-
- Jest 测试
|
|
516
|
-
- 故事复选框验证
|
|
517
|
-
|
|
518
|
-
2. **拉取请求审查:**
|
|
519
|
-
- 需要 1 次批准
|
|
520
|
-
- 关闭新提交中的陈旧审查
|
|
521
|
-
|
|
522
|
-
3. **其他规则:**
|
|
523
|
-
- 线性历史强制执行(仅 rebase)
|
|
524
|
-
- 强制推送被阻止
|
|
525
|
-
- 分支删除被阻止
|
|
526
|
-
- 规则适用于管理员
|
|
527
|
-
|
|
528
|
-
### 手动配置
|
|
529
|
-
|
|
530
|
-
通过 GitHub CLI:
|
|
531
|
-
|
|
532
|
-
```bash
|
|
533
|
-
# 设置必需的状态检查
|
|
534
|
-
gh api repos/OWNER/REPO/branches/master/protection/required_status_checks \
|
|
535
|
-
-X PUT \
|
|
536
|
-
-f strict=true \
|
|
537
|
-
-f contexts[]="ESLint" \
|
|
538
|
-
-f contexts[]="TypeScript Type Checking"
|
|
539
|
-
|
|
540
|
-
# 需要 PR 审查
|
|
541
|
-
gh api repos/OWNER/REPO/branches/master/protection/required_pull_request_reviews \
|
|
542
|
-
-X PUT \
|
|
543
|
-
-f required_approving_review_count=1
|
|
544
|
-
|
|
545
|
-
# 阻止强制推送
|
|
546
|
-
gh api repos/OWNER/REPO/branches/master/protection/allow_force_pushes \
|
|
547
|
-
-X DELETE
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
## 日常工作流
|
|
551
|
-
|
|
552
|
-
### 开始新功能
|
|
553
|
-
|
|
554
|
-
```bash
|
|
555
|
-
# 1. 更新 master
|
|
556
|
-
git checkout master
|
|
557
|
-
git pull origin master
|
|
558
|
-
|
|
559
|
-
# 2. 创建功能分支
|
|
560
|
-
git checkout -b feature/my-feature
|
|
561
|
-
|
|
562
|
-
# 3. 进行更改
|
|
563
|
-
# ... 编辑文件 ...
|
|
564
|
-
|
|
565
|
-
# 4. 提交(触发提交前钩子)
|
|
566
|
-
git add .
|
|
567
|
-
git commit -m "feat: add my feature [Story X.X]"
|
|
568
|
-
|
|
569
|
-
# 5. 推送(触发推送前钩子)
|
|
570
|
-
git push origin feature/my-feature
|
|
571
|
-
|
|
572
|
-
# 6. 创建 PR
|
|
573
|
-
gh pr create --title "feat: Add my feature" --body "Description"
|
|
574
|
-
```
|
|
575
|
-
|
|
576
|
-
### 更新故事
|
|
577
|
-
|
|
578
|
-
```bash
|
|
579
|
-
# 1. 打开故事文件
|
|
580
|
-
code docs/stories/X.X-story.yaml
|
|
581
|
-
|
|
582
|
-
# 2. 标记任务完成
|
|
583
|
-
# 更改: - "[ ] Task"
|
|
584
|
-
# 为: - "[x] Task"
|
|
585
|
-
|
|
586
|
-
# 3. 如果需要更新状态
|
|
587
|
-
# 更改: status: "in progress"
|
|
588
|
-
# 为: status: "Ready for Review"
|
|
589
|
-
|
|
590
|
-
# 4. 提交故事更新
|
|
591
|
-
git add docs/stories/X.X-story.yaml
|
|
592
|
-
git commit -m "docs: update story X.X progress"
|
|
593
|
-
|
|
594
|
-
# 5. 推送(验证故事)
|
|
595
|
-
git push
|
|
596
|
-
```
|
|
597
|
-
|
|
598
|
-
### 修复验证失败
|
|
599
|
-
|
|
600
|
-
**ESLint 错误:**
|
|
601
|
-
|
|
602
|
-
```bash
|
|
603
|
-
# 自动修复问题
|
|
604
|
-
npm run lint -- --fix
|
|
605
|
-
|
|
606
|
-
# 检查剩余问题
|
|
607
|
-
npm run lint
|
|
608
|
-
|
|
609
|
-
# 提交修复
|
|
610
|
-
git add .
|
|
611
|
-
git commit -m "style: fix lint issues"
|
|
612
|
-
```
|
|
613
|
-
|
|
614
|
-
**TypeScript 错误:**
|
|
615
|
-
|
|
616
|
-
```bash
|
|
617
|
-
# 查看所有错误
|
|
618
|
-
npm run typecheck
|
|
619
|
-
|
|
620
|
-
# 在代码中修复错误
|
|
621
|
-
# ... 编辑文件 ...
|
|
622
|
-
|
|
623
|
-
# 验证修复
|
|
624
|
-
npm run typecheck
|
|
625
|
-
|
|
626
|
-
# 提交修复
|
|
627
|
-
git add .
|
|
628
|
-
git commit -m "fix: resolve type errors"
|
|
629
|
-
```
|
|
630
|
-
|
|
631
|
-
**故事验证错误:**
|
|
632
|
-
|
|
633
|
-
```bash
|
|
634
|
-
# 检查故事
|
|
635
|
-
node .sinapse-ai/utils/sinapse-validator.js stories
|
|
636
|
-
|
|
637
|
-
# 修复故事文件
|
|
638
|
-
code docs/stories/X.X-story.yaml
|
|
639
|
-
|
|
640
|
-
# 验证修复
|
|
641
|
-
node .sinapse-ai/utils/sinapse-validator.js story docs/stories/X.X-story.yaml
|
|
642
|
-
|
|
643
|
-
# 提交修复
|
|
644
|
-
git add docs/stories/
|
|
645
|
-
git commit -m "docs: fix story validation"
|
|
646
|
-
```
|
|
647
|
-
|
|
648
|
-
**测试失败:**
|
|
649
|
-
|
|
650
|
-
```bash
|
|
651
|
-
# 运行测试
|
|
652
|
-
npm test
|
|
653
|
-
|
|
654
|
-
# 运行特定测试
|
|
655
|
-
npm test -- path/to/test.js
|
|
656
|
-
|
|
657
|
-
# 修复失败的测试
|
|
658
|
-
# ... 编辑测试文件 ...
|
|
659
|
-
|
|
660
|
-
# 运行覆盖率
|
|
661
|
-
npm run test:coverage
|
|
662
|
-
|
|
663
|
-
# 提交修复
|
|
664
|
-
git add .
|
|
665
|
-
git commit -m "test: fix failing tests"
|
|
666
|
-
```
|
|
667
|
-
|
|
668
|
-
### 合并拉取请求
|
|
669
|
-
|
|
670
|
-
```bash
|
|
671
|
-
# 1. 确保 CI 通过
|
|
672
|
-
gh pr checks
|
|
673
|
-
|
|
674
|
-
# 2. 获得批准
|
|
675
|
-
# (等待团队成员审查)
|
|
676
|
-
|
|
677
|
-
# 3. 合并(squash)
|
|
678
|
-
gh pr merge --squash --delete-branch
|
|
679
|
-
|
|
680
|
-
# 4. 更新本地 master
|
|
681
|
-
git checkout master
|
|
682
|
-
git pull origin master
|
|
683
|
-
```
|
|
684
|
-
|
|
685
|
-
## 故障排除
|
|
686
|
-
|
|
687
|
-
### 钩子未运行
|
|
688
|
-
|
|
689
|
-
**症状:** 提交成功但未进行验证
|
|
690
|
-
|
|
691
|
-
**解决方案:**
|
|
692
|
-
|
|
693
|
-
1. 检查 Husky 安装:
|
|
694
|
-
|
|
695
|
-
```bash
|
|
696
|
-
npm run prepare
|
|
697
|
-
```
|
|
698
|
-
|
|
699
|
-
2. 验证钩子文件存在:
|
|
700
|
-
|
|
701
|
-
```bash
|
|
702
|
-
ls -la .husky/pre-commit
|
|
703
|
-
ls -la .husky/pre-push
|
|
704
|
-
```
|
|
705
|
-
|
|
706
|
-
3. 检查文件权限 (Unix):
|
|
707
|
-
|
|
708
|
-
```bash
|
|
709
|
-
chmod +x .husky/pre-commit
|
|
710
|
-
chmod +x .husky/pre-push
|
|
711
|
-
```
|
|
712
|
-
|
|
713
|
-
### 提交前钩子速度缓慢
|
|
714
|
-
|
|
715
|
-
**症状:** 提交前钩子花费 >10 秒
|
|
716
|
-
|
|
717
|
-
**解决方案:**
|
|
718
|
-
|
|
719
|
-
1. 清除缓存:
|
|
720
|
-
|
|
721
|
-
```bash
|
|
722
|
-
rm .eslintcache .tsbuildinfo
|
|
723
|
-
git commit # 重建缓存
|
|
724
|
-
```
|
|
725
|
-
|
|
726
|
-
2. 检查文件更改:
|
|
727
|
-
|
|
728
|
-
```bash
|
|
729
|
-
git status
|
|
730
|
-
# 一次提交较少的文件
|
|
731
|
-
```
|
|
732
|
-
|
|
733
|
-
3. 更新依赖:
|
|
734
|
-
|
|
735
|
-
```bash
|
|
736
|
-
npm update
|
|
737
|
-
```
|
|
738
|
-
|
|
739
|
-
### 故事验证失败
|
|
740
|
-
|
|
741
|
-
**症状:** 推送前失败,显示故事错误
|
|
742
|
-
|
|
743
|
-
**常见问题:**
|
|
744
|
-
|
|
745
|
-
1. **复选框不匹配:**
|
|
746
|
-
|
|
747
|
-
```yaml
|
|
748
|
-
# 错误:完成状态但任务未完成
|
|
749
|
-
status: 'completed'
|
|
750
|
-
tasks:
|
|
751
|
-
- '[x] Task 1'
|
|
752
|
-
- '[ ] Task 2' # ← 修复此项
|
|
753
|
-
|
|
754
|
-
# 解决方案:完成所有任务或更改状态
|
|
755
|
-
```
|
|
756
|
-
|
|
757
|
-
2. **缺少部分:**
|
|
758
|
-
|
|
759
|
-
```yaml
|
|
760
|
-
# 错误:缺少必需的部分
|
|
761
|
-
id: '1.1'
|
|
762
|
-
title: 'Story'
|
|
763
|
-
# 缺少: description, acceptance_criteria, status
|
|
764
|
-
|
|
765
|
-
# 解决方案:添加缺少的部分
|
|
766
|
-
```
|
|
767
|
-
|
|
768
|
-
3. **无效的 YAML:**
|
|
769
|
-
|
|
770
|
-
```yaml
|
|
771
|
-
# 错误:无效的 YAML 语法
|
|
772
|
-
tasks:
|
|
773
|
-
- "[ ] Task 1
|
|
774
|
-
- "[ ] Task 2" # ← 上面缺少结束引号
|
|
775
|
-
|
|
776
|
-
# 解决方案:修复 YAML 语法
|
|
777
|
-
```
|
|
778
|
-
|
|
779
|
-
### CI 失败但本地通过
|
|
780
|
-
|
|
781
|
-
**症状:** CI 失败但所有本地验证通过
|
|
782
|
-
|
|
783
|
-
**常见原因:**
|
|
784
|
-
|
|
785
|
-
1. **缓存差异:**
|
|
786
|
-
|
|
787
|
-
```bash
|
|
788
|
-
# 清除本地缓存
|
|
789
|
-
rm -rf node_modules .eslintcache .tsbuildinfo coverage/
|
|
790
|
-
npm ci
|
|
791
|
-
npm test
|
|
792
|
-
```
|
|
793
|
-
|
|
794
|
-
2. **环境差异:**
|
|
795
|
-
|
|
796
|
-
```bash
|
|
797
|
-
# 使用与 CI 相同的 Node 版本 (18)
|
|
798
|
-
nvm use 18
|
|
799
|
-
npm test
|
|
800
|
-
```
|
|
801
|
-
|
|
802
|
-
3. **未提交的文件:**
|
|
803
|
-
|
|
804
|
-
```bash
|
|
805
|
-
# 检查未提交的更改
|
|
806
|
-
git status
|
|
807
|
-
|
|
808
|
-
# 如果需要隐藏
|
|
809
|
-
git stash
|
|
810
|
-
```
|
|
811
|
-
|
|
812
|
-
### 分支保护阻止合并
|
|
813
|
-
|
|
814
|
-
**症状:** 无法合并 PR,即使有批准
|
|
815
|
-
|
|
816
|
-
**检查:**
|
|
817
|
-
|
|
818
|
-
1. **需要的检查通过:**
|
|
819
|
-
|
|
820
|
-
```bash
|
|
821
|
-
gh pr checks
|
|
822
|
-
# 所有必须显示 ✓
|
|
823
|
-
```
|
|
824
|
-
|
|
825
|
-
2. **需要的批准:**
|
|
826
|
-
|
|
827
|
-
```bash
|
|
828
|
-
gh pr view
|
|
829
|
-
# 检查"审查者"部分
|
|
830
|
-
```
|
|
831
|
-
|
|
832
|
-
3. **分支是最新的:**
|
|
833
|
-
|
|
834
|
-
```bash
|
|
835
|
-
# 更新分支
|
|
836
|
-
git checkout feature-branch
|
|
837
|
-
git rebase master
|
|
838
|
-
git push --force-with-lease
|
|
839
|
-
```
|
|
840
|
-
|
|
841
|
-
## 性能提示
|
|
842
|
-
|
|
843
|
-
### 缓存管理
|
|
844
|
-
|
|
845
|
-
**保留缓存:**
|
|
846
|
-
|
|
847
|
-
- `.eslintcache` - ESLint 结果
|
|
848
|
-
- `.tsbuildinfo` - TypeScript 构建信息
|
|
849
|
-
- `coverage/` - 测试覆盖率数据
|
|
850
|
-
|
|
851
|
-
**提交到 .gitignore:**
|
|
852
|
-
|
|
853
|
-
```gitignore
|
|
854
|
-
.eslintcache
|
|
855
|
-
.tsbuildinfo
|
|
856
|
-
coverage/
|
|
857
|
-
```
|
|
858
|
-
|
|
859
|
-
### 增量开发
|
|
860
|
-
|
|
861
|
-
**最佳实践:**
|
|
862
|
-
|
|
863
|
-
1. **小提交:**
|
|
864
|
-
- 更少的文件 = 更快的验证
|
|
865
|
-
- 更容易调试失败
|
|
866
|
-
|
|
867
|
-
2. **在开发期间进行测试:**
|
|
868
|
-
|
|
869
|
-
```bash
|
|
870
|
-
# 在提交前手动运行验证
|
|
871
|
-
npm run lint
|
|
872
|
-
npm run typecheck
|
|
873
|
-
npm test
|
|
874
|
-
```
|
|
875
|
-
|
|
876
|
-
3. **立即修复问题:**
|
|
877
|
-
- 不要让问题堆积
|
|
878
|
-
- 在上下文中更容易修复
|
|
879
|
-
|
|
880
|
-
### CI 优化
|
|
881
|
-
|
|
882
|
-
**工作流优化:**
|
|
883
|
-
|
|
884
|
-
1. **并行作业** - 所有验证并行运行
|
|
885
|
-
2. **作业超时** - 在挂起时快速失败
|
|
886
|
-
3. **缓存** - npm 依赖被缓存
|
|
887
|
-
4. **条件作业** - 性能作业仅在 PR 上
|
|
888
|
-
|
|
889
|
-
### 故事验证性能
|
|
890
|
-
|
|
891
|
-
**当前性能:**
|
|
892
|
-
|
|
893
|
-
- 单个故事:<100ms
|
|
894
|
-
- 所有故事:<2秒(典型)
|
|
895
|
-
|
|
896
|
-
**优化提示:**
|
|
897
|
-
|
|
898
|
-
1. **保持故事专注** - 每个故事一个功能
|
|
899
|
-
2. **限制任务数** - 将大故事分解为较小的故事
|
|
900
|
-
3. **有效的 YAML** - 解析错误会减慢验证
|
|
901
|
-
|
|
902
|
-
## 高级主题
|
|
903
|
-
|
|
904
|
-
### 跳过验证
|
|
905
|
-
|
|
906
|
-
**适当时机:**
|
|
907
|
-
|
|
908
|
-
- 紧急修复
|
|
909
|
-
- 仅文档更改
|
|
910
|
-
- CI 配置更改
|
|
911
|
-
|
|
912
|
-
**如何跳过:**
|
|
913
|
-
|
|
914
|
-
```bash
|
|
915
|
-
# 跳过提交前
|
|
916
|
-
git commit --no-verify
|
|
917
|
-
|
|
918
|
-
# 跳过推送前
|
|
919
|
-
git push --no-verify
|
|
920
|
-
|
|
921
|
-
# 跳过 CI(不推荐)
|
|
922
|
-
# 将 [skip ci] 添加到提交消息
|
|
923
|
-
git commit -m "docs: update [skip ci]"
|
|
924
|
-
```
|
|
925
|
-
|
|
926
|
-
**警告:** 仅在绝对必要时跳过。跳过的验证不会发现问题。
|
|
927
|
-
|
|
928
|
-
### 自定义验证
|
|
929
|
-
|
|
930
|
-
**添加自定义验证器:**
|
|
931
|
-
|
|
932
|
-
1. **创建验证器函数:**
|
|
933
|
-
|
|
934
|
-
```javascript
|
|
935
|
-
// .sinapse-ai/utils/custom-validator.js
|
|
936
|
-
module.exports = async function validateCustom() {
|
|
937
|
-
// 您的验证逻辑
|
|
938
|
-
return { success: true, errors: [] };
|
|
939
|
-
};
|
|
940
|
-
```
|
|
941
|
-
|
|
942
|
-
2. **添加到钩子:**
|
|
943
|
-
|
|
944
|
-
```bash
|
|
945
|
-
# .husky/pre-commit
|
|
946
|
-
node .sinapse-ai/utils/sinapse-validator.js pre-commit
|
|
947
|
-
node .sinapse-ai/utils/custom-validator.js
|
|
948
|
-
```
|
|
949
|
-
|
|
950
|
-
3. **添加到 CI:**
|
|
951
|
-
|
|
952
|
-
```yaml
|
|
953
|
-
# .github/workflows/ci.yml
|
|
954
|
-
- name: Custom validation
|
|
955
|
-
run: node .sinapse-ai/utils/custom-validator.js
|
|
956
|
-
```
|
|
957
|
-
|
|
958
|
-
### Monorepo 支持
|
|
959
|
-
|
|
960
|
-
**对于 monorepos:**
|
|
961
|
-
|
|
962
|
-
1. **限制验证范围:**
|
|
963
|
-
|
|
964
|
-
```javascript
|
|
965
|
-
// 仅验证更改的包
|
|
966
|
-
const changedFiles = execSync('git diff --name-only HEAD~1').toString();
|
|
967
|
-
const packages = getAffectedPackages(changedFiles);
|
|
968
|
-
```
|
|
969
|
-
|
|
970
|
-
2. **并行包验证:**
|
|
971
|
-
|
|
972
|
-
```yaml
|
|
973
|
-
strategy:
|
|
974
|
-
matrix:
|
|
975
|
-
package: [package-a, package-b, package-c]
|
|
976
|
-
```
|
|
977
|
-
|
|
978
|
-
## 参考
|
|
979
|
-
|
|
980
|
-
- **SINAPSE 验证器:** [.sinapse-ai/utils/sinapse-validator.js](../.sinapse-ai/utils/sinapse-validator.js)
|
|
981
|
-
- **CI 工作流:** [.github/workflows/ci.yml](../.github/workflows/ci.yml)
|
|
982
|
-
|
|
983
|
-
---
|
|
984
|
-
|
|
985
|
-
**有疑问?有问题吗?**
|
|
986
|
-
|
|
987
|
-
- [打开问题](https://github.com/SinapseAI/sinapse-ai/issues)
|
|
988
|
-
- [加入 Discord](https://discord.gg/gk8jAdXWmj)
|