@v11g/agents-rock 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/bin/agents-rock.mjs +4 -0
- package/package.json +13 -0
- package/plugins/solution-architect/.claude-plugin/plugin.json +9 -0
- package/plugins/solution-architect/skills/analyze-requirements/README.md +75 -0
- package/plugins/solution-architect/skills/analyze-requirements/SKILL.md +31 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/fonts/OFL.txt +98 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/mermaid-theme.json +52 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/section-help.json +101 -0
- package/plugins/solution-architect/skills/analyze-requirements/assets/viewer-template.html +2389 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/interview.md +53 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/likec4.md +157 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/project-types.md +60 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/research.md +78 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/viewer.md +772 -0
- package/plugins/solution-architect/skills/analyze-requirements/references/writing.md +206 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/cdp.mjs +74 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/chrome.mjs +66 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/companion-links.mjs +20 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-kinds.mjs +37 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-links.mjs +26 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-routes.mjs +27 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/doc-sections.mjs +78 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/embed.mjs +8 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/er-entities.mjs +16 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/fonts.mjs +39 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/frontmatter.mjs +17 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/inputs.mjs +41 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/likec4-config.mjs +41 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/likec4-extract.mjs +29 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/likec4-steps.mjs +22 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-defs.mjs +20 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-flows.mjs +46 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-inline.mjs +31 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-links.mjs +7 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-list.mjs +64 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-render.mjs +127 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-shape.mjs +19 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-tables.mjs +30 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-views.mjs +48 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/md-wide.mjs +44 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/nav.mjs +72 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/offline.mjs +19 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/port.mjs +13 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/quality-gate.mjs +113 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/section-help.mjs +49 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/slug-registry.mjs +11 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-clusters.mjs +15 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-deployment.mjs +8 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-elections.mjs +20 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-links.mjs +23 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-model-tables.mjs +24 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-palette.mjs +34 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-provenance.mjs +20 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/lib/validate-tree.mjs +16 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/likec4-config.mjs +19 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/likec4-export.mjs +35 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/likec4-gen.mjs +39 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/render.mjs +130 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/serve.mjs +71 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/browser.test.mjs +553 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/companion-links.test.mjs +60 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/doc-kinds.test.mjs +41 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/doc-links.test.mjs +104 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/doc-routes.test.mjs +54 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/doc-sections.test.mjs +197 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/embed.test.mjs +28 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/er-entities.test.mjs +14 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/ARCHITECTURE.md +47 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/broken/model.c4 +27 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/c4-src/pass/model.c4 +29 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/adr/0001-sample.md +18 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimate.html +2 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/docs/estimation.md +8 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model-broken.json +1 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/model.json +1 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/docs-pass/threat-model.md +8 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/sample-model.json +1 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fixtures/sample.c4 +28 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/fonts.test.mjs +38 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/frontmatter.test.mjs +27 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/inputs.test.mjs +72 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/likec4-config-cli.test.mjs +26 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/likec4-config.test.mjs +74 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/likec4-export-cli.test.mjs +61 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/likec4-extract.test.mjs +37 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/likec4-gen-cli.test.mjs +73 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/likec4-steps.test.mjs +32 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-flows.test.mjs +82 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-links.test.mjs +16 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-provenance.test.mjs +42 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-render.test.mjs +226 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-tables.test.mjs +30 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-views.test.mjs +76 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/md-wide.test.mjs +76 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/nav.test.mjs +236 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/offline.test.mjs +37 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/quality-gate.test.mjs +86 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/quality-gates.test.mjs +20 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/render.test.mjs +171 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/research-workflow.test.mjs +38 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/section-help.test.mjs +101 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/serve.test.mjs +48 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-clusters.test.mjs +46 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-deployment.test.mjs +23 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-elections.test.mjs +30 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-links.test.mjs +38 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-model-tables.test.mjs +51 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-provenance.test.mjs +28 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/validate-tree.test.mjs +43 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/test/viewer-template.test.mjs +1206 -0
- package/plugins/solution-architect/skills/analyze-requirements/scripts/validate.mjs +88 -0
- package/plugins/solution-architect/skills/analyze-requirements/workflows/research.js +57 -0
- package/plugins/solution-architect/skills/estimate/README.md +67 -0
- package/plugins/solution-architect/skills/estimate/SKILL.md +64 -0
- package/plugins/solution-architect/skills/estimate/assets/estimate-template.html +1128 -0
- package/plugins/solution-architect/skills/estimate/references/ai-multipliers.md +95 -0
- package/plugins/solution-architect/skills/estimate/references/interview.md +80 -0
- package/plugins/solution-architect/skills/estimate/references/slicing.md +55 -0
- package/plugins/solution-architect/skills/estimate/references/techniques.md +111 -0
- package/plugins/solution-architect/skills/estimate/references/writing.md +211 -0
- package/plugins/solution-architect/skills/estimate/scripts/compute.mjs +23 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/checks.mjs +128 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/components.mjs +19 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/estimate-math.mjs +85 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/inline.mjs +10 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/redact.mjs +30 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/roadmap.mjs +32 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/rollup.mjs +122 -0
- package/plugins/solution-architect/skills/estimate/scripts/lib/schema.mjs +128 -0
- package/plugins/solution-architect/skills/estimate/scripts/render.mjs +65 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/browser.test.mjs +623 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/compute.test.mjs +88 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/e2e.test.mjs +34 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/estimate-math.test.mjs +112 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/booking-inputs.json +58 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/estimation-fail.md +30 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/fixtures/estimation-pass.md +60 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/quality-gates.test.mjs +20 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/references.test.mjs +71 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/render.test.mjs +121 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/schema.test.mjs +129 -0
- package/plugins/solution-architect/skills/estimate/scripts/test/validate.test.mjs +72 -0
- package/plugins/solution-architect/skills/estimate/scripts/validate.mjs +20 -0
- package/plugins/solution-architect/skills/new-lead/README.md +48 -0
- package/plugins/solution-architect/skills/new-lead/SKILL.md +113 -0
- package/plugins/solution-architect/skills/new-lead/assets/dashboard/detail.html +842 -0
- package/plugins/solution-architect/skills/new-lead/assets/dashboard/index.html +655 -0
- package/plugins/solution-architect/skills/new-lead/assets/dashboard/start.sh +3 -0
- package/plugins/solution-architect/skills/new-lead/assets/dashboard/stats.mjs +98 -0
- package/plugins/solution-architect/skills/new-lead/assets/dashboard/vendor/reactflow-bundle.js +473 -0
- package/plugins/solution-architect/skills/new-lead/assets/vendor-build/entry.jsx +33 -0
- package/plugins/solution-architect/skills/new-lead/assets/vendor-build/package-lock.json +1055 -0
- package/plugins/solution-architect/skills/new-lead/assets/vendor-build/package.json +19 -0
- package/plugins/solution-architect/skills/new-lead/scripts/init-root.mjs +73 -0
- package/plugins/solution-architect/skills/new-lead/scripts/lead-upsert.mjs +31 -0
- package/plugins/solution-architect/skills/new-lead/scripts/lib/enrich.mjs +20 -0
- package/plugins/solution-architect/skills/new-lead/scripts/lib/map-nodes.mjs +124 -0
- package/plugins/solution-architect/skills/new-lead/scripts/lib/map.mjs +117 -0
- package/plugins/solution-architect/skills/new-lead/scripts/lib/port.mjs +15 -0
- package/plugins/solution-architect/skills/new-lead/scripts/lib/registry.mjs +116 -0
- package/plugins/solution-architect/skills/new-lead/scripts/serve.mjs +163 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/e2e-workspace.test.mjs +59 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/enrich.test.mjs +16 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/ARCHITECTURE.md +16 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/brief.md +4 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/index.html +11 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/proposal-non-tech.html +2 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/dist/threat-model.html +2 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation-inputs.json +6 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/estimation.json +10 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/notes.md +3 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/proposal-non-tech.md +3 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads/acme-crm/rfp.md +3 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/fixtures/root/leads.json +25 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/init-root.test.mjs +81 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/lead-upsert.test.mjs +67 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/map.test.mjs +72 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/port.test.mjs +31 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/registry-io.test.mjs +57 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/registry.test.mjs +49 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/serve.test.mjs +205 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/stats.test.mjs +92 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/validate-cli.test.mjs +24 -0
- package/plugins/solution-architect/skills/new-lead/scripts/test/vendor-bundle.test.mjs +9 -0
- package/plugins/solution-architect/skills/new-lead/scripts/validate.mjs +9 -0
- package/plugins/solution-architect/skills/proposal/README.md +36 -0
- package/plugins/solution-architect/skills/proposal/SKILL.md +58 -0
- package/plugins/solution-architect/skills/proposal/assets/proposal-template.html +82 -0
- package/plugins/solution-architect/skills/proposal/references/interview.md +63 -0
- package/plugins/solution-architect/skills/proposal/references/review.md +28 -0
- package/plugins/solution-architect/skills/proposal/references/writing.md +102 -0
- package/plugins/solution-architect/skills/proposal/scripts/derive.mjs +22 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks-client.mjs +75 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks-doc.mjs +54 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/checks.mjs +17 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/figures.mjs +43 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/jargon.mjs +9 -0
- package/plugins/solution-architect/skills/proposal/scripts/lib/sections.mjs +32 -0
- package/plugins/solution-architect/skills/proposal/scripts/render.mjs +60 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/checks-client.test.mjs +144 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/checks-doc.test.mjs +93 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/docs.test.mjs +51 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/e2e.test.mjs +30 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/figures.test.mjs +81 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-fail.md +22 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/fixtures/proposal-pass.md +55 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/quality-gates.test.mjs +20 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/render.test.mjs +70 -0
- package/plugins/solution-architect/skills/proposal/scripts/test/validate.test.mjs +40 -0
- package/plugins/solution-architect/skills/proposal/scripts/validate.mjs +20 -0
- package/src/cli/agents.mjs +12 -0
- package/src/cli/args.mjs +46 -0
- package/src/cli/install.mjs +68 -0
- package/src/cli/main.mjs +124 -0
- package/src/cli/picker.mjs +78 -0
- package/src/cli/registry.mjs +26 -0
- package/src/cli/uninstall.mjs +38 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { checkInputs } from '../lib/schema.mjs';
|
|
5
|
+
|
|
6
|
+
const fixture = () => JSON.parse(
|
|
7
|
+
readFileSync(new URL('./fixtures/booking-inputs.json', import.meta.url), 'utf8'));
|
|
8
|
+
|
|
9
|
+
test('the booking fixture is valid', () => {
|
|
10
|
+
assert.deepEqual(checkInputs(fixture()), []);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('every defect is named with its path', () => {
|
|
14
|
+
const bad = fixture();
|
|
15
|
+
bad.features[0].tasks[0].o = 50; // o > m
|
|
16
|
+
bad.features[0].tasks[1].category = 'ai-magic'; // unknown category
|
|
17
|
+
bad.features[1].provenance = 'observed'; // valid vocabulary, but scope must be stated|proposed
|
|
18
|
+
delete bad.features[0].tasks[0].assumptions; // missing register
|
|
19
|
+
bad.recommendedScenario = 'ghost'; // not a scenario id
|
|
20
|
+
const findings = checkInputs(bad);
|
|
21
|
+
assert.equal(findings.length, 5);
|
|
22
|
+
assert.ok(findings.some((f) => f.includes('booking-api') && f.includes('o <= m <= p')));
|
|
23
|
+
assert.ok(findings.some((f) => f.includes('booking-rules') && f.includes('category')));
|
|
24
|
+
assert.ok(findings.some((f) => f.includes('reminders') && f.includes('stated|proposed')));
|
|
25
|
+
assert.ok(findings.some((f) => f.includes('booking-api') && f.includes('assumptions')));
|
|
26
|
+
assert.ok(findings.some((f) => f.includes('recommendedScenario')));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('zero estimates are refused — the honest absence is "not estimated"', () => {
|
|
30
|
+
const bad = fixture();
|
|
31
|
+
bad.features[0].tasks[0].m = 0;
|
|
32
|
+
assert.ok(checkInputs(bad).some((f) => f.includes('never 0')));
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test('anything compute would turn into NaN is refused up front', () => {
|
|
36
|
+
const bad = fixture();
|
|
37
|
+
bad.scenarios[1].plan = 'ghost-plan';
|
|
38
|
+
bad.scenarios[0].team[0].seniority = 'staff';
|
|
39
|
+
bad.scenarios[0].team[1].rate = -5;
|
|
40
|
+
bad.overheadPct = 1.4;
|
|
41
|
+
bad.verificationPct = 'lots';
|
|
42
|
+
bad.risks[0].probability = 7;
|
|
43
|
+
const findings = checkInputs(bad);
|
|
44
|
+
assert.ok(findings.some((f) => f.includes('2eng-max5x') && f.includes('plan')));
|
|
45
|
+
assert.ok(findings.some((f) => f.includes('3eng-noai') && f.includes('seniority')));
|
|
46
|
+
assert.ok(findings.some((f) => f.includes('3eng-noai') && f.includes('rate')));
|
|
47
|
+
assert.ok(findings.some((f) => f.includes('overheadPct')));
|
|
48
|
+
assert.ok(findings.some((f) => f.includes('verificationPct')));
|
|
49
|
+
assert.ok(findings.some((f) => f.includes('probability')));
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('a string estimate is refused, not silently coerced by pert()', () => {
|
|
53
|
+
const bad = fixture();
|
|
54
|
+
bad.features[0].tasks[0].o = '16';
|
|
55
|
+
const findings = checkInputs(bad);
|
|
56
|
+
assert.ok(findings.some((f) => f.includes('booking-api') && f.includes('numbers')));
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test('a feature with no tasks is refused — the zero-spread exemption must not be reachable', () => {
|
|
60
|
+
const bad = fixture();
|
|
61
|
+
bad.features[1].tasks = [];
|
|
62
|
+
const findings = checkInputs(bad);
|
|
63
|
+
assert.ok(findings.some((f) => f.includes('reminders') && f.includes('task')));
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test('inherited object keys do not pass the enum checks', () => {
|
|
67
|
+
const bad = fixture();
|
|
68
|
+
bad.features[0].tasks[0].category = 'toString';
|
|
69
|
+
bad.scenarios[0].team[0].seniority = 'toString';
|
|
70
|
+
bad.scenarios[1].plan = 'toString';
|
|
71
|
+
const findings = checkInputs(bad);
|
|
72
|
+
assert.ok(findings.some((f) => f.includes('booking-api') && f.includes('category')));
|
|
73
|
+
assert.ok(findings.some((f) => f.includes('3eng-noai') && f.includes('seniority')));
|
|
74
|
+
assert.ok(findings.some((f) => f.includes('2eng-max5x') && f.includes('plan')));
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('milestones are all-or-nothing across features', () => {
|
|
78
|
+
const bad = fixture();
|
|
79
|
+
delete bad.features[1].milestone; // features[0] has one, features[1] doesn't
|
|
80
|
+
const findings = checkInputs(bad);
|
|
81
|
+
assert.ok(findings.some((f) => f.includes('reminders') && f.includes('milestone missing')));
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('components are all-or-nothing and must resolve to the roster', () => {
|
|
85
|
+
const bad = fixture();
|
|
86
|
+
delete bad.features[1].component; // features[0] has one
|
|
87
|
+
assert.ok(checkInputs(bad).some((f) => f.includes('reminders') && f.includes('component missing')));
|
|
88
|
+
const ghost = fixture();
|
|
89
|
+
ghost.features[0].component = 'ghost';
|
|
90
|
+
assert.ok(checkInputs(ghost).some((f) => f.includes('booking') && f.includes('not in roster')));
|
|
91
|
+
const tagOnly = fixture();
|
|
92
|
+
delete tagOnly.components;
|
|
93
|
+
assert.ok(checkInputs(tagOnly).some((f) => f.includes('no top-level components roster')));
|
|
94
|
+
const bare = fixture();
|
|
95
|
+
delete bare.components;
|
|
96
|
+
for (const f of bare.features) delete f.component;
|
|
97
|
+
assert.deepEqual(checkInputs(bare), []); // no roster at all → still valid
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test('an uncovered leaf component is a scope hole unless notEstimated says why', () => {
|
|
101
|
+
const bad = fixture();
|
|
102
|
+
bad.components.push({ id: 'reports', name: 'Reporting' });
|
|
103
|
+
assert.ok(checkInputs(bad).some((f) => f.includes('reports') && f.includes('no feature covers it')));
|
|
104
|
+
const excused = fixture();
|
|
105
|
+
excused.components.push({ id: 'reports', name: 'Reporting', notEstimated: 'phase 2' });
|
|
106
|
+
assert.deepEqual(checkInputs(excused), []);
|
|
107
|
+
const blank = fixture();
|
|
108
|
+
blank.components[3].notEstimated = ' '; // admin's excuse blanked
|
|
109
|
+
assert.ok(checkInputs(blank).some((f) => f.includes('admin') && f.includes('reason')));
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test('the roster is two levels max and parents must exist', () => {
|
|
113
|
+
const deep = fixture();
|
|
114
|
+
deep.components.push({ id: 'retry', name: 'Retry', parent: 'notify.jobs' });
|
|
115
|
+
assert.ok(checkInputs(deep).some((f) => f.includes('retry') && f.includes('two levels max')));
|
|
116
|
+
const orphan = fixture();
|
|
117
|
+
orphan.components[2].parent = 'ghost'; // notify.jobs → nonexistent parent
|
|
118
|
+
assert.ok(checkInputs(orphan).some((f) => f.includes('notify.jobs') && f.includes('not in roster')));
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
test('a blank milestone is refused; none at all is fine', () => {
|
|
122
|
+
const bad = fixture();
|
|
123
|
+
bad.features[0].milestone = ' ';
|
|
124
|
+
bad.features[1].milestone = 'M2';
|
|
125
|
+
assert.ok(checkInputs(bad).some((f) => f.includes('booking') && f.includes('non-empty')));
|
|
126
|
+
const bare = fixture();
|
|
127
|
+
for (const f of bare.features) delete f.milestone;
|
|
128
|
+
assert.deepEqual(checkInputs(bare), []); // no milestones at all → still valid
|
|
129
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
|
+
import { checkDeliverables } from '../lib/checks.mjs';
|
|
6
|
+
import { computeEstimation } from '../lib/rollup.mjs';
|
|
7
|
+
|
|
8
|
+
const read = (f) => readFileSync(new URL(`./fixtures/${f}`, import.meta.url), 'utf8');
|
|
9
|
+
const inputs = () => JSON.parse(read('booking-inputs.json'));
|
|
10
|
+
const stripRoadmap = (md) => md.replace(/### Roadmap[\s\S]*?(?=### Assumptions)/, '');
|
|
11
|
+
|
|
12
|
+
test('the pass fixture passes', () => {
|
|
13
|
+
assert.deepEqual(
|
|
14
|
+
checkDeliverables({ md: read('estimation-pass.md'), estimation: computeEstimation(inputs()) }), []);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('each seeded violation is caught by name', () => {
|
|
18
|
+
const findings = checkDeliverables({ md: read('estimation-fail.md'), estimation: computeEstimation(inputs()) });
|
|
19
|
+
for (const needle of ['never 0', 'src', 'assumptions cell', 'assumptions register', 'buffer', 'out of scope', 'scenario', 'roadmap']) {
|
|
20
|
+
assert.ok(findings.some((f) => f.toLowerCase().includes(needle)), `no finding for: ${needle}`);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test('hand-edited totals are refused', () => {
|
|
25
|
+
const est = computeEstimation(inputs());
|
|
26
|
+
est.computed.devHours += 10;
|
|
27
|
+
const findings = checkDeliverables({ md: read('estimation-pass.md'), estimation: est });
|
|
28
|
+
assert.ok(findings.some((f) => f.includes('recomputed')));
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test('an all-zero feature does not pass via the zero-spread exemption', () => {
|
|
32
|
+
const bad = inputs();
|
|
33
|
+
bad.features.push({ id: 'empty-feat', name: 'Nothing here', provenance: 'stated', tasks: [] });
|
|
34
|
+
const findings = checkDeliverables({ md: read('estimation-pass.md'), estimation: computeEstimation(bad) });
|
|
35
|
+
assert.ok(findings.some((f) => f.includes('empty-feat') && f.includes('low < hours < high')));
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('a Summary without a scope table is refused, not vacuously accepted', () => {
|
|
39
|
+
const md = read('estimation-pass.md').replace(
|
|
40
|
+
/\| Feature \| Tier \| Range \(h\) \| src \|\n\| --- \| --- \| --- \| --- \|\n(?:\|.*\|\n)+\n/,
|
|
41
|
+
'',
|
|
42
|
+
);
|
|
43
|
+
const findings = checkDeliverables({ md, estimation: computeEstimation(inputs()) });
|
|
44
|
+
assert.ok(findings.some((f) => f.includes('summary scope table missing')));
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('milestones without a Roadmap section are refused', () => {
|
|
48
|
+
const findings = checkDeliverables({
|
|
49
|
+
md: stripRoadmap(read('estimation-pass.md')), estimation: computeEstimation(inputs()) });
|
|
50
|
+
assert.ok(findings.some((f) => f.includes('missing ### Roadmap')));
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('a Roadmap section without milestones is refused', () => {
|
|
54
|
+
const bare = inputs();
|
|
55
|
+
for (const f of bare.features) delete f.milestone;
|
|
56
|
+
const findings = checkDeliverables({
|
|
57
|
+
md: read('estimation-pass.md'), estimation: computeEstimation(bare) });
|
|
58
|
+
assert.ok(findings.some((f) => f.includes('no milestones')));
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test('no milestones and no Roadmap section is clean', () => {
|
|
62
|
+
const bare = inputs();
|
|
63
|
+
for (const f of bare.features) delete f.milestone;
|
|
64
|
+
assert.deepEqual(checkDeliverables({
|
|
65
|
+
md: stripRoadmap(read('estimation-pass.md')), estimation: computeEstimation(bare) }), []);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('the roadmap honesty line is mandatory', () => {
|
|
69
|
+
const md = read('estimation-pass.md').replace(/not calendar dates/, 'roughly');
|
|
70
|
+
const findings = checkDeliverables({ md, estimation: computeEstimation(inputs()) });
|
|
71
|
+
assert.ok(findings.some((f) => f.includes('not calendar dates')));
|
|
72
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { checkDeliverables } 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 estimation = JSON.parse(readFileSync(args.json, 'utf8'));
|
|
15
|
+
const findings = checkDeliverables({ md, estimation });
|
|
16
|
+
if (findings.length) {
|
|
17
|
+
console.error(findings.join('\n'));
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
console.log('estimation deliverables valid');
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# new-lead
|
|
2
|
+
|
|
3
|
+
Sets up a pre-sales lead workspace and walks you through the three
|
|
4
|
+
solution-architect skills in order, stopping between each so you see what was
|
|
5
|
+
produced before the next one starts.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/new-lead @leads/acme-corp-payments-rework/
|
|
9
|
+
→ /analyze-requirements ARCHITECTURE.md
|
|
10
|
+
→ /estimate estimation.json
|
|
11
|
+
→ /proposal proposal.md
|
|
12
|
+
→ dashboard URL
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Each skill runs exactly as it does standalone: its own interview, its own
|
|
16
|
+
validation, its own rendered page. `/new-lead` never interviews and never
|
|
17
|
+
writes a document.
|
|
18
|
+
|
|
19
|
+
## Workspace layout
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
<leads-root>/
|
|
23
|
+
├── leads.json registry (status, value, dates)
|
|
24
|
+
├── start.sh starts the dashboard
|
|
25
|
+
├── leads/
|
|
26
|
+
│ └── <lead-id>/ one directory per lead
|
|
27
|
+
│ ├── <your documents — the RFP, notes, anything you were sent>
|
|
28
|
+
│ ├── ARCHITECTURE.md, estimation.json, proposal.md
|
|
29
|
+
│ └── dist/ the rendered pages
|
|
30
|
+
└── scripts/ serve.mjs, dashboard pages, lib/, vendor/
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Starting a lead
|
|
34
|
+
|
|
35
|
+
Make a directory under `leads/` and run `/new-lead`. A folder with no registry
|
|
36
|
+
entry is a new lead; `/new-lead` with no argument lists what is new, in
|
|
37
|
+
progress, and finished.
|
|
38
|
+
|
|
39
|
+
Name the folder in kebab-case — it becomes the lead id verbatim.
|
|
40
|
+
|
|
41
|
+
## Dashboard quickstart
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
cd <leads-root>
|
|
45
|
+
./start.sh
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Serves on `127.0.0.1:4600` (override with `--port <n>`) with no agent running.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: new-lead
|
|
3
|
+
description: Set up a pre-sales lead workspace and walk the human through the three solution-architect skills in order — analyze-requirements, estimate, proposal — plus a local leads dashboard. Use when the user says "new lead", points at a folder under leads/, or asks to see their leads pipeline.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# new-lead
|
|
7
|
+
|
|
8
|
+
Prepare a lead's workspace, then run `/analyze-requirements`, `/estimate` and
|
|
9
|
+
`/proposal` in that order, stopping between each so the human sees what was
|
|
10
|
+
produced. Also maintains the leads dashboard: a `leads.json` registry and a
|
|
11
|
+
self-contained local server.
|
|
12
|
+
|
|
13
|
+
## Hard rules
|
|
14
|
+
|
|
15
|
+
1. This skill never interviews. Every question about scope, stack, delivery or
|
|
16
|
+
the client belongs to the skill that needs it.
|
|
17
|
+
2. This skill never renders and never writes a document. Each sub-skill owns its
|
|
18
|
+
own validation and its own output.
|
|
19
|
+
3. The lead id is the folder name under `leads/`, verbatim. The filesystem is
|
|
20
|
+
the source of truth; `leads.json` holds business metadata only, and is
|
|
21
|
+
written exclusively through `scripts/lead-upsert.mjs`.
|
|
22
|
+
4. Stop after each sub-skill returns. The human decides whether the chain
|
|
23
|
+
continues.
|
|
24
|
+
|
|
25
|
+
## Workspace
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
<root>/
|
|
29
|
+
├── leads.json the registry
|
|
30
|
+
├── start.sh starts the dashboard
|
|
31
|
+
├── leads/<lead-id>/ one directory per lead
|
|
32
|
+
└── scripts/ serve.mjs, the dashboard pages, lib/, vendor/
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Flow
|
|
36
|
+
|
|
37
|
+
1. **Dependency check**: Node ≥ 20 and `npx likec4` (needed downstream by
|
|
38
|
+
`analyze-requirements`). Either missing → stop before doing any work.
|
|
39
|
+
2. **Find the root**: walk up from the working directory for `leads.json`
|
|
40
|
+
(`findLeadsRoot` in `scripts/lib/registry.mjs`). Not found → confirm with the
|
|
41
|
+
user, then `node scripts/init-root.mjs --root <dir>` at cwd, and offer
|
|
42
|
+
`git init`.
|
|
43
|
+
3. **Resolve the target**:
|
|
44
|
+
- `/new-lead @leads/<folder>/` → that folder.
|
|
45
|
+
- `/new-lead` with no argument → diff `readdir(<root>/leads)` against
|
|
46
|
+
`leads.json` and print the state table below; the human picks one.
|
|
47
|
+
4. **Adopt** (only when the folder has no registry entry) — see Adoption.
|
|
48
|
+
5. **Chain**: for each of `/analyze-requirements`, `/estimate`, `/proposal` —
|
|
49
|
+
`cd` to the lead directory, invoke the skill, and when it returns, report
|
|
50
|
+
what it wrote and wait. Skip any step whose artifact already exists unless
|
|
51
|
+
the human asks for a re-run.
|
|
52
|
+
6. **Sync the registry** after `/proposal` — see Registry sync.
|
|
53
|
+
7. **Wrap**: start the dashboard (`sh <root>/start.sh`) if it is not already
|
|
54
|
+
running, and report the URL.
|
|
55
|
+
|
|
56
|
+
## Lead states
|
|
57
|
+
|
|
58
|
+
| State | Condition | Offer |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| new | folder present, no registry entry | adopt, then run the chain |
|
|
61
|
+
| WIP | entry present, one of `ARCHITECTURE.md` / `estimation.json` / `proposal.md` missing | resume at the first gap |
|
|
62
|
+
| done | entry present, all three present | nothing; re-run a named step on request |
|
|
63
|
+
| orphan | entry present, folder gone | report only — never delete |
|
|
64
|
+
|
|
65
|
+
## Adoption
|
|
66
|
+
|
|
67
|
+
1. The folder name must match `^[a-z0-9]+(-[a-z0-9]+)*$`. It does not → refuse,
|
|
68
|
+
print the exact `mv` command, and write nothing.
|
|
69
|
+
2. Ask two questions, both skippable:
|
|
70
|
+
- client company name — skipped writes `null`
|
|
71
|
+
- project name — skipped writes Title Case of the folder name
|
|
72
|
+
3. Both answered, and the folder is not already named
|
|
73
|
+
`<kebab(client)>-<kebab(project)>` → offer that rename once. Accepted →
|
|
74
|
+
`git mv` (plain `mv` outside a repo). Declined, or a folder of that name
|
|
75
|
+
already exists → keep the current name and do not ask again.
|
|
76
|
+
4. Write the entry — *after* any rename, so the id can never name a folder that
|
|
77
|
+
no longer exists:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
node scripts/lead-upsert.mjs --root <root> --id <folder-name> \
|
|
81
|
+
--patch '{"client":<string|null>,"title":"<project>","created":"YYYY-MM-DD"}'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`created` has no default and the registry rejects an entry without one.
|
|
85
|
+
5. Commit.
|
|
86
|
+
|
|
87
|
+
Ids need no collision handling: the id is the folder name, and a directory
|
|
88
|
+
cannot hold two entries with the same name.
|
|
89
|
+
|
|
90
|
+
## Registry sync
|
|
91
|
+
|
|
92
|
+
Runs after `/proposal`, never after `/estimate` — `/estimate` emits several
|
|
93
|
+
scenarios and picks none; the pick is `/proposal`'s interview.
|
|
94
|
+
|
|
95
|
+
| Field | Source |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `scenario` | `proposal-figures.json` `.scenario` |
|
|
98
|
+
| `value` | `.cost.low` / `.cost.high`, currency from `proposal.md` frontmatter |
|
|
99
|
+
| `client` | `proposal.md` frontmatter, only when the entry's `client` is `null` |
|
|
100
|
+
|
|
101
|
+
Apply with one `lead-upsert.mjs` call, then commit.
|
|
102
|
+
|
|
103
|
+
## Failure
|
|
104
|
+
|
|
105
|
+
A sub-skill that stops short is reported as it stopped — its own error, its own
|
|
106
|
+
partial output, left in place. Options: fix the input and re-run that skill,
|
|
107
|
+
skip it, or stop the chain. Never re-run a later skill over a missing earlier
|
|
108
|
+
artifact; `/proposal` in particular hard-requires both `ARCHITECTURE.md` and
|
|
109
|
+
`estimation.json`.
|
|
110
|
+
|
|
111
|
+
## Dependency
|
|
112
|
+
|
|
113
|
+
Node ≥ 20 and `npx likec4`. Check both at step 1 and stop if either is missing.
|