@owlmeans/create-app 0.1.15 → 0.1.16

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.
Files changed (31) hide show
  1. package/README.md +12 -10
  2. package/build/run.d.ts.map +1 -1
  3. package/build/run.js +4 -6
  4. package/build/run.js.map +1 -1
  5. package/build/template.d.ts.map +1 -1
  6. package/build/template.js +5 -2
  7. package/build/template.js.map +1 -1
  8. package/package.json +2 -2
  9. package/template/{_github/copilot-instructions.md → AGENTS.md} +30 -34
  10. package/template/CLAUDE.md +10 -94
  11. package/template/_agents/scripts/link-skills.sh +82 -0
  12. package/template/{_claude → _agents}/skills/agent-memory/SKILL.md +8 -7
  13. package/template/{_claude → _agents}/skills/getting-started/SKILL.md +2 -1
  14. package/template/{_claude → _agents}/skills/git/SKILL.md +2 -1
  15. package/template/{_claude → _agents}/skills/memory-promotion/SKILL.md +5 -4
  16. package/template/{_claude → _agents}/skills/memory-recompact/SKILL.md +3 -3
  17. package/template/{_claude → _agents}/skills/reuse-code/SKILL.md +4 -3
  18. package/template/{_claude → _agents}/skills/self-education/SKILL.md +10 -10
  19. package/template/_agents/skills/skill-authoring/SKILL.md +89 -0
  20. package/template/_claude/settings.json +14 -0
  21. package/template/_claude/skills/.gitkeep +0 -0
  22. package/template/_gitignore +4 -0
  23. package/template/_claude/skills/skill-authoring/SKILL.md +0 -84
  24. package/template/_github/instructions/agent-memory.instructions.md +0 -143
  25. package/template/_github/instructions/getting-started.instructions.md +0 -62
  26. package/template/_github/instructions/git.instructions.md +0 -52
  27. package/template/_github/instructions/memory-promotion.instructions.md +0 -111
  28. package/template/_github/instructions/memory-recompact.instructions.md +0 -73
  29. package/template/_github/instructions/reuse-code.instructions.md +0 -50
  30. package/template/_github/instructions/self-education.instructions.md +0 -85
  31. package/template/_github/instructions/skill-authoring.instructions.md +0 -66
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: self-education
3
- description: Mandatory post-development guidance updating — after functionality is added or changed, rewrite the project skills/instructions the work touched as current rules (never as change notes), record external-doc findings (URL + gist) in the governing skill, or add skills/instructions for new subsystems and technologies. Required before the completion report whenever development started from a plan agreed with the agent.
3
+ description: Mandatory post-development guidance updating — after functionality is added or changed, rewrite the project skills the work touched as current rules (never as change notes), record external-doc findings (URL + gist) in the governing skill, or add skills for new subsystems and technologies. Required before the completion report whenever development started from a plan agreed with the agent.
4
4
  user-invocable: true
5
- scope: general
5
+ metadata:
6
+ scope: general
6
7
  ---
7
8
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
9
 
@@ -20,24 +21,23 @@ a proposed approach. **Approval of a plan is simultaneously approval of its impl
20
21
  this self-education pass.** A planned task is not finishable without it. If guidance files cannot
21
22
  be edited (read-only run), list the required updates in the report instead.
22
23
 
23
- Also recommended after any unplanned change that made an existing skill/instruction inaccurate.
24
+ Also recommended after any unplanned change that made an existing skill inaccurate.
24
25
 
25
26
  ## Review checklist
26
27
 
27
28
  For each area the work touched:
28
29
 
29
- 1. Which existing skill/instruction covers it? (Check `.claude/skills/` +
30
- `.github/instructions/`.)
30
+ 1. Which existing skill covers it? (Check `.agents/skills/`.)
31
31
  2. Do its commands, paths, APIs, and behavior claims still hold after the change?
32
32
  3. Fix in place — rewrite the affected lines so they describe current behavior; never append a
33
- note about what this change did. Keep the skill and its instruction twin in sync.
33
+ note about what this change did.
34
34
 
35
35
  ## Shape of an update
36
36
 
37
- Skills and instructions state **current rules, not what changed**. Every edit is a rewrite in
37
+ A skill states **current rules, not what changed**. Every edit is a rewrite in
38
38
  place of the affected lines.
