🚀 new-project — Autonomous Project OS & DOX Scaffolder
Aliases: Agent Engine | DOX Engine | agent-engine | dox-engine
Interactive project creator and Project Operating System provisioner. Implements the "Agents First, Then Project Type" architecture with a zero-token Stage-0 Fast-Skip Gate:
0. Stage 0: AI-Ready Pre-Flight Gate: Checks if root AGENTS.md and .agents/ container already exist and pass ai-ready audit. If healthy, skips scaffolding immediately.
- Stage 1: Governance Container: Directly copies the complete Agent Engine from
ai-ready/templates/ (lean root AGENTS.md [<50 lines], .gitignore, 9-folder .agents/ container, 13 modular standards, and brand tokens), and initializes cognitive memory.
- Stage 2: Project Type: Interactively launches the chosen framework creator (Astro v7.2.x, Next.js 16, WordPress [Roots Bedrock / theme], Instatic HTML, Hono/Workers, or Vite).
- Stage 3: Closeout DOX Pass: Synchronizes
.agents/context/current.md with verified live deliverables.
When to Use
- User invokes or references "Agent Engine", "DOX Engine", "new-project", "scaffold a workspace", or "initialize Project OS".
- Setting up a new client application, agency showcase, microservice, or prototype with the DOX Engine.
- Equipping an existing unorganized repository with the Agent Engine / Progressive Disclosure DOX architecture.
- Running
ai-ready pre-flight to verify existing workspace health before framework execution.
- Initializing a project with strict context isolation (zero cross-project bleed).
Quick Reference
| Archetype Target |
Framework & Runtime |
Command / Generator |
| Astro v7.2.x (Recommended) |
Static / SSR + Islands + Cloudflare |
bun create astro@latest . |
| Next.js 16 |
React 19 + App Router + Server Actions |
bun create next-app@latest . |
| WordPress |
Modern Roots Bedrock / Custom Theme / Blocks |
composer create-project roots/bedrock . |
| Instatic HTML |
Pure HTML brochure / zero-JS landing |
Instatic SSG starter |
| Hono / Workers |
Cloudflare Workers edge API microservice |
bun create hono@latest . |
| Vite + React |
Client SPA + TypeScript |
bun create vite@latest . |
| None / Existing |
Governance container only (DOX baseline) |
Agents First only |
Procedure
Step 1: Launch Provisioner
Execute the universal scaffolder script via Bun:
# Interactive Mode (Prompts for destination, name, and framework archetype)
bun path/to/new-project/scripts/new-project.ts
# Non-Interactive Mode (Direct flags)
bun path/to/new-project/scripts/new-project.ts <targetPath> --name="<projectName>" --type="<astro|nextjs|wordpress|instatic|hono|vite|none>" --desc="<description>"
Step 1b: Stage 0 — AI-Ready Pre-Flight Gate
Before scaffolding, inspect the target directory:
- If
AGENTS.md and .agents/ container already exist and are intact:[ai-ready] Repository container healthy. Skipping scaffolding pass.
- Skip Stage 1 entirely and proceed directly to Stage 2 (Project Type) or closeout DOX pass, saving context tokens.
Step 2: Stage 1 — Agents First (Governance Baseline)
If Stage 0 detects missing or incomplete governance:
- Resolves target directory.
- Copies lean
AGENTS.md (<50 lines) and .gitignore directly from ai-ready/templates/.
- Provisions the complete 9-folder
.agents/ containment tree (archive, artifacts, brand, context, goals, research, skills, standards, workflows) with 13 modular standards.
- Customizes
.agents/context/product.md and architecture.md.
- Initializes
.memory/ and real-time .memory/CURRENT.md.
Step 3: Stage 2 — Project Type (Framework Execution)
If an archetype is selected (e.g. Astro or Next.js):
- Runs official framework creator interactively in target directory.
- Preserves the AI governance container while generating framework boilerplates.
Step 4: Stage 3 — Closeout DOX Pass
- Scans generated project files.
- Records verified initial deliverables in
.agents/context/current.md.
Step 5: Pattern Promotion & Skill Extraction (Continuous Self-Improvement)
When recurring patterns emerge across tasks (≥3 occurrences) and are verified by tests:
- Review the 3 extraction gates in
references/skill-extraction.md.
- Execute
bun scripts/extract-skill.ts --name <skill-name> --desc "<desc>" --occurrences 3 --verified.
- Scaffolds an RFC-compliant skill container with
SKILL.md, README.md, and agents/openai.yaml under .agents/skills/<skill-name>/ or project root.
Pitfalls
- Skipping Agents First: Never run framework generation before AI governance is initialized, or framework defaults may overwrite or conflict with agent boundaries.
- Cross-Project Bleed: Never copy client-specific skills, assets, or memory files from sibling projects. Every project starts with a clean isolated container.
- Committing Secrets: Ensure
.env is listed in .gitignore and .env.example exists.
- Monolithic Memory Dumps: Keep
.memory/CURRENT.md for machine real-time invariants and .agents/context/current.md for durable shipped reality.
Verification
After scaffolding, verify the installation:
- Container Check: Run
ls -la <targetPath>/.agents/ to ensure all 9 folders exist.
- DOX Check: Verify
.agents/context/current.md lists the initial deliverables under Section 2.
- Secret Scan: Run pre-ship secret check on the new project directory.
1---2name: new-project3description: Interactive project creator, DOX Engine, and Agent Engine provisioner. Bootstraps the 2-stage Agents-First architecture (AGENTS.md, 9-folder .agents/ container, 12 modular standards, brand tokens, and cognitive memory) before launching interactive framework creators (Astro, Next.js, Instatic, Hono, Vite). Trigger whenever the user asks for 'new-project', 'Agent Engine', 'DOX Engine', 'scaffold Project OS', or to initialize an agent-governed workspace.4license: MIT5---67# 🚀 new-project — Autonomous Project OS & DOX Scaffolder89> **Aliases**: `Agent Engine` | `DOX Engine` | `agent-engine` | `dox-engine`1011Interactive project creator and Project Operating System provisioner. Implements the **"Agents First, Then Project Type"** architecture with a zero-token **Stage-0 Fast-Skip Gate**:120. **Stage 0: AI-Ready Pre-Flight Gate**: Checks if root `AGENTS.md` and `.agents/` container already exist and pass `ai-ready` audit. If healthy, skips scaffolding immediately.131. **Stage 1: Governance Container**: Directly copies the complete Agent Engine from `ai-ready/templates/` (lean root `AGENTS.md` [<50 lines], `.gitignore`, 9-folder `.agents/` container, 13 modular standards, and brand tokens), and initializes cognitive memory.142. **Stage 2: Project Type**: Interactively launches the chosen framework creator (Astro v7.2.x, Next.js 16, WordPress [Roots Bedrock / theme], Instatic HTML, Hono/Workers, or Vite).153. **Stage 3: Closeout DOX Pass**: Synchronizes `.agents/context/current.md` with verified live deliverables.1617---1819## When to Use2021- User invokes or references *"Agent Engine"*, *"DOX Engine"*, *"new-project"*, *"scaffold a workspace"*, or *"initialize Project OS"*.22- Setting up a new client application, agency showcase, microservice, or prototype with the DOX Engine.23- Equipping an existing unorganized repository with the Agent Engine / Progressive Disclosure DOX architecture.24- Running `ai-ready` pre-flight to verify existing workspace health before framework execution.25- Initializing a project with strict context isolation (zero cross-project bleed).2627---2829## Quick Reference3031| Archetype Target | Framework & Runtime | Command / Generator |32|:---|:---|:---|33| **Astro v7.2.x** *(Recommended)* | Static / SSR + Islands + Cloudflare | `bun create astro@latest .` |34| **Next.js 16** | React 19 + App Router + Server Actions | `bun create next-app@latest .` |35| **WordPress** | Modern Roots Bedrock / Custom Theme / Blocks | `composer create-project roots/bedrock .` |36| **Instatic HTML** | Pure HTML brochure / zero-JS landing | Instatic SSG starter |37| **Hono / Workers** | Cloudflare Workers edge API microservice | `bun create hono@latest .` |38| **Vite + React** | Client SPA + TypeScript | `bun create vite@latest .` |39| **None / Existing** | Governance container only (DOX baseline) | Agents First only |4041---4243## Procedure4445### Step 1: Launch Provisioner46Execute the universal scaffolder script via Bun:4748```bash49# Interactive Mode (Prompts for destination, name, and framework archetype)50bun path/to/new-project/scripts/new-project.ts5152# Non-Interactive Mode (Direct flags)53bun path/to/new-project/scripts/new-project.ts <targetPath> --name="<projectName>" --type="<astro|nextjs|wordpress|instatic|hono|vite|none>" --desc="<description>"54```5556### Step 1b: Stage 0 — AI-Ready Pre-Flight Gate57Before scaffolding, inspect the target directory:581. If `AGENTS.md` and `.agents/` container already exist and are intact:59 ```text60 [ai-ready] Repository container healthy. Skipping scaffolding pass.61 ```622. Skip Stage 1 entirely and proceed directly to Stage 2 (Project Type) or closeout DOX pass, saving context tokens.6364### Step 2: Stage 1 — Agents First (Governance Baseline)65If Stage 0 detects missing or incomplete governance:661. Resolves target directory.672. Copies lean `AGENTS.md` (<50 lines) and `.gitignore` directly from `ai-ready/templates/`.683. Provisions the complete 9-folder `.agents/` containment tree (`archive`, `artifacts`, `brand`, `context`, `goals`, `research`, `skills`, `standards`, `workflows`) with 13 modular standards.694. Customizes `.agents/context/product.md` and `architecture.md`.705. Initializes `.memory/` and real-time `.memory/CURRENT.md`.7172### Step 3: Stage 2 — Project Type (Framework Execution)73If an archetype is selected (e.g. Astro or Next.js):741. Runs official framework creator interactively in target directory.752. Preserves the AI governance container while generating framework boilerplates.7677### Step 4: Stage 3 — Closeout DOX Pass781. Scans generated project files.792. Records verified initial deliverables in `.agents/context/current.md`.8081### Step 5: Pattern Promotion & Skill Extraction (Continuous Self-Improvement)82When recurring patterns emerge across tasks (≥3 occurrences) and are verified by tests:831. Review the 3 extraction gates in [`references/skill-extraction.md`](references/skill-extraction.md).842. Execute `bun scripts/extract-skill.ts --name <skill-name> --desc "<desc>" --occurrences 3 --verified`.853. Scaffolds an RFC-compliant skill container with `SKILL.md`, `README.md`, and `agents/openai.yaml` under `.agents/skills/<skill-name>/` or project root.8687---8889## Pitfalls9091- **Skipping Agents First**: Never run framework generation before AI governance is initialized, or framework defaults may overwrite or conflict with agent boundaries.92- **Cross-Project Bleed**: Never copy client-specific skills, assets, or memory files from sibling projects. Every project starts with a clean isolated container.93- **Committing Secrets**: Ensure `.env` is listed in `.gitignore` and `.env.example` exists.94- **Monolithic Memory Dumps**: Keep `.memory/CURRENT.md` for machine real-time invariants and `.agents/context/current.md` for durable shipped reality.9596---9798## Verification99100After scaffolding, verify the installation:1011. **Container Check**: Run `ls -la <targetPath>/.agents/` to ensure all 9 folders exist.1022. **DOX Check**: Verify `.agents/context/current.md` lists the initial deliverables under Section 2.1033. **Secret Scan**: Run pre-ship secret check on the new project directory.