@josstei/maestro 1.6.4-rc.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/.agents/plugins/marketplace.json +20 -0
- package/CHANGELOG.md +485 -0
- package/EXAMPLES.md +255 -0
- package/GEMINI.md +231 -0
- package/LICENSE +201 -0
- package/QWEN.md +241 -0
- package/README.md +220 -0
- package/agents/accessibility_specialist.md +20 -0
- package/agents/analytics_engineer.md +22 -0
- package/agents/api_designer.md +19 -0
- package/agents/architect.md +19 -0
- package/agents/cloud_architect.md +19 -0
- package/agents/cobol_engineer.md +22 -0
- package/agents/code_reviewer.md +17 -0
- package/agents/coder.md +22 -0
- package/agents/compliance_reviewer.md +19 -0
- package/agents/content_strategist.md +19 -0
- package/agents/copywriter.md +19 -0
- package/agents/data_engineer.md +22 -0
- package/agents/database_administrator.md +21 -0
- package/agents/db2_dba.md +21 -0
- package/agents/debugger.md +19 -0
- package/agents/design_system_engineer.md +22 -0
- package/agents/devops_engineer.md +23 -0
- package/agents/hlasm_assembler_specialist.md +22 -0
- package/agents/i18n_specialist.md +21 -0
- package/agents/ibm_i_specialist.md +22 -0
- package/agents/integration_engineer.md +23 -0
- package/agents/ml_engineer.md +23 -0
- package/agents/mlops_engineer.md +23 -0
- package/agents/mobile_engineer.md +23 -0
- package/agents/observability_engineer.md +23 -0
- package/agents/performance_engineer.md +21 -0
- package/agents/platform_engineer.md +24 -0
- package/agents/product_manager.md +20 -0
- package/agents/prompt_engineer.md +22 -0
- package/agents/refactor.md +22 -0
- package/agents/release_manager.md +22 -0
- package/agents/security_engineer.md +21 -0
- package/agents/seo_specialist.md +21 -0
- package/agents/site_reliability_engineer.md +21 -0
- package/agents/solutions_architect.md +19 -0
- package/agents/technical_writer.md +21 -0
- package/agents/tester.md +23 -0
- package/agents/ux_designer.md +20 -0
- package/agents/zos_sysprog.md +21 -0
- package/bin/maestro-mcp-server.js +10 -0
- package/claude/.claude-plugin/plugin.json +21 -0
- package/claude/.mcp.json +11 -0
- package/claude/README.md +191 -0
- package/claude/agents/accessibility-specialist.md +36 -0
- package/claude/agents/analytics-engineer.md +38 -0
- package/claude/agents/api-designer.md +33 -0
- package/claude/agents/architect.md +33 -0
- package/claude/agents/cloud-architect.md +33 -0
- package/claude/agents/cobol-engineer.md +38 -0
- package/claude/agents/code-reviewer.md +31 -0
- package/claude/agents/coder.md +38 -0
- package/claude/agents/compliance-reviewer.md +33 -0
- package/claude/agents/content-strategist.md +33 -0
- package/claude/agents/copywriter.md +33 -0
- package/claude/agents/data-engineer.md +37 -0
- package/claude/agents/database-administrator.md +37 -0
- package/claude/agents/db2-dba.md +37 -0
- package/claude/agents/debugger.md +32 -0
- package/claude/agents/design-system-engineer.md +38 -0
- package/claude/agents/devops-engineer.md +39 -0
- package/claude/agents/hlasm-assembler-specialist.md +38 -0
- package/claude/agents/i18n-specialist.md +37 -0
- package/claude/agents/ibm-i-specialist.md +38 -0
- package/claude/agents/integration-engineer.md +39 -0
- package/claude/agents/ml-engineer.md +39 -0
- package/claude/agents/mlops-engineer.md +39 -0
- package/claude/agents/mobile-engineer.md +39 -0
- package/claude/agents/observability-engineer.md +39 -0
- package/claude/agents/performance-engineer.md +34 -0
- package/claude/agents/platform-engineer.md +40 -0
- package/claude/agents/product-manager.md +34 -0
- package/claude/agents/prompt-engineer.md +38 -0
- package/claude/agents/refactor.md +38 -0
- package/claude/agents/release-manager.md +38 -0
- package/claude/agents/security-engineer.md +37 -0
- package/claude/agents/seo-specialist.md +37 -0
- package/claude/agents/site-reliability-engineer.md +37 -0
- package/claude/agents/solutions-architect.md +33 -0
- package/claude/agents/technical-writer.md +37 -0
- package/claude/agents/tester.md +39 -0
- package/claude/agents/ux-designer.md +34 -0
- package/claude/agents/zos-sysprog.md +37 -0
- package/claude/hooks/claude-hooks.json +48 -0
- package/claude/mcp/maestro-server.js +9 -0
- package/claude/mcp-config.example.json +9 -0
- package/claude/scripts/adapters/claude-adapter.js +7 -0
- package/claude/scripts/hook-runner.js +8 -0
- package/claude/scripts/policy-enforcer.js +294 -0
- package/claude/skills/a11y-audit/SKILL.md +26 -0
- package/claude/skills/archive/SKILL.md +24 -0
- package/claude/skills/code-review/SKILL.md +7 -0
- package/claude/skills/compliance-check/SKILL.md +26 -0
- package/claude/skills/debug-workflow/SKILL.md +27 -0
- package/claude/skills/delegation/SKILL.md +7 -0
- package/claude/skills/design-dialogue/SKILL.md +7 -0
- package/claude/skills/execute/SKILL.md +38 -0
- package/claude/skills/execution/SKILL.md +7 -0
- package/claude/skills/implementation-planning/SKILL.md +7 -0
- package/claude/skills/orchestrate/SKILL.md +38 -0
- package/claude/skills/perf-check/SKILL.md +26 -0
- package/claude/skills/resume-session/SKILL.md +38 -0
- package/claude/skills/review-code/SKILL.md +27 -0
- package/claude/skills/security-audit/SKILL.md +28 -0
- package/claude/skills/seo-audit/SKILL.md +26 -0
- package/claude/skills/session-management/SKILL.md +7 -0
- package/claude/skills/status/SKILL.md +22 -0
- package/claude/skills/validation/SKILL.md +7 -0
- package/claude/src/agents/accessibility-specialist.md +163 -0
- package/claude/src/agents/analytics-engineer.md +182 -0
- package/claude/src/agents/api-designer.md +124 -0
- package/claude/src/agents/architect.md +120 -0
- package/claude/src/agents/cloud-architect.md +134 -0
- package/claude/src/agents/cobol-engineer.md +127 -0
- package/claude/src/agents/code-reviewer.md +123 -0
- package/claude/src/agents/coder.md +132 -0
- package/claude/src/agents/compliance-reviewer.md +219 -0
- package/claude/src/agents/content-strategist.md +111 -0
- package/claude/src/agents/copywriter.md +113 -0
- package/claude/src/agents/data-engineer.md +130 -0
- package/claude/src/agents/database-administrator.md +126 -0
- package/claude/src/agents/db2-dba.md +124 -0
- package/claude/src/agents/debugger.md +133 -0
- package/claude/src/agents/design-system-engineer.md +258 -0
- package/claude/src/agents/devops-engineer.md +138 -0
- package/claude/src/agents/hlasm-assembler-specialist.md +134 -0
- package/claude/src/agents/i18n-specialist.md +241 -0
- package/claude/src/agents/ibm-i-specialist.md +132 -0
- package/claude/src/agents/integration-engineer.md +133 -0
- package/claude/src/agents/ml-engineer.md +115 -0
- package/claude/src/agents/mlops-engineer.md +116 -0
- package/claude/src/agents/mobile-engineer.md +115 -0
- package/claude/src/agents/observability-engineer.md +133 -0
- package/claude/src/agents/performance-engineer.md +139 -0
- package/claude/src/agents/platform-engineer.md +129 -0
- package/claude/src/agents/product-manager.md +170 -0
- package/claude/src/agents/prompt-engineer.md +129 -0
- package/claude/src/agents/refactor.md +138 -0
- package/claude/src/agents/release-manager.md +132 -0
- package/claude/src/agents/security-engineer.md +143 -0
- package/claude/src/agents/seo-specialist.md +129 -0
- package/claude/src/agents/site-reliability-engineer.md +131 -0
- package/claude/src/agents/solutions-architect.md +137 -0
- package/claude/src/agents/technical-writer.md +129 -0
- package/claude/src/agents/tester.md +135 -0
- package/claude/src/agents/ux-designer.md +168 -0
- package/claude/src/agents/zos-sysprog.md +134 -0
- package/claude/src/config/setting-resolver.js +32 -0
- package/claude/src/core/agent-registry.js +67 -0
- package/claude/src/core/canonical-source.js +39 -0
- package/claude/src/core/env-file-parser.js +82 -0
- package/claude/src/core/feature-blocks.js +34 -0
- package/claude/src/core/logger.js +12 -0
- package/claude/src/core/markdown-state.js +36 -0
- package/claude/src/core/policy-rules.js +32 -0
- package/claude/src/core/project-root-resolver.js +184 -0
- package/claude/src/core/stdin-reader.js +77 -0
- package/claude/src/core/version.js +50 -0
- package/claude/src/entry-points/core-command-registry.js +37 -0
- package/claude/src/entry-points/preamble-builders.js +54 -0
- package/claude/src/entry-points/registry.js +199 -0
- package/claude/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
- package/claude/src/entry-points/templates/claude-skill.md.tmpl +18 -0
- package/claude/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
- package/claude/src/entry-points/templates/codex-skill.md.tmpl +11 -0
- package/claude/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
- package/claude/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
- package/claude/src/generated/agent-registry.json +630 -0
- package/claude/src/generated/hook-registry.json +18 -0
- package/claude/src/generated/resource-registry.json +16 -0
- package/claude/src/hooks/logic/after-agent-logic.js +54 -0
- package/claude/src/hooks/logic/before-agent-logic.js +57 -0
- package/claude/src/hooks/logic/hook-state.js +127 -0
- package/claude/src/hooks/logic/session-end-logic.js +17 -0
- package/claude/src/hooks/logic/session-start-logic.js +25 -0
- package/claude/src/lib/discovery/index.js +172 -0
- package/claude/src/lib/errors/index.js +104 -0
- package/claude/src/lib/framework-detection.js +50 -0
- package/claude/src/lib/frontmatter/index.js +262 -0
- package/claude/src/lib/io/index.js +96 -0
- package/claude/src/lib/naming/index.js +94 -0
- package/claude/src/lib/validation/index.js +124 -0
- package/claude/src/lib/yaml-emit.js +38 -0
- package/claude/src/mcp/content/provider.js +68 -0
- package/claude/src/mcp/content/runtime-content.js +188 -0
- package/claude/src/mcp/contracts/cache-path-rejector.js +39 -0
- package/claude/src/mcp/contracts/downstream-context.js +106 -0
- package/claude/src/mcp/contracts/plan-schema.js +148 -0
- package/claude/src/mcp/contracts/workspace-marker.js +61 -0
- package/claude/src/mcp/core/create-server.js +76 -0
- package/claude/src/mcp/core/line-reader.js +35 -0
- package/claude/src/mcp/core/project-root-cache.js +120 -0
- package/claude/src/mcp/core/protocol-dispatcher.js +274 -0
- package/claude/src/mcp/core/recovery-hints.js +43 -0
- package/claude/src/mcp/core/tool-outcome.js +77 -0
- package/claude/src/mcp/core/tool-registry.js +82 -0
- package/claude/src/mcp/handlers/assess-task-complexity.js +108 -0
- package/claude/src/mcp/handlers/blocker-parser.js +34 -0
- package/claude/src/mcp/handlers/design-gate.js +393 -0
- package/claude/src/mcp/handlers/get-agent.js +54 -0
- package/claude/src/mcp/handlers/get-runtime-context.js +49 -0
- package/claude/src/mcp/handlers/get-skill-content.js +51 -0
- package/claude/src/mcp/handlers/initialize-workspace.js +45 -0
- package/claude/src/mcp/handlers/reconciliation.js +224 -0
- package/claude/src/mcp/handlers/resolve-settings.js +39 -0
- package/claude/src/mcp/handlers/session-state-core.js +108 -0
- package/claude/src/mcp/handlers/session-state-tools.js +562 -0
- package/claude/src/mcp/handlers/validate-plan.js +76 -0
- package/claude/src/mcp/maestro-server.js +122 -0
- package/claude/src/mcp/runtime/runtime-config-map.js +70 -0
- package/claude/src/mcp/tool-packs/content/index.js +80 -0
- package/claude/src/mcp/tool-packs/contracts.js +30 -0
- package/claude/src/mcp/tool-packs/index.js +15 -0
- package/claude/src/mcp/tool-packs/session/index.js +243 -0
- package/claude/src/mcp/tool-packs/workspace/index.js +98 -0
- package/claude/src/mcp/utils/extension-root.js +31 -0
- package/claude/src/mcp/validation/agent-checker.js +81 -0
- package/claude/src/mcp/validation/dag-checker.js +214 -0
- package/claude/src/mcp/validation/file-overlap-checker.js +63 -0
- package/claude/src/mcp/validation/schema-checker.js +108 -0
- package/claude/src/platforms/claude/runtime-config.js +60 -0
- package/claude/src/platforms/shared/adapters/claude-adapter.js +36 -0
- package/claude/src/platforms/shared/adapters/conventions.js +29 -0
- package/claude/src/platforms/shared/adapters/exit-codes.js +6 -0
- package/claude/src/platforms/shared/adapters/factory.js +40 -0
- package/claude/src/platforms/shared/agent-names.js +10 -0
- package/claude/src/platforms/shared/hook-runner.js +52 -0
- package/claude/src/references/architecture.md +139 -0
- package/claude/src/references/orchestration-steps.md +193 -0
- package/claude/src/skills/shared/code-review/SKILL.md +145 -0
- package/claude/src/skills/shared/delegation/SKILL.md +370 -0
- package/claude/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
- package/claude/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
- package/claude/src/skills/shared/design-dialogue/SKILL.md +284 -0
- package/claude/src/skills/shared/execution/SKILL.md +258 -0
- package/claude/src/skills/shared/implementation-planning/SKILL.md +303 -0
- package/claude/src/skills/shared/session-management/SKILL.md +314 -0
- package/claude/src/skills/shared/validation/SKILL.md +204 -0
- package/claude/src/state/session-state.js +113 -0
- package/claude/src/templates/design-document.md +95 -0
- package/claude/src/templates/implementation-plan.md +86 -0
- package/claude/src/templates/session-state.md +68 -0
- package/claude/src/version.json +3 -0
- package/commands/maestro/a11y-audit.toml +22 -0
- package/commands/maestro/archive.toml +23 -0
- package/commands/maestro/compliance-check.toml +22 -0
- package/commands/maestro/debug.toml +23 -0
- package/commands/maestro/execute.toml +30 -0
- package/commands/maestro/orchestrate.toml +30 -0
- package/commands/maestro/perf-check.toml +22 -0
- package/commands/maestro/resume.toml +38 -0
- package/commands/maestro/review.toml +23 -0
- package/commands/maestro/security-audit.toml +24 -0
- package/commands/maestro/seo-audit.toml +22 -0
- package/commands/maestro/status.toml +21 -0
- package/docs/architecture.md +310 -0
- package/docs/cicd.md +647 -0
- package/docs/flow.md +255 -0
- package/docs/maestro-cheatsheet.md +199 -0
- package/docs/overview.md +141 -0
- package/docs/runtime-claude.md +190 -0
- package/docs/runtime-codex.md +197 -0
- package/docs/runtime-gemini.md +170 -0
- package/docs/runtime-qwen.md +147 -0
- package/docs/usage.md +312 -0
- package/gemini-extension.json +55 -0
- package/hooks/adapters/gemini-adapter.js +2 -0
- package/hooks/adapters/qwen-adapter.js +2 -0
- package/hooks/hook-runner.js +3 -0
- package/hooks/hooks.json +56 -0
- package/mcp/maestro-server.js +4 -0
- package/package.json +93 -0
- package/plugins/maestro/.app.json +3 -0
- package/plugins/maestro/.codex-plugin/plugin.json +41 -0
- package/plugins/maestro/.mcp.json +16 -0
- package/plugins/maestro/README.md +57 -0
- package/plugins/maestro/references/runtime-guide.md +125 -0
- package/plugins/maestro/skills/a11y-audit/SKILL.md +16 -0
- package/plugins/maestro/skills/archive/SKILL.md +16 -0
- package/plugins/maestro/skills/code-review/SKILL.md +6 -0
- package/plugins/maestro/skills/compliance-check/SKILL.md +16 -0
- package/plugins/maestro/skills/debug-workflow/SKILL.md +16 -0
- package/plugins/maestro/skills/delegation/SKILL.md +6 -0
- package/plugins/maestro/skills/design-dialogue/SKILL.md +6 -0
- package/plugins/maestro/skills/execute/SKILL.md +16 -0
- package/plugins/maestro/skills/execution/SKILL.md +6 -0
- package/plugins/maestro/skills/implementation-planning/SKILL.md +6 -0
- package/plugins/maestro/skills/orchestrate/SKILL.md +16 -0
- package/plugins/maestro/skills/perf-check/SKILL.md +16 -0
- package/plugins/maestro/skills/resume-session/SKILL.md +16 -0
- package/plugins/maestro/skills/review-code/SKILL.md +16 -0
- package/plugins/maestro/skills/security-audit/SKILL.md +16 -0
- package/plugins/maestro/skills/seo-audit/SKILL.md +16 -0
- package/plugins/maestro/skills/session-management/SKILL.md +6 -0
- package/plugins/maestro/skills/status/SKILL.md +14 -0
- package/plugins/maestro/skills/validation/SKILL.md +6 -0
- package/plugins/maestro/src/agents/accessibility-specialist.md +163 -0
- package/plugins/maestro/src/agents/analytics-engineer.md +182 -0
- package/plugins/maestro/src/agents/api-designer.md +124 -0
- package/plugins/maestro/src/agents/architect.md +120 -0
- package/plugins/maestro/src/agents/cloud-architect.md +134 -0
- package/plugins/maestro/src/agents/cobol-engineer.md +127 -0
- package/plugins/maestro/src/agents/code-reviewer.md +123 -0
- package/plugins/maestro/src/agents/coder.md +132 -0
- package/plugins/maestro/src/agents/compliance-reviewer.md +219 -0
- package/plugins/maestro/src/agents/content-strategist.md +111 -0
- package/plugins/maestro/src/agents/copywriter.md +113 -0
- package/plugins/maestro/src/agents/data-engineer.md +130 -0
- package/plugins/maestro/src/agents/database-administrator.md +126 -0
- package/plugins/maestro/src/agents/db2-dba.md +124 -0
- package/plugins/maestro/src/agents/debugger.md +133 -0
- package/plugins/maestro/src/agents/design-system-engineer.md +258 -0
- package/plugins/maestro/src/agents/devops-engineer.md +138 -0
- package/plugins/maestro/src/agents/hlasm-assembler-specialist.md +134 -0
- package/plugins/maestro/src/agents/i18n-specialist.md +241 -0
- package/plugins/maestro/src/agents/ibm-i-specialist.md +132 -0
- package/plugins/maestro/src/agents/integration-engineer.md +133 -0
- package/plugins/maestro/src/agents/ml-engineer.md +115 -0
- package/plugins/maestro/src/agents/mlops-engineer.md +116 -0
- package/plugins/maestro/src/agents/mobile-engineer.md +115 -0
- package/plugins/maestro/src/agents/observability-engineer.md +133 -0
- package/plugins/maestro/src/agents/performance-engineer.md +139 -0
- package/plugins/maestro/src/agents/platform-engineer.md +129 -0
- package/plugins/maestro/src/agents/product-manager.md +170 -0
- package/plugins/maestro/src/agents/prompt-engineer.md +129 -0
- package/plugins/maestro/src/agents/refactor.md +138 -0
- package/plugins/maestro/src/agents/release-manager.md +132 -0
- package/plugins/maestro/src/agents/security-engineer.md +143 -0
- package/plugins/maestro/src/agents/seo-specialist.md +129 -0
- package/plugins/maestro/src/agents/site-reliability-engineer.md +131 -0
- package/plugins/maestro/src/agents/solutions-architect.md +137 -0
- package/plugins/maestro/src/agents/technical-writer.md +129 -0
- package/plugins/maestro/src/agents/tester.md +135 -0
- package/plugins/maestro/src/agents/ux-designer.md +168 -0
- package/plugins/maestro/src/agents/zos-sysprog.md +134 -0
- package/plugins/maestro/src/config/setting-resolver.js +32 -0
- package/plugins/maestro/src/core/agent-registry.js +67 -0
- package/plugins/maestro/src/core/canonical-source.js +39 -0
- package/plugins/maestro/src/core/env-file-parser.js +82 -0
- package/plugins/maestro/src/core/feature-blocks.js +34 -0
- package/plugins/maestro/src/core/logger.js +12 -0
- package/plugins/maestro/src/core/markdown-state.js +36 -0
- package/plugins/maestro/src/core/policy-rules.js +32 -0
- package/plugins/maestro/src/core/project-root-resolver.js +184 -0
- package/plugins/maestro/src/core/stdin-reader.js +77 -0
- package/plugins/maestro/src/core/version.js +50 -0
- package/plugins/maestro/src/entry-points/core-command-registry.js +37 -0
- package/plugins/maestro/src/entry-points/preamble-builders.js +54 -0
- package/plugins/maestro/src/entry-points/registry.js +199 -0
- package/plugins/maestro/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
- package/plugins/maestro/src/entry-points/templates/claude-skill.md.tmpl +18 -0
- package/plugins/maestro/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
- package/plugins/maestro/src/entry-points/templates/codex-skill.md.tmpl +11 -0
- package/plugins/maestro/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
- package/plugins/maestro/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
- package/plugins/maestro/src/generated/agent-registry.json +630 -0
- package/plugins/maestro/src/generated/hook-registry.json +18 -0
- package/plugins/maestro/src/generated/resource-registry.json +16 -0
- package/plugins/maestro/src/hooks/logic/after-agent-logic.js +54 -0
- package/plugins/maestro/src/hooks/logic/before-agent-logic.js +57 -0
- package/plugins/maestro/src/hooks/logic/hook-state.js +127 -0
- package/plugins/maestro/src/hooks/logic/session-end-logic.js +17 -0
- package/plugins/maestro/src/hooks/logic/session-start-logic.js +25 -0
- package/plugins/maestro/src/lib/discovery/index.js +172 -0
- package/plugins/maestro/src/lib/errors/index.js +104 -0
- package/plugins/maestro/src/lib/framework-detection.js +50 -0
- package/plugins/maestro/src/lib/frontmatter/index.js +262 -0
- package/plugins/maestro/src/lib/io/index.js +96 -0
- package/plugins/maestro/src/lib/naming/index.js +94 -0
- package/plugins/maestro/src/lib/validation/index.js +124 -0
- package/plugins/maestro/src/lib/yaml-emit.js +38 -0
- package/plugins/maestro/src/mcp/content/provider.js +68 -0
- package/plugins/maestro/src/mcp/content/runtime-content.js +188 -0
- package/plugins/maestro/src/mcp/contracts/cache-path-rejector.js +39 -0
- package/plugins/maestro/src/mcp/contracts/downstream-context.js +106 -0
- package/plugins/maestro/src/mcp/contracts/plan-schema.js +148 -0
- package/plugins/maestro/src/mcp/contracts/workspace-marker.js +61 -0
- package/plugins/maestro/src/mcp/core/create-server.js +76 -0
- package/plugins/maestro/src/mcp/core/line-reader.js +35 -0
- package/plugins/maestro/src/mcp/core/project-root-cache.js +120 -0
- package/plugins/maestro/src/mcp/core/protocol-dispatcher.js +274 -0
- package/plugins/maestro/src/mcp/core/recovery-hints.js +43 -0
- package/plugins/maestro/src/mcp/core/tool-outcome.js +77 -0
- package/plugins/maestro/src/mcp/core/tool-registry.js +82 -0
- package/plugins/maestro/src/mcp/handlers/assess-task-complexity.js +108 -0
- package/plugins/maestro/src/mcp/handlers/blocker-parser.js +34 -0
- package/plugins/maestro/src/mcp/handlers/design-gate.js +393 -0
- package/plugins/maestro/src/mcp/handlers/get-agent.js +54 -0
- package/plugins/maestro/src/mcp/handlers/get-runtime-context.js +49 -0
- package/plugins/maestro/src/mcp/handlers/get-skill-content.js +51 -0
- package/plugins/maestro/src/mcp/handlers/initialize-workspace.js +45 -0
- package/plugins/maestro/src/mcp/handlers/reconciliation.js +224 -0
- package/plugins/maestro/src/mcp/handlers/resolve-settings.js +39 -0
- package/plugins/maestro/src/mcp/handlers/session-state-core.js +108 -0
- package/plugins/maestro/src/mcp/handlers/session-state-tools.js +562 -0
- package/plugins/maestro/src/mcp/handlers/validate-plan.js +76 -0
- package/plugins/maestro/src/mcp/maestro-server.js +122 -0
- package/plugins/maestro/src/mcp/runtime/runtime-config-map.js +70 -0
- package/plugins/maestro/src/mcp/tool-packs/content/index.js +80 -0
- package/plugins/maestro/src/mcp/tool-packs/contracts.js +30 -0
- package/plugins/maestro/src/mcp/tool-packs/index.js +15 -0
- package/plugins/maestro/src/mcp/tool-packs/session/index.js +243 -0
- package/plugins/maestro/src/mcp/tool-packs/workspace/index.js +98 -0
- package/plugins/maestro/src/mcp/utils/extension-root.js +31 -0
- package/plugins/maestro/src/mcp/validation/agent-checker.js +81 -0
- package/plugins/maestro/src/mcp/validation/dag-checker.js +214 -0
- package/plugins/maestro/src/mcp/validation/file-overlap-checker.js +63 -0
- package/plugins/maestro/src/mcp/validation/schema-checker.js +108 -0
- package/plugins/maestro/src/platforms/codex/runtime-config.js +58 -0
- package/plugins/maestro/src/platforms/shared/adapters/conventions.js +29 -0
- package/plugins/maestro/src/platforms/shared/adapters/exit-codes.js +6 -0
- package/plugins/maestro/src/platforms/shared/adapters/factory.js +40 -0
- package/plugins/maestro/src/platforms/shared/agent-names.js +10 -0
- package/plugins/maestro/src/platforms/shared/hook-runner.js +52 -0
- package/plugins/maestro/src/references/architecture.md +139 -0
- package/plugins/maestro/src/references/orchestration-steps.md +193 -0
- package/plugins/maestro/src/skills/shared/code-review/SKILL.md +145 -0
- package/plugins/maestro/src/skills/shared/delegation/SKILL.md +370 -0
- package/plugins/maestro/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
- package/plugins/maestro/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
- package/plugins/maestro/src/skills/shared/design-dialogue/SKILL.md +284 -0
- package/plugins/maestro/src/skills/shared/execution/SKILL.md +258 -0
- package/plugins/maestro/src/skills/shared/implementation-planning/SKILL.md +303 -0
- package/plugins/maestro/src/skills/shared/session-management/SKILL.md +314 -0
- package/plugins/maestro/src/skills/shared/validation/SKILL.md +204 -0
- package/plugins/maestro/src/state/session-state.js +113 -0
- package/plugins/maestro/src/templates/design-document.md +95 -0
- package/plugins/maestro/src/templates/implementation-plan.md +86 -0
- package/plugins/maestro/src/templates/session-state.md +68 -0
- package/plugins/maestro/src/version.json +3 -0
- package/policies/maestro.toml +44 -0
- package/qwen/agents/accessibility_specialist.md +18 -0
- package/qwen/agents/analytics_engineer.md +20 -0
- package/qwen/agents/api_designer.md +17 -0
- package/qwen/agents/architect.md +17 -0
- package/qwen/agents/cloud_architect.md +17 -0
- package/qwen/agents/cobol_engineer.md +20 -0
- package/qwen/agents/code_reviewer.md +15 -0
- package/qwen/agents/coder.md +20 -0
- package/qwen/agents/compliance_reviewer.md +17 -0
- package/qwen/agents/content_strategist.md +17 -0
- package/qwen/agents/copywriter.md +17 -0
- package/qwen/agents/data_engineer.md +20 -0
- package/qwen/agents/database_administrator.md +19 -0
- package/qwen/agents/db2_dba.md +19 -0
- package/qwen/agents/debugger.md +17 -0
- package/qwen/agents/design_system_engineer.md +20 -0
- package/qwen/agents/devops_engineer.md +21 -0
- package/qwen/agents/hlasm_assembler_specialist.md +20 -0
- package/qwen/agents/i18n_specialist.md +19 -0
- package/qwen/agents/ibm_i_specialist.md +20 -0
- package/qwen/agents/integration_engineer.md +21 -0
- package/qwen/agents/ml_engineer.md +21 -0
- package/qwen/agents/mlops_engineer.md +21 -0
- package/qwen/agents/mobile_engineer.md +21 -0
- package/qwen/agents/observability_engineer.md +21 -0
- package/qwen/agents/performance_engineer.md +19 -0
- package/qwen/agents/platform_engineer.md +22 -0
- package/qwen/agents/product_manager.md +18 -0
- package/qwen/agents/prompt_engineer.md +20 -0
- package/qwen/agents/refactor.md +20 -0
- package/qwen/agents/release_manager.md +20 -0
- package/qwen/agents/security_engineer.md +19 -0
- package/qwen/agents/seo_specialist.md +19 -0
- package/qwen/agents/site_reliability_engineer.md +19 -0
- package/qwen/agents/solutions_architect.md +17 -0
- package/qwen/agents/technical_writer.md +19 -0
- package/qwen/agents/tester.md +21 -0
- package/qwen/agents/ux_designer.md +18 -0
- package/qwen/agents/zos_sysprog.md +19 -0
- package/qwen/hooks.json +56 -0
- package/qwen-extension.json +55 -0
- package/scripts/check-layer-boundaries.js +74 -0
- package/scripts/generate.js +155 -0
- package/scripts/install-codex-plugin.js +167 -0
- package/scripts/install-git-hooks.js +43 -0
- package/scripts/npm-publish-idempotent.js +150 -0
- package/scripts/package-release-artifacts.js +156 -0
- package/scripts/release-artifact-manifest.js +378 -0
- package/scripts/release-version-metadata.js +129 -0
- package/scripts/update-versions.js +33 -0
- package/scripts/verify-npm-pack.js +85 -0
- package/scripts/verify-release-artifacts.js +95 -0
- package/src/agents/accessibility-specialist.md +163 -0
- package/src/agents/analytics-engineer.md +182 -0
- package/src/agents/api-designer.md +124 -0
- package/src/agents/architect.md +120 -0
- package/src/agents/cloud-architect.md +134 -0
- package/src/agents/cobol-engineer.md +127 -0
- package/src/agents/code-reviewer.md +123 -0
- package/src/agents/coder.md +132 -0
- package/src/agents/compliance-reviewer.md +219 -0
- package/src/agents/content-strategist.md +111 -0
- package/src/agents/copywriter.md +113 -0
- package/src/agents/data-engineer.md +130 -0
- package/src/agents/database-administrator.md +126 -0
- package/src/agents/db2-dba.md +124 -0
- package/src/agents/debugger.md +133 -0
- package/src/agents/design-system-engineer.md +258 -0
- package/src/agents/devops-engineer.md +138 -0
- package/src/agents/hlasm-assembler-specialist.md +134 -0
- package/src/agents/i18n-specialist.md +241 -0
- package/src/agents/ibm-i-specialist.md +132 -0
- package/src/agents/integration-engineer.md +133 -0
- package/src/agents/ml-engineer.md +115 -0
- package/src/agents/mlops-engineer.md +116 -0
- package/src/agents/mobile-engineer.md +115 -0
- package/src/agents/observability-engineer.md +133 -0
- package/src/agents/performance-engineer.md +139 -0
- package/src/agents/platform-engineer.md +129 -0
- package/src/agents/product-manager.md +170 -0
- package/src/agents/prompt-engineer.md +129 -0
- package/src/agents/refactor.md +138 -0
- package/src/agents/release-manager.md +132 -0
- package/src/agents/security-engineer.md +143 -0
- package/src/agents/seo-specialist.md +129 -0
- package/src/agents/site-reliability-engineer.md +131 -0
- package/src/agents/solutions-architect.md +137 -0
- package/src/agents/technical-writer.md +129 -0
- package/src/agents/tester.md +135 -0
- package/src/agents/ux-designer.md +168 -0
- package/src/agents/zos-sysprog.md +134 -0
- package/src/config/setting-resolver.js +32 -0
- package/src/core/agent-registry.js +67 -0
- package/src/core/canonical-source.js +39 -0
- package/src/core/env-file-parser.js +82 -0
- package/src/core/feature-blocks.js +34 -0
- package/src/core/logger.js +12 -0
- package/src/core/markdown-state.js +36 -0
- package/src/core/policy-rules.js +32 -0
- package/src/core/project-root-resolver.js +184 -0
- package/src/core/stdin-reader.js +77 -0
- package/src/core/version.js +50 -0
- package/src/entry-points/core-command-registry.js +37 -0
- package/src/entry-points/preamble-builders.js +54 -0
- package/src/entry-points/registry.js +199 -0
- package/src/entry-points/templates/claude-core-command.md.tmpl +38 -0
- package/src/entry-points/templates/claude-skill.md.tmpl +18 -0
- package/src/entry-points/templates/codex-core-command.md.tmpl +16 -0
- package/src/entry-points/templates/codex-skill.md.tmpl +11 -0
- package/src/entry-points/templates/gemini-command.toml.tmpl +17 -0
- package/src/entry-points/templates/gemini-core-command.toml.tmpl +30 -0
- package/src/generated/agent-registry.json +630 -0
- package/src/generated/hook-registry.json +18 -0
- package/src/generated/resource-registry.json +16 -0
- package/src/generator/entry-point-expander.js +182 -0
- package/src/generator/file-writer.js +167 -0
- package/src/generator/generation-session.js +62 -0
- package/src/generator/manifest-curator.js +31 -0
- package/src/generator/manifest-expander.js +256 -0
- package/src/generator/payload-builder.js +217 -0
- package/src/generator/registry-scanner.js +130 -0
- package/src/generator/stale-pruner.js +101 -0
- package/src/hooks/logic/after-agent-logic.js +54 -0
- package/src/hooks/logic/before-agent-logic.js +57 -0
- package/src/hooks/logic/hook-state.js +127 -0
- package/src/hooks/logic/session-end-logic.js +17 -0
- package/src/hooks/logic/session-start-logic.js +25 -0
- package/src/lib/discovery/index.js +172 -0
- package/src/lib/errors/index.js +104 -0
- package/src/lib/framework-detection.js +50 -0
- package/src/lib/frontmatter/index.js +262 -0
- package/src/lib/io/index.js +96 -0
- package/src/lib/naming/index.js +94 -0
- package/src/lib/validation/index.js +124 -0
- package/src/lib/yaml-emit.js +38 -0
- package/src/manifest.js +11 -0
- package/src/mcp/content/provider.js +68 -0
- package/src/mcp/content/runtime-content.js +188 -0
- package/src/mcp/contracts/cache-path-rejector.js +39 -0
- package/src/mcp/contracts/downstream-context.js +106 -0
- package/src/mcp/contracts/plan-schema.js +148 -0
- package/src/mcp/contracts/workspace-marker.js +61 -0
- package/src/mcp/core/create-server.js +76 -0
- package/src/mcp/core/line-reader.js +35 -0
- package/src/mcp/core/project-root-cache.js +120 -0
- package/src/mcp/core/protocol-dispatcher.js +274 -0
- package/src/mcp/core/recovery-hints.js +43 -0
- package/src/mcp/core/tool-outcome.js +77 -0
- package/src/mcp/core/tool-registry.js +82 -0
- package/src/mcp/handlers/assess-task-complexity.js +108 -0
- package/src/mcp/handlers/blocker-parser.js +34 -0
- package/src/mcp/handlers/design-gate.js +393 -0
- package/src/mcp/handlers/get-agent.js +54 -0
- package/src/mcp/handlers/get-runtime-context.js +49 -0
- package/src/mcp/handlers/get-skill-content.js +51 -0
- package/src/mcp/handlers/initialize-workspace.js +45 -0
- package/src/mcp/handlers/reconciliation.js +224 -0
- package/src/mcp/handlers/resolve-settings.js +39 -0
- package/src/mcp/handlers/session-state-core.js +108 -0
- package/src/mcp/handlers/session-state-tools.js +562 -0
- package/src/mcp/handlers/validate-plan.js +76 -0
- package/src/mcp/maestro-server.js +122 -0
- package/src/mcp/runtime/runtime-config-map.js +70 -0
- package/src/mcp/tool-packs/content/index.js +80 -0
- package/src/mcp/tool-packs/contracts.js +30 -0
- package/src/mcp/tool-packs/index.js +15 -0
- package/src/mcp/tool-packs/session/index.js +243 -0
- package/src/mcp/tool-packs/workspace/index.js +98 -0
- package/src/mcp/utils/extension-root.js +31 -0
- package/src/mcp/validation/agent-checker.js +81 -0
- package/src/mcp/validation/dag-checker.js +214 -0
- package/src/mcp/validation/file-overlap-checker.js +63 -0
- package/src/mcp/validation/schema-checker.js +108 -0
- package/src/platforms/claude/metadata.js +96 -0
- package/src/platforms/claude/runtime-config.js +60 -0
- package/src/platforms/codex/metadata.js +107 -0
- package/src/platforms/codex/runtime-config.js +58 -0
- package/src/platforms/gemini/metadata.js +27 -0
- package/src/platforms/gemini/runtime-config.js +62 -0
- package/src/platforms/metadata-shared.js +131 -0
- package/src/platforms/metadata.js +29 -0
- package/src/platforms/qwen/metadata.js +27 -0
- package/src/platforms/qwen/runtime-config.js +62 -0
- package/src/platforms/shared/adapters/claude-adapter.js +36 -0
- package/src/platforms/shared/adapters/conventions.js +29 -0
- package/src/platforms/shared/adapters/exit-codes.js +6 -0
- package/src/platforms/shared/adapters/factory.js +40 -0
- package/src/platforms/shared/adapters/gemini-adapter.js +34 -0
- package/src/platforms/shared/adapters/qwen-adapter.js +93 -0
- package/src/platforms/shared/agent-names.js +10 -0
- package/src/platforms/shared/hook-runner.js +52 -0
- package/src/references/architecture.md +139 -0
- package/src/references/orchestration-steps.md +193 -0
- package/src/scripts/ensure-workspace.js +14 -0
- package/src/scripts/read-active-session.js +26 -0
- package/src/scripts/read-setting.js +18 -0
- package/src/scripts/read-state.js +17 -0
- package/src/scripts/write-state.js +22 -0
- package/src/skills/shared/code-review/SKILL.md +145 -0
- package/src/skills/shared/delegation/SKILL.md +370 -0
- package/src/skills/shared/delegation/protocols/agent-base-protocol.md +145 -0
- package/src/skills/shared/delegation/protocols/filesystem-safety-protocol.md +31 -0
- package/src/skills/shared/design-dialogue/SKILL.md +284 -0
- package/src/skills/shared/execution/SKILL.md +258 -0
- package/src/skills/shared/implementation-planning/SKILL.md +303 -0
- package/src/skills/shared/session-management/SKILL.md +314 -0
- package/src/skills/shared/validation/SKILL.md +204 -0
- package/src/state/session-state.js +113 -0
- package/src/templates/design-document.md +95 -0
- package/src/templates/implementation-plan.md +86 -0
- package/src/templates/session-state.md +68 -0
- package/src/transforms/agent-stub.js +29 -0
- package/src/transforms/extract-examples.js +63 -0
- package/src/transforms/index.js +35 -0
- package/src/transforms/parse-frontmatter.js +23 -0
- package/src/transforms/rebuild-frontmatter.js +147 -0
- package/src/transforms/skill-discovery-stub.js +27 -0
- package/src/transforms/skill-metadata.js +14 -0
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const { assertSessionId } = require('../../lib/validation');
|
|
7
|
+
const { validatePhases } = require('../contracts/plan-schema');
|
|
8
|
+
const {
|
|
9
|
+
createEmptyDownstreamContext,
|
|
10
|
+
normalizeDownstreamContext,
|
|
11
|
+
isDownstreamContextPopulated,
|
|
12
|
+
describeShape: describeDownstreamContextShape,
|
|
13
|
+
} = require('../contracts/downstream-context');
|
|
14
|
+
const { ValidationError, StateError, NotFoundError } = require('../../lib/errors');
|
|
15
|
+
const {
|
|
16
|
+
isDesignGateBlockingCreate,
|
|
17
|
+
hasDesignGate,
|
|
18
|
+
getApprovedDesignDocumentPath,
|
|
19
|
+
findOrphanedApprovedGates,
|
|
20
|
+
ensureDesignDocumentInPlans,
|
|
21
|
+
writePlansDocumentContent,
|
|
22
|
+
removeDesignGate,
|
|
23
|
+
} = require('./design-gate');
|
|
24
|
+
const {
|
|
25
|
+
resolveBasePath,
|
|
26
|
+
resolveActiveSessionPath,
|
|
27
|
+
parseSessionState,
|
|
28
|
+
serializeSessionState,
|
|
29
|
+
extractBody,
|
|
30
|
+
readActiveSession,
|
|
31
|
+
readActiveSessionOrNull,
|
|
32
|
+
writeActiveSession,
|
|
33
|
+
withSessionState,
|
|
34
|
+
} = require('./session-state-core');
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Materialize a session document (design or plan) into `<state_dir>/plans/`.
|
|
38
|
+
* Mirrors the design-gate contract so both documents are reachable by
|
|
39
|
+
* `archive_session` regardless of where Plan Mode wrote them.
|
|
40
|
+
*
|
|
41
|
+
* Used at `create_session` time rather than `record_design_approval` because
|
|
42
|
+
* Gemini's parallel dispatch can fire a write and an MCP tool in the same
|
|
43
|
+
* turn; the write isn't yet visible when the MCP handler runs. Deferring the
|
|
44
|
+
* copy to `create_session` guarantees the file has settled on disk.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} projectRoot
|
|
47
|
+
* @param {string} documentPath - absolute or workspace-relative path
|
|
48
|
+
* @param {'design_document' | 'implementation_plan'} documentKind
|
|
49
|
+
* @returns {string | null} absolute path to the canonical location inside plans/, or null if documentPath was absent
|
|
50
|
+
*/
|
|
51
|
+
function materializeSessionDocument(projectRoot, documentPath, documentKind) {
|
|
52
|
+
if (typeof documentPath !== 'string' || documentPath.length === 0) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const absolutePath = path.isAbsolute(documentPath)
|
|
56
|
+
? documentPath
|
|
57
|
+
: path.join(projectRoot, documentPath);
|
|
58
|
+
if (!fs.existsSync(absolutePath)) {
|
|
59
|
+
const context =
|
|
60
|
+
documentKind === 'design_document'
|
|
61
|
+
? ' (recorded via record_design_approval but not found at create_session time — confirm the file was materialized after Plan Mode exit)'
|
|
62
|
+
: ' (confirm the plan was written to disk before calling create_session)';
|
|
63
|
+
throw new NotFoundError(`${documentKind} does not exist: ${absolutePath}${context}`);
|
|
64
|
+
}
|
|
65
|
+
return ensureDesignDocumentInPlans(projectRoot, absolutePath);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Resolve the caller's implementation-plan input to a canonical absolute path.
|
|
70
|
+
* At-most-one-of (implementation_plan) or (implementation_plan_content +
|
|
71
|
+
* implementation_plan_filename); absent entirely is valid and returns null
|
|
72
|
+
* (the session simply has no recorded plan). The content variant closes the
|
|
73
|
+
* same path-resolution gap that `resolveApprovedDesignDocument` addresses for
|
|
74
|
+
* design docs: a runtime whose write surface resolves relative paths against
|
|
75
|
+
* a different root than the MCP workspace cannot pass a path the server can
|
|
76
|
+
* find, so it passes content instead.
|
|
77
|
+
*
|
|
78
|
+
* @param {object} params
|
|
79
|
+
* @param {string} [params.implementation_plan]
|
|
80
|
+
* @param {string} [params.implementation_plan_content]
|
|
81
|
+
* @param {string} [params.implementation_plan_filename]
|
|
82
|
+
* @param {string} projectRoot
|
|
83
|
+
* @returns {string | null} canonical absolute path inside plans/, or null when no plan was supplied
|
|
84
|
+
* @throws {ValidationError} when both variants are provided or the content variant is incomplete
|
|
85
|
+
*/
|
|
86
|
+
function resolveImplementationPlan(params, projectRoot) {
|
|
87
|
+
const hasPath =
|
|
88
|
+
typeof params.implementation_plan === 'string' &&
|
|
89
|
+
params.implementation_plan.length > 0;
|
|
90
|
+
const hasContent =
|
|
91
|
+
typeof params.implementation_plan_content === 'string' &&
|
|
92
|
+
params.implementation_plan_content.length > 0;
|
|
93
|
+
const hasFilename =
|
|
94
|
+
typeof params.implementation_plan_filename === 'string' &&
|
|
95
|
+
params.implementation_plan_filename.length > 0;
|
|
96
|
+
const contentVariantProvided = hasContent || hasFilename;
|
|
97
|
+
|
|
98
|
+
if (hasPath && contentVariantProvided) {
|
|
99
|
+
throw new ValidationError(
|
|
100
|
+
'implementation_plan is mutually exclusive with implementation_plan_content/implementation_plan_filename'
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (contentVariantProvided) {
|
|
105
|
+
if (!hasContent) {
|
|
106
|
+
throw new ValidationError('implementation_plan_content is required');
|
|
107
|
+
}
|
|
108
|
+
if (!hasFilename) {
|
|
109
|
+
throw new ValidationError('implementation_plan_filename is required');
|
|
110
|
+
}
|
|
111
|
+
return writePlansDocumentContent(
|
|
112
|
+
projectRoot,
|
|
113
|
+
params.implementation_plan_filename,
|
|
114
|
+
params.implementation_plan_content,
|
|
115
|
+
'implementation_plan_filename'
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (hasPath) {
|
|
120
|
+
return materializeSessionDocument(projectRoot, params.implementation_plan, 'implementation_plan');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Reject create_session when an approved design gate exists for a different
|
|
128
|
+
* session_id and the current session has no gate of its own. This signals the
|
|
129
|
+
* orchestrator drifted away from the session_id it entered the gate with —
|
|
130
|
+
* silently proceeding would strand the approved design document because
|
|
131
|
+
* `getApprovedDesignDocumentPath` looks the path up by session_id. The error
|
|
132
|
+
* names the orphaned ids and describes remediation so the caller can either
|
|
133
|
+
* align on the original id or delete the stale gate file before retrying.
|
|
134
|
+
*
|
|
135
|
+
* A current-session gate (approved or not) suppresses the check: that path is
|
|
136
|
+
* the normal approve-then-create flow, and any leftover gate from a prior
|
|
137
|
+
* workflow in the same workspace is benign alongside the valid one.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} projectRoot
|
|
140
|
+
* @param {string} currentSessionId
|
|
141
|
+
* @throws {ValidationError} when an orphaned approved gate is detected
|
|
142
|
+
*/
|
|
143
|
+
function assertNoOrphanedApprovedGate(projectRoot, currentSessionId) {
|
|
144
|
+
const orphans = findOrphanedApprovedGates(projectRoot, currentSessionId);
|
|
145
|
+
if (orphans.length === 0) return;
|
|
146
|
+
|
|
147
|
+
if (hasDesignGate(projectRoot, currentSessionId)) return;
|
|
148
|
+
|
|
149
|
+
const orphanedIds = orphans.map((gate) => gate.session_id);
|
|
150
|
+
const idList = orphanedIds.map((id) => `'${id}'`).join(', ');
|
|
151
|
+
const stalePaths = orphans
|
|
152
|
+
.map((g) => `<state_dir>/state/${g.session_id}.design-gate.json`)
|
|
153
|
+
.join(', ');
|
|
154
|
+
throw new ValidationError(
|
|
155
|
+
`Approved design gate exists for session ${idList} but create_session was called with '${currentSessionId}'. Session IDs must match across enter_design_gate, record_design_approval, and create_session. Either call create_session with the matching session_id, or delete the stale gate file(s) at ${stalePaths} and re-enter the gate with '${currentSessionId}'.`,
|
|
156
|
+
{
|
|
157
|
+
code: 'DESIGN_GATE_SESSION_MISMATCH',
|
|
158
|
+
details: {
|
|
159
|
+
current_session_id: currentSessionId,
|
|
160
|
+
orphaned_session_ids: orphanedIds,
|
|
161
|
+
},
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function handleCreateSession(params, projectRoot) {
|
|
167
|
+
assertSessionId(params.session_id);
|
|
168
|
+
|
|
169
|
+
assertNoOrphanedApprovedGate(projectRoot, params.session_id);
|
|
170
|
+
|
|
171
|
+
if (isDesignGateBlockingCreate(projectRoot, params.session_id)) {
|
|
172
|
+
throw new StateError(
|
|
173
|
+
'Design gate entered but not approved. Call record_design_approval before create_session.',
|
|
174
|
+
{ code: 'DESIGN_GATE_UNAPPROVED' }
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const phasesValidation = validatePhases(params.phases);
|
|
179
|
+
if (!phasesValidation.valid) {
|
|
180
|
+
const rules = phasesValidation.violations.map((v) => v.rule || v.field).join(', ');
|
|
181
|
+
throw new ValidationError(`Invalid phases payload: ${rules}`, {
|
|
182
|
+
details: phasesValidation.violations,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const basePath = resolveBasePath(projectRoot);
|
|
187
|
+
const sessionPath = resolveActiveSessionPath(basePath);
|
|
188
|
+
|
|
189
|
+
if (fs.existsSync(sessionPath)) {
|
|
190
|
+
const existing = parseSessionState(fs.readFileSync(sessionPath, 'utf8'));
|
|
191
|
+
if (existing.status === 'in_progress') {
|
|
192
|
+
throw new StateError(
|
|
193
|
+
`Active session '${existing.session_id}' already exists (status: in_progress). Archive it first with archive_session.`
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const designDocumentCandidate =
|
|
199
|
+
params.design_document ||
|
|
200
|
+
getApprovedDesignDocumentPath(projectRoot, params.session_id);
|
|
201
|
+
const resolvedDesignDocument = designDocumentCandidate
|
|
202
|
+
? materializeSessionDocument(projectRoot, designDocumentCandidate, 'design_document')
|
|
203
|
+
: null;
|
|
204
|
+
const resolvedImplementationPlan = resolveImplementationPlan(params, projectRoot);
|
|
205
|
+
|
|
206
|
+
const now = new Date().toISOString();
|
|
207
|
+
const state = {
|
|
208
|
+
session_id: params.session_id,
|
|
209
|
+
task: params.task,
|
|
210
|
+
created: now,
|
|
211
|
+
updated: now,
|
|
212
|
+
status: 'in_progress',
|
|
213
|
+
workflow_mode: params.workflow_mode || 'standard',
|
|
214
|
+
design_document: resolvedDesignDocument || null,
|
|
215
|
+
implementation_plan: resolvedImplementationPlan,
|
|
216
|
+
current_phase:
|
|
217
|
+
params.phases && params.phases.length > 0 ? params.phases[0].id : null,
|
|
218
|
+
total_phases: params.phases.length,
|
|
219
|
+
execution_mode: params.execution_mode || null,
|
|
220
|
+
execution_backend: 'native',
|
|
221
|
+
current_batch: null,
|
|
222
|
+
task_complexity: params.task_complexity || null,
|
|
223
|
+
token_usage: {
|
|
224
|
+
total_input: 0,
|
|
225
|
+
total_output: 0,
|
|
226
|
+
total_cached: 0,
|
|
227
|
+
by_agent: {},
|
|
228
|
+
},
|
|
229
|
+
phases: params.phases.map((phase) => ({
|
|
230
|
+
id: phase.id,
|
|
231
|
+
name: phase.name,
|
|
232
|
+
status: 'pending',
|
|
233
|
+
agents: phase.agent ? [phase.agent] : [],
|
|
234
|
+
parallel: phase.parallel || false,
|
|
235
|
+
started: null,
|
|
236
|
+
completed: null,
|
|
237
|
+
blocked_by: phase.blocked_by || [],
|
|
238
|
+
files_created: [],
|
|
239
|
+
files_modified: [],
|
|
240
|
+
files_deleted: [],
|
|
241
|
+
planned_files: phase.files || [],
|
|
242
|
+
downstream_context: createEmptyDownstreamContext(),
|
|
243
|
+
errors: [],
|
|
244
|
+
retry_count: 0,
|
|
245
|
+
})),
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
if (state.phases.length > 0) {
|
|
249
|
+
state.phases[0].status = 'in_progress';
|
|
250
|
+
state.phases[0].started = now;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
writeActiveSession(basePath, state, `# ${params.task} Orchestration Log\n`);
|
|
254
|
+
|
|
255
|
+
return {
|
|
256
|
+
success: true,
|
|
257
|
+
path: sessionPath,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function handleGetSessionStatus(_params, projectRoot) {
|
|
262
|
+
const session = readActiveSessionOrNull(projectRoot);
|
|
263
|
+
if (!session) {
|
|
264
|
+
return {
|
|
265
|
+
exists: false,
|
|
266
|
+
message: 'No active session found',
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const { state } = session;
|
|
271
|
+
return {
|
|
272
|
+
exists: true,
|
|
273
|
+
session_id: state.session_id,
|
|
274
|
+
status: state.status,
|
|
275
|
+
workflow_mode: state.workflow_mode || 'standard',
|
|
276
|
+
current_phase: state.current_phase,
|
|
277
|
+
total_phases: state.total_phases,
|
|
278
|
+
phases: (state.phases || []).map((phase) => ({
|
|
279
|
+
id: phase.id,
|
|
280
|
+
name: phase.name,
|
|
281
|
+
status: phase.status,
|
|
282
|
+
agent: (phase.agents || [])[0],
|
|
283
|
+
})),
|
|
284
|
+
task_complexity: state.task_complexity,
|
|
285
|
+
execution_mode: state.execution_mode,
|
|
286
|
+
current_batch: state.current_batch ?? null,
|
|
287
|
+
token_usage: state.token_usage,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function handleTransitionPhase(params, projectRoot) {
|
|
292
|
+
if (params.session_id) {
|
|
293
|
+
assertSessionId(params.session_id);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const hasNextPhaseId = params.next_phase_id != null;
|
|
297
|
+
const hasNextPhaseIds =
|
|
298
|
+
Array.isArray(params.next_phase_ids) && params.next_phase_ids.length > 0;
|
|
299
|
+
if (hasNextPhaseId && hasNextPhaseIds) {
|
|
300
|
+
throw new ValidationError(
|
|
301
|
+
'next_phase_id and next_phase_ids are mutually exclusive'
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const hasCompletedPhase = params.completed_phase_id != null;
|
|
306
|
+
if (!hasCompletedPhase && !hasNextPhaseIds && !hasNextPhaseId) {
|
|
307
|
+
throw new ValidationError(
|
|
308
|
+
'At least one of completed_phase_id, next_phase_id, or next_phase_ids is required'
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return withSessionState(projectRoot, ({ state }) => {
|
|
313
|
+
if (params.session_id && state.session_id !== params.session_id) {
|
|
314
|
+
throw new StateError(
|
|
315
|
+
`Session mismatch: active session is '${state.session_id}', got '${params.session_id}'`
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
let completedPhase;
|
|
320
|
+
if (hasCompletedPhase) {
|
|
321
|
+
completedPhase = state.phases.find(
|
|
322
|
+
(phase) => phase.id === params.completed_phase_id
|
|
323
|
+
);
|
|
324
|
+
if (!completedPhase) {
|
|
325
|
+
throw new NotFoundError(
|
|
326
|
+
`Phase ${params.completed_phase_id} not found in session state`
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
let nextPhase;
|
|
332
|
+
if (hasNextPhaseId) {
|
|
333
|
+
nextPhase = state.phases.find((phase) => phase.id === params.next_phase_id);
|
|
334
|
+
if (!nextPhase) {
|
|
335
|
+
throw new NotFoundError(
|
|
336
|
+
`next_phase_id ${params.next_phase_id} does not match any phase in session state`
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const phasesToStart = [];
|
|
342
|
+
if (hasNextPhaseIds) {
|
|
343
|
+
for (const id of params.next_phase_ids) {
|
|
344
|
+
const phase = state.phases.find((candidate) => candidate.id === id);
|
|
345
|
+
if (!phase) {
|
|
346
|
+
throw new NotFoundError(`Phase ${id} not found in session state`);
|
|
347
|
+
}
|
|
348
|
+
if (phase.status === 'completed' || phase.status === 'failed') {
|
|
349
|
+
throw new StateError(`Cannot start phase ${id}: status is '${phase.status}'`);
|
|
350
|
+
}
|
|
351
|
+
if (phase.status === 'pending') {
|
|
352
|
+
phasesToStart.push(phase);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (completedPhase) {
|
|
358
|
+
const filesCreated = params.files_created ?? [];
|
|
359
|
+
const filesModified = params.files_modified ?? [];
|
|
360
|
+
const filesDeleted = params.files_deleted ?? [];
|
|
361
|
+
const hasFiles =
|
|
362
|
+
filesCreated.length + filesModified.length + filesDeleted.length > 0;
|
|
363
|
+
const normalizedContext = normalizeDownstreamContext(params.downstream_context);
|
|
364
|
+
const contextProvided = isDownstreamContextPopulated(normalizedContext);
|
|
365
|
+
|
|
366
|
+
if (hasFiles && !contextProvided) {
|
|
367
|
+
throw new ValidationError(
|
|
368
|
+
`Phase ${completedPhase.id} produced files but downstream_context is empty after normalization. ${describeDownstreamContextShape()}`,
|
|
369
|
+
{
|
|
370
|
+
code: 'HANDOFF_INCOMPLETE',
|
|
371
|
+
details: {
|
|
372
|
+
phase_id: completedPhase.id,
|
|
373
|
+
files_created_count: filesCreated.length,
|
|
374
|
+
files_modified_count: filesModified.length,
|
|
375
|
+
files_deleted_count: filesDeleted.length,
|
|
376
|
+
received_downstream_context: params.downstream_context ?? null,
|
|
377
|
+
},
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
completedPhase.status = 'completed';
|
|
383
|
+
completedPhase.completed = new Date().toISOString();
|
|
384
|
+
completedPhase.downstream_context = normalizedContext;
|
|
385
|
+
completedPhase.files_created = filesCreated;
|
|
386
|
+
completedPhase.files_modified = filesModified;
|
|
387
|
+
completedPhase.files_deleted = filesDeleted;
|
|
388
|
+
completedPhase.requires_reconciliation =
|
|
389
|
+
!hasFiles && !contextProvided ? true : false;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
let startedPhaseIds;
|
|
393
|
+
if (hasNextPhaseIds) {
|
|
394
|
+
const now = new Date().toISOString();
|
|
395
|
+
startedPhaseIds = [];
|
|
396
|
+
for (const phase of phasesToStart) {
|
|
397
|
+
phase.status = 'in_progress';
|
|
398
|
+
phase.started = now;
|
|
399
|
+
startedPhaseIds.push(phase.id);
|
|
400
|
+
}
|
|
401
|
+
state.current_phase = params.next_phase_ids[0];
|
|
402
|
+
} else if (nextPhase) {
|
|
403
|
+
if (nextPhase.status === 'pending') {
|
|
404
|
+
nextPhase.status = 'in_progress';
|
|
405
|
+
nextPhase.started = new Date().toISOString();
|
|
406
|
+
}
|
|
407
|
+
state.current_phase = params.next_phase_id;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if (params.batch_id !== undefined) {
|
|
411
|
+
state.current_batch = params.batch_id;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (params.token_usage) {
|
|
415
|
+
state.token_usage.total_input += params.token_usage.input || 0;
|
|
416
|
+
state.token_usage.total_output += params.token_usage.output || 0;
|
|
417
|
+
state.token_usage.total_cached += params.token_usage.cached || 0;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
state.updated = new Date().toISOString();
|
|
421
|
+
|
|
422
|
+
const response = {
|
|
423
|
+
success: true,
|
|
424
|
+
session_state_summary: {
|
|
425
|
+
current_phase: state.current_phase,
|
|
426
|
+
completed_phases: state.phases
|
|
427
|
+
.filter((phase) => phase.status === 'completed')
|
|
428
|
+
.map((phase) => phase.id),
|
|
429
|
+
pending_phases: state.phases
|
|
430
|
+
.filter((phase) => phase.status === 'pending')
|
|
431
|
+
.map((phase) => phase.id),
|
|
432
|
+
},
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
if (startedPhaseIds) {
|
|
436
|
+
response.started_phase_ids = startedPhaseIds;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return { response, writeBack: true };
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
function handleArchiveSession(params, projectRoot) {
|
|
444
|
+
assertSessionId(params.session_id);
|
|
445
|
+
|
|
446
|
+
const session = readActiveSession(projectRoot);
|
|
447
|
+
const { state, basePath, sessionPath, content } = session;
|
|
448
|
+
|
|
449
|
+
if (state.session_id !== params.session_id) {
|
|
450
|
+
throw new StateError(
|
|
451
|
+
`Session mismatch: active session is '${state.session_id}', requested '${params.session_id}'`
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const pendingRec = (state.phases || []).find(
|
|
456
|
+
(phase) => phase.requires_reconciliation === true
|
|
457
|
+
);
|
|
458
|
+
if (pendingRec) {
|
|
459
|
+
throw new StateError(
|
|
460
|
+
`Phase ${pendingRec.id} requires reconciliation before archiving. Call scan_phase_changes or reconcile_phase to resolve.`,
|
|
461
|
+
{ code: 'RECONCILIATION_PENDING', details: { phase_id: pendingRec.id } }
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
state.status = 'completed';
|
|
466
|
+
state.updated = new Date().toISOString();
|
|
467
|
+
writeActiveSession(basePath, state, extractBody(content));
|
|
468
|
+
|
|
469
|
+
const archivePath = path.join(
|
|
470
|
+
basePath,
|
|
471
|
+
'state',
|
|
472
|
+
'archive',
|
|
473
|
+
`${params.session_id}.md`
|
|
474
|
+
);
|
|
475
|
+
fs.mkdirSync(path.dirname(archivePath), { recursive: true });
|
|
476
|
+
fs.renameSync(sessionPath, archivePath);
|
|
477
|
+
|
|
478
|
+
const archivedFiles = [archivePath];
|
|
479
|
+
const plansArchiveDir = path.join(basePath, 'plans', 'archive');
|
|
480
|
+
fs.mkdirSync(plansArchiveDir, { recursive: true });
|
|
481
|
+
|
|
482
|
+
const resolvedPlansDir = path.resolve(path.join(basePath, 'plans')) + path.sep;
|
|
483
|
+
const documentPaths = [state.design_document, state.implementation_plan].filter(
|
|
484
|
+
Boolean
|
|
485
|
+
);
|
|
486
|
+
|
|
487
|
+
for (const documentPath of documentPaths) {
|
|
488
|
+
const absoluteDocumentPath = path.resolve(
|
|
489
|
+
path.isAbsolute(documentPath)
|
|
490
|
+
? documentPath
|
|
491
|
+
: path.join(projectRoot, documentPath)
|
|
492
|
+
);
|
|
493
|
+
|
|
494
|
+
if (!absoluteDocumentPath.startsWith(resolvedPlansDir)) {
|
|
495
|
+
continue;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
if (fs.existsSync(absoluteDocumentPath)) {
|
|
499
|
+
const destinationPath = path.join(
|
|
500
|
+
plansArchiveDir,
|
|
501
|
+
path.basename(absoluteDocumentPath)
|
|
502
|
+
);
|
|
503
|
+
fs.renameSync(absoluteDocumentPath, destinationPath);
|
|
504
|
+
archivedFiles.push(destinationPath);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
removeDesignGate(projectRoot, params.session_id);
|
|
509
|
+
|
|
510
|
+
return {
|
|
511
|
+
success: true,
|
|
512
|
+
archive_path: archivePath,
|
|
513
|
+
archived_files: archivedFiles,
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
function handleUpdateSession(params, projectRoot) {
|
|
518
|
+
assertSessionId(params.session_id);
|
|
519
|
+
|
|
520
|
+
return withSessionState(projectRoot, ({ state }) => {
|
|
521
|
+
if (state.session_id !== params.session_id) {
|
|
522
|
+
throw new StateError(
|
|
523
|
+
`Session mismatch: active session is '${state.session_id}', got '${params.session_id}'`
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
const updatableFields = [
|
|
528
|
+
'execution_mode',
|
|
529
|
+
'execution_backend',
|
|
530
|
+
'current_batch',
|
|
531
|
+
];
|
|
532
|
+
const updatedFields = [];
|
|
533
|
+
|
|
534
|
+
for (const field of updatableFields) {
|
|
535
|
+
if (params[field] !== undefined) {
|
|
536
|
+
state[field] = params[field];
|
|
537
|
+
updatedFields.push(field);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
if (updatedFields.length === 0) {
|
|
542
|
+
throw new ValidationError(
|
|
543
|
+
'At least one updatable field (execution_mode, execution_backend, current_batch) is required'
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
state.updated = new Date().toISOString();
|
|
548
|
+
|
|
549
|
+
return {
|
|
550
|
+
response: { success: true, updated_fields: updatedFields },
|
|
551
|
+
writeBack: true,
|
|
552
|
+
};
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
module.exports = {
|
|
557
|
+
handleCreateSession,
|
|
558
|
+
handleGetSessionStatus,
|
|
559
|
+
handleTransitionPhase,
|
|
560
|
+
handleArchiveSession,
|
|
561
|
+
handleUpdateSession,
|
|
562
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
checkPlanShape,
|
|
5
|
+
checkPhaseCount,
|
|
6
|
+
checkDuplicateIds,
|
|
7
|
+
checkDanglingDependencies,
|
|
8
|
+
checkPhaseFieldSchema,
|
|
9
|
+
} = require('../validation/schema-checker');
|
|
10
|
+
const {
|
|
11
|
+
checkUnknownAgents,
|
|
12
|
+
checkAgentCapabilities,
|
|
13
|
+
} = require('../validation/agent-checker');
|
|
14
|
+
const {
|
|
15
|
+
computeDepths,
|
|
16
|
+
checkCycles,
|
|
17
|
+
checkRedundantDependencies,
|
|
18
|
+
buildParallelizationProfile,
|
|
19
|
+
} = require('../validation/dag-checker');
|
|
20
|
+
const { checkFileOverlap } = require('../validation/file-overlap-checker');
|
|
21
|
+
|
|
22
|
+
function handleValidatePlan(params) {
|
|
23
|
+
const { plan, task_complexity: taskComplexity } = params;
|
|
24
|
+
|
|
25
|
+
const shapeViolations = checkPlanShape(plan);
|
|
26
|
+
if (shapeViolations.length > 0) {
|
|
27
|
+
return {
|
|
28
|
+
valid: false,
|
|
29
|
+
violations: shapeViolations,
|
|
30
|
+
parallelization_profile: null,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const fieldViolations = checkPhaseFieldSchema(plan.phases);
|
|
35
|
+
if (fieldViolations.length > 0) {
|
|
36
|
+
return {
|
|
37
|
+
valid: false,
|
|
38
|
+
violations: fieldViolations,
|
|
39
|
+
parallelization_profile: null,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const phases = plan.phases;
|
|
44
|
+
const phaseById = new Map(phases.map((phase) => [phase.id, phase]));
|
|
45
|
+
|
|
46
|
+
const violations = [
|
|
47
|
+
...checkPhaseCount(phases, taskComplexity),
|
|
48
|
+
...checkDuplicateIds(phases),
|
|
49
|
+
...checkDanglingDependencies(phases),
|
|
50
|
+
...checkUnknownAgents(phases),
|
|
51
|
+
...checkAgentCapabilities(phases),
|
|
52
|
+
...checkCycles(phases, phaseById),
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
const hasCycleViolation = violations.some(
|
|
56
|
+
(violation) => violation.rule === 'cyclic_dependency'
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
let parallelization_profile = null;
|
|
60
|
+
if (!hasCycleViolation) {
|
|
61
|
+
const depths = computeDepths(phases, phaseById);
|
|
62
|
+
violations.push(...checkFileOverlap(phases, depths));
|
|
63
|
+
violations.push(...checkRedundantDependencies(phases, phaseById));
|
|
64
|
+
parallelization_profile = buildParallelizationProfile(phases, phaseById);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
valid: violations.every((violation) => violation.severity === 'warning'),
|
|
69
|
+
violations,
|
|
70
|
+
parallelization_profile,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = {
|
|
75
|
+
handleValidatePlan,
|
|
76
|
+
};
|