agentleFS
stoa-platformstoa-platform/stoa/.claude/skills/extract/SKILL.md

extract

Skill9 starsChanged 7 months agoApache-2.0View on GitHub

Extract a reusable pattern from the current session into HEGEMON Pattern Library. Atomic operation (write + git add + commit + Notion sync).

  • Commits and pushes

37 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ai-act-readiness, c-level-agents and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 35 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Does a similar pattern already exist?: Check hegemon/patterns/ directory

    line 17
  2. Distinctive:

    If the answer to #1 or #2 is "no", this is NOT a pattern — it's a project-specific solution.

    line 19
  3. Distinctive:

    If a similar pattern exists, update it (add to Reuse Log) instead of creating a new one.

    line 21
  4. Distinctive:

    Read existing patterns to find the next available ID:

    line 37
  5. Distinctive:

    Create the pattern file using the HEGEMON template.

    line 47
  6. Very specific:

    Write the file to: hegemon/patterns/<category>/HEG-PAT-XXX-<kebab-case-name>.md

    line 75
  7. Distinctive:

    Create an entry in the HEGEMON Pattern Library Notion database:

    line 90
  8. Very specific:

    If Notion MCP is unavailable, log a TODO in hegemon/memory.md for manual sync.

    line 107

“Common” is measured: kept by at least 6 in 10 of the 35 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

HEGEMON Pattern Extraction — $ARGUMENTS

IP Guard: Patterns describe methodology and approach, never verbatim proprietary code, client names, pricing, or sensitive business data. Anonymize all examples. See hegemon/CLAUDE.md anonymization rules.

Step 1: Identify the Pattern

From the current session's work, identify what is reusable:

  1. What recurring problem was solved? (not a one-off fix)
  2. Is this transferable to other projects (PRAXIS, ATHLOS, OIKOS)?
  3. Does a similar pattern already exist? Check hegemon/patterns/ directory

If 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.

Step 2: Categorize

Determine the pattern category:

CategoryExamplesDirectory
architectureSystem design, infrastructure patterns, integration patternspatterns/architecture/
workflowDevelopment process, CI/CD, session management, estimationpatterns/workflow/
validationReview processes, quality gates, Council patternspatterns/validation/
promptEffective prompt structures, agent delegation patternspatterns/prompt/
communicationStakeholder management, reporting, documentation patternspatterns/communication/

Step 3: Assign Pattern ID

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).

Step 4: Write the Pattern File

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

Step 5: Atomic Git Commit

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

Step 6: Notion Sync

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.

Step 7: Update Project Extract Log

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>

Step 8: Report

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

Rules

  • One pattern per extraction — don't bundle multiple patterns
  • Methodology, not code — describe the approach, not implementation details
  • Anonymize everything — no client names, no pricing, no internal metrics values
  • Update > Create — if a similar pattern exists, update its Reuse Log instead
  • Atomic commits — pattern file must be committed immediately, never left unstaged
  • Notion is secondary — if sync fails, the git file is still the source of truth

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.