一键导入
extract
Extract a reusable pattern from the current session into HEGEMON Pattern Library. Atomic operation (write + git add + commit + Notion sync).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Extract a reusable pattern from the current session into HEGEMON Pattern Library. Atomic operation (write + git add + commit + Notion sync).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | extract |
| description | Extract a reusable pattern from the current session into HEGEMON Pattern Library. Atomic operation (write + git add + commit + Notion sync). |
| argument-hint | <pattern name or description> |
IP Guard: Patterns describe methodology and approach, never verbatim proprietary code, client names, pricing, or sensitive business data. Anonymize all examples. See
hegemon/CLAUDE.mdanonymization rules.
From the current session's work, identify what is reusable:
hegemon/patterns/ directoryIf the answer to #1 or #2 is "no", this is NOT a pattern — it's a project-specific solution. Skip extraction.
If a similar pattern exists, update it (add to Reuse Log) instead of creating a new one.
Determine the pattern category:
| Category | Examples | Directory |
|---|---|---|
architecture | System design, infrastructure patterns, integration patterns | patterns/architecture/ |
workflow | Development process, CI/CD, session management, estimation | patterns/workflow/ |
validation | Review processes, quality gates, Council patterns | patterns/validation/ |
prompt | Effective prompt structures, agent delegation patterns | patterns/prompt/ |
communication | Stakeholder management, reporting, documentation patterns | patterns/communication/ |
Read existing patterns to find the next available ID:
ls hegemon/patterns/*/HEG-PAT-*.md | sort -t- -k3 -n | tail -1
Next ID = highest existing + 1. Format: HEG-PAT-XXX (zero-padded to 3 digits).
Create the pattern file using the HEGEMON template. The file MUST include ALL sections:
# HEG-PAT-XXX: [Pattern Name]
## Metadata
- **Origin**: [Project] / [Ticket or context]
- **Category**: [architecture | workflow | prompt | validation | communication]
- **Supervision Tier**: [AUTOPILOT | CO-PILOT | COMMAND]
- **Created**: [YYYY-MM-DD]
- **Last Updated**: [YYYY-MM-DD]
## Problem
[What recurring problem does this pattern solve? 2-3 sentences.]
## Solution
[The reusable approach — methodology, decision trees, workflow structures.
NOT verbatim code. Describe the pattern abstractly enough to apply across projects.]
## Constraints
[When NOT to use this pattern. Preconditions. Limitations.]
## Reuse Log
| Date | Project | Outcome | Adaptations |
|------|---------|---------|-------------|
| [today] | [origin project] | Extracted | Initial extraction |
Write the file to: hegemon/patterns/<category>/HEG-PAT-XXX-<kebab-case-name>.md
This MUST be a single atomic operation — never leave an uncommitted pattern file.
cd <hegemon-repo-path>
git add patterns/<category>/HEG-PAT-XXX-<name>.md
git commit -m "extract(patterns): HEG-PAT-XXX <pattern-name> from <project>"
git push origin main
Create an entry in the HEGEMON Pattern Library Notion database:
notion-create-pages({
title: "HEG-PAT-XXX: <Pattern Name>",
properties: {
"Pattern ID": "HEG-PAT-XXX",
"Category": "<category>",
"Origin Project": "<project>",
"Supervision Tier": "<tier>",
"Reuse Count": 1,
"Status": "validated",
"Git Path": "patterns/<category>/HEG-PAT-XXX-<name>.md"
}
})
If Notion MCP is unavailable, log a TODO in hegemon/memory.md for manual sync.
Append to hegemon/projects/<project>/extracts.md:
### HEG-PAT-XXX: <Pattern Name> (YYYY-MM-DD)
- **Ticket**: <ticket-id or context>
- **Category**: <category>
- **Transfer potential**: HIGH | MEDIUM | LOW
- **Learning**: <1-2 sentence insight from this extraction>
Pattern extracted: HEG-PAT-XXX — <Pattern Name>
Category: <category>
Supervision Tier: <tier>
Git: hegemon/patterns/<category>/HEG-PAT-XXX-<name>.md
Notion: synced | TODO (manual sync needed)
Project log: updated
Force a full-file rewrite (Write) instead of patch (Edit) when Edit keeps failing or diff is large. Context rot mitigation — use when Edit has failed ≥2× on same file, or when estimated diff >30% of file size.
STOA PR Guardian — advisory three-axis review (ADR compliance, security, AI code smell) with binary GO/NO-GO verdict + confidence. Never approves, never blocks merge.
Analyze cycle capacity gap and propose backlog items to fill the sprint to ~80% of proven velocity.
Visual roadmap snapshot — theme progress, milestones, velocity. Zero new infra (Linear MCP + velocity.json).
Cycle-aware bidirectional sync between plan.md and Linear. Discovers all cycle tickets, detects drift, updates markers.
Debug GitHub Actions CI pipeline failures. Analyse les logs de workflow, identifie la cause racine et propose un fix.