@papi-ai/server 0.2.0-alpha.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/README.md +120 -0
- package/dist/index.js +13540 -0
- package/package.json +53 -0
- package/skills/next-task.md +33 -0
- package/skills/quick-review.md +38 -0
- package/skills/sprint-status.md +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @papi-ai/server
|
|
2
|
+
|
|
3
|
+
AI-powered sprint planning, build execution, and strategy review for software projects. PAPI is an MCP (Model Context Protocol) server that connects to Claude Code to manage your project's planning lifecycle.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### From npm (recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @papi/server
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### From source
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/cathalos92/papi-ui.git
|
|
17
|
+
cd papi-ui
|
|
18
|
+
npm install
|
|
19
|
+
npm run mcp-build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The server bundles `@papi-ai/adapter-md` at build time — no separate adapter install needed.
|
|
23
|
+
|
|
24
|
+
## Claude Code Setup
|
|
25
|
+
|
|
26
|
+
Add PAPI to your project's `.mcp.json` file:
|
|
27
|
+
|
|
28
|
+
### If installed from npm
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"mcpServers": {
|
|
33
|
+
"papi": {
|
|
34
|
+
"command": "npx",
|
|
35
|
+
"args": ["papi-server", "--project", "/path/to/your/project"],
|
|
36
|
+
"env": {
|
|
37
|
+
"PAPI_ADAPTER": "pg",
|
|
38
|
+
"DATABASE_URL": "postgresql://...",
|
|
39
|
+
"PAPI_PROJECT_ID": "your-project-uuid"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### If installed from source
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"papi": {
|
|
52
|
+
"command": "node",
|
|
53
|
+
"args": ["/path/to/papi-ui/packages/server/dist/index.js", "--project", "/path/to/your/project"],
|
|
54
|
+
"env": {
|
|
55
|
+
"PAPI_ADAPTER": "pg",
|
|
56
|
+
"DATABASE_URL": "postgresql://...",
|
|
57
|
+
"PAPI_PROJECT_ID": "your-project-uuid"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For local-only usage with markdown files (no database), omit the `PAPI_ADAPTER`, `DATABASE_URL`, and `PAPI_PROJECT_ID` variables — the server defaults to the markdown adapter.
|
|
65
|
+
|
|
66
|
+
## Environment Variables
|
|
67
|
+
|
|
68
|
+
| Variable | Required | Default | Description |
|
|
69
|
+
|----------|----------|---------|-------------|
|
|
70
|
+
| `PAPI_PROJECT_DIR` | Yes* | — | Project root directory (alternative to `--project` flag) |
|
|
71
|
+
| `PAPI_ADAPTER` | No | `md` | Storage adapter: `md` (local markdown files) or `pg` (PostgreSQL/Supabase) |
|
|
72
|
+
| `DATABASE_URL` | For pg | — | PostgreSQL connection string (required when `PAPI_ADAPTER=pg`) |
|
|
73
|
+
| `PAPI_PROJECT_ID` | For pg | — | Project UUID in the database (required when `PAPI_ADAPTER=pg`) |
|
|
74
|
+
| `PAPI_API_KEY` | No** | — | Anthropic API key for AI-powered commands (plan, strategy, setup) |
|
|
75
|
+
| `PAPI_AUTO_COMMIT` | No | `true` | Auto-commit `.papi/` changes after plans and builds |
|
|
76
|
+
| `PAPI_AUTO_PR` | No | `true` | Auto-create pull requests after completed builds |
|
|
77
|
+
| `PAPI_BASE_BRANCH` | No | `main` | Base branch for PR creation and plan sync (pull/push) |
|
|
78
|
+
| `PAPI_SLACK_WEBHOOK_URL` | No | — | Slack incoming webhook URL for sprint notifications |
|
|
79
|
+
|
|
80
|
+
\* Either `PAPI_PROJECT_DIR` or `--project` flag is required.
|
|
81
|
+
|
|
82
|
+
\*\* Not required when using the prepare/apply pattern (default). Only needed if calling the Anthropic API directly from the server.
|
|
83
|
+
|
|
84
|
+
## Quick Start
|
|
85
|
+
|
|
86
|
+
Once configured in Claude Code, initialise your project:
|
|
87
|
+
|
|
88
|
+
1. **Setup** — `setup` creates a `.papi/` directory with your Product Brief and planning files
|
|
89
|
+
2. **Plan** — `plan` runs a sprint planning cycle, generates BUILD HANDOFFs for recommended tasks
|
|
90
|
+
3. **Build** — `build list` shows available tasks, `build execute <task-id>` starts implementation
|
|
91
|
+
4. **Report** — After building, call `build execute <task-id>` again with completion details
|
|
92
|
+
5. **Repeat** — Run `plan` again when all sprint tasks are done
|
|
93
|
+
|
|
94
|
+
## Commands
|
|
95
|
+
|
|
96
|
+
| Command | Description | Requires API Key |
|
|
97
|
+
|---------|-------------|:----------------:|
|
|
98
|
+
| `setup` | Initialise a new PAPI project or regenerate Product Brief | Yes |
|
|
99
|
+
| `plan` | Run sprint planning — generates BUILD HANDOFFs for 1-5 tasks | Yes |
|
|
100
|
+
| `build` | List, describe, and execute build tasks | No |
|
|
101
|
+
| `board` | View sprint board, filter tasks, deprioritise stale work | No |
|
|
102
|
+
| `strategy` | Run strategy review or apply a strategic change | Yes |
|
|
103
|
+
| `idea` | Capture a backlog idea without interrupting the current sprint | No |
|
|
104
|
+
| `health` | Sprint health dashboard — cadence, board stats, next action | No |
|
|
105
|
+
| `release` | Cut a versioned release with git tag and changelog | No |
|
|
106
|
+
|
|
107
|
+
## How It Works
|
|
108
|
+
|
|
109
|
+
PAPI manages your project through markdown files in a `.papi/` directory:
|
|
110
|
+
|
|
111
|
+
- `PRODUCT_BRIEF.md` — Your project's vision, users, and roadmap
|
|
112
|
+
- `PLANNING_LOG.md` — Sprint health, active decisions, sprint history
|
|
113
|
+
- `SPRINT_BOARD.md` — All tasks with status, priority, and build handoffs
|
|
114
|
+
- `BUILD_REPORTS.md` — Post-build reports tracking effort and discoveries
|
|
115
|
+
|
|
116
|
+
The AI planner reads this context each sprint to make informed recommendations that compound over time — sprint 20 is smarter than sprint 1 because it has 19 sprints of history to learn from.
|
|
117
|
+
|
|
118
|
+
## License
|
|
119
|
+
|
|
120
|
+
MIT
|