Dev Wiki — cross-chat developer memory
Always-on skill. Knowledge base: decisions, bugs, patterns, architectural decisions.
Memory lives in ~/.memory/ (global + per-project hierarchy; env MEMORY_ROOT overrides).
Boundary rule
| Knowledge |
Where |
Index |
| Portable (patterns, lessons, decisions) |
~/.memory/Wiki/<type>/ |
python ~/.memory/db-tools/build.py |
| Project-specific (status, configs, context) |
WORK/<project>/docs/ |
python ~/.memory/db-tools/build.py -r <root> -o ~/.memory/db/<name>.db |
Knowledge lives/dies with the project → project; portable across projects → global Wiki.
Save reflex (bounded by task effect boundary)
- Side-effect boundary: read-only or review-only tasks produce NO memory writes unless explicitly requested by the user.
- On every finished mutation task / made decision / closed bug — 10-second check:
would a future session need this? Yes → save. No → skip (noise-free is deliberate).
- Conclusions →
findings.py add; portable patterns → Wiki; realizations by trigger below. Any saved verify_cmd is a proposed check, not standing authorization.
Record types (global Wiki)
| Type |
Folder |
When |
reference |
~/.memory/Wiki/reference/ |
Fact, documentation, knowledge |
howto |
~/.memory/Wiki/howto/ |
Instruction, guide |
error |
~/.memory/Wiki/errors/ |
Bug, incident, lesson learned |
decision |
~/.memory/Wiki/decisions/ |
ADR, architectural decision |
idea |
~/.memory/Wiki/ideas/ |
Idea |
Workflow — save (global)
- Determine the type → folder in
~/.memory/Wiki/.
- Create file
~/.memory/Wiki/<type>/<slug>.md with frontmatter:---
type: reference
title: "Title"
description: "About what"
date: 2026-08-15
tags: [category, topic]
---
- Update
~/.memory/Wiki/index.md.
- Append to
~/.memory/Wiki/log.md.
python ~/.memory/db-tools/build.py
python ~/.memory/db-tools/lint_wiki.py
- Important conclusion →
python ~/.memory/db-tools/findings.py add "topic" --text "conclusion" --source path --project <slug> --importance <high|normal|low>
Project Taxonomy & Importance
- Projects: dynamically discovered from
~/.memory/db/*.db plus optional projects.json. Slug format: [a-z0-9][a-z0-9_-]{0,63}.
portable: cross-project reusable techniques, tools, and methodologies.
unknown: unclassified personal notes, coursework, or items not tied to a specific project.
- Importance levels:
high: critical security boundaries, invariants, data-loss prevention, and durable architectural contracts.
normal: standard actionable engineering findings, reproducible runbooks, feature setups, and telemetry.
low: transient checkpoints, scratch notes, personal experiments, or milestone logs.
unreviewed: default state prior to qualitative review.
- Edit finding:
python ~/.memory/db-tools/findings.py edit <id> --project <slug> --importance <high|normal|low>
- Batch classification:
python ~/.memory/db-tools/findings.py classify mapping.json --dry-run
python ~/.memory/db-tools/findings.py classify mapping.json
Mapping accepts a list or an object with {"records": [...]}:[{"id": 1, "candidate_project": "coding-kit", "candidate_importance": "low", "project_rationale": "...", "importance_rationale": "..."}]
Batch classification is atomic (rolls back on any error) and idempotent: user-curated records (manual edits with provenance cli_edit) are strictly preserved unless --force is supplied.
Workflow — search
python ~/.memory/db-tools/search_all.py "query" # all databases at once (project + portable)
python ~/.memory/db-tools/search_all.py "query" --project <slug> --importance high # exact project scoped retrieval
python ~/.memory/db-tools/search_all.py "query" --project portable # portable cross-cutting retrieval
python ~/.memory/db-tools/search_all.py "query" --substring # declensions/substrings
- Search the database, NOT conversation memory.
- Project + portable composition:
--project portable selects findings classified portable; global search also searches indexed Wiki/project files. To scope retrieval without losing portable patterns, query both target --project <slug> and --project portable or query globally.
- Found → check lifecycle badges first:
[superseded by #N] → resolve to the replacing finding before using it; [unverified] → treat as unconfirmed. Then answer with a link to the file.
- Warmup lifecycle (
memory-warmup.py): high-priority feed surfaces key active invariants with verification status ([unverified] if missing verified_at); unsure feed prioritizes high/normal unanchored items over low-importance checkpoints.
- Not found → "not in the database".
Auto-write triggers
- "record", "save", "remember", «запиши», «сохрани», «запомни», «в память», «память» → full cycle.
- Bug/incident →
~/.memory/Wiki/errors/.
- Architectural decision →
~/.memory/Wiki/decisions/.
- New pattern →
~/.memory/Wiki/reference/.
Tag categories
architecture, engineering, security, performance, devops, testing, frontend, backend, database, api
1---2name: dev-wiki3description: Always-on. Cross-chat memory (database, not conversation): record decisions, errors, patterns in the global Wiki (~/.memory). Use on "record"/"save"/"remember"/"запиши"/"сохрани"/"запомни"/"в память"/"память" or "what do we know about X"/"напомни". Hierarchy: portable → ~/.memory/Wiki/; project-specific → WORK/<project>/docs/. Cycle: file → index.md → log.md → python ~/.memory/db-tools/build.py → lint.4license: MIT5---67# Dev Wiki — cross-chat developer memory89Always-on skill. Knowledge base: decisions, bugs, patterns, architectural decisions.10Memory lives in `~/.memory/` (global + per-project hierarchy; env `MEMORY_ROOT` overrides).1112## Boundary rule1314| Knowledge | Where | Index |15|-----------|-------|-------|16| **Portable** (patterns, lessons, decisions) | `~/.memory/Wiki/<type>/` | `python ~/.memory/db-tools/build.py` |17| **Project-specific** (status, configs, context) | `WORK/<project>/docs/` | `python ~/.memory/db-tools/build.py -r <root> -o ~/.memory/db/<name>.db` |1819Knowledge lives/dies with the project → project; portable across projects → global Wiki.2021## Save reflex (bounded by task effect boundary)2223- **Side-effect boundary:** read-only or review-only tasks produce NO memory writes unless explicitly requested by the user.24- **On every finished mutation task / made decision / closed bug** — 10-second check:25 would a future session need this? Yes → save. No → skip (noise-free is deliberate).26- Conclusions → `findings.py add`; portable patterns → Wiki; realizations by trigger below. Any saved `verify_cmd` is a proposed check, not standing authorization.27## Record types (global Wiki)2829| Type | Folder | When |30|------|--------|------|31| `reference` | `~/.memory/Wiki/reference/` | Fact, documentation, knowledge |32| `howto` | `~/.memory/Wiki/howto/` | Instruction, guide |33| `error` | `~/.memory/Wiki/errors/` | Bug, incident, lesson learned |34| `decision` | `~/.memory/Wiki/decisions/` | ADR, architectural decision |35| `idea` | `~/.memory/Wiki/ideas/` | Idea |3637## Workflow — save (global)38391. Determine the type → folder in `~/.memory/Wiki/`.402. Create file `~/.memory/Wiki/<type>/<slug>.md` with frontmatter:41 ```yaml42 ---43 type: reference44 title: "Title"45 description: "About what"46 date: 2026-08-1547 tags: [category, topic]48 ---49 ```503. Update `~/.memory/Wiki/index.md`.514. Append to `~/.memory/Wiki/log.md`.525. `python ~/.memory/db-tools/build.py`536. `python ~/.memory/db-tools/lint_wiki.py`547. Important conclusion → `python ~/.memory/db-tools/findings.py add "topic" --text "conclusion" --source path --project <slug> --importance <high|normal|low>`5556### Project Taxonomy & Importance5758- **Projects:** dynamically discovered from `~/.memory/db/*.db` plus optional `projects.json`. Slug format: `[a-z0-9][a-z0-9_-]{0,63}`.59 - `portable`: cross-project reusable techniques, tools, and methodologies.60 - `unknown`: unclassified personal notes, coursework, or items not tied to a specific project.61- **Importance levels:**62 - `high`: critical security boundaries, invariants, data-loss prevention, and durable architectural contracts.63 - `normal`: standard actionable engineering findings, reproducible runbooks, feature setups, and telemetry.64 - `low`: transient checkpoints, scratch notes, personal experiments, or milestone logs.65 - `unreviewed`: default state prior to qualitative review.66- **Edit finding:**67 ```bash68 python ~/.memory/db-tools/findings.py edit <id> --project <slug> --importance <high|normal|low>69 ```70- **Batch classification:**71 ```bash72 python ~/.memory/db-tools/findings.py classify mapping.json --dry-run73 python ~/.memory/db-tools/findings.py classify mapping.json74 ```75 Mapping accepts a list or an object with `{"records": [...]}`:76 ```json77 [{"id": 1, "candidate_project": "coding-kit", "candidate_importance": "low", "project_rationale": "...", "importance_rationale": "..."}]78 ```79 Batch classification is atomic (rolls back on any error) and idempotent: user-curated records (manual edits with provenance `cli_edit`) are strictly preserved unless `--force` is supplied.8081## Workflow — search8283```bash84python ~/.memory/db-tools/search_all.py "query" # all databases at once (project + portable)85python ~/.memory/db-tools/search_all.py "query" --project <slug> --importance high # exact project scoped retrieval86python ~/.memory/db-tools/search_all.py "query" --project portable # portable cross-cutting retrieval87python ~/.memory/db-tools/search_all.py "query" --substring # declensions/substrings88```89- Search the database, NOT conversation memory.90- Project + portable composition: `--project portable` selects findings classified portable; global search also searches indexed Wiki/project files. To scope retrieval without losing portable patterns, query both target `--project <slug>` and `--project portable` or query globally.91- Found → check lifecycle badges first: `[superseded by #N]` → resolve to the replacing finding before using it; `[unverified]` → treat as unconfirmed. Then answer with a link to the file.92- Warmup lifecycle (`memory-warmup.py`): high-priority feed surfaces key active invariants with verification status (`[unverified]` if missing `verified_at`); unsure feed prioritizes high/normal unanchored items over low-importance checkpoints.93- Not found → "not in the database".94## Auto-write triggers9596- "record", "save", "remember", «запиши», «сохрани», «запомни», «в память», «память» → full cycle.97- Bug/incident → `~/.memory/Wiki/errors/`.98- Architectural decision → `~/.memory/Wiki/decisions/`.99- New pattern → `~/.memory/Wiki/reference/`.100101## Tag categories102103`architecture`, `engineering`, `security`, `performance`, `devops`, `testing`, `frontend`, `backend`, `database`, `api`