init-project,逐节说明
skill 自己的 SKILL.md 的各个章节,节选。悬停或点击一个章节,查看它引用的项目规则、模板和 references/ 文件。章节也是标签:点击即可跳转。
## Available blueprints
!find "${CLAUDE_PROJECT_DIR:-.}/.claude/blueprints" -mindepth 2 -maxdepth 2 -name '*.yaml' 2>/dev/null | sort
## Next to this repository
!ls -a "${CLAUDE_PROJECT_DIR:-.}/.." | head -30
## Session
${CLAUDE_SESSION_ID}
## Arguments
$ARGUMENTS
## Procedure
- The project is generated next to this repository, at
../<artifactId> - Interview — every question of the run, here, before delegating. The agent runs in the
… 此处截断,其余见文件
## Why this is a manually-invoked skill
Form 2: creating a project is a ritual a person starts (axis 2 — /init-project), and the interview it leads to cannot be triggered by inference from a sentence. Form 1 was rejected for exactly that: a skill that can scaffold a whole tree on the model's own judgment is a directory rewritten by accident. Form 3 was rejected here and used one level down instead — the isolation belongs to the generation, which is why project-initializer exists, and the interview belongs here, in the main session, the only place AskUserQuestion is guaranteed (@.claude/decisions/0123-lessons-learned-020-init-project-run.md).
Runs on sonnet with effort: low: the interview reads its questions from the blueprints and from the two chained skills, and the generation is delegated to project-initializer, which declares its own model (@.claude/decisions/0081-skill-model-required-per-class.md).
它读什么、写什么、拒绝什么
skill 自己的契约,取自 SKILL.md,保留原文。
Class
orchestrator — the territory is skill_classes.orchestrator's override for this skill in @.claude/schemas/extensions.json, and it is empty: this skill writes no file itself. Everything is written by project-initializer, which the guard bypasses as an executor agent, and by project-bootstrap under it. ArchHook.java guard enforces it. The one write it causes is audit genesis replacing three placeholders in the generated project's GENESIS.md, outside this repository — done by the hook's code, never by a Write.
Reads
the blueprint listing and the listing of this repository's parent directory injected above, every blueprint YAML for the interview, the § 2 questions of transport-security-setup and sonarqube-setup, and the arguments.
Owns
the interview of a project's first generation. The questions about transport and Sonar stay owned by their skills; this one only asks them before the agent starts.
Delegates
to project-initializer — never generates a file inline, not even a single pom.xml. A partial generation from this thread is the failure mode the agent exists to prevent: the report would describe a tree nobody wrote in full.
来源:SKILL.md § Contract(nerviz e4cae27)。
guard 如何处理它
orchestrator 是该 skill 的类,它的领地为空:自身不写任何文件。它打开的阶段正是阻止在主线程中生成项目的机制。右侧文字是 hook 自己的输出。
init-project 类的 write_allow
任何文件:领地为空
拒绝以退出码 2 结束,消息回到模型。
> /init-project … UserPromptSubmit guard prompt exit 0 # phase opened: init-project (class orchestrator) # write_allow: [] — this skill writes no file itself
PreToolUse Write(../bank-app/pom.xml) guard write exit 2 ❌ `init-project` is class `orchestrator` — ../bank-app/pom.xml is outside its territory. write_allow: (nothing — this class writes no file) Put the content in the spec as a code block, or finish the run and invoke the skill that owns this path. If the path is legitimately this skill's, widen skill_classes.orchestrator in .claude/schemas/extensions.json — retrying will not help.
PreToolUse Agent(project-initializer) guard call exit 0 # an Agent call changes nothing here: the phase stays init-project PreToolUse Write(../bank-app/pom.xml) # agent_type: project-initializer guard write exit 0 # judged by agent_classes.driver, write_allow: **
它在轨道上的位置
每张卡片是 /init-project 的一步。访谈在主会话中进行;着色的步骤在 project-initializer 内运行;git-publish 在 audit genesis 之后回到主会话。虚线步骤仅在适用时运行。
/init-project orchestrator · sonnet