Skip to main content

Session Logging Skill

Consolidated session logging system with ISO 8601 timestamps, session UUIDs, and automatic MoE classification.

When to Use This Skill

Use this skill when you need to:

  • Log development activities during a session
  • Append entries to the daily session log
  • Create a new day's session log
  • Query session history
  • Trigger automatic classification after log updates

Core Concepts

One Log Per Day (UTC)

Session logs are organized by UTC date:

docs/session-logs/
├── SESSION-LOG-2025-12-30.md
├── SESSION-LOG-2025-12-31.md
└── SESSION-LOG-2026-01-01.md

Multiple Sessions Per Log

Each daily log can contain multiple sessions, identified by UUID:

## 2025-12-31T23:45:00Z - Session Entry

**Session ID:** `abc12345-6789-...`
**Focus:** Description of session focus

### 2025-12-31T23:45:00Z - Task Completed

- **Issue:** Description
- **Fix:** What was done
- **Deployed:** version tag

ISO 8601 Timestamps (UTC)

All timestamps use ISO 8601 format in UTC:

  • 2025-12-31T23:45:00Z (full timestamp)
  • Stored in frontmatter as created and updated

Auto-Classification

After every log update, the /classify command runs automatically to:

  1. Update moe_confidence score
  2. Set moe_classified date
  3. Update updated timestamp in frontmatter

Invocation

Command

# Append entry to today's log
/session-log "Fixed cart API response mismatch"

# Append with details
/session-log "Fixed cart API" --issue "getCart() returned wrapped response" --fix "Extract .cart from response" --deployed "v1.0.2"

# Start new session in today's log
/session-log --new-session "Commerce API Fixes"

# View today's log
/session-log --view

# View specific date's log
/session-log --view --date 2025-12-30

Script

# Direct script invocation
python3 scripts/session_log_manager.py append "Fixed cart API response"

# With full details
python3 scripts/session_log_manager.py append "Fixed cart API" \
--issue "getCart() returned wrapped response" \
--fix "Extract .cart from response" \
--deployed "v1.0.2"

# Start new session
python3 scripts/session_log_manager.py new-session "Commerce API Fixes"

# View log
python3 scripts/session_log_manager.py view --date today

Agent

/agent session-log-manager "Log the cart API fix we just completed"

Log Entry Format

Session Header

## 2025-12-31T23:45:00Z - Session Start

**Session ID:** `abc12345-6789-4def-ghij-klmnopqrstuv`
**Focus:** Commerce API Fixes & Pricing Page Improvements

Task Entry

### 2025-12-31T23:50:00Z - Cart API Response Fix

- **Issue:** `getCart()` returned wrapped `{cart: {...}}`, frontend expected `Cart` directly
- **Root Cause:** Backend wraps response, frontend didn't unwrap
- **Fix:** Modified `commerce.service.ts` to extract `.cart` from response
- **Files Modified:**
- `src/services/commerce.service.ts`
- **Deployed:** `v1.0.2-cart-fix`

Simple Entry

### 2025-12-31T23:55:00Z - Manifest 403 Fix

- **Issue:** `site.webmanifest` returning 403 Forbidden
- **Fix:** `chmod 644` on manifest, robots.txt, sitemap.xml
- **Deployed:** `v1.0.3-manifest-fix`

Frontmatter Template

---
title: Session Log YYYY-MM-DD
type: session-log
component_type: session-log
version: 1.0.0
audience: contributor
status: active
summary: Development session log for YYYY-MM-DD
keywords:
- session-log
- development-history
tokens: ~NNNN
created: 'YYYY-MM-DDTHH:MM:SSZ'
updated: 'YYYY-MM-DDTHH:MM:SSZ'
tags:
- session-log
sessions:
- id: 'uuid-1'
start: 'YYYY-MM-DDTHH:MM:SSZ'
focus: 'Session 1 focus'
- id: 'uuid-2'
start: 'YYYY-MM-DDTHH:MM:SSZ'
focus: 'Session 2 focus'
moe_confidence: 0.950
moe_classified: YYYY-MM-DD
---

Integration

Hooks

The post-session-log-update hook automatically:

  1. Runs /classify on the updated log file
  2. Updates the updated timestamp
  3. Refreshes moe_classified date

Checkpoints vs Session Logs

ArtifactPurposeFrequency
Session LogDetailed chronological entriesAppend-only, continuous
CheckpointHigh-level summary with linksPeriodic (EOD, milestones)

Session logs capture the "what happened" in detail. Checkpoints summarize "what was accomplished" with links to logs.

Examples

Quick Log Entry

