# Session Start

> Start-of-session project briefing. Use when the user asks for project/session context, a new-session briefing, "where were we", "what's going on", current project state, or a recommended starting point for a fresh conversation. Read-only.

- Skill: `57luo/session-start` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add 57luo/session-start`
- Raw SKILL.md: https://api.skillmd.com/api/skills/57luo/session-start/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: 57Luo (https://skillmd.com/u/57luo)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/57luo/session-start

---


# Session Start

Produce a full project briefing for a fresh session. Do not modify files.

## Core Rules

- Treat handoff files as a lead list, not authoritative truth.
- Read project instructions first when present: `AGENTS.md`, `CLAUDE.md`. Do not read `.claude/settings.json` during session-start by default; inspect it only under the `Project Instruction Reading Boundary` in `session-handoff/schema/handoff.md`.
- Resolve the shared project handoff root before reading. Prefer the main repo/worktree root, then `.session/handoff/`, `.handoff/`, `handoff/`, or `docs/handoff/`.
- Treat handoff directories inside skill folders as legacy read-only sources.
- If the newest handoff exists only in a legacy skill directory, report that future writes should migrate to `.session/handoff/`.
- Verify actionable claims against current sources when available: progress docs, related docs, Spectra CLI/artifacts, git status/log, or explicit user instructions.
- Label claims that only come from handoff text as `handoff-only` or `unverified from handoff`.
- Do not invent progress-source paths. If none exists, say `Progress Source: Handoff only`.
- Historical handoff files are read-only. Never modify older daily handoffs during briefing.

## Handoff Root Resolution

Follow `## Handoff Root Resolution` in `session-handoff/schema/handoff.md`. As a reader skill: read from the shared root and report a divergent worktree-local handoff directory as a migration/mismatch warning.

## Quote-Trace Discipline

Follow `## Quote-Trace Discipline` in `session-handoff/schema/handoff.md`. Additionally for briefing output: before output, self-check that each recommendation has a source label: `from-board`, `from-progress-source`, `from-spectra`, `from-git`, `from-user`, or `handoff-only`.

## Spectra Discovery

Spectra is optional, but detection is required. Follow `## Spectra Discovery`
in `session-handoff/schema/handoff.md` (including the `session-start` delta
there). The collector output's `spectra` section covers the detection steps —
do not re-run them manually unless the collector failed; report a non-null
`spectra.error` as a CLI failure, not as "Spectra absent".

## Workflow

1. Run the deterministic collector first:
   `python <session-handoff-skill-dir>/scripts/collect_briefing.py` (cwd = project root, or pass the root as the first argument; shared session scripts live in the `session-handoff` skill directory, next to `schema/handoff.md`). When the harness provides an auto-memory directory, also pass `--memory-dir <that directory>`. It returns one JSON blob with: latest handoff path + Board content (cut before Session Log, each `##` section capped at 40 lines with a `<truncated: ...>` marker), `git status`/`log`/`worktree list`, Spectra CLI detection + active/parked lists (each entry already carries `completedTasks`/`totalTasks`) + per-active-change `spectra status --json` under `spectra.statuses` + `.spectra.yaml` worktree setting, ideas-backlog summary (titles grouped by section, no per-item metadata), and — when `--memory-dir` was passed — a `memory_audit` section with MEMORY.md index dead-link results. Per-section failures appear as `<error: ...>` values — report them; do not re-run the whole collection by hand. Fall back to manual collection only if the script itself fails to run.
2. Collect what the script does not cover:
   - project instructions (`AGENTS.md`, `CLAUDE.md`; not `.claude/settings.json` by default)
   - Session Log and older handoffs only on demand under the schema reading boundaries (`Historical Handoff Reading Boundary` in `session-handoff/schema/handoff.md`)
   - `spectra show <change> --json` for the one relevant change only when `spectra.statuses` from the collector is not enough (task status/counts are already there), per Spectra Discovery above
3. Parse Board sections when present:
   - `## Active Work`
   - `## Phase Plan`
   - `## Remaining`
   - `## Related Docs`
   - `## Open Questions`
   - `## Blockers`
   - `## Spectra`
4. Read only the minimal current-source summary needed for queued or active items. For active Spectra changes, read status, task counts, and the next unfinished task from the collector's `spectra.active` / `spectra.statuses`; leave full proposal/design/spec loading to the next Spectra execution skill.
5. Classify Active Work rows using the `Workspace`/`Branch` schema: resume candidates, occupied checkout conflicts, isolated worktrees, stale/missing workspace data.
6. Correlate the latest `### Session N` Log entry to Active Work Slots by parsing the title prefix convention (`### Session N - S1 / ...`): if a Slot ID is present, tag the `### Last Session` block with `linked: Sm`; if absent, tag `ad-hoc`. Slot IDs (S1/S2/...) and Log session numbers (Session 1/2/...) are independent axes — do not assume `Sm` corresponds to `Session m`.
7. Apply the `Cold Start Reading Boundary` and `Related Docs Scope` from `session-handoff/schema/handoff.md`: treat Related Docs as claimed-work documentation sync checks. Parse entries, but read document contents only when needed to identify the next action, active blocker, unresolved Open Question, or Board/source mismatch. Prefer targeted scans over full-file reads. Flag any Related Docs entry whose `last reviewed: YYYY-MM-DD` tag is >30 days old or missing as `stale-check needed`; do NOT silently update the timestamp. Report source/test/generated paths as Board hygiene issues instead of reading them.
8. Compare handoff claims to current sources and report mismatches.
9. Include recent session summaries from the collector's `recent_sessions` list in a `### Recent Sessions` section. Entries without a summary display `(no summary)`.
10. Summarize the ideas backlog from the collector's `ideas_backlog.summary` section (`.knowledge/ideas-backlog.md`, managed by `project-logbook --backlog`): list entry titles grouped by phase/section, and report `last_touched`; flag `consider review` if >30 days. Per-item metadata and entry bodies are NOT loaded by default — re-run the collector with `--full-backlog` only if the user asks for details. Goal: backlog visibility must NOT depend on the user asking; title-level visibility is enough for recognition.

