AgentSkillsCN

prime

加载项目上下文,展示当前状态。适用于会话开始时,或在需要明确上下文的场景。

SKILL.md
--- frontmatter
name: prime
description: Load project context and show current status. Use at the start of a session or when context is needed.
disable-model-invocation: true
allowed-tools: Read, Bash, Glob, Write, AskUserQuestion

Prime: Load Project Context

Objective

Build comprehensive understanding of the codebase AND show current project status so work can resume immediately.


IMPORTANT: Agent Kit Command Scope

You are operating inside the Lucid Labs Agent Kit.

When rendering the session start screen, command list, or skill overview:

  • ONLY list commands that are explicitly defined as part of the Lucid Labs Agent Kit
  • These commands are Agent-Kit-specific (e.g. /prime, /plan-feature, /skills, /tickets, etc.)
  • DO NOT list Claude-native commands in the Agent Kit command list
  • DO NOT introduce new commands, aliases, or variations
  • DO NOT extrapolate or "helpfully" extend the command set

Standard Claude Code commands remain available (e.g. /help, /clear, /config, etc.) They are just not listed in the Agent Kit session commands block.

Deviation from the defined Agent Kit command set is considered an error.


Process

-1. CONTEXT DETECTION (ALLERERSTER SCHRITT!)

KRITISCH: Bevor irgendetwas anderes passiert, MUSS der Kontext erkannt werden.

bash
# 1. Aktuelles Verzeichnis prüfen
pwd

# 2. Prüfen ob PROJECT-CONTEXT.md existiert
cat .claude/PROJECT-CONTEXT.md 2>/dev/null

Kontext-Entscheidungsbaum:

code
Existiert .claude/PROJECT-CONTEXT.md?
├── JA → Lese type: Feld
│   ├── type: downstream → DOWNSTREAM PROJEKT
│   │   └── Lese active_project.name und active_project.prd
│   └── type: upstream → UPSTREAM (Agent Kit Template)
│
└── NEIN → Prüfe Verzeichnisname
    ├── "lucidlabs-agent-kit" → Wahrscheinlich UPSTREAM
    └── Anderer Name → Wahrscheinlich DOWNSTREAM (uninitialisiert)

Context Header anzeigen (IMMER vor Boot Screen):

code
┌─────────────────────────────────────────────────────────────────────────────┐
│  CONTEXT                                                                    │
│  ───────                                                                    │
│                                                                             │
│  Working Directory: /Users/.../projects/invoice-accounting-assistant       │
│  Repository Type:   DOWNSTREAM                                              │
│  Active Project:    invoice-accounting-assistant                            │
│  PRD:               .claude/PRD.md                                          │
│  Upstream:          ../../lucidlabs-agent-kit (READ-ONLY)                   │
│                                                                             │
│  Upstream Interaction:                                                      │
│    /sync     Pull updates FROM upstream                                     │
│    /promote  Push patterns TO upstream (via PR)                             │
│    Direct file access to upstream: FORBIDDEN                                │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Oder für Upstream (Agent Kit Template):

code
┌─────────────────────────────────────────────────────────────────────────────┐
│  CONTEXT                                                                    │
│  ───────                                                                    │
│                                                                             │
│  Working Directory: /Users/.../lucidlabs-agent-kit                          │
│  Repository Type:   UPSTREAM (Agent Kit Template)                           │
│                                                                             │
│  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  │
│  UPSTREAM PROTECTION ACTIVE                                                 │
│  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  │
│                                                                             │
│  This is the UPSTREAM template repository.                                  │
│  Direct pushes to main are BLOCKED (GitHub Branch Protection).              │
│                                                                             │
│  Allowed actions:                                                           │
│    - Browse/read code and documentation                                     │
│    - Select a downstream project to work in                                 │
│    - Template maintenance (via feature branch + PR only)                    │
│                                                                             │
│  NOT allowed:                                                               │
│    - Feature development (use downstream projects)                          │
│    - git push origin main (blocked by GitHub)                               │
│    - Starting dev servers (no application runs here)                        │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

WICHTIG: Im Upstream-Modus → Projekt-Auswahl anbieten (siehe Abschnitt 0.0)

Falls Downstream aber kein PROJECT-CONTEXT.md:

code
┌─────────────────────────────────────────────────────────────────────────────┐
│  CONTEXT                                                                    │
│  ───────                                                                    │
│                                                                             │
│  Working Directory: /Users/.../projects/some-project                        │
│  Repository Type:   DOWNSTREAM (uninitialisiert)                            │
│                                                                             │
│  ⚠️  PROJECT-CONTEXT.md fehlt. Erstelle es mit:                             │
│      → Führe /init-project aus, oder                                        │
│      → Erstelle .claude/PROJECT-CONTEXT.md manuell                          │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Nach Context-Erkennung:

  • Falls UPSTREAM → Weiter mit Projekt-Auswahl (0.0)
  • Falls DOWNSTREAM → Weiter mit Boot Sequence (0.1)

