一键导入
session
Append a manual narrative entry to today's ecosystem session log. Activates when the user invokes /session or asks momentum to run the session recipe.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Append a manual narrative entry to today's ecosystem session log. Activates when the user invokes /session or asks momentum to run the session recipe.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Begin a new implementation phase. Activates when the user invokes /start-phase or asks momentum to run the start-phase recipe.
Work with concurrent workstreams (Rule 15). Activates when the session involves multiple active branches, cross-lane coordination, or when starting work that should not live on the current branch.
Record a new backlog item (bug, feature, tech debt, or enhancement) when you discover work that needs tracking. Activates when the session identifies unplanned work that should be tracked in the backlog.
Check spec structure health of the momentum project. Activates when the user runs `/validate`, asks for a health check, or when spec changes need verification before phase completion.
>-
Drive a single repo through its phase as part of a swarm. Activates when spawned by the conductor (the user's primary session) with a spawn directive. State lives in files; the conductor reads board.json between turns. Loads on the swarm-supervisor invocation only — not invoked directly by the user.
| name | session |
| description | Append a manual narrative entry to today's ecosystem session log. Activates when the user invokes /session or asks momentum to run the session recipe. |
Append a manual narrative entry to today's ecosystem session log.
The session log auto-fills with structural events (commits, PR
opens/merges) via the PostToolUse hook in each registered member repo.
Use /session log for narrative entries — decisions, problems hit,
checkpoint notes — that don't correspond to a tool event.
/session log "<message>"
Locate the ecosystem root via
core/ecosystem/lib/index.js → findRoot(process.cwd()).
If no ecosystem root exists, refuse with a clear message: "Not
inside an ecosystem. Run momentum ecosystem init first or cd
into a registered member repo."
Determine the calling member id (when relevant): match
realpath($PWD) against each manifest.members[].path. If no
match, write the entry with a [meta] tag instead.
Build the line:
HH:MMZ [<member-id-or-meta>] note: <message>
If today's session file doesn't exist yet, prepend a header:
# Session YYYY-MM-DD
Active initiative: <slug> (if .state/active-initiative is set)
Append the line to <ecosystem-root>/sessions/$(date -u +%F).md.
Update <ecosystem-root>/.state/last-session to today's date.
Print confirmation:
Logged: HH:MMZ [<member-id>] note: <message>
Use /session log for… | Auto-events already cover… |
|---|---|
| "Decided to defer X to Tier 2" | git commit (the actual change record) |
| "Discovered the SQL was dropping scope filter" | gh pr create/merge |
| "Bumped Y version pin in lock to address Z" | future: deploy events (Group 3 v2) |
| "Switching context from sapience to frontend" | future: hook-detected directory changes |
/session log is a thin wrapper around the same
core/ecosystem/scripts/session-append.sh helper used by the
PostToolUse hook. From bash:
$MOMENTUM_SCRIPTS/session-append.sh log "<message>" "<optional-context>"
/session log calls in the same minute produce multiple
lines. Concurrent writes (a /session log plus a git commit hook
in another member repo at the same instant) are serialized via a
per-session-file mkdir lock (Phase 10 / BUG-004). ~5s acquisition
budget; on timeout the event is dropped rather than risking
corruption.MOMENTUM_MAX_PARENT_WALK env var (default 5)..state/ is not —
to share session history across machines, push the ecosystem repo.