/session-log "Deployed v1.0.5-cart-types-fix to GKE"

Detailed Log Entry

/session-log "Cart Type Mismatch Fix" \
--issue "Frontend CartItem expected nested product.slug, backend sends flat product_slug" \
--fix "Rewrote types and components to use flat structure" \
--files "types/commerce.ts,useCart.ts,CartItem.tsx" \
--deployed "v1.0.5-cart-types-fix"

Start New Session

/session-log --new-session "Security Hardening - Track D"

Success Output

When successful, this skill MUST output:

✅ SKILL COMPLETE: session-logging

Completed:
- [x] Session log entry appended to docs/session-logs/SESSION-LOG-{date}.md
- [x] ISO 8601 timestamp added: {timestamp}
- [x] Entry includes all required fields (issue, fix, deployed, etc.)
- [x] Frontmatter updated (updated timestamp, sessions list)
- [x] Auto-classification triggered via /classify
- [x] moe_confidence score updated: {score}

Outputs:
- docs/session-logs/SESSION-LOG-{date}.md updated
- New entry at timestamp: {timestamp}
- Session ID: {uuid} (if new session)
- Entry includes:
- Issue description
- Root cause (if applicable)
- Fix applied
- Files modified
- Deployment version

Next Steps:
- View log: /session-log --view
- Continue logging tasks in this session
- Create checkpoint at end of day with summary

Completion Checklist

Before marking this skill as complete, verify:

  • Session log file exists at correct path: docs/session-logs/SESSION-LOG-{YYYY-MM-DD}.md
  • New entry added with ISO 8601 timestamp in UTC
  • Entry includes all provided fields (issue, fix, deployed, etc.)
  • Frontmatter updated timestamp reflects current time
  • Frontmatter sessions list updated if new session started
  • /classify command executed successfully
  • moe_confidence score in frontmatter is >0.85
  • No duplicate entries or malformed timestamps
  • Entry follows markdown format (### heading, bullet points)

Failure Indicators

This skill has FAILED if:

  • ❌ Log file not created or not in correct directory
  • ❌ Timestamp format incorrect (not ISO 8601 UTC)
  • ❌ Entry missing required context (no issue or fix description)
  • ❌ Frontmatter not updated or corrupted
  • ❌ Auto-classification not triggered
  • moe_confidence score not updated or <0.80
  • ❌ Duplicate entries for same timestamp
  • ❌ Markdown formatting broken (invalid headings, bullet syntax)
  • ❌ Session UUID malformed or missing for new session

When NOT to Use

Do NOT use this skill when:

  • Creating high-level summaries (use checkpoint creation instead)
  • Documenting architecture decisions (use ADR creation)
  • Writing user-facing documentation (use codi-documentation-writer)
  • Logging errors/warnings from code (use application logging)
  • Tracking task completion status (use tasklist.md or TodoWrite)
  • Recording git commit messages (commit messages should be separate)
  • Creating meeting notes (use separate meeting notes system)
  • One-time reference notes (use MEMORY-CONTEXT/ instead)

Use alternative tools:

  • Checkpoint creation - For end-of-day/milestone summaries
  • ADR creation - For architectural decisions
  • tasklist.md - For task tracking with checkboxes
  • TodoWrite - For active task status within session
  • Git commit messages - For code change documentation

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Logging every tiny actionLog bloat, hard to find important entriesLog only completed tasks and significant decisions
Not including context"Fixed bug" - what bug?Always include issue description and root cause
Using local time instead of UTCConfusion across time zonesAlways use ISO 8601 with 'Z' suffix (UTC)
Skipping deployment versionCan't trace when fix went liveAlways include version tag or commit hash
Not starting new sessionSingle massive session entryStart new session for each distinct focus area
Editing old entriesLoses chronological truthAppend corrections as new entries, don't edit history
Logging before task complete"Working on X" entries that never finishOnly log after task is DONE
Not running /classify after updateStale moe_confidence scoresAlways let auto-classification hook run

Principles

This skill embodies:

  • #5 Eliminate Ambiguity - Explicit timestamps, session IDs, structured entries
  • #6 Clear, Understandable, Explainable - Chronological log with context for each entry
  • #8 No Assumptions - Every entry includes issue, fix, and deployment details
  • #11 Don't Repeat Yourself (DRY) - Single daily log file, reuse session structure
  • #14 Documentation as Code - Session logs are versioned, trackable artifacts

Full Principles: CODITECT-STANDARD-AUTOMATION.md


Skill Version: 1.0.0 Created: 2025-12-31T23:45:00Z Author: CODITECT Core Team