buildkeel 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES +3 -3
- package/antigravity/THIRD-PARTY-NOTICES +3 -3
- package/antigravity/agents/bk-break-it-flash.md +25 -0
- package/antigravity/agents/bk-break-it.md +25 -0
- package/antigravity/agents/bk-designer-flash.md +20 -0
- package/antigravity/agents/bk-designer.md +20 -0
- package/antigravity/agents/bk-edge-cases-flash.md +31 -0
- package/antigravity/agents/bk-edge-cases.md +31 -0
- package/antigravity/agents/bk-final-quality-reviewer-flash.md +47 -0
- package/antigravity/agents/bk-final-quality-reviewer.md +47 -0
- package/antigravity/agents/bk-final-spec-reviewer-flash.md +37 -0
- package/antigravity/agents/bk-final-spec-reviewer.md +37 -0
- package/antigravity/agents/bk-implementer-flash.md +32 -0
- package/antigravity/agents/bk-implementer.md +32 -0
- package/antigravity/agents/bk-note-checker-flash.md +19 -0
- package/antigravity/agents/bk-note-checker.md +19 -0
- package/antigravity/agents/bk-quality-reviewer-flash.md +47 -0
- package/antigravity/agents/bk-quality-reviewer.md +47 -0
- package/antigravity/agents/bk-readiness-reader-flash.md +28 -0
- package/antigravity/agents/bk-readiness-reader.md +28 -0
- package/antigravity/agents/bk-spec-reviewer-flash.md +37 -0
- package/antigravity/agents/bk-spec-reviewer.md +37 -0
- package/antigravity/bin/bk-launch.cmd +6 -11
- package/antigravity/bin/bk-start.cjs +4 -1
- package/antigravity/dist/hooks/main.js +121 -118
- package/antigravity/dist/server/main.js +622 -394
- package/antigravity/package.json +1 -1
- package/antigravity/plugin.json +1 -1
- package/antigravity/practices/P-01.md +7 -0
- package/antigravity/practices/P-02.md +7 -0
- package/antigravity/practices/P-03.md +7 -0
- package/antigravity/practices/P-04.md +7 -0
- package/antigravity/practices/P-05.md +7 -0
- package/antigravity/practices/P-06.md +7 -0
- package/antigravity/practices/P-07.md +7 -0
- package/antigravity/practices/P-08.md +7 -0
- package/antigravity/practices/P-09.md +7 -0
- package/antigravity/practices/P-10.md +7 -0
- package/antigravity/practices/P-11.md +7 -0
- package/antigravity/practices/P-12.md +7 -0
- package/antigravity/practices/P-13.md +7 -0
- package/antigravity/practices/P-14.md +7 -0
- package/antigravity/practices/P-15.md +7 -0
- package/antigravity/rules/buildkeel.md +7 -7
- package/antigravity/skills/bk-approve/SKILL.md +5 -3
- package/antigravity/skills/bk-build/SKILL.md +138 -24
- package/antigravity/skills/bk-capture/SKILL.md +77 -25
- package/antigravity/skills/bk-done/SKILL.md +56 -13
- package/antigravity/skills/bk-impact/SKILL.md +6 -4
- package/antigravity/skills/bk-init/SKILL.md +66 -21
- package/antigravity/skills/bk-migrate/SKILL.md +31 -2
- package/antigravity/skills/bk-new/SKILL.md +32 -16
- package/antigravity/skills/bk-onboard/SKILL.md +26 -13
- package/antigravity/skills/bk-pause/SKILL.md +56 -0
- package/antigravity/skills/bk-resume/SKILL.md +35 -0
- package/antigravity/skills/bk-review/SKILL.md +56 -0
- package/antigravity/skills/bk-settings/SKILL.md +18 -0
- package/antigravity/skills/bk-stats/SKILL.md +3 -1
- package/antigravity/templates/adr.md +31 -0
- package/antigravity/templates/{bug.md → defect.md} +5 -3
- package/antigravity/templates/design.md +2 -1
- package/antigravity/templates/spec-driven/proposal.md +2 -1
- package/antigravity/templates/spec-driven/tasks.md +13 -5
- package/antigravity/templates/task.md +23 -2
- package/antigravity/templates/thread.md +41 -0
- package/cli.mjs +85 -85
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ Whenever a step says to show something and ask about it, write it out in your re
|
|
|
9
9
|
|
|
10
10
|
Migrate the spec tree with the user: upgrade it to the format this version of BuildKeel uses when an update needs that, or move a Spec-driven tree to Full SDLC. Nothing is written without the user's confirmation.
|
|
11
11
|
|
|
12
|
+
It starts without the setup check other commands run first: a tree in an older format is one that check would send to /bk-init, and bringing it to the current format is this command's work.
|
|
13
|
+
|
|
12
14
|
## Upgrade the format first
|
|
13
15
|
|
|
14
16
|
Call the BuildKeel `manage` tool with `action: "migrate"`, without `apply`.
|
|
@@ -23,7 +25,34 @@ If BuildKeel's session report, or `query` with `view: "process"`, says this spec
|
|
|
23
25
|
|
|
24
26
|
In a Spec-driven tree, call `query` with `view: "onboarding"`. When it shows a conversion in progress, carry it on, as "Converting area by area" says. Otherwise, explain in a few lines what moving to Full SDLC means: work then goes through the team's stages, with approvals and gates, and the capability specs and archived changes are drafted into those stages, area by area, for the user to review and approve; the tree stays Spec-driven until every area is approved; and the move is one way. Then ask, with your tool for asking a question with choices: **Not now** (the default) or **Move this tree to Full SDLC**.
|
|
25
27
|
|
|
26
|
-
If the user chooses to move it, call `manage` with `action: "convert"` and `convert: "start"`, without `apply
|
|
28
|
+
If the user chooses to move it, call `manage` with `action: "convert"` and `convert: "start"`, without `apply`. It refuses while any change is open, naming each with its title: show that, and stop. Otherwise it lists what starting the conversion does and the process the tree would follow, and the process is settled as for a new Full SDLC tree, before any area is drafted. Each call below is `manage` with `action: "convert"` and `convert: "start"`.
|
|
29
|
+
|
|
30
|
+
Topics for this step, in this order:
|
|
31
|
+
|
|
32
|
+
- **stages**: what each stage is called, and any stage added between the business idea and the user story, with where it sits.
|
|
33
|
+
- **kinds**: whether a stage holds more than one kind of work, such as features and enhancements beside user stories. Each kind is numbered in its own sequence, has its own template and documents, and behaves as its stage does.
|
|
34
|
+
- **prefixes**: the ID prefix and digits of each stage and kind, such as `US-001`, `FEAT-0001` or `PROJ-12`.
|
|
35
|
+
- **documents**: what each stage and kind needs approved before work under it starts: a test plan, a design document, or a document of the team's own, such as a security review.
|
|
36
|
+
- **test-plans**: whether a task's own test plan is recorded as it is saved (the default) or approved like any other plan.
|
|
37
|
+
- **gates**: each gate's mode: block stops the action, warn lets it go ahead with a warning, off skips the check. The approve gate checks an artifact before it is approved: it follows its template, and its parent is approved. The start gate checks before work starts: everything above the unit is approved and not suspect, and its required documents are approved. The done gate checks before a unit is finished: its test cases pass. The lock gate checks before the agent edits approved versions and records.
|
|
38
|
+
|
|
39
|
+
Work from the topics listed for this step. The user may answer in their own words, several topics at once or part of one. After each answer, say which topics it settled, with what you understood for each, and which are left; then ask the next one left, one topic per message. Where a topic has a default, list keeping it first, naming its actual value, and give examples where they help. Anything you work out that the user did not say is a proposal: ask it as that topic's question, with it as the default, and never use it without the user's answer. Ask about an unclear answer; name a conflicting one beside the earlier answer and ask which holds. Never guess. When every topic is settled, show all of it, as a review.
|
|
40
|
+
|
|
41
|
+
The list shows the process as a table: BuildKeel's default, or the organization's when the tree takes its templates from one. Show it as it is, in your reply as normal text. Then ask in prose, not with your tool for asking a question with choices, whether the team uses this process as it is, or works differently and how: they can describe it in their own words, all at once or in part. If they only say it works differently, ask in one line how their team works.
|
|
42
|
+
|
|
43
|
+
- **Used as it is**: every topic is settled. Pass `settled: ["all"]`, and go on to the review below.
|
|
44
|
+
- **Works differently**: settle the topics their description covers, and ask each topic left, in the order above, with the default's actual value from the table as the first answer. Build `process` as in buildkeel.yaml's process section from what the user said or confirmed, nothing else. An added stage or kind needs a prefix: propose one, such as `FEAT` for feature, and say it is a suggestion they can change. When the user names a stage the default process does not have, ask whether it is a stage of its own, between two stages, or a kind of work beside one, such as features beside user stories, before you settle stages: a list of stage names in order does not say which. Name anything the process cannot express, such as a stage after the code is built, with the closest setting it has, such as the done gate's checks; never drop it silently, and never invent a setting. After each answer, call `manage` again without `apply`, with the same values as before, the `process` so far and every topic settled in `settled`: it lists the topics left.
|
|
45
|
+
|
|
46
|
+
When no topic is left, call `manage` again without `apply` and show the whole table it returns, as it is, with its line on what each stage or kind the team added means, and ask whether to go ahead with it. Never ask about a table the user has not seen. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool. The answers: go ahead with this process (the default); change something, which you take in, then call `manage` again and show the whole table again, in the same layout; or stop, and write nothing.
|
|
47
|
+
|
|
48
|
+
**Templates.** Once the user agrees the table, settle a template for each one the list says the process needs, one at a time, in the order listed. For each, ask: **The agent drafts it** (the default) or **I'll provide a file**. Nothing is left for later: if the user asks to leave one, say that the tree needs it to check what is drafted from it, and ask again with the same two answers.
|
|
49
|
+
|
|
50
|
+
- **The agent drafts it**: call `get_template` for the closest built-in type: `story` for a kind at the user story stage, `epic` for a stage between the epic and the user story or a kind at one, `idea` for a kind at the business idea stage, `task` for a kind at the task stage, `design` for a document of the team's own. Change its `template:` line to the new type, and its description and sections to what the user said about it. Show it in full, and ask whether to use it or change something. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool.
|
|
51
|
+
- **I'll provide a file**: read the file the user names with your own tools, and pass its text. When `manage` says it fails the template check, show what is wrong, and ask: **The agent fixes it** (the default) or **Use another file**. Show a fixed template in full, and ask whether to use it. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool.
|
|
52
|
+
|
|
53
|
+
Pass each agreed template in `templates`, by type, and call `manage` again without `apply`: it checks each one. Nothing is written until every template the list names is given and passes.
|
|
54
|
+
|
|
55
|
+
Once the process and its templates are settled and the user agrees to go ahead, call it again with the same `process`, `settled` and `templates`, and `apply: true`: the conversion starts, and the templates are written with it.
|
|
27
56
|
|
|
28
57
|
### Converting area by area
|
|
29
58
|
|
|
@@ -38,6 +67,6 @@ If the user chooses to move it, call `manage` with `action: "convert"` and `conv
|
|
|
38
67
|
- **Place the scenarios:** once the area is approved, show a table of each scenario and the criterion or test case it became, ask the user to agree it, and record it with `manage`, `action: "convert"`, `convert: "place"` and `place`. Leave a scenario out (`drop`) only when the user says so. A test tagged with a scenario counts for what that scenario became, so existing tests need no matching.
|
|
39
68
|
3. **Switch.** Once every area is converted, the view says so: call `manage` with `action: "convert"` and `convert: "finish"`, without `apply`, and ask the user to confirm the switch, with what it says in your reply. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool. Only when they confirm, call it again with `apply: true`, and show the result as it is.
|
|
40
69
|
|
|
41
|
-
The user can stop after any area: the next /bk-migrate carries on from there. While the conversion is in progress no change can be opened, and
|
|
70
|
+
The user can stop after any area: the next /bk-migrate carries on from there. While the conversion is in progress no change can be opened, and defects and ad-hoc units work as usual. Before any area is approved, the conversion can be cancelled with `manage`, `action: "convert"` and `convert: "cancel"`, after the user confirms.
|
|
42
71
|
|
|
43
72
|
Do not change spec tree files yourself; the BuildKeel tools do all of it.
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bk-new
|
|
3
|
-
description: "BuildKeel: Draft an artifact, break a parent down into drafts of its children, or record a
|
|
3
|
+
description: "BuildKeel: Draft an artifact, break a parent down into drafts of its children, or record a defect. Run as /bk-new <type> [parent ID] [what to draft], e.g. story EP-01, stories from EP-01, or defect TK-001, only when the user types it."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
BuildKeel's tools are on the MCP server `buildkeel`: call each one with `call_mcp_tool` (`ServerName` `buildkeel`, `ToolName` the tool's name), passing `workspace`, the absolute path of this project's folder. Never read or write the spec tree's files instead. If you have no `call_mcp_tool` tool, tell the user to start a new conversation and stop: never run BuildKeel's server or programs yourself.
|
|
7
7
|
|
|
8
8
|
Whenever a step says to show something and ask about it, write it out in your reply as normal text and end that reply with the question in plain text, calling no tool after it: the user may see nothing you wrote before a tool call. Use your tool for asking a question with choices only for a quick choice with nothing to read, and put in the question itself anything the user needs to choose.
|
|
9
9
|
|
|
10
|
-
Draft BuildKeel artifacts with the user. Everything you produce is a draft: drafting never approves anything, and every draft goes through the same checks and approval as one written by hand. A
|
|
10
|
+
Draft BuildKeel artifacts with the user. Everything you produce is a draft: drafting never approves anything, and every draft goes through the same checks and approval as one written by hand. A defect found while building is the exception: it is recorded at once, with its permanent ID, and needs no approval; a defect reported by users, customers or testers is drafted and approved like the rest (see "Defects" below). In a Spec-driven tree every defect is recorded at once.
|
|
11
11
|
|
|
12
12
|
The user typed: whatever follows /bk-new in the user's message (nothing, if they typed only /bk-new)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Before anything else**, call the BuildKeel `query` tool with `view: "process"`, and do not show its result. If it says this repository is not set up for BuildKeel, tell the user so, and that /bk-init sets it up, then stop: ask nothing else. Otherwise go on straight away.
|
|
15
|
+
|
|
16
|
+
If BuildKeel's session report, or `query` with `view: "process"`, says this spec tree is Spec-driven, follow "In a Spec-driven tree" at the end instead of the sections before "Defects".
|
|
15
17
|
|
|
16
18
|
## If the user typed nothing
|
|
17
19
|
|
|
18
|
-
Ask straight away,
|
|
20
|
+
Ask straight away, with your tool for asking a question with choices if you have one. The question itself says what they could type, in one sentence, since some hosts show only the question and its choices: "What should I draft? For example: " followed by the examples.
|
|
19
21
|
|
|
20
|
-
Take the examples word for word from BuildKeel's session report when it gives them ("Examples of what to draft, in the team's words"): they use the names this team gives its stages, which may not be the usual ones. Only when it gives none, use `story EP-01`, `stories from EP-01`, `test-plan US-001` and `
|
|
22
|
+
Take the examples word for word from BuildKeel's session report when it gives them ("Examples of what to draft, in the team's words"): they use the names this team gives its stages, which may not be the usual ones. Only when it gives none, use `story EP-01`, `stories from EP-01`, `test-plan US-001` and `defect TK-001`.
|
|
21
23
|
|
|
22
24
|
Offer two choices: **Suggest what to draft next** (the default, listed first) and **Type what to draft**; if they pick the second, ask what to draft. If they pick the suggestion, call the BuildKeel `query` tool with `view: "tree"`, propose the most useful next drafts (such as stories for an epic that has none, or a missing test plan), and ask which to draft. Then carry on below with their answer as the request.
|
|
23
25
|
|
|
24
26
|
## Work out what to draft
|
|
25
27
|
|
|
26
|
-
- **The type**: idea, epic, story, task, test-plan, design (a design document) or
|
|
28
|
+
- **The type**: idea, epic, story, task, test-plan, design (a design document) or defect, or a stage, kind or document the team added (the user may use their team's own name for it). If it is not clear, ask. For a defect, follow "Defects" below instead of the rest of this prompt.
|
|
29
|
+
- **The kind**, when the stage of the type holds more than one (`query` with `view: "process"` lists the kinds at each stage), and the user did not name one: propose one from where the work came from, and say why, such as an enhancement because it improves an existing export screen. Ask the user to confirm it or pick another, before drafting; never pick one without their answer. Draft it with the kind as the type, from that kind's template. For a breakdown, propose a kind for each child in the list of children, and the user confirms them there.
|
|
27
30
|
- **The parent**: every type except a business idea has one: an artifact's parent is of the stage directly above it in the process (by default an epic's parent is a business idea, a story's an epic and a task's a story; with a stage added between epic and story, a story's parent is of that stage), and a test plan's parent is the artifact it tests. If the user did not name it, call the BuildKeel `query` tool with `view: "tree"`, suggest the likely parent, and ask.
|
|
28
31
|
- **One draft or a breakdown**: a request such as "stories from EP-01" or "break EP-01 down" asks for a set of children of one parent. Anything else is a single draft.
|
|
29
32
|
- **The user's own material**: if the user pasted text, named or uploaded a file, pointed to something in a tool you can read (such as an issue tracker or a wiki), or described the requirement, use it as the main input. Fit it to the template: put each part in the section it belongs to, keeping its meaning and wording; put what fits no section in the section for further material, such as Notes; and for each required section it does not cover, ask the user, one question at a time. Never invent a requirement, a criterion or a section to fill a gap, and never add a detail the material leaves open, such as how a notice reaches the customer: ask, or keep the wording as open as the material's.
|
|
@@ -55,7 +58,7 @@ Version 0 describes what code already does, as if BuildKeel had been used from t
|
|
|
55
58
|
- Fill the template's sections from the code and from what the user brings about it, such as a ticket or a wiki page read through their own tools, a file, or what they say. Reword what they say into the template's form, such as a ticket's description written as testable criteria; add nothing they do not support.
|
|
56
59
|
- Describe only what the change touches.
|
|
57
60
|
- Keep each source as you read it: pass it in `sources`, with where it came from, its key and link, and its text exactly as your tool returned it (description, fields and comments). Never copy code into a source.
|
|
58
|
-
- When a source and the code disagree, or two sources do, ask the user which is intended before drafting that part. Only the user knows, so recommend neither answer, and offer both as equals: **The code is right; the source is out of date** and **The source is right; the code has a defect**. When the code is wrong, version 0 states the intended behavior, and the defect is recorded
|
|
61
|
+
- When a source and the code disagree, or two sources do, ask the user which is intended before drafting that part. Only the user knows, so recommend neither answer, and offer both as equals: **The code is right; the source is out of date** and **The source is right; the code has a defect**. When the code is wrong, version 0 states the intended behavior, and the defect is recorded against it once version 0 is approved. When the source is out of date, version 0 follows the code. Offer a third answer after those two, still with no recommendation: **Not sure: leave it open**. Then keep the question in the version 0 draft's front matter, under `openQuestions`, with an `id` (Q1, Q2, ...), what it is `about`, what the `code` does, what the `source` says and the `sources`' keys, and leave the part it concerns out of version 0: BuildKeel records who left it open, and version 0 waits for an answer before it can be approved. Someone who knows answers it later with /bk-onboard: add `answer: code` or `answer: source` to it, save the draft, and draft the part it concerns.
|
|
59
62
|
- Supported means the code or a source says it; a plausible guess is not support, such as who a story is for and why. Leave a required section empty when nothing supports it, without asking: `save_draft` lists what is empty, for the reviewer.
|
|
60
63
|
|
|
61
64
|
The change that builds on it is then saved with `save_draft`, the version 0's draft ID as `id` and no `version`: that draft is its version 1. Start from version 0's text as saved, with its entry IDs: keep the ID of every entry that stays, changed or not (a criterion whose limit changes keeps its ID), and write `{{new}}` only for an entry the change adds. Both are approved in one review with /bk-approve, version 0 first.
|
|
@@ -84,15 +87,28 @@ The process may require other documents of a stage, such as a team's threat mode
|
|
|
84
87
|
- **For each task**, decide which of the story's test cases its tests will implement, and say so in the list you propose. If its tests will not be story test cases, draft the task's own test plan too (type `test-plan`, parent set to the task's draft ID), with test cases that cover the task, such as `covers: [{{id}}]`.
|
|
85
88
|
- Before writing, show the user the list of children you propose (titles and a line each) and ask whether to go ahead or change it.
|
|
86
89
|
|
|
87
|
-
##
|
|
90
|
+
## Defects
|
|
91
|
+
|
|
92
|
+
A defect is code that does not do what was agreed. Finishing it needs a regression test with the defect's ID in its name, such as `it("keeps reset links for 30 minutes [DEF-005]", ...)`.
|
|
93
|
+
|
|
94
|
+
Once the user says a defect was reported (step 1), sort the report before going on, and record it here only when they confirm it is a defect; a change in behavior or a gap is drafted as that work instead.
|
|
95
|
+
|
|
96
|
+
**Sorting a report.** When someone reports that the system does something wrong, check it before recording anything: what the spec says about that behavior now (in a Spec-driven tree, `query` with `view: "capabilities"` and the capability's `id`; otherwise the stories and their acceptance criteria, with `query`), and the code linked to it (`query` with `view: "describes"` and the files involved). Then propose one reading, labelled as yours, such as "My reading: a defect", with what it rests on:
|
|
97
|
+
|
|
98
|
+
- **A defect**: the code does not do what the spec says. The code is fixed and the spec keeps its version. It is recorded as a defect with `source: reported`.
|
|
99
|
+
- **A change in behavior**: the code does what the spec says, and the user wants something else. The spec changes and gets a new version: in a Spec-driven tree through a change, otherwise through a new version of the story, or a new item of the team's kind for it, such as an enhancement.
|
|
100
|
+
- **A gap**: the spec says nothing about it. Settle with the user what it should do; that goes into the spec as a change in behavior.
|
|
101
|
+
- **Nothing describes this code yet**: `describes` finds no artifact for it. In Full SDLC, draft version 0 of the story the code belongs to first, stating the intended behavior, and record the defect with that draft as its parent; both are reviewed and approved together, version 0 first. In a Spec-driven tree, ask **Record it standalone** (the default) or **Document this code first**, as version 0 of a capability spec, then link the defect to its requirement.
|
|
88
102
|
|
|
89
|
-
|
|
103
|
+
Ask with your tool for asking a question with choices, your reading first, then the other readings, so the user confirms or overrides it. Record nothing until they answer. A defect found while building, such as a failing test of the work under way, needs no sorting: it is a defect of that work.
|
|
90
104
|
|
|
91
|
-
1. **
|
|
92
|
-
2. **
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
105
|
+
1. **Found while building, or reported.** Ask, with your tool for asking a question with choices: **Found while building** (a test failed, or it showed up during the work; the default when a unit is active) or **Reported** (by users, customers or testers; the default when no unit is active). Set `source` to `found` or `reported`.
|
|
106
|
+
2. **Where it belongs.**
|
|
107
|
+
- **Found while building:** the task or story being built. If the user named one, use it. Otherwise offer **the active unit** first, then **another task or story: type its ID**. Then the test case that found it, when a test failed: call `query` with `view: "coverage"` and the unit's ID to see the test cases that apply there, and offer them, with **none** last.
|
|
108
|
+
- **Reported:** the work it affects, of a kind the process allows as a defect's parent (a user story unless the team chose others). If the user named it, use it. Otherwise ask which files or behavior the report points to, call `query` with `view: "describes"` and those `paths`, and offer the parents it lists, the first as the default, then **another: type its ID**. When it says nothing describes that code, follow "Nothing describes this code yet" above, drafting version 0 as in "Version 0".
|
|
109
|
+
3. **What is wrong.** Use the user's description, or ask for it in their own words: never offer descriptions you made up as choices, since a defect records what someone saw. Write a title that names the defect, such as "Reset link expires after 3 minutes".
|
|
110
|
+
4. Call `get_template` for `defect`, then `save_draft` with `type: "defect"` and the whole file: `id: {{id}}`, the title, `source`, `parent`, `testCase` when a test case found it, and the sections filled in (what is wrong, steps to reproduce, expected, actual). Leave out sections you know nothing about rather than inventing them.
|
|
111
|
+
5. Show the result. A defect found while building has its permanent ID at once and can be started with /bk-build <ID>. A reported defect is a draft: it is approved with /bk-approve like any draft, gets its number then, and is started after that. If fixing it means a requirement must change, say so: that change is made as a new version of the story or task, approved as usual.
|
|
96
112
|
|
|
97
113
|
## Finish
|
|
98
114
|
|
|
@@ -102,9 +118,9 @@ Do not create or edit spec tree files yourself; `save_draft` does all writing.
|
|
|
102
118
|
|
|
103
119
|
## In a Spec-driven tree
|
|
104
120
|
|
|
105
|
-
What you draft is a change, or a file of an open change: its proposal, a spec change, its design or its tasks. Nothing is approved.
|
|
121
|
+
What you draft is a change, or a file of an open change: its proposal, a spec change, its design or its tasks. Nothing is approved. Every defect is recorded at once, as in "Defects", with its `source`, its permanent ID and no approval: one found while building is attached to the change whose work found it (its `parent` is the change's ID, its `testCase` the scenario whose test found it). For a reported one, ask which requirement it affects: ask which files or behavior the report points to, call `query` with `view: "describes"` and those `paths`, and offer, with your tool for asking a question with choices, the requirements the changes it lists became (the first as the default), then **another: type its ID**, then **leave it standalone**. Put the chosen one in its frontmatter as `requirement: AUTH-R3`; a standalone one has none. A fix that changes a requirement is made through a change.
|
|
106
122
|
|
|
107
|
-
- **If the user typed nothing**, ask what to draft, offering **Suggest what to draft next** (the default) and **Type what to draft**. The question itself gives examples: `change for reset by text message`, `spec change for CH-012` and `
|
|
123
|
+
- **If the user typed nothing**, ask what to draft, offering **Suggest what to draft next** (the default) and **Type what to draft**. The question itself gives examples: `change for reset by text message`, `spec change for CH-012` and `defect CH-012`. For a suggestion, call `query` with `view: "changes"` and propose what an open change still lacks, such as tasks or a spec change its proposal names.
|
|
108
124
|
- **Read before writing.** Call `query` with `view: "capabilities"`, and with the `id` of each capability the work touches. For a file of an open change, read the change with `view: "changes"` and its `id`. Call `get_template` for each file you draft.
|
|
109
125
|
- **A new change**: draft its proposal, a spec change per capability it adds or modifies, a design only when it makes decisions worth recording, and tasks, and save them in one `save_draft` call with `type: "change"`, the proposal as `content` and the rest in `files`. Before saving a new capability, propose its code from its name and let the user change it.
|
|
110
126
|
- **A file of an open change**: save it with `save_draft`, its type and the change's `id`; read it first with `query`, `view: "changes"`, the change's `id` and `file`. To change one requirement of a spec change, pass `capability` and `requirement` in place of `content`. Then check the change's other files against it and propose the follow-on edits, such as a task for a new requirement.
|
|
@@ -13,6 +13,8 @@ What describes code from before BuildKeel is version 0 of its artifact: the arti
|
|
|
13
13
|
|
|
14
14
|
The user typed: whatever follows /bk-onboard in the user's message (nothing, if they typed only /bk-onboard)
|
|
15
15
|
|
|
16
|
+
**Before anything else**, call the BuildKeel `query` tool with `view: "process"`, and do not show its result. If it says this repository is not set up for BuildKeel, tell the user so, and that /bk-init sets it up, then stop: ask nothing else. Otherwise go on straight away.
|
|
17
|
+
|
|
16
18
|
If BuildKeel's session report, or `query` with `view: "process"`, says this spec tree is Spec-driven, follow "In a Spec-driven tree" at the end in place of "Onboard an area" and the sections after it.
|
|
17
19
|
|
|
18
20
|
## Choose what to do
|
|
@@ -24,6 +26,14 @@ Call the BuildKeel `query` tool with `view: "onboarding"`; it changes nothing. T
|
|
|
24
26
|
|
|
25
27
|
If the user typed an area's name above, onboard that area. Ask one question at a time, each with your recommendation, and only for what you cannot work out. Two kinds of question carry no recommendation, because only the user knows the answer: which of two disagreeing sources is intended, and what a section nothing supports should say.
|
|
26
28
|
|
|
29
|
+
Topics for this step, for each area, in this order:
|
|
30
|
+
|
|
31
|
+
- **the artifacts** the area needs, and the kind of each where a stage holds more than one;
|
|
32
|
+
- **each disagreement** between a source and the code, or between two sources;
|
|
33
|
+
- **each required section** nothing supports.
|
|
34
|
+
|
|
35
|
+
Work from the topics listed for this step. The user may answer in their own words, several topics at once or part of one. After each answer, say which topics it settled, with what you understood for each, and which are left; then ask the next one left, one topic per message. Where a topic has a default, list keeping it first, naming its actual value, and give examples where they help. Anything you work out that the user did not say is a proposal: ask it as that topic's question, with it as the default, and never use it without the user's answer. Ask about an unclear answer; name a conflicting one beside the earlier answer and ask which holds. Never guess. When every topic is settled, show all of it, as a review.
|
|
36
|
+
|
|
27
37
|
## Map the code
|
|
28
38
|
|
|
29
39
|
1. Read the code's layout: its top-level folders, entry points, routes or handlers, and what the README says. Call `query` with `view: "tree"` for what the spec tree already holds.
|
|
@@ -48,20 +58,23 @@ Offer each area that is not onboarded yet as its own choice, in the map's order,
|
|
|
48
58
|
|
|
49
59
|
Show a table of the artifacts the area needs, top down, in the team's stage names, each existing or to draft:
|
|
50
60
|
|
|
51
|
-
| Level | Artifact | Version | From |
|
|
52
|
-
|
|
53
|
-
| Business idea | BI-01 "Self-service account recovery" | exists | |
|
|
54
|
-
| Epic | "Password reset" | version 0 | the code, Confluence "Reset design" |
|
|
55
|
-
| Design document | of that epic | version 1 | the code: no source has one |
|
|
56
|
-
| Story | "Reset by email" | version 0 | the code, PAY-12 |
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
61
|
+
| Level | Kind | Artifact | Version | From |
|
|
62
|
+
|---|---|---|---|---|
|
|
63
|
+
| Business idea | business idea | BI-01 "Self-service account recovery" | exists | |
|
|
64
|
+
| Epic | epic | "Password reset" | version 0 | the code, Confluence "Reset design" |
|
|
65
|
+
| Design document | | of that epic | version 1 | the code: no source has one |
|
|
66
|
+
| Story | user story | "Reset by email" | version 0 | the code, PAY-12 |
|
|
67
|
+
| Story | feature | "Reset by text" | version 0 | the code, PAY-20, labelled a feature |
|
|
68
|
+
| Test plan | | of each story | version 1 | one test case per criterion |
|
|
69
|
+
| Task | task | PAY-14 "Email template" | version 0 | finished in Jira |
|
|
70
|
+
| Left out | | PAY-31 "Reset by security question" | | open in Jira: drafted with /bk-new when someone takes it up |
|
|
71
|
+
|
|
72
|
+
When a stage holds more than one kind (`query` with `view: "process"` lists them), propose the kind of each artifact at that stage from where it came from, such as a ticket labelled a feature or a change to existing behavior, and say why in the table. The user confirms or changes each kind before anything is drafted; never pick one without their answer. Each is drafted with its kind as `type`, from that kind's template.
|
|
60
73
|
|
|
61
74
|
Once the area's drafts are approved, or all but those waiting on a question left open, record every ticket you read for it with `manage`, `action: "map"`, `map: "tickets"`, the area and its `tickets`: each with its `key`, `link` and `title`, and either `outcome: "carried"` with the `artifact` it became (its approved ID), or `outcome: "left-out"` with `why`: `open`, `in-progress`, or `choice` when the team chose not to carry it over. Nothing read is left off the list.
|
|
62
75
|
|
|
63
76
|
- Document every stage from the business idea down to the story, with the documents the process requires of each.
|
|
64
|
-
- Tasks and
|
|
77
|
+
- Tasks and defects come in only when a source has them and they are finished: each as version 0, with its tracker key. Open or in-progress work is left out, and listed as such.
|
|
65
78
|
- A required document no source provides, such as a design document or a test plan, is drafted as version 1, under the normal rules, so that new work under the area can start as usual.
|
|
66
79
|
- When an artifact in BuildKeel already describes part of the area, see "Version 0 under an existing artifact" below.
|
|
67
80
|
|
|
@@ -80,7 +93,7 @@ Only once the user agrees. Draft top down, parents before children, so each chil
|
|
|
80
93
|
- When a source and the code disagree, or two sources do (a ticket says a reset link lasts 30 minutes, the code makes it 60), ask the user which is intended before drafting that part. Offer both answers as equals and recommend neither: **The code is right; the ticket is out of date** and **The ticket is right; the code has a defect**. When the ticket is out of date, version 0 follows the code. When the code is wrong, see "Known defects" below. Offer a third answer after those two, still with no recommendation: **Not sure: leave it open**. Then keep the question in the version 0 draft's front matter, under `openQuestions`, with an `id` (Q1, Q2, ...), what it is `about`, what the `code` does, what the `source` says and the `sources`' keys, and leave the part it concerns out of version 0: BuildKeel records who left it open, and version 0 waits for an answer before it can be approved. Someone who knows answers it later with /bk-onboard: add `answer: code` or `answer: source` to it, save the draft, and draft the part it concerns.
|
|
81
94
|
- For each required section nothing supports, ask the user, one question at a time, with your tool for asking a question with choices: **Leave it empty** (listed first) or **Type it in**, and put no answer of your own in the choices. A version 0 may leave a section empty: the approval records it, and it can be filled in later.
|
|
82
95
|
|
|
83
|
-
**Each finished task, and each
|
|
96
|
+
**Each finished task, and each defect fixed before BuildKeel**, is a version 0 too: `save_draft` with `type: "task"` or `"defect"`, `version: 0`, its `parent` the story or task it belongs to (a draft's ID is fine), and its tracker issue in `sources`. It is approved with the area, counts as done, and is linked to the commits before the baseline that name its key. Never record a defect that was already fixed as an open defect.
|
|
84
97
|
|
|
85
98
|
**Each version 1**, such as a design document or test plan no source has: draft it with `save_draft` and no `version`, from the code, as for any new artifact. It is held to its template, so it cannot leave a required section empty, and "Leave it empty" is never a choice for it. For each required section the code does not give, such as a design's context, ask the user, with what the code shows as a starting point they can accept or change: for code from before BuildKeel, "Built before BuildKeel; why is not recorded" is a fair answer when nobody knows.
|
|
86
99
|
|
|
@@ -88,7 +101,7 @@ A test plan has a test case for each acceptance criterion of its story. A finish
|
|
|
88
101
|
|
|
89
102
|
### 4. Review and approve
|
|
90
103
|
|
|
91
|
-
Show what was drafted as a table: ID, title, version, the sources kept, and the sections left empty. Then offer to approve the area's drafts in one review: call `approve` with `ids` set to all of them and `onboard: true`, first without `apply`, and ask whether to approve them, with the table and the result as it is in your reply. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool. Call it again with `apply: true` only when the user confirms. Each version 0 is approved first, and a finished task's version 0 is linked to the commits before the baseline that name its key.
|
|
104
|
+
Show what was drafted as a table: ID, title, version, the sources kept, and the sections left empty. Then offer to approve the area's drafts in one review: call `approve` with `ids` set to all of them and `onboard: true`, first without `apply`, and ask whether to approve them, with the table and the result as it is in your reply. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool. Call it again with `apply: true` only when the user confirms. Each version 0 is approved first, and a finished task's version 0 is linked to the commits before the baseline that name its key. Once it is approved, when the area has finished tasks and Build-ready tasks is on, call `manage` with `action: "backfill"` and `ids` set to those tasks: it drafts each one's as-built record from its linked commits. Say what each delivered, read from those commits, show the records, and write them with `apply: true` and `delivered` once the user agrees.
|
|
92
105
|
|
|
93
106
|
### 5. Existing tests
|
|
94
107
|
|
|
@@ -105,7 +118,7 @@ Call `query` with `view: "onboarding"` and ask which area to onboard next, as in
|
|
|
105
118
|
|
|
106
119
|
## Known defects
|
|
107
120
|
|
|
108
|
-
When the user says a drafted behavior is a defect, not what was intended: revise version 0 to state the intended behavior, and once the area is approved, record the defect
|
|
121
|
+
When the user says a drafted behavior is a defect, not what was intended: revise version 0 to state the intended behavior, and once the area is approved, record the defect against that story: `save_draft` with `type: "defect"`, `parent` set to the story's ID, `testCase` set to the test case that covers that criterion when the story's test plan has one, its Expected naming the criterion (its ID and text), and its Actual saying what the code does instead. Fixing it is then work like any defect, and a test matched to that test case is tagged as the fix changes it.
|
|
109
122
|
|
|
110
123
|
## Version 0 under an existing artifact
|
|
111
124
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bk-pause
|
|
3
|
+
description: "BuildKeel: Pause where you are, to come back in a new session or on another machine: the work on a unit or change, or an exploration with no unit, kept as a thread. Run as /bk-pause [nothing, or an ID], e.g. TK-013; the active unit when left out."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
BuildKeel's tools are on the MCP server `buildkeel`: call each one with `call_mcp_tool` (`ServerName` `buildkeel`, `ToolName` the tool's name), passing `workspace`, the absolute path of this project's folder. Never read or write the spec tree's files instead. If you have no `call_mcp_tool` tool, tell the user to start a new conversation and stop: never run BuildKeel's server or programs yourself.
|
|
7
|
+
|
|
8
|
+
Whenever a step says to show something and ask about it, write it out in your reply as normal text and end that reply with the question in plain text, calling no tool after it: the user may see nothing you wrote before a tool call. Use your tool for asking a question with choices only for a quick choice with nothing to read, and put in the question itself anything the user needs to choose.
|
|
9
|
+
|
|
10
|
+
Pause the work with the user, so that it can be picked up again in this session, in a new one, or on another machine, by them or a teammate. It is one step wherever they come back: never ask where they will come back. Phrases such as "let's stop here" or "I'm switching machines" mean the same as this command. Nothing is ever discarded.
|
|
11
|
+
|
|
12
|
+
The user typed: whatever follows /bk-pause in the user's message (nothing, if they typed only /bk-pause)
|
|
13
|
+
|
|
14
|
+
**Before anything else**, call the BuildKeel `query` tool with `view: "process"`, and do not show its result. If it says this repository is not set up for BuildKeel, tell the user so, and that /bk-init sets it up, then stop: ask nothing else. Otherwise go on straight away.
|
|
15
|
+
|
|
16
|
+
## What is paused
|
|
17
|
+
|
|
18
|
+
- **A unit or change is active** (or the user named one): its work is paused, as "Pausing work" says.
|
|
19
|
+
- **Nothing is active:** the conversation is an exploration, kept as a thread, as "Keeping a thread" says.
|
|
20
|
+
|
|
21
|
+
## Pausing work
|
|
22
|
+
|
|
23
|
+
1. **Uncommitted changes.** Run `git status` in the code repo. When files are changed, list them and ask, with your tool for asking a question with choices: **Commit them as work in progress** (the default), committed with the message `WIP: <what they hold>` ending with `BuildKeel-Unit: <the unit's ID>`, or **Leave them as they are**, named in the pause record. Never discard or stash anything.
|
|
24
|
+
2. **Working notes.** Draft the working notes since the last checkpoint or pause, and check them, as below, steps 1 and 2.
|
|
25
|
+
|
|
26
|
+
**Working notes.** At this checkpoint, draft the working notes since the last checkpoint or pause: what the work learned that the code and the spec do not say. Each is one of these: a decision and why (with `replaces` naming an earlier decision it replaces), a constraint or pitfall, a dead end (what was tried, and why it failed), an open question, or the next step. Rulings are kept already. Give each its source: the user's own words, copied exactly, as `quote`; a `file` and `line`; or a `record`, such as a requirement, a finding or a commit. Never record an inference about a person, such as what they seem to prefer. With nothing new to note, leave notes out.
|
|
27
|
+
1. **BuildKeel's check:** call `save_draft` with `type: "working-notes"`, the unit's or change's `id` and the `notes`, without `apply`. It says which pass, and drops the rest with the reason.
|
|
28
|
+
2. **The note checker:** give it the notes that passed in one batch, with their sources and nothing else, started in the note checker role as `query` with `view: "settings"` names it. When it cannot be started, follow "When agents can't be started": check each yourself as the checker would, and say the notes were checked here. Keep only the notes it supports, and tell the user each one dropped, with why.
|
|
29
|
+
3. **Keep them** as this step says. At a checkpoint, the result lists what was kept: show that list in the same reply, without asking first; the user may ask to correct or drop any of it. A pause shows them first, and keeps them once the user agrees.
|
|
30
|
+
3. **The pause.** Call `manage` with `action: "pause"`, the `id` when the user named one, `notes` with the notes the checker supports, and `next` with the next step in a sentence. Show what it would record, in full, with the working notes and their sources, and ask. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool. Only once the user agrees, call it again with `apply: true`.
|
|
31
|
+
4. **Push.** Say what the result says about pushing, and offer to push both the code repo and the spec repo (one push when the spec tree is in the code repo), so the work can be resumed on another machine. The user may decline: then say it can only be resumed on this machine until they push.
|
|
32
|
+
5. **Done.** Say in a line that it is paused, and that /bk-resume with its ID resumes it.
|
|
33
|
+
|
|
34
|
+
**When agents can't be started,** the same everywhere:
|
|
35
|
+
1. **Say why, once,** in a line: you have no tool for starting agents here, it is turned off, or the model tier the settings name is not available.
|
|
36
|
+
2. **Retry once** when an agent started but failed, before treating agents as unavailable.
|
|
37
|
+
3. **Follow the step's switch:** off, nothing happens; ask, the offer says it would run here, without a fresh reader; auto, or a step with no switch (an implementer or a reviewer), do it here and say so in a line.
|
|
38
|
+
4. **Label what you did here** as done here, not by an independent agent: in what you show, and in the record (`by: "author"` for a review), and present a question or proposal as your own reading.
|
|
39
|
+
5. **Never count it where independence is the point:** a final review done here does not satisfy the review-findings check, so say the work was not independently reviewed.
|
|
40
|
+
|
|
41
|
+
## Keeping a thread
|
|
42
|
+
|
|
43
|
+
An exploration with no unit is kept as a thread: its ID, such as TH-004, stays with it, and it has no stages and no approval. First call `manage` with `action: "pause"` and no `id`: it says what the Threads switch asks for.
|
|
44
|
+
|
|
45
|
+
- **ask**, the default: the steps below, saving only once the user agrees.
|
|
46
|
+
- **auto:** the same steps, but save it with `apply: true` without asking, then show it in full and say its ID.
|
|
47
|
+
- **off:** save nothing. Say so in a line, and suggest /bk-capture when the idea is ready. Open threads stay, and can still be resumed, captured or dropped.
|
|
48
|
+
|
|
49
|
+
1. **Draft it** from the whole conversation. If BuildKeel said this conversation was compacted and the exploration is not saved, read the whole transcript on disk first, and build the thread from it rather than from the summary; then pass `fromTranscript: true`. When this pause adds to a thread resumed in this conversation, use its ID. Its `content` follows the thread template (`get_template` with `type: "thread"`): the intent and the idea; the approaches, and which way the discussion is leaning; decisions and constraints; dead ends and open questions; the next thing to discuss; and, apart from your proposals, the user's own words, each a bullet with their words in quotes, exactly as they wrote them. Add the code read, as pointers, and any spike, with its branch or the files it left. Write "None yet" in a section the conversation has nothing for. Give the decisions, constraints, dead ends and open questions as `notes` too, each with its source, as working notes are. Never record an inference about a person.
|
|
50
|
+
2. **Check it:** call `save_draft` with `type: "thread"`, a short `title` (or the `id` of the thread it adds to), the `content` and the `notes`, without `apply`. It checks each of the user's words and each note's source, and leaves out what does not hold, with the reason: tell the user each. Give the notes that pass to the note checker, as "Pausing work" says, and keep only those it supports.
|
|
51
|
+
3. **Show it** in full, and ask. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool. Only once the user agrees, call it again with `apply: true`, and tell the user the thread's ID. With Threads set to auto, save it first, then show it with its ID.
|
|
52
|
+
4. **Push.** Offer to push the spec repo, so the thread can be resumed on another machine or by a teammate. Threads are visible to the team once pushed.
|
|
53
|
+
|
|
54
|
+
When the user drops an idea instead, ask for the reason in their words, then call `save_draft` with `type: "thread"`, its `id` and `drop` set to the reason: it is closed, and can still be found.
|
|
55
|
+
|
|
56
|
+
Do not create or edit spec tree files yourself: the BuildKeel tools write every record.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bk-resume
|
|
3
|
+
description: "BuildKeel: Resume paused work: a unit, a change or a thread, by its ID, or pick from what is paused, the most recent first. Run as /bk-resume [nothing, or an ID], e.g. TK-013 or TH-004, only when the user types it."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
BuildKeel's tools are on the MCP server `buildkeel`: call each one with `call_mcp_tool` (`ServerName` `buildkeel`, `ToolName` the tool's name), passing `workspace`, the absolute path of this project's folder. Never read or write the spec tree's files instead. If you have no `call_mcp_tool` tool, tell the user to start a new conversation and stop: never run BuildKeel's server or programs yourself.
|
|
7
|
+
|
|
8
|
+
Whenever a step says to show something and ask about it, write it out in your reply as normal text and end that reply with the question in plain text, calling no tool after it: the user may see nothing you wrote before a tool call. Use your tool for asking a question with choices only for a quick choice with nothing to read, and put in the question itself anything the user needs to choose.
|
|
9
|
+
|
|
10
|
+
Resume paused work with the user: a unit or change, where it was left, or a thread, the exploration it holds.
|
|
11
|
+
|
|
12
|
+
The user typed: whatever follows /bk-resume in the user's message (nothing, if they typed only /bk-resume)
|
|
13
|
+
|
|
14
|
+
**Before anything else**, call the BuildKeel `query` tool with `view: "process"`, and do not show its result. If it says this repository is not set up for BuildKeel, tell the user so, and that /bk-init sets it up, then stop: ask nothing else. Otherwise go on straight away.
|
|
15
|
+
|
|
16
|
+
## What to resume
|
|
17
|
+
|
|
18
|
+
- **Nothing:** call `query` with `view: "paused"` and show the list as it is: each one with who paused it, when, and its next step, the most recent first. Ask which to resume, the most recent as the default. With nothing paused, say so.
|
|
19
|
+
- **An ID:** resume that one.
|
|
20
|
+
|
|
21
|
+
If the spec tree is behind its remote, say so and offer to pull it first (the default), so that work paused on another machine is here.
|
|
22
|
+
|
|
23
|
+
## A unit or change
|
|
24
|
+
|
|
25
|
+
Call `start_work` with its `id`.
|
|
26
|
+
|
|
27
|
+
- **Paused by someone else, or on another machine:** the result says whose work it was and when it was paused. Ask the user to confirm, in their words, such as "Take over Priya's work on TK-013, paused two hours ago?" Only once they confirm, call `start_work` again with `takeOver: true`: the work moves to them, and the handover is recorded. If they decline, change nothing.
|
|
28
|
+
- **Uncommitted changes:** handle them as /bk-build does.
|
|
29
|
+
- **Started:** show the brief it returns first: where things stand, the decisions and dead ends, the open questions, the next step, and any files left uncommitted on another machine. Then go on as /bk-build goes on with a unit or change it has started: ask how to build what is left.
|
|
30
|
+
|
|
31
|
+
## A thread
|
|
32
|
+
|
|
33
|
+
Call `query` with `view: "threads"` and its `id`. Show its brief: the idea, the approaches, the decisions and dead ends, the open questions, and the next thing to discuss, with whose thread it is when someone else kept it. Then let the conversation go where the user takes it: a thread has no stages and no approval. Pausing again adds to it, and capturing it with /bk-capture closes it.
|
|
34
|
+
|
|
35
|
+
Do not create or edit spec tree files yourself: the BuildKeel tools write every record.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bk-review
|
|
3
|
+
description: "BuildKeel: Review the work on a unit or change with fresh reviewers: spec compliance by ID, code quality, and tests that try to break it. The active unit by default. Run as /bk-review [an ID, or a range of commits], e.g. TK-001, CH-012 or main..HEAD; the active unit when left out, only when the user types it."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
BuildKeel's tools are on the MCP server `buildkeel`: call each one with `call_mcp_tool` (`ServerName` `buildkeel`, `ToolName` the tool's name), passing `workspace`, the absolute path of this project's folder. Never read or write the spec tree's files instead. If you have no `call_mcp_tool` tool, tell the user to start a new conversation and stop: never run BuildKeel's server or programs yourself.
|
|
7
|
+
|
|
8
|
+
Whenever a step says to show something and ask about it, write it out in your reply as normal text and end that reply with the question in plain text, calling no tool after it: the user may see nothing you wrote before a tool call. Use your tool for asking a question with choices only for a quick choice with nothing to read, and put in the question itself anything the user needs to choose.
|
|
9
|
+
|
|
10
|
+
Review work with the user, by fresh reviewers who did not write it and do not see this conversation. A review changes no code: it finds, and the user decides what to do about each finding.
|
|
11
|
+
|
|
12
|
+
The user typed: whatever follows /bk-review in the user's message (nothing, if they typed only /bk-review)
|
|
13
|
+
|
|
14
|
+
**Before anything else**, call the BuildKeel `query` tool with `view: "process"`, and do not show its result. If it says this repository is not set up for BuildKeel, tell the user so, and that /bk-init sets it up, then stop: ask nothing else. Otherwise go on straight away.
|
|
15
|
+
|
|
16
|
+
## What to review
|
|
17
|
+
|
|
18
|
+
What the user typed decides it:
|
|
19
|
+
|
|
20
|
+
- **Nothing:** the active unit in this working tree, or in a Spec-driven tree the active change. With neither, ask straight away what to review, offering the units and changes with work on them, from `query` with `view: "status"`.
|
|
21
|
+
- **A unit's or change's ID**, such as TK-001 or CH-012: that unit or change, its own commits only.
|
|
22
|
+
- **A range of commits**, such as `main..HEAD`: those commits. A range belongs to no unit, so its review is shown and never recorded, and there is no spec to judge it against: only the quality reviewer and the break-it agent run.
|
|
23
|
+
|
|
24
|
+
## Review it
|
|
25
|
+
|
|
26
|
+
Say in a line what is reviewed: the unit or change, or the range, and how many commits. Then review it with `kind: "on-demand"`.
|
|
27
|
+
|
|
28
|
+
A review is done by three fresh agents: the spec reviewer, the quality reviewer and the break-it agent. None of them is the agent that wrote the code, and none sees this conversation.
|
|
29
|
+
|
|
30
|
+
1. **The packages.** Call `review` with `action: "input"`, the `id` (and in a change, the `task` when one task is reviewed), and the `kind` of this review: `kind: "after-task"` in a run, `kind: "final"` at finishing, `kind: "on-demand"` when the user asks. It says which reviewers to start, and only those: each reviewer that is switched on, and at finishing only the commits since the last review, with one spec-compliance review of the whole change when its tasks were reviewed in a run. It writes each one's package, the diff and the reviewer's view, to a folder, and prepares the break-it agent's worktree when break-it runs. When it says nothing is to be reviewed, review nothing, and say so in a line, with why.
|
|
31
|
+
2. **The reviewers.** Call `query` with `view: "settings"`, if you have not in this conversation: it names the agent to start for each role, with the model and effort to pass on this host. Start the reviewers the input names: after a task, the spec reviewer and the quality reviewer; at finishing, the final spec reviewer and the final quality reviewer; and the break-it agent. Give each the folder the input names for it and nothing else, and the break-it agent its worktree too. They can run at the same time.
|
|
32
|
+
3. **Record each report as it is,** with `review`, `action: "record"`, the same `id` (and `task`), the `reviewer` (spec, quality or break-it), the `kind` of this review, and the report's lists: its verdicts, findings, proposed additions, what was done well and its verdict, or the break-it agent's failing tests. Never change a finding's severity or wording.
|
|
33
|
+
4. **When a reviewer cannot be started,** follow "When agents can't be started": review it here, as each reviewer's instructions would, and record each report with `by: "author"`. Say in a line that it was reviewed by the author, so it does not count as an independent review.
|
|
34
|
+
5. **Answer each finding.** Check it against the code first: never accept a finding only because a reviewer made it. Then answer it with `review`, `action: "answer"` and the `finding`'s ID:
|
|
35
|
+
- **fixed,** with the `commit` that fixed it;
|
|
36
|
+
- **parked,** once the user agrees to handle it later: record it as a defect found while building the unit with /bk-new defect (in Spec-driven mode, linked to the change), then answer with `parkedAs` set to its ID;
|
|
37
|
+
- **rejected,** with the `evidence`: the code, a test or the spec that shows it is wrong. Show the user each finding you reject, with its evidence.
|
|
38
|
+
|
|
39
|
+
A Low finding may stay open: name it at the end.
|
|
40
|
+
6. **The break-it agent's failing tests** count only through their test. For each, ask the user, recommending one: **a defect found while building** (record it as in "parked", with the test as its regression test) or **a question about the spec**, where the agreed behavior is what is wrong. Tests that pass are discarded, never committed.
|
|
41
|
+
7. **Proposed additions to the spec** are behavior the spec is silent on. Show them apart, never as a requirement not met: the user decides whether to add each, and an addition goes through the same review as any change to the spec.
|
|
42
|
+
|
|
43
|
+
**When agents can't be started,** the same everywhere:
|
|
44
|
+
1. **Say why, once,** in a line: you have no tool for starting agents here, it is turned off, or the model tier the settings name is not available.
|
|
45
|
+
2. **Retry once** when an agent started but failed, before treating agents as unavailable.
|
|
46
|
+
3. **Follow the step's switch:** off, nothing happens; ask, the offer says it would run here, without a fresh reader; auto, or a step with no switch (an implementer or a reviewer), do it here and say so in a line.
|
|
47
|
+
4. **Label what you did here** as done here, not by an independent agent: in what you show, and in the record (`by: "author"` for a review), and present a question or proposal as your own reading.
|
|
48
|
+
5. **Never count it where independence is the point:** a final review done here does not satisfy the review-findings check, so say the work was not independently reviewed.
|
|
49
|
+
|
|
50
|
+
For a range, skip recording: show each reviewer's report as it is, and stop there.
|
|
51
|
+
|
|
52
|
+
## Show it
|
|
53
|
+
|
|
54
|
+
Show each reviewer's report in a few lines: the verdicts by ID, the findings by severity with their files and lines, the failing tests, the proposed additions, and the quality reviewer's verdict. Then say what you checked against the code for each High and Medium finding, and ask the user how to answer them, one at a time, with your recommendation first: fix it now, park it as a defect, or reject it with its evidence. Show it in full in your reply, as normal text: the document, table or list itself. End the message with your question in plain text, and take the user's next message as the answer. Never put what you show inside your question tool.
|
|
55
|
+
|
|
56
|
+
Do not create or edit spec tree files yourself: the BuildKeel tools write every record.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bk-settings
|
|
3
|
+
description: "BuildKeel: Show how this repository is set up: the mode, where the spec tree lives, the process and its gates, or the numbering, the checks, agents and thread offer, and each template with where it comes from. Changes nothing. Run as /bk-settings."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
BuildKeel's tools are on the MCP server `buildkeel`: call each one with `call_mcp_tool` (`ServerName` `buildkeel`, `ToolName` the tool's name), passing `workspace`, the absolute path of this project's folder. Never read or write the spec tree's files instead. If you have no `call_mcp_tool` tool, tell the user to start a new conversation and stop: never run BuildKeel's server or programs yourself.
|
|
7
|
+
|
|
8
|
+
Whenever a step says to show something and ask about it, write it out in your reply as normal text and end that reply with the question in plain text, calling no tool after it: the user may see nothing you wrote before a tool call. Use your tool for asking a question with choices only for a quick choice with nothing to read, and put in the question itself anything the user needs to choose.
|
|
9
|
+
|
|
10
|
+
Call the BuildKeel `query` tool with `view: "settings"`.
|
|
11
|
+
|
|
12
|
+
Show the user the result as it is, in your reply as normal text, with its table: do not summarize or reorder it.
|
|
13
|
+
|
|
14
|
+
If the result says this repository is not set up for BuildKeel, tell the user how to set it up with /bk-init, and stop.
|
|
15
|
+
|
|
16
|
+
Then offer, in plain text at the end of that reply, to show any one template in full, with an example from the list, such as the story or defect template. When the user names one, call `get_template` with its type and show it as it is.
|
|
17
|
+
|
|
18
|
+
The settings are read here, never changed: they live in `buildkeel.yaml` and `templates/` in the spec tree, and the copy paths in this repository's `.buildkeel.yaml`. If the user wants to change one, say which file holds it, and that the change is made there and committed with the spec tree.
|
|
@@ -11,11 +11,13 @@ Show the user their own use of BuildKeel in this spec tree, from the record kept
|
|
|
11
11
|
|
|
12
12
|
The user typed: whatever follows /bk-stats in the user's message (nothing, if they typed only /bk-stats)
|
|
13
13
|
|
|
14
|
+
**Before anything else**, call the BuildKeel `query` tool with `view: "process"`, and do not show its result. If it says this repository is not set up for BuildKeel, tell the user so, and that /bk-init sets it up, then stop: ask nothing else. Otherwise go on straight away.
|
|
15
|
+
|
|
14
16
|
## Choose the period
|
|
15
17
|
|
|
16
18
|
If the user typed a number of days, use it. If they typed off, on, delete or export, change the record as below.
|
|
17
19
|
|
|
18
|
-
If the user typed nothing, ask straight away
|
|
20
|
+
If the user typed nothing, ask straight away: "Which period?" Offer the choices with your tool for asking a question with choices, if you have one:
|
|
19
21
|
|
|
20
22
|
1. **The last 30 days** (the default, listed first).
|
|
21
23
|
2. **The last 7 days.**
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
template: adr
|
|
3
|
+
version: 1
|
|
4
|
+
description: An architecture decision record, for a decision that is hard to reverse, surprising without its context, and the result of a real trade-off. Once accepted it is never edited; a new ADR replaces it.
|
|
5
|
+
fields:
|
|
6
|
+
title: { required: true }
|
|
7
|
+
replaces: { type: link }
|
|
8
|
+
shapes: { type: list }
|
|
9
|
+
sections:
|
|
10
|
+
Context: { required: true }
|
|
11
|
+
Decision: { required: true }
|
|
12
|
+
Alternatives: { required: true }
|
|
13
|
+
Consequences: { required: true }
|
|
14
|
+
Notes: { offered: "Background, links, and anything from a source that fits no other section." }
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Context
|
|
18
|
+
|
|
19
|
+
<!-- The situation and the forces at play that made a decision necessary. -->
|
|
20
|
+
|
|
21
|
+
## Decision
|
|
22
|
+
|
|
23
|
+
<!-- What was decided, in one or two sentences. -->
|
|
24
|
+
|
|
25
|
+
## Alternatives
|
|
26
|
+
|
|
27
|
+
<!-- One line per alternative weighed, with why it was not chosen. -->
|
|
28
|
+
|
|
29
|
+
## Consequences
|
|
30
|
+
|
|
31
|
+
<!-- What becomes easier and what becomes harder, including what the team now has to live with. List the requirements and designs it shapes in the shapes field. -->
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
template:
|
|
3
|
-
version:
|
|
4
|
-
description: A defect.
|
|
2
|
+
template: defect
|
|
3
|
+
version: 3
|
|
4
|
+
description: "A defect: code that does not do what was agreed. Set source to reported (by users, customers or testers; approved before work on it starts) or found (while building or testing; the unit being built is its parent, with the test case that found it)."
|
|
5
5
|
fields:
|
|
6
6
|
title: { required: true }
|
|
7
|
+
source: { required: true }
|
|
7
8
|
parent: { type: link }
|
|
9
|
+
requirement: {}
|
|
8
10
|
testCase: {}
|
|
9
11
|
severity: {}
|
|
10
12
|
scope: { type: list }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
template: design
|
|
3
|
-
version:
|
|
3
|
+
version: 2
|
|
4
4
|
description: How a stage's work is built, and the decisions behind it. Fill in what applies; add an offered section only when the work needs it.
|
|
5
5
|
fields:
|
|
6
6
|
parent: { required: true, type: link }
|
|
@@ -11,6 +11,7 @@ sections:
|
|
|
11
11
|
Design: { required: true, tracked: true }
|
|
12
12
|
Decisions: { tracked: true }
|
|
13
13
|
Risks and trade-offs: {}
|
|
14
|
+
Approaches: { offered: "The approaches considered, the one chosen and why, and the non-goals and things to avoid, from the conversation only." }
|
|
14
15
|
Architecture: { tracked: true, offered: "The components, how they connect, and where each one runs." }
|
|
15
16
|
Data: { tracked: true, offered: "What is stored, its shape, and how it changes over time." }
|
|
16
17
|
Interfaces: { tracked: true, offered: "The APIs, events and contracts other code relies on." }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
template: proposal
|
|
3
|
-
version:
|
|
3
|
+
version: 2
|
|
4
4
|
description: Why a change is made, what it changes, and which capabilities it adds or alters. Its spec changes say exactly how behavior changes.
|
|
5
5
|
fields:
|
|
6
6
|
title: { required: true }
|
|
@@ -11,6 +11,7 @@ sections:
|
|
|
11
11
|
What changes: { required: true }
|
|
12
12
|
Capabilities: { required: true }
|
|
13
13
|
Impact: { required: true }
|
|
14
|
+
Approaches: { offered: "The approaches considered, the one chosen and why, and the non-goals and things to avoid, from the conversation only." }
|
|
14
15
|
Non-goals: { offered: "What the change deliberately leaves out, so nobody builds it by mistake." }
|
|
15
16
|
Open questions: { offered: "Questions left open, each with what it is about, to settle later. They do not block approval: the approval summary lists them." }
|
|
16
17
|
Notes: { offered: "Background, links, and anything from a source that fits no other section." }
|