@webpresso/agent-kit 0.21.0 → 0.21.2
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/bin/_run.js +2 -1
- package/catalog/agent/rules/changeset-release.md +5 -3
- package/dist/esm/audit/repo-guardrails.js +2 -1
- package/dist/esm/blueprint/core/schema.d.ts +1 -1
- package/dist/esm/blueprint/db/enums.d.ts +1 -1
- package/dist/esm/blueprint/execution/progress-bridge.js +2 -2
- package/dist/esm/blueprint/graph/schema.d.ts +3 -3
- package/dist/esm/build/package-manifest.d.ts +13 -0
- package/dist/esm/build/package-manifest.js +165 -0
- package/dist/esm/cli/commands/bench/session-memory.js +1 -1
- package/dist/esm/config/docs-lint/schemas/agents.d.ts +2 -2
- package/dist/esm/config/docs-lint/schemas/audit.d.ts +3 -3
- package/dist/esm/config/docs-lint/schemas/common.d.ts +1 -1
- package/dist/esm/config/docs-lint/schemas/cookbook.d.ts +1 -1
- package/dist/esm/config/docs-lint/schemas/core.d.ts +7 -7
- package/dist/esm/config/docs-lint/schemas/draft.d.ts +2 -2
- package/dist/esm/config/docs-lint/schemas/evaluation.d.ts +1 -1
- package/dist/esm/config/docs-lint/schemas/ongoing-initiative.d.ts +2 -2
- package/dist/esm/config/docs-lint/schemas/rule.d.ts +1 -1
- package/dist/esm/mcp/blueprint-server.js +1 -1
- package/dist/esm/mcp/runners/test.js +1 -1
- package/package.json +1 -1
- package/dist/esm/ai-prompts/business-canvas.d.ts +0 -52
- package/dist/esm/ai-prompts/business-canvas.js +0 -292
- package/dist/esm/ai-prompts/circuit-breaker.d.ts +0 -35
- package/dist/esm/ai-prompts/circuit-breaker.js +0 -171
- package/dist/esm/ai-prompts/experiment-draft.d.ts +0 -86
- package/dist/esm/ai-prompts/experiment-draft.js +0 -188
- package/dist/esm/ai-prompts/index.d.ts +0 -12
- package/dist/esm/ai-prompts/index.js +0 -11
- package/dist/esm/ai-prompts/persona-context.d.ts +0 -70
- package/dist/esm/ai-prompts/persona-context.js +0 -158
- package/dist/esm/ai-prompts/persona-debate.d.ts +0 -67
- package/dist/esm/ai-prompts/persona-debate.js +0 -172
- package/dist/esm/ai-prompts/persona-tools.d.ts +0 -26
- package/dist/esm/ai-prompts/persona-tools.js +0 -172
- package/dist/esm/ai-prompts/personas.d.ts +0 -16
- package/dist/esm/ai-prompts/personas.js +0 -492
- package/dist/esm/ai-prompts/rachel-planning.d.ts +0 -28
- package/dist/esm/ai-prompts/rachel-planning.js +0 -217
- package/dist/esm/ai-prompts/task-analysis.d.ts +0 -49
- package/dist/esm/ai-prompts/task-analysis.js +0 -434
- package/dist/esm/ai-prompts/types.d.ts +0 -3
- package/dist/esm/ai-prompts/types.js +0 -2
package/bin/_run.js
CHANGED
|
@@ -115,7 +115,8 @@ export function buildLaunchPlan({
|
|
|
115
115
|
const hasBuilt = builtExists ?? existsSync(builtEntrypoint)
|
|
116
116
|
const hasSource = sourceExists ?? existsSync(sourceEntrypoint)
|
|
117
117
|
const resolvedBuiltMtimeMs =
|
|
118
|
-
builtMtimeMs ??
|
|
118
|
+
builtMtimeMs ??
|
|
119
|
+
(builtExists === undefined && hasBuilt ? statSync(builtEntrypoint).mtimeMs : null)
|
|
119
120
|
const resolvedSourceMtimeMs =
|
|
120
121
|
sourceMtimeMs ??
|
|
121
122
|
(sourceExists === undefined && hasSource ? statSync(sourceEntrypoint).mtimeMs : null)
|
|
@@ -61,9 +61,11 @@ When a feature branch with a `.changeset/<slug>.md` file merges to `main`,
|
|
|
61
61
|
vp run sync-marketplace-version`. This bumps `package.json`, updates
|
|
62
62
|
`CHANGELOG.md`, removes the consumed `.changeset/<slug>.md` files, and
|
|
63
63
|
syncs `.claude-plugin/marketplace.json` to match the new version.
|
|
64
|
-
2. `
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
2. `npm publish --provenance --access public` — publishes
|
|
65
|
+
`@webpresso/agent-kit` to the public npm registry using the workflow-owned
|
|
66
|
+
publish path.
|
|
67
|
+
3. `git push` — commits the version bump back to `main` only after publish
|
|
68
|
+
succeeds or the version is already published.
|
|
67
69
|
4. CI creates a `release/v<version>` branch with compiled `dist/` committed
|
|
68
70
|
for Claude Code marketplace consumers.
|
|
69
71
|
|
|
@@ -515,7 +515,8 @@ function auditLegacyOmxPlans(root) {
|
|
|
515
515
|
continue;
|
|
516
516
|
const relativeFile = relativePath(root, join(plansRoot, file));
|
|
517
517
|
const parsed = matter(content);
|
|
518
|
-
if (/^#\s+(?:PRD|Test Spec):/im.test(content) ||
|
|
518
|
+
if (/^#\s+(?:PRD|Test Spec):/im.test(content) ||
|
|
519
|
+
/^#\s+(?:PRD|Test Spec):/im.test(parsed.content)) {
|
|
519
520
|
violations.push({
|
|
520
521
|
file: relativeFile,
|
|
521
522
|
message: '.omx/plans must be a derived blueprint handoff, not an authoritative PRD/test-spec',
|
|
@@ -39,9 +39,9 @@ export declare const lifecycleBlueprintStatusSchema: z.ZodEnum<{
|
|
|
39
39
|
*/
|
|
40
40
|
export declare const taskStatusSchema: z.ZodEnum<{
|
|
41
41
|
blocked: "blocked";
|
|
42
|
-
in_progress: "in_progress";
|
|
43
42
|
todo: "todo";
|
|
44
43
|
done: "done";
|
|
44
|
+
in_progress: "in_progress";
|
|
45
45
|
}>;
|
|
46
46
|
/**
|
|
47
47
|
* Valid complexity values using t-shirt sizing.
|
|
@@ -51,11 +51,11 @@ export declare const techDebtSeveritySchema: z.ZodEnum<{
|
|
|
51
51
|
}>;
|
|
52
52
|
export declare const techDebtCategorySchema: z.ZodEnum<{
|
|
53
53
|
dependencies: "dependencies";
|
|
54
|
-
performance: "performance";
|
|
55
54
|
testing: "testing";
|
|
56
55
|
security: "security";
|
|
57
56
|
documentation: "documentation";
|
|
58
57
|
architecture: "architecture";
|
|
58
|
+
performance: "performance";
|
|
59
59
|
maintenance: "maintenance";
|
|
60
60
|
}>;
|
|
61
61
|
export declare const reviewCadenceSchema: z.ZodEnum<{
|
|
@@ -127,12 +127,12 @@ export function projectBlueprintLifecycleFromRuntime(blueprint, bridge, runtimeT
|
|
|
127
127
|
: null
|
|
128
128
|
: runtimeTask.status === 'completed'
|
|
129
129
|
? currentStatus !== 'done'
|
|
130
|
-
? taskVerifyIntent(binding.blueprintTaskId, runtimeTask.evidence) ??
|
|
130
|
+
? (taskVerifyIntent(binding.blueprintTaskId, runtimeTask.evidence) ??
|
|
131
131
|
{
|
|
132
132
|
type: 'task_block',
|
|
133
133
|
taskId: binding.blueprintTaskId,
|
|
134
134
|
reason: buildMissingEvidenceReason(binding.blueprintTaskId),
|
|
135
|
-
}
|
|
135
|
+
})
|
|
136
136
|
: null
|
|
137
137
|
: runtimeTask.status === 'blocked' || runtimeTask.status === 'failed'
|
|
138
138
|
? currentStatus !== 'done'
|
|
@@ -2,8 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const graphNodeTypeSchema: z.ZodEnum<{
|
|
3
3
|
blueprint: "blueprint";
|
|
4
4
|
decision: "decision";
|
|
5
|
-
task: "task";
|
|
6
5
|
external: "external";
|
|
6
|
+
task: "task";
|
|
7
7
|
milestone: "milestone";
|
|
8
8
|
tech_debt: "tech_debt";
|
|
9
9
|
}>;
|
|
@@ -17,8 +17,8 @@ export declare const graphNodeSchema: z.ZodObject<{
|
|
|
17
17
|
type: z.ZodEnum<{
|
|
18
18
|
blueprint: "blueprint";
|
|
19
19
|
decision: "decision";
|
|
20
|
-
task: "task";
|
|
21
20
|
external: "external";
|
|
21
|
+
task: "task";
|
|
22
22
|
milestone: "milestone";
|
|
23
23
|
tech_debt: "tech_debt";
|
|
24
24
|
}>;
|
|
@@ -51,8 +51,8 @@ export declare const normalizedGraphSchema: z.ZodObject<{
|
|
|
51
51
|
type: z.ZodEnum<{
|
|
52
52
|
blueprint: "blueprint";
|
|
53
53
|
decision: "decision";
|
|
54
|
-
task: "task";
|
|
55
54
|
external: "external";
|
|
55
|
+
task: "task";
|
|
56
56
|
milestone: "milestone";
|
|
57
57
|
tech_debt: "tech_debt";
|
|
58
58
|
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type DependencySection = 'dependencies' | 'devDependencies' | 'optionalDependencies' | 'peerDependencies';
|
|
2
|
+
type PackageManifest = Record<string, unknown> & Partial<Record<DependencySection, Record<string, string>>>;
|
|
3
|
+
type WorkspaceCatalogs = {
|
|
4
|
+
catalog?: Record<string, string>;
|
|
5
|
+
catalogs?: Record<string, Record<string, string>>;
|
|
6
|
+
};
|
|
7
|
+
export declare function readWorkspaceCatalogs(workspacePath: string): WorkspaceCatalogs;
|
|
8
|
+
export declare function resolveCatalogSpecifier(dependencyName: string, version: string, workspaceCatalogs: WorkspaceCatalogs): string;
|
|
9
|
+
export declare function createPackedManifest(manifest: PackageManifest, workspaceCatalogs: WorkspaceCatalogs): PackageManifest;
|
|
10
|
+
export declare function preparePackedManifest(rootDir: string): void;
|
|
11
|
+
export declare function restorePackedManifest(rootDir: string): void;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=package-manifest.d.ts.map
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { parse as parseYaml } from 'yaml';
|
|
4
|
+
const DEPENDENCY_SECTIONS = [
|
|
5
|
+
'dependencies',
|
|
6
|
+
'devDependencies',
|
|
7
|
+
'optionalDependencies',
|
|
8
|
+
'peerDependencies',
|
|
9
|
+
];
|
|
10
|
+
const BACKUP_FILENAME = '.package.json.prepack.backup';
|
|
11
|
+
const DIST_BACKUP_DIRNAME = '.dist-prepack-backup';
|
|
12
|
+
function asStringMap(value) {
|
|
13
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
14
|
+
return undefined;
|
|
15
|
+
const entries = Object.entries(value).filter((entry) => typeof entry[1] === 'string');
|
|
16
|
+
return Object.fromEntries(entries);
|
|
17
|
+
}
|
|
18
|
+
function normalizePackedBinPath(value) {
|
|
19
|
+
return value.startsWith('./') ? value.slice(2) : value;
|
|
20
|
+
}
|
|
21
|
+
function normalizePackedBinField(value) {
|
|
22
|
+
if (typeof value === 'string') {
|
|
23
|
+
return normalizePackedBinPath(value);
|
|
24
|
+
}
|
|
25
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
return Object.fromEntries(Object.entries(value).map(([name, path]) => [
|
|
29
|
+
name,
|
|
30
|
+
typeof path === 'string' ? normalizePackedBinPath(path) : path,
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
export function readWorkspaceCatalogs(workspacePath) {
|
|
34
|
+
const parsed = parseYaml(readFileSync(workspacePath, 'utf8'));
|
|
35
|
+
const catalogs = asStringMap(parsed.catalog);
|
|
36
|
+
const namedCatalogs = parsed.catalogs && typeof parsed.catalogs === 'object' && !Array.isArray(parsed.catalogs)
|
|
37
|
+
? Object.fromEntries(Object.entries(parsed.catalogs)
|
|
38
|
+
.map(([name, value]) => [name, asStringMap(value)])
|
|
39
|
+
.filter((entry) => entry[1] !== undefined))
|
|
40
|
+
: undefined;
|
|
41
|
+
return {
|
|
42
|
+
catalog: catalogs,
|
|
43
|
+
catalogs: namedCatalogs,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function resolveCatalogSpecifier(dependencyName, version, workspaceCatalogs) {
|
|
47
|
+
if (!version.startsWith('catalog:'))
|
|
48
|
+
return version;
|
|
49
|
+
const catalogName = version.slice('catalog:'.length);
|
|
50
|
+
if (catalogName.length === 0) {
|
|
51
|
+
const resolved = workspaceCatalogs.catalog?.[dependencyName];
|
|
52
|
+
if (!resolved) {
|
|
53
|
+
throw new Error(`Missing pnpm catalog entry for ${dependencyName}`);
|
|
54
|
+
}
|
|
55
|
+
return resolved;
|
|
56
|
+
}
|
|
57
|
+
const resolved = workspaceCatalogs.catalogs?.[catalogName]?.[dependencyName];
|
|
58
|
+
if (!resolved) {
|
|
59
|
+
throw new Error(`Missing pnpm named catalog "${catalogName}" entry for ${dependencyName}`);
|
|
60
|
+
}
|
|
61
|
+
return resolved;
|
|
62
|
+
}
|
|
63
|
+
export function createPackedManifest(manifest, workspaceCatalogs) {
|
|
64
|
+
const packedManifest = { ...manifest };
|
|
65
|
+
for (const section of DEPENDENCY_SECTIONS) {
|
|
66
|
+
const dependencies = manifest[section];
|
|
67
|
+
if (!dependencies)
|
|
68
|
+
continue;
|
|
69
|
+
packedManifest[section] = Object.fromEntries(Object.entries(dependencies).map(([dependencyName, version]) => [
|
|
70
|
+
dependencyName,
|
|
71
|
+
resolveCatalogSpecifier(dependencyName, version, workspaceCatalogs),
|
|
72
|
+
]));
|
|
73
|
+
}
|
|
74
|
+
if ('bin' in packedManifest) {
|
|
75
|
+
packedManifest.bin = normalizePackedBinField(packedManifest.bin);
|
|
76
|
+
}
|
|
77
|
+
return packedManifest;
|
|
78
|
+
}
|
|
79
|
+
function writeJson(filePath, value) {
|
|
80
|
+
const next = `${JSON.stringify(value, null, 2)}\n`;
|
|
81
|
+
const tmp = `${filePath}.tmp`;
|
|
82
|
+
writeFileSync(tmp, next, 'utf8');
|
|
83
|
+
renameSync(tmp, filePath);
|
|
84
|
+
}
|
|
85
|
+
function writeText(filePath, value) {
|
|
86
|
+
const tmp = `${filePath}.tmp`;
|
|
87
|
+
writeFileSync(tmp, value, 'utf8');
|
|
88
|
+
renameSync(tmp, filePath);
|
|
89
|
+
}
|
|
90
|
+
function pruneOrphanedDistSubtrees(rootDir) {
|
|
91
|
+
const distRoot = join(rootDir, 'dist', 'esm');
|
|
92
|
+
const srcRoot = join(rootDir, 'src');
|
|
93
|
+
if (!existsSync(distRoot) || !existsSync(srcRoot))
|
|
94
|
+
return;
|
|
95
|
+
const backupRoot = join(rootDir, DIST_BACKUP_DIRNAME);
|
|
96
|
+
let pruned = false;
|
|
97
|
+
for (const entry of readdirSync(distRoot, { withFileTypes: true })) {
|
|
98
|
+
if (!entry.isDirectory())
|
|
99
|
+
continue;
|
|
100
|
+
const distDir = join(distRoot, entry.name);
|
|
101
|
+
const srcDir = join(srcRoot, entry.name);
|
|
102
|
+
if (existsSync(srcDir))
|
|
103
|
+
continue;
|
|
104
|
+
if (!existsSync(backupRoot))
|
|
105
|
+
mkdirSync(backupRoot, { recursive: true });
|
|
106
|
+
pruned = true;
|
|
107
|
+
const backupTarget = join(backupRoot, entry.name);
|
|
108
|
+
renameSync(distDir, backupTarget);
|
|
109
|
+
}
|
|
110
|
+
if (!pruned && existsSync(backupRoot)) {
|
|
111
|
+
rmSync(backupRoot, { force: true, recursive: true });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function restorePrunedDistSubtrees(rootDir) {
|
|
115
|
+
const backupRoot = join(rootDir, DIST_BACKUP_DIRNAME);
|
|
116
|
+
const distRoot = join(rootDir, 'dist', 'esm');
|
|
117
|
+
if (!existsSync(backupRoot))
|
|
118
|
+
return;
|
|
119
|
+
for (const entry of readdirSync(backupRoot, { withFileTypes: true })) {
|
|
120
|
+
const backupPath = join(backupRoot, entry.name);
|
|
121
|
+
const restorePath = join(distRoot, entry.name);
|
|
122
|
+
if (existsSync(restorePath)) {
|
|
123
|
+
rmSync(restorePath, { force: true, recursive: true });
|
|
124
|
+
}
|
|
125
|
+
renameSync(backupPath, restorePath);
|
|
126
|
+
}
|
|
127
|
+
rmSync(backupRoot, { force: true, recursive: true });
|
|
128
|
+
}
|
|
129
|
+
export function preparePackedManifest(rootDir) {
|
|
130
|
+
const packageJsonPath = join(rootDir, 'package.json');
|
|
131
|
+
const workspacePath = join(rootDir, 'pnpm-workspace.yaml');
|
|
132
|
+
const backupPath = join(rootDir, BACKUP_FILENAME);
|
|
133
|
+
if (existsSync(backupPath)) {
|
|
134
|
+
throw new Error(`Packed-manifest backup already exists at ${backupPath}`);
|
|
135
|
+
}
|
|
136
|
+
const originalManifestText = readFileSync(packageJsonPath, 'utf8');
|
|
137
|
+
const manifest = JSON.parse(originalManifestText);
|
|
138
|
+
const packedManifest = createPackedManifest(manifest, readWorkspaceCatalogs(workspacePath));
|
|
139
|
+
writeText(backupPath, originalManifestText);
|
|
140
|
+
pruneOrphanedDistSubtrees(rootDir);
|
|
141
|
+
writeJson(packageJsonPath, packedManifest);
|
|
142
|
+
}
|
|
143
|
+
export function restorePackedManifest(rootDir) {
|
|
144
|
+
const packageJsonPath = join(rootDir, 'package.json');
|
|
145
|
+
const backupPath = join(rootDir, BACKUP_FILENAME);
|
|
146
|
+
if (!existsSync(backupPath))
|
|
147
|
+
return;
|
|
148
|
+
writeText(packageJsonPath, readFileSync(backupPath, 'utf8'));
|
|
149
|
+
rmSync(backupPath, { force: true });
|
|
150
|
+
restorePrunedDistSubtrees(rootDir);
|
|
151
|
+
}
|
|
152
|
+
if (import.meta.main) {
|
|
153
|
+
const command = process.argv[2];
|
|
154
|
+
const rootDir = process.cwd();
|
|
155
|
+
if (command === 'prepare') {
|
|
156
|
+
preparePackedManifest(rootDir);
|
|
157
|
+
}
|
|
158
|
+
else if (command === 'restore') {
|
|
159
|
+
restorePackedManifest(rootDir);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
throw new Error('Usage: bun src/build/package-manifest.ts <prepare|restore>');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=package-manifest.js.map
|
|
@@ -123,7 +123,7 @@ function apiKeyMapFromEnv(env) {
|
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
async function loadRuntimeModules() {
|
|
126
|
-
const [manifestModule, scenarioModule, costModule, runnerModule, reportModule
|
|
126
|
+
const [manifestModule, scenarioModule, costModule, runnerModule, reportModule] = await Promise.all([
|
|
127
127
|
import(pathToFileURL(resolve(REPO_ROOT, 'scripts', 'bench', 'lib', 'manifest.ts')).href),
|
|
128
128
|
import(pathToFileURL(resolve(REPO_ROOT, 'scripts', 'bench', 'scenarios', '_schema.ts')).href),
|
|
129
129
|
import(pathToFileURL(resolve(REPO_ROOT, 'scripts', 'bench', 'lib', 'cost-aggregator.ts')).href),
|
|
@@ -12,11 +12,11 @@ export declare const agentsFrontmatter: z.ZodObject<{
|
|
|
12
12
|
"in-progress": "in-progress";
|
|
13
13
|
archived: "archived";
|
|
14
14
|
superseded: "superseded";
|
|
15
|
-
open: "open";
|
|
16
15
|
accepted: "accepted";
|
|
17
16
|
"needs-remediation": "needs-remediation";
|
|
18
17
|
monitoring: "monitoring";
|
|
19
18
|
resolved: "resolved";
|
|
19
|
+
open: "open";
|
|
20
20
|
deprecated: "deprecated";
|
|
21
21
|
current: "current";
|
|
22
22
|
complete: "complete";
|
|
@@ -52,11 +52,11 @@ export declare const agentEntryFrontmatter: z.ZodObject<{
|
|
|
52
52
|
"in-progress": "in-progress";
|
|
53
53
|
archived: "archived";
|
|
54
54
|
superseded: "superseded";
|
|
55
|
-
open: "open";
|
|
56
55
|
accepted: "accepted";
|
|
57
56
|
"needs-remediation": "needs-remediation";
|
|
58
57
|
monitoring: "monitoring";
|
|
59
58
|
resolved: "resolved";
|
|
59
|
+
open: "open";
|
|
60
60
|
deprecated: "deprecated";
|
|
61
61
|
current: "current";
|
|
62
62
|
complete: "complete";
|
|
@@ -13,11 +13,11 @@ export declare const auditFrontmatter: z.ZodObject<{
|
|
|
13
13
|
"in-progress": "in-progress";
|
|
14
14
|
archived: "archived";
|
|
15
15
|
superseded: "superseded";
|
|
16
|
-
open: "open";
|
|
17
16
|
accepted: "accepted";
|
|
18
17
|
"needs-remediation": "needs-remediation";
|
|
19
18
|
monitoring: "monitoring";
|
|
20
19
|
resolved: "resolved";
|
|
20
|
+
open: "open";
|
|
21
21
|
deprecated: "deprecated";
|
|
22
22
|
current: "current";
|
|
23
23
|
complete: "complete";
|
|
@@ -33,8 +33,8 @@ export declare const auditFrontmatter: z.ZodObject<{
|
|
|
33
33
|
type: z.ZodOptional<z.ZodLiteral<"audit">>;
|
|
34
34
|
last_updated: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodDate, z.ZodTransform<string | undefined, Date>>]>>;
|
|
35
35
|
audit_type: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
performance: "performance";
|
|
37
36
|
security: "security";
|
|
37
|
+
performance: "performance";
|
|
38
38
|
"code-quality": "code-quality";
|
|
39
39
|
accessibility: "accessibility";
|
|
40
40
|
other: "other";
|
|
@@ -43,8 +43,8 @@ export declare const auditFrontmatter: z.ZodObject<{
|
|
|
43
43
|
low: "low";
|
|
44
44
|
medium: "medium";
|
|
45
45
|
high: "high";
|
|
46
|
-
info: "info";
|
|
47
46
|
critical: "critical";
|
|
47
|
+
info: "info";
|
|
48
48
|
}>>;
|
|
49
49
|
issues_count: z.ZodOptional<z.ZodNumber>;
|
|
50
50
|
}, z.core.$strip>;
|
|
@@ -20,11 +20,11 @@ export declare const baseFrontmatter: z.ZodObject<{
|
|
|
20
20
|
"in-progress": "in-progress";
|
|
21
21
|
archived: "archived";
|
|
22
22
|
superseded: "superseded";
|
|
23
|
-
open: "open";
|
|
24
23
|
accepted: "accepted";
|
|
25
24
|
"needs-remediation": "needs-remediation";
|
|
26
25
|
monitoring: "monitoring";
|
|
27
26
|
resolved: "resolved";
|
|
27
|
+
open: "open";
|
|
28
28
|
deprecated: "deprecated";
|
|
29
29
|
current: "current";
|
|
30
30
|
complete: "complete";
|
|
@@ -14,11 +14,11 @@ export declare const cookbookFrontmatter: z.ZodObject<{
|
|
|
14
14
|
"in-progress": "in-progress";
|
|
15
15
|
archived: "archived";
|
|
16
16
|
superseded: "superseded";
|
|
17
|
-
open: "open";
|
|
18
17
|
accepted: "accepted";
|
|
19
18
|
"needs-remediation": "needs-remediation";
|
|
20
19
|
monitoring: "monitoring";
|
|
21
20
|
resolved: "resolved";
|
|
21
|
+
open: "open";
|
|
22
22
|
deprecated: "deprecated";
|
|
23
23
|
current: "current";
|
|
24
24
|
complete: "complete";
|
|
@@ -13,11 +13,11 @@ export declare const coreFrontmatter: z.ZodObject<{
|
|
|
13
13
|
"in-progress": "in-progress";
|
|
14
14
|
archived: "archived";
|
|
15
15
|
superseded: "superseded";
|
|
16
|
-
open: "open";
|
|
17
16
|
accepted: "accepted";
|
|
18
17
|
"needs-remediation": "needs-remediation";
|
|
19
18
|
monitoring: "monitoring";
|
|
20
19
|
resolved: "resolved";
|
|
20
|
+
open: "open";
|
|
21
21
|
deprecated: "deprecated";
|
|
22
22
|
current: "current";
|
|
23
23
|
complete: "complete";
|
|
@@ -49,11 +49,11 @@ export declare const readmeFrontmatter: z.ZodObject<{
|
|
|
49
49
|
"in-progress": "in-progress";
|
|
50
50
|
archived: "archived";
|
|
51
51
|
superseded: "superseded";
|
|
52
|
-
open: "open";
|
|
53
52
|
accepted: "accepted";
|
|
54
53
|
"needs-remediation": "needs-remediation";
|
|
55
54
|
monitoring: "monitoring";
|
|
56
55
|
resolved: "resolved";
|
|
56
|
+
open: "open";
|
|
57
57
|
deprecated: "deprecated";
|
|
58
58
|
current: "current";
|
|
59
59
|
complete: "complete";
|
|
@@ -83,11 +83,11 @@ export declare const securityFrontmatter: z.ZodObject<{
|
|
|
83
83
|
"in-progress": "in-progress";
|
|
84
84
|
archived: "archived";
|
|
85
85
|
superseded: "superseded";
|
|
86
|
-
open: "open";
|
|
87
86
|
accepted: "accepted";
|
|
88
87
|
"needs-remediation": "needs-remediation";
|
|
89
88
|
monitoring: "monitoring";
|
|
90
89
|
resolved: "resolved";
|
|
90
|
+
open: "open";
|
|
91
91
|
deprecated: "deprecated";
|
|
92
92
|
current: "current";
|
|
93
93
|
complete: "complete";
|
|
@@ -106,8 +106,8 @@ export declare const securityFrontmatter: z.ZodObject<{
|
|
|
106
106
|
low: "low";
|
|
107
107
|
medium: "medium";
|
|
108
108
|
high: "high";
|
|
109
|
-
info: "info";
|
|
110
109
|
critical: "critical";
|
|
110
|
+
info: "info";
|
|
111
111
|
}>>;
|
|
112
112
|
}, z.core.$strip>;
|
|
113
113
|
export type SecurityFrontmatter = z.infer<typeof securityFrontmatter>;
|
|
@@ -124,8 +124,8 @@ export declare const designFrontmatter: z.ZodObject<{
|
|
|
124
124
|
type: z.ZodOptional<z.ZodLiteral<"design">>;
|
|
125
125
|
status: z.ZodOptional<z.ZodEnum<{
|
|
126
126
|
draft: "draft";
|
|
127
|
-
approved: "approved";
|
|
128
127
|
deprecated: "deprecated";
|
|
128
|
+
approved: "approved";
|
|
129
129
|
implemented: "implemented";
|
|
130
130
|
}>>;
|
|
131
131
|
}, z.core.$strip>;
|
|
@@ -143,8 +143,8 @@ export declare const troubleshootingFrontmatter: z.ZodObject<{
|
|
|
143
143
|
type: z.ZodOptional<z.ZodLiteral<"troubleshooting">>;
|
|
144
144
|
status: z.ZodOptional<z.ZodEnum<{
|
|
145
145
|
draft: "draft";
|
|
146
|
-
open: "open";
|
|
147
146
|
resolved: "resolved";
|
|
147
|
+
open: "open";
|
|
148
148
|
active: "active";
|
|
149
149
|
"wont-fix": "wont-fix";
|
|
150
150
|
}>>;
|
|
@@ -164,11 +164,11 @@ export declare const agentsFrontmatter: z.ZodObject<{
|
|
|
164
164
|
"in-progress": "in-progress";
|
|
165
165
|
archived: "archived";
|
|
166
166
|
superseded: "superseded";
|
|
167
|
-
open: "open";
|
|
168
167
|
accepted: "accepted";
|
|
169
168
|
"needs-remediation": "needs-remediation";
|
|
170
169
|
monitoring: "monitoring";
|
|
171
170
|
resolved: "resolved";
|
|
171
|
+
open: "open";
|
|
172
172
|
deprecated: "deprecated";
|
|
173
173
|
current: "current";
|
|
174
174
|
complete: "complete";
|
|
@@ -3,9 +3,9 @@ import { z } from 'zod';
|
|
|
3
3
|
* Status values for draft documents
|
|
4
4
|
*/
|
|
5
5
|
export declare const draftStatus: z.ZodEnum<{
|
|
6
|
-
approved: "approved";
|
|
7
6
|
rejected: "rejected";
|
|
8
7
|
review: "review";
|
|
8
|
+
approved: "approved";
|
|
9
9
|
wip: "wip";
|
|
10
10
|
}>;
|
|
11
11
|
/**
|
|
@@ -15,9 +15,9 @@ export declare const draftStatus: z.ZodEnum<{
|
|
|
15
15
|
export declare const draftFrontmatter: z.ZodObject<{
|
|
16
16
|
type: z.ZodLiteral<"draft">;
|
|
17
17
|
status: z.ZodEnum<{
|
|
18
|
-
approved: "approved";
|
|
19
18
|
rejected: "rejected";
|
|
20
19
|
review: "review";
|
|
20
|
+
approved: "approved";
|
|
21
21
|
wip: "wip";
|
|
22
22
|
}>;
|
|
23
23
|
target: z.ZodString;
|
|
@@ -14,11 +14,11 @@ export declare const evaluationFrontmatter: z.ZodObject<{
|
|
|
14
14
|
"in-progress": "in-progress";
|
|
15
15
|
archived: "archived";
|
|
16
16
|
superseded: "superseded";
|
|
17
|
-
open: "open";
|
|
18
17
|
accepted: "accepted";
|
|
19
18
|
"needs-remediation": "needs-remediation";
|
|
20
19
|
monitoring: "monitoring";
|
|
21
20
|
resolved: "resolved";
|
|
21
|
+
open: "open";
|
|
22
22
|
deprecated: "deprecated";
|
|
23
23
|
current: "current";
|
|
24
24
|
complete: "complete";
|
|
@@ -33,11 +33,11 @@ export declare const planArtifactFrontmatter: z.ZodObject<{
|
|
|
33
33
|
"in-progress": "in-progress";
|
|
34
34
|
archived: "archived";
|
|
35
35
|
superseded: "superseded";
|
|
36
|
-
open: "open";
|
|
37
36
|
accepted: "accepted";
|
|
38
37
|
"needs-remediation": "needs-remediation";
|
|
39
38
|
monitoring: "monitoring";
|
|
40
39
|
resolved: "resolved";
|
|
40
|
+
open: "open";
|
|
41
41
|
deprecated: "deprecated";
|
|
42
42
|
current: "current";
|
|
43
43
|
complete: "complete";
|
|
@@ -74,11 +74,11 @@ export declare const planReportFrontmatter: z.ZodObject<{
|
|
|
74
74
|
"in-progress": "in-progress";
|
|
75
75
|
archived: "archived";
|
|
76
76
|
superseded: "superseded";
|
|
77
|
-
open: "open";
|
|
78
77
|
accepted: "accepted";
|
|
79
78
|
"needs-remediation": "needs-remediation";
|
|
80
79
|
monitoring: "monitoring";
|
|
81
80
|
resolved: "resolved";
|
|
81
|
+
open: "open";
|
|
82
82
|
deprecated: "deprecated";
|
|
83
83
|
current: "current";
|
|
84
84
|
complete: "complete";
|
|
@@ -13,11 +13,11 @@ export declare const ruleFrontmatter: z.ZodObject<{
|
|
|
13
13
|
"in-progress": "in-progress";
|
|
14
14
|
archived: "archived";
|
|
15
15
|
superseded: "superseded";
|
|
16
|
-
open: "open";
|
|
17
16
|
accepted: "accepted";
|
|
18
17
|
"needs-remediation": "needs-remediation";
|
|
19
18
|
monitoring: "monitoring";
|
|
20
19
|
resolved: "resolved";
|
|
20
|
+
open: "open";
|
|
21
21
|
deprecated: "deprecated";
|
|
22
22
|
current: "current";
|
|
23
23
|
complete: "complete";
|
|
@@ -23,7 +23,7 @@ import { resolveBlueprintProjectionDbPath } from '#db/paths.js';
|
|
|
23
23
|
import { findTemplate } from '#db/templates.js';
|
|
24
24
|
import { resolveBlueprintRoot } from '#utils/blueprint-root.js';
|
|
25
25
|
import { evidenceListSchema, canonicalizeEvidenceList } from '#evidence.js';
|
|
26
|
-
import { checkFreshness, readCurrentHead, readProjectionMetadata
|
|
26
|
+
import { checkFreshness, readCurrentHead, readProjectionMetadata } from '#freshness.js';
|
|
27
27
|
import { applyVerification, assertAllTasksHaveCanonicalPassingEvidence, readTaskVerification, } from '#verification.js';
|
|
28
28
|
import { makeNextAction } from '#next-action.js';
|
|
29
29
|
import { PROJECT_SOURCES } from '#projects.js';
|
|
@@ -240,7 +240,7 @@ function buildBalancedShards(cwd, files, workspaceSharding) {
|
|
|
240
240
|
return left.file.localeCompare(right.file);
|
|
241
241
|
});
|
|
242
242
|
for (const candidate of sortedByWeight) {
|
|
243
|
-
const lightestBucket = buckets.reduce((best, bucket) =>
|
|
243
|
+
const lightestBucket = buckets.reduce((best, bucket) => bucket.bytes < best.bytes ? bucket : best);
|
|
244
244
|
lightestBucket.files.push(candidate.file);
|
|
245
245
|
lightestBucket.bytes += candidate.bytes;
|
|
246
246
|
}
|
package/package.json
CHANGED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export interface FeatureProposal {
|
|
2
|
-
name: string;
|
|
3
|
-
description: string;
|
|
4
|
-
priority: 'must-have' | 'should-have' | 'nice-to-have';
|
|
5
|
-
complexity: 'low' | 'medium' | 'high';
|
|
6
|
-
}
|
|
7
|
-
export interface TargetAudience {
|
|
8
|
-
persona: string;
|
|
9
|
-
painPoints: string[];
|
|
10
|
-
demographics?: string;
|
|
11
|
-
marketSize?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface SuccessMetric {
|
|
14
|
-
name: string;
|
|
15
|
-
target: string;
|
|
16
|
-
timeframe: string;
|
|
17
|
-
}
|
|
18
|
-
export interface MarketResearch {
|
|
19
|
-
competitors: Array<{
|
|
20
|
-
name: string;
|
|
21
|
-
pricing: string;
|
|
22
|
-
strengths: string[];
|
|
23
|
-
weaknesses: string[];
|
|
24
|
-
}>;
|
|
25
|
-
trends: string[];
|
|
26
|
-
gaps: string[];
|
|
27
|
-
}
|
|
28
|
-
export interface BusinessCanvas {
|
|
29
|
-
problem: string;
|
|
30
|
-
solution: string;
|
|
31
|
-
targetAudience: TargetAudience[];
|
|
32
|
-
successMetrics: SuccessMetric[];
|
|
33
|
-
keyMetrics: string[];
|
|
34
|
-
uniqueValue: string;
|
|
35
|
-
channels: string[];
|
|
36
|
-
revenueModel: string;
|
|
37
|
-
costStructure: string;
|
|
38
|
-
features: FeatureProposal[];
|
|
39
|
-
marketResearch?: MarketResearch;
|
|
40
|
-
}
|
|
41
|
-
export type ViabilityDecision = 'GO' | 'NO_GO' | 'NEEDS_MORE_INFO';
|
|
42
|
-
export interface ParsedSteveResponse {
|
|
43
|
-
message: string;
|
|
44
|
-
canvas?: BusinessCanvas;
|
|
45
|
-
viability?: ViabilityDecision;
|
|
46
|
-
rationale?: string;
|
|
47
|
-
}
|
|
48
|
-
export declare const BUSINESS_CANVAS_SYSTEM_PROMPT = "You are conducting a business viability analysis conversation.\n\n## Conversation Flow\n\nGuide the user through these phases naturally (don't announce phases):\n\n1. **Problem Discovery** (2-3 questions)\n - What problem are you solving?\n - Who experiences this problem most acutely?\n - How do they currently solve it?\n\n2. **Target Audience Deep Dive** (1-2 questions)\n - Who is the ideal customer persona?\n - What are their specific pain points and demographics?\n\n3. **Market Validation** (2-3 questions)\n - Who are your competitors?\n - What's your target price point?\n - How big is your addressable market?\n\n4. **Differentiation & Success Criteria** (1-2 questions)\n - What makes your solution unique?\n - What metrics will define success for MVP?\n\n5. **Canvas Generation**\n When you have enough information (typically 5-8 exchanges), generate the canvas.\n\n## Output Format\n\nWhen ready to generate the canvas, include these XML tags in your response:\n\n<business_canvas>\n{\n \"problem\": \"Clear problem statement describing the pain point\",\n \"solution\": \"Your proposed solution summary\",\n \"targetAudience\": [\n {\n \"persona\": \"Primary user type (e.g., 'Freelance designers')\",\n \"painPoints\": [\"Specific pain point 1\", \"Specific pain point 2\"],\n \"demographics\": \"Age, role, industry, etc.\",\n \"marketSize\": \"Estimated TAM for this segment\"\n }\n ],\n \"successMetrics\": [\n {\n \"name\": \"MRR\",\n \"target\": \"$10K\",\n \"timeframe\": \"6 months post-launch\"\n },\n {\n \"name\": \"Active Users\",\n \"target\": \"500\",\n \"timeframe\": \"3 months post-launch\"\n }\n ],\n \"keyMetrics\": [\"MRR\", \"Churn Rate\", \"DAU\"],\n \"uniqueValue\": \"What makes this unique/differentiated\",\n \"channels\": [\"ProductHunt\", \"Twitter\", \"Content Marketing\"],\n \"revenueModel\": \"How you'll make money (e.g., $15/mo subscription)\",\n \"costStructure\": \"Estimated monthly costs breakdown\",\n \"features\": [\n {\n \"name\": \"Feature Name\",\n \"description\": \"What it does and why it matters\",\n \"priority\": \"must-have\",\n \"complexity\": \"medium\"\n }\n ],\n \"marketResearch\": {\n \"competitors\": [\n {\n \"name\": \"Competitor Name\",\n \"pricing\": \"$X/mo\",\n \"strengths\": [\"Strength 1\"],\n \"weaknesses\": [\"Weakness 1\"]\n }\n ],\n \"trends\": [\"Market trend 1\", \"Market trend 2\"],\n \"gaps\": [\"Gap in market 1\", \"Gap in market 2\"]\n }\n}\n</business_canvas>\n\n<viability_decision>GO|NO_GO|NEEDS_MORE_INFO</viability_decision>\n<viability_rationale>Why this decision...</viability_rationale>\n\n## Feature Prioritization Rules\n\nWhen generating features, follow strict MVP prioritization:\n\n- **must-have** (Week 1-2): Core features that validate the hypothesis. Max 3-4 features.\n- **should-have** (Week 2-4): Important but not blocking validation. Max 2-3 features.\n- **nice-to-have** (Post-MVP): Polish and expansion features.\n\nComplexity estimates:\n- **low**: Can be built in < 1 day\n- **medium**: 1-3 days of development\n- **high**: 3+ days or requires external integrations\n\n## Viability Criteria\n\n- **GO**: Clear problem, addressable market (>$1B TAM), differentiated solution, viable unit economics (LTV:CAC > 3:1)\n- **NO_GO**: No clear problem, saturated market with dominant players, no differentiation, unsustainable costs\n- **NEEDS_MORE_INFO**: Missing critical information to make a decision (e.g., unknown pricing, unclear target audience)\n\n## Guidelines\n\n- Ask one question at a time (occasionally two if related)\n- Challenge assumptions politely but directly\n- Use investor terminology naturally (CAC, LTV, Churn, ROI, TAM, SAM)\n- Provide insights from market patterns you've seen\n- When generating canvas, prioritize features ruthlessly for MVP\n- Always include your conversational response before the canvas tags\n- Include at least 2 success metrics with realistic targets\n- Identify at least 2 competitors in market research\n";
|
|
49
|
-
export declare const BUSINESS_CANVAS_USER_PROMPT = "Continue the conversation to understand this business idea.\nIf you have enough information (5-8 exchanges), generate the Business Canvas.\n\nPrevious conversation:\n{conversation_history}\n\nUser's latest message:\n{user_message}\n";
|
|
50
|
-
export declare function parseBusinessCanvas(response: string): ParsedSteveResponse;
|
|
51
|
-
export declare function isValidBusinessCanvas(canvas: unknown): canvas is BusinessCanvas;
|
|
52
|
-
//# sourceMappingURL=business-canvas.d.ts.map
|