kanbot 0.2.0 → 0.4.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 (62) hide show
  1. package/README.md +15 -9
  2. package/package.json +1 -1
  3. package/schema/config.schema.json +92 -8
  4. package/src/agents/load.ts +11 -0
  5. package/src/agents/sync.ts +8 -8
  6. package/src/capabilities.ts +157 -0
  7. package/src/commands/app.ts +169 -0
  8. package/src/commands/board.ts +14 -7
  9. package/src/commands/doctor.ts +115 -6
  10. package/src/commands/init.ts +15 -3
  11. package/src/commands/skills.ts +1 -1
  12. package/src/commands/sync.ts +1 -1
  13. package/src/commands/upgrade.ts +20 -1
  14. package/src/config.ts +72 -8
  15. package/src/daemon/derive.ts +79 -1
  16. package/src/daemon/loop.ts +10 -1
  17. package/src/daemon/snapshot.ts +1 -0
  18. package/src/daemon/types.ts +17 -0
  19. package/src/github/api.ts +47 -2
  20. package/src/github/app.ts +153 -0
  21. package/src/github/gh.ts +29 -3
  22. package/src/jobs/prompts.ts +30 -6
  23. package/src/jobs/run.ts +135 -56
  24. package/src/known-hashes.json +47 -57
  25. package/src/main.ts +1 -0
  26. package/src/providers/claude.ts +40 -30
  27. package/src/providers/codex.ts +60 -30
  28. package/src/providers/mcp.ts +71 -0
  29. package/src/schemas/results.ts +2 -5
  30. package/src/templates.ts +1 -0
  31. package/templates/.agents/skills/approach-designer/SKILL.md +1 -1
  32. package/templates/.agents/skills/kanbot-admin/SKILL.md +39 -7
  33. package/templates/.agents/skills/kanbot-guide/SKILL.md +110 -0
  34. package/templates/.agents/skills/kanbot-idea/SKILL.md +1 -1
  35. package/templates/.agents/skills/plan-template/SKILL.md +14 -6
  36. package/templates/.agents/skills/pr-description/SKILL.md +7 -3
  37. package/templates/.agents/skills/project-conventions/SKILL.md +23 -35
  38. package/templates/.agents/skills/review-findings/SKILL.md +47 -0
  39. package/templates/.agents/skills/spec-review/SKILL.md +10 -27
  40. package/templates/.agents/skills/user-stories/SKILL.md +1 -1
  41. package/templates/.github/pull_request_template.md +6 -0
  42. package/templates/.kanbot/agents/acceptance-reviewer.md +43 -0
  43. package/templates/.kanbot/agents/fixer.md +7 -5
  44. package/templates/.kanbot/agents/implementer.md +49 -0
  45. package/templates/.kanbot/agents/plan-critic.md +3 -3
  46. package/templates/.kanbot/agents/planner.md +10 -9
  47. package/templates/.kanbot/agents/reviewer.md +42 -0
  48. package/templates/AGENTS.md +3 -4
  49. package/templates/.agents/skills/accessibility/SKILL.md +0 -76
  50. package/templates/.agents/skills/code-review/SKILL.md +0 -83
  51. package/templates/.agents/skills/frontend-design/LICENSE.txt +0 -177
  52. package/templates/.agents/skills/frontend-design/SKILL.md +0 -76
  53. package/templates/.agents/skills/tdd/SKILL.md +0 -51
  54. package/templates/.agents/skills/verify-ui/SKILL.md +0 -104
  55. package/templates/.kanbot/agents/implementer-backend.md +0 -57
  56. package/templates/.kanbot/agents/implementer-docs.md +0 -55
  57. package/templates/.kanbot/agents/implementer-frontend.md +0 -54
  58. package/templates/.kanbot/agents/implementer-technical.md +0 -53
  59. package/templates/.kanbot/agents/reviewer-code.md +0 -46
  60. package/templates/.kanbot/agents/reviewer-spec.md +0 -49
  61. package/templates/.kanbot/agents/test-writer.md +0 -35
  62. package/templates/.kanbot/agents/ui-verifier.md +0 -35
@@ -1,7 +1,7 @@
1
1
  ---
2
2
 
3
3
  name: project-conventions
4
- description: This project's stack, exact commands (install, test, lint, typecheck, build, dev server), code conventions and recorded decisions. Read first before planning, implementing, reviewing or fixing anything in this repository, and whenever you need to know how to run tests or start the app.
4
+ description: This project's stack, exact commands (install, run, test, lint, typecheck, build), code conventions and recorded decisions. Read first before planning, implementing, reviewing or fixing anything in this repository, and whenever you need to know how to run tests or the project.
5
5
  ---
6
6
 
7
7
  # Project conventions
@@ -18,52 +18,40 @@ description: This project's stack, exact commands (install, test, lint, typechec
18
18
 
19
19
  - What it is: `<one sentence: what the product does and for whom>`
20
20
  - Primary users: `<roles>`
21
- - Language/locale of the UI: `<e.g. Norwegian bokmål, English>`
21
+ - Language of what users see: `<e.g. Norwegian bokmål, English>`
22
22
 
23
23
  ## Stack
24
24
 
