@v11g/agents-rock 1.0.2 → 1.0.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.
Files changed (65) hide show
  1. package/README.md +4 -2
  2. package/package.json +1 -1
  3. package/plugins/business-analyst/.claude-plugin/plugin.json +9 -0
  4. package/plugins/business-analyst/skills/business-analyst/README.md +23 -0
  5. package/plugins/business-analyst/skills/business-analyst/SKILL.md +73 -0
  6. package/plugins/business-analyst/skills/business-analyst/references/ai-extension.md +37 -0
  7. package/plugins/business-analyst/skills/business-analyst/references/frameworks.md +53 -0
  8. package/plugins/business-analyst/skills/business-analyst/references/interview.md +89 -0
  9. package/plugins/business-analyst/skills/business-analyst/references/review.md +25 -0
  10. package/plugins/business-analyst/skills/business-analyst/references/writing.md +102 -0
  11. package/plugins/business-analyst/skills/business-analyst/scripts/lib/checks.mjs +166 -0
  12. package/plugins/business-analyst/skills/business-analyst/scripts/lib/schema.mjs +78 -0
  13. package/plugins/business-analyst/skills/business-analyst/scripts/test/checks.test.mjs +188 -0
  14. package/plugins/business-analyst/skills/business-analyst/scripts/test/e2e.test.mjs +17 -0
  15. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-fail.json +205 -0
  16. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-pass.json +59 -0
  17. package/plugins/business-analyst/skills/business-analyst/scripts/test/fixtures/requirements-pass.md +63 -0
  18. package/plugins/business-analyst/skills/business-analyst/scripts/test/python-parity.test.mjs +50 -0
  19. package/plugins/business-analyst/skills/business-analyst/scripts/test/schema.test.mjs +41 -0
  20. package/plugins/business-analyst/skills/business-analyst/scripts/validate.mjs +20 -0
  21. package/plugins/business-analyst/skills/business-analyst/scripts/validate.py +288 -0
  22. package/plugins/solution-architect/.claude-plugin/plugin.json +1 -1
  23. package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +4 -2
  24. package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/chrome.mjs +4 -1
  25. package/plugins/solution-architect/skills/analyze-requirements/scripts/test/viewer-template.test.mjs +3 -2
  26. package/plugins/solution-architect/skills/estimate/SKILL.md +13 -5
  27. package/plugins/solution-architect/skills/estimate/assets/estimate-template-agentic.html +917 -0
  28. package/plugins/solution-architect/skills/estimate/assets/estimate-template.html +430 -13
  29. package/plugins/solution-architect/skills/estimate/references/agentic-estimation.md +148 -0
  30. package/plugins/solution-architect/skills/estimate/references/ai-multipliers.md +10 -0
  31. package/plugins/solution-architect/skills/estimate/references/interview.md +20 -1
  32. package/plugins/solution-architect/skills/estimate/references/task-shapes.md +173 -0
  33. package/plugins/solution-architect/skills/estimate/references/writing.md +31 -0
  34. package/plugins/solution-architect/skills/estimate/scripts/compute.mjs +5 -1
  35. package/plugins/solution-architect/skills/estimate/scripts/lib/agentic-checks.mjs +65 -0
  36. package/plugins/solution-architect/skills/estimate/scripts/lib/baselines.mjs +107 -0
  37. package/plugins/solution-architect/skills/estimate/scripts/lib/checks.mjs +16 -7
  38. package/plugins/solution-architect/skills/estimate/scripts/lib/inline.mjs +14 -0
  39. package/plugins/solution-architect/skills/estimate/scripts/lib/measurements.mjs +59 -0
  40. package/plugins/solution-architect/skills/estimate/scripts/lib/redact.mjs +28 -5
  41. package/plugins/solution-architect/skills/estimate/scripts/lib/rollup.mjs +53 -22
  42. package/plugins/solution-architect/skills/estimate/scripts/lib/schema.mjs +52 -7
  43. package/plugins/solution-architect/skills/estimate/scripts/render.mjs +14 -3
  44. package/plugins/solution-architect/skills/estimate/scripts/test/baselines.test.mjs +120 -0
  45. package/plugins/solution-architect/skills/estimate/scripts/test/browser.test.mjs +69 -0
  46. package/plugins/solution-architect/skills/estimate/scripts/test/compute.test.mjs +44 -0
  47. package/plugins/solution-architect/skills/estimate/scripts/test/e2e.test.mjs +28 -1
  48. package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/agentic-estimation-fail.md +55 -0
  49. package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/agentic-estimation-pass.md +54 -0
  50. package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/agentic-inputs.json +45 -0
  51. package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/measurements.jsonl +20 -0
  52. package/plugins/solution-architect/skills/estimate/scripts/test/measurements.test.mjs +54 -0
  53. package/plugins/solution-architect/skills/estimate/scripts/test/references.test.mjs +25 -1
  54. package/plugins/solution-architect/skills/estimate/scripts/test/render.test.mjs +48 -1
  55. package/plugins/solution-architect/skills/estimate/scripts/test/schema.test.mjs +59 -0
  56. package/plugins/solution-architect/skills/estimate/scripts/test/validate.test.mjs +37 -0
  57. package/plugins/solution-architect/skills/estimate/scripts/test/xlsx-export.test.mjs +168 -0
  58. package/plugins/solution-architect/skills/estimate/scripts/test/zip.mjs +41 -0
  59. package/plugins/solution-architect/skills/new-lead/SKILL.md +15 -10
  60. package/plugins/solution-architect/skills/new-lead/assets/dashboard/detail.html +25 -50
  61. package/plugins/solution-architect/skills/new-lead/assets/dashboard/index.html +20 -40
  62. package/plugins/solution-architect/skills/new-lead/scripts/lib/map-nodes.mjs +12 -4
  63. package/plugins/solution-architect/skills/new-lead/scripts/serve.mjs +8 -3
  64. package/plugins/solution-architect/skills/new-lead/scripts/test/map.test.mjs +4 -0
  65. package/plugins/solution-architect/skills/new-lead/scripts/test/serve.test.mjs +25 -21
