qatools-cli 1.2.10 → 1.2.12

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 (2) hide show
  1. package/package.json +1 -1
  2. package/qatools.js +95 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qatools-cli",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "description": "CLI for QA Tools — requirements, epics, sprints, sessions, App Context sync, project agenda. The companion to qa-tools.com.",
5
5
  "scripts": {
6
6
  "release": "npm version patch --no-git-tag-version && npm publish",
package/qatools.js CHANGED
@@ -2619,6 +2619,10 @@ You generate test protocols (templates) from approved requirements.
2619
2619
  ## Rules
2620
2620
  - Every test MUST have requirementKey, requirementVersion, and purpose
2621
2621
  - Generate from BOTH acceptance criteria AND negative scenarios
2622
+
2623
+ ## Manual versus automated
2624
+ A test protocol is run by people. Put in it only what a person must check because you can't verify it yourself: look and feel, real mobile devices, e-mail/SMS actually arriving, BankID/Freja, printing/PDF, flows between several parties. Say in purpose why a person must do it. What you can verify yourself belongs in automated tests in the code (results reach qa-tools via \`qatools test-report\`).
2625
+ When planning a sprint, draft one such protocol per sprint (MCP: testProtocols in propose_sprint_plan, or create_test_protocol after a plan approved in the conversation). You never approve a protocol — a project member does.
2622
2626
  `,
2623
2627
 
2624
2628
  "qa-test-analyst.md": `---
@@ -3736,6 +3740,8 @@ const mcpTools = [
3736
3740
  sprintId: mcpStr("Existing sprint ID (or use newSprintRef)"),
3737
3741
  newSprintRef: mcpStr("ref of a sprint in newSprints"),
3738
3742
  reason: mcpStr("Why this requirement goes in this sprint"),
3743
+ selfVerification: mcpStr("How you will verify it yourself, e.g. 'unit tests for X + API call Y' (sprint.ai-planning-self-verification)"),
3744
+ manualOnly: { type: "boolean", description: "true when you cannot verify it yourself at all — then testProtocols must have a test for it" },
3739
3745
  },
3740
3746
  required: ["requirementId", "reason"],
3741
3747
  additionalProperties: false,
@@ -3761,9 +3767,51 @@ const mcpTools = [
3761
3767
  description: "Requirements deliberately left out, with why",
3762
3768
  items: { type: "object", properties: { key: mcpStr("Requirement key"), reason: mcpStr("Why") }, required: ["key", "reason"], additionalProperties: false },
3763
3769
  },
3770
+ testProtocols: {
3771
+ type: "array",
3772
+ description: "One manual test protocol per target sprint: only tests a person must perform (you can't verify them yourself). Each test's requirementKey must be planned in that sprint by this proposal. Approved together with the proposal.",
3773
+ items: {
3774
+ type: "object",
3775
+ properties: {
3776
+ name: mcpStr("Protocol name, e.g. 'Release 4.1 — manual tests'"),
3777
+ sprintId: mcpStr("Existing sprint ID (or use newSprintRef)"),
3778
+ newSprintRef: mcpStr("ref of a sprint in newSprints"),
3779
+ sections: {
3780
+ type: "array",
3781
+ description: "Sections of manual tests",
3782
+ items: {
3783
+ type: "object",
3784
+ properties: {
3785
+ title: mcpStr("Section title"),
3786
+ tests: {
3787
+ type: "array",
3788
+ items: {
3789
+ type: "object",
3790
+ properties: {
3791
+ id: mcpStr("Test id, e.g. M-1"),
3792
+ name: mcpStr("What is tested"),
3793
+ steps: mcpStr("Steps a person follows"),
3794
+ expected: mcpStr("Expected result"),
3795
+ purpose: mcpStr("Why a person must perform this, e.g. 'real phone camera', 'SMS must actually arrive', 'visual check'"),
3796
+ requirementKey: mcpStr("Key of the requirement it verifies"),
3797
+ },
3798
+ required: ["name", "steps", "expected", "purpose", "requirementKey"],
3799
+ additionalProperties: false,
3800
+ },
3801
+ },
3802
+ },
3803
+ required: ["title", "tests"],
3804
+ additionalProperties: false,
3805
+ },
3806
+ },
3807
+ },
3808
+ required: ["name", "sections"],
3809
+ additionalProperties: false,
3810
+ },
3811
+ },
3764
3812
  }, ["items"]),
3765
3813
  run: async (a) => {
3766
- const r = await mcpCall("createPlanProposal", { projectId: a.projectId, ...mcpPick(a, ["goal", "summary", "items", "newSprints", "omitted"]) });
3814
+ const r = await mcpCall("createPlanProposal", { projectId: a.projectId, ...mcpPick(a, ["goal", "summary", "items", "newSprints", "omitted", "testProtocols"]) });
3767
3815
  return { ...r, next: "Pending. A project member approves or rejects it in qa-tools under Sprints → Plan proposals." };
3768
3816
  },
3769
3817
  },
@@ -3910,6 +3958,49 @@ const mcpTools = [
3910
3958
  return { updated: a.itemId, fields: Object.keys(u) };
3911
3959
  },
3912
3960
  },
