/tstack:software-engineering-guidelinesfrom tstack
The core of tstack and the guidelines for any software change. It names which tstack skill to use at each point of the work, gives the step list for each kind of task, and owns the rules the other skills share. This skill MUST be loaded before planning, designing, writing or changing code, reviewing, testing, shipping, or creating a Git commit (including a standalone commit request), and MUST NOT be skipped because the change is a one-liner. Triggers on: 寫 code, 改 code, 做功能, 修 bug, refactor, 重構, 開發, 實作, 寫程式, 架構設計, 需求釐清, code review, 測試, commit, init, 初始化專案, 建立 AGENTS.md, 建立 CLAUDE.md
Ships in tstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
tstack is installed as a whole. At each point of the work in this table, load the named skill; do not work from memory of what it says.
| When | Use |
|---|---|
| Starting work in a project without its memory in context; when the work wraps up or something costly was learned; the user states a preference for every project; a fact about this machine or a remote host was found; before working on a remote host | project-memory |
| A feature needs a specification; architecture, module boundaries or the split into tickets is undecided; a requirement changes in work that has a specification; work on a ticket starts or finishes | eng-architect |
| A failure whose cause is unknown, a red CI pipeline, the same error a second time, or an expected result that never appeared | investigate |
| Code changed and not yet verified; before pushing; before calling something fixed or done | test-and-fix |
| Substantial or high-risk code is about to be handed back or opened as a PR or MR; code changed after its review; the user hands over a diff | diff-review, which covers security-relevant changes following security-scan and changed screens following ui-review |
| A review of built screens is requested on its own | ui-review |
| The user asks what a change could break elsewhere | diff-review, with its blast-radius check |
| Substantial work is about to be reported as done or handed back; the user asks whether the result meets the request | acceptance-review |
| A security scan or hardening of the project is requested | security-scan |
| Pushing, opening or updating a PR or MR, merging | ship-it |
The project keeps engineering documents in an older layout, its CLAUDE.md or AGENTS.md holds more than the core allows, its memory holds lessons that hold on any machine, or the user asks to migrate or tidy any of these | migrate-engineering-docs |
| The same kind of mistake happened a second time; the user asks to turn a rule into a check | prevent-recurrence |
| Dispatching a subagent or another CLI; changing an existing API's name, signature, usage or behavior | agent-delegation |
Every task follows a playbook: an ordered list of steps for that kind of task. At the start of a task, open references/playbooks.md, pick the one that matches (Feature, Bug fix, Refactoring, Investigation or Small change), and copy its steps into the task list word for word. A step that does not apply stays in the list as skip: <reason>.
Read the reference named under each principle at the point it describes.
Verify what you can. Make material assumptions and tradeoffs clear.
Before designing anything larger than a single-location change, read references/design.md.
Simple, correct implementations for the full agreed requirements. Nothing speculative.
If a senior engineer would call it overcomplicated, simplify.
Touch everything the task needs and nothing else. Clean up only your own mess.
Every changed line traces directly to the user's request.
Read references/changing-code.md before any of these: fixing a fault; scripting a change, or overwriting, restoring or discarding a file; recording a follow-up; creating a repository or its .gitattributes; writing documents, rules, prompts or skills; creating or editing AGENTS.md or CLAUDE.md.
Choose verification that demonstrates the change works and matches its impact.
Read references/testing.md when choosing the timing of tests for a small fix, before refactoring, and before editing skills, prompts or agent workflows.
Define success criteria. Use observed progress to choose each next step.
Before filling in logic for a new project, feature, or fix, write a skeleton that fixes the scope:
Fill the slots until their checks and the acceptance flows pass. Decide, slot by slot, who fills it, by the amount of work:
A requested action brings its counterparts with it. For each feature, go through: create, edit and delete; the reverse of every action (add and remove, increase and decrease, lock and unlock); ordering; the settings or entry point from which it is reached; where its data is stored; import and export; the edit history. Each one is either in scope or named as out of scope.
Every bug fix has a regression test. It reproduces the original failure under its triggering conditions, fails on the pre-fix code, passes with the fix, and asserts observable behavior rather than private implementation details. The test-first requirements in references/testing.md decide whether it is written before or after the fix. When reproduction is intermittent or the required environment is unavailable, report that limit and what remains unverified instead of claiming a proven fix.
The agent that produced a piece of work does not review it. When this conversation wrote or changed any part of what is under review, whether code, screens or a fix, the review is carried out by a reviewer in a separate context, dispatched through agent-delegation.
The exception is a small, low-risk change of its own: a few lines that are easy to revert, that change no shared contract, and that touch nothing the review skills treat as high-impact or security-relevant. When in doubt, it is not small. The main conversation does every review that applies to such a change itself, lightly, dispatches no one, and says in its report that it did.
diff-review, security-scan, ui-review and acceptance-review report with this format and scale, so their results merge into one list.
A finding is confirmed only when code or observed behavior shows a concrete failure scenario. Each confirmed finding names its evidence: ran: with the command and what it printed, seen: with the screen and state that was looked at, or read: with the lines that show it. Run the failure whenever that is possible within what the reviewer may do: an existing test or command, or a throwaway script kept in a temporary directory outside the project. A finding that could have been run that way and was only read is reported as needing investigation. When it cannot be run, read: confirms it only if the lines leave no doubt. A concern backed by evidence but missing a decisive fact is reported as needing investigation, with the missing fact and how to verify it. Speculation and style preferences are not findings.
| Level | Meaning |
|---|---|
| P0 | Must be fixed before merging or release: a security breach, data loss, an outage, or a main flow that cannot be completed |
| P1 | Serious: incorrect behavior, a major regression, or exposure of other users' data is likely. Normally fixed before merging |
| P2 | Moderate and localized. Actionable; may be scheduled after merging when the risk is accepted |
| P3 | Minor: small impact, or it needs several unlikely conditions together |
Each review skill adds the criteria for assigning these levels in its own domain.
[P0-P3] [CONFIRMED] location - trigger, impact, description, recommended action - ran: | seen: | read: evidence
[NEEDS INVESTIGATION] location - observed evidence, possible failure, missing fact, verification step
location is a file and line, or a screen and state for rendered UI. An item that needs investigation describes its impact conditionally and carries no level. List confirmed findings from P0 to P3, then the items needing investigation.
git add -A, git add ., git add --all, git commit -a and git commit -am are not used, including in a fresh repository. The one exception is git add --renormalize . when a .gitattributes is introduced, which rewrites only files that are already tracked. Leave out build output, caches, operating-system metadata files and binaries the task did not ask for. List what is left out of the commit and why; do not silently stash, discard or include unrelated changes.Specifications, the architecture record, decision records and tickets that a skill writes into a project are engineering documents: they serve the people and agents developing the project, not its users. This applies to eng-architect, which writes them, and to diff-review, security-scan, ui-review and acceptance-review, whose findings feed them.
engineering/ at the project root. docs/ is for documentation written for the project's users; do not write engineering documents there.engineering/handoff.md when it has no ticket.engineering/reports/ only when the user asks to keep it.Before creating engineering/ or writing a document into it, read references/engineering-documents.md for the layout, the index file and the writing rules.
Only what the work needs enters the conversation.
tail or head alone: the pipe replaces the command's exit status, and what it cuts off is gone.rg when it is on PATH, otherwise git grep inside a Git repository, otherwise grep -rn. Do not install a search tool for this; one of the three is always present.Never print the value of a secret, token, password, key or sensitive setting: not in replies, reports, commands, command output that can be avoided, delegation prompts, logs or commits. Refer to it by key name and location.
End every turn of any ongoing task with a progress bar tied to the original goal: completed/total agreed items, current work, and what remains before completion. Use the existing plan or checklist and identify primary flows that are still unimplemented or unverified. Count only verified work that meets the agreed acceptance and delivery conditions; show pending acceptance separately.
Keep the scope and denominator stable unless the user changes them. If the total is unknown, show milestones without inventing a percentage or finish date. Item completion is not a time estimate; 100% requires the original goal and all delivery conditions to be met.
Every time the main conversation stops, also state on its own line what is still running or being waited on, whether or not a task is ongoing:
Check the actual state before writing this line; do not infer it from what was started earlier.
| When | Read |
|---|---|
| Starting any task | references/playbooks.md |
| Designing anything larger than a single-location change | references/design.md |
Fixing a fault; scripting a change; recording a follow-up; a new repository or .gitattributes; writing documents, rules, prompts or skills; touching AGENTS.md or CLAUDE.md | references/changing-code.md |
| Choosing test timing, refactoring, editing skills or prompts | references/testing.md |
| A second attempt at something that failed; a series of experiments; handing work off, pausing it or resuming it | references/iterations.md |
Creating engineering/ or writing a document into it | references/engineering-documents.md |
| Writing a commit message | references/commit-messages.md |
| Designing or changing a CLI, an MCP tool or an API | references/tool-discoverability.md |
| Creating or modifying Docker Compose files | references/docker-compose.md |
skip with a reason.references/changing-code.md (opens in a new tab)references/commit-messages.md (opens in a new tab)references/design.md (opens in a new tab)references/docker-compose.md (opens in a new tab)references/engineering-documents.md (opens in a new tab)references/follow-ups-example.md (opens in a new tab)references/iterations.md (opens in a new tab)references/playbooks.md (opens in a new tab)references/testing.md (opens in a new tab)references/tool-discoverability.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/acceptance-reviewCheck finished work against what was originally asked: every requirement is matched to a result that was actually exercised, and the original problem is shown to be solved. This skill MUST be used before reporting substantial work as done or handing it back, and when the user asks whether the result meets the request. Work this conversation produced MUST be checked by an independent reviewer who is not given the implementer's summary. It MUST NOT be used outside software engineering work, and MUST NOT replace diff-review, security-scan or test-and-fix. Triggers on: 驗收、有沒有做到、有沒有符合需求、有沒有解決問題、做完了嗎、acceptance review/agent-delegationRules and script for handing work to a subagent or another CLI (OpenCode, Antigravity, Copilot, Codex, Claude). This skill MUST be loaded before dispatching any subagent or CLI, even for a small task, and before changing an existing API's name, signature, usage or behavior. New delegation MUST go through scripts/dispatch.py and its task-local levels, and MUST NOT skip tools based on earlier turns. It MUST NOT be applied to work that is not software engineering. A main agent MUST NOT dispatch through its own CLI. A dispatched worker MUST NOT apply this skill or delegate further. Triggers on: subagent、派工、分工、antigravity、agy、opencode、copilot、codex、誰來寫、用哪個模型、介面變更Other plugins' skills for the same job
npx claudepluginhub timlai666/tstack --plugin tstack