@papi-ai/server 0.7.15 → 0.7.16
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/README.md +2 -6
- package/dist/index.js +2825 -923
- package/dist/prompts.js +26 -18
- package/package.json +2 -1
package/dist/prompts.js
CHANGED
|
@@ -286,11 +286,11 @@ ${AD_REJECTION_RULES}
|
|
|
286
286
|
|
|
287
287
|
**UI/visual task detection:** Apply these additions ONLY to tasks whose PRIMARY scope is frontend visual work \u2014 the task's main deliverable must be a UI change, new component, visual design, or page. Do NOT apply to backend tasks, DB migrations, or prompt/config changes that merely mention a dashboard or page in passing. Signal: the task would fail if no .tsx/.css files were changed. If uncertain, skip the UI additions.
|
|
288
288
|
When a task IS a UI task (primary scope is visual/frontend):
|
|
289
|
-
- Add to SCOPE: "Read \`.impeccable.md\` for
|
|
289
|
+
- Add to SCOPE: "Read \`.impeccable.md\` for component patterns, anti-patterns, and dev-loop design rules. Read \`docs/branding/brand-book.html\` for brand identity (positioning, voice, palette as final canon). Use the \`frontend-design\` skill for implementation."
|
|
290
290
|
- For M/L UI tasks, add to SCOPE: "Use the full UI toolchain: Playground (design preview) \u2192 Frontend-design (build) \u2192 Playwright (verify). The playground is the quality bar. Expect 2-3 iterations."
|
|
291
291
|
- Add to ACCEPTANCE CRITERIA: "[ ] Visually verify rendered output in browser \u2014 provide localhost URL or screenshot to user for review." and "[ ] No raw IDs, abbreviations, or jargon visible without human-readable labels or tooltips."
|
|
292
|
-
- If the task involves image selection, add to SCOPE: "Include brand/theme direction constraints for image selection."
|
|
293
|
-
The planner's job is scoping, not design direction. Design decisions happen at build time via \`.impeccable.md\` and the frontend-design skill \u2014 don't try to write design specs in the handoff.
|
|
292
|
+
- If the task involves image selection, add to SCOPE: "Include brand/theme direction constraints for image selection \u2014 pull from \`docs/branding/brand-book.html\` for canonical brand identity."
|
|
293
|
+
The planner's job is scoping, not design direction. Design decisions happen at build time via \`.impeccable.md\` (dev patterns) + \`docs/branding/brand-book.html\` (brand identity) and the frontend-design skill \u2014 don't try to write design specs in the handoff.
|
|
294
294
|
|
|
295
295
|
11. **New Tasks (max 3 per cycle)** \u2014 Actively mine the Recent Build Reports for task candidates. For each report, check:
|
|
296
296
|
- **Discovered Issues:** If a build report lists a discovered issue and no existing board task covers it, propose a new task.
|
|
@@ -358,7 +358,7 @@ var PLAN_FRAGMENT_SPIKE = `
|
|
|
358
358
|
var PLAN_FRAGMENT_DESIGN_BRIEF = `
|
|
359
359
|
**Design brief task detection:** When a task's task type is "design-brief", generate a DESIGN BRIEF handoff. Replace the standard SCOPE (DO THIS) section with these type-specific sections:
|
|
360
360
|
- AUDIENCE: Who this design is for \u2014 persona and context of use (e.g. "non-technical Owner, first dashboard visit")
|
|
361
|
-
- BRAND CONSTRAINTS: Palette, typography, tone \u2014 pull from \`.impeccable.md\`
|
|
361
|
+
- BRAND CONSTRAINTS: Palette, typography, tone \u2014 pull from \`.impeccable.md\` (dev patterns, anti-patterns, component rules) AND \`docs/branding/brand-book.html\` (brand identity, positioning, voice canon) if present. If neither exists, state "No brand doc \u2014 Owner should define constraints before starting."
|
|
362
362
|
- DELIVERABLE FORMAT: What the output looks like \u2014 Claude Design handoff package / annotated mockup / style spec. Be specific so the person doing the work knows what "done" means.
|
|
363
363
|
- REVIEW POINTS: What the Owner must approve before the design is considered done (e.g. layout, copy, colour, imagery).
|
|
364
364
|
Keep SCOPE BOUNDARY, ACCEPTANCE CRITERIA, SECURITY CONSIDERATIONS, and PRE-BUILD VERIFICATION sections as normal.
|
|
@@ -390,11 +390,11 @@ var PLAN_FRAGMENT_OPS_BRIEF = `
|
|
|
390
390
|
var PLAN_FRAGMENT_UI = `
|
|
391
391
|
**UI/visual task detection:** Apply these additions ONLY to tasks whose PRIMARY scope is frontend visual work \u2014 the task's main deliverable must be a UI change, new component, visual design, or page. Do NOT apply to backend tasks, DB migrations, or prompt/config changes that merely mention a dashboard or page in passing. Signal: the task would fail if no .tsx/.css files were changed. If uncertain, skip the UI additions.
|
|
392
392
|
When a task IS a UI task (primary scope is visual/frontend):
|
|
393
|
-
- Add to SCOPE: "Read \`.impeccable.md\` for
|
|
393
|
+
- Add to SCOPE: "Read \`.impeccable.md\` for component patterns, anti-patterns, and dev-loop design rules. Read \`docs/branding/brand-book.html\` for brand identity (positioning, voice, palette as final canon). Use the \`frontend-design\` skill for implementation."
|
|
394
394
|
- For M/L UI tasks, add to SCOPE: "Use the full UI toolchain: Playground (design preview) \u2192 Frontend-design (build) \u2192 Playwright (verify). The playground is the quality bar. Expect 2-3 iterations."
|
|
395
395
|
- Add to ACCEPTANCE CRITERIA: "[ ] Visually verify rendered output in browser \u2014 provide localhost URL or screenshot to user for review." and "[ ] No raw IDs, abbreviations, or jargon visible without human-readable labels or tooltips."
|
|
396
|
-
- If the task involves image selection, add to SCOPE: "Include brand/theme direction constraints for image selection."
|
|
397
|
-
The planner's job is scoping, not design direction. Design decisions happen at build time via \`.impeccable.md\` and the frontend-design skill \u2014 don't try to write design specs in the handoff.`;
|
|
396
|
+
- If the task involves image selection, add to SCOPE: "Include brand/theme direction constraints for image selection \u2014 pull from \`docs/branding/brand-book.html\` for canonical brand identity."
|
|
397
|
+
The planner's job is scoping, not design direction. Design decisions happen at build time via \`.impeccable.md\` (dev patterns) + \`docs/branding/brand-book.html\` (brand identity) and the frontend-design skill \u2014 don't try to write design specs in the handoff.`;
|
|
398
398
|
var PLAN_FRAGMENT_PRODUCT_BRIEF = `
|
|
399
399
|
12. **Product Brief** \u2014 Check whether the product brief still reflects reality. Update the brief when ANY of these apply:
|
|
400
400
|
- A new AD was created or an existing AD was superseded that changes product scope, target user, or positioning
|
|
@@ -984,7 +984,7 @@ After your natural language output, include this EXACT format on its own line:
|
|
|
984
984
|
"content": "string \u2014 specific observation from using PAPI on this project (e.g. 'deprioritise clears handoffs unnecessarily, wasting planner tokens')"
|
|
985
985
|
}
|
|
986
986
|
],
|
|
987
|
-
"northStar": "string or null \u2014 the current North Star statement. Include if you assessed it in section 4 and it is still accurate (copy the current statement verbatim). Include the updated version if you revised it. Use null ONLY if no North Star has ever been set for this project."
|
|
987
|
+
"northStar": "string or null \u2014 the current North Star statement. Include if you assessed it in section 4 and it is still accurate (copy the current statement verbatim). Include the updated version if you revised it. Use null ONLY if no North Star has ever been set for this project. PLAIN TEXT ONLY \u2014 no markdown formatting, no **bold**, no _italic_, no ##headings, no quote marks around the whole statement. Just the statement itself."
|
|
988
988
|
}
|
|
989
989
|
\`\`\`
|
|
990
990
|
|
|
@@ -1292,12 +1292,16 @@ This is an existing project being adopted into PAPI. Use the codebase analysis b
|
|
|
1292
1292
|
|
|
1293
1293
|
${inputs.codebaseContext}
|
|
1294
1294
|
` : "";
|
|
1295
|
+
const description = inputs.description?.trim() ? `**Description:** ${inputs.description}
|
|
1296
|
+
` : `**Description:** (not provided \u2014 derive from the codebase analysis below)
|
|
1297
|
+
`;
|
|
1298
|
+
const targetUsers = inputs.targetUsers?.trim() ? `**Target users:** ${inputs.targetUsers}
|
|
1299
|
+
` : `**Target users:** (not provided \u2014 derive from the codebase analysis below)
|
|
1300
|
+
`;
|
|
1295
1301
|
return `Generate a Product Brief for this project.
|
|
1296
1302
|
|
|
1297
1303
|
**Project name:** ${inputs.projectName}
|
|
1298
|
-
**
|
|
1299
|
-
**Target users:** ${inputs.targetUsers}
|
|
1300
|
-
**Key problems it solves:** ${inputs.problems}${codebaseSection}
|
|
1304
|
+
${description}${targetUsers}**Key problems it solves:** ${inputs.problems}${codebaseSection}
|
|
1301
1305
|
|
|
1302
1306
|
Return the Product Brief using this exact markdown structure (fill in each section with specific, concrete content \u2014 no placeholder text):
|
|
1303
1307
|
|
|
@@ -1385,8 +1389,8 @@ function buildAdSeedPrompt(ctx) {
|
|
|
1385
1389
|
"",
|
|
1386
1390
|
`**Project:** ${ctx.projectName}`,
|
|
1387
1391
|
`**Type:** ${ctx.projectType}`,
|
|
1388
|
-
`**Description:** ${ctx.description}`,
|
|
1389
|
-
`**Target users:** ${ctx.targetUsers}`,
|
|
1392
|
+
`**Description:** ${ctx.description?.trim() || "(not provided \u2014 derive from project type and problems)"}`,
|
|
1393
|
+
`**Target users:** ${ctx.targetUsers?.trim() || "(not provided \u2014 infer reasonable defaults from project type)"}`,
|
|
1390
1394
|
`**Problems solved:** ${ctx.problems}`
|
|
1391
1395
|
];
|
|
1392
1396
|
parts.push(`**Team size:** ${ctx.teamSize}`);
|
|
@@ -1431,8 +1435,8 @@ function buildConventionsPrompt(ctx) {
|
|
|
1431
1435
|
"",
|
|
1432
1436
|
`**Project:** ${ctx.projectName}`,
|
|
1433
1437
|
`**Type:** ${ctx.projectType}`,
|
|
1434
|
-
`**Description:** ${ctx.description}`,
|
|
1435
|
-
`**Target users:** ${ctx.targetUsers}`,
|
|
1438
|
+
`**Description:** ${ctx.description?.trim() || "(not provided \u2014 infer from project type)"}`,
|
|
1439
|
+
`**Target users:** ${ctx.targetUsers?.trim() || "(not provided \u2014 infer reasonable defaults from project type)"}`,
|
|
1436
1440
|
`**Problems solved:** ${ctx.problems}`,
|
|
1437
1441
|
`**Team size:** ${ctx.teamSize}`,
|
|
1438
1442
|
`**Deployment:** ${ctx.deploymentTarget}`
|
|
@@ -1470,12 +1474,16 @@ Return a JSON array of 3-10 tasks. Each task must have:
|
|
|
1470
1474
|
- Tasks should be specific enough to execute without further investigation
|
|
1471
1475
|
- Maximum 10 tasks \u2014 fewer is better if the codebase is well-maintained`;
|
|
1472
1476
|
function buildInitialTasksPrompt(inputs) {
|
|
1477
|
+
const description = inputs.description?.trim() ? `**Description:** ${inputs.description}
|
|
1478
|
+
` : `**Description:** (not provided \u2014 derive from the codebase analysis below)
|
|
1479
|
+
`;
|
|
1480
|
+
const targetUsers = inputs.targetUsers?.trim() ? `**Target users:** ${inputs.targetUsers}
|
|
1481
|
+
` : `**Target users:** (not provided \u2014 derive from the codebase analysis below)
|
|
1482
|
+
`;
|
|
1473
1483
|
return `Analyse this existing codebase and generate initial backlog tasks.
|
|
1474
1484
|
|
|
1475
1485
|
**Project:** ${inputs.projectName}
|
|
1476
|
-
|
|
1477
|
-
**Target users:** ${inputs.targetUsers}
|
|
1478
|
-
|
|
1486
|
+
${description}${targetUsers}
|
|
1479
1487
|
${inputs.codebaseContext}
|
|
1480
1488
|
|
|
1481
1489
|
Return a JSON array of 3-10 tasks based on gaps, improvements, and next steps visible from the codebase analysis above.`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papi-ai/server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
4
4
|
"description": "PAPI MCP server — AI-powered sprint planning, build execution, and strategy review for software projects",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"start": "node dist/index.js",
|
|
24
24
|
"test": "vitest run",
|
|
25
25
|
"test:watch": "vitest",
|
|
26
|
+
"lint": "eslint src",
|
|
26
27
|
"prepack": "rm -rf dist && npm run build"
|
|
27
28
|
},
|
|
28
29
|
"keywords": [
|