spec-apply
Use when an apply-ready change is about to become code: implementing a proposal, working through a change's tasks, or starting to code a planned change. Triggers: apply this spec, implement the proposal, work through the tasks, start coding this change, build what we specced. Writing or revising the plan is spec-propose.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- spec-apply
- description
- Use when an apply-ready change is about to become code: implementing a proposal, working through a change's tasks, or starting to code a planned change. Triggers: apply this spec, implement the proposal, work through the tasks, start coding this change, build what we specced. Writing or revising the plan is spec-propose.
03 SKILL.md 正文
Spec apply
The plan is written and the person said yes to it, so the question left is whether code and evidence both exist for each line of tasks.md. This is the build step of the qsm flow: it implements an apply-ready change line by line, smallest change, real run, for the person who reviews it against the spec. It stops the moment the plan stops being true. It does not rewrite the plan (spec-propose does) and adds nothing the spec did not ask for. Hand the code to an implementer, follow the language skill for the code, tick each line in tasks.md as it lands and nowhere else, and finish with the review agent, then the push.
Before the first edit
- Find the root.
openspec list --jsonmust work from a root that belongs to this repository. A nested repository resolves to the ancestor's root and reads someone else's change. No root of its own: stop, offeropenspec init --tools none. - Name the change. Unnamed or ambiguous: ask from the
openspec list --jsonoutput. Guessing costs a whole implementation. - Refuse a draft.
openspec status --change <id> --jsonmust show every required artifact done, and the proposal's## Critiquesfixed or waived. A draft implemented is a draft shipped. - Read before coding.
openspec instructions apply --change <id> --jsonlists the files: tasks.md is the order, delta specs the acceptance, design the why. - Claim the change's task in the task tool, the one bound with
openspec:<change-id>. It is claimed once; its lines are in tasks.md and never become tasks.
Work inline. Subagents only for disjoint, fully decided tasks (the subagents skill).
Per line of tasks.md
- Smallest change that does the task. Structure and behaviour never share a step.
- Run the delta spec's scenario the way the user meets it and read the output. A test only for logic the real run cannot reach.
- Run the line's own verification, then tick it in tasks.md. The tick is a claim the reviewer believes. Ticking never touches the task tool.
When the plan stops being true
- Fix and record: a bug blocking the line, a missing validation or auth check, a mechanical blocker (import, name). Nothing else is yours to decide.
- A default, threshold, ordering, conditional or schema field the spec did not name is not a quick fix. Its author calibrated it; your comment is not approval.
- A refuted assumption stops the code. Route the change through spec-propose, resume when
openspec validate <id> --strictis green. Silent deviation hides itself from review. - An out-of-scope idea becomes a task with a reason in the task tool, never code.
- Record every deviation. One that repeats is a gap in the spec.
Finishing
Merge delegated work in dependency order, run the full suite on the union (each branch was green
alone). Done is: all lines ticked, suite green, openspec validate <id> --strict green,
qsm-langdev check shows no regression. Then hand to the review agent, not to spec-archive: the
code was written by the reader who would approve it. Push after the review and received-findings;
archive comes after the push.
Red flags
- About to tick an unverified line: run it first.
- Changed a default and wrote a comment why: revert, route through spec-propose.
- Editing plan and code in one move: finish one, or the plan gets bent to fit the code.
- A subagent said it works: read its diff.
- Same failing check, fourth attempt, same evidence: stop and report.
Say it in the reply
Change id and task id, one line. Per line: ticked with its proof, or open with what is missing. One line per deviation. Last line: ready for the review agent, or the blocker.
04 同仓库更多 Skills
worktrunk
Use when working with git worktrees or wt (worktrunk): creating, switching, merging or removing a branch workspace, configuring wt (project or personal config, workflow hooks around switch, commit and merge, commit-message generation, hook approvals), or a wt command that failed. Triggers: make a worktree for this branch, wt merge, wt remove, configure wt, .config/wt.toml, run tests before merge, install deps when a worktree is created, wt hook, wt switch does not cd, nastav wt, wt nefunguje.
web-ladder
Use when a task needs something the internet holds: look something up, search the web, find which page answers a question, read a page, check a library's current docs, a page that needs a browser or shows a captcha. Runs one research loop: searxng search, keywords, cases, search again up to three times, Context7 for a library, Tavily when the keywords will not come, one page in a browser, the person on a wall. Triggers: look this up, search the web, find out online, read this page, check the docs, the page is blocked, captcha, najdi na webu, otevri tu stranku. A multi-round question goes to the qsm-web:web-research agent; one tool's commands are its own skill (searxng, browserbox, opensrc).
searxng
Use when running a web search through the person's own SearXNG instance with qsm-web searxng: choosing a search profile or engines, the instance, time range or language, reading its JSON, a suspended engine. Triggers: search with searxng, qsm-web searxng, search profile, niche search, academic search, IT search, vyhledavaci profil, searxng is down, which engines. The research loop around it is the web-ladder skill.
opensrc
Use when the source code of an open-source library or repository is needed on disk to read: the docs are silent, the behaviour must be checked in code, the version the project pins. Runs qsm-web opensrc get with a package spec or a repository address. Triggers: get the source of this package, clone this library, read the library's code, qsm-web opensrc, stahni zdrojak knihovny. Library docs are the Context7 skill; the research loop is the web-ladder skill.
browserbox
Use when one page needs a real browser through qsm-web browserbox: content built by script, a page that blocks plain fetching, a captcha to solve or hand to the person, a scripted sequence of clicks, a login the person is present for. Triggers: open it in a browser, the page is empty without JavaScript, captcha, take over the browser, run these steps on the page, log in to this site, browserbox. When to reach for a browser at all is the web-ladder skill.
usage
Use when the user wants a review of how they use Claude Code, or setup hands over after a first install: review my Claude Code usage, audit my setup, what does my setup cost, where did my tokens go, clean up my Claude Code, usage report, zkontroluj moje pouzivani. One walkthrough of four stages (machine, work, habits, extensions), questions after each, then one plan. A question about one topic (which hooks are slow) goes to that topic's skill; this session's tokens alone is `/qsm-usage`.