Catalogue / dev-workflow
dev-workflow
MITSignedLoki 的開發流程標準: 從需求到發版一條鏈(Issues 當 backlog、Milestone 當 sprint、Conventional Commits PR、Release Please 發版),加上共用 clone、sandbox、疊 PR 與新服務的工作規則. Use when committing or opening a PR, starting a new service, planning issues or sprints, or cutting a release. Triggers on 'backlog', 'sprint', 'github issue', 'm…--- name: dev-workflow description: "Loki 的開發流程標準: 從需求到發版一條鏈(Issues 當 backlog、Milestone 當 sprint、Conventional Commits PR、Release Please 發版),加上共用 clone、sandbox、疊 PR 與新服務的工作規則. Use when committing or opening a PR, starting a new service, planning issues or sprints, or cutting a release. Triggers on 'backlog', 'sprint', 'github issue', 'milestone', '開 issue', 'release', '發版', '版本號', 'changelog', 'conventional commits', 'semver', 'worktree', 'commit', '疊 PR', 'stacked PR', 'claim', 'reset --hard', '新服務', 'OTel'. NOT 專案文件 / runbook 寫法,那是 project-docs." ---
dev-workflow: one path from idea to release
Every repo runs the same chain. Each link has one home, and the next link reads from it:
issue (backlog) → milestone (sprint) → branch → PR "Closes #n" → squash merge → release PR → tag
| Link | Standard | Read | |---|---|---| | Backlog, sprints, board, definition of done | GitHub Issues + Milestones + Projects | references/backlog.md | | Branch, PR, merge | ship loop in CLAUDE.md; PR title and Closes #n in backlog.md | references/backlog.md | | Versions, changelog, tags, release artifacts | SemVer + Conventional Commits + Release Please | references/release.md |
Read only the reference the task needs. Both use templates from ${CLAUDE_SKILL_DIR}/assets/.
Which reference
| Task | Read | |---|---| | Turn a goal or a zyx:planner work-list into issues | backlog.md | | Plan, run, or close a sprint; a report needs Scrum evidence | backlog.md | | Set up a new repo | backlog.md §set up, then release.md §apply | | Wire releases into a repo, or audit its versioning | release.md | | Cut a release, hotfix, or go to 1.0.0 | release.md §cut a release |
Rules that span both references
- The issue label type, the branch prefix, and the PR title type are the same
word (feat issue → feat/<slug> → feat: ...). The PR title decides the version bump, and the label is where that word is chosen, so a mislabeled issue tends to ship as the wrong release. ci, build and revert have no issue label; they are PR-only types for work that needs no issue.
- An unplanned change still gets an issue before its PR, except a typo-level
docs: or chore: fix.
- Stack house styles (
nextjs-dev, and others later) sit on top of this chain.
They decide how the code looks, not how the work flows.
Working rules
Each rule came from a real correction.
Shared clones
- An iCloud clone is shared by every session. Before editing, run
git worktree add <scratchpad>/wt-<name> <branch> and work there. Open the PR with --head <branch>.
- Stage only the paths you changed. Never
git add -Aor a whole directory.
Before committing, run git diff --cached --name-only and drop any file you did not change.
- Read a SHA to pin from GitHub:
gh api repos/<owner>/<repo>/commits/main --jq .sha.
Never read it from the local HEAD.
- When a
git checkoutfails in a chain of commands, stop the chain. - On the sandbox, run
claim <org>/<repo> <session>before touching
~/p/<org>/<repo>/main/, and use the directory it prints.
- Never put a destructive command (
reset --hard,checkout -- .,
clean -fd) on the same line as the check before it. Read the output first. With uncommitted changes, commit them to a WIP branch or switch directory.
Pull requests and releases
- Stacked PRs: squash-merge the lower PR without
--delete-branch, run
gh pr edit <next> --base main, then delete the lower branch. Deleting it first closes the next PR, and a closed PR cannot change its base. Rebase the next PR with git rebase --onto origin/main <old lower head>.
- A release PR merges like any other PR once its checks pass. Do not ask.
Then confirm the tag, the GitHub release and the image tags.
- A PR opened by
GITHUB_TOKENleavespull_requestruns in
action_required. Approve the run with gh api -X POST repos/<owner>/<repo>/actions/runs/<run_id>/approve. Never merge with --admin.
- In Loki's own
zyx1121repos, rename and change interfaces freely, even in
public repos. Mark the break with SemVer (0.x bumps minor) and write the migration in the PR. Shared lab, course and client repos keep compatibility.
New services
- Wire observability in the first PR, not after an incident. Read the standard
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS and OTEL_SERVICE_NAME, and stay off when they are unset. Log external calls, each workflow step, decisions and failure causes. Send counts and ids, never secrets or user content.
- Personal projects send to sensorium-zyx, lab services to sensorium-winlab.
Run list_projects before you register, because the same name rotates the key.
- Verification includes finding the data in sensorium.
- Default a new backend to TypeScript (Bun) or Go. When Python is the only
option, name the ecosystem need and its cost first, and let Loki decide.
Assets
| File | Use | Reference | |---|---|---| | labels.sh | house labels: type, priority, size, blocked | backlog.md | | ISSUE_TEMPLATE/ | story and bug forms; blank issues off | backlog.md | | pull_request_template.md | Closes # line and verification section | backlog.md | | release-please-config.<stack>.json | node, rust, rust-workspace, python, tauri, generic | release.md | | release-please.yml | the release workflow, one commented build hook per stack | release.md | | pr-title.yml | conventional PR title check | release.md | | CHANGELOG.seed.md | Keep a Changelog header | release.md | | check-versions.ts | multi-manifest agreement guard, tauri only | release.md |
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 5.8 kB | 6d967130201a |
| SKILVAULT_SOURCE.json | 3.1 kB | 8b3432c8cd19 |
| THIRD_PARTY_NOTICES.md | 1.1 kB | a85d35ae9ee1 |
| assets/CHANGELOG.seed.md | 478 B | b9fcd315588b |
| assets/ISSUE_TEMPLATE/bug.yml | 724 B | addd3309bf77 |
| assets/ISSUE_TEMPLATE/config.yml | 28 B | 1f103c6a9dd0 |
| assets/ISSUE_TEMPLATE/story.yml | 733 B | 4c75ffdbba71 |
| assets/check-versions.ts | 2.6 kB | 399b3f1b341f |
| assets/labels.sh | 1.8 kB | 31c305ff5436 |
| assets/pr-title.yml | 1.8 kB | 2fa45d8b08de |
| assets/pull_request_template.md | 124 B | 1d6303b7b691 |
| assets/release-please-config.generic.json | 1.1 kB | 560526185349 |
| assets/release-please-config.node.json | 973 B | ffc7ee1d3c7a |
| assets/release-please-config.python.json | 1.1 kB | cb1194a5af82 |
| assets/release-please-config.rust-workspace.json | 1.3 kB | e409802c3893 |
| assets/release-please-config.rust.json | 973 B | b764fcab3b97 |
| assets/release-please-config.tauri.json | 1.4 kB | 264334df8933 |
| assets/release-please.yml | 6.3 kB | 9cff5eb340ad |
| references/backlog.md | 6.4 kB | 811a3053d368 |
| references/release.md | 9.8 kB | 90a85d75d2c7 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | c7b7e0de8f16 | 29 Nov 2026 |
Locking a skill to one version needs Pro.