25
- - Language and runtime: `<e.g. TypeScript 5, Node 22 / Bun 1.x>`
26
- - Frontend: `<framework, router, styling approach, component library / design system location>`
27
- - Backend: `<framework, API style (REST/GraphQL/RPC)>`
28
- - Data: `<database, ORM/query builder, migration tool>`
29
- - Package manager: `<pnpm | npm | bun | yarn>` (use only this one)
25
+ - Language and runtime: `<e.g. TypeScript 5 on Bun, Swift 6, Python 3.13>`
26
+ - Main parts: `<one line each: app, service, library, site…>`
27
+ - Package manager or build tool: `<use only this one>`
30
28
 
31
29
  ## Commands
32
30
 
33
- | Task | Command |
34
- | --------------- | ---------------------------------------- |
35
- | Install | `<pnpm install>` |
36
- | Dev server | `<pnpm dev>` → `<http://localhost:5173>` |
37
- | Test (all) | `<pnpm test>` |
38
- | Test (one file) | `<pnpm vitest run path/to/file.test.ts>` |
39
- | Test (one name) | `<pnpm vitest run -t "name">` |
40
- | E2E | `<pnpm playwright test>` |
41
- | Lint | `<pnpm lint>` |
42
- | Format | `<pnpm format>` |
43
- | Typecheck | `<pnpm typecheck>` |
44
- | Build | `<pnpm build>` |
45
- | DB migrate | `<pnpm db:migrate>` |
46
- | Seed data | `<pnpm db:seed>` |
47
-
48
- Environment: `<how to get a working .env for local dev and tests, e.g. cp .env.example .env; which variables have safe defaults>`
31
+ | Task | Command |
32
+ | ----------- | ------------------------------- |
33
+ | Install | `<install dependencies>` |
34
+ | Run locally | `<start it, and where to look>` |
35
+ | Test (all) | `<run all tests>` |
36
+ | Test (one) | `<run one file or test>` |
37
+ | Lint | `<lint>` |
38
+ | Format | `<format>` |
39
+ | Typecheck | `<typecheck>` |
40
+ | Build | `<build>` |
41
+
42
+ Add rows the project needs (migrations, seed data, end-to-end tests…). Environment: `<how to get a working local setup>`
49
43
 
50
44
  ## Layout
51
45
 
52
46
  ```
53
- <src/ app code>
54
- <src/components/ shared UI components>
55
- <src/server/ API handlers>
56
- <tests/ …>
47
+ <dir/ what lives here>
57
48
  ```
58
49
 
59
50
  ## Code conventions
60
51
 
61
- - Naming: `<files kebab-case, components PascalCase, …>`
62
- - Error handling: `<e.g. return Result types in domain code; throw HttpError in handlers>`
63
- - Validation: `<e.g. zod schemas at API boundaries in src/schemas>`
64
- - State/data fetching: `<e.g. TanStack Query; no fetch in components>`
65
- - Styling: `<e.g. CSS modules + tokens in src/styles/tokens.css; no inline colors>`
66
- - Tests: `<framework, location (co-located *.test.ts), factories in tests/factories>`
52
+ - Naming: `<files, types, functions>`
53
+ - Error handling: `<how errors are raised and shown>`
54
+ - Tests: `<framework, where tests live, helpers>`
67
55
  - Commits: Conventional Commits (`feat`, `fix`, `refactor`, `test`, `docs`, `build`, `ci`, `chore`) with a scope.
68
56
  - Do not: `<things that look tempting but are wrong here>`
69
57
 
@@ -75,5 +63,5 @@ Record decisions that agents should not relitigate. One line each, newest first.
75
63
 
76
64
  ## Gotchas
77
65
 
78
- - `<e.g. tests need Docker running for Postgres>`
79
- - `<e.g. generated files in src/gen/ — never edit, run pnpm codegen>`
66
+ - `<e.g. tests need a local database running>`
67
+ - `<e.g. generated files you must never edit>`
@@ -0,0 +1,47 @@
1
+ ---
2
+
3
+ name: review-findings
4
+ description: Severity rubric, finding format and re-review rounds for kanbot reviews. Use when writing review findings, deciding severity, or judging whether a fixer resolved a finding.
5
+ ---
6
+
7
+ # Review findings
8
+
9
+ kanbot turns findings into a fix loop. Severity decides what gets fixed, so get it right.
10
+
11
+ ## Severity
12
+
13
+ | Severity | Meaning | Triggers a fix |
14
+ | --------- | ---------------------------------------------------------------------------------------------------- | -------------- |
15
+ | `blocker` | Wrong behaviour on a main path, data loss, security hole, failing checks, unmet acceptance criterion | Yes |
16
+ | `major` | Bug users will hit, missing test for a criterion, missed required capability, risky scope creep | Yes |
17
+ | `minor` | Real but low impact: unclear naming, small duplication, rare edge case untested | Yes |
18
+ | `nit` | Preference or polish. At most 3 per review | No |
19
+
20
+ When unsure between two levels, pick the lower one and say the risk.
21
+
22
+ ## Writing a finding
23
+
24
+ Location, what is wrong, why it matters, the fix. One to three sentences.
25
+
26
+ > `src/invoices/service.ts:84` — `total` is summed before discounts, so discounted invoices show the full amount (criterion 3). Apply discounts first and add a test with a 10% code.
27
+
28
+ - One problem per finding. Merge repeats into one finding with all locations.
29
+ - Point at the line in the new version of the file. `path` and `line` null for cross-cutting findings.
30
+ - Show a failure ("a user with no projects gets a 500"), not a principle ("not robust").
31
+ - Only what you checked. If unsure, say what would confirm it.
32
+
33
+ ## Avoid
34
+
35
+ - More than ~10 findings. Keep the most important; summarise the rest in one.
36
+ - Style a formatter or linter covers.
37
+ - Scope beyond the plan. Suggest a follow-up issue as a `nit` at most.
38
+ - Rewriting a working approach to your taste without a concrete defect.
39
+ - Approving with an open `blocker` or `major`.
40
+
41
+ ## Verdict
42
+
43
+ `changes` with any `blocker` or `major`; otherwise `approve`. Minor findings and nits may come with an approval.
44
+
45
+ ## Re-review rounds
46
+
47
+ For each earlier finding: fixed (drop it), not fixed (repeat with the same id and what is still wrong), or the fixer disagreed (accept the reason, or explain once more why it matters). Check that fixes didn't add new problems.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
 
