@owlmeans/agent-skills 0.1.11 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,24 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@owlmeans/agent-skills",
4
- "version": "0.1.11",
5
- "generatedAt": "2026-06-17T10:37:52.346Z",
4
+ "version": "0.1.14",
5
+ "generatedAt": "2026-08-05T16:56:53.376Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
+ {
9
+ "kind": "skill",
10
+ "name": "self-education",
11
+ "category": "general",
12
+ "file": "skills/self-education/SKILL.md",
13
+ "canonicalPath": ".claude/skills/self-education/SKILL.md"
14
+ },
15
+ {
16
+ "kind": "skill",
17
+ "name": "router-plugins",
18
+ "category": "general",
19
+ "file": "skills/router-plugins/SKILL.md",
20
+ "canonicalPath": ".claude/skills/router-plugins/SKILL.md"
21
+ },
8
22
  {
9
23
  "kind": "skill",
10
24
  "name": "getting-started",
@@ -19,6 +33,20 @@
19
33
  "file": "skills/shadcn-web/SKILL.md",
20
34
  "canonicalPath": ".claude/skills/shadcn-web/SKILL.md"
21
35
  },
36
+ {
37
+ "kind": "skill",
38
+ "name": "memory-recompact",
39
+ "category": "general",
40
+ "file": "skills/memory-recompact/SKILL.md",
41
+ "canonicalPath": ".claude/skills/memory-recompact/SKILL.md"
42
+ },
43
+ {
44
+ "kind": "skill",
45
+ "name": "git",
46
+ "category": "general",
47
+ "file": "skills/git/SKILL.md",
48
+ "canonicalPath": ".claude/skills/git/SKILL.md"
49
+ },
22
50
  {
23
51
  "kind": "skill",
24
52
  "name": "agent-memory",
@@ -26,6 +54,13 @@
26
54
  "file": "skills/agent-memory/SKILL.md",
27
55
  "canonicalPath": ".claude/skills/agent-memory/SKILL.md"
28
56
  },
57
+ {
58
+ "kind": "skill",
59
+ "name": "reuse-code",
60
+ "category": "general",
61
+ "file": "skills/reuse-code/SKILL.md",
62
+ "canonicalPath": ".claude/skills/reuse-code/SKILL.md"
63
+ },
29
64
  {
30
65
  "kind": "skill",
31
66
  "name": "scaffolding",
@@ -40,6 +75,13 @@
40
75
  "file": "skills/skill-authoring/SKILL.md",
41
76
  "canonicalPath": ".claude/skills/skill-authoring/SKILL.md"
42
77
  },
78
+ {
79
+ "kind": "skill",
80
+ "name": "memory-promotion",
81
+ "category": "general",
82
+ "file": "skills/memory-promotion/SKILL.md",
83
+ "canonicalPath": ".claude/skills/memory-promotion/SKILL.md"
84
+ },
43
85
  {
44
86
  "kind": "skill",
45
87
  "name": "shadcn-versions",
@@ -47,6 +89,13 @@
47
89
  "file": "skills/shadcn-versions/SKILL.md",
48
90
  "canonicalPath": ".claude/skills/shadcn-versions/SKILL.md"
49
91
  },
92
+ {
93
+ "kind": "instruction",
94
+ "name": "reuse-code",
95
+ "category": "general",
96
+ "file": "instructions/reuse-code.instructions.md",
97
+ "canonicalPath": ".github/instructions/reuse-code.instructions.md"
98
+ },
50
99
  {
51
100
  "kind": "instruction",
52
101
  "name": "getting-started",
@@ -54,6 +103,20 @@
54
103
  "file": "instructions/getting-started.instructions.md",
55
104
  "canonicalPath": ".github/instructions/getting-started.instructions.md"
56
105
  },
106
+ {
107
+ "kind": "instruction",
108
+ "name": "self-education",
109
+ "category": "general",
110
+ "file": "instructions/self-education.instructions.md",
111
+ "canonicalPath": ".github/instructions/self-education.instructions.md"
112
+ },
113
+ {
114
+ "kind": "instruction",
115
+ "name": "memory-recompact",
116
+ "category": "general",
117
+ "file": "instructions/memory-recompact.instructions.md",
118
+ "canonicalPath": ".github/instructions/memory-recompact.instructions.md"
119
+ },
57
120
  {
58
121
  "kind": "instruction",
59
122
  "name": "scaffolding",
@@ -68,6 +131,13 @@
68
131
  "file": "instructions/skill-authoring.instructions.md",
69
132
  "canonicalPath": ".github/instructions/skill-authoring.instructions.md"
70
133
  },
