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 loggit statusgit diff[!] 前置要求:此命令仅应在人工测试并提交代码后使用。
AI不得执行git commit操作 - 仅可读取历史记录(、、)。
git loggit statusgit diffRecord Work Progress (Simplified - Only 2 Steps)
记录工作进度(简化版 - 仅2步)
Step 1: Get Context
步骤1:获取上下文
bash
python3 ./.trellis/scripts/get_context.pybash
python3 ./.trellis/scripts/get_context.pyStep 2: One-Click Add Session
步骤2:一键添加会话
bash
undefinedbash
undefinedMethod 1: Simple parameters
方法1:简单参数
python3 ./.trellis/scripts/add_session.py
--title "Session Title"
--commit "hash1,hash2"
--summary "Brief summary of what was done"
--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"
--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"
| Feature | Description |
|---|---|
| New API | Added user authentication endpoint |
| Frontend | Updated login form |
Updated Files:
packages/api/modules/auth/router.ts- EOF
apps/web/modules/auth/components/login-form.tsx
**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"
| Feature | Description |
|---|---|
| New API | Added user authentication endpoint |
| Frontend | Updated login form |
Updated Files:
packages/api/modules/auth/router.ts- EOF
apps/web/modules/auth/components/login-form.tsx
**自动完成操作**:
- [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 field in task.json:
status- Code committed? → Archive it (don't wait for PR)
- All acceptance criteria met? → Archive it
- Don't skip archiving just because still says
statusorplanningin_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
脚本命令参考
| Command | Purpose |
|---|---|
| Get all context info |
| One-click add session (recommended) |
| Create new task directory |
| Archive completed task |
| List active tasks |
| 命令 | 用途 |
|---|---|
| 获取所有上下文信息 |
| 一键添加会话(推荐) |
| 创建新任务目录 |
| 归档已完成任务 |
| 列出活跃任务 |