@shahmarasy/prodo 0.1.5 → 0.1.6
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/system-prompts.js +12 -12
- package/dist/cli/agent-command-installer.js +18 -18
- package/dist/cli/doctor.js +2 -2
- package/dist/cli/index.js +32 -30
- package/dist/cli/init-tui.d.ts +2 -2
- package/dist/cli/init-tui.js +43 -36
- package/dist/cli/init.d.ts +1 -0
- package/dist/cli/init.js +2 -1
- package/dist/core/artifacts.js +72 -72
- package/dist/core/settings.d.ts +1 -0
- package/dist/core/settings.js +10 -2
- package/dist/core/templates.js +248 -248
- package/dist/i18n/en.json +45 -45
- package/dist/i18n/tr.json +45 -45
- package/dist/providers/mock-provider.js +5 -5
- package/dist/providers/openai-provider.js +12 -12
- package/dist/skill-engine/context.d.ts +7 -0
- package/dist/skill-engine/context.js +76 -0
- package/dist/skill-engine/discovery.d.ts +2 -0
- package/dist/skill-engine/discovery.js +52 -0
- package/dist/skill-engine/graph.d.ts +4 -0
- package/dist/skill-engine/graph.js +114 -0
- package/dist/skill-engine/index.d.ts +11 -0
- package/dist/skill-engine/index.js +49 -0
- package/dist/skill-engine/pipeline.d.ts +9 -0
- package/dist/skill-engine/pipeline.js +84 -0
- package/dist/skill-engine/registry.d.ts +12 -0
- package/dist/skill-engine/registry.js +74 -0
- package/dist/skill-engine/types.d.ts +66 -0
- package/dist/skill-engine/types.js +2 -0
- package/dist/skill-engine/validator.d.ts +4 -0
- package/dist/skill-engine/validator.js +90 -0
- package/dist/skills/fix.d.ts +2 -0
- package/dist/skills/fix.js +41 -0
- package/dist/skills/generate-artifact.d.ts +2 -0
- package/dist/skills/generate-artifact.js +42 -0
- package/dist/skills/normalize.d.ts +2 -0
- package/dist/skills/normalize.js +29 -0
- package/dist/skills/register-core.d.ts +2 -0
- package/dist/skills/register-core.js +21 -0
- package/dist/skills/validate.d.ts +2 -0
- package/dist/skills/validate.js +37 -0
- package/package.json +4 -6
- package/src/cli/doctor.ts +2 -2
- package/src/cli/index.ts +35 -31
- package/src/cli/init-tui.ts +220 -208
- package/src/cli/init.ts +3 -2
- package/src/core/settings.ts +41 -35
- package/src/skill-engine/context.ts +90 -0
- package/src/skill-engine/discovery.ts +57 -0
- package/src/skill-engine/graph.ts +136 -0
- package/src/skill-engine/index.ts +55 -0
- package/src/skill-engine/pipeline.ts +112 -0
- package/src/skill-engine/registry.ts +75 -0
- package/src/skill-engine/types.ts +81 -0
- package/src/skill-engine/validator.ts +135 -0
- package/src/skills/fix.ts +45 -0
- package/src/skills/generate-artifact.ts +48 -0
- package/src/skills/{normalize-skill.ts → normalize.ts} +15 -12
- package/src/skills/register-core.ts +27 -0
- package/src/skills/validate.ts +40 -0
- package/src/skills/engine.ts +0 -94
- package/src/skills/fix-skill.ts +0 -38
- package/src/skills/generate-artifact-skill.ts +0 -32
- package/src/skills/generate-pipeline-skill.ts +0 -49
- package/src/skills/types.ts +0 -36
- package/src/skills/validate-skill.ts +0 -29
package/dist/core/templates.js
CHANGED
|
@@ -65,90 +65,90 @@ function schemaTemplate(artifactType) {
|
|
|
65
65
|
function promptTemplate(artifactType, lang = "en") {
|
|
66
66
|
const tr = lang.toLowerCase().startsWith("tr");
|
|
67
67
|
if (artifactType === "workflow") {
|
|
68
|
-
return `You are Prodo's artifact generator for WORKFLOW.
|
|
69
|
-
|
|
70
|
-
Goal:
|
|
71
|
-
- Produce paired workflow outputs for the same flow.
|
|
72
|
-
|
|
73
|
-
Output contract (STRICT):
|
|
74
|
-
- Return Markdown explanation first (no frontmatter), following required headings exactly.
|
|
75
|
-
- Include actionable flow details and contract tags like [F1].
|
|
76
|
-
- Then append a mandatory Mermaid block for the same flow:
|
|
77
|
-
\`\`\`mermaid
|
|
78
|
-
flowchart TD
|
|
79
|
-
A --> B
|
|
80
|
-
\`\`\`
|
|
81
|
-
- Do not return prose-only markdown without Mermaid.
|
|
82
|
-
|
|
83
|
-
Input immutability:
|
|
84
|
-
- Input files are read-only.
|
|
85
|
-
- Do not modify, rewrite, summarize, or optimize \`brief.md\`.
|
|
86
|
-
|
|
87
|
-
Language contract:
|
|
88
|
-
- Output text in requested language from inputContext.outputLanguage.
|
|
89
|
-
- If outputLanguage is "tr", every sentence and heading MUST be Turkish.
|
|
90
|
-
- Never mix Turkish and English in the same artifact.
|
|
91
|
-
|
|
92
|
-
Quality bar:
|
|
93
|
-
- Main flow must be implementation-ready.
|
|
68
|
+
return `You are Prodo's artifact generator for WORKFLOW.
|
|
69
|
+
|
|
70
|
+
Goal:
|
|
71
|
+
- Produce paired workflow outputs for the same flow.
|
|
72
|
+
|
|
73
|
+
Output contract (STRICT):
|
|
74
|
+
- Return Markdown explanation first (no frontmatter), following required headings exactly.
|
|
75
|
+
- Include actionable flow details and contract tags like [F1].
|
|
76
|
+
- Then append a mandatory Mermaid block for the same flow:
|
|
77
|
+
\`\`\`mermaid
|
|
78
|
+
flowchart TD
|
|
79
|
+
A --> B
|
|
80
|
+
\`\`\`
|
|
81
|
+
- Do not return prose-only markdown without Mermaid.
|
|
82
|
+
|
|
83
|
+
Input immutability:
|
|
84
|
+
- Input files are read-only.
|
|
85
|
+
- Do not modify, rewrite, summarize, or optimize \`brief.md\`.
|
|
86
|
+
|
|
87
|
+
Language contract:
|
|
88
|
+
- Output text in requested language from inputContext.outputLanguage.
|
|
89
|
+
- If outputLanguage is "tr", every sentence and heading MUST be Turkish.
|
|
90
|
+
- Never mix Turkish and English in the same artifact.
|
|
91
|
+
|
|
92
|
+
Quality bar:
|
|
93
|
+
- Main flow must be implementation-ready.
|
|
94
94
|
- Edge cases and postconditions must be explicit.`;
|
|
95
95
|
}
|
|
96
96
|
if (artifactType === "wireframe") {
|
|
97
|
-
return `You are Prodo's artifact generator for WIREFRAME.
|
|
98
|
-
|
|
99
|
-
Goal:
|
|
100
|
-
- Produce a human-readable wireframe explanation in Markdown.
|
|
101
|
-
|
|
102
|
-
Output contract (STRICT):
|
|
103
|
-
- Return Markdown body only (no frontmatter).
|
|
104
|
-
- Include all required headings exactly as provided.
|
|
105
|
-
- Describe one concrete screen at a time with actionable details.
|
|
106
|
-
- HTML wireframe is generated by Prodo as a companion .html file; do not output raw HTML as primary markdown body.
|
|
107
|
-
|
|
108
|
-
Input immutability:
|
|
109
|
-
- Input files are read-only.
|
|
110
|
-
- Do not modify, rewrite, summarize, or optimize \`brief.md\`.
|
|
111
|
-
|
|
112
|
-
Language contract:
|
|
113
|
-
- Output text in requested language from inputContext.outputLanguage.
|
|
114
|
-
- If outputLanguage is "tr", every sentence and heading MUST be Turkish.
|
|
115
|
-
- Never mix Turkish and English in the same artifact.
|
|
116
|
-
|
|
117
|
-
Quality bar:
|
|
118
|
-
- Keep sections concise but specific.
|
|
97
|
+
return `You are Prodo's artifact generator for WIREFRAME.
|
|
98
|
+
|
|
99
|
+
Goal:
|
|
100
|
+
- Produce a human-readable wireframe explanation in Markdown.
|
|
101
|
+
|
|
102
|
+
Output contract (STRICT):
|
|
103
|
+
- Return Markdown body only (no frontmatter).
|
|
104
|
+
- Include all required headings exactly as provided.
|
|
105
|
+
- Describe one concrete screen at a time with actionable details.
|
|
106
|
+
- HTML wireframe is generated by Prodo as a companion .html file; do not output raw HTML as primary markdown body.
|
|
107
|
+
|
|
108
|
+
Input immutability:
|
|
109
|
+
- Input files are read-only.
|
|
110
|
+
- Do not modify, rewrite, summarize, or optimize \`brief.md\`.
|
|
111
|
+
|
|
112
|
+
Language contract:
|
|
113
|
+
- Output text in requested language from inputContext.outputLanguage.
|
|
114
|
+
- If outputLanguage is "tr", every sentence and heading MUST be Turkish.
|
|
115
|
+
- Never mix Turkish and English in the same artifact.
|
|
116
|
+
|
|
117
|
+
Quality bar:
|
|
118
|
+
- Keep sections concise but specific.
|
|
119
119
|
- Ensure actions/states/messages are testable and implementation-relevant.`;
|
|
120
120
|
}
|
|
121
|
-
return `You are Prodo's artifact generator for ${artifactType.toUpperCase()}.
|
|
122
|
-
|
|
123
|
-
Goal:
|
|
124
|
-
- Produce a decision-ready product artifact from normalized brief and upstream artifacts.
|
|
125
|
-
|
|
126
|
-
Output contract:
|
|
127
|
-
- Return only Markdown body (NO YAML frontmatter).
|
|
128
|
-
- Keep all required section headings exactly as provided.
|
|
129
|
-
- When referencing brief contracts, use explicit tags like [G1], [F2], [C1].
|
|
130
|
-
- Use concrete statements, avoid placeholders like "TBD" unless unavoidable.
|
|
131
|
-
- Reference upstream constraints and tradeoffs explicitly.
|
|
132
|
-
|
|
133
|
-
Input immutability:
|
|
134
|
-
- Input files are read-only.
|
|
135
|
-
- Do not modify, rewrite, summarize, or optimize \`brief.md\`.
|
|
136
|
-
|
|
137
|
-
Language contract:
|
|
138
|
-
- Output text in requested language from inputContext.outputLanguage.
|
|
139
|
-
- If outputLanguage is "tr", every sentence and heading MUST be Turkish.
|
|
140
|
-
- Never mix Turkish and English in the same artifact.
|
|
141
|
-
- Do not translate or change required headings unless outputLanguage is "tr" and Turkish headings are provided.
|
|
142
|
-
|
|
143
|
-
Quality bar:
|
|
144
|
-
- Every section must contain actionable content.
|
|
145
|
-
- Include assumptions and risks where relevant.
|
|
146
|
-
- Keep content concise but implementation-ready.
|
|
147
|
-
|
|
148
|
-
Required headings:
|
|
149
|
-
${(0, constants_1.defaultRequiredHeadings)(artifactType).map((heading) => `- ${heading}`).join("\n")}
|
|
150
|
-
|
|
151
|
-
When data is missing:
|
|
121
|
+
return `You are Prodo's artifact generator for ${artifactType.toUpperCase()}.
|
|
122
|
+
|
|
123
|
+
Goal:
|
|
124
|
+
- Produce a decision-ready product artifact from normalized brief and upstream artifacts.
|
|
125
|
+
|
|
126
|
+
Output contract:
|
|
127
|
+
- Return only Markdown body (NO YAML frontmatter).
|
|
128
|
+
- Keep all required section headings exactly as provided.
|
|
129
|
+
- When referencing brief contracts, use explicit tags like [G1], [F2], [C1].
|
|
130
|
+
- Use concrete statements, avoid placeholders like "TBD" unless unavoidable.
|
|
131
|
+
- Reference upstream constraints and tradeoffs explicitly.
|
|
132
|
+
|
|
133
|
+
Input immutability:
|
|
134
|
+
- Input files are read-only.
|
|
135
|
+
- Do not modify, rewrite, summarize, or optimize \`brief.md\`.
|
|
136
|
+
|
|
137
|
+
Language contract:
|
|
138
|
+
- Output text in requested language from inputContext.outputLanguage.
|
|
139
|
+
- If outputLanguage is "tr", every sentence and heading MUST be Turkish.
|
|
140
|
+
- Never mix Turkish and English in the same artifact.
|
|
141
|
+
- Do not translate or change required headings unless outputLanguage is "tr" and Turkish headings are provided.
|
|
142
|
+
|
|
143
|
+
Quality bar:
|
|
144
|
+
- Every section must contain actionable content.
|
|
145
|
+
- Include assumptions and risks where relevant.
|
|
146
|
+
- Keep content concise but implementation-ready.
|
|
147
|
+
|
|
148
|
+
Required headings:
|
|
149
|
+
${(0, constants_1.defaultRequiredHeadings)(artifactType).map((heading) => `- ${heading}`).join("\n")}
|
|
150
|
+
|
|
151
|
+
When data is missing:
|
|
152
152
|
${tr ? "- varsayim yaparken Turkce yaz\n- varsayimi ilgili bolumde acikca belirt" : "- infer a sensible default\n- state the assumption clearly in the relevant section"}`;
|
|
153
153
|
}
|
|
154
154
|
function artifactTemplateTemplate(artifactType, lang = "en") {
|
|
@@ -191,38 +191,38 @@ function artifactTemplateTemplate(artifactType, lang = "en") {
|
|
|
191
191
|
].join("\n");
|
|
192
192
|
}
|
|
193
193
|
if (artifactType === "wireframe") {
|
|
194
|
-
return `<!doctype html>
|
|
195
|
-
<html lang="${tr ? "tr" : "en"}">
|
|
196
|
-
<head>
|
|
197
|
-
<meta charset="utf-8" />
|
|
198
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
199
|
-
<title>${tr ? "Wireframe Ekrani" : "Wireframe Screen"}</title>
|
|
200
|
-
</head>
|
|
201
|
-
<body>
|
|
202
|
-
<header>
|
|
203
|
-
<h1>${tr ? "Ekran Basligi" : "Screen Title"}</h1>
|
|
204
|
-
<nav>
|
|
205
|
-
<button type="button">${tr ? "Geri" : "Back"}</button>
|
|
206
|
-
<button type="button">${tr ? "Devam" : "Next"}</button>
|
|
207
|
-
</nav>
|
|
208
|
-
</header>
|
|
209
|
-
<main>
|
|
210
|
-
<section>
|
|
211
|
-
<h2>${tr ? "Birincil Icerik" : "Primary Content"}</h2>
|
|
212
|
-
<ul>
|
|
213
|
-
<li>${tr ? "Durum ozeti" : "Status summary"}</li>
|
|
214
|
-
<li>${tr ? "Aksiyon alani" : "Action area"}</li>
|
|
215
|
-
</ul>
|
|
216
|
-
</section>
|
|
217
|
-
<section>
|
|
218
|
-
<h2>${tr ? "Form" : "Form"}</h2>
|
|
219
|
-
<form>
|
|
220
|
-
<label>${tr ? "Alan" : "Field"} <input type="text" /></label>
|
|
221
|
-
<button type="submit">${tr ? "Kaydet" : "Save"}</button>
|
|
222
|
-
</form>
|
|
223
|
-
</section>
|
|
224
|
-
</main>
|
|
225
|
-
</body>
|
|
194
|
+
return `<!doctype html>
|
|
195
|
+
<html lang="${tr ? "tr" : "en"}">
|
|
196
|
+
<head>
|
|
197
|
+
<meta charset="utf-8" />
|
|
198
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
199
|
+
<title>${tr ? "Wireframe Ekrani" : "Wireframe Screen"}</title>
|
|
200
|
+
</head>
|
|
201
|
+
<body>
|
|
202
|
+
<header>
|
|
203
|
+
<h1>${tr ? "Ekran Basligi" : "Screen Title"}</h1>
|
|
204
|
+
<nav>
|
|
205
|
+
<button type="button">${tr ? "Geri" : "Back"}</button>
|
|
206
|
+
<button type="button">${tr ? "Devam" : "Next"}</button>
|
|
207
|
+
</nav>
|
|
208
|
+
</header>
|
|
209
|
+
<main>
|
|
210
|
+
<section>
|
|
211
|
+
<h2>${tr ? "Birincil Icerik" : "Primary Content"}</h2>
|
|
212
|
+
<ul>
|
|
213
|
+
<li>${tr ? "Durum ozeti" : "Status summary"}</li>
|
|
214
|
+
<li>${tr ? "Aksiyon alani" : "Action area"}</li>
|
|
215
|
+
</ul>
|
|
216
|
+
</section>
|
|
217
|
+
<section>
|
|
218
|
+
<h2>${tr ? "Form" : "Form"}</h2>
|
|
219
|
+
<form>
|
|
220
|
+
<label>${tr ? "Alan" : "Field"} <input type="text" /></label>
|
|
221
|
+
<button type="submit">${tr ? "Kaydet" : "Save"}</button>
|
|
222
|
+
</form>
|
|
223
|
+
</section>
|
|
224
|
+
</main>
|
|
225
|
+
</body>
|
|
226
226
|
</html>`;
|
|
227
227
|
}
|
|
228
228
|
if (artifactType === "stories") {
|
|
@@ -271,28 +271,28 @@ function artifactTemplateTemplate(artifactType, lang = "en") {
|
|
|
271
271
|
].join("\n");
|
|
272
272
|
return fallbackTemplate;
|
|
273
273
|
}
|
|
274
|
-
exports.START_BRIEF_TEMPLATE = `# Product Brief
|
|
275
|
-
|
|
276
|
-
## Product Name
|
|
277
|
-
Example Product
|
|
278
|
-
|
|
279
|
-
## Problem
|
|
280
|
-
Describe the user problem.
|
|
281
|
-
|
|
282
|
-
## Audience
|
|
283
|
-
Who this product is for.
|
|
284
|
-
|
|
285
|
-
## Core Features
|
|
286
|
-
- Feature A
|
|
287
|
-
- Feature B
|
|
288
|
-
|
|
289
|
-
## Goals
|
|
290
|
-
- Goal 1
|
|
291
|
-
- Goal 2
|
|
292
|
-
|
|
293
|
-
## Constraints
|
|
294
|
-
- Budget or timeline constraints
|
|
295
|
-
- Compliance or technical constraints
|
|
274
|
+
exports.START_BRIEF_TEMPLATE = `# Product Brief
|
|
275
|
+
|
|
276
|
+
## Product Name
|
|
277
|
+
Example Product
|
|
278
|
+
|
|
279
|
+
## Problem
|
|
280
|
+
Describe the user problem.
|
|
281
|
+
|
|
282
|
+
## Audience
|
|
283
|
+
Who this product is for.
|
|
284
|
+
|
|
285
|
+
## Core Features
|
|
286
|
+
- Feature A
|
|
287
|
+
- Feature B
|
|
288
|
+
|
|
289
|
+
## Goals
|
|
290
|
+
- Goal 1
|
|
291
|
+
- Goal 2
|
|
292
|
+
|
|
293
|
+
## Constraints
|
|
294
|
+
- Budget or timeline constraints
|
|
295
|
+
- Compliance or technical constraints
|
|
296
296
|
`;
|
|
297
297
|
exports.NORMALIZED_BRIEF_TEMPLATE = {
|
|
298
298
|
schema_version: "1.0",
|
|
@@ -315,126 +315,126 @@ exports.NORMALIZED_BRIEF_TEMPLATE = {
|
|
|
315
315
|
constraints: [{ id: "C1", text: "Constraint 1" }]
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
exports.NORMALIZE_PROMPT_TEMPLATE = `Normalize start-brief content into JSON.
|
|
319
|
-
|
|
320
|
-
Return JSON object with keys:
|
|
321
|
-
- schema_version (string)
|
|
322
|
-
- product_name (string)
|
|
323
|
-
- problem (string)
|
|
324
|
-
- audience (string[])
|
|
325
|
-
- goals (string[])
|
|
326
|
-
- core_features (string[])
|
|
327
|
-
- constraints (string[])
|
|
328
|
-
- assumptions (string[])
|
|
329
|
-
- contracts.goals[] ({id,text})
|
|
330
|
-
- contracts.core_features[] ({id,text})
|
|
331
|
-
- contracts.constraints[] ({id,text})
|
|
332
|
-
- confidence.product_name (0..1)
|
|
333
|
-
- confidence.problem (0..1)
|
|
334
|
-
- confidence.audience (0..1)
|
|
335
|
-
- confidence.goals (0..1)
|
|
336
|
-
- confidence.core_features (0..1)
|
|
337
|
-
|
|
338
|
-
Rules:
|
|
339
|
-
- do NOT invent missing critical content
|
|
340
|
-
- keep wording concise and concrete
|
|
341
|
-
- preserve original language and Unicode characters exactly from brief
|
|
342
|
-
- never transliterate Turkish letters (ç, ğ, ı, İ, ö, ş, ü) into ASCII
|
|
343
|
-
- if critical field is missing, return empty and low confidence (<0.7)
|
|
344
|
-
- assign deterministic IDs: goals => G1..Gn, features => F1..Fn, constraints => C1..Cn
|
|
345
|
-
- input files are read-only; never modify, summarize, or rewrite \`brief.md\` in-place
|
|
318
|
+
exports.NORMALIZE_PROMPT_TEMPLATE = `Normalize start-brief content into JSON.
|
|
319
|
+
|
|
320
|
+
Return JSON object with keys:
|
|
321
|
+
- schema_version (string)
|
|
322
|
+
- product_name (string)
|
|
323
|
+
- problem (string)
|
|
324
|
+
- audience (string[])
|
|
325
|
+
- goals (string[])
|
|
326
|
+
- core_features (string[])
|
|
327
|
+
- constraints (string[])
|
|
328
|
+
- assumptions (string[])
|
|
329
|
+
- contracts.goals[] ({id,text})
|
|
330
|
+
- contracts.core_features[] ({id,text})
|
|
331
|
+
- contracts.constraints[] ({id,text})
|
|
332
|
+
- confidence.product_name (0..1)
|
|
333
|
+
- confidence.problem (0..1)
|
|
334
|
+
- confidence.audience (0..1)
|
|
335
|
+
- confidence.goals (0..1)
|
|
336
|
+
- confidence.core_features (0..1)
|
|
337
|
+
|
|
338
|
+
Rules:
|
|
339
|
+
- do NOT invent missing critical content
|
|
340
|
+
- keep wording concise and concrete
|
|
341
|
+
- preserve original language and Unicode characters exactly from brief
|
|
342
|
+
- never transliterate Turkish letters (ç, ğ, ı, İ, ö, ş, ü) into ASCII
|
|
343
|
+
- if critical field is missing, return empty and low confidence (<0.7)
|
|
344
|
+
- assign deterministic IDs: goals => G1..Gn, features => F1..Fn, constraints => C1..Cn
|
|
345
|
+
- input files are read-only; never modify, summarize, or rewrite \`brief.md\` in-place
|
|
346
346
|
- write normalized output as a new JSON object only`;
|
|
347
347
|
function commandTemplate(command) {
|
|
348
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).
|
|
349
|
+
? `
|
|
350
|
+
- Normalize output format check:
|
|
351
|
+
- \`.prodo/briefs/normalized-brief.json\` must be strict JSON object (no markdown fences).
|
|
352
352
|
- If invalid, rewrite file as pure JSON object only.`
|
|
353
353
|
: "";
|
|
354
|
-
return `---
|
|
355
|
-
description: ${command.description}
|
|
356
|
-
handoffs:
|
|
357
|
-
- label: Continue Workflow
|
|
358
|
-
agent: prodo-next
|
|
359
|
-
prompt: Continue with the next Prodo command in sequence.
|
|
360
|
-
send: true
|
|
361
|
-
---
|
|
362
|
-
|
|
363
|
-
## User Input
|
|
364
|
-
|
|
365
|
-
\`\`\`text
|
|
366
|
-
$ARGUMENTS
|
|
367
|
-
\`\`\`
|
|
368
|
-
|
|
369
|
-
Execution policy:
|
|
370
|
-
- Execute-first, diagnose-second.
|
|
371
|
-
- Perform only minimal prerequisite checks before execution.
|
|
372
|
-
- Do not run shell commands or CLI commands from inside the agent.
|
|
373
|
-
- Never run \`prodo-${command.cliSubcommand}\`, \`prodo ${command.cliSubcommand}\`, or \`prodo ...\` in shell.
|
|
374
|
-
- Do not inspect hooks or internals unless command execution fails.
|
|
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).
|
|
378
|
-
|
|
379
|
-
## Execution
|
|
380
|
-
|
|
381
|
-
1. Minimal prerequisites only:
|
|
382
|
-
- Confirm project is initialized (\`.prodo/\` exists).
|
|
383
|
-
- Confirm required input files for \`${command.cliSubcommand}\` exist.
|
|
384
|
-
- Confirm output location is writable.
|
|
385
|
-
|
|
386
|
-
2. Execute immediately:
|
|
387
|
-
- Execute the \`${command.cliSubcommand}\` process directly using workspace files and Prodo rules.
|
|
388
|
-
- Keep narration short and action-oriented.
|
|
389
|
-
|
|
390
|
-
3. Verify result:
|
|
391
|
-
- Confirm expected output file(s) were created/updated under \`product-docs/\` (or \`.prodo/briefs\` for normalize).
|
|
392
|
-
- Confirm command success state (exit code or validation status).
|
|
393
|
-
- Confirm \`brief.md\` hash/content did not change.
|
|
394
|
-
- Do NOT create manual fallback files under \`.prodo/artifact\` or any ad-hoc folder.
|
|
395
|
-
${normalizeJsonGuard}
|
|
396
|
-
|
|
397
|
-
4. Diagnose only on failure:
|
|
398
|
-
- Inspect \`.prodo/hooks.yml\` only after execution failure.
|
|
399
|
-
- Explain root cause and next fix steps briefly.
|
|
400
|
-
|
|
401
|
-
## Handoff
|
|
402
|
-
|
|
354
|
+
return `---
|
|
355
|
+
description: ${command.description}
|
|
356
|
+
handoffs:
|
|
357
|
+
- label: Continue Workflow
|
|
358
|
+
agent: prodo-next
|
|
359
|
+
prompt: Continue with the next Prodo command in sequence.
|
|
360
|
+
send: true
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## User Input
|
|
364
|
+
|
|
365
|
+
\`\`\`text
|
|
366
|
+
$ARGUMENTS
|
|
367
|
+
\`\`\`
|
|
368
|
+
|
|
369
|
+
Execution policy:
|
|
370
|
+
- Execute-first, diagnose-second.
|
|
371
|
+
- Perform only minimal prerequisite checks before execution.
|
|
372
|
+
- Do not run shell commands or CLI commands from inside the agent.
|
|
373
|
+
- Never run \`prodo-${command.cliSubcommand}\`, \`prodo ${command.cliSubcommand}\`, or \`prodo ...\` in shell.
|
|
374
|
+
- Do not inspect hooks or internals unless command execution fails.
|
|
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).
|
|
378
|
+
|
|
379
|
+
## Execution
|
|
380
|
+
|
|
381
|
+
1. Minimal prerequisites only:
|
|
382
|
+
- Confirm project is initialized (\`.prodo/\` exists).
|
|
383
|
+
- Confirm required input files for \`${command.cliSubcommand}\` exist.
|
|
384
|
+
- Confirm output location is writable.
|
|
385
|
+
|
|
386
|
+
2. Execute immediately:
|
|
387
|
+
- Execute the \`${command.cliSubcommand}\` process directly using workspace files and Prodo rules.
|
|
388
|
+
- Keep narration short and action-oriented.
|
|
389
|
+
|
|
390
|
+
3. Verify result:
|
|
391
|
+
- Confirm expected output file(s) were created/updated under \`product-docs/\` (or \`.prodo/briefs\` for normalize).
|
|
392
|
+
- Confirm command success state (exit code or validation status).
|
|
393
|
+
- Confirm \`brief.md\` hash/content did not change.
|
|
394
|
+
- Do NOT create manual fallback files under \`.prodo/artifact\` or any ad-hoc folder.
|
|
395
|
+
${normalizeJsonGuard}
|
|
396
|
+
|
|
397
|
+
4. Diagnose only on failure:
|
|
398
|
+
- Inspect \`.prodo/hooks.yml\` only after execution failure.
|
|
399
|
+
- Explain root cause and next fix steps briefly.
|
|
400
|
+
|
|
401
|
+
## Handoff
|
|
402
|
+
|
|
403
403
|
Suggest the next slash command explicitly (for example: \`/prodo-prd\`, \`/prodo-workflow\`).`;
|
|
404
404
|
}
|
|
405
|
-
exports.HOOKS_TEMPLATE = `# Hook item fields:
|
|
406
|
-
# - command: string (required)
|
|
407
|
-
# - optional: boolean (default false)
|
|
408
|
-
# - enabled: boolean (default true)
|
|
409
|
-
# - condition: shell command; run hook only if condition exits 0
|
|
410
|
-
# - timeout_ms: per-attempt timeout in milliseconds (default 30000)
|
|
411
|
-
# - retry: extra retry count after first attempt (default 0)
|
|
412
|
-
# - retry_delay_ms: delay between retries (default 500)
|
|
413
|
-
#
|
|
414
|
-
# Example:
|
|
415
|
-
# hooks:
|
|
416
|
-
# before_prd:
|
|
417
|
-
# - command: "node -e \\"console.log('lint ok')\\""
|
|
418
|
-
# optional: false
|
|
419
|
-
# enabled: true
|
|
420
|
-
# condition: "node -e \\"process.exit(0)\\""
|
|
421
|
-
# timeout_ms: 15000
|
|
422
|
-
# retry: 1
|
|
423
|
-
# retry_delay_ms: 300
|
|
424
|
-
|
|
425
|
-
hooks:
|
|
426
|
-
before_normalize: []
|
|
427
|
-
after_normalize: []
|
|
428
|
-
before_prd: []
|
|
429
|
-
after_prd: []
|
|
430
|
-
before_workflow: []
|
|
431
|
-
after_workflow: []
|
|
432
|
-
before_wireframe: []
|
|
433
|
-
after_wireframe: []
|
|
434
|
-
before_stories: []
|
|
435
|
-
after_stories: []
|
|
436
|
-
before_techspec: []
|
|
437
|
-
after_techspec: []
|
|
438
|
-
before_validate: []
|
|
439
|
-
after_validate: []
|
|
405
|
+
exports.HOOKS_TEMPLATE = `# Hook item fields:
|
|
406
|
+
# - command: string (required)
|
|
407
|
+
# - optional: boolean (default false)
|
|
408
|
+
# - enabled: boolean (default true)
|
|
409
|
+
# - condition: shell command; run hook only if condition exits 0
|
|
410
|
+
# - timeout_ms: per-attempt timeout in milliseconds (default 30000)
|
|
411
|
+
# - retry: extra retry count after first attempt (default 0)
|
|
412
|
+
# - retry_delay_ms: delay between retries (default 500)
|
|
413
|
+
#
|
|
414
|
+
# Example:
|
|
415
|
+
# hooks:
|
|
416
|
+
# before_prd:
|
|
417
|
+
# - command: "node -e \\"console.log('lint ok')\\""
|
|
418
|
+
# optional: false
|
|
419
|
+
# enabled: true
|
|
420
|
+
# condition: "node -e \\"process.exit(0)\\""
|
|
421
|
+
# timeout_ms: 15000
|
|
422
|
+
# retry: 1
|
|
423
|
+
# retry_delay_ms: 300
|
|
424
|
+
|
|
425
|
+
hooks:
|
|
426
|
+
before_normalize: []
|
|
427
|
+
after_normalize: []
|
|
428
|
+
before_prd: []
|
|
429
|
+
after_prd: []
|
|
430
|
+
before_workflow: []
|
|
431
|
+
after_workflow: []
|
|
432
|
+
before_wireframe: []
|
|
433
|
+
after_wireframe: []
|
|
434
|
+
before_stories: []
|
|
435
|
+
after_stories: []
|
|
436
|
+
before_techspec: []
|
|
437
|
+
after_techspec: []
|
|
438
|
+
before_validate: []
|
|
439
|
+
after_validate: []
|
|
440
440
|
`;
|
package/dist/i18n/en.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"user_action": "User action",
|
|
3
|
-
"main_flow": "Main Flow",
|
|
4
|
-
"user": "User",
|
|
5
|
-
"success": "Success",
|
|
6
|
-
"error": "Error",
|
|
7
|
-
"flow_focus": "Flow Focus",
|
|
8
|
-
"initial_version": "Initial version",
|
|
9
|
-
"fix_revision": "Post-validation fix revision",
|
|
10
|
-
"primary_user": "Primary user",
|
|
11
|
-
"back": "Back",
|
|
12
|
-
"next": "Next",
|
|
13
|
-
"save": "Save",
|
|
14
|
-
"content": "Content",
|
|
15
|
-
"primary_info_area": "Primary information area",
|
|
16
|
-
"status_indicator": "Status indicator",
|
|
17
|
-
"form": "Form",
|
|
18
|
-
"field": "Field",
|
|
19
|
-
"description": "Description",
|
|
20
|
-
"contract": "Contract",
|
|
21
|
-
"actor": "Actor",
|
|
22
|
-
"detailed_input_area": "Detailed Input Area",
|
|
23
|
-
"upload_area": "Upload Area",
|
|
24
|
-
"low_fidelity_wireframe": "Low-fidelity wireframe.",
|
|
25
|
-
"confirmation_text": "Confirmation text",
|
|
26
|
-
"header_and_navigation": "Header and navigation",
|
|
27
|
-
"content_section": "Content section",
|
|
28
|
-
"form_section": "Form section",
|
|
29
|
-
"text_input": "Text input",
|
|
30
|
-
"to_be_refined": "To be refined.",
|
|
31
|
-
"note": "Note",
|
|
32
|
-
"requirement_item": "Requirement item",
|
|
33
|
-
"contract_coverage": "Contract coverage",
|
|
34
|
-
"screen": "Screen",
|
|
35
|
-
"for_artifact": "for",
|
|
36
|
-
"fix_proposal": "Fix Proposal",
|
|
37
|
-
"fix_complete": "Fix complete — validation passed.",
|
|
38
|
-
"fix_still_failing": "Fix applied but validation still failing.",
|
|
39
|
-
"fix_cancelled": "Fix cancelled.",
|
|
40
|
-
"no_issues": "No blocking issues found. Nothing to fix.",
|
|
41
|
-
"issues_found": "Issues found",
|
|
42
|
-
"artifacts_to_regenerate": "Artifacts to regenerate",
|
|
43
|
-
"general": "General",
|
|
44
|
-
"suggestion_prefix": "→"
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"user_action": "User action",
|
|
3
|
+
"main_flow": "Main Flow",
|
|
4
|
+
"user": "User",
|
|
5
|
+
"success": "Success",
|
|
6
|
+
"error": "Error",
|
|
7
|
+
"flow_focus": "Flow Focus",
|
|
8
|
+
"initial_version": "Initial version",
|
|
9
|
+
"fix_revision": "Post-validation fix revision",
|
|
10
|
+
"primary_user": "Primary user",
|
|
11
|
+
"back": "Back",
|
|
12
|
+
"next": "Next",
|
|
13
|
+
"save": "Save",
|
|
14
|
+
"content": "Content",
|
|
15
|
+
"primary_info_area": "Primary information area",
|
|
16
|
+
"status_indicator": "Status indicator",
|
|
17
|
+
"form": "Form",
|
|
18
|
+
"field": "Field",
|
|
19
|
+
"description": "Description",
|
|
20
|
+
"contract": "Contract",
|
|
21
|
+
"actor": "Actor",
|
|
22
|
+
"detailed_input_area": "Detailed Input Area",
|
|
23
|
+
"upload_area": "Upload Area",
|
|
24
|
+
"low_fidelity_wireframe": "Low-fidelity wireframe.",
|
|
25
|
+
"confirmation_text": "Confirmation text",
|
|
26
|
+
"header_and_navigation": "Header and navigation",
|
|
27
|
+
"content_section": "Content section",
|
|
28
|
+
"form_section": "Form section",
|
|
29
|
+
"text_input": "Text input",
|
|
30
|
+
"to_be_refined": "To be refined.",
|
|
31
|
+
"note": "Note",
|
|
32
|
+
"requirement_item": "Requirement item",
|
|
33
|
+
"contract_coverage": "Contract coverage",
|
|
34
|
+
"screen": "Screen",
|
|
35
|
+
"for_artifact": "for",
|
|
36
|
+
"fix_proposal": "Fix Proposal",
|
|
37
|
+
"fix_complete": "Fix complete — validation passed.",
|
|
38
|
+
"fix_still_failing": "Fix applied but validation still failing.",
|
|
39
|
+
"fix_cancelled": "Fix cancelled.",
|
|
40
|
+
"no_issues": "No blocking issues found. Nothing to fix.",
|
|
41
|
+
"issues_found": "Issues found",
|
|
42
|
+
"artifacts_to_regenerate": "Artifacts to regenerate",
|
|
43
|
+
"general": "General",
|
|
44
|
+
"suggestion_prefix": "→"
|
|
45
|
+
}
|