buildkeel 0.5.0 → 0.7.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.
Files changed (65) hide show
  1. package/THIRD-PARTY-NOTICES +3 -3
  2. package/antigravity/THIRD-PARTY-NOTICES +3 -3
  3. package/antigravity/agents/bk-break-it-flash.md +25 -0
  4. package/antigravity/agents/bk-break-it.md +25 -0
  5. package/antigravity/agents/bk-designer-flash.md +20 -0
  6. package/antigravity/agents/bk-designer.md +20 -0
  7. package/antigravity/agents/bk-edge-cases-flash.md +31 -0
  8. package/antigravity/agents/bk-edge-cases.md +31 -0
  9. package/antigravity/agents/bk-final-quality-reviewer-flash.md +47 -0
  10. package/antigravity/agents/bk-final-quality-reviewer.md +47 -0
  11. package/antigravity/agents/bk-final-spec-reviewer-flash.md +37 -0
  12. package/antigravity/agents/bk-final-spec-reviewer.md +37 -0
  13. package/antigravity/agents/bk-implementer-flash.md +40 -0
  14. package/antigravity/agents/bk-implementer.md +40 -0
  15. package/antigravity/agents/bk-note-checker-flash.md +26 -0
  16. package/antigravity/agents/bk-note-checker.md +26 -0
  17. package/antigravity/agents/bk-quality-reviewer-flash.md +47 -0
  18. package/antigravity/agents/bk-quality-reviewer.md +47 -0
  19. package/antigravity/agents/bk-readiness-reader-flash.md +28 -0
  20. package/antigravity/agents/bk-readiness-reader.md +28 -0
  21. package/antigravity/agents/bk-spec-reviewer-flash.md +37 -0
  22. package/antigravity/agents/bk-spec-reviewer.md +37 -0
  23. package/antigravity/bin/bk-launch.cmd +6 -11
  24. package/antigravity/bin/bk-start.cjs +4 -1
  25. package/antigravity/dist/hooks/main.js +127 -118
  26. package/antigravity/dist/server/main.js +677 -398
  27. package/antigravity/package.json +1 -1
  28. package/antigravity/plugin.json +1 -1
  29. package/antigravity/practices/P-01.md +7 -0
  30. package/antigravity/practices/P-02.md +7 -0
  31. package/antigravity/practices/P-03.md +7 -0
  32. package/antigravity/practices/P-04.md +7 -0
  33. package/antigravity/practices/P-05.md +7 -0
  34. package/antigravity/practices/P-06.md +7 -0
  35. package/antigravity/practices/P-07.md +7 -0
  36. package/antigravity/practices/P-08.md +7 -0
  37. package/antigravity/practices/P-09.md +7 -0
  38. package/antigravity/practices/P-10.md +7 -0
  39. package/antigravity/practices/P-11.md +7 -0
  40. package/antigravity/practices/P-12.md +7 -0
  41. package/antigravity/practices/P-13.md +7 -0
  42. package/antigravity/practices/P-14.md +7 -0
  43. package/antigravity/practices/P-15.md +7 -0
  44. package/antigravity/rules/buildkeel.md +9 -9
  45. package/antigravity/skills/bk-approve/SKILL.md +2 -2
  46. package/antigravity/skills/bk-build/SKILL.md +137 -21
  47. package/antigravity/skills/bk-capture/SKILL.md +45 -12
  48. package/antigravity/skills/bk-done/SKILL.md +52 -11
  49. package/antigravity/skills/bk-impact/SKILL.md +1 -1
  50. package/antigravity/skills/bk-init/SKILL.md +19 -15
  51. package/antigravity/skills/bk-migrate/SKILL.md +12 -4
  52. package/antigravity/skills/bk-new/SKILL.md +3 -3
  53. package/antigravity/skills/bk-onboard/SKILL.md +4 -2
  54. package/antigravity/skills/bk-pause/SKILL.md +56 -0
  55. package/antigravity/skills/bk-resume/SKILL.md +35 -0
  56. package/antigravity/skills/bk-review/SKILL.md +56 -0
  57. package/antigravity/skills/bk-settings/SKILL.md +2 -2
  58. package/antigravity/templates/adr.md +31 -0
  59. package/antigravity/templates/design.md +2 -1
  60. package/antigravity/templates/spec-driven/proposal.md +2 -1
  61. package/antigravity/templates/spec-driven/tasks.md +13 -5
  62. package/antigravity/templates/task.md +23 -2
  63. package/antigravity/templates/thread.md +41 -0
  64. package/cli.mjs +85 -85
  65. package/package.json +1 -1
@@ -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."
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.
@@ -1,6 +1,6 @@
1
1
  ---
2
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, and each template with where it comes from. Changes nothing. Run as /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
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.
@@ -15,4 +15,4 @@ If the result says this repository is not set up for BuildKeel, tell the user ho
15
15
 
16
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
17
 
18
- The settings are read here, never changed: they live in `buildkeel.yaml` and `templates/` in the spec tree. 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.
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.
@@ -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,6 +1,6 @@
1
1
  ---
2
2
  template: design
3
- version: 1
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: 1
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." }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  template: tasks
3
- version: 1
3
+ version: 2
4
4
  description: The work of a change, as numbered tasks in groups ordered so that each builds on the ones before. A task is ticked once its verification passes.
5
5
  fields:
6
6
  parent: { required: true, type: link }
@@ -9,9 +9,17 @@ fields:
9
9
  ## 1. <What this group delivers>
10
10
 
11
11
  <!--
