record-session

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
[!] Prerequisite: This command should only be used AFTER the human has tested and committed the code.
AI must NOT execute git commit - only read history (
git log
,
git status
,
git diff
).

[!] 前置要求:此命令仅应在人工测试并提交代码后使用。
AI不得执行git commit操作 - 仅可读取历史记录(
git log
git status
git diff
)。

Record Work Progress (Simplified - Only 2 Steps)

记录工作进度(简化版 - 仅2步)

Step 1: Get Context

步骤1:获取上下文

bash
python3 ./.trellis/scripts/get_context.py
bash
python3 ./.trellis/scripts/get_context.py

Step 2: One-Click Add Session

步骤2:一键添加会话

bash
undefined
bash
undefined

Method 1: Simple parameters

方法1:简单参数

python3 ./.trellis/scripts/add_session.py
--title "Session Title"
--commit "hash1,hash2"
--summary "Brief summary of what was done"
python3 ./.trellis/scripts/add_session.py
--title "Session Title"
--commit "hash1,hash2"
--summary "Brief summary of what was done"

Method 2: Pass detailed content via stdin

方法2:通过标准输入传递详细内容

cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --stdin --title "Title" --commit "hash"
FeatureDescription
New APIAdded user authentication endpoint
FrontendUpdated login form
Updated Files:
  • packages/api/modules/auth/router.ts
  • apps/web/modules/auth/components/login-form.tsx
    EOF

**Auto-completes**:
- [OK] Appends session to journal-N.md
- [OK] Auto-detects line count, creates new file if >2000 lines
- [OK] Updates index.md (Total Sessions +1, Last Active, line stats, history)

---
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --stdin --title "Title" --commit "hash"
FeatureDescription
New APIAdded user authentication endpoint
FrontendUpdated login form
Updated Files:
  • packages/api/modules/auth/router.ts
  • apps/web/modules/auth/components/login-form.tsx
    EOF

**自动完成操作**:
- [OK] 将会话追加至journal-N.md
- [OK] 自动检测行数,若超过2000行则创建新文件
- [OK] 更新index.md(会话总数+1、最后活跃时间、行数统计、历史记录)

---

Archive Completed Task (if any)

归档已完成任务(如有)

Archive tasks whose work is actually done — judge by work status, not the
status
field in task.json:
  • Code committed? → Archive it (don't wait for PR)
  • All acceptance criteria met? → Archive it
  • Don't skip archiving just because
    status
    still says
    planning
    or
    in_progress
bash
python3 ./.trellis/scripts/task.py archive <task-name>

归档实际已完成的任务——根据工作状态判断,而非task.json中的
status
字段:
  • 代码已提交?→ 归档(无需等待PR)
  • 所有验收标准已满足?→ 归档
  • 不要仅因
    status
    仍显示
    planning
    in_progress
    就跳过归档
bash
python3 ./.trellis/scripts/task.py archive <task-name>

Script Command Reference

脚本命令参考

CommandPurpose
python3 ./.trellis/scripts/get_context.py
Get all context info
python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."
One-click add session (recommended)
python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>]
Create new task directory
python3 ./.trellis/scripts/task.py archive <name>
Archive completed task
python3 ./.trellis/scripts/task.py list
List active tasks
命令用途
python3 ./.trellis/scripts/get_context.py
获取所有上下文信息
python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."
一键添加会话(推荐)
python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>]
创建新任务目录
python3 ./.trellis/scripts/task.py archive <name>
归档已完成任务
python3 ./.trellis/scripts/task.py list
列出活跃任务