From hw
Generate compact context views for large Hypo-Workflow runtime files without mutating the originals.
npx claudepluginhub hypoxanthineovo/hypo-workflow --plugin hwThis skill uses the workspace's default tool permissions.
📌 输出语言规则:
Saves critical files, task progress, decisions, and next steps before Claude Code compaction for post-compact restoration. Use before /compact or auto-compact triggers.
Suggests manual /compact at tool call thresholds during long, multi-phase Claude Code sessions to preserve context across task phases over arbitrary auto-compaction.
Suggests context compaction at logical breakpoints like phase transitions, milestones, or after 40 tool calls to avoid official auto-compact bugs. Activates via hooks in long dev sessions.
Share bugs, ideas, or general feedback.
📌 输出语言规则: 读取 config.yaml → output.language
Use this skill when the user invokes /hw:compact or /hypo-workflow:compact.
Compact files are derived context views. They reduce SessionStart context size while keeping the source files unchanged.
Compact output is recovery and index context. Agents must restart from stable prompt/design artifacts such as .pipeline/prompts/*.md, .pipeline/design-spec.md, .pipeline/design-concepts.yaml, .pipeline/glossary.md, and durable Knowledge indexes. Compact summaries are not design authority and must not replace those stable artifacts when making implementation decisions.
All compact files are written next to their source files:
.pipeline/PROGRESS.compact.md.pipeline/state.compact.yaml.pipeline/log.compact.yaml.pipeline/reports.compact.md.pipeline/patches.compact.md.pipeline/knowledge/knowledge.compact.mdNever delete or rewrite the original files while generating compact views.
Resolve compact.* from project config > global config > defaults:
compact:
auto: true
progress_recent: 15
state_history_full: 1
log_recent: 20
reports_summary_lines: 3
If config is missing, use these defaults.
Supported form:
/hw:compact~/.hypo-workflow/config.yaml if present..pipeline/config.yaml if present.output.language, output.timezone, and compact.*..pipeline/ for compressible source files..compact file only when the source file exists.已生成 4 个 .compact 文件,预计节省 ~92% context token.PROGRESS.compact.mdSource: .pipeline/PROGRESS.md
Keep:
compact.progress_recent progress entries; default 15.pipeline/archives/*/summary.mdDo not include full archived progress files.
state.compact.yamlSource: .pipeline/state.yaml
Keep:
pipeline and current sections completelylast_heartbeat when presentcompact.state_history_full completed milestones in full; default 1history.completed_prompts entries reduced to {prompt, status, score_summary}milestones list with names and statusesstate.compact.yaml is read-only context and must not be used as the canonical state file for mutations.
log.compact.yamlSource: .pipeline/log.yaml
Keep:
compact.log_recent lifecycle events in full; default 20older:
count: <N>
earliest: "<timestamp>"
latest: "<timestamp>"
summary: "<event type counts and notable failures>"
reports.compact.mdSource: .pipeline/reports/
For each historical report, extract at most compact.reports_summary_lines lines; default 3.
Prefer these facts when present:
Skip the current Milestone report so SessionStart can load it in full when it exists.
patches.compact.mdSource: .pipeline/patches/P*.md
Include only closed Patches. For each closed Patch, keep:
Open Patch files remain loaded separately in full by SessionStart.
knowledge.compact.mdSource: .pipeline/knowledge/records/*.yaml plus generated category indexes.
Keep:
Full raw knowledge records are not loaded by default. SessionStart loads .pipeline/knowledge/knowledge.compact.md and .pipeline/knowledge/index/*.yaml only.
When compact.auto: true:
.pipeline/knowledge/knowledge.compact.md when Knowledge Ledger records or indexes changed/hw:cycle close before or immediately after archive summary generationWhen compact.auto: false, do not generate compact files unless the user explicitly invokes /hw:compact.
Compact files are derived artifacts. .gitignore must include *.compact.* so they are not tracked.
hooks/session-start.sh — compact-first context loadingskills/status/SKILL.md — --full status behaviorskills/log/SKILL.md — --full log behaviorskills/report/SKILL.md — report summary and --viewreferences/config-spec.md — config defaultsSKILL.md — root command routing