12
- One checkbox per task, numbered within its group, each saying what is done and how its completion is verified.
13
- Each group includes the tests and documentation its own work needs. Tick a task only once its verification passed.
12
+ One checkbox per task, numbered within its group, saying what is done, with its lines under it: Files (what it creates, changes and tests), Uses (each with where it comes from: an earlier task, a file, or a library at the version the project depends on), Delivers (what later tasks rely on, with its signature), and Verify (the command and the result expected, naming the scenarios it checks). Interfaces: none stands for Uses and Delivers when a task uses and delivers nothing. Leave the code itself out.
13
+ Each group includes the tests and documentation its own work needs. Tick a task only once its verification passed; its Built line is written then.
14
14
 
15
- - [ ] 1.1 Add the issue time to reset tokens. Verify: token tests for a new and an old token.
16
- - [ ] 1.2 Refuse links older than 30 minutes. Verify: the "Expired link" scenario test (AUTH-R3-S1).
15
+ - [ ] 1.1 Add the issue time to reset tokens.
16
+ Files: change src/auth/token.ts; test test/auth/token.test.ts
17
+ Uses: signToken (from src/auth/sign.ts)
18
+ Delivers: issuedAt on ResetToken
19
+ Verify: npx vitest run test/auth/token.test.ts, where the tests for a new and an old token pass
20
+ - [ ] 1.2 Refuse links older than 30 minutes.
21
+ Files: change src/auth/reset.ts; test test/auth/reset.test.ts
22
+ Uses: issuedAt on ResetToken (from 1.1)
23
+ Delivers: isExpired(token: ResetToken, now: Date): boolean
24
+ Verify: npx vitest run test/auth/reset.test.ts, where [AUTH-R3-S1] passes
17
25
  -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  template: task
3
- version: 1
3
+ version: 2
4
4
  description: A piece of a story built in one code repository.
5
5
  fields:
6
6
  title: { required: true }
@@ -9,13 +9,34 @@ fields:
9
9
  scope: { type: list }
10
10
  sections:
11
11
  Description: { required: true, tracked: true }
12
+ Files: { required: true }
13
+ Uses: { required: true }
14
+ Delivers: { required: true }
15
+ Verify: { required: true }
16
+ Interfaces: { offered: "none, in place of Uses and Delivers, for a task that uses and delivers nothing." }
12
17
  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." }
13
18
  Notes: {}
14
19
  ---
15
20
 
16
21
  ## Description
17
22
 
18
- <!-- What to build. Name the repository in the repo field, and list the paths it will touch in the scope field when you know them. -->
23
+ <!-- What to build. Name the repository in the repo field, and list the paths it will touch in the scope field when you know them. Leave the code itself out: only what the implementer cannot decide alone, such as names, signatures and values from the spec. -->
24
+
25
+ ## Files
26
+
27
+ <!-- The files it creates, changes and tests, found from the code, one per line, such as "- create: src/auth/expiry.ts", "- change: src/auth/reset.ts" and "- test: test/auth/reset.test.ts". -->
28
+
29
+ ## Uses
30
+
31
+ <!-- What it uses, each with where it comes from (an earlier task, a file, or a library at the version the project depends on), such as "- issuedAt on ResetToken (from TK-011)", "- parseToken (from src/auth/tokens.ts)" or "- messages.create (from twilio 4.23.0)"; none when it uses nothing. -->
32
+
33
+ ## Delivers
34
+
35
+ <!-- What later tasks rely on, with its signature, such as "- isExpired(token: ResetToken, now: Date): boolean", or none; this is the plan, and what is built is recorded when the task is finished. -->
36
+
37
+ ## Verify
38
+
39
+ <!-- The command to run and the result expected, naming the test cases it checks, such as "npx vitest run test/auth/reset.test.ts, where [US-012-TC3] passes". -->
19
40
 
20
41
  ## Notes
21
42
 
@@ -0,0 +1,41 @@
1
+ ---
2
+ template: thread
3
+ version: 1
4
+ description: A paused exploration with no unit or change yet, saved so it can be resumed. It has no stages and no approval; it ends when it is captured or dropped.
5
+ fields:
6
+ title: { required: true }
7
+ sections:
8
+ Intent: { required: true }
9
+ Approaches: { required: true }
10
+ Decisions and constraints: { required: true }
11
+ Dead ends and open questions: { required: true }
12
+ Next: { required: true }
13
+ The user's words: { required: true }
14
+ Code read: { offered: "Pointers to the code that was read, one per line: the file, with the lines or names that mattered." }
15
+ Spikes: { offered: "Each spike: its branch, or the files it left, and what it showed." }
16
+ Notes: { offered: "Background, links, and anything that fits no other section." }
17
+ ---
18
+
19
+ ## Intent
20
+
21
+ <!-- What the user wants to achieve, and the idea as it stands. -->
22
+
23
+ ## Approaches
24
+
25
+ <!-- The approaches discussed, and which way the discussion is leaning. "None weighed yet" when there were none. -->
26
+
27
+ ## Decisions and constraints
28
+
29
+ <!-- What was settled, and the limits the work must respect. "None yet" when there are none. -->
30
+
31
+ ## Dead ends and open questions
32
+
33
+ <!-- What was tried or ruled out, with why, and the questions still open. -->
34
+
35
+ ## Next
36
+
37
+ <!-- The next thing to discuss when the thread is resumed. -->
38
+
39
+ ## The user's words
40
+
41
+ <!-- The user's own statements that matter, quoted, kept apart from the agent's proposals. -->