@shahmarasy/prodo 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents.js +4 -2
- package/dist/artifacts.d.ts +1 -0
- package/dist/artifacts.js +265 -31
- package/dist/cli.js +80 -3
- package/dist/init-tui.d.ts +3 -0
- package/dist/init-tui.js +28 -1
- package/dist/init.d.ts +1 -0
- package/dist/init.js +9 -3
- package/dist/normalize.js +55 -7
- package/dist/providers/openai-provider.js +2 -1
- package/dist/settings.d.ts +1 -0
- package/dist/settings.js +2 -1
- package/dist/templates.d.ts +1 -1
- package/dist/templates.js +2 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +13 -0
- package/dist/validator.js +0 -4
- package/dist/workflow-commands.js +2 -1
- package/package.json +1 -1
- package/presets/fintech/preset.json +48 -1
- package/presets/fintech/prompts/prd.md +99 -2
- package/presets/marketplace/preset.json +51 -1
- package/presets/marketplace/prompts/prd.md +140 -2
- package/presets/saas/preset.json +53 -1
- package/presets/saas/prompts/prd.md +150 -2
- package/src/agents.ts +4 -2
- package/src/artifacts.ts +323 -28
- package/src/cli.ts +97 -6
- package/src/init-tui.ts +30 -1
- package/src/init.ts +11 -4
- package/src/normalize.ts +55 -7
- package/src/providers/openai-provider.ts +2 -1
- package/src/settings.ts +3 -2
- package/src/templates.ts +2 -0
- package/src/utils.ts +14 -0
- package/src/validator.ts +0 -4
- package/src/workflow-commands.ts +2 -1
- package/templates/commands/prodo-fix.md +46 -0
- package/templates/commands/prodo-normalize.md +118 -23
- package/templates/commands/prodo-prd.md +138 -17
- package/templates/commands/prodo-stories.md +153 -17
- package/templates/commands/prodo-techspec.md +167 -17
- package/templates/commands/prodo-validate.md +184 -26
- package/templates/commands/prodo-wireframe.md +188 -17
- package/templates/commands/prodo-workflow.md +200 -17
package/dist/init.js
CHANGED
|
@@ -15,6 +15,7 @@ const paths_1 = require("./paths");
|
|
|
15
15
|
const preset_loader_1 = require("./preset-loader");
|
|
16
16
|
const registry_1 = require("./registry");
|
|
17
17
|
const settings_1 = require("./settings");
|
|
18
|
+
const template_resolver_1 = require("./template-resolver");
|
|
18
19
|
const workflow_commands_1 = require("./workflow-commands");
|
|
19
20
|
const templates_1 = require("./templates");
|
|
20
21
|
function templateFileName(artifactType) {
|
|
@@ -272,12 +273,16 @@ async function runInit(cwd, options) {
|
|
|
272
273
|
await writeFileIfMissing(node_path_1.default.join(root, "hooks.yml"), templates_1.HOOKS_TEMPLATE);
|
|
273
274
|
await writeFileIfMissing(node_path_1.default.join(root, "prompts", "normalize.md"), `${templates_1.NORMALIZE_PROMPT_TEMPLATE}\n`);
|
|
274
275
|
const scriptType = options?.script ?? (process.platform === "win32" ? "ps" : "sh");
|
|
275
|
-
await promises_1.default.writeFile(node_path_1.default.join(root, "init-options.json"), `${JSON.stringify({ ai: options?.ai ?? null, lang: options?.lang ?? "en", preset: options?.preset ?? null, script: scriptType }, null, 2)}\n`, "utf8");
|
|
276
|
+
await promises_1.default.writeFile(node_path_1.default.join(root, "init-options.json"), `${JSON.stringify({ ai: options?.ai ?? null, lang: options?.lang ?? "en", author: options?.author ?? null, preset: options?.preset ?? null, script: scriptType }, null, 2)}\n`, "utf8");
|
|
276
277
|
await copyDirIfMissing(node_path_1.default.join(projectScaffoldTemplates, "artifacts"), node_path_1.default.join(root, "templates"), copiedAssets);
|
|
277
278
|
for (const artifact of artifactDefs) {
|
|
279
|
+
const markdownTemplatePath = node_path_1.default.join(root, "templates", `${artifact.name}.md`);
|
|
280
|
+
const templateHeadings = (await (0, utils_1.fileExists)(markdownTemplatePath))
|
|
281
|
+
? (0, template_resolver_1.extractRequiredHeadingsFromTemplate)(await promises_1.default.readFile(markdownTemplatePath, "utf8"))
|
|
282
|
+
: [];
|
|
278
283
|
const schema = {
|
|
279
284
|
...(0, templates_1.schemaTemplate)(artifact.name),
|
|
280
|
-
x_required_headings: artifact.required_headings
|
|
285
|
+
x_required_headings: templateHeadings.length > 0 ? templateHeadings : artifact.required_headings
|
|
281
286
|
};
|
|
282
287
|
await writeFileIfMissing(node_path_1.default.join(root, "schemas", `${artifact.name}.yaml`), js_yaml_1.default.dump(schema));
|
|
283
288
|
await writeFileIfMissing(node_path_1.default.join(root, "prompts", `${artifact.name}.md`), `${(0, templates_1.promptTemplate)(artifact.name, options?.lang ?? "en")}\n`);
|
|
@@ -322,7 +327,8 @@ async function runInit(cwd, options) {
|
|
|
322
327
|
await (0, registry_1.syncRegistry)(cwd);
|
|
323
328
|
const settingsPath = await (0, settings_1.writeSettings)(cwd, {
|
|
324
329
|
lang: (options?.lang ?? "en").trim() || "en",
|
|
325
|
-
ai: options?.ai
|
|
330
|
+
ai: options?.ai,
|
|
331
|
+
author: (options?.author ?? "").trim() || undefined
|
|
326
332
|
});
|
|
327
333
|
return { installedAgentFiles, settingsPath };
|
|
328
334
|
}
|
package/dist/normalize.js
CHANGED
|
@@ -12,6 +12,53 @@ const paths_1 = require("./paths");
|
|
|
12
12
|
const providers_1 = require("./providers");
|
|
13
13
|
const settings_1 = require("./settings");
|
|
14
14
|
const utils_1 = require("./utils");
|
|
15
|
+
function normalizedKey(value) {
|
|
16
|
+
return value
|
|
17
|
+
.normalize("NFD")
|
|
18
|
+
.replace(/[\u0300-\u036f]/g, "")
|
|
19
|
+
.replace(/ı/g, "i")
|
|
20
|
+
.replace(/İ/g, "I")
|
|
21
|
+
.toLowerCase()
|
|
22
|
+
.replace(/[^a-z0-9]+/g, " ")
|
|
23
|
+
.trim();
|
|
24
|
+
}
|
|
25
|
+
function extractBriefProductName(rawBrief) {
|
|
26
|
+
const lines = rawBrief.split(/\r?\n/);
|
|
27
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
28
|
+
const headingMatch = lines[index].match(/^\s*#{1,6}\s+(.+?)\s*$/);
|
|
29
|
+
if (!headingMatch)
|
|
30
|
+
continue;
|
|
31
|
+
const headingKey = normalizedKey(headingMatch[1]);
|
|
32
|
+
const isProductHeading = headingKey === "product name" ||
|
|
33
|
+
headingKey === "project name" ||
|
|
34
|
+
headingKey === "urun adi" ||
|
|
35
|
+
headingKey === "urun ismi";
|
|
36
|
+
if (!isProductHeading)
|
|
37
|
+
continue;
|
|
38
|
+
for (let cursor = index + 1; cursor < lines.length; cursor += 1) {
|
|
39
|
+
const rawLine = lines[cursor].trim();
|
|
40
|
+
if (!rawLine)
|
|
41
|
+
continue;
|
|
42
|
+
if (/^\s*#{1,6}\s+/.test(rawLine))
|
|
43
|
+
break;
|
|
44
|
+
const cleaned = rawLine.replace(/^\s*[-*]\s*/, "").trim();
|
|
45
|
+
if (cleaned.length > 0)
|
|
46
|
+
return cleaned;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
function preserveOriginalProductName(parsed, rawBrief) {
|
|
52
|
+
const briefProductName = extractBriefProductName(rawBrief);
|
|
53
|
+
if (!briefProductName)
|
|
54
|
+
return parsed;
|
|
55
|
+
const generated = typeof parsed.product_name === "string" ? parsed.product_name : "";
|
|
56
|
+
if (!generated.trim())
|
|
57
|
+
return { ...parsed, product_name: briefProductName };
|
|
58
|
+
if (normalizedKey(generated) !== normalizedKey(briefProductName))
|
|
59
|
+
return parsed;
|
|
60
|
+
return { ...parsed, product_name: briefProductName };
|
|
61
|
+
}
|
|
15
62
|
function extractJsonObject(raw) {
|
|
16
63
|
const trimmed = raw.trim();
|
|
17
64
|
const fenced = trimmed.match(/```(?:json)?\s*([\s\S]*?)```/i);
|
|
@@ -48,16 +95,17 @@ async function runNormalize(options) {
|
|
|
48
95
|
requiredContracts: []
|
|
49
96
|
});
|
|
50
97
|
const parsed = extractJsonObject(generated.body);
|
|
98
|
+
const preserved = preserveOriginalProductName(parsed, rawBrief);
|
|
51
99
|
const withContracts = {
|
|
52
|
-
...
|
|
53
|
-
contracts:
|
|
100
|
+
...preserved,
|
|
101
|
+
contracts: preserved.contracts ??
|
|
54
102
|
(0, normalized_brief_1.buildContractsFromArrays)({
|
|
55
|
-
goals: Array.isArray(
|
|
56
|
-
core_features: Array.isArray(
|
|
57
|
-
?
|
|
103
|
+
goals: Array.isArray(preserved.goals) ? preserved.goals.filter((x) => typeof x === "string") : [],
|
|
104
|
+
core_features: Array.isArray(preserved.core_features)
|
|
105
|
+
? preserved.core_features.filter((x) => typeof x === "string")
|
|
58
106
|
: [],
|
|
59
|
-
constraints: Array.isArray(
|
|
60
|
-
?
|
|
107
|
+
constraints: Array.isArray(preserved.constraints)
|
|
108
|
+
? preserved.constraints.filter((x) => typeof x === "string")
|
|
61
109
|
: []
|
|
62
110
|
})
|
|
63
111
|
};
|
|
@@ -22,7 +22,8 @@ class OpenAIProvider {
|
|
|
22
22
|
const mode = schemaHint.artifactType;
|
|
23
23
|
const system = mode === "normalize"
|
|
24
24
|
? `You normalize messy human product briefs into strict JSON.
|
|
25
|
-
Return valid JSON only, no markdown. Include confidence scores (0..1) for critical fields
|
|
25
|
+
Return valid JSON only, no markdown. Include confidence scores (0..1) for critical fields.
|
|
26
|
+
Preserve source language and Unicode characters exactly; never transliterate Turkish letters to ASCII.`
|
|
26
27
|
: mode === "semantic_consistency"
|
|
27
28
|
? `You detect semantic inconsistencies between paired artifacts.
|
|
28
29
|
Return valid JSON only: { "issues": [{level, code, check, contract_id, file, message, suggestion}] }.`
|
package/dist/settings.d.ts
CHANGED
package/dist/settings.js
CHANGED
|
@@ -20,7 +20,8 @@ async function readSettings(cwd) {
|
|
|
20
20
|
const parsed = JSON.parse(raw);
|
|
21
21
|
return {
|
|
22
22
|
lang: typeof parsed.lang === "string" && parsed.lang.trim() ? parsed.lang.trim() : "en",
|
|
23
|
-
ai: typeof parsed.ai === "string" && parsed.ai.trim() ? parsed.ai.trim() : undefined
|
|
23
|
+
ai: typeof parsed.ai === "string" && parsed.ai.trim() ? parsed.ai.trim() : undefined,
|
|
24
|
+
author: typeof parsed.author === "string" && parsed.author.trim() ? parsed.author.trim() : undefined
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
27
|
catch {
|
package/dist/templates.d.ts
CHANGED
|
@@ -28,6 +28,6 @@ export declare const NORMALIZED_BRIEF_TEMPLATE: {
|
|
|
28
28
|
}[];
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
export declare const NORMALIZE_PROMPT_TEMPLATE = "Normalize start-brief content into JSON.\n\nReturn JSON object with keys:\n- schema_version (string)\n- product_name (string)\n- problem (string)\n- audience (string[])\n- goals (string[])\n- core_features (string[])\n- constraints (string[])\n- assumptions (string[])\n- contracts.goals[] ({id,text})\n- contracts.core_features[] ({id,text})\n- contracts.constraints[] ({id,text})\n- confidence.product_name (0..1)\n- confidence.problem (0..1)\n- confidence.audience (0..1)\n- confidence.goals (0..1)\n- confidence.core_features (0..1)\n\nRules:\n- do NOT invent missing critical content\n- keep wording concise and concrete\n- if critical field is missing, return empty and low confidence (<0.7)\n- assign deterministic IDs: goals => G1..Gn, features => F1..Fn, constraints => C1..Cn\n- input files are read-only; never modify, summarize, or rewrite `brief.md` in-place\n- write normalized output as a new JSON object only";
|
|
31
|
+
export declare const NORMALIZE_PROMPT_TEMPLATE = "Normalize start-brief content into JSON.\n\nReturn JSON object with keys:\n- schema_version (string)\n- product_name (string)\n- problem (string)\n- audience (string[])\n- goals (string[])\n- core_features (string[])\n- constraints (string[])\n- assumptions (string[])\n- contracts.goals[] ({id,text})\n- contracts.core_features[] ({id,text})\n- contracts.constraints[] ({id,text})\n- confidence.product_name (0..1)\n- confidence.problem (0..1)\n- confidence.audience (0..1)\n- confidence.goals (0..1)\n- confidence.core_features (0..1)\n\nRules:\n- do NOT invent missing critical content\n- keep wording concise and concrete\n- preserve original language and Unicode characters exactly from brief\n- never transliterate Turkish letters (\u00E7, \u011F, \u0131, \u0130, \u00F6, \u015F, \u00FC) into ASCII\n- if critical field is missing, return empty and low confidence (<0.7)\n- assign deterministic IDs: goals => G1..Gn, features => F1..Fn, constraints => C1..Cn\n- input files are read-only; never modify, summarize, or rewrite `brief.md` in-place\n- write normalized output as a new JSON object only";
|
|
32
32
|
export declare function commandTemplate(command: WorkflowCommand): string;
|
|
33
33
|
export declare const HOOKS_TEMPLATE = "# Hook item fields:\n# - command: string (required)\n# - optional: boolean (default false)\n# - enabled: boolean (default true)\n# - condition: shell command; run hook only if condition exits 0\n# - timeout_ms: per-attempt timeout in milliseconds (default 30000)\n# - retry: extra retry count after first attempt (default 0)\n# - retry_delay_ms: delay between retries (default 500)\n#\n# Example:\n# hooks:\n# before_prd:\n# - command: \"node -e \\\"console.log('lint ok')\\\"\"\n# optional: false\n# enabled: true\n# condition: \"node -e \\\"process.exit(0)\\\"\"\n# timeout_ms: 15000\n# retry: 1\n# retry_delay_ms: 300\n\nhooks:\n before_normalize: []\n after_normalize: []\n before_prd: []\n after_prd: []\n before_workflow: []\n after_workflow: []\n before_wireframe: []\n after_wireframe: []\n before_stories: []\n after_stories: []\n before_techspec: []\n after_techspec: []\n before_validate: []\n after_validate: []\n";
|
package/dist/templates.js
CHANGED
|
@@ -338,6 +338,8 @@ Return JSON object with keys:
|
|
|
338
338
|
Rules:
|
|
339
339
|
- do NOT invent missing critical content
|
|
340
340
|
- keep wording concise and concrete
|
|
341
|
+
- preserve original language and Unicode characters exactly from brief
|
|
342
|
+
- never transliterate Turkish letters (ç, ğ, ı, İ, ö, ş, ü) into ASCII
|
|
341
343
|
- if critical field is missing, return empty and low confidence (<0.7)
|
|
342
344
|
- assign deterministic IDs: goals => G1..Gn, features => F1..Fn, constraints => C1..Cn
|
|
343
345
|
- input files are read-only; never modify, summarize, or rewrite \`brief.md\` in-place
|
package/dist/utils.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export declare function ensureDir(dirPath: string): Promise<void>;
|
|
|
2
2
|
export declare function fileExists(filePath: string): Promise<boolean>;
|
|
3
3
|
export declare function readJsonFile<T>(filePath: string): Promise<T>;
|
|
4
4
|
export declare function timestampSlug(date?: Date): string;
|
|
5
|
+
export declare function artifactFileStamp(date?: Date): string;
|
|
5
6
|
export declare function listFilesSortedByMtime(dirPath: string): Promise<string[]>;
|
|
6
7
|
export declare function isPathInside(parentDir: string, candidatePath: string): boolean;
|
package/dist/utils.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.ensureDir = ensureDir;
|
|
|
7
7
|
exports.fileExists = fileExists;
|
|
8
8
|
exports.readJsonFile = readJsonFile;
|
|
9
9
|
exports.timestampSlug = timestampSlug;
|
|
10
|
+
exports.artifactFileStamp = artifactFileStamp;
|
|
10
11
|
exports.listFilesSortedByMtime = listFilesSortedByMtime;
|
|
11
12
|
exports.isPathInside = isPathInside;
|
|
12
13
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
@@ -30,6 +31,18 @@ async function readJsonFile(filePath) {
|
|
|
30
31
|
function timestampSlug(date = new Date()) {
|
|
31
32
|
return date.toISOString().replace(/[:.]/g, "-");
|
|
32
33
|
}
|
|
34
|
+
function pad2(value) {
|
|
35
|
+
return String(value).padStart(2, "0");
|
|
36
|
+
}
|
|
37
|
+
function artifactFileStamp(date = new Date()) {
|
|
38
|
+
const year = date.getFullYear();
|
|
39
|
+
const month = pad2(date.getMonth() + 1);
|
|
40
|
+
const day = pad2(date.getDate());
|
|
41
|
+
const hour = pad2(date.getHours());
|
|
42
|
+
const minute = pad2(date.getMinutes());
|
|
43
|
+
const second = pad2(date.getSeconds());
|
|
44
|
+
return `${year}${month}${day}-${hour}${minute}${second}`;
|
|
45
|
+
}
|
|
33
46
|
async function listFilesSortedByMtime(dirPath) {
|
|
34
47
|
const exists = await fileExists(dirPath);
|
|
35
48
|
if (!exists)
|
package/dist/validator.js
CHANGED
|
@@ -45,10 +45,6 @@ async function validateSchema(cwd, artifactType, doc, requiredHeadingsOverride)
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
const sections = (0, markdown_1.sectionTextMap)(doc.body);
|
|
48
|
-
const trMode = String(doc.frontmatter.language ?? "").toLowerCase().startsWith("tr");
|
|
49
|
-
if (trMode) {
|
|
50
|
-
return { issues, requiredHeadings: [] };
|
|
51
|
-
}
|
|
52
48
|
for (const heading of requiredHeadings) {
|
|
53
49
|
if (!doc.body.includes(heading)) {
|
|
54
50
|
issues.push({
|
|
@@ -9,7 +9,8 @@ const BASE_WORKFLOW_COMMANDS = [
|
|
|
9
9
|
{ name: "prodo-wireframe", cliSubcommand: "wireframe", description: "Generate wireframe artifact." },
|
|
10
10
|
{ name: "prodo-stories", cliSubcommand: "stories", description: "Generate stories artifact." },
|
|
11
11
|
{ name: "prodo-techspec", cliSubcommand: "techspec", description: "Generate technical specification artifact." },
|
|
12
|
-
{ name: "prodo-validate", cliSubcommand: "validate", description: "Run schema and cross-artifact consistency validation." }
|
|
12
|
+
{ name: "prodo-validate", cliSubcommand: "validate", description: "Run schema and cross-artifact consistency validation." },
|
|
13
|
+
{ name: "prodo-fix", cliSubcommand: "fix", description: "Auto-fix artifacts based on validation report and brief." }
|
|
13
14
|
];
|
|
14
15
|
exports.WORKFLOW_COMMANDS = BASE_WORKFLOW_COMMANDS;
|
|
15
16
|
function buildWorkflowCommands(artifactTypes) {
|
package/package.json
CHANGED
|
@@ -1 +1,48 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "fintech",
|
|
3
|
+
"display_name": "Financial Technology (FinTech)",
|
|
4
|
+
"description": "Comprehensive preset for fintech and financial services products with regulatory compliance, security, and transaction-focused features",
|
|
5
|
+
"category": "domain-specific",
|
|
6
|
+
"priority": 1,
|
|
7
|
+
"min_prodo_version": "0.1.0",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"domain": "Financial Technology",
|
|
11
|
+
"industry_focus": ["Banking", "Payment Processing", "Investment Management", "Lending", "Crypto/Blockchain"],
|
|
12
|
+
"compliance_required": ["KYC/AML", "PCI DSS", "SOC 2", "GDPR", "Regulatory Standards"],
|
|
13
|
+
"security_level": "critical",
|
|
14
|
+
"data_sensitivity": "highly-sensitive"
|
|
15
|
+
},
|
|
16
|
+
"preset_features": {
|
|
17
|
+
"domain_expertise": [
|
|
18
|
+
"Regulatory compliance (KYC, AML, SCA)",
|
|
19
|
+
"Security & encryption standards",
|
|
20
|
+
"Payment gateway integration",
|
|
21
|
+
"Transaction management & reconciliation",
|
|
22
|
+
"Risk management & fraud detection",
|
|
23
|
+
"Audit trails & compliance reporting"
|
|
24
|
+
],
|
|
25
|
+
"templates_included": ["prd"],
|
|
26
|
+
"context_enrichment": {
|
|
27
|
+
"user_personas": ["Compliance Officer", "Risk Manager", "Treasury Manager", "Customer Service", "Auditor"],
|
|
28
|
+
"success_metrics": ["Compliance rate", "Transaction volume", "Fraud detection rate", "Settlement time", "System uptime"],
|
|
29
|
+
"constraints": ["Regulatory deadlines", "Security mandates", "Data residency", "Transaction limits", "Audit requirements"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"agent_requirements": {
|
|
33
|
+
"required_expertise": [
|
|
34
|
+
"Financial services domain knowledge",
|
|
35
|
+
"Regulatory compliance understanding",
|
|
36
|
+
"Security-first mindset",
|
|
37
|
+
"Risk assessment capability"
|
|
38
|
+
],
|
|
39
|
+
"recommended_agents": ["Product Manager (Finance)", "Compliance Specialist", "Security Architect"],
|
|
40
|
+
"critical_validation": ["Compliance checklist", "Security review", "Risk assessment"]
|
|
41
|
+
},
|
|
42
|
+
"prompt_configuration": {
|
|
43
|
+
"tone": "Professional, compliance-focused, security-conscious",
|
|
44
|
+
"terminology_style": "industry-standard (fintech, KYC, AML, SCA, PCI DSS)",
|
|
45
|
+
"risk_tolerance": "zero-tolerance for security/compliance violations",
|
|
46
|
+
"documentation_level": "comprehensive (audit trail required)"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -1,3 +1,100 @@
|
|
|
1
|
-
Preset
|
|
1
|
+
# Fintech Preset - PRD Generation Context
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Preset Overview
|
|
4
|
+
**Domain**: Financial Technology (FinTech)
|
|
5
|
+
**Focus**: Regulatory compliance, security, transaction integrity, fraud prevention
|
|
6
|
+
**Target Industries**: Banking, Payment Processing, Investment Management, Lending, Blockchain
|
|
7
|
+
|
|
8
|
+
## Critical Requirements for FinTech Products
|
|
9
|
+
|
|
10
|
+
### 1. Regulatory Compliance
|
|
11
|
+
- **KYC/AML**: Know Your Customer, Anti-Money Laundering regulations
|
|
12
|
+
- **PCI DSS**: Payment Card Industry Data Security Standard (Level 1-4)
|
|
13
|
+
- **SOC 2**: System and Organization Controls compliance
|
|
14
|
+
- **GDPR/Regional**: Data privacy and regional financial regulations
|
|
15
|
+
- **Audit Trail**: Complete transaction and action audit logs required
|
|
16
|
+
|
|
17
|
+
### 2. Security Requirements
|
|
18
|
+
- **Encryption**: End-to-end encryption for sensitive data (at-rest & in-transit)
|
|
19
|
+
- **Authentication**: Multi-factor authentication (MFA) mandatory
|
|
20
|
+
- **Authorization**: Role-based access control (RBAC) with least privilege
|
|
21
|
+
- **Fraud Detection**: Real-time anomaly detection and transaction monitoring
|
|
22
|
+
- **Penetration Testing**: Regular security audits and penetration tests
|
|
23
|
+
|
|
24
|
+
### 3. Transaction Management
|
|
25
|
+
- **Settlement**: Fast settlement with reconciliation (T+0, T+1, etc.)
|
|
26
|
+
- **Atomicity**: All-or-nothing transaction guarantees
|
|
27
|
+
- **Idempotency**: Prevent duplicate transactions
|
|
28
|
+
- **Error Handling**: Graceful failures with clear audit trails
|
|
29
|
+
- **Dispute Resolution**: Clear process for chargebacks and disputes
|
|
30
|
+
|
|
31
|
+
### 4. Risk Management
|
|
32
|
+
- **Fraud Detection**: ML-based anomaly detection and rule engines
|
|
33
|
+
- **Risk Assessment**: Transaction risk scoring and limits
|
|
34
|
+
- **Compliance Monitoring**: Continuous regulatory compliance monitoring
|
|
35
|
+
- **Incident Response**: Clear escalation and response procedures
|
|
36
|
+
- **Business Continuity**: Disaster recovery and failover strategies
|
|
37
|
+
|
|
38
|
+
### 5. User Personas (FinTech Specific)
|
|
39
|
+
- **Compliance Officer**: Regulatory requirements, audit trails, risk reporting
|
|
40
|
+
- **Risk Manager**: Fraud patterns, transaction limits, risk scoring
|
|
41
|
+
- **Treasury Manager**: Settlement timing, liquidity management, cash flow
|
|
42
|
+
- **Customer Service**: Transaction history, dispute handling, user support
|
|
43
|
+
- **Auditor**: Complete audit trails, compliance reports, system integrity
|
|
44
|
+
|
|
45
|
+
### 6. Success Metrics (FinTech Specific)
|
|
46
|
+
- **Compliance Rate**: 100% regulatory adherence (zero violations target)
|
|
47
|
+
- **Transaction Volume**: Daily/monthly transaction throughput
|
|
48
|
+
- **Fraud Detection Rate**: % of fraudulent transactions caught pre-settlement
|
|
49
|
+
- **Settlement Speed**: Average time to settlement completion
|
|
50
|
+
- **System Uptime**: 99.99%+ availability (critical infrastructure)
|
|
51
|
+
- **Customer Trust**: Chargeback rate, dispute resolution time
|
|
52
|
+
|
|
53
|
+
### 7. Key Constraints
|
|
54
|
+
- **Regulatory Deadlines**: Compliance cutoffs, reporting deadlines
|
|
55
|
+
- **Data Residency**: Geographic restrictions on data storage
|
|
56
|
+
- **Transaction Limits**: Daily/monthly limits per user/transaction type
|
|
57
|
+
- **Integration Requirements**: Payment gateways, banking APIs, clearing houses
|
|
58
|
+
- **Audit Requirements**: Immutable logs, compliance reports, regulatory filings
|
|
59
|
+
|
|
60
|
+
## PRD Generation Guidelines
|
|
61
|
+
|
|
62
|
+
### Domain-Specific Terminology
|
|
63
|
+
Use fintech-standard terminology:
|
|
64
|
+
- KYC (Know Your Customer) vs. identity verification
|
|
65
|
+
- AML (Anti-Money Laundering) vs. fraud prevention
|
|
66
|
+
- SCA (Strong Customer Authentication) vs. verification
|
|
67
|
+
- PCI DSS (Payment Card Industry Standard) vs. security
|
|
68
|
+
- Settlement vs. transaction completion
|
|
69
|
+
- Reconciliation vs. balance verification
|
|
70
|
+
|
|
71
|
+
### Feature Prioritization
|
|
72
|
+
1. **Compliance first**: All features must meet regulatory requirements
|
|
73
|
+
2. **Security second**: Security cannot be compromised for features
|
|
74
|
+
3. **User experience**: Within compliance and security boundaries
|
|
75
|
+
4. **Performance**: Transaction speed critical for user satisfaction
|
|
76
|
+
|
|
77
|
+
### Risk Assessment
|
|
78
|
+
Flag high-risk features:
|
|
79
|
+
- ⚠️ Features involving cross-border transactions
|
|
80
|
+
- ⚠️ Features with regulatory uncertainty
|
|
81
|
+
- ⚠️ Features with no clear audit trail mechanism
|
|
82
|
+
- ⚠️ Features involving sensitive financial data
|
|
83
|
+
|
|
84
|
+
### Documentation Standards
|
|
85
|
+
- **Compliance Mapping**: Each feature → applicable regulations
|
|
86
|
+
- **Security Justification**: Why security approach chosen
|
|
87
|
+
- **Audit Trail**: How feature activities are logged
|
|
88
|
+
- **Error Scenarios**: Failure modes and recovery
|
|
89
|
+
- **Rollback Strategy**: How to undo transactions if needed
|
|
90
|
+
|
|
91
|
+
## Validation Checklist
|
|
92
|
+
Before finalizing PRD, verify:
|
|
93
|
+
- ✅ All features have compliance mapping
|
|
94
|
+
- ✅ Security requirements explicitly stated
|
|
95
|
+
- ✅ Audit trail mechanisms defined
|
|
96
|
+
- ✅ Risk assessment completed
|
|
97
|
+
- ✅ Regulatory deadlines documented
|
|
98
|
+
- ✅ User personas fintech-specific
|
|
99
|
+
- ✅ Success metrics measurable
|
|
100
|
+
- ✅ Escalation procedures clear
|
|
@@ -1 +1,51 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "marketplace",
|
|
3
|
+
"display_name": "Multi-Sided Marketplace",
|
|
4
|
+
"description": "Comprehensive preset for marketplace platforms with multi-stakeholder support, trust mechanisms, commission systems, and community features",
|
|
5
|
+
"category": "domain-specific",
|
|
6
|
+
"priority": 1,
|
|
7
|
+
"min_prodo_version": "0.1.0",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"domain": "E-Commerce & Marketplace",
|
|
11
|
+
"industry_focus": ["B2C Marketplace", "C2C Marketplace", "Gig Economy", "Subscription Services", "SaaS Marketplace"],
|
|
12
|
+
"marketplace_model": ["commission-based", "subscription-based", "freemium", "hybrid"],
|
|
13
|
+
"key_complexity": "multi-stakeholder coordination",
|
|
14
|
+
"trust_requirement": "critical"
|
|
15
|
+
},
|
|
16
|
+
"preset_features": {
|
|
17
|
+
"domain_expertise": [
|
|
18
|
+
"Multi-stakeholder coordination (buyers, sellers, platform)",
|
|
19
|
+
"Trust & safety mechanisms (verification, reviews, ratings)",
|
|
20
|
+
"Commission & payment systems",
|
|
21
|
+
"Dispute resolution & conflict management",
|
|
22
|
+
"Community moderation & content policies",
|
|
23
|
+
"Recommendation algorithms & discovery",
|
|
24
|
+
"Supply & demand balancing",
|
|
25
|
+
"Seller onboarding & quality assurance"
|
|
26
|
+
],
|
|
27
|
+
"templates_included": ["prd"],
|
|
28
|
+
"context_enrichment": {
|
|
29
|
+
"user_personas": ["Buyer", "Seller", "Platform Operator", "Support Agent", "Community Moderator"],
|
|
30
|
+
"success_metrics": ["Gross merchandise volume (GMV)", "Seller growth rate", "Customer retention", "Review authenticity", "Dispute rate"],
|
|
31
|
+
"constraints": ["Trust & safety standards", "Commission structure", "Seller quality", "Fraud prevention", "Community guidelines"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"agent_requirements": {
|
|
35
|
+
"required_expertise": [
|
|
36
|
+
"Multi-sided marketplace dynamics",
|
|
37
|
+
"Trust and safety framework design",
|
|
38
|
+
"Seller quality management",
|
|
39
|
+
"Community management",
|
|
40
|
+
"Conflict resolution strategies"
|
|
41
|
+
],
|
|
42
|
+
"recommended_agents": ["Platform PM", "Trust & Safety Lead", "Seller Success Manager", "Community Manager"],
|
|
43
|
+
"critical_validation": ["Trust scoring mechanism", "Dispute resolution process", "Seller quality criteria"]
|
|
44
|
+
},
|
|
45
|
+
"prompt_configuration": {
|
|
46
|
+
"tone": "Community-focused, trust-centered, multi-perspective",
|
|
47
|
+
"stakeholder_focus": ["buyer-experience", "seller-success", "platform-sustainability"],
|
|
48
|
+
"conflict_resolution": "fair-for-all-parties",
|
|
49
|
+
"documentation_level": "detailed (policies and procedures required)"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,3 +1,141 @@
|
|
|
1
|
-
Preset
|
|
1
|
+
# Marketplace Preset - PRD Generation Context
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Preset Overview
|
|
4
|
+
**Domain**: Multi-Sided Marketplace
|
|
5
|
+
**Focus**: Trust & safety, multi-stakeholder coordination, sustainable growth, community health
|
|
6
|
+
**Target Models**: B2C, C2C, Gig Economy, Subscription, SaaS Marketplaces
|
|
7
|
+
|
|
8
|
+
## Critical Requirements for Marketplace Products
|
|
9
|
+
|
|
10
|
+
### 1. Multi-Stakeholder Coordination
|
|
11
|
+
- **Buyers**: Search, discovery, purchasing, reviews, ratings
|
|
12
|
+
- **Sellers**: Listing creation, inventory management, order fulfillment
|
|
13
|
+
- **Platform**: Commission structure, dispute resolution, policy enforcement
|
|
14
|
+
- **Moderators**: Content review, policy compliance, community health
|
|
15
|
+
- **Support**: Buyer/seller support, dispute handling, escalations
|
|
16
|
+
|
|
17
|
+
### 2. Trust & Safety Mechanisms
|
|
18
|
+
- **Identity Verification**: Seller verification, buyer profiles, trust scoring
|
|
19
|
+
- **Review System**: Authentic reviews, review moderation, rating accuracy
|
|
20
|
+
- **Dispute Resolution**: Clear process, fair arbitration, appeal mechanisms
|
|
21
|
+
- **Fraud Prevention**: Transaction monitoring, chargeback protection, seller vetting
|
|
22
|
+
- **Community Standards**: Content policies, community guidelines, enforcement
|
|
23
|
+
|
|
24
|
+
### 3. Commission & Payment Systems
|
|
25
|
+
- **Revenue Model**: Commission % for platform sustainability
|
|
26
|
+
- **Payment Processing**: Buyer payments, seller payouts, tax handling
|
|
27
|
+
- **Pricing Strategy**: Dynamic pricing, surge pricing, discounts
|
|
28
|
+
- **Seller Incentives**: Top performer rewards, quality bonuses
|
|
29
|
+
- **Payout Timing**: Immediate, delayed, or tiered payout options
|
|
30
|
+
|
|
31
|
+
### 4. Seller Quality Assurance
|
|
32
|
+
- **Onboarding**: Seller verification, document collection, quality baseline
|
|
33
|
+
- **Performance Metrics**: Response rate, cancellation rate, rating average
|
|
34
|
+
- **Quality Enforcement**: Warnings, suspensions, bans for policy violations
|
|
35
|
+
- **Support**: Seller success resources, training, API documentation
|
|
36
|
+
- **Tiering**: Seller levels (new, standard, gold, platinum) with benefits
|
|
37
|
+
|
|
38
|
+
### 5. Discovery & Matching
|
|
39
|
+
- **Search**: Full-text search, filters, sorting
|
|
40
|
+
- **Recommendations**: ML-based recommendations, personalization
|
|
41
|
+
- **Trending**: What's hot, seasonal items, category trending
|
|
42
|
+
- **Supply/Demand**: Balancing supply scarcity with buyer demand
|
|
43
|
+
- **Ranking Algorithm**: Fair ranking, preventing gaming, transparency
|
|
44
|
+
|
|
45
|
+
### 6. Community Moderation
|
|
46
|
+
- **Content Review**: Image verification, description moderation
|
|
47
|
+
- **Review Management**: Review authenticity, spam detection, manipulation prevention
|
|
48
|
+
- **User Behavior**: Community standards, suspension/ban procedures
|
|
49
|
+
- **Appeal Process**: Fair appeals, transparency, communication
|
|
50
|
+
- **Transparency**: Clear policies, community guidelines, moderation appeals
|
|
51
|
+
|
|
52
|
+
### 7. User Personas (Marketplace Specific)
|
|
53
|
+
|
|
54
|
+
#### Buyer Persona
|
|
55
|
+
- Goals: Find best products, competitive prices, fast delivery
|
|
56
|
+
- Pain Points: Counterfeit items, long delivery, poor service
|
|
57
|
+
- Concerns: Trust in seller, payment security, return policies
|
|
58
|
+
|
|
59
|
+
#### Seller Persona
|
|
60
|
+
- Goals: Reach customers, maximize revenue, sustainable growth
|
|
61
|
+
- Pain Points: Finding customers, competition, payment processing
|
|
62
|
+
- Concerns: Commission rates, policy changes, fair treatment
|
|
63
|
+
|
|
64
|
+
#### Platform Operator
|
|
65
|
+
- Goals: Sustainable growth, healthy marketplace, stakeholder satisfaction
|
|
66
|
+
- Pain Points: Balancing buyer/seller interests, fraud, legal compliance
|
|
67
|
+
- Concerns: GMV growth, trust metrics, user satisfaction
|
|
68
|
+
|
|
69
|
+
#### Support Agent
|
|
70
|
+
- Goals: Resolve disputes fairly, maintain trust, reduce escalations
|
|
71
|
+
- Pain Points: Complex disputes, policy ambiguity, seller/buyer conflicts
|
|
72
|
+
- Concerns: Fair resolution, quick closure, customer satisfaction
|
|
73
|
+
|
|
74
|
+
#### Community Moderator
|
|
75
|
+
- Goals: Maintain community standards, prevent abuse, engage users
|
|
76
|
+
- Pain Points: Volume of content, policy interpretation, false positives
|
|
77
|
+
- Concerns: Bias, false negatives, user resentment
|
|
78
|
+
|
|
79
|
+
### 8. Success Metrics (Marketplace Specific)
|
|
80
|
+
- **Gross Merchandise Volume (GMV)**: Total transaction value
|
|
81
|
+
- **Seller Growth**: New sellers, active sellers, seller satisfaction
|
|
82
|
+
- **Customer Retention**: Repeat purchase rate, churn rate
|
|
83
|
+
- **Review Authenticity**: % of authentic reviews (fraud detection rate)
|
|
84
|
+
- **Dispute Rate**: Disputes as % of transactions (lower is better)
|
|
85
|
+
- **Trust Score**: Buyer trust in platform, Net Promoter Score (NPS)
|
|
86
|
+
- **Seller Health**: Average seller rating, suspension rate, appeal rate
|
|
87
|
+
- **Community Health**: Content removal rate, user suspension rate, community satisfaction
|
|
88
|
+
|
|
89
|
+
### 9. Key Constraints
|
|
90
|
+
- **Commission Structure**: Sustainable for platform, fair to sellers
|
|
91
|
+
- **Payout Timing**: Fast enough for seller satisfaction, safe for platform
|
|
92
|
+
- **Dispute Deadlines**: Quick resolution, legal time requirements
|
|
93
|
+
- **Content Policies**: Clear standards, consistent enforcement
|
|
94
|
+
- **Data Privacy**: PII protection, transaction privacy, seller anonymity options
|
|
95
|
+
- **Regulatory**: Tax collection, consumer protection, local regulations
|
|
96
|
+
|
|
97
|
+
## PRD Generation Guidelines
|
|
98
|
+
|
|
99
|
+
### Multi-Stakeholder Perspective
|
|
100
|
+
Always consider impact on:
|
|
101
|
+
- ✅ Buyers: Is this feature valuable and trustworthy?
|
|
102
|
+
- ✅ Sellers: Is this feature fair and sustainable?
|
|
103
|
+
- ✅ Platform: Does this drive growth and profitability?
|
|
104
|
+
- ✅ Community: Does this maintain or improve community health?
|
|
105
|
+
|
|
106
|
+
### Trust-First Approach
|
|
107
|
+
- Every feature must enhance or maintain trust
|
|
108
|
+
- Transparency over features
|
|
109
|
+
- Fair treatment over growth hacks
|
|
110
|
+
- Community health over short-term metrics
|
|
111
|
+
|
|
112
|
+
### Commission & Pricing
|
|
113
|
+
- Make commission % explicit in documentation
|
|
114
|
+
- Justify pricing to both buyers and sellers
|
|
115
|
+
- Show how platform uses commissions
|
|
116
|
+
- Consider seller profitability models
|
|
117
|
+
|
|
118
|
+
### Dispute Resolution
|
|
119
|
+
- Clear escalation paths
|
|
120
|
+
- Fair arbitration criteria
|
|
121
|
+
- Appeal mechanisms
|
|
122
|
+
- Transparent timeline
|
|
123
|
+
|
|
124
|
+
### Seller Success
|
|
125
|
+
- Onboarding clear and supportive
|
|
126
|
+
- Performance metrics transparent
|
|
127
|
+
- Success resources available
|
|
128
|
+
- Fair quality enforcement
|
|
129
|
+
|
|
130
|
+
## Validation Checklist
|
|
131
|
+
Before finalizing PRD, verify:
|
|
132
|
+
- ✅ All stakeholders considered (buyer, seller, platform, moderator, support)
|
|
133
|
+
- ✅ Trust mechanisms clearly defined
|
|
134
|
+
- ✅ Commission structure documented
|
|
135
|
+
- ✅ Dispute resolution process outlined
|
|
136
|
+
- ✅ Seller quality criteria explicit
|
|
137
|
+
- ✅ Community guidelines clear
|
|
138
|
+
- ✅ Payment flow documented (buyer → platform → seller)
|
|
139
|
+
- ✅ Moderation policies defined
|
|
140
|
+
- ✅ Fairness across stakeholders assessed
|
|
141
|
+
- ✅ Scalability for growth considered
|
package/presets/saas/preset.json
CHANGED
|
@@ -1 +1,53 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "saas",
|
|
3
|
+
"display_name": "Software as a Service (SaaS)",
|
|
4
|
+
"description": "Comprehensive preset for SaaS products with subscription models, enterprise integration, scalability, customer success focus, and API-first architecture",
|
|
5
|
+
"category": "domain-specific",
|
|
6
|
+
"priority": 1,
|
|
7
|
+
"min_prodo_version": "0.1.0",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"domain": "Software as a Service",
|
|
11
|
+
"industry_focus": ["Enterprise Software", "Business Tools", "Workflow Automation", "Analytics", "Vertical SaaS"],
|
|
12
|
+
"business_model": ["subscription", "per-seat", "usage-based", "hybrid"],
|
|
13
|
+
"deployment_model": ["multi-tenant", "single-tenant", "hybrid"],
|
|
14
|
+
"key_complexity": "enterprise scale, integration requirements, customer success"
|
|
15
|
+
},
|
|
16
|
+
"preset_features": {
|
|
17
|
+
"domain_expertise": [
|
|
18
|
+
"Subscription billing & recurring revenue",
|
|
19
|
+
"Enterprise integration (SSO, SAML, APIs)",
|
|
20
|
+
"Customer success & retention strategies",
|
|
21
|
+
"Scalability & multi-tenancy",
|
|
22
|
+
"API design & developer experience",
|
|
23
|
+
"Compliance & data governance (SOC 2, HIPAA, GDPR)",
|
|
24
|
+
"Usage analytics & metering",
|
|
25
|
+
"Self-serve onboarding & product-led growth"
|
|
26
|
+
],
|
|
27
|
+
"templates_included": ["prd"],
|
|
28
|
+
"context_enrichment": {
|
|
29
|
+
"user_personas": ["End User", "Admin/IT", "Finance Lead", "Customer Success Manager", "Developer"],
|
|
30
|
+
"success_metrics": ["Monthly Recurring Revenue (MRR)", "Customer Acquisition Cost (CAC)", "Lifetime Value (LTV)", "Churn rate", "NPS"],
|
|
31
|
+
"constraints": ["Uptime SLA", "Integration requirements", "Compliance standards", "Data residency", "Support tiers"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"agent_requirements": {
|
|
35
|
+
"required_expertise": [
|
|
36
|
+
"SaaS business model understanding",
|
|
37
|
+
"Enterprise customer needs",
|
|
38
|
+
"Subscription economics",
|
|
39
|
+
"Integration architecture",
|
|
40
|
+
"Customer success strategies",
|
|
41
|
+
"Scalability planning"
|
|
42
|
+
],
|
|
43
|
+
"recommended_agents": ["SaaS PM", "Enterprise Architect", "Customer Success Lead", "DevOps/Infrastructure Lead"],
|
|
44
|
+
"critical_validation": ["Pricing model", "Uptime SLA", "Integration roadmap", "Churn prevention strategy"]
|
|
45
|
+
},
|
|
46
|
+
"prompt_configuration": {
|
|
47
|
+
"tone": "Professional, enterprise-focused, customer-success-oriented",
|
|
48
|
+
"pricing_strategy": "transparent-value-based",
|
|
49
|
+
"customer_journey": "onboarding → adoption → expansion → retention",
|
|
50
|
+
"integration_first": "API-first, extensibility-critical",
|
|
51
|
+
"documentation_level": "comprehensive (API docs, admin guides, playbooks)"
|
|
52
|
+
}
|
|
53
|
+
}
|