diff --git a/recipes/generate-bundle-docs.dot b/recipes/generate-bundle-docs.dot new file mode 100644 index 00000000..564e8b07 --- /dev/null +++ b/recipes/generate-bundle-docs.dot @@ -0,0 +1,48 @@ +// This recipe scans your code repository and draws a visual map of everything inside it. +digraph generate_bundle_docs { + rankdir=TB + fontname="Helvetica" + fontsize=12 + label="Bundle Documentation Generator\nScans your repository, draws a visual map of everything inside" + labelloc=t + labeljust=c + compound=true + nodesep=0.6 + ranksep=0.7 + bgcolor="white" + source_hash="383fc33448c79a396f928c20b2049d0c8cce02caa13dbe933995287167690c6e" + + node [fontname="Helvetica", fontsize=11, style="filled,rounded"] + edge [fontname="Helvetica", fontsize=9] + + start [label="Start", shape=oval, fillcolor="#e0e0e0"] + done [label="Done!", shape=oval, fillcolor="#e0e0e0"] + + step_generate_bundle_dot [label="Scan the Repository\n\"What's in here?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="'${AMPLIFIER_PYTHON:-python3}' << 'PYEOF' import json, sys, re from pathlib import Path repo_path ="] + cond_step_enhance_bundle_dot [label="Make labels\nfriendly?", shape=diamond, fillcolor="#fff9c4"] + step_enhance_bundle_dot [label="Rewrite Labels\n\"Make it readable\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + step_write_bundle_dot [label="Save the Diagram\n\"Write files to disk\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="'${AMPLIFIER_PYTHON:-python3}' << 'PYEOF' import json, subprocess, re, sys from pathlib import Path "] + step_summary [label="Wrap Up\n\"What did we create?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="'${AMPLIFIER_PYTHON:-python3}' << 'PYEOF' import json _gen_raw = r'''{{generation}}''' _write_raw ="] + + start -> step_generate_bundle_dot + step_generate_bundle_dot -> cond_step_enhance_bundle_dot + cond_step_enhance_bundle_dot -> step_enhance_bundle_dot [label="enhance_diagrams != 'fals"] + step_enhance_bundle_dot -> step_write_bundle_dot + step_write_bundle_dot -> step_summary + cond_step_enhance_bundle_dot -> step_write_bundle_dot [label="skip", style=dashed] + step_summary -> done + + subgraph cluster_legend { + label="Legend\n\"What do the colors mean?\"" + style="filled,rounded" + fillcolor="white" + color="#cccccc" + fontsize=10 + node [shape=box, fontsize=9, width=1.6] + leg_bash [label="Script Step", shape=box, fillcolor="#bbdefb"] + leg_agent [label="AI Agent Step", shape=box, fillcolor="#c8e6c9"] + leg_cond [label="Condition", shape=diamond, fillcolor="#fff9c4"] + leg_start [label="Start / End", shape=oval, fillcolor="#e0e0e0"] + leg_bash -> leg_agent -> leg_cond -> leg_start [style=invis] + } +} \ No newline at end of file diff --git a/recipes/generate-bundle-docs.png b/recipes/generate-bundle-docs.png new file mode 100644 index 00000000..557aae39 Binary files /dev/null and b/recipes/generate-bundle-docs.png differ diff --git a/recipes/validate-agents.dot b/recipes/validate-agents.dot new file mode 100644 index 00000000..6b97c203 --- /dev/null +++ b/recipes/validate-agents.dot @@ -0,0 +1,87 @@ +digraph validate_agents { + rankdir=TB + fontname="Helvetica" + fontsize=12 + label="Validate Agents — Validates Amplifier agent definitions in a bundle repository against:" + labelloc=t + labeljust=c + compound=true + nodesep=0.6 + ranksep=0.7 + bgcolor="white" + source_hash="b85fecca6091493e56fefd26ac3c6616ba3435a67301049994a25f37153ecf6c" + + node [fontname="Helvetica", fontsize=11, style="filled,rounded"] + edge [fontname="Helvetica", fontsize=9] + + start [label="Start", shape=oval, fillcolor="#e0e0e0"] + done [label="Done!", shape=oval, fillcolor="#e0e0e0"] + + step_environment_check [label="Environment +Check", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import sys from pathlib import Path results = { 'phase': 'environm"] + step_agent_discovery [label="Agent +Discovery", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json from pathlib import Path def discover_agents(repo_path: str) -> dict: "] + step_structural_validation [label="Structural +Validation", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import re from pathlib import Path try: import yaml except ImportE"] + step_quality_classification [label="Quality +Classification", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json # Parse structural_results as JSON (uses true/false, not True/False) s"] + step_initialize_optional_outputs [label="Initialize Optional +Outputs", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json # Initialize default values for conditional phase outputs # These will"] + step_set_default_approval_summary [label="Set Default +Approval Summary", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="echo '_Quick approval not performed - detailed LLM analysis was run instead._' "] + step_set_default_quality_results [label="Set Default +Quality Results", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="echo '_Description quality analysis not performed - all agents met quality thresholds via determinis"] + step_set_default_tool_analysis [label="Set Default +Tool Analysis", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="echo '_Tool access analysis not performed - all agents have explicit tool declarations._' "] + cond_step_quick_approval [label="quality_classification.requ...", shape=diamond, fillcolor="#fff9c4"] + step_quick_approval [label="Quick +Approval", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + cond_step_description_quality_check [label="quality_classification.requ...", shape=diamond, fillcolor="#fff9c4"] + step_description_quality_check [label="Description Quality +Check", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + cond_step_tool_access_analysis [label="quality_classification.requ...", shape=diamond, fillcolor="#fff9c4"] + step_tool_access_analysis [label="Tool Access +Analysis", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + step_synthesize_report [label="Synthesize +Report", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + + start -> step_environment_check + step_environment_check -> step_agent_discovery + step_agent_discovery -> step_structural_validation + step_structural_validation -> step_quality_classification + step_quality_classification -> step_initialize_optional_outputs + step_initialize_optional_outputs -> step_set_default_approval_summary + step_initialize_optional_outputs -> step_set_default_quality_results + step_initialize_optional_outputs -> step_set_default_tool_analysis + step_set_default_approval_summary -> cond_step_quick_approval + cond_step_quick_approval -> step_quick_approval [label="quality_classification.re"] + step_quality_classification -> cond_step_description_quality_check + cond_step_description_quality_check -> step_description_quality_check [label="quality_classification.re"] + step_description_quality_check -> cond_step_tool_access_analysis + cond_step_tool_access_analysis -> step_tool_access_analysis [label="quality_classification.re"] + step_quality_classification -> step_synthesize_report + step_quick_approval -> step_synthesize_report + step_description_quality_check -> step_synthesize_report + step_tool_access_analysis -> step_synthesize_report + step_set_default_approval_summary -> step_synthesize_report + step_set_default_quality_results -> step_synthesize_report + step_set_default_tool_analysis -> step_synthesize_report + cond_step_quick_approval -> step_synthesize_report [label="skip", style=dashed] + cond_step_description_quality_check -> step_synthesize_report [label="skip", style=dashed] + cond_step_tool_access_analysis -> step_synthesize_report [label="skip", style=dashed] + step_synthesize_report -> done + + subgraph cluster_legend { + label="Legend" + style="filled,rounded" + fillcolor="white" + color="#cccccc" + fontsize=10 + node [shape=box, fontsize=9, width=1.6] + leg_bash [label="Script Step", shape=box, fillcolor="#bbdefb"] + leg_agent [label="AI Agent Step", shape=box, fillcolor="#c8e6c9"] + leg_cond [label="Condition", shape=diamond, fillcolor="#fff9c4"] + leg_start [label="Start / End", shape=oval, fillcolor="#e0e0e0"] + leg_bash -> leg_agent -> leg_cond -> leg_start [style=invis] + } +} \ No newline at end of file diff --git a/recipes/validate-agents.png b/recipes/validate-agents.png new file mode 100644 index 00000000..b8518aeb Binary files /dev/null and b/recipes/validate-agents.png differ diff --git a/recipes/validate-bundle-repo.dot b/recipes/validate-bundle-repo.dot new file mode 100644 index 00000000..e7dd0665 --- /dev/null +++ b/recipes/validate-bundle-repo.dot @@ -0,0 +1,137 @@ +// Validates an entire bundle repository — checks packaging, inspects every bundle, and writes a quality report. +digraph validate_bundle_repo { + rankdir=TB + fontname="Helvetica" + fontsize=12 + label="Bundle Repository Validator\nChecks every bundle, verifies packaging, and produces a quality report" + labelloc=t + labeljust=c + compound=true + nodesep=0.6 + ranksep=0.7 + bgcolor="white" + source_hash="db1b70f05eae4eea302b90ff59f197bdd1dd1a529d99cfc60413d240c47950c9" + + node [fontname="Helvetica", fontsize=11, style="filled,rounded"] + edge [fontname="Helvetica", fontsize=9] + + start [label="Start", shape=oval, fillcolor="#e0e0e0"] + done [label="Done!", shape=oval, fillcolor="#e0e0e0"] + + step_environment_check [label="Check Prerequisites\n\"Is everything installed?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import sys import subprocess results = { 'phase': 'environment_pre"] + step_validate_all_flags [label="Read Settings\n\"What should we check?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json validate_all = '{{validate_all}}' validate_agents = '{{validate_agents"] + step_packaging_check [label="Check Packaging\n\"Is the project set up right?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import sys from pathlib import Path repo_path = '{{repo_path}}' resul"] + cond_step_build_check [label="Has a\npyproject.toml?", shape=diamond, fillcolor="#fff9c4"] + step_build_check [label="Try Building\n\"Can we package it?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import subprocess import sys import tempfile from pathlib import Path "] + cond_step_set_default_build_check [label="Has a\npyproject.toml?", shape=diamond, fillcolor="#fff9c4"] + step_set_default_build_check [label="Skip Build Check\n\"No pyproject — move on\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json result = { 'phase': 'build_check', 'skipped': True, 'passed"] + step_repo_discovery [label="Find All Bundles\n\"What's in this repo?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json from pathlib import Path def estimate_tokens(content: str) -> int: "] + step_validate_all_bundles [label="Validate Each Bundle\n\"Do they all load correctly?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import asyncio import json import sys from pathlib import Path env_check = json.lo"] + step_behavior_hygiene_validation [label="Check Behaviors\n\"Are behavior files tidy?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import re import sys from pathlib import Path def estimate_tokens(cont"] + step_standalone_completeness_validation [label="Check Standalone Bundles\n\"Is anything missing?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import asyncio import json import re import sys from pathlib import Path env_check"] + step_experiments_validation [label="Check Experiments\n\"Are experiments valid?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import asyncio import json import re import sys from pathlib import Path env_check"] + step_context_sink_compliance [label="Check Context Rules\n\"Are context files compliant?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import re import sys from pathlib import Path def estimate_tokens(cont"] + step_tool_placement_analysis [label="Check Tool Placement\n\"Are tools in the right spot?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import re import sys from pathlib import Path discovery = json.loads('"] + cond_step_validate_recipes [label="Recipe validation\nenabled?", shape=diamond, fillcolor="#fff9c4"] + step_validate_recipes [label="Validate All Recipes\n(validate-recipes)", shape=box, fillcolor="#e0e0e0", style="filled,rounded,dashed", tooltip="validate-recipes"] + cond_step_set_default_recipe_validation [label="Recipe validation\nenabled?", shape=diamond, fillcolor="#fff9c4"] + step_set_default_recipe_validation [label="Skip Recipe Check\n\"Not requested — move on\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json result = { 'quality_level': 'good', 'summary': 'Recipe validat"] + step_quality_classification [label="Grade the Results\n\"How did everything score?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import sys # Parse all results individual = json.loads('''{{individual"] + step_initialize_optional_outputs [label="Prepare Defaults\n\"Set up fallback values\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json defaults = { 'approval_summary': '_Quick approval not performed - "] + step_set_default_approval_summary [label="Use Default Approval\n\"No AI review needed\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="echo '_Quick approval not performed - detailed LLM analysis was run instead._' "] + step_set_default_composition_analysis [label="Use Default Analysis\n\"No deep dive needed\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="echo '_Composition analysis not performed - all bundles met quality thresholds via deterministic che"] + step_set_default_repo_conventions [label="Use Default Conventions\n\"No convention check needed\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="echo '_Convention analysis not performed - all bundles met quality thresholds._' "] + cond_step_quick_approval [label="Everything\npassed?", shape=diamond, fillcolor="#fff9c4"] + step_quick_approval [label="Quick Approval\n\"Stamp it — all good!\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + cond_step_composition_analysis [label="Needs detailed\nanalysis?", shape=diamond, fillcolor="#fff9c4"] + step_composition_analysis [label="Deep Dive Analysis\n\"What went wrong?\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + cond_step_repo_conventions [label="Convention check\nneeded?", shape=diamond, fillcolor="#fff9c4"] + step_repo_conventions [label="Review Conventions\n\"Following the rules?\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + step_bundle_doc_freshness_check [label="Check Doc Freshness\n\"Are docs up to date?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json, re, sys from pathlib import Path _discovery_raw = r'''{{discovery_res"] + step_bundle_doc_regen_detail [label="Refresh Detail Docs\n\"Update entry-point docs\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json # v3: No per-entry-point .detail.md files — this step is a no-op. print"] + step_bundle_overview_regen_structural [label="Build Overview Diagram\n\"Map the repo structure\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json, sys from pathlib import Path raw = r'''{{bundle_doc_freshness}}''' fr"] + cond_step_bundle_overview_regen_enhance [label="Enhance\ndiagrams?", shape=diamond, fillcolor="#fff9c4"] + step_bundle_overview_regen_enhance [label="Polish Diagram Labels\n\"Make it readable\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + step_bundle_overview_regen_write [label="Save Updated Docs\n\"Write files to disk\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json, subprocess, re, sys from pathlib import Path targets = json.loads(r''"] + step_synthesize_report [label="Write Final Report\n\"Summarize everything\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + + start -> step_environment_check + step_environment_check -> step_validate_all_flags + step_environment_check -> step_packaging_check + step_packaging_check -> cond_step_build_check + cond_step_build_check -> step_build_check [label="packaging_check.has_pypro"] + step_packaging_check -> cond_step_set_default_build_check + cond_step_set_default_build_check -> step_set_default_build_check [label="packaging_check.has_pypro"] + step_packaging_check -> step_repo_discovery + step_build_check -> step_repo_discovery + step_set_default_build_check -> step_repo_discovery + step_repo_discovery -> step_validate_all_bundles + step_validate_all_bundles -> step_behavior_hygiene_validation + step_validate_all_bundles -> step_standalone_completeness_validation + step_validate_all_bundles -> step_experiments_validation + step_validate_all_bundles -> step_context_sink_compliance + step_validate_all_bundles -> step_tool_placement_analysis + step_repo_discovery -> cond_step_validate_recipes + step_validate_all_flags -> cond_step_validate_recipes + cond_step_validate_recipes -> step_validate_recipes [label="validation_flags.validate"] + step_validate_all_flags -> cond_step_set_default_recipe_validation + cond_step_set_default_recipe_validation -> step_set_default_recipe_validation [label="validation_flags.validate"] + step_validate_all_bundles -> step_quality_classification + step_behavior_hygiene_validation -> step_quality_classification + step_standalone_completeness_validation -> step_quality_classification + step_experiments_validation -> step_quality_classification + step_context_sink_compliance -> step_quality_classification + step_tool_placement_analysis -> step_quality_classification + step_validate_recipes -> step_quality_classification + step_set_default_recipe_validation -> step_quality_classification + step_quality_classification -> step_initialize_optional_outputs + step_initialize_optional_outputs -> step_set_default_approval_summary + step_initialize_optional_outputs -> step_set_default_composition_analysis + step_initialize_optional_outputs -> step_set_default_repo_conventions + step_set_default_approval_summary -> cond_step_quick_approval + cond_step_quick_approval -> step_quick_approval [label="quality_classification.re"] + step_quality_classification -> cond_step_composition_analysis + cond_step_composition_analysis -> step_composition_analysis [label="quality_classification.re"] + step_composition_analysis -> cond_step_repo_conventions + cond_step_repo_conventions -> step_repo_conventions [label="quality_classification.re"] + step_repo_discovery -> step_bundle_doc_freshness_check + step_bundle_doc_freshness_check -> step_bundle_doc_regen_detail + step_bundle_doc_freshness_check -> step_bundle_overview_regen_structural + step_bundle_overview_regen_structural -> cond_step_bundle_overview_regen_enhance + cond_step_bundle_overview_regen_enhance -> step_bundle_overview_regen_enhance [label="enhance_diagrams != 'fals"] + step_bundle_overview_regen_enhance -> step_bundle_overview_regen_write + step_quality_classification -> step_synthesize_report + step_quick_approval -> step_synthesize_report + step_composition_analysis -> step_synthesize_report + step_repo_conventions -> step_synthesize_report + step_set_default_approval_summary -> step_synthesize_report + step_set_default_composition_analysis -> step_synthesize_report + step_set_default_repo_conventions -> step_synthesize_report + step_set_default_recipe_validation -> step_synthesize_report + step_bundle_doc_regen_detail -> step_synthesize_report + step_bundle_overview_regen_write -> step_synthesize_report + cond_step_build_check -> step_repo_discovery [label="skip", style=dashed] + cond_step_set_default_build_check -> step_repo_discovery [label="skip", style=dashed] + cond_step_validate_recipes -> step_quality_classification [label="skip", style=dashed] + cond_step_set_default_recipe_validation -> step_quality_classification [label="skip", style=dashed] + cond_step_quick_approval -> step_bundle_doc_freshness_check [label="skip", style=dashed] + cond_step_composition_analysis -> step_bundle_doc_freshness_check [label="skip", style=dashed] + cond_step_repo_conventions -> step_bundle_doc_freshness_check [label="skip", style=dashed] + cond_step_bundle_overview_regen_enhance -> step_bundle_overview_regen_write [label="skip", style=dashed] + step_synthesize_report -> done + + subgraph cluster_legend { + label="Legend\n\"What do the shapes mean?\"" + style="filled,rounded" + fillcolor="white" + color="#cccccc" + fontsize=10 + node [shape=box, fontsize=9, width=1.6] + leg_bash [label="Script Step\n\"Automated task\"", shape=box, fillcolor="#bbdefb"] + leg_agent [label="AI Agent Step\n\"Reviewed by AI\"", shape=box, fillcolor="#c8e6c9"] + leg_sub [label="Sub-Recipe Call\n\"Runs another recipe\"", shape=box, fillcolor="#e0e0e0", style="filled,rounded,dashed"] + leg_cond [label="Condition\n\"Yes or no?\"", shape=diamond, fillcolor="#fff9c4"] + leg_start [label="Start / End", shape=oval, fillcolor="#e0e0e0"] + leg_bash -> leg_agent -> leg_sub -> leg_cond -> leg_start [style=invis] + } +} \ No newline at end of file diff --git a/recipes/validate-bundle-repo.png b/recipes/validate-bundle-repo.png new file mode 100644 index 00000000..3371af24 Binary files /dev/null and b/recipes/validate-bundle-repo.png differ diff --git a/recipes/validate-bundle.dot b/recipes/validate-bundle.dot new file mode 100644 index 00000000..b1934845 --- /dev/null +++ b/recipes/validate-bundle.dot @@ -0,0 +1,45 @@ +// This recipe checks all your Amplifier bundles are healthy — finds them, validates each one, and writes a summary report. +digraph validate_bundle { + rankdir=TB + fontname="Helvetica" + fontsize=12 + label="Bundle Health Check\nFinds all your bundles, validates each one, and writes up a report" + labelloc=t + labeljust=c + compound=true + nodesep=0.6 + ranksep=0.7 + bgcolor="white" + source_hash="dbb0a956cb48bd81a947ba29f5b1eccf747161c16e345d0487e8979f8ed19fc7" + + node [fontname="Helvetica", fontsize=11, style="filled,rounded"] + edge [fontname="Helvetica", fontsize=9] + + start [label="Start", shape=oval, fillcolor="#e0e0e0"] + done [label="Done!", shape=oval, fillcolor="#e0e0e0"] + + step_environment_check [label="Check Setup\n\"Is everything ready?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import sys results = { 'phase': 'environment', 'foundation_ava"] + step_discover_bundles [label="Find All Bundles\n\"What bundles exist?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json from pathlib import Path def discover_bundles(bundle_path: str) -> dic"] + step_validate_bundles [label="Validate Each Bundle\n(validate-single-bundle)", shape=box, fillcolor="#e0e0e0", style="filled,rounded,dashed", tooltip="validate-bundles"] + step_synthesize_report [label="Write the Report\n\"How did everything do?\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + + start -> step_environment_check + step_environment_check -> step_discover_bundles + step_discover_bundles -> step_validate_bundles + step_validate_bundles -> step_synthesize_report + step_synthesize_report -> done + + subgraph cluster_legend { + label="Legend\n\"What do the colors mean?\"" + style="filled,rounded" + fillcolor="white" + color="#cccccc" + fontsize=10 + node [shape=box, fontsize=9, width=1.6] + leg_bash [label="Script Step", shape=box, fillcolor="#bbdefb"] + leg_agent [label="AI Agent Step", shape=box, fillcolor="#c8e6c9"] + leg_sub [label="Sub-Recipe Call", shape=box, fillcolor="#e0e0e0", style="filled,rounded,dashed"] + leg_start [label="Start / End", shape=oval, fillcolor="#e0e0e0"] + leg_bash -> leg_agent -> leg_sub -> leg_start [style=invis] + } +} \ No newline at end of file diff --git a/recipes/validate-bundle.png b/recipes/validate-bundle.png new file mode 100644 index 00000000..c3fc1964 Binary files /dev/null and b/recipes/validate-bundle.png differ diff --git a/recipes/validate-single-bundle.dot b/recipes/validate-single-bundle.dot new file mode 100644 index 00000000..7b71b691 --- /dev/null +++ b/recipes/validate-single-bundle.dot @@ -0,0 +1,42 @@ +// Validates one Amplifier bundle — traces what it actually includes, measures its size, and writes a report. +digraph validate_single_bundle { + rankdir=TB + fontname="Helvetica" + fontsize=12 + label="Bundle Check-Up\nTraces what a bundle actually includes, measures its size, and writes a report" + labelloc=t + labeljust=c + compound=true + nodesep=0.6 + ranksep=0.7 + bgcolor="white" + source_hash="b8ca8b131034d428fca53a89207dbcf831acd581bbce878bf279d5d18027557e" + + node [fontname="Helvetica", fontsize=11, style="filled,rounded"] + edge [fontname="Helvetica", fontsize=9] + + start [label="Start", shape=oval, fillcolor="#e0e0e0"] + done [label="Done!", shape=oval, fillcolor="#e0e0e0"] + + step_trace_dependencies [label="Follow the Includes\n\"What files belong to this bundle?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import re import yaml from pathlib import Path def trace_bundle_depend"] + step_context_analysis [label="Measure the Size\n\"Is this bundle too big?\"", shape=box, fillcolor="#bbdefb", style="filled,rounded", tooltip="python3 << 'EOF' import json import re from pathlib import Path # Token thresholds WARNING_TOKENS ="] + step_generate_report [label="Write the Report\n\"Here's what we found\"", shape=box, fillcolor="#c8e6c9", style="filled,rounded", tooltip="foundation:zen-architect"] + + start -> step_trace_dependencies + step_trace_dependencies -> step_context_analysis + step_context_analysis -> step_generate_report + step_generate_report -> done + + subgraph cluster_legend { + label="Guide\n\"What the shapes mean\"" + style="filled,rounded" + fillcolor="white" + color="#cccccc" + fontsize=10 + node [shape=box, fontsize=9, width=1.6] + leg_bash [label="Script Step", shape=box, fillcolor="#bbdefb"] + leg_agent [label="AI Agent Step", shape=box, fillcolor="#c8e6c9"] + leg_start [label="Start / End", shape=oval, fillcolor="#e0e0e0"] + leg_bash -> leg_agent -> leg_start [style=invis] + } +} \ No newline at end of file diff --git a/recipes/validate-single-bundle.png b/recipes/validate-single-bundle.png new file mode 100644 index 00000000..a91d87e4 Binary files /dev/null and b/recipes/validate-single-bundle.png differ