soloforge 1.1.38 → 1.1.42
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/CHANGELOG.md +149 -149
- package/README.md +130 -49
- package/dist/adapters/shared/workflow_template.js +1 -1
- package/dist/bin/commands/analyze.d.ts +7 -0
- package/dist/bin/commands/analyze.d.ts.map +1 -0
- package/dist/bin/commands/analyze.js +52 -0
- package/dist/bin/commands/analyze.js.map +1 -0
- package/dist/bin/commands/audit.d.ts.map +1 -1
- package/dist/bin/commands/audit.js +104 -83
- package/dist/bin/commands/audit.js.map +1 -1
- package/dist/bin/commands/check_bash.d.ts.map +1 -1
- package/dist/bin/commands/check_bash.js +38 -18
- package/dist/bin/commands/check_bash.js.map +1 -1
- package/dist/bin/commands/check_write.d.ts +10 -1
- package/dist/bin/commands/check_write.d.ts.map +1 -1
- package/dist/bin/commands/check_write.js +118 -95
- package/dist/bin/commands/check_write.js.map +1 -1
- package/dist/bin/commands/init.d.ts +2 -5
- package/dist/bin/commands/init.d.ts.map +1 -1
- package/dist/bin/commands/init.js +116 -137
- package/dist/bin/commands/init.js.map +1 -1
- package/dist/bin/commands/modify.d.ts +8 -0
- package/dist/bin/commands/modify.d.ts.map +1 -0
- package/dist/bin/commands/modify.js +88 -0
- package/dist/bin/commands/modify.js.map +1 -0
- package/dist/bin/commands/reasoning.d.ts +14 -0
- package/dist/bin/commands/reasoning.d.ts.map +1 -0
- package/dist/bin/commands/reasoning.js +158 -0
- package/dist/bin/commands/reasoning.js.map +1 -0
- package/dist/bin/commands/review.d.ts +8 -0
- package/dist/bin/commands/review.d.ts.map +1 -0
- package/dist/bin/commands/review.js +212 -0
- package/dist/bin/commands/review.js.map +1 -0
- package/dist/bin/commands/status.d.ts +6 -5
- package/dist/bin/commands/status.d.ts.map +1 -1
- package/dist/bin/commands/status.js +63 -120
- package/dist/bin/commands/status.js.map +1 -1
- package/dist/bin/commands/sync.d.ts +1 -1
- package/dist/bin/commands/sync.js +7 -7
- package/dist/bin/commands/sync.js.map +1 -1
- package/dist/bin/commands/validate.d.ts +4 -1
- package/dist/bin/commands/validate.d.ts.map +1 -1
- package/dist/bin/commands/validate.js +65 -95
- package/dist/bin/commands/validate.js.map +1 -1
- package/dist/bin/config_commands.d.ts +21 -20
- package/dist/bin/config_commands.d.ts.map +1 -1
- package/dist/bin/config_commands.js +209 -236
- package/dist/bin/config_commands.js.map +1 -1
- package/dist/bin/soloforge.js +42 -22
- package/dist/bin/soloforge.js.map +1 -1
- package/dist/engine/audit/evolver.d.ts.map +1 -1
- package/dist/engine/audit/evolver.js +0 -2
- package/dist/engine/audit/evolver.js.map +1 -1
- package/dist/engine/audit/governance_report.d.ts +9 -8
- package/dist/engine/audit/governance_report.d.ts.map +1 -1
- package/dist/engine/audit/governance_report.js +17 -16
- package/dist/engine/audit/governance_report.js.map +1 -1
- package/dist/engine/change_coordinator.d.ts.map +1 -1
- package/dist/engine/change_coordinator.js +1 -4
- package/dist/engine/change_coordinator.js.map +1 -1
- package/dist/engine/config/conflicts.d.ts +39 -0
- package/dist/engine/config/conflicts.d.ts.map +1 -0
- package/dist/engine/config/conflicts.js +79 -0
- package/dist/engine/config/conflicts.js.map +1 -0
- package/dist/engine/config/detector/blueprint.d.ts +25 -0
- package/dist/engine/config/detector/blueprint.d.ts.map +1 -0
- package/dist/engine/config/detector/blueprint.js +47 -0
- package/dist/engine/config/detector/blueprint.js.map +1 -0
- package/dist/engine/config/detector/fingerprint.d.ts +67 -0
- package/dist/engine/config/detector/fingerprint.d.ts.map +1 -0
- package/dist/engine/config/detector/fingerprint.js +160 -0
- package/dist/engine/config/detector/fingerprint.js.map +1 -0
- package/dist/engine/config/detector/framework_map.d.ts +89 -0
- package/dist/engine/config/detector/framework_map.d.ts.map +1 -0
- package/dist/engine/config/detector/framework_map.js +406 -0
- package/dist/engine/config/detector/framework_map.js.map +1 -0
- package/dist/engine/config/detector/index.d.ts +12 -0
- package/dist/engine/config/detector/index.d.ts.map +1 -0
- package/dist/engine/config/detector/index.js +12 -0
- package/dist/engine/config/detector/index.js.map +1 -0
- package/dist/engine/config/detector/verify.d.ts +32 -0
- package/dist/engine/config/detector/verify.d.ts.map +1 -0
- package/dist/engine/config/detector/verify.js +107 -0
- package/dist/engine/config/detector/verify.js.map +1 -0
- package/dist/engine/config/intent.d.ts +26 -0
- package/dist/engine/config/intent.d.ts.map +1 -0
- package/dist/engine/config/intent.js +81 -0
- package/dist/engine/config/intent.js.map +1 -0
- package/dist/engine/config/intent_schema.d.ts +873 -0
- package/dist/engine/config/intent_schema.d.ts.map +1 -0
- package/dist/engine/config/intent_schema.js +98 -0
- package/dist/engine/config/intent_schema.js.map +1 -0
- package/dist/engine/config/regression_matrix.d.ts.map +1 -1
- package/dist/engine/config/regression_matrix.js +19 -14
- package/dist/engine/config/regression_matrix.js.map +1 -1
- package/dist/engine/config/resolver.d.ts +136 -0
- package/dist/engine/config/resolver.d.ts.map +1 -0
- package/dist/engine/config/resolver.js +251 -0
- package/dist/engine/config/resolver.js.map +1 -0
- package/dist/engine/context_engine/bootstrap.d.ts +12 -0
- package/dist/engine/context_engine/bootstrap.d.ts.map +1 -0
- package/dist/engine/context_engine/bootstrap.js +28 -0
- package/dist/engine/context_engine/bootstrap.js.map +1 -0
- package/dist/engine/context_engine/companion_injector.d.ts +62 -0
- package/dist/engine/context_engine/companion_injector.d.ts.map +1 -0
- package/dist/engine/context_engine/companion_injector.js +350 -0
- package/dist/engine/context_engine/companion_injector.js.map +1 -0
- package/dist/engine/context_engine/context_resolver.d.ts +46 -0
- package/dist/engine/context_engine/context_resolver.d.ts.map +1 -0
- package/dist/engine/context_engine/context_resolver.js +139 -0
- package/dist/engine/context_engine/context_resolver.js.map +1 -0
- package/dist/engine/context_engine/index.d.ts +25 -0
- package/dist/engine/context_engine/index.d.ts.map +1 -0
- package/dist/engine/context_engine/index.js +25 -0
- package/dist/engine/context_engine/index.js.map +1 -0
- package/dist/engine/context_engine/view_registry.d.ts +45 -0
- package/dist/engine/context_engine/view_registry.d.ts.map +1 -0
- package/dist/engine/context_engine/view_registry.js +36 -0
- package/dist/engine/context_engine/view_registry.js.map +1 -0
- package/dist/engine/context_engine/views/change_impact.d.ts +34 -0
- package/dist/engine/context_engine/views/change_impact.d.ts.map +1 -0
- package/dist/engine/context_engine/views/change_impact.js +288 -0
- package/dist/engine/context_engine/views/change_impact.js.map +1 -0
- package/dist/engine/context_engine/views/coverage_gap.d.ts +45 -0
- package/dist/engine/context_engine/views/coverage_gap.d.ts.map +1 -0
- package/dist/engine/context_engine/views/coverage_gap.js +238 -0
- package/dist/engine/context_engine/views/coverage_gap.js.map +1 -0
- package/dist/engine/context_engine/views/dependency_graph.d.ts +45 -0
- package/dist/engine/context_engine/views/dependency_graph.d.ts.map +1 -0
- package/dist/engine/context_engine/views/dependency_graph.js +358 -0
- package/dist/engine/context_engine/views/dependency_graph.js.map +1 -0
- package/dist/engine/context_engine/views/file_impact.d.ts +46 -0
- package/dist/engine/context_engine/views/file_impact.d.ts.map +1 -0
- package/dist/engine/context_engine/views/file_impact.js +181 -0
- package/dist/engine/context_engine/views/file_impact.js.map +1 -0
- package/dist/engine/context_engine/views/knowledge_ref.d.ts +37 -0
- package/dist/engine/context_engine/views/knowledge_ref.d.ts.map +1 -0
- package/dist/engine/context_engine/views/knowledge_ref.js +264 -0
- package/dist/engine/context_engine/views/knowledge_ref.js.map +1 -0
- package/dist/engine/context_engine/views/reference_trace.d.ts +49 -0
- package/dist/engine/context_engine/views/reference_trace.d.ts.map +1 -0
- package/dist/engine/context_engine/views/reference_trace.js +227 -0
- package/dist/engine/context_engine/views/reference_trace.js.map +1 -0
- package/dist/engine/contracts/artifact_contract_registry.d.ts +1 -43
- package/dist/engine/contracts/artifact_contract_registry.d.ts.map +1 -1
- package/dist/engine/contracts/artifact_contract_registry.js +24 -100
- package/dist/engine/contracts/artifact_contract_registry.js.map +1 -1
- package/dist/engine/contracts/artifact_process_rules.d.ts.map +1 -1
- package/dist/engine/contracts/artifact_process_rules.js +0 -12
- package/dist/engine/contracts/artifact_process_rules.js.map +1 -1
- package/dist/engine/contracts/artifact_schema_registry.d.ts +2 -0
- package/dist/engine/contracts/artifact_schema_registry.d.ts.map +1 -1
- package/dist/engine/contracts/artifact_schema_registry.js +31 -25
- package/dist/engine/contracts/artifact_schema_registry.js.map +1 -1
- package/dist/engine/contracts/capability_registry.d.ts.map +1 -1
- package/dist/engine/contracts/capability_registry.js +2 -28
- package/dist/engine/contracts/capability_registry.js.map +1 -1
- package/dist/engine/contracts/contract_guard.js +8 -0
- package/dist/engine/contracts/contract_guard.js.map +1 -1
- package/dist/engine/contracts/contract_registry/builtin_contracts_core.d.ts.map +1 -1
- package/dist/engine/contracts/contract_registry/builtin_contracts_core.js +1 -19
- package/dist/engine/contracts/contract_registry/builtin_contracts_core.js.map +1 -1
- package/dist/engine/contracts/design_lifecycle_contract.d.ts.map +1 -1
- package/dist/engine/contracts/design_lifecycle_contract.js +14 -8
- package/dist/engine/contracts/design_lifecycle_contract.js.map +1 -1
- package/dist/engine/contracts/dual_layer_mechanism_registry/mechanisms_audit_tail.d.ts.map +1 -1
- package/dist/engine/contracts/dual_layer_mechanism_registry/mechanisms_audit_tail.js +0 -37
- package/dist/engine/contracts/dual_layer_mechanism_registry/mechanisms_audit_tail.js.map +1 -1
- package/dist/engine/contracts/dual_layer_mechanism_registry/mechanisms_infra.d.ts.map +1 -1
- package/dist/engine/contracts/dual_layer_mechanism_registry/mechanisms_infra.js +2 -78
- package/dist/engine/contracts/dual_layer_mechanism_registry/mechanisms_infra.js.map +1 -1
- package/dist/engine/contracts/dual_layer_mechanism_registry/shared.js +1 -1
- package/dist/engine/contracts/dual_layer_mechanism_registry/shared.js.map +1 -1
- package/dist/engine/contracts/error_path_verifier.js +2 -2
- package/dist/engine/contracts/error_path_verifier.js.map +1 -1
- package/dist/engine/contracts/first_principles.d.ts +47 -0
- package/dist/engine/contracts/first_principles.d.ts.map +1 -1
- package/dist/engine/contracts/first_principles.js +56 -0
- package/dist/engine/contracts/first_principles.js.map +1 -1
- package/dist/engine/contracts/mechanism_contract_registry/contracts-audit.d.ts +1 -1
- package/dist/engine/contracts/mechanism_contract_registry/contracts-audit.d.ts.map +1 -1
- package/dist/engine/contracts/mechanism_contract_registry/contracts-audit.js +2 -19
- package/dist/engine/contracts/mechanism_contract_registry/contracts-audit.js.map +1 -1
- package/dist/engine/contracts/mechanism_contract_registry/contracts-platform.d.ts +2 -2
- package/dist/engine/contracts/mechanism_contract_registry/contracts-platform.d.ts.map +1 -1
- package/dist/engine/contracts/mechanism_contract_registry/contracts-platform.js +4 -42
- package/dist/engine/contracts/mechanism_contract_registry/contracts-platform.js.map +1 -1
- package/dist/engine/contracts/project_knowledge_contract.d.ts +1 -0
- package/dist/engine/contracts/project_knowledge_contract.d.ts.map +1 -1
- package/dist/engine/contracts/project_knowledge_contract.js +5 -4
- package/dist/engine/contracts/project_knowledge_contract.js.map +1 -1
- package/dist/engine/contracts/slice_fix_loop.d.ts +86 -0
- package/dist/engine/contracts/slice_fix_loop.d.ts.map +1 -0
- package/dist/engine/contracts/slice_fix_loop.js +98 -0
- package/dist/engine/contracts/slice_fix_loop.js.map +1 -0
- package/dist/engine/contracts/state_machine_contracts.js +2 -2
- package/dist/engine/contracts/state_machine_contracts.js.map +1 -1
- package/dist/engine/contracts/tool_invocation_contract_registry.d.ts +29 -0
- package/dist/engine/contracts/tool_invocation_contract_registry.d.ts.map +1 -1
- package/dist/engine/contracts/tool_invocation_contract_registry.js +55 -2
- package/dist/engine/contracts/tool_invocation_contract_registry.js.map +1 -1
- package/dist/engine/contracts/user_promise.js +2 -2
- package/dist/engine/contracts/user_promise.js.map +1 -1
- package/dist/engine/core/errors.d.ts +1 -1
- package/dist/engine/core/errors.js +1 -1
- package/dist/engine/core/fail_closed.d.ts +39 -0
- package/dist/engine/core/fail_closed.d.ts.map +1 -0
- package/dist/engine/core/fail_closed.js +38 -0
- package/dist/engine/core/fail_closed.js.map +1 -0
- package/dist/engine/core/index.d.ts +3 -1
- package/dist/engine/core/index.d.ts.map +1 -1
- package/dist/engine/core/index.js +3 -1
- package/dist/engine/core/index.js.map +1 -1
- package/dist/engine/core/paths.d.ts +6 -4
- package/dist/engine/core/paths.d.ts.map +1 -1
- package/dist/engine/core/paths.js +8 -4
- package/dist/engine/core/paths.js.map +1 -1
- package/dist/engine/dependency_scanner.js +1 -1
- package/dist/engine/dependency_scanner.js.map +1 -1
- package/dist/engine/exploration.js +1 -1
- package/dist/engine/exploration.js.map +1 -1
- package/dist/engine/feasibility_checker.js +1 -1
- package/dist/engine/impact_analyzer.js +1 -1
- package/dist/engine/impact_analyzer.js.map +1 -1
- package/dist/engine/knowledge/knowledge_asset_audit.d.ts.map +1 -1
- package/dist/engine/knowledge/knowledge_asset_audit.js +1 -2
- package/dist/engine/knowledge/knowledge_asset_audit.js.map +1 -1
- package/dist/engine/knowledge/knowledge_asset_consumer.d.ts +8 -2
- package/dist/engine/knowledge/knowledge_asset_consumer.d.ts.map +1 -1
- package/dist/engine/knowledge/knowledge_asset_consumer.js +10 -7
- package/dist/engine/knowledge/knowledge_asset_consumer.js.map +1 -1
- package/dist/engine/knowledge/knowledge_asset_schema.d.ts +6 -2
- package/dist/engine/knowledge/knowledge_asset_schema.d.ts.map +1 -1
- package/dist/engine/knowledge/knowledge_asset_schema.js +3 -4
- package/dist/engine/knowledge/knowledge_asset_schema.js.map +1 -1
- package/dist/engine/knowledge/knowledge_consumption_snapshot.js +2 -2
- package/dist/engine/knowledge/knowledge_consumption_snapshot.js.map +1 -1
- package/dist/engine/knowledge/knowledge_health.d.ts.map +1 -1
- package/dist/engine/knowledge/knowledge_health.js +6 -4
- package/dist/engine/knowledge/knowledge_health.js.map +1 -1
- package/dist/engine/knowledge/knowledge_injection_boundary.d.ts +2 -1
- package/dist/engine/knowledge/knowledge_injection_boundary.d.ts.map +1 -1
- package/dist/engine/knowledge/knowledge_injection_boundary.js +35 -43
- package/dist/engine/knowledge/knowledge_injection_boundary.js.map +1 -1
- package/dist/engine/knowledge/knowledge_writer.js +1 -1
- package/dist/engine/pipeline/artifact_aliases.d.ts +56 -3
- package/dist/engine/pipeline/artifact_aliases.d.ts.map +1 -1
- package/dist/engine/pipeline/artifact_aliases.js +377 -24
- package/dist/engine/pipeline/artifact_aliases.js.map +1 -1
- package/dist/engine/pipeline/artifact_resolver.d.ts +82 -0
- package/dist/engine/pipeline/artifact_resolver.d.ts.map +1 -0
- package/dist/engine/pipeline/artifact_resolver.js +458 -0
- package/dist/engine/pipeline/artifact_resolver.js.map +1 -0
- package/dist/engine/pipeline/intent_expander/knowledge.js +4 -2
- package/dist/engine/pipeline/intent_expander/knowledge.js.map +1 -1
- package/dist/engine/pipeline/intent_expander/knowledge_resolution.d.ts +4 -4
- package/dist/engine/pipeline/intent_expander/knowledge_resolution.d.ts.map +1 -1
- package/dist/engine/pipeline/intent_expander/knowledge_resolution.js +1 -0
- package/dist/engine/pipeline/intent_expander/knowledge_resolution.js.map +1 -1
- package/dist/engine/pipeline/intent_expander/scope_acceptance.d.ts +2 -0
- package/dist/engine/pipeline/intent_expander/scope_acceptance.d.ts.map +1 -1
- package/dist/engine/pipeline/intent_expander/scope_acceptance.js +5 -1
- package/dist/engine/pipeline/intent_expander/scope_acceptance.js.map +1 -1
- package/dist/engine/pipeline/intent_expander/types.d.ts +1 -1
- package/dist/engine/pipeline/intent_expander/types.d.ts.map +1 -1
- package/dist/engine/pipeline/orchestrate_single_artifact.d.ts +185 -0
- package/dist/engine/pipeline/orchestrate_single_artifact.d.ts.map +1 -0
- package/dist/engine/pipeline/orchestrate_single_artifact.js +772 -0
- package/dist/engine/pipeline/orchestrate_single_artifact.js.map +1 -0
- package/dist/engine/pipeline/scope_lease.d.ts.map +1 -1
- package/dist/engine/pipeline/scope_lease.js +1 -3
- package/dist/engine/pipeline/scope_lease.js.map +1 -1
- package/dist/engine/pipeline/scope_resolver.js +2 -2
- package/dist/engine/pipeline/scope_resolver.js.map +1 -1
- package/dist/engine/pipeline/state_machine/audit_logger.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/audit_logger.js +7 -1
- package/dist/engine/pipeline/state_machine/audit_logger.js.map +1 -1
- package/dist/engine/pipeline/state_machine/certainty_gate.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/certainty_gate.js +202 -15
- package/dist/engine/pipeline/state_machine/certainty_gate.js.map +1 -1
- package/dist/engine/pipeline/state_machine/command_state_verifier.js +1 -1
- package/dist/engine/pipeline/state_machine/command_state_verifier.js.map +1 -1
- package/dist/engine/pipeline/state_machine/hook_classifier.d.ts +14 -1
- package/dist/engine/pipeline/state_machine/hook_classifier.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/hook_classifier.js +35 -12
- package/dist/engine/pipeline/state_machine/hook_classifier.js.map +1 -1
- package/dist/engine/pipeline/state_machine/pipeline_state_machine.d.ts +7 -15
- package/dist/engine/pipeline/state_machine/pipeline_state_machine.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/pipeline_state_machine.js +202 -102
- package/dist/engine/pipeline/state_machine/pipeline_state_machine.js.map +1 -1
- package/dist/engine/pipeline/state_machine/sf_command_parser.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/sf_command_parser.js +24 -18
- package/dist/engine/pipeline/state_machine/sf_command_parser.js.map +1 -1
- package/dist/engine/pipeline/state_machine/stage_command_registry.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/stage_command_registry.js +7 -0
- package/dist/engine/pipeline/state_machine/stage_command_registry.js.map +1 -1
- package/dist/engine/pipeline/state_machine/stage_executor.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/stage_executor.js +5 -11
- package/dist/engine/pipeline/state_machine/stage_executor.js.map +1 -1
- package/dist/engine/pipeline/state_machine/state_self_diagnostic.js +3 -3
- package/dist/engine/pipeline/state_machine/state_self_diagnostic.js.map +1 -1
- package/dist/engine/pipeline/state_machine/static_route_table.d.ts +2 -0
- package/dist/engine/pipeline/state_machine/static_route_table.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/static_route_table.js +2 -0
- package/dist/engine/pipeline/state_machine/static_route_table.js.map +1 -1
- package/dist/engine/pipeline/state_machine/uncertainty_bridge.d.ts +25 -0
- package/dist/engine/pipeline/state_machine/uncertainty_bridge.d.ts.map +1 -1
- package/dist/engine/pipeline/state_machine/uncertainty_bridge.js +18 -0
- package/dist/engine/pipeline/state_machine/uncertainty_bridge.js.map +1 -1
- package/dist/engine/pipeline/target_classifier.d.ts +48 -0
- package/dist/engine/pipeline/target_classifier.d.ts.map +1 -0
- package/dist/engine/pipeline/target_classifier.js +129 -0
- package/dist/engine/pipeline/target_classifier.js.map +1 -0
- package/dist/engine/pipeline/task_context/manager.js.map +1 -1
- package/dist/engine/pipeline/task_context/manager_setters.js +1 -1
- package/dist/engine/pipeline/task_context/manager_setters.js.map +1 -1
- package/dist/engine/pipeline/task_planner.d.ts.map +1 -1
- package/dist/engine/pipeline/task_planner.js +2 -2
- package/dist/engine/pipeline/task_planner.js.map +1 -1
- package/dist/engine/release/foundation_scenario_registry.js +3 -3
- package/dist/engine/release/foundation_scenario_registry.js.map +1 -1
- package/dist/engine/release/gate_checks/checkControlPlaneTrust.d.ts.map +1 -1
- package/dist/engine/release/gate_checks/checkControlPlaneTrust.js +1 -0
- package/dist/engine/release/gate_checks/checkControlPlaneTrust.js.map +1 -1
- package/dist/engine/release/gate_checks/checkKnowledgeAssetSchemaP0.js +1 -1
- package/dist/engine/release/gate_checks/checkKnowledgeAssetSchemaP0.js.map +1 -1
- package/dist/engine/release/gate_checks/checkWorkflowNavigation.d.ts.map +1 -1
- package/dist/engine/release/gate_checks/checkWorkflowNavigation.js +27 -60
- package/dist/engine/release/gate_checks/checkWorkflowNavigation.js.map +1 -1
- package/dist/engine/release/release_gate_scenario_registry.js +9 -9
- package/dist/engine/release/release_gate_scenario_registry.js.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/scenarios_architecture_workshop.js +17 -17
- package/dist/engine/release/release_issue_scenario_registry/scenarios_architecture_workshop.js.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/scenarios_code_observability.js +3 -3
- package/dist/engine/release/release_issue_scenario_registry/scenarios_code_observability.js.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/scenarios_decision_workshop.js +18 -18
- package/dist/engine/release/release_issue_scenario_registry/scenarios_decision_workshop.js.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/scenarios_design_pack.js +10 -10
- package/dist/engine/release/release_issue_scenario_registry/scenarios_design_pack.js.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/scenarios_template_contract.js +3 -3
- package/dist/engine/release/release_issue_scenario_registry/scenarios_template_contract.js.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/scenarios_template_visibility.js +13 -13
- package/dist/engine/release/release_issue_scenario_registry/scenarios_template_visibility.js.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/workshop_helpers.d.ts +1 -1
- package/dist/engine/release/release_issue_scenario_registry/workshop_helpers.d.ts.map +1 -1
- package/dist/engine/release/release_issue_scenario_registry/workshop_helpers.js +14 -3
- package/dist/engine/release/release_issue_scenario_registry/workshop_helpers.js.map +1 -1
- package/dist/engine/retention_policy.js +1 -1
- package/dist/engine/retention_policy.js.map +1 -1
- package/dist/engine/templates/asset_manifest.d.ts.map +1 -1
- package/dist/engine/templates/asset_manifest.js +1 -0
- package/dist/engine/templates/asset_manifest.js.map +1 -1
- package/dist/engine/templates/consumable_asset_registry/builtin_assets_core.js +2 -2
- package/dist/engine/templates/consumable_asset_registry/builtin_assets_core.js.map +1 -1
- package/dist/engine/templates/consumable_asset_registry/builtin_assets_dual_layer_core.d.ts.map +1 -1
- package/dist/engine/templates/consumable_asset_registry/builtin_assets_dual_layer_core.js +2 -22
- package/dist/engine/templates/consumable_asset_registry/builtin_assets_dual_layer_core.js.map +1 -1
- package/dist/engine/templates/consumption_trace_store.js +2 -2
- package/dist/engine/templates/consumption_trace_store.js.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/artifacts_shared_part2.js +1 -1
- package/dist/engine/templates/explicit_asset_registry/artifacts_shared_part2.js.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/gates.d.ts.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/gates.js +50 -0
- package/dist/engine/templates/explicit_asset_registry/gates.js.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/procedures_part1.d.ts.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/procedures_part1.js +16 -0
- package/dist/engine/templates/explicit_asset_registry/procedures_part1.js.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/procedures_part2.d.ts.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/procedures_part2.js +35 -2
- package/dist/engine/templates/explicit_asset_registry/procedures_part2.js.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/rules_pipeline.d.ts.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/rules_pipeline.js +16 -0
- package/dist/engine/templates/explicit_asset_registry/rules_pipeline.js.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/rules_shared.d.ts.map +1 -1
- package/dist/engine/templates/explicit_asset_registry/rules_shared.js +310 -0
- package/dist/engine/templates/explicit_asset_registry/rules_shared.js.map +1 -1
- package/dist/engine/templates/workflow_rule_generator.d.ts +1 -1
- package/dist/engine/templates/workflow_rule_generator.js +2 -2
- package/dist/engine/workflow/next_action_planner.d.ts.map +1 -1
- package/dist/engine/workflow/next_action_planner.js +21 -27
- package/dist/engine/workflow/next_action_planner.js.map +1 -1
- package/dist/engine/workflow/project_stage_detector.d.ts.map +1 -1
- package/dist/engine/workflow/project_stage_detector.js +6 -4
- package/dist/engine/workflow/project_stage_detector.js.map +1 -1
- package/dist/git/git_deps.d.ts +1 -0
- package/dist/git/git_deps.d.ts.map +1 -1
- package/dist/git/operations.d.ts +1 -0
- package/dist/git/operations.d.ts.map +1 -1
- package/dist/git/operations.js +2 -0
- package/dist/git/operations.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/knowledge/conflict_detector.d.ts.map +1 -1
- package/dist/knowledge/conflict_detector.js +13 -2
- package/dist/knowledge/conflict_detector.js.map +1 -1
- package/dist/knowledge/health_checker.d.ts.map +1 -1
- package/dist/knowledge/health_checker.js +5 -3
- package/dist/knowledge/health_checker.js.map +1 -1
- package/dist/knowledge/index_manager.d.ts +15 -0
- package/dist/knowledge/index_manager.d.ts.map +1 -1
- package/dist/knowledge/index_manager.js +106 -6
- package/dist/knowledge/index_manager.js.map +1 -1
- package/dist/knowledge/loader.d.ts +8 -4
- package/dist/knowledge/loader.d.ts.map +1 -1
- package/dist/knowledge/loader.js +189 -34
- package/dist/knowledge/loader.js.map +1 -1
- package/dist/knowledge/writer.js +2 -2
- package/dist/knowledge/writer.js.map +1 -1
- package/dist/server/tools/cep_assessment.d.ts +6 -0
- package/dist/server/tools/cep_assessment.d.ts.map +1 -1
- package/dist/server/tools/cep_assessment.js +23 -0
- package/dist/server/tools/cep_assessment.js.map +1 -1
- package/dist/server/tools/index.d.ts.map +1 -1
- package/dist/server/tools/index.js +11 -9
- package/dist/server/tools/index.js.map +1 -1
- package/dist/server/tools/lazy_loaders.d.ts +1 -1
- package/dist/server/tools/lazy_loaders.d.ts.map +1 -1
- package/dist/server/tools/lazy_loaders.js +2 -1
- package/dist/server/tools/lazy_loaders.js.map +1 -1
- package/dist/server/tools/middleware.d.ts +2 -0
- package/dist/server/tools/middleware.d.ts.map +1 -1
- package/dist/server/tools/middleware.js +100 -7
- package/dist/server/tools/middleware.js.map +1 -1
- package/dist/server/tools/schemas.d.ts +4 -4
- package/dist/server/tools/tool_groups/admin.d.ts.map +1 -1
- package/dist/server/tools/tool_groups/admin.js +13 -16
- package/dist/server/tools/tool_groups/admin.js.map +1 -1
- package/dist/server/tools/tool_groups/knowledge.js +2 -2
- package/dist/server/tools/tool_groups/knowledge.js.map +1 -1
- package/dist/server/tools/tool_groups/product_operations.d.ts +11 -0
- package/dist/server/tools/tool_groups/product_operations.d.ts.map +1 -0
- package/dist/server/tools/tool_groups/product_operations.js +43 -0
- package/dist/server/tools/tool_groups/product_operations.js.map +1 -0
- package/dist/server/tools/tool_groups/state_machine.d.ts +34 -3
- package/dist/server/tools/tool_groups/state_machine.d.ts.map +1 -1
- package/dist/server/tools/tool_groups/state_machine.js +812 -56
- package/dist/server/tools/tool_groups/state_machine.js.map +1 -1
- package/dist/server/tools/tool_names.d.ts +2 -1
- package/dist/server/tools/tool_names.d.ts.map +1 -1
- package/dist/server/tools/tool_names.js +4 -1
- package/dist/server/tools/tool_names.js.map +1 -1
- package/dist/types/knowledge.d.ts +2 -4
- package/dist/types/knowledge.d.ts.map +1 -1
- package/dist/types/knowledge.js.map +1 -1
- package/dist/types/pipeline.d.ts +4 -3
- package/dist/types/pipeline.d.ts.map +1 -1
- package/dist/types/state_machine.d.ts +46 -4
- package/dist/types/state_machine.d.ts.map +1 -1
- package/dist/types/state_machine.js +1 -1
- package/dist/types/state_machine.js.map +1 -1
- package/package.json +14 -14
- package/templates/artifacts/existing-system//344/270/200/351/224/256/345/274/200/345/205/263/351/205/215/347/275/256/346/250/241/347/211/210.json +24 -2
- package/templates/artifacts/existing-system//345/216/206/345/217/262/346/225/260/346/215/256/346/270/205/346/264/227/350/204/232/346/234/254/346/250/241/347/211/210.md +12 -5
- package/templates/artifacts/existing-system//345/216/206/345/217/262/351/201/227/347/225/231/351/233/267/345/214/272/346/270/205/345/215/225/346/250/241/347/211/210.md +25 -21
- package/templates/artifacts/existing-system//345/220/221/345/220/216/345/205/274/345/256/271/346/200/247/345/220/210/350/247/204/346/212/245/345/221/212/346/250/241/347/211/210.md +26 -14
- package/templates/artifacts/existing-system//345/242/236/351/207/217/350/276/271/347/225/214/347/225/214/345/256/232/346/226/207/346/241/243/346/250/241/347/211/210.md +22 -14
- package/templates/artifacts/existing-system//346/224/271/351/200/240/345/275/261/345/223/215/350/214/203/345/233/264/350/257/204/344/274/260/346/250/241/347/211/210.md +19 -6
- package/templates/artifacts/existing-system//346/225/260/346/215/256/350/241/200/347/274/230/345/233/276/346/250/241/347/211/210.md +16 -6
- package/templates/artifacts/existing-system//346/226/260/350/200/201/351/200/273/350/276/221/346/257/224/345/257/271/346/227/245/345/277/227/346/250/241/347/211/210.md +11 -6
- package/templates/artifacts/existing-system//347/264/247/346/200/245/345/233/236/346/273/232/346/211/213/345/206/214/346/250/241/347/211/210.md +49 -13
- package/templates/artifacts/existing-system//351/232/224/347/246/273/351/200/202/351/205/215/345/231/250/346/226/271/346/241/210/346/250/241/347/211/210.md +14 -7
- package/templates/artifacts/shared/ADR/346/250/241/347/211/210.md +17 -5
- package/templates/artifacts/shared/API/346/216/245/345/217/243/350/247/204/346/240/274/346/226/207/346/241/243/346/250/241/347/211/210.md +34 -73
- package/templates/artifacts/shared/Bug/345/210/206/346/236/220/346/250/241/347/211/210.md +2 -10
- package/templates/artifacts/shared/OOD/350/256/276/350/256/241/346/221/230/350/246/201/346/250/241/347/211/210.md +2 -8
- package/templates/artifacts/shared/POC/347/273/223/350/256/272/346/250/241/347/211/210.md +2 -10
- package/templates/artifacts/shared//344/273/243/347/240/201/345/256/241/346/237/245/346/212/245/345/221/212/346/250/241/347/211/210.md +47 -10
- package/templates/artifacts/shared//344/273/243/347/240/201/346/263/250/351/207/212/344/270/216/346/227/245/345/277/227/351/252/214/346/224/266/346/250/241/347/211/210.md +2 -8
- package/templates/artifacts/shared//345/210/207/347/211/207/350/256/241/345/210/222/346/250/241/347/211/210.md +126 -17
- package/templates/artifacts/shared//345/211/215/347/253/257/351/241/265/351/235/242/351/252/214/346/224/266/346/270/205/345/215/225.md +2 -14
- package/templates/artifacts/shared//345/216/237/345/236/213/350/257/264/346/230/216/346/250/241/347/211/210.md +118 -226
- package/templates/artifacts/shared//345/220/216/347/253/257API/351/252/214/346/224/266/346/270/205/345/215/225.md +2 -13
- package/templates/artifacts/shared//345/220/216/347/253/257/345/256/236/347/216/260/351/252/214/346/224/266/346/270/205/345/215/225.md +11 -10
- package/templates/artifacts/shared//345/256/211/345/205/250/345/256/241/350/256/241/346/250/241/347/211/210.md +8 -33
- package/templates/artifacts/shared//345/256/241/346/237/245/346/221/230/350/246/201.md +10 -15
- package/templates/artifacts/shared//346/200/247/350/203/275/345/210/206/346/236/220/346/250/241/347/211/210.md +2 -10
- package/templates/artifacts/shared//346/212/200/346/234/257/351/200/211/345/236/213/351/252/214/346/224/266/346/270/205/345/215/225.md +2 -13
- package/templates/artifacts/shared//346/216/245/345/217/243/345/257/271/346/216/245/346/226/271/346/241/210/346/250/241/347/211/210.md +54 -20
- package/templates/artifacts/shared//346/225/205/351/232/234/345/244/215/347/233/230/346/250/241/347/211/210.md +2 -11
- package/templates/artifacts/shared//346/225/260/346/215/256/345/272/223/345/217/230/346/233/264/346/226/271/346/241/210/346/250/241/347/211/210.md +43 -31
- package/templates/artifacts/shared//346/225/260/346/215/256/345/272/223/345/217/230/346/233/264/351/252/214/346/224/266/346/270/205/345/215/225.md +2 -15
- package/templates/artifacts/shared//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/346/226/207/346/241/243/346/250/241/347/211/210.md +123 -44
- package/templates/artifacts/shared//346/236/266/346/236/204/350/256/276/350/256/241/346/250/241/347/211/210.md +113 -76
- package/templates/artifacts/shared//346/265/213/350/257/225/350/256/241/345/210/222/346/250/241/347/211/210.md +27 -18
- package/templates/artifacts/shared//350/256/276/350/256/241/344/270/200/350/207/264/346/200/247/351/252/214/346/224/266/346/212/245/345/221/212/346/250/241/347/211/210.md +7 -29
- package/templates/artifacts/shared//350/257/246/347/273/206/350/256/276/350/256/241/346/250/241/347/211/210.md +83 -30
- package/templates/artifacts/shared//350/277/201/347/247/273/350/257/204/344/274/260/346/250/241/347/211/210.md +15 -12
- package/templates/artifacts/shared//351/200/232/347/224/250/350/264/250/351/207/217/351/252/214/346/224/266/346/270/205/345/215/225.md +157 -36
- package/templates/artifacts/shared//351/207/215/346/236/204/346/226/271/346/241/210/346/250/241/347/211/210.md +2 -10
- package/templates/artifacts/shared//351/234/200/346/261/202/345/210/206/346/236/220/346/250/241/347/211/210.md +74 -15
- package/templates/artifacts/shared//351/234/200/346/261/202/345/216/237/345/236/213/350/256/276/350/256/241/345/256/236/347/216/260/350/277/275/350/270/252/347/237/251/351/230/265/346/250/241/347/211/210.md +45 -52
- package/templates/checklists//344/270/273/351/223/276/350/267/257/346/216/245/345/205/245/351/252/214/346/224/266/346/270/205/345/215/225.md +1 -7
- package/templates/checklists//344/274/232/350/257/235/346/201/242/345/244/215.md +2 -12
- package/templates/checklists//345/267/245/344/275/234/346/265/201/351/252/214/346/224/266/346/270/205/345/215/225.md +1 -7
- package/templates/checklists//346/240/270/345/277/203/345/267/245/347/250/213/346/211/247/350/241/214/351/252/214/346/224/266/346/270/205/345/215/225.md +1 -7
- package/templates/checklists//347/237/245/350/257/206/346/263/250/345/205/245/351/252/214/346/224/266/346/270/205/345/215/225.md +1 -7
- package/templates/checklists//351/232/220/347/247/201/345/256/241/346/237/245/346/270/205/345/215/225.md +1 -7
- package/templates/checklists//351/252/214/350/257/201/351/252/214/346/224/266/346/270/205/345/215/225.md +1 -7
- package/templates/domain//345/244/232/347/247/237/346/210/267.md +1 -13
- package/templates/domain//345/256/241/350/256/241/346/227/245/345/277/227.md +1 -12
- package/templates/domain//345/257/274/345/205/245/345/257/274/345/207/272/350/247/204/345/210/231.md +1 -14
- package/templates/domain//345/267/245/344/275/234/346/265/201/345/274/225/346/223/216.md +1 -17
- package/templates/domain//346/212/245/350/241/250/347/273/237/350/256/241.md +1 -15
- package/templates/domain//346/224/257/344/273/230/350/247/204/345/210/231.md +1 -16
- package/templates/domain//346/225/260/346/215/256/346/235/203/351/231/220.md +1 -13
- package/templates/domain//351/200/232/347/224/250/346/234/272/346/242/260/346/235/241/346/254/276.md +1 -15
- package/templates/domain//351/200/232/347/237/245/350/247/204/345/210/231.md +1 -15
- package/templates/gates/existing-system/gate-/346/236/266/346/236/204/350/256/276/350/256/241.yaml +13 -14
- package/templates/gates/existing-system/gate-/347/216/260/346/234/211/347/263/273/347/273/237/345/210/206/346/236/220.yaml +48 -0
- package/templates/gates/existing-system/gate-/347/274/226/347/240/201/344/270/216/345/215/225/345/205/203/346/265/213/350/257/225.yaml +41 -8
- package/templates/gates/existing-system/gate-/350/257/225/350/277/220/350/241/214.yaml +30 -12
- package/templates/gates/existing-system/gate-/350/257/246/347/273/206/350/256/276/350/256/241.yaml +25 -15
- package/templates/gates/shared/gate-/344/272/244/344/273/230.yaml +26 -8
- package/templates/gates/shared/gate-/344/273/243/347/240/201/345/256/241/346/237/245.yaml +54 -8
- package/templates/gates/shared/gate-/344/273/273/345/212/241/350/247/204/345/210/222.yaml +131 -5
- package/templates/gates/shared/gate-/345/210/207/347/211/207/345/256/241/346/237/245.yaml +62 -0
- package/templates/gates/shared/gate-/345/210/207/347/211/207/346/211/247/350/241/214.yaml +51 -0
- package/templates/gates/shared/gate-/345/217/221/345/270/203/345/220/216/350/247/202/345/257/237.yaml +40 -8
- package/templates/gates/shared/gate-/345/256/211/345/205/250/345/256/241/350/256/241.yaml +77 -0
- package/templates/gates/shared/gate-/346/236/266/346/236/204/350/256/276/350/256/241.yaml +136 -9
- package/templates/gates/shared/gate-/347/274/226/347/240/201/344/270/216/345/215/225/345/205/203/346/265/213/350/257/225.yaml +30 -4
- package/templates/gates/shared/gate-/347/274/226/347/240/201/345/207/206/345/244/207.yaml +40 -4
- package/templates/gates/shared/gate-/347/274/226/347/240/201/345/256/236/347/216/260.yaml +54 -4
- package/templates/gates/shared/gate-/347/274/226/347/240/201/351/252/214/350/257/201.yaml +33 -4
- package/templates/gates/shared/gate-/350/201/224/350/260/203/351/252/214/350/257/201.yaml +47 -8
- package/templates/gates/shared/gate-/350/257/246/347/273/206/350/256/276/350/256/241.yaml +118 -9
- package/templates/gates/shared/gate-/351/234/200/346/261/202/345/210/206/346/236/220.yaml +154 -8
- package/templates/internal/patterns/Diff/345/275/222/345/261/236/350/277/275/350/270/252.md +1 -10
- package/templates/internal/patterns/Hook/345/261/202/344/272/247/347/211/251/347/273/223/346/236/204/346/240/241/351/252/214.md +2 -6
- package/templates/internal/patterns/Java/350/264/250/351/207/217/351/227/250/347/246/201.md +1 -11
- package/templates/internal/patterns/LLM/351/242/204/347/256/227/347/275/221/345/205/263.md +1 -10
- package/templates/internal/patterns//344/272/247/347/211/251Schema/346/263/250/345/206/214/344/270/255/345/277/203.md +1 -5
- package/templates/internal/patterns//344/273/273/345/212/241/344/270/212/344/270/213/346/226/207/347/224/237/345/221/275/345/221/250/346/234/237.md +1 -10
- package/templates/internal/patterns//344/273/273/345/212/241/347/256/241/347/220/206/345/231/250.md +1 -11
- package/templates/internal/patterns//344/275/234/347/224/250/345/237/237/344/270/216/345/257/206/351/222/245/346/213/246/346/210/252.md +1 -10
- package/templates/internal/patterns//344/275/234/347/224/250/345/237/237/347/247/237/347/272/246.md +1 -11
- package/templates/internal/patterns//345/206/262/347/252/201/351/227/250/347/246/201.md +1 -10
- package/templates/internal/patterns//345/206/263/347/255/226/347/275/221/345/205/263.md +1 -12
- package/templates/internal/patterns//345/210/206/345/234/272/346/231/257/350/277/207/347/250/213/350/247/204/345/210/231.md +1 -5
- package/templates/internal/patterns//345/217/230/345/274/202/345/256/241/350/256/241.md +1 -11
- package/templates/internal/patterns//345/233/236/345/275/222/347/237/251/351/230/265.md +1 -10
- package/templates/internal/patterns//345/267/245/344/275/234/345/214/272/344/272/222/346/226/245/351/224/201.md +1 -10
- package/templates/internal/patterns//345/267/245/344/275/234/345/214/272/345/224/244/351/206/222.md +1 -10
- package/templates/internal/patterns//345/271/266/345/217/221/351/224/201.md +1 -12
- package/templates/internal/patterns//345/274/200/345/217/221/350/200/205/345/256/252/346/263/225.md +1 -12
- package/templates/internal/patterns//346/225/217/346/204/237/344/277/241/346/201/257/346/211/253/346/217/217.md +1 -10
- package/templates/internal/patterns//346/250/241/347/211/210Frontmatter/350/247/243/346/236/220.md +1 -5
- package/templates/internal/patterns//346/262/273/347/220/206/350/277/220/350/241/214/346/227/266/345/276/252/347/216/257.md +1 -11
- package/templates/internal/patterns//346/265/201/345/274/217/345/277/203/350/267/263.md +2 -12
- package/templates/internal/patterns//347/237/245/350/257/206/344/270/273/346/235/203.md +1 -11
- package/templates/internal/patterns//350/257/255/344/271/211/350/257/201/346/215/256.md +1 -10
- package/templates/internal/patterns//350/277/220/350/241/214/345/256/211/345/205/250/345/214/205.md +1 -11
- package/templates/internal/patterns//351/252/214/350/257/201/345/221/275/344/273/244/347/224/237/346/210/220.md +4 -12
- package/templates/internal/rules/OOD/344/270/216SOLID/350/256/276/350/256/241/350/247/204/345/210/231.md +0 -12
- package/templates/internal/rules//344/272/247/347/211/251/345/245/221/347/272/246/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//344/273/243/347/240/201/346/263/250/351/207/212/344/270/216/346/227/245/345/277/227/345/245/221/347/272/246/350/247/204/345/210/231.md +3 -28
- package/templates/internal/rules//344/273/273/345/212/241/344/270/212/344/270/213/346/226/207/347/224/237/345/221/275/345/221/250/346/234/237/350/247/204/345/210/231.md +0 -9
- package/templates/internal/rules//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213/345/245/221/347/272/246/350/247/204/345/210/231.md +0 -12
- package/templates/internal/rules//345/221/275/344/273/244/346/211/247/350/241/214/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//345/221/275/344/273/244/350/267/257/347/224/261/350/247/204/345/210/231.md +0 -6
- package/templates/internal/rules//345/267/245/344/275/234/346/265/201/345/245/221/347/272/246/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//345/267/245/344/275/234/346/265/201/345/257/274/350/210/252/345/245/221/347/272/246/350/247/204/345/210/231.md +9 -19
- package/templates/internal/rules//345/267/245/344/275/234/346/265/201/346/250/241/347/211/210/345/214/205/350/247/204/345/210/231.md +0 -7
- package/templates/internal/rules//345/267/245/345/205/267/350/260/203/347/224/250/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//346/204/217/345/233/276/350/267/257/347/224/261/350/247/204/345/210/231.md +2 -8
- package/templates/internal/rules//346/211/247/350/241/214/345/256/210/345/215/253/350/257/204/344/274/260/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//346/211/251/345/261/225/347/224/237/345/221/275/345/221/250/346/234/237/350/247/204/345/210/231.md +0 -7
- package/templates/internal/rules//346/212/200/346/234/257/345/206/263/347/255/226/344/270/273/346/235/203/350/247/204/345/210/231.md +0 -10
- package/templates/internal/rules//346/225/217/346/204/237/344/277/241/346/201/257/345/244/204/347/220/206/350/247/204/345/210/231.md +4 -18
- package/templates/internal/rules//346/226/275/345/267/245/346/214/207/344/273/244/345/245/221/347/272/246/350/247/204/345/210/231.md +0 -8
- package/templates/internal/rules//346/227/245/345/277/227/346/262/273/347/220/206/350/247/204/345/210/231.md +0 -11
- package/templates/internal/rules//346/234/272/345/210/266/350/207/252/346/262/273/347/220/206/350/247/204/345/210/231.md +0 -11
- package/templates/internal/rules//346/236/266/346/236/204/345/206/263/347/255/226/347/240/224/350/256/250/350/247/204/345/210/231.md +4 -6
- package/templates/internal/rules//346/240/207/345/207/206/350/265/204/344/272/247/350/246/206/347/233/226/350/247/204/345/210/231.md +0 -10
- package/templates/internal/rules//346/240/270/345/277/203/344/275/223/351/252/214/345/216/237/345/210/231.md +1 -8
- package/templates/internal/rules//346/240/270/345/277/203/345/267/245/347/250/213/346/211/247/350/241/214/345/216/237/345/210/231.md +2 -8
- package/templates/internal/rules//346/250/241/347/211/210Frontmatter/350/247/204/350/214/203.md +85 -64
- package/templates/internal/rules//346/250/241/347/211/210/350/265/204/344/272/247/345/217/257/350/247/201/346/200/247/350/247/204/345/210/231.md +0 -11
- package/templates/internal/rules//346/263/250/345/206/214/350/241/250/345/237/272/347/241/200/350/256/276/346/226/275/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//346/274/224/350/277/233/345/233/236/345/275/222/351/227/250/346/216/247/350/247/204/345/210/231.md +0 -13
- package/templates/internal/rules//347/224/250/346/210/267/345/217/215/351/246/210/345/245/221/347/272/246/350/247/204/345/210/231.md +1 -17
- package/templates/internal/rules//347/237/245/350/257/206/346/262/273/347/220/206/350/247/204/345/210/231.md +0 -11
- package/templates/internal/rules//347/237/245/350/257/206/346/263/250/345/205/245/350/276/271/347/225/214/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//347/237/245/350/257/206/350/265/204/344/272/247/346/262/273/347/220/206/350/247/204/345/210/231.md +1 -9
- package/templates/internal/rules//347/254/254/344/270/200/346/200/247/345/216/237/347/220/206/346/216/250/347/220/206/350/247/204/345/210/231.md +0 -10
- package/templates/internal/rules//347/273/206/350/212/202/347/272/252/345/276/213/350/247/204/345/210/231.md +0 -10
- package/templates/internal/rules//350/204/221/346/232/264/344/270/216/346/226/271/346/241/210/346/216/242/347/264/242/350/247/204/345/210/231.md +0 -10
- package/templates/internal/rules//350/256/241/345/210/222/345/211/215/347/275/256/351/227/250/350/247/204/345/210/231.md +1 -11
- package/templates/internal/rules//350/256/276/350/256/241/344/272/247/347/211/251/345/214/205/350/247/204/345/210/231.md +6 -7
- package/templates/internal/rules//350/257/201/346/215/256/351/251/261/345/212/250/344/270/216/345/217/215/345/271/273/350/247/211/350/247/204/345/210/231.md +0 -11
- package/templates/internal/rules//350/267/250/345/271/263/345/217/260/350/267/257/345/276/204/345/256/211/345/205/250/350/247/204/345/210/231.md +0 -7
- package/templates/internal/rules//350/276/223/345/205/245/346/235/220/346/226/231/345/245/221/347/272/246/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//351/200/232/347/224/250/345/206/263/347/255/226/347/240/224/350/256/250/350/247/204/345/210/231.md +0 -15
- package/templates/internal/rules//351/205/215/347/275/256/344/274/230/345/205/210/347/272/247/350/247/204/345/210/231.md +38 -34
- package/templates/internal/rules//351/205/215/347/275/256/350/220/275/347/233/230/350/276/271/347/225/214/350/247/204/345/210/231.md +5 -14
- package/templates/internal/rules//351/230/262/345/255/244/345/262/233/345/256/236/347/216/260/350/247/204/345/210/231.md +1 -7
- package/templates/internal/rules//351/233/266/351/205/215/347/275/256/345/210/235/345/247/213/345/214/226/350/247/204/345/210/231.md +31 -34
- package/templates/internal/rules//351/252/214/346/224/266/346/250/241/347/211/210/350/276/223/345/207/272/345/245/221/347/272/246/350/247/204/345/210/231.md +0 -13
- package/templates/internal/rules//351/252/214/350/257/201/345/245/221/347/272/246/350/247/204/345/210/231.md +1 -7
- package/templates/patterns/API/350/256/276/350/256/241/350/247/204/350/214/203.md +1 -15
- package/templates/patterns/Docker/351/203/250/347/275/262/350/247/204/350/214/203.md +1 -13
- package/templates/patterns/Git/346/223/215/344/275/234/350/247/204/350/214/203.md +1 -17
- package/templates/patterns/N/345/212/2401/346/237/245/350/257/242/350/247/204/350/214/203.md +1 -16
- package/templates/patterns/React/345/210/227/350/241/250/350/241/250/346/240/274/350/247/204/350/214/203.md +1 -15
- package/templates/patterns/React/346/216/245/345/217/243/351/233/206/346/210/220/350/247/204/350/214/203.md +1 -16
- package/templates/patterns/React/347/212/266/346/200/201/347/256/241/347/220/206/350/247/204/350/214/203.md +1 -16
- package/templates/patterns/React/347/273/204/344/273/266/350/247/204/350/214/203.md +1 -15
- package/templates/patterns/React/350/241/250/345/215/225/350/247/204/350/214/203.md +1 -15
- package/templates/patterns/React/350/267/257/347/224/261/350/247/204/350/214/203.md +1 -16
- package/templates/patterns/SOLID/350/256/276/350/256/241/350/247/204/350/214/203.md +1 -8
- package/templates/patterns/Schema/345/205/274/345/256/271/350/247/204/350/214/203.md +1 -15
- package/templates/patterns/Vue/347/212/266/346/200/201/347/256/241/347/220/206/350/247/204/350/214/203.md +1 -14
- package/templates/patterns/Vue/347/273/204/344/273/266/350/247/204/350/214/203.md +1 -18
- package/templates/patterns/Vue/350/267/257/347/224/261/350/247/204/350/214/203.md +1 -13
- package/templates/patterns//344/272/213/344/273/266/351/251/261/345/212/250/350/247/204/350/214/203.md +1 -17
- package/templates/patterns//344/272/213/345/212/241/346/250/241/345/274/217/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//344/274/230/351/233/205/345/201/234/346/234/272/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//345/205/250/346/240/210/346/265/201/347/250/213/344/277/256/345/244/215.md +1 -14
- package/templates/patterns//345/210/206/351/241/265/346/237/245/350/257/242/350/247/204/350/214/203.md +1 -19
- package/templates/patterns//345/211/215/347/253/257/346/200/247/350/203/275/350/247/204/350/214/203.md +1 -17
- package/templates/patterns//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213/350/247/204/350/214/203.md +1 -8
- package/templates/patterns//345/221/275/345/220/215/350/247/204/350/214/203.md +1 -14
- package/templates/patterns//345/233/275/351/231/205/345/214/226/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//345/242/236/345/210/240/346/224/271/346/237/245/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//345/244/226/351/203/250/344/276/235/350/265/226/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//345/245/221/347/272/246/345/205/274/345/256/271/350/247/204/350/214/203.md +1 -13
- package/templates/patterns//345/256/232/346/227/266/344/273/273/345/212/241/350/247/204/350/214/203.md +1 -17
- package/templates/patterns//345/256/236/346/227/266/346/216/250/351/200/201/350/247/204/350/214/203.md +1 -15
- package/templates/patterns//345/267/245/347/250/213/347/272/252/345/276/213.md +1 -14
- package/templates/patterns//345/271/266/345/217/221/346/216/247/345/210/266/350/247/204/350/214/203.md +1 -19
- package/templates/patterns//345/274/202/346/255/245/345/257/274/345/207/272/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//346/216/245/345/217/243/345/245/221/347/272/246/350/247/204/350/214/203.md +1 -14
- package/templates/patterns//346/220/234/347/264/242/346/250/241/345/274/217/350/247/204/350/214/203.md +1 -17
- package/templates/patterns//346/225/260/346/215/256/351/232/220/347/247/201/350/247/204/350/214/203.md +2 -19
- package/templates/patterns//346/226/207/344/273/266/344/270/212/344/274/240/350/247/204/350/214/203.md +1 -15
- package/templates/patterns//346/227/240/351/232/234/347/242/215/350/247/204/350/214/203.md +1 -15
- package/templates/patterns//346/227/245/345/277/227/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//346/235/203/351/231/220/350/256/244/350/257/201/350/247/204/350/214/203.md +1 -19
- package/templates/patterns//346/236/266/346/236/204/347/272/242/347/272/277.md +1 -13
- package/templates/patterns//346/265/213/350/257/225/350/264/250/351/207/217/350/247/204/350/214/203.md +1 -14
- package/templates/patterns//347/206/224/346/226/255/351/231/215/347/272/247/350/247/204/350/214/203.md +1 -17
- package/templates/patterns//347/212/266/346/200/201/346/265/201/350/275/254/350/247/204/350/214/203.md +1 -14
- package/templates/patterns//347/272/246/346/235/237/345/256/236/347/216/260/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//347/274/223/345/255/230/347/255/226/347/225/245/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//347/274/226/347/240/201/350/264/250/351/207/217/350/247/204/350/214/203.md +1 -14
- package/templates/patterns//347/274/272/351/231/267/347/256/241/347/220/206/350/247/204/350/214/203.md +1 -13
- package/templates/patterns//350/260/203/350/257/225/346/226/271/346/263/225/350/256/272.md +1 -14
- package/templates/patterns//350/276/223/345/205/245/346/240/241/351/252/214/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//351/224/231/350/257/257/345/244/204/347/220/206/350/247/204/350/214/203.md +1 -16
- package/templates/patterns//351/224/231/350/257/257/350/276/271/347/225/214/350/247/204/350/214/203.md +1 -18
- package/templates/patterns//351/242/206/345/237/237/351/251/261/345/212/250/350/256/276/350/256/241/350/247/204/350/214/203.md +1 -15
- package/templates/procedures/OOD/350/256/276/350/256/241/345/267/245/344/275/234/346/265/201.md +41 -20
- package/templates/procedures/Schema/345/217/230/346/233/264/346/265/201/346/260/264/347/272/277.md +7 -13
- package/templates/procedures//344/270/215/347/241/256/345/256/232/346/227/266/345/244/264/350/204/221/351/243/216/346/232/264/346/265/201/347/250/213.md +92 -0
- package/templates/procedures//344/270/273/351/223/276/350/267/257/346/216/245/345/205/245/351/252/214/350/257/201/346/265/201/347/250/213.md +8 -9
- package/templates/procedures//344/273/243/347/240/201/351/227/250/347/246/201/346/265/201/347/250/213.md +1 -7
- package/templates/procedures//344/273/273/345/212/241/346/213/206/350/247/243/346/265/201/347/250/213.md +10 -9
- package/templates/procedures//344/273/273/345/212/241/350/247/204/345/210/222/345/267/245/344/275/234/346/265/201.md +83 -0
- package/templates/procedures//344/274/232/350/257/235/346/201/242/345/244/215/346/265/201/347/250/213.md +2 -10
- package/templates/procedures//345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/345/267/245/344/275/234/346/265/201/345/257/274/350/210/252.md +8 -16
- package/templates/procedures//345/212/237/350/203/275/345/274/200/345/217/221/346/265/201/347/250/213.md +11 -16
- package/templates/procedures//345/220/216/347/253/257/346/216/245/345/217/243/345/256/236/347/216/260/345/267/245/344/275/234/346/265/201.md +1 -8
- package/templates/procedures//345/221/275/344/273/244/346/211/247/350/241/214/346/265/201/347/250/213.md +2 -7
- package/templates/procedures//345/221/275/344/273/244/350/267/257/347/224/261/346/265/201/347/250/213.md +0 -6
- package/templates/procedures//345/256/211/345/205/250/345/212/240/345/233/272/346/265/201/346/260/264/347/272/277.md +8 -14
- package/templates/procedures//345/267/245/345/205/267/350/260/203/347/224/250/346/265/201/347/250/213.md +2 -7
- package/templates/procedures//346/200/247/350/203/275/346/265/201/346/260/264/347/272/277.md +7 -13
- package/templates/procedures//346/204/217/345/233/276/350/267/257/347/224/261/346/265/201/347/250/213.md +3 -8
- package/templates/procedures//346/216/245/345/217/243/351/233/206/346/210/220/346/265/201/346/260/264/347/272/277.md +15 -15
- package/templates/procedures//346/225/260/346/215/256/345/272/223/350/277/201/347/247/273/346/265/201/347/250/213.md +1 -7
- package/templates/procedures//346/234/254/345/234/260/346/265/217/350/247/210/345/231/250/351/252/214/346/224/266/345/267/245/344/275/234/346/265/201.md +1 -7
- package/templates/procedures//346/236/266/346/236/204/345/206/263/347/255/226/347/240/224/350/256/250/345/267/245/344/275/234/346/265/201.md +8 -7
- package/templates/procedures//346/236/266/346/236/204/350/256/276/350/256/241/345/267/245/344/275/234/346/265/201.md +23 -11
- package/templates/procedures//346/246/202/345/277/265/351/252/214/350/257/201/346/265/201/346/260/264/347/272/277.md +8 -12
- package/templates/procedures//346/265/213/350/257/225/344/274/230/345/205/210/347/274/226/347/240/201/345/267/245/344/275/234/346/265/201.md +18 -10
- package/templates/procedures//346/272/220/347/240/201/345/216/237/345/236/213/344/272/244/344/273/230/346/265/201/347/250/213.md +9 -15
- package/templates/procedures//347/216/260/346/234/211/347/263/273/347/273/237/345/267/256/350/267/235/345/210/206/346/236/220/345/267/245/344/275/234/346/265/201.md +29 -9
- package/templates/procedures//347/237/245/350/257/206/347/273/264/346/212/244/346/265/201/346/260/264/347/272/277.md +6 -12
- package/templates/procedures//347/264/247/346/200/245/344/277/256/345/244/215/346/265/201/346/260/264/347/272/277.md +8 -14
- package/templates/procedures//347/274/226/347/240/201/345/211/215/346/276/204/346/270/205/346/265/201/347/250/213.md +7 -7
- package/templates/procedures//347/274/226/347/240/201/351/230/266/346/256/265/346/211/247/350/241/214/345/267/245/344/275/234/346/265/201.md +101 -0
- package/templates/procedures//350/207/252/344/270/273/351/200/211/345/236/213/346/265/201/347/250/213.md +1 -7
- package/templates/procedures//350/256/276/350/256/241/344/272/247/347/211/251/347/224/237/346/210/220/344/270/216/345/244/215/351/252/214/345/267/245/344/275/234/346/265/201.md +32 -13
- package/templates/procedures//350/256/276/350/256/241/345/256/241/350/256/241/346/265/201/347/250/213.md +17 -21
- package/templates/procedures//350/257/246/347/273/206/350/256/276/350/256/241/346/265/201/347/250/213.md +91 -24
- package/templates/procedures//350/260/203/350/257/225/346/216/222/346/237/245/346/265/201/347/250/213.md +31 -9
- package/templates/procedures//350/277/201/347/247/273/346/265/201/346/260/264/347/272/277.md +7 -13
- package/templates/procedures//351/203/250/347/275/262/345/217/221/345/270/203/346/265/201/347/250/213.md +35 -9
- package/templates/procedures//351/207/215/346/236/204/346/265/201/346/260/264/347/272/277.md +7 -13
- package/templates/procedures//351/233/206/346/210/220/351/252/214/350/257/201/346/265/201/347/250/213.md +9 -9
- package/templates/procedures//351/234/200/346/261/202/346/276/204/346/270/205/346/265/201/347/250/213.md +23 -16
- package/templates/procedures//351/252/214/346/224/266/346/265/213/350/257/225/350/247/204/345/210/222.md +8 -9
- package/templates/rules/existing-system//345/205/274/345/256/271/346/200/247/346/243/200/346/237/245/350/247/204/345/210/231.md +66 -23
- package/templates/rules/existing-system//350/200/201/347/263/273/347/273/237/345/210/207/347/211/207/350/247/204/345/210/222/350/247/204/345/210/231.md +35 -0
- package/templates/rules/existing-system//350/200/246/345/220/210/346/243/200/346/265/213/350/247/204/345/210/231.md +57 -20
- package/templates/rules/existing-system//350/257/225/350/277/220/350/241/214/347/206/224/346/226/255/350/247/204/345/210/231.md +49 -25
- package/templates/rules/existing-system//351/230/262/345/276/241/346/200/247/347/274/226/347/240/201/350/247/204/345/210/231.md +69 -25
- package/templates/rules/existing-system//351/233/267/345/214/272/345/217/215/346/250/241/345/274/217/346/270/205/345/215/225.md +109 -23
- package/templates/rules/new-system//350/201/224/350/260/203/350/256/276/350/256/241/347/274/272/351/231/267/345/210/244/345/256/232/350/247/204/345/210/231.md +39 -19
- package/templates/rules/shared/SOLID/344/273/243/347/240/201/345/256/241/346/237/245/350/247/204/345/210/231.md +47 -20
- package/templates/rules/shared//344/270/200/350/207/264/346/200/247/346/240/241/351/252/214/350/247/204/345/210/231.md +84 -11
- package/templates/rules/shared//344/270/212/346/270/270/344/272/244/345/217/211/351/252/214/350/257/201/350/247/204/345/210/231.md +56 -0
- package/templates/rules/shared//344/270/212/346/270/270/350/256/276/350/256/241/344/272/244/345/217/211/351/252/214/350/257/201/345/256/241/346/237/245/350/247/204/345/210/231.md +67 -0
- package/templates/rules/shared//344/272/244/344/273/230/345/256/214/345/244/207/346/200/247/345/256/241/346/237/245/350/247/204/345/210/231.md +39 -16
- package/templates/rules/shared//344/273/243/347/240/201/345/217/257/347/273/264/346/212/244/346/200/247/344/270/216/345/217/257/350/247/202/346/265/213/346/200/247/345/256/241/346/237/245.md +61 -55
- package/templates/rules/shared//344/273/243/347/240/201/346/263/250/351/207/212/344/270/216/346/227/245/345/277/227/345/245/221/347/272/246/350/247/204/345/210/231.md +122 -0
- package/templates/rules/shared//345/206/263/347/255/226/345/256/214/346/225/264/346/200/247/345/256/241/346/237/245/350/247/204/345/210/231.md +18 -11
- package/templates/rules/shared//345/210/207/347/211/207/346/211/247/350/241/214/347/272/252/345/276/213/350/247/204/345/210/231.md +96 -0
- package/templates/rules/shared//345/210/207/347/211/207/350/247/204/345/210/222/350/247/204/345/210/231.md +64 -0
- package/templates/rules/shared//345/216/237/345/236/213/346/272/220/347/240/201/346/217/220/345/217/226/350/247/204/345/210/231.md +67 -0
- package/templates/rules/shared//345/216/237/345/236/213/350/257/264/346/230/216/345/256/241/346/237/245/350/247/204/345/210/231.md +73 -0
- package/templates/rules/shared//345/217/221/345/270/203/345/220/216/345/256/241/346/237/245/350/247/204/345/210/231.md +22 -13
- package/templates/rules/shared//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213/345/256/241/346/237/245/350/247/204/345/210/231.md +43 -18
- package/templates/rules/shared//345/256/211/345/205/250/345/256/241/346/237/245/350/247/204/345/210/231.md +53 -17
- package/templates/rules/shared//345/271/266/345/217/221/345/256/241/346/237/245/350/247/204/345/210/231.md +39 -10
- package/templates/rules/shared//346/200/247/350/203/275/345/256/241/346/237/245/350/247/204/345/210/231.md +32 -10
- package/templates/rules/shared//346/216/245/345/217/243/345/245/221/347/272/246/345/256/241/346/237/245/350/247/204/345/210/231.md +40 -11
- package/templates/rules/shared//346/236/266/346/236/204/345/256/241/346/237/245/350/247/204/345/210/231.md +31 -11
- package/templates/rules/shared//346/236/266/346/236/204/350/256/276/350/256/241/345/256/241/346/237/245/350/247/204/345/210/231.md +102 -0
- package/templates/rules/shared//346/236/266/346/236/204/350/256/276/350/256/241/350/247/204/345/210/231.md +64 -0
- package/templates/rules/shared//347/213/254/347/253/213/345/256/241/346/237/245/350/247/204/345/210/231.md +33 -0
- package/templates/rules/shared//347/254/254/344/270/200/346/200/247/345/216/237/347/220/206/346/216/250/347/220/206/350/247/204/345/210/231.md +171 -0
- package/templates/rules/shared//347/274/226/347/240/201/345/260/261/347/273/252/345/256/241/346/237/245/350/247/204/345/210/231.md +9 -13
- package/templates/rules/shared//350/201/224/350/260/203/351/252/214/350/257/201/346/270/205/345/215/225.md +62 -16
- package/templates/rules/shared//350/246/206/347/233/226/347/216/207/346/240/207/345/207/206.md +2 -3
- package/templates/rules/shared//350/257/246/347/273/206/350/256/276/350/256/241/345/256/241/346/237/245/350/247/204/345/210/231.md +82 -0
- package/templates/rules/shared//350/264/250/351/207/217/345/256/241/346/237/245/350/247/204/345/210/231.md +17 -12
- package/templates/rules/shared//350/277/275/350/270/252/347/237/251/351/230/265ID/350/247/204/345/210/231.md +48 -0
- package/templates/rules/shared//350/277/275/350/270/252/347/237/251/351/230/265/345/256/241/346/237/245/350/247/204/345/210/231.md +51 -0
- package/templates/rules/shared//351/234/200/346/261/202/350/264/250/351/207/217/345/256/241/346/237/245/350/247/204/345/210/231.md +30 -13
- package/templates/rules/shared//351/252/214/346/224/266/346/240/207/345/207/206/345/256/241/346/237/245/350/247/204/345/210/231.md +15 -15
- package/templates//346/250/241/347/211/210/350/264/241/347/214/256/346/214/207/345/215/227.md +11 -8
- package/dist/engine/config/config_auto_repair.d.ts +0 -30
- package/dist/engine/config/config_auto_repair.d.ts.map +0 -1
- package/dist/engine/config/config_auto_repair.js +0 -261
- package/dist/engine/config/config_auto_repair.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/constants.d.ts +0 -16
- package/dist/engine/config/config_precedence_contract/constants.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/constants.js +0 -166
- package/dist/engine/config/config_precedence_contract/constants.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/evidence.d.ts +0 -38
- package/dist/engine/config/config_precedence_contract/evidence.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/evidence.js +0 -59
- package/dist/engine/config/config_precedence_contract/evidence.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/field_class.d.ts +0 -11
- package/dist/engine/config/config_precedence_contract/field_class.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/field_class.js +0 -10
- package/dist/engine/config/config_precedence_contract/field_class.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/governance.d.ts +0 -31
- package/dist/engine/config/config_precedence_contract/governance.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/governance.js +0 -232
- package/dist/engine/config/config_precedence_contract/governance.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/index.d.ts +0 -21
- package/dist/engine/config/config_precedence_contract/index.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/index.js +0 -28
- package/dist/engine/config/config_precedence_contract/index.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/project_config.d.ts +0 -20
- package/dist/engine/config/config_precedence_contract/project_config.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/project_config.js +0 -210
- package/dist/engine/config/config_precedence_contract/project_config.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/resolution.d.ts +0 -93
- package/dist/engine/config/config_precedence_contract/resolution.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/resolution.js +0 -317
- package/dist/engine/config/config_precedence_contract/resolution.js.map +0 -1
- package/dist/engine/config/config_precedence_contract/types.d.ts +0 -92
- package/dist/engine/config/config_precedence_contract/types.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract/types.js +0 -20
- package/dist/engine/config/config_precedence_contract/types.js.map +0 -1
- package/dist/engine/config/config_precedence_contract.d.ts +0 -22
- package/dist/engine/config/config_precedence_contract.d.ts.map +0 -1
- package/dist/engine/config/config_precedence_contract.js +0 -34
- package/dist/engine/config/config_precedence_contract.js.map +0 -1
- package/dist/engine/config/zero_config_init.d.ts +0 -177
- package/dist/engine/config/zero_config_init.d.ts.map +0 -1
- package/dist/engine/config/zero_config_init.js +0 -857
- package/dist/engine/config/zero_config_init.js.map +0 -1
- package/templates/internal/patterns//351/233/266/351/205/215/347/275/256/345/210/235/345/247/213/345/214/226.md +0 -62
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 工具组: 状态机驱动路由 —
|
|
2
|
+
* 工具组: 状态机驱动路由 — MCP 工具集。
|
|
3
3
|
*
|
|
4
4
|
* sf_pipeline_init, sf_stage_execute, sf_stage_advance,
|
|
5
|
-
* sf_stage_rollback,
|
|
5
|
+
* sf_stage_rollback, sf_command,
|
|
6
6
|
* sf_next, sf_pipeline_status, sf_direct_answer,
|
|
7
7
|
* sf_single_artifact
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* 审查统一入口:[sf] 审查 通过 classifyTarget 路由到四层编排。
|
|
10
10
|
*/
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { createToolRegistrar } from "../middleware.js";
|
|
13
13
|
import { TOOL } from "../tool_names.js";
|
|
14
14
|
import { PipelineStateMachine } from "../../../engine/pipeline/state_machine/pipeline_state_machine.js";
|
|
15
15
|
import { parseSfCommand } from "../../../engine/pipeline/state_machine/sf_command_parser.js";
|
|
16
|
+
import { TASK_STAGES } from "../../../engine/workflow/workflow_navigation_contract.js";
|
|
17
|
+
import { lazyEvidenceGrounding } from "../lazy_loaders.js"; // evidence_grounding_contract 主链路消费(problem-60)
|
|
18
|
+
import { lazyArchitectureWorkshop } from "../lazy_loaders.js"; // architecture_decision_workshop 主链路消费(架构研讨场景)
|
|
19
|
+
import { lazyDecisionWorkshop } from "../lazy_loaders.js"; // decision_workshop 主链路消费(决策研讨场景)
|
|
20
|
+
/** 运行时校验并转换 stage 参数为 TaskStage 类型 */
|
|
21
|
+
function validateStage(value) {
|
|
22
|
+
if (!value)
|
|
23
|
+
return undefined;
|
|
24
|
+
if (!TASK_STAGES.includes(value)) {
|
|
25
|
+
throw new Error(`无效的阶段名: ${value}。有效值: ${TASK_STAGES.join(", ")}`);
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
16
29
|
export async function registerStateMachineTools(ctx) {
|
|
17
30
|
const { registerSafeTool } = createToolRegistrar(ctx);
|
|
18
31
|
const { taskContext } = ctx;
|
|
@@ -46,18 +59,221 @@ export async function registerStateMachineTools(ctx) {
|
|
|
46
59
|
action: z.string().optional().describe("阶段内动作 ID。如: start_slice, execute"),
|
|
47
60
|
description: z.string().optional().describe("工作描述(用于知识匹配和风险模式扫描)"),
|
|
48
61
|
task_id: z.string().optional().describe("关联任务 ID(可选)"),
|
|
62
|
+
architecture_decision_workshop: z.any().optional().describe("已确认的架构决策研讨契约(二次调用传入)"),
|
|
63
|
+
decision_workshop: z.any().optional().describe("已确认的通用决策研讨契约(二次调用传入)"),
|
|
49
64
|
};
|
|
50
65
|
registerSafeTool(TOOL.stageExecute, "执行当前或指定阶段的工作。运行确定性门禁,注入知识,返回执行结果。阶段推进需调用 sf_stage_advance(通过 sf_command 调用)", StageExecuteSchema, async (args) => {
|
|
51
66
|
try {
|
|
67
|
+
// 证据接地门禁(problem-60)— 写回失败不影响阻断判定
|
|
68
|
+
try {
|
|
69
|
+
const egMod = await lazyEvidenceGrounding();
|
|
70
|
+
const _evRiskLevel = egMod.assessTaskRisk(undefined, args.stage, args.description);
|
|
71
|
+
if (_evRiskLevel === "critical" || _evRiskLevel === "high") {
|
|
72
|
+
const _evSystem = egMod.createEvidenceGroundingSystem();
|
|
73
|
+
const _evMatrix = _evSystem.builder.buildContext([], { target_claims: [], source_types: [], keywords: [], max_results: 0 });
|
|
74
|
+
const _evGateResult = _evSystem.gate.evaluate(_evMatrix, _evRiskLevel);
|
|
75
|
+
if (!_evGateResult.allowed) {
|
|
76
|
+
// 门禁明确拒绝 — 写回失败也不影响阻断判定
|
|
77
|
+
try {
|
|
78
|
+
const _evPipeline = await sm.getCurrentPipeline();
|
|
79
|
+
if (_evPipeline?.pipeline_id) {
|
|
80
|
+
await taskContext.setEvidenceGroundingResult(_evPipeline.pipeline_id, {
|
|
81
|
+
evidence_matrix: _evMatrix,
|
|
82
|
+
evidence_gate_result: _evGateResult,
|
|
83
|
+
unsupported_claims: _evGateResult.unsupported_claims,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch { /* 写回失败不阻断门禁 */ }
|
|
88
|
+
return { result: { evidence_blocked: true, _evGate: _evGateResult } };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
/* 证据门禁模块加载/运行异常降级,不阻断 */
|
|
94
|
+
}
|
|
52
95
|
const result = await sm.executeStage({
|
|
53
|
-
stage: args.stage
|
|
96
|
+
stage: validateStage(args.stage),
|
|
54
97
|
action: args.action,
|
|
55
98
|
description: args.description,
|
|
56
99
|
task_id: args.task_id,
|
|
57
100
|
knowledgeIndex: ctx.knowledgeIndex,
|
|
58
101
|
config: ctx.config,
|
|
59
102
|
});
|
|
60
|
-
|
|
103
|
+
// 证据接地运行时写回(problem-60)
|
|
104
|
+
try {
|
|
105
|
+
const _evPipeline = await sm.getCurrentPipeline();
|
|
106
|
+
if (_evPipeline?.pipeline_id) {
|
|
107
|
+
await taskContext.setEvidenceGroundingResult(_evPipeline.pipeline_id, {
|
|
108
|
+
evidence_gate_result: {
|
|
109
|
+
allowed: true,
|
|
110
|
+
reason_zh: "证据门禁通过",
|
|
111
|
+
diagnostic_code: "SF-EVIDENCE-6000",
|
|
112
|
+
unsupported_claims: [],
|
|
113
|
+
unresolved_conflicts: [],
|
|
114
|
+
missing_evidence: [],
|
|
115
|
+
risk_level: "low",
|
|
116
|
+
requires_user_confirmation: [],
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
/* 写回失败不阻断主流程 */
|
|
123
|
+
}
|
|
124
|
+
// ── 架构决策研讨门禁(architecture_decision_workshop) ──
|
|
125
|
+
// 从管线描述/任务上下文中检测架构设计意图,创建/评估研讨契约
|
|
126
|
+
try {
|
|
127
|
+
const archMod = await lazyArchitectureWorkshop();
|
|
128
|
+
// 收集所有可用描述文本用于意图匹配(parseSfCommand 会剥离阶段关键词,需从多源拼接)
|
|
129
|
+
let intentText = args.description ?? "";
|
|
130
|
+
try {
|
|
131
|
+
const pipeline = await sm.getCurrentPipeline();
|
|
132
|
+
if (pipeline?.description)
|
|
133
|
+
intentText += " " + pipeline.description;
|
|
134
|
+
}
|
|
135
|
+
catch { /* 降级 */ }
|
|
136
|
+
try {
|
|
137
|
+
const tCtx = args.task_id ? await taskContext.load(args.task_id) : null;
|
|
138
|
+
if (tCtx?.intent)
|
|
139
|
+
intentText += " " + tCtx.intent;
|
|
140
|
+
}
|
|
141
|
+
catch { /* 降级 */ }
|
|
142
|
+
if (args.architecture_decision_workshop) {
|
|
143
|
+
// 二次调用: 用户确认后传入已确认的研讨契约
|
|
144
|
+
const contract = args.architecture_decision_workshop;
|
|
145
|
+
const evaluated = archMod.applyArchitectureWorkshopGate(contract);
|
|
146
|
+
const gate = archMod.evaluateArchitectureDecisionWorkshop(evaluated);
|
|
147
|
+
if (!gate.allowed) {
|
|
148
|
+
// 确认后仍未通过门禁 — 阻断
|
|
149
|
+
return { result: {
|
|
150
|
+
blocked: true,
|
|
151
|
+
block_reason: "架构决策研讨门禁未通过,请检查决策项后重试",
|
|
152
|
+
architecture_decision_workshop: { ...evaluated, gate_result: gate },
|
|
153
|
+
} };
|
|
154
|
+
}
|
|
155
|
+
// 门禁通过 — 写入已确认结果
|
|
156
|
+
result.architecture_decision_workshop = { ...evaluated, status: "confirmed" };
|
|
157
|
+
}
|
|
158
|
+
else if (archMod.requiresArchitectureDecisionWorkshop(undefined, intentText)) {
|
|
159
|
+
// 首次调用: 创建新的研讨契约 → 阻断等待人类确认
|
|
160
|
+
const projectContext = /老系统|存量|改造|现有/.test(intentText) ? "existing_system" : "new_system";
|
|
161
|
+
const contract = archMod.createArchitectureDecisionWorkshop(result.pipeline_id ?? args.task_id ?? "unknown", projectContext);
|
|
162
|
+
const gate = archMod.evaluateArchitectureDecisionWorkshop(contract);
|
|
163
|
+
return { result: {
|
|
164
|
+
blocked: true,
|
|
165
|
+
block_reason: "架构决策需要人类确认后方可执行",
|
|
166
|
+
architecture_decision_workshop: { ...contract, status: "awaiting_confirmation", gate_result: gate },
|
|
167
|
+
} };
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
/* 架构研讨模块加载失败降级,不阻断 */
|
|
172
|
+
}
|
|
173
|
+
// ── 通用决策研讨门禁(decision_workshop + activated_packs) ──
|
|
174
|
+
// 从管线描述/任务上下文中匹配决策包,创建/评估研讨契约
|
|
175
|
+
try {
|
|
176
|
+
const decMod = await lazyDecisionWorkshop();
|
|
177
|
+
// 收集所有可用描述文本用于决策包匹配
|
|
178
|
+
let intentText = args.description ?? "";
|
|
179
|
+
try {
|
|
180
|
+
const pipeline = await sm.getCurrentPipeline();
|
|
181
|
+
if (pipeline?.description)
|
|
182
|
+
intentText += " " + pipeline.description;
|
|
183
|
+
}
|
|
184
|
+
catch { /* 降级 */ }
|
|
185
|
+
try {
|
|
186
|
+
const tCtx = args.task_id ? await taskContext.load(args.task_id) : null;
|
|
187
|
+
if (tCtx?.intent)
|
|
188
|
+
intentText += " " + tCtx.intent;
|
|
189
|
+
}
|
|
190
|
+
catch { /* 降级 */ }
|
|
191
|
+
// 判断架构研讨是否已通过(避免架构研讨已确认后被决策研讨重复阻断)
|
|
192
|
+
const archWorkshopPassed = args.architecture_decision_workshop &&
|
|
193
|
+
result.architecture_decision_workshop?.status === "confirmed";
|
|
194
|
+
if (args.decision_workshop) {
|
|
195
|
+
// 二次调用: 用户确认后传入已确认的研讨契约
|
|
196
|
+
const normalized = decMod.normalizeDecisionWorkshopContract(args.decision_workshop);
|
|
197
|
+
const evaluated = decMod.applyDecisionWorkshopGate(normalized);
|
|
198
|
+
const gate = decMod.evaluateDecisionWorkshop(evaluated);
|
|
199
|
+
if (!gate.allowed) {
|
|
200
|
+
// 确认后仍未通过门禁 — 阻断
|
|
201
|
+
return { result: {
|
|
202
|
+
blocked: true,
|
|
203
|
+
block_reason: "决策研讨门禁未通过,请检查决策项后重试",
|
|
204
|
+
decision_workshop: { ...evaluated, gate_result: gate },
|
|
205
|
+
activated_packs: evaluated?.activated_packs ?? [],
|
|
206
|
+
} };
|
|
207
|
+
}
|
|
208
|
+
// 门禁通过 — 写入已确认结果
|
|
209
|
+
result.decision_workshop = { ...evaluated, status: "confirmed" };
|
|
210
|
+
result.activated_packs = evaluated?.activated_packs ?? [];
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
// 首次调用: 检测匹配的决策包(排除已通过架构研讨的 architecture 包)
|
|
214
|
+
const match = decMod.matchDecisionPacks({ intent: intentText });
|
|
215
|
+
const filteredPacks = archWorkshopPassed
|
|
216
|
+
? match.packs.filter((p) => p !== "architecture")
|
|
217
|
+
: match.packs;
|
|
218
|
+
if (filteredPacks.length > 0) {
|
|
219
|
+
const contract = decMod.createDecisionWorkshop(result.pipeline_id ?? args.task_id ?? "unknown", filteredPacks, "new_system", match.reasons.join("; "));
|
|
220
|
+
const gate = decMod.evaluateDecisionWorkshop(contract);
|
|
221
|
+
// 首次创建的研讨契约 → 阻断等待人类确认
|
|
222
|
+
return { result: {
|
|
223
|
+
blocked: true,
|
|
224
|
+
block_reason: "决策研讨需要人类确认后方可执行",
|
|
225
|
+
decision_workshop: { ...contract, status: "awaiting_confirmation", gate_result: gate },
|
|
226
|
+
activated_packs: filteredPacks,
|
|
227
|
+
} };
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
catch {
|
|
232
|
+
/* 决策研讨模块加载失败降级,不阻断 */
|
|
233
|
+
}
|
|
234
|
+
// ── 产出物检测(artifact_output) ──
|
|
235
|
+
// 根据意图关键词在任务上下文中写入 artifact_output,供后续修复指令场景消费
|
|
236
|
+
try {
|
|
237
|
+
if (args.task_id) {
|
|
238
|
+
const tCtx = await taskContext.load(args.task_id);
|
|
239
|
+
const intentStr = String(tCtx?.intent ?? args.description ?? "");
|
|
240
|
+
let artifactKind;
|
|
241
|
+
let artifactPath;
|
|
242
|
+
if (/接口设计|API.*设计|api_spec|接口规格/i.test(intentStr)) {
|
|
243
|
+
artifactKind = "api_spec";
|
|
244
|
+
artifactPath = "docs/architecture/03-API接口规格文档.md";
|
|
245
|
+
}
|
|
246
|
+
else if (/架构设计|总体架构/i.test(intentStr)) {
|
|
247
|
+
artifactKind = "architecture";
|
|
248
|
+
artifactPath = "docs/architecture/01-架构设计文档.md";
|
|
249
|
+
}
|
|
250
|
+
else if (/数据库设计/i.test(intentStr)) {
|
|
251
|
+
artifactKind = "database";
|
|
252
|
+
artifactPath = "docs/architecture/02-数据库设计文档.md";
|
|
253
|
+
}
|
|
254
|
+
if (artifactKind && tCtx && !tCtx.artifact_output) {
|
|
255
|
+
const updatedCtx = {
|
|
256
|
+
...tCtx,
|
|
257
|
+
artifact_output: { kind: artifactKind, path: artifactPath, status: "draft" },
|
|
258
|
+
};
|
|
259
|
+
await taskContext.save(updatedCtx);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
catch {
|
|
264
|
+
/* 产出物检测失败不阻断主流程 */
|
|
265
|
+
}
|
|
266
|
+
// ── 将 companion_injection 提升为 must_follow + 添加执行指令 ──
|
|
267
|
+
// 原始返回 `return { result }` 将 companion_injection 埋在 result 中,AI 可忽略。
|
|
268
|
+
// 改造 8: 与 single_artifact 一致的返回格式,强制 AI 遵守规则。
|
|
269
|
+
const resultAsRecord = result;
|
|
270
|
+
const companionInjection = resultAsRecord.companion_injection;
|
|
271
|
+
const executeStageInstruction = buildExecuteStageInstruction(resultAsRecord);
|
|
272
|
+
return {
|
|
273
|
+
result,
|
|
274
|
+
must_follow: companionInjection || undefined,
|
|
275
|
+
instruction: executeStageInstruction,
|
|
276
|
+
};
|
|
61
277
|
}
|
|
62
278
|
catch (err) {
|
|
63
279
|
return { result: { error: String(err.message ?? err) } };
|
|
@@ -69,15 +285,83 @@ export async function registerStateMachineTools(ctx) {
|
|
|
69
285
|
const StageAdvanceSchema = {
|
|
70
286
|
confirmation: z.string().optional().describe("人工确认内容(如: ADR已确认, 测试通过)"),
|
|
71
287
|
task_id: z.string().optional().describe("关联任务 ID(可选)"),
|
|
288
|
+
confirm: z.boolean().optional().describe("显式确认标志(可选)"),
|
|
289
|
+
confirmed_by: z.string().optional().describe("确认人(可选)"),
|
|
290
|
+
confirmation_ref: z.string().optional().describe("确认引用(可选)"),
|
|
291
|
+
acceptance_notes: z.string().optional().describe("验收备注(可选)"),
|
|
292
|
+
run_mode: z.string().optional().describe("运行模式(可选)"),
|
|
72
293
|
};
|
|
73
294
|
registerSafeTool(TOOL.stageAdvance, "推进管线到下一阶段。运行门禁检查后推进。最后阶段无法推进(通过 sf_command 调用)", StageAdvanceSchema, async (args) => {
|
|
74
295
|
try {
|
|
296
|
+
// 修复重验指令阻断 — 产物未通过验证时阻止推进
|
|
297
|
+
if (args.task_id) {
|
|
298
|
+
let tCtx;
|
|
299
|
+
try {
|
|
300
|
+
tCtx = await taskContext.load(args.task_id);
|
|
301
|
+
}
|
|
302
|
+
catch (err) {
|
|
303
|
+
// 任务上下文加载失败时不可跳过重验检查 — 返回错误
|
|
304
|
+
return { result: {
|
|
305
|
+
error: `任务上下文加载失败,无法验证产物状态: ${err instanceof Error ? err.message : String(err)}`,
|
|
306
|
+
} };
|
|
307
|
+
}
|
|
308
|
+
if (tCtx?.repair_reverify_directive?.blocked && args.result !== "failure") {
|
|
309
|
+
return { result: { diagnostic_code: "SF-CONTRACT-0003", error: "产物未通过验证,请先修复并重验" } };
|
|
310
|
+
}
|
|
311
|
+
// failure 标记 — 不推进,仅记录失败状态
|
|
312
|
+
if (args.result === "failure") {
|
|
313
|
+
await taskContext.save({
|
|
314
|
+
...tCtx,
|
|
315
|
+
failure_type: args.failure_type ?? "unknown",
|
|
316
|
+
failed_at: new Date().toISOString(),
|
|
317
|
+
});
|
|
318
|
+
return { result: { status: "failure_recorded", failure_type: args.failure_type } };
|
|
319
|
+
}
|
|
320
|
+
}
|
|
75
321
|
const result = await sm.advanceStage({
|
|
76
322
|
confirmation: args.confirmation,
|
|
77
323
|
task_id: args.task_id,
|
|
78
324
|
knowledgeIndex: ctx.knowledgeIndex,
|
|
79
325
|
config: ctx.config,
|
|
326
|
+
force: args.confirm === true,
|
|
80
327
|
});
|
|
328
|
+
// 验收参数处理: 检测 confirm/confirmed_by/acceptance_notes 等参数,设置验收状态
|
|
329
|
+
if (args.confirm && args.confirmed_by) {
|
|
330
|
+
result.acceptance_status = "passed";
|
|
331
|
+
result.confirmed_by = args.confirmed_by;
|
|
332
|
+
result.confirmation_ref = args.confirmation_ref ?? "";
|
|
333
|
+
result.acceptance_notes = args.acceptance_notes ?? "";
|
|
334
|
+
// 产物验收 — 检查 artifact_output 状态并标记 accepted
|
|
335
|
+
try {
|
|
336
|
+
if (args.task_id) {
|
|
337
|
+
const tCtx = await taskContext.load(args.task_id);
|
|
338
|
+
if (tCtx?.artifact_output?.status === "verified") {
|
|
339
|
+
result.artifact_transition = "accepted";
|
|
340
|
+
await taskContext.save({
|
|
341
|
+
...tCtx,
|
|
342
|
+
artifact_output: { ...tCtx.artifact_output, status: "accepted" },
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
catch { /* 非关键 */ }
|
|
348
|
+
// 更新 next_allowed_tools 允许再次 advance(多阶段推进场景)
|
|
349
|
+
try {
|
|
350
|
+
if (args.task_id) {
|
|
351
|
+
const tCtx = await taskContext.load(args.task_id);
|
|
352
|
+
if (tCtx?.last_tool_trace) {
|
|
353
|
+
const tools = [...(tCtx.last_tool_trace.next_allowed_tools ?? [])];
|
|
354
|
+
if (!tools.includes("sf_stage_advance"))
|
|
355
|
+
tools.push("sf_stage_advance");
|
|
356
|
+
await taskContext.save({
|
|
357
|
+
...tCtx,
|
|
358
|
+
last_tool_trace: { ...tCtx.last_tool_trace, next_allowed_tools: tools },
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
catch { /* 非关键 */ }
|
|
364
|
+
}
|
|
81
365
|
return { result };
|
|
82
366
|
}
|
|
83
367
|
catch (err) {
|
|
@@ -95,7 +379,7 @@ export async function registerStateMachineTools(ctx) {
|
|
|
95
379
|
registerSafeTool(TOOL.stageRollback, "回退管线到指定阶段。中间阶段的产出标记为 stale。回退目标必须在该阶段的 rollback_targets 列表中(通过 sf_command 调用)", StageRollbackSchema, async (args) => {
|
|
96
380
|
try {
|
|
97
381
|
const result = await sm.rollbackStage({
|
|
98
|
-
target_stage: args.target_stage
|
|
382
|
+
target_stage: validateStage(args.target_stage),
|
|
99
383
|
reason: args.reason,
|
|
100
384
|
task_id: args.task_id,
|
|
101
385
|
});
|
|
@@ -106,21 +390,49 @@ export async function registerStateMachineTools(ctx) {
|
|
|
106
390
|
}
|
|
107
391
|
});
|
|
108
392
|
// ══════════════════════════════════════════════════
|
|
109
|
-
//
|
|
393
|
+
// sf_record_verification_execution — 记录验证执行结果
|
|
110
394
|
// ══════════════════════════════════════════════════
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
395
|
+
const RecordVerificationSchema = {
|
|
396
|
+
task_id: z.string().describe("关联任务 ID"),
|
|
397
|
+
plan_id: z.string().describe("验证计划 ID"),
|
|
398
|
+
execution_records: z.array(z.object({
|
|
399
|
+
command: z.string(),
|
|
400
|
+
exit_code: z.number(),
|
|
401
|
+
stdout_hash: z.string().optional(),
|
|
402
|
+
stderr_hash: z.string().optional(),
|
|
403
|
+
started_at: z.string().optional(),
|
|
404
|
+
finished_at: z.string().optional(),
|
|
405
|
+
evidence_id: z.string().optional(),
|
|
406
|
+
})).describe("执行记录列表"),
|
|
114
407
|
};
|
|
115
|
-
registerSafeTool(TOOL.
|
|
408
|
+
registerSafeTool(TOOL.recordVerificationExecution, "记录验证执行结果。将验证计划的执行记录写入任务上下文,供后续验收使用", RecordVerificationSchema, async (args) => {
|
|
116
409
|
try {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
410
|
+
if (!args.task_id) {
|
|
411
|
+
return { result: { error: "缺少 task_id" } };
|
|
412
|
+
}
|
|
413
|
+
const tCtx = await taskContext.load(args.task_id);
|
|
414
|
+
if (!tCtx) {
|
|
415
|
+
return { result: { error: `任务上下文不存在: ${args.task_id}` } };
|
|
416
|
+
}
|
|
417
|
+
// 写入验证执行记录
|
|
418
|
+
const updatedCtx = {
|
|
419
|
+
...tCtx,
|
|
420
|
+
verification_execution_records: args.execution_records,
|
|
421
|
+
verification_execution_plan_id: args.plan_id,
|
|
422
|
+
verification_execution_status: "completed",
|
|
423
|
+
verification_execution_at: new Date().toISOString(),
|
|
424
|
+
};
|
|
425
|
+
await taskContext.save(updatedCtx);
|
|
426
|
+
const allPassed = args.execution_records.every((r) => r.exit_code === 0);
|
|
427
|
+
return {
|
|
428
|
+
result: {
|
|
429
|
+
task_id: args.task_id,
|
|
430
|
+
plan_id: args.plan_id,
|
|
431
|
+
recorded_count: args.execution_records.length,
|
|
432
|
+
all_passed: allPassed,
|
|
433
|
+
status: allPassed ? "completed" : "partial_failure",
|
|
434
|
+
},
|
|
435
|
+
};
|
|
124
436
|
}
|
|
125
437
|
catch (err) {
|
|
126
438
|
return { result: { error: String(err.message ?? err) } };
|
|
@@ -170,6 +482,42 @@ export async function registerStateMachineTools(ctx) {
|
|
|
170
482
|
system_type: systemType,
|
|
171
483
|
description: parsed.description || "未提供描述",
|
|
172
484
|
});
|
|
485
|
+
// 桥接: 为管线创建对应的任务上下文(供 setupPlanGate、injectTechDecision 等依赖 TaskContext 的功能使用)
|
|
486
|
+
try {
|
|
487
|
+
const rawIntent = args.text || parsed.description || "未提供描述";
|
|
488
|
+
// 检测脚手架意图 → 注入 classification 供 sf_scaffold 使用
|
|
489
|
+
const isScaffold = /脚手架|scaffold|创建.*模块|生成.*骨架/i.test(rawIntent);
|
|
490
|
+
const bridgeCtx = {
|
|
491
|
+
task_id: result.pipeline_id,
|
|
492
|
+
created_at: new Date().toISOString(),
|
|
493
|
+
updated_at: new Date().toISOString(),
|
|
494
|
+
// 保留原始命令文本(含完整关键词),供研讨匹配使用
|
|
495
|
+
intent: rawIntent,
|
|
496
|
+
product_profile: ctx.config?.product_profile ?? "saas",
|
|
497
|
+
status: "executing",
|
|
498
|
+
// 工作流合同门控: 初始化后允许 sf_stage_execute 等核心工具调用
|
|
499
|
+
last_tool_trace: {
|
|
500
|
+
tool_name: "sf_command",
|
|
501
|
+
next_allowed_tools: [
|
|
502
|
+
"sf_stage_execute", "sf_stage_advance",
|
|
503
|
+
"sf_command", "sf_next", "sf_pipeline_status",
|
|
504
|
+
],
|
|
505
|
+
forbidden_tools: [],
|
|
506
|
+
},
|
|
507
|
+
};
|
|
508
|
+
if (isScaffold) {
|
|
509
|
+
bridgeCtx.classification = {
|
|
510
|
+
task_type: "scaffold",
|
|
511
|
+
complexity: "moderate",
|
|
512
|
+
risk_level: "low",
|
|
513
|
+
domains: ["backend", "frontend"],
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
await taskContext.save(bridgeCtx);
|
|
517
|
+
}
|
|
518
|
+
catch {
|
|
519
|
+
/* 桥接创建失败不阻断主流程 */
|
|
520
|
+
}
|
|
173
521
|
return { result: { parsed_command: parsed, execution_result: result, hint } };
|
|
174
522
|
}
|
|
175
523
|
case "start": {
|
|
@@ -203,13 +551,132 @@ export async function registerStateMachineTools(ctx) {
|
|
|
203
551
|
});
|
|
204
552
|
return { result: { parsed_command: parsed, execution_result: result, hint } };
|
|
205
553
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
554
|
+
// ── 审查统一入口 — 四层编排驱动(原 gate_check + single_artifact.review 合并) ──
|
|
555
|
+
case "review": {
|
|
556
|
+
const projectPath = ctx.config?._projectPath ?? process.cwd();
|
|
557
|
+
// 获取当前管线状态
|
|
558
|
+
let reviewSystemType;
|
|
559
|
+
let currentReviewStage = "需求分析";
|
|
560
|
+
try {
|
|
561
|
+
const pipeline = await sm.getCurrentPipeline();
|
|
562
|
+
if (pipeline) {
|
|
563
|
+
reviewSystemType = pipeline.system_type;
|
|
564
|
+
currentReviewStage = pipeline.current_stage;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
catch { /* 无管线时降级 */ }
|
|
568
|
+
// 1. 分类目标
|
|
569
|
+
const { classifyTarget, TargetClassificationError } = await import("../../../engine/pipeline/target_classifier.js");
|
|
570
|
+
let classified;
|
|
571
|
+
try {
|
|
572
|
+
classified = classifyTarget(parsed.stage || parsed.description, currentReviewStage, projectPath);
|
|
573
|
+
}
|
|
574
|
+
catch (err) {
|
|
575
|
+
if (err instanceof TargetClassificationError) {
|
|
576
|
+
return {
|
|
577
|
+
result: {
|
|
578
|
+
parsed_command: parsed,
|
|
579
|
+
execution_result: {
|
|
580
|
+
mode: "review",
|
|
581
|
+
status: "error",
|
|
582
|
+
error: err.message,
|
|
583
|
+
},
|
|
584
|
+
hint,
|
|
585
|
+
},
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
throw err;
|
|
589
|
+
}
|
|
590
|
+
// 2. 按类型路由到四层编排
|
|
591
|
+
if (classified.type === "stage" || classified.type === "current_stage") {
|
|
592
|
+
// ── 阶段级审查 ──
|
|
593
|
+
const { orchestrateStageReview } = await import("../../../engine/pipeline/orchestrate_single_artifact.js");
|
|
594
|
+
const stageResult = await orchestrateStageReview({
|
|
595
|
+
stage: classified.stage,
|
|
596
|
+
projectPath,
|
|
597
|
+
original_command: parsed.raw_text,
|
|
598
|
+
systemType: reviewSystemType,
|
|
599
|
+
});
|
|
600
|
+
return {
|
|
601
|
+
result: {
|
|
602
|
+
parsed_command: parsed,
|
|
603
|
+
execution_result: stageResult,
|
|
604
|
+
must_follow: stageResult.injection_text || undefined,
|
|
605
|
+
instruction: buildStageReviewInstruction(stageResult, parsed),
|
|
606
|
+
hint,
|
|
607
|
+
},
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
if (classified.type === "artifact") {
|
|
611
|
+
// ── 产物级审查 ──
|
|
612
|
+
const { orchestrateSingleArtifact } = await import("../../../engine/pipeline/orchestrate_single_artifact.js");
|
|
613
|
+
const orchestrateResult = await orchestrateSingleArtifact({
|
|
614
|
+
kind: classified.artifactKind,
|
|
615
|
+
operation: "review",
|
|
616
|
+
projectPath,
|
|
617
|
+
original_command: parsed.raw_text,
|
|
618
|
+
systemType: reviewSystemType,
|
|
619
|
+
});
|
|
620
|
+
return {
|
|
621
|
+
result: {
|
|
622
|
+
parsed_command: parsed,
|
|
623
|
+
execution_result: orchestrateResult,
|
|
624
|
+
must_follow: orchestrateResult.injection_text || undefined,
|
|
625
|
+
instruction: buildTopLevelInstruction(orchestrateResult, parsed),
|
|
626
|
+
hint,
|
|
627
|
+
},
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
if (classified.type === "slice") {
|
|
631
|
+
// ── 切片级审查 — 编码阶段 gate + 限定文件范围 ──
|
|
632
|
+
const { orchestrateSingleArtifact } = await import("../../../engine/pipeline/orchestrate_single_artifact.js");
|
|
633
|
+
const orchestrateResult = await orchestrateSingleArtifact({
|
|
634
|
+
kind: "source_code_package",
|
|
635
|
+
operation: "review",
|
|
636
|
+
projectPath,
|
|
637
|
+
original_command: parsed.raw_text,
|
|
638
|
+
systemType: reviewSystemType,
|
|
639
|
+
});
|
|
640
|
+
// 追加切片文件范围限定
|
|
641
|
+
const injectionParts = [];
|
|
642
|
+
if (orchestrateResult.injection_text) {
|
|
643
|
+
injectionParts.push(orchestrateResult.injection_text);
|
|
644
|
+
}
|
|
645
|
+
if (classified.files && classified.files.length > 0) {
|
|
646
|
+
injectionParts.push([
|
|
647
|
+
``,
|
|
648
|
+
`## 切片审查范围限定`,
|
|
649
|
+
``,
|
|
650
|
+
`审查仅限以下文件:`,
|
|
651
|
+
...classified.files.map(f => `- \`${f}\``),
|
|
652
|
+
``,
|
|
653
|
+
`忽略此范围外的文件变更。`,
|
|
654
|
+
].join("\n"));
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
injectionParts.push([
|
|
658
|
+
``,
|
|
659
|
+
`## 切片审查范围`,
|
|
660
|
+
``,
|
|
661
|
+
`⚠️ 未找到切片 ${classified.sliceId} 的文件列表。请检查 .soloforge/output/slice_plan.yaml 是否存在。`,
|
|
662
|
+
].join("\n"));
|
|
663
|
+
}
|
|
664
|
+
return {
|
|
665
|
+
result: {
|
|
666
|
+
parsed_command: parsed,
|
|
667
|
+
execution_result: {
|
|
668
|
+
...orchestrateResult,
|
|
669
|
+
slice_id: classified.sliceId,
|
|
670
|
+
slice_files: classified.files,
|
|
671
|
+
},
|
|
672
|
+
must_follow: injectionParts.join("\n") || undefined,
|
|
673
|
+
instruction: buildTopLevelInstruction(orchestrateResult, parsed),
|
|
674
|
+
hint,
|
|
675
|
+
},
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
// 兜底(不应到达)
|
|
679
|
+
return { result: { parsed_command: parsed, execution_result: { error: "未知的审查目标类型" }, hint } };
|
|
213
680
|
}
|
|
214
681
|
case "status": {
|
|
215
682
|
const pipeline = await sm.getCurrentPipeline();
|
|
@@ -275,19 +742,6 @@ export async function registerStateMachineTools(ctx) {
|
|
|
275
742
|
});
|
|
276
743
|
return { result: { parsed_command: parsed, execution_result: result, hint } };
|
|
277
744
|
}
|
|
278
|
-
case "brainstorm":
|
|
279
|
-
case "first_principles": {
|
|
280
|
-
return {
|
|
281
|
-
result: {
|
|
282
|
-
parsed_command: parsed,
|
|
283
|
-
execution_result: {
|
|
284
|
-
message: `Phase 2 功能:${parsed.verb} 将在确定性门禁第二级自动触发`,
|
|
285
|
-
topic: parsed.description,
|
|
286
|
-
},
|
|
287
|
-
hint,
|
|
288
|
-
},
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
745
|
// D13: 快捷路径
|
|
292
746
|
case "direct_answer": {
|
|
293
747
|
return {
|
|
@@ -303,14 +757,51 @@ export async function registerStateMachineTools(ctx) {
|
|
|
303
757
|
};
|
|
304
758
|
}
|
|
305
759
|
case "single_artifact": {
|
|
760
|
+
// ── 委托共享内核 — 按方案四层编排 ──
|
|
761
|
+
const projectPath = ctx.config?._projectPath ?? process.cwd();
|
|
762
|
+
// ── 获取当前管线 system_type(用于老系统产物过滤) ──
|
|
763
|
+
let currentSystemType;
|
|
764
|
+
try {
|
|
765
|
+
const pipeline = await sm.getCurrentPipeline();
|
|
766
|
+
if (pipeline)
|
|
767
|
+
currentSystemType = pipeline.system_type;
|
|
768
|
+
}
|
|
769
|
+
catch { /* 无管线时降级 */ }
|
|
770
|
+
// ── 单产物路径(原有逻辑不变) ──
|
|
771
|
+
// 从描述匹配 artifact kind(优先 description,回退 raw_text + stage)
|
|
772
|
+
const { inferArtifactKindFromDescription } = await import("../../../engine/pipeline/artifact_resolver.js");
|
|
773
|
+
const kind = inferArtifactKindFromDescription(parsed.description)
|
|
774
|
+
|| inferArtifactKindFromDescription(parsed.raw_text)
|
|
775
|
+
|| (parsed.stage ? inferArtifactKindFromDescription(parsed.stage) : undefined);
|
|
776
|
+
if (!kind) {
|
|
777
|
+
return {
|
|
778
|
+
result: {
|
|
779
|
+
parsed_command: parsed,
|
|
780
|
+
execution_result: {
|
|
781
|
+
mode: "single_artifact",
|
|
782
|
+
status: "error",
|
|
783
|
+
error: `无法识别产物: "${parsed.description}"。可用的产物类型:原型说明、架构设计、详细设计、接口设计、数据库设计等`,
|
|
784
|
+
},
|
|
785
|
+
hint,
|
|
786
|
+
},
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
// 委托共享内核完成四层编排
|
|
790
|
+
const { orchestrateSingleArtifact } = await import("../../../engine/pipeline/orchestrate_single_artifact.js");
|
|
791
|
+
const orchestrateResult = await orchestrateSingleArtifact({
|
|
792
|
+
kind,
|
|
793
|
+
operation: parsed.operation ?? "review",
|
|
794
|
+
projectPath,
|
|
795
|
+
original_command: parsed.raw_text,
|
|
796
|
+
systemType: currentSystemType,
|
|
797
|
+
});
|
|
306
798
|
return {
|
|
307
799
|
result: {
|
|
308
800
|
parsed_command: parsed,
|
|
309
|
-
execution_result:
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
},
|
|
801
|
+
execution_result: orchestrateResult,
|
|
802
|
+
// 将 injection_text 提升到顶层,确保 AI 将其作为必须执行的指令而非参考数据
|
|
803
|
+
must_follow: orchestrateResult.injection_text || undefined,
|
|
804
|
+
instruction: buildTopLevelInstruction(orchestrateResult, parsed),
|
|
314
805
|
hint,
|
|
315
806
|
},
|
|
316
807
|
};
|
|
@@ -321,7 +812,7 @@ export async function registerStateMachineTools(ctx) {
|
|
|
321
812
|
parsed_command: parsed,
|
|
322
813
|
execution_result: {
|
|
323
814
|
error: `无法识别的命令: "${args.text}"`,
|
|
324
|
-
available_verbs: ["开始", "
|
|
815
|
+
available_verbs: ["开始", "审查", "推进", "回退", "状态", "初始化", "诊断", "修复"],
|
|
325
816
|
},
|
|
326
817
|
},
|
|
327
818
|
};
|
|
@@ -392,25 +883,55 @@ export async function registerStateMachineTools(ctx) {
|
|
|
392
883
|
}
|
|
393
884
|
});
|
|
394
885
|
// ══════════════════════════════════════════════════
|
|
395
|
-
// sf_single_artifact —
|
|
886
|
+
// sf_single_artifact — 场景 B:结构化参数快捷入口
|
|
396
887
|
// ══════════════════════════════════════════════════
|
|
397
888
|
const SingleArtifactSchema = {
|
|
398
|
-
artifact_kind: z.string().max(100).describe("
|
|
399
|
-
|
|
400
|
-
|
|
889
|
+
artifact_kind: z.string().max(100).describe("产物类型(ArtifactKind):如 prototype_spec, design_doc, api_spec, detailed_design 等"),
|
|
890
|
+
operation: z.enum(["extract", "review", "fix", "iterate"]).optional().describe("操作类型:extract=生成, review=审查, fix=修改, iterate=迭代。默认 extract"),
|
|
891
|
+
intent: z.string().max(10_000).optional().describe("操作意图描述(可选)"),
|
|
401
892
|
};
|
|
402
|
-
registerSafeTool(TOOL.singleArtifact, "
|
|
893
|
+
registerSafeTool(TOOL.singleArtifact, "场景 B 快捷入口:单产物四层编排。传入 artifact_kind 和 operation,委托共享内核完成模板→引擎→规则→门禁编排", SingleArtifactSchema, async (args) => {
|
|
403
894
|
try {
|
|
404
|
-
|
|
405
|
-
//
|
|
895
|
+
const projectPath = ctx.projectPath ?? process.cwd();
|
|
896
|
+
// 获取当前管线 system_type
|
|
897
|
+
let singleSystemType;
|
|
898
|
+
try {
|
|
899
|
+
const pipeline = await sm.getCurrentPipeline();
|
|
900
|
+
if (pipeline)
|
|
901
|
+
singleSystemType = pipeline.system_type;
|
|
902
|
+
}
|
|
903
|
+
catch { /* 无管线时降级 */ }
|
|
904
|
+
const { orchestrateSingleArtifact } = await import("../../../engine/pipeline/orchestrate_single_artifact.js");
|
|
905
|
+
const { inferArtifactKindFromDescription, hasArtifactAlias } = await import("../../../engine/pipeline/artifact_resolver.js");
|
|
906
|
+
// 解析 kind:优先直接匹配,否则从描述推断
|
|
907
|
+
let kind = args.artifact_kind;
|
|
908
|
+
if (kind && !hasArtifactAlias(kind)) {
|
|
909
|
+
kind = inferArtifactKindFromDescription(args.artifact_kind) ?? undefined;
|
|
910
|
+
}
|
|
911
|
+
if (!kind) {
|
|
912
|
+
return {
|
|
913
|
+
result: {
|
|
914
|
+
mode: "single_artifact",
|
|
915
|
+
status: "error",
|
|
916
|
+
error: `无法识别产物类型: "${args.artifact_kind}"`,
|
|
917
|
+
},
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
// 委托共享内核
|
|
921
|
+
const orchestrateResult = await orchestrateSingleArtifact({
|
|
922
|
+
kind: kind,
|
|
923
|
+
operation: args.operation ?? "extract",
|
|
924
|
+
projectPath,
|
|
925
|
+
original_command: args.intent,
|
|
926
|
+
systemType: singleSystemType,
|
|
927
|
+
});
|
|
406
928
|
return {
|
|
407
929
|
result: {
|
|
408
|
-
|
|
409
|
-
|
|
930
|
+
execution_result: orchestrateResult,
|
|
931
|
+
// 与场景 A 保持一致:将 injection_text 提升为必须执行的指令
|
|
932
|
+
must_follow: orchestrateResult.injection_text || undefined,
|
|
933
|
+
instruction: buildTopLevelInstruction(orchestrateResult, { operation: args.operation ?? "extract", raw_text: args.intent }),
|
|
410
934
|
intent: args.intent,
|
|
411
|
-
scope: args.scope ?? [],
|
|
412
|
-
note: "单产物快速生成模式:跳过管线阶段流转",
|
|
413
|
-
suggestion: "生成完成后建议调用 sf_gate_check 进行质量验证",
|
|
414
935
|
},
|
|
415
936
|
};
|
|
416
937
|
}
|
|
@@ -418,5 +939,240 @@ export async function registerStateMachineTools(ctx) {
|
|
|
418
939
|
return { result: { error: String(err.message ?? err) } };
|
|
419
940
|
}
|
|
420
941
|
});
|
|
942
|
+
// ══════════════════════════════════════════════════
|
|
943
|
+
// sf_config_update — 配置更新
|
|
944
|
+
// ══════════════════════════════════════════════════
|
|
945
|
+
const ConfigUpdateSchema = {
|
|
946
|
+
updates: z.record(z.unknown()).describe("要更新的字段键值对。支持 dot-path(如 {\"delivery.auto_push\": true})"),
|
|
947
|
+
reason: z.string().max(500).optional().describe("更新原因(审计日志)"),
|
|
948
|
+
};
|
|
949
|
+
registerSafeTool(TOOL.configUpdate, "更新 intent.yaml 配置字段。AI 写入项目意图声明的唯一入口。支持 dot-path 设置。自动校验 + 写入后验证配置完整性", ConfigUpdateSchema, async (args) => {
|
|
950
|
+
try {
|
|
951
|
+
const { loadIntent, saveIntent } = await import("../../../engine/config/intent.js");
|
|
952
|
+
const { validateForWrite } = await import("../../../engine/config/intent_schema.js");
|
|
953
|
+
const { resolveConfig, checkConfigReadiness } = await import("../../../engine/config/resolver.js");
|
|
954
|
+
const { debug } = await import("../../../engine/core/logger.js");
|
|
955
|
+
const projectRoot = ctx.projectPath;
|
|
956
|
+
if (!projectRoot) {
|
|
957
|
+
return { result: { error: "无法确定项目根目录" } };
|
|
958
|
+
}
|
|
959
|
+
debug("配置更新", "sf_config_update 调用", args.updates);
|
|
960
|
+
// 1. 加载当前 intent
|
|
961
|
+
const current = await loadIntent(projectRoot);
|
|
962
|
+
// 2. 安全守卫:禁止写入内部字段(必须在 applyDotPathUpdates 之前检查)
|
|
963
|
+
for (const key of Object.keys(args.updates)) {
|
|
964
|
+
if (key.startsWith("_")) {
|
|
965
|
+
return { result: { error: `禁止写入内部字段: ${key}` } };
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
// 3. 应用 updates(支持 dot-path)
|
|
969
|
+
const updated = applyDotPathUpdates(current, args.updates);
|
|
970
|
+
// 4. 补充 product_profile(首次写入可能没有)
|
|
971
|
+
if (!updated.product_profile) {
|
|
972
|
+
updated.product_profile = "default";
|
|
973
|
+
}
|
|
974
|
+
// 5. 严格校验
|
|
975
|
+
const validation = validateForWrite(updated);
|
|
976
|
+
if (!validation.success) {
|
|
977
|
+
const issues = validation.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ");
|
|
978
|
+
return { result: { error: `校验失败: ${issues}` } };
|
|
979
|
+
}
|
|
980
|
+
// 6. 写入
|
|
981
|
+
await saveIntent(projectRoot, validation.data);
|
|
982
|
+
// 7. 重新解析验证配置完整性
|
|
983
|
+
const newConfig = await resolveConfig(projectRoot);
|
|
984
|
+
const readiness = checkConfigReadiness(newConfig);
|
|
985
|
+
return {
|
|
986
|
+
result: {
|
|
987
|
+
status: "ok",
|
|
988
|
+
updated_fields: Object.keys(args.updates),
|
|
989
|
+
reason: args.reason,
|
|
990
|
+
config_readiness: readiness,
|
|
991
|
+
hint: readiness.ready
|
|
992
|
+
? "配置完整"
|
|
993
|
+
: `配置仍缺少: ${readiness.missing.join(", ")}。请继续通过 sf_config_update 补充。`,
|
|
994
|
+
},
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
catch (err) {
|
|
998
|
+
return { result: { error: String(err.message ?? err) } };
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
// ── 辅助函数 ──
|
|
1003
|
+
/**
|
|
1004
|
+
* 为单产物编排结果生成顶层指令。
|
|
1005
|
+
*
|
|
1006
|
+
* 将四层编排的 injection_text 从"参考数据"提升为"必须执行的指令",
|
|
1007
|
+
* 确保 AI 不会在审查后停下来,而是自动执行 修复→重审→直到通过 的循环。
|
|
1008
|
+
*
|
|
1009
|
+
* @visibleForTesting — 仅用于防回归测试导出,不供外部消费者使用。
|
|
1010
|
+
*/
|
|
1011
|
+
export function buildTopLevelInstruction(result, parsed) {
|
|
1012
|
+
const status = result.status;
|
|
1013
|
+
const targetName = result.target_name;
|
|
1014
|
+
const targetPaths = result.target_paths;
|
|
1015
|
+
// 非 ready 状态 — 给出明确动作指引
|
|
1016
|
+
if (status === "missing_upstream") {
|
|
1017
|
+
const suggestedAction = result.suggested_action;
|
|
1018
|
+
const originalTask = result.original_task;
|
|
1019
|
+
return [
|
|
1020
|
+
`⚠️ 上游产物缺失,无法直接执行当前操作。`,
|
|
1021
|
+
``,
|
|
1022
|
+
suggestedAction?.produce_first ?? `请先产出缺失的上游产物。`,
|
|
1023
|
+
suggestedAction?.then_resume ?? `上游就绪后重新执行。`,
|
|
1024
|
+
originalTask?.command ? `\n原任务命令: ${originalTask.command}` : "",
|
|
1025
|
+
].filter(Boolean).join("\n");
|
|
1026
|
+
}
|
|
1027
|
+
if (status === "error" || status === "no_template") {
|
|
1028
|
+
return `❌ 编排失败: ${result.error ?? "未知错误"}`;
|
|
1029
|
+
}
|
|
1030
|
+
// ready 状态 — 构建明确执行指令
|
|
1031
|
+
const operation = result.operation ?? parsed.operation ?? "review";
|
|
1032
|
+
const pathList = targetPaths?.length ? targetPaths.join("、") : "产物文件";
|
|
1033
|
+
if (operation === "extract") {
|
|
1034
|
+
return [
|
|
1035
|
+
`📋 你现在必须执行「${targetName}」的创建。禁止产出空洞内容。`,
|
|
1036
|
+
``,
|
|
1037
|
+
`执行步骤(不可跳过、不可简化):`,
|
|
1038
|
+
`1. 阅读 execution_result.injection_text 中的规则和门禁(含万物执行基线)`,
|
|
1039
|
+
`2. 参考模板结构(template_body),每个章节必须填写完整内容`,
|
|
1040
|
+
`3. 结合上游产物内容(upstream_inputs),穷尽所有实体/流程/字段`,
|
|
1041
|
+
`4. 产出完整产物并写入: ${pathList}`,
|
|
1042
|
+
`5. 产出后执行完整性自检:逐条核对门禁,引用产物原文作为证据`,
|
|
1043
|
+
`6. 任何门禁无证据 → 立即补充内容,不要停下来`,
|
|
1044
|
+
``,
|
|
1045
|
+
`⚠️ 绝对不允许留空章节、使用占位符、或以「上游未提供」为由省略内容。`,
|
|
1046
|
+
`⚠️ 绝对不允许跳过完整性自检。`,
|
|
1047
|
+
].join("\n");
|
|
1048
|
+
}
|
|
1049
|
+
// review / fix / iterate — 对抗性审查-修复协议(强制)
|
|
1050
|
+
return [
|
|
1051
|
+
`🔥 你是严格的质量审查员。你的职责是发现问题,不是放行。`,
|
|
1052
|
+
``,
|
|
1053
|
+
`必须严格遵守 execution_result.must_follow 中的全部规则(含万物执行基线 + 对抗性审查协议)。`,
|
|
1054
|
+
``,
|
|
1055
|
+
`执行步骤(不可跳过、不可简化):`,
|
|
1056
|
+
`1. 逐条读取门禁检查项,对每条引用产物原文作为证据`,
|
|
1057
|
+
`2. 无证据的 ✅ 等同于 ❌ — 你必须引用章节名或行号`,
|
|
1058
|
+
`3. 对每一个 ❌/⚠️ 项:立即修复,不允许停下来问用户`,
|
|
1059
|
+
`4. 修复后重写完整产物到: ${pathList}`,
|
|
1060
|
+
`5. 修复完成后,必须调用 [sf] 审查 进行独立重审`,
|
|
1061
|
+
`6. 如果重审仍有问题 → 继续修复(最多 5 轮)`,
|
|
1062
|
+
``,
|
|
1063
|
+
`⚠️ 绝对不允许只输出审查报告就停下来。`,
|
|
1064
|
+
`⚠️ 绝对不允许无证据地批量标记 ✅。`,
|
|
1065
|
+
`⚠️ 独立重审是强制步骤,不是可选建议。`,
|
|
1066
|
+
].join("\n");
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* 为阶段级审查生成顶层指令。
|
|
1070
|
+
*
|
|
1071
|
+
* 告诉 AI 必须审查该阶段全部产出,发现问题后逐个修复,直到全部通过。
|
|
1072
|
+
*
|
|
1073
|
+
* @visibleForTesting — 仅用于防回归测试导出,不供外部消费者使用。
|
|
1074
|
+
*/
|
|
1075
|
+
export function buildStageReviewInstruction(result, parsed) {
|
|
1076
|
+
const status = result.status;
|
|
1077
|
+
const stage = result.stage ?? parsed.stage ?? "未知阶段";
|
|
1078
|
+
if (status === "no_artifacts" || status === "error") {
|
|
1079
|
+
return `❌ 阶段「${stage}」没有可审查的产物: ${result.error ?? "未知错误"}`;
|
|
1080
|
+
}
|
|
1081
|
+
const artifactResults = result.artifact_results;
|
|
1082
|
+
const readyCount = artifactResults?.filter((r) => r.status === "ready").length ?? 0;
|
|
1083
|
+
const partialCount = artifactResults?.filter((r) => r.status !== "ready").length ?? 0;
|
|
1084
|
+
return [
|
|
1085
|
+
`🔥 你是严格的质量审查员。你的职责是发现问题,不是放行。`,
|
|
1086
|
+
``,
|
|
1087
|
+
`阶段共 ${readyCount} 个产物需要审查${partialCount > 0 ? `,${partialCount} 个产物因缺失上游被跳过` : ""}。`,
|
|
1088
|
+
``,
|
|
1089
|
+
`必须严格遵守 execution_result.must_follow 中的全部规则(含万物执行基线 + 对抗性审查协议)。`,
|
|
1090
|
+
``,
|
|
1091
|
+
`审查原则(违反任何一条等同审查失败):`,
|
|
1092
|
+
`1. 默认立场:每一条门禁检查项都是 ❌,除非你能引用产物中的具体内容作为证据`,
|
|
1093
|
+
`2. 无证据的 ✅ 等同于 ❌ — 你必须引用章节名或行号 + 原文`,
|
|
1094
|
+
`3. 禁止批量标记 ✅ — 每条必须独立检查并附证据`,
|
|
1095
|
+
`4. 禁止跳过任何检查项`,
|
|
1096
|
+
``,
|
|
1097
|
+
`执行步骤(不可跳过、不可简化):`,
|
|
1098
|
+
`1. 逐个审查阶段内的所有产物,对每条门禁引用产物原文作为证据`,
|
|
1099
|
+
`2. 检查跨产物一致性(术语、引用、覆盖、冲突),引用两个产物中的对应内容`,
|
|
1100
|
+
`3. 对每一个 ❌/⚠️ 项:立即修复,不允许停下来问用户`,
|
|
1101
|
+
`4. 修复后重写完整产物到对应文件`,
|
|
1102
|
+
`5. 修复完成后,必须调用 [sf] 审查 ${stage} 进行独立重审`,
|
|
1103
|
+
`6. 如果重审仍有问题 → 继续修复(最多 5 轮)`,
|
|
1104
|
+
``,
|
|
1105
|
+
`⚠️ 绝对不允许只输出审查报告就停下来。`,
|
|
1106
|
+
`⚠️ 绝对不允许无证据地批量标记 ✅。`,
|
|
1107
|
+
`⚠️ 独立重审是强制步骤,不是可选建议。`,
|
|
1108
|
+
].join("\n");
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* 为 execute-stage 结果生成执行指令。
|
|
1112
|
+
*
|
|
1113
|
+
* 将 companion_injection 中的规则/门禁从"参考数据"提升为"必须执行",
|
|
1114
|
+
* 并将 trigger 信号(头脑风暴/第一性原理/抽象模型)转化为 AI 指令。
|
|
1115
|
+
*/
|
|
1116
|
+
export function buildExecuteStageInstruction(result) {
|
|
1117
|
+
const stage = result.stage ?? "当前阶段";
|
|
1118
|
+
const lines = [];
|
|
1119
|
+
lines.push(`🔧 你现在必须执行「${stage}」阶段的工作。`);
|
|
1120
|
+
lines.push("");
|
|
1121
|
+
lines.push("必须严格遵守以下规则和门禁(含万物执行基线):");
|
|
1122
|
+
lines.push("");
|
|
1123
|
+
// 头脑风暴触发
|
|
1124
|
+
const bsTrigger = result.brainstorm_trigger;
|
|
1125
|
+
if (bsTrigger) {
|
|
1126
|
+
lines.push("⚠️ **风险检测触发头脑风暴(强制)**");
|
|
1127
|
+
lines.push(`原因: ${bsTrigger.reason}`);
|
|
1128
|
+
lines.push(`要求: ${bsTrigger.suggestion}`);
|
|
1129
|
+
lines.push("在执行阶段工作前,你必须先完成头脑风暴方案探索。");
|
|
1130
|
+
lines.push("");
|
|
1131
|
+
}
|
|
1132
|
+
// 第一性原理触发
|
|
1133
|
+
const fpTrigger = result.first_principles_trigger;
|
|
1134
|
+
if (fpTrigger) {
|
|
1135
|
+
lines.push("⚠️ **FP 规则触发第一性原理推理(强制)**");
|
|
1136
|
+
lines.push(`原因: ${fpTrigger.reason}`);
|
|
1137
|
+
lines.push(`要求: ${fpTrigger.suggestion}`);
|
|
1138
|
+
lines.push("在执行阶段工作前,你必须先从第一性原理重新审视决策。");
|
|
1139
|
+
lines.push("");
|
|
1140
|
+
}
|
|
1141
|
+
// 抽象模型触发
|
|
1142
|
+
const amTrigger = result.abstract_model_trigger;
|
|
1143
|
+
if (amTrigger) {
|
|
1144
|
+
lines.push("⚠️ **抽象缺失触发抽象建模(强制)**");
|
|
1145
|
+
lines.push(`原因: ${amTrigger.reason}`);
|
|
1146
|
+
lines.push(`要求: ${amTrigger.suggestion}`);
|
|
1147
|
+
lines.push("在执行阶段工作前,你必须先对核心概念进行抽象建模:识别领域实体、提取通用模式、建立概念关系。");
|
|
1148
|
+
lines.push("");
|
|
1149
|
+
}
|
|
1150
|
+
lines.push("执行纪律(不可违反):");
|
|
1151
|
+
lines.push("1. 先读 must_follow 中的全部规则,理解每条规则的约束");
|
|
1152
|
+
lines.push("2. 执行阶段工作时,每一步都必须符合规则要求");
|
|
1153
|
+
lines.push("3. 如果规则要求提供证据 — 必须引用你产出的具体内容");
|
|
1154
|
+
lines.push("4. 如果门禁检查有 ❌ 项 — 立即修复,不允许跳过");
|
|
1155
|
+
lines.push("5. 不可以「简化」或「跳过」任何规则要求的步骤");
|
|
1156
|
+
lines.push("");
|
|
1157
|
+
lines.push("⚠️ 绝对不允许忽略 must_follow 中的任何规则。");
|
|
1158
|
+
lines.push("⚠️ 绝对不允许产出不完整的阶段交付物。");
|
|
1159
|
+
return lines.join("\n");
|
|
1160
|
+
}
|
|
1161
|
+
/** 应用 dot-path updates 到对象 */
|
|
1162
|
+
function applyDotPathUpdates(target, updates) {
|
|
1163
|
+
const result = { ...target };
|
|
1164
|
+
for (const [key, value] of Object.entries(updates)) {
|
|
1165
|
+
const parts = key.split(".");
|
|
1166
|
+
let obj = result;
|
|
1167
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
1168
|
+
const part = parts[i];
|
|
1169
|
+
if (!(part in obj) || typeof obj[part] !== "object" || obj[part] === null) {
|
|
1170
|
+
obj[part] = {};
|
|
1171
|
+
}
|
|
1172
|
+
obj = obj[part];
|
|
1173
|
+
}
|
|
1174
|
+
obj[parts[parts.length - 1]] = value;
|
|
1175
|
+
}
|
|
1176
|
+
return result;
|
|
421
1177
|
}
|
|
422
1178
|
//# sourceMappingURL=state_machine.js.map
|