@shahmarasy/prodo 0.1.3 → 0.1.5

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 (205) hide show
  1. package/README.md +201 -97
  2. package/bin/prodo.cjs +6 -6
  3. package/dist/agents/agent-registry.d.ts +13 -0
  4. package/dist/agents/agent-registry.js +79 -0
  5. package/dist/agents/anthropic/index.d.ts +9 -0
  6. package/dist/agents/anthropic/index.js +55 -0
  7. package/dist/agents/base.d.ts +25 -0
  8. package/dist/agents/base.js +71 -0
  9. package/dist/agents/google/index.d.ts +9 -0
  10. package/dist/agents/google/index.js +53 -0
  11. package/dist/agents/mock/index.d.ts +11 -0
  12. package/dist/agents/mock/index.js +26 -0
  13. package/dist/agents/openai/index.d.ts +9 -0
  14. package/dist/agents/openai/index.js +57 -0
  15. package/dist/agents/system-prompts.d.ts +3 -0
  16. package/dist/agents/system-prompts.js +32 -0
  17. package/dist/agents.js +4 -2
  18. package/dist/artifacts.d.ts +1 -0
  19. package/dist/artifacts.js +265 -31
  20. package/dist/cli/agent-command-installer.d.ts +4 -0
  21. package/dist/cli/agent-command-installer.js +148 -0
  22. package/dist/cli/agent-ids.d.ts +15 -0
  23. package/dist/cli/agent-ids.js +49 -0
  24. package/dist/cli/doctor.d.ts +1 -0
  25. package/dist/cli/doctor.js +144 -0
  26. package/dist/cli/fix-tui.d.ts +4 -0
  27. package/dist/cli/fix-tui.js +79 -0
  28. package/dist/cli/index.d.ts +9 -0
  29. package/dist/cli/index.js +465 -0
  30. package/dist/cli/init-tui.d.ts +23 -0
  31. package/dist/cli/init-tui.js +176 -0
  32. package/dist/cli/init.d.ts +11 -0
  33. package/dist/cli/init.js +334 -0
  34. package/dist/cli/normalize-interactive.d.ts +8 -0
  35. package/dist/cli/normalize-interactive.js +167 -0
  36. package/dist/cli/preset-loader.d.ts +4 -0
  37. package/dist/cli/preset-loader.js +210 -0
  38. package/dist/cli.js +80 -3
  39. package/dist/core/artifact-registry.d.ts +11 -0
  40. package/dist/core/artifact-registry.js +49 -0
  41. package/dist/core/artifacts.d.ts +10 -0
  42. package/dist/core/artifacts.js +892 -0
  43. package/dist/core/clean.d.ts +10 -0
  44. package/dist/core/clean.js +74 -0
  45. package/dist/core/consistency.d.ts +8 -0
  46. package/dist/core/consistency.js +328 -0
  47. package/dist/core/constants.d.ts +7 -0
  48. package/dist/core/constants.js +64 -0
  49. package/dist/core/errors.d.ts +3 -0
  50. package/dist/core/errors.js +10 -0
  51. package/dist/core/fix.d.ts +31 -0
  52. package/dist/core/fix.js +188 -0
  53. package/dist/core/hook-executor.d.ts +1 -0
  54. package/dist/core/hook-executor.js +175 -0
  55. package/dist/core/markdown.d.ts +16 -0
  56. package/dist/core/markdown.js +81 -0
  57. package/dist/core/normalize.d.ts +8 -0
  58. package/dist/core/normalize.js +125 -0
  59. package/dist/core/normalized-brief.d.ts +48 -0
  60. package/dist/core/normalized-brief.js +182 -0
  61. package/dist/core/output-index.d.ts +13 -0
  62. package/dist/core/output-index.js +55 -0
  63. package/dist/core/paths.d.ts +17 -0
  64. package/dist/core/paths.js +80 -0
  65. package/dist/core/project-config.d.ts +14 -0
  66. package/dist/core/project-config.js +69 -0
  67. package/dist/core/registry.d.ts +13 -0
  68. package/dist/core/registry.js +115 -0
  69. package/dist/core/settings.d.ts +7 -0
  70. package/dist/core/settings.js +35 -0
  71. package/dist/core/template-engine.d.ts +3 -0
  72. package/dist/core/template-engine.js +43 -0
  73. package/dist/core/template-resolver.d.ts +15 -0
  74. package/dist/core/template-resolver.js +46 -0
  75. package/dist/core/templates.d.ts +33 -0
  76. package/dist/core/templates.js +440 -0
  77. package/dist/core/terminology.d.ts +21 -0
  78. package/dist/core/terminology.js +143 -0
  79. package/dist/core/tracing.d.ts +21 -0
  80. package/dist/core/tracing.js +74 -0
  81. package/dist/core/types.d.ts +35 -0
  82. package/dist/core/types.js +5 -0
  83. package/dist/core/utils.d.ts +7 -0
  84. package/dist/core/utils.js +66 -0
  85. package/dist/core/validate.d.ts +10 -0
  86. package/dist/core/validate.js +226 -0
  87. package/dist/core/validator.d.ts +5 -0
  88. package/dist/core/validator.js +76 -0
  89. package/dist/core/version.d.ts +1 -0
  90. package/dist/core/version.js +30 -0
  91. package/dist/core/workflow-commands.d.ts +7 -0
  92. package/dist/core/workflow-commands.js +29 -0
  93. package/dist/i18n/en.json +45 -0
  94. package/dist/i18n/index.d.ts +5 -0
  95. package/dist/i18n/index.js +63 -0
  96. package/dist/i18n/tr.json +45 -0
  97. package/dist/init-tui.d.ts +3 -0
  98. package/dist/init-tui.js +28 -1
  99. package/dist/init.d.ts +1 -0
  100. package/dist/init.js +9 -3
  101. package/dist/normalize.js +55 -7
  102. package/dist/providers/index.d.ts +2 -1
  103. package/dist/providers/index.js +20 -6
  104. package/dist/providers/mock-provider.d.ts +1 -1
  105. package/dist/providers/mock-provider.js +7 -6
  106. package/dist/providers/openai-provider.d.ts +1 -1
  107. package/dist/providers/openai-provider.js +3 -2
  108. package/dist/settings.d.ts +1 -0
  109. package/dist/settings.js +2 -1
  110. package/dist/skills/engine.d.ts +10 -0
  111. package/dist/skills/engine.js +75 -0
  112. package/dist/skills/fix-skill.d.ts +2 -0
  113. package/dist/skills/fix-skill.js +38 -0
  114. package/dist/skills/generate-artifact-skill.d.ts +2 -0
  115. package/dist/skills/generate-artifact-skill.js +32 -0
  116. package/dist/skills/generate-pipeline-skill.d.ts +2 -0
  117. package/dist/skills/generate-pipeline-skill.js +45 -0
  118. package/dist/skills/normalize-skill.d.ts +2 -0
  119. package/dist/skills/normalize-skill.js +29 -0
  120. package/dist/skills/types.d.ts +28 -0
  121. package/dist/skills/types.js +2 -0
  122. package/dist/skills/validate-skill.d.ts +2 -0
  123. package/dist/skills/validate-skill.js +29 -0
  124. package/dist/templates.d.ts +1 -1
  125. package/dist/templates.js +2 -0
  126. package/dist/utils.d.ts +1 -0
  127. package/dist/utils.js +13 -0
  128. package/dist/validator.js +0 -4
  129. package/dist/workflow-commands.js +2 -1
  130. package/package.json +74 -45
  131. package/presets/fintech/preset.json +48 -1
  132. package/presets/fintech/prompts/prd.md +99 -2
  133. package/presets/marketplace/preset.json +51 -1
  134. package/presets/marketplace/prompts/prd.md +140 -2
  135. package/presets/saas/preset.json +53 -1
  136. package/presets/saas/prompts/prd.md +150 -2
  137. package/src/agents/agent-registry.ts +93 -0
  138. package/src/agents/anthropic/index.ts +86 -0
  139. package/src/agents/anthropic/manifest.json +7 -0
  140. package/src/agents/base.ts +77 -0
  141. package/src/agents/google/index.ts +79 -0
  142. package/src/agents/google/manifest.json +7 -0
  143. package/src/agents/mock/index.ts +32 -0
  144. package/src/agents/mock/manifest.json +7 -0
  145. package/src/agents/openai/index.ts +83 -0
  146. package/src/agents/openai/manifest.json +7 -0
  147. package/src/agents/system-prompts.ts +35 -0
  148. package/src/{agent-command-installer.ts → cli/agent-command-installer.ts} +164 -164
  149. package/src/{agents.ts → cli/agent-ids.ts} +58 -56
  150. package/src/{doctor.ts → cli/doctor.ts} +157 -137
  151. package/src/cli/fix-tui.ts +111 -0
  152. package/src/{cli.ts → cli/index.ts} +459 -319
  153. package/src/{init-tui.ts → cli/init-tui.ts} +208 -179
  154. package/src/{init.ts → cli/init.ts} +398 -391
  155. package/src/cli/normalize-interactive.ts +241 -0
  156. package/src/{preset-loader.ts → cli/preset-loader.ts} +237 -237
  157. package/src/{artifact-registry.ts → core/artifact-registry.ts} +69 -69
  158. package/src/{artifacts.ts → core/artifacts.ts} +1081 -777
  159. package/src/core/clean.ts +88 -0
  160. package/src/{consistency.ts → core/consistency.ts} +374 -303
  161. package/src/{constants.ts → core/constants.ts} +72 -72
  162. package/src/{errors.ts → core/errors.ts} +7 -7
  163. package/src/core/fix.ts +253 -0
  164. package/src/{hook-executor.ts → core/hook-executor.ts} +196 -196
  165. package/src/{markdown.ts → core/markdown.ts} +93 -73
  166. package/src/core/normalize.ts +145 -0
  167. package/src/{normalized-brief.ts → core/normalized-brief.ts} +227 -206
  168. package/src/{output-index.ts → core/output-index.ts} +59 -59
  169. package/src/{paths.ts → core/paths.ts} +75 -71
  170. package/src/{project-config.ts → core/project-config.ts} +78 -78
  171. package/src/{registry.ts → core/registry.ts} +119 -119
  172. package/src/{settings.ts → core/settings.ts} +35 -34
  173. package/src/core/template-engine.ts +45 -0
  174. package/src/{template-resolver.ts → core/template-resolver.ts} +54 -54
  175. package/src/{templates.ts → core/templates.ts} +452 -450
  176. package/src/core/terminology.ts +177 -0
  177. package/src/core/tracing.ts +110 -0
  178. package/src/{types.ts → core/types.ts} +46 -46
  179. package/src/{utils.ts → core/utils.ts} +64 -50
  180. package/src/{validate.ts → core/validate.ts} +252 -246
  181. package/src/{validator.ts → core/validator.ts} +92 -96
  182. package/src/{version.ts → core/version.ts} +24 -24
  183. package/src/{workflow-commands.ts → core/workflow-commands.ts} +32 -31
  184. package/src/i18n/en.json +45 -0
  185. package/src/i18n/index.ts +58 -0
  186. package/src/i18n/tr.json +45 -0
  187. package/src/providers/index.ts +29 -12
  188. package/src/providers/mock-provider.ts +200 -199
  189. package/src/providers/openai-provider.ts +88 -87
  190. package/src/skills/engine.ts +94 -0
  191. package/src/skills/fix-skill.ts +38 -0
  192. package/src/skills/generate-artifact-skill.ts +32 -0
  193. package/src/skills/generate-pipeline-skill.ts +49 -0
  194. package/src/skills/normalize-skill.ts +29 -0
  195. package/src/skills/types.ts +36 -0
  196. package/src/skills/validate-skill.ts +29 -0
  197. package/templates/commands/prodo-fix.md +46 -0
  198. package/templates/commands/prodo-normalize.md +118 -23
  199. package/templates/commands/prodo-prd.md +138 -17
  200. package/templates/commands/prodo-stories.md +153 -17
  201. package/templates/commands/prodo-techspec.md +167 -17
  202. package/templates/commands/prodo-validate.md +184 -26
  203. package/templates/commands/prodo-wireframe.md +188 -17
  204. package/templates/commands/prodo-workflow.md +200 -17
  205. package/src/normalize.ts +0 -89
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generatePipelineSkill = void 0;
4
+ const artifact_registry_1 = require("../core/artifact-registry");
5
+ const artifacts_1 = require("../core/artifacts");
6
+ const normalize_1 = require("../core/normalize");
7
+ const validate_1 = require("../core/validate");
8
+ exports.generatePipelineSkill = {
9
+ manifest: {
10
+ name: "generate-pipeline",
11
+ description: "Run end-to-end pipeline: normalize → generate all artifacts → validate",
12
+ category: "core",
13
+ inputs: [
14
+ { name: "cwd", type: "path", required: true, description: "Project working directory" },
15
+ { name: "strict", type: "boolean", required: false, description: "Treat warnings as errors" }
16
+ ],
17
+ outputs: [
18
+ { name: "pass", type: "string", description: "Whether validation passed" },
19
+ { name: "reportPath", type: "path", description: "Path to validation report" },
20
+ { name: "artifactCount", type: "string", description: "Number of artifacts generated" }
21
+ ]
22
+ },
23
+ async execute(context, inputs) {
24
+ const cwd = inputs.cwd ?? context.cwd;
25
+ const normalizedPath = await (0, normalize_1.runNormalize)({ cwd });
26
+ context.log(`Normalized brief: ${normalizedPath}`);
27
+ const artifactTypes = await (0, artifact_registry_1.listArtifactTypes)(cwd);
28
+ for (const type of artifactTypes) {
29
+ const file = await (0, artifacts_1.generateArtifact)({
30
+ artifactType: type,
31
+ cwd,
32
+ normalizedBriefOverride: normalizedPath,
33
+ agent: context.agent
34
+ });
35
+ context.log(`${type.toUpperCase()} generated: ${file}`);
36
+ }
37
+ const result = await (0, validate_1.runValidate)(cwd, { strict: Boolean(inputs.strict) });
38
+ context.log(`Validation ${result.pass ? "passed" : "failed"}: ${result.reportPath}`);
39
+ return {
40
+ pass: result.pass,
41
+ reportPath: result.reportPath,
42
+ artifactCount: artifactTypes.length
43
+ };
44
+ }
45
+ };
@@ -0,0 +1,2 @@
1
+ import type { Skill } from "./types";
2
+ export declare const normalizeSkill: Skill;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeSkill = void 0;
4
+ const normalize_1 = require("../core/normalize");
5
+ exports.normalizeSkill = {
6
+ manifest: {
7
+ name: "normalize",
8
+ description: "Normalize a product brief into structured JSON with contracts and confidence scores",
9
+ category: "core",
10
+ inputs: [
11
+ { name: "cwd", type: "path", required: true, description: "Project working directory" },
12
+ { name: "brief", type: "path", required: false, description: "Override path to brief.md" },
13
+ { name: "out", type: "path", required: false, description: "Override output path" }
14
+ ],
15
+ outputs: [
16
+ { name: "normalizedBriefPath", type: "path", description: "Path to normalized-brief.json" }
17
+ ]
18
+ },
19
+ async execute(context, inputs) {
20
+ const cwd = inputs.cwd ?? context.cwd;
21
+ const outPath = await (0, normalize_1.runNormalize)({
22
+ cwd,
23
+ brief: inputs.brief,
24
+ out: inputs.out
25
+ });
26
+ context.log(`Normalized brief written to: ${outPath}`);
27
+ return { normalizedBriefPath: outPath };
28
+ }
29
+ };
@@ -0,0 +1,28 @@
1
+ export type SkillInput = {
2
+ name: string;
3
+ type: "path" | "string" | "boolean" | "json";
4
+ required: boolean;
5
+ description: string;
6
+ };
7
+ export type SkillOutput = {
8
+ name: string;
9
+ type: "path" | "string" | "json";
10
+ description: string;
11
+ };
12
+ export type SkillManifest = {
13
+ name: string;
14
+ description: string;
15
+ category: "core" | "artifact" | "validation" | "custom";
16
+ inputs: SkillInput[];
17
+ outputs: SkillOutput[];
18
+ };
19
+ export type SkillContext = {
20
+ cwd: string;
21
+ log: (message: string) => void;
22
+ agent?: string;
23
+ };
24
+ export type SkillFunction = (context: SkillContext, inputs: Record<string, unknown>) => Promise<Record<string, unknown>>;
25
+ export type Skill = {
26
+ manifest: SkillManifest;
27
+ execute: SkillFunction;
28
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { Skill } from "./types";
2
+ export declare const validateSkill: Skill;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateSkill = void 0;
4
+ const validate_1 = require("../core/validate");
5
+ exports.validateSkill = {
6
+ manifest: {
7
+ name: "validate",
8
+ description: "Run cross-artifact validation and generate a report",
9
+ category: "validation",
10
+ inputs: [
11
+ { name: "cwd", type: "path", required: true, description: "Project working directory" },
12
+ { name: "strict", type: "boolean", required: false, description: "Treat warnings as errors" },
13
+ { name: "report", type: "path", required: false, description: "Override report output path" }
14
+ ],
15
+ outputs: [
16
+ { name: "pass", type: "string", description: "Whether validation passed" },
17
+ { name: "reportPath", type: "path", description: "Path to validation report" }
18
+ ]
19
+ },
20
+ async execute(context, inputs) {
21
+ const cwd = inputs.cwd ?? context.cwd;
22
+ const result = await (0, validate_1.runValidate)(cwd, {
23
+ strict: Boolean(inputs.strict),
24
+ report: inputs.report
25
+ });
26
+ context.log(`Validation ${result.pass ? "passed" : "failed"}: ${result.reportPath}`);
27
+ return { pass: result.pass, reportPath: result.reportPath, issueCount: result.issues.length };
28
+ }
29
+ };
@@ -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,45 +1,74 @@
1
- {
2
- "name": "@shahmarasy/prodo",
3
- "version": "0.1.3",
4
- "description": "CLI-first, prompt-powered product artifact kit",
5
- "main": "dist/cli.js",
6
- "types": "dist/cli.d.ts",
7
- "bin": {
8
- "prodo": "bin/prodo.cjs"
9
- },
10
- "files": [
11
- "bin/",
12
- "dist/",
13
- "templates/",
14
- "presets/",
15
- "src/",
16
- "README.md"
17
- ],
18
- "publishConfig": {
19
- "access": "public"
20
- },
21
- "engines": {
22
- "node": ">=20"
23
- },
24
- "scripts": {
25
- "build": "tsc -p tsconfig.json",
26
- "test": "npm run build && node --test tests/*.test.cjs",
27
- "verify:release": "npm run build && node scripts/verify-release-build.cjs"
28
- },
29
- "keywords": [],
30
- "author": "",
31
- "license": "ISC",
32
- "dependencies": {
33
- "@clack/prompts": "^1.1.0",
34
- "ajv": "^8.18.0",
35
- "ajv-formats": "^3.0.1",
36
- "commander": "^14.0.3",
37
- "gray-matter": "^4.0.3",
38
- "js-yaml": "^4.1.1"
39
- },
40
- "devDependencies": {
41
- "@types/js-yaml": "^4.0.9",
42
- "@types/node": "^25.5.0",
43
- "typescript": "^5.9.3"
44
- }
45
- }
1
+ {
2
+ "name": "@shahmarasy/prodo",
3
+ "version": "0.1.5",
4
+ "description": "CLI-first, prompt-powered product artifact kit",
5
+ "main": "dist/cli/index.js",
6
+ "types": "dist/cli/index.d.ts",
7
+ "bin": {
8
+ "prodo": "bin/prodo.cjs"
9
+ },
10
+ "files": [
11
+ "bin/",
12
+ "dist/",
13
+ "templates/",
14
+ "presets/",
15
+ "src/",
16
+ "README.md"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "engines": {
22
+ "node": ">=20"
23
+ },
24
+ "scripts": {
25
+ "build:ts": "tsc -p tsconfig.json",
26
+ "build:i18n": "node -e \"const fs=require('fs');const p=require('path');['en','tr'].forEach(l=>{const s=p.join('src','i18n',l+'.json');const d=p.join('dist','i18n',l+'.json');fs.copyFileSync(s,d)})\"",
27
+ "build": "npm run build:ts && npm run build:i18n",
28
+ "test": "npm run build && node --test tests/*.test.cjs",
29
+ "verify:release": "npm run build && node scripts/verify-release-build.cjs"
30
+ },
31
+ "keywords": [
32
+ "product-management",
33
+ "prd",
34
+ "ai-agents",
35
+ "codex",
36
+ "claude",
37
+ "gemini",
38
+ "document-generation",
39
+ "cli"
40
+ ],
41
+ "author": "Shahmarasy",
42
+ "license": "MIT",
43
+ "dependencies": {
44
+ "@clack/prompts": "^1.1.0",
45
+ "ajv": "^8.18.0",
46
+ "ajv-formats": "^3.0.1",
47
+ "commander": "^14.0.3",
48
+ "gray-matter": "^4.0.3",
49
+ "js-yaml": "^4.1.1",
50
+ "nunjucks": "^3.2.4"
51
+ },
52
+ "peerDependencies": {
53
+ "openai": ">=4.0.0",
54
+ "@anthropic-ai/sdk": ">=0.20.0",
55
+ "@google/generative-ai": ">=0.1.0"
56
+ },
57
+ "peerDependenciesMeta": {
58
+ "openai": {
59
+ "optional": true
60
+ },
61
+ "@anthropic-ai/sdk": {
62
+ "optional": true
63
+ },
64
+ "@google/generative-ai": {
65
+ "optional": true
66
+ }
67
+ },
68
+ "devDependencies": {
69
+ "@types/js-yaml": "^4.0.9",
70
+ "@types/node": "^25.5.0",
71
+ "@types/nunjucks": "^3.2.6",
72
+ "typescript": "^5.9.3"
73
+ }
74
+ }
@@ -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
+ }