@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,88 @@
|
|
|
1
|
+
import { readFileSync, readdirSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { buildInputs } from './lib/inputs.mjs';
|
|
4
|
+
import { validateProvenance } from './lib/validate-provenance.mjs';
|
|
5
|
+
import { validateElections } from './lib/validate-elections.mjs';
|
|
6
|
+
import { validateModelTables } from './lib/validate-model-tables.mjs';
|
|
7
|
+
import { validateDeployment } from './lib/validate-deployment.mjs';
|
|
8
|
+
import { validateLinks } from './lib/validate-links.mjs';
|
|
9
|
+
import { validateTree } from './lib/validate-tree.mjs';
|
|
10
|
+
import { validateClusters } from './lib/validate-clusters.mjs';
|
|
11
|
+
|
|
12
|
+
function consumeDocs(argv, i, docs) {
|
|
13
|
+
while (argv[i + 1] && !argv[i + 1].startsWith('--')) docs.push(argv[++i]);
|
|
14
|
+
return i;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function parseArgs(argv) {
|
|
18
|
+
const args = { root: process.cwd(), docs: [] };
|
|
19
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
20
|
+
const flag = argv[i];
|
|
21
|
+
if (flag === '--docs') {
|
|
22
|
+
i = consumeDocs(argv, i, args.docs);
|
|
23
|
+
} else if (flag.startsWith('--')) {
|
|
24
|
+
args[flag.slice(2)] = argv[++i];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return args;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function boundaryRows(tables) {
|
|
31
|
+
const t = tables.find((x) => x.section.includes('Project Structure'));
|
|
32
|
+
return (t?.rows ?? []).map((r) => r[0]);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function componentRows(tables) {
|
|
36
|
+
const t = tables.find((x) => x.section.includes('Core Components'));
|
|
37
|
+
const col = (t?.headers ?? []).findIndex((h) => /key paths/i.test(h));
|
|
38
|
+
return (t?.rows ?? []).map((r) => ({
|
|
39
|
+
name: r[0].replace(/\[([^\]]*)\]\([^)]*\)/, '$1'),
|
|
40
|
+
keyPaths: col === -1 ? [] : r[col].split(',').map((p) => p.trim()),
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function listDirs(dir, hidden = false) {
|
|
45
|
+
return readdirSync(dir, { withFileTypes: true })
|
|
46
|
+
.filter((e) => e.isDirectory() && (hidden || !e.name.startsWith('.')) && e.name !== 'node_modules')
|
|
47
|
+
.map((e) => e.name);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function walkDirs(root, hidden = false) {
|
|
51
|
+
const top = listDirs(root, hidden);
|
|
52
|
+
return top.flatMap((d) => [d, ...listDirs(join(root, d), hidden).map((c) => `${d}/${c}`)]);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function brownfieldFindings({ inputs, args, root }) {
|
|
56
|
+
const clusters = args.clusters ? JSON.parse(readFileSync(args.clusters, 'utf8')) : [];
|
|
57
|
+
return [
|
|
58
|
+
...validateTree({
|
|
59
|
+
boundaryRows: boundaryRows(inputs.tables),
|
|
60
|
+
fsDirs: walkDirs(root),
|
|
61
|
+
allDirs: walkDirs(root, true),
|
|
62
|
+
}),
|
|
63
|
+
...validateClusters({ clusters, componentRows: componentRows(inputs.tables), storeNames: inputs.erNames }),
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const args = parseArgs(process.argv.slice(2));
|
|
68
|
+
const root = args.root;
|
|
69
|
+
|
|
70
|
+
const inputs = await buildInputs({
|
|
71
|
+
root,
|
|
72
|
+
archPath: args.arch,
|
|
73
|
+
modelPath: args.model,
|
|
74
|
+
docPaths: args.docs,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const findings = [
|
|
78
|
+
...validateProvenance({ tables: inputs.tables }),
|
|
79
|
+
...validateElections({ frontmatter: inputs.frontmatter }),
|
|
80
|
+
...validateModelTables({ model: inputs.model, tables: inputs.tables, erNames: inputs.erNames }),
|
|
81
|
+
...validateDeployment({ model: inputs.model }),
|
|
82
|
+
...validateLinks({ links: inputs.links, files: inputs.files, anchors: inputs.anchors }),
|
|
83
|
+
...(args.mode === 'brownfield' ? brownfieldFindings({ inputs, args, root }) : []),
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
for (const f of findings) console.log(`FAIL [${f.check}] ${f.message}`);
|
|
87
|
+
if (!findings.length) console.log('ok all checks passed');
|
|
88
|
+
process.exit(findings.length ? 1 : 0);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const meta = {
|
|
2
|
+
name: 'arch-docs-research',
|
|
3
|
+
description: 'Domain, stack, and per-aspect design research with provenance',
|
|
4
|
+
phases: [
|
|
5
|
+
{ title: 'Domain', detail: 'concepts + comparable systems' },
|
|
6
|
+
{ title: 'Stack', detail: 'verify stated claims, integration facts' },
|
|
7
|
+
{ title: 'Design', detail: 'greenfield per-aspect proposals' },
|
|
8
|
+
],
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const FACTS = { type: 'object', required: ['facts'], properties: { facts: { type: 'array', items: {
|
|
12
|
+
type: 'object', required: ['fact', 'provenance', 'source'],
|
|
13
|
+
properties: { fact: { type: 'string' }, provenance: { type: 'string' }, source: { type: 'string' } },
|
|
14
|
+
} } } }
|
|
15
|
+
|
|
16
|
+
const dropped = []
|
|
17
|
+
const keep = (label) => (r) => {
|
|
18
|
+
if (r) return r.facts
|
|
19
|
+
dropped.push({ item: label, reason: 'agent returned nothing' })
|
|
20
|
+
log(`DROPPED ${label}: agent returned nothing`)
|
|
21
|
+
return []
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
phase('Domain')
|
|
25
|
+
const domainBriefs = [
|
|
26
|
+
`Research the ${args.domain} domain: core concepts, canonical vocabulary, regulatory constraints. Cite sources. Every fact gets provenance "researched" and a source URL.`,
|
|
27
|
+
`Find 2-3 comparable ${args.domain} systems and their published architectures. Cite sources.`,
|
|
28
|
+
]
|
|
29
|
+
const domain = (await parallel(domainBriefs.map((p, i) => () =>
|
|
30
|
+
agent(p, { label: `domain-${i}`, phase: 'Domain', schema: FACTS }).then(keep(`domain-${i}`))
|
|
31
|
+
))).flat()
|
|
32
|
+
|
|
33
|
+
phase('Stack')
|
|
34
|
+
const stackJobs = [
|
|
35
|
+
...args.statedFacts.map((f) => `Verify this stated claim: "${f.claim}". If verifiable, return it as provenance "researched" with source; if not, return it as provenance "stated" with source "unverified".`),
|
|
36
|
+
...args.gaps.map((g) => `Research integration facts for ${g}: auth method, rate limits, pricing tier, failure modes. Provenance "researched" with sources.`),
|
|
37
|
+
]
|
|
38
|
+
const stack = (await parallel(stackJobs.map((p, i) => () =>
|
|
39
|
+
agent(p, { label: `stack-${i}`, phase: 'Stack', schema: FACTS }).then(keep(`stack-${i}`))
|
|
40
|
+
))).flat()
|
|
41
|
+
|
|
42
|
+
let aspects = []
|
|
43
|
+
if (args.mode === 'greenfield') {
|
|
44
|
+
phase('Design')
|
|
45
|
+
const aspectNames = ['components', 'data', 'deployment', 'security']
|
|
46
|
+
aspects = (await parallel(aspectNames.map((a) => () =>
|
|
47
|
+
agent(
|
|
48
|
+
`Propose the ${a} design for a ${args.projectType} ${args.domain} system, constrained by these researched facts: ${JSON.stringify(domain.slice(0, 20))}. Every proposal gets provenance "proposed", source "this workflow".`,
|
|
49
|
+
{ label: `design-${a}`, phase: 'Design', schema: FACTS },
|
|
50
|
+
).then(keep(`design-${a}`))
|
|
51
|
+
))).flat()
|
|
52
|
+
} else {
|
|
53
|
+
log('brownfield mode: per-aspect design skipped, scan owns observed facts')
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
log(`research done: ${domain.length} domain, ${stack.length} stack, ${aspects.length} proposed, ${dropped.length} dropped`)
|
|
57
|
+
return { domain, stack, aspects, dropped }
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# estimate
|
|
2
|
+
|
|
3
|
+
Produce an honest, validated project estimate, then serve it on localhost as an
|
|
4
|
+
interactive what-if page.
|
|
5
|
+
|
|
6
|
+
## What it produces
|
|
7
|
+
|
|
8
|
+
**`estimation.md`** — scope split into `stated` vs `proposed` items, a task-level
|
|
9
|
+
backlog with confidence and assumptions per row, an AI-aware scenario comparison
|
|
10
|
+
(team composition × Claude Code plan), and the technique used, all backed by
|
|
11
|
+
`estimation.json` (the numbers every table cell comes from — nothing in the
|
|
12
|
+
doc is hand-totaled).
|
|
13
|
+
|
|
14
|
+
**An interactive page** (`estimate.html`) — the same data rendered as a
|
|
15
|
+
self-contained, offline-capable HTML file with live what-if controls (swap
|
|
16
|
+
team/plan, see months and cost recompute), served on `localhost:4173` (or the
|
|
17
|
+
next free port).
|
|
18
|
+
|
|
19
|
+
## Two run modes
|
|
20
|
+
|
|
21
|
+
- **Standalone** — no existing docs. estimate runs its own interview, sizes
|
|
22
|
+
from evidence you provide, and writes `estimation-inputs.json` +
|
|
23
|
+
`estimation.md` from scratch.
|
|
24
|
+
- **Companion** — an `ARCHITECTURE.md` already exists (from the `analyze-requirements`
|
|
25
|
+
skill). estimate seeds the WBS from its §6 Core Components and the risk
|
|
26
|
+
register from its §15 Risks, seeds a `components` roster from §6 so every
|
|
27
|
+
feature is tagged with the component it implements (untouched components
|
|
28
|
+
are caught by validation), then places `estimation.md` beside it so the
|
|
29
|
+
analyze-requirements viewer picks it up as a companion page. `estimate.html` renders
|
|
30
|
+
into the shared `dist/` output folder (falling back to beside
|
|
31
|
+
`estimation.md`), so viewer and estimate ship as one folder; the viewer
|
|
32
|
+
links it from the estimation tab, and `render.mjs --viewer <path>` adds
|
|
33
|
+
the internal-only back-link.
|
|
34
|
+
|
|
35
|
+
## Run it
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
node scripts/compute.mjs --inputs estimation-inputs.json --out estimation.json
|
|
39
|
+
node scripts/validate.mjs --md estimation.md --json estimation.json
|
|
40
|
+
node scripts/render.mjs --json estimation.json --md estimation.md --out .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`validate.mjs` must exit 0 before `render.mjs` will produce a page — an
|
|
44
|
+
unvalidated estimate cannot ship. Add `--client-only` to `render.mjs` for a
|
|
45
|
+
client-safe file with rates and the labor/plan cost breakdown stripped from
|
|
46
|
+
both the embedded data and the task register (totals and months stay) —
|
|
47
|
+
unless `exposeRatesToClient: true` is set in `estimation-inputs.json`, which
|
|
48
|
+
keeps them.
|
|
49
|
+
|
|
50
|
+
## Dependency
|
|
51
|
+
|
|
52
|
+
Node ≥ 20. The scripts are dependency-free — no `npm install` needed to run
|
|
53
|
+
them.
|
|
54
|
+
|
|
55
|
+
The root `package.json`'s `engines: >=18.3` is a different, lower number for a
|
|
56
|
+
different job: it's the floor for the *installer* (`npx agents-rock`), which
|
|
57
|
+
only copies skill files and creates symlinks. This skill's own runtime needs
|
|
58
|
+
Node ≥ 20, declared in `SKILL.md`, the same as `analyze-requirements`.
|
|
59
|
+
|
|
60
|
+
## Why the honesty rules
|
|
61
|
+
|
|
62
|
+
An estimate that hides its guesses is worse than no estimate — it looks precise
|
|
63
|
+
right up until a date slips. estimate labels every scope item `stated` or
|
|
64
|
+
`proposed`, renders anything nobody sized as `not estimated` rather than `0`,
|
|
65
|
+
and never applies one blanket AI-speedup multiplier across a whole project —
|
|
66
|
+
only per task category, because boilerplate and novel logic don't speed up the
|
|
67
|
+
same amount.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: estimate
|
|
3
|
+
description: Interview-driven project estimation with AI-aware delivery scenarios. Use when the user asks for an estimate, effort sizing, a quote, a timeline, staffing, or "how long would this take" — with or without existing architecture docs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# estimate
|
|
7
|
+
|
|
8
|
+
Produce an honest, validated estimate: confirmed scope split from assumptions,
|
|
9
|
+
a technique that fits the evidence, AI-assisted staffing scenarios, and an
|
|
10
|
+
interactive what-if page served on localhost.
|
|
11
|
+
|
|
12
|
+
## Hard rules
|
|
13
|
+
|
|
14
|
+
1. Every estimate row carries confidence + assumptions. A row nobody estimated
|
|
15
|
+
renders `not estimated` — never `0`.
|
|
16
|
+
2. Every scope item is labeled `stated` or `proposed` — no unlabeled scope.
|
|
17
|
+
3. Agent judges, script computes: every number in a deliverable comes from
|
|
18
|
+
`scripts/compute.mjs`. Never total, average, or price by hand.
|
|
19
|
+
4. Never apply one blanket AI multiplier to a whole project — per-task
|
|
20
|
+
category only (`references/ai-multipliers.md`).
|
|
21
|
+
5. `node scripts/validate.mjs` must exit 0 before the page renders.
|
|
22
|
+
|
|
23
|
+
## Flow
|
|
24
|
+
|
|
25
|
+
1. **Detect evidence**: requirements/RFP? ARCHITECTURE.md? codebase? none?
|
|
26
|
+
State findings; the user can override. (`references/interview.md` §1)
|
|
27
|
+
2. **Depth**: ask QUICK / STANDARD / DEEP first.
|
|
28
|
+
3. **Interview**: follow `references/interview.md` — pre-fill from evidence,
|
|
29
|
+
ask only holes, run the clear-vs-assumed gate before sizing. Before
|
|
30
|
+
proposing milestones, read `references/slicing.md` — slices are judged
|
|
31
|
+
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.
|
|
35
|
+
5. **Size**: write judgments to `estimation-inputs.json`
|
|
36
|
+
(`references/writing.md` — the booking fixture is the canonical shape).
|
|
37
|
+
6. **Compute**: `node scripts/compute.mjs --inputs estimation-inputs.json --out estimation.json`
|
|
38
|
+
7. **Write**: estimation.md per `references/writing.md`.
|
|
39
|
+
8. **Validate**: `node scripts/validate.mjs --md estimation.md --json estimation.json`
|
|
40
|
+
— fix findings, re-run until clean.
|
|
41
|
+
9. **Render + serve**:
|
|
42
|
+
`node scripts/render.mjs --json estimation.json --md estimation.md --out <dir>`
|
|
43
|
+
(add `--client-only` for a client-safe file) — render re-runs the validation
|
|
44
|
+
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.
|
|
46
|
+
|
|
47
|
+
## Companion mode
|
|
48
|
+
|
|
49
|
+
When ARCHITECTURE.md exists: §6 components seed the WBS, §15 risks seed the
|
|
50
|
+
risk register, seed the `components` roster from §6 rows (use the LikeC4
|
|
51
|
+
model's container and component ids where one exists — dotted ids like
|
|
52
|
+
`atlas.goldStore`) and tag every feature with the component it implements,
|
|
53
|
+
flip the `electedDocs` estimation entry to `elected: true`,
|
|
54
|
+
place estimation.md beside ARCHITECTURE.md so the analyze-requirements viewer picks it
|
|
55
|
+
up as a companion page; link the interactive page from it. Render
|
|
56
|
+
estimate.html **into `<dir>/dist/`** — the same folder the viewer renders
|
|
57
|
+
into. When a rendered viewer exists, add `--viewer index.html` for the
|
|
58
|
+
back-link (internal view only; the client render strips it) — index.html and
|
|
59
|
+
estimate.html then ship as one self-contained folder, and the viewer's
|
|
60
|
+
estimation tab links the copy inside it.
|
|
61
|
+
|
|
62
|
+
## Dependency
|
|
63
|
+
|
|
64
|
+
Node ≥ 20. No npm install needed — the scripts are dependency-free.
|