0.0 Projekt-Auswahl (NUR im UPSTREAM-Modus)

Wann: Wenn Claude im lucidlabs-agent-kit Verzeichnis gestartet wird (Upstream).

Workflow:

  1. Projekte auflisten:
bash
# Projekte-Ordner ist auf gleicher Ebene wie agent-kit
PROJECTS_DIR="$(dirname "$(pwd)")/projects"
ls -1 "$PROJECTS_DIR" 2>/dev/null | grep -v "^\."
  1. Projekt-Liste anzeigen:
code
┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│  VERFÜGBARE PROJEKTE                                                        │
│  ───────────────────                                                        │
│                                                                             │
│  [1] casavi-sandbox-seeder         Zuletzt: 28.01.2026                      │
│  [2] client-service-reporting      Zuletzt: 29.01.2026                      │
│  [3] invoice-accounting-assistant  Zuletzt: 29.01.2026                      │
│  [4] neola                         Zuletzt: 23.01.2026                      │
│  [5] satellite                     Zuletzt: 29.01.2026                      │
│                                                                             │
│  ───────────────────────────────────────────────────────────────────────    │
│                                                                             │
│  [N] Neues Projekt erstellen                                                │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

An welchem Projekt möchtest du heute arbeiten?
  1. Nach Auswahl → Handoff-Bestätigung:
code
┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│  PROJEKT AUSGEWÄHLT: invoice-accounting-assistant                           │
│                                                                             │
│  Pfad: /Users/.../projects/invoice-accounting-assistant                     │
│                                                                             │
│  ───────────────────────────────────────────────────────────────────────    │
│                                                                             │
│  Okay, wollen wir loslegen?                                                 │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
  1. Bei Bestätigung → Automatischer Session-Handoff (KEIN /clear nötig!):

KRITISCH: Nach Bestätigung durch den User erfolgt der Handoff automatisch:

a) Working Directory wechseln:

bash
cd /Users/.../projects/[gewähltes-projekt]

b) Handoff-Bestätigung anzeigen:

code
┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│  SESSION HANDOFF COMPLETE                                                   │
│                                                                             │
│  ───────────────────────────────────────────────────────────────────────    │
│                                                                             │
│  Neues Working Directory:                                                   │
│  /Users/.../projects/invoice-accounting-assistant                           │
│                                                                             │
│  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  │
│  UPSTREAM BOUNDARY ACTIVE                                                   │
│  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  │
│                                                                             │
│  Ich arbeite ab jetzt AUSSCHLIESSLICH in diesem Projekt.                    │
│  Das Upstream Repository (lucidlabs-agent-kit) ist READ-ONLY.               │
│                                                                             │
│  Upstream holen:  /sync (Updates aus dem Template ziehen)                   │
│  Upstream geben:  /promote (Patterns ins Template befoerdern, via PR)       │
│  Direkt anfassen: VERBOTEN                                                  │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

c) Context Header für neues Projekt anzeigen

d) Boot Screen mit verfügbaren Skills

e) Dann: Normaler /prime Flow für Downstream (ab 0.1)


Handoff-Regeln:

RegelBeschreibung
Kein Session-NeustartAlles passiert in der gleichen Claude-Session
Kein /clear nötigWorking Directory wird gewechselt, Kontext bleibt erhalten
Explizite BestätigungHandoff wird visuell bestätigt
Upstream-SchutzNach Handoff: KEINE Änderungen am Agent Kit mehr
Projekt-FokusAlle weiteren Aktionen betreffen nur das gewählte Projekt

0. Session Intro & Begrüßung (ZUERST!)

0.1 Boot Sequence

WICHTIG: Der Name kommt IMMER aus developer.json. Kein Hardcoding!

bash
TIME_DIR="$HOME/.claude-time"
DEVELOPER_FILE="$TIME_DIR/developer.json"

if [ -f "$DEVELOPER_FILE" ]; then
  DEVELOPER_NAME=$(cat "$DEVELOPER_FILE" | jq -r '.name')
fi

Boot Screen Layout (exakt so rendern):

code
LUCID LABS
───────────────────────────────────────────────────────────────────────────────

 █████╗  ██████╗ ███████╗███╗   ██╗████████╗    ██╗  ██╗██╗████████╗
