@papi-ai/server 0.5.0 → 0.5.2
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/index.js +1874 -470
- package/dist/prompts.js +1096 -0
- package/package.json +3 -2
- package/skills/check-mcp.md +46 -0
- package/skills/{sprint-status.md → cycle-status.md} +9 -9
- package/skills/papi-audit.md +52 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papi-ai/server",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
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",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js",
|
|
10
|
-
"./prompts": "./
|
|
10
|
+
"./prompts": "./dist/prompts.js"
|
|
11
11
|
},
|
|
12
12
|
"bin": {
|
|
13
13
|
"papi-server": "./dist/index.js"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsup",
|
|
22
|
+
"build:prompts": "tsup src/prompts.ts --format esm",
|
|
22
23
|
"start": "node dist/index.js",
|
|
23
24
|
"test": "vitest run",
|
|
24
25
|
"test:watch": "vitest",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-mcp
|
|
3
|
+
description: >
|
|
4
|
+
Verify the PAPI MCP server is running and healthy.
|
|
5
|
+
Use when the user says "check mcp", "is papi running", "mcp status",
|
|
6
|
+
or at the start of any session that needs PAPI tools.
|
|
7
|
+
Also use proactively if PAPI MCP tools are expected but not appearing.
|
|
8
|
+
invocable: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Check MCP Server Health
|
|
12
|
+
|
|
13
|
+
Run these steps in order and report the result clearly.
|
|
14
|
+
|
|
15
|
+
## Step 1: Read config
|
|
16
|
+
|
|
17
|
+
Read `.mcp.json` from the project root. Extract the server command, args, and env vars.
|
|
18
|
+
|
|
19
|
+
If `.mcp.json` doesn't exist, stop and report: "No MCP server configured. Create .mcp.json to connect PAPI."
|
|
20
|
+
|
|
21
|
+
## Step 2: Check connection
|
|
22
|
+
|
|
23
|
+
Look at the available tools list. If PAPI MCP tools (like `orient`, `plan`, `build_list`, `build_execute`) are present, the server is connected.
|
|
24
|
+
|
|
25
|
+
If not, tell the user:
|
|
26
|
+
|
|
27
|
+
"PAPI MCP server is configured but not connected. Try one of these:
|
|
28
|
+
1. Restart Claude Code (close and reopen)
|
|
29
|
+
2. In VS Code: Cmd+Shift+P → 'Developer: Reload Window'
|
|
30
|
+
3. Check that npx can run: `npx @papi-ai/server --help`"
|
|
31
|
+
|
|
32
|
+
## Step 3: Quick health check
|
|
33
|
+
|
|
34
|
+
If tools are available, run `orient` to verify the server can reach the database and return project state.
|
|
35
|
+
|
|
36
|
+
If orient fails, check:
|
|
37
|
+
- Is `PAPI_DATA_API_KEY` set in `.mcp.json` env?
|
|
38
|
+
- Is the API key valid? (Try regenerating from the dashboard onboarding page)
|
|
39
|
+
|
|
40
|
+
## Step 4: Report
|
|
41
|
+
|
|
42
|
+
Summarise with one of:
|
|
43
|
+
- **Healthy**: Server configured, tools available, database connected
|
|
44
|
+
- **Configured but disconnected**: .mcp.json exists, tools not showing — needs restart
|
|
45
|
+
- **Connection error**: Tools available but database unreachable — check API key
|
|
46
|
+
- **Not configured**: No .mcp.json found
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: cycle-status
|
|
3
3
|
description: >
|
|
4
|
-
Show current
|
|
5
|
-
Use when the user says /
|
|
6
|
-
"
|
|
4
|
+
Show current cycle health, board state, and recommended next action.
|
|
5
|
+
Use when the user says /cycle-status, "what's the status", "where are we",
|
|
6
|
+
"cycle health", or at the start of a session to orient.
|
|
7
7
|
invocable: true
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# /
|
|
10
|
+
# /cycle-status — Cycle Health Check
|
|
11
11
|
|
|
12
12
|
Run the PAPI health and build list tools to give the user a complete picture of where things stand.
|
|
13
13
|
|
|
14
14
|
## Steps
|
|
15
15
|
|
|
16
|
-
1. **Run `health`** — the PAPI MCP tool that returns
|
|
16
|
+
1. **Run `health`** — the PAPI MCP tool that returns cycle number, board state, strategy review cadence, Active Decisions summary, velocity, and estimation accuracy.
|
|
17
17
|
|
|
18
18
|
2. **Run `build_list`** — shows tasks with BUILD HANDOFFs ready for execution, prioritised by status (In Progress first, then Backlog).
|
|
19
19
|
|
|
20
20
|
3. **Summarise clearly:**
|
|
21
|
-
- "You're on
|
|
22
|
-
- Or: "
|
|
21
|
+
- "You're on Cycle N. X tasks to build, Y builds pending review."
|
|
22
|
+
- Or: "Cycle N is complete — ready for the next plan."
|
|
23
23
|
- Flag any issues: stale In Progress tasks, strategy review due, orphaned branches.
|
|
24
24
|
|
|
25
25
|
4. **Suggest the next action:**
|
|
26
26
|
- If tasks are In Review: "Run `review_submit` to accept/reject pending reviews."
|
|
27
27
|
- If tasks are in Backlog: "Pick a task to build — use `/next-task` to start."
|
|
28
|
-
- If all tasks are Done: "All tasks complete. Run `plan` to create the next
|
|
28
|
+
- If all tasks are Done: "All tasks complete. Run `plan` to create the next cycle."
|
|
29
29
|
- If strategy review is due: mention it before suggesting plan.
|
|
30
30
|
|
|
31
31
|
## Output format
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: papi-audit
|
|
3
|
+
description: >
|
|
4
|
+
Audit the latest changes in this branch for bugs and compliance with the project's conventions.
|
|
5
|
+
Use when the user says "audit", "review changes", "check my code", "check my branch",
|
|
6
|
+
or after completing a build task before submitting for review.
|
|
7
|
+
invocable: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# PAPI Audit — Bug & Doc Drift Check
|
|
11
|
+
|
|
12
|
+
Audit all changes on the current branch for bugs, convention violations, and documentation drift.
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
### 1. Identify changed files
|
|
17
|
+
|
|
18
|
+
Run `git diff origin/main --name-only` to find all files modified on this branch. If no changes are found, report "No changes to audit" and stop.
|
|
19
|
+
|
|
20
|
+
### 2. Read and review each changed file
|
|
21
|
+
|
|
22
|
+
For each changed file, read it and review for:
|
|
23
|
+
|
|
24
|
+
**Bug check:**
|
|
25
|
+
- Logic errors, off-by-one mistakes, incorrect conditions
|
|
26
|
+
- Unhandled edge cases (null, undefined, empty inputs)
|
|
27
|
+
- Race conditions or state management issues
|
|
28
|
+
- Functions that could throw but aren't wrapped in try/catch where needed
|
|
29
|
+
- Incorrect type narrowing or unsafe casts
|
|
30
|
+
|
|
31
|
+
**Code style (from CLAUDE.md):**
|
|
32
|
+
- Check all conventions defined in CLAUDE.md and flag any violations
|
|
33
|
+
- Pay special attention to naming, typing, error handling, and import patterns
|
|
34
|
+
|
|
35
|
+
### 3. Documentation check
|
|
36
|
+
|
|
37
|
+
For each changed source file, check if any documentation in `docs/` describes behaviour, architecture, or file interactions that the change modified. Specifically:
|
|
38
|
+
- If a doc needs updating, report it as a finding with severity "Doc drift" and specify which section is stale.
|
|
39
|
+
|
|
40
|
+
### 4. Report findings
|
|
41
|
+
|
|
42
|
+
For each issue found:
|
|
43
|
+
- **File**: path and line number
|
|
44
|
+
- **Severity**: Bug / Convention violation / Doc drift / Nitpick
|
|
45
|
+
- **Issue**: What's wrong
|
|
46
|
+
- **Fix**: How to fix it
|
|
47
|
+
|
|
48
|
+
If no issues are found, state that the changes are clean.
|
|
49
|
+
|
|
50
|
+
### 5. Pre-existing issues
|
|
51
|
+
|
|
52
|
+
Note pre-existing issues separately — flag them but don't fix them unless they interact with the new changes.
|