@tydung26/product-kit 0.1.1 → 0.1.3
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 +9 -9
- package/{skills/pkit:brainstorm/SKILL.md → commands/pkit/brainstorm.md} +7 -10
- package/{skills/pkit:competitive-analysis/SKILL.md → commands/pkit/competitive-analysis.md} +6 -9
- package/commands/pkit/make-prd.md +177 -0
- package/{skills/pkit:roadmap-planner/SKILL.md → commands/pkit/roadmap-planner.md} +6 -9
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +12 -14
- package/dist/commands/doctor/index.js.map +1 -1
- package/dist/commands/install/index.js +1 -1
- package/dist/commands/install/index.js.map +1 -1
- package/dist/domains/installation/copy-skill-files.d.ts +2 -1
- package/dist/domains/installation/copy-skill-files.d.ts.map +1 -1
- package/dist/domains/installation/copy-skill-files.js +15 -12
- package/dist/domains/installation/copy-skill-files.js.map +1 -1
- package/dist/domains/installation/index.js +1 -1
- package/dist/domains/installation/index.js.map +1 -1
- package/dist/domains/skills/skill-loader.d.ts.map +1 -1
- package/dist/domains/skills/skill-loader.js +14 -13
- package/dist/domains/skills/skill-loader.js.map +1 -1
- package/dist/domains/skills/skill-validator.d.ts.map +1 -1
- package/dist/domains/skills/skill-validator.js +8 -11
- package/dist/domains/skills/skill-validator.js.map +1 -1
- package/dist/schemas/skill-schema.d.ts +7 -3
- package/dist/schemas/skill-schema.d.ts.map +1 -1
- package/dist/schemas/skill-schema.js +9 -11
- package/dist/schemas/skill-schema.js.map +1 -1
- package/dist/shared/paths.d.ts +1 -1
- package/dist/shared/paths.d.ts.map +1 -1
- package/dist/shared/paths.js +12 -12
- package/dist/shared/paths.js.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/skills/pkit:make-prd/SKILL.md +0 -69
- package/skills/pkit:make-prd/templates/prd-template.md +0 -108
package/README.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# product-kit
|
|
2
2
|
|
|
3
|
-
PM
|
|
3
|
+
PM commands for Claude Code, Antigravity, and OpenCode AI assistants.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install -g product-kit
|
|
8
|
+
npm install -g @tydung26/product-kit
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
pkit
|
|
15
|
-
pkit
|
|
16
|
-
pkit list # Show available/installed
|
|
17
|
-
pkit update # Update all installed
|
|
14
|
+
pkit init # Interactive: pick tool + commands
|
|
15
|
+
pkit init --yes # Install all commands to all tools
|
|
16
|
+
pkit list # Show available/installed commands
|
|
17
|
+
pkit update # Update all installed commands
|
|
18
18
|
pkit remove pkit:brainstorm
|
|
19
19
|
pkit config # View configuration
|
|
20
20
|
pkit config set toolPaths.antigravity /custom/path
|
|
21
21
|
pkit doctor # Diagnose installation issues
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Commands
|
|
25
25
|
|
|
26
26
|
| Slash Command | Purpose |
|
|
27
27
|
|---|---|
|
|
@@ -34,8 +34,8 @@ pkit doctor # Diagnose installation issues
|
|
|
34
34
|
|
|
35
35
|
| Tool | Global path |
|
|
36
36
|
|---|---|
|
|
37
|
-
| Claude Code + OpenCode | `~/.claude/
|
|
38
|
-
| Antigravity | `~/.gemini/antigravity/
|
|
37
|
+
| Claude Code + OpenCode | `~/.claude/commands/pkit/` |
|
|
38
|
+
| Antigravity | `~/.gemini/antigravity/commands/pkit/` |
|
|
39
39
|
|
|
40
40
|
## License
|
|
41
41
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Use for brainstorming product ideas, feature ideation, exploring solutions,
|
|
5
|
-
and creative divergent thinking sessions. Triggers on: brainstorm, ideate,
|
|
6
|
-
explore ideas, what if we, what could we build, idea generation, think through
|
|
7
|
-
options. Do NOT use for writing PRDs (use pkit:make-prd), roadmaps
|
|
8
|
-
(use pkit:roadmap-planner), or competitor research (use pkit:competitive-analysis).
|
|
9
|
-
license: MIT
|
|
2
|
+
description: Ideation → clustered themes → top picks with risks and next steps
|
|
3
|
+
argument-hint: <product/feature/problem-space>
|
|
10
4
|
---
|
|
11
5
|
|
|
12
|
-
|
|
6
|
+
Brainstorm product ideas or solutions for the given topic.
|
|
7
|
+
<task>$ARGUMENTS</task>
|
|
8
|
+
|
|
9
|
+
---
|
|
13
10
|
|
|
14
11
|
You are a creative product strategist with experience across B2B SaaS, consumer apps, and enterprise software. Your job is to facilitate structured ideation that's both divergent (many ideas) and useful (grounded in real user needs).
|
|
15
12
|
|
|
@@ -21,7 +18,7 @@ Invoke `/pkit:brainstorm` when you need to:
|
|
|
21
18
|
- Break out of tunnel vision on a single approach
|
|
22
19
|
- Prepare for a product strategy session
|
|
23
20
|
|
|
24
|
-
**Do NOT use for:** Writing formal PRDs, building roadmaps, or analyzing competitors — those have dedicated
|
|
21
|
+
**Do NOT use for:** Writing formal PRDs, building roadmaps, or analyzing competitors — those have dedicated commands.
|
|
25
22
|
|
|
26
23
|
## Workflow
|
|
27
24
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Use for competitive analysis, market research, and understanding the competitive
|
|
5
|
-
landscape. Triggers on: competitive analysis, analyze competitors, compare to
|
|
6
|
-
competitors, who else does this, market analysis, competitive landscape, how does
|
|
7
|
-
X compare to Y. Do NOT use for internal feature comparisons, A/B test decisions,
|
|
8
|
-
or product roadmaps.
|
|
9
|
-
license: MIT
|
|
2
|
+
description: Competitor profiles → feature matrix → whitespace opportunities
|
|
3
|
+
argument-hint: <product/market> [focus-area]
|
|
10
4
|
---
|
|
11
5
|
|
|
12
|
-
|
|
6
|
+
Run a structured competitive analysis for the given product or market.
|
|
7
|
+
<task>$ARGUMENTS</task>
|
|
8
|
+
|
|
9
|
+
---
|
|
13
10
|
|
|
14
11
|
You are a senior product strategist with deep market research experience. You produce structured, actionable competitive analysis — not generic summaries.
|
|
15
12
|
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Clarifying questions → full PRD → user stories with acceptance criteria
|
|
3
|
+
argument-hint: <feature-name>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Write a Product Requirements Document for the given feature.
|
|
7
|
+
<task>$ARGUMENTS</task>
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are a Senior PM at a B2B SaaS company. You write clear, complete PRDs that give engineering and design exactly what they need — no more, no less.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
Invoke `/pkit:make-prd` when you need to:
|
|
16
|
+
- Write a PRD for a new feature or product
|
|
17
|
+
- Create a feature spec before engineering kickoff
|
|
18
|
+
- Document requirements for stakeholder alignment
|
|
19
|
+
|
|
20
|
+
**Do NOT use for:** Roadmap planning, brainstorming ideas, or competitive research.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
### Step 1 — Ask Clarifying Questions First (Always)
|
|
25
|
+
|
|
26
|
+
Before writing anything, ask:
|
|
27
|
+
1. What problem does this feature solve?
|
|
28
|
+
2. Who is the primary user? (role, context, what they're trying to do)
|
|
29
|
+
3. What does success look like? (metric or observable outcome)
|
|
30
|
+
4. Any known constraints? (timeline, tech, dependencies, non-goals)
|
|
31
|
+
5. Do you have any existing mockups, data, or research I should incorporate?
|
|
32
|
+
|
|
33
|
+
If the user has already provided this, skip to Step 2.
|
|
34
|
+
|
|
35
|
+
### Step 2 — Write the PRD
|
|
36
|
+
|
|
37
|
+
Use the PRD template below. Fill in every section — do not leave placeholders empty. If you lack information, flag it as an open question.
|
|
38
|
+
|
|
39
|
+
### Step 3 — Generate Core User Stories
|
|
40
|
+
|
|
41
|
+
Write 3–5 user stories covering the primary scenarios:
|
|
42
|
+
- Format: "As a [role], I want to [action] so that [benefit]"
|
|
43
|
+
- INVEST criteria: Independent, Negotiable, Valuable, Estimable, Small, Testable
|
|
44
|
+
- Include acceptance criteria in Given/When/Then format
|
|
45
|
+
- Flag edge cases that engineering needs to handle
|
|
46
|
+
|
|
47
|
+
### Step 4 — Surface Open Questions
|
|
48
|
+
|
|
49
|
+
List every decision that still needs to be made before engineering can start:
|
|
50
|
+
- UX decisions not yet resolved
|
|
51
|
+
- Technical approach questions
|
|
52
|
+
- Business rule ambiguities
|
|
53
|
+
- Dependencies on other teams
|
|
54
|
+
|
|
55
|
+
## Quality Checklist
|
|
56
|
+
|
|
57
|
+
Before finishing, verify:
|
|
58
|
+
- [ ] Problem statement is user-centric (not solution-centric)
|
|
59
|
+
- [ ] Success metrics are measurable (not vague like "improved UX")
|
|
60
|
+
- [ ] Must Have list is genuinely minimum viable (not a wish list)
|
|
61
|
+
- [ ] Every open question has an owner assigned
|
|
62
|
+
- [ ] No technical implementation details in requirements (that's for engineers)
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## PRD Template
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
# PRD: [Feature Name]
|
|
71
|
+
|
|
72
|
+
**Status:** Draft
|
|
73
|
+
**Author:** [Name]
|
|
74
|
+
**Date:** [YYYY-MM-DD]
|
|
75
|
+
**Version:** 1.0
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Problem
|
|
80
|
+
|
|
81
|
+
> What problem are we solving, for whom, and why does it matter now?
|
|
82
|
+
|
|
83
|
+
[2–3 sentences. Lead with the user pain, not the solution.]
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Goals & Success Metrics
|
|
88
|
+
|
|
89
|
+
| Goal | Metric | Target | Measurement Method |
|
|
90
|
+
|------|--------|--------|--------------------|
|
|
91
|
+
| [e.g. Reduce time-to-value] | [e.g. Time to first action] | [e.g. < 2 min] | [e.g. Analytics event] |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Background & Context
|
|
96
|
+
|
|
97
|
+
> Why are we building this now? What research, data, or feedback drove this?
|
|
98
|
+
|
|
99
|
+
- [Key insight / data point]
|
|
100
|
+
- [Customer request / interview finding]
|
|
101
|
+
- [Strategic alignment]
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## User Stories
|
|
106
|
+
|
|
107
|
+
### Story 1 — [Primary Scenario]
|
|
108
|
+
|
|
109
|
+
**As a** [role],
|
|
110
|
+
**I want to** [action],
|
|
111
|
+
**So that** [benefit].
|
|
112
|
+
|
|
113
|
+
**Acceptance Criteria:**
|
|
114
|
+
- Given [context], when [action], then [expected outcome]
|
|
115
|
+
- Given [edge case], when [action], then [safe fallback]
|
|
116
|
+
|
|
117
|
+
### Story 2 — [Secondary Scenario]
|
|
118
|
+
|
|
119
|
+
[same format]
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Requirements
|
|
124
|
+
|
|
125
|
+
### Must Have (MVP)
|
|
126
|
+
- [ ] [Requirement — specific and testable]
|
|
127
|
+
- [ ] [Requirement]
|
|
128
|
+
|
|
129
|
+
### Should Have (v1.1)
|
|
130
|
+
- [ ] [Requirement]
|
|
131
|
+
|
|
132
|
+
### Won't Have (this version)
|
|
133
|
+
- [Explicitly out of scope item] — *Reason: [why deferred]*
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Out of Scope
|
|
138
|
+
|
|
139
|
+
> Be explicit. What are we NOT building and why?
|
|
140
|
+
|
|
141
|
+
- [Item] — deferred because [reason]
|
|
142
|
+
- [Item] — handled by [other team/system]
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Design & UX Notes
|
|
147
|
+
|
|
148
|
+
> Link to mockups, Figma, or describe key UX decisions.
|
|
149
|
+
|
|
150
|
+
- [Link to designs or description]
|
|
151
|
+
- [Key UX decision and rationale]
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Technical Considerations
|
|
156
|
+
|
|
157
|
+
> High-level notes for engineering — not a technical spec.
|
|
158
|
+
|
|
159
|
+
- [Known constraint or dependency]
|
|
160
|
+
- [Performance or scale consideration]
|
|
161
|
+
- [Integration point]
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Open Questions
|
|
166
|
+
|
|
167
|
+
| Question | Impact | Owner | Due Date | Status |
|
|
168
|
+
|----------|--------|-------|----------|--------|
|
|
169
|
+
| [Question] | High/Med/Low | [Name] | [Date] | Open |
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Appendix
|
|
174
|
+
|
|
175
|
+
> Supporting data, research links, related tickets.
|
|
176
|
+
|
|
177
|
+
- [Link or reference]
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Use for product roadmap planning, quarterly planning, annual planning, and
|
|
5
|
-
prioritizing what to build over a time horizon. Triggers on: roadmap, product
|
|
6
|
-
roadmap, quarterly plan, Q1 plan, H1 plan, annual plan, what should we build
|
|
7
|
-
next, plan next quarter, roadmap planning session. Do NOT use for single-sprint
|
|
8
|
-
planning or writing individual PRDs.
|
|
9
|
-
license: MIT
|
|
2
|
+
description: NOW/NEXT/LATER roadmap → risk register → exec narrative
|
|
3
|
+
argument-hint: <team/product> [time-horizon]
|
|
10
4
|
---
|
|
11
5
|
|
|
12
|
-
|
|
6
|
+
Plan a product roadmap for the given team or product.
|
|
7
|
+
<task>$ARGUMENTS</task>
|
|
8
|
+
|
|
9
|
+
---
|
|
13
10
|
|
|
14
11
|
You are a senior PM with experience running OKR-driven roadmap planning at high-growth companies. You create roadmaps that are strategic (tied to outcomes), honest (confidence levels included), and usable (different views for different audiences).
|
|
15
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAiB/B,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,QAoEtC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerDoctor = registerDoctor;
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
|
-
const path_1 = require("path");
|
|
6
5
|
const config_1 = require("../../domains/config");
|
|
7
6
|
const installation_1 = require("../../domains/installation");
|
|
8
7
|
const skills_1 = require("../../domains/skills");
|
|
@@ -29,22 +28,22 @@ function registerDoctor(cli) {
|
|
|
29
28
|
const nodeOk = nodeVer[0] >= 18;
|
|
30
29
|
if (!check('Node version', nodeOk, process.version, 'Upgrade Node to >=18'))
|
|
31
30
|
issues++;
|
|
32
|
-
// 2.
|
|
33
|
-
const
|
|
34
|
-
if (!check('Package
|
|
31
|
+
// 2. Commands bundled in package
|
|
32
|
+
const commandsOk = (0, fs_1.existsSync)(paths_1.PACKAGE_COMMANDS_DIR);
|
|
33
|
+
if (!check('Package commands dir', commandsOk, paths_1.PACKAGE_COMMANDS_DIR, 'Reinstall product-kit'))
|
|
35
34
|
issues++;
|
|
36
|
-
// 3. Claude
|
|
35
|
+
// 3. Claude commands path exists
|
|
37
36
|
const claudeOk = (0, fs_1.existsSync)(config.toolPaths.claude);
|
|
38
|
-
check('Claude
|
|
37
|
+
check('Claude commands dir', claudeOk, config.toolPaths.claude, claudeOk ? undefined : `mkdir -p "${config.toolPaths.claude}"`);
|
|
39
38
|
if (!claudeOk)
|
|
40
39
|
issues++;
|
|
41
40
|
// 4. Antigravity path (warn only — tool may not be installed)
|
|
42
41
|
const agOk = (0, fs_1.existsSync)(config.toolPaths.antigravity);
|
|
43
42
|
if (agOk) {
|
|
44
|
-
logger_1.log.success(`Antigravity
|
|
43
|
+
logger_1.log.success(`Antigravity commands dir: ${config.toolPaths.antigravity}`);
|
|
45
44
|
}
|
|
46
45
|
else {
|
|
47
|
-
logger_1.log.warn(`Antigravity
|
|
46
|
+
logger_1.log.warn(`Antigravity commands dir not found: ${config.toolPaths.antigravity} (install Antigravity or set toolPaths.antigravity)`);
|
|
48
47
|
}
|
|
49
48
|
// 5. Manifest exists and is valid JSON
|
|
50
49
|
let manifestOk = false;
|
|
@@ -60,23 +59,22 @@ function registerDoctor(cli) {
|
|
|
60
59
|
}
|
|
61
60
|
if (!check('Manifest file', manifestOk, paths_1.MANIFEST_PATH, `rm "${paths_1.MANIFEST_PATH}" and reinstall`))
|
|
62
61
|
issues++;
|
|
63
|
-
// 6. Verify each installed
|
|
62
|
+
// 6. Verify each installed command file still exists and has valid frontmatter
|
|
64
63
|
const entries = (0, installation_1.getManifestEntries)();
|
|
65
64
|
for (const entry of entries) {
|
|
66
|
-
const
|
|
67
|
-
const exists = (0, fs_1.existsSync)(skillFile);
|
|
65
|
+
const exists = (0, fs_1.existsSync)(entry.destPath);
|
|
68
66
|
if (!exists) {
|
|
69
67
|
logger_1.log.error(`Missing: ${entry.name} at ${entry.destPath} — run: pkit install ${entry.name} --force`);
|
|
70
68
|
issues++;
|
|
71
69
|
}
|
|
72
70
|
else {
|
|
73
71
|
try {
|
|
74
|
-
const content = (0, fs_1.readFileSync)(
|
|
75
|
-
(0, skills_1.validateSkillContent)(content,
|
|
72
|
+
const content = (0, fs_1.readFileSync)(entry.destPath, 'utf8');
|
|
73
|
+
(0, skills_1.validateSkillContent)(content, entry.destPath);
|
|
76
74
|
logger_1.log.success(`${entry.name}: valid`);
|
|
77
75
|
}
|
|
78
76
|
catch (err) {
|
|
79
|
-
logger_1.log.error(`${entry.name}: invalid
|
|
77
|
+
logger_1.log.error(`${entry.name}: invalid command file — ${err instanceof Error ? err.message : String(err)}`);
|
|
80
78
|
issues++;
|
|
81
79
|
}
|
|
82
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":";;AAiBA,wCAoEC;AApFD,2BAA8C;AAC9C,iDAAiD;AACjD,6DAAgE;AAChE,iDAA4D;AAC5D,8CAAyE;AACzE,gDAA0C;AAE1C,SAAS,KAAK,CAAC,KAAa,EAAE,EAAW,EAAE,MAAc,EAAE,GAAY;IACrE,IAAI,EAAE,EAAE,CAAC;QACP,YAAG,CAAC,OAAO,CAAC,GAAG,KAAK,KAAK,MAAM,EAAE,CAAC,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,YAAG,CAAC,KAAK,CAAC,GAAG,KAAK,KAAK,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,cAAc,CAAC,GAAQ;IACrC,GAAG;SACA,OAAO,CAAC,QAAQ,EAAE,mCAAmC,CAAC;SACtD,MAAM,CAAC,GAAG,EAAE;QACX,YAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC7B,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;QAC3B,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,kBAAkB;QAClB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACxE,MAAM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C;QAED,YAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACd,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;YACjB,YAAG,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QACpC,CAAC;aAAM,CAAC;YACN,YAAG,CAAC,KAAK,CAAC,GAAG,MAAM,mCAAmC,CAAC,CAAC;YACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -6,7 +6,7 @@ const installation_1 = require("../../domains/installation");
|
|
|
6
6
|
const prompts_1 = require("../../domains/ui/prompts");
|
|
7
7
|
function registerInstall(cli) {
|
|
8
8
|
cli
|
|
9
|
-
.command('
|
|
9
|
+
.command('init [...skills]', 'Install PM commands to AI coding tools')
|
|
10
10
|
.option('--tool <tool>', 'Target tool: claude, antigravity, opencode, all')
|
|
11
11
|
.option('--scope <scope>', 'Scope: global or project', { default: 'global' })
|
|
12
12
|
.option('--force', 'Overwrite existing installations')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/install/index.ts"],"names":[],"mappings":";;AAcA,0CA2CC;AAxDD,iDAA2D;AAC3D,6DAA2D;AAC3D,sDAAmG;AAWnG,SAAgB,eAAe,CAAC,GAAQ;IACtC,GAAG;SACA,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/install/index.ts"],"names":[],"mappings":";;AAcA,0CA2CC;AAxDD,iDAA2D;AAC3D,6DAA2D;AAC3D,sDAAmG;AAWnG,SAAgB,eAAe,CAAC,GAAQ;IACtC,GAAG;SACA,OAAO,CAAC,kBAAkB,EAAE,wCAAwC,CAAC;SACrE,MAAM,CAAC,eAAe,EAAE,iDAAiD,CAAC;SAC1E,MAAM,CAAC,iBAAiB,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAA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CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -8,5 +8,6 @@ export type CopyResult = {
|
|
|
8
8
|
status: 'failed';
|
|
9
9
|
error: string;
|
|
10
10
|
};
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function copyCommandFile(srcFile: string, destBase: string, force: boolean): Promise<CopyResult>;
|
|
12
|
+
export declare const copySkillDir: typeof copyCommandFile;
|
|
12
13
|
//# sourceMappingURL=copy-skill-files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-skill-files.d.ts","sourceRoot":"","sources":["../../../src/domains/installation/copy-skill-files.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAClB;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAIxC,wBAAsB,
|
|
1
|
+
{"version":3,"file":"copy-skill-files.d.ts","sourceRoot":"","sources":["../../../src/domains/installation/copy-skill-files.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAClB;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAIxC,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC,CAqBrB;AAGD,eAAO,MAAM,YAAY,wBAAkB,CAAC"}
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.copySkillDir =
|
|
3
|
+
exports.copySkillDir = void 0;
|
|
4
|
+
exports.copyCommandFile = copyCommandFile;
|
|
4
5
|
const fs_1 = require("fs");
|
|
5
6
|
const fs_extra_1 = require("fs-extra");
|
|
6
7
|
const path_1 = require("path");
|
|
7
|
-
// Safely copies a
|
|
8
|
+
// Safely copies a single command .md file to destBase/filename.md.
|
|
8
9
|
// Validates paths to prevent directory traversal attacks.
|
|
9
|
-
async function
|
|
10
|
-
const
|
|
10
|
+
async function copyCommandFile(srcFile, destBase, force) {
|
|
11
|
+
const filename = (0, path_1.basename)(srcFile);
|
|
11
12
|
// Path traversal guard: resolved dest must be inside destBase
|
|
12
|
-
const
|
|
13
|
-
if (!(0, path_1.resolve)(
|
|
14
|
-
return { status: 'failed', error: `Path traversal attempt blocked for: ${
|
|
13
|
+
const destFile = (0, path_1.join)(destBase, filename);
|
|
14
|
+
if (!(0, path_1.resolve)(destFile).startsWith((0, path_1.resolve)(destBase))) {
|
|
15
|
+
return { status: 'failed', error: `Path traversal attempt blocked for: ${filename}` };
|
|
15
16
|
}
|
|
16
|
-
if ((0, fs_1.existsSync)(
|
|
17
|
+
if ((0, fs_1.existsSync)(destFile) && !force) {
|
|
17
18
|
return { status: 'skipped', reason: 'already installed (use --force to overwrite)' };
|
|
18
19
|
}
|
|
19
20
|
try {
|
|
20
21
|
await (0, fs_extra_1.ensureDir)(destBase);
|
|
21
|
-
if ((0, fs_1.existsSync)(
|
|
22
|
-
await (0, fs_extra_1.remove)(
|
|
23
|
-
await (0, fs_extra_1.copy)(
|
|
24
|
-
return { status: 'installed', destPath:
|
|
22
|
+
if ((0, fs_1.existsSync)(destFile) && force)
|
|
23
|
+
await (0, fs_extra_1.remove)(destFile);
|
|
24
|
+
await (0, fs_extra_1.copy)(srcFile, destFile, { overwrite: force });
|
|
25
|
+
return { status: 'installed', destPath: destFile };
|
|
25
26
|
}
|
|
26
27
|
catch (err) {
|
|
27
28
|
return { status: 'failed', error: err instanceof Error ? err.message : String(err) };
|
|
28
29
|
}
|
|
29
30
|
}
|
|
31
|
+
// Legacy alias for any callers using the old name
|
|
32
|
+
exports.copySkillDir = copyCommandFile;
|
|
30
33
|
//# sourceMappingURL=copy-skill-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-skill-files.js","sourceRoot":"","sources":["../../../src/domains/installation/copy-skill-files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"copy-skill-files.js","sourceRoot":"","sources":["../../../src/domains/installation/copy-skill-files.ts"],"names":[],"mappings":";;;AAWA,0CAyBC;AApCD,2BAAgC;AAChC,uCAAmD;AACnD,+BAA+C;AAO/C,mEAAmE;AACnE,0DAA0D;AACnD,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,QAAgB,EAChB,KAAc;IAEd,MAAM,QAAQ,GAAG,IAAA,eAAQ,EAAC,OAAO,CAAC,CAAC;IAEnC,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC1C,IAAI,CAAC,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QACrD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,uCAAuC,QAAQ,EAAE,EAAE,CAAC;IACxF,CAAC;IAED,IAAI,IAAA,eAAU,EAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACnC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,8CAA8C,EAAE,CAAC;IACvF,CAAC;IAED,IAAI,CAAC;QACH,MAAM,IAAA,oBAAS,EAAC,QAAQ,CAAC,CAAC;QAC1B,IAAI,IAAA,eAAU,EAAC,QAAQ,CAAC,IAAI,KAAK;YAAE,MAAM,IAAA,iBAAM,EAAC,QAAQ,CAAC,CAAC;QAC1D,MAAM,IAAA,eAAI,EAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;QACpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACvF,CAAC;AACH,CAAC;AAED,kDAAkD;AACrC,QAAA,YAAY,GAAG,eAAe,CAAC"}
|
|
@@ -69,7 +69,7 @@ async function installSkills(names, opts) {
|
|
|
69
69
|
const pkgVersion = getPkgVersion();
|
|
70
70
|
for (const skill of toInstall) {
|
|
71
71
|
for (const destBase of destPaths) {
|
|
72
|
-
const result = await (0, copy_skill_files_1.
|
|
72
|
+
const result = await (0, copy_skill_files_1.copyCommandFile)(skill.filePath, destBase, opts.force ?? false);
|
|
73
73
|
if (result.status === 'installed') {
|
|
74
74
|
logger_1.log.success(`Installed: ${skill.name} → ${result.destPath}`);
|
|
75
75
|
(0, manifest_manager_1.addManifestEntry)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/installation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,sCAiCC;AAGD,oCAiBC;AAGD,oCAEC;AA5ED,2BAAkC;AAClC,+BAA4B;AAC5B,sCAAgD;AAChD,mDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/installation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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B,IAAI,EAAE,CAAC,CAAC;YACnC,SAAS;QACX,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;gBAC7B,YAAG,CAAC,OAAO,CAAC,YAAY,IAAI,SAAS,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACzD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,YAAG,CAAC,KAAK,CAAC,oBAAoB,KAAK,CAAC,QAAQ,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACvG,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,uDAAuD;AAChD,KAAK,UAAU,YAAY,CAAC,KAAe,EAAE,IAAoB;IACtE,MAAM,aAAa,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-loader.d.ts","sourceRoot":"","sources":["../../../src/domains/skills/skill-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-loader.d.ts","sourceRoot":"","sources":["../../../src/domains/skills/skill-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAQzC,wBAAgB,mBAAmB,IAAI,KAAK,EAAE,CAoB7C;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAE/D"}
|
|
@@ -6,31 +6,32 @@ const fs_1 = require("fs");
|
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const paths_1 = require("../../shared/paths");
|
|
8
8
|
const skill_validator_1 = require("./skill-validator");
|
|
9
|
-
//
|
|
9
|
+
// Derives the slash-command name from a filename: "brainstorm.md" → "pkit:brainstorm"
|
|
10
|
+
function fileNameToCommandName(filename) {
|
|
11
|
+
return `pkit:${(0, path_1.basename)(filename, '.md')}`;
|
|
12
|
+
}
|
|
13
|
+
// Loads all commands from the bundled commands/pkit/ directory
|
|
10
14
|
function loadAvailableSkills() {
|
|
11
|
-
if (!(0, fs_1.existsSync)(paths_1.
|
|
15
|
+
if (!(0, fs_1.existsSync)(paths_1.PACKAGE_COMMANDS_DIR))
|
|
12
16
|
return [];
|
|
13
17
|
const skills = [];
|
|
14
|
-
const entries = (0, fs_1.readdirSync)(paths_1.
|
|
18
|
+
const entries = (0, fs_1.readdirSync)(paths_1.PACKAGE_COMMANDS_DIR, { withFileTypes: true });
|
|
15
19
|
for (const entry of entries) {
|
|
16
|
-
if (!entry.
|
|
17
|
-
continue;
|
|
18
|
-
const skillDir = (0, path_1.join)(paths_1.PACKAGE_SKILLS_DIR, entry.name);
|
|
19
|
-
const skillFile = (0, path_1.join)(skillDir, 'SKILL.md');
|
|
20
|
-
if (!(0, fs_1.existsSync)(skillFile))
|
|
20
|
+
if (!entry.isFile() || !entry.name.endsWith('.md'))
|
|
21
21
|
continue;
|
|
22
|
+
const filePath = (0, path_1.join)(paths_1.PACKAGE_COMMANDS_DIR, entry.name);
|
|
22
23
|
try {
|
|
23
|
-
const content = (0, fs_1.readFileSync)(
|
|
24
|
-
const meta = (0, skill_validator_1.validateSkillContent)(content,
|
|
25
|
-
skills.push({ name: entry.name,
|
|
24
|
+
const content = (0, fs_1.readFileSync)(filePath, 'utf8');
|
|
25
|
+
const meta = (0, skill_validator_1.validateSkillContent)(content, filePath);
|
|
26
|
+
skills.push({ name: fileNameToCommandName(entry.name), filePath, meta });
|
|
26
27
|
}
|
|
27
28
|
catch {
|
|
28
|
-
// Skip invalid
|
|
29
|
+
// Skip invalid command files silently in production
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
return skills;
|
|
32
33
|
}
|
|
33
|
-
// Find a single
|
|
34
|
+
// Find a single command by name (e.g. "pkit:brainstorm")
|
|
34
35
|
function findSkillByName(name) {
|
|
35
36
|
return loadAvailableSkills().find(s => s.name === name);
|
|
36
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-loader.js","sourceRoot":"","sources":["../../../src/domains/skills/skill-loader.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"skill-loader.js","sourceRoot":"","sources":["../../../src/domains/skills/skill-loader.ts"],"names":[],"mappings":";;AAYA,kDAoBC;AAGD,0CAEC;AArCD,2BAA2D;AAC3D,+BAAsC;AACtC,8CAA0D;AAC1D,uDAAyD;AAGzD,sFAAsF;AACtF,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,OAAO,QAAQ,IAAA,eAAQ,EAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;AAC7C,CAAC;AAED,+DAA+D;AAC/D,SAAgB,mBAAmB;IACjC,IAAI,CAAC,IAAA,eAAU,EAAC,4BAAoB,CAAC;QAAE,OAAO,EAAE,CAAC;IAEjD,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAA,gBAAW,EAAC,4BAAoB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAE3E,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,SAAS;QAC7D,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,4BAAoB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAExD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC/C,MAAM,IAAI,GAAG,IAAA,sCAAoB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YACrD,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3E,CAAC;QAAC,MAAM,CAAC;YACP,oDAAoD;QACtD,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,yDAAyD;AACzD,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAO,mBAAmB,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-validator.d.ts","sourceRoot":"","sources":["../../../src/domains/skills/skill-validator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-validator.d.ts","sourceRoot":"","sources":["../../../src/domains/skills/skill-validator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkB7C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAajF"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateSkillContent = validateSkillContent;
|
|
4
4
|
const skill_schema_1 = require("../../schemas/skill-schema");
|
|
5
|
-
// Parses YAML frontmatter from
|
|
5
|
+
// Parses YAML frontmatter from command .md content (simple regex, no yaml dep needed)
|
|
6
6
|
function parseFrontmatter(content) {
|
|
7
7
|
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
8
8
|
if (!match)
|
|
@@ -13,27 +13,24 @@ function parseFrontmatter(content) {
|
|
|
13
13
|
if (colonIdx === -1)
|
|
14
14
|
continue;
|
|
15
15
|
const key = line.slice(0, colonIdx).trim();
|
|
16
|
-
// Handle multi-line values (>) by collapsing them
|
|
17
16
|
const val = line.slice(colonIdx + 1).trim().replace(/^["']|["']$/g, '').trim();
|
|
18
17
|
if (key && val)
|
|
19
18
|
result[key] = val;
|
|
20
19
|
}
|
|
21
20
|
return result;
|
|
22
21
|
}
|
|
23
|
-
// Validates and returns parsed
|
|
22
|
+
// Validates and returns parsed command frontmatter, throws on invalid
|
|
24
23
|
function validateSkillContent(content, filePath) {
|
|
25
24
|
const raw = parseFrontmatter(content);
|
|
26
25
|
if (!raw)
|
|
27
26
|
throw new Error(`No frontmatter found in ${filePath}`);
|
|
28
|
-
|
|
29
|
-
const descMatch = content.match(/description:\s*>\n([\s\S]*?)(?=\n\w|\n---)/);
|
|
30
|
-
if (descMatch) {
|
|
31
|
-
raw['description'] = descMatch[1].replace(/\n\s*/g, ' ').trim();
|
|
32
|
-
}
|
|
33
|
-
const parsed = skill_schema_1.SkillSchema.safeParse(raw);
|
|
27
|
+
const parsed = skill_schema_1.CommandSchema.safeParse(raw);
|
|
34
28
|
if (!parsed.success) {
|
|
35
|
-
throw new Error(`Invalid
|
|
29
|
+
throw new Error(`Invalid command frontmatter at ${filePath}: ${parsed.error.message}`);
|
|
36
30
|
}
|
|
37
|
-
return
|
|
31
|
+
return {
|
|
32
|
+
description: parsed.data.description,
|
|
33
|
+
argumentHint: parsed.data['argument-hint'],
|
|
34
|
+
};
|
|
38
35
|
}
|
|
39
36
|
//# sourceMappingURL=skill-validator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-validator.js","sourceRoot":"","sources":["../../../src/domains/skills/skill-validator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"skill-validator.js","sourceRoot":"","sources":["../../../src/domains/skills/skill-validator.ts"],"names":[],"mappings":";;AAmBA,oDAaC;AAhCD,6DAA2D;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C;IAED,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW;QACpC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const CommandSchema: z.ZodObject<{
|
|
3
|
+
description: z.ZodString;
|
|
4
|
+
'argument-hint': z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type CommandFrontmatter = z.infer<typeof CommandSchema>;
|
|
2
7
|
export declare const SkillSchema: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
8
|
description: z.ZodString;
|
|
5
|
-
|
|
9
|
+
'argument-hint': z.ZodOptional<z.ZodString>;
|
|
6
10
|
}, z.core.$strip>;
|
|
7
|
-
export type SkillFrontmatter =
|
|
11
|
+
export type SkillFrontmatter = CommandFrontmatter;
|
|
8
12
|
//# sourceMappingURL=skill-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-schema.d.ts","sourceRoot":"","sources":["../../src/schemas/skill-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-schema.d.ts","sourceRoot":"","sources":["../../src/schemas/skill-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAG/D,eAAO,MAAM,WAAW;;;iBAAgB,CAAC;AACzC,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SkillSchema = void 0;
|
|
3
|
+
exports.SkillSchema = exports.CommandSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
// Validates
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.max(64)
|
|
12
|
-
.regex(/^[a-z0-9:]+([:-][a-z0-9]+)*$/, 'Name must be lowercase alphanumeric with hyphens/colons'),
|
|
13
|
-
description: zod_1.z.string().min(1).max(1024),
|
|
14
|
-
license: zod_1.z.string().optional(),
|
|
5
|
+
// Validates command .md YAML frontmatter (Claude Code commands format)
|
|
6
|
+
// description: required, 1-256 chars
|
|
7
|
+
// argument-hint: optional usage hint shown in slash command picker
|
|
8
|
+
exports.CommandSchema = zod_1.z.object({
|
|
9
|
+
description: zod_1.z.string().min(1).max(256),
|
|
10
|
+
'argument-hint': zod_1.z.string().optional(),
|
|
15
11
|
});
|
|
12
|
+
// Legacy alias kept for test backward compatibility
|
|
13
|
+
exports.SkillSchema = exports.CommandSchema;
|
|
16
14
|
//# sourceMappingURL=skill-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-schema.js","sourceRoot":"","sources":["../../src/schemas/skill-schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,
|
|
1
|
+
{"version":3,"file":"skill-schema.js","sourceRoot":"","sources":["../../src/schemas/skill-schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,uEAAuE;AACvE,qCAAqC;AACrC,mEAAmE;AACtD,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACvC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAIH,oDAAoD;AACvC,QAAA,WAAW,GAAG,qBAAa,CAAC"}
|
package/dist/shared/paths.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/shared/paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/shared/paths.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,QAAkD,CAAC;AAGpF,eAAO,MAAM,UAAU,QAAuC,CAAC;AAC/D,eAAO,MAAM,aAAa,QAAoC,CAAC;AAC/D,eAAO,MAAM,WAAW,QAAkC,CAAC;AAG3D,eAAO,MAAM,kBAAkB;;;;CAOrB,CAAC;AAGX,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC"}
|
package/dist/shared/paths.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PROJECT_TOOL_SEGMENTS = exports.DEFAULT_TOOL_PATHS = exports.CONFIG_PATH = exports.MANIFEST_PATH = exports.CONFIG_DIR = exports.
|
|
3
|
+
exports.PROJECT_TOOL_SEGMENTS = exports.DEFAULT_TOOL_PATHS = exports.CONFIG_PATH = exports.MANIFEST_PATH = exports.CONFIG_DIR = exports.PACKAGE_COMMANDS_DIR = void 0;
|
|
4
4
|
const os_1 = require("os");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const home = (0, os_1.homedir)();
|
|
7
|
-
// Absolute path to the
|
|
8
|
-
exports.
|
|
7
|
+
// Absolute path to the commands/pkit/ directory bundled in this npm package
|
|
8
|
+
exports.PACKAGE_COMMANDS_DIR = (0, path_1.join)(__dirname, '..', '..', 'commands', 'pkit');
|
|
9
9
|
// Manifest + config storage
|
|
10
10
|
exports.CONFIG_DIR = (0, path_1.join)(home, '.config', 'product-kit');
|
|
11
11
|
exports.MANIFEST_PATH = (0, path_1.join)(exports.CONFIG_DIR, 'manifest.json');
|
|
12
12
|
exports.CONFIG_PATH = (0, path_1.join)(exports.CONFIG_DIR, 'config.json');
|
|
13
|
-
// Default install paths per tool (global scope)
|
|
13
|
+
// Default install paths per tool (global scope) — commands go into commands/pkit/
|
|
14
14
|
exports.DEFAULT_TOOL_PATHS = {
|
|
15
|
-
// Claude Code + OpenCode both read ~/.claude/
|
|
16
|
-
claude: (0, path_1.join)(home, '.claude', '
|
|
17
|
-
// OpenCode
|
|
18
|
-
opencode: (0, path_1.join)(home, '.claude', '
|
|
15
|
+
// Claude Code + OpenCode both read ~/.claude/commands/
|
|
16
|
+
claude: (0, path_1.join)(home, '.claude', 'commands', 'pkit'),
|
|
17
|
+
// OpenCode shares the same path as Claude Code
|
|
18
|
+
opencode: (0, path_1.join)(home, '.claude', 'commands', 'pkit'),
|
|
19
19
|
// Antigravity uses a separate path (configurable)
|
|
20
|
-
antigravity: (0, path_1.join)(home, '.gemini', 'antigravity', '
|
|
20
|
+
antigravity: (0, path_1.join)(home, '.gemini', 'antigravity', 'commands', 'pkit'),
|
|
21
21
|
};
|
|
22
22
|
// Project-scope path segments (joined with cwd at runtime in resolve-paths.ts)
|
|
23
23
|
exports.PROJECT_TOOL_SEGMENTS = {
|
|
24
|
-
claude: (0, path_1.join)('.claude', '
|
|
25
|
-
opencode: (0, path_1.join)('.
|
|
26
|
-
antigravity: (0, path_1.join)('.agent', '
|
|
24
|
+
claude: (0, path_1.join)('.claude', 'commands', 'pkit'),
|
|
25
|
+
opencode: (0, path_1.join)('.claude', 'commands', 'pkit'),
|
|
26
|
+
antigravity: (0, path_1.join)('.agent', 'commands', 'pkit'),
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=paths.js.map
|
package/dist/shared/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/shared/paths.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAC7B,+BAA4B;
|
|
1
|
+
{"version":3,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 'antigravity' | 'opencode' | 'all';
|
|
2
2
|
export type InstallScope = 'global' | 'project';
|
|
3
3
|
export interface SkillMeta {
|
|
4
|
-
name: string;
|
|
5
4
|
description: string;
|
|
6
|
-
|
|
5
|
+
argumentHint?: string;
|
|
7
6
|
}
|
|
8
7
|
export interface Skill {
|
|
9
8
|
name: string;
|
|
10
|
-
|
|
9
|
+
filePath: string;
|
|
11
10
|
meta: SkillMeta;
|
|
12
11
|
}
|
|
13
12
|
export interface InstallOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,KAAK,CAAC;AAGrE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAGhD,MAAM,WAAW,SAAS;IACxB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,KAAK,CAAC;AAGrE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAGhD,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB;AAGD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tydung26/product-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "🧠 Product management skills kit",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pkit": "bin/pkit.js"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist/",
|
|
21
|
-
"
|
|
21
|
+
"commands/",
|
|
22
22
|
"bin/",
|
|
23
23
|
"README.md"
|
|
24
24
|
],
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "pkit:make-prd"
|
|
3
|
-
description: >
|
|
4
|
-
Use for writing Product Requirement Documents (PRDs), feature specs, and
|
|
5
|
-
requirements documents. Triggers on: write a PRD, make a PRD, create a PRD,
|
|
6
|
-
product requirements, feature spec, spec out this feature, draft requirements,
|
|
7
|
-
requirements document. Do NOT use for roadmap planning (use pkit:roadmap-planner)
|
|
8
|
-
or brainstorming (use pkit:brainstorm).
|
|
9
|
-
license: MIT
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# pkit:make-prd
|
|
13
|
-
|
|
14
|
-
You are a Senior PM at a B2B SaaS company. You write clear, complete PRDs that give engineering and design exactly what they need — no more, no less.
|
|
15
|
-
|
|
16
|
-
## When to Use
|
|
17
|
-
|
|
18
|
-
Invoke `/pkit:make-prd` when you need to:
|
|
19
|
-
- Write a PRD for a new feature or product
|
|
20
|
-
- Create a feature spec before engineering kickoff
|
|
21
|
-
- Document requirements for stakeholder alignment
|
|
22
|
-
|
|
23
|
-
**Do NOT use for:** Roadmap planning, brainstorming ideas, or competitive research.
|
|
24
|
-
|
|
25
|
-
## Workflow
|
|
26
|
-
|
|
27
|
-
### Step 1 — Ask Clarifying Questions First (Always)
|
|
28
|
-
|
|
29
|
-
Before writing anything, ask:
|
|
30
|
-
1. What problem does this feature solve?
|
|
31
|
-
2. Who is the primary user? (role, context, what they're trying to do)
|
|
32
|
-
3. What does success look like? (metric or observable outcome)
|
|
33
|
-
4. Any known constraints? (timeline, tech, dependencies, non-goals)
|
|
34
|
-
5. Do you have any existing mockups, data, or research I should incorporate?
|
|
35
|
-
|
|
36
|
-
If the user has already provided this, skip to Step 2.
|
|
37
|
-
|
|
38
|
-
### Step 2 — Write the PRD
|
|
39
|
-
|
|
40
|
-
Use the template in `templates/prd-template.md`. Fill in every section — do not leave placeholders empty. If you lack information, flag it as an open question.
|
|
41
|
-
|
|
42
|
-
### Step 3 — Generate Core User Stories
|
|
43
|
-
|
|
44
|
-
Write 3–5 user stories covering the primary scenarios:
|
|
45
|
-
- Format: "As a [role], I want to [action] so that [benefit]"
|
|
46
|
-
- INVEST criteria: Independent, Negotiable, Valuable, Estimable, Small, Testable
|
|
47
|
-
- Include acceptance criteria in Given/When/Then format
|
|
48
|
-
- Flag edge cases that engineering needs to handle
|
|
49
|
-
|
|
50
|
-
### Step 4 — Surface Open Questions
|
|
51
|
-
|
|
52
|
-
List every decision that still needs to be made before engineering can start:
|
|
53
|
-
- UX decisions not yet resolved
|
|
54
|
-
- Technical approach questions
|
|
55
|
-
- Business rule ambiguities
|
|
56
|
-
- Dependencies on other teams
|
|
57
|
-
|
|
58
|
-
## Output Format
|
|
59
|
-
|
|
60
|
-
Follow the PRD template exactly. See `templates/prd-template.md`.
|
|
61
|
-
|
|
62
|
-
## Quality Checklist
|
|
63
|
-
|
|
64
|
-
Before finishing, verify:
|
|
65
|
-
- [ ] Problem statement is user-centric (not solution-centric)
|
|
66
|
-
- [ ] Success metrics are measurable (not vague like "improved UX")
|
|
67
|
-
- [ ] Must Have list is genuinely minimum viable (not a wish list)
|
|
68
|
-
- [ ] Every open question has an owner assigned
|
|
69
|
-
- [ ] No technical implementation details in requirements (that's for engineers)
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# PRD: [Feature Name]
|
|
2
|
-
|
|
3
|
-
**Status:** Draft
|
|
4
|
-
**Author:** [Name]
|
|
5
|
-
**Date:** [YYYY-MM-DD]
|
|
6
|
-
**Version:** 1.0
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Problem
|
|
11
|
-
|
|
12
|
-
> What problem are we solving, for whom, and why does it matter now?
|
|
13
|
-
|
|
14
|
-
[2–3 sentences. Lead with the user pain, not the solution.]
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Goals & Success Metrics
|
|
19
|
-
|
|
20
|
-
| Goal | Metric | Target | Measurement Method |
|
|
21
|
-
|------|--------|--------|--------------------|
|
|
22
|
-
| [e.g. Reduce time-to-value] | [e.g. Time to first action] | [e.g. < 2 min] | [e.g. Analytics event] |
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Background & Context
|
|
27
|
-
|
|
28
|
-
> Why are we building this now? What research, data, or feedback drove this?
|
|
29
|
-
|
|
30
|
-
- [Key insight / data point]
|
|
31
|
-
- [Customer request / interview finding]
|
|
32
|
-
- [Strategic alignment]
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## User Stories
|
|
37
|
-
|
|
38
|
-
### Story 1 — [Primary Scenario]
|
|
39
|
-
|
|
40
|
-
**As a** [role],
|
|
41
|
-
**I want to** [action],
|
|
42
|
-
**So that** [benefit].
|
|
43
|
-
|
|
44
|
-
**Acceptance Criteria:**
|
|
45
|
-
- Given [context], when [action], then [expected outcome]
|
|
46
|
-
- Given [edge case], when [action], then [safe fallback]
|
|
47
|
-
|
|
48
|
-
### Story 2 — [Secondary Scenario]
|
|
49
|
-
|
|
50
|
-
[same format]
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Requirements
|
|
55
|
-
|
|
56
|
-
### Must Have (MVP)
|
|
57
|
-
- [ ] [Requirement — specific and testable]
|
|
58
|
-
- [ ] [Requirement]
|
|
59
|
-
|
|
60
|
-
### Should Have (v1.1)
|
|
61
|
-
- [ ] [Requirement]
|
|
62
|
-
|
|
63
|
-
### Won't Have (this version)
|
|
64
|
-
- [Explicitly out of scope item] — *Reason: [why deferred]*
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Out of Scope
|
|
69
|
-
|
|
70
|
-
> Be explicit. What are we NOT building and why?
|
|
71
|
-
|
|
72
|
-
- [Item] — deferred because [reason]
|
|
73
|
-
- [Item] — handled by [other team/system]
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Design & UX Notes
|
|
78
|
-
|
|
79
|
-
> Link to mockups, Figma, or describe key UX decisions.
|
|
80
|
-
|
|
81
|
-
- [Link to designs or description]
|
|
82
|
-
- [Key UX decision and rationale]
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Technical Considerations
|
|
87
|
-
|
|
88
|
-
> High-level notes for engineering — not a technical spec.
|
|
89
|
-
|
|
90
|
-
- [Known constraint or dependency]
|
|
91
|
-
- [Performance or scale consideration]
|
|
92
|
-
- [Integration point]
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Open Questions
|
|
97
|
-
|
|
98
|
-
| Question | Impact | Owner | Due Date | Status |
|
|
99
|
-
|----------|--------|-------|----------|--------|
|
|
100
|
-
| [Question] | High/Med/Low | [Name] | [Date] | Open |
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## Appendix
|
|
105
|
-
|
|
106
|
-
> Supporting data, research links, related tickets.
|
|
107
|
-
|
|
108
|
-
- [Link or reference]
|