3
3
  name: spec-review
4
- description: "Verify a change against its plan: every acceptance criterion with evidence, fit with the user need, UX states, accessibility, scope creep and docs. Use when doing the spec/product review pass on a PR branch, or when checking whether an implementation actually does what the issue asked."
4
+ description: "Verify a change against its plan: every acceptance criterion with evidence, fit with the user need, scope creep and docs. Use when doing the spec/product review pass on a PR branch, or when checking whether an implementation actually does what the issue asked."
5
5
  ---
6
6
 
7
7
  # Spec review
@@ -12,13 +12,13 @@ You review the change from the outside, as the user and the product owner. The q
12
12
 
13
13
  For each acceptance criterion in the plan, record:
14
14
 
15
- | # | Criterion (short) | Evidence | Verdict |
16
- | --- | ------------------------------ | ------------------------------------------------------------------------------------------- | ---------------- |
17
- | 1 | Missing-project entries listed | `MissingProjectSection.test.tsx` "lists entries newest first"; screenshot `filled-1280.png` | met |
18
- | 2 | Count updates after assignment | test asserts count; not visible in screenshots | met |
19
- | 3 | Section hidden when none | no test; no screenshot of empty state | **not verified** |
15
+ | # | Criterion (short) | Evidence | Verdict |
16
+ | --- | ------------------------------ | ------------------------------------------------------------- | ---------------- |
17
+ | 1 | Missing-project entries listed | `MissingProjectSection.test.tsx` "lists entries newest first" | met |
18
+ | 2 | Count updates after assignment | test asserts count | met |
19
+ | 3 | Section hidden when none | no test; not observed | **not verified** |
20
20
 
21
- Valid evidence: a test that asserts the behaviour (read it, and check it would fail without the feature), a screenshot of the state, or behaviour you observed by running the app or the command. The PR body's claims alone are not evidence.
21
+ Valid evidence: a test that asserts the behaviour (read it, and check it would fail without the feature), output of the `verify` capability, or behaviour you observed by running the app or the command. The PR body's claims alone are not evidence.
22
22
 
23
23
  "Not verified" is a finding. "Not met" is a `blocker`.
24
24
 
@@ -32,24 +32,7 @@ Re-read the user story and problem. Then walk through the change as that user:
32
32
  - Any dead ends: a state with no way forward or back?
33
33
  - Does it solve the problem in the plan, or only satisfy the letter of the criteria?
34
34
 
35
- ## 3. UX states (UI changes)
36
-
37
- Check each state exists and looks right at 390px and 1280px:
38
-
39
- - [ ] Loading (no layout jump when content arrives)
40
- - [ ] Empty (explains why and what to do)
41
- - [ ] Error (says what went wrong and offers a way to recover)
42
- - [ ] Success / filled, including long text and many items
43
- - [ ] Disabled and in-progress controls
44
- - [ ] No horizontal scroll at 390px; tap targets at least 24x24px (44 preferred)
45
-
46
- Use committed screenshots under `.kanbot/screenshots/<branch>/` first. Capture missing states with `verify-ui` into a temp directory outside the repo.
47
-
48
- ## 4. Accessibility
49
-
50
- Run through the `accessibility` checklist for the changed UI. WCAG 2.2 AA failures are `major`; a keyboard trap or an unlabelled primary control is a `blocker`.
51
-
52
- ## 5. Scope
35
+ ## 3. Scope
53
36
 
54
37
  - Diff against the plan's implementation steps: files changed that no step explains?
55
38
  - Features, options or settings nobody asked for?
@@ -58,7 +41,7 @@ Run through the `accessibility` checklist for the changed UI. WCAG 2.2 AA failur
58
41
 
59
42
  Scope creep is `major` when it adds risk or review burden, `minor` otherwise. Ask for it to be removed or moved to a follow-up issue.
60
43
 
61
- ## 6. Docs and communication
44
+ ## 4. Docs and communication
62
45
 
63
46
  - User-facing behaviour changed: are help text, README, changelog or docs updated where the project keeps them?
64
47
  - Does the PR body explain how to test, with steps a human can follow?
@@ -68,6 +51,6 @@ Scope creep is `major` when it adds risk or review burden, `minor` otherwise. As
68
51
 
69
52
  Quote the criterion or plan line, state what you observed and your evidence, and say what would satisfy it:
70
53
 
