project-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

project-setup

project-setup

Deploys the complete SDD architecture with engram persistence and ai-context/ memory layer in the current project.
Triggers:
/project-setup
, initialize project, setup sdd, configure claude project, new sdd project

在当前项目中部署带有engram持久化和ai-context/内存层的完整SDD架构。
触发方式:/project-setup、初始化项目、设置SDD、配置Claude项目、新建SDD项目

What this skill does

该技能的作用

When the user runs
/project-setup
, I analyze the current project and generate:
  1. CLAUDE.md
    at the project root with real detected context
  2. ai-context/
    with the 5 memory files initialized
  3. Engram project context for the SDD cycle
  4. Registry of relevant skills based on the detected stack

当用户运行
/project-setup
时,我会分析当前项目并生成:
  1. 项目根目录下的
    CLAUDE.md
    ,包含真实检测到的上下文信息
  2. 初始化完成的
    ai-context/
    目录及其中5个内存文件
  3. 用于SDD周期的Engram项目上下文
  4. 基于检测到的技术栈生成的相关技能注册表

Process

执行流程

Step 1 — Project detection

步骤1 — 项目检测

I read and analyze:
  • package.json
    /
    pyproject.toml
    /
    go.mod
    /
    Cargo.toml
    /
    pom.xml
  • Folder structure (src/, app/, lib/, tests/, etc.)
  • Configuration files (tsconfig, eslint, prettier, etc.)
  • README.md if it exists
  • Existing docs folders
  • .git/
    to confirm it is a repository
I infer:
  • Main language and version
  • Framework(s) in use
  • Database / ORM
  • Testing tools
  • Build / bundler tools
  • Detected naming conventions (camelCase, snake_case, etc.)
  • Folder structure (feature-based, layer-based, monorepo, etc.)
我会读取并分析以下内容:
  • package.json
    /
    pyproject.toml
    /
    go.mod
    /
    Cargo.toml
    /
    pom.xml
  • 文件夹结构(src/、app/、lib/、tests/等)
  • 配置文件(tsconfig、eslint、prettier等)
  • 若存在则读取README.md
  • 已有的文档文件夹
  • .git/
    目录以确认是代码仓库
我会推断出:
  • 主要编程语言及版本
  • 使用的框架
  • 数据库/ORM
  • 测试工具
  • 构建/打包工具
  • 检测到的命名规范(camelCase、snake_case等)
  • 文件夹结构(基于功能、基于分层、单仓架构等)

Step 2 — Generate project CLAUDE.md

步骤2 — 生成项目CLAUDE.md

I create
CLAUDE.md
at the root with these sections:
markdown
undefined
我会在项目根目录创建
CLAUDE.md
,包含以下章节:
markdown
undefined

[Project Name]

[Project Name]

Stack

Stack

[Detected stack with versions]
[Detected stack with versions]

Architecture

Architecture

[Explained folder structure] [Detected architectural pattern]
[Explained folder structure] [Detected architectural pattern]

Conventions

Conventions

[Detected naming conventions] [Observed code patterns]
[Detected naming conventions] [Observed code patterns]

Important Commands

Important Commands

[Scripts from package.json / Makefile / etc.]
[Scripts from package.json / Makefile / etc.]

Project Memory

Project Memory

At the start of each session, read the relevant files in ai-context/:
  • ai-context/stack.md — Detailed technical stack
  • ai-context/architecture.md — Architecture decisions
  • ai-context/conventions.md — Team conventions
  • ai-context/known-issues.md — Known bugs and gotchas
  • ai-context/changelog-ai.md — AI change history
After completing significant work: update the relevant files or run /memory-update so the AI updates them.
At the start of each session, read the relevant files in ai-context/:
  • ai-context/stack.md — Detailed technical stack
  • ai-context/architecture.md — Architecture decisions
  • ai-context/conventions.md — Team conventions
  • ai-context/known-issues.md — Known bugs and gotchas
  • ai-context/changelog-ai.md — AI change history
After completing significant work: update the relevant files or run /memory-update so the AI updates them.

