Agent Skillsmindfold-ai/Trellis › trellis-finish-work

trellis-finish-work

GitHub

用于结束编码会话,检查代码状态并分类脏路径,归档已完成任务,记录会话进度到开发者日志。确保在提交前清理上下文,不执行git commit操作。

.agents/skills/trellis-finish-work/SKILL.md mindfold-ai/Trellis

Trigger Scenarios

用户完成编码准备结束会话时 需要归档当前或额外完成任务时

Install

npx skills add mindfold-ai/Trellis --skill trellis-finish-work -g -y
More Options

Non-standard path

npx skills add https://github.com/mindfold-ai/Trellis/tree/main/.agents/skills/trellis-finish-work -g -y

Use without installing

npx skills use mindfold-ai/Trellis@trellis-finish-work

指定 Agent (Claude Code)

npx skills add mindfold-ai/Trellis --skill trellis-finish-work -a claude-code -g -y

安装 repo 全部 skill

npx skills add mindfold-ai/Trellis --all -g -y

预览 repo 内 skill

npx skills add mindfold-ai/Trellis --list

SKILL.md

Frontmatter
{
    "name": "trellis-finish-work",
    "description": "Wrap up the current session: verify quality gate passed, remind user to commit, archive completed tasks, and record session progress to the developer journal. Use when done coding and ready to end the session."
}

Finish Work

Wrap up the current session: archive the active task (and any other completed-but-unarchived tasks the user wants to clean up) and record the session journal. Code commits are NOT done here — those happen in workflow Phase 3.4 before you invoke this command.

Step 1: Survey current state

python3 ./.trellis/scripts/get_context.py --mode record

This prints:

  • My active tasks — review whether any besides the current one are actually done (code merged, AC met) and should be archived this round.
  • Git status — quick visual on what's dirty.
  • Recent commits — you'll need their hashes in Step 4 for --commit.

If --mode record surfaces other completed tasks not tied to the current session, surface them to the user with a one-shot confirmation: "These N tasks look done — archive them too in this round? [y/N]". Default is no; the current active task is always archived in Step 3 regardless.

Step 2: Sanity check — classify dirty paths

Run:

git status --porcelain

Filter out paths under .trellis/workspace/ and .trellis/tasks/ — those are managed by add_session.py and task.py archive auto-commits and will appear dirty as part of this skill's own work.

For each remaining dirty path, decide whether it belongs to the current task or to other parallel work (e.g., another terminal window editing the same repo). Heuristics:

  • Paths referenced in the current task's prd.md / implement.jsonl / check.jsonl → current task
  • Paths in code areas matching the task's stated scope, or that you remember editing this session → current task
  • Paths in unrelated areas you have no recollection of touching this session → other parallel work

Then route:

  • Any remaining path looks like current-task work — bail out with:

    "Working tree has uncommitted code changes from this task: <list>. Return to workflow Phase 3.4 to commit them before running ``finish-work (Trellis command)."

    Do NOT run git commit here. Do NOT prompt the user to commit. The user goes back to Phase 3.4 and the AI drives the batched commit there.

  • All remaining paths look unrelated (other parallel-window work) — report them once and continue to Step 3:

    "FYI, dirty files outside this task's scope — leaving them for the other window: <list>."

  • Genuinely unsure — ask the user once: "Are <list> this task's work I forgot to commit, or another window's? (commit / ignore)" — then route per their answer.

Step 3: Archive task(s)

python3 ./.trellis/scripts/task.py archive <task-name>

At minimum: the current active task (if any). Plus any extra tasks the user confirmed in Step 1. Each archive produces a chore(task): archive ... commit via the script's auto-commit.

If there is no active task and the user did not confirm any cleanup archives, skip this step.

Step 4: Record session journal

python3 ./.trellis/scripts/add_session.py \
  --title "Session Title" \
  --commit "hash1,hash2" \
  --summary "Brief summary"

Use the work-commit hashes produced in Phase 3.4 (visible in Step 1's Recent commits list, or via git log --oneline) for --commit. Do not include the archive commit hashes from Step 3. This produces a chore: record journal commit.

Final git log order: <work commits from 3.4>chore(task): archive ... (one or more) → chore: record journal.

Version History

  • 0e0f1f6 Current 2026-08-20 08:08

Same Skill Collection

.agents/skills/python-design/SKILL.md
.agents/skills/trellis-before-dev/SKILL.md
.agents/skills/trellis-brainstorm/SKILL.md
.agents/skills/trellis-break-loop/SKILL.md
.agents/skills/trellis-channel/SKILL.md
.agents/skills/trellis-check/SKILL.md
.agents/skills/trellis-continue/SKILL.md
.agents/skills/trellis-spec-bootstrap/SKILL.md
.agents/skills/trellis-start/SKILL.md
.agents/skills/trellis-update-spec/SKILL.md
.claude/skills/gitnexus/gitnexus-cli/SKILL.md
.claude/skills/gitnexus/gitnexus-debugging/SKILL.md
.claude/skills/gitnexus/gitnexus-exploring/SKILL.md
.claude/skills/gitnexus/gitnexus-guide/SKILL.md
.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md
.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md
.claude/skills/python-design/SKILL.md
.claude/skills/trellis-before-dev/SKILL.md
.claude/skills/trellis-brainstorm/SKILL.md
.claude/skills/trellis-break-loop/SKILL.md
.claude/skills/trellis-channel/SKILL.md
.claude/skills/trellis-check/SKILL.md
.claude/skills/trellis-spec-bootstrap/SKILL.md
.claude/skills/trellis-update-spec/SKILL.md
.codex/skills/create-manifest/SKILL.md
.cursor/skills/trellis-before-dev/SKILL.md
.cursor/skills/trellis-brainstorm/SKILL.md
.cursor/skills/trellis-break-loop/SKILL.md
.cursor/skills/trellis-channel/SKILL.md
.cursor/skills/trellis-check/SKILL.md
.cursor/skills/trellis-spec-bootstrap/SKILL.md
.cursor/skills/trellis-update-spec/SKILL.md
.omp/skills/trellis-before-dev/SKILL.md
.omp/skills/trellis-brainstorm/SKILL.md
.omp/skills/trellis-break-loop/SKILL.md
.omp/skills/trellis-check/SKILL.md
.omp/skills/trellis-spec-bootstrap/SKILL.md
.omp/skills/trellis-update-spec/SKILL.md
.opencode/skills/trellis-before-dev/SKILL.md
.opencode/skills/trellis-brainstorm/SKILL.md
.opencode/skills/trellis-break-loop/SKILL.md
.opencode/skills/trellis-channel/SKILL.md
.opencode/skills/trellis-check/SKILL.md
.opencode/skills/trellis-spec-bootstrap/SKILL.md
.opencode/skills/trellis-update-spec/SKILL.md
.pi/skills/trellis-before-dev/SKILL.md
.pi/skills/trellis-brainstorm/SKILL.md
.pi/skills/trellis-break-loop/SKILL.md
.pi/skills/trellis-channel/SKILL.md

Metadata

Files
0
Version
0e0f1f6
Hash
161060fb
Indexed
2026-08-20 08:08

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-24 22:38
浙ICP备14020137号-1 $방문자$