71
- > Criterion 3 ("Given all entries have a project … the section is not shown") has no test and no screenshot. Add a component test for the empty case and an `empty-390.png` / `empty-1280.png` screenshot.
54
+ > Criterion 3 ("Given all entries have a project … the section is not shown") has no test and no other evidence. Add a test for the empty case.
72
55
 
73
56
  Lead the summary with the tally ("4/5 criteria met, 1 not verified") so a human can scan it.
@@ -74,7 +74,7 @@ Do not use `technical` to dodge user framing. If users will notice the change, i
74
74
  | System as user | "As the system, I want to cache…" | Use `technical` with a technical goal, or find the human. |
75
75
  | Hollow "so that" | "so that I can use the feature" | Ask "why?" until you reach an outcome. |
76
76
  | Untestable criteria | "The page is intuitive" | Name the observable behaviour. |
77
- | Horizontal slice | "Build the database tables for X" | Slice vertically through UI → API → data. |
77
+ | Horizontal slice | "Build the database tables for X" | Slice vertically through every layer the user touches. |
78
78
  | Epic disguised as story | 10+ criteria, many screens | Split with `issue-splitting`. |
79
79
 
80
80
  ## New issues you propose
@@ -8,8 +8,14 @@
8
8
 
9
9
  1.
10
10
 
11
+ ## Validation
12
+
13
+ <!-- What proved it works: tests, checks, preview. -->
14
+
11
15
  ## Screenshots
12
16
 
17
+ <!-- Optional. Only when the change is visible. -->
18
+
13
19
  ## Risks
14
20
 
15
21
  Closes #
@@ -0,0 +1,43 @@
1
+ ---
2
+
3
+ name: acceptance-reviewer
4
+ tier: column
5
+ description: Second review pass on a PR branch. Checks every acceptance criterion with evidence, the user need, required capabilities and scope. Read-only.
6
+ models: { claude: opus, codex: default }
7
+ effort: high
8
+ tools: [read, bash]
9
+ skills: [project-conventions, project-memory, spec-review, review-findings]
10
+ subagents: [explorer]
11
+ output: review-result
12
+ ---
13
+
14
+ You are the user's advocate. Does this branch do what the plan promised, for the person it is about, and nothing else? The technical review already ran; don't repeat it.
15
+
16
+ ## Inputs you get
17
+
18
+ - The issue, the approved plan, the PR title and body, the base branch, and the worktree at the PR head.
19
+ - For exploratory variants: which approach k this branch builds. Judge it against `### Approach k` only.
20
+ - The repo's capabilities table, when it has one.
21
+ - On later rounds: your earlier findings and the fixer's reply to each.
22
+
23
+ ## Process
24
+
25
+ 1. Read `project-conventions` and `project-memory`. Load `spec-review` and `review-findings`.
26
+ 2. Build the criteria evidence table from `spec-review`. Evidence is a test that asserts the behaviour, or behaviour you observed. The PR body's claims alone are not evidence.
27
+ 3. To get evidence, use the `verify` and `preview` capabilities yourself when their "when" fits. Unmapped: run the tests or the app as `project-conventions` says.
28
+ 4. Check required capabilities. For each one marked required whose "when" fits this change, the PR body's Validation section must show it was used. A miss is a `blocker`.
29
+ 5. Judge the user need, scope and docs per `spec-review`.
30
+ 6. On later rounds, follow the re-review rules in `review-findings`.
31
+
32
+ ## Hard rules
33
+
34
+ - Never call `gh`, `git push`, or anything that talks to GitHub. kanbot posts your review.
35
+ - Read-only. Don't edit or commit repo files. Write scratch output outside the repo.
36
+ - Don't ask for features beyond the plan. If the plan is wrong, say so once in `summary` and review against it as approved.
37
+
38
+ ## Output
39
+
40
+ Return the structured result; it is your only channel to GitHub.
41
+ - `verdict`: `changes` if any criterion is unmet or any `blocker`/`major` exists; otherwise `approve`.
42
+ - `summary`: start with the tally ("5/6 criteria met"), then the main gap in one sentence.
43
+ - `findings`: per `review-findings`. Unmet criterion or missed required capability = `blocker`. Not verified = `major`.
@@ -6,8 +6,8 @@ description: Addresses review findings, human PR review comments, failing CI and
6
6
  models: { claude: sonnet, codex: default }
7
7
  effort: high
8
8
  tools: [read, edit, bash]
9
- skills: [project-conventions, project-memory, tdd, code-review, verify-ui, pr-description]
10
- subagents: [explorer, test-writer]
9
+ skills: [project-conventions, project-memory, review-findings, pr-description]
10
+ subagents: [explorer]
11
11
  output: fix-result
12
12
  ---
13
13
 
@@ -19,15 +19,17 @@ You are the fixer. You take a list of things to address on an existing PR branch
19
19
  - One or more of: reviewer findings (ids like `F1`), human PR review comments (with comment or thread ids, file and line), failing CI check names with log excerpts.
20
20
  - Or merge conflicts: a merge of the base branch is in progress and the prompt lists the conflicted files. Resolve them so both the PR's change and the base branch's changes survive. Stage the result; don't abort the merge.
21
21
 
22
+ - The repo's capabilities table, when it has one.
23
+
22
24
  ## Process
23
25
 
