AGENT SKILL

sub-bug

Record a bug that QA found in a story in review or accepted: find the step that let it through, make the sub-bug with its bug.md in the folder of the story, write its four answers, and stop at the owner's approve. Use when the owner or QA reports a bug in a built story. Not for old code or a new request: /intake.

License 许可
MIT
所属仓库
lamtran8401/nook
最近更新
2026-10-27
Stars
★ 0
Forks
0

01 前言 Front Matter

name
sub-bug
description
Record a bug that QA found in a story in review or accepted: find the step that let it through, make the sub-bug with its bug.md in the folder of the story, write its four answers, and stop at the owner's approve. Use when the owner or QA reports a bug in a built story. Not for old code or a new request: /intake.
allowed-tools
Bash(nook *), Bash(git status *), Bash(git diff *), Bash(git log *), Read, Glob, Grep, Edit, Write
argument-hint
<story id> <report or ticket key>
disable-model-invocation
true

03 SKILL.md 正文

Goal: a bug that QA found gets the step that let it through, its own fix with a test that fails first, and one row in its story. The first word of the arguments is the story; the other words are the report, or the key of a ticket of the bug, such as SHOP-31. With no story or no report, ask the owner with AskUserQuestion. Offer the two likeliest stories in reviewing or accepted as options, and name the others in the question.

The origin

Find the origin from the evidence, not from the words of the report. Read the spec, the plan and the tasks of the story, then the code.

origin   when                                                   what the sub-bug adds
build    a criterion of the story says it; the code misses it   a task that the story missed
spec     the ticket wants it; no criterion of the story says it  a criterion and its task
plan     the criteria are right; the approach is wrong           a part of the plan and its tasks
intent   the agent read the ticket in another way than the owner the reading of the ticket
outside  old code, or a new request                             no sub-bug: a new item

A label is optional. When docs/bug-labels.md exists, the label must be one of its - label lines, such as edge-case.

Order

  1. Run nook item show <story>. A sub-bug needs its story in reviewing or accepted; before that, a slice of the story fixes the bug.
  2. A ticket key: get the ticket onto disk and have it read in quarantine, as steps 2 and 3 of /intake say. The report is the title from the summary. Reproduce the bug as the craft find-cause says (nook craft find-cause). When it does not reproduce, report that to the owner and stop.
  3. Find the origin with the table above. Write one line of evidence: the criterion, the line of the plan, or the line of the ticket. For the origin outside, stop. Tell the owner that nook item new "<title>" --ticket makes a new item.
  4. Run nook item sub-bug <story> "<report>" --origin <origin>, with --label <label> when there is one, and --id <key> for a ticket of its own. The sub-bug is a fix of size S in framing. Its file is works/<story>/bugs/<id>.md, and the ## Sub-bugs table of the story gets its row.
  5. Write the four answers in that file, as /quick says for a fix: Why, Reproduce, Actual, the criteria under ## Expected, Fix, Impact, and T1 with the failing test. For the origin spec, the criterion that the story missed goes under ## Expected, with the line of the ticket as its source.
  6. Run nook item plan <id>, then nook item check <id>. Fix each gap, and check again until no gap is left.
  7. Show the file, the origin and its evidence. The owner confirms the origin at the approve. A different origin: nook item edit <id> origin <origin>.
  8. Report, and say: approve: type /gate approve <id>. Then stop. After the approve, /cook <id> builds the sub-bug on the branch of its story. After its accept, /pr <story> takes it to the PR of the story.

The report

Waits for you: approve: type /gate approve BUG-001
BUG-001, a sub-bug of SHOP-12: an empty page shows an error. Origin spec, label edge-case.
Evidence: the ticket asks for an empty state; no criterion of SHOP-12 names it.
File: works/SHOP-12/bugs/BUG-001.md. AC1: an empty page shows "No shipments". T1: the list test with no rows, which fails first.
Your turn:
  1. /gate approve BUG-001   start the build   (recommended)
  2. nook item edit BUG-001 origin <origin>   another origin

Gotchas

  • One cause is one sub-bug. Two reports with one cause go in one sub-bug; name both in its Why.
  • The story does not change: the sub-bug holds its criterion and its task. The row of the table is the one line in the story, and the CLI writes it.
  • The story closes only after each sub-bug is closed. A sub-bug for a later sprint leaves the story with nook item detach <id> --reason "<why>".
  • The model never starts /sub-bug: the owner types it.

04 同仓库更多 Skills

lamtran8401
lamtran8401/nook

yolo

Run an item alone from its state to the owner's accept: the lead runs the phases, records each guess, passes the plan gate with proceed, and stops at a stop rule. Use when the owner types /yolo with an id, a prompt, or nothing.

★ 0
lamtran8401
lamtran8401/nook

write-walkthrough

Write walkthrough.md, the explanation of finished work: what works now in plain words, the changed files, where to start reading, the key code, the met criteria, how to try it, the risks. It is the source of the Walkthrough tab of the web app. Use after /qa, or for a question about the code.

★ 0
lamtran8401
lamtran8401/nook

wiki-tidy

Find what is wrong in the wiki: broken links, pages with no index line, lines too near the code, stale epic pages, topics with no source, two pages on one topic, adjectives with no example. Fix the mechanical part after one yes; list the rest. Use when the owner says tidy the wiki, or after many pages changed.

★ 0
lamtran8401
lamtran8401/nook

wiki-merge

Merge related wiki pages into one complete page: the pages of the features of one process or epic become one page with the flow from end to end. The old pages move to the archive after the owner's yes, and their links point at the new page. Use when the owner says merge these pages, or when wiki-tidy finds pages on one topic.

★ 0
lamtran8401
lamtran8401/nook

wiki-ask

Answer a question from the wiki: the index first, then only the pages whose line matches, an answer in a few lines with a link to each page. Use when the owner asks what the wiki says, or asks why or how about a known topic. Not to add a page: wiki-add.

★ 0
lamtran8401
lamtran8401/nook

wiki-add

Keep the lesson of a source in the wiki: a page in the shelf business/ or tech/ with its main points, a real example for each, the gotchas and the link of the source; written after the owner's yes. Use when the owner says add this to the wiki, keep this, or gives a PRD, a ticket, notes or an article to keep.

★ 0