@@ -0,0 +1,41 @@
1
+ import { test } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { readFileSync } from 'node:fs';
4
+ import { checkSchema } from '../lib/schema.mjs';
5
+
6
+ const load = () =>
7
+ JSON.parse(readFileSync(new URL('./fixtures/requirements-pass.json', import.meta.url), 'utf8'));
8
+
9
+ test('the pass fixture has no schema findings', () => {
10
+ assert.deepEqual(checkSchema(load()), []);
11
+ });
12
+
13
+ test('a missing top-level field is named', () => {
14
+ const pkg = load();
15
+ delete pkg.readiness;
16
+ assert.ok(checkSchema(pkg).some((f) => f.includes('readiness')));
17
+ });
18
+
19
+ test('an illegal status is refused', () => {
20
+ const pkg = load();
21
+ pkg.status = 'FINISHED';
22
+ assert.ok(checkSchema(pkg).some((f) => f.includes('illegal status')));
23
+ });
24
+
25
+ test('a bad id format is refused', () => {
26
+ const pkg = load();
27
+ pkg.requirements[0].id = 'REQ-1';
28
+ assert.ok(checkSchema(pkg).some((f) => f.includes('bad id REQ-1')));
29
+ });
30
+
31
+ test('a bad goal id format is refused', () => {
32
+ const pkg = load();
33
+ pkg.context.goals[0].id = 'GOAL-1';
34
+ assert.ok(checkSchema(pkg).some((f) => f.includes('bad id GOAL-1')));
35
+ });
36
+
37
+ test('an illegal row enum is refused', () => {
38
+ const pkg = load();
39
+ pkg.requirements[0].label = 'definite';
40
+ assert.ok(checkSchema(pkg).some((f) => f.includes('illegal label')));
41
+ });
@@ -0,0 +1,20 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { checkPackage } from './lib/checks.mjs';
3
+
4
+ function parseArgs(argv) {
5
+ const args = {};
6
+ for (let i = 0; i < argv.length; i += 1) {
7
+ if (argv[i].startsWith('--')) args[argv[i].slice(2)] = argv[++i];
8
+ }
9
+ return args;
10
+ }
11
+
12
+ const args = parseArgs(process.argv.slice(2));
13
+ const md = readFileSync(args.md, 'utf8');
14
+ const pkg = JSON.parse(readFileSync(args.json, 'utf8'));
15
+ const findings = checkPackage({ pkg, md });
16
+ if (findings.length) {
17
+ console.error(findings.join('\n'));
18
+ process.exit(1);
19
+ }
20
+ console.log('requirements package valid');
@@ -0,0 +1,288 @@
1
+ #!/usr/bin/env python3
2
+ """Python port of validate.mjs for environments without Node (e.g. the
3
+ claude.ai sandbox). Same checks, same finding strings, same exit codes —
4
+ kept in lockstep by scripts/test/python-parity.test.mjs."""
5
+ import json
6
+ import math
7
+ import re
8
+ import sys
9
+
10
+ STATUSES = ['DRAFT', 'CLARIFICATION_REQUIRED', 'ANALYZED', 'VALIDATED', 'READY_FOR_ARCHITECTURE']
11
+ DEPTHS = ['QUICK', 'STANDARD', 'DEEP']
12
+ MODES = ['greenfield', 'existing']
13
+ LABELS = ['confirmed', 'assumed', 'recommended']
14
+ PRIORITIES = ['P1', 'P2', 'P3']
15
+ FR_SCOPES = ['in', 'out', 'future', 'unconfirmed']
16
+ AREAS = ['businessContext', 'workflows', 'rules', 'integrations', 'data', 'nfrs']
17
+
18
+ REGISTERS = [
19
+ ('actors', r'^ACT-\d{3}$'),
20
+ ('workflows', r'^WF-\d{3}$'),
21
+ ('requirements', r'^FR-\d{3}$'),
22
+ ('businessRules', r'^BR-\d{3}$'),
23
+ ('scenarios', r'^SC-\d{3}$'),
24
+ ('nfrs', r'^NFR-\d{3}$'),
25
+ ('integrations', r'^INT-\d{3}$'),
26
+ ('data', r'^DAT-\d{3}$'),
27
+ ('constraints', r'^CON-\d{3}$'),
28
+ ('assumptions', r'^ASM-\d{3}$'),
29
+ ('openQuestions', r'^Q-\d{3}$'),
30
+ ('conflicts', r'^CONFLICT-\d{3}$'),
31
+ ]
32
+
33
+ REQUIRED = ['schemaVersion', 'lead', 'status', 'depth', 'updated', 'mode', 'context', 'scope', 'ai', 'readiness']
34
+ TOP_ENUMS = [('status', STATUSES), ('depth', DEPTHS), ('mode', MODES)]
35
+
36
+ ROW_ENUMS = [
37
+ ('requirements', 'label', LABELS),
38
+ ('requirements', 'scope', FR_SCOPES),
39
+ ('nfrs', 'label', LABELS),
40
+ ('integrations', 'label', LABELS),
41
+ ('integrations', 'direction', ['read', 'write', 'both']),
42
+ ('data', 'label', LABELS),
43
+ ('scenarios', 'type', ['happy', 'edge', 'error']),
44
+ ('assumptions', 'impact', ['high', 'medium', 'low']),
45
+ ('assumptions', 'status', ['unconfirmed', 'accepted', 'resolved']),
46
+ ('openQuestions', 'priority', PRIORITIES),
47
+ ('openQuestions', 'status', ['open', 'answered']),
48
+ ('conflicts', 'status', ['open', 'resolved']),
49
+ ]
50
+
51
+ LABELED = ['requirements', 'nfrs', 'integrations', 'data']
52
+ SOURCED = ['requirements', 'businessRules', 'constraints']
53
+
54
+ AMBIGUOUS = [
55
+ 'fast', 'quick', 'easy', 'simple', 'user-friendly', 'intuitive', 'flexible',
56
+ 'robust', 'seamless', 'efficient', 'optimal', 'appropriate', 'various',
57
+ 'etc', 'some', 'many', 'several', 'as needed',
58
+ ]
59
+
60
+ PARTS = ['Part 1', 'Part 2', 'Part 3', 'Part 4', 'Part 5']
61
+ QUICK_PARTS = ['Part 1', 'Part 3', 'Part 5']
62
+ ID_TOKEN = re.compile(r'\b(?:G|ACT|WF|FR|BR|SC|NFR|INT|DAT|CON|ASM|Q|CONFLICT)-\d{3}\b')
63
+
64
+
65
+ def rows(pkg, name):
66
+ return pkg.get(name) or []
67
+
68
+
69
+ def goals(pkg):
70
+ return (pkg.get('context') or {}).get('goals') or []
71
+
72
+
73
+ def check_schema(pkg):
74
+ findings = []
75
+ for f in REQUIRED:
76
+ if f not in pkg:
77
+ findings.append(f'missing required field: {f}')
78
+ for f, legal in TOP_ENUMS:
79
+ if f in pkg and pkg[f] not in legal:
80
+ findings.append(f'illegal {f}: {pkg[f]}')
81
+ for g in goals(pkg):
82
+ if not re.match(r'^G-\d{3}$', g.get('id') or ''):
83
+ findings.append(f"context.goals: bad id {g.get('id')}")
84
+ for name, pattern in REGISTERS:
85
+ for row in rows(pkg, name):
86
+ if not re.match(pattern, row.get('id') or ''):
87
+ findings.append(f"{name}: bad id {row.get('id')}")
88
+ for name, field, legal in ROW_ENUMS:
89
+ for row in rows(pkg, name):
90
+ if field in row and row[field] not in legal:
91
+ findings.append(f'{row.get("id")}: illegal {field} "{row[field]}"')
92
+ return findings
93
+
94
+
95
+ def collect_ids(pkg):
96
+ ordered = {}
97
+ for g in goals(pkg):
98
+ ordered[g.get('id')] = True
99
+ for name, _ in REGISTERS:
100
+ for row in rows(pkg, name):
101
+ ordered[row.get('id')] = True
102
+ return list(ordered)
103
+
104
+
105
+ def check_duplicates(pkg):
106
+ findings, seen = [], set()
107
+ all_rows = list(goals(pkg))
108
+ for name, _ in REGISTERS:
109
+ all_rows.extend(rows(pkg, name))
110
+ for row in all_rows:
111
+ rid = row.get('id')
112
+ if rid in seen:
113
+ findings.append(f'duplicate id: {rid}')
114
+ seen.add(rid)
115
+ return findings
116
+
117
+
118
+ def check_refs(pkg, ids):
119
+ findings = []
120
+
121
+ def miss(owner, ref):
122
+ findings.append(f'{owner}: dangling reference {ref}')
123
+
124
+ for fr in rows(pkg, 'requirements'):
125
+ t = fr.get('traces') or {}
126
+ refs = [t.get('goal'), t.get('workflow'), *(t.get('rules') or []), *(fr.get('acceptance') or [])]
127
+ for ref in refs:
128
+ if ref and ref not in ids:
129
+ miss(fr.get('id'), ref)
130
+ for br in rows(pkg, 'businessRules'):
131
+ if br.get('openQuestion') and br['openQuestion'] not in ids:
132
+ miss(br.get('id'), br['openQuestion'])
133
+ for sc in rows(pkg, 'scenarios'):
134
+ if sc.get('requirement') not in ids:
135
+ miss(sc.get('id'), sc.get('requirement'))
136
+ for q in rows(pkg, 'openQuestions'):
137
+ for ref in q.get('affects') or []:
138
+ if ref not in ids:
139
+ miss(q.get('id'), ref)
140
+ for ref in (pkg.get('readiness') or {}).get('blockers') or []:
141
+ if ref not in ids:
142
+ miss('readiness.blockers', ref)
143
+ return findings
144
+
145
+
146
+ def check_labels(pkg):
147
+ findings = []
148
+ for name in LABELED:
149
+ for row in rows(pkg, name):
150
+ if not row.get('label'):
151
+ findings.append(f"{row.get('id')}: missing label")
152
+ for name in SOURCED:
153
+ for row in rows(pkg, name):
154
+ if not row.get('source'):
155
+ findings.append(f"{row.get('id')}: missing source")
156
+ for fr in rows(pkg, 'requirements'):
157
+ has_question = any(fr.get('id') in (q.get('affects') or []) for q in rows(pkg, 'openQuestions'))
158
+ if fr.get('label') == 'recommended' and fr.get('scope') == 'in' and not has_question:
159
+ findings.append(f'{fr.get("id")}: recommended requirement in scope "in" without a paired open question')
160
+ return findings
161
+
162
+
163
+ def check_ambiguity(pkg):
164
+ findings = []
165
+ for row in [*rows(pkg, 'requirements'), *rows(pkg, 'nfrs')]:
166
+ for word in AMBIGUOUS:
167
+ pattern = r'\b' + re.sub(r'[-\s]', '[-\\\\s]', word) + r'\b'
168
+ if re.search(pattern, row.get('text') or '', re.IGNORECASE):
169
+ findings.append(f'{row.get("id")}: ambiguous term "{word}" — replace with a measurable statement')
170
+ return findings
171
+
172
+
173
+ def check_readiness(pkg):
174
+ findings = []
175
+ r = pkg.get('readiness') or {}
176
+ areas = r.get('areas') or {}
177
+ values = []
178
+ for a in AREAS:
179
+ v = areas.get(a)
180
+ if isinstance(v, (int, float)) and not isinstance(v, bool):
181
+ values.append(v)
182
+ if len(values) != len(AREAS):
183
+ findings.append('readiness.areas: missing area score')
184
+ mean = math.floor(sum(values) / (len(values) or 1) + 0.5)
185
+ if r.get('overall') != mean:
186
+ findings.append(f'readiness.overall {r.get("overall")} != recomputed mean {mean}')
187
+ open_blockers = [q for q in rows(pkg, 'openQuestions') if q.get('status') == 'open' and q.get('architectureBlocker')]
188
+ status_idx = STATUSES.index(pkg.get('status')) if pkg.get('status') in STATUSES else -1
189
+ if open_blockers and status_idx > STATUSES.index('ANALYZED'):
190
+ joined = ', '.join(q.get('id') for q in open_blockers)
191
+ findings.append(f'status {pkg.get("status")} with open architecture blockers: {joined}')
192
+ for q in open_blockers:
193
+ if q.get('id') not in (r.get('blockers') or []):
194
+ findings.append(f'readiness.blockers missing {q.get("id")}')
195
+ risky = [a for a in rows(pkg, 'assumptions') if a.get('impact') == 'high' and a.get('status') == 'unconfirmed']
196
+ if pkg.get('status') == 'READY_FOR_ARCHITECTURE' and risky:
197
+ joined = ', '.join(a.get('id') for a in risky)
198
+ findings.append(f'READY_FOR_ARCHITECTURE with unconfirmed high-impact assumptions: {joined}')
199
+ if pkg.get('status') == 'READY_FOR_ARCHITECTURE' and any(c.get('status') == 'open' for c in rows(pkg, 'conflicts')):
200
+ findings.append('READY_FOR_ARCHITECTURE with open conflicts')
201
+ return findings
202
+
203
+
204
+ def section_bodies(md):
205
+ bodies = {}
206
+ for chunk in re.split(r'^## ', md, flags=re.MULTILINE)[1:]:
207
+ nl = chunk.find('\n')
208
+ title = chunk.strip() if nl == -1 else chunk[:nl].strip()
209
+ bodies[title] = '' if nl == -1 else chunk[nl + 1:]
210
+ return bodies
211
+
212
+
213
+ def frontmatter(md, field, pattern=r'(\S+)'):
214
+ m = re.search(r'^' + field + r':\s*' + pattern, md, re.MULTILINE)
215
+ return m.group(1) if m else None
216
+
217
+
218
+ def check_md(pkg, md):
219
+ findings = []
220
+ if re.search(r'\[TODO\]|\bTBD\b|\bXXX\b', md):
221
+ findings.append('md: placeholder found ([TODO]/TBD/XXX)')
222
+ bodies = section_bodies(md)
223
+ required = QUICK_PARTS if pkg.get('depth') == 'QUICK' else PARTS
224
+ for part in required:
225
+ key = next((h for h in bodies if h.startswith(part)), None)
226
+ if key is None:
227
+ findings.append(f'md: missing section "## {part}"')
228
+ elif not bodies[key].strip():
229
+ findings.append(f'md: empty section "## {part}"')
230
+ md_ids = {m.group(0) for m in ID_TOKEN.finditer(md)}
231
+ for rid in collect_ids(pkg):
232
+ if rid not in md_ids:
233
+ findings.append(f'md: id {rid} absent from requirements.md')
234
+ fm_status = frontmatter(md, 'status')
235
+ if fm_status != pkg.get('status'):
236
+ findings.append(f'md frontmatter status {fm_status} != json status {pkg.get("status")}')
237
+ fm_depth = frontmatter(md, 'depth')
238
+ if fm_depth != pkg.get('depth'):
239
+ findings.append(f'md frontmatter depth {fm_depth} != json depth {pkg.get("depth")}')
240
+ fm_readiness = frontmatter(md, 'readiness', r'(\d+)')
241
+ overall = (pkg.get('readiness') or {}).get('overall')
242
+ if (None if fm_readiness is None else int(fm_readiness)) != overall:
243
+ shown = 'NaN' if fm_readiness is None else int(fm_readiness)
244
+ findings.append(f'md frontmatter readiness {shown} != json readiness.overall {overall}')
245
+ return findings
246
+
247
+
248
+ def check_md_orphan_ids(_pkg, md, ids):
249
+ return [f'md: unknown id {m.group(0)}' for m in ID_TOKEN.finditer(md) if m.group(0) not in ids]
250
+
251
+
252
+ def check_package(pkg, md):
253
+ schema_findings = check_schema(pkg)
254
+ if schema_findings:
255
+ return schema_findings
256
+ ids = set(collect_ids(pkg))
257
+ return [
258
+ *check_duplicates(pkg),
259
+ *check_refs(pkg, ids),
260
+ *check_labels(pkg),
261
+ *check_ambiguity(pkg),
262
+ *check_readiness(pkg),
263
+ *check_md(pkg, md),
264
+ *check_md_orphan_ids(None, md, ids),
265
+ ]
266
+
267
+
268
+ def main(argv):
269
+ args = {}
270
+ i = 0
271
+ while i < len(argv):
272
+ if argv[i].startswith('--'):
273
+ args[argv[i][2:]] = argv[i + 1]
274
+ i += 1
275
+ i += 1
276
+ with open(args['md'], encoding='utf-8') as f:
277
+ md = f.read()
278
+ with open(args['json'], encoding='utf-8') as f:
279
+ pkg = json.load(f)
280
+ findings = check_package(pkg, md)
281
+ if findings:
282
+ print('\n'.join(findings), file=sys.stderr)
283
+ sys.exit(1)
284
+ print('requirements package valid')
285
+
286
+
287
+ if __name__ == '__main__':
288
+ main(sys.argv[1:])
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solution-architect",
3
- "version": "1.0.0",
3
+ "version": "1.1.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",
@@ -1,5 +1,7 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <!-- data-theme="dark" in the markup: the page opens dark for everyone; the
3
+ toggle (persisted in localStorage) can still switch it to light. -->
4
+ <html lang="en" data-theme="dark">
3
5
  <head>
