mit einem Klick
trellis-finish-work
// 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.
// 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.
Collaborative requirements discovery session optimized for AI coding workflows. Creates task directories, seeds PRDs, runs codebase research, proposes concrete implementation approaches with trade-offs, and converges on MVP scope through structured Q&A. Use when requirements are unclear, multiple implementation paths exist, trade-offs need evaluation, or a complex feature needs scoping before development.
Initializes an AI development session by reading workflow guides, developer identity, git status, active tasks, and project guidelines from .trellis/. Classifies incoming tasks and routes to brainstorm, direct edit, or task workflow. Use when beginning a new coding session, resuming work, starting a new task, or re-establishing project context.
Understand and customize the local Trellis architecture inside a user project. Use when modifying .trellis plus platform hooks, settings, agents, skills, commands, prompts, or workflows generated by trellis init.
Wrap up an active Trellis task: archive it (and any other completed-but-unarchived tasks the user wants to clean up) and record a session journal. Refuses to run if the working tree has uncommitted code changes (those belong in workflow Phase 3.4 first). Use when the user asks to finish / wrap up / call it a day, or invokes $finish-work.
Resume work on the current task. Loads the workflow Phase Index, figures out which phase/step to pick up at, then pulls the step-level detail via get_context.py --mode phase. Use when coming back to an in-progress task and you need to know what to do next.
Guides collaborative requirements discovery before implementation. Creates task directory, seeds PRD, asks high-value questions one at a time, researches technical choices, and converges on MVP scope. Use when requirements are unclear, there are multiple valid approaches, or the user describes a new feature or complex task.
| 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. |
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.
python3 ./.trellis/scripts/get_context.py --mode record
This prints:
--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.
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:
prd.md / implement.jsonl / check.jsonl → current taskThen 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.
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.
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.