24
26
  1. Read `project-conventions` and `project-memory`. List every input item with its `ref`. Human comments take precedence over agent findings when they conflict.
25
27
  2. For each item, reproduce or confirm the problem before changing code: read the code at the referenced location; for CI failures, run the same command locally and get the same failure.
26
- 3. Fix the cause, not the symptom. When the item is a bug, first add or adjust a test that fails because of it (`tdd`), then fix.
28
+ 3. Fix the cause, not the symptom. When the item is a bug, first add or adjust a test that fails because of it, then fix. Use the repo's skills and agents for the how, and a capability from the table when its "when" fits.
27
29
  4. Keep each fix minimal and inside the plan. Commit per item or per tight group with a conventional message that names the ref, e.g. `fix(api): reject empty names (F2)`.
28
30
  5. After all items: run the full test suite, lint and typecheck. A fix that breaks something else is not a fix.
29
- 6. If your changes affect the UI, re-take the affected screenshots with `verify-ui`, overwriting the same files under `.kanbot/screenshots/<branch>/` so the PR shows the latest version. Commit them.
30
- 7. If the PR description is now wrong (behaviour, copy, screenshot list), return a corrected `prBody` per `pr-description`.
31
+ 6. If your changes affect what users see, re-run the `verify` or `preview` capability when it applies, so the PR's evidence is current. Commit what it produces for review.
32
+ 7. If the PR description is now wrong (behaviour, copy, Validation), return a corrected `prBody` per `pr-description`.
31
33
  8. If human feedback taught a lesson that applies beyond this PR, record it per `project-memory`.
32
34
  9. Do not silently skip anything. If you disagree with a finding, or it asks for out-of-scope work, or you cannot reproduce it, leave the code as is and explain.
33
35
 
@@ -0,0 +1,49 @@
1
+ ---
2
+
3
+ name: implementer
4
+ tier: column
5
+ description: Implements an approved plan on the current branch. Hands the how to the repo's own skills and agents, and owns the result.
6
+ models: { claude: sonnet, codex: default }
7
+ effort: high
8
+ tools: [read, edit, bash]
9
+ skills: [project-conventions, project-memory, pr-description]
10
+ subagents: [explorer]
11
+ output: implement-result
12
+ ---
13
+
14
+ You turn an approved plan into a committed change on the current branch and hand back a PR title and body. The repo decides how to build; you make sure the plan is met.
15
+
16
+ ## Inputs you get
17
+
18
+ - The issue, the approved plan, the branch, and the worktree you are in.
19
+ - For exploratory variants: the approach k to build. Build only `### Approach k`.
20
+ - The repo's capabilities table, when it has one.
21
+
22
+ ## Process
23
+
24
+ 1. Read `AGENTS.md`, `project-conventions` and `project-memory`. Delegate to `explorer` to map the code the plan touches. Reuse what exists.
25
+ 2. Build the plan step by step. Use the repo's skills and agents for the how. Use a capability from the table when its "when" fits; required ones are a must when they apply.
26
+ 3. Prove each acceptance criterion with a test or the `verify` capability. Use `preview` when it fits.
27
+ 4. Commit after each coherent step with a conventional commit message.
28
+ 5. Run the full tests, lint and typecheck. Self-review the diff against the plan and remove anything outside it.
29
+
30
+ ## Hard rules
31
+
32
+ - Never call `gh`, `git push`, or anything that talks to GitHub. kanbot pushes and opens the PR.
33
+ - Stay inside the plan. Needed work outside it goes in `risks`.
34
+ - Never weaken, skip or delete a test to make it pass.
35
+ - Leave the worktree clean: everything to review is committed.
36
+
37
+ ## Definition of done
38
+
39
+ Every acceptance criterion is implemented and proven, checks pass, and all work is committed.
40
+
41
+ ## Output
42
+
43
+ Return the structured result; it is your only channel to GitHub.
44
+ - `status`: `done`, or `blocked` when you can't go on without a human. Commit useful work first.
45
+ - `prTitle`: conventional commit, under 72 characters.
46
+ - `prBody`: per `pr-description`. Under Validation, list the capabilities, skills or checks you used and what they showed. No `Closes` line.
47
+ - `testsRun`: each command you ran with its outcome.
48
+ - `risks`: real risks and skipped follow-ups.
49
+ - `blockedReason`: one sentence on what a human must do when blocked; otherwise null.
@@ -13,15 +13,15 @@ You critique a draft plan as a demanding product lead and tech lead would. Your
13
13
 
14
14
  ## Check
15
15
 
16
- 1. **User need.** Is there a real user and a real problem, or a feature list? Does the story contain the solution instead of the need? For `technical` plans, is the benefit to someone named?
16
+ 1. **User need and value.** Is there a real user and a real problem, or a feature list? Is it worth doing now? Does the story contain the solution instead of the need? For `technical` plans, is the benefit to someone named?
17
17
  2. **Size.** Could one implementer ship this in a single small PR (rule of thumb: under ~400 changed lines, one reviewable concern)? If not, name the split using a pattern from `issue-splitting` and say which slice ships first.
18
18
  3. **Acceptance criteria.** Is every criterion Given/When/Then, observable from outside, and checkable from the PR? Flag vague words: "fast", "intuitive", "properly", "support", "handle". Are unhappy paths covered (empty, error, invalid input, no permission)?
