Files
skills/dev/dev-workflow/SKILL.md
T

78 lines
3.6 KiB
Markdown

---
name: dev-workflow
description: Personal development workflow for software projects. Use from the first discussion of new work through implementation, review, and MR — when the user describes something to build or fix ("we need X", "wir brauchen X"), says "workflow" or "implement", or when creating the issue/branch/worktree/MR chain. Assumes pi-web subsessions and one worktree per feature.
---
# Dev Workflow
My personal workflow for software projects. Assumes pi-web (subsession tools
available). Without them, implement and review in the main session and say so.
Core idea: the main chat plans and discusses; implementation and review run in
tracked subsessions; every feature lives in its own git worktree so several
features can run in parallel without branches fighting over one checkout.
## 1. Plan and approve
Discuss the task until there is an implementation plan: summary plus discrete
steps. **Wait for explicit approval** (`go`, `approved`, `start`) before
creating anything.
## 2. Issue
Follow the project's AGENTS.md for branches, commits, and MRs. Without project
rules: branch off the integration branch (e.g. `development`), never off main.
- Create a GitLab issue containing the plan (English), normal human title.
- Note the IID; everything below derives its name from it.
## 3. Worktree (one per feature)
Worktrees let several features run in parallel; plain branch switching cannot.
- Check for an existing worktree for this IID (`git worktree list`). Reuse it
if present; do not create duplicates.
- Otherwise, from the main checkout (which stays on the integration branch):
`git worktree add ../<repo>-<slug> -b <type>/<IID>-<slug>`
e.g. `git worktree add ../ai-cowork-mode-routing -b feature/105-mode-model-routing`.
- The main checkout is never the implementation target while a worktree exists.
- Node projects: install dependencies in the fresh worktree once before
implementing (follow the project's AGENTS.md toolchain notes).
## 4. Implementation (tracked subsession in the worktree)
Spawn ONE subsession with `cwd` set to the worktree path. Task text: approved
plan, issue IID, branch name, "read AGENTS.md first", and: "Activate ponytail
full mode: read /home/markus/.pi/agent/git/github.com/DietrichGebert/ponytail/skills/ponytail/SKILL.md
and follow it. Where AGENTS.md demands more (e.g. TDD), AGENTS.md wins over
ponytail minimality." Stay responsive in
the main chat; the user watches and steers the subsession directly in pi-web.
At the join point call `yield_to_subsessions`, then verify the commits
(`git log`) before moving on.
## 5. Review (fresh context, separate subsession, same worktree)
Spawn a SECOND subsession with the same `cwd` — never reuse the implementation
child. Task text: diff range (`git diff <base>...HEAD`), issue reference, and:
"Read /home/markus/workspace/skills/dev/code-review/SKILL.md and follow it."
(Explicit paths make skill loading deterministic; the catalog is available
to the child, but self-loading is not reliable.) The reviewer reports findings
and fixes nothing.
## 6. Iterate, merge, clean up
- Fix findings as NEW commits (never amend/force-push a pushed branch).
- Substantial findings: another fresh review pass.
- Create the MR (English title/description), inform the user, then watch the
pipeline (gitlab_pipeline_status, job logs) and fix failures as new commits.
- After the MR merges: `git worktree remove ../<repo>-<slug>` and delete the
branch, unless the user wants it kept for follow-up work.
## 7. Long work
Work spanning multiple sessions: track it in goal-state.yaml (goal-state skill).
## Language
Plans, issues, commits, MR descriptions: English. Discussion: any language.