134
+ {
135
+ "kind": "instruction",
136
+ "name": "router-plugins",
137
+ "category": "general",
138
+ "file": "instructions/router-plugins.instructions.md",
139
+ "canonicalPath": ".github/instructions/router-plugins.instructions.md"
140
+ },
71
141
  {
72
142
  "kind": "instruction",
73
143
  "name": "shadcn-versions",
@@ -75,6 +145,13 @@
75
145
  "file": "instructions/shadcn-versions.instructions.md",
76
146
  "canonicalPath": ".github/instructions/shadcn-versions.instructions.md"
77
147
  },
148
+ {
149
+ "kind": "instruction",
150
+ "name": "memory-promotion",
151
+ "category": "general",
152
+ "file": "instructions/memory-promotion.instructions.md",
153
+ "canonicalPath": ".github/instructions/memory-promotion.instructions.md"
154
+ },
78
155
  {
79
156
  "kind": "instruction",
80
157
  "name": "agent-memory",
@@ -88,6 +165,13 @@
88
165
  "category": "general",
89
166
  "file": "instructions/shadcn-web.instructions.md",
90
167
  "canonicalPath": ".github/instructions/shadcn-web.instructions.md"
168
+ },
169
+ {
170
+ "kind": "instruction",
171
+ "name": "git",
172
+ "category": "general",
173
+ "file": "instructions/git.instructions.md",
174
+ "canonicalPath": ".github/instructions/git.instructions.md"
91
175
  }
92
176
  ]
93
177
  }
@@ -1,52 +1,138 @@
1
1
  ---
2
2
  name: agent-memory
3
- description: How project memory works in an OwlMeans app — where to store facts/decisions/gotchas for Claude Code (.claude/memory/) and Copilot (.github/memory/), the MEMORY.md index, and when to read and write memory. Use when asked to remember something about the project, or to decide where a note belongs.
3
+ description: Shared agent memory protocol — the .agents/memory/ graph store used by both Claude Code and GitHub Copilot: MEMORY.md index, subsystem nodes, compact-on-write merging, size caps, and the read protocol. Use when reading or writing project memory, when asked to remember something, or to decide where knowledge belongs.
4
4
  user-invocable: true
5
5
  scope: general
6
6
  ---
7
7
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
8
 
9
- # Project memory
9
+ # Agent memory (`.agents/memory/`)
10
10
 
11
- Memory is how durable, project-specific knowledge survives across sessions. Keep it **inside the
12
- project**, never in `~/.claude/` or `~/.copilot/`.
11
+ One shared memory store per repository, used by **both** Claude Code and GitHub Copilot: a graph
12
+ of subsystem nodes rooted in the `MEMORY.md` index. Compactness is the core value — every write
13
+ merges and compacts; nothing is ever appended as a log.
13
14
 
14
- | Tool | Memory dir | Index |
15
- |---|---|---|
16
- | Claude Code | `.claude/memory/` | `.claude/memory/MEMORY.md` |
17
- | GitHub Copilot | `.github/memory/` | `.github/memory/MEMORY.md` |
15
+ Never write memory to `.claude/memory/`, `.github/memory/`, `~/.claude/`, `~/.copilot/`, or
16
+ anywhere outside the repository. Legacy `.claude/memory/` / `.github/memory/` stores are
17
+ retired — if one exists, flag it for `memory-recompact` migration instead of writing there.
18
18
 
19
- Each memory is one Markdown file holding one fact, decision, or gotcha. The `MEMORY.md` index has a
20
- one-line pointer per file (`- [Title](file.md) — hook`) and is loaded every session, so it must stay
21
- current.
19
+ ## Store layout
22
20
 
23
- ## When to read memory
21
+ ```
22
+ .agents/memory/
23
+ ├── MEMORY.md # graph root: the only always-read file
24
+ └── <node>.md # one file per subsystem / concern / integration
25
+ ```
24
26
 
25
- - **At the start of every session** — read `MEMORY.md`, then open any file relevant to the task.
26
- - **Before a non-trivial task** — check for a memory file on that topic and read it first.
27
- - Don't rely on assumptions when a memory file exists; read it.
27
+ Flat directory — graph structure lives in scopes and wiki-links, not subdirectories.
28
28
 