██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝    ██║ ██╔╝██║╚══██╔══╝
███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║       █████╔╝ ██║   ██║
██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║       ██╔═██╗ ██║   ██║
██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║       ██║  ██╗██║   ██║
╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝       ╚═╝  ╚═╝╚═╝   ╚═╝

{{RANDOM_GREETING}}

───────────────────────────────────────────────────────────────────────────────

{ ────────────────── { * {{RANDOM_AGENT_LOG}} * } ────────────────── }

───────────────────────────────────────────────────────────────────────────────

/agentdocs       Explore Agent Kit documentation
/skills          List available Agent Kit skills
/clone-skill     Clone skills from central repository
/publish-skill   Share your skills with the team
/tickets         Show assigned Linear tickets
/new-ticket      Create a new Linear issue
/todos           Open local TODOs and notes
/future          View planned features and improvements
/status          Show system and session status
/notion-publish  Publish markdown to Notion (private)
/session-end     End session and persist context
───────────────────────────────────────────────────────────────────────────────
Tip: Type a command or select an option number below.

Danach folgt: Deployed Projects (0.1.0), dann Security Reminders (0.1.0b), dann Tickets/Options-Block (0.3).


0.1.0 Deployed Projects Overview (NACH Boot Screen)

IMMER anzeigen nach dem Boot Screen. Lese infrastructure/lucidlabs-hq/registry.json (lokal oder aus upstream) und zeige alle deployed Projekte.

bash
# Registry finden (downstream oder upstream)
REGISTRY=""
if [ -f "infrastructure/lucidlabs-hq/registry.json" ]; then
  REGISTRY="infrastructure/lucidlabs-hq/registry.json"
elif [ -f "$(dirname "$(pwd)")/../lucidlabs-agent-kit/infrastructure/lucidlabs-hq/registry.json" ]; then
  REGISTRY="$(dirname "$(pwd)")/../lucidlabs-agent-kit/infrastructure/lucidlabs-hq/registry.json"
fi

Deployed Projects anzeigen:

code
┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│  DEPLOYED PROJECTS (LUCIDLABS-HQ)                                          │
│  ────────────────────────────────                                          │
│                                                                             │
│  cotinga-test-suite                                                        │
│    URL:    https://cotinga.lucidlabs.de                                    │
│    Convex: https://cts-convex.lucidlabs.de                                │
│    Repo:   https://github.com/lucidlabs-hq/cotinga-test-suite             │
│                                                                             │
│  client-service-reporting                                                   │
│    URL:    https://reporting.lucidlabs.de                                  │
│    Convex: https://csr-convex.lucidlabs.de                                │
│    Repo:   https://github.com/lucidlabs-hq/client-service-reporting       │
│                                                                             │
│  invoice-accounting-assistant                        Status: pending       │
│    URL:    https://invoice.lucidlabs.de              (not yet deployed)    │
│    Repo:   https://github.com/lucidlabs-hq/invoice-accounting-assistant   │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Rendering-Regeln:

  • Nur Projekte mit status: "deployed" oder status: "provisioned" als aktiv anzeigen
  • Projekte mit status: "pending" mit Hinweis (not yet deployed) markieren
  • URL immer als klickbarer Link
  • Repo immer als https://github.com/<repo> Link
  • Convex URL nur anzeigen wenn vorhanden (nicht null)
  • Sortierung: deployed first, dann pending

Daten aus registry.json:

json
{
  "projects": [
    {
      "name": "...",
      "url": "https://...",
      "convexUrl": "https://...",
      "repo": "lucidlabs-hq/...",
      "status": "deployed|pending|provisioned"
    }
  ]
}

0.1.0b Security Reminders Check (NACH Deployed Projects)

Prüfe Security-Reminders bei Session-Start.

bash
# Security Reminders laden
REMINDERS_FILE=".claude/reference/security-reminders.json"
if [ ! -f "$REMINDERS_FILE" ]; then
  # Versuche upstream
  REMINDERS_FILE="$(dirname "$(pwd)")/../lucidlabs-agent-kit/.claude/reference/security-reminders.json"
fi

Logik:

  1. Lese alle Reminders mit status: "pending"
  2. Vergleiche due Datum mit heutigem Datum
  3. Falls due <= heute: Reminder ist OVERDUE (rot/warn)
  4. Falls due <= heute + 14 Tage: Reminder ist DUE SOON (gelb/info)
  5. Sonst: nicht anzeigen

Anzeige (nur wenn fällige Reminders existieren):

