This is a Meta-Prompt. When the user completes the planning phase (i.e., the documents under
specs/are ready), use this Skill to turn the documents into an actual code skeleton.
Project Context Protocol - CRITICAL
Please strictly follow the mandatory project context protocol:specs/PROJECT-CONTEXT.md Before executing this Skill, project cognition must first be established.
Your Task
Strictly follow the definitions under the specs/ directory to perform project initialization operations.Do not make any technical decisions that are not defined in the documents.
Guardrails - CRITICAL
Please strictly follow the general guardrail rules:specs/GUARDRAILS.md Current phase: Initialization phase (Initialization)
Inputs
Case A: Project not initialized (empty directory) You must ensure the following documents already exist, to be used to generate the scaffold:
specs/技术栈.mdspecs/项目结构.mdspecs/开发规范.md
Case B: Project already exists The above documents are not required; the Skill will automatically skip initialization and generate a record.
Workflow
-
Environment Check:
- Check whether the current directory has already been initialized (criteria: existence of the
.gitdirectory or core configuration files such aspackage.json/go.mod). - If the project is already initialized:
- Output prompt: "Project already exists, skipping initialization step."
- Do not perform any directory creation or file modification operations。
- Generate/update the report (recording "detected that the project already exists, no changes performed") and end.
- If the project is not initialized: Continue with the steps below.
- Check whether the core tools specified in
specs/技术栈.mdare installed (such as Node.js, Go, Python).
- Check whether the current directory has already been initialized (criteria: existence of the
-
Scaffolding:
- Step 1: Core Initialization
- Execute the initialization command according to the tech stack (such as
npm init -yorgo mod init <module_name>)。 - Initialize Git repository:
git init。
- Execute the initialization command according to the tech stack (such as
- Step 2: Directory Structure Creation
- Read the "directory tree" section in
specs/项目结构.md. - Use
mkdir -pto batch-create all folders. - Key: Create a
.gitkeepfor each empty folder, to ensure Git can track it.
- Read the "directory tree" section in
- Step 3: Basic File Generation
- Create
.gitignore(automatically generated based onspecs/开发规范.mdor the tech stack). - Create
README.md(write in the project name and startup guide). - Create
.env.example。
- Create
- Step 1: Core Initialization
-
Generate Report:
- Record the initialization process to
docs/开发记录/初始化记录.md。
- Record the initialization process to
Output Template (Template)
After initialization/check completes, please output the following content in docs/开发记录/初始化记录.md (using the template in assets):
- Read
assets/initialization-log-template.md。 - Fill in the execution results.
- Save the file.
Interaction Guidelines
- Action first: This is a Skill that leans toward "execution." Use more Shell commands, talk less nonsense.
- Safety first: Before performing delete or overwrite operations,you mustobtain explicit user authorization.
- Final deliverable: project skeleton code +
docs/开发记录/初始化记录.md。