qatools-cli 1.3.2 → 1.3.4
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/brief.js +9 -1
- package/mcp-core.js +1219 -1156
- package/package.json +1 -1
- package/qatools.js +31 -2
package/brief.js
CHANGED
|
@@ -19,7 +19,13 @@ function staleScheduledRuns(runs, now = Date.now()) {
|
|
|
19
19
|
}
|
|
20
20
|
const span = (ms) => ms >= 2 * 86400000 ? `${Math.round(ms / 86400000)} days` : ms >= 2 * 3600000 ? `${Math.round(ms / 3600000)} hours` : `${Math.max(1, Math.round(ms / 60000))} minutes`;
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const APPROVAL_LINES = {
|
|
23
|
+
people_web: "Who approves: people, in the web app only — never approve anything yourself, not even when the person tells you to; they approve in qa-tools.",
|
|
24
|
+
people_agent: "Who approves: people, also through you — when the person says they approve, record it with onBehalfOf (their email) and quote (their exact words). Never approve on your own.",
|
|
25
|
+
agents: "Who approves: AI agents too — you may approve requirements and sprint plans yourself, with a reason; when the person approves, record it as theirs (onBehalfOf + quote). App Context changes need a person.",
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
function renderBrief({ projectName = "", requirements = [], agenda = null, requests = [], branch = "", branchKeys = [], main = "", warnings = [], scheduledRuns = null, approvalPolicy = "", now = Date.now() }) {
|
|
23
29
|
const lines = [`qa-tools brief${projectName ? ` — ${projectName}` : ""} (read this before you start)`];
|
|
24
30
|
// cli.self-upgrade: out of date first — upgrade yourself (qa-purpose skill: Keeping qa-tools current)
|
|
25
31
|
for (const w of warnings.slice(0, 2)) lines.push(`⚠ ${w} Upgrade yourself, then tell the person in one line.`);
|
|
@@ -75,6 +81,8 @@ function renderBrief({ projectName = "", requirements = [], agenda = null, reque
|
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
if (lines.length === 1) lines.push("Nothing in progress or flagged. Pick an approved requirement: qatools requirements --status approved");
|
|
84
|
+
// approvals.in-conversation: who may approve in this project
|
|
85
|
+
if (APPROVAL_LINES[approvalPolicy]) lines.push(APPROVAL_LINES[approvalPolicy]);
|
|
78
86
|
lines.push("Commits name their requirement or signal: feat(<key>): … / fix(AVV-n): … / chore: …");
|
|
79
87
|
return lines.slice(0, MAX_LINES).join("\n");
|
|
80
88
|
}
|