code
┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│  SECURITY REMINDERS                                                        │
│  ──────────────────                                                        │
│                                                                             │
│  [OVERDUE] SSH Key Rotation                                 Due: 2026-05-09│
│            Rotate SSH keys for LUCIDLABS-HQ                                │
│            Ref: .claude/reference/ssh-keys.md                              │
│                                                                             │
│  [DUE SOON] Create dedicated deploy user                    Due: 2026-08-09│
│             If team has grown: Create 'deploy' user                        │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Falls keine Reminders fällig: Block nicht anzeigen (stille Prüfung).


0.1.0c Test Health Audit (NACH Security Reminders)

IMMER anzeigen nach Security Reminders. This is the upfront quality audit - shows whether the last session left things in good shape.

Logik:

bash
cd frontend

# Check if test infrastructure exists
if grep -q '"test"' package.json 2>/dev/null; then
  # Run tests silently and capture result
  TEST_OUTPUT=$(pnpm run test 2>&1)
  TEST_EXIT=$?

  # Run coverage if tests pass
  if [ $TEST_EXIT -eq 0 ]; then
    COVERAGE_OUTPUT=$(pnpm run test:coverage 2>&1)
  fi
else
  echo "Tests not configured"
fi

Parse test output for:

  • Total tests, passed, failed
  • Coverage percentage (lines, branches, functions)
  • Files with/without test coverage

Anzeige (IMMER - auch wenn keine Tests konfiguriert):

If tests are configured and all pass:

code
┌─────────────────────────────────────────────────────────────────┐
│  TEST HEALTH                                                    │
│  ───────────                                                    │
│                                                                 │
│  Status:       ALL PASSING                                      │
│  Unit Tests:   12 passed, 0 failed           Coverage: 64%     │
│  Test Files:   3/7 files covered                                │
│                                                                 │
│  Uncovered:    lib/notion-data.ts, lib/auth-client.ts           │
│                lib/auth-server.ts, lib/convex.ts                │
│                                                                 │
│  Last session left tests in good shape.                         │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

If tests fail (last session left broken state):

code
┌─────────────────────────────────────────────────────────────────┐
│  TEST HEALTH                                                    │
│  ───────────                                                    │
│                                                                 │
│  Status:       FAILING (action needed)                          │
│  Unit Tests:   10 passed, 2 FAILED                              │
│                                                                 │
│  Failures:                                                      │
│    lib/__tests__/utils.test.ts:15    "merges classes"           │
│    lib/__tests__/auth.test.ts:42     "validates session"        │
│                                                                 │
│  Last session left failing tests. Fix before new work.          │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

If tests are not configured:

code
┌─────────────────────────────────────────────────────────────────┐
│  TEST HEALTH                                                    │
│  ───────────                                                    │
│                                                                 │
│  Status:       NOT CONFIGURED                                   │
│                                                                 │
│  No test infrastructure found.                                  │
│  Run /test-setup to initialize Vitest + Playwright.             │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Rules:

  • ALWAYS show this block (even if tests not configured)
  • If tests fail, this is the FIRST thing the developer should address
  • Show uncovered files to guide test writing priorities
  • Coverage thresholds: 60% minimum, 80% target

0.1.1 Data Pools (random pick exactly one)

GREETING_POOL (pick 1, use developer.name from JSON):

code
Welcome back, {{developer.name}}.
Welcome, {{developer.name}}. Session initialized.
Welcome, {{developer.name}}. Ready when you are.
Welcome, {{developer.name}}. Systems over scripts.
Welcome, {{developer.name}}. Let's build something solid.
Welcome, {{developer.name}}. This will compile. Eventually.

AGENT_LOG_POOL (pick 1):

code
AGENT LOG: THIS STARTED AS A SMALL CHANGE
AGENT LOG: HUMAN IN THE LOOP. FOR NOW.
AGENT LOG: AUTONOMOUS, BUT NOT UNSUPERVISED
AGENT LOG: DESIGNED FOR CLARITY. REALITY MAY VARY
AGENT LOG: OPTIMIZED FOR THINKING, NOT SPEED
AGENT LOG: WORKS ON MY MACHINE
AGENT LOG: TEMPORARY FIX. DO NOT REMOVE
AGENT LOG: TODO – REFACTOR LATER

0.1.2 Rendering Rules

code
BOOT SCREEN =
  HEADER (static: "LUCID LABS")
  LOGO (static: AGENT KIT block letters)
  GREETING (random, exactly one line from GREETING_POOL)
  DIVIDER
  AGENT_LOG (random, exactly one line from AGENT_LOG_POOL, in { } format)
  DIVIDER
  COMMAND CHEAT SHEET (static)
  CONTEXTUAL WORK OPTIONS (dynamic, from Linear/TODOs)

