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: Initialize Project Review
- #AI->H::Status: (Initializing project review for project_id) Load and scan project files: Project Implementation File All Handoff Snapshots (if include_handoffs True) Test results and documentation
STEP 2: Categorize Discoverable Content
- Scan project files for potentially reusable content across these categories: FUNCTIONS AND METHODS New utility functions created Improvements to existing functions Novel function patterns VARIABLE PATTERNS Useful configuration structures Effective naming conventions Multi-modal variable approaches OBJECTS AND CLASSES New object types created Useful class patterns Object composition strategies WORKFLOW INNOVATIONS Process improvements discovered Effective comment usage patterns Handoff optimizations RECIPE IDEAS Repeated procedures that could become recipes Ad-hoc solutions worth formalizing Patterns from successful interactions LESSONS AND INSIGHTS What worked particularly well What challenges were overcome Best practices discovered
STEP 3: Present Initial Scan Results
- #AI->H::Status: (Found potentially valuable content) Present organized findings by category: FUNCTIONS DISCOVERED Function name with brief description Location where found Purpose and potential value elsewhere VARIABLE PATTERNS Pattern name with brief description Example showing structure Use case for future projects WORKFLOW INNOVATIONS Innovation name What makes it valuable #AI->H::Question: (Which discoveries interest you most for preservation?)
STEP 4: Collaborative Evaluation
- For each item user shows interest in: #AI->H::Status: (Examining: item name) Present full context: Complete code or pattern or content Project-specific elements to remove Generalizable aspects to preserve Suggested modifications for reuse: Remove project-specific names Add parameters for flexibility Include usage documentation #AI->H::RequiredQuestion: (Should we extract this for framework use? If yes, what modifications?)
STEP 5: Determine Destination
- For each item marked for extraction: #AI->H::Status: (Determining location for item) DESTINATION OPTIONS Option 1: Framework Specification Best for core functions and fundamental patterns Specify target section Option 2: Cookbook File Best for recipes and repeatable procedures Identify appropriate cookbook Option 3: Best Practices Document Best for lessons learned and workflow tips Suggest documentation format #AI->H::RequiredQuestion: (Where should this item be placed? Option 1, 2, or 3?)
STEP 6: Resolve Naming Conflicts
- If naming conflicts detected: #AI->H::Caution: (Naming conflict detected) Show current usage in project versus existing framework item with similar name. RENAMING OPTIONS Prefix approach: PROJECT_OriginalName Descriptive approach: MoreSpecificName Versioned approach: Name_v2 Namespace approach: ProjectPatterns.Name #AI->H::RequiredQuestion: (Which naming approach?)
STEP 7: Generate Extraction Report
- #AI->H::Status: (Creating extraction report) PROJECT EXTRACTION REPORT Extraction Date: current date Items Identified: total count Items Selected: selected count FOR FRAMEWORK SPECIFICATION Section to add to Source project reference Formatted content ready to paste FOR COOKBOOK Recipe name and category Source project reference Formatted recipe content FOR BEST PRACTICES Practice name Formatted insight or lesson
STEP 8: Finalize Preservation
- #AI->H::Status: (Final review before preservation) PRE-PRESERVATION CHECKLIST All project-specific references removed Documentation added for each item Naming conflicts resolved Destination files identified Content formatted correctly ITEMS READY FOR PRESERVATION List each item with destination #AI->H::Note: (Copy formatted sections to preserve discoveries) #AI->H::Question: (Any other patterns to capture before concluding?)
When to Use This Recipe
IDEAL USE CASES When concluding a project and want to preserve valuable discoveries for future use. When a project produced innovative patterns that should become part of the framework. When ending a long-running project with accumulated best practices worth documenting. When reviewing project handoffs for workflow improvements to formalize.WHEN NOT TO USE THIS RECIPE During active project work when focus should be on current deliverables. For very short projects that produced no novel patterns worth extracting. When project files are not available or incomplete.
Recipe FAQ
Q: When should I run this recipe?
A: Run when concluding a project to ensure valuable
discoveries are preserved for future projects rather
than lost when the project files are archived. Q: What if I find many items to extract?
A: The recipe handles multiple items through iterative
evaluation. Prioritize highest-value patterns first. Q: Can this extract from multiple projects at once?
A: The recipe focuses on one project at a time. Run
separately for each project being concluded. Q: What about project-specific code?
A: Step 4 specifically identifies project-specific
elements and guides generalization for reuse. Q: Where do extracted items actually go?
A: You manually paste formatted content into the
destination files. The recipe prepares copy-ready
content but does not modify files directly.
A: Run when concluding a project to ensure valuable
discoveries are preserved for future projects rather
than lost when the project files are archived. Q: What if I find many items to extract?
A: The recipe handles multiple items through iterative
evaluation. Prioritize highest-value patterns first. Q: Can this extract from multiple projects at once?
A: The recipe focuses on one project at a time. Run
separately for each project being concluded. Q: What about project-specific code?
A: Step 4 specifically identifies project-specific
elements and guides generalization for reuse. Q: Where do extracted items actually go?
A: You manually paste formatted content into the
destination files. The recipe prepares copy-ready
content but does not modify files directly.
Actual Recipe Code
(Copy This Plaintext Code To Use)
# ===========================================================# RECIPE-ID: RCP-001-001-013-PROJ-FILE-EXTRACTOR-v2.00a# ===========================================================PROJECT_FILE_INFO_EXTRACTOR_RECIPE = Recipe( recipe_id="RCP-001-001-013-PROJ-FILE-EXTRACTOR-v2.00a", title="Project File Information Extractor", description="Extract reusable patterns from projects", category="CAT-001-CORE", difficulty="medium", version="2.00a", parameters={ "project_id": { "type": "string", "required": True, "description": "Project ID being concluded" }, "review_mode": { "type": "string", "required": False, "default": "comprehensive", "options": ["comprehensive", "focused", "quick"], "description": "Depth of file analysis" }, "include_handoffs": { "type": "boolean", "required": False, "default": True, "description": "Analyze handoff history" } }, prompt_template=""" #H->AI::Directive: (Extract reusable content from project {project_id}) #H->AI::Mode: ({review_mode} analysis) # PHASE 1: DISCOVERY # ----------------------------------------------------------- #AI->H::Status: (Scanning project files) Load project files for {project_id}: - Implementation file - Handoff snapshots (if {include_handoffs}) - Supporting documentation Categorize discoveries: FUNCTIONS: New or improved utility functions VARIABLES: Useful configuration patterns OBJECTS: New class patterns or compositions WORKFLOWS: Process improvements discovered RECIPES: Repeated procedures worth formalizing LESSONS: Best practices and insights # PHASE 2: PRESENTATION # ----------------------------------------------------------- #AI->H::Status: (Presenting findings by category) For each category with discoveries: Present: Name, location, brief description Assess: Reuse potential and required changes #AI->H::Question: (Which items interest you for preservation?) # PHASE 3: EVALUATION # ----------------------------------------------------------- For each selected item: #AI->H::Status: (Examining: {item_name}) Show full context and code Identify project-specific elements to remove Suggest generalization modifications #AI->H::RequiredQuestion: (Extract this item? What modifications needed?) # PHASE 4: DESTINATION # ----------------------------------------------------------- For each approved item: #AI->H::Status: (Determining destination) Options: 1. Framework Specification (core patterns) 2. Cookbook File (repeatable recipes) 3. Best Practices Document (lessons learned) #AI->H::RequiredQuestion: (Destination: 1, 2, or 3?) If naming conflict detected: #AI->H::Caution: (Name conflict with existing) Offer: Prefix, Descriptive, Versioned, Namespace # PHASE 5: EXTRACTION REPORT # ----------------------------------------------------------- #AI->H::Status: (Generating extraction report) PROJECT EXTRACTION REPORT ------------------------- Project: {project_id} Date: {current_date} Items Identified: {total_count} Items Selected: {selected_count} FOR EACH DESTINATION: - Target file and section - Formatted copy-ready content - Source reference # PHASE 6: FINALIZATION # ----------------------------------------------------------- #AI->H::Status: (Pre-preservation checklist) Verify: [ ] Project-specific references removed [ ] Documentation added [ ] Naming conflicts resolved [ ] Destinations identified [ ] Content formatted correctly #AI->H::Note: (Copy formatted sections to destination files to complete preservation) #AI->H::Question: (Any other patterns to capture?) """)# ===========================================================# END RECIPE-ID: RCP-001-001-013-PROJ-FILE-EXTRACTOR-v2.00a# ===========================================================
