From tracemem
Teaches Claude when and how to track engineering decisions in TraceMem during coding sessions. Use this skill whenever working on a project with the TraceMem plugin enabled.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tracemem:decision-trackingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill governs how you interact with TraceMem to create durable, auditable records of engineering decisions during coding sessions.
This skill governs how you interact with TraceMem to create durable, auditable records of engineering decisions during coding sessions.
Activate this skill whenever:
mcp__tracemem__* tools)mcp__tracemem__decision_create.mcp__tracemem__decision_close is called.TraceMem provides two paths for recording decisions. Choose based on whether you need governed data operations.
Use mcp__tracemem__decision_record when the decision does NOT require data product reads/writes, policy evaluations, or approval workflows. This is the most common path during coding sessions.
Always search first to avoid duplicates:
mcp__tracemem__decision_search({
query: "session caching approach",
category: "architecture"
})
Then record:
mcp__tracemem__decision_record({
title: "Use Redis for session caching instead of in-memory store",
category: "architecture",
context: "Need shared state across multiple API instances for user sessions...",
decision: "Use Redis with 30-minute TTL for session data...",
rationale: "Redis provides shared state across instances with sub-millisecond reads...",
alternatives_considered: [
{ option: "In-memory with sticky sessions", rejected_because: "Prevents horizontal scaling" },
{ option: "PostgreSQL advisory locks", rejected_because: "Too much latency for session lookups" }
],
tags: ["redis", "caching", "sessions"],
consequences: "Adds Redis as an infrastructure dependency"
})
If superseding an existing decision, include the supersedes field with the old decision ID.
Use the envelope workflow when the decision involves data product reads, writes, policy evaluation, or approval flows.
// Step 1: Create envelope
mcp__tracemem__decision_create({
intent: "code.change.apply",
automation_mode: "autonomous",
metadata: {
project: "<detected project name>",
branch: "<current git branch>",
description: "<brief task description>"
}
})
// → Returns: decision_id
// Step 2: Operate within the envelope
mcp__tracemem__decision_read({ decision_id, product, purpose, query })
mcp__tracemem__decision_write({ decision_id, product, purpose, operation, mutation })
mcp__tracemem__decision_evaluate({ decision_id, policy_id, inputs })
mcp__tracemem__decision_add_context({ decision_id, context, summary })
// Step 3: Close the envelope (REQUIRED)
mcp__tracemem__decision_close({
decision_id,
action: "commit",
reason: "Implemented Redis session cache with failover"
})
Intent mapping reference: See intent-mapping.md in this skill directory.
At the beginning of substantive work (not for quick questions or trivial edits), open a decision envelope:
mcp__tracemem__decision_create({
intent: "code.change.apply",
automation_mode: "autonomous",
metadata: {
project: "<detected project name>",
branch: "<current git branch>",
description: "<brief task description>"
}
})
When you make a significant choice, immediately record it. Do not batch decisions for later — record them at the moment of decision.
If an envelope is active, use mcp__tracemem__decision_add_context:
{
"kind": "decision",
"category": "architecture",
"summary": "Using Redis for session caching instead of in-memory store",
"rationale": "Need shared state across multiple API instances",
"alternatives_considered": ["In-memory with sticky sessions", "PostgreSQL advisory locks"],
"reversibility": "easily_reversible"
}
If no envelope is active, use the one-shot mcp__tracemem__decision_record (search first).
Decision categories and patterns: See decision-patterns.md in this skill directory.
Use mcp__tracemem__decision_add_context to show your reasoning:
summary for human-readable text, payload for machine-readable dataFor actions that may have policy constraints (deployments, secret changes, data mutations):
mcp__tracemem__decision_evaluate({
decision_id: "<active decision>",
policy_id: "policy_name",
inputs: { ... }
})
If a policy requires approval, use mcp__tracemem__decision_request_approval and wait.
Before finishing, close the decision with a summary:
mcp__tracemem__decision_close({
decision_id: "<active decision>",
action: "commit",
reason: "Implemented Redis session cache with failover to PostgreSQL"
})
Maintain the active decision ID in your working memory for the duration of the session. If the user switches tasks significantly (e.g., moves to a completely different feature), close the current decision and open a new one.
Always track:
Never track:
Judgment calls — use your discretion for:
action: "abort".idempotency_key.REDIS_URL" but not the actual URL value)npx claudepluginhub tracemem/tracemem-claude-code-plugin --plugin tracememRecords significant architectural decisions like database choices, frameworks, or core patterns in docs/decisions.md. Activates on major decisions, explicit requests, or proactively at session ends.
Captures project-level learnings, conventions, and decisions into memory, rules, or ADR files. Useful when surfacing durable conventions and technical decisions during work.
Queries AI decision trails for code reviews (CRs), gates, analysis (intent/change/risk/autonomy), architecture decisions (ADR), and timelines. Audits judgments with confidence scores, processes, and context navigation.