Rules:

  • NUR eine Begrüßung zur Zeit
  • NUR ein Agent Log zur Zeit
  • Keine Listen, keine Bulletpoints, keine Humor-Sektionen
  • Keine neuen Sprüche erfinden - nur aus den Pools wählen

0.2 Developer-Check & Setup

Prüfe Developer-Konfiguration:

bash
TIME_DIR="$HOME/.claude-time"
DEVELOPER_FILE="$TIME_DIR/developer.json"

# Prüfe ob Developer-Datei existiert
if [ -f "$DEVELOPER_FILE" ]; then
  DEVELOPER_NAME=$(cat "$DEVELOPER_FILE" | grep '"name"' | cut -d'"' -f4)
fi

Falls KEIN Developer konfiguriert (erstes Mal):

code
{ ──────────────── { * BOOT SEQUENCE * } ──────────────── }

First time setup detected.

lucid labs
────────────────────────────────────────────────────────────────────────────

 █████╗  ██████╗ ███████╗███╗   ██╗████████╗    ██╗  ██╗██╗████████╗
██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝    ██║ ██╔╝██║╚══██╔══╝
███████║██║  ███╗█████╗  ██╔██╗ ██║   ██║       █████╔╝ ██║   ██║
██╔══██║██║   ██║██╔══╝  ██║╚██╗██║   ██║       ██╔═██╗ ██║   ██║
██║  ██║╚██████╔╝███████╗██║ ╚████║   ██║       ██║  ██╗██║   ██║
╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝       ╚═╝  ╚═╝╚═╝   ╚═╝

A modular engineering toolkit for building AI agents

// Setting up your developer profile...

────────────────────────────────────────────────────────────────────────────

Setup-Fragen (AskUserQuestion verwenden):

code
┌─────────────────────────────────────────────────────────────────────────────────┐
│                                                                                 │
│   DEVELOPER SETUP                                                               │
│                                                                                 │
│   ─────────────────────────────────────────────────────────────────────────     │
│                                                                                 │
│   Wie heißt du?                                                                 │
│   > _                                                                           │
│                                                                                 │
│   Deine E-Mail?                                                                 │
│   > _                                                                           │
│                                                                                 │
│   Dein Kürzel (für Commits, z.B. "adam")?                                      │
│   > _                                                                           │
│                                                                                 │
│   ─────────────────────────────────────────────────────────────────────────     │
│                                                                                 │
│   Linear & Productive.io werden später konfiguriert,                           │
│   wenn du die entsprechenden Skills nutzt.                                     │
│                                                                                 │
│   (Gespeichert in ~/.claude-time/developer.json)                               │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Dann speichern in ~/.claude-time/developer.json:

json
{
  "name": "Adam Kassama",
  "email": "adam@lucidlabs.de",
  "handle": "adam",
  "role": "engineer",
  "created": "2026-01-28",
  "updated": "2026-01-28",

  "linear": {
    "user_id": "usr_abc123def456",
    "display_name": "Adam K.",
    "email": "adam@lucidlabs.de",
    "default_team_id": "team_xyz789",
    "default_team_key": "CUS",
    "workspace": "lucid-labs-agents"
  },

  "productive": {
    "person_id": "12345",
    "organization_id": "67890",
    "email": "adam@lucidlabs.de",
    "default_service_id": null,
    "default_activity_type_id": "11111",
    "rate_card_id": null
  },

  "time_tracking": {
    "total_minutes_all_time": 0,
    "first_session": null,
    "last_session": null
  },

  "preferences": {
    "boot_humor": true,
    "dashboard_style": "compact",
    "auto_sync_to_productive": false,
    "show_budget_warnings": true
  }
}

Felder-Erklärung:

FeldZweckWann abfragenAPI Source
nameBegrüßung, ReportsErstes SetupUser Input
emailIdentifikation, MatchingErstes SetupUser Input
handleKurz-ID für CommitsErstes SetupUser Input
linear.user_idAPI Queries (assignee filter)Bei erstem /linearLinear API: viewer.id
linear.default_team_idIssue CreationBei erstem /linearLinear API: teams
linear.default_team_keyIssue Prefix (CUS-xxx)Bei erstem /linearLinear API: team.key
productive.person_idTime Entry CreationBei /productive setupProductive API: people (match by email)
productive.organization_idAPI HeaderBei /productive setupProductive API Settings
productive.default_activity_type_idTime Entry TypeBei /productive setupProductive API: activity_types
time_tracking.*Aggregierte StatistikenAutomatischBerechnet
preferences.*UX-AnpassungOptionalUser Input