Active Skills

Active Skills

[List of relevant skills for this project]
[List of relevant skills for this project]

SDD — Spec-Driven Development

SDD — Spec-Driven Development

This project uses SDD. Entry points:
/sdd-explore <topic>
(investigate first) or
/sdd-propose <change-name>
(start from proposal). Multi-phase flows are handled by the orchestrator as meta-commands — type them directly in conversation. Phase skills:
/sdd-explore
,
/sdd-propose
,
/sdd-spec
,
/sdd-design
,
/sdd-tasks
,
/sdd-apply
,
/sdd-verify
,
/sdd-archive
.
undefined
This project uses SDD. Entry points:
/sdd-explore <topic>
(investigate first) or
/sdd-propose <change-name>
(start from proposal). Multi-phase flows are handled by the orchestrator as meta-commands — type them directly in conversation. Phase skills:
/sdd-explore
,
/sdd-propose
,
/sdd-spec
,
/sdd-design
,
/sdd-tasks
,
/sdd-apply
,
/sdd-verify
,
/sdd-archive
.
undefined

Step 3 — Initialize ai-context/

步骤3 — 初始化ai-context/目录

I create the 5 files with real content based on what was detected:
我会基于检测到的内容创建5个包含真实信息的文件:

ai-context/stack.md

ai-context/stack.md

markdown
undefined
markdown
undefined

Technical Stack

Technical Stack

Last updated: [date]
Last updated: [date]

Language

Language

Main Framework

Main Framework

  • [Relevant configuration details]
  • [Relevant configuration details]

Database / ORM

Database / ORM

  • [If applicable]
  • [If applicable]

Testing

Testing

  • [Testing framework]
  • [Commands to run tests]
  • [Testing framework]
  • [Commands to run tests]

Build / Bundler

Build / Bundler

  • [Build command]
  • [Dev command]
  • [Build command]
  • [Dev command]

Key Dependencies

Key Dependencies

PackageVersionPurpose
[name][version][what it does]
undefined
PackageVersionPurpose
[name][version][what it does]
undefined

ai-context/architecture.md

ai-context/architecture.md

markdown
undefined
markdown
undefined

Project Architecture

Project Architecture

Last updated: [date]
Last updated: [date]

Architectural Pattern

Architectural Pattern

[Detected: feature-based / layer-based / clean architecture / etc.]
[Detected: feature-based / layer-based / clean architecture / etc.]

Folder Structure

Folder Structure

[Explained tree with the purpose of each folder]
[Explained tree with the purpose of each folder]

Architecture Decisions

Architecture Decisions

DecisionChoiceAlternativesReason
[Inferred from existing code]
DecisionChoiceAlternativesReason
[Inferred from existing code]

Data Flow

Data Flow

[Description of the main flow]
[Description of the main flow]

Entry Points

Entry Points

[Main entry points of the system]
undefined
[Main entry points of the system]
undefined

ai-context/conventions.md

ai-context/conventions.md

markdown
undefined
markdown
undefined

Project Conventions

Project Conventions

Last updated: [date]
Last updated: [date]

Naming

Naming

  • Files: [detected]
  • Variables/Functions: [detected]
  • Classes/Types: [detected]
  • Constants: [detected]
  • Files: [detected]
  • Variables/Functions: [detected]
  • Classes/Types: [detected]
  • Constants: [detected]

File Structure

File Structure

[How files of each type are organized]
[How files of each type are organized]

Code Patterns

Code Patterns

[Patterns detected in existing code]
[Patterns detected in existing code]

Git

Git

[Commit conventions if detected] [Branch strategy if detected]
[Commit conventions if detected] [Branch strategy if detected]

Testing

Testing

[Where tests live] [Test naming conventions]
undefined
[Where tests live] [Test naming conventions]
undefined

ai-context/known-issues.md

ai-context/known-issues.md

markdown
undefined
markdown
undefined

Known Issues

Known Issues

Last updated: [date]
Last updated: [date]

Active Bugs

Active Bugs

[Empty at start — filled during development]
[Empty at start — filled during development]

