qatools-cli 1.2.27 → 1.2.31
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/context-sync.js +7 -0
- package/package.json +3 -2
- package/qatools.js +153 -22
- package/vault.js +30 -0
package/context-sync.js
CHANGED
|
@@ -56,6 +56,8 @@ function renderToolsSection() {
|
|
|
56
56
|
"### qa-tools tools for this project",
|
|
57
57
|
"- Code exists that no requirement covers (built before qa-tools, or on the side): `qatools baseline-prompt` — reconstruct requirements from the code; a member approves them as built.",
|
|
58
58
|
"- Users should be able to request features and vote (whether or not the app already has a page for it): `qatools requests-integration-prompt` — requests, votes and comments reach qa-tools and their status (accepted / planned / released / declined) goes back to the app. See what has arrived: `qatools feature-requests`.",
|
|
59
|
+
"- The app runs on Azure, Google Cloud, AWS or Firebase and its resources are not set up yet: `qatools infra-prompt` — take stock, propose a plan, infrastructure code, applied only after the user approves.",
|
|
60
|
+
"- A release is done: `qatools release-notes-prompt` — draft release notes for the app's users (only what they notice, no technical details), save with `qatools release-notes-draft`; a member publishes them.",
|
|
59
61
|
"- Something more important must go into a sprint in progress: propose a swap (MCP `propose_sprint_plan` swaps) instead of overfilling it; a member approves.",
|
|
60
62
|
"",
|
|
61
63
|
].join("\n");
|
|
@@ -136,6 +138,11 @@ function requestsIntegrationPrompt(projectName) {
|
|
|
136
138
|
" Replies from the project's members come back with author \"team\". comment and comments also work for requests the",
|
|
137
139
|
" app syncs itself (A), with the app's own id. Votes on synced requests are refused (409) — their votes come from the app.",
|
|
138
140
|
"",
|
|
141
|
+
"What is new (both A and B): published release notes, newest first — show them to the users on a \"What's new\" page:",
|
|
142
|
+
' { "action": "releaseNotes", "limit": 3 }',
|
|
143
|
+
' → { "releases": [ { "release": "Release 4.1", "releaseDate": "2026-11-18", "publishedAt": "…", "notes": "- You can now …" } ] }',
|
|
144
|
+
" The notes are plain text with short points (- …), written for users and published by a member. Drafts never come back.",
|
|
145
|
+
"",
|
|
139
146
|
"Errors: 401 missing key, 403 wrong or revoked key, 400 bad body (e.g. no userId, no title, title over 300",
|
|
140
147
|
"characters), 404 unknown request, 409 vote on a synced request, 429 more than 600 calls a minute from one server.",
|
|
141
148
|
"",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qatools-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
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",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"hooks.js",
|
|
18
18
|
"brief.js",
|
|
19
19
|
"secrets.js",
|
|
20
|
-
"agents.js"
|
|
20
|
+
"agents.js",
|
|
21
|
+
"vault.js"
|
|
21
22
|
],
|
|
22
23
|
"keywords": [
|
|
23
24
|
"qa",
|
package/qatools.js
CHANGED
|
@@ -1093,6 +1093,119 @@ program
|
|
|
1093
1093
|
process.exit(0);
|
|
1094
1094
|
});
|
|
1095
1095
|
|
|
1096
|
+
// signals.feature-request-key-to-vault: the owner creates the app's feature-request key and stores it in their own
|
|
1097
|
+
// vault — the key is never shown or copied
|
|
1098
|
+
program
|
|
1099
|
+
.command("feature-request-key")
|
|
1100
|
+
.description("Create (--rotate) or revoke (--revoke) the project's feature-request key — the owner's own login. With --vault the new key goes straight into your secret vault and is never shown.")
|
|
1101
|
+
.option("--rotate", "Create a new key; the old one stops working")
|
|
1102
|
+
.option("--revoke", "Revoke the key; the app can no longer send requests")
|
|
1103
|
+
.option("--vault <command>", "Run this command with {key} replaced by the new key, e.g. az keyvault secret set --vault-name my-kv --name QATOOLS-FEATURE-REQUEST-KEY --value {key}")
|
|
1104
|
+
.option("--project <id>", "Target project ID (overrides default)")
|
|
1105
|
+
.option("-e, --email <email>", "Login email")
|
|
1106
|
+
.option("-p, --password <password>", "Login password")
|
|
1107
|
+
.action(async (options) => {
|
|
1108
|
+
const { vaultCommand, runVault, describeVault } = require("./vault");
|
|
1109
|
+
if (!!options.rotate === !!options.revoke) { console.error("Give exactly one of --rotate or --revoke"); process.exit(1); }
|
|
1110
|
+
if (options.vault && options.revoke) { console.error("--vault goes with --rotate"); process.exit(1); }
|
|
1111
|
+
// Refuse a bad vault command before a key is created and the old one stops working
|
|
1112
|
+
if (options.vault) { try { vaultCommand(options.vault, "fr-check"); } catch (e) { console.error(e.message); process.exit(1); } }
|
|
1113
|
+
await authenticate(options, { asMember: true });
|
|
1114
|
+
const projectId = options.project || getCredentials()?.projectId;
|
|
1115
|
+
if (!projectId) { console.error("No project configured. Run: qatools setup, or pass --project <id>"); process.exit(1); }
|
|
1116
|
+
let key;
|
|
1117
|
+
try {
|
|
1118
|
+
({ data: { key } } = await httpsCallable(functions, "generateFeatureRequestKey")({ projectId, revoke: !!options.revoke }));
|
|
1119
|
+
} catch (e) {
|
|
1120
|
+
console.error("Failed:", e.message);
|
|
1121
|
+
process.exit(1);
|
|
1122
|
+
}
|
|
1123
|
+
if (options.revoke) { console.log("✓ The feature-request key is revoked — the app can no longer send requests."); process.exit(0); }
|
|
1124
|
+
if (!options.vault) {
|
|
1125
|
+
console.log(`New feature-request key (shown only this once — the old one no longer works):\n${key}`);
|
|
1126
|
+
process.exit(0);
|
|
1127
|
+
}
|
|
1128
|
+
const res = await runVault(options.vault, key);
|
|
1129
|
+
if (!res.ok) {
|
|
1130
|
+
console.error(`✗ The vault command failed (exit ${res.code}): ${describeVault(options.vault)}`);
|
|
1131
|
+
if (res.stderr) console.error(res.stderr);
|
|
1132
|
+
console.error(`The old key no longer works. The new key, so the app is not left without one — store it yourself:\n${key}`);
|
|
1133
|
+
process.exit(1);
|
|
1134
|
+
}
|
|
1135
|
+
console.log(`✓ New feature-request key (…${key.slice(-4)}) stored with: ${describeVault(options.vault)}`);
|
|
1136
|
+
console.log(" The old key no longer works — restart or redeploy the app if it reads the key at startup.");
|
|
1137
|
+
process.exit(0);
|
|
1138
|
+
});
|
|
1139
|
+
|
|
1140
|
+
// releases.release-notes: release notes for the app's users — Claude drafts, a member publishes in the sprint view
|
|
1141
|
+
program
|
|
1142
|
+
.command("release-notes-prompt")
|
|
1143
|
+
.description("Print what a release delivered and how to write release notes for the app's users (default: the latest completed release)")
|
|
1144
|
+
.option("-s, --sprint <id|name>", "The release (sprint id or name)")
|
|
1145
|
+
.option("--project <id>", "Target project ID (overrides default)")
|
|
1146
|
+
.option("-e, --email <email>", "Login email")
|
|
1147
|
+
.option("-p, --password <password>", "Login password")
|
|
1148
|
+
.action(async (options) => {
|
|
1149
|
+
await authenticate(options);
|
|
1150
|
+
const projectId = options.project || getCredentials()?.projectId;
|
|
1151
|
+
if (!projectId) { console.error("No project configured. Run: qatools setup, or pass --project <id>"); process.exit(1); }
|
|
1152
|
+
try {
|
|
1153
|
+
const { data } = await httpsCallable(functions, "getReleaseNotesPrompt")({ projectId, sprintId: options.sprint || "" });
|
|
1154
|
+
console.log(data.prompt);
|
|
1155
|
+
process.exit(0);
|
|
1156
|
+
} catch (e) {
|
|
1157
|
+
console.error("Failed to get the release-notes prompt:", e.message);
|
|
1158
|
+
process.exit(1);
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
|
|
1162
|
+
program
|
|
1163
|
+
.command("release-notes-draft")
|
|
1164
|
+
.description("Save a draft of a release's notes for the app's users. A member edits and publishes it in the sprint view.")
|
|
1165
|
+
.requiredOption("-s, --sprint <id|name>", "The release (sprint id or name)")
|
|
1166
|
+
.requiredOption("-f, --file <path>", "Text or markdown file with the notes")
|
|
1167
|
+
.option("--project <id>", "Target project ID (overrides default)")
|
|
1168
|
+
.option("-e, --email <email>", "Login email")
|
|
1169
|
+
.option("-p, --password <password>", "Login password")
|
|
1170
|
+
.action(async (options) => {
|
|
1171
|
+
let text;
|
|
1172
|
+
try { text = fs.readFileSync(options.file, "utf8"); }
|
|
1173
|
+
catch (e) { console.error(`Could not read ${options.file}: ${e.message}`); process.exit(1); }
|
|
1174
|
+
await authenticate(options);
|
|
1175
|
+
const projectId = options.project || getCredentials()?.projectId;
|
|
1176
|
+
if (!projectId) { console.error("No project configured. Run: qatools setup, or pass --project <id>"); process.exit(1); }
|
|
1177
|
+
try {
|
|
1178
|
+
const { data } = await httpsCallable(functions, "saveReleaseNotesDraft")({ projectId, sprintId: options.sprint, text });
|
|
1179
|
+
console.log(`Draft saved on ${data.sprintId}. A member edits and publishes it in the sprint view${data.published ? " (the published notes stay until then)" : ""}.`);
|
|
1180
|
+
process.exit(0);
|
|
1181
|
+
} catch (e) {
|
|
1182
|
+
console.error("Draft not saved:", e.message);
|
|
1183
|
+
process.exit(1);
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
|
|
1187
|
+
// projects.infra-setup-prompt: set up or configure the app's cloud resources with the user's own cloud CLI login
|
|
1188
|
+
program
|
|
1189
|
+
.command("infra-prompt")
|
|
1190
|
+
.description("Print the procedure for setting up the app's cloud resources (Azure, Google Cloud, AWS, Firebase) as infrastructure code, approved by you before anything is created")
|
|
1191
|
+
.option("--platform <name>", "azure, gcp, aws or firebase (default: from the App Context's stack)")
|
|
1192
|
+
.option("--project <id>", "Target project ID (overrides default)")
|
|
1193
|
+
.option("-e, --email <email>", "Login email")
|
|
1194
|
+
.option("-p, --password <password>", "Login password")
|
|
1195
|
+
.action(async (options) => {
|
|
1196
|
+
await authenticate(options);
|
|
1197
|
+
const projectId = options.project || getCredentials()?.projectId;
|
|
1198
|
+
if (!projectId) { console.error("No project configured. Run: qatools setup, or pass --project <id>"); process.exit(1); }
|
|
1199
|
+
try {
|
|
1200
|
+
const { data } = await httpsCallable(functions, "getInfraPrompt")({ projectId, platform: options.platform || "" });
|
|
1201
|
+
console.log(data.prompt);
|
|
1202
|
+
process.exit(0);
|
|
1203
|
+
} catch (e) {
|
|
1204
|
+
console.error("Failed to get the infrastructure prompt:", e.message);
|
|
1205
|
+
process.exit(1);
|
|
1206
|
+
}
|
|
1207
|
+
});
|
|
1208
|
+
|
|
1096
1209
|
// requirements.baseline-from-code: reconstruct requirements for what is already built
|
|
1097
1210
|
program
|
|
1098
1211
|
.command("baseline-prompt")
|
|
@@ -2210,7 +2323,7 @@ program
|
|
|
2210
2323
|
console.error(" Evidence-driven status: cite a concrete verification before claiming resolved.");
|
|
2211
2324
|
console.error(" Examples:");
|
|
2212
2325
|
console.error(" --evidence \"Test SPRINT-1.2 passed in session abc123, item appeared in sprint list\"");
|
|
2213
|
-
console.error(" --evidence \"Reproduced
|
|
2326
|
+
console.error(" --evidence \"Reproduced the fault then re-ran: input=10, expected=50, actual=50 (file.ts:42)\"");
|
|
2214
2327
|
console.error(" --evidence \"No test applies — pure docs change in CHANGELOG.md\"");
|
|
2215
2328
|
console.error("");
|
|
2216
2329
|
console.error(" Min 10 chars. If you cannot articulate the verification, use status=ready_for_test instead.");
|
|
@@ -2775,7 +2888,7 @@ basis for being a substitute** — you're just guessing what their rules are.
|
|
|
2775
2888
|
|
|
2776
2889
|
## When you're tempted to skip the chain
|
|
2777
2890
|
|
|
2778
|
-
You will be tempted. The user will be impatient. The
|
|
2891
|
+
You will be tempted. The user will be impatient. The cause will look obvious.
|
|
2779
2892
|
You will think "I'll just fix it and they can verify".
|
|
2780
2893
|
|
|
2781
2894
|
That is exactly the failure mode qa-tools was built to prevent. The substitute
|
|
@@ -2789,7 +2902,7 @@ step if they were doing it manually? If no, you can't either.
|
|
|
2789
2902
|
|
|
2790
2903
|
- qa-loop.md — the mechanics of the loop
|
|
2791
2904
|
- qa-evidence-first.md — the core principle (cite, don't guess)
|
|
2792
|
-
- qa-numerical-verification.md — for algorithmic
|
|
2905
|
+
- qa-numerical-verification.md — for algorithmic and numerical errors
|
|
2793
2906
|
- qa-developer.md — implementation guidance
|
|
2794
2907
|
`,
|
|
2795
2908
|
"qa-loop.md": `---
|
|
@@ -2809,7 +2922,7 @@ Requirement → Build → Test → Backlog → Fix → Verify
|
|
|
2809
2922
|
1. **Requirement defined** — Acceptance criteria (Given/When/Then) and negative scenarios. Each requirement has a semantic key (e.g. \`auth.login-trial\`).
|
|
2810
2923
|
2. **Feature built** — AI or human implements the feature. Traceable to the requirement via requirementKey.
|
|
2811
2924
|
3. **Test runs** — Tests are generated from acceptance criteria. Each test links to a requirementKey.
|
|
2812
|
-
4. **Backlog updates automatically** — Failed tests create backlog items (
|
|
2925
|
+
4. **Backlog updates automatically** — Failed tests create backlog items (deviations, AVV). Each item is traceable to requirement, feature, and test.
|
|
2813
2926
|
5. **AI analyzes and fixes** — AI identifies root cause: is it the code or the requirement? Fixes code or suggests requirement adjustment.
|
|
2814
2927
|
6. **Retest verifies** — The loop closes only when the requirement is verified.
|
|
2815
2928
|
|
|
@@ -2879,7 +2992,7 @@ qatools sprint-create --name "Release 3.2" --start 2026-05-01 --end 2026-05-28
|
|
|
2879
2992
|
- A requirement MUST be expressible in Given/When/Then. If it can't → it's an epic or too vague
|
|
2880
2993
|
- Every requirement MUST link to an epic via epicKey
|
|
2881
2994
|
- DEPENDENCY HYGIENE: Before creating or modifying epic dependencies, ALWAYS run \`qatools epics\` to review the full dependency graph. Validate: (1) no circular deps, (2) existing deps still make sense, (3) the graph stays minimal — remove deps that are no longer needed. The model evolves — stale dependencies are worse than missing ones.
|
|
2882
|
-
- Every test,
|
|
2995
|
+
- Every test, signal and fix MUST trace back to a requirementKey
|
|
2883
2996
|
- Never create duplicate requirements — run \`qatools requirement-keys\` first
|
|
2884
2997
|
- The loop runs until every requirement is verified
|
|
2885
2998
|
- BACKLOG = SIGNALS ONLY: AVV (deviation from req), GAP (missing req), DEF (technical issue), IMP (idea). Never create requirements as backlog items. Backlog items are observations — requirements are what you build from.
|
|
@@ -3056,12 +3169,12 @@ When planning a sprint, draft one such protocol per sprint (MCP: testProtocols i
|
|
|
3056
3169
|
`,
|
|
3057
3170
|
|
|
3058
3171
|
"qa-test-analyst.md": `---
|
|
3059
|
-
description: Analyze failed test sessions and fix
|
|
3172
|
+
description: Analyze failed test sessions and fix the deviations they found. Use when test sessions are pending analysis.
|
|
3060
3173
|
---
|
|
3061
3174
|
|
|
3062
3175
|
# QA-Tools: Test Analyst
|
|
3063
3176
|
|
|
3064
|
-
You analyze test sessions and fix
|
|
3177
|
+
You analyze test sessions and fix the deviations found during testing.
|
|
3065
3178
|
|
|
3066
3179
|
## Workflow
|
|
3067
3180
|
|
|
@@ -3074,7 +3187,7 @@ You analyze test sessions and fix bugs found during testing.
|
|
|
3074
3187
|
3. For each FAILED test:
|
|
3075
3188
|
- Analyze root cause: is it the code or the requirement?
|
|
3076
3189
|
- Determine verdict: bugg, troligen-db, testprotokoll, design, ux, ej-aktuell, kräver-genomgång
|
|
3077
|
-
- Fix the
|
|
3190
|
+
- Fix the deviation if possible (fixStatus: "fixed", list filesChanged)
|
|
3078
3191
|
- If the requirement is wrong, set verdict to "testprotokoll"
|
|
3079
3192
|
|
|
3080
3193
|
4. Upload analysis:
|
|
@@ -3193,26 +3306,26 @@ Say "I'm unsure" — that's better than guessing. Suggest what evidence would re
|
|
|
3193
3306
|
|
|
3194
3307
|
## Specialized skills
|
|
3195
3308
|
|
|
3196
|
-
There is a specific skill for **algorithmic and numerical**
|
|
3309
|
+
There is a specific skill for **algorithmic and numerical** errors: \`qa-numerical-verification.md\`. Read it when you're fixing a formula or any code where the error is "wrong number" rather than "wrong structure".
|
|
3197
3310
|
|
|
3198
|
-
If you encounter a different recurring
|
|
3311
|
+
If you encounter a different recurring class of errors that needs its own verification pattern (UI regressions, race conditions, data integrity, etc.), create a NEW specific skill (\`qa-<class>-verification.md\`) rather than expanding this file or building a monolithic "fix-checklist". The pattern is: principle here, specific category in its own skill, CLI enforces evidence regardless of category. Don't build a generic checklist for hypothetical categories — let real biting cases drive the need.
|
|
3199
3312
|
`,
|
|
3200
3313
|
"qa-numerical-verification.md": `---
|
|
3201
|
-
description: How to verify algorithmic and numerical
|
|
3314
|
+
description: How to verify fixes of algorithmic and numerical errors. Read this when fixing a formula, calculation, or any code where the error is "wrong number" rather than "wrong structure".
|
|
3202
3315
|
---
|
|
3203
3316
|
|
|
3204
3317
|
# Numerical & Algorithmic Verification
|
|
3205
3318
|
|
|
3206
|
-
Most evidence-first examples deal with structural
|
|
3319
|
+
Most evidence-first examples deal with structural errors (NullReferenceException, wrong redirect, race condition). Algorithmic errors are different — the code runs without crashing, it just produces the wrong number.
|
|
3207
3320
|
|
|
3208
|
-
This skill is for those
|
|
3321
|
+
This skill is for those errors. The verification pattern is non-negotiable.
|
|
3209
3322
|
|
|
3210
3323
|
## Before you start — entry-point checklist
|
|
3211
3324
|
|
|
3212
3325
|
Stop here and answer these BEFORE writing any verification code:
|
|
3213
3326
|
|
|
3214
|
-
- [ ] Which input or test case actually triggers the
|
|
3215
|
-
- [ ] Does that input have non-zero, non-default values for the field the
|
|
3327
|
+
- [ ] Which input or test case actually triggers the error? (Not "the system" — name a specific input.)
|
|
3328
|
+
- [ ] Does that input have non-zero, non-default values for the field the error touches? (If everything is 0 or NULL, multiplying by anything gives the same result — the input cannot discriminate buggy from fixed code.)
|
|
3216
3329
|
- [ ] If your input is non-discriminating: change it, or pick a different input. Never proceed with "the data doesn't show it".
|
|
3217
3330
|
- [ ] Where will you write the expected and actual values? Answer: in the --evidence flag when you set status. If the values are large, also save them to a file you reference in evidence ("see /tmp/verify-2026-04-08.txt").
|
|
3218
3331
|
- [ ] Can you compute the expected value by hand from the formula in under 60 seconds? If not, the formula is too complex for this verification — break it into pieces and verify each.
|
|
@@ -3223,11 +3336,11 @@ If any answer is "I don't know", stop and ask. Don't guess.
|
|
|
3223
3336
|
|
|
3224
3337
|
1. **Trivialize the input.** Pick values that make the formula readable. Set multipliers to 1, set inputs to round numbers (10, 100), set toggles to known states.
|
|
3225
3338
|
2. **Compute the expected value by hand.** Write down the formula, plug in the trivialized inputs, get the expected number. Show your work.
|
|
3226
|
-
3. **Run the same input through the system.** Use whatever entry point the
|
|
3339
|
+
3. **Run the same input through the system.** Use whatever entry point the error lives in — CLI, API, UI, test harness. Capture the actual output.
|
|
3227
3340
|
4. **Compare with tolerance.** For floats, exact equality is fragile. Use a tolerance (e.g. abs(actual - expected) < 0.001) and document it.
|
|
3228
3341
|
5. **Cite both numbers in evidence.** When you set status=tested, the --evidence flag must contain both the expected and actual value, plus the input that produced them.
|
|
3229
3342
|
|
|
3230
|
-
## What "evidence" looks like for numerical
|
|
3343
|
+
## What "evidence" looks like for numerical errors
|
|
3231
3344
|
|
|
3232
3345
|
❌ "Fixed the formula in calculation.ts"
|
|
3233
3346
|
❌ "User confirmed the value looks right now"
|
|
@@ -3235,19 +3348,19 @@ If any answer is "I don't know", stop and ask. Don't guess.
|
|
|
3235
3348
|
|
|
3236
3349
|
✅ "Input: mass=10 kg, rate=5 kr/kg, alpha=0. Expected = 10*5 = 50. Actual = 50.0 (calc.ts:142). Diff < 0.001."
|
|
3237
3350
|
✅ "Input: temp=20°C, time=3600s. Expected = 20*3600/1000 = 72 kWh. Actual = 72.0 (sim.py:88)."
|
|
3238
|
-
✅ "Trivialized: set kr_per_kg=1 to inspect the structure. Expected = mass*1 = mass = 10. Actual = 10.0. Now bumped kr_per_kg=5: expected=50, actual=50. Original
|
|
3351
|
+
✅ "Trivialized: set kr_per_kg=1 to inspect the structure. Expected = mass*1 = mass = 10. Actual = 10.0. Now bumped kr_per_kg=5: expected=50, actual=50. Original fault was (1+alpha)*prod*rate*T which gave 132 for the same input."
|
|
3239
3352
|
|
|
3240
3353
|
## Why this matters
|
|
3241
3354
|
|
|
3242
|
-
The difference between "I fixed it" and "I verified it" is the difference between a fix that holds and a fix that creates the next
|
|
3355
|
+
The difference between "I fixed it" and "I verified it" is the difference between a fix that holds and a fix that creates the next error. For numerical code, "looks right" is not verification — the formula can be wrong by a constant factor and look fine until production.
|
|
3243
3356
|
|
|
3244
3357
|
## Specific traps
|
|
3245
3358
|
|
|
3246
3359
|
### 1. The dataset doesn't have a discriminating input
|
|
3247
|
-
If your test data has kr_per_kg = 0 for everything, multiplying by anything gives 0. The
|
|
3360
|
+
If your test data has kr_per_kg = 0 for everything, multiplying by anything gives 0. The error in the multiplication is invisible. **Fix: change the dataset or create a new one** with values that would produce different results between the buggy and fixed formula. Never skip verification with "the data doesn't show it".
|
|
3248
3361
|
|
|
3249
3362
|
### 2. Off-by-constant errors
|
|
3250
|
-
The
|
|
3363
|
+
The wrong formula (1+alpha) * prod * rate * T happens to equal the correct mass * rate when alpha=0 AND prod*T = mass. If your test input satisfies both, both formulas pass. **Fix: pick inputs where the two formulas diverge.**
|
|
3251
3364
|
|
|
3252
3365
|
### 3. Sign errors and unit mismatches
|
|
3253
3366
|
mg/MJ vs kg/MWh differ by 10^9 / 3600 ≈ 277,777x. A "small refactor" can introduce this and pass type checks. **Fix: include unit conversion in the trivialized expected calc.**
|
|
@@ -3517,7 +3630,7 @@ const BUILTIN_SKILLS = [
|
|
|
3517
3630
|
{ name: "qa-test-analyst", description: "Analyze test results, identify root causes, create backlog items." },
|
|
3518
3631
|
{ name: "qa-release-manager", description: "Sprint planning and release verification." },
|
|
3519
3632
|
{ name: "qa-evidence-first", description: "Core principle — never speculate, always cite evidence. Applies to ALL work." },
|
|
3520
|
-
{ name: "qa-numerical-verification", description: "How to verify algorithmic and numerical
|
|
3633
|
+
{ name: "qa-numerical-verification", description: "How to verify fixes of algorithmic and numerical errors." },
|
|
3521
3634
|
];
|
|
3522
3635
|
|
|
3523
3636
|
const skillCmd = program
|
|
@@ -4502,6 +4615,24 @@ const mcpTools = [
|
|
|
4502
4615
|
}, ["answers"]),
|
|
4503
4616
|
run: async (a) => mcpCall("applyNewAppAnswers", { projectId: a.projectId || getCredentials()?.projectId, answers: a.answers, overwrite: !!a.overwrite }),
|
|
4504
4617
|
},
|
|
4618
|
+
{
|
|
4619
|
+
name: "release_notes_prompt",
|
|
4620
|
+
description: "What a release delivered and how to write release notes for the app's users (releases.release-notes): only what users notice, in their words, no keys or technical details. Default: the latest completed release.",
|
|
4621
|
+
inputSchema: mcpSchema({ sprintId: mcpStr("The release: sprint id or name (default: latest completed)") }),
|
|
4622
|
+
run: async (a) => (await mcpCall("getReleaseNotesPrompt", { projectId: a.projectId, sprintId: a.sprintId || "" })).prompt,
|
|
4623
|
+
},
|
|
4624
|
+
{
|
|
4625
|
+
name: "save_release_notes_draft",
|
|
4626
|
+
description: "Save a draft of a release's notes for the app's users. Refused if it names requirement keys, signal ids or commits. A member edits and publishes it in the sprint view — you never publish.",
|
|
4627
|
+
inputSchema: mcpSchema({ sprintId: mcpStr("The release: sprint id or name"), text: mcpStr("The notes: short points in the users' language") }, ["sprintId", "text"]),
|
|
4628
|
+
run: async (a) => mcpCall("saveReleaseNotesDraft", { projectId: a.projectId, sprintId: a.sprintId, text: a.text }),
|
|
4629
|
+
},
|
|
4630
|
+
{
|
|
4631
|
+
name: "infra_prompt",
|
|
4632
|
+
description: "Procedure for setting up or configuring the app's cloud resources (projects.infra-setup-prompt): take stock with the user's own cloud CLI, propose a plan, write infrastructure code, apply only after the user approves, secrets only in the vault, environments into the App Context.",
|
|
4633
|
+
inputSchema: mcpSchema({ platform: mcpStr("azure, gcp, aws or firebase (default: from the App Context)", { enum: ["azure", "gcp", "aws", "firebase"] }) }),
|
|
4634
|
+
run: async (a) => (await mcpCall("getInfraPrompt", { projectId: a.projectId, platform: a.platform || "" })).prompt,
|
|
4635
|
+
},
|
|
4505
4636
|
{
|
|
4506
4637
|
name: "baseline_prompt",
|
|
4507
4638
|
description: "Procedure for reconstructing requirements for what is already built (requirements.baseline-from-code), with the project's language, its epics and all existing requirements. Use when code exists that qa-tools has no requirements for.",
|
package/vault.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// signals.feature-request-key-to-vault: store a newly created key in the owner's own secret vault by running
|
|
2
|
+
// their command with {key} replaced — the key is never printed, and any trace of it in error output is masked.
|
|
3
|
+
const { spawn } = require("child_process");
|
|
4
|
+
|
|
5
|
+
// Keys are letters, digits, '-' and '_' only, so putting one into a shell command cannot change the command
|
|
6
|
+
function vaultCommand(template, key) {
|
|
7
|
+
if (!String(template || "").includes("{key}")) throw new Error("The --vault command must contain {key} where the new key goes");
|
|
8
|
+
if (!/^[A-Za-z0-9_-]+$/.test(String(key || ""))) throw new Error("Unexpected key format — not passed to a shell");
|
|
9
|
+
return template.split("{key}").join(key);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const maskKey = (text, key) => String(text || "").split(key).join(`•••${key.slice(-4)}`);
|
|
13
|
+
|
|
14
|
+
// Runs the command; its output is kept from the screen (vault CLIs often echo the secret back)
|
|
15
|
+
function runVault(template, key, { run = spawn } = {}) {
|
|
16
|
+
const command = vaultCommand(template, key);
|
|
17
|
+
return new Promise((resolve) => {
|
|
18
|
+
let stderr = "";
|
|
19
|
+
const child = run(command, { shell: true, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });
|
|
20
|
+
child.stdout?.on("data", () => {});
|
|
21
|
+
child.stderr?.on("data", (d) => { stderr += d; });
|
|
22
|
+
child.on("error", (e) => resolve({ ok: false, code: -1, stderr: maskKey(e.message, key) }));
|
|
23
|
+
child.on("close", (code) => resolve({ ok: code === 0, code, stderr: maskKey(stderr, key).trim() }));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// What the CLI shows about the command: the template, never the key
|
|
28
|
+
const describeVault = (template) => String(template).replace(/\s+/g, " ").trim();
|
|
29
|
+
|
|
30
|
+
module.exports = { vaultCommand, maskKey, runVault, describeVault };
|