taskmanager-memory
Manage project memories - constraints, decisions, conventions with conflict detection and resolution
What this skill does
# TaskManager Memory Skill
You manage the **project-wide memory** for this repository using SQLite.
Your goal is to:
1. Keep the `memories` table in `.taskmanager/taskmanager.db` valid and consistent.
2. Make it easy for other agents/skills/commands to **discover relevant memories** based on the current work.
3. Capture new long-lived knowledge (constraints, decisions, bugfixes, conventions) whenever it appears.
4. Track how often memories are used so the most important ones surface naturally.
Always work relative to the project root.
---
## Database Location
- **Database**: `.taskmanager/taskmanager.db`
- **Primary table**: `memories`
- **Full-text search**: `memories_fts` (FTS5 virtual table)
- **Task memory**: `state.task_memory` (JSON column in `state` table)
Use `sqlite3` via the Bash tool for all database operations.
---
## Memory Schema
The `memories` table has these columns:
| Column | Type | Description |
|--------|------|-------------|
| `id` | TEXT PRIMARY KEY | Stable ID, e.g. `"M-0001"` |
| `title` | TEXT NOT NULL | Short summary (<= 140 chars) |
| `kind` | TEXT NOT NULL | One of: `constraint`, `decision`, `bugfix`, `workaround`, `convention`, `architecture`, `process`, `integration`, `anti-pattern`, `other` |
| `why_important` | TEXT NOT NULL | Concise explanation of why this memory matters |
| `body` | TEXT NOT NULL | Detailed description / rationale / examples |
| `source_type` | TEXT NOT NULL | One of: `user`, `agent`, `command`, `hook`, `other` |
| `source_name` | TEXT | Human/agent/command identifier |
| `source_via` | TEXT | Free-text, e.g. `"cli"`, `"tests/run-test-suite"` |
| `auto_updatable` | INTEGER | 0 for user-created (never auto-update), 1 for system-created |
| `importance` | INTEGER | 1-5 (how critical), default 3 |
| `confidence` | REAL | 0-1 (how sure we are), default 0.8 |
| `status` | TEXT | One of: `active`, `deprecated`, `superseded`, `draft` |
| `superseded_by` | TEXT | ID of newer memory (if superseded) |
| `scope` | TEXT (JSON) | Object with: `project`, `files`, `tasks`, `commands`, `agents`, `domains`. The `tasks` field links memories to specific task IDs for auto-loading during execution. |
| `tags` | TEXT (JSON) | Array of free-form tags, e.g. `["testing", "laravel"]` |
| `links` | TEXT (JSON) | Array of links to docs/PRs/etc |
| `use_count` | INTEGER | Usage counter, default 0 |
| `last_used_at` | TEXT | ISO timestamp of last use |
| `last_conflict_at` | TEXT | ISO timestamp of last detected conflict |
| `conflict_resolutions` | TEXT (JSON) | Array of conflict resolution history entries |
| `created_at` | TEXT | ISO timestamp |
| `updated_at` | TEXT | ISO timestamp |
---
## Note on Deferrals
Deferrals (tracked in the `deferrals` table) are **separate from memories**. Deferrals track work deferred from one task to another with source-target linkage and lifecycle management. They are managed by the `run` and `update` commands, not by this memory skill. Do not create memories to track deferred work; use the deferrals system instead.
---
## Responsibilities
### 1. Initialize & Validate
When you start working:
1. Check if `.taskmanager/taskmanager.db` exists.
2. If not, the database needs initialization (use the taskmanager init process).
3. Verify the `memories` table exists:
```sql
SELECT name FROM sqlite_master WHERE type='table' AND name='memories';
```
### 2. Query for Relevant Memories
Given a natural-language description of the current work (files, task IDs, domains):
1. Parse the description into:
- Candidate `domains` (e.g. testing, performance, security, architecture).
- Candidate `files` / directories.
- Task IDs, if present.
2. Use SQL to find matching memories:
**Full-text search (for keyword matching):**
```sql
SELECT m.id, m.title, m.kind, m.why_important, m.importance, m.use_count
FROM memories m
JOIN memories_fts fts ON m.rowid = fts.rowid
WHERE m.status = 'active'
AND memories_fts MATCH '<search_terms>'
ORDER BY rank, m.importance DESC, m.use_count DESC
LIMIT 10;
```
**Scope-based search (for file matching):**
```sql
SELECT id, title, kind, why_important, importance, use_count
FROM memories
WHERE status = 'active'
AND (
scope = '{}'
OR json_extract(scope, '$.files') IS NULL
OR EXISTS (
SELECT 1 FROM json_each(json_extract(scope, '$.files')) f
WHERE '<current_file>' LIKE f.value
)
)
ORDER BY importance DESC, use_count DESC
LIMIT 10;
```
**Domain-based search:**
```sql
SELECT id, title, kind, why_important, importance, use_count
FROM memories
WHERE status = 'active'
AND EXISTS (
SELECT 1 FROM json_each(json_extract(scope, '$.domains')) d
WHERE d.value IN ('<domain1>', '<domain2>')
)
ORDER BY importance DESC, use_count DESC;
```
**Task-based search:**
```sql
SELECT id, title, kind, why_important, importance, use_count
FROM memories
WHERE status = 'active'
AND EXISTS (
SELECT 1 FROM json_each(json_extract(scope, '$.tasks')) t
WHERE t.value = '<task_id>'
)
ORDER BY importance DESC;
```
3. Prefer:
- Higher `importance`.
- Higher `use_count`.
- More recent `last_used_at`.
4. Return a compact summary (bullet list) with:
- `id`, `title`, `kind`, `why_important`.
- Any key constraints or decisions that MUST be respected.
You should **never** dump all memories into context unless explicitly asked; always select the smallest relevant subset.
### 3. Create a New Memory
When a user or another skill makes a decision that should persist for future work:
1. Check whether a similar memory already exists:
```sql
SELECT id, title, kind FROM memories
WHERE status = 'active'
AND kind = '<kind>'
AND (
title LIKE '%<keyword>%'
OR EXISTS (
SELECT 1 FROM json_each(tags) t WHERE t.value = '<tag>'
)
);
```
2. If it is truly new, generate the next ID:
```sql
SELECT 'M-' || printf('%04d', COALESCE(MAX(CAST(SUBSTR(id, 3) AS INTEGER)), 0) + 1)
FROM memories;
```
3. Insert the new memory:
```sql
INSERT INTO memories (
id, title, kind, why_important, body,
source_type, source_name, source_via, auto_updatable,
importance, confidence, status,
scope, tags, links,
use_count, created_at, updated_at
) VALUES (
'<id>', '<title>', '<kind>', '<why_important>', '<body>',
'<source_type>', '<source_name>', '<source_via>', <0_or_1>,
<importance>, <confidence>, 'active',
'<scope_json>', '<tags_json>', '<links_json>',
0, datetime('now'), datetime('now')
);
```
When in doubt whether something deserves a memory, ask: **"Will this decision/convention matter for future tasks?"** If yes, create a memory.
#### Macro Decision Memory Example
When the plan command's macro architectural questions (Phase 3) capture a user decision:
```sql
INSERT INTO memories (
id, title, kind, why_important, body,
source_type, source_name, source_via, auto_updatable,
importance, confidence, status,
scope, tags
) VALUES (
'M-0012',
'Use Redis for queue driver',
'architecture',
'Affects all background job processing',
'User chose Redis as the queue driver during macro analysis. Rationale: existing Redis infrastructure, supports priorities and delayed jobs.',
'user', 'developer', 'taskmanager:plan:macro-questions', 0,
4, 1.0, 'active',
'{"domains": ["infrastructure", "queues"], "tasks": ["1.3", "2.1"]}',
'["redis", "queue", "architecture"]'
);
```
Note the `scope.tasks` field linking this memory to relevant task IDs. During task execution, the `run` command auto-loads memories where the current task ID appears in `scope.tasks`.
### 4. Update or Supersede an Existing Memory
When an existing memory is refined or corrected:
1. If it's a small correction:
```sql
UPDATE memories SET
body = '<new_body>',
tags = '<new_tags_json>',
scope = '<new_scope_json>',
updated_at = datetime('now')
WHERE id = '<memory_id>';
```
2. If it's a substantial change or reveRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.