29
- ## When to write memory
29
+ ## Node naming
30
30
 
31
- After a task produces knowledge that isn't obvious from the code or git history:
31
+ Node id = lowercase-kebab name of the **project-structure part** the knowledge attaches to:
32
32
 
33
- - A **decision** and why it was made (and what was rejected).
34
- - A **gotcha** or sharp edge discovered the hard way.
35
- - **Project state / goals** not derivable from the repo.
33
+ 1. **Subsystem** — workspace dir / package name: `manager-web`, `auth`, `vslots`. Deepest
34
+ unambiguous segment; prefix with the parent only on collision.
35
+ 2. **Cross-cutting concern** spanning subsystems: `build`, `testing`, `deploy`, `routing`, `i18n`.
36
+ 3. **Integration** — external service/library: `stripe`, `cloudflare`, `openrouter`.
37
+ 4. **`workspace`** — repo-level facts that fit nowhere else (remotes, branch topology, env model).
36
38
 
37
- Do **not** record what the code or git history already says, or what only matters to the current
38
- conversation.
39
+ File is `<node>.md`; the id is the wiki-link target: `[[manager-web]]`. **Never** key a node to an
40
+ event, date, phase, investigation, or task name.
39
41
 
40
- ## How to write one
42
+ ## Index format (`MEMORY.md`)
41
43
 
42
- 1. Create `.claude/memory/<topic>.md` (and the Copilot copy under `.github/memory/`) with a short
43
- slug name and a one-line description.
44
- 2. Write the single fact; for decisions/gotchas, add why it matters and how to apply it.
45
- 3. Add a one-line pointer to the matching `MEMORY.md` index.
46
- 4. Before saving, check for an existing file that already covers it — update that instead of
47
- duplicating. Delete memories that turn out to be wrong.
44
+ ```markdown
45
+ # Memory Graph — <project>
46
+
47
+ Shared agent memory (`agent-memory` protocol). Read this file at session start.
48
+ Before non-trivial work, open every node whose scope matches the task's files or topics.
49
+
50
+ ## Subsystems
51
+ - [[manager-web]] `sources/manager-web/**` — i18n 8-domain split; owl-theme wiring
52
+ ## Cross-cutting
53
+ - [[build]] `**/tsconfig*.json` — tsbuildinfo path pinning; tolerant library builds
54
+ ## Integrations
55
+ - [[stripe]] `ext:stripe` — sandbox topology; webhook fan-out
56
+ ```
57
+
58
+ Rules: exactly one line per node — `- [[<node>]] ` + backticked scope + ` — <hook>`; hook ≤ 100
59
+ chars; no dates; only non-empty groups; file ≤ 50 lines; no skills listed (skills self-describe).
60
+ The scope column is the router: match the task's paths/topics against scopes to decide which
61
+ nodes to open.
62
+
63
+ ## Node format
64
+
65
+ Frontmatter — exactly three fields:
66
+
67
+ ```yaml
68
+ ---
69
+ node: vslots # = filename without .md; = wiki-link target
70
+ scope: "scripts/vslots/**" # repo-relative globs; ext:<service> for integrations; . for workspace
71
+ updated: 2026-08 # month granularity only
72
+ ---
73
+ ```
74
+
75
+ Body — only non-empty sections, in this order:
76
+
77
+ - `## Facts` — what IS: structure, behavior, topology. 1–3 lines each.
78
+ - `## Invariants` — what MUST HOLD; optionally "broke when violated: <symptom>".
79
+ - `## Gotchas` — symptom → cause → counter-move, ≤ 3 lines each.
80
+ - `## Pointers` — key files, promoted-skill pointer lines, `External docs` (URL + gist).
81
+ - `## Status` — optional; in-flight state only; every line dated; prune resolved lines on every read.
82
+
83
+ `Status` is the **only** place dates and unfinished-work notes are allowed. Link related nodes
84
+ inline with `[[node]]`.
85
+
86
+ ## Read protocol
87
+
88
+ - **Session start**: read `.agents/memory/MEMORY.md` — the index only.
89
+ - **Before a non-trivial task**: open every node whose scope matches the task (typically 1–3).
90
+ - **When a topic surfaces mid-session** that the index names: open its node before acting.
91
+ - **Never bulk-read** the store — the index + scopes exist so you don't have to.
92
+
93
+ ## Write protocol (compact-on-write)
94
+
95
+ Every write is a merge, never an append:
96
+
97
+ 1. **Extract** — reduce the outcome to reusable knowledge atoms (rule below). Nothing survives →
98
+ write nothing.
99
+ 2. **Locate** — match scopes to find the node; none matches → create one per the naming rule and
100
+ add its index line.
101
+ 3. **Merge / supersede** — place each atom in the right section; if it refines or contradicts an
102
+ existing line, **rewrite that line in place** — never append a dated correction. The node
103
+ always reads as current truth.
104
+ 4. **Compact** — reread the node; collapse redundancy; delete anything the code or git history
105
+ now states; prune resolved `Status` lines.
106
+ 5. **Cap** — over soft cap: compact harder. Over hard cap: split by sub-scope into a linked child
107
+ node, or promote procedure-shaped overflow (`memory-promotion` where present, else
108
+ `skill-authoring`).
109
+ 6. **Index** — update the hook line if the node's center of gravity moved; bump `updated:`.
110
+
111
+ ## Knowledge, not events
112
+
113
+ **Record the rule, not the story.** For every line ask: *what must a future agent know to act
114
+ correctly, stated without reference to this session?* Keep invariants, cause→effect,
115
+ counter-moves, recognition fingerprints (symptoms). Drop dates, phase numbers, who did what,
116
+ attempt sequences, and anything recoverable from code or git.
117
+
118
+ Before (event log): "Verification 2026-06-11 … Bug found: script missing embedded-count logic.
119
+ Fix deployed to all copies; second run idempotent."
120
+ After (knowledge): "`nested-agent-context.sh` exists as byte-identical copies in the archive and
121
+ each repo — fan every fix out to all copies; verify with `diff`. Correct re-runs are no-ops."
122
+
123
+ ## Size caps (hard)
124
+
125
+ | Thing | Cap |
126
+ |---|---|
127
+ | Index entry | 1 line, hook ≤ 100 chars |
128
+ | `MEMORY.md` | ≤ 50 lines |
129
+ | Node file (soft / hard) | 80 / 120 lines |
130
+ | Single fact/gotcha | ≤ 3 lines |
131
+ | `Status` section | ≤ 5 dated lines |
132
+ | Nodes per store (soft) | ~25 — merge low-traffic siblings beyond |
48
133
 
