@shahmarasy/prodo 0.1.2 → 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.
Files changed (45) hide show
  1. package/dist/agents.js +4 -2
  2. package/dist/artifacts.d.ts +1 -0
  3. package/dist/artifacts.js +265 -31
  4. package/dist/cli.js +80 -3
  5. package/dist/init-tui.d.ts +3 -0
  6. package/dist/init-tui.js +28 -1
  7. package/dist/init.d.ts +1 -0
  8. package/dist/init.js +9 -3
  9. package/dist/normalize.js +55 -7
  10. package/dist/providers/openai-provider.js +2 -1
  11. package/dist/settings.d.ts +1 -0
  12. package/dist/settings.js +2 -1
  13. package/dist/templates.d.ts +1 -1
  14. package/dist/templates.js +11 -0
  15. package/dist/utils.d.ts +1 -0
  16. package/dist/utils.js +13 -0
  17. package/dist/validator.js +0 -4
  18. package/dist/workflow-commands.js +2 -1
  19. package/package.json +1 -1
  20. package/presets/fintech/preset.json +48 -1
  21. package/presets/fintech/prompts/prd.md +99 -2
  22. package/presets/marketplace/preset.json +51 -1
  23. package/presets/marketplace/prompts/prd.md +140 -2
  24. package/presets/saas/preset.json +53 -1
  25. package/presets/saas/prompts/prd.md +150 -2
  26. package/src/agents.ts +4 -2
  27. package/src/artifacts.ts +323 -28
  28. package/src/cli.ts +97 -6
  29. package/src/init-tui.ts +30 -1
  30. package/src/init.ts +11 -4
  31. package/src/normalize.ts +55 -7
  32. package/src/providers/openai-provider.ts +2 -1
  33. package/src/settings.ts +3 -2
  34. package/src/templates.ts +12 -0
  35. package/src/utils.ts +14 -0
  36. package/src/validator.ts +0 -4
  37. package/src/workflow-commands.ts +2 -1
  38. package/templates/commands/prodo-fix.md +46 -0
  39. package/templates/commands/prodo-normalize.md +116 -14
  40. package/templates/commands/prodo-prd.md +136 -12
  41. package/templates/commands/prodo-stories.md +151 -12
  42. package/templates/commands/prodo-techspec.md +165 -12
  43. package/templates/commands/prodo-validate.md +184 -23
  44. package/templates/commands/prodo-wireframe.md +186 -12
  45. package/templates/commands/prodo-workflow.md +198 -12
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
- ...parsed,
53
- contracts: parsed.contracts ??
100
+ ...preserved,
101
+ contracts: preserved.contracts ??
54
102
  (0, normalized_brief_1.buildContractsFromArrays)({
55
- goals: Array.isArray(parsed.goals) ? parsed.goals.filter((x) => typeof x === "string") : [],
56
- core_features: Array.isArray(parsed.core_features)
57
- ? parsed.core_features.filter((x) => typeof x === "string")
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(parsed.constraints)
60
- ? parsed.constraints.filter((x) => typeof x === "string")
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}] }.`
@@ -1,6 +1,7 @@
1
1
  export type ProdoSettings = {
2
2
  lang: string;
3
3
  ai?: string;
4
+ author?: string;
4
5
  };
5
6
  export declare function readSettings(cwd: string): Promise<ProdoSettings>;
6
7
  export declare function writeSettings(cwd: string, settings: ProdoSettings): Promise<string>;
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 {
@@ -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,11 +338,19 @@ 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
344
346
  - write normalized output as a new JSON object only`;
345
347
  function commandTemplate(command) {
348
+ const normalizeJsonGuard = command.cliSubcommand === "normalize"
349
+ ? `
350
+ - Normalize output format check:
351
+ - \`.prodo/briefs/normalized-brief.json\` must be strict JSON object (no markdown fences).
352
+ - If invalid, rewrite file as pure JSON object only.`
353
+ : "";
346
354
  return `---
347
355
  description: ${command.description}
348
356
  handoffs:
@@ -365,6 +373,8 @@ Execution policy:
365
373
  - Never run \`prodo-${command.cliSubcommand}\`, \`prodo ${command.cliSubcommand}\`, or \`prodo ...\` in shell.
366
374
  - Do not inspect hooks or internals unless command execution fails.
367
375
  - Input files are read-only; never modify or rewrite \`brief.md\`.
376
+ - Never print full artifact content in chat.
377
+ - Write/update files first, then reply with short status + written file path(s).
368
378
 
369
379
  ## Execution
370
380
 
@@ -382,6 +392,7 @@ Execution policy:
382
392
  - Confirm command success state (exit code or validation status).
383
393
  - Confirm \`brief.md\` hash/content did not change.
384
394
  - Do NOT create manual fallback files under \`.prodo/artifact\` or any ad-hoc folder.
395
+ ${normalizeJsonGuard}
385
396
 
386
397
  4. Diagnose only on failure:
387
398
  - Inspect \`.prodo/hooks.yml\` only after execution failure.
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@shahmarasy/prodo",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "CLI-first, prompt-powered product artifact kit",
5
5
  "main": "dist/cli.js",
6
6
  "types": "dist/cli.d.ts",
@@ -1 +1,48 @@
1
- {"name":"fintech","priority":1,"min_prodo_version":"0.1.0","version":"1.0.0"}
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: fintech
1
+ # Fintech Preset - PRD Generation Context
2
2
 
3
- Use domain-specific terminology and constraints for fintech products.
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
- {"name":"marketplace","priority":1,"min_prodo_version":"0.1.0","version":"1.0.0"}
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: marketplace
1
+ # Marketplace Preset - PRD Generation Context
2
2
 
3
- Use domain-specific terminology and constraints for marketplace products.
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