From hw
Initialize or rescan a Hypo-Workflow project when the user wants architecture-aware setup before planning or execution.
npx claudepluginhub hypoxanthineovo/hypo-workflow --plugin hwThis skill uses the workspace's default tool permissions.
📌 输出语言规则:
Initializes new projects: sets up git, detects brownfield code (JS/TS/Python/Go/Rust/Swift/Java), offers codebase mapping, creates PROJECT.md, config.json, intel scaffolding.
Interactive onboarding guide that senses the current project state and recommends a short Hypo-Workflow command path.
Bootstraps repositories with harness engineering scaffolding: AGENTS.md orientation map, docs/ system of record, boundary tests, linter rules, CI pipeline, GC scripts. Use for new projects, agent-readiness, or architecture boundaries.
Share bugs, ideas, or general feedback.
📌 输出语言规则: 读取 config.yaml → output.language
Use this skill to bootstrap .pipeline/ and the architecture baseline. V8.1 also lets init import pre-Workflow Git history into a closed Legacy Cycle.
--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.~/.hypo-workflow/config.yaml if present so generated project config can inherit defaults without duplicating them..pipeline/.pipeline/config.yaml with only project-specific values and overrides that differ from global defaults.📏 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. 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