@papi-ai/skills 0.1.0 → 0.1.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/lib/manifest.mjs +41 -0
- package/manifest.json +7 -2
- package/package.json +2 -2
- package/skills/papi-install/SKILL.md +67 -0
package/lib/manifest.mjs
CHANGED
|
@@ -49,6 +49,47 @@ function walk(root, dir, out) {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* task-2163: owner-only skills that must NEVER ship in the public @papi-ai/skills
|
|
54
|
+
* pack — they expose internal owner workflow or commercial detail. This is the
|
|
55
|
+
* distribution security control expressed as a RULE, not hand-curation: the
|
|
56
|
+
* manifest build asserts none of these are present in skills/ and fails CLOSED
|
|
57
|
+
* if one ever leaks. Superset of the handoff strip-list (caveman, stream-mode,
|
|
58
|
+
* owner-actions, crm, burn, build-in-public) plus the owner/commercial and
|
|
59
|
+
* host-loop skills that are out of scope for the shared pack.
|
|
60
|
+
*/
|
|
61
|
+
export const OWNER_ONLY_SKILLS = new Set([
|
|
62
|
+
'caveman',
|
|
63
|
+
'stream-mode',
|
|
64
|
+
'owner-actions',
|
|
65
|
+
'crm',
|
|
66
|
+
'burn',
|
|
67
|
+
'burn-dashboard',
|
|
68
|
+
'build-in-public',
|
|
69
|
+
'broadcast-compose',
|
|
70
|
+
'cold-outbound',
|
|
71
|
+
'winback',
|
|
72
|
+
'papi-auto', // host-loop (papi-auto-class), out of scope for the pack
|
|
73
|
+
]);
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Assert no owner-only skill is present in the given skill-name list. Throws a
|
|
77
|
+
* descriptive error naming the offenders so the pack build fails CLOSED rather
|
|
78
|
+
* than silently shipping internal workflow. Pure — callers pass the scanned
|
|
79
|
+
* names, so it is trivially testable and reusable by any future packer.
|
|
80
|
+
*/
|
|
81
|
+
export function assertNoOwnerOnlySkills(names) {
|
|
82
|
+
const leaked = names.filter((n) => OWNER_ONLY_SKILLS.has(n));
|
|
83
|
+
if (leaked.length > 0) {
|
|
84
|
+
throw new Error(
|
|
85
|
+
`@papi-ai/skills refusing to build: owner-only skill(s) present in the public pack — ${leaked.join(', ')}. ` +
|
|
86
|
+
`These expose internal owner/commercial workflow and must never ship. Remove them from packages/skills/skills/ ` +
|
|
87
|
+
`(they belong in .claude/skills/ only); if one is genuinely generalizable, remove it from OWNER_ONLY_SKILLS in ` +
|
|
88
|
+
`lib/manifest.mjs with justification.`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
52
93
|
/** Load and parse the package manifest. Throws if missing/malformed. */
|
|
53
94
|
export function loadManifest(packageRoot = PACKAGE_ROOT) {
|
|
54
95
|
const raw = readFileSync(join(packageRoot, 'manifest.json'), 'utf8');
|
package/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "0.1.
|
|
4
|
-
"generatedAt": "2026-
|
|
3
|
+
"packageVersion": "0.1.2",
|
|
4
|
+
"generatedAt": "2026-08-01T18:51:37.168Z",
|
|
5
5
|
"skills": [
|
|
6
6
|
{
|
|
7
7
|
"name": "check-mcp",
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
"kind": "lazy",
|
|
29
29
|
"checksum": "ae5da6393e14fcd5"
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
"name": "papi-install",
|
|
33
|
+
"kind": "eager",
|
|
34
|
+
"checksum": "2b8a7ae5832fcad0"
|
|
35
|
+
},
|
|
31
36
|
{
|
|
32
37
|
"name": "papi-plan",
|
|
33
38
|
"kind": "lazy",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papi-ai/skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "PAPI's shareable Claude Code skill bundle — single source of truth, installed (not copied) into projects with pinned versioning",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
38
|
-
"url": "https://github.com/
|
|
38
|
+
"url": "https://github.com/getpapi/papi.git",
|
|
39
39
|
"directory": "packages/skills"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: papi-install
|
|
3
|
+
description: Connect PAPI (Persistent Adaptive Project Intelligence) to this project — one command, no config editing. Use when the user says "install papi", "set up papi", "connect papi", "add papi", or asks how to get structured plan/build/review cycles for their project. Also use when PAPI tools are expected but no papi MCP server is configured.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Install PAPI
|
|
7
|
+
|
|
8
|
+
PAPI gives your AI coding sessions structured plan → build → review cycles
|
|
9
|
+
with memory that compounds across sessions. Installing means connecting the
|
|
10
|
+
PAPI MCP server — one command, no JSON editing.
|
|
11
|
+
|
|
12
|
+
> Source of truth for the connection commands: `lib/install-snippets.ts` in
|
|
13
|
+
> the PAPI repo (remoteClaudeCodeOAuthCommand / setup CLI). This skill embeds
|
|
14
|
+
> those canonical commands verbatim — a CI test pins them; if they drift the
|
|
15
|
+
> test fails. Do not improvise different URLs or flags.
|
|
16
|
+
|
|
17
|
+
## Step 1: Check for an existing connection
|
|
18
|
+
|
|
19
|
+
Look for a `papi` entry in `.mcp.json` (project root) or in the user's MCP
|
|
20
|
+
client config. If one exists, don't reinstall — run the `orient` tool and
|
|
21
|
+
report which cycle the project is on.
|
|
22
|
+
|
|
23
|
+
## Step 2: Connect (pick ONE path)
|
|
24
|
+
|
|
25
|
+
### Path A — remote connector (recommended, works from any directory)
|
|
26
|
+
|
|
27
|
+
Run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
claude mcp add --transport http papi https://mcp.getpapi.ai/mcp
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Claude Code opens a browser tab so the user signs in (GitHub or email) and the
|
|
34
|
+
token is stored automatically. No keys to paste.
|
|
35
|
+
|
|
36
|
+
### Path B — local server via device auth (when the user prefers stdio)
|
|
37
|
+
|
|
38
|
+
Run in the project folder:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx @papi-ai/server setup
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This is an RFC 8628 device-auth flow: it opens the browser for a one-click
|
|
45
|
+
approval, then mints the project and writes `.mcp.json` itself. Restart the
|
|
46
|
+
MCP client afterwards so it picks up the new server.
|
|
47
|
+
|
|
48
|
+
Never hand-edit tokens into files, never echo tokens into the chat, and never
|
|
49
|
+
configure a direct database connection for an external user — external users
|
|
50
|
+
go through the hosted proxy (Path A) or the device-auth flow (Path B) only.
|
|
51
|
+
|
|
52
|
+
## Step 3: Verify
|
|
53
|
+
|
|
54
|
+
After connecting (restart the session if the tools don't appear):
|
|
55
|
+
|
|
56
|
+
1. Call the `setup` tool if this project has never used PAPI — it scaffolds
|
|
57
|
+
the project brief and first backlog.
|
|
58
|
+
2. Call `orient` — it should return the project's cycle state.
|
|
59
|
+
|
|
60
|
+
If `orient` answers, the install worked. Tell the user which cycle they're on
|
|
61
|
+
and that `plan` creates their first cycle.
|
|
62
|
+
|
|
63
|
+
## Troubleshooting
|
|
64
|
+
|
|
65
|
+
- Tools missing after install → restart the MCP client (config is read at startup).
|
|
66
|
+
- `401`/auth errors → re-run the Step 2 command; the token may not have been stored.
|
|
67
|
+
- Anything else → run `npx @papi-ai/server doctor` for a read-only diagnostic.
|