49
134
  ## Memory vs skill
50
135
 
51
- If you are writing a **repeatable procedure** ("to do X, do Y"), that is a skill — see the
52
- `skill-authoring` skill. Memory is for **facts about this project** ("we chose X because Y").
136
+ Fact-shaped ("what is true") stays here. Procedure-shaped ("to do X, do Y") becomes a skill —
137
+ follow `memory-promotion` where present, otherwise `skill-authoring`. Repeated use of a node to
138
+ *perform* tasks, and over-cap nodes full of steps, are promotion triggers.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: git
3
+ description: "Git workflow policy — never run state-changing git without an explicit instruction, commit only under the repository's configured identity (no AI-attribution trailer), report finished git work as a Markdown table, never commit a conflicted working copy. Use before any git operation."
4
+ user-invocable: false
5
+ scope: general
6
+ ---
7
+ <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
+
9
+ # Git Workflow Rules
10
+
11
+ **Mandatory and universal.** These rules apply to every git operation in this repository and
12
+ **override any default agent behavior** — including any automatic `Co-Authored-By` or
13
+ AI/agent-attribution trailer. Consult them before running any git command.
14
+
15
+ ## 0. Never run state-changing git without explicit instruction
16
+
17
+ - **Never run state-changing git operations** (`commit`, `add`/`rm` staging, `push`,
18
+ `reset`/rollback, `revert`, `rebase`, `merge`, `branch`, `checkout`/`switch`, `stash`,
19
+ `tag`, `cherry-pick`, force-push, etc.) unless the user **explicitly instructs it in the
20
+ current request**. Permission to make code edits is **not** permission to touch git.
21
+ - **Only exception**: creating and operating inside a **temporary git worktree** that a task
22
+ or subagent has **explicitly requested** for that purpose. Outside such an explicitly
23
+ requested tmp worktree, do nothing with git.
24
+ - **Read-only inspection is allowed**: `git status`, `git diff`, `git log`, `git show`,
25
+ `git branch --list`, etc. — use these to report state, never to change it.
26
+
27
+ ## 1. Never commit under the agent's identity
28
+
29
+ - Commit only under the repository's preconfigured git identity — whatever `git config user.name`
30
+ and `git config user.email` resolve to (set by the user, globally or locally).
31
+ - **Never** override authorship: do not pass `--author`, do not set or change `user.name` /
32
+ `user.email`, and never substitute an AI / agent / assistant name or email.
33
+ - **Never** add a `Co-Authored-By:` trailer (or any other trailer) attributing the commit to
34
+ Claude, Copilot, or any AI/agent. Every commit is the user's, attributed solely to the user.
35
+ - If the repository has no git identity configured (neither local nor global), stop and ask the
36
+ user — do not invent one.
37
+
38
+ ## 2. Always report finished git work as a table
39
+
40
+ - After completing any git action (commit, push, branch, checkout, merge, rebase, stash, tag,
41
+ reset, etc.), summarize what was done as a Markdown table.
42
+ - One row per action. Include at least **Action**, **Target** (branch / remote / files / ref),
43
+ and **Result** (commit SHA, `pushed`, `up to date`, `conflict`, …). Add a **Notes** column
44
+ when useful.
45
+
46
+ ## 3. Never commit a conflicted working copy
47
+
48
+ - If a `merge`, `rebase`, `cherry-pick`, `stash pop`/`apply`, or `pull` produces conflicts,
49
+ **do not** finalize it: do not run `git commit`, `git merge --continue`,
50
+ `git rebase --continue`, or stage-and-commit the conflicted tree to "resolve" it on the
51
+ user's behalf.
52
+ - Stop, list the conflicted paths in the report table, and hand control back to the user —
53
+ unless the user has explicitly told you how to resolve the conflict and commit.
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: memory-promotion
3
+ description: Transform procedure-shaped or repeatedly-used memory into skills and instructions — the procedure-shape test, promote? repeated-touch flags, over-cap trigger, update-vs-create decision, and the post-promotion pointer state. Use when memory content reads as "how to", when a promote? flag is encountered again, or during recompaction.
4
+ user-invocable: true
5
+ scope: general
6
+ ---
7
+ <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
+
9
+ # Memory promotion
10
+
11
+ Memory holds **facts**; **procedures** belong in skills/instructions, where they auto-invoke and
12
+ stop consuming memory-read cycles. Promotion is how the store stays compact and the harness
13
+ teaches itself.
14
+
15
+ ## Triggers
16
+
17
+ - **Procedure shape**: the content answers *how to do X* — ordered steps, imperative verbs,
18
+ command lines, if-this-do-that tables. Promote it.
19
+ - **Repeated touch**: an existing ` → promote?` flag on content you are touching again means
20
+ promote now; if mid-task, promotion becomes the first row of the completion report.
21
+ - **Over-cap**: a node past the 120-line hard cap with roughly a third or more procedure-shaped
22
+ content → promote the procedures instead of splitting the node.
23
+ - Corroborating only (weak — agents don't commit, so only user commits appear):
24
+ `git log --oneline -- .agents/memory/<node>.md` showing ≥ 3 commits within ~a month marks a
25
+ hot node worth evaluating.
26
+
27
+ ## Procedure-shape test
28
+
29
+ Procedure-shaped answers *how to do X*: ordered steps, imperative verbs, commands, action tables.
30
+ Fact-shaped answers *what is true*: declarative structure, invariants, symptom→cause pairs.
31
+ Mixed entries split — the fact stays in the node, the "then do" moves out.
32
+
33
+ ## Flagging (how content earns promotion)
34
+
35
+ When you **merge** procedure-shaped content into a node, or you **use** (not merely check) a
36
+ node's content to perform a task, append ` → promote?` to that line or section heading.
37
+ Evaluable by reading the file alone — no tooling required.
38
+
39
+ ## Update vs create
40
+
41
+ **Default is update** — extend the existing skill/instruction whose scope covers the activity,
42
+ even partially; keep both twins in sync. Create a NEW pair only when:
43
+
44
+ - (a) a new subsystem or technology entered the repo;
45
+ - (b) an activity with no covering skill needed memory read/write more than once (a
46
+ re-encountered ` → promote?` flag);
47
+ - (c) an external technology required internet docs and has no governing skill.
48
+
49
+ New skills multiply lookup cost — compactness applies to the skill population too.
50
+
51
+ ## Procedure
52
+
53
+ 1. Collect the flagged / procedure-shaped memory lines.
54
+ 2. Author or extend the SKILL.md and its `.github/instructions/<name>.instructions.md` twin,
55
+ following the repo's `skill-authoring` or `create-skill` conventions.
56
+ 3. Shrink the node: delete the promoted prose; leave one pointer line (format below).
57
+ 4. Remove the ` → promote?` flags.
58
+ 5. Update the node's index hook if its main value moved; bump `updated:`.
59
+ 6. Report per the Reporting rule.
60
+
61
+ ## Post-promotion state
62
+
63
+ The node keeps exactly one line under `## Pointers`:
64
+
65
+ ```
66
+ - <activity> → skill `<name>` (procedure lives in .claude/skills/<name>/ + .github/instructions/<name>.instructions.md)
67
+ ```
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: memory-recompact
3
+ description: Recompact or migrate a whole .agents/memory/ store — rebuild the node map from project structure, merge event-shaped records into subsystem nodes, deduplicate, enforce caps, regenerate the MEMORY.md index, and fold in legacy .claude/memory and .github/memory stores. Use when a store degrades into event logs, indexes bloat or conflict, or for one-time migration.
4
+ disable-model-invocation: true
5
+ scope: general
6
+ ---
7
+ <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
+
9
+ # Memory recompaction
10
+
11
+ Whole-store maintenance for `.agents/memory/` (protocol: `agent-memory`). Also the migration
12
+ procedure for legacy `.claude/memory/` + `.github/memory/` stores. Store-wide rewrite — propose
13
+ it when triggers appear; the operator invokes it.
14
+
15
+ ## When
16
+
17
+ - An index entry runs longer than one line, or the index exceeds 50 lines.
18
+ - Nodes keyed by event/date/phase/task, or bodies reading as session narratives.
19
+ - The same fact stated in two or more nodes.
20
+ - More than ~20% of a node is stale `Status` content.
21
+ - A node's `updated:` is months behind commits touching its scope.
22
+ - Legacy `.claude/memory/` or `.github/memory/` dirs exist → run the migration below.
23
+
24
+ ## Build the target node map first
25
+
26
+ Before reading any record bodies, derive the node set from **project structure**: workspaces
27
+ array / top-level dirs → subsystem nodes; then the cross-cutting concerns and external
28
+ integrations actually present. Write the map down (old file/section → target node). Every
29
+ existing record must land in exactly one node — or split into atoms landing in several. Only
30
+ then process records.
31
+
32
+ ## Per-record pass
33
+
34
+ For each old file or section:
35
+
36
+ 1. Apply the `agent-memory` extraction rule — keep invariants, cause→effect, counter-moves,
37
+ symptom fingerprints; drop narratives, dates, attempt logs, anything code/git already states.
38
+ 2. Route each surviving atom to its node's section (Facts / Invariants / Gotchas / Pointers;
39
+ genuinely in-flight state → `Status`, dated).
40
+ 3. On conflict between records, the version consistent with **current code** wins — check the
41
+ code, don't average.
42
+ 4. Procedure-shaped survivors do not enter nodes — route them to `memory-promotion`.
43
+
44
+ ## Legacy-store merge (migration)
45
+
46
+ 1. Union `.claude/memory/` and `.github/memory/`. Same-named files are two drifted sources of
47
+ ONE node — merge both; the code-consistent version wins.
48
+ 2. Index-only entries with no backing file: extract the fact into its node, or drop if stale.
49
+ 3. Old `## Skills` / "Key Files" index sections are dropped — skills self-describe; harness
50
+ layout belongs to `CLAUDE.md` / `.github/copilot-instructions.md`. Move genuinely non-obvious
51
+ dispatch hints there.
52
+ 4. When the new store verifies (below), delete both legacy dirs entirely.
53
+
54
+ ## Regenerate the index
55
+
56
+ Rebuild `MEMORY.md` from the resulting nodes per the `agent-memory` format — never edit the old
57
+ index incrementally.
58
+
59
+ ## Verify
60
+
61
+ - Every node file is listed in the index; every listed node exists; every wiki-link resolves.
62
+ - All caps met (index ≤ 50 lines; nodes ≤ 120; entries ≤ 3 lines; Status ≤ 5 dated lines).
63
+ - No dates outside `Status` and `updated:`; no event-keyed filenames.
64
+ - Both root instruction files' Memory sections point at `.agents/memory/`.
65
+ - Legacy dirs gone; `grep -rn '\.claude/memory\|\.github/memory'` over the repo's harness files
66
+ returns nothing but allowlisted historical mentions.
67
+
68
+ ## Report
69
+
70
+ One table: **Node** | **Sources merged** | **Lines before → after**. Follow the Reporting rule
71
+ (what, not why).
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: reuse-code
3
+ description: Discovery-first, reuse-first workflow for OwlMeans projects. Use BEFORE planning or building any feature, before proposing a third-party library or a custom solution, and after writing code. Find an existing @owlmeans/* package or existing code first; extend before writing new; simplify what you write.
4
+ user-invocable: true
5
+ scope: general
6
+ ---
7
+ <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
+
9
+ # Reuse before you build
10
+
11
+ OwlMeans ships a large framework of `@owlmeans/*` packages. Before you propose a third-party library,
12
+ design a custom solution, or finish a feature, exhaust what already exists. Apply these four steps in
13
+ order — during planning **and** during implementation.
14
+
15
+ ## 1. Find an `@owlmeans/*` package first
16
+
17
+ Before suggesting any external library or writing custom code, look for an `@owlmeans/*` package that
18
+ already solves the problem.
19
+
20
+ - **Consult the deployed skills.** Each installed `@owlmeans/*` package ships a skill at
21
+ `.claude/skills/<pkg>/SKILL.md` (and `.github/instructions/<pkg>.instructions.md`) describing what it
22
+ does. Read those first — they are your local catalogue of installed capabilities.
23
+ - **Scan installed packages.** Look in `node_modules/@owlmeans/*` **and**, in a workspace monorepo,
24
+ the nested `sources/*/node_modules/@owlmeans/*` (bun nests workspace deps).
25
+ - **Discover packages that aren't installed yet** by researching the **owlmeans/common** repository —
26
+ its dependency map (`tree.md`) and the per-package READMEs name every package and its purpose.
27
+
28
+ ### Local vs. web research (the symlink rule)
29
+
30
+ How you research the repo depends on whether `@owlmeans/*` is linked locally:
31
+
32
+ - Run `ls -la node_modules/@owlmeans/<pkg>` (try a package you know is installed). If it is a **symlink
33
+ whose target escapes `node_modules`** — or if the project's *own* workspace publishes `@owlmeans/*`
34
+ packages (i.e. **this is the common repo**) — you have the source locally. **Research locally:** read
35
+ `tree.md`, browse the framework's package sources, and read the canonical `.claude/skills/`. **Do
36
+ not** use the internet.
37
+ - Otherwise (a clean install from npm), **research the web**: fetch/search
38
+ **https://github.com/owlmeans/common** — `tree.md` and package READMEs — to find the right package.
39
+
40
+ This is the same dev-linked detection `@owlmeans/agent-skills` uses (see its `detectLinked`). After
41
+ adding an `@owlmeans/*` dependency, run `npx @owlmeans/agent-skills` to deploy its skill. Prefer an
42
+ `@owlmeans/*` package over a third-party library or bespoke code whenever one fits.
43
+
44
+ ## 2. Reuse or extend before writing custom
45
+
46
+ If an installed package nearly fits, **configure or extend it** rather than writing something new — use
47
+ its resources, services, modules, and helpers. A small extension of a framework package beats a new
48
+ parallel implementation.
49
+
50
+ ## 3. No package? Reuse code and extract an abstraction
51
+
52
+ When no package solves it, search the codebase for code that already solves a **similar** problem.
53
+ Prefer factoring out a shared helper, base, or generic function — extract an abstraction — over
54
+ duplicating logic or writing from scratch. Only write genuinely new code when nothing reusable exists.
55
+
56
+ ## 4. Simplify after writing
57
+
58
+ Once code is written, review it: can it be **shorter, clearer, or expressed with fewer moving parts**?
59
+ Lean on framework utilities, remove dead branches, collapse needless indirection. Less code that reuses
60
+ the framework is better than more bespoke code.
61
+
62
+ See `[[dependency-tree]]` for the package map, `[[scaffolding]]` for how a project is assembled, and
63
+ `[[bun]]` for adding dependencies.
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: router-plugins
3
+ description: How OwlMeans UI routing plugins work — the RouterPlugin contract, cascade selection, choosing/switching the router at context provisioning (default OwlMeans vs opt-in react-router), and authoring a new plugin (e.g. SSR). Read before wiring routing in an app or writing a routing plugin.
4
+ scope: general
5
+ user-invocable: false
6
+ ---
7
+ <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
+
9
+ # OwlMeans routing plugins
10
+
11
+ OwlMeans UI routing is pluggable. The core `@owlmeans/router` package is a **host**: it defines the
12
+ `RouterService` facade and holds a registry of `RouterPlugin`s, selecting the active one by
13
+ **cascade**. Route *descriptions* are react-router-compatible (same path placeholders: static,
14
+ `:param`, nested, index) so the same route trees work across plugins.
15
+
16
+ ## Plugins that ship today
17
+
18
+ | Plugin | Package | Registration | Priority |
19
+ |--------|---------|--------------|----------|
20
+ | OwlMeans in-browser (default) | `@owlmeans/web-router` | `appendWebRouter(ctx)` | 0 |
21
+ | react-router v7 (opt-in) | `@owlmeans/web-router-react-router` | `appendReactRouter(ctx)` | 100 |
22
+ | Native (RN) | `@owlmeans/native-router` | native app wiring | — |
23
+ | SSR | *(future)* | higher-priority `match: env => env.ssr` | >0 |
24
+
25
+ ## Choosing the router at context provisioning
26
+
27
+ `@owlmeans/web-client` (and `web-panel`) call `appendWebRouter` by default, so **OwlMeans routing is
28
+ the default**. To switch a specific app to react-router, add the opt-in plugin in your `makeContext`
29
+ — its higher priority wins the cascade:
30
+
31
+ ```typescript
32
+ import { makeContext as makeBase } from '@owlmeans/web-panel'
33
+ import { appendReactRouter } from '@owlmeans/web-router-react-router'
34
+
35
+ export const makeContext = (cfg) => {
36
+ const context = makeBase(cfg)
37
+ appendReactRouter(context) // now react-router handles routing instead of OwlMeans
38
+ return context
39
+ }
40
+ ```
41
+
42
+ You no longer pass a `provide`/`createBrowserRouter` prop to `<App>`/`<PanelApp>` — routing resolves
43
+ its compiler from the active plugin (`context.router().compile`). The former `provide` export from
44
+ `@owlmeans/web-client` is now a deprecated `undefined` kept only for source compatibility.
45
+
46
+ ## The RouterPlugin contract
47
+
48
+ ```typescript
49
+ interface RouterPlugin {
50
+ alias: string
51
+ priority?: number // higher wins; default 0
52
+ mode?: string // 'browser' | 'ssr' | …
53
+ match?: (env: RouterEnv, ctx?) => boolean // undefined ⇒ always applies
54
+ compile: (routes: RouteObject[], ctx?) => LibraryRouter | Promise<LibraryRouter>
55
+ provider: () => ComponentType<{ router }> // renders the compiled router
56
+ outlet: () => ComponentType // renders the next nested match
57
+ useParams; useLocation; useNavigate; useSearchParams // hooks backed by the plugin
58
+ }
59
+ ```
60
+
61
+ - `RouteObject` is the neutral IR (`{ index?, path?, children?, Component? }`), produced by
62
+ `@owlmeans/client` from the entrypoint tree — the same objects both plugins consume.
63
+ - `RouterEnv` (`{ hasWindow, ssr, request? }`) drives selection. The browser plugin matches always;
64
+ an SSR plugin would register at a higher priority with `match: env => env.ssr`.
65
+
66
+ ## Authoring a plugin (e.g. SSR)
67
+
68
+ 1. Implement `RouterPlugin` (reuse the pure matcher from `@owlmeans/router`: `flattenRoutes`,
69
+ `rankRouteBranches`, `matchRoutes` — they are DOM-free and SSR-safe).
70
+ 2. Expose `appendMyRouter(ctx)` = `ensureRouterService(ctx).registerPlugin(makeMyPlugin())`.
71
+ 3. Set `priority` above the default (0) and a `match` that fires only in your environment.
72
+ 4. Keep the `RouterService` facade methods assignable (native-safety invariant).
73
+
74
+ ## Related
75
+
76
+ - [[router]] (host + matcher) · [[web-router]] (default browser plugin)
77
+ - `@owlmeans/web-router-react-router` (react-router plugin)