Wie werden die IDs ermittelt?

code
LINEAR:
1. /linear status → OAuth via MCP
2. Query: viewer { id, email, name }
3. Query: teams { nodes { id, key, name } }
4. Speichere in developer.json

PRODUCTIVE:
1. /productive setup
2. GET /api/v2/people?filter[email]={email}
3. Speichere person_id
4. GET /api/v2/activity_types
5. Zeige Auswahl, speichere default

Falls Developer EXISTIERT (normale Session):

Zeige die Boot Sequence aus 0.1 mit:

  • Zufälliger Boot Subline
  • Welcome mit Developer-Name aus JSON
  • Zufälliger Humor Comment

Dann direkt weiter zu 0.3 Session-Optionen (Tickets, etc.).

0.3 Session-Optionen anzeigen

Nach der Begrüßung zeige die Arbeitsoptionen:

code
┌─────────────────────────────────────────────────────────────────────────────┐
│                                                                             │
│  Woran möchtest du heute arbeiten?                                          │
│                                                                             │
│  ───────────────────────────────────────────────────────────────────────    │
│                                                                             │
│  MEINE LINEAR TICKETS (dir zugewiesen)                                      │
│  ─────────────────────────────────────                                      │
│                                                                             │
│  [1] CUS-42  Login Feature implementieren        Delivery       5h 30min    │
│  [2] CUS-45  Error Handling verbessern          Exploration    1h 15min    │
│  [3] CUS-48  API Dokumentation                  Backlog        0h 00min    │
│                                                                             │
│  ───────────────────────────────────────────────────────────────────────    │
│                                                                             │
│  WEITERE OPTIONEN                                                           │
│  ────────────────                                                           │
│                                                                             │
│  [4] Future Plans      - Geplante Features & Verbesserungen                 │
│  [5] Lokale TODOs      - Deine persönlichen Notizen                         │
│  [6] Neues Ticket      - Neues Linear Issue erstellen                       │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Linear Query für "Meine Tickets":

code
Linear MCP Query:
- Team: [aktuelles Team aus Projekt]
- Assignee: ME (der eingeloggte User)
- Status: NOT Done, NOT Cancelled
- Sort: Status (Delivery first), then Updated

Future Plans laden:

bash
# Prüfe ob Future Plans existieren
cat .claude/reference/LOCAL-future-plans.md 2>/dev/null | grep "## Zu Implementieren" -A 20

Lokale TODOs laden:

bash
# Prüfe ob lokale TODO-Datei existiert
cat ~/.claude-time/todos/[project-name].md 2>/dev/null

0.4 Session Dashboard anzeigen

WICHTIG: Zeige bei jedem Session-Start das Time Tracking Dashboard!

0.1 Session-Daten laden

bash
# Prüfe ob Time Tracking Verzeichnis existiert
TIME_DIR="$HOME/.claude-time"
PROJECT_NAME=$(basename "$(pwd)")

# Erstelle Verzeichnis falls nicht vorhanden
mkdir -p "$TIME_DIR/sessions"

# Lade Session-Daten für dieses Projekt
SESSION_FILE="$TIME_DIR/sessions/$PROJECT_NAME.json"

0.2 Dashboard anzeigen

Zeige das Dashboard im folgenden Format:

code
╔═══════════════════════════════════════════════════════════════════════════════╗
║                                                                               ║
║   SESSION DASHBOARD                                     [project-name]    ║
║                                                                               ║
╠═══════════════════════════════════════════════════════════════════════════════╣
║                                                                               ║
║   AKTIVITÄT (letzte 8 Wochen)                                                 ║
║   ───────────────────────────────────────────────────────────────────────     ║
║                                                                               ║
║        Dez    Jan    Jan    Jan    Jan                                        ║
║        W49    W01    W02    W03    W04                                        ║
║                                                                               ║
║   Mo   ·  ·   ░  ·   ▒  ·   ░  ▒   █  ░                                       ║
║   Di   ·  ·   ·  ░   ▒  ░   ▒  ░   ░  █                                       ║
║   Mi   ·  ·   ░  ░   █  ▒   ░  █   ▒  ░                                       ║
║   Do   ·  ·   ·  ▒   ░  █   ▒  ░   █  ▒                                       ║
║   Fr   ·  ·   ░  ░   ▒  ░   █  ▒   ░  ░                                       ║
║                                                                               ║
║   Legende:  ·  keine   ░  < 1h   ▒  1-3h   █  > 3h                           ║
║                                                                               ║
╠═══════════════════════════════════════════════════════════════════════════════╣
║                                                                               ║
║   STATISTIK                                                                   ║
║   ─────────                                                                   ║
║                                                                               ║
║   Gesamtzeit:        24h 30min      │  Sessions:           12                 ║
║   Diese Woche:       5h 15min       │  Aktive Tage:        8/30               ║
║   Heute:             0h 00min       │  Ø pro Session:      2h 02min           ║
║                                                                               ║
║   Längste Session:   4h 30min       │  Peak Hour:          10:00-11:00        ║
║   Aktueller Streak:  3 Tage         │  Längster Streak:    7 Tage             ║
║                                                                               ║
╠═══════════════════════════════════════════════════════════════════════════════╣
║                                                                               ║
║   LETZTE SESSIONS                                                             ║
║   ───────────────                                                             ║
║                                                                               ║
║   27.01.2026   Mo   14:00 - 17:30   3h 30min   CUS-42   ✓ synced              ║
║   26.01.2026   So   10:15 - 12:45   2h 30min   CUS-41   ✓ synced              ║
║   24.01.2026   Fr   09:00 - 11:00   2h 00min   CUS-40   ✓ synced              ║
║   23.01.2026   Do   13:30 - 15:15   1h 45min   CUS-39   ○ pending             ║
║                                                                               ║
╠═══════════════════════════════════════════════════════════════════════════════╣
║                                                                               ║
║   KONTINGENT (via Productive.io)                      [Acme Corp]             ║
║   ──────────────────────────────                                              ║
║                                                                               ║
║   Budget:     100h    Verbraucht:    45h    Verbleibend:    55h              ║
║                                                                               ║
║   ████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  45%    ║
║                                                                               ║
║   Prognose: Bei aktuellem Tempo noch ~4 Wochen bis Budget aufgebraucht       ║
║                                                                               ║
╚═══════════════════════════════════════════════════════════════════════════════╝

0.3 Neue Session starten

Nach dem Dashboard automatisch neue Session registrieren:

bash
# Session-Start Zeit speichern
echo "Session gestartet: $(date -Iseconds)" >> "$TIME_DIR/current-session.txt"
echo "Project: $PROJECT_NAME" >> "$TIME_DIR/current-session.txt"

Falls keine Daten vorhanden (erstes Mal):

code
╔═══════════════════════════════════════════════════════════════════════════════╗
║                                                                               ║
║   SESSION DASHBOARD                                     [project-name]    ║
║                                                                               ║
╠═══════════════════════════════════════════════════════════════════════════════╣
║                                                                               ║
║   Willkommen! Dies ist deine erste Session in diesem Projekt.                ║
║                                                                               ║
║   Das Time Tracking wird automatisch gestartet.                              ║
║   Am Ende der Session: /session-end                                          ║
║                                                                               ║
║   ────────────────────────────────────────────────────────────────────────   ║
║                                                                               ║
║   Für Kontingent-Tracking:                                                   ║
║   Konfiguriere ~/.claude-time/project-mapping.json                           ║
║                                                                               ║
╚═══════════════════════════════════════════════════════════════════════════════╝

1. Check Linear for Active Work

Query Linear for issues assigned to you or recently updated:

code
Use Linear MCP to search:
- Team: lucid-labs-agents
- Assignee: me
- Status: Exploration, Decision, Delivery, Review
- Sort: Updated (descending)

Show:

code
## Linear Status

| ID | Title | Status | Project |
|----|-------|--------|---------|
| ABC-123 | Feature X | Exploration | [Agents] Project |

**New since last session:**
- [list any new issues or comments]

Woran möchtest du arbeiten?
1. [ABC-123] Continue Feature X
2. [New] Start something new
3. [Skip] Just explore codebase

2. Read Project Status

Read PROJECT-STATUS.md to understand:

  • Current project name and phase
  • Active plan (if any)
  • Last task worked on
  • Recent activity
bash
cat PROJECT-STATUS.md 2>/dev/null || echo "No PROJECT-STATUS.md found"

2. Read Core Documentation

  • Read CLAUDE.md (project rules and conventions)
  • Read .claude/PRD.md (product requirements)
  • Read key files in .claude/reference/ as needed

3. Analyze Project Structure

List all tracked files:

bash
git ls-files | head -50

Show directory structure:

bash
find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/.next/*' | head -30

4. Check Active Plan

If PROJECT-STATUS.md shows an active plan:

bash
# Read the active plan
cat .agents/plans/[active-plan].md 2>/dev/null

Identify:

  • Current phase
  • Completed tasks
  • Next task to work on

5. Check Git Status

bash
# Current branch
git branch --show-current

# Recent commits
git log -5 --oneline

# Uncommitted changes
git status --short

6. Verify Environment

bash
# Check Node version
node -v

# Check if dependencies installed
ls frontend/node_modules 2>/dev/null && echo "Dependencies installed" || echo "Run: cd frontend && pnpm install"

Output Report

Project Status Summary

markdown
## Project Status

**Project:** [Name from PROJECT-STATUS.md or PRD]
**Phase:** [Current phase]
**Branch:** [Git branch]

### Active Plan
[If active plan exists:]
- **Plan:** `.agents/plans/[plan-name].md`
- **Feature:** [Feature being implemented]
- **Progress:** [X/Y tasks completed]
- **Next Task:** [Description of next task]

[If no active plan:]
- No active plan. Ready to start new feature.

### Recent Activity
- [Last 3-5 activities from PROJECT-STATUS.md]

Codebase Overview

markdown
## Codebase Overview

**Tech Stack:**
- Frontend: Next.js [version], React, TypeScript
- Styling: Tailwind CSS v4
- Backend: [Mastra if exists]
- Database: [Convex if configured]

**Structure:**
- `frontend/` - Next.js application
- `mastra/` - AI agent layer (if exists)
- `.claude/` - Documentation & skills
- `.agents/plans/` - Implementation plans

Ready to Work

markdown
## Ready to Work

### Linear Issues (Active)
[Show issues from Linear in Exploration/Delivery status]

### If Continuing Active Issue:
Issue: [ABC-123] Feature X
Status: [Exploration/Delivery]
Next: [What to do next based on status]

### If Starting New Feature:
1. Create Linear issue first: `/linear create`
2. Then plan: `/plan-feature [feature-name]`

### Available Skills
| Skill | Description |
|-------|-------------|
| `/linear` | Manage Linear issues |
| `/plan-feature` | Create new implementation plan |
| `/execute [plan]` | Execute a plan |
| `/validate` | Run all validation checks |
| `/commit` | Create formatted commit |
| `/session-end` | End session, update Linear |

Resume Work Flow

If there's an active plan with incomplete tasks:

  1. Show the next task clearly:

    code
    RESUME POINT
    
    Plan: .agents/plans/[plan-name].md
    Task: [Task number and description]
    File: [File to work on]
    
    Ready to continue? Say "continue" or ask questions.
    
  2. Offer to continue:

    • If user says "continue", proceed with the next task
    • If user wants different work, suggest /plan-feature

Quick Resume (TL;DR)

At the end, always provide a one-liner:

code
Quick Resume: [One sentence summary of what to do next]

Examples:

  • "Quick Resume: [ABC-123] Continue Exploration - research authentication options"
  • "Quick Resume: [ABC-123] Ready for Decision - present findings"
  • "Quick Resume: [ABC-123] In Delivery - implement Task 3 from plan"
  • "Quick Resume: No active issues. Create one with /linear create"

Session End Reminder

At appropriate stopping points, remind:

code
Bevor du gehst: /session-end
→ Updates Linear ticket status
→ Adds work summary
→ Ensures clean state for next session

NOCH ZU IMPLEMENTIEREN

Die folgenden Features sind konzipiert aber noch nicht vollständig implementiert:

1. Productive.io Skill (FEHLT NOCH)

code
/productive setup [customer]   - Kunden einrichten
/productive sync               - Zeit zu Productive.io syncen
/productive budget             - Kontingent-Status anzeigen

Benötigt:

  • API-Integration mit Productive.io
  • Projekt-Mapping (Linear Project → Productive.io Service)
  • Automatischer Zeit-Sync bei /session-end

2. Lokale TODOs (FEHLT NOCH)

code
~/.claude-time/todos/[project-name].md

Format:

markdown
# Lokale TODOs - customer-portal

## Offen
- [ ] Error Boundary für API Calls
- [ ] Loading States vereinheitlichen

## Ideen
- [ ] Dark Mode Support evaluieren

Skill:

code
/todo add "Neues TODO"
/todo list
/todo done [id]

3. Zeit-Daten Persistenz (TEILWEISE)

Die JSON-Struktur ist definiert, aber das tatsächliche Speichern/Laden muss noch als Code implementiert werden.

Benötigt:

  • Hook bei Session-Start (Zeit merken)
  • Hook bei Session-End (Zeit speichern)
  • JSON read/write Utilities

4. Kontingent-Anzeige (FEHLT NOCH)

Die Kontingent-Daten kommen von Productive.io und werden im Dashboard angezeigt.

Benötigt:

  • Productive.io API für Budget-Abfrage
  • Caching der Daten (nicht bei jeder Session API call)
  • Prognose-Berechnung