@agimon-ai/po-skill 0.0.0-alpha.0

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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -0
  3. package/dist/apiContracts.cjs +17 -0
  4. package/dist/apiContracts.cjs.map +1 -0
  5. package/dist/apiContracts.d.mts +53 -0
  6. package/dist/apiContracts.d.mts.map +1 -0
  7. package/dist/apiContracts.mjs +13 -0
  8. package/dist/apiContracts.mjs.map +1 -0
  9. package/dist/catalog.cjs +186 -0
  10. package/dist/catalog.cjs.map +1 -0
  11. package/dist/catalog.d.mts +66 -0
  12. package/dist/catalog.d.mts.map +1 -0
  13. package/dist/catalog.mjs +181 -0
  14. package/dist/catalog.mjs.map +1 -0
  15. package/dist/extensions/mcp-ui.mjs +31 -0
  16. package/dist/extensions/mcp-ui.mjs.map +1 -0
  17. package/dist/extensions/mcp.cjs +130 -0
  18. package/dist/extensions/mcp.cjs.map +1 -0
  19. package/dist/extensions/mcp.d.mts +5 -0
  20. package/dist/extensions/mcp.d.mts.map +1 -0
  21. package/dist/extensions/mcp.mjs +125 -0
  22. package/dist/extensions/mcp.mjs.map +1 -0
  23. package/dist/extensions/server.cjs +528 -0
  24. package/dist/extensions/server.cjs.map +1 -0
  25. package/dist/extensions/server.d.mts +5 -0
  26. package/dist/extensions/server.d.mts.map +1 -0
  27. package/dist/extensions/server.mjs +519 -0
  28. package/dist/extensions/server.mjs.map +1 -0
  29. package/dist/index.cjs +5 -0
  30. package/dist/index.d.mts +6 -0
  31. package/dist/index.d.mts.map +1 -0
  32. package/dist/index.mjs +2 -0
  33. package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
  34. package/dist/skills-Ccvg1Hcz.mjs +8 -0
  35. package/dist/skills-Ccvg1Hcz.mjs.map +1 -0
  36. package/dist/skills-ComtgYb1.cjs +25 -0
  37. package/dist/skills-ComtgYb1.cjs.map +1 -0
  38. package/llms.txt +15 -0
  39. package/package.json +135 -0
  40. package/src/prompts/po-author-skill/SKILL.md +37 -0
  41. package/src/prompts/po-use-skill/SKILL.md +18 -0