3961
+ {
3962
+ name: "create_test_protocol",
3963
+ description: "Create a sprint's manual test protocol after a plan was approved in this conversation (sprint.ai-planning-manual-tests). Only tests a person must perform — what you can verify yourself belongs in automated tests in the code. It is saved for review (pending_review); a project member approves it under Test protocols, never you.",
3964
+ inputSchema: mcpSchema({
3965
+ sprintId: mcpStr("Sprint ID the protocol belongs to"),
3966
+ name: mcpStr("Protocol name, e.g. 'Release 4.1 — manual tests'"),
3967
+ sections: {
3968
+ type: "array",
3969
+ description: "Sections of manual tests",
3970
+ items: {
3971
+ type: "object",
3972
+ properties: {
3973
+ title: mcpStr("Section title"),
3974
+ tests: {
3975
+ type: "array",
3976
+ items: {
3977
+ type: "object",
3978
+ properties: {
3979
+ id: mcpStr("Test id, e.g. M-1"),
3980
+ name: mcpStr("What is tested"),
3981
+ steps: mcpStr("Steps a person follows"),
3982
+ expected: mcpStr("Expected result"),
3983
+ purpose: mcpStr("Why a person must perform this, e.g. 'real phone camera', 'SMS must actually arrive', 'visual check'"),
3984
+ requirementKey: mcpStr("Key of the requirement it verifies"),
3985
+ },
3986
+ required: ["name", "steps", "expected", "purpose", "requirementKey"],
3987
+ additionalProperties: false,
3988
+ },
3989
+ },
3990
+ },
3991
+ required: ["title", "tests"],
3992
+ additionalProperties: false,
3993
+ },
3994
+ },
3995
+ }, ["sprintId", "name", "sections"]),
3996
+ run: async (a) => {
3997
+ for (const sec of a.sections) for (const t of sec.tests || []) {
3998
+ if (!String(t.purpose || "").trim()) throw new McpToolError(`Test "${t.name}" needs a purpose saying why a person must perform it`);
3999
+ }
4000
+ const r = await mcpCall("uploadTemplate", { projectId: a.projectId, sprintId: a.sprintId, name: a.name, sections: a.sections });
4001
+ return { ...r, next: "Pending review. A project member approves it in qa-tools under Test protocols." };
4002
+ },
4003
+ },
3913
4004
  {
3914
4005
  name: "list_templates",
3915
4006
  description: "List test templates (test protocols) and their review status.",
@@ -3988,11 +4079,12 @@ Follow these steps in order:
3988
4079
  - Per sprint, plan roughly averageDonePerCompletedSprint requirements (from sprint_velocity), counting what is already planned there. If there is no history, say so and propose a conservative number. Mention averageCompletionRate (the share of planned requirements that usually gets done) in the proposal.
3989
4080
  - Carry-over: a sprint is overdue when its end date (releaseDate) is before today and it is not completed. Requirements in an overdue sprint that are approved or in progress are candidates to MOVE to an open sprint; they keep their status and assignee, and the reason names the overdue sprint. Never move requirements out of a sprint that has not passed its end date.
3990
4081
  - If the requirements don't fit in the existing sprints, propose new sprints (name + end date) — don't create them yet.
3991
- 3. Present the proposal as a table: sprint | requirement key | title | reason (priority / epic dependency / capacity). Show moves out of overdue sprints as their own rows, marked as moves, separate from newly planned requirements. Also list what you deliberately left out and why, and any dependency conflicts you found.
4082
+ 3. Present the proposal as a table: sprint | requirement key | title | reason (priority / epic dependency / capacity) | Claude verifies by (how you will verify it yourself — unit/integration tests, an API call, a build check — or "manual tests only" when you can't). Pass the same text as selfVerification on each propose_sprint_plan row, and manualOnly true for the "manual tests only" ones (the protocol must then have a test for them). Show moves out of overdue sprints as their own rows, marked as moves, separate from newly planned requirements. Also list what you deliberately left out and why, and any dependency conflicts you found.
3992
4083
  4. STOP and ask the user: approve here, or save it as a proposal to decide later in qa-tools? Change nothing before that. Apply any adjustments the user asks for and show the table again.
3993
4084
  - If nobody is there to answer (an unattended run), or the user chooses "later": call propose_sprint_plan with the same rows, and report the result. Do not apply anything yourself.
3994
4085
  5. After approval in this conversation: create_sprint for any new sprints, then update_requirement with sprintId for each planned requirement. Report each change and any refusal verbatim — never retry a refused change in a different way.
3995
- 6. End with get_sprint_items for each affected sprint so the user can see the result.`,
4086
+ 6. Manual tests, per sprint: draft a test protocol with the tests a person must perform because you can't verify them yourself — look and feel, real mobile devices, e-mail/SMS actually arriving, BankID/Freja, printing/PDF, flows between several parties. Each test has requirementKey (a requirement planned in that sprint) and a purpose saying why a person must do it. What you can verify yourself goes into automated tests in the code, not here. Show the tests with the plan. With propose_sprint_plan, pass them as testProtocols (approved together with the proposal). After approval in the conversation, save each with create_test_protocol (pending review — a member approves it). A sprint with nothing that needs a person gets no protocol; say so.
4087
+ 7. End with get_sprint_items for each affected sprint so the user can see the result.`,
3996
4088
  },
3997
4089
  {
3998
4090
  name: "daily_agenda_run",