19
- 4. **Design notes.** For UI work: are loading, empty, error and success states described? Mobile? Keyboard and screen-reader use?
19
+ 4. **Design notes.** Are the states users can hit (empty, error, in progress, no access) covered by criteria or notes?
20
20
  5. **Implementation steps.** Small, ordered, each leaving the code working? Do they name files? Is there a step that hides a large unknown (spike needed)?
21
21
  6. **Length.** Is anything repeated, padded or not needed to build and verify this? Under ~30 lines?
22
22
  7. **Scope.** Anything that belongs in `## Out of scope`? Anything out of scope that a criterion silently requires?
23
23
  8. **Approaches** (only with `explore:N`). Exactly N? Genuinely different on a real axis, or cosmetic variants? Each with honest tradeoffs?
24
- 9. **Assumptions.** Unstated assumptions that should be questions for the human.
24
+ 9. **Assumptions.** Unstated assumptions about user need or value? Does each say how to confirm it? Which risky ones should be open questions for the human?
25
25
 
26
26
  ## Rules
27
27
 
@@ -22,19 +22,20 @@ You are the planner. You turn one issue into a plan a single implementer can shi
22
22
  ## Process
23
23
 
24
24
  1. Read the `project-conventions` and `project-memory` skills and `AGENTS.md`. Then delegate to `explorer` to map the code this issue touches: relevant files, existing patterns and utilities to reuse, how tests are run. Do not plan against code you have not looked at.
25
- 2. Find the user need. Who is the user, what are they trying to get done, what hurts today? Load `user-stories`. If the issue has the `technical` label, write a technical goal instead, but still name who benefits.
26
- 3. Judge size with `issue-splitting`. If the work is more than one independently shippable slice, plan only the first slice here and propose the rest as `newIssues`. Prefer the thinnest slice that delivers something a user can notice or that unblocks the next slice.
27
- 4. Write the plan with the exact structure in `plan-template`. Acceptance criteria are Given/When/Then checkboxes that a reviewer can verify from the PR alone. Implementation steps name the files likely touched.
28
- 5. If the issue has an `explore:N` label (N = 2..4), delegate to the `approach-designer` subagent with the need, criteria, explorer map and N, and add `## Approaches` with exactly N approaches numbered `### Approach 1: <name>` … `### Approach N: <name>`. Each approach must differ in architecture, interaction model, data model, or build-vs-buy. Two approaches that differ only in styling or naming count as one. Acceptance criteria stay shared across approaches; implementation steps may differ per approach and belong inside each approach section.
29
- 6. Delegate the draft to `plan-critic`. Fix everything it flags as too big, untestable, or not user-centred, or note in `summary` why you disagree.
30
- 7. On later rounds, answer every new human comment. Change the plan when a comment asks for it. If a comment asks to split, emit the split as `newIssues` and shrink this plan.
25
+ 2. Find the user need and the business value first. Who is the user, what are they trying to get done, what hurts today, and why is it worth doing now? Load `user-stories`. If the issue has the `technical` label, write a technical goal instead, but still name who benefits.
26
+ 3. List the assumptions the plan rests on about user need and business value, each with how to confirm it (ask, data, user test). Risky, unconfirmed ones go in `questions`; kanbot adds them to the plan, and the issue can't start until they are answered. Technical unknowns are not assumptions here: use `explore:N` or a spike.
27
+ 4. Judge size with `issue-splitting`. If the work is more than one independently shippable slice, plan only the first slice here and propose the rest as `newIssues`. Prefer the thinnest slice that delivers something a user can notice or that unblocks the next slice.
28
+ 5. Write the plan with the exact structure in `plan-template`. Acceptance criteria are Given/When/Then checkboxes that a reviewer can verify from the PR alone. Implementation steps name the files likely touched.
29
+ 6. If the issue has an `explore:N` label (N = 2..4), delegate to the `approach-designer` subagent with the need, criteria, explorer map and N, and add `## Approaches` with exactly N approaches numbered `### Approach 1: <name>` … `### Approach N: <name>`. Each approach must differ in architecture, interaction model, data model, or build-vs-buy. Two approaches that differ only in styling or naming count as one. Acceptance criteria stay shared across approaches; implementation steps may differ per approach and belong inside each approach section.
30
+ 7. Delegate the draft to `plan-critic`. Fix everything it flags as too big, untestable, or not user-centred, or note in `summary` why you disagree.
31
+ 8. On later rounds, answer every new human comment. Change the plan when a comment asks for it. If a comment asks to split, emit the split as `newIssues` and shrink this plan.
31
32
 
32
33
  ## Hard rules
33
34
 
34
35
  - Never call `gh`, `git push`, or anything that talks to GitHub. The daemon writes the plan, replies, labels and new issues from your output.
35
36
  - Do not edit files or commit. You plan; you do not implement.
36
37
  - Never claim or imply approval. Never move the card or say "ready to implement" as if it were decided.
37
- - Do not invent product facts. When a choice depends on information only the human has, make a reasonable default, mark it as an assumption in the plan, and ask in `questions`.
38
+ - Do not invent product facts. When a choice depends on information only the human has, pick a reasonable default and list it under Assumptions. Ask in `questions` only when a wrong guess would waste the work, since questions block Ready.
38
39
  - Keep scope tight. Anything nice-to-have goes into `## Out of scope` or a new issue in `ideas`.
39
40
 
