skills/o9k-new-rule/SKILL.md
Add a new rule and place it correctly — decide between a cross-project R-entry and a project-specific subnode under the active project's Rules section. Use whenever the user says 'neue Regel', 'Regel hinzufügen', 'new rule', 'add a rule', or invokes /o9k-new-rule. Critical safeguard: project-specific rules placed as R-entries pollute the session-start Rules listing across every project — get the scope right BEFORE writing.
npx skillsauth add Bumblebiber/hmem o9k-new-ruleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
R-prefix entries are surfaced in the session-start Rules listing for every session. A project-specific rule written as an R-entry leaks into other projects' context. A cross-project rule buried inside one project never surfaces when working on another. Same content, very different consequence — scope decides.
Ask the user, unless they already said:
"Gilt die Regel projektübergreifend (alle Projekte) oder nur für das aktive Projekt?"
Suggest a default from these heuristics:
| Signal | Likely scope | |--------|-------------| | Rule names a specific repo path, file, CLI tool, schema field, project's tech stack | Project-specific | | Rule mentions hmem code, propagation to end users, project structure | Project-specific (P0048-specific) | | Rule is about agent behavior, communication style, write protocols, MCP interaction | Cross-project (R) | | Rule references infrastructure used in many projects (e.g. Strato server, npm publish in general) | Cross-project (R) | | Rule applies only when one specific project is active | Project-specific |
When in doubt, ask. Wrong scope is the most common failure mode of this workflow.
write_memory(
prefix="R",
title="<short imperative title>",
body="<full rule text — what / why / examples / counter-examples>",
tags=["#hmem", "#<topic-tag>"],
links=["<active-project-id-if-relevant>"],
pinned=<true only if it MUST surface in session-start every session>
)
links may include a project ID for context, but the rule still applies broadly.pinned=true only when the rule belongs in the always-visible Rules block at session start (after the v6.x hook trim, only pinned/favorite R-entries surface). Use sparingly — pinning everything defeats the purpose.First check whether the active project has a Rules section:
read_memory(id="P00XX") # look for an L2 child titled "Rules"
If a Rules L2 exists (e.g. P0048.16):
append_memory(
id="P0048.16",
title="<short imperative title>",
body="<full rule text>"
)
If no Rules L2 exists, create it with the rule as its first child by leveraging the schema-name exception (root append is allowed when the first line names a section):
append_memory(
id="P00XX",
content="Rules\n\t<short imperative title>\n\n\t<full rule text>"
)
Project-specific rules need no tags or links (project-scoped by location) and should never be pinned (visibility is already scoped via the active project).
read_memory(id="<the-new-id>")
Confirm title + body are stored correctly. If anything looks off, fix with update_memory immediately.
| Mistake | Why it hurts |
|---------|-------------|
| Writing R-prefix for a one-project rule | Leaks into every other project's session-start Rules block |
| Writing P00XX.Rules.X for a workflow rule that applies to all projects | Invisible whenever a different project is active |
| Pinning a project-specific rule | Already scoped by project; pinning forces it cross-project anyway |
| Setting obsolete=true without [✓ID] | Blocked by write protocol — write the correction first |
| Skipping the scope question because "it's obvious" | The previous offender did this and wrote R0028 for a P0048-only rule |
/o9k-write — lower-level write_memory / append_memory protocol, prefix selection, tag conventions/o9k-curate — fix misplaced rules afterwards (mark irrelevant + move content)tools
Update flow for its-over-9k (hmem). Runs `npm update -g`, syncs skills, applies migrations, verifies hooks, shows the changelog. Use when the user asks to update/upgrade hmem, o9k, o9k-mcp, or its-over-9k (any language), or when the startup version-check flags a new release. Runs the npm update itself — don't assume it's already done.
development
Mandatory entry point for every Cortex session — invoke at conversation start, after /clear, and after any load_project call. All stable context (H-entries, projects, device, sync) is pre-injected by the hook — no read_memory(mode='essentials') needed. Surfaces pending git work, Next Steps + open T-tasks, and runs the O-entry routing check.
tools
Curate an .hmem file (your own or foreign) — mark obsolete/irrelevant, fix titles, consolidate duplicates, repair broken links. **Requires the `hmem-curate` MCP server** (skill prompts the user to enable it on entry). Use whenever the user says 'aufräumen', 'memory aufräumen', 'Speicher aufräumen', 'hmem aufräumen', 'clean up memory', 'tidy up hmem', 'curate memory', 'consolidate duplicates', 'merge duplicate entries', 'fix broken links', 'kümmer dich um die Memory', or invokes /o9k-curate. Also trigger when `memory_health()` flags BLOCKER/WARNING issues, when a P-entry's load_project output exceeds 4k tokens (session-start noise check defers to this skill), or before any batch cleanup of L, E, D, P entries. Skipping this skill and editing memory directly bypasses health checks, severity triage, and obsolete-chain integrity — never curate without it.
testing
Search hmem memory for things referenced without an ID. Trigger when user refers to past conversations ("letzte Woche", "gestern", "remember when", "we talked about"), mentions proper names unknown this session, uses definite articles assuming shared context ("der Bug mit X", "the issue we had"), or seems to assume you know something. If you think "the user assumes I know this" — search first, ask second. Combines full-text search with time window from phrasing. Trigger on casual/vague references. Do NOT trigger for explicit ID lookups like "read P0048".