Documenting and Sharing AI Agent Workflows
2026-06-18
How will you later remember how you used Artificial Intelligence (AI) to advance your projects? And how will you share your learning with others?
prompts.md).walkthrough.md file.Here are some guidebooks and frameworks to help refine your prompts:
"save the prompts used in this conversation to prompts.md""save the walkthrough to walkthrough.md"Real-world Examples:
Set global rules for prompt chaining in your session:
# Project Context
I'm a data scientist working on machine learning projects.
For Python code, always provide examples using `scikit-learn` and `pandas`.
For R code, always provide examples using `tidyverse`.
Include `docstrings` (Python) or `roxygen2` (R) and type hints in all code.
# Response Preferences
- Be concise but thorough
- Explain complex concepts with analogies
- Always cite sources when making factual claimsFor complicated tasks, structure your prompt using the CRAFT framework:
"create a README.md document that concisely summarizescontents of this folder at a high level""update README.md with any additional files,obeying restrictions in .gitignore""create TOC for README.md""update TOC for README.md"Pro-Tip
Establishing a culture of updating these docs enables the AI to update files on the fly as your project evolves!
"find docx files and use pandoc to convert them to md versions""Use Quarto to automatically generate a PowerPoint deck(.pptx) embedding all of the outputted PNG figures.""Add a table of contents slide to the presentation."Note
See Diana and Alan’s evolved prompt versions for creating PowerPoint slides.
Find files ending in `[ _]v[0-9]+.R$`
with matching base name.
- If no `v1` exists but `basename.R`
does, copy to `v1.R`.
- Commit `basename.R` with message `v1`
and original date.
- For subsequent versions, copy the
next version to `basename.R` and commit.
- Keep versioned files intact.Refined Prompts
Check out file versions for a streamlined, instruction-optimized version of this prompt.
When you run into conflicts (e.g., forgetting to pull before committing):
git pull before committing new files.git status.Outcome
The AI successfully parsed the status and sorted out the repository state, providing step-by-step guidance.
Transform a complex organic R workflow into neat functions inside an R package, featuring: - A function to run the workflow. - A function to explore results.
"build a concise prompt that captures the essence of the walkthroughs in inst/doc/walkthrough.md"Key Packages
Uses devtools, roxygen2, and Quarto to render markdown outputs (HTML, PDF, DOCX).
Data and code are kept securely and privately on ResearchDrive (RD), but sharing/version control is still needed.
Maintain public markdown documentation and folder structures on GitHub (with data-less READMEs) while keeping raw data safe in RD.
AI Prompt Examples | Documenting and Sharing Workflows