39
39
 
40
- Never write into a skill or instruction: dated bulletins ("2026-07-05 — …"), phase or migration
40
+ Never write into a skill: dated bulletins ("2026-07-05 — …"), phase or migration
41
41
  status ("Phase 3 complete", "migration done", "landed"), "formerly X, now Y", incident
42
42
  narratives, fixed-bug logs, or point-in-time inventories. If a line only makes sense to someone
43
43
  who watched the change happen, it does not belong in guidance — the rule it taught does, stated
@@ -67,8 +67,8 @@ library; if none exists and the technology will recur, create one (update-vs-cre
67
67
 
68
68
  ## New subsystems / technologies
69
69
 
70
- When new technology or a new subsystem entered the repo: create the skill/instruction pair for
71
- its procedures, and/or the `.agents/memory/` node for its facts — split along the
70
+ When new technology or a new subsystem entered the repo: create the skill for its procedures,
71
+ and/or the `.agents/memory/` node for its facts — split along the
72
72
  memory-vs-skill boundary (`agent-memory` / `memory-promotion`).
73
73
 
74
74
  ## Completion gate
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: skill-authoring
3
+ description: How to add agent guidance to an OwlMeans project — author one skill at .agents/skills/<name>/SKILL.md that every agent reads, choose frontmatter that validates across Claude Code, Copilot and Codex, refresh the Claude Code symlinks, and decide skill vs memory. Use when asked to capture knowledge as a skill, add a slash command, or document a repeatable procedure.
4
+ user-invocable: true
5
+ metadata:
6
+ scope: general
7
+ ---
8
+ <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
9
+
10
+ # Authoring agent guidance (skills)
11
+
12
+ OwlMeans projects carry agent guidance in two places, and only two:
13
+
14
+ | What | Where | Loaded |
15
+ |---|---|---|
16
+ | Always-on project context | `AGENTS.md` at the repo root | every session |
17
+ | Topic guidance | `.agents/skills/<name>/SKILL.md` | on demand, by topic or `/<name>` |
18
+
19
+ `.agents/skills/` is the [Agent Skills](https://agentskills.io) standard location: GitHub Copilot
20
+ and Codex discover it natively. Claude Code reads skills only from `.claude/skills/`, so each skill
21
+ is bridged there by a generated symlink — see "Refresh the Claude Code links" below. **Write a skill
22
+ once; never author a per-agent copy** (`.github/instructions/*.instructions.md`,
23
+ `.github/copilot-instructions.md`, or a real file under `.claude/skills/`).
24
+
25
+ ## Skill layout
26
+
27
+ ```
28
+ .agents/skills/<name>/
29
+ ├── SKILL.md # required — frontmatter + body
30
+ ├── reference.md # optional — deeper detail loaded on demand
31
+ └── scripts/ # optional — shell scripts the skill runs
32
+ ```
33
+
34
+ ## Frontmatter
35
+
36
+ ```yaml
37
+ ---
38
+ name: my-skill # REQUIRED, must equal the directory name (lowercase, hyphens, ≤64 chars)
39
+ description: What it does and WHEN to use it. # REQUIRED, ≤1024 chars — the auto-invocation signal
40
+ user-invocable: true # false = background knowledge only, hidden from the / menu
41
+ allowed-tools: Bash(bun *) Read # optional — space-separated; tools usable without per-call approval
42
+ metadata: # optional — anything non-standard goes here
43
+ scope: general
44
+ ---
45
+ ```
46
+
47
+ The `description` is the most important field: every agent uses it to decide when to load the
48
+ skill, so state both the topic and the trigger ("Use when …"). Keep it under 1024 characters —
49
+ Copilot rejects longer ones.
50
+
51
+ Only the fields above (plus `license` and `compatibility`) are portable. Anything else — including
52
+ this monorepo's `scope: general` routing marker — belongs under `metadata:`, so a skill stays valid
53
+ in every agent that reads it. Claude Code additionally understands `disable-model-invocation`,
54
+ `argument-hint` and `context: fork`; use them only when the skill genuinely needs them.
55
+
56
+ ## Refresh the Claude Code links
57
+
58
+ After creating, renaming, or deleting a skill, run:
59
+
60
+ ```sh
61
+ sh .agents/scripts/link-skills.sh
62
+ ```
63
+
64
+ It creates `.claude/skills/<name>` → `../../.agents/skills/<name>` for every skill and prunes links
65
+ whose skill is gone. The links are gitignored and are recreated at session start, but a skill added
66
+ mid-session is invisible to Claude Code until the script runs.
67
+
68
+ ## Skill vs memory
69
+
70
+ - **Skill** — a reusable procedure or reference you (or the agents) will want again, worth loading
71
+ automatically. Lives in `.agents/skills/`.
72
+ - **Memory** — a fact, decision, or gotcha specific to this project's history/state. Lives in the
73
+ shared `.agents/memory/` graph store. See the `agent-memory` skill; promotion triggers and the
74
+ update-vs-create rule live in `memory-promotion`.
75
+
76
+ If you find yourself writing "last time we…", that is memory. If you are writing "to do X, do Y",
77
+ that is a skill.
78
+
79
+ Never paste memory text into a skill. Memory content enters guidance only as a restated general
80
+ rule — trigger, step, and the failure it prevents, with dates, phase/status markers, versions and
81
+ incident narrative stripped (`memory-promotion` → Distillation).
82
+
83
+ ## After adding a skill
84
+
85
+ 1. If it replaces an ad-hoc `.agents/<topic>.md`, remove that file.
86
+ 2. If it distilled memory content into rules, shrink the source `.agents/memory/` node to a
87
+ pointer line (`memory-promotion`) — the memory index does not list skills.
88
+ 3. Reference it from `AGENTS.md` if it should be discoverable every session.
89
+ 4. Run `sh .agents/scripts/link-skills.sh`.
@@ -0,0 +1,14 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "sh \"${CLAUDE_PROJECT_DIR:-.}\"/.agents/scripts/link-skills.sh"
9
+ }
10
+ ]
11
+ }
12
+ ]
13
+ }
14
+ }
File without changes
@@ -5,3 +5,7 @@ dist
5
5
  .DS_Store