11. Memory audit (only when the harness provides an auto-memory directory — the system prompt names it and its `MEMORY.md` index):
    - Dead-link detection comes from the collector's `memory_audit` section (you passed `--memory-dir` in step 1); do not re-check file existence by hand.
    - For each `project`-type memory, spot-check that what it references (files, branches, env vars, endpoints, commands) still exists in the current project state; use cheap checks (path existence, `git branch`, grep) — do not deep-read code for this.
    - Report findings in `### Memory Audit`; classify each issue as `dead-link`, `stale (contradicts current state)`, or `unverifiable`. Do NOT silently edit or delete memories — propose the fix and let the user decide. Skip the section entirely when no memory directory exists or no issues are found.

## Output

Respond in Traditional Chinese unless the user explicitly requests another
language.

Use this structure:

```markdown
## Session Briefing

### Active Work
[Active rows, including same-day completed rows. Label each unfinished row as resume-candidate, occupied-checkout conflict, isolated-worktree, stale/missing-workspace, or handoff-only.]

### Remaining (Claimable)
[Claimable unfinished work. Mark handoff-only items inline.]

### Recent Sessions
[Session summaries from the collector's `recent_sessions` list (up to 5 most
recent). Show session number, title, and summary line. Entries without a
`> summary:` line display `(no summary)`. This section gives context on what
recent sessions accomplished without reading full entry bodies.]

### Last Session
[Latest completed/stopped/next-start details. Mark verified or handoff-only.
Tag Slot correspondence: `linked: Sm` if the log title carries a Slot prefix
(`## Session N - S1 / ...`), or `ad-hoc` if not. Slot IDs and Log session
numbers are independent axes; do not assume they match.]

### Blockers
[Active blockers from Board/current sources.]

### Open Questions
[Unresolved questions from Board/current sources.]

### Git Status
- Branch: `<branch>`
- Uncommitted: `<summary>`
- Latest commit: `<message>`
- Remote tracking: `ahead N / behind N`（from `git status`；若無 upstream 則標註 `no upstream`）

### Spectra
[Probe result, `.spectra.yaml worktree` setting, relevant active/parked change state, plus `parked total: N` count from `spectra list --parked` so the operator knows how many parked changes exist beyond the Board-listed ones.]

### Phase Plan
[Milestones/dependencies from Board, adjusted by current sources.]

### Docs Sync
[Claimed-work documentation sync checks from Related Docs; list only paths/status by default, and note stale or invalid entries.]

### Ideas Backlog
[Entry titles grouped by phase/section from the collector's `ideas_backlog.summary`. Report file `last touched` date. No per-item metadata or entry bodies unless the user asks for details (then re-run the collector with `--full-backlog`).]

### Memory Audit
[Only if an auto-memory directory exists AND issues were found: dead index links, memories contradicting current project state, or unverifiable claims. Propose update/delete per item; never silently fix.]

### Board Mismatch
[Only if mismatches were found.]

### Recommended Start
[Final recommended next action based on current sources. This must be the last section so the bottom of the chat ends on the actionable next step. Never present handoff-only text as verified.

Decision logic: evaluate in order, pick the first match.
1. Active Spectra change has unfinished executable tasks AND is listed as an unfinished row in `## Active Work`: recommend `/spectra-apply <change>` to resume.
2. Active Spectra change has unfinished executable tasks BUT is not listed as an unfinished row in `## Active Work`: recommend `/session-claim <change>` before `/spectra-apply <change>`.
3. Parked Spectra change is the next Board item: recommend `/session-claim <change>`.
4. Phase Plan names a planned change that does not exist in Spectra: recommend `/spectra-propose <change>`.
5. Phase Plan or Open Questions show unclear requirements: recommend `/spectra-discuss`.
6. No Spectra change exists but Board has Remaining items: recommend `/session-claim <highest-priority-remaining-item>`.
7. Board has active Open Questions or Blockers: recommend `resolve OQ: "<exact question text>"` or `resolve Blocker: "<exact blocker text>"` (quote the actual text from the Board).
8. Board is clean and git is clean: recommend `no queued work`.

Decision source priority: Phase Plan order > Board Active/Remaining > Spectra CLI status > git state.

若建議涉及 git 操作（push、merge、reset 等），其前提條件（branch、ahead/behind、dirty state）必須來自本次收集的 `git status` 輸出，不得引用 handoff 所記載的數字。]
```

After producing the briefing, wait for user instructions. Do not start implementation automatically.





