@plune-ai/cli 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mcp-tools.js CHANGED
@@ -168,6 +168,7 @@ var writeOutput = z.object({
168
168
  request: plannedRequest.optional(),
169
169
  result: entity.optional()
170
170
  });
171
+ var strategyOutput = writeOutput.extend({ checked: z.boolean().optional(), findings: z.array(z.unknown()).optional() });
171
172
  var batchOutput = z.object({
172
173
  dryRun: z.boolean(),
173
174
  requested: z.number().int(),
@@ -203,7 +204,7 @@ var PLUNE_TOOLS = [
203
204
  define({
204
205
  name: "plune_project_context",
205
206
  title: "Project context",
206
- description: "Start here: learn the project you are working in with one call \u2014 its projects, the suite tree, how many test cases it has, its testing missions, and how much waits in the review queue.",
207
+ description: "Start here: learn the project you are working in with one call \u2014 its projects, the suite tree, how many test cases it has, its testing missions, how much waits in the review queue, and the rules of its memory: what a person accepted for this project, to follow without asking again.",
207
208
  input: z2.strictObject({}),
208
209
  output: z2.object({
209
210
  projectId: z2.string().nullable(),
@@ -211,11 +212,12 @@ var PLUNE_TOOLS = [
211
212
  suites: z2.array(entity),
212
213
  cases: z2.object({ total: z2.number().int() }),
213
214
  missions: z2.array(entity),
214
- reviewQueue: z2.object({ pending: z2.number().int(), more: z2.boolean() })
215
+ reviewQueue: z2.object({ pending: z2.number().int(), more: z2.boolean() }),
216
+ memoryRules: z2.array(z2.object({ id: z2.string(), text: z2.string() })).describe("Rules a person accepted in the review queue and has not retired; a proposed or rejected rule is never here")
215
217
  }),
216
218
  write: false,
217
219
  visibility: "core",
218
- endpoints: ["GET /v1/projects", "GET /v1/suites", "GET /v1/test-cases", "GET /v1/missions", "GET /v1/review-items"]
220
+ endpoints: ["GET /v1/projects", "GET /v1/suites", "GET /v1/test-cases", "GET /v1/missions", "GET /v1/review-items", "GET /v1/memory/rules"]
219
221
  }),
220
222
  define({
221
223
  name: "plune_get",
@@ -248,10 +250,11 @@ var PLUNE_TOOLS = [
248
250
  define({
249
251
  name: "plune_review_list",
250
252
  title: "Read the review queue",
251
- description: "See what waits for a decision in the review queue \u2014 proposed cases, discovered tests, endpoints, strategies, reports \u2014 narrowed by state and kind, newest first, one page at a time.",
253
+ description: "See what waits for a decision in the review queue \u2014 proposed cases, discovered tests, endpoints, strategies, reports \u2014 narrowed by state, kind and mission, newest first, one page at a time. The mission filter needs a platform that supports it; an older one returns the whole queue.",
252
254
  input: z2.strictObject({
253
255
  state: z2.enum(REVIEW_STATES).optional(),
254
256
  kinds: z2.array(z2.enum(REVIEW_KINDS)).min(1).optional().describe("Questions are read with the question tool"),
257
+ missionId: z2.string().min(1).optional().describe("Only the entries of this mission"),
255
258
  ...listPage
256
259
  }),
257
260
  output: z2.object({ items: z2.array(entity), nextCursor: z2.string().nullable() }),
@@ -286,10 +289,11 @@ var PLUNE_TOOLS = [
286
289
  description: "Propose up to 100 new test cases for a person to review: they land in the review queue as proposals and become cases only when someone approves them. Nothing is created silently.",
287
290
  input: z2.strictObject({
288
291
  target: z2.string().trim().min(1).max(2048).describe("What the cases test: the product address, or the mission name"),
292
+ missionId: z2.string().min(1).optional().describe("The mission these cases are for: the review queue can then be read by it"),
289
293
  cases: z2.array(proposedCase).min(1).max(BATCH_MAX),
290
294
  dry_run: dryRun
291
295
  }),
292
- output: batchOutput,
296
+ output: batchOutput.extend({ itemIds: z2.array(z2.string()).optional().describe("The ids of the review-queue entries created, when the platform names them") }),
293
297
  write: true,
294
298
  visibility: "core",
295
299
  endpoints: ["POST /v1/ingest/cairn"]
@@ -406,7 +410,7 @@ var PLUNE_TOOLS = [
406
410
  title: "Propose a test strategy",
407
411
  description: "Propose a test strategy for a mission in ISTQB sections \u2014 objectives, scope in and out, approach, levels and techniques, risks, entry and exit criteria \u2014 for a person to accept.",
408
412
  input: z2.strictObject({ missionId, content: strategyContent, dry_run: dryRun }),
409
- output: writeOutput,
413
+ output: strategyOutput,
410
414
  write: true,
411
415
  visibility: "core",
412
416
  endpoints: ["POST /v1/missions/:id/strategy"]
@@ -622,6 +626,17 @@ var fail = (code, message, extra = {}) => ({
622
626
  ok: false,
623
627
  error: { code, message, ...extra }
624
628
  });
629
+ function detailLines(body) {
630
+ const b = asRecord(body);
631
+ const lines = [...asArray(b["findings"]), ...asArray(b["details"])].map((d) => {
632
+ if (typeof d === "string") return `- ${d}`;
633
+ const f = asRecord(d);
634
+ const where = [f["rule"], f["path"]].filter((x) => typeof x === "string").join(" at ");
635
+ const said = typeof f["message"] === "string" ? f["message"] : where === "" ? JSON.stringify(d) : "";
636
+ return `- ${[where, said].filter(Boolean).join(": ")}`;
637
+ });
638
+ return lines.length === 0 ? "" : "\n" + lines.join("\n");
639
+ }
625
640
  function errorOf(err) {
626
641
  if (err instanceof PluneApiError) {
627
642
  if (err.status === 401)
@@ -629,7 +644,7 @@ function errorOf(err) {
629
644
  if (err.status === 403 && err.message === READ_ONLY_REFUSAL)
630
645
  return { status: 403, code: "read_only_token", message: `Plune refused (403): ${readScopeMessage("it cannot write")}` };
631
646
  const code = err.code ?? `http_${err.status}`;
632
- return { status: err.status, code, message: `Plune refused (${err.status} ${code}): ${err.message}`, details: err.body };
647
+ return { status: err.status, code, message: `Plune refused (${err.status} ${code}): ${err.message}${detailLines(err.body)}`, details: err.body };
633
648
  }
634
649
  if (err instanceof PluneNetworkError) return { code: "network", message: `${err.message}. Check PLUNE_API_URL and the network.` };
635
650
  throw err;
@@ -702,13 +717,19 @@ function createPluneToolExecutor(opts) {
702
717
  const str = (v) => v;
703
718
  const handlers = {
704
719
  async plune_project_context() {
705
- const [projects, suites, cases, missions, queue] = await Promise.all([
720
+ const [projects, suites, cases, missions, queue, memory] = await Promise.all([
706
721
  call({ method: "GET", path: "/v1/projects" }),
707
722
  call({ method: "GET", path: "/v1/suites" }),
708
723
  call({ method: "GET", path: "/v1/test-cases", query: { limit: "1", stability: "0" } }),
709
724
  call({ method: "GET", path: "/v1/missions" }),
710
- call({ method: "GET", path: "/v1/review-items", query: { state: "pending", limit: "100" } })
725
+ call({ method: "GET", path: "/v1/review-items", query: { state: "pending", limit: "100" } }),
726
+ // A platform that keeps no project memory yet answers 404: no rules, and the rest of the context still stands.
727
+ call({ method: "GET", path: "/v1/memory/rules", query: { state: "in_force" } }).catch((err) => {
728
+ if (err instanceof PluneApiError && err.status === 404) return { status: 404, body: { rules: [] } };
729
+ throw err;
730
+ })
711
731
  ]);
732
+ const memoryRules = asArray(asRecord(memory.body)["rules"]).map(asRecord).filter((r) => r["inForce"] === true && typeof r["id"] === "string" && typeof r["text"] === "string").map((r) => ({ id: str(r["id"]), text: str(r["text"]) }));
712
733
  const projectList = asArray(asRecord(projects.body)["projects"]);
713
734
  const only = projectList.length === 1 ? asRecord(projectList[0])["id"] : void 0;
714
735
  const projectId2 = opts.projectId ?? (typeof only === "string" ? only : null);
@@ -719,7 +740,8 @@ function createPluneToolExecutor(opts) {
719
740
  suites: asArray(asRecord(suites.body)["suites"]),
720
741
  cases: { total: typeof total === "number" ? total : 0 },
721
742
  missions: asArray(asRecord(missions.body)["missions"]),
722
- reviewQueue: { pending: asArray(asRecord(queue.body)["items"]).length, more: cursorOf(asRecord(queue.body)["nextCursor"]) !== null }
743
+ reviewQueue: { pending: asArray(asRecord(queue.body)["items"]).length, more: cursorOf(asRecord(queue.body)["nextCursor"]) !== null },
744
+ memoryRules
723
745
  };
724
746
  },
725
747
  async plune_get(i) {
@@ -747,6 +769,7 @@ function createPluneToolExecutor(opts) {
747
769
  const query = withoutUndefined({
748
770
  state: i["state"],
749
771
  kind: kinds?.join(","),
772
+ missionId: i["missionId"],
750
773
  limit: i["limit"] === void 0 ? void 0 : String(i["limit"]),
751
774
  cursor: i["cursor"]
752
775
  });
@@ -776,12 +799,17 @@ function createPluneToolExecutor(opts) {
776
799
  const req = {
777
800
  method: "POST",
778
801
  path: "/v1/ingest/cairn",
779
- body: { schemaVersion: 1, run: { runId: `mcp-${sessionId}-${proposals}`, mode: "design", target: str(i["target"]) }, cases }
802
+ body: {
803
+ schemaVersion: 1,
804
+ run: withoutUndefined({ runId: `mcp-${sessionId}-${proposals}`, mode: "design", target: str(i["target"]), missionId: i["missionId"] }),
805
+ cases
806
+ }
780
807
  };
781
808
  if (i["dry_run"] === true) return { dryRun: true, requested: cases.length, applied: 0, requests: [planned(req)] };
782
809
  const summary = asRecord((await call(req)).body);
783
810
  const proposed = summary["proposed"];
784
- return { dryRun: false, requested: cases.length, applied: typeof proposed === "number" ? proposed : 0, report: summary };
811
+ const ids = asArray(summary["itemIds"]).filter((x) => typeof x === "string");
812
+ return { dryRun: false, requested: cases.length, applied: typeof proposed === "number" ? proposed : 0, ...ids.length > 0 ? { itemIds: ids } : {}, report: summary };
785
813
  },
786
814
  async plune_cases_generate(i) {
787
815
  const { dry_run, projectId: projectId2, ...body } = i;
@@ -833,6 +861,16 @@ function createPluneToolExecutor(opts) {
833
861
  return { questions, nextCursor: cursorOf(body["nextCursor"]) };
834
862
  },
835
863
  async plune_strategy_propose(i) {
864
+ const req = { method: "POST", path: path("/v1/missions/:id/strategy", str(i["missionId"])), body: i["content"] };
865
+ if (i["dry_run"] === true) {
866
+ try {
867
+ const res = await call({ ...req, path: `${req.path}/check` });
868
+ return { dryRun: true, checked: true, findings: asArray(asRecord(res.body)["findings"]), request: planned(req) };
869
+ } catch (err) {
870
+ if (!(err instanceof PluneApiError && (err.status === 404 && err.code !== "mission_not_found" || err.status === 403 && err.message === READ_ONLY_REFUSAL))) throw err;
871
+ return { dryRun: true, checked: false, request: planned(req) };
872
+ }
873
+ }
836
874
  return write({ method: "POST", path: path("/v1/missions/:id/strategy", str(i["missionId"])), body: i["content"] }, i["dry_run"]);
837
875
  },
838
876
  async plune_report_request(i) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plune-ai/cli",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "AI-powered assertion testing for LLM apps — write assertions, run them against any provider, get a pass/fail report (local, CI, or diff).",
5
5
  "keywords": [
6
6
  "ai",
@@ -42,6 +42,7 @@
42
42
  },
43
43
  "files": [
44
44
  "dist",
45
+ "skills",
45
46
  "README.md",
46
47
  "LICENSE",
47
48
  "THIRD_PARTY_NOTICES"
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: qa-mission
3
+ description: Run a testing mission on a product with the Plune MCP tools - read its README and docs, ask the user 3 to 5 questions, write a test strategy as a Markdown file in the repository, and propose 20 or more test cases to the Plune review queue. Use when the user asks to plan testing for a product, write a test strategy, or fill Plune with test case proposals.
4
+ license: MIT
5
+ compatibility: Needs the Plune MCP server (npx -y @plune-ai/cli mcp serve) with a write token for the Plune steps; without it, the strategy file is still written.
6
+ ---
7
+
8
+ # QA mission
9
+
10
+ You plan the testing of one product and hand the result to a person. You never decide for
11
+ them: questions go to the user, cases go to the review queue as proposals, and nothing
12
+ becomes a test case until a person approves it.
13
+
14
+ Before you start, check whether the Plune tools are connected: the tool `plune_project_context`
15
+ is in your tool list. If it is not, run every step anyway and skip only the Plune calls; say
16
+ once, at the start, that the cases will be written to a file instead of the queue.
17
+
18
+ Keep a stage log as you go (see "Stage log" below). Do not skip it.
19
+
20
+ ## 1. Context
21
+
22
+ 1. Call `plune_project_context()`. It names the project, its suites, how many cases it has, its
23
+ missions, how much waits in the review queue, and `memoryRules`: the rules of the project's
24
+ memory that a person accepted. Follow every rule for the whole mission, as if the user had just
25
+ told you: do not ask a question a rule already answers, and let the rules shape the strategy and
26
+ the cases. Cite a rule you relied on by its id (`memory rule <id>`) as the source. A rule you
27
+ think is wrong or out of date is still a rule: say so in your final message, and keep to it.
28
+ 2. Find the mission:
29
+ - the user named a mission id: `plune_mission_get(missionId)`;
30
+ - one mission in the project matches the product: read it with `plune_mission_get(missionId)`;
31
+ - none: ask the user whether to create one, then
32
+ `plune_mission_create(name, summary, url, documentation)` with a 3-5 sentence summary.
33
+ `documentation` is `provided` when the repository has docs, `none` when it has none,
34
+ `unknown` otherwise. `url` is where the product runs, only if you know it.
35
+ Keep the `missionId`: the questions and the strategy hang on it.
36
+
37
+ ## 2. Read the product
38
+
39
+ Read, in this order, and stop when you can describe the product:
40
+
41
+ 1. `README.md` (or `README`, `readme.md`) at the repository root;
42
+ 2. `docs/`, `doc/` or the docs site sources the README points to;
43
+ 3. an OpenAPI or other API description, if there is one;
44
+ 4. the routes, screens or commands the docs name, only to confirm what the docs say.
45
+
46
+ Note for each fact where you read it (file and section). You will cite it as the `source` of
47
+ strategy items and cases. Do not invent features the sources do not show.
48
+
49
+ ## 3. Ask 3 to 5 questions
50
+
51
+ Ask only what the sources do not answer and what changes the plan: who uses the product,
52
+ what must never break, which environments exist, what is out of scope, what access you lack.
53
+ Ask 3 at least and 5 at most.
54
+
55
+ - Connected: send each one with
56
+ `plune_question_ask(template, text, missionId, options)` and `template` `plain`, with up to
57
+ three `options` when the answer is a choice. To ask for access to an API description, the
58
+ code, staging or a HAR file, use `template` `access` with
59
+ `plune_question_ask(template, text, missionId, access)` instead.
60
+ Also show the questions to the user in the chat, numbered, so they can answer either here or
61
+ in Plune.
62
+ - Not connected: ask them in the chat, numbered.
63
+
64
+ Then wait for the answers. Headless run (no person is there to answer, or the task says so): do
65
+ not wait for answers; record each open question as an assumption with `waitingOn` set to the id of
66
+ the question you asked, and go on. If the user says they answered in Plune, read them with
67
+ `plune_question_list(missionId)`. Never answer a question yourself. An answer you still do not
68
+ have becomes an assumption, marked as one.
69
+
70
+ ## 4. Propose the strategy, then write the file
71
+
72
+ Build the strategy content with these sections, which are the sections Plune keeps a strategy in:
73
+
74
+ 1. **Objectives** - what this testing must show.
75
+ 2. **Scope** - in scope, and out of scope with the reason for each.
76
+ 3. **Approach** - how the testing is done.
77
+ 4. **Profile** - test levels, quality characteristics, test techniques, and the split of the
78
+ cases between API, UI and manual testing in percent (the three add up to 100).
79
+ 5. **Risks** - each with its likelihood and impact (`low`, `medium`, `high`).
80
+ 6. **Entry criteria** and **Exit criteria**.
81
+ 7. **Open questions and assumptions**.
82
+ 8. **Mission log** - the stage log table (see below).
83
+
84
+ Every item rests on exactly one of `source`, `assumption` or `waitingOn`, never two and never
85
+ none; the platform refuses the strategy otherwise (`strategy_lint`).
86
+
87
+ - It was read in a source: `source` says where (file and section).
88
+ - You assumed it: `assumption: true`, and nothing else.
89
+ - It waits for an answer: `waitingOn` is the id of the open question, and nothing else.
90
+
91
+ An item you read in a source that you also doubt is a `source` item; put the doubt in its text.
92
+ The allowed values of the profile and of the risk scale, and one item of each kind, are in
93
+ [references/tool-calls.md](references/tool-calls.md).
94
+
95
+ Connected, and with a mission: propose first, with `plune_strategy_propose(missionId, content, dry_run)`.
96
+ Call it with `dry_run` `true`; the platform runs its checks and the answer lists the findings. After
97
+ a refusal, fix what the findings name (each says the rule and the path of the item), and try once
98
+ more. If the second try is refused too, then stop and report the findings to the user; do not vary
99
+ the content blindly. When the dry run passes, call it once without `dry_run`. The shape of `content`
100
+ is in [references/tool-calls.md](references/tool-calls.md).
101
+
102
+ Then write `docs/testing/test-strategy.md` in the user's repository from the accepted content,
103
+ exactly as proposed (the counts too), unless the user names another path or a strategy file already
104
+ exists (then update that one and say so). Put the proposal id in the mission log. Not connected:
105
+ write the file from the content you built, and say it was not proposed.
106
+
107
+ ## 5. Propose 20 or more cases
108
+
109
+ Design at least 20 cases from the strategy: the highest risks first, every in-scope area
110
+ covered at least once, each case with steps a person can follow and one expected result.
111
+ Prefer a technique the profile names, and write it in the case.
112
+
113
+ - Connected: send them with `plune_case_propose(target, cases, dry_run)`. `target` is the
114
+ product address or the mission name. At most 100 cases go in one call. Call it first with
115
+ `dry_run` `true`, fix what the answer refuses, then send the same cases once without
116
+ `dry_run`. Report how many the answer says were applied; if some were not, say which and why.
117
+ The shape of a case is in [references/tool-calls.md](references/tool-calls.md).
118
+ - Not connected: write the cases to `docs/testing/test-cases.md` next to the strategy, one
119
+ heading per case with its steps, expected result, technique, priority and source.
120
+
121
+ Do not approve your own proposals and do not call any tool that decides queue entries.
122
+
123
+ ## Proposing a memory rule
124
+
125
+ An answer that will hold for the next missions too (who uses the product, what is out of scope,
126
+ which environment the tests may touch) can become a rule of the project's memory, so the next
127
+ mission does not ask it again. A rule comes only through the review queue: propose it, and it is
128
+ a rule once a person accepts it there. Never write a rule into a file or the strategy as if it
129
+ were accepted, and never treat a proposed rule as one.
130
+
131
+ - Connected, with a write token: propose it with `plune_api_request(method, path, body)`, a `POST`
132
+ to `/v1/memory/candidates` whose `body` names the answered question as its source. If
133
+ `plune_api_request` is not in your tool list, switch it on with `plune_discover_tools(names)`.
134
+ The shape is in [references/tool-calls.md](references/tool-calls.md). Propose only what a
135
+ person actually said, at most one rule per answer, and say in your final message which you
136
+ proposed.
137
+ - Not connected: list the rules you would propose in your final message, for the user to add.
138
+
139
+ ## Stage log
140
+
141
+ Keep one row per stage you ran, and put the table at the end of the strategy file and in your
142
+ final message:
143
+
144
+ | Stage | What it produced | Tool calls | Tokens (as reported) |
145
+ |---|---|---|---|
146
+ | 1. Context | mission id, project | 2 | ... |
147
+ | 2. Read | files read | 0 | ... |
148
+ | 3. Questions | questions asked, answered | 4 | ... |
149
+ | 4. Strategy | file path, proposed or not | 2 | ... |
150
+ | 5. Cases | cases proposed, applied | 2 | ... |
151
+
152
+ Fill "Tokens" only with the numbers your host shows you (a usage or cost readout, a `/cost`
153
+ command, a status line). If it shows nothing, write `not reported`. Never estimate or invent a
154
+ number. A stage you skipped gets a row with `skipped` and the reason.
155
+
156
+ ## Finish
157
+
158
+ End with a short message: the strategy file path, whether the strategy was proposed, how many
159
+ cases were proposed and applied, the memory rules you followed and the ones you proposed, the
160
+ questions still open, and the stage log table.
@@ -0,0 +1,117 @@
1
+ # Tool calls of the QA mission
2
+
3
+ The shapes the Plune tools take. The tools check every argument and answer with the field
4
+ that is wrong, so a `dry_run` call first is the cheap way to find a mistake.
5
+
6
+ ## Allowed values
7
+
8
+ - Test levels: `component`, `component-integration`, `system`, `system-integration`, `acceptance`.
9
+ - Quality characteristics: `functional-suitability`, `performance-efficiency`, `compatibility`,
10
+ `interaction-capability`, `reliability`, `security`, `maintainability`, `flexibility`, `safety`.
11
+ - Test techniques: `equivalence-partitioning`, `boundary-value`, `decision-table`,
12
+ `state-transition`, `statement`, `branch`, `error-guessing`, `exploratory`, `checklist`.
13
+ - Risk likelihood and impact: `low`, `medium`, `high`.
14
+ - Where a strategy item was read (`source.kind`): `mission-source`, `doc-section`, `screen`,
15
+ `endpoint`, `requirement`, `url`.
16
+ - Where a case was read (`source.kind`): `url`, `openapi-operation`, `requirement`, `pasted-text`.
17
+ - A case's `execution`: `auto` (it can be automated) or `manual` (the default).
18
+
19
+ ## A question
20
+
21
+ `plune_question_ask` with a plain question and up to three options:
22
+
23
+ <!-- input: plune_question_ask -->
24
+ ```json
25
+ {
26
+ "template": "plain",
27
+ "text": "Which environment may the tests run against?",
28
+ "missionId": "m_123",
29
+ "options": ["staging only", "staging and production read-only", "a local build"]
30
+ }
31
+ ```
32
+
33
+ ## The strategy
34
+
35
+ `plune_strategy_propose`. Each list of items holds 1 to 25 items; risks hold 1 to 50. An item
36
+ is `text` (Markdown, up to 1000 characters), with an optional `source`, and `assumption: true`
37
+ when you assumed it. The split adds up to 100.
38
+
39
+ Every item has exactly one of `source`, `assumption` or `waitingOn`: none, or two, and the platform
40
+ refuses the strategy with `strategy_lint` and a finding (rule and path) for each item. One of each:
41
+
42
+ ```json
43
+ { "text": "Passwords need at least 8 characters", "source": { "kind": "doc-section", "ref": "README.md#passwords" } }
44
+ { "text": "Staging is the only environment", "assumption": true }
45
+ { "text": "Which payment provider is live?", "waitingOn": "q_123" }
46
+ ```
47
+
48
+ <!-- input: plune_strategy_propose -->
49
+ ```json
50
+ {
51
+ "missionId": "m_123",
52
+ "dry_run": true,
53
+ "content": {
54
+ "objectives": [{ "text": "Show that sign-up and sign-in work for a new user", "source": { "kind": "doc-section", "ref": "README.md#getting-started" } }],
55
+ "scope": {
56
+ "in": [{ "text": "Sign-up, sign-in, password reset" }],
57
+ "out": [{ "text": "Billing: handled by the payment provider, not by this product" }]
58
+ },
59
+ "approach": [{ "text": "Risk-based: the highest risks get cases first" }],
60
+ "profile": {
61
+ "levels": ["system", "acceptance"],
62
+ "characteristics": ["functional-suitability", "security"],
63
+ "techniques": ["equivalence-partitioning", "boundary-value"],
64
+ "split": { "api": 40, "ui": 40, "manual": 20 },
65
+ "notes": [{ "text": "Staging is the only environment", "assumption": true }]
66
+ },
67
+ "risks": [{ "text": "A reset link can be used twice", "likelihood": "medium", "impact": "high" }],
68
+ "entryCriteria": [{ "text": "A build is deployed to staging" }],
69
+ "exitCriteria": [{ "text": "Every high risk has a passed case" }]
70
+ }
71
+ }
72
+ ```
73
+
74
+ ## Cases
75
+
76
+ `plune_case_propose`. 1 to 100 cases in one call. A case has a `title` (up to 300 characters),
77
+ 1 to 20 `steps` (up to 400 characters each) and one `expected` result; the rest is optional.
78
+
79
+ <!-- input: plune_case_propose -->
80
+ ```json
81
+ {
82
+ "target": "https://staging.example.com",
83
+ "dry_run": true,
84
+ "cases": [
85
+ {
86
+ "title": "Sign-up refuses a password one character shorter than the minimum",
87
+ "steps": ["Open the sign-up page", "Enter a new email and a 7-character password", "Submit the form"],
88
+ "expected": "The form is not sent and says the password needs at least 8 characters",
89
+ "execution": "auto",
90
+ "technique": "boundary-value",
91
+ "priority": "high",
92
+ "source": { "kind": "requirement", "value": "README.md#passwords" },
93
+ "rationale": "The minimum length is the boundary the docs name"
94
+ }
95
+ ]
96
+ }
97
+ ```
98
+
99
+ ## A memory rule
100
+
101
+ `plune_api_request`, a `POST` to `/v1/memory/candidates`. `source.kind` is `answer` and
102
+ `source.id` the id of the answered question (from `plune_question_list`). `text` is the rule in
103
+ your words, up to 2000 characters; left out, the platform takes the answer's own words (an answer to an access question is never
104
+ copied, so it needs `text`). The call
105
+ lands a `memory_rule` entry in the review queue; it is a rule only once a person accepts it.
106
+
107
+ <!-- input: plune_api_request -->
108
+ ```json
109
+ {
110
+ "method": "POST",
111
+ "path": "/v1/memory/candidates",
112
+ "body": {
113
+ "source": { "kind": "answer", "id": "ri_123" },
114
+ "text": "Tests run against staging only; production is never touched."
115
+ }
116
+ }
117
+ ```