4
6
  <meta charset="UTF-8">
5
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -7,7 +9,7 @@
7
9
  before the boot script runs, so without this a dark-mode reader gets a white
8
10
  flash — and the UA scrollbar and the search field's own clear button stay
9
11
  light inside a dark page. -->
10
- <meta name="color-scheme" content="light dark">
12
+ <meta name="color-scheme" content="dark light">
11
13
  <meta name="description" content="Architecture documentation — one self-contained page, no network.">
12
14
  <!-- The rail's own mark, inline. A linked file would be a second request from a
13
15
  viewer whose whole premise is one offline file. -->
@@ -60,7 +60,10 @@ export async function launch(fileUrl) {
60
60
  wsUrl,
61
61
  kill() {
62
62
  proc.kill('SIGKILL');
63
- rmSync(dir, { recursive: true, force: true });
63
+ // SIGKILL is asynchronous: Chrome can still be flushing its profile dir
64
+ // when rm starts, which surfaces as ENOTEMPTY in CI. Node retries
65
+ // ENOTEMPTY/EBUSY when maxRetries is set.
66
+ rmSync(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 });
64
67
  },
65
68
  };
66
69
  }
@@ -835,8 +835,9 @@ test('the measure is the column it sits in, not the viewport minus the rail', ()
835
835
  // Without a declared scheme the browser paints the canvas white before the boot
836
836
  // script runs, so a dark-mode reader gets a flash — and the UA scrollbar and the
837
837
  // search field's clear button stay light inside a dark page.
838
- test('the head states its colour scheme, its icon and its description', () => {
839
- assert.match(tpl, /<meta name="color-scheme" content="light dark">/);
838
+ test('the head states its colour scheme (dark first), its icon and its description', () => {
839
+ assert.match(tpl, /<meta name="color-scheme" content="dark light">/);
840
+ assert.match(tpl, /<html lang="en" data-theme="dark">/);
840
841
  assert.match(tpl, /<link rel="icon"[^>]*data:image\/svg\+xml/);
841
842
  assert.match(tpl, /<meta name="description"/);
842
843
  });
@@ -19,19 +19,25 @@ interactive what-if page served on localhost.
19
19
  4. Never apply one blanket AI multiplier to a whole project — per-task
20
20
  category only (`references/ai-multipliers.md`).
21
21
  5. `node scripts/validate.mjs` must exit 0 before the page renders.
22
+ 6. Agentic estimates: baselines and confidence come from scripts reading
23
+ measurements.jsonl — the agent never writes a duration, confidence, or
24
+ evidence row.
22
25
 
23
26
  ## Flow
24
27
 
25
28
  1. **Detect evidence**: requirements/RFP? ARCHITECTURE.md? codebase? none?
26
29
  State findings; the user can override. (`references/interview.md` §1)
27
- 2. **Depth**: ask QUICK / STANDARD / DEEP first.
30
+ 2. **Depth and delivery mode**: ask QUICK / STANDARD / DEEP, then TRADITIONAL
31
+ / AGENTIC (`references/interview.md` §2b). Delivery mode decides step 4.
28
32
  3. **Interview**: follow `references/interview.md` — pre-fill from evidence,
29
33
  ask only holes, run the clear-vs-assumed gate before sizing. Before
30
34
  proposing milestones, read `references/slicing.md` — slices are judged
31
35
  there, not computed.
32
- 4. **Technique**: recommend from `references/techniques.md`, state why,
33
- cite the method's sources (its §Sources — attribution + link, never
34
- quoted text), confirm.
36
+ 4. **Technique**: TRADITIONAL-only — recommend from `references/techniques.md`,
37
+ state why, cite the method's sources (its §Sources — attribution + link,
38
+ never quoted text), confirm. AGENTIC reads
39
+ `references/agentic-estimation.md` and `references/task-shapes.md`
40
+ instead: no technique to recommend, shape + scope + seed minutes per task.
35
41
  5. **Size**: write judgments to `estimation-inputs.json`
36
42
  (`references/writing.md` — the booking fixture is the canonical shape).
37
43
  6. **Compute**: `node scripts/compute.mjs --inputs estimation-inputs.json --out estimation.json`
@@ -42,7 +48,9 @@ interactive what-if page served on localhost.
42
48
  `node scripts/render.mjs --json estimation.json --md estimation.md --out <dir>`
43
49
  (add `--client-only` for a client-safe file) — render re-runs the validation
44
50
  checks itself and refuses on findings, so an unvalidated page cannot ship.
45
- Then serve with the analyze-requirements skill's `serve.mjs`; report the URL.
51
+ `deliveryMode: "agentic"` routes rendering to the agentic HTML template
52
+ automatically; nothing to choose here. Then serve with the
53
+ analyze-requirements skill's `serve.mjs`; report the URL.
46
54
 
47
55
  ## Companion mode
48
56