6
6
  bun.lock
7
7
  bun.lockb
8
+
9
+ # Generated Claude Code skill symlinks (canonical skills live in .agents/skills/)
10
+ .claude/skills/*
11
+ !.claude/skills/.gitkeep
@@ -1,84 +0,0 @@
1
- ---
2
- name: skill-authoring
3
- description: How to add agent guidance to an OwlMeans project — author a Claude Code skill (.claude/skills/<name>/SKILL.md) and its matching GitHub Copilot instruction (.github/instructions/<name>.instructions.md), keep the two in sync, choose frontmatter, and decide skill vs memory. Use when asked to capture knowledge as a skill, add a slash command, or document a repeatable procedure.
4
- user-invocable: true
5
- scope: general
6
- ---
7
- <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
8
-
9
- # Authoring agent guidance (skills + instructions)
10
-
11
- OwlMeans projects carry agent guidance in two parallel places so both Claude Code and GitHub
12
- Copilot can use it:
13
-
14
- | Tool | Location | Shape |
15
- |---|---|---|
16
- | Claude Code | `.claude/skills/<name>/SKILL.md` | one directory per skill, `SKILL.md` is the entrypoint |
17
- | GitHub Copilot | `.github/instructions/<name>.instructions.md` | one file per topic |
18
-
19
- Author **both** for any guidance you want available to either tool. Keep the same `<name>` on both
20
- sides so they read as one topic.
21
-
22
- ## SKILL.md (Claude Code)
23
-
24
- ```
25
- .claude/skills/<name>/
26
- ├── SKILL.md # required — frontmatter + body
27
- ├── reference.md # optional — deeper detail loaded on demand
28
- └── scripts/ # optional — shell scripts the skill runs
29
- ```
30
-
31
- Frontmatter:
32
-
33
- ```yaml
34
- ---
35
- name: my-skill # the /slash-command (lowercase, hyphens)
36
- description: What it does and WHEN to use it. # primary auto-invocation signal
37
- user-invocable: true # false = background knowledge only, hidden from the / menu
38
- allowed-tools: Bash(bun *) Read # optional — tools usable without per-call approval
39
- ---
40
- ```
41
-
42
- The `description` is the most important field: Claude uses it to decide when to auto-invoke the
43
- skill, so describe both the topic and the trigger ("Use when …").
44
-
45
- ## <name>.instructions.md (Copilot)
46
-
47
- ```yaml
48
- ---
49
- description: "Short summary — apply when …"
50
- applyTo: "**/*.ts, **/relevant/**" # globs that auto-attach this instruction
51
- ---
52
- ```
53
-
54
- `applyTo` controls when Copilot pulls the instruction in. Use the file patterns the guidance is
55
- actually about; fall back to `**/*.ts, **/*.tsx` if it is broadly relevant.
56
-
57
- ## Keep the pair in sync
58
-
59
- When you change one side, change the other. They do not have to be identical prose, but they must
60
- not contradict each other. Cross-reference related guidance by name (e.g. "see the `getting-started`
61
- skill").
62
-
63
- ## Skill vs memory
64
-
65
- - **Skill / instruction** — a reusable procedure or reference you (or the tools) will want again,
66
- worth auto-invoking. Lives in `.claude/skills/` + `.github/instructions/`.
67
- - **Memory** — a fact, decision, or gotcha specific to this project's history/state. Lives in
68
- the shared `.agents/memory/` graph store (both tools). See the `agent-memory` skill; promotion
69
- triggers and the update-vs-create rule live in `memory-promotion`.
70
-
71
- If you find yourself writing "last time we…", that is memory. If you are writing "to do X, do Y",
72
- that is a skill.
73
-
74
- Never paste memory text into a skill. Memory content enters guidance only as a restated general
75
- rule — trigger, step, and the failure it prevents, with dates, phase/status markers, versions and
76
- incident narrative stripped (`memory-promotion` → Distillation).
77
-
78
- ## After adding a skill
79
-
80
- 1. If it replaces an ad-hoc `.claude/<topic>.md`, remove that file.
81
- 2. If it distilled memory content into rules, shrink the source `.agents/memory/` node to a
82
- pointer line (`memory-promotion`) — the memory index does not list skills.
83
- 3. Reference it from `CLAUDE.md` / `.github/copilot-instructions.md` if it should be discoverable
84
- every session.
@@ -1,143 +0,0 @@
1
- ---
2
- description: "Shared agent memory protocol for the .agents/memory/ graph store (single store for Copilot and Claude Code) — MEMORY.md index, subsystem nodes, compact-on-write, size caps, read protocol. Apply when reading or writing project memory, or when any legacy .claude/memory or .github/memory path appears."
3
- applyTo: "**/.agents/memory/**, **/.claude/memory/**, **/.github/memory/**"
4
- scope: general
5
- ---
6
- <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
7
-
8
- # Agent memory (`.agents/memory/`)
9
-
10
- One shared memory store per repository, used by **both** GitHub Copilot and Claude Code: a graph
11
- of subsystem nodes rooted in the `MEMORY.md` index. Compactness is the core value — every write
12
- merges and compacts; nothing is ever appended as a log.
13
-
14
- Never write memory to `.claude/memory/`, `.github/memory/`, `~/.copilot/`, `~/.claude/`, or
15
- anywhere outside the repository. Legacy `.claude/memory/` / `.github/memory/` stores are
16
- retired — if one exists, flag it for migration
17
- (`.github/instructions/memory-recompact.instructions.md`) instead of writing there.
18
-
19
- ## Store layout
20
-
21
- ```
22
- .agents/memory/
23
- ├── MEMORY.md # graph root: the only always-read file
24
- └── <node>.md # one file per subsystem / concern / integration
25
- ```
26
-
27
- Flat directory — graph structure lives in scopes and wiki-links, not subdirectories.
28
-
29
- ## Node naming
30
-
31
- Node id = lowercase-kebab name of the **project-structure part** the knowledge attaches to:
32
-
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).
38
-
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.
41
-
42
- ## Index format (`MEMORY.md`)
43
-
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
108
- (`.github/instructions/memory-promotion.instructions.md`, else the skill-authoring guidance).
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 |
133
-
134
- ## Memory vs instruction
135
-
136
- Fact-shaped ("what is true") stays here. Procedure-shaped ("to do X, do Y") becomes an
137
- instruction/skill — follow `.github/instructions/memory-promotion.instructions.md` where present,
138
- otherwise the skill-authoring guidance. Repeated use of a node to *perform* tasks, and over-cap
139
- nodes full of steps, are promotion triggers.
140
-
141
- Promotion is a **rewrite, never a move**: never paste node text into an instruction. "Record the
142
- rule, not the story" and the size caps above bind instruction bodies at least as tightly as they
143
- bind nodes (memory-promotion instruction → Distillation).
@@ -1,62 +0,0 @@
1
- ---
2
- description: "How to build a fullstack OwlMeans Common app — the common/api/web three-workspace pattern, server and web context bootstrap, shared entrypoints + elevate(), and a session-scoped in-memory resource via @owlmeans/static-resource. Apply when starting a new OwlMeans project or wiring web↔api."
3
- applyTo: "**/modules.ts, **/context.ts, **/config.ts, **/render.tsx, **/index.tsx, **/sources/**"
4
- scope: general
5
- ---
6
- <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
7
-
8
- # Building a fullstack OwlMeans Common app
9
-
10
- A minimal app is a **bun-workspace monorepo with three packages**:
11
-
12
- - `sources/common` — shared **entrypoints** (routes), AJV schemas, types and config. The single
13
- source of truth.
14
- - `sources/api` — `@owlmeans/server-app` backend; handlers attached to the shared entrypoints.
15
- - `sources/web` — `@owlmeans/web-panel` + shadcn UI; screens attached to the same entrypoints.
16
-
17
- Full walkthrough: `docs/getting-started.md`. To generate it: `npm create @owlmeans/app`.
18
-
19
- ## One contract, two sides
20
-
21
- Declare each route once in `common`, then `elevate()` it on both sides:
22
-
23
- ```ts
24
- // common/modules.ts
25
- export const sessionModules = [
26
- entrypoint(route(session.list, '/:sid/items', { parent: session.base, method: RouteMethod.GET }),
27
- filter(params(SessionParamsSchema))),
28
- ]
29
- // api/modules.ts → elevate(sessionModules, session.list, handlers.list)
30
- // web/modules.ts → elevate(modules, session.list) // call-only; screens via handler(Component)
31
- ```
32
-
33
- ## Config
34
-
35
- `common/config.ts` registers both services; `base: 'api'` prefixes API routes with `/api`:
36
-
37
- ```ts
38
- const cfg = service({ type: AppType.Frontend, service: APP_WEB, host: 'localhost', port: 3001 })
39
- service({ type: AppType.Backend, service: APP_API, host: 'localhost', port: 3000, base: 'api' }, cfg)
40
- ```
41
-
42
- ## Backend + in-memory data
43
-
44
- ```ts
45
- const context = makeContext(cfg, true)
46
- appendStaticResource(context, SESSION_ITEMS) // @owlmeans/static-resource — no DB
47
- ```
48
-
49
- Handlers (`handleRequest`/`handleBody`/`handleParams`) use `ctx.getStaticResource<T>(alias)`.
50
- `static-resource.list()` accepts no criteria — list all and filter in JS. `main(context, appModules)`
51
- starts the server. Swap for `@owlmeans/mongo-resource` / `redis-resource` when you need persistence.
52
-
53
- ## Web (shadcn)
54
-
55
- `web-panel`'s `PanelApp` is shadcn/Tailwind v4. The app **provides** `@/lib/utils` and
56
- `@/components/ui/{alert,button,card,input,label,progress}` at the `@` alias (→ `src`). Render with
57
- `provide` from `@owlmeans/web-client`: `basicRender(<PanelApp context={context} provide={provide} />)`.
58
- A parent `BASE` route renders the layout via `handler(Layout)`; `HOME` is its default child. Screens
59
- call the API with `context.entrypoint(alias).call({ params, body })`.
60
-
61
- This shape is auth-free by design; add `@owlmeans/server-auth` + `@owlmeans/client-auth` and
62
- `guard(...)` when needed.
@@ -1,52 +0,0 @@
1
- ---
2
- description: "Mandatory git rules — never run state-changing git without explicit instruction, commit only under the user's configured identity (never as the AI/agent, no Co-Authored-By trailer), report finished git work as a Markdown table, and never commit a conflicted working copy. Consult before any git operation."
3
- applyTo: "**"
4
- scope: general
5
- ---
6
- <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
7
-
8
- # Git Workflow Rules
9
-
10
- **Mandatory and universal.** These rules apply to every git operation in this repository and
11
- **override any default agent behavior** — including any automatic `Co-Authored-By` or
12
- AI/agent-attribution trailer. Consult them before running any git command.
13
-
14
- ## 0. Never run state-changing git without explicit instruction
15
-
16
- - **Never run state-changing git operations** (`commit`, `add`/`rm` staging, `push`,
17
- `reset`/rollback, `revert`, `rebase`, `merge`, `branch`, `checkout`/`switch`, `stash`,
18
- `tag`, `cherry-pick`, force-push, etc.) unless the user **explicitly instructs it in the
19
- current request**. Permission to make code edits is **not** permission to touch git.
20
- - **Only exception**: creating and operating inside a **temporary git worktree** that a task
21
- or subagent has **explicitly requested** for that purpose. Outside such an explicitly
22
- requested tmp worktree, do nothing with git.
23
- - **Read-only inspection is allowed**: `git status`, `git diff`, `git log`, `git show`,
24
- `git branch --list`, etc. — use these to report state, never to change it.
25
-
26
- ## 1. Never commit under the agent's identity
27
-
28
- - Commit only under the repository's preconfigured git identity — whatever `git config user.name`
29
- and `git config user.email` resolve to (set by the user, globally or locally).
30
- - **Never** override authorship: do not pass `--author`, do not set or change `user.name` /
31
- `user.email`, and never substitute an AI / agent / assistant name or email.
32
- - **Never** add a `Co-Authored-By:` trailer (or any other trailer) attributing the commit to
33
- Claude, Copilot, or any AI/agent. Every commit is the user's, attributed solely to the user.
34
- - If the repository has no git identity configured (neither local nor global), stop and ask the
35
- user — do not invent one.
36
-
37
- ## 2. Always report finished git work as a table
38
-
39
- - After completing any git action (commit, push, branch, checkout, merge, rebase, stash, tag,
40
- reset, etc.), summarize what was done as a Markdown table.
41
- - One row per action. Include at least **Action**, **Target** (branch / remote / files / ref),
42
- and **Result** (commit SHA, `pushed`, `up to date`, `conflict`, …). Add a **Notes** column
43
- when useful.
44
-
45
- ## 3. Never commit a conflicted working copy
46
-
47
- - If a `merge`, `rebase`, `cherry-pick`, `stash pop`/`apply`, or `pull` produces conflicts,
48
- **do not** finalize it: do not run `git commit`, `git merge --continue`,
49
- `git rebase --continue`, or stage-and-commit the conflicted tree to "resolve" it on the
50
- user's behalf.
51
- - Stop, list the conflicted paths in the report table, and hand control back to the user —
52
- unless the user has explicitly told you how to resolve the conflict and commit.
@@ -1,111 +0,0 @@
1
- ---
2
- description: "Promote procedure-shaped or hot memory into skills/instructions — triggers (procedure test, promote? flags, over-cap), the mandatory distillation rewrite, update-vs-create rule, post-promotion pointer state. Apply when converting memory content into guidance files or when a promote? flag appears in a memory node."
3
- applyTo: "**/.agents/memory/**, **/.claude/skills/**, **/.github/instructions/**"
4
- scope: general
5
- ---
6
- <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
7
-
8
- # Memory promotion
9
-
10
- Memory holds **facts**; **procedures** belong in instructions/skills, where they auto-apply and
11
- stop consuming memory-read cycles. Promotion is how the store stays compact and the harness
12
- teaches itself.
13
-
14
- Promotion is a **rewrite, never a move**. Memory text pasted into an instruction is the single
15
- most common way this harness degrades — see Distillation below.
16
-
17
- ## Triggers
18
-
19
- - **Procedure shape**: the content answers *how to do X* — ordered steps, imperative verbs,
20
- command lines, if-this-do-that tables. Promote it.
21
- - **Repeated touch**: an existing ` → promote?` flag on content you are touching again means
22
- promote now; if mid-task, promotion becomes the first row of the completion report.
23
- - **Over-cap**: a node past the 120-line hard cap with roughly a third or more procedure-shaped
24
- content → promote the procedures instead of splitting the node.
25
- - Corroborating only (weak — agents don't commit, so only user commits appear):
26
- `git log --oneline -- .agents/memory/<node>.md` showing ≥ 3 commits within ~a month marks a
27
- hot node worth evaluating.
28
-
29
- ## Procedure-shape test
30
-
31
- Procedure-shaped answers *how to do X*: ordered steps, imperative verbs, commands, action tables.
32
- Fact-shaped answers *what is true*: declarative structure, invariants, symptom→cause pairs.
33
- Mixed entries split — the fact stays in the node, the "then do" is distilled into a rule in the
34
- instruction.
35
-
36
- ## Distillation (mandatory)
37
-
38
- **Never paste memory text into an instruction.** A promoted line leaves the node as prose about a
39
- past occurrence and enters the instruction as **one general rule**: *when this applies → do this
40
- → or this breaks*, stated so it holds next time rather than describing last time.
41
-
42
- | Strip | Keep |
43
- |---|---|
44
- | dates, phase/status markers, "COMPLETE", "landed" | the condition that makes the rule apply |
45
- | versions, image tags, SHAs — unless the rule turns on the version | the step to take |
46
- | "was X, now Y", "the former X was removed" | the failure it prevents |
47
- | who did it, attempt sequences, incident narrative | the recognition fingerprint (symptom) |
48
- | point-in-time inventories, counts, snapshots | |
49
-
50
- Before (memory): "2026-07-05 — the control-board git card was removed; the dialog now owns all
51
- git actions."
52
- After (rule): "Git actions live in the git dialog; the control board holds none."
53
-
54
- Before (memory): "Phase 3 (COMPLETE, 2026-06-13): added the init-container build, publisher
55
- `src/build.ts`, kephemeral v0.1.5."
56
- After (rule): "Production images build in an init container driven by `publisher/src/build.ts`."
57
-
58
- **If the rule cannot be stated without saying when it happened, it is not promotable** — it stays
59
- a memory fact, or it is dropped.
60
-
61
- ### Budget
62
-
63
- A promotion normally adds **1–5 lines** to an existing instruction, and a single rule is ≤ 3 lines.
64
- A whole new section, or more text added than the node lost, means the content was moved rather than
65
- distilled — redo it.
66
-
67
- An instruction may legitimately run long when it maps a large subsystem, so length alone is not the
68
- test: **every line must be a rule, a contract, or a pointer.** A section that reads as the story of
69
- how the code got there is pollution at any length. "Record the rule, not the story"
70
- (`agent-memory.instructions.md`) binds instruction bodies at least as tightly as it binds nodes.
71
-
72
- ## Flagging (how content earns promotion)
73
-
74
- When you **merge** procedure-shaped content into a node, or you **use** (not merely check) a
75
- node's content to perform a task, append ` → promote?` to that line or section heading.
76
- Evaluable by reading the file alone — no tooling required.
77
-
78
- ## Update vs create
79
-
80
- **Default is update** — extend the existing instruction/skill whose scope covers the activity,
81
- even partially; keep both twins in sync. Create a NEW pair only when:
82
-
83
- - (a) a new subsystem or technology entered the repo;
84
- - (b) an activity with no covering instruction needed memory read/write more than once (a
85
- re-encountered ` → promote?` flag);
86
- - (c) an external technology required internet docs and has no governing instruction.
87
-
88
- New instructions multiply lookup cost — compactness applies to the guidance population *and* to
89
- each instruction's body.
90
-
91
- ## Procedure
92
-
93
- 1. Collect the flagged / procedure-shaped memory lines.
94
- 2. **Distill** each into a general rule (section above). Not optional — skipping it is the
95
- failure mode this instruction exists to prevent.
96
- 3. Author or extend the `.github/instructions/<name>.instructions.md` and its
97
- `.claude/skills/<name>/SKILL.md` twin, following the repo's skill-authoring / create-skill
98
- conventions. Where an existing rule already covers the ground, **rewrite that rule in place**;
99
- append only when nothing covers it.
100
- 4. Shrink the node: delete the source lines; leave one pointer line (format below).
101
- 5. Remove the ` → promote?` flags.
102
- 6. Update the node's index hook if its main value moved; bump `updated:`.
103
- 7. Report per the Reporting rule.
104
-
105
- ## Post-promotion state
106
-
107
- The node keeps exactly one line under `## Pointers`:
108
-
109
- ```
110
- - <activity> → skill `<name>` (procedure lives in .claude/skills/<name>/ + .github/instructions/<name>.instructions.md)
111
- ```