Skip to Content
Week 3.1: Emergent Structure & Agentic Workflows

Week 3.1: Emergent Structure & Agentic Workflows


Week 3.1 Resources: Emergent Structure & Agentic Workflows

Required Software & Accounts

In addition to the tools from previous weeks (VS Code, Node.js, Python, GitHub), this lesson introduces specific AI image generation tools.

  • Fal.ai: Used for the image generation tool in the workflow.
  • Claude Code (Anthropic): We continue using the CLI for managing our agentic workflows.

Class Prompts

You can copy and paste these prompts directly into the Claude Code input bar to replicate the lesson’s refactoring and workflow creation.

1. Emergent Structure (Refactoring)

Extracting Tools (The ambiguous way - Don’t use): In the video, we learn why this often fails or duplicates content.

EXTRACT "Tools" section FROM project_overview.md TO docs/tools.md

Extracting Tools (The explicit way - Recommended): This ensures the text is moved, not just copied.

EXTRACT "Tools" section REMOVE FROM docs/project_overview.md ADD TO docs/tools.md

2. Developing Workflows (Inputs & Outputs)

Manual Workflow Creation (Template): When creating a workflow file (e.g., workflows/verify_spec.md), use this structure:

## Overview [Brief description of what this workflow does] ## Inputs filename: $ARGUMENTS ## Steps 1. [Step One] input -> output 2. [Step Two] input -> output ## Output [Final expected result]

Automating Input/Output Definitions: Once you have established the pattern in one file, use this prompt to apply it to others:

READ workflows/verify_spec.md, claude/commands/run_spec.md UPDATE claude/commands/run_full_implementation.md, claude/commands/commit.md - Understand the input -> output markup under each step in verify_spec.md - ADD similar input -> output markup after each step in the files being updated

3. The Instagram Workflow (Sneak Peek)

Update Image Model: Before running the image workflow, ensure you are using the correct model.

EDIT tools/image_tools.py - change the model to "fal-ai/nano-banana-pro"

Create the Instagram Workflow:

CREATE workflows/create_instagram_post.md

(Paste the following content into the file):

# Overview Research hot topics in marketing, come up with ideas for an image, and create an instagram image post. # Steps 1. Web research to see what people are talking about related to marketing on reddit 2. Create a list of 10 topics that are highly discussed in the past 2 months. 3. Choose the topic that you think has the highest potential to go viral on Instagram. 4. Come up with 10 possible overlay text ideas. 5. Choose the text overlay that has the highest potential to go viral on Instagram. 6. Using your ai image tools, generate your chosen image idea, and in the image prompt, include the overlay text. 7. Save the result to /media # Output Respond with the path to the saved image

Execute the Workflow:

execute workflows/create_instagram_post.md

4. Utility Commands

Commit changes:

/commit

Clear context:

/clear
Last updated on