Gotchas and Limitations

Gotchas and Limitations

[Anything unusual detected in existing code]
[Anything unusual detected in existing code]

Identified Technical Debt

Identified Technical Debt

[Problematic patterns detected]
[Problematic patterns detected]

Workarounds in Use

Workarounds in Use

[If there are workarounds in the code, document them here]
undefined
[If there are workarounds in the code, document them here]
undefined

ai-context/changelog-ai.md

ai-context/changelog-ai.md

markdown
undefined
markdown
undefined

AI Changelog

AI Changelog

This file records significant changes made by Claude.
This file records significant changes made by Claude.

Entry Format

Entry Format

[YYYY-MM-DD] — [Change name]

[YYYY-MM-DD] — [Change name]

What was done: [description] Modified files: [list] Decisions made: [relevant decisions] Notes: [anything important]

[Entries are added here chronologically]
undefined
What was done: [description] Modified files: [list] Decisions made: [relevant decisions] Notes: [anything important]

[Entries are added here chronologically]
undefined

Step 4 — Persist project context to engram

步骤4 — 将项目上下文持久化到Engram

Check if Engram MCP is reachable (call
mem_context
):
  • If reachable: save project context to engram via
    mem_save
    with
    topic_key: sdd-init/{project-name}
    . Log
    INFO: Engram detected — project context persisted to engram
    .
  • If not reachable: log
    WARNING: Engram not available — project context not persisted. SDD artifacts will be ephemeral.
检查Engram MCP是否可达(调用
mem_context
):
  • 若可达:通过
    mem_save
    将项目上下文保存到Engram,
    topic_key
    设为
    sdd-init/{项目名称}
    。记录
    INFO: Engram detected — project context persisted to engram
  • 若不可达:记录
    WARNING: Engram not available — project context not persisted. SDD artifacts will be ephemeral.

Step 5 — Final report

步骤5 — 最终报告

I present to the user:
✅ Project configured: [name]

Detected stack:
  - [language + version]
  - [framework + version]
  - [testing framework]

Files created:
  - CLAUDE.md
  - ai-context/stack.md
  - ai-context/architecture.md
  - ai-context/conventions.md
  - ai-context/known-issues.md
  - ai-context/changelog-ai.md

Next steps:
  1. Review and adjust CLAUDE.md with details I could not detect
  2. To start a change: /sdd-explore <topic> or /sdd-propose <change-name>
  3. To create project-specific skills: /skill-create <name>

我会向用户展示以下内容:
✅ Project configured: [name]

Detected stack:
  - [language + version]
  - [framework + version]
  - [testing framework]

Files created:
  - CLAUDE.md
  - ai-context/stack.md
  - ai-context/architecture.md
  - ai-context/conventions.md
  - ai-context/known-issues.md
  - ai-context/changelog-ai.md

Next steps:
  1. Review and adjust CLAUDE.md with details I could not detect
  2. To start a change: /sdd-explore <topic> or /sdd-propose <change-name>
  3. To create project-specific skills: /skill-create <name>

Rules

规则

  • NEVER overwrite existing files without warning and asking for confirmation
  • If
    CLAUDE.md
    already exists, I offer an intelligent merge or creating a backup
  • If
    ai-context/
    already exists, I offer to update only what is missing
  • I always read real code — I never invent the stack
  • If I cannot determine something with certainty, I mark it as
    [To confirm]
  • NEVER create a
    .claude/commands/
    directory — commands/ is a legacy mechanism;
    .claude/skills/
    is the only supported extensibility path for new projects.
  • 永远不要在未发出警告并征得确认的情况下覆盖现有文件
  • CLAUDE.md
    已存在,我会提供智能合并或创建备份的选项
  • ai-context/
    目录已存在,我会仅更新缺失的内容
  • 我始终读取真实代码——绝不会虚构技术栈
  • 若无法确定某些内容,我会标记为
    [To confirm]
  • 永远不要创建
    .claude/commands/
    目录——commands/是旧机制;
    .claude/skills/
    是新项目唯一支持的扩展路径。