> ## Documentation Index
> Fetch the complete documentation index at: https://harisfazillah.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DSOM Project Cloner Skill

> Scaffolds a new DSOM project by copying the Sovereign Engine, Universal Gateway Matrix, Governance, and Ritual Tools to a target path, enforcing Downstr...

## When to use this skill

Use this skill when the user asks to create, clone, scaffold, or bootstrap a **new** DSOM project based on the current baseline repository (e.g., "Create a new project at D:\Projects\my-new-app").

## Downstream Asymmetry Principle

In downstream projects, **business logic and source code remain primary (>90% of repo volume)**. Cloned repositories receive the minimal 6-Pillar DSOM footprint rather than the entire baseline forge documentation.

## Prerequisites

* The user must provide the **absolute path** to the new target repository. Ask for it if not provided.

## Instructions

1. **Verify Target Path:** Ensure you have the absolute path for the new target repository from the user.
2. **Establish Directory Tree:** Use your terminal execution tools (`run_command`) to create the mandatory folder structures in the target path:
   * `"$TARGET_PATH/.agents/brain"`
   * `"$TARGET_PATH/.agents/skills"`
   * `"$TARGET_PATH/.github/workflows"`
   * `"$TARGET_PATH/docs/governance"`
   * `"$TARGET_PATH/docs-source"`
   * `"$TARGET_PATH/tools"`
   * `"$TARGET_PATH/scripts"`
3. **Copy the 6 Pillars (Downstream Footprint):**
   * **Pillar A (The Engine & Gateway Matrix):**
     * Copy `AGENTS.md`, `.cursorrules`, `CLAUDE.md`, `START-HERE.md`, `plugin.json`, and `mcp.json` to `"$TARGET_PATH/"`
     * Copy `.agents/AGENTS.md` to `"$TARGET_PATH/.agents/"`
     * Copy `.github/copilot-instructions.md` to `"$TARGET_PATH/.github/"`
     * Copy `docs/governance/DOWNSTREAM-DSOM-COMPLIANCE-MANDATE.md` to `"$TARGET_PATH/docs/governance/"`
     * Copy `docs/governance/MINTLIFY-USER-MANUAL-SYNC-GUIDE.md` to `"$TARGET_PATH/docs/governance/"`
     * Copy `docs-source/.mintignore` to `"$TARGET_PATH/docs-source/"`
   * **Pillar B (Essential Domain Skills):**
     * Recursively copy `.agents/skills/dsom-token-calculator/` to `"$TARGET_PATH/.agents/skills/"`
     * Recursively copy `.agents/skills/dsom-signature-injector/` to `"$TARGET_PATH/.agents/skills/"`
     * Recursively copy `.agents/skills/agent-plugin-packager/` to `"$TARGET_PATH/.agents/skills/"`
     * Recursively copy `.agents/skills/mintlify-docs-compiler/` to `"$TARGET_PATH/.agents/skills/"`
     * Recursively copy `.agents/skills/initialize-gitops/` to `"$TARGET_PATH/.agents/skills/"`
   * **Pillar C (Pre-Commit Guardrails & Tools):**
     * Recursively copy `tools/` to `"$TARGET_PATH/tools/"`
     * Copy `scripts/sync_docs.py` to `"$TARGET_PATH/scripts/sync_docs.py"`
     * Copy `.github/workflows/sync-docs.yml` to `"$TARGET_PATH/.github/workflows/sync-docs.yml"`
     * Automatically execute `uv run python "$TARGET_PATH/tools/install_git_guardrails.py"` in the target directory.
   * **Pillar D (Spatial Memory Genesis):**
     * Execute `bash tools/init-brain.sh` (or `.\tools\init-brain.ps1`) to populate `.agents/brain/` with blank OKF-compliant templates (`task.md`, `walkthrough.md`, `palace_registry.md`).