@@ -0,0 +1,8 @@
1
+ //#region src/types/skills.ts
2
+ const SKILLS_COMMAND = "skills";
3
+ const SKILL_INVOCATION_PREFIX = "/skill:";
4
+ const SKILL_COMMAND_PREFIX = "skill:";
5
+ //#endregion
6
+ export { SKILL_COMMAND_PREFIX as n, SKILL_INVOCATION_PREFIX as r, SKILLS_COMMAND as t };
7
+
8
+ //# sourceMappingURL=skills-Ccvg1Hcz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-Ccvg1Hcz.mjs","names":[],"sources":["../src/types/skills.ts"],"sourcesContent":["export const SKILLS_COMMAND = 'skills';\nexport const SKILL_INVOCATION_PREFIX = '/skill:';\nexport const SKILL_COMMAND_PREFIX = 'skill:';\n"],"mappings":";AAAA,MAAa,iBAAiB;AAC9B,MAAa,0BAA0B;AACvC,MAAa,uBAAuB"}
@@ -0,0 +1,25 @@
1
+ //#region src/types/skills.ts
2
+ const SKILLS_COMMAND = "skills";
3
+ const SKILL_INVOCATION_PREFIX = "/skill:";
4
+ const SKILL_COMMAND_PREFIX = "skill:";
5
+ //#endregion
6
+ Object.defineProperty(exports, "SKILLS_COMMAND", {
7
+ enumerable: true,
8
+ get: function() {
9
+ return SKILLS_COMMAND;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "SKILL_COMMAND_PREFIX", {
13
+ enumerable: true,
14
+ get: function() {
15
+ return SKILL_COMMAND_PREFIX;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "SKILL_INVOCATION_PREFIX", {
19
+ enumerable: true,
20
+ get: function() {
21
+ return SKILL_INVOCATION_PREFIX;
22
+ }
23
+ });
24
+
25
+ //# sourceMappingURL=skills-ComtgYb1.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-ComtgYb1.cjs","names":[],"sources":["../src/types/skills.ts"],"sourcesContent":["export const SKILLS_COMMAND = 'skills';\nexport const SKILL_INVOCATION_PREFIX = '/skill:';\nexport const SKILL_COMMAND_PREFIX = 'skill:';\n"],"mappings":";AAAA,MAAa,iBAAiB;AAC9B,MAAa,0BAA0B;AACvC,MAAa,uBAAuB"}
package/llms.txt ADDED
@@ -0,0 +1,15 @@
1
+ # Doom Pi Skill
2
+
3
+ The session skill catalogue, deferred skill discovery, and the `SPC e s` browser.
4
+
5
+ ## How to author
6
+
7
+ - [Author Po skills](./src/prompts/po-author-skill/SKILL.md): Create, distribute, and register runtime skills or activation-gated Help prompts.
8
+
9
+ ## How to use
10
+
11
+ - [Use Po skills](./src/prompts/po-use-skill/SKILL.md): Browse the catalog, invoke deferred skills, and diagnose missing or shadowed skills.
12
+
13
+ ## Package reference
14
+
15
+ - [Package README](./README.md): The `/skills` command, deferred discovery, and extension-contributed skill directories.
package/package.json ADDED
@@ -0,0 +1,135 @@
1
+ {
2
+ "name": "@agimon-ai/po-skill",
3
+ "version": "0.0.0-alpha.0",
4
+ "description": "Session skill catalogue, deferred skill discovery, and the skill browser for Po.",
5
+ "keywords": [
6
+ "agent-skills",
7
+ "ai",
8
+ "coding-agent",
9
+ "developer-tools",
10
+ "pi-coding-agent",
11
+ "pi-extension",
12
+ "pi-package",
13
+ "po",
14
+ "skill-catalog",
15
+ "skill-discovery"
16
+ ],
17
+ "homepage": "https://agimon.ai",
18
+ "bugs": {
19
+ "url": "https://github.com/AgiFlow/po/issues"
20
+ },
21
+ "license": "MIT",
22
+ "author": "Vuong Ngo",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/AgiFlow/po.git",
26
+ "directory": "packages/foundations/po-skill"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "llms.txt",
31
+ "README.md",
32
+ "src/prompts",
33
+ "LICENSE",
34
+ "package.json"
35
+ ],
36
+ "type": "module",
37
+ "main": "./dist/index.cjs",
38
+ "module": "./dist/index.mjs",
39
+ "types": "./dist/index.d.mts",
40
+ "jsnext:main": "./dist/index.mjs",
41
+ "exports": {
42
+ ".": {
43
+ "types": "./dist/index.d.mts",
44
+ "import": "./dist/index.mjs",
45
+ "require": "./dist/index.cjs"
46
+ },
47
+ "./apiContracts": {
48
+ "types": "./dist/apiContracts.d.mts",
49
+ "import": "./dist/apiContracts.mjs",
50
+ "require": "./dist/apiContracts.cjs"
51
+ },
52
+ "./catalog": {
53
+ "types": "./dist/catalog.d.mts",
54
+ "import": "./dist/catalog.mjs",
55
+ "require": "./dist/catalog.cjs"
56
+ },
57
+ "./extensions/server": {
58
+ "types": "./dist/extensions/server.d.mts",
59
+ "import": "./dist/extensions/server.mjs",
60
+ "require": "./dist/extensions/server.cjs"
61
+ },
62
+ "./package.json": "./package.json"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public"
66
+ },
67
+ "dependencies": {
68
+ "@agimon-ai/po-config": "0.0.0-alpha.0",
69
+ "@agimon-ai/po-core": "0.0.0-alpha.0",
70
+ "@agimon-ai/po-domain": "0.0.0-alpha.0",
71
+ "@agimon-ai/po-telemetry": "0.0.0-alpha.0",
72
+ "@agimon-ai/po-web-components": "0.0.0-alpha.0",
73
+ "@deepseek-ai/cordis": "4.0.4",
74
+ "gpt-tokenizer": "4.0.0",
75
+ "typebox": "1.3.34"
76
+ },
77
+ "devDependencies": {
78
+ "@agimon-ai/po-build": "0.0.0-alpha.0",
79
+ "@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.0-alpha.0",
80
+ "@deepseek-ai/cordis": "4.0.4",
81
+ "@earendil-works/pi-coding-agent": "1.0.2",
82
+ "@types/node": "26.6.4",
83
+ "@types/react": "19.3.0",
84
+ "@vitest/coverage-v8": "5.0.3",
85
+ "react": "19.3.0",
86
+ "tsdown": "0.23.0",
87
+ "typescript": "7.0.2",
88
+ "vitest": "5.0.3"
89
+ },
90
+ "peerDependencies": {
91
+ "@earendil-works/pi-coding-agent": "1.0.2"
92
+ },
93
+ "peerDependenciesMeta": {
94
+ "@earendil-works/pi-coding-agent": {
95
+ "optional": true
96
+ }
97
+ },
98
+ "engines": {
99
+ "node": ">=24"
100
+ },
101
+ "poMcp": {
102
+ "entry": "./generated/mcp.ts",
103
+ "dist": "./dist/extensions/mcp.mjs",
104
+ "scopes": [
105
+ "session"
106
+ ],
107
+ "ui": {
108
+ "entry": "./generated/mcp-ui.ts",
109
+ "dist": "./dist/extensions/mcp-ui.mjs",
110
+ "widgets": [
111
+ "@agimon-ai/po-skill/load_skill",
112
+ "@agimon-ai/po-skill/search_skills"
113
+ ]
114
+ }
115
+ },
116
+ "poServer": {
117
+ "entry": "./generated/server.ts",
118
+ "dist": "./dist/extensions/server.mjs",
119
+ "scopes": [
120
+ "session"
121
+ ],
122
+ "contracts": {
123
+ "entry": "./src/exports/apiContracts.ts",
124
+ "dist": "./dist/apiContracts.mjs"
125
+ }
126
+ },
127
+ "scripts": {
128
+ "build": "tsdown && pnpm build:mcp",
129
+ "build:mcp": "tsdown --config tsdown.mcp.config.ts",
130
+ "test": "vitest --run",
131
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.mcp.json",
132
+ "lint": "oxlint . && oxfmt . --check",
133
+ "fixcode": "oxlint . --fix && oxfmt ."
134
+ }
135
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: po-author-skill
3
+ description: Author and distribute Po agent skills. Use when creating a SKILL.md, adding supporting references or scripts, contributing a runtime skill directory through Cordis, or publishing activation-gated Help prompts from a Po package.
4
+ ---
5
+
6
+ # Author Po skills
7
+
8
+ Create one focused skill per directory. Name the directory with lowercase letters, digits, and hyphens, and give it a required `SKILL.md`:
9
+
10
+ ```markdown
11
+ ---
12
+ name: repository-review
13
+ description: Review repository changes when the user asks for implementation-risk and regression analysis.
14
+ ---
15
+
16
+ # Repository review
17
+
18
+ Put the essential workflow and non-obvious constraints here.
19
+ ```
20
+
21
+ The frontmatter `name` must match the directory. Make the description specific enough for automatic routing. Keep the entrypoint concise, and put substantial conditional details in linked `references/`. Add `scripts/`, `assets/`, or `agents/` only when the skill actually uses them.
22
+
23
+ ## Choose the distribution path
24
+
25
+ - For a normal Pi skill that should be discoverable whenever its owning extension is active, ship the skill under a package-owned runtime directory such as `skills/<name>/SKILL.md`. Register that directory through `DOOM_SKILL_SOURCES_SERVICE` inside an owning `cordis.inject(...)`, and return the contribution disposer.
26
+ - For guidance that should appear only while Po Help is active, put it at `src/prompts/<name>/SKILL.md`, publish `src/prompts`, link it from the package's H1-led `llms.txt`, and register a Help descriptor through `DOOM_HELP_SERVICE`.
27
+ - For repository content selected by domains, place the skill in the plugin or shared skill source configured by `domains.yaml`; do not hard-code that directory into the Skill package.
28
+
29
+ Pi Help descriptors carry only `name` and `description`. The Help service resolves the owning package from the contribution's exact package `source` and `moduleUrl`, then wraps its `llms.txt`. Keep every index link inside the published package.
30
+
31
+ On the server host, contribute the same Help skill through a named `resource/*.server.ts` route with `when: DOOM_HELP_WHEN` from `@agimon-ai/po-core/help`. Include its useful description and an absolute `path` resolved with `packageResourcePath(import.meta.url, ...)`; a reader alone does not make the skill discoverable in the agent prompt. Keep ordinary runtime skills under their existing conditions.
32
+
33
+ Package-owned Help tools use ordinary named tool routes, not documentation descriptors. Server tools use the existing Help condition and execution guards. Pi tools also need `createPiHelpToolGate(packageName, toolNames)`: install its services and onStart in the owning root, then authorize each invocation with `gate.assertActive`. Portable `when` metadata alone does not enforce the Pi gate. The Help README and Log package's `diagnose_agent` contribution show the complete pattern. Bound diagnostics to the current session, omit secrets, and use existing approval mechanisms for repairs.
34
+
35
+ ## Verification
36
+
37
+ Validate the skill frontmatter, ensure every relative reference resolves, and test the packed package rather than relying on checkout-only files. For Cordis contributions, cover late provider arrival, provider replacement, withdrawal, and package shutdown. Test the actual prompt and tool surface before activation, while active, and after deactivation; stale calls must be rejected without removing ordinary capabilities. Use `/skills` or `SPC e s` in an interactive session to confirm the expected owner and invocation name. Do not add remote MCP exposure merely because a local Help contribution exists.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: po-use-skill
3
+ description: Use Po's skill catalog and deferred discovery. Use when browsing available skills, invoking /skill:name, understanding Help and extension-owned skill groups, or diagnosing why a skill is absent or shadowed.
4
+ ---
5
+
6
+ # Use Po skills
7
+
8
+ Open the skill browser with `/skills` or `SPC e s`. The catalog groups normal session skills, package Help skills, plugin skills, and extension-contributed directories by owner.
9
+
10
+ Invoke a skill with `/skill:<name>`. Po expands deferred skills before Pi handles the input, so a skill can be invokable even when its full body was not placed in the initial prompt. Help skills appear only while Help mode is active.
11
+
12
+ When a skill is missing:
13
+
14
+ 1. Confirm its owning package, plugin, domain, or Help mode is active.
15
+ 2. Wait for deferred discovery to finish by opening `/skills` or invoking the exact skill.
16
+ 3. Check the browser diagnostics for unreadable `SKILL.md` files, invalid frontmatter, duplicate names, or unavailable Help resources.
17
+ 4. If two sources use the same name, remember that normal loaded and deferred skills take precedence over Help skills.
18
+ 5. After changing domains or package composition, reload or relaunch as requested so the session receives the new skill directories.