Prompting
Provide Context to AI Explicitly:
-
Current File Contents: When asking AI to modify a file, copy the entire current content of that file into your prompt, rather than just saying "modify this file."
-
Relevant Snippets: If your task involves interactions between different files, provide relevant snippets from those files.
-
Error Messages: If you're debugging, provide the full error message and relevant log output.
"challenging the AI," "exploring alternatives," or "refining solutions through critical questioning"
granular, atomic tasks​
To get more granular, atomic tasks out of a prompt, you need to shift the AI from "Author" mode to "Systems Architect" mode. Since you're already used to writing prompts for Copilot and Antigravity, you can treat this like decomposing a monolithic function into microservices.
Here are the most effective strategies to force an AI to break down a project into its smallest possible units:
1. The "Definition of Done" Constraint​
The AI often gives vague steps (e.g., "Set up linting"). To make it atomic, define what a "task" looks like. Tell the AI that a task is only valid if it can be completed in under 15 minutes or represents a single git commit.
Prompt Snippet:
"Break this project into a checklist. Each item must be 'atomic'---meaning it represents a single, verifiable action that results in a single file change or a single terminal command. If a task takes longer than 10 minutes to execute, break it down further."
2. Use "Recursive Decomposition"​
If the list is still too broad, don't settle. Use a follow-up prompt to drill down into a specific high-level item.
The "Expand" Prompt:
"Item #3 ('Configure Docusaurus Sidebar') is too broad. Decompose it into its constituent parts, including file creation, JSON schema validation, and testing the UI output."
3. The "Pseudo-Code" Framework​
Since you're a software engineer, ask the AI to output the To-Do list as a Dependency Graph or a Linear Execution Script. This prevents the AI from giving you "fluff" and forces it to think about the order of operations.
Prompt Snippet:
"Generate a task list in a 'Step -> Input -> Expected Output' format. Treat each task as a pure function where the output of Step A is required for Step B."
4. Specific "Atomic" Categories​
Force the AI to categorize the tasks. This prevents it from skipping the "boring" but essential steps like environment config or cleanup.
Ask it to divide the list into:
-
Scaffolding: (e.g.,
npxcommands, folder creation) -
Configuration: (e.g., editing
docusaurus.config.js) -
Content Migration: (e.g., regex for link updates)
-
Validation: (e.g., running the linter, checking 404s)
5. Comparison: Vague vs. Atomic​
| Vague Task (Avoid) | Atomic Task (Target) |
|---|---|
| "Setup Linting" | "Install Biome via npm" |
| --- | --- |
| "Fix sidebar" | "Create _category_.json in /docs/api" |
| "Configure Site" | "Update favicon path in docusaurus.config.js" |
| "Add Docs" | "Move intro.md to /docs and update frontmatter slug" |
A Prompt You Can Use Right Now​
"I need to convert my Markdown project to Docusaurus. Act as a Senior DevOps Engineer. Provide a granular, atomic To-Do list. Every item must be a single command or a single file edit. Organize them by execution order and flag any task that requires a prerequisite."
