원클릭으로
ai-learning
Instinct-based learning system for Codex. Manual-first: explicit capture and analysis baseline, with optional background observer.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Instinct-based learning system for Codex. Manual-first: explicit capture and analysis baseline, with optional background observer.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
How to use the Serena MCP server for token-efficient code navigation, symbol analysis, and targeted editing. Use this skill whenever Serena tools are available (mcp__serena__* tools appear in your tool list), when exploring unfamiliar codebases, before editing any file larger than ~100 lines, when finding all callers of a function, or when you need to understand a module without reading it whole. ALWAYS prefer Serena's symbolic tools over raw Read calls for TypeScript, JavaScript, Python, or any language with LSP support — it is almost always faster and cheaper.
Use context-mode tools (ctx_execute, ctx_execute_file) instead of Bash/cat when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "page snapshot", "browser snapshot", "DOM structure", "inspect page", "accessibility tree", "Playwright snapshot", "run tests", "test output", "coverage report", "git log", "recent commits", "diff between branches", "list containers", "pod status", "disk usage", "fetch docs", "API reference", "index documentation", "call API", "check response", "query results", "find TODOs", "count lines", "codebase statistics", "security audit", "outdated packages", "dependency tree", "cloud resources", "CI/CD output". Also triggers on ANY MCP tool output that may exceed 20 lines.
Keep repository documentation current, accurate, well-placed, and easy to follow for both humans and LLMs. Use when auditing doc drift, correcting stale claims, deciding where docs belong, or validating documentation quality before a commit.
Instinct-based learning system that adapts to the environment: hooks-passive observation for Claude/Cursor, explicit capture for hook-free tools. Single unified surface for all tools.
Keep repository documentation current, accurate, well-placed, and easy to follow for both humans and LLMs. Use when auditing doc drift, correcting stale claims, deciding where docs belong, or validating documentation quality before a commit.
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
| name | ai-learning |
| description | Instinct-based learning system for Codex. Manual-first: explicit capture and analysis baseline, with optional background observer. |
| version | 2.1.0 |
An instinct-based learning system for Codex that turns repeated behavior into small reusable instincts with confidence scoring, project scoping, and optional evolution into larger assets.
v2.1 adds project-scoped instincts so project-specific patterns stay local while broader workflow and security patterns can still be shared globally.
Codex is manual-first.
~/.codex/mdt/homunculus/To opt in to the background observer, run:
mdt learning observer run
Or edit config.json and set observer.enabled to true.
| Feature | v2.0 | v2.1 |
|---|---|---|
| Storage | Global (~/.codex/mdt/homunculus/) | Project-scoped (<project-id>/ under homunculus) |
| Scope | All instincts apply everywhere | Project-scoped + global |
| Detection | None | git remote URL / repo path |
| Promotion | N/A | Project -> global when seen in 2+ projects |
| Commands | 4 (status/evolve/export/import) | 6 (+promote/projects) |
| Cross-project | Contamination risk | Isolated by default |
v2 introduced instinct-sized learning units, confidence-weighted evidence, observer-assisted analysis, and project-aware storage and evolution paths.
An instinct is a small learned behavior:
---
id: prefer-functional-style
trigger: "when writing new functions"
confidence: 0.7
domain: "code-style"
source: "session-observation"
scope: project
project_id: "my-react-app-a1b2c3d4"
project_name: "my-react-app"
---
# Prefer Functional Style
## Action
Use functional patterns over classes when appropriate.
## Evidence
- Observed 5 instances of functional pattern preference
- User corrected class-based approach to functional on 2025-01-15
Properties:
0.3 = tentative, 0.9 = near certainproject or globalSession activity
|
| explicit/manual capture
v
<project-id>/observations.jsonl
|
| optional observer or explicit analysis
v
pattern detection
|
| creates / updates
v
<project-id>/instincts/personal/
instincts/personal/ (global)
|
| evolve / promote
v
<project-id>/evolved/
evolved/ (global)
The system detects project context in this order:
CLAUDE_PROJECT_DIR or tool-agnostic MDT_PROJECT_ROOTProject IDs use the current runtime contract:
<repo-name>-git — stable across re-clones of the same origin<basename>-<md5(path)> — path-anchored local fallback<basename>-<md5(path)> using the current cwd instead of collapsing into a global projectOnly git is currently detected; other VCS systems are in the backlog. A registry file at ~/.codex/mdt/homunculus/projects.json maps IDs to absolute paths, remotes, and human-readable names.
Use the explicit mdt workflow:
mdt learning status
Then capture a concise session summary:
mdt learning capture < summary.txt
Run an explicit analysis pass:
mdt learning analyze
Run a weekly retrospective for one ISO week:
mdt learning retrospective weekly --week 2026-W11
This writes Codex project learning state under ~/.codex/mdt/homunculus/<project-id>/....
Installed Codex-root equivalent if mdt is not on PATH:
node ~/.codex/mdt/scripts/mdt.js learning status
node ~/.codex/mdt/scripts/mdt.js learning capture < summary.txt
node ~/.codex/mdt/scripts/mdt.js learning analyze
node ~/.codex/mdt/scripts/mdt.js learning retrospective weekly --week 2026-W11
Codex baseline:
The instinct workflows are:
statusevolveexportimportpromoteprojectsweeklyFor Codex, these are explicit mdt workflow entrypoints.
mdt learning CLI Reference| Command | Description |
|---|---|
mdt learning status | Show current learning state, observation count, instinct count |
mdt learning capture | Capture a session summary (reads from stdin) |
mdt learning analyze | Run explicit analysis pass on accumulated observations |
mdt learning retrospective weekly --week YYYY-Www | Generate a weekly retrospective |
mdt learning observer run | Start the optional background observer (opt-in) |
mdt learning observer stop | Stop the background observer |
| Command | Description |
|---|---|
mdt instinct status | Show all instincts with confidence scores |
mdt instinct evolve | Evolve high-confidence instincts into skills/commands/agents |
mdt instinct export | Export instincts to a portable format |
mdt instinct import | Import instincts from a file or Skill Creator |
mdt instinct promote | Promote project-scoped instincts to global scope |
mdt instinct projects | List all known projects with instinct counts |
Edit config.json to control the optional observer. The default has the observer disabled — this is the recommended baseline for Codex:
{
"version": "2.1",
"observer": {
"enabled": false,
"run_interval_minutes": 5,
"min_observations_to_analyze": 20,
"tool": null,
"models": {
"claude": "haiku",
"cursor": "auto"
},
"commands": {
"claude": "claude",
"cursor": "agent"
}
}
}
To enable the observer, set "enabled": true in config.json, or run mdt learning observer run directly.
| Key | Default | Description |
|---|---|---|
observer.enabled | false | Enable the background observer agent |
observer.run_interval_minutes | 5 | How often the observer analyzes observations |
observer.min_observations_to_analyze | 20 | Minimum observations before analysis runs |
observer.tool | null | Force a specific native observer runner where supported |
observer.commands.* | tool default | Override the native CLI command for supported observer runners |
Notes:
.js~/.codex/mdt/Continuous learning can eventually produce skill-like artifacts, but they are not all equal.
~/.codex/mdt/homunculus/ stores instincts, evidence, evolution outputs, and project-scoped learning state~/.codex/mdt/generated/skills/learned/ is MDT-owned staging for candidate/generated skills~/.codex/skills/ is the live tool-facing skill directoryPromotion/materialization is the boundary between MDT-owned state and the live tool-facing skill surface. Until a generated skill is explicitly approved and materialized, it should stay under MDT-owned state.
Weekly retrospectives are intentionally low-noise.
For Codex they are part of the recommended baseline:
~/.codex/mdt/homunculus/<project-id>/retrospectives/weekly/YYYY-Www.json
The goal is not to log more activity. The goal is to highlight:
~/.codex/
+-- AGENTS.md
+-- config.toml
+-- rules/
+-- skills/ # live/promoted tool-facing skills
+-- mdt/
+-- scripts/
+-- homunculus/
| +-- identity.json
| +-- projects.json
| +-- observations.jsonl
| +-- instincts/
| | +-- personal/
| | +-- inherited/
| +-- evolved/
| | +-- agents/
| | +-- skills/
| | +-- commands/
| +-- projects/
| | +-- <project-id>/
| | +-- observations.jsonl
| | +-- observations.archive/
| | +-- instincts/
| | | +-- personal/
| | | +-- inherited/
| | +-- evolved/
| | +-- skills/
| | +-- commands/
| | +-- agents/
+-- generated/
+-- skills/
+-- learned/ # candidate/generated skills awaiting promotion
| Pattern Type | Scope | Examples |
|---|---|---|
| Language/framework conventions | project | "Use React hooks", "Follow Django REST patterns" |
| File structure preferences | project | "Tests in __tests__/", "Components in src/components/" |
| Code style | project | "Use functional style", "Prefer dataclasses" |
| Error handling strategies | project | "Use Result type for errors" |
| Security practices | global | "Validate user input", "Sanitize SQL" |
| General best practices | global | "Write tests first", "Always handle errors" |
| Tool workflow preferences | global | "Grep before Edit", "Read before Write" |
| Git practices | global | "Conventional commits", "Small focused commits" |
Project instincts can be promoted to global scope when the same pattern is seen across multiple projects with strong confidence.
Example:
node ~/.codex/skills/ai-learning/scripts/instinct-cli.js promote
node ~/.codex/skills/ai-learning/scripts/instinct-cli.js promote --dry-run
| Score | Meaning | Behavior |
|---|---|---|
| 0.3 | Tentative | Suggested but not enforced |
| 0.5 | Moderate | Applied when relevant |
| 0.7 | Strong | Auto-approved for application |
| 0.9 | Near-certain | Core behavior |
Confidence increases with repeated consistent evidence and decreases with corrections, contradiction, or lack of reinforcement.
Codex is intentionally explicit and manual:
v2.1 remains compatible with existing instinct storage and evolved assets. Generated candidate skills should be treated as MDT-owned staging artifacts under ~/.codex/mdt/generated/skills/learned/. Live tool-facing skills should remain in ~/.codex/skills/ and only receive explicitly promoted/materialized outputs.
Instinct-based learning: teach the tool your patterns, one project at a time.