@v11g/agents-rock 1.0.10 → 1.0.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 (122) hide show
  1. package/README.md +3 -2
  2. package/package.json +1 -1
  3. package/plugins/business-analyst/.claude-plugin/plugin.json +2 -2
  4. package/plugins/business-analyst/evals/draft-scope-rich/case.yaml +4 -0
  5. package/plugins/business-analyst/evals/draft-scope-rich/fixture.sh +5 -0
  6. package/plugins/business-analyst/evals/draft-scope-rich/graders/conflict-question.md +11 -0
  7. package/plugins/business-analyst/evals/draft-scope-rich/graders/keep-and-exclude.md +14 -0
  8. package/plugins/business-analyst/evals/draft-scope-rich/graders/noise-and-shape.md +13 -0
  9. package/plugins/business-analyst/evals/draft-scope-rich/graders/problem-not-solution.md +13 -0
  10. package/plugins/business-analyst/evals/draft-scope-rich/graders/share-kept.md +11 -0
  11. package/plugins/business-analyst/evals/draft-scope-rich/graders/skill-fired.md +7 -0
  12. package/plugins/business-analyst/evals/draft-scope-rich/graders/vague-word.md +13 -0
  13. package/plugins/business-analyst/evals/draft-scope-rich/inputs/C1.txt +10 -0
  14. package/plugins/business-analyst/evals/draft-scope-rich/inputs/E1.txt +5 -0
  15. package/plugins/business-analyst/evals/draft-scope-rich/inputs/E2.txt +5 -0
  16. package/plugins/business-analyst/evals/draft-scope-rich/inputs/E3.txt +5 -0
  17. package/plugins/business-analyst/evals/draft-scope-rich/prompt.md +9 -0
  18. package/plugins/business-analyst/evals/draft-scope-thin/case.yaml +4 -0
  19. package/plugins/business-analyst/evals/draft-scope-thin/fixture.sh +4 -0
  20. package/plugins/business-analyst/evals/draft-scope-thin/graders/no-invention.md +18 -0
  21. package/plugins/business-analyst/evals/draft-scope-thin/graders/skill-fired.md +7 -0
  22. package/plugins/business-analyst/evals/draft-scope-thin/inputs/E1.txt +5 -0
  23. package/plugins/business-analyst/evals/draft-scope-thin/prompt.md +8 -0
  24. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_data.cpython-312.pyc +0 -0
  25. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_layout.cpython-312.pyc +0 -0
  26. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/review_page.cpython-312.pyc +0 -0
  27. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_checks.cpython-312.pyc +0 -0
  28. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/scope_render.cpython-312.pyc +0 -0
  29. package/plugins/business-analyst/skills/business-analyst/scripts/__pycache__/validate.cpython-312.pyc +0 -0
  30. package/plugins/business-analyst/skills/draft-scope/SKILL.md +46 -0
  31. package/plugins/business-analyst/skills/draft-scope/references/credits.md +12 -0
  32. package/plugins/business-analyst/skills/draft-scope/references/draft-schema.md +44 -0
  33. package/plugins/business-analyst/skills/draft-scope/references/rules.md +24 -0
  34. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_body.cpython-312.pyc +0 -0
  35. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_flow.cpython-312.pyc +0 -0
  36. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_package.cpython-312.pyc +0 -0
  37. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/docx_xml.cpython-312.pyc +0 -0
  38. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_quotes.cpython-312.pyc +0 -0
  39. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_rules.cpython-312.pyc +0 -0
  40. package/plugins/business-analyst/skills/draft-scope/scripts/__pycache__/draft_schema.cpython-312.pyc +0 -0
  41. package/plugins/business-analyst/skills/draft-scope/scripts/build_docx.py +36 -0
  42. package/plugins/business-analyst/skills/draft-scope/scripts/check.py +53 -0
  43. package/plugins/business-analyst/skills/draft-scope/scripts/docx_body.py +58 -0
  44. package/plugins/business-analyst/skills/draft-scope/scripts/docx_flow.py +52 -0
  45. package/plugins/business-analyst/skills/draft-scope/scripts/docx_package.py +62 -0
  46. package/plugins/business-analyst/skills/draft-scope/scripts/docx_xml.py +44 -0
  47. package/plugins/business-analyst/skills/draft-scope/scripts/draft_quotes.py +49 -0
  48. package/plugins/business-analyst/skills/draft-scope/scripts/draft_rules.py +106 -0
  49. package/plugins/business-analyst/skills/draft-scope/scripts/draft_schema.py +87 -0
  50. package/plugins/business-analyst/skills/draft-scope/scripts/test/build-docx.test.mjs +76 -0
  51. package/plugins/business-analyst/skills/draft-scope/scripts/test/check-rules.test.mjs +131 -0
  52. package/plugins/business-analyst/skills/draft-scope/scripts/test/check-shape.test.mjs +70 -0
  53. package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/draft-pass.json +40 -0
  54. package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/sources/C1.txt +7 -0
  55. package/plugins/business-analyst/skills/draft-scope/scripts/test/fixtures/sources/E1.txt +5 -0
  56. package/plugins/business-analyst/skills/draft-scope/scripts/test/gates.test.mjs +39 -0
  57. package/plugins/business-analyst/skills/draft-scope/scripts/test/helpers.mjs +30 -0
  58. package/plugins/business-analyst/skills/draft-scope/scripts/test/skill-files.test.mjs +59 -0
  59. package/plugins/business-analyst/skills/draft-scope/steps/assumptions.md +24 -0
  60. package/plugins/business-analyst/skills/draft-scope/steps/check.md +24 -0
  61. package/plugins/business-analyst/skills/draft-scope/steps/discover.md +53 -0
  62. package/plugins/business-analyst/skills/draft-scope/steps/draft.md +64 -0
  63. package/plugins/solution-architect/.claude-plugin/plugin.json +1 -1
  64. package/plugins/solution-architect/skills/analyze-requirements/SKILL.md +8 -7
  65. package/plugins/solution-architect/skills/analyze-requirements/assets/section-help.json +5 -5
  66. package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +15 -3
  67. package/plugins/solution-architect/skills/analyze-requirements/evals/evals.json +50 -6
  68. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json +31 -0
  69. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md +17 -0
  70. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt +16 -0
  71. package/plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md +9 -0
  72. package/plugins/solution-architect/skills/analyze-requirements/references/extract.md +108 -0
  73. package/plugins/solution-architect/skills/analyze-requirements/references/interview.md +39 -5
  74. package/plugins/solution-architect/skills/analyze-requirements/references/project-types.md +1 -1
  75. package/plugins/solution-architect/skills/analyze-requirements/references/quality-goals.md +84 -0
  76. package/plugins/solution-architect/skills/analyze-requirements/references/research.md +1 -1
  77. package/plugins/solution-architect/skills/analyze-requirements/references/rewriting.md +7 -2
  78. package/plugins/solution-architect/skills/analyze-requirements/references/viewer.md +10 -6
  79. package/plugins/solution-architect/skills/analyze-requirements/references/writing.md +45 -3
  80. package/plugins/solution-architect/skills/analyze-requirements/scripts/ba-facts.mjs +32 -0
  81. package/plugins/solution-architect/skills/analyze-requirements/scripts/check-quotes.mjs +39 -0
  82. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/ba-package.mjs +75 -0
  83. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-links.mjs +19 -7
  84. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-routes.mjs +1 -1
  85. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/inputs.mjs +42 -11
  86. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-render.mjs +15 -4
  87. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/section-help.mjs +1 -1
  88. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/strategy-sections.mjs +30 -0
  89. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +14 -2
  90. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-quotes.mjs +55 -0
  91. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-strategy.mjs +65 -0
  92. package/plugins/solution-architect/skills/analyze-requirements/scripts/render.mjs +18 -5
  93. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-facts-cli.test.mjs +55 -0
  94. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-package-cli.test.mjs +101 -0
  95. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/ba-package.test.mjs +115 -0
  96. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +50 -2
  97. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/check-quotes-cli.test.mjs +49 -0
  98. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/doc-links.test.mjs +49 -4
  99. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/extract-workflow.test.mjs +69 -0
  100. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/inputs.test.mjs +14 -0
  101. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-render.test.mjs +19 -5
  102. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/record-cli.test.mjs +1 -1
  103. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/render.test.mjs +69 -2
  104. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/rewriting.test.mjs +1 -1
  105. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/section-help.test.mjs +6 -0
  106. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +19 -0
  107. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-quotes-cli.test.mjs +58 -0
  108. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-quotes.test.mjs +81 -0
  109. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-strategy-cli.test.mjs +32 -0
  110. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-strategy.test.mjs +118 -0
  111. package/plugins/solution-architect/skills/analyze-requirements/scripts/validate.mjs +17 -6
  112. package/plugins/solution-architect/skills/analyze-requirements/workflows/extract.js +51 -0
  113. package/plugins/solution-architect/skills/estimate/workflow-based/assets/estimate-components.html +73 -9
  114. package/plugins/solution-architect/skills/estimate/workflow-based/assets/score-review.html +73 -9
  115. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/build-template.mjs +14 -1
  116. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/also-builds.css +3 -0
  117. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/also-builds.js +16 -0
  118. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/link-picker.css +8 -0
  119. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/template/link-picker.js +43 -0
  120. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/also-builds-browser.test.mjs +59 -0
  121. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/link-picker-browser.test.mjs +83 -0
  122. package/plugins/solution-architect/skills/estimate/workflow-based/scripts/test/stage.mjs +19 -1
