musubi-sdd 5.1.0 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +106 -48
- package/README.md +110 -32
- package/bin/musubi-analyze.js +74 -67
- package/bin/musubi-browser.js +27 -26
- package/bin/musubi-change.js +48 -47
- package/bin/musubi-checkpoint.js +10 -7
- package/bin/musubi-convert.js +25 -25
- package/bin/musubi-costs.js +27 -10
- package/bin/musubi-gui.js +52 -46
- package/bin/musubi-init.js +1952 -10
- package/bin/musubi-orchestrate.js +327 -239
- package/bin/musubi-remember.js +69 -56
- package/bin/musubi-resolve.js +53 -45
- package/bin/musubi-trace.js +51 -22
- package/bin/musubi-validate.js +39 -30
- package/bin/musubi-workflow.js +33 -34
- package/bin/musubi.js +39 -2
- package/package.json +1 -1
- package/src/agents/agent-loop.js +94 -95
- package/src/agents/agentic/code-generator.js +119 -109
- package/src/agents/agentic/code-reviewer.js +105 -108
- package/src/agents/agentic/index.js +4 -4
- package/src/agents/browser/action-executor.js +13 -13
- package/src/agents/browser/ai-comparator.js +11 -10
- package/src/agents/browser/context-manager.js +6 -6
- package/src/agents/browser/index.js +5 -5
- package/src/agents/browser/nl-parser.js +31 -46
- package/src/agents/browser/screenshot.js +2 -2
- package/src/agents/browser/test-generator.js +6 -4
- package/src/agents/function-tool.js +71 -65
- package/src/agents/index.js +7 -7
- package/src/agents/schema-generator.js +98 -94
- package/src/analyzers/ast-extractor.js +158 -146
- package/src/analyzers/codegraph-auto-update.js +858 -0
- package/src/analyzers/complexity-analyzer.js +536 -0
- package/src/analyzers/context-optimizer.js +241 -126
- package/src/analyzers/impact-analyzer.js +1 -1
- package/src/analyzers/large-project-analyzer.js +766 -0
- package/src/analyzers/repository-map.js +77 -81
- package/src/analyzers/security-analyzer.js +19 -11
- package/src/analyzers/stuck-detector.js +19 -17
- package/src/converters/index.js +78 -57
- package/src/converters/ir/types.js +12 -12
- package/src/converters/parsers/musubi-parser.js +134 -126
- package/src/converters/parsers/openapi-parser.js +70 -53
- package/src/converters/parsers/speckit-parser.js +239 -175
- package/src/converters/writers/musubi-writer.js +123 -118
- package/src/converters/writers/speckit-writer.js +124 -113
- package/src/generators/rust-migration-generator.js +512 -0
- package/src/gui/public/index.html +1365 -1211
- package/src/gui/server.js +41 -40
- package/src/gui/services/file-watcher.js +23 -8
- package/src/gui/services/project-scanner.js +26 -20
- package/src/gui/services/replanning-service.js +27 -23
- package/src/gui/services/traceability-service.js +8 -8
- package/src/gui/services/workflow-service.js +14 -7
- package/src/index.js +151 -0
- package/src/integrations/cicd.js +90 -104
- package/src/integrations/codegraph-mcp.js +643 -0
- package/src/integrations/documentation.js +142 -103
- package/src/integrations/examples.js +95 -80
- package/src/integrations/github-client.js +17 -17
- package/src/integrations/index.js +5 -5
- package/src/integrations/mcp/index.js +21 -21
- package/src/integrations/mcp/mcp-context-provider.js +76 -78
- package/src/integrations/mcp/mcp-discovery.js +74 -72
- package/src/integrations/mcp/mcp-tool-registry.js +99 -94
- package/src/integrations/mcp-connector.js +70 -66
- package/src/integrations/platforms.js +50 -49
- package/src/integrations/tool-discovery.js +37 -31
- package/src/llm-providers/anthropic-provider.js +11 -11
- package/src/llm-providers/base-provider.js +16 -18
- package/src/llm-providers/copilot-provider.js +22 -19
- package/src/llm-providers/index.js +26 -25
- package/src/llm-providers/ollama-provider.js +11 -11
- package/src/llm-providers/openai-provider.js +12 -12
- package/src/managers/agent-memory.js +36 -24
- package/src/managers/checkpoint-manager.js +4 -8
- package/src/managers/delta-spec.js +19 -19
- package/src/managers/index.js +13 -4
- package/src/managers/memory-condenser.js +35 -45
- package/src/managers/repo-skill-manager.js +57 -31
- package/src/managers/skill-loader.js +25 -22
- package/src/managers/skill-tools.js +36 -72
- package/src/managers/workflow.js +30 -22
- package/src/monitoring/cost-tracker.js +48 -46
- package/src/monitoring/incident-manager.js +116 -106
- package/src/monitoring/index.js +144 -134
- package/src/monitoring/observability.js +75 -62
- package/src/monitoring/quality-dashboard.js +45 -41
- package/src/monitoring/release-manager.js +63 -53
- package/src/orchestration/agent-skill-binding.js +39 -47
- package/src/orchestration/error-handler.js +65 -107
- package/src/orchestration/guardrails/base-guardrail.js +26 -24
- package/src/orchestration/guardrails/guardrail-rules.js +50 -64
- package/src/orchestration/guardrails/index.js +5 -5
- package/src/orchestration/guardrails/input-guardrail.js +58 -45
- package/src/orchestration/guardrails/output-guardrail.js +104 -81
- package/src/orchestration/guardrails/safety-check.js +79 -79
- package/src/orchestration/index.js +38 -55
- package/src/orchestration/mcp-tool-adapters.js +96 -99
- package/src/orchestration/orchestration-engine.js +21 -21
- package/src/orchestration/pattern-registry.js +60 -45
- package/src/orchestration/patterns/auto.js +34 -47
- package/src/orchestration/patterns/group-chat.js +59 -65
- package/src/orchestration/patterns/handoff.js +67 -65
- package/src/orchestration/patterns/human-in-loop.js +51 -72
- package/src/orchestration/patterns/nested.js +25 -40
- package/src/orchestration/patterns/sequential.js +35 -34
- package/src/orchestration/patterns/swarm.js +63 -56
- package/src/orchestration/patterns/triage.js +150 -109
- package/src/orchestration/reasoning/index.js +9 -9
- package/src/orchestration/reasoning/planning-engine.js +143 -140
- package/src/orchestration/reasoning/reasoning-engine.js +206 -144
- package/src/orchestration/reasoning/self-correction.js +121 -128
- package/src/orchestration/replanning/adaptive-goal-modifier.js +107 -112
- package/src/orchestration/replanning/alternative-generator.js +37 -42
- package/src/orchestration/replanning/config.js +63 -59
- package/src/orchestration/replanning/goal-progress-tracker.js +98 -100
- package/src/orchestration/replanning/index.js +24 -20
- package/src/orchestration/replanning/plan-evaluator.js +49 -50
- package/src/orchestration/replanning/plan-monitor.js +32 -28
- package/src/orchestration/replanning/proactive-path-optimizer.js +175 -178
- package/src/orchestration/replanning/replan-history.js +33 -26
- package/src/orchestration/replanning/replanning-engine.js +106 -108
- package/src/orchestration/skill-executor.js +107 -109
- package/src/orchestration/skill-registry.js +85 -89
- package/src/orchestration/workflow-examples.js +228 -231
- package/src/orchestration/workflow-executor.js +65 -68
- package/src/orchestration/workflow-orchestrator.js +72 -73
- package/src/phase4-integration.js +47 -40
- package/src/phase5-integration.js +89 -30
- package/src/reporters/coverage-report.js +82 -30
- package/src/reporters/hierarchical-reporter.js +498 -0
- package/src/reporters/traceability-matrix-report.js +29 -20
- package/src/resolvers/issue-resolver.js +43 -31
- package/src/steering/advanced-validation.js +133 -124
- package/src/steering/auto-updater.js +60 -73
- package/src/steering/index.js +6 -6
- package/src/steering/quality-metrics.js +41 -35
- package/src/steering/steering-auto-update.js +83 -86
- package/src/steering/steering-validator.js +98 -106
- package/src/steering/template-constraints.js +53 -54
- package/src/templates/agents/claude-code/CLAUDE.md +32 -32
- package/src/templates/agents/claude-code/skills/agent-assistant/SKILL.md +13 -5
- package/src/templates/agents/claude-code/skills/ai-ml-engineer/mlops-guide.md +23 -23
- package/src/templates/agents/claude-code/skills/ai-ml-engineer/model-card-template.md +60 -41
- package/src/templates/agents/claude-code/skills/api-designer/api-patterns.md +27 -19
- package/src/templates/agents/claude-code/skills/api-designer/openapi-template.md +11 -7
- package/src/templates/agents/claude-code/skills/bug-hunter/SKILL.md +4 -3
- package/src/templates/agents/claude-code/skills/bug-hunter/root-cause-analysis.md +37 -15
- package/src/templates/agents/claude-code/skills/change-impact-analyzer/dependency-graph-patterns.md +36 -42
- package/src/templates/agents/claude-code/skills/change-impact-analyzer/impact-analysis-template.md +69 -60
- package/src/templates/agents/claude-code/skills/cloud-architect/aws-patterns.md +31 -38
- package/src/templates/agents/claude-code/skills/cloud-architect/azure-patterns.md +28 -23
- package/src/templates/agents/claude-code/skills/code-reviewer/SKILL.md +61 -0
- package/src/templates/agents/claude-code/skills/code-reviewer/best-practices.md +27 -0
- package/src/templates/agents/claude-code/skills/code-reviewer/review-checklist.md +29 -10
- package/src/templates/agents/claude-code/skills/code-reviewer/review-standards.md +29 -24
- package/src/templates/agents/claude-code/skills/constitution-enforcer/SKILL.md +8 -6
- package/src/templates/agents/claude-code/skills/constitution-enforcer/constitutional-articles.md +62 -26
- package/src/templates/agents/claude-code/skills/constitution-enforcer/phase-minus-one-gates.md +35 -16
- package/src/templates/agents/claude-code/skills/database-administrator/backup-recovery.md +27 -17
- package/src/templates/agents/claude-code/skills/database-administrator/tuning-guide.md +25 -20
- package/src/templates/agents/claude-code/skills/database-schema-designer/schema-patterns.md +39 -22
- package/src/templates/agents/claude-code/skills/devops-engineer/ci-cd-templates.md +25 -22
- package/src/templates/agents/claude-code/skills/issue-resolver/SKILL.md +24 -21
- package/src/templates/agents/claude-code/skills/orchestrator/SKILL.md +148 -63
- package/src/templates/agents/claude-code/skills/orchestrator/patterns.md +35 -16
- package/src/templates/agents/claude-code/skills/orchestrator/selection-matrix.md +69 -64
- package/src/templates/agents/claude-code/skills/performance-engineer/optimization-playbook.md +47 -47
- package/src/templates/agents/claude-code/skills/performance-optimizer/SKILL.md +69 -0
- package/src/templates/agents/claude-code/skills/performance-optimizer/benchmark-template.md +63 -45
- package/src/templates/agents/claude-code/skills/performance-optimizer/optimization-patterns.md +33 -35
- package/src/templates/agents/claude-code/skills/project-manager/SKILL.md +7 -6
- package/src/templates/agents/claude-code/skills/project-manager/agile-ceremonies.md +47 -28
- package/src/templates/agents/claude-code/skills/project-manager/project-templates.md +94 -78
- package/src/templates/agents/claude-code/skills/quality-assurance/SKILL.md +20 -17
- package/src/templates/agents/claude-code/skills/quality-assurance/qa-plan-template.md +63 -49
- package/src/templates/agents/claude-code/skills/release-coordinator/SKILL.md +5 -5
- package/src/templates/agents/claude-code/skills/release-coordinator/feature-flag-guide.md +30 -26
- package/src/templates/agents/claude-code/skills/release-coordinator/release-plan-template.md +67 -35
- package/src/templates/agents/claude-code/skills/requirements-analyst/ears-format.md +54 -42
- package/src/templates/agents/claude-code/skills/requirements-analyst/validation-rules.md +36 -33
- package/src/templates/agents/claude-code/skills/security-auditor/SKILL.md +77 -19
- package/src/templates/agents/claude-code/skills/security-auditor/audit-checklists.md +24 -24
- package/src/templates/agents/claude-code/skills/security-auditor/owasp-top-10.md +61 -20
- package/src/templates/agents/claude-code/skills/security-auditor/vulnerability-patterns.md +43 -11
- package/src/templates/agents/claude-code/skills/site-reliability-engineer/SKILL.md +1 -0
- package/src/templates/agents/claude-code/skills/site-reliability-engineer/incident-response-template.md +55 -25
- package/src/templates/agents/claude-code/skills/site-reliability-engineer/observability-patterns.md +78 -68
- package/src/templates/agents/claude-code/skills/site-reliability-engineer/slo-sli-guide.md +73 -53
- package/src/templates/agents/claude-code/skills/software-developer/solid-principles.md +83 -37
- package/src/templates/agents/claude-code/skills/software-developer/test-first-workflow.md +38 -31
- package/src/templates/agents/claude-code/skills/steering/SKILL.md +1 -0
- package/src/templates/agents/claude-code/skills/steering/auto-update-rules.md +31 -0
- package/src/templates/agents/claude-code/skills/system-architect/adr-template.md +25 -7
- package/src/templates/agents/claude-code/skills/system-architect/c4-model-guide.md +74 -61
- package/src/templates/agents/claude-code/skills/technical-writer/doc-templates/documentation-templates.md +70 -52
- package/src/templates/agents/claude-code/skills/test-engineer/SKILL.md +2 -0
- package/src/templates/agents/claude-code/skills/test-engineer/ears-test-mapping.md +75 -71
- package/src/templates/agents/claude-code/skills/test-engineer/test-types.md +85 -63
- package/src/templates/agents/claude-code/skills/traceability-auditor/coverage-matrix-template.md +39 -36
- package/src/templates/agents/claude-code/skills/traceability-auditor/gap-detection-rules.md +22 -17
- package/src/templates/agents/claude-code/skills/ui-ux-designer/SKILL.md +1 -0
- package/src/templates/agents/claude-code/skills/ui-ux-designer/accessibility-guidelines.md +49 -75
- package/src/templates/agents/claude-code/skills/ui-ux-designer/design-system-components.md +71 -59
- package/src/templates/agents/codex/AGENTS.md +74 -42
- package/src/templates/agents/cursor/AGENTS.md +74 -42
- package/src/templates/agents/gemini-cli/GEMINI.md +74 -42
- package/src/templates/agents/github-copilot/AGENTS.md +83 -51
- package/src/templates/agents/qwen-code/QWEN.md +74 -42
- package/src/templates/agents/windsurf/AGENTS.md +74 -42
- package/src/templates/architectures/README.md +41 -0
- package/src/templates/architectures/clean-architecture/README.md +113 -0
- package/src/templates/architectures/event-driven/README.md +162 -0
- package/src/templates/architectures/hexagonal/README.md +130 -0
- package/src/templates/index.js +6 -1
- package/src/templates/locale-manager.js +16 -16
- package/src/templates/shared/delta-spec-template.md +20 -13
- package/src/templates/shared/github-actions/musubi-issue-resolver.yml +5 -5
- package/src/templates/shared/github-actions/musubi-security-check.yml +3 -3
- package/src/templates/shared/github-actions/musubi-validate.yml +4 -4
- package/src/templates/shared/steering/structure.md +95 -0
- package/src/templates/skills/browser-agent.md +21 -16
- package/src/templates/skills/web-gui.md +8 -0
- package/src/templates/template-constraints.js +50 -53
- package/src/validators/advanced-validation.js +30 -36
- package/src/validators/constitutional-validator.js +77 -73
- package/src/validators/critic-system.js +49 -59
- package/src/validators/delta-format.js +59 -55
- package/src/validators/traceability-validator.js +7 -11
|
@@ -8,82 +8,82 @@ This matrix helps the Orchestrator select the optimal agent(s) based on user req
|
|
|
8
8
|
|
|
9
9
|
## Category 1: Orchestration & Management (3 Skills)
|
|
10
10
|
|
|
11
|
-
| Agent
|
|
12
|
-
|
|
13
|
-
| **orchestrator**
|
|
14
|
-
| **steering**
|
|
15
|
-
| **constitution-enforcer** | constitution, compliance, validation, Phase -1 Gates, governance
|
|
11
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
12
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------- | -------- |
|
|
13
|
+
| **orchestrator** | coordinate, multi-agent, workflow, execution plan, project planning, complex task, full lifecycle | Complex multi-agent tasks, project coordination | 1 |
|
|
14
|
+
| **steering** | project memory, codebase analysis, architecture patterns, tech stack, analyze project | Project context generation, steering files | 2 |
|
|
15
|
+
| **constitution-enforcer** | constitution, compliance, validation, Phase -1 Gates, governance | Constitutional validation, pre-implementation gates | 3 |
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
## Category 2: Requirements & Planning (3 Skills)
|
|
20
20
|
|
|
21
|
-
| Agent
|
|
22
|
-
|
|
23
|
-
| **requirements-analyst**
|
|
24
|
-
| **project-manager**
|
|
25
|
-
| **change-impact-analyzer** | change proposal, impact analysis, brownfield, delta spec, modification
|
|
21
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
22
|
+
| -------------------------- | ------------------------------------------------------------------------- | --------------------------------- | -------- |
|
|
23
|
+
| **requirements-analyst** | requirements, EARS, user stories, acceptance criteria, specification, SRS | Create/validate requirements | 1 |
|
|
24
|
+
| **project-manager** | project plan, timeline, milestones, risk management, WBS, Gantt | Project planning, risk management | 2 |
|
|
25
|
+
| **change-impact-analyzer** | change proposal, impact analysis, brownfield, delta spec, modification | Brownfield change analysis | 3 |
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
29
|
## Category 3: Architecture & Design (4 Skills)
|
|
30
30
|
|
|
31
|
-
| Agent
|
|
32
|
-
|
|
33
|
-
| **system-architect**
|
|
34
|
-
| **api-designer**
|
|
35
|
-
| **database-schema-designer** | database, schema, ERD, SQL, tables, relations, normalization
|
|
36
|
-
| **ui-ux-designer**
|
|
31
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
32
|
+
| ---------------------------- | ------------------------------------------------------------------------- | ------------------------------ | -------- |
|
|
33
|
+
| **system-architect** | architecture, C4, ADR, design decisions, component diagram, system design | High-level architecture design | 1 |
|
|
34
|
+
| **api-designer** | API, REST, GraphQL, OpenAPI, endpoints, swagger, contract | API specification design | 2 |
|
|
35
|
+
| **database-schema-designer** | database, schema, ERD, SQL, tables, relations, normalization | Database schema design | 3 |
|
|
36
|
+
| **ui-ux-designer** | UI, UX, wireframe, mockup, design system, user interface | UI/UX design | 4 |
|
|
37
37
|
|
|
38
38
|
---
|
|
39
39
|
|
|
40
40
|
## Category 4: Development & Implementation (2 Skills)
|
|
41
41
|
|
|
42
|
-
| Agent
|
|
43
|
-
|
|
44
|
-
| **software-developer** | implement, code, develop, build, programming, feature development | Code implementation | 1
|
|
45
|
-
| **ai-ml-engineer**
|
|
42
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
43
|
+
| ---------------------- | ----------------------------------------------------------------- | ------------------- | -------- |
|
|
44
|
+
| **software-developer** | implement, code, develop, build, programming, feature development | Code implementation | 1 |
|
|
45
|
+
| **ai-ml-engineer** | machine learning, ML, AI, model, training, MLOps, neural network | ML/AI development | 2 |
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
49
|
## Category 5: Quality & Review (5 Skills)
|
|
50
50
|
|
|
51
|
-
| Agent
|
|
52
|
-
|
|
53
|
-
| **code-reviewer**
|
|
54
|
-
| **bug-hunter**
|
|
55
|
-
| **traceability-auditor**
|
|
56
|
-
| **security-auditor**
|
|
57
|
-
| **performance-optimizer** | performance, optimization, benchmark, profiling, latency
|
|
51
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
52
|
+
| ------------------------- | ------------------------------------------------------------------- | ------------------------ | -------- |
|
|
53
|
+
| **code-reviewer** | code review, review, PR review, pull request, code quality | Code review | 1 |
|
|
54
|
+
| **bug-hunter** | bug, debug, issue, error, root cause, investigation | Bug investigation | 2 |
|
|
55
|
+
| **traceability-auditor** | traceability, coverage matrix, requirements tracking, EARS coverage | Traceability validation | 3 |
|
|
56
|
+
| **security-auditor** | security, vulnerability, OWASP, penetration, security audit | Security review | 4 |
|
|
57
|
+
| **performance-optimizer** | performance, optimization, benchmark, profiling, latency | Performance optimization | 5 |
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
61
|
## Category 6: QA (2 Skills)
|
|
62
62
|
|
|
63
|
-
| Agent
|
|
64
|
-
|
|
65
|
-
| **test-engineer**
|
|
66
|
-
| **quality-assurance** | QA, quality plan, test strategy, quality metrics
|
|
63
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
64
|
+
| --------------------- | ----------------------------------------------------------- | --------------------------- | -------- |
|
|
65
|
+
| **test-engineer** | test, testing, unit test, integration test, E2E, test cases | Test creation and execution | 1 |
|
|
66
|
+
| **quality-assurance** | QA, quality plan, test strategy, quality metrics | QA strategy | 2 |
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
70
70
|
## Category 7: Infrastructure & Operations (5 Skills)
|
|
71
71
|
|
|
72
|
-
| Agent
|
|
73
|
-
|
|
74
|
-
| **devops-engineer**
|
|
75
|
-
| **release-coordinator**
|
|
76
|
-
| **cloud-architect**
|
|
77
|
-
| **site-reliability-engineer** | SRE, monitoring, observability, SLO, alerting, incident | Production monitoring | 4
|
|
78
|
-
| **database-administrator**
|
|
72
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
73
|
+
| ----------------------------- | ------------------------------------------------------- | --------------------- | -------- |
|
|
74
|
+
| **devops-engineer** | CI/CD, pipeline, deployment, GitHub Actions, GitLab CI | CI/CD setup | 1 |
|
|
75
|
+
| **release-coordinator** | release, versioning, changelog, feature flags, rollout | Release management | 2 |
|
|
76
|
+
| **cloud-architect** | cloud, AWS, Azure, GCP, Terraform, infrastructure | Cloud infrastructure | 3 |
|
|
77
|
+
| **site-reliability-engineer** | SRE, monitoring, observability, SLO, alerting, incident | Production monitoring | 4 |
|
|
78
|
+
| **database-administrator** | DBA, database tuning, backup, recovery, replication | Database operations | 5 |
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
82
|
## Category 8: Documentation (1 Skill)
|
|
83
83
|
|
|
84
|
-
| Agent
|
|
85
|
-
|
|
86
|
-
| **technical-writer** | documentation, docs, README, user guide, API docs | Documentation creation | 1
|
|
84
|
+
| Agent | Trigger Terms | Primary Use Cases | Priority |
|
|
85
|
+
| -------------------- | ------------------------------------------------- | ---------------------- | -------- |
|
|
86
|
+
| **technical-writer** | documentation, docs, README, user guide, API docs | Documentation creation | 1 |
|
|
87
87
|
|
|
88
88
|
---
|
|
89
89
|
|
|
@@ -91,47 +91,50 @@ This matrix helps the Orchestrator select the optimal agent(s) based on user req
|
|
|
91
91
|
|
|
92
92
|
### By SDD Workflow Stage
|
|
93
93
|
|
|
94
|
-
| Stage
|
|
95
|
-
|
|
96
|
-
| 1. Research
|
|
97
|
-
| 2. Requirements
|
|
98
|
-
| 3. Design
|
|
99
|
-
| 4. Task Breakdown | project-manager
|
|
100
|
-
| 5. Implementation | software-developer
|
|
101
|
-
| 6. Testing
|
|
102
|
-
| 7. Deployment
|
|
103
|
-
| 8. Monitoring
|
|
94
|
+
| Stage | Primary Agent | Supporting Agents |
|
|
95
|
+
| ----------------- | ------------------------- | ------------------------------------------------------ |
|
|
96
|
+
| 1. Research | steering | - |
|
|
97
|
+
| 2. Requirements | requirements-analyst | change-impact-analyzer |
|
|
98
|
+
| 3. Design | system-architect | api-designer, database-schema-designer, ui-ux-designer |
|
|
99
|
+
| 4. Task Breakdown | project-manager | orchestrator |
|
|
100
|
+
| 5. Implementation | software-developer | ai-ml-engineer |
|
|
101
|
+
| 6. Testing | test-engineer | quality-assurance |
|
|
102
|
+
| 7. Deployment | devops-engineer | release-coordinator, cloud-architect |
|
|
103
|
+
| 8. Monitoring | site-reliability-engineer | database-administrator |
|
|
104
104
|
|
|
105
105
|
### By Task Type
|
|
106
106
|
|
|
107
|
-
| Task Type
|
|
108
|
-
|
|
107
|
+
| Task Type | Agent Selection |
|
|
108
|
+
| ---------------------- | -------------------------------------------------- |
|
|
109
109
|
| New greenfield project | steering → requirements-analyst → system-architect |
|
|
110
|
-
| Brownfield change
|
|
111
|
-
| Bug fix
|
|
112
|
-
| Security audit
|
|
113
|
-
| Performance issue
|
|
114
|
-
| Code review
|
|
115
|
-
| Documentation
|
|
116
|
-
| Release preparation
|
|
110
|
+
| Brownfield change | change-impact-analyzer → requirements-analyst |
|
|
111
|
+
| Bug fix | bug-hunter → software-developer → test-engineer |
|
|
112
|
+
| Security audit | security-auditor |
|
|
113
|
+
| Performance issue | performance-optimizer |
|
|
114
|
+
| Code review | code-reviewer |
|
|
115
|
+
| Documentation | technical-writer |
|
|
116
|
+
| Release preparation | release-coordinator → devops-engineer |
|
|
117
117
|
|
|
118
118
|
---
|
|
119
119
|
|
|
120
120
|
## Multi-Agent Selection Rules
|
|
121
121
|
|
|
122
122
|
### Rule 1: Always Start with Context
|
|
123
|
+
|
|
123
124
|
```
|
|
124
125
|
IF project context unclear:
|
|
125
126
|
SELECT steering FIRST
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
### Rule 2: Requirements Before Design
|
|
130
|
+
|
|
129
131
|
```
|
|
130
132
|
IF design requested AND no requirements exist:
|
|
131
133
|
SELECT requirements-analyst BEFORE system-architect
|
|
132
134
|
```
|
|
133
135
|
|
|
134
136
|
### Rule 3: Test-First for Implementation
|
|
137
|
+
|
|
135
138
|
```
|
|
136
139
|
IF implementation requested:
|
|
137
140
|
SELECT test-engineer BEFORE software-developer
|
|
@@ -139,12 +142,14 @@ IF implementation requested:
|
|
|
139
142
|
```
|
|
140
143
|
|
|
141
144
|
### Rule 4: Validate Before Release
|
|
145
|
+
|
|
142
146
|
```
|
|
143
147
|
IF release requested:
|
|
144
148
|
SELECT constitution-enforcer, traceability-auditor BEFORE release-coordinator
|
|
145
149
|
```
|
|
146
150
|
|
|
147
151
|
### Rule 5: Parallel Audits
|
|
152
|
+
|
|
148
153
|
```
|
|
149
154
|
IF comprehensive audit requested:
|
|
150
155
|
SELECT PARALLEL:
|
|
@@ -179,7 +184,7 @@ User Request
|
|
|
179
184
|
|
|
180
185
|
## Additional Skills (Beyond Original 25)
|
|
181
186
|
|
|
182
|
-
| Agent
|
|
183
|
-
|
|
184
|
-
| **agent-assistant** | agent help, MUSUBI help, how to use
|
|
185
|
-
| **issue-resolver**
|
|
187
|
+
| Agent | Trigger Terms | Primary Use Cases |
|
|
188
|
+
| ------------------- | ---------------------------------------- | --------------------- |
|
|
189
|
+
| **agent-assistant** | agent help, MUSUBI help, how to use | MUSUBI usage guidance |
|
|
190
|
+
| **issue-resolver** | GitHub issue, issue resolution, PR issue | Issue/PR resolution |
|
package/src/templates/agents/claude-code/skills/performance-engineer/optimization-playbook.md
CHANGED
|
@@ -17,29 +17,29 @@ const metrics = {
|
|
|
17
17
|
responseTime: {
|
|
18
18
|
p50: 'median response',
|
|
19
19
|
p95: '95th percentile',
|
|
20
|
-
p99: '99th percentile'
|
|
20
|
+
p99: '99th percentile',
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
// Throughput
|
|
24
24
|
throughput: {
|
|
25
25
|
rps: 'requests per second',
|
|
26
|
-
tps: 'transactions per second'
|
|
26
|
+
tps: 'transactions per second',
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
// Resources
|
|
30
30
|
resources: {
|
|
31
31
|
cpu: 'CPU utilization %',
|
|
32
32
|
memory: 'Memory usage MB',
|
|
33
33
|
disk: 'Disk I/O ops/sec',
|
|
34
|
-
network: 'Network bandwidth MB/s'
|
|
34
|
+
network: 'Network bandwidth MB/s',
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
// Application
|
|
38
38
|
application: {
|
|
39
39
|
errorRate: 'errors per minute',
|
|
40
40
|
gcTime: 'garbage collection time',
|
|
41
|
-
activeConnections: 'db/cache connections'
|
|
42
|
-
}
|
|
41
|
+
activeConnections: 'db/cache connections',
|
|
42
|
+
},
|
|
43
43
|
};
|
|
44
44
|
```
|
|
45
45
|
|
|
@@ -73,14 +73,14 @@ thresholds:
|
|
|
73
73
|
import http from 'k6/http';
|
|
74
74
|
import { check, sleep } from 'k6';
|
|
75
75
|
|
|
76
|
-
export default function() {
|
|
76
|
+
export default function () {
|
|
77
77
|
const res = http.get('https://api.example.com/users');
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
check(res, {
|
|
80
|
-
'status is 200':
|
|
81
|
-
'response time < 500ms':
|
|
80
|
+
'status is 200': r => r.status === 200,
|
|
81
|
+
'response time < 500ms': r => r.timings.duration < 500,
|
|
82
82
|
});
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
sleep(1);
|
|
85
85
|
}
|
|
86
86
|
```
|
|
@@ -91,13 +91,13 @@ export default function() {
|
|
|
91
91
|
|
|
92
92
|
### 2.1 Common Bottleneck Patterns
|
|
93
93
|
|
|
94
|
-
| Pattern
|
|
95
|
-
|
|
96
|
-
| CPU Bound
|
|
97
|
-
| I/O Bound
|
|
98
|
-
| Memory Bound
|
|
99
|
-
| Network Bound
|
|
100
|
-
| Lock Contention | Thread blocking
|
|
94
|
+
| Pattern | Symptoms | Root Cause |
|
|
95
|
+
| --------------- | ---------------------- | --------------------------- |
|
|
96
|
+
| CPU Bound | High CPU, low I/O wait | Computation intensive code |
|
|
97
|
+
| I/O Bound | Low CPU, high I/O wait | Database/file operations |
|
|
98
|
+
| Memory Bound | High memory, GC pauses | Memory leaks, large objects |
|
|
99
|
+
| Network Bound | High latency, low CPU | External API calls |
|
|
100
|
+
| Lock Contention | Thread blocking | Synchronization issues |
|
|
101
101
|
|
|
102
102
|
### 2.2 Profiling Checklist
|
|
103
103
|
|
|
@@ -156,7 +156,7 @@ async function getUsers() {
|
|
|
156
156
|
// ✅ Eager Loading
|
|
157
157
|
async function getUsers() {
|
|
158
158
|
const users = await User.findAll({
|
|
159
|
-
include: [{ model: Order }]
|
|
159
|
+
include: [{ model: Order }],
|
|
160
160
|
});
|
|
161
161
|
return users;
|
|
162
162
|
}
|
|
@@ -179,8 +179,8 @@ async function processFiles(files) {
|
|
|
179
179
|
class CacheManager {
|
|
180
180
|
constructor() {
|
|
181
181
|
this.l1 = new Map(); // In-memory (fastest)
|
|
182
|
-
this.l2 = redis;
|
|
183
|
-
this.l3 = database;
|
|
182
|
+
this.l2 = redis; // Redis (fast)
|
|
183
|
+
this.l3 = database; // Database (source of truth)
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
async get(key) {
|
|
@@ -211,7 +211,7 @@ class CacheManager {
|
|
|
211
211
|
|
|
212
212
|
```sql
|
|
213
213
|
-- Add composite index
|
|
214
|
-
CREATE INDEX CONCURRENTLY idx_orders_user_status
|
|
214
|
+
CREATE INDEX CONCURRENTLY idx_orders_user_status
|
|
215
215
|
ON orders (user_id, status, created_at DESC);
|
|
216
216
|
|
|
217
217
|
-- Partial index for common queries
|
|
@@ -224,8 +224,8 @@ WHERE status = 'pending';
|
|
|
224
224
|
SELECT * FROM orders WHERE YEAR(created_at) = 2024;
|
|
225
225
|
|
|
226
226
|
-- ✅ After (index-friendly)
|
|
227
|
-
SELECT * FROM orders
|
|
228
|
-
WHERE created_at >= '2024-01-01'
|
|
227
|
+
SELECT * FROM orders
|
|
228
|
+
WHERE created_at >= '2024-01-01'
|
|
229
229
|
AND created_at < '2025-01-01';
|
|
230
230
|
```
|
|
231
231
|
|
|
@@ -239,26 +239,26 @@ WHERE created_at >= '2024-01-01'
|
|
|
239
239
|
// Compare before/after metrics
|
|
240
240
|
const comparison = {
|
|
241
241
|
before: {
|
|
242
|
-
p50: 250,
|
|
242
|
+
p50: 250, // ms
|
|
243
243
|
p95: 800,
|
|
244
244
|
p99: 1500,
|
|
245
245
|
rps: 100,
|
|
246
|
-
errorRate: 0.02
|
|
246
|
+
errorRate: 0.02,
|
|
247
247
|
},
|
|
248
248
|
after: {
|
|
249
|
-
p50: 80,
|
|
249
|
+
p50: 80, // ms
|
|
250
250
|
p95: 200,
|
|
251
251
|
p99: 400,
|
|
252
252
|
rps: 350,
|
|
253
|
-
errorRate: 0.005
|
|
253
|
+
errorRate: 0.005,
|
|
254
254
|
},
|
|
255
255
|
improvement: {
|
|
256
256
|
p50: '-68%',
|
|
257
257
|
p95: '-75%',
|
|
258
258
|
p99: '-73%',
|
|
259
259
|
rps: '+250%',
|
|
260
|
-
errorRate: '-75%'
|
|
261
|
-
}
|
|
260
|
+
errorRate: '-75%',
|
|
261
|
+
},
|
|
262
262
|
};
|
|
263
263
|
```
|
|
264
264
|
|
|
@@ -282,25 +282,25 @@ performance-test:
|
|
|
282
282
|
|
|
283
283
|
### Response Time Targets
|
|
284
284
|
|
|
285
|
-
| Tier
|
|
286
|
-
|
|
287
|
-
| Fast
|
|
288
|
-
| Normal
|
|
285
|
+
| Tier | p50 | p95 | p99 |
|
|
286
|
+
| ---------- | ------ | ------- | ------- |
|
|
287
|
+
| Fast | <50ms | <100ms | <200ms |
|
|
288
|
+
| Normal | <200ms | <500ms | <1000ms |
|
|
289
289
|
| Acceptable | <500ms | <2000ms | <5000ms |
|
|
290
290
|
|
|
291
291
|
### Memory Guidelines
|
|
292
292
|
|
|
293
|
-
| App Type
|
|
294
|
-
|
|
295
|
-
| API Server | 512MB-2GB | <50ms
|
|
296
|
-
| Worker
|
|
297
|
-
| Batch
|
|
293
|
+
| App Type | Heap Size | GC Pause Target |
|
|
294
|
+
| ---------- | --------- | --------------- |
|
|
295
|
+
| API Server | 512MB-2GB | <50ms |
|
|
296
|
+
| Worker | 1GB-4GB | <100ms |
|
|
297
|
+
| Batch | 2GB-8GB | <500ms |
|
|
298
298
|
|
|
299
299
|
### Caching TTL Guidelines
|
|
300
300
|
|
|
301
|
-
| Data Type
|
|
302
|
-
|
|
303
|
-
| Static config
|
|
304
|
-
| User session
|
|
305
|
-
| API response
|
|
306
|
-
| Search results | 30s-5m
|
|
301
|
+
| Data Type | TTL | Strategy |
|
|
302
|
+
| -------------- | ------- | ------------- |
|
|
303
|
+
| Static config | 1h-24h | Cache-aside |
|
|
304
|
+
| User session | 15m-30m | Write-through |
|
|
305
|
+
| API response | 1m-5m | Cache-aside |
|
|
306
|
+
| Search results | 30s-5m | Cache-aside |
|
|
@@ -27,6 +27,75 @@ You handle application performance analysis, bottleneck detection, optimization
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
+
## MUSUBI LargeProjectAnalyzer Module (v5.5.0+)
|
|
31
|
+
|
|
32
|
+
**Available Module**: `src/analyzers/large-project-analyzer.js`
|
|
33
|
+
|
|
34
|
+
The LargeProjectAnalyzer module provides scale-aware analysis for enterprise-grade codebases (10M+ lines).
|
|
35
|
+
|
|
36
|
+
### Module Usage
|
|
37
|
+
|
|
38
|
+
```javascript
|
|
39
|
+
const { LargeProjectAnalyzer, LARGE_PROJECT_THRESHOLDS } = require('musubi-sdd');
|
|
40
|
+
|
|
41
|
+
const analyzer = new LargeProjectAnalyzer({
|
|
42
|
+
maxMemoryMB: 4096,
|
|
43
|
+
chunkSize: 100,
|
|
44
|
+
enableGC: true,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const result = await analyzer.analyze('/path/to/large-project', {
|
|
48
|
+
onProgress: progress => {
|
|
49
|
+
console.log(`${progress.percentage}% - ${progress.filesProcessed}/${progress.totalFiles}`);
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
console.log(`Scale: ${result.scale}`); // small, medium, large, massive
|
|
54
|
+
console.log(`Total Files: ${result.totalFiles}`);
|
|
55
|
+
console.log(`Giant Functions: ${result.giantFunctions.length}`);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Scale-Based Strategy
|
|
59
|
+
|
|
60
|
+
| Scale | Files | Strategy | Memory Usage |
|
|
61
|
+
| ----------- | ------- | ------------------ | ------------ |
|
|
62
|
+
| **Small** | ≤100 | Batch analysis | Low |
|
|
63
|
+
| **Medium** | ≤1,000 | Optimized batch | Moderate |
|
|
64
|
+
| **Large** | ≤10,000 | Chunked analysis | Managed |
|
|
65
|
+
| **Massive** | >10,000 | Streaming analysis | Controlled |
|
|
66
|
+
|
|
67
|
+
### Giant Function Detection
|
|
68
|
+
|
|
69
|
+
| Lines | Level | Action |
|
|
70
|
+
| ----- | -------- | -------------------- |
|
|
71
|
+
| 100+ | Warning | Consider splitting |
|
|
72
|
+
| 500+ | Critical | Refactoring required |
|
|
73
|
+
| 1000+ | Extreme | Urgent refactoring |
|
|
74
|
+
|
|
75
|
+
### Multi-Language Support
|
|
76
|
+
|
|
77
|
+
- JavaScript, TypeScript
|
|
78
|
+
- C, C++
|
|
79
|
+
- Python
|
|
80
|
+
- Rust, Go
|
|
81
|
+
- Java
|
|
82
|
+
|
|
83
|
+
### Integration with Performance Optimization
|
|
84
|
+
|
|
85
|
+
1. **Identify bottleneck files** in large codebases
|
|
86
|
+
2. **Detect giant functions** that impact maintainability
|
|
87
|
+
3. **Memory-efficient processing** for enterprise projects
|
|
88
|
+
4. **Progress tracking** for long-running analysis
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
// Get analysis summary
|
|
92
|
+
console.log(`Files by Language: ${JSON.stringify(result.languageBreakdown)}`);
|
|
93
|
+
console.log(`Average File Size: ${result.averageFileSize} lines`);
|
|
94
|
+
console.log(`Largest Files: ${result.largestFiles.map(f => f.path).join(', ')}`);
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
30
99
|
---
|
|
31
100
|
|
|
32
101
|
## Project Memory (Steering System)
|