Initialization
<!-- role: derived | canonical-source: meta-prompts/admin/initialization.md -- <!-- generated-from-metaprompt -- You are initiali…
Claude CodeGeneric
<!-- role: derived | canonical-source: meta-prompts/admin/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:
Copy all .prompt.md files from the prompts/ directory into the project's `.github/prompts/` directory (create it if it does not exist). VS Code discovers slash commands from `.github/prompts/` in each workspace.
List all installed prompt files and their slash command names (filename without .prompt.md extension).
State: "Copilot prompt files installed to .github/prompts/. Type / in Copilot chat to verify they appear."
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 `workflow/COMMANDS.md`. It contains `[PROJECT-SPECIFIC]` placeholder values for build commands and code conventions. These are initial values — Phase 4 (Scaffold Project) will refine them based on architecture reasoning from feature specs. Collect what the developer knows now:
**Project section:**
Ask: "What is the project name and a one-line description? What is the primary language or framework?"
(Store answers for use in Phase 2 Compass — do not fill AGENTS.md Overview yet; that is owned by the Compass phase.)
**Build section (→ workflow/COMMANDS.md → Core Commands):**
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 (→ workflow/COMMANDS.md → Code Conventions):**
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 `workflow/COMMANDS.md` with the provided build and convention values. Present the completed file for review.
> **Note:** These are initial values. Phase 4 (Scaffold Project) refines commands and conventions based on architecture decisions derived from feature specs.
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 file. Ask: "Does this match your CI environment? Adjust anything?"
**.claude/settings.json:**
Review the permissions list. Ask: "These tool permissi
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-initialization?ref=badge) npx agentictools info loops/josiahh-cf-initialization The second line is the CLI lookup for this page — handy in READMEs and docs.