@@ -0,0 +1,40 @@
1
+ {
2
+ "client": "Riverside Bakery",
3
+ "date": "2026-10-08",
4
+ "sources": [
5
+ { "id": "E1", "kind": "email", "date": "2026-09-02", "who": "Dana Lee — Running out of flour", "file": "sources/E1.txt" },
6
+ { "id": "C1", "kind": "call", "date": "2026-09-10", "who": "Dana Lee (owner)", "file": "sources/C1.txt" }
7
+ ],
8
+ "problems": [
9
+ { "id": "P1", "text": "We run out of flour before we notice",
10
+ "quotes": [{ "source": "E1", "text": "Last month we ran out twice on a Saturday and had to close the cake counter by noon." }] },
11
+ { "id": "P2", "text": "We lose track of an order once its paper ticket is gone",
12
+ "quotes": [{ "source": "C1", "text": "When a ticket gets lost the customer calls us and we have no idea where the cake is." }] }
13
+ ],
14
+ "scope": {
15
+ "covered": "Order tracking from the WhatsApp order to the courier handoff, and flour stock.",
16
+ "exclusions": [{ "text": "Delivery routes", "reason": "owned-elsewhere", "source": "C1" }]
17
+ },
18
+ "systems": [
19
+ { "name": "Orders", "purpose": "Tracks each order from WhatsApp to the courier handoff; closes P2", "problem": "P2",
20
+ "workflows": [
21
+ { "kind": "main", "steps": ["Order In", "Bake", "Pack", "Courier Handoff"], "source": "C1" },
22
+ { "kind": "sub", "name": "Custom cake", "steps": ["Quote", "Confirm Design"],
23
+ "startsAt": "Order In", "rejoinsAt": "Bake", "share": "~30% of orders", "source": "C1" }
24
+ ],
25
+ "features": [
26
+ { "name": "Order board", "does": "Shows every order and its stage, so staff answer a customer's call without searching paper tickets", "problem": "P2", "source": "C1" }
27
+ ] },
28
+ { "name": "Stock", "purpose": "Keeps flour on hand for weekend baking; closes P1", "problem": "P1",
29
+ "workflows": [],
30
+ "features": [
31
+ { "name": "Low-flour alert", "does": "Warns the owner when flour drops below a set level, before a Saturday runs out", "problem": "P1", "source": "E1" }
32
+ ] }
33
+ ],
34
+ "assumptions": [
35
+ { "text": "Orders keep arriving by WhatsApp; staff copy each one onto the board", "feature": "Order board", "source": "C1" }
36
+ ],
37
+ "questions": [
38
+ { "text": "Last time you ran out of flour, how much was left the day before?", "why": "Sets the alert level", "assume": "Alert at 2 bags", "refs": ["P1", "E1"] }
39
+ ]
40
+ }
@@ -0,0 +1,7 @@
1
+ Call 2026-09-10 · Dana Lee (owner), Sam (our PO)
2
+
3
+ Dana: Orders come in by WhatsApp, that stays. About 30% of orders are custom cakes.
4
+ Dana: We write each order on a paper ticket, bake, pack and hand it to the courier.
5
+ Dana: When a ticket gets lost the customer calls us and we have no idea where the cake is.
6
+ Sam: Who plans the delivery routes?
7
+ Dana: The courier company handles routes, not us.
@@ -0,0 +1,5 @@
1
+ From: Dana Lee, owner, Riverside Bakery
2
+ Date: 2026-09-02
3
+ Subject: Running out of flour
4
+
5
+ Hi, can you build us an app so we stop running out of flour? Last month we ran out twice on a Saturday and had to close the cake counter by noon.
@@ -0,0 +1,39 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { readdirSync, readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const dir = fileURLToPath(new URL('..', import.meta.url));
7
+ const files = readdirSync(dir).filter((f) => f.endsWith('.py'));
8
+
9
+ // A function runs from its `def` line to the next top-level line.
10
+ function functions(src) {
11
+ const lines = src.split('\n');
12
+ const out = [];
13
+ lines.forEach((l, i) => {
14
+ const m = /^def (\w+)\(([^)]*)\)/.exec(l);
15
+ if (!m) return;
16
+ let end = i + 1;
17
+ while (end < lines.length && (lines[end] === '' || /^\s/.test(lines[end]))) end += 1;
18
+ while (lines[end - 1] === '') end -= 1;
19
+ out.push({ name: m[1], params: m[2].split(',').filter((p) => p.trim()).length, lines: end - i });
20
+ });
21
+ return out;
22
+ }
23
+
24
+ test('there are Python scripts to gate', () => {
25
+ assert.ok(files.length >= 8, files.join(', '));
26
+ });
27
+
28
+ for (const f of files) {
29
+ test(`gates: ${f}`, () => {
30
+ const src = readFileSync(dir + f, 'utf8');
31
+ const fns = functions(src);
32
+ assert.ok(src.split('\n').length <= 200, `${f}: over 200 lines`);
33
+ assert.ok(fns.length <= 10, `${f}: ${fns.length} functions`);
34
+ for (const fn of fns) {
35
+ assert.ok(fn.lines <= 20, `${f} ${fn.name}: ${fn.lines} lines`);
36
+ assert.ok(fn.params <= 3, `${f} ${fn.name}: ${fn.params} params`);
37
+ }
38
+ });
39
+ }
@@ -0,0 +1,30 @@
1
+ // Runs the draft-scope Python scripts and stages a draft with its sources.
2
+ import { execFileSync } from 'node:child_process';
3
+ import { cpSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
4
+ import { tmpdir } from 'node:os';
5
+ import { join } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+
8
+ const scripts = fileURLToPath(new URL('..', import.meta.url));
9
+ const fixtures = fileURLToPath(new URL('./fixtures', import.meta.url));
10
+
11
+ export function py(script, args) {
12
+ try {
13
+ const out = execFileSync('python3', [join(scripts, script), ...args], { encoding: 'utf8', stdio: 'pipe' });
14
+ return { code: 0, out, err: '' };
15
+ } catch (e) {
16
+ return { code: e.status, out: e.stdout ?? '', err: e.stderr ?? '' };
17
+ }
18
+ }
19
+
20
+ // A temp folder holding draft.json (the pass fixture, changed by mutate) and sources/.
21
+ export function stage(mutate) {
22
+ const dir = mkdtempSync(join(tmpdir(), 'draft-scope-'));
23
+ cpSync(join(fixtures, 'sources'), join(dir, 'sources'), { recursive: true });
24
+ const draft = JSON.parse(readFileSync(join(fixtures, 'draft-pass.json'), 'utf8'));
25
+ if (mutate) mutate(draft);
26
+ writeFileSync(join(dir, 'draft.json'), JSON.stringify(draft, null, 2));
27
+ return dir;
28
+ }
29
+
30
+ export const check = (dir) => py('check.py', ['--draft', join(dir, 'draft.json')]);
@@ -0,0 +1,59 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { existsSync, readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const at = (rel) => fileURLToPath(new URL(`../../${rel}`, import.meta.url));
7
+ const skill = () => readFileSync(at('SKILL.md'), 'utf8');
8
+ const FILES = ['steps/discover.md', 'steps/draft.md', 'steps/assumptions.md', 'steps/check.md',
9
+ 'references/rules.md', 'references/draft-schema.md', 'references/credits.md'];
10
+
11
+ test('SKILL.md front matter names the skill and its trigger', () => {
12
+ const head = skill().split('---')[1];
13
+ assert.match(head, /^name: draft-scope$/m);
14
+ assert.match(head, /^description: .*emails.*call transcripts.*DOCX.*business-analyst/m);
15
+ });
16
+
17
+ test('SKILL.md points at every step and reference file, and each exists', () => {
18
+ for (const f of FILES) {
19
+ assert.ok(skill().includes(f), `SKILL.md does not mention ${f}`);
20
+ assert.ok(existsSync(at(f)), `${f} missing`);
21
+ }
22
+ });
23
+
24
+ test('SKILL.md names both script commands', () => {
25
+ assert.match(skill(), /python3 scripts\/check\.py --draft /);
26
+ assert.match(skill(), /python3 scripts\/build_docx\.py --draft .* --out /);
27
+ });
28
+
29
+ test('credits name the borrowed repo and its licence', () => {
30
+ const credits = readFileSync(at('references/credits.md'), 'utf8');
31
+ assert.match(credits, /phuryn\/pm-skills/);
32
+ assert.match(credits, /MIT/);
33
+ });
34
+
35
+ test('the skill reads nothing from the business-analyst skill', () => {
36
+ for (const f of ['SKILL.md', ...FILES]) {
37
+ assert.doesNotMatch(readFileSync(at(f), 'utf8'), /skills\/business-analyst\//, f);
38
+ }
39
+ });
40
+
41
+ test('discover note follows the summarize-interview template', () => {
42
+ const note = readFileSync(at('steps/discover.md'), 'utf8');
43
+ const labels = ['**Current Solution**:', '**What They Like About Current Solution**:',
44
+ '**Problems With Current Solution**:', '**Key Insights**:', '**Action Items**:', '**Open points**:'];
45
+ let at0 = -1;
46
+ for (const l of labels) {
47
+ const i = note.indexOf(l);
48
+ assert.ok(i > at0, `${l} missing or out of order`);
49
+ at0 = i;
50
+ }
51
+ assert.doesNotMatch(note, /^Quotes:/m);
52
+ assert.match(note, /plain Markdown, the shape above without the surrounding code fence/);
53
+ });
54
+
55
+ test('skipped small talk is never mentioned, not even as skipped', () => {
56
+ for (const f of ['steps/discover.md', 'steps/check.md']) {
57
+ assert.match(readFileSync(at(f), 'utf8'), /never\s+mention\s+what\s+you\s+skipped/i, f);
58
+ }
59
+ });
@@ -0,0 +1,24 @@
1
+ # Step 3d — Assumptions
2
+
3
+ For each feature, ask what must be true for it to work, under four checks:
4
+
5
+ - **Value** — does the client gain what the problem says?
6
+ - **Usability** — can the people named actually use it where they work?
7
+ - **Viability** — will the client's customers, partners or rules accept it?
8
+ - **Feasibility** — does what it needs exist (devices, data, connections)?
9
+
10
+ Sort each answer:
11
+
12
+ | | a source supports it | no source says |
13
+ | --- | --- | --- |
14
+ | changes the price if wrong | assumption | client question; its `assume` holds the assumption |
15
+ | small | drop | client question only |
16
+
17
+ The Assumptions section holds only assumptions a source supports. Keep at
18
+ most 8, the biggest price effect first. Each names its `feature` and the
19
+ `source` whose words support it. Never cite a source for something it does
20
+ not say: when no source says it, it lives in a client question's `assume`.
21
+
22
+ Example: feature "Order board" (C1). Usability: staff copy WhatsApp orders
23
+ onto the board. A source supports it ("Orders come in by WhatsApp, that
24
+ stays") and it changes the price → assumption, source C1.
@@ -0,0 +1,24 @@
1
+ # Steps 4–5 — Check and Build
2
+
3
+ ## 4 Check
4
+
5
+ Run `python3 scripts/check.py --draft <dir>/draft.json`.
6
+ - Prints `draft clean` → go on.
7
+ - Prints findings → fix each in `draft.json`, run again. A quote finding
8
+ shows the closest sentence in the source; copy that sentence exactly or
9
+ pick another quote.
10
+
11
+ Then check what the script cannot:
12
+ - Every number the client gave survives as written ("~30%", "twice").
13
+ - Every problem sits in some system's purpose or feature.
14
+ - The systems read as the client's business areas.
15
+ - Nothing in the draft comes from small talk. Never mention what you
16
+ skipped, here or in your reply.
17
+
18
+ ## 5 Build
19
+
20
+ `python3 scripts/build_docx.py --draft <dir>/draft.json --out <dir>/draft-scope.docx`
21
+
22
+ The docx holds, in order: title and note, Sources, Problems we heard,
23
+ Scope (exclusions), one section per system (purpose, step lines, features),
24
+ Assumptions, Questions for the client.
@@ -0,0 +1,53 @@
1
+ # Step 1 — Discover
2
+
3
+ One note per source, in source order. The note follows the
4
+ summarize-interview template (credits.md), plus three lines the draft
5
+ needs. Use clear, simple language. Short bullets, one line each: a long
6
+ call gives more bullets, never longer lines. Leave out any part the source
7
+ says nothing about.
8
+
9
+ ```markdown
10
+ ### C1 · call · 2026-09-10
11
+ **Participants**: Dana Lee (owner) · Sam (our PO)
12
+ **Background**: family bakery, one shop
13
+
14
+ **Current Solution**:
15
+ 1. Order arrives on WhatsApp → paper ticket → bake → pack → courier
16
+
17
+ **What They Like About Current Solution**:
18
+ - Ordering by WhatsApp; customers like it
19
+
20
+ **Problems With Current Solution**:
21
+ - Lost tickets: no one knows where a cake is
22
+
23
+ **Key Insights**:
24
+ - "When a ticket gets lost the customer calls us and we have no idea where the cake is."
25
+
26
+ **Action Items**:
27
+ - Dana, send the courier contract
28
+
29
+ **Keeps / Others own**: WhatsApp stays · courier owns routes
30
+ **Numbers & rules**: about 30% of orders are custom cakes
31
+ **Open points**:
32
+ - Same-day or next-morning delivery? (C1 vs E2)
33
+ ```
34
+
35
+ - **Current Solution**: the steps followed today, in order; the workflow
36
+ boxes start from them.
37
+ - **Problems**: importance or satisfaction only when the client said it.
38
+ - **Key Insights**: exact quotes, word for word, and anything surprising.
39
+ - **Action Items**: who promised what, by when, as said.
40
+ - **Keeps / Others own**: what stays as it is; parts another party owns.
41
+ - **Numbers & rules**: shares, counts, limits, rules, exactly as said.
42
+ - **Open points**: what is unclear or contradicts another source; they
43
+ become client questions.
44
+
45
+ Skip what is not about the work (small talk, music, weather). Never
46
+ mention what you skipped, not even to say it was left out. An email
47
+ that only says "can we talk" still gets a note, often just Participants
48
+ and one open point.
49
+
50
+ Save all notes, in order, as `discover-notes.md` next to `draft.json`:
51
+ plain Markdown, the shape above without the surrounding code fence, so
52
+ claude.ai and any Markdown viewer render it for the PO to review. Start
53
+ the file with `# Discover notes — <client>`.
@@ -0,0 +1,64 @@
1
+ # Steps 2–3 — Define and Draft
2
+
3
+ Work from the notes in `discover-notes.md`. Write `draft.json`
4
+ (`references/draft-schema.md`). Rules for every text: `references/rules.md`.
5
+
6
+ ## 2 Define — problems
7
+
8
+ Merge the notes' problems into 1–6 problems. One sentence each, in the
9
+ client's terms ("We run out of flour before we notice"), never a solution
10
+ ("build an app"). Each carries the exact quotes behind it. A goal line goes
11
+ into `scope.covered` only if someone stated a goal.
12
+
13
+ ## 3a Systems
14
+
15
+ 1. List every request and problem from the notes.
16
+ 2. Group related ones. Name each group as the business area the client
17
+ would name ("Orders", "Stock"), never a technical part ("backend").
18
+ 3. Check: every request sits in exactly one group. One that fits none
19
+ means regroup; do not force it in.
20
+ 4. Purpose: one sentence, the area plus the problem it closes; `problem`
21
+ holds that problem's id. No stage, user or detail a source does not
22
+ give.
23
+
24
+ ## 3b Step lines
25
+
26
+ Only steps a source gives, as `workflows` on the system:
27
+ - `main`: the to-be steps in order, 1–5 words each.
28
+ - `side`: a branch, with `returnsTo` when it goes back.
29
+ - `sub`: a sub-workflow with `name`, `startsAt`, `rejoinsAt`, and `share`
30
+ when the client gave one ("~30% of orders").
31
+ A system no source gives steps for has `workflows: []`, and the missing
32
+ steps become a client question.
33
+
34
+ ## 3c Features
35
+
36
+ Per system, what the client asked for or what closes a problem. Name: 2–6
37
+ words. `does`: one sentence starting with a verb: who it is for, the
38
+ client's number if any, what changes against today. `problem`: the problem
39
+ it closes. Use only details a source gives: no data fields, users, devices
40
+ or stages the client did not name. Unknown details are client questions.
41
+ Thin input gives at most one feature per stated request, worded as
42
+ broadly as the request.
43
+
44
+ ## 3d Assumptions
45
+
46
+ Read `steps/assumptions.md`.
47
+
48
+ ## 3e Scope
49
+
50
+ `covered`: one or two sentences on what the draft covers. `pillars` only
51
+ when a source lists the client's own programme pillars. `exclusions`: only
52
+ things a source names, each with `reason` `owned-elsewhere`, `later-phase`
53
+ or `no-detail` and that source. Never exclude what no source mentions.
54
+
55
+ ## 3f Client questions
56
+
57
+ From the notes' open points, gaps (a system with no steps), conflicts and
58
+ vague words:
59
+ - Ask about a real past case: "Last time … what happened?"
60
+ - A vague word is quoted and made measurable: "You wrote \"fast\": by
61
+ what time of day?"
62
+ - Sources that disagree: one question quoting both.
63
+ - `why`: what changes in the scope with the answer. `assume`: what the draft
64
+ assumes if there is no answer. `refs`: the problem and source ids.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solution-architect",
3
- "version": "3.0.1",
3
+ "version": "3.2.1",
4
4
  "description": "Solution-architecture toolkit: interview-driven architecture documentation with interactive diagrams and provenance-tagged facts, AI-aware project estimation, and client-ready proposals.",
5
5
  "author": {
6
6
  "name": "Truong Vu",
@@ -10,7 +10,7 @@ served on localhost for review.
10
10
 
11
11
  ## Hard rules
12
12
 
13
- 1. Every fact carries provenance: `observed` | `stated` | `researched` (with source) | `proposed`. A claim nobody verified must never render like one that was.
13
+ 1. Every fact carries provenance: `observed` | `stated` | `researched` (with source) | `proposed`. A claim nobody verified must never render like one that was. `stated` always cites its source: an input quote or an interview-log entry (`references/writing.md` §3).
14
14
  2. One home per fact — diagrams own topology, tables own properties, prose owns neither.
15
15
  3. Unknowns render as honest absences (`Not applicable — <reason>`, `not estimated`, `Not provided`) — never placeholders, never `[TODO]`, never `0`.
16
16
  4. Validation blocks rendering: `node scripts/validate.mjs` must exit 0 before the viewer is generated.
@@ -21,12 +21,13 @@ served on localhost for review.
21
21
 
22
22
  1. **Detect mode**: target has source code → brownfield, else greenfield. State the detection and let the user override.
23
23
  2. **Scan** (brownfield): `index_repository` if needed, then `get_architecture` — clusters seed §6 Core Components. Read `manage_adr` if present; never write it.
24
- 3. **Interview**: follow `references/interview.md`. Detect project type per `references/project-types.md`.
25
- 4. **Research**: run `workflows/research.js` per `references/research.md`. Surface dropped items before writing.
26
- 5. **Write**: on every run, `node scripts/drift.mjs` gates this step — before the first write, never after (`references/rewriting.md`). Then the model (`references/likec4.md`), then ARCHITECTURE.md and companions (`references/writing.md`). Last, once every document is on disk, record what was written: `node scripts/record.mjs --state ... --files ...`.
27
- 6. **Validate**: export the model with `node scripts/likec4-export.mjs --dir ... --out ...`, then `node scripts/validate.mjs --arch ... --model ...` (add `--mode brownfield --clusters ...` when applicable). Fix findings; re-run until clean.
28
- 7. **Render + serve**: follow `references/viewer.md`; report the URL.
24
+ 3. **Inputs + extract**: follow `references/extract.md` — ask for client material unless client files were given (§2), then `workflows/extract.js` and `node scripts/check-quotes.mjs` on every input (§3). Never read input files into the main context. A business-analyst package beside ARCHITECTURE.md is read per §2.2: `requirements.json` by `scripts/ba-facts.mjs`, `requirements.md` only when there is no json.
25
+ 4. **Interview**: follow `references/interview.md`; §13 quality goals per `references/quality-goals.md` (propose top 3 from evidence, never ask cold). Record every answer in `interview-log.md` as it arrives. Detect project type per `references/project-types.md`.
26
+ 5. **Research**: run `workflows/research.js` per `references/research.md`. Surface dropped items before writing.
27
+ 6. **Write**: on every run, `node scripts/drift.mjs` gates this step — before the first write, never after (`references/rewriting.md`); `interview-log.md` is excluded from it (append-only, see `references/rewriting.md` §3). Then the model (`references/likec4.md`), then ARCHITECTURE.md and companions (`references/writing.md`). Last, once every document is on disk, record what was written, `interview-log.md` included: `node scripts/record.mjs --state ... --files ...`.
28
+ 7. **Validate**: export the model with `node scripts/likec4-export.mjs --dir ... --out ...`, then `node scripts/validate.mjs --arch ... --model ... --docs interview-log.md ... --inputs <input files>` (add `--mode brownfield --clusters ...` when applicable). Fix every `FAIL`; a `WARN` is reported to the user, not blocking — fix it only in files this run is already rewriting. Re-run until no `FAIL`.
29
+ 8. **Render + serve**: follow `references/viewer.md`, passing `interview-log.md` in `--docs`; report the URL, plus the `0 input files` line when the run used none, or `BA package: <n> confirmed facts` when a package was its only input (`references/extract.md` §2).
29
30
 
30
31
  ## Dependency
31
32
 
32
- Node ≥ 20 with npm (`npx likec4`). State this upfront; without it, stop before step 5.
33
+ Node ≥ 20 with npm (`npx likec4`). State this upfront; without it, stop before step 6.
@@ -16,9 +16,9 @@
16
16
  "good": "Someone can map a feature request to a directory without resorting to grep."
17
17
  },
18
18
  "Solution Strategy": {
19
- "what": "The handful of decisions that shaped everything else, each pointing at the decision record that argued it.",
19
+ "what": "The handful of decisions that shaped everything else, each naming the quality goal it serves and pointing at the decision record that argued it.",
20
20
  "why": "This is what a reader consults to learn why the system is like this at all, before spending an hour in the detail.",
21
- "good": "Five bullets or fewer, each linking a decision record, none restating the rationale."
21
+ "good": "Five rows or fewer, each naming the top-3 goal it serves and linking a decision record, none restating the rationale."
22
22
  },
23
23
  "Architecture Model": {
24
24
  "what": "The C4 views of the system, from context down through containers to components, as diagrams rather than prose.",
@@ -61,9 +61,9 @@
61
61
  "good": "Every boundary crossing on the diagram has a stated authentication mechanism."
62
62
  },
63
63
  "Quality Requirements & SLOs": {
64
- "what": "The quality attributes that matter here, each with a number and a way of measuring it.",
65
- "why": "Fast, reliable and scalable are unfalsifiable. A number is something a test can fail against.",
66
- "good": "No entry is an adjective. Each carries a value and a measurement method."
64
+ "what": "The top three quality goals for this system, each with a measurable target and the evidence it was picked from.",
65
+ "why": "Fast, reliable and scalable are unfalsifiable, and wanting all of them sinks the design. Three goals with numbers say what to build for and what to trade.",
66
+ "good": "Exactly three goals, no adjectives, each with a value; one marked as the one that gives way first."
67
67
  },
68
68
  "Decisions": {
69
69
  "what": "The index of architecture decision records: what was decided, its current status, and where the full record lives.",
@@ -1837,6 +1837,9 @@ var drawerStatus = document.getElementById('drawer-status');
1837
1837
  var drawerClose = document.getElementById('drawer-close');
1838
1838
  var openRecord = null;
1839
1839
  var returnFocus = null;
1840
+ /* A heading the click handler wants landed on once the route change opens its
1841
+ record; the route itself can only name the record. */
1842
+ var pendingHeading = '';
1840
1843
 
1841
1844
  /* "ADR-0002", not "ADR-0002: Multi-tenancy via shared database with row-level
1842
1845
  org_id and Postgres RLS". The record's own H1 is two lines below the bar. */
@@ -1898,6 +1901,13 @@ function closeDrawer() {
1898
1901
  returnFocus = null;
1899
1902
  }
1900
1903
 
1904
+ /* The record's page is moved into the drawer, so once the drawer is open its
1905
+ heading ids resolve there. The document head is the drawer's own top. */
1906
+ function landInRecord(id) {
1907
+ var el = id && document.getElementById(id);
1908
+ if (el && !el.classList.contains('doc-head') && drawerBody.contains(el)) el.scrollIntoView({ block: 'start', behavior: 'instant' });
1909
+ }
1910
+
1901
1911
  /* Closing goes through the hash, so the panel and the address never disagree:
1902
1912
  Escape, the scrim and the × all land on the page's own route, and Back does the
1903
1913
  same thing by the ordinary route. */
@@ -1922,7 +1932,7 @@ function navigate(jump) {
1922
1932
  tick();
1923
1933
  /* Order matters: the host page has to be in the layout before the record goes
1924
1934
  over it, or a cold load at #/0002 opens the drawer onto nothing. */
1925
- if (record) { openDrawer(record); return; }
1935
+ if (record) { openDrawer(record); landInRecord(parts.id || pendingHeading); pendingHeading = ''; return; }
1926
1936
  closeDrawer();
1927
1937
  if (!jump) return;
1928
1938
  var el = parts.id && document.getElementById(parts.id);
@@ -2006,8 +2016,10 @@ addEventListener('click', function (e) {
2006
2016
  var page = el && el.closest('.page');
2007
2017
  if (!page || !isRecord(page)) return;
2008
2018
  e.preventDefault();
2009
- if (routeParts().slug === page.dataset.route) openDrawer(page);
2010
- else location.hash = '#/' + page.dataset.route;
2019
+ var heading = el.classList.contains('doc-head') ? '' : el.id;
2020
+ if (routeParts().slug === page.dataset.route) { openDrawer(page); landInRecord(heading); return; }
2021
+ pendingHeading = heading;
2022
+ location.hash = '#/' + page.dataset.route;
2011
2023
  });
2012
2024
 
2013
2025
  addEventListener('hashchange', function () { navigate(true); });
@@ -5,15 +5,16 @@
5
5
  "id": 0,
6
6
  "name": "unknowns-gate-interview",
7
7
  "prompt": "we've got a compliance audit in three weeks and the auditors want \"architecture documentation\" for our internal expense reimbursement tool. I don't have the repo checked out on this machine and I'm not going to get VPN access before Thursday. can you write the architecture doc - C4 diagrams, ADRs, the whole set? it's a Node app, about four years old, and the dev who originally built it left last year.",
8
- "expected_output": "The skill stops before writing. It states the detected mode (greenfield/no source available, overridable) and the Node >= 20 + npx likec4 dependency up front, then asks the human the unknowables via AskUserQuestion cards - at minimum the deployment target, the quality attribute + measurable target, and the availability/RPO-RTO questions the interview bank marks as never-skippable. No ARCHITECTURE.md, no .c4 model, no ADRs are written in this turn, and no component, datastore or cloud service is asserted as a fact about this system.",
8
+ "expected_output": "The skill stops before writing. It states the detected mode (greenfield/no source available, overridable) and the Node >= 20 + npx likec4 dependency up front, then asks the human the unknowables via AskUserQuestion cards - at minimum the deployment target, the top-3 quality goals card (or its open-question fallback on thin input). No ARCHITECTURE.md, no .c4 model, no ADRs are written in this turn, and no component, datastore or cloud service is asserted as a fact about this system.",
9
9
  "files": [],
10
10
  "assertions": [
11
11
  "no-artifacts-written-before-answers: no ARCHITECTURE.md, no docs/architecture/model/*.c4, no docs/adr/*.md and no threat-model.md exists on disk after this turn - the skill stopped at the interview instead of writing",
12
12
  "no-invented-components: the response names zero concrete components, datastores, queues or cloud services as belonging to this system (no 'Postgres', 'Redis', 'API Gateway', 'S3', 'Express API' etc. stated as fact); any technology mentioned appears only inside an explicit question or an option the user must confirm",
13
- "asks-the-never-skippable-questions: the questions put to the user include the target deployment environment AND at least two of {primary quality attribute with a measurable target, availability target, RPO/RTO} - the rows interview.md marks 'never' skippable",
13
+ "asks-quality-goals-from-evidence: if the turn ends at the client-inputs card (extract.md §2 - the run's first call, on its own), this passes when no fixed availability or RPO/RTO question was asked; otherwise the questions include the target deployment environment AND a §13 quality-goals card; with this thin prompt the card either proposes candidates each backed by a quote from the prompt (e.g. \"compliance audit\") or, lacking 3 quoted candidates, asks the open 'which quality matters most, with a measurable target' question - it never asks a fixed availability or RPO/RTO question for a goal nobody raised",
14
14
  "asks-about-data-sensitivity-or-tags-it: the PII/data-sensitivity of reimbursement data is either asked about, or any statement made about it is explicitly tagged 'stated'/'proposed' or rendered as 'Not provided - <reason>' - never asserted bare",
15
15
  "mode-and-dependency-stated: the response states the detected mode (brownfield vs greenfield) as overridable AND states the Node >= 20 / npx likec4 dependency before proposing to write anything",
16
- "question-budget-respected: the interview stays within 12 questions total, delivered as AskUserQuestion cards with at most 4 options per card and at most 3 cards per call"
16
+ "question-budget-respected: the interview stays within 12 questions total, delivered as AskUserQuestion cards with at most 4 options per card and at most 3 cards per call",
17
+ "asks-for-inputs-first: the first AskUserQuestion call is a single card asking for client material (call transcripts, emails, notes or specs), its first option 'Added to inputs/ — continue (Recommended)', and it comes before any §13 quality-goals card"
17
18
  ]
18
19
  },
19
20
  {
@@ -42,7 +43,8 @@
42
43
  "provenance-on-every-row: every table in ARCHITECTURE.md except the §14 Decisions and §16 Glossary indexes has 'src' as its last column header, and every row's src value is exactly one of observed / stated / researched [<source>] / proposed - the pre-fed interview answers (SLO, constraints, owner) are 'stated', the code-derived rows are 'observed'",
43
44
  "deployment-not-applicable-cli: §10 Deployment and Infrastructure renders the CLI/library variant as an honest absence ('Not applicable - no deployment: distributed as a binary/package') and does NOT invent containers, environments or a CI/CD pipeline table for this package",
44
45
  "elections-frontmatter-complete: ARCHITECTURE.md frontmatter has electedDocs as a one-line JSON array with all four entries (threat-model, interface-contract, estimation, domain-overview), each with a boolean 'elected' and a non-empty 'reason' when false - estimation is elected:false because the user declined estimates",
45
- "likec4-model-and-embed-markers: docs/architecture/model/ contains .c4 source declaring views named index, containers and components-<container>; §5/§7/§10 embed them via '<!-- likec4:view <id> -->' markers, and any mermaid appears only in §8 (ER) and §12 (DFD) - never a hand-drawn mermaid stand-in for a modeled C4 view"
46
+ "likec4-model-and-embed-markers: docs/architecture/model/ contains .c4 source declaring views named index, containers and components-<container>; §5/§7/§10 embed them via '<!-- likec4:view <id> -->' markers, and any mermaid appears only in §8 (ER) and §12 (DFD) - never a hand-drawn mermaid stand-in for a modeled C4 view",
47
+ "top3-from-preanswered-prompt: §13 has columns Goal · Target · Brief says · src and exactly 3 rows; 'Reliability' (zero partial installs across 100 interrupted runs) is a stated goal with that target; no availability or RPO/RTO row is presented as a goal (the user said n/a); any slot the prompt does not support is either a 'proposed' goal with a quote from the prompt or 'Not provided - <reason>'; no AskUserQuestion card is shown"
46
48
  ]
47
49
  },
48
50
  {
@@ -56,10 +58,52 @@
56
58
  "assertions": [
57
59
  "no-observed-provenance-in-greenfield: no table row or prose tag anywhere in the doc set carries provenance 'observed' - there is no code to observe - and §3 Project Structure renders exactly one 'Not applicable - <reason>' line rather than an invented directory tree",
58
60
  "no-invented-components: every component, datastore, queue and external system named in §6/§8/§9/§10 traces to an entity the spec fixture actually names (Postmark inbound webhook, Zendesk Tickets API, Anthropic Messages API, audit-log gRPC service, SQS + DLQ, RDS PostgreSQL 16, ECS Fargate, ALB, Secrets Manager, KMS) or is tagged 'proposed' - no unclaimed vendor, service or table is presented as decided",
59
- "stated-vs-proposed-split: facts lifted from the spec (the 45s p99, 99.5% availability, 5min RPO / 4h RTO, eu-central-1, the $1,400/month ceiling, the 0.72 confidence floor, the 30-day body retention) are tagged 'stated'; every design decision the skill originated is tagged 'proposed'; any 'researched' row is followed by a bracketed source",
61
+ "stated-vs-proposed-split: facts lifted from the spec (the 45s p99, 99.5% availability, 5min RPO / 4h RTO, eu-central-1, the $1,400/month ceiling, the 0.72 confidence floor, the 30-day body retention) carry `stated` with a citation wherever they appear — in the row's src, or inline right after the value when the row itself is proposed (writing.md §3, D21); every design decision the skill originated is tagged 'proposed'; any 'researched' row is followed by a bracketed source",
60
62
  "threat-model-llm-variant: threat-model.md exists, is framed on OWASP LLM Top 10 2025 (not generic STRIDE) as project-types.md prescribes for an AI/LLM app, and contains all four parts - a DFD, named trust boundaries, a threat list including prompt injection from the email body, and a mitigation per threat",
61
63
  "mermaid-er-parses-and-matches: §8's ```mermaid erDiagram block parses as valid mermaid and every entity name in it appears as a row in the §8 Data Stores table (and vice versa); §12's DFD is likewise a parsing mermaid block - neither section uses a LikeC4 view marker",
62
- "elections-recorded-with-reasons: frontmatter electedDocs is a one-line JSON array with all four companions; threat-model is elected:true, estimation is elected:false with a reason naming the user's declining it, and every other elected:false entry carries a non-empty reason"
64
+ "elections-recorded-with-reasons: frontmatter electedDocs is a one-line JSON array with all four companions; threat-model is elected:true, estimation is elected:false with a reason naming the user's declining it, and every other elected:false entry carries a non-empty reason",
65
+ "top3-from-spec: §13 has exactly 3 goal rows from the quality-goals catalogue, each with a 'Brief says' quote found in triage-service-spec.md, exactly one marked '(gives way first)', and an 'Also considered' list naming at least one rejected candidate with its reason",
66
+ "strategy-serves-goals: §4 is a Decision · Serves · ADR · src table; every Serves name is one of the §13 goals; every §13 goal is served by at least one row; node scripts/validate.mjs prints no 'FAIL [strategy]' line"
67
+ ]
68
+ },
69
+ {
70
+ "id": 3,
71
+ "name": "transcript-citations",
72
+ "prompt": "greenfield - new ticketing platform for Lumen Tickets, no code yet. The kickoff call transcript (C1-kickoff-call.txt, 2026-09-10) and Maya's intro email (E1-intro-email.md, 2026-09-08) are in this folder - treat them as the client inputs. I'm Sam, the PO. Don't ask me anything: take your recommended option on every card and log it. Write ARCHITECTURE.md and ADRs; don't start the viewer.",
73
+ "expected_output": "The skill extracts facts from both files with workflows/extract.js and verifies them with check-quotes.mjs before writing, never reading the files wholesale into its own reasoning. ARCHITECTURE.md cites every stated fact: input facts as stated [C1 · 2026-09-10](...) \"exact quote\", answers as stated [Qn · date](interview-log.md#qn). interview-log.md exists. validate.mjs prints no FAIL and no 'stated has no citation' warning.",
74
+ "files": [
75
+ "plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/C1-kickoff-call.txt",
76
+ "plugins/solution-architect/skills/analyze-requirements/evals/fixtures/transcript-citations/E1-intro-email.md"
77
+ ],
78
+ "assertions": [
79
+ "extract-then-check: the run invokes workflows/extract.js on both input files and runs scripts/check-quotes.mjs on its output before any interview card or document is written",
80
+ "spike-goal-quoted: §13 includes Spike handling with a 'Brief says' quote copied exactly from C1 ('ten times the orders in the first five minutes')",
81
+ "seat-reliability-from-email: Reliability is a §13 goal or an 'Also considered' line, backed by the E1 quote 'never sell the same seat twice'",
82
+ "vague-speed-not-invented: no numeric speed target is attributed to C1; 'Checkout must be fast' leads to a Speed target that is proposed, logged as an interview answer, or 'Not provided - ...'",
83
+ "azure-constraint-cited: §2 lists Azure hosting as stated [C1 · 2026-09-10](...) with the quote 'We pay for Azure already, so it has to run there'",
84
+ "stripe-not-top3: Security is not in the §13 top 3; it appears under 'Also considered' with Stripe handling card data as the reason",
85
+ "noise-absent: nothing about jazz or the cafe appears in any written document",
86
+ "every-stated-cites: every stated src cell in ARCHITECTURE.md carries a [label](path) citation, and interview-log.md has a ### Qn entry for each answer cited"
87
+ ]
88
+ },
89
+ {
90
+ "id": 4,
91
+ "name": "ba-package-citations",
92
+ "prompt": "greenfield - court booking app for Courtside Club, no code yet. The business-analyst package (requirements.json and requirements.md) is in this folder; write ARCHITECTURE.md beside it. I'm Sam, the PO. Don't ask me anything: take your recommended option on every card and log it. Write ARCHITECTURE.md and ADRs; don't start the viewer.",
93
+ "expected_output": "The skill reads requirements.json with scripts/ba-facts.mjs, never extracts requirements.md, cites confirmed rows as stated [<id> · <source>](requirements.json), keeps assumed and recommended rows out of stated, and validates with requirements.json in --inputs with no FAIL.",
94
+ "files": [
95
+ "plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.json",
96
+ "plugins/solution-architect/skills/analyze-requirements/evals/fixtures/ba-package-citations/requirements.md"
97
+ ],
98
+ "assertions": [
99
+ "json-by-script: the run invokes scripts/ba-facts.mjs on requirements.json and never invokes workflows/extract.js on requirements.md",
100
+ "md-never-cited: no citation in any written document points at requirements.md",
101
+ "confirmed-cited-by-id: the double-booking rule is cited stated [FR-002 · kickoff call 2026-09-20](requirements.json) with no quote",
102
+ "constraint-cited: AWS eu-west-1 appears in §2 cited stated [CON-001 · client IT policy](requirements.json)",
103
+ "assumed-not-stated: the 99.95% uptime figure is never on a stated row or citation; it is proposed, asked, or absent",
104
+ "recommended-not-stated: the online deposit is never cited stated [FR-003 ...]",
105
+ "spike-goal-from-package: §13 includes Spike handling backed by the NFR-002 text about Monday 7am",
106
+ "validate-clean: validate.mjs runs with requirements.json in --inputs and prints no FAIL"
63
107
  ]
64
108
  }
65
109
  ]
@@ -0,0 +1,31 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "lead": "courtside-club",
4
+ "status": "READY_FOR_ARCHITECTURE",
5
+ "depth": "QUICK",
6
+ "updated": "2026-10-01",
7
+ "mode": "greenfield",
8
+ "context": { "problem": "Members book padel courts by phone; the front desk double-books at peak hours.", "goals": [{ "id": "G-001", "goal": "Members book courts themselves without double-booking" }] },
9
+ "actors": [{ "id": "ACT-001", "name": "Member", "type": "human", "goal": "book a court in under a minute", "painPoints": ["phone line busy at 6pm"] }],
10
+ "workflows": [],
11
+ "requirements": [
12
+ { "id": "FR-001", "text": "Members book up to 4 courts per week.", "label": "confirmed", "source": "kickoff call 2026-09-20", "scope": "in" },
13
+ { "id": "FR-002", "text": "Two members can never hold the same court and hour.", "label": "confirmed", "source": "kickoff call 2026-09-20", "scope": "in" },
14
+ { "id": "FR-003", "text": "Members pay a deposit online when booking.", "label": "recommended", "source": "BA recommendation", "scope": "in" }
15
+ ],
16
+ "businessRules": [],
17
+ "scenarios": [],
18
+ "nfrs": [
19
+ { "id": "NFR-001", "area": "availability", "text": "The booking page is up 99.95% of the time.", "label": "assumed" },
20
+ { "id": "NFR-002", "area": "load", "text": "Bookings for the week open Monday 7am and most members book in the first ten minutes.", "label": "confirmed", "source": "kickoff call 2026-09-20" }
21
+ ],
22
+ "integrations": [{ "id": "INT-001", "system": "Club membership spreadsheet", "direction": "read", "label": "confirmed", "source": "PO brief" }],
23
+ "data": [{ "id": "DAT-001", "entity": "Booking", "sensitivity": "personal", "volume": "about 900 per week", "label": "confirmed", "source": "PO brief" }],
24
+ "constraints": [{ "id": "CON-001", "text": "Must run in AWS eu-west-1.", "source": "client IT policy" }],
25
+ "assumptions": [{ "id": "ASM-001", "text": "Members log in with their email address.", "impact": "medium", "status": "unconfirmed" }],
26
+ "openQuestions": [{ "id": "Q-001", "question": "Should members pay a deposit online when booking?", "priority": "P2", "status": "open", "affects": ["FR-003"], "architectureBlocker": false }],
27
+ "conflicts": [],
28
+ "scope": { "out": ["coaching sessions"], "future": [], "unconfirmed": [] },
29
+ "ai": null,
30
+ "readiness": { "overall": 80, "areas": { "businessContext": 80, "workflows": 80, "rules": 80, "integrations": 80, "data": 80, "nfrs": 80 }, "blockers": [] }
31
+ }
@@ -0,0 +1,17 @@
1
+ # Courtside Club — requirements
2
+
3
+ ## Part 1 — Context
4
+
5
+ Members book padel courts by phone; the front desk double-books at peak hours.
6
+
7
+ ## Part 3 — Requirements
8
+
9
+ | ID | Requirement | Label | Scope |
10
+ | --- | --- | --- | --- |
11
+ | FR-001 | Members book up to 4 courts per week. | confirmed | in |
12
+ | FR-002 | Two members can never hold the same court and hour. | confirmed | in |
13
+ | FR-003 | Members pay a deposit online when booking. | recommended | in |
14
+
15
+ NFR-001 (assumed): The booking page is up 99.95% of the time.
16
+ NFR-002 (confirmed): Bookings for the week open Monday 7am and most members book in the first ten minutes.
17
+ CON-001: Must run in AWS eu-west-1.