minimal-agent 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -8
- package/package.json +34 -1
- package/plugins/cron-runner/.claude-plugin/plugin.json +5 -0
- package/plugins/cron-runner/commands/cron.md +26 -0
- package/plugins/cron-runner/commands/crons.md +7 -0
- package/plugins/cron-runner/plugin.js +34 -0
- package/plugins/cron-runner/src/commands.js +348 -0
- package/plugins/cron-runner/src/cronTime.js +148 -0
- package/plugins/cron-runner/src/lock.js +68 -0
- package/plugins/cron-runner/src/runs.js +89 -0
- package/plugins/cron-runner/src/scheduleEngine.js +72 -0
- package/plugins/cron-runner/src/scheduler.js +355 -0
- package/plugins/cron-runner/src/schema.js +140 -0
- package/plugins/cron-runner/src/service.js +167 -0
- package/plugins/cron-runner/src/store.js +298 -0
- package/plugins/cron-runner/src/types.js +1 -0
- package/plugins/workflow-runner/commands/workflow.md +4 -4
- package/plugins/workflow-runner/commands/workflows.md +1 -1
- package/plugins/workflow-runner/plugin.js +2 -1
- package/plugins/workflow-runner/src/agentCommon.js +172 -9
- package/plugins/workflow-runner/src/dslManifest.js +72 -0
- package/plugins/workflow-runner/src/expressions.js +150 -13
- package/plugins/workflow-runner/src/index.js +39 -8
- package/plugins/workflow-runner/src/loader.js +216 -64
- package/plugins/workflow-runner/src/multimodal.js +37 -0
- package/plugins/workflow-runner/src/recovery.js +26 -24
- package/plugins/workflow-runner/src/runner.js +693 -287
- package/plugins/workflow-runner/src/stepExecutors/agent.js +126 -37
- package/plugins/workflow-runner/src/stepExecutors/assert.js +3 -2
- package/plugins/workflow-runner/src/stepExecutors/llm.js +38 -30
- package/plugins/workflow-runner/src/stepExecutors/skill.js +27 -38
- package/plugins/workflow-runner/src/stepExecutors/tool.js +56 -3
- package/plugins/workflow-runner/src/stepExecutors/verify.js +19 -10
- package/plugins/workflow-runner/src/taskIdentity.js +185 -30
- package/plugins/workflow-runner/src/types.js +18 -7
- package/plugins/workflow-runner/src/workflowState.js +355 -55
- package/skills/ai-image/SKILL.md +89 -0
- package/skills/ai-image/scripts/generate.mjs +497 -0
- package/skills/ai-image/scripts/generate_from_plan.mjs +469 -0
- package/skills/ai-image/scripts/generate_from_plan_test.mjs +223 -0
- package/skills/ai-image/scripts/generate_test.mjs +74 -0
- package/skills/browser-automation/SKILL.md +47 -0
- package/skills/docx/SKILL.md +25 -3
- package/skills/docx/scripts/office/helpers/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/helpers/__pycache__/merge_runs.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/helpers/__pycache__/simplify_redlines.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/base.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/docx.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/pptx.cpython-314.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/redlining.cpython-314.pyc +0 -0
- package/skills/docx/scripts/opc_check.py +253 -0
- package/skills/image-gen-openrouter/SKILL.md +10 -2
- package/skills/image-stats/SKILL.md +65 -0
- package/skills/image-stats/scripts/__pycache__/image_stats.cpython-314.pyc +0 -0
- package/skills/image-stats/scripts/__pycache__/image_stats_test.cpython-314.pyc +0 -0
- package/skills/image-stats/scripts/image_stats.py +368 -0
- package/skills/image-stats/scripts/image_stats_test.py +181 -0
- package/skills/pptx/SKILL.md +123 -95
- package/skills/pptx/design.md +82 -0
- package/skills/pptx/examples/README.md +29 -0
- package/skills/pptx/examples/hybrid_example.mjs +107 -0
- package/skills/pptx/examples/hybrid_example.pptx +0 -0
- package/skills/pptx/pptxgenjs.md +41 -0
- package/skills/pptx/scripts/deck_helpers.mjs +224 -0
- package/skills/pptx/scripts/layout_lint.py +293 -0
- package/skills/pptx/scripts/layout_lint_test.py +160 -0
- package/skills/pptx/scripts/opc_check.py +339 -0
- package/skills/pptx/scripts/svg_fallback.mjs +145 -0
- package/skills/pptx/svg.md +67 -0
- package/skills/tts-zh/SKILL.md +19 -2
- package/skills/ui-design/SKILL.md +158 -0
- package/skills/ui-design/claude_design.md +309 -0
- package/skills/ui-design/evals/evals.json +254 -0
- package/skills/ui-design/references/aesthetic-direction.md +83 -0
- package/skills/ui-design/references/claude-design-protocol.md +36 -0
- package/skills/ui-design/references/design-context.md +53 -0
- package/skills/ui-design/references/design-execution-playbook.md +82 -0
- package/skills/ui-design/references/export-pptx.md +124 -0
- package/skills/ui-design/references/layout-composition.md +654 -0
- package/skills/ui-design/references/preview-feedback.md +37 -0
- package/skills/ui-design/references/source-image-layout.md +189 -0
- package/skills/ui-design/references/starter-components.md +78 -0
- package/skills/ui-design/references/vi-aegis-vector.md +144 -0
- package/skills/ui-design/references/vi-amber-prism.md +133 -0
- package/skills/ui-design/references/vi-aqua-glass.md +200 -0
- package/skills/ui-design/references/vi-comfort-vision.md +147 -0
- package/skills/ui-design/references/vi-ember-prism.md +140 -0
- package/skills/ui-design/references/vi-nebula-console.md +151 -0
- package/skills/ui-design/references/vi-obsidian-optics.md +139 -0
- package/skills/ui-design/references/vi-obsidian-xui.md +143 -0
- package/skills/ui-design/references/vi-precision-horizon-dark.md +117 -0
- package/skills/ui-design/references/vi-precision-horizon.md +215 -0
- package/skills/ui-design/references/vi-solar-relay.md +130 -0
- package/skills/ui-design/references/vi-template-workflow.md +48 -0
- package/skills/ui-design/references/vi-verdant-grid.md +141 -0
- package/skills/ui-design/references/vi-violet-meridian.md +172 -0
- package/skills/ui-design/scripts/__pycache__/assemble_material.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/assemble_material_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/chart_sanity_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/check_language_policy.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/check_ui_artifact.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/check_ui_artifact_pptx_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_pages_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_pages_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_visual_style_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/deck_visual_style_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_budget_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_budget_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_repair_hints.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_repair_hints_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_style_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/design_style_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/draft_coverage_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/extract_source_assets.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/extract_source_assets_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/generated_image_review_collect.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/generated_image_review_collect_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_plan_lint.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_plan_lint_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_prompt_rewrite.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/image_prompt_rewrite_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/layout_balance.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/layout_balance_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/normalize_design_json.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/normalize_design_json_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/plan_source_layout.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/plan_source_layout_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_hint.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_hint_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_input.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/resolve_source_input_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/scaffold_ui_artifact.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/source_usage_check.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/source_usage_check_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/text_readability_pixel.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/visual_quality_gate.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/__pycache__/visual_quality_gate_test.cpython-314.pyc +0 -0
- package/skills/ui-design/scripts/assemble_material.py +217 -0
- package/skills/ui-design/scripts/assemble_material_test.py +149 -0
- package/skills/ui-design/scripts/browser_check_ui_artifact.mjs +221 -0
- package/skills/ui-design/scripts/chart_sanity_check.py +261 -0
- package/skills/ui-design/scripts/chart_sanity_check_test.py +165 -0
- package/skills/ui-design/scripts/check_language_policy.py +351 -0
- package/skills/ui-design/scripts/check_ui_artifact.py +435 -0
- package/skills/ui-design/scripts/check_ui_artifact_pptx_test.py +251 -0
- package/skills/ui-design/scripts/deck_pages_check.py +158 -0
- package/skills/ui-design/scripts/deck_pages_check_test.py +134 -0
- package/skills/ui-design/scripts/deck_visual_style_check.py +767 -0
- package/skills/ui-design/scripts/deck_visual_style_check_test.py +713 -0
- package/skills/ui-design/scripts/design_budget_check.py +271 -0
- package/skills/ui-design/scripts/design_budget_check_test.py +183 -0
- package/skills/ui-design/scripts/design_repair_hints.py +162 -0
- package/skills/ui-design/scripts/design_repair_hints_test.py +54 -0
- package/skills/ui-design/scripts/design_style_check.py +397 -0
- package/skills/ui-design/scripts/design_style_check_test.py +233 -0
- package/skills/ui-design/scripts/draft_coverage_check.py +184 -0
- package/skills/ui-design/scripts/draft_coverage_check_test.py +131 -0
- package/skills/ui-design/scripts/export_pptx_from_html.mjs +2367 -0
- package/skills/ui-design/scripts/extract_source_assets.py +607 -0
- package/skills/ui-design/scripts/extract_source_assets_test.py +256 -0
- package/skills/ui-design/scripts/generated_image_review_collect.py +206 -0
- package/skills/ui-design/scripts/generated_image_review_collect_test.py +91 -0
- package/skills/ui-design/scripts/image_plan_lint.py +571 -0
- package/skills/ui-design/scripts/image_plan_lint_test.py +515 -0
- package/skills/ui-design/scripts/image_prompt_rewrite.py +713 -0
- package/skills/ui-design/scripts/image_prompt_rewrite_test.py +966 -0
- package/skills/ui-design/scripts/layout_balance.py +881 -0
- package/skills/ui-design/scripts/layout_balance_test.py +927 -0
- package/skills/ui-design/scripts/normalize_design_json.py +272 -0
- package/skills/ui-design/scripts/normalize_design_json_test.py +119 -0
- package/skills/ui-design/scripts/plan_source_layout.py +1450 -0
- package/skills/ui-design/scripts/plan_source_layout_test.py +1136 -0
- package/skills/ui-design/scripts/resolve_source_input.py +270 -0
- package/skills/ui-design/scripts/resolve_source_input_test.py +98 -0
- package/skills/ui-design/scripts/scaffold_ui_artifact.py +377 -0
- package/skills/ui-design/scripts/source_usage_check.py +581 -0
- package/skills/ui-design/scripts/source_usage_check_test.py +427 -0
- package/skills/ui-design/scripts/text_readability_pixel.py +340 -0
- package/skills/ui-design/scripts/text_readability_pixel_test.py +219 -0
- package/skills/ui-design/scripts/visual_quality_gate.py +301 -0
- package/skills/ui-design/scripts/visual_quality_gate_test.py +233 -0
- package/skills/ui-design/tests/e2e/prompts/deck.md +19 -0
- package/skills/ui-design/tests/e2e/prompts/webpage.md +17 -0
- package/skills/ui-design/tests/e2e/render_check.mjs +101 -0
- package/skills/ui-design/tests/e2e/rubric.json +54 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/checks/language-check.txt +12 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/checks/static-check.txt +15 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/outputs/index.html +837 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/prompt.md +12 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/review.md +21 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/aegis-vector-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/outputs/homepage.html +373 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/outputs/platform.html +378 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/review.md +26 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/homepage/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/homepage/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/homepage/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/platform/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/platform/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/amber-prism-screenshot-check-1/screenshots/platform/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/outputs/index.html +656 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/prompt.md +12 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-1/render_check.mjs +67 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/outputs/index.html +587 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/prompt.md +12 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-iteration-2/review.md +36 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/checks/language-check.txt +8 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/checks/static-check.txt +16 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/outputs/index.html +739 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/prompt.md +11 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/review.md +22 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/aqua-glass-volcano-refresh-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/checks/browser-check.json +52 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/outputs/index.html +641 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/comfort-vision-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/outputs/index.html +467 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/screenshots/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-red-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/outputs/homepage.html +373 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/outputs/platform.html +378 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/review.md +26 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/homepage/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/homepage/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/homepage/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/platform/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/platform/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/ember-prism-screenshot-check-1/screenshots/platform/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/checks/language-check.txt +4 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/execution_notes.md +10 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/outputs/index.html +587 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/prompt.md +14 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/review.md +13 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/empty-agent-protocol-check/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/checks/browser-check.json +24 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/execution_notes.md +21 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/outputs/deck.html +451 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/screenshots/slide-01.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/deck/screenshots/slide-02.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/review.md +79 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/checks/browser-check.json +26 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/execution_notes.md +20 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/outputs/index.html +534 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/iteration-1/webpage/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/browser-check.json +64 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/language-check.txt +7 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/static-console.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/checks/static-homepage.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/outputs/console.html +600 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/outputs/homepage.html +556 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/prompt.md +29 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/review.md +57 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/console-desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/console-mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/homepage-desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/nebula-console-iteration-1/screenshots/homepage-mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/browser-check.json +33 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/language-check.txt +6 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/outputs/index.html +682 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/review.md +59 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-optics-iteration-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/outputs/page-01.html +466 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/outputs/page-02.html +433 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/prompt.md +13 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-01/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-01/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-01/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-02/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-02/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/obsidian-xui-screenshot-check-1/screenshots/page-02/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/checks/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/checks/language-check.txt +3 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/execution_notes.md +24 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/outputs/index.html +723 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/prompt.md +15 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/review.md +26 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/browser-dark.json +49 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/browser-light.json +49 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/language-check.txt +11 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/static-dark.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/checks/static-light.txt +3 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/execution_notes.md +23 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/outputs/dark.html +392 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/outputs/light.html +476 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/prompt.md +23 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/review.md +41 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/dark/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/dark/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/light/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/precision-horizon-iteration-2/screenshots/light/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/browser-check.json +54 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/language-check.txt +5 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/outputs/index.html +765 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/prompt.md +15 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/review.md +59 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/solar-relay-iteration-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/outputs/index.html +508 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/screenshots/browser-check.json +49 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/verdant-grid-preview-1/screenshots/mobile.png +0 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/browser-check.json +54 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/language-check.txt +6 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/quick-validate.txt +1 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/checks/static-check.txt +2 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/outputs/index.html +788 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/prompt.md +14 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/review.md +60 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/screenshots/desktop.png +0 -0
- package/skills/ui-design/tests/e2e/runs/violet-meridian-iteration-1/screenshots/mobile.png +0 -0
- package/skills/video-compose/SKILL.md +8 -1
- package/skills/web-crawler/SKILL.md +70 -0
- package/skills/web-crawler/scripts/crawl.mjs +538 -0
- package/skills/web-crawler/scripts/crawl.test.mjs +204 -0
- package/skills/xlsx/SKILL.md +12 -0
- package/skills/xlsx/scripts/opc_check.py +253 -0
- package/src/advisorState.js +22 -0
- package/src/askBridge.js +87 -3
- package/src/bootstrap/workingDir.js +12 -1
- package/src/cli/args.js +17 -1
- package/src/cli/configMenu.js +236 -0
- package/src/cli/configWizard.js +7 -5
- package/src/cli/print.js +37 -4
- package/src/cli/streamJson.js +77 -24
- package/src/cli/wizards/advisorWizard.js +147 -0
- package/src/cli/wizards/fieldForm.js +149 -0
- package/src/cli/wizards/imageWizard.js +60 -0
- package/src/cli/wizards/openRouterWizard.js +23 -0
- package/src/cli/wizards/providerPresets.js +95 -0
- package/src/cli/wizards/providerWizard.js +219 -0
- package/src/cli/wizards/searchWizard.js +23 -0
- package/src/cli/wizards/ttsWizard.js +34 -0
- package/src/config/configFile.js +441 -83
- package/src/config/configService.js +446 -0
- package/src/config.js +24 -64
- package/src/context/agentHome.js +9 -0
- package/src/context/archive.js +3 -2
- package/src/context/compact.js +8 -5
- package/src/context/contextLock.js +81 -0
- package/src/context/persistContext.js +30 -11
- package/src/context/reactiveCompact.js +4 -2
- package/src/context/recentDirs.js +21 -61
- package/src/context/sessionPath.js +97 -23
- package/src/context/sessionRegistry.js +303 -24
- package/src/context/tokenCounter.js +18 -0
- package/src/context/workspaceIndex.js +731 -0
- package/src/infra/verification.js +3 -2
- package/src/llm/client.js +293 -206
- package/src/llm/providers/anthropicFormat.js +241 -0
- package/src/llm/providers/openaiFormat.js +190 -0
- package/src/loop.js +211 -27
- package/src/main.js +61 -11
- package/src/messageQueue.js +97 -0
- package/src/multimodal.js +203 -0
- package/src/plugin-sdk.js +15 -0
- package/src/plugins/commandRouter.js +3 -0
- package/src/plugins/hookEngine.js +5 -1
- package/src/plugins/pluginLifecycle.js +28 -0
- package/src/plugins/pluginRunner.js +40 -0
- package/src/plugins/transcript.js +4 -3
- package/src/prompts/pluginList.js +2 -2
- package/src/prompts/projectInstructions.js +3 -3
- package/src/prompts/promptAssembly.js +133 -109
- package/src/prompts/skillList.js +12 -22
- package/src/session/runAgentTurn.js +70 -0
- package/src/session/runTurn.js +41 -6
- package/src/toolGate.js +17 -0
- package/src/tools/advisor/advisor.js +379 -0
- package/src/tools/agent/agent.js +555 -0
- package/src/tools/agent/agentTypes.js +59 -0
- package/src/tools/agent/coordinator.js +93 -0
- package/src/tools/agent/worktree.js +270 -0
- package/src/tools/ask/ask.js +7 -2
- package/src/tools/bash/bash.js +112 -18
- package/src/tools/download/download.js +144 -0
- package/src/tools/edit/edit.js +1 -0
- package/src/tools/edit/multi-edit.js +1 -0
- package/src/tools/genimage/genimage.js +242 -0
- package/src/tools/genspeech/genspeech.js +67 -0
- package/src/tools/glob/glob.js +1 -0
- package/src/tools/grep/grep.js +3 -0
- package/src/tools/grep/rgPath.js +2 -0
- package/src/tools/index.js +25 -2
- package/src/tools/read/read.js +1 -0
- package/src/tools/shared/killTree.js +52 -0
- package/src/tools/toolProgressBridge.js +48 -0
- package/src/tools/webbrowser/agentBrowserPath.js +258 -0
- package/src/tools/webbrowser/browser.js +59 -42
- package/src/tools/webbrowser/browserControl.js +118 -0
- package/src/tools/webbrowser/browserDaemon.js +97 -0
- package/src/tools/webbrowser/browserService.js +27 -0
- package/src/tools/webbrowser/browserStream.js +119 -0
- package/src/tools/webbrowser/webbrowser.js +699 -130
- package/src/tools/webfetch/webfetch.js +1 -0
- package/src/tools/websearch/websearch.js +134 -51
- package/src/tools/write/write.js +1 -0
- package/src/ui/App.js +249 -22
- package/src/ui/AskQuestion.js +19 -17
- package/src/ui/InputBox.js +34 -9
- package/src/ui/LiveArea.js +112 -19
- package/src/ui/MessageList.js +100 -14
- package/src/ui/ModelPicker.js +56 -0
- package/src/ui/QueuedMessagesBanner.js +14 -0
- package/src/ui/Root.js +18 -10
- package/src/ui/SessionPicker.js +102 -0
- package/src/ui/StatusLine.js +13 -4
- package/src/ui/WorkspacePicker.js +55 -0
- package/src/ui/figures.js +44 -0
- package/src/ui/hooks/askSlot.js +82 -0
- package/src/ui/hooks/useChat.js +345 -64
- package/src/ui/hooks/usePasteHandler.js +11 -1
- package/src/ui/hooks/useTextBuffer.js +1 -3
- package/src/ui/liveViewport.js +5 -1
- package/src/ui/markdown.js +206 -0
- package/src/ui/textBuffer.js +0 -7
- package/src/ui/theme.js +32 -0
- package/src/utils/debugLog.js +0 -4
- package/src/utils/resourcePaths.js +2 -2
- package/src/utils/stripThink.js +50 -0
- package/src/web/browserBridge.js +447 -0
- package/src/web/protocol.js +19 -0
- package/workflows/adaptive-research.yaml +9 -2
- package/workflows/book-review-short.yaml +31 -7
- package/workflows/e2e-write-greet.yaml +3 -0
- package/workflows/illustrate.yaml +227 -0
- package/workflows/plan.yaml +437 -207
- package/workflows/ppt.yaml +1659 -0
- package/workflows/ralph-loop.yaml +142 -112
- package/workflows/schema.json +81 -23
- package/workflows/webppt.yaml +496 -0
- package/workflows/word.yaml +710 -0
- package/workflows/youtube-shorts.yaml +38 -10
- package/MINIMAL-TRACE.md +0 -77
- package/plugins/workflow-runner/src/voteHelpers.js +0 -110
- package/skills/config/SKILL.md +0 -123
- package/skills/frontend-design/LICENSE.txt +0 -177
- package/skills/frontend-design/SKILL.md +0 -42
- package/skills/pptx/scripts/office/__pycache__/soffice.cpython-314.pyc +0 -0
- package/src/ui/ProgressPanel.js +0 -54
- package/src/ui/StreamingBlock.js +0 -11
- package/src/ui/ToolStatus.js +0 -11
|
@@ -2,168 +2,198 @@ name: ralph-loop
|
|
|
2
2
|
description: |
|
|
3
3
|
Ralph Wiggum 迭代开发循环——通过重复执行同一目标直到完成。
|
|
4
4
|
|
|
5
|
-
等价于原 ralph-wiggum 插件的 /ralph-loop 命令,完全用声明式工作流实现。
|
|
6
5
|
核心机制:while 循环 + fresh context(每轮重置 history)+ 哨兵协议 + 验证门。
|
|
6
|
+
状态机(phase: PLAN→BUILD→VERIFY/HEAL→DONE)全部用 type:set 确定性赋值,
|
|
7
|
+
prompt 拼装也用 set(曾用 llm 步当赋值/拼串——模型自由回复非确定,是事故源)。
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
哨兵协议(精确匹配,防"incomplete 含 complete"类误判):
|
|
10
|
+
<promise>DONE</promise> 任务真正完成(过验证门后 break)
|
|
11
|
+
<promise>NEED_REPLAN</promise> 当前方案走不通,回 PLAN
|
|
12
|
+
<promise>NEED_GOAL_REVISION</promise> 目标本身有问题,干净终止
|
|
13
|
+
<learning>一句话</learning> 踩坑记录(存档供后续轮参考,不影响流程)
|
|
14
|
+
|
|
15
|
+
用法:/workflow ralph-loop "你的目标" --input max_iterations=50 --input verify_checks="shell:bun test"
|
|
9
16
|
inputs:
|
|
10
17
|
- name: goal
|
|
11
18
|
type: string
|
|
12
19
|
required: true
|
|
13
|
-
|
|
20
|
+
greedy: true
|
|
21
|
+
description: "不可变目标描述(可一句话自然语言;命令行 workflow 名后整句进 goal,不被空格拆碎)"
|
|
14
22
|
- name: max_iterations
|
|
15
23
|
type: number
|
|
16
24
|
default: 50
|
|
17
|
-
description: "
|
|
25
|
+
description: "【高级·用 --input max_iterations=N】最大迭代次数(安全阀,默认 50,硬上限 200)"
|
|
18
26
|
- name: verify_checks
|
|
19
27
|
type: string
|
|
20
28
|
default: ""
|
|
21
|
-
description: "
|
|
29
|
+
description: "【高级·用 --input verify_checks=...】验证门检查项(逗号分隔,如 'shell:bun test,file_exists:src/index.ts')。空则跳过验证门。"
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
llm: "PLAN"
|
|
27
|
-
capture:
|
|
28
|
-
result: phase
|
|
31
|
+
self_heal:
|
|
32
|
+
max_retries: 1 # 单步瞬态失败(LLM 超时等)重试一次
|
|
33
|
+
retry_delay_ms: 3000 # 重试退避,给瞬态故障留恢复窗口
|
|
29
34
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
steps:
|
|
36
|
+
# === 初始化(确定性 set,零 LLM)。learnings 的权威载体是 VarStack 变量——
|
|
37
|
+
# fresh_context 每轮重置的是 history 不是变量栈,变量天然跨轮存活;
|
|
38
|
+
# 曾用「Write 文件 + 每轮 Read 回读」,Read 输出带行号/空文件标记,
|
|
39
|
+
# 回写时把格式垃圾逐轮累积进档案。文件仅作存档副本(事后排查用)。 ===
|
|
40
|
+
- id: init_state
|
|
41
|
+
title: "初始化状态机"
|
|
42
|
+
type: set
|
|
43
|
+
set:
|
|
44
|
+
phase: PLAN
|
|
45
|
+
learnings_text: ""
|
|
34
46
|
|
|
35
47
|
# ============================================================
|
|
36
48
|
# 主迭代循环(while 模式 + fresh_context)
|
|
37
|
-
#
|
|
49
|
+
# 每轮:set 拼 prompt → agent 工作 → 教训累积 → 哨兵检测 → 阶段推进
|
|
38
50
|
# ============================================================
|
|
39
51
|
- type: loop
|
|
40
52
|
id: main_loop
|
|
41
|
-
|
|
53
|
+
title: "迭代开发"
|
|
54
|
+
max_iterations: "${inputs.max_iterations}"
|
|
42
55
|
fresh_context: true
|
|
43
56
|
do:
|
|
44
|
-
# --- 1.
|
|
45
|
-
- id: read_learnings
|
|
46
|
-
tool: "Read(file_path='.minimal-agent-workflow/learnings.md')"
|
|
47
|
-
capture:
|
|
48
|
-
text: learnings_text
|
|
49
|
-
onError: continue
|
|
50
|
-
|
|
51
|
-
# --- 2. 构造本轮 prompt(含目标、阶段、通信协议、教训) ---
|
|
57
|
+
# --- 1. 构造本轮 prompt(确定性字符串拼装,set 步零 LLM) ---
|
|
52
58
|
- id: build_prompt
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
phase == '
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
59
|
+
title: "拼装本轮指令"
|
|
60
|
+
type: set
|
|
61
|
+
set:
|
|
62
|
+
prompt_text: |
|
|
63
|
+
# 不可变目标 (IMMUTABLE GOAL)
|
|
64
|
+
${inputs.goal}
|
|
65
|
+
⚠️ 你不能修改或扩大上述目标。
|
|
66
|
+
|
|
67
|
+
# 当前阶段: ${upper(phase)}
|
|
68
|
+
${phase == 'PLAN' ? '分析任务、拆解步骤、识别风险与未知项;先想清楚再动手。' :
|
|
69
|
+
phase == 'BUILD' ? '按计划实现,一次只聚焦一个子任务,落到具体文件改动。' :
|
|
70
|
+
phase == 'VERIFY' ? '运行测试/检查输出/核对验收标准,用证据确认,别凭感觉。' :
|
|
71
|
+
phase == 'HEAL' ? '已多次验证失败:停止猜测,定位根因再修,避免回归。' :
|
|
72
|
+
'目标已达成。'}
|
|
73
|
+
|
|
74
|
+
# 与循环驱动的通信协议(务必逐字遵守标签格式)
|
|
75
|
+
- 任务**真正完成**时输出 `<promise>DONE</promise>`(驱动会运行验证门)
|
|
76
|
+
- 当前方案走不通、要换打法时输出 `<promise>NEED_REPLAN</promise>`(回 PLAN)
|
|
77
|
+
- **目标本身**有问题时输出 `<promise>NEED_GOAL_REVISION</promise>`(干净终止)
|
|
78
|
+
- 踩到的坑用 `<learning>一句话</learning>` 标记(驱动自动存档供后续参考)
|
|
79
|
+
⚠️ 切勿为逃出循环而谎报完成——只有陈述完全为真时才输出完成哨兵。
|
|
80
|
+
|
|
81
|
+
${learnings_text != '' ? '# 关键教训(必须遵守,避免重复踩坑)\n' + learnings_text : ''}
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
本轮任务 (迭代 ${_iter})
|
|
85
|
+
|
|
86
|
+
# --- 2. 执行 agent 工作(TAOR 引擎,有工具能力) ---
|
|
80
87
|
- id: work
|
|
88
|
+
title: "执行本轮工作"
|
|
81
89
|
agent: "${prompt_text}"
|
|
82
90
|
maxTurns: 15
|
|
83
91
|
capture:
|
|
84
92
|
text: output
|
|
85
93
|
|
|
86
|
-
# ---
|
|
94
|
+
# --- 3. 提取 learning(确定性正则 extract,零 LLM 零幻觉;
|
|
95
|
+
# 曾用 llm 步提取——模型可能改写/漏抄/编造,教训档案被污染) ---
|
|
87
96
|
- id: extract_learning
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
title: "提取本轮教训"
|
|
98
|
+
type: set
|
|
99
|
+
set:
|
|
100
|
+
extracted_learning: "${join(extract(output, '<learning>(.*?)</learning>'), '\n- ')}"
|
|
101
|
+
|
|
102
|
+
# 累积到 VarStack(权威载体,跨轮存活、无文件格式污染)。
|
|
103
|
+
- id: accumulate_learning
|
|
104
|
+
type: set
|
|
105
|
+
set:
|
|
106
|
+
learnings_text: "${learnings_text}- ${extracted_learning}\n"
|
|
107
|
+
when: "extracted_learning != ''"
|
|
96
108
|
|
|
109
|
+
# 存档副本落盘(事后排查用;状态目录随成功归档为 ralph-loop.done)
|
|
97
110
|
- id: save_learning
|
|
98
|
-
|
|
111
|
+
title: "教训存档落盘"
|
|
112
|
+
tool: Write
|
|
113
|
+
args:
|
|
114
|
+
file_path: .minimal-agent-workflow/ralph-loop/learnings.md
|
|
115
|
+
content: "${learnings_text}"
|
|
99
116
|
when: "extracted_learning != ''"
|
|
100
117
|
onError: continue
|
|
101
118
|
|
|
102
|
-
# --- 5.
|
|
119
|
+
# --- 5. 哨兵检测(平铺互斥分支,精确匹配;不再有嵌套 then/else 迷宫) ---
|
|
103
120
|
|
|
104
|
-
# 5a.
|
|
105
|
-
- id:
|
|
121
|
+
# 5a. 完成哨兵(精确标签,防 "incomplete" 含 "complete" 类误判)→ 验证门
|
|
122
|
+
- id: on_done
|
|
123
|
+
title: "哨兵检测·完成"
|
|
106
124
|
type: branch
|
|
107
|
-
condition: "includes(output, '<promise>
|
|
125
|
+
condition: "includes(lower(output), '<promise>done</promise>')"
|
|
108
126
|
then:
|
|
109
|
-
#
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
127
|
+
# 验证门:verify_checks 为空时自动通过(verify 空检查列表 = pass);
|
|
128
|
+
# 失败时 onError:continue 让 verify_passed 绑占位文本(≠ true)→ 闸门拦下回 BUILD
|
|
129
|
+
- id: run_verify
|
|
130
|
+
type: verify
|
|
131
|
+
checks: "${inputs.verify_checks}"
|
|
132
|
+
onFail: "验证未通过,回到 BUILD 继续"
|
|
133
|
+
capture:
|
|
134
|
+
passed: verify_passed
|
|
135
|
+
onError: continue
|
|
136
|
+
- id: verify_gate
|
|
113
137
|
type: branch
|
|
114
|
-
condition:
|
|
115
|
-
includes(lower(output), '<promise>') &&
|
|
116
|
-
(includes(lower(output), 'done') ||
|
|
117
|
-
includes(lower(output), 'complete') ||
|
|
118
|
-
includes(lower(output), 'goal_complete'))
|
|
138
|
+
condition: "verify_passed == true"
|
|
119
139
|
then:
|
|
120
|
-
# === DONE 哨兵 → 验证门 ===
|
|
121
|
-
- id: run_verify
|
|
122
|
-
type: verify
|
|
123
|
-
checks: "${verify_checks}"
|
|
124
|
-
when: "verify_checks != ''"
|
|
125
|
-
onFail: "验证未通过,回到 BUILD 继续"
|
|
126
|
-
onError: continue
|
|
127
|
-
# 验证通过或无验证门 → 设置完成阶段并跳出循环
|
|
128
140
|
- id: set_done
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
type: set
|
|
142
|
+
set:
|
|
143
|
+
phase: DONE
|
|
132
144
|
- id: exit_success
|
|
133
145
|
type: break
|
|
134
146
|
else:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
# 5b
|
|
147
|
+
# 验证未过:模型谎报/漏测 → 回 BUILD 继续迭代(不 break)
|
|
148
|
+
- id: back_to_build
|
|
149
|
+
type: set
|
|
150
|
+
set:
|
|
151
|
+
phase: BUILD
|
|
152
|
+
|
|
153
|
+
# 5b. 重新规划哨兵 → 回 PLAN(auto_advance 有 <promise> 守卫,本轮不会被推进吞掉)
|
|
154
|
+
# 完整标签匹配——裸词 'need_replan' 会被 agent 复述协议说明文本误触
|
|
155
|
+
- id: on_replan
|
|
156
|
+
title: "哨兵检测·重新规划"
|
|
157
|
+
type: branch
|
|
158
|
+
condition: "includes(lower(output), '<promise>need_replan</promise>')"
|
|
159
|
+
then:
|
|
160
|
+
- id: replan
|
|
161
|
+
type: set
|
|
162
|
+
set:
|
|
163
|
+
phase: PLAN
|
|
164
|
+
|
|
165
|
+
# 5c. 目标修订哨兵 → 干净终止(仅此哨兵终止;learning-only 输出绝不落到这里)
|
|
166
|
+
# 完整标签匹配,理由同 5b
|
|
167
|
+
- id: on_goal_revision
|
|
168
|
+
title: "哨兵检测·目标修订"
|
|
169
|
+
type: branch
|
|
170
|
+
condition: "includes(lower(output), '<promise>need_goal_revision</promise>')"
|
|
171
|
+
then:
|
|
172
|
+
- id: set_goal_revision
|
|
173
|
+
type: set
|
|
174
|
+
set:
|
|
175
|
+
phase: GOAL_REVISION
|
|
176
|
+
- id: exit_goal_revision
|
|
177
|
+
type: break
|
|
178
|
+
|
|
179
|
+
# 5d. 自动阶段推进:仅当本轮没有任何流程哨兵(<promise>…)时才推进。
|
|
180
|
+
# learning 标签不是流程哨兵,不阻止推进;NEED_REPLAN 轮被守卫拦住,replan 不被吞。
|
|
155
181
|
- id: auto_advance
|
|
182
|
+
title: "阶段自动推进"
|
|
156
183
|
type: branch
|
|
157
|
-
condition: "phase == 'PLAN' &&
|
|
184
|
+
condition: "phase == 'PLAN' && !includes(lower(output), '<promise>')"
|
|
158
185
|
then:
|
|
159
186
|
- id: to_build
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
187
|
+
type: set
|
|
188
|
+
set:
|
|
189
|
+
phase: BUILD
|
|
163
190
|
|
|
164
191
|
# === 循环结束后的收尾 ===
|
|
165
192
|
- id: final_summary
|
|
193
|
+
title: "完成·执行总结"
|
|
166
194
|
llm: |
|
|
167
|
-
总结本轮 ralph-loop
|
|
168
|
-
|
|
195
|
+
总结本轮 ralph-loop 的执行结果(最终阶段:${phase})。
|
|
196
|
+
- phase=DONE:目标完成,列出关键产出物。
|
|
197
|
+
- phase=GOAL_REVISION:目标本身需要修订,说明模型给出的理由。
|
|
198
|
+
- 其它:因达到迭代上限而退出,说明当前进度和下一步建议。
|
|
169
199
|
maxTurns: 1
|
package/workflows/schema.json
CHANGED
|
@@ -30,6 +30,17 @@
|
|
|
30
30
|
"minItems": 1,
|
|
31
31
|
"items": { "$ref": "#/definitions/step" }
|
|
32
32
|
},
|
|
33
|
+
"self_heal": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"description": "Workflow-level retry/resume policy.",
|
|
36
|
+
"properties": {
|
|
37
|
+
"backoff": { "type": "number", "minimum": 0 },
|
|
38
|
+
"max_retries": { "type": "number", "minimum": 0 },
|
|
39
|
+
"retry_delay_ms": { "type": "number", "minimum": 0 },
|
|
40
|
+
"max_turns_retry_delay_ms": { "type": "number", "minimum": 0 }
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": true
|
|
43
|
+
},
|
|
33
44
|
"__meta": { "type": "object" }
|
|
34
45
|
},
|
|
35
46
|
"definitions": {
|
|
@@ -38,22 +49,76 @@
|
|
|
38
49
|
"required": ["id"],
|
|
39
50
|
"properties": {
|
|
40
51
|
"id": { "type": "string", "minLength": 1 },
|
|
52
|
+
"title": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"description": "任意步可选:人话进度显示名(支持 ${} 插值)。声明后状态行显示这段文案(如「阶段2/6·起草实现计划」),不再显示块内相对序号。"
|
|
56
|
+
},
|
|
41
57
|
"tool": { "type": "string" },
|
|
42
58
|
"skill": { "type": "string" },
|
|
43
59
|
"llm": { "type": "string" },
|
|
44
60
|
"type": {
|
|
45
|
-
"enum": ["assert", "branch", "loop", "
|
|
46
|
-
"description": "
|
|
61
|
+
"enum": ["assert", "verify", "set", "branch", "loop", "break", "continue", "echo", "pause"],
|
|
62
|
+
"description": "控制流节点类型。'continue'=跳到(目标)循环下一轮迭代;'echo'=确定性输出插值消息(不烧 LLM)。"
|
|
63
|
+
},
|
|
64
|
+
"args": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"description": "tool 步参数(深度 ${} 插值)。⚠️ Bash 命令注意:${} 是引擎插值、发生在 shell 之前——shell 单引号会原样保留插值后的文本,不做算术/变量二次展开(sed -n '$((${i}+1))p' 会把字面 $((0+1))p 喂给 sed)。需要序号让 loop over 直接产出最终值(如 1 基行号)。"
|
|
47
67
|
},
|
|
48
|
-
"args": { "type": "object" },
|
|
49
68
|
"input": { "type": "string" },
|
|
50
69
|
"capture": {
|
|
51
70
|
"type": "object",
|
|
52
71
|
"additionalProperties": { "type": "string" }
|
|
53
72
|
},
|
|
54
73
|
"when": { "type": "string" },
|
|
55
|
-
"onError": { "enum": ["halt", "continue"] },
|
|
74
|
+
"onError": { "enum": ["halt", "continue", "recover"] },
|
|
75
|
+
"target": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"description": "仅 type=break/continue:目标循环 id(标签语义)。缺省=最近一层循环;指定后信号穿透中间层循环直达该 loop。"
|
|
79
|
+
},
|
|
80
|
+
"message": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"description": "仅 type=echo(必填):确定性输出给用户的消息,支持 ${} 插值。"
|
|
84
|
+
},
|
|
85
|
+
"goal_supplement": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "动作步/pause 可选:本步产出作为「用户补充要求」并入贯穿目标锚定,注入后续每一步。"
|
|
88
|
+
},
|
|
56
89
|
"maxTurns": { "type": "number" },
|
|
90
|
+
"images": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"description": "仅 llm / agent 节点可选:OpenAI 兼容图片输入。字符串表示路径/URL;对象可设置 detail 与 max_long_side_pixel。",
|
|
93
|
+
"items": {
|
|
94
|
+
"oneOf": [
|
|
95
|
+
{ "type": "string", "minLength": 1 },
|
|
96
|
+
{
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": ["source"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"source": { "type": "string", "minLength": 1 },
|
|
101
|
+
"detail": { "enum": ["low", "default", "high"] },
|
|
102
|
+
"max_long_side_pixel": { "type": "integer", "minimum": 1 }
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": true
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"parse_inline_images": {
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"description": "仅 llm / agent 节点可选:解析 prompt 中的 @./image.png 或图片 URL。"
|
|
112
|
+
},
|
|
113
|
+
"image_detail": {
|
|
114
|
+
"enum": ["low", "default", "high"],
|
|
115
|
+
"description": "仅 llm / agent 节点可选:本步骤图片 detail 默认值。"
|
|
116
|
+
},
|
|
117
|
+
"image_max_long_side_pixel": {
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"minimum": 1,
|
|
120
|
+
"description": "仅 llm / agent 节点可选:本步骤图片最长边默认值。"
|
|
121
|
+
},
|
|
57
122
|
"condition": { "type": "string" },
|
|
58
123
|
"onFail": { "type": "string" },
|
|
59
124
|
"then": {
|
|
@@ -71,29 +136,22 @@
|
|
|
71
136
|
"items": { "$ref": "#/definitions/step" }
|
|
72
137
|
},
|
|
73
138
|
"prompt": { "type": "string" },
|
|
74
|
-
"
|
|
75
|
-
"type": "
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
"fork": {
|
|
79
|
-
"type": "array",
|
|
80
|
-
"items": { "$ref": "#/definitions/step" },
|
|
81
|
-
"description": "⚠ ADR-05 新增:type=parallel 时的 fork 子步骤数组,Promise.all 并发执行。详见 docs/05-advanced-workflow-integration.md。"
|
|
139
|
+
"free_text": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"enum": ["halt", "approve"],
|
|
142
|
+
"description": "type=pause 时自由输入的处理方式:halt=不放行(默认);approve=作为补充要求放行,可配 capture.text 传给后续步骤。"
|
|
82
143
|
},
|
|
83
|
-
"
|
|
84
|
-
"type": "integer",
|
|
85
|
-
"minimum": 2,
|
|
86
|
-
"maximum": 10,
|
|
87
|
-
"description": "⚠ ADR-05 新增:type=vote 的 voter 数量(2~10)。详见 docs/05-advanced-workflow-integration.md。"
|
|
144
|
+
"max_iterations": {
|
|
145
|
+
"oneOf": [{ "type": "integer", "minimum": 1 }, { "type": "string", "minLength": 1 }]
|
|
88
146
|
},
|
|
89
|
-
"
|
|
147
|
+
"done_when": {
|
|
90
148
|
"type": "string",
|
|
91
|
-
"
|
|
149
|
+
"minLength": 1,
|
|
150
|
+
"description": "仅 agent 步可选:确定性完成条件(白名单表达式,如 fileExists('./out/x.pptx'))。不满足时引擎自动提醒同一 agent 继续执行(上限 2 次),仍不满足按可重试失败处理。弱模型「宣告要干却不调工具就停」的引擎级兜底。"
|
|
92
151
|
},
|
|
93
|
-
"
|
|
94
|
-
"type": "
|
|
95
|
-
"
|
|
96
|
-
"description": "⚠ ADR-05 新增:type=vote 的多数门阈值,默认 ceil(voters_count/2)。详见 docs/05-advanced-workflow-integration.md。"
|
|
152
|
+
"output_schema": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"description": "⚠ ADR-05 新增:LLM 输出 JSON Schema 强约束,走 provider-native structured output。仅 llm 节点生效(skill 节点 loader 拒绝);详见 docs/workflow-design.md。"
|
|
97
155
|
},
|
|
98
156
|
"context_files": {
|
|
99
157
|
"type": "array",
|