Initialization
<!-- role: derived | canonical-source: meta-prompts/initialization.md -- <!-- generated-from-metaprompt -- You are initializing a…
Claude CodeGeneric
<!-- role: derived | canonical-source: meta-prompts/initialization.md -->
<!-- generated-from-metaprompt -->
You are initializing a project with a standard development scaffolding. A zip archive has been placed somewhere in this project directory. Find it.
Work through the following steps in order.
---
STEP 1 - LOCATE, DETECT VARIANT, AND EXTRACT
Find the scaffold zip file in the project directory. The zip may be named scaffold-template.zip, scaffold-metaprompts.zip, scaffold-full.zip, or a custom name.
Extract its contents to a temporary location so you can inspect them before placing anything.
Determine which variant this is by inspecting the contents:
- If it contains AGENTS.md → template content is present.
- If it contains a prompts/ directory with .prompt.md files → metaprompt slash commands are present.
- If it contains both → this is the full variant.
Report: "Detected ZIP variant: [template-only / metaprompts-only / full]. Contents: [N] files."
List every file the zip contains with its intended destination path relative to the project root. Present this list and confirm: "These files will be placed in your project. Proceeding to check for conflicts."
---
STEP 2 - PLACE TEMPLATE FILES, RESOLVE CONFLICTS
If the ZIP contains template content (AGENTS.md, .claude/, .github/, etc.):
For each template file in the extracted archive (excluding the prompts/ directory):
1. Check whether a file already exists at the target path in the project.
2. If no conflict: place the file silently.
3. If a conflict exists: show a comparison of what differs between the existing file and the template file. Then ask one of the following based on the file type:
- For additive files (like .gitignore additions): "This file contains additions meant to be appended. Should I append these entries to your existing file, replace it entirely, or skip this file?"
- For configuration files with placeholder values (like settings.json, config.toml, copilot-setup-steps.yml): "A version of this file already exists. Should I replace it with the template version, keep your existing version, or show a side-by-side so you can decide what to merge?"
- For all other files: "This file already exists and differs from the template. Replace with template version, keep existing, or skip?"
Wait for a response before moving to the next file.
After all template files are placed:
- Delete the zip archive and any temporary extraction directory.
- Commit all placed files: "Initialize project scaffolding"
If the ZIP does NOT contain template content (metaprompts-only variant), skip this step.
---
STEP 2b - INSTALL COPILOT PROMPT FILES
If the ZIP contains a prompts/ directory with .prompt.md files:
Ask: "This ZIP includes Copilot slash-command prompt files. Would you like to install them to your VS Code user prompts directory so they appear as / commands in Copilot chat?"
If yes:
1. Detect the prompts directory based on OS/editor:
- Linux: ~/.config/Code/User/prompts/
- macOS: ~/Library/Application Support/Code/User/prompts/
- Windows: $APPDATA/Code/User/prompts/
- WSL2 with Windows VS Code: /mnt/c/Users/[WindowsUser]/AppData/Roaming/Code/User/prompts/
- VS Code Insiders: replace `Code` with `Code - Insiders`
- Cursor: replace `Code` with `Cursor`
Create the directory if it does not exist, then copy all .prompt.md files from the prompts/ directory.
2. If multiple editor prompt directories exist, ask which one to target before copying.
3. List all installed prompt files and their slash command names (filename without .prompt.md extension).
State: "Copilot prompt files installed. Type / in Copilot chat to verify they appear."
If no: skip prompt installation and note that the .prompt.md files can be installed later by copying them into the editor prompts directory.
Note: The Claude slash commands (.claude/commands/) are included in the template files and were already placed in Step 2 if template content was present.
---
STEP 3 - CUSTOMIZE PROJECT CONVENTIONS
If template content was NOT placed (metaprompts-only variant), skip Steps 3 and 4 entirely - jump to Step 5.
Open the placed AGENTS.md file. It contains placeholder values that must be filled in for this project. Walk through each placeholder interactively:
**Project section:**
Ask: "What is the project name and a one-line description? What is the primary language or framework?"
**Build section:**
Ask: "What are your project's build steps? I need each of the following - provide the actual values or say 'not applicable' for any that don't apply:"
- Install
- Build
- Test (all)
- Test (single file or case)
- Lint
- Format
- Type-check
**Architecture section:**
Ask: "Describe the key directories in this project and what each one is responsible for. Aim for 5–15 lines mapping directories to responsibilities."
**Conventions section:**
Ask: "What naming conventions does this project use?"
- Functions and variables: (e.g., camelCase, snake_case)
- Files and directories: (e.g., kebab-case, PascalCase)
**Workflow/Governance routing check:**
Ask: "AGENTS.md routes to `/workflow/*.md` and `/governance/*.md`. Do you want to keep the default control-plane docs as-is, or should we tailor any sections now?"
After receiving answers for each section, update AGENTS.md with the provided values. Present the completed file for review.
Ask: "Does this look correct? Anything to adjust?"
Iterate until confirmed.
Commit: "Customize AGENTS.md for this project"
---
STEP 4 - CUSTOMIZE REMAINING CONFIGURATION
Walk through each of the following files, but only the ones that were placed (skip any that were not placed or were kept as existing versions during conflict resolution):
**.github/workflows/copilot-setup-steps.yml:**
This file now validates scaffold contracts and runs project commands via environment variables. Using the build steps from AGENTS.md, set:
- `INSTALL_CMD`
- `BUILD_CMD`
- `LINT_CMD`
- `TEST_CMD`
Present the updated
Maintain Initialization?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Initialization on getagentictools](https://getagentictools.com/loops/josiahh-cf-workflow-example-initialization?ref=badge) npx agentictools info loops/josiahh-cf-workflow-example-initialization The second line is the CLI lookup for this page — handy in READMEs and docs.