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
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.
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
Parse Board sections when present:
## Active Work
## Phase Plan
## Remaining
## Related Docs
## Open Questions
## Blockers
## Spectra
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.
Classify Active Work rows using the Workspace/Branch schema: resume candidates, occupied checkout conflicts, isolated worktrees, stale/missing workspace data.
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.
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.
Compare handoff claims to current sources and report mismatches.
Include recent session summaries from the collector's recent_sessions list in a ### Recent Sessions section. Entries without a summary display (no summary).
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.
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:
## 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.
1---2name: session-start3description: 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.4---56# Session Start78Produce a full project briefing for a fresh session. Do not modify files.910## Core Rules1112- Treat handoff files as a lead list, not authoritative truth.13- 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`.14- Resolve the shared project handoff root before reading. Prefer the main repo/worktree root, then `.session/handoff/`, `.handoff/`, `handoff/`, or `docs/handoff/`.15- Treat handoff directories inside skill folders as legacy read-only sources.16- If the newest handoff exists only in a legacy skill directory, report that future writes should migrate to `.session/handoff/`.17- Verify actionable claims against current sources when available: progress docs, related docs, Spectra CLI/artifacts, git status/log, or explicit user instructions.18- Label claims that only come from handoff text as `handoff-only` or `unverified from handoff`.19- Do not invent progress-source paths. If none exists, say `Progress Source: Handoff only`.20- Historical handoff files are read-only. Never modify older daily handoffs during briefing.2122## Handoff Root Resolution2324Follow `## 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.2526## Quote-Trace Discipline2728Follow `## 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`.2930## Spectra Discovery3132Spectra is optional, but detection is required. Follow `## Spectra Discovery`33in `session-handoff/schema/handoff.md` (including the `session-start` delta34there). The collector output's `spectra` section covers the detection steps —35do not re-run them manually unless the collector failed; report a non-null36`spectra.error` as a CLI failure, not as "Spectra absent".3738## Workflow39401. Run the deterministic collector first:41 `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.422. Collect what the script does not cover:43 - project instructions (`AGENTS.md`, `CLAUDE.md`; not `.claude/settings.json` by default)44 - Session Log and older handoffs only on demand under the schema reading boundaries (`Historical Handoff Reading Boundary` in `session-handoff/schema/handoff.md`)45 - `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 above463. Parse Board sections when present:47 - `## Active Work`48 - `## Phase Plan`49 - `## Remaining`50 - `## Related Docs`51 - `## Open Questions`52 - `## Blockers`53 - `## Spectra`544. 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.555. Classify Active Work rows using the `Workspace`/`Branch` schema: resume candidates, occupied checkout conflicts, isolated worktrees, stale/missing workspace data.566. 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`.577. 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.588. Compare handoff claims to current sources and report mismatches.599. Include recent session summaries from the collector's `recent_sessions` list in a `### Recent Sessions` section. Entries without a summary display `(no summary)`.6010. 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.616211. Memory audit (only when the harness provides an auto-memory directory — the system prompt names it and its `MEMORY.md` index):63 - 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.64 - 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.65 - 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.6667## Output6869Respond in Traditional Chinese unless the user explicitly requests another70language.7172Use this structure:7374```markdown75## Session Briefing7677### Active Work78[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.]7980### Remaining (Claimable)81[Claimable unfinished work. Mark handoff-only items inline.]8283### Recent Sessions84[Session summaries from the collector's `recent_sessions` list (up to 5 most85recent). Show session number, title, and summary line. Entries without a86`> summary:` line display `(no summary)`. This section gives context on what87recent sessions accomplished without reading full entry bodies.]8889### Last Session90[Latest completed/stopped/next-start details. Mark verified or handoff-only.91Tag Slot correspondence: `linked: Sm` if the log title carries a Slot prefix92(`## Session N - S1 / ...`), or `ad-hoc` if not. Slot IDs and Log session93numbers are independent axes; do not assume they match.]9495### Blockers96[Active blockers from Board/current sources.]9798### Open Questions99[Unresolved questions from Board/current sources.]100101### Git Status102- Branch: `<branch>`103- Uncommitted: `<summary>`104- Latest commit: `<message>`105- Remote tracking: `ahead N / behind N`(from `git status`;若無 upstream 則標註 `no upstream`)106107### Spectra108[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.]109110### Phase Plan111[Milestones/dependencies from Board, adjusted by current sources.]112113### Docs Sync114[Claimed-work documentation sync checks from Related Docs; list only paths/status by default, and note stale or invalid entries.]115116### Ideas Backlog117[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`).]118119### Memory Audit120[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.]121122### Board Mismatch123[Only if mismatches were found.]124125### Recommended Start126[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.127128Decision logic: evaluate in order, pick the first match.1291. Active Spectra change has unfinished executable tasks AND is listed as an unfinished row in `## Active Work`: recommend `/spectra-apply <change>` to resume.1302. 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>`.1313. Parked Spectra change is the next Board item: recommend `/session-claim <change>`.1324. Phase Plan names a planned change that does not exist in Spectra: recommend `/spectra-propose <change>`.1335. Phase Plan or Open Questions show unclear requirements: recommend `/spectra-discuss`.1346. No Spectra change exists but Board has Remaining items: recommend `/session-claim <highest-priority-remaining-item>`.1357. 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).1368. Board is clean and git is clean: recommend `no queued work`.137138Decision source priority: Phase Plan order > Board Active/Remaining > Spectra CLI status > git state.139140若建議涉及 git 操作(push、merge、reset 等),其前提條件(branch、ahead/behind、dirty state)必須來自本次收集的 `git status` 輸出,不得引用 handoff 所記載的數字。]141```142143After producing the briefing, wait for user instructions. Do not start implementation automatically.144145146147