Requirements
How To Start
A Note From The Author of CRAFT
- After hundreds (perhaps thousands) of hours of using these recipes, I rarely need to use any of the CORE Cookbook recipes aside from Recipes RCP-001-001-002-HANDOFF-SNAPSHOT and RCP-001-001-002-HANDOFF-SNAPSHOT, but when I do, they are essential to the functioning of CRAFT. Also, the A.I. reads all of these recipes at the start of each session. This happens quietly in the background. Even though you may never need to call the recipe, the A.I. will know all of them and it helps the A.I. to understand what CRAFT is and how it works. Even if you rarely need to use these recipes, they are still working for you and are essential to the CRAFT Framework.
STEP 1: Provide the Cookbook File
- Attach or specify the CRAFT cookbook file you want to analyze. The file should follow standard CRAFT cookbook format with recipe markers. Supported file patterns: - CFT-FWK-COOKBK-[NAME]-v[VERSION].txt - Any file containing START/END RECIPE-ID markers Example: #H->AI::Directive: (Please execute the Recipe Cheatsheet recipe with this cookbook: CFT-FWK-COOKBK-CORE-v1125d3.txt)
STEP 2: Confirm Recipe Inventory
- The AI scans the entire file for recipe markers using two detection patterns: Pattern A (inline): # START RECIPE-ID: RCP-XXX-XXX-XXX-NAME Pattern B (with divider): # =================================================== # START RECIPE-ID: RCP-XXX-XXX-XXX-NAME The AI eliminates duplicates and builds a complete list. You will see a count and list of all recipes found. Review the inventory and confirm it is complete before proceeding. If any recipes appear missing, inform the AI.
STEP 3: Answer Clarifying Questions
- The AI may ask questions about: - Ambiguous recipe boundaries - Missing END markers - Duplicate recipe IDs - Unclear recipe purposes Answer each question. The AI will wait for your response before continuing to ensure accuracy.
STEP 4: Review Generated Cheatsheet
- For each recipe, the cheatsheet includes: 1. NAME: Full recipe ID 2. TITLE: Human-readable name 3. DIFFICULTY: Easy, Medium, Advanced, or Expert 4. DESCRIPTION: Two-sentence AI-generated summary 5. EXECUTION CODE: Exact directive to start the recipe 6. MANUAL USAGE: Parameters and syntax needed Examples are included only when the execution code is not self-explanatory. For detailed examples, refer to CRAFTFramework.ai documentation.
STEP 5: Use or Export the Cheatsheet
- The generated cheatsheet can be: - Used as a quick reference during CRAFT sessions - Saved for offline documentation - Shared with team members learning CRAFT To analyze another cookbook, provide a new file and restart from Step 1.
When to Use This Recipe
Use this recipe when you need to:- Get a complete overview of recipes in a cookbook- Generate quick reference documentation- Verify all recipes in a cookbook are properly formatted- Learn what recipes are available before starting work- Create training materials for new CRAFT users
Recipe FAQ
Q: What if the cookbook file has no recipe markers?
A: The AI will report zero recipes found and ask if you
want to try a different file or check the format. Q: Can this recipe analyze multiple cookbooks at once?
A: No. Provide one cookbook file per execution. Run the
recipe again for additional cookbooks. Q: What happens if START and END markers do not match?
A: The AI will flag orphaned markers and ask you to
clarify which recipes are complete. Q: Does this recipe modify the cookbook file?
A: No. This recipe only reads and analyzes. No changes
are made to the source file. Q: Why are some recipes missing from the cheatsheet?
A: Recipes must have valid START RECIPE-ID markers. If
a recipe uses non-standard formatting, it may not be
detected. Review the inventory in Step 2 carefully.
A: The AI will report zero recipes found and ask if you
want to try a different file or check the format. Q: Can this recipe analyze multiple cookbooks at once?
A: No. Provide one cookbook file per execution. Run the
recipe again for additional cookbooks. Q: What happens if START and END markers do not match?
A: The AI will flag orphaned markers and ask you to
clarify which recipes are complete. Q: Does this recipe modify the cookbook file?
A: No. This recipe only reads and analyzes. No changes
are made to the source file. Q: Why are some recipes missing from the cheatsheet?
A: Recipes must have valid START RECIPE-ID markers. If
a recipe uses non-standard formatting, it may not be
detected. Review the inventory in Step 2 carefully.
Actual Recipe Code
(Copy This Plaintext Code To Use)
# ===========================================================# START RECIPE-ID: RCP-001-001-020-RECIPE-CHEATSHEET-v2_00a# ===========================================================RECIPE_CHEATSHEET_RECIPE = Recipe( recipe_id="RCP-001-001-020-RECIPE-CHEATSHEET-v2_00a", title="CRAFT Recipe Cheatsheet - Cookbook Analyzer", description="Parses cookbook file to catalog all recipes with name, title, difficulty, description, and execution code", category="CAT-001", subcategory="SUBCAT-Recipe-Management", difficulty="easy", version="2.00a", parameters={ "cookbook_file": { "type": "string", "required": True, "description": "Cookbook filename to analyze" }, "recipe_id": { "type": "string", "required": False, "description": "Single recipe for deep dive" } }, prompt_template=''' #H->AI::Directive: (Analyze cookbook and generate recipe cheatsheet) #H->AI::Context: (Parse file using marker detection) # =================================================== # PHASE 1: FILE RECEIPT AND VALIDATION # =================================================== #AI->H::Status: (Receiving cookbook file) IF cookbook_file NOT provided: #AI->H::RequiredQuestion: (Please provide the cookbook file to analyze. Attach the file or specify the filename.) WAIT for user response STORE cookbook_file #AI->H::Status: (Validating file format) IF file NOT accessible: #AI->H::Error: (Cannot access file: {cookbook_file}) #AI->H::Note: (Please verify the file is attached or the filename is correct.) STOP #AI->H::Status: (File received: {cookbook_file}) # =================================================== # PHASE 2: RECIPE MARKER DETECTION # =================================================== #AI->H::Status: (Scanning for recipe markers) INITIALIZE recipe_inventory = [] INITIALIZE orphan_markers = [] SCAN file FOR pattern_a: # START RECIPE-ID: RCP-[ID] EXTRACT recipe_id ADD to detected_starts SCAN file FOR pattern_b: # =============================================== # START RECIPE-ID: RCP-[ID] EXTRACT recipe_id ADD to detected_starts DEDUPLICATE detected_starts FOR each start_marker IN detected_starts: SCAN FOR corresponding end_marker: # END RECIPE-ID: RCP-[ID] OR # END RECIPE: RCP-[ID] IF end_marker FOUND: ADD { "recipe_id": recipe_id, "start_line": start_line_number, "end_line": end_line_number, "content": extracted_content } to recipe_inventory ELSE: ADD recipe_id to orphan_markers #AI->H::Caution: (No END marker for: {recipe_id}) # =================================================== # PHASE 3: INVENTORY CONFIRMATION # =================================================== #AI->H::Status: (Recipe inventory complete) DISPLAY: COOKBOOK: {cookbook_file} RECIPES FOUND: {len(recipe_inventory)} RECIPE LIST: FOR index, recipe IN enumerate(recipe_inventory): {index + 1}. {recipe.recipe_id} IF orphan_markers: #AI->H::Caution: (Found {len(orphan_markers)} recipes without END markers) FOR orphan IN orphan_markers: - {orphan} #AI->H::RequiredQuestion: (Should I include these partial recipes or skip them?) WAIT for user response #AI->H::RequiredQuestion: (I found {len(recipe_inventory)} recipes. Does this count match your expectation? Type YES to proceed or provide corrections.) WAIT for user confirmation IF user indicates missing recipes: #AI->H::Question: (Which recipes appear to be missing? I will search for alternate markers.) WAIT for user response PERFORM targeted search UPDATE recipe_inventory # =================================================== # PHASE 4: CONTENT EXTRACTION # =================================================== #AI->H::Status: (Extracting recipe details) FOR each recipe IN recipe_inventory: EXTRACT from recipe content: title = recipe.title OR parse from Recipe object difficulty = recipe.difficulty OR "Not specified" parameters = recipe.parameters OR {} GENERATE from recipe content: description = AI_summarize(recipe.content, 2) execution_code = build_directive(recipe) manual_usage = format_parameters(parameters) STORE { "name": recipe.recipe_id, "title": title, "difficulty": difficulty, "description": description, "execution_code": execution_code, "manual_usage": manual_usage } # =================================================== # PHASE 5: CHEATSHEET GENERATION # =================================================== #AI->H::Status: (Generating cheatsheet) DISPLAY: # =============================================== # RECIPE CHEATSHEET # Cookbook: {cookbook_file} # Total Recipes: {len(recipe_inventory)} # Generated: {current_date} # =============================================== FOR each recipe IN recipe_inventory: DISPLAY: ------------------------------------------- NAME: {recipe.name} TITLE: {recipe.title} DIFFICULTY: {recipe.difficulty} DESCRIPTION: {recipe.description} EXECUTION CODE: {recipe.execution_code} MANUAL USAGE: {recipe.manual_usage} ------------------------------------------- # =================================================== # PHASE 6: COMPLETION # =================================================== #AI->H::Status: (Cheatsheet generation complete) DISPLAY: SUMMARY: - Cookbook analyzed: {cookbook_file} - Recipes cataloged: {len(recipe_inventory)} - Orphaned markers: {len(orphan_markers)} #AI->H::Note: (For detailed examples and tutorials, visit CRAFTFramework.ai) #AI->H::OptionalQuestion: (Would you like to: - Analyze another cookbook - Get more details on a specific recipe - Export this cheatsheet) ''')# -----------------------------------------------------------# HELPER FUNCTIONS# -----------------------------------------------------------def AI_summarize(content, sentence_count): """ AI generates a summary of the recipe content. Parameters: content: Full recipe text to summarize sentence_count: Number of sentences (default 2) Returns: String with AI-generated description The AI should focus on: - What problem the recipe solves - Primary functionality or output """ # AI interprets and generates summary passdef build_directive(recipe): """ Constructs the execution directive for a recipe. Parameters: recipe: Recipe object with id and parameters Returns: Formatted #H->AI::Directive string Example output: #H->AI::Directive: (Please execute the Chat-Session-Initialization recipe with: * session_type: [new/continued/handoff] * project_id: [your 3-digit ID]) """ directive = "#H->AI::Directive: (Please execute then" directive += f" {recipe.title} recipe" IF recipe.parameters: directive += " with:n" FOR param_name, param_def IN recipe.parameters: IF param_def.required: directive += f" * {param_name}: " directive += f"[{param_def.description}]n" directive += ")" RETURN directivedef format_parameters(parameters): """ Formats parameter information for manual usage section. Parameters: parameters: Dict of recipe parameters Returns: Formatted string showing required and optional params Format: REQUIRED: - param_name: description (type) OPTIONAL: - param_name: description (default: value) """ IF NOT parameters: RETURN "No parameters required." required = [] optional = [] FOR param_name, param_def IN parameters.items(): entry = f"- {param_name}: {param_def.description}" entry += f" ({param_def.type})" IF param_def.required: required.append(entry) ELSE: IF param_def.default: entry += f" [default: {param_def.default}]" optional.append(entry) output = "" IF required: output += "REQUIRED:n" FOR r IN required: output += f"{r}n" IF optional: output += "nOPTIONAL:n" FOR o IN optional: output += f"{o}n" RETURN output# ===========================================================# END RECIPE-ID: RCP-001-001-020-RECIPE-CHEATSHEET-v2_00a# ===========================================================
