ワンクリックで
agentic-memory
Long-lived project memory, architectural rules, and tribal knowledge preservation system for AI agents
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Long-lived project memory, architectural rules, and tribal knowledge preservation system for AI agents
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Expert-level workflow for managing data pipelines, model training sessions, and analytical infrastructure.
Expert-level workflow for building and maintaining modern React/Next.js user interfaces with a focus on performance and DX.
| name | agentic-memory |
| description | Long-lived project memory, architectural rules, and tribal knowledge preservation system for AI agents |
| domains | ["devex","ai-workflows","knowledge-management"] |
| triggers | ["Session start","Architectural decisions","Complex debugging","Multi-step work"] |
This skill provides a sophisticated memory management system that preserves tribal knowledge, maintains a clear memory hierarchy, and ensures important context never disappears. It implements THE MEMORY CONTRACT - explicit rules that all agents must follow.
NEVER let important learnings disappear.
When you encounter tribal knowledge (implicit rules, undocumented patterns, workarounds, "why we do X this way"):
PROMPT THE USER with clear reasoning:
This seems like tribal knowledge: [description].
Archive to .ai/archive/tribal-knowledge.md?
AWAIT APPROVAL before archiving
Archive is APPEND-ONLY - never modify existing entries
Tribal knowledge indicators:
The memory system has 5 levels. Always read and update in this order:
PROJECT_MEMORY.md - Architectural decisions, domain rules, "Why"
.ai/memory/PROJECT_MEMORY.mdAUTO_MEMORY.md - Heuristics, patterns, gotchas, shortcuts
.ai/memory/AUTO_MEMORY.mdlogs/daily/YYYY-MM-DD.md - Session activity, what was attempted
.ai/logs/daily/YYYY-MM-DD.mdarchive/tribal-knowledge.md - Append-only tribal wisdom
.ai/archive/tribal-knowledge.mdtask.md - Current active objective
.ai/task.mdALWAYS log to today's daily log when performing:
Auto-Log Decision Tree:
Is this a multi-step task? (>3 steps)
|-- Yes --> Log to daily: "Task: [name], Steps: [summary]"
|-- No --> Is this a root cause finding?
| |-- Yes --> Log to daily: "Root cause: [issue], Cause: [finding]"
| -- No --> Is this tribal knowledge?
|-- Yes --> PROMPT USER for archival
-- No --> Continue work
Suggest, NEVER assume.
Before taking permanent action:
Promote archival with clear reasoning:
Pattern detected: [X].
Reason: [why it matters]
Promote to AUTO_MEMORY.md?
AWAIT explicit approval before:
If unsure, ASK:
Should this be preserved long-term?
This seems like [architectural decision/pattern/gotcha].
Follow this workflow for every session:
ONBOARDING (First 5 minutes):
ACTIVE MONITORING (During work):
DAILY LOG (Every 5-10 tool calls):
SESSION END (Before closing):
When you load this skill:
.ai/memory/PROJECT_MEMORY.md # Read first - architectural truth
.ai/memory/AUTO_MEMORY.md # Read second - learned patterns
.ai/archive/tribal-knowledge.md # Read third - if exists
.ai/task.md # Read fourth - current objective
Check .ai/logs/daily/YYYY-MM-DD.md where YYYY-MM-DD is today's date.
If it doesn't exist, create it with the standard header:
# {{DATE}}
Daily log for {{DATE}}. Each entry should capture **what was attempted, what changed, and what was learned**.
## Entries
### [Agent Name]
**Session Start:** [Time]
**Objective:** [From task.md or user request]
**Context:** [Why this work is happening]
---
Watch for tribal knowledge signals:
Track auto-log triggers:
Note patterns for promotion:
Once onboarded, respond with:
Onboarded to agentic-memory.
- Memory hierarchy understood
- Watching for tribal knowledge and auto-log triggers
- Today's log ready: .ai/logs/daily/YYYY-MM-DD.md
Signals to look for:
Action when detected:
.ai/archive/tribal-knowledge.mdAfter significant work, scan for:
Repeated debugging steps:
Action: Suggest promotion to AUTO_MEMORY.md
Similar architectural choices:
Action: Suggest update to PROJECT_MEMORY.md
Undocumented constraints:
Action: Suggest archival to tribal-knowledge.md
Start Work
|
Is this multi-step? (>3 steps)
/ \
Yes No
| |
Log to daily: Root cause finding?
"Task: [name]" / \
Yes No
| |
Log to daily: Tribal knowledge?
"Root cause:" / \
Yes No
| |
PROMPT USER Continue
|
Archive with approval
When logging to today's daily file, use:
### [HH:MM] Task/Activity Name
**Context:** Why this work was initiated
**Actions:**
- Step 1
- Step 2
- Step 3
**Outcome:** Success/failure and results
**Learnings:** Anything worth promoting
**Artifacts:** Files modified, links to PRs/issues
At the end of the day or session:
Review today's log entries
Identify patterns:
Suggest promotions to user:
Pattern detected: [X].
Occurred [N] times today.
Promote to AUTO_MEMORY.md?
Update promotion status:
At session end, add to daily log:
## Session Summary
**Session End:** [Time]
**Key accomplishments:**
- Accomplishment 1
- Accomplishment 2
**Issues encountered:**
- Issue 1
- Issue 2
**Decisions made:**
- Decision 1
**Promotions suggested:**
- [ ] Pattern: [description] -> AUTO_MEMORY.md
- [ ] Decision: [description] -> PROJECT_MEMORY.md
- [ ] Tribal knowledge: [description] -> Archive
**Next steps:**
- Step 1
- Step 2
.ai/
├── archive/
│ ├── tribal-knowledge.md # Append-only tribal wisdom
│ ├── retired-patterns.md # Deprecated but worth remembering
│ └── logs/ # Rotated daily logs >90 days
│ └── 2026/
│ ├── 03-March.md
│ └── 02-February.md
Daily logs:
.ai/logs/daily/ for 90 days.ai/archive/logs/YYYY/MM-Month.mdTribal knowledge:
Retired patterns:
When adding to tribal-knowledge.md:
## [YYYY-MM-DD] Tribal Knowledge Entry Title
**Category:** [architecture | workaround | convention | history | process]
**Context:** Why this exists, the situation that created it.
**The Knowledge:** What future agents need to know. Be specific and actionable.
**Source:** [Session log | PR #XXX | Issue #XXX | Team member]
**Archived by:** [Agent name], [Date]
---
Auto-rotation (hybrid approach):
syncMemory()force: true to skip rotationManual trigger:
rotateLogsToArchive()Rotation behavior:
No AI/LLM calls - Pure string heuristics only.
Repeated Errors:
// Same error message >3 times
const errorCount = {};
for (const entry of logEntries) {
if (entry.error) {
errorCount[entry.error] = (errorCount[entry.error] || 0) + 1;
}
}
// Flag errors with count >3
Repeated Files:
// Same file modified >5 times
const fileCount = {};
for (const entry of logEntries) {
if (entry.files) {
for (const file of entry.files) {
fileCount[file] = (fileCount[file] || 0) + 1;
}
}
}
// Flag files with count >5
Similar Tasks:
// Keyword matching for similar task descriptions
const keywords = ['debug', 'fix', 'implement', 'refactor'];
// Group by keyword and detect patterns
Based on detected patterns, suggest:
if (repeatedError) {
suggest: `Repeated error: "${error}" occurred ${count} times.
Add troubleshooting pattern to AUTO_MEMORY.md?`;
}
if (repeatedFile) {
suggest: `File "${file}" modified ${count} times.
Consider refactoring or documenting pattern in AUTO_MEMORY.md`;
}
if (similarTasks) {
suggest: `Similar "${keyword}" tasks occurred ${count} times.
Create standardized workflow in AUTO_MEMORY.md?`;
}
| Level | File | Purpose | Update Rule |
|---|---|---|---|
| 1 | PROJECT_MEMORY.md | Architectural decisions | Propose first |
| 2 | AUTO_MEMORY.md | Heuristics and patterns | Append freely |
| 3 | logs/daily/*.md | Session activity | Auto-log triggers |
| 4 | archive/tribal-knowledge.md | Tribal wisdom | User approval |
| 5 | task.md | Current objective | Update as needed |
Tribal knowledge indicators:
Auto-log triggers:
Promotion criteria:
Retention:
This skill implements the Memory Contract - explicit rules for preserving tribal knowledge and maintaining project memory across AI agent sessions.