buildkeel 0.7.1 → 0.7.2
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/README.md +23 -4
- package/antigravity/dist/hooks/main.js +208 -143
- package/antigravity/dist/server/main.js +621 -575
- package/antigravity/package.json +1 -1
- package/antigravity/plugin.json +1 -1
- package/cli.mjs +151 -142
- package/cursor/.cursor-plugin/plugin.json +16 -0
- package/cursor/LICENSE +49 -0
- package/cursor/THIRD-PARTY-NOTICES +231 -0
- package/cursor/agents/bk-break-it.md +17 -0
- package/cursor/agents/bk-designer.md +12 -0
- package/cursor/agents/bk-edge-cases.md +23 -0
- package/cursor/agents/bk-final-quality-reviewer.md +39 -0
- package/cursor/agents/bk-final-spec-reviewer.md +29 -0
- package/cursor/agents/bk-implementer.md +32 -0
- package/cursor/agents/bk-note-checker.md +18 -0
- package/cursor/agents/bk-quality-reviewer.md +39 -0
- package/cursor/agents/bk-readiness-reader.md +20 -0
- package/cursor/agents/bk-spec-reviewer.md +29 -0
- package/cursor/agents/index.json +99 -0
- package/cursor/bin/bk-launch +34 -0
- package/cursor/bin/bk-launch.cmd +36 -0
- package/cursor/bin/bk-start.cjs +28 -0
- package/cursor/dist/hooks/main.js +232 -0
- package/cursor/dist/server/main.js +834 -0
- package/cursor/hooks/hooks.json +36 -0
- package/cursor/mcp.json +24 -0
- package/cursor/package.json +8 -0
- package/cursor/practices/P-01.md +7 -0
- package/cursor/practices/P-02.md +7 -0
- package/cursor/practices/P-03.md +7 -0
- package/cursor/practices/P-04.md +7 -0
- package/cursor/practices/P-05.md +7 -0
- package/cursor/practices/P-06.md +7 -0
- package/cursor/practices/P-07.md +7 -0
- package/cursor/practices/P-08.md +7 -0
- package/cursor/practices/P-09.md +7 -0
- package/cursor/practices/P-10.md +7 -0
- package/cursor/practices/P-11.md +7 -0
- package/cursor/practices/P-12.md +7 -0
- package/cursor/practices/P-13.md +7 -0
- package/cursor/practices/P-14.md +7 -0
- package/cursor/practices/P-15.md +7 -0
- package/cursor/project/commands/bk-approve.md +50 -0
- package/cursor/project/commands/bk-build.md +248 -0
- package/cursor/project/commands/bk-capture.md +207 -0
- package/cursor/project/commands/bk-done.md +112 -0
- package/cursor/project/commands/bk-impact.md +48 -0
- package/cursor/project/commands/bk-init.md +92 -0
- package/cursor/project/commands/bk-migrate.md +71 -0
- package/cursor/project/commands/bk-models.md +9 -0
- package/cursor/project/commands/bk-new.md +121 -0
- package/cursor/project/commands/bk-onboard.md +134 -0
- package/cursor/project/commands/bk-pause.md +49 -0
- package/cursor/project/commands/bk-resume.md +28 -0
- package/cursor/project/commands/bk-review.md +49 -0
- package/cursor/project/commands/bk-settings.md +11 -0
- package/cursor/project/commands/bk-stats.md +33 -0
- package/cursor/project/commands/bk-status.md +11 -0
- package/cursor/project/rules/buildkeel.mdc +80 -0
- package/cursor/skills/buildkeel/SKILL.md +80 -0
- package/cursor/templates/adhoc.md +15 -0
- package/cursor/templates/adr.md +31 -0
- package/cursor/templates/defect.md +35 -0
- package/cursor/templates/design.md +49 -0
- package/cursor/templates/epic.md +31 -0
- package/cursor/templates/idea.md +35 -0
- package/cursor/templates/spec-driven/capability.md +28 -0
- package/cursor/templates/spec-driven/proposal.md +41 -0
- package/cursor/templates/spec-driven/spec-change.md +43 -0
- package/cursor/templates/spec-driven/tasks.md +25 -0
- package/cursor/templates/story.md +31 -0
- package/cursor/templates/task.md +43 -0
- package/cursor/templates/test-plan.md +29 -0
- package/cursor/templates/thread.md +41 -0
- package/package.json +4 -2
- package/pi/dist/hooks/main.js +208 -143
- package/pi/dist/server/main.js +621 -575
- package/pi/extension.js +132 -129
- package/pi/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
BuildKeel: Move a Spec-driven tree to Full SDLC, area by area, move a spec tree kept in this repository to a repository of its own, or upgrade a spec tree in an older format, without touching approved versions. Only the user starts it, by typing it.
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
## Upgrade the format first
|
|
8
|
+
|
|
9
|
+
Call the BuildKeel `manage` tool with `action: "migrate"`, without `apply`.
|
|
10
|
+
|
|
11
|
+
- If it says the plugin needs an update first, say so and stop.
|
|
12
|
+
- If it lists what changes (the working files and `buildkeel.yaml`, in one commit, with frozen versions and records left exactly as they are), show it as it is and ask, with your tool for asking a question with choices: **Migrate** (the default) or **Not now**. Only when the user confirms, call `manage` again with `action: "migrate"` and `apply: true`, and show the result as it is. Remind the user to push the spec repo, and that teammates need this version of BuildKeel, or a later one, to work in the tree. Then stop.
|
|
13
|
+
- If it says there is nothing to migrate, go on below.
|
|
14
|
+
|
|
15
|
+
## Move the spec tree to its own repository
|
|
16
|
+
|
|
17
|
+
When the spec tree is kept inside this code repository (the session report, or `query` with `view: "settings"`, says where it lives), and the user asked to move it, or asked what /bk-migrate can do: explain in a line that a repository of its own lets other code repositories and teammates share it, and that it moves with its whole history. Ask for its folder, outside this repository, such as `../specs`: a new or empty folder, or an empty repository they cloned. Ask, with your tool for asking a question with choices, whether to also create it as a private GitHub repository with their own gh sign-in (**No** is the default), and its name, such as `acme/payments-specs`, if so.
|
|
18
|
+
|
|
19
|
+
Call `manage` with `action: "move-tree"`, the `path` and, only on a yes, `github`, without `apply`, and show the steps it returns as they are. If it refuses, for changes not committed in the tree for example, show why and stop. Only when the user agrees, call it again with `apply: true`, and show the result as it is.
|
|
20
|
+
|
|
21
|
+
## Move a Spec-driven tree to Full SDLC
|
|
22
|
+
|
|
23
|
+
If BuildKeel's session report, or `query` with `view: "process"`, says this spec tree follows Full SDLC, say that the tree is up to date and there is nothing to move, and stop.
|
|
24
|
+
|
|
25
|
+
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**.
|
|
26
|
+
|
|
27
|
+
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"`.
|
|
28
|
+
|
|
29
|
+
Topics for this step, in this order:
|
|
30
|
+
|
|
31
|
+
- **stages**: what each stage is called, and any stage added between the business idea and the user story, with where it sits.
|
|
32
|
+
- **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.
|
|
33
|
+
- **prefixes**: the ID prefix and digits of each stage and kind, such as `US-001`, `FEAT-0001` or `PROJ-12`.
|
|
34
|
+
- **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.
|
|
35
|
+
- **test-plans**: whether a task's own test plan is recorded as it is saved (the default) or approved like any other plan.
|
|
36
|
+
- **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.
|
|
37
|
+
|
|
38
|
+
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.
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
- **Used as it is**: every topic is settled. Pass `settled: ["all"]`, and go on to the review below.
|
|
43
|
+
- **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.
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
**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.
|
|
48
|
+
|
|
49
|
+
- **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.
|
|
50
|
+
- **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.
|
|
51
|
+
|
|
52
|
+
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.
|
|
53
|
+
|
|
54
|
+
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.
|
|
55
|
+
|
|
56
|
+
### Converting area by area
|
|
57
|
+
|
|
58
|
+
`query` with `view: "onboarding"` shows the conversion area by area.
|
|
59
|
+
|
|
60
|
+
1. **Map the areas.** Propose areas from the capability specs (`query`, `view: "capabilities"`), each holding one or more of them, as a table with what each covers. Ask the user to agree or change it, with the table 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. Write the map with `manage`, `action: "map"`, `map: "set"` and each area's `capabilities`.
|
|
61
|
+
2. **For each area**, in the map's order, the next one as the default, with **Stop** as a choice:
|
|
62
|
+
- **Its sources** are its capability specs and the archived changes that wrote them (`query`, `view: "changes"`), each change kept as a source with its ID as the key. Call `query` with `view: "process"` for the stages and the documents each requires, and `view: "tree"` for what exists.
|
|
63
|
+
- **Propose** a table of the artifacts the area needs, top down, in the team's stage names: from the business idea down to the story, with the documents the process requires of each. Requirements become acceptance criteria and scenarios test cases, wherever they fit the stages; nothing maps one to one. Ask: **Draft them all** (the default), **Change the plan**, **Skip this area** or **Stop**, with the table 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.
|
|
64
|
+
- **Draft** top down, parents before children, each as version 0 with `save_draft` and `version: 0`, its sources in `sources`. Call `get_template` once for each type you draft. Add nothing the sources do not support; ask the user, one question at a time, about each required section nothing supports, with **Leave it empty** as a choice. A required document no source provides, such as a test plan, is drafted as version 1.
|
|
65
|
+
- **Review and approve:** show what was drafted as a table: ID, title, version, the sources kept, and the sections left empty. Call `approve` with `ids` set to all of them and `onboard: true`, without `apply`, and ask whether to approve them, with the table and the result 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.
|
|
66
|
+
- **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.
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
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.
|
|
70
|
+
|
|
71
|
+
Do not change spec tree files yourself; the BuildKeel tools do all of it.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
BuildKeel: Choose the model and effort for each of BuildKeel's agents on this host, from the models you can use: your own choice, kept on this machine. Roles your team set stay as the team set them. Only the user starts it, by typing it.
|
|
2
|
+
|
|
3
|
+
Call the BuildKeel `query` tool with `view: "models"`. 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. Otherwise show its "Now" list to the user as it is, in your reply as normal text, with the models to choose from.
|
|
4
|
+
|
|
5
|
+
Then ask about each group as the result says, one group per question, with your tool for asking a question with choices: the group's current choice first, then "Same as the previous group" (from the second group on), then each model the result lists, and "Each one separately", which asks that group's agents one by one. Skip a group whose agents the team set, and say in a line that the team set them. Then ask the effort for each group the same way, the current one first; on Antigravity there is none to ask.
|
|
6
|
+
|
|
7
|
+
When every group is answered, call `manage` with `action: "models"` and `models`, one entry for each agent whose choice changed (its `role`, or "handoff" for the Principal handoff round, its `model` and its `effort`), without `apply`. Show the table it returns. 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 the user agrees, call it again with `apply: true`, and show the result.
|
|
8
|
+
|
|
9
|
+
These are the user's own choices, in their own `~/.buildkeel/settings.yaml`, never committed. To set models for the whole team, the team changes `agents` in the spec tree's `buildkeel.yaml` instead: say so if the user asks.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
BuildKeel: Draft an artifact, break a parent down into drafts of its children, or record a defect.
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
The user typed: whatever follows /bk-new in the user's message (nothing, if they typed only /bk-new)
|
|
6
|
+
|
|
7
|
+
**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.
|
|
8
|
+
|
|
9
|
+
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".
|
|
10
|
+
|
|
11
|
+
## If the user typed nothing
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
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`.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
## Work out what to draft
|
|
20
|
+
|
|
21
|
+
- **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.
|
|
22
|
+
- **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.
|
|
23
|
+
- **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.
|
|
24
|
+
- **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.
|
|
25
|
+
- **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.
|
|
26
|
+
- **What it should cover**: for a single draft, if the user has not said what it is about, ask before writing. Offer suggestions drawn from the parent, but do not choose the requirement for them. A breakdown needs no such question: its scope is the parent's.
|
|
27
|
+
- **Code nothing describes yet**: when the artifact changes how code that already exists behaves, such as a story or task that changes something already built, work out which files it will change and call `query` with `view: "describes"` and their `paths`. If nothing describes the behavior it changes, say so in one sentence, and ask with your tool for asking a question with choices: **Draft a version 0 of what it changes first** (the default, listed first): how that code works today, so the change has a "before"; or **Draft only the new artifact**. With version 0, draft it first (see "Version 0" below), then the requested artifact: as its version 1 when it changes the same behavior, or under it.
|
|
28
|
+
|
|
29
|
+
Ask one question at a time, with your recommendation, and only for what you cannot work out.
|
|
30
|
+
|
|
31
|
+
## Read before writing
|
|
32
|
+
|
|
33
|
+
1. Call `get_template` for the type. Your draft must contain every field and section the template declares, in that structure.
|
|
34
|
+
2. Call `query` with `view: "artifact"` and the parent's ID, and read it. For a breakdown, also read the parent's own parent when it helps.
|
|
35
|
+
3. Read the user's material, if any: the file, the pasted text, or what your tools return for the issue or page they named.
|
|
36
|
+
|
|
37
|
+
## Write each draft
|
|
38
|
+
|
|
39
|
+
- Fill every section with real content. Remove the template's guidance comments.
|
|
40
|
+
- Write `{{id}}` wherever the artifact's own ID goes: `id: {{id}}`. BuildKeel assigns the ID.
|
|
41
|
+
- Write each new numbered entry with `{{new}}` as its number: `- **{{id}}-AC{{new}}** ...` or `### {{id}}-TC{{new}} ...`. BuildKeel numbers them in order. When you revise an artifact, keep the ID of every entry that already has one, and write `{{new}}` for entries you add: a removed entry's ID is never given to a new one.
|
|
42
|
+
- Set `parent` to the parent's ID. BuildKeel pins it to the parent's approved version.
|
|
43
|
+
- Keep each **Summary** to two or three sentences that stand on their own: it is what the agent later reads about this artifact when working further down.
|
|
44
|
+
- Acceptance criteria are specific and testable, one behavior each.
|
|
45
|
+
- Save it with `save_draft` (type and content). To change a draft you already saved, pass its `id`.
|
|
46
|
+
|
|
47
|
+
## Version 0
|
|
48
|
+
|
|
49
|
+
Version 0 describes what code already does, as if BuildKeel had been used from the start, so a change to it has a "before". Draft it with `save_draft` and `version: 0`; to add one to an artifact that already exists, pass its `id` too. Name the paths it covers in its `scope`.
|
|
50
|
+
|
|
51
|
+
- 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.
|
|
52
|
+
- Describe only what the change touches.
|
|
53
|
+
- 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.
|
|
54
|
+
- 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.
|
|
55
|
+
- 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.
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
## Test plans
|
|
60
|
+
|
|
61
|
+
A test plan belongs to one artifact (its `parent`), and every test case has a `covers:` line saying what it checks. A test plan has no `id` field: its frontmatter is only its `parent`, and it is named after that artifact, such as `US-001-TP`.
|
|
62
|
+
|
|
63
|
+
- **A story's plan** covers the story's acceptance criteria, such as `covers: [{{id}}-AC1]`. Every criterion must be covered, or the plan cannot be approved.
|
|
64
|
+
- **A task's plan** covers the task itself (its ID, such as `covers: [TK-047]`) and/or its story's criteria. Unless the process approves task plans, it is recorded, not approved: each save that passes its checks, once the task is approved, becomes its next version. The story's test cases already apply to the task. Draft a plan for the task whenever its tests will not each be one of those story test cases: a building block such as a token store or a data model, a migration, or a refactor. A task without a plan of its own can be finished only when at least one of its tests is tagged with a story test case and passes.
|
|
65
|
+
- **An epic's plan** (its integration test plan) covers stories under the epic, or their criteria.
|
|
66
|
+
- **A business idea's plan** (its end-to-end test plan) covers epics under the idea, or the idea's goals.
|
|
67
|
+
|
|
68
|
+
To see what a plan covers and what it leaves out, call `query` with `view: "coverage"` and the artifact's ID.
|
|
69
|
+
|
|
70
|
+
## Design documents
|
|
71
|
+
|
|
72
|
+
A design document says how an artifact's work is built, usually an epic's. It belongs to one artifact (its `parent`), has no `id` field, and is named after it, such as `EP-01-DD`. Its template keeps a short skeleton: fill in what applies, and add an offered section (`get_template` lists them, such as Rollout and rollback) only when the work needs it. The summary, context and design are required: ask for whichever the user's material does not give.
|
|
73
|
+
|
|
74
|
+
The process may require other documents of a stage, such as a team's threat model: draft them the same way, with their own template.
|
|
75
|
+
|
|
76
|
+
## Breakdowns
|
|
77
|
+
|
|
78
|
+
- **Stories from an epic**: draft several stories that together deliver the epic's scope, each with acceptance criteria. For each story, also draft its test plan with `save_draft` (type `test-plan`, parent set to the story's draft ID), with test cases written as `### {{id}}-TC{{new}} ...` and a `covers:` line listing the acceptance criteria each one checks. Every acceptance criterion must be covered by at least one test case.
|
|
79
|
+
- **Epics from a business idea**, or **tasks from a story**: draft the children the same way. A task names the code repository it is built in (`repo`) and, when you can tell, the paths it will touch (`scope`). Tasks are drafted from a story's latest approved version when it has one.
|
|
80
|
+
- **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}}]`.
|
|
81
|
+
- 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.
|
|
82
|
+
|
|
83
|
+
## Defects
|
|
84
|
+
|
|
85
|
+
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]", ...)`.
|
|
86
|
+
|
|
87
|
+
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.
|
|
88
|
+
|
|
89
|
+
**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:
|
|
90
|
+
|
|
91
|
+
- **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`.
|
|
92
|
+
- **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.
|
|
93
|
+
- **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.
|
|
94
|
+
- **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.
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
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`.
|
|
99
|
+
2. **Where it belongs.**
|
|
100
|
+
- **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.
|
|
101
|
+
- **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".
|
|
102
|
+
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".
|
|
103
|
+
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.
|
|
104
|
+
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.
|
|
105
|
+
|
|
106
|
+
## Finish
|
|
107
|
+
|
|
108
|
+
List every draft you saved, with its ID and title, and anything `save_draft` reported as still missing. Offer to fix what is missing or to revise any draft. Remind the user that drafts are approved with /bk-approve; a task's own test plan, when `save_draft` says it is recorded, needs no approval.
|
|
109
|
+
|
|
110
|
+
Do not create or edit spec tree files yourself; `save_draft` does all writing.
|
|
111
|
+
|
|
112
|
+
## In a Spec-driven tree
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
|
|
116
|
+
- **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.
|
|
117
|
+
- **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.
|
|
118
|
+
- **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.
|
|
119
|
+
- **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.
|
|
120
|
+
- Ask one question at a time, for what you cannot work out. If the user asks to go one artifact at a time, save and show each before the next.
|
|
121
|
+
- Finish by listing what was saved and anything `save_draft` lists as worth fixing, and offer /bk-build with the change's ID.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
BuildKeel: Document code that existed before BuildKeel, area by area: map the code, then draft each area for people to review and approve.
|
|
2
|
+
|
|
3
|
+
Document the code that existed before BuildKeel with the user, one capability area at a time. People lead it: you propose and draft, the user corrects, completes and approves, and nothing is approved without them. They can stop after any area and carry on later; whatever they leave is documented as work touches it.
|
|
4
|
+
|
|
5
|
+
What describes code from before BuildKeel is version 0 of its artifact: the artifact as it would read had BuildKeel been used from the start, drafted from the code and from the material the user brings.
|
|
6
|
+
|
|
7
|
+
The user typed: whatever follows /bk-onboard in the user's message (nothing, if they typed only /bk-onboard)
|
|
8
|
+
|
|
9
|
+
**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.
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
## Choose what to do
|
|
14
|
+
|
|
15
|
+
Call the BuildKeel `query` tool with `view: "onboarding"`; it changes nothing. Then ask straight away, the default listed first, with what the view said 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.
|
|
16
|
+
|
|
17
|
+
- When there is a map: **Continue with an area**, **Adjust the map**, **Fill in what onboarding left empty** (only when the view lists anything), **Stop**. When the user continues, ask which area, as in "Choose an area" below.
|
|
18
|
+
- When there is none: **Map the code** (the default), **Fill in what onboarding left empty** (only when the view lists anything), **Stop**.
|
|
19
|
+
|
|
20
|
+
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.
|
|
21
|
+
|
|
22
|
+
Topics for this step, for each area, in this order:
|
|
23
|
+
|
|
24
|
+
- **the artifacts** the area needs, and the kind of each where a stage holds more than one;
|
|
25
|
+
- **each disagreement** between a source and the code, or between two sources;
|
|
26
|
+
- **each required section** nothing supports.
|
|
27
|
+
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
## Map the code
|
|
31
|
+
|
|
32
|
+
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.
|
|
33
|
+
2. Propose capability areas: what the product does, in the words its users would use ("Password reset", "Invoicing"), not one area per folder. Give each the paths it covers, its repository when the tree serves several, and one line on what it does. Make them a table, with a column for the area, its paths and what it does, in the order you recommend onboarding them, and say why in a sentence.
|
|
34
|
+
3. Ask: **Use this map** (the default), **Merge, split or rename areas**, or **Stop**, with the table and that sentence in your reply, so the user sees what is mapped to what before choosing. 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. Take in each change, and ask again with the whole table.
|
|
35
|
+
4. Once the user agrees, write the map with `manage`, `action: "map"`, `map: "set"` and the `areas`. Later changes to a written map use `map: "merge"`, `"split"` or `"rename"`. Then ask which area to onboard, as in "Choose an area", with the table `manage` returns, 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.
|
|
36
|
+
|
|
37
|
+
## Choose an area
|
|
38
|
+
|
|
39
|
+
Offer each area that is not onboarded yet as its own choice, in the map's order, so the user picks among all of them, never between your pick and stopping alone. Mark the next one in the map's order as the default, and add **Stop**. When there are more areas than your host's choices allow, list the first ones and let the user type another area's name.
|
|
40
|
+
|
|
41
|
+
## Onboard an area
|
|
42
|
+
|
|
43
|
+
### 1. Find out what there is
|
|
44
|
+
|
|
45
|
+
- Call `query` with `view: "onboarding"`. When the area is partly done, call `query` with `view: "describes"` and its files: draft only what nothing describes yet.
|
|
46
|
+
- Read the code under the area's paths as it was at the baseline commit, which `buildkeel.yaml` names for each repository (`git show <baseline>:<path>`): version 0 describes the code before BuildKeel.
|
|
47
|
+
- Call `query` with `view: "process"` for the stages and the documents each requires, and `view: "tree"` for where the area fits, such as under an existing business idea or epic.
|
|
48
|
+
- Ask the user what they have about this area: a project or epic in their issue tracker, wiki pages, documents, or what they know. Read what they point to through their own tools; BuildKeel connects to no other tool. When you cannot reach it, ask them to paste it, and do not suggest setting up a connection. If they have nothing, draft from the code and from what they tell you.
|
|
49
|
+
|
|
50
|
+
### 2. Propose what the area needs
|
|
51
|
+
|
|
52
|
+
Show a table of the artifacts the area needs, top down, in the team's stage names, each existing or to draft:
|
|
53
|
+
|
|
54
|
+
| Level | Kind | Artifact | Version | From |
|
|
55
|
+
|---|---|---|---|---|
|
|
56
|
+
| Business idea | business idea | BI-01 "Self-service account recovery" | exists | |
|
|
57
|
+
| Epic | epic | "Password reset" | version 0 | the code, Confluence "Reset design" |
|
|
58
|
+
| Design document | | of that epic | version 1 | the code: no source has one |
|
|
59
|
+
| Story | user story | "Reset by email" | version 0 | the code, PAY-12 |
|
|
60
|
+
| Story | feature | "Reset by text" | version 0 | the code, PAY-20, labelled a feature |
|
|
61
|
+
| Test plan | | of each story | version 1 | one test case per criterion |
|
|
62
|
+
| Task | task | PAY-14 "Email template" | version 0 | finished in Jira |
|
|
63
|
+
| Left out | | PAY-31 "Reset by security question" | | open in Jira: drafted with /bk-new when someone takes it up |
|
|
64
|
+
|
|
65
|
+
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.
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
- Document every stage from the business idea down to the story, with the documents the process requires of each.
|
|
70
|
+
- 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.
|
|
71
|
+
- 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.
|
|
72
|
+
- When an artifact in BuildKeel already describes part of the area, see "Version 0 under an existing artifact" below.
|
|
73
|
+
|
|
74
|
+
Ask: **Draft them all** (the default), **Change the plan**, **Skip this area**, or **Stop**, with the table 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.
|
|
75
|
+
|
|
76
|
+
### 3. Draft everything
|
|
77
|
+
|
|
78
|
+
Only once the user agrees. Draft top down, parents before children, so each child names its parent's draft ID. Call `get_template` once for each type you draft, and follow it.
|
|
79
|
+
|
|
80
|
+
**Each version 0**, with `save_draft` and `version: 0`:
|
|
81
|
+
|
|
82
|
+
- Fill the template's sections from the code and the sources, rewording what they say into the template's form, such as a ticket's description written as testable criteria. Add nothing they do not support. Supported means the code or a source says it; a plausible guess is not support. Who a story is for and why, a business idea's problem and goals, and a design's context are rarely in the code or a ticket: write a story's Story section only from a source or the user that says who wants it and why, and otherwise ask, as below.
|
|
83
|
+
- Name the paths it covers in its `scope`: an epic and a story always do.
|
|
84
|
+
- 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.
|
|
85
|
+
- Before drafting, go through every behavior each source states, such as each sentence of a ticket's description, and check it against the code. Each place they differ is a disagreement, however small: a ticket saying "rounded to the nearest cent" where the code rounds down is one. Ask about each, one at a time, before drafting that part; never take one side silently.
|
|
86
|
+
- 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.
|
|
87
|
+
- 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.
|
|
88
|
+
|
|
89
|
+
**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.
|
|
90
|
+
|
|
91
|
+
**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.
|
|
92
|
+
|
|
93
|
+
A test plan has a test case for each acceptance criterion of its story. A finished task's test cases, if it has any, come from its sources.
|
|
94
|
+
|
|
95
|
+
### 4. Review and approve
|
|
96
|
+
|
|
97
|
+
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.
|
|
98
|
+
|
|
99
|
+
### 5. Existing tests
|
|
100
|
+
|
|
101
|
+
Once the area is approved:
|
|
102
|
+
|
|
103
|
+
1. Run the tests with a JUnit XML report and record it with `test_results`, as the agent instructions describe.
|
|
104
|
+
2. Call `query` with `view: "untested"` and the area's epic or story: it lists the test cases with no test, and the tests in the report that match no test case.
|
|
105
|
+
3. Propose which existing tests implement which test cases, as a table, naming each test exactly as the report does. Ask the user to confirm or correct it, with the table 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. Then record each with `manage`, `action: "match"`, the test case's `id` and its `tests`. The code is never changed.
|
|
106
|
+
4. Call `query` with `view: "untested"` again and show the gap report: the behavior with no test, and the tests that test no stated behavior.
|
|
107
|
+
|
|
108
|
+
### 6. Next
|
|
109
|
+
|
|
110
|
+
Call `query` with `view: "onboarding"` and ask which area to onboard next, as in "Choose an area", with where onboarding stands 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. When the view lists anything left empty, also offer **Fill in what onboarding left empty**; when it lists questions left open, also offer **Answer a question left open**: ask the question, with both readings as equals, and record the answer as above.
|
|
111
|
+
|
|
112
|
+
## Known defects
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
|
|
116
|
+
## Version 0 under an existing artifact
|
|
117
|
+
|
|
118
|
+
An artifact made in BuildKeel can get its version 0 later: how its code worked at the baseline commit. Draft it with `save_draft`, the artifact's `id` and `version: 0`, from the code at the baseline (`git show <baseline>:<path>`), by the same rules. Its ID never changes.
|
|
119
|
+
|
|
120
|
+
When the version in force leaves out behavior that version 0 describes, also draft the next version with the complete picture: the version in force wherever the two overlap, version 0 only where the version in force says nothing, and both checked against today's code. Give it `completes: <the version in force>` in its frontmatter: it changes no code, so nothing built on the version in force becomes suspect, and the criteria it adds are coverage gaps until the test plan covers them. Approve version 0 and that version in one review, version 0 first (`<ID>@v0`, then `<ID>`). When the version in force already describes everything, draft only version 0.
|
|
121
|
+
|
|
122
|
+
## Fill in what onboarding left empty
|
|
123
|
+
|
|
124
|
+
The onboarding view lists the artifacts still as onboarding left them, with each section they leave empty. When it lists none, say that nothing was left empty, and stop: what the user says next is conversation, not a request for a new artifact. Otherwise ask which to fill in, the first listed as the default. For each empty section, ask the user, one question at a time, with **Leave it empty** as a choice. Save the whole artifact with the sections filled in, with `save_draft` and its `id`, and `completes: <the version in force>` in its frontmatter: that next version only completes it, so nothing built on it becomes suspect. Offer to approve it with /bk-approve.
|
|
125
|
+
|
|
126
|
+
Do not create or edit spec tree files yourself: `save_draft`, `approve` and `manage` do all writing.
|
|
127
|
+
|
|
128
|
+
## In a Spec-driven tree
|
|
129
|
+
|
|
130
|
+
Existing code is documented as capability specs, version 0, area by area. Map the code as "Map the code" says, each area to become one or more capabilities. For the area `query` with `view: "onboarding"` names next: read its code and what the user brings, then draft each capability spec (a purpose, requirements with scenarios, new IDs as `CODE-R{{new}}`, the code proposed from its name for the user to change) and show it whole. 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. Anything but agreement is feedback: discuss it, then list each point with how it was addressed, show the final version, and ask again. Only once the user confirms one, save it with `save_draft`, `type: "capability"`, `version: 0` and `area: <name>` in its frontmatter: it is written once, with who confirmed it. When sources disagree, ask as above, with **Not sure: leave it open** last; a question left open is recorded on the area with `manage`, `action: "map"`, `map: "question"`, and its requirement is left out of version 0. Answering one later (`map: "answer"`) is followed by a change that adds the requirement. Record the tickets read for the area with `map: "tickets"` as above, each carried one naming the capability spec it fed. Then offer the next area.
|
|
131
|
+
|
|
132
|
+
### Moving to Full SDLC is not onboarding
|
|
133
|
+
|
|
134
|
+
/bk-onboard only documents code. When the user asks to move the tree to Full SDLC, or for approvals, stages or gates, say that moving the tree is done with /bk-migrate, and convert nothing here. When `query` with `view: "onboarding"` shows a conversion in progress, say that /bk-migrate carries it on.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
The user typed: whatever follows /bk-pause in the user's message (nothing, if they typed only /bk-pause)
|
|
6
|
+
|
|
7
|
+
**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.
|
|
8
|
+
|
|
9
|
+
## What is paused
|
|
10
|
+
|
|
11
|
+
- **A unit or change is active** (or the user named one): its work is paused, as "Pausing work" says.
|
|
12
|
+
- **Nothing is active:** the conversation is an exploration, kept as a thread, as "Keeping a thread" says.
|
|
13
|
+
|
|
14
|
+
## Pausing work
|
|
15
|
+
|
|
16
|
+
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 the unit's line (`BuildKeel-Unit: <ID>`, or `Refs: <ID>` where BuildKeel is kept out), or **Leave them as they are**, named in the pause record. Never discard or stash anything.
|
|
17
|
+
2. **Working notes.** Draft the working notes since the last checkpoint or pause, and check them, as below, steps 1 and 2.
|
|
18
|
+
|
|
19
|
+
**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.
|
|
20
|
+
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.
|
|
21
|
+
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.
|
|
22
|
+
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.
|
|
23
|
+
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`.
|
|
24
|
+
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.
|
|
25
|
+
5. **Done.** Say in a line that it is paused, and that /bk-resume with its ID resumes it.
|
|
26
|
+
|
|
27
|
+
**When agents can't be started,** the same everywhere:
|
|
28
|
+
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.
|
|
29
|
+
2. **Retry once** when an agent started but failed, before treating agents as unavailable.
|
|
30
|
+
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.
|
|
31
|
+
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.
|
|
32
|
+
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.
|
|
33
|
+
|
|
34
|
+
## Keeping a thread
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
- **ask**, the default: the steps below, saving only once the user agrees.
|
|
39
|
+
- **auto:** the same steps, but save it with `apply: true` without asking, then show it in full and say its ID.
|
|
40
|
+
- **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.
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
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.
|
|
44
|
+
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.
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
Do not create or edit spec tree files yourself: the BuildKeel tools write every record.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BuildKeel: Resume paused work: a unit, a change or a thread, by its ID, or pick from what is paused, the most recent first.
|
|
2
|
+
|
|
3
|
+
Resume paused work with the user: a unit or change, where it was left, or a thread, the exploration it holds.
|
|
4
|
+
|
|
5
|
+
The user typed: whatever follows /bk-resume in the user's message (nothing, if they typed only /bk-resume)
|
|
6
|
+
|
|
7
|
+
**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.
|
|
8
|
+
|
|
9
|
+
## What to resume
|
|
10
|
+
|
|
11
|
+
- **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.
|
|
12
|
+
- **An ID:** resume that one.
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
## A unit or change
|
|
17
|
+
|
|
18
|
+
Call `start_work` with its `id`.
|
|
19
|
+
|
|
20
|
+
- **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.
|
|
21
|
+
- **Uncommitted changes:** handle them as /bk-build does.
|
|
22
|
+
- **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.
|
|
23
|
+
|
|
24
|
+
## A thread
|
|
25
|
+
|
|
26
|
+
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.
|
|
27
|
+
|
|
28
|
+
Do not create or edit spec tree files yourself: the BuildKeel tools write every record.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
The user typed: whatever follows /bk-review in the user's message (nothing, if they typed only /bk-review)
|
|
6
|
+
|
|
7
|
+
**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.
|
|
8
|
+
|
|
9
|
+
## What to review
|
|
10
|
+
|
|
11
|
+
What the user typed decides it:
|
|
12
|
+
|
|
13
|
+
- **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"`.
|
|
14
|
+
- **A unit's or change's ID**, such as TK-001 or CH-012: that unit or change, its own commits only.
|
|
15
|
+
- **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.
|
|
16
|
+
|
|
17
|
+
## Review it
|
|
18
|
+
|
|
19
|
+
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"`.
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
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, saying the reviewers' line the settings view gives: 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.
|
|
25
|
+
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.
|
|
26
|
+
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.
|
|
27
|
+
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:
|
|
28
|
+
- **fixed,** with the `commit` that fixed it;
|
|
29
|
+
- **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;
|
|
30
|
+
- **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.
|
|
31
|
+
|
|
32
|
+
A Low finding may stay open: name it at the end.
|
|
33
|
+
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.
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
**When agents can't be started,** the same everywhere:
|
|
37
|
+
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.
|
|
38
|
+
2. **Retry once** when an agent started but failed, before treating agents as unavailable.
|
|
39
|
+
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.
|
|
40
|
+
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.
|
|
41
|
+
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.
|
|
42
|
+
|
|
43
|
+
For a range, skip recording: show each reviewer's report as it is, and stop there.
|
|
44
|
+
|
|
45
|
+
## Show it
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
Do not create or edit spec tree files yourself: the BuildKeel tools write every record.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
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.
|
|
2
|
+
|
|
3
|
+
Call the BuildKeel `query` tool with `view: "settings"`.
|
|
4
|
+
|
|
5
|
+
Show the user the result as it is, in your reply as normal text, with its table: do not summarize or reorder it.
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
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,33 @@
|
|
|
1
|
+
BuildKeel: Show your own BuildKeel usage over a period: units finished, time to done, what the gates caught, suspects decided. Kept on this machine only.
|
|
2
|
+
|
|
3
|
+
Show the user their own use of BuildKeel in this spec tree, from the record kept on their machine. The record holds IDs, types, outcomes and times, never artifact text or code, and nothing is ever sent anywhere.
|
|
4
|
+
|
|
5
|
+
The user typed: whatever follows /bk-stats in the user's message (nothing, if they typed only /bk-stats)
|
|
6
|
+
|
|
7
|
+
**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.
|
|
8
|
+
|
|
9
|
+
## Choose the period
|
|
10
|
+
|
|
11
|
+
If the user typed a number of days, use it. If they typed off, on, delete or export, change the record as below.
|
|
12
|
+
|
|
13
|
+
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:
|
|
14
|
+
|
|
15
|
+
1. **The last 30 days** (the default, listed first).
|
|
16
|
+
2. **The last 7 days.**
|
|
17
|
+
3. **All of it.**
|
|
18
|
+
4. **Change the record:** turn recording off or on, delete it, or export it.
|
|
19
|
+
|
|
20
|
+
## Show it
|
|
21
|
+
|
|
22
|
+
Call the BuildKeel `query` tool with `view: "stats"` and `days` (leave `days` out for all of it). Show the result as it is: it opens with what the period comes to, then the details. In a Spec-driven tree it counts changes and what finishing them reported, in place of gate figures.
|
|
23
|
+
|
|
24
|
+
## Change the record
|
|
25
|
+
|
|
26
|
+
Only on the user's request, with the BuildKeel `manage` tool and `action: "usage"`:
|
|
27
|
+
|
|
28
|
+
- **Off:** `usage: "off"`. Nothing new is recorded; everything else works as before.
|
|
29
|
+
- **On:** `usage: "on"`.
|
|
30
|
+
- **Delete:** say that it deletes the record on this machine and cannot be undone, and ask for an explicit yes; then `usage: "delete"`.
|
|
31
|
+
- **Export:** ask where to write the file, suggesting `~/buildkeel-usage.jsonl`, then `usage: "export"` with that `path`.
|
|
32
|
+
|
|
33
|
+
Show the result as it is.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
BuildKeel: Show the overview: the tree with each artifact's state, work in progress, claims, coverage gaps, unpushed approvals, commits with no unit, and what can be started next.
|
|
2
|
+
|
|
3
|
+
Call the BuildKeel `query` tool with `view: "status"`.
|
|
4
|
+
|
|
5
|
+
Show the user the result as it is, keeping its indentation, which shows the hierarchy. Do not summarize or reorder it. If it lists problems or files changed outside BuildKeel, show them with their fixes.
|
|
6
|
+
|
|
7
|
+
If it lists claims on this machine, end by saying that a claim can be released before its unit is finished. Release one only when the user asks for it: call the BuildKeel `manage` tool with `action: "release"` and the unit's `id`, and show the result.
|
|
8
|
+
|
|
9
|
+
If the result says this repository is not set up for BuildKeel, tell the user how to set it up with /bk-init.
|
|
10
|
+
|
|
11
|
+
In a Spec-driven tree, the result ends with an offer to review the active change. Ask, with your tool for asking a question with choices: **Review <ID> now** (the default) or **Not now**. To review, call `finish_work` without `apply`, review as its result says, and report your judgment; do not finish the change unless the user asks.
|