@papi-ai/server 0.7.44 → 0.7.46
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/prompts.js
CHANGED
|
@@ -512,6 +512,16 @@ function buildPlanUserMessage(ctx) {
|
|
|
512
512
|
if (ctx.board) {
|
|
513
513
|
parts.push("### Board", "", ctx.board, "");
|
|
514
514
|
}
|
|
515
|
+
if (ctx.resurfacedBlockers) {
|
|
516
|
+
parts.push(
|
|
517
|
+
"### Ready to Unblock (typed blockers now resolved)",
|
|
518
|
+
"",
|
|
519
|
+
"These tasks are Blocked but their typed dependency has cleared. Treat them as actionable candidates \u2014 resurface them into the cycle (or confirm they still belong Blocked), do not leave them sitting.",
|
|
520
|
+
"",
|
|
521
|
+
ctx.resurfacedBlockers,
|
|
522
|
+
""
|
|
523
|
+
);
|
|
524
|
+
}
|
|
515
525
|
if (ctx.candidateTaskFullNotes) {
|
|
516
526
|
parts.push("### Full Notes for Candidate Tasks", "", ctx.candidateTaskFullNotes, "");
|
|
517
527
|
}
|
|
@@ -649,6 +659,14 @@ function buildHandoffsOnlyUserMessage(inputs) {
|
|
|
649
659
|
}
|
|
650
660
|
return parts.join("\n");
|
|
651
661
|
}
|
|
662
|
+
function extractDependencyChain(displayText) {
|
|
663
|
+
const match = displayText.match(
|
|
664
|
+
/^##\s+Dependency Chain[^\n]*\n([\s\S]*?)(?=\n#{2,3}\s|$(?![\s\S]))/m
|
|
665
|
+
);
|
|
666
|
+
if (!match) return void 0;
|
|
667
|
+
const body = match[1].trim();
|
|
668
|
+
return body.length > 0 ? body : void 0;
|
|
669
|
+
}
|
|
652
670
|
function parseStructuredOutput(raw) {
|
|
653
671
|
const marker = "<!-- PAPI_STRUCTURED_OUTPUT -->";
|
|
654
672
|
const markerIdx = raw.indexOf(marker);
|
|
@@ -664,6 +682,7 @@ function parseStructuredOutput(raw) {
|
|
|
664
682
|
try {
|
|
665
683
|
const parsed = JSON.parse(jsonMatch[1].trim());
|
|
666
684
|
const data = coerceStructuredOutput(parsed);
|
|
685
|
+
data.dependencyChain = extractDependencyChain(displayText);
|
|
667
686
|
return { displayText, data };
|
|
668
687
|
} catch {
|
|
669
688
|
return { displayText, data: null };
|
|
@@ -751,6 +770,7 @@ IMPORTANT: You are running as a non-interactive API call. Do NOT ask the user qu
|
|
|
751
770
|
- **Product impact first, process second.** The reader wants to know: what got better for users, what's broken, what opportunities exist. Internal machinery (AD wording, taxonomy labels, hierarchy status) is secondary \u2014 handle it in a compact appendix, not the main review.
|
|
752
771
|
- **Lead with insight, not data recitation.** Open each section with the strategic takeaway or pattern, THEN support it with cycle data and task references. Bad: "C131 built task-700, C132 built task-710." Good: "The last 5 cycles show a clear shift from infrastructure to user-facing work \u2014 80% of tasks were dashboard or onboarding, up from 30% in the prior review window."
|
|
753
772
|
- **Cycle data first, conversation context second.** Base your review on build reports, cycle logs, board state, and ADs \u2014 not on whatever was discussed earlier in the conversation. If recent conversation context conflicts with the data, flag it but trust the data.
|
|
773
|
+
- **Verify before claiming \u2014 your context is a snapshot, not live state.** The task bodies, doc summaries, prior strategy reviews, and zoom-out framing you were given were written in the cycle they are dated; the product and codebase have moved since. Treat every present-tense claim about current product or code state \u2014 "X is broken", "Y only works in Z", "feature not built", "metric unmeasured", a stalled task "still needs building" \u2014 as a HYPOTHESIS to check, not a fact. If you have tools to inspect the live code or dashboard (grep, file read, running app), verify the claim before asserting it. If you cannot verify, attribute and hedge it explicitly ("per task-NNNN's C303 framing \u2014 unverified against current code") rather than stating it as current fact. A confident claim the reader can falsify in one grep destroys the review's credibility. **Stalled tasks are the highest-risk case:** a task sitting in Backlog for many cycles is frequently already shipped under another task and never closed \u2014 check the code before recommending you build, cancel, or defer it.
|
|
754
774
|
- **Be concise and scannable.** Use short paragraphs, bullet points, and clear headings. Avoid walls of text. The review should be readable in 3 minutes, not 15. Format cycle summaries as compact bullet points, not multi-paragraph narratives.
|
|
755
775
|
- **Every conditional section earns its place.** If a conditional section has nothing meaningful to say, skip it entirely. Do not write "No issues found" or "No concerns" \u2014 just omit the section.
|
|
756
776
|
- **AD housekeeping is an appendix, not the centerpiece.** Just list changes and make them. Don't score every AD individually. Don't ask for approval on wording tweaks \u2014 small changes (confidence bumps, deleting stale ADs, fixing wording) should just happen. Only flag ADs that represent a genuine strategic question.
|
|
@@ -1491,6 +1511,7 @@ export {
|
|
|
1491
1511
|
buildReviewSystemPrompt,
|
|
1492
1512
|
buildReviewUserMessage,
|
|
1493
1513
|
buildVisionTasksPrompt,
|
|
1514
|
+
extractDependencyChain,
|
|
1494
1515
|
parseReviewStructuredOutput,
|
|
1495
1516
|
parseStrategyChangeOutput,
|
|
1496
1517
|
parseStructuredOutput
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papi-ai/server",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "PAPI MCP server
|
|
3
|
+
"version": "0.7.46",
|
|
4
|
+
"description": "PAPI MCP server \u2014 AI-powered sprint planning, build execution, and strategy review for software projects",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
|
-
"mcpName": "io.github.
|
|
6
|
+
"mcpName": "io.github.getpapi/papi",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"exports": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
54
54
|
"@papi-ai/adapter-md": "^0.2.0",
|
|
55
55
|
"@papi-ai/adapter-pg": "^0.2.0",
|
|
56
|
+
"@papi-ai/shared": "^0.1.0",
|
|
56
57
|
"@papi-ai/skills": "^0.1.0",
|
|
57
58
|
"js-yaml": "^4.1.0"
|
|
58
59
|
},
|
|
@@ -7,13 +7,13 @@ description: Invoke for cross-project patterns, dogfood-derived workflows, or ad
|
|
|
7
7
|
|
|
8
8
|
## When to Start a New Conversation
|
|
9
9
|
|
|
10
|
-
Your AI host manages its own context — it compacts automatically as a conversation grows, so you
|
|
10
|
+
Your AI host manages its own context — it compacts automatically as a conversation grows, so you almost never need to restart. **Stay in the same conversation.** Keep building, planning, and reviewing in one place; `orient` re-grounds you whenever you need it.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
12
|
+
The **only** trigger for suggesting a fresh conversation is a real context signal:
|
|
13
|
+
- Your host tells you it just compacted, or you notice earlier messages have dropped.
|
|
14
|
+
- You're near the context/window limit, or a verified context-usage reading is high.
|
|
15
15
|
|
|
16
|
-
Do NOT
|
|
16
|
+
Below that, say nothing about restarting. Do NOT suggest a fresh conversation because of the task type (a design session, a strategy review, "starting the next cycle"), the number of tasks built, elapsed time, or a sense that "we've done a lot" — none of those are context signals. A fresh conversation costs a full re-orient; only pay it when context pressure is actually there.
|
|
17
17
|
|
|
18
18
|
## Advanced Patterns
|
|
19
19
|
|
|
@@ -10,7 +10,7 @@ description: Invoke when running strategy_review or making Active Decision chang
|
|
|
10
10
|
Every 5 cycles, PAPI offers a strategy review — a deep analysis of velocity, estimation accuracy, active decisions, and project direction.
|
|
11
11
|
|
|
12
12
|
- **Don't skip them.** They're where compounding value comes from.
|
|
13
|
-
-
|
|
13
|
+
- Run the review in your current conversation — a fresh one is only warranted if you're genuinely under context pressure (your host just compacted, or you're near the limit), never just because a review is next.
|
|
14
14
|
- Reviews produce recommendations that feed into the next plan.
|
|
15
15
|
- If the review recommends AD changes, use `strategy_change` to apply them.
|
|
16
16
|
|