Update Patterns
Use this skill to maintain living pattern files from notes that already have generate-metadata frontmatter.
The goal is not to summarize each note again. The goal is to accumulate cross-note intelligence so Rami can see repeated problems, beliefs, fears, principles, people, and projects over time.
This skill updates pattern files. It does not generate per-note metadata and it does not produce Atomic Habits principle reports. Use generate-metadata before this skill and generate-principles when the user asks for principles to live by.
The agent owns judgment. The script owns structure.
- The agent reads metadata and decides whether a value belongs in an existing pattern or a new entry.
- The script creates or updates markdown files using stable managed blocks.
- The script does not call an AI API and cannot infer patterns by itself.
Pattern Files
Default pattern files:
Communication Flaws.mdfromcommunication_flawsRelationship Patterns.mdfromrelationship_patternsIdentity Beliefs.mdfromidentity_beliefsRecurring Fears.mdfromrecurring_fearsDecision Principles.mdfromdecision_principlesOpen Problems.mdfromopen_problemsExperiments To Run.mdfromexperiments_to_runPeople Mentioned.mdfrompeople_mentionedProjects Mentioned.mdfromprojects_mentioned
The default output directory is:
../Obsidian/My Outputs/Patterns/
The directory is configurable. If the user asks for a different path, use that.
The list is expandable through pattern_schema.json.
Input Requirements
Use markdown files with generated metadata frontmatter.
Before updating patterns, validate the notes when possible:
uv run python /Users/rami/Documents/life-os/ai-agents-config/skills/generate-metadata/scripts/generate_metadata.py validate path/to/note.md
If a note does not validate, skip it and report it. Do not block the whole batch.
How To Update Patterns
For each input note:
- Read the generated metadata fields.
- Read the note body when the metadata is too compressed to understand the evidence.
- Create a wiki-link that lets Rami identify the exact source note.
- Read existing pattern files before deciding whether to merge or create entries.
- Merge only when the same pattern is truly the same recurring thing.
- Keep separate entries when the difference matters.
- Use natural language phrases, not snake_case values.
- Be blunt and action-oriented.
Do not create fake patterns from empty metadata fields.
Do not blindly create one pattern entry per metadata value. The agent should cluster related metadata values into the smallest useful set of recurring patterns while preserving meaningful distinctions.
The skill is doing second-order synthesis:
- first-order: a note says
fear of missing the one - second-order: several notes reveal
scarcity thinking around rare romantic opportunities
Prefer the second-order pattern when multiple notes point to the same underlying loop.
Entry Standard
Each pattern entry should include:
title: readable phrase, not a tag slugstatus:active,possible,resolved, orarchivedsource_notes: wiki-links to notes that support the patternevidence: short note-backed evidence linessummary: what the pattern iswhy_it_matters: why Rami should careaction: what Rami should do when this pattern appearsrelated_patterns: optional wiki-links to other pattern entries or concept notes
For people and projects, the action can describe the practical reason to track them.
Merge Rules
The script uses managed blocks with stable IDs:
### getting too far ahead in your head
<!-- pattern-id: communication_flaws/getting-too-far-ahead-in-your-head -->
If a block with the same pattern-id already exists, the script replaces that managed block with the new merged version.
If no matching block exists, the script appends a new block.
Anything outside managed pattern blocks should be preserved.
Merge when two entries describe the same loop in different words:
turning uncertainty into fantasyprojecting a future before enough facts exist
Keep separate when the trigger, consequence, or action is different:
approval seeking in social situationsoverexplaining when trying to sound competent
Execution Protocol
- Resolve the target markdown file or files.
- Validate generated metadata where possible.
- Read target notes and existing pattern files.
- Build an update payload with merged entries.
- Write the payload to
/tmp/update-patterns-<short-name>.json. - Run the updater script.
- Run validation on the updated pattern directory.
- Report updated files, skipped invalid notes, and any entries created with
possiblestatus.
Apply updates:
uv run python /Users/rami/Documents/life-os/ai-agents-config/skills/update-patterns/scripts/update_patterns.py apply --payload-file /tmp/update-patterns.json --output-dir ../Obsidian/My Outputs/Patterns
Validate a pattern directory:
uv run python /Users/rami/Documents/life-os/ai-agents-config/skills/update-patterns/scripts/update_patterns.py validate --output-dir ../Obsidian/My Outputs/Patterns
Inspect the schema:
uv run python /Users/rami/Documents/life-os/ai-agents-config/skills/update-patterns/scripts/update_patterns.py schema
Payload Format
Use this JSON shape:
{
"updates": [
{
"field": "communication_flaws",
"title": "getting too far ahead in your head",
"status": "active",
"source_notes": [
"[[Crush on Lebanese Girl and Unhealthy Expectations]]"
],
"evidence": [
"[[Crush on Lebanese Girl and Unhealthy Expectations]]: Rami turns uncertainty into fantasy before enough real-world evidence exists."
],
"summary": "Rami can mentally sprint ahead of reality and start reacting to imagined futures instead of present facts.",
"why_it_matters": "This burns attention, creates emotional volatility, and makes communication less grounded.",
"action": "When you notice yourself building a future in your head, write the facts you actually know before deciding what the situation means.",
"related_patterns": [
"[[Recurring Fears#fear of missing the one]]"
]
}
]
}
field should match a key in pattern_schema.json. You can also pass pattern_file directly, but field is preferred because it keeps the schema as the source of truth.
Pattern Writing Rules
Use direct language.
Good:
approval seeking when the stakes feel socialturning uncertainty into fantasyfear that a rare opportunity will disappearbuilding products around emotional resonance
Bad:
approval_seekingturning_uncertainty_into_fantasyrelationship stuffinteresting pattern
If the wording would look stupid as an Obsidian heading, rewrite it.
Source Link Rules
Use wiki-links that make the source note easy to recognize later. Prefer the note title without the .md extension:
[[Crush on Lebanese Girl and Unhealthy Expectations]][[Sense of control determines communication performance]]
If a metadata value already contains a useful wiki-link, preserve it. If a concept clearly deserves a note but does not exist yet, it is acceptable to create the wiki-link anyway.