with one click
init
// Initialize or rescan a Hypo-Workflow project when the user wants architecture-aware setup before planning or execution.
// Initialize or rescan a Hypo-Workflow project when the user wants architecture-aware setup before planning or execution.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | init |
| description | Initialize or rescan a Hypo-Workflow project when the user wants architecture-aware setup before planning or execution. |
📌 输出语言规则: 读取 config.yaml → output.language
Use this skill to bootstrap .pipeline/ and the architecture baseline. normal /hw:init does not require git. V8.1 also lets init import pre-Workflow Git history into a closed Legacy Cycle.
Interactive init should prepare the project for the Cycle-level P0 Configure pre-discover stage. P0 Configure runs after cycle new and before P1 Discover; it may reuse existing settings from cycle_explicit, previous_cycle_snapshot, project_config, global_config, or built_in_default, and it covers automation, Subagent authorization, acceptance mode, PR/MR remote write policy, full regression, analysis boundaries, and worker separation.
--import-history is present.--rescan: refresh architecture for an existing pipeline.--folder: force folder-mode architecture output.--single: force single-file architecture output.--import-history: scan current Git first-parent history and import it as Cycle 0 Legacy.--interactive: when used with --import-history, show the split plan and wait for explicit confirmation before writing archive files.--automation manual|balanced|full: non-interactive automation level override for generated project config.~/.hypo-workflow/config.yaml if present so generated project config can inherit defaults without duplicating them..pipeline/.pipeline/config.yaml:
⚙️ 自动化程度
[1] 稳妥模式 (`manual`) — 多确认,适合高风险或探索任务
[2] 自动模式 (`balanced`) — 普通执行自动继续,规划和高风险 Gate 保留确认
[3] 全自动模式 (`full`) — 尽量自动推进,但规划、破坏性/外部副作用、发布仍需确认
In non-interactive contexts, use balanced unless --automation provides manual, balanced, or full..pipeline/config.yaml with only project-specific values and overrides that differ from global defaults, including automation.level when chosen during init.execution.worker_separation.mode:
offrecommendedstrictP0 Configure before P1 Discover; otherwise record that project defaults are ready for later reuse. P0 Configure runs after cycle new and before P1 Discover, asks about automation, Subagent authorization, acceptance mode, PR/MR remote write confirmation, full regression, analysis boundaries, and worker separation, and can reuse values from cycle_explicit -> previous_cycle_snapshot -> project_config -> global_config -> built_in_default.📏 Rules 配置
[1] recommended — 推荐规则集(默认)
[2] strict — 严格模式
[3] minimal — 最小化
[4] 跳过(后续用 /hw:rules 配置)
.pipeline/rules.yaml with extends: recommended by default.pipeline/rules/custom/ for future custom rules.pipeline/ directories and before initializing state.yaml, branch into History Import if --import-history is present.--rescan to refresh architecture for an existing pipeline.current.phase=lifecycle_init when tracking this command through state./hw:init --import-history imports commits that happened before Hypo-Workflow started tracking the project. /hw:init --import-history requires git, but it must not change normal init behavior when the flag is absent.
When generating Legacy reports, resolve output.language from project > global > defaults.
zh-CN / zh -> load templates/zh/legacy-report.mden / en-US -> load templates/en/legacy-report.mdtemplates/legacy-report.mdPROJECT-SUMMARY generation must use the same language for headings, table headers, status labels, and prose. Internal state.yaml and log.yaml remain English.
git rev-parse --is-inside-work-tree❌ 当前目录不是 git 仓库,请先执行 git initgit log --format="%H|%aI|%s" --first-parent.pipeline/config.yaml has project_root, append -- <project_root> for monorepo filtering.pipeline/state.yaml already exists, read the earliest tracked started / started_at timestamp and import only commits before that cutoff.history_import.* from project > global > defaults.history_import:
split_method: auto
time_gap_threshold: 24h
max_milestones: 20
keyword_patterns:
- 'feat\(M(\d+)\):'
- 'M(\d+)-'
- 'milestone-(\d+)'
In split_method: auto, try these signals in order and choose the first that creates at least 2 milestones:
git tag --sort=creatordate --format='%(refname:short)|%(creatordate:iso-strict)'keyword_patternsgit log --merges --first-parenthistory_import.time_gap_thresholdIf a specific split_method is configured, use only that method and fall back to M0-legacy when it cannot split.
M0-legacy.M0-v1.0.M0-scaffold.M0-pr-1.M0-initial, then use concise date or message slugs.history_import.max_milestones and never exceed 20 milestones by default.Mxx-remaining.... and N other commits.When --interactive is present:
Complete the scan and split in memory.
Show a summary:
History Import split plan
Detected 142 commits and split them by [tag] into 5 milestones:
M0-scaffold (12 commits, 2025-01-15 ~ 2025-01-20)
M1-core-crud (35 commits, 2025-01-21 ~ 2025-02-15)
Confirm, or ask to merge, split, rename, or switch signal.
Stop and wait for user confirmation.
If the user asks to merge, split, rename, or switch signal, revise the plan, show it again, and wait again.
Do not generate files until the user explicitly confirms.
Without --interactive, generate files immediately after the split plan is computed.
Create .pipeline/archives/cycle-0-legacy/ with:
.pipeline/archives/cycle-0-legacy/
├── cycle.yaml
├── summary.md
└── M{x}-{name}/
└── report.md
cycle.yaml shape:
name: "Legacy (pre-Workflow)"
id: 0
status: closed
started: "<earliest commit time in output.timezone>"
finished: "<init execution time in output.timezone>"
import_source: git
import_method: <tag | keyword | merge | time_gap>
total_commits: <total commit count>
total_milestones: <milestone count>
milestones:
- name: <milestone name>
commits: <commit count>
started: "<first commit time>"
finished: "<last commit time>"
summary.md must include:
Each milestone report must use templates/legacy-report.md and include:
output.timezoneLegacy reports must not include TDD fields such as write_tests, run_red, or review_code.
After writing Cycle 0 Legacy, create or preserve .pipeline/cycle.yaml as active Cycle 1:
cycle:
number: 1
name: "Current"
type: feature
status: active
previous_cycle: 0
Do not overwrite an existing active Cycle unless the user explicitly asks.
❌ 当前目录不是 git 仓库,请先执行 git init..pipeline/state.yaml: import only commits before the earliest tracked pipeline start.M0-legacy.project_root is configured, filter git log to that path.references/init-spec.md — init behavior and architecture strategyreferences/commands-spec.mdreferences/config-spec.mdreferences/rules-spec.mdrules/presets/recommended.yamltemplates/legacy-report.mdSKILL.md