4. **OKF Frontmatter Compliance & Signature Injection:**
   * Execute `uv run python tools/apply_okf_frontmatter.py "$TARGET_PATH"` to guarantee complete OKF v0.2 frontmatter compliance across all cloned memory assets.
   * Run `uv run python .agents/skills/dsom-signature-injector/scripts/inject.py "$TARGET_PATH"` to apply standard GPL v3.0 signature footers.
5. **Finalization:** Output a success message to the user, providing them with the initialization commands for their new workspace:
   * `bash tools/reanimate.sh` or `.\tools\reanimate.ps1`
   * `git add .`
   * `git commit -m "chore(dsom): scaffold genesis DSOM architecture and Universal Gateway Matrix"`

***

## Dual-Mode Scaffolding Reference

### Mode 1: Automated AI Prompt Template (Google Antigravity)

```markdown theme={null}
Use the `dsom-project-cloner` skill to scaffold a brand-new DSOM downstream project for me.

Target Repository Path: <ABSOLUTE_TARGET_PATH>

Please:
1. Create the required directory structure (.agents/brain, .agents/skills, docs/governance, docs-source, tools/, scripts/).
2. Copy the Universal Gateway Matrix (.cursorrules, CLAUDE.md, .github/copilot-instructions.md, AGENTS.md, START-HERE.md).
3. Copy the Constitutional Rulebook (.agents/AGENTS.md) and reset .agents/brain/ with blank OKF templates.
4. Copy the tools/ directory, sync scripts, and automatically execute `python tools/install_git_guardrails.py` in the new target path.
5. Ensure all copied markdown files carry valid OKF v0.2 frontmatter and standard DSOM signatures.
```

### Mode 2: Manual Terminal Copy Commands (PowerShell)

```powershell theme={null}
New-Item -ItemType Directory -Force -Path "$TARGET\.agents\brain", "$TARGET\.agents\skills", "$TARGET\.github\workflows", "$TARGET\docs\governance", "$TARGET\docs-source", "$TARGET\tools", "$TARGET\scripts"
Copy-Item "$DSOM_BASE\AGENTS.md", "$DSOM_BASE\.cursorrules", "$DSOM_BASE\CLAUDE.md", "$DSOM_BASE\START-HERE.md" "$TARGET\"
Copy-Item "$DSOM_BASE\.github\copilot-instructions.md" "$TARGET\.github\"
Copy-Item "$DSOM_BASE\.agents\AGENTS.md" "$TARGET\.agents\"
Copy-Item "$DSOM_BASE\docs\governance\MINTLIFY-USER-MANUAL-SYNC-GUIDE.md" "$TARGET\docs\governance\"
Copy-Item "$DSOM_BASE\docs-source\.mintignore" "$TARGET\docs-source\"
Copy-Item "$DSOM_BASE\scripts\sync_docs.py" "$TARGET\scripts\"
Copy-Item "$DSOM_BASE\.github\workflows\sync-docs.yml" "$TARGET\.github\workflows\"
Copy-Item -Recurse "$DSOM_BASE\tools\*" "$TARGET\tools\"
Copy-Item -Recurse "$DSOM_BASE\.agents\skills\dsom-token-calculator", "$DSOM_BASE\.agents\skills\dsom-signature-injector", "$DSOM_BASE\.agents\skills\mintlify-docs-compiler", "$DSOM_BASE\.agents\skills\initialize-gitops" "$TARGET\.agents\skills\"
Set-Location $TARGET
bash tools/init-brain.sh
```

***

*Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-08-23*
*Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0*


## Related topics

- [Mintlify User Manual Architecture & One-Way Sync Guide](/governance/mintlify-user-manual-sync-guide.md)
- [AI Skill Architecture: Progressive Disclosure & Semantic Routing](/governance/ai-skill-architecture.md)
- [🧠 Deep State of Mind (DSOM) For My AI Protocol](/core-concepts.md)
- [DSOM - Deep State of Mind: AI Governance Framework](/index.md)
- [🚀 DSOM Bootstrap Skill](/skills/dsom-bootstrap.md)