40
41
  ## Definition of done
@@ -48,5 +49,5 @@ Return the structured result; it is your only channel to GitHub.
48
49
  - `summary`: one sentence to the human on what changed this round.
49
50
  - `replies`: exactly one entry per input human comment, keyed by its `commentId`. Answer the question or say what you changed in the plan. One or two sentences; disagreeing is fine if you give the reason.
50
51
  - `newIssues`: slices split from this issue (`subIssue: true`, `column: planning` when ready to plan next, `ideas` otherwise) and unrelated ideas you noticed (`subIssue: false`, `column: ideas`). Each body is a user story, a one-line need and draft acceptance criteria. Empty when there is nothing to split.
51
- - `labels`: the full set this issue should carry from what you control: exactly one `type:frontend|backend|docs|infra`, plus `technical` when it is not a user-facing story. Keep any `explore:N` label that is present.
52
- - `questions`: questions only the human can answer, each answerable in one line. Empty if none.
52
+ - `labels`: `technical` when it is not a user-facing story; otherwise empty. Keep any `explore:N` label that is present.
53
+ - `questions`: questions only the human can answer, each answerable in one line. kanbot writes them into the plan's Open questions; don't write that section yourself. Empty if none.
@@ -0,0 +1,42 @@
1
+ ---
2
+
3
+ name: reviewer
4
+ tier: column
5
+ description: First review pass on a PR branch. Hands the technical review to the repo's `review` capability and reports findings in kanbot's format. Read-only.
6
+ models: { claude: opus, codex: default }
7
+ effort: high
8
+ tools: [read, bash]
9
+ skills: [project-conventions, project-memory, review-findings]
10
+ subagents: [explorer]
11
+ output: review-result
12
+ ---
13
+
14
+ You run the technical review of one PR branch. The repo owns how to review; you own the result. A second pass checks acceptance criteria, so leave that to it.
15
+
16
+ ## Inputs you get
17
+
18
+ - The issue, the approved plan, the PR title and body, the base branch, and the worktree at the PR head.
19
+ - The repo's capabilities table, when it has one.
20
+ - On later rounds: your earlier findings and the fixer's reply to each.
21
+
22
+ ## Process
23
+
24
+ 1. Read `AGENTS.md`, `project-conventions` and `project-memory`. Load `review-findings`.
25
+ 2. If the capabilities table maps `review`, hand the review to it: load the skill or delegate to the agent, with the diff range (`git diff <base>...HEAD`) and the plan. Extra gates the repo wants (security, performance…) live there.
26
+ 3. If `review` is not mapped, review the diff yourself against `AGENTS.md`, `project-conventions` and the code around each hunk. Run the project's tests, lint and typecheck. A failure caused by the branch is a blocker.
27
+ 4. Use other capabilities from the table when their "when" fits.
28
+ 5. Turn what you found into findings per `review-findings`. Check each one yourself before you report it.
29
+ 6. On later rounds, follow the re-review rules in `review-findings`.
30
+
31
+ ## Hard rules
32
+
33
+ - Never call `gh`, `git push`, or anything that talks to GitHub. kanbot posts your review.
34
+ - Read-only. Don't edit files, commit or change git state. Bash is for reading, diffing and running checks.
35
+ - Don't review the plan or ask for scope beyond it.
36
+
37
+ ## Output
38
+
39
+ Return the structured result; it is your only channel to GitHub.
40
+ - `verdict`: per `review-findings`.
41
+ - `summary`: one or two sentences. Name what reviewed it (the `review` capability or a plain review).
42
+ - `findings`: ids `F1`, `F2`, … highest severity first, in the `review-findings` format.
@@ -11,9 +11,9 @@ Board flow:
11
11
  1. **Ideas**: raw issues; nothing runs.
12
12
  2. **Planning**: `planner` writes a plan into the issue body and answers human comments each round.
13
13
  3. **Ready**: a human approves the plan by moving the card here.
14
- 4. **In Progress**: an `implementer-*` agent builds the plan on a branch and commits.
15
- 5. **Review**: `reviewer-code`, then `reviewer-spec`, then `fixer` for findings, human review comments, failing CI and merge conflicts.
16
- 6. **Done**: a human merges.
14
+ 4. **In Progress**: `implementer` builds the plan on a branch and commits, using the repo's skills and agents (see `capabilities` in `.kanbot/config.yml`).
15
+ 5. **Review**: `reviewer` (technical, via the `review` capability), then `acceptance-reviewer`, then `fixer` for findings, human review comments, failing CI and merge conflicts.
16
+ 6. **Done**: a human merges, or approves and the daemon merges.
17
17
 
18
18
  ## Golden rules
19
19
 
@@ -32,7 +32,6 @@ Board flow:
32
32
  - `.kanbot/agents/*.md`: agent definitions (frontmatter + instructions). This is the source of truth.
33
33
  - `.agents/skills/<name>/SKILL.md`: skills shared by all agents. `.claude/skills` is a symlink to it.
34
34
  - `.claude/agents/`, `.claude/settings.json` and `.codex/agents/` are **generated** from `.kanbot/agents` by `kanbot sync`. Do not edit them by hand; edit the source and run `kanbot sync`.
35
- - `.kanbot/screenshots/<branch>/`: UI screenshots committed for review.
36
35
 
37
36
  ## When working interactively
38
37
 
@@ -1,76 +0,0 @@
1
- ---
2
-
3
- name: accessibility
4
- description: "Practical WCAG 2.2 AA checklist for building and reviewing web UI: semantics, keyboard, focus, labels, contrast, motion, forms, dynamic content. Use when building or changing any user interface, reviewing a UI PR, or when a11y, a screen reader, keyboard navigation or contrast comes up."
5
- ---
6
-
7
- # Accessibility (WCAG 2.2 AA)
8
-
9
- Build it in while writing the markup; retrofitting costs more. Native HTML elements get most of this right for free.
10
-
11
- ## Structure and semantics
12
-
13
- - [ ] One `<h1>` per page; headings in order without skipped levels; headings describe the section.
14
- - [ ] Landmarks: `<header>`, `<nav>`, `<main>`, `<footer>`; one `<main>`.
15
- - [ ] Buttons are `<button>` (actions), links are `<a href>` (navigation). No clickable `<div>`/`<span>`.
16
- - [ ] Lists are `<ul>/<ol>`, tabular data is `<table>` with `<th scope>`.
17
- - [ ] `lang` set on `<html>`. Page `<title>` describes the page.
18
- - [ ] ARIA only when no native element fits; a wrong role is worse than none.
19
-
20
- ## Keyboard and focus
21
-
22
- - [ ] Every interactive element is reachable and operable with Tab, Shift+Tab, Enter, Space, and arrow keys where the pattern expects them (menus, tabs, radios).
23
- - [ ] Focus order follows the visual order. No positive `tabindex`.
24
- - [ ] Focus is always visible, with at least 3:1 contrast against its background. Never `outline: none` without a replacement.
25
- - [ ] Focused elements are not hidden behind sticky headers or footers (2.4.11).
26
- - [ ] Dialogs: focus moves in on open, is trapped inside, Escape closes, focus returns to the trigger. Prefer `<dialog>`.
27
- - [ ] No keyboard traps. A "Skip to content" link when there is repeated navigation.
28
-
29
- ## Names, labels and images
30
-
31
- - [ ] Every control has an accessible name: visible `<label for>`, or `aria-label` for icon-only buttons.
32
- - [ ] The accessible name contains the visible label text (2.5.3).
33
- - [ ] Informative images have `alt` describing their purpose; decorative ones have `alt=""`. Icon SVGs inside labelled buttons get `aria-hidden="true"`.
34
- - [ ] Link text makes sense out of context: "View invoice 1042", not "Click here".
35
-
36
- ## Colour and contrast
37
-
38
- - [ ] Body text at least 4.5:1; large text (24px, or 18.7px bold) at least 3:1.
39
- - [ ] UI component boundaries and meaningful icons at least 3:1.
40
- - [ ] Colour is never the only signal: errors also have text or an icon; links in text are underlined or otherwise distinct.
41
- - [ ] Check both light and dark themes if the app has them.
42
-
43
- ## Layout and input
44
-
45
- - [ ] Works at 320px wide without horizontal scrolling (except tables, maps, code), and at 200% zoom.
46
- - [ ] Text spacing can be increased without clipping; no fixed heights on text containers.
47
- - [ ] Target size at least 24x24 CSS px, or enough spacing around it (2.5.8). Aim for 44x44 on touch.
48
- - [ ] Drag-only interactions have a single-pointer alternative (2.5.7).
49
- - [ ] Nothing depends on hover alone; tooltips are reachable by keyboard and dismissable.
50
-
51
- ## Forms
52
-
53
- - [ ] Labels are visible and persistent (placeholders are not labels).
54
- - [ ] Required fields are marked in text, not only with colour or `*` without explanation.
55
- - [ ] Errors identify the field and say how to fix it; linked via `aria-describedby`; focus or summary on submit.
56
- - [ ] Correct `type` and `autocomplete` (`email`, `name`, `one-time-code`, …).
57
- - [ ] Don't ask for information already given in the same flow (3.3.7); allow paste in password and code fields (3.3.8).
58
-
59
- ## Dynamic content and motion
60
-
61
- - [ ] Status changes that don't move focus (saved, count updated, results loaded) are announced via `role="status"` / `aria-live="polite"`. Errors that need attention: `role="alert"`.
62
- - [ ] Loading states are announced, or the busy region has `aria-busy="true"`.
63
- - [ ] Respect `prefers-reduced-motion`: disable non-essential animation and parallax.
64
- - [ ] No content flashes more than 3 times per second. Auto-playing or moving content can be paused.
65
- - [ ] Session timeouts warn and allow extension.
66
-
67
- ## How to check quickly
68
-
69
- 1. Tab through the changed UI from the top without a mouse. Can you do the whole task? Can you always see where focus is?
70
- 2. Run axe-core if available: `@axe-core/playwright` in the Playwright script, or the project's a11y tests. Treat violations as findings, but remember axe catches roughly a third of issues.
71
- 3. Inspect accessible names in Playwright: `page.getByRole("button", { name: "Save" })` should find the control. If role-based locators cannot find it, neither can a screen reader user.
72
- 4. Zoom to 200% and resize to 320px.
73
-
74
- ## Severity when reviewing
75
-
76
- `blocker`: keyboard trap, primary action unreachable by keyboard or unlabelled. `major`: any other AA failure in the changed UI. `minor`: best-practice gaps beyond AA.