forge-workflow 0.0.1
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/.claude/commands/dev.md +314 -0
- package/.claude/commands/plan.md +389 -0
- package/.claude/commands/premerge.md +179 -0
- package/.claude/commands/research.md +42 -0
- package/.claude/commands/review.md +442 -0
- package/.claude/commands/rollback.md +721 -0
- package/.claude/commands/ship.md +134 -0
- package/.claude/commands/sonarcloud.md +152 -0
- package/.claude/commands/status.md +77 -0
- package/.claude/commands/validate.md +237 -0
- package/.claude/commands/verify.md +221 -0
- package/.claude/rules/greptile-review-process.md +285 -0
- package/.claude/rules/workflow.md +105 -0
- package/.claude/scripts/greptile-resolve.sh +526 -0
- package/.claude/scripts/load-env.sh +32 -0
- package/.forge/hooks/check-tdd.js +240 -0
- package/.github/PLUGIN_TEMPLATE.json +32 -0
- package/.mcp.json.example +12 -0
- package/AGENTS.md +169 -0
- package/CLAUDE.md +99 -0
- package/LICENSE +21 -0
- package/README.md +414 -0
- package/bin/forge-cmd.js +313 -0
- package/bin/forge-validate.js +303 -0
- package/bin/forge.js +4228 -0
- package/docs/AGENT_INSTALL_PROMPT.md +342 -0
- package/docs/ENHANCED_ONBOARDING.md +602 -0
- package/docs/EXAMPLES.md +482 -0
- package/docs/GREPTILE_SETUP.md +400 -0
- package/docs/MANUAL_REVIEW_GUIDE.md +106 -0
- package/docs/ROADMAP.md +359 -0
- package/docs/SETUP.md +632 -0
- package/docs/TOOLCHAIN.md +849 -0
- package/docs/VALIDATION.md +363 -0
- package/docs/WORKFLOW.md +400 -0
- package/docs/planning/PROGRESS.md +396 -0
- package/docs/plans/.gitkeep +0 -0
- package/docs/plans/2026-02-27-forge-test-suite-v2-decisions.md +21 -0
- package/docs/plans/2026-02-27-forge-test-suite-v2-design.md +362 -0
- package/docs/plans/2026-02-27-forge-test-suite-v2-tasks.md +343 -0
- package/docs/plans/2026-03-02-superpowers-gaps-decisions.md +26 -0
- package/docs/plans/2026-03-02-superpowers-gaps-design.md +239 -0
- package/docs/plans/2026-03-02-superpowers-gaps-tasks.md +260 -0
- package/docs/plans/2026-03-04-agent-command-parity-design.md +163 -0
- package/docs/plans/2026-03-04-verify-worktree-cleanup-decisions.md +7 -0
- package/docs/plans/2026-03-04-verify-worktree-cleanup-design.md +165 -0
- package/docs/plans/2026-03-05-forge-uto-decisions.md +6 -0
- package/docs/plans/2026-03-05-forge-uto-design.md +116 -0
- package/docs/plans/2026-03-05-forge-uto-tasks.md +244 -0
- package/docs/plans/2026-03-10-command-creator-and-eval-decisions.md +52 -0
- package/docs/plans/2026-03-10-command-creator-and-eval-design.md +350 -0
- package/docs/plans/2026-03-10-command-creator-and-eval-tasks.md +426 -0
- package/docs/plans/2026-03-10-stale-workflow-refs-decisions.md +8 -0
- package/docs/plans/2026-03-10-stale-workflow-refs-design.md +80 -0
- package/docs/plans/2026-03-10-stale-workflow-refs-tasks.md +90 -0
- package/docs/plans/2026-03-14-beads-plan-context-decisions.md +9 -0
- package/docs/plans/2026-03-14-beads-plan-context-design.md +171 -0
- package/docs/plans/2026-03-14-beads-plan-context-tasks.md +160 -0
- package/docs/plans/2026-03-14-skill-eval-loop-decisions.md +33 -0
- package/docs/plans/2026-03-14-skill-eval-loop-design.md +118 -0
- package/docs/plans/2026-03-14-skill-eval-loop-results.md +78 -0
- package/docs/plans/2026-03-14-skill-eval-loop-tasks.md +160 -0
- package/docs/plans/2026-03-15-agent-command-parity-v2-decisions.md +11 -0
- package/docs/plans/2026-03-15-agent-command-parity-v2-design.md +145 -0
- package/docs/plans/2026-03-15-agent-command-parity-v2-tasks.md +211 -0
- package/docs/research/TEMPLATE.md +292 -0
- package/docs/research/advanced-testing.md +297 -0
- package/docs/research/agent-permissions.md +167 -0
- package/docs/research/dependency-chain.md +328 -0
- package/docs/research/forge-workflow-v2.md +550 -0
- package/docs/research/plugin-architecture.md +772 -0
- package/docs/research/pr4-cli-automation.md +326 -0
- package/docs/research/premerge-verify-restructure.md +205 -0
- package/docs/research/skills-restructure.md +508 -0
- package/docs/research/sonarcloud-perfection-plan.md +166 -0
- package/docs/research/sonarcloud-quality-gate.md +184 -0
- package/docs/research/superpowers-integration.md +403 -0
- package/docs/research/superpowers.md +319 -0
- package/docs/research/test-environment.md +519 -0
- package/install.sh +1062 -0
- package/lefthook.yml +39 -0
- package/lib/agents/README.md +198 -0
- package/lib/agents/claude.plugin.json +28 -0
- package/lib/agents/cline.plugin.json +22 -0
- package/lib/agents/codex.plugin.json +19 -0
- package/lib/agents/copilot.plugin.json +24 -0
- package/lib/agents/cursor.plugin.json +25 -0
- package/lib/agents/kilocode.plugin.json +22 -0
- package/lib/agents/opencode.plugin.json +20 -0
- package/lib/agents/roo.plugin.json +23 -0
- package/lib/agents-config.js +2112 -0
- package/lib/commands/dev.js +513 -0
- package/lib/commands/plan.js +696 -0
- package/lib/commands/recommend.js +119 -0
- package/lib/commands/ship.js +377 -0
- package/lib/commands/status.js +378 -0
- package/lib/commands/validate.js +602 -0
- package/lib/context-merge.js +359 -0
- package/lib/plugin-catalog.js +360 -0
- package/lib/plugin-manager.js +166 -0
- package/lib/plugin-recommender.js +141 -0
- package/lib/project-discovery.js +491 -0
- package/lib/setup.js +118 -0
- package/lib/workflow-profiles.js +203 -0
- package/package.json +115 -0
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
# Research: PR5.5 — Skills Restructure for skills.sh
|
|
2
|
+
|
|
3
|
+
**Date**: 2026-02-21
|
|
4
|
+
**Beads Issue**: TBD (create during /plan)
|
|
5
|
+
**Status**: Research complete, ready for `/plan`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Objective
|
|
10
|
+
|
|
11
|
+
Restructure the existing monolithic `parallel-ai` skill into 4 focused skills and migrate all skills from `.claude/skills/` to `skills/` (repo root) for skills.sh compatibility. This unlocks PR7's ability to extract skills from the npm package and publish them via `npx skills add harshanandak/forge`.
|
|
12
|
+
|
|
13
|
+
**Why now**: PR6 recommends skills to users via `forge recommend`. Our own skills should be installable the same way third-party skills are. PR5.5 is the prerequisite that makes Forge "eat its own dogfood."
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Codebase Analysis
|
|
18
|
+
|
|
19
|
+
### Current Skills Structure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
.claude/skills/
|
|
23
|
+
parallel-ai/
|
|
24
|
+
SKILL.md (monolithic — covers all 4 APIs)
|
|
25
|
+
api-reference.md (endpoint docs for all 4 APIs)
|
|
26
|
+
quick-reference.md (troubleshooting + endpoints table)
|
|
27
|
+
research-workflows.md (3 use-case examples)
|
|
28
|
+
README.md
|
|
29
|
+
sonarcloud/
|
|
30
|
+
SKILL.md (fork context skill with full API docs)
|
|
31
|
+
reference.md (comprehensive API reference)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Problems with Current Structure
|
|
35
|
+
|
|
36
|
+
1. **Too monolithic**: `parallel-ai/SKILL.md` teaches all 4 Parallel AI APIs in one file. Agents load it in full, wasting context on irrelevant APIs.
|
|
37
|
+
2. **Wrong install location**: `.claude/skills/` is Claude Code–specific. `skills/` at repo root is the skills.sh standard and works with 20+ agents.
|
|
38
|
+
3. **Inconsistent naming**: `parallel-ai` doesn't map to a specific use case; `sonarcloud` is undiscoverable without knowing what SonarCloud is.
|
|
39
|
+
4. **No citation-standards rule**: Research quality suffers without a citation enforcement skill.
|
|
40
|
+
|
|
41
|
+
### Affected Files
|
|
42
|
+
|
|
43
|
+
| File | Action |
|
|
44
|
+
|------|--------|
|
|
45
|
+
| `.claude/skills/parallel-ai/SKILL.md` | Split into 4 new skills |
|
|
46
|
+
| `.claude/skills/parallel-ai/api-reference.md` | Split by API into skill references |
|
|
47
|
+
| `.claude/skills/parallel-ai/quick-reference.md` | Distribute to relevant skills |
|
|
48
|
+
| `.claude/skills/parallel-ai/research-workflows.md` | Move to parallel-deep-research |
|
|
49
|
+
| `.claude/skills/sonarcloud/SKILL.md` | Migrate to `skills/sonarcloud-analysis/` |
|
|
50
|
+
| `.claude/skills/sonarcloud/reference.md` | Migrate to `skills/sonarcloud-analysis/references/` |
|
|
51
|
+
| `lib/plugin-catalog.js` | Update install commands (2 entries) |
|
|
52
|
+
| `.claude/commands/research.md` | Update skill references |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Critical Finding: Official Parallel Skills Repo Already Exists
|
|
57
|
+
|
|
58
|
+
**Source**: [github.com/parallel-web/parallel-agent-skills](https://github.com/parallel-web/parallel-agent-skills) | [github.com/parallel-web/parallel-cursor-plugin](https://github.com/parallel-web/parallel-cursor-plugin)
|
|
59
|
+
|
|
60
|
+
Parallel AI already publishes the exact 4 skills we planned to write ourselves:
|
|
61
|
+
|
|
62
|
+
| Skill | Official Name | Install |
|
|
63
|
+
|-------|--------------|---------|
|
|
64
|
+
| Web search | `parallel-web-search` | `npx skills add parallel-web/parallel-agent-skills --skill parallel-web-search` |
|
|
65
|
+
| URL extraction | `parallel-web-extract` | `npx skills add parallel-web/parallel-agent-skills --skill parallel-web-extract` |
|
|
66
|
+
| Deep research | `parallel-deep-research` | `npx skills add parallel-web/parallel-agent-skills --skill parallel-deep-research` |
|
|
67
|
+
| Data enrichment | `parallel-data-enrichment` | `npx skills add parallel-web/parallel-agent-skills --skill parallel-data-enrichment` |
|
|
68
|
+
|
|
69
|
+
**Key difference from our current skill**: The official skills use **`parallel-cli`** (a CLI tool), NOT direct REST API calls. The CLI is installed via:
|
|
70
|
+
```bash
|
|
71
|
+
curl -fsSL https://parallel.ai/install.sh | bash
|
|
72
|
+
# or: pipx install "parallel-web-tools[cli]"
|
|
73
|
+
parallel-cli login # or: export PARALLEL_API_KEY="..."
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Official SKILL.md frontmatter (confirmed from source):
|
|
77
|
+
```yaml
|
|
78
|
+
---
|
|
79
|
+
name: parallel-web-search
|
|
80
|
+
description: "DEFAULT for all research... Fast and cost-effective..."
|
|
81
|
+
context: fork
|
|
82
|
+
compatibility: Requires parallel-cli and internet access.
|
|
83
|
+
allowed-tools: Bash(parallel-cli:*)
|
|
84
|
+
metadata:
|
|
85
|
+
author: parallel
|
|
86
|
+
---
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Official skills use commands like:
|
|
90
|
+
```bash
|
|
91
|
+
parallel-cli search "$ARGUMENTS" -q "<keyword>" --json --max-results 10 -o "$FILENAME.json"
|
|
92
|
+
parallel-cli extract "$ARGUMENTS" --json
|
|
93
|
+
parallel-cli enrich run --data '[...]' --intent "..." --target "output.csv" --no-wait
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**The `parallel-cursor-plugin` also has `citation-standards.mdc`** (a Cursor rule) with identical citation format guidance.
|
|
97
|
+
|
|
98
|
+
### Revised Scope: What PR5.5 Actually Does
|
|
99
|
+
|
|
100
|
+
**Old plan**: Write 4 custom parallel skills (REST API approach) + host in forge repo
|
|
101
|
+
**New plan**: Delete our REST API skill, point catalog to official `parallel-web/parallel-agent-skills`, host only forge-specific skills
|
|
102
|
+
|
|
103
|
+
**Why this is better**:
|
|
104
|
+
1. Users get the canonical, maintained version — parallel-cli is actively developed
|
|
105
|
+
2. We don't maintain a stale REST API skill while the official CLI evolves
|
|
106
|
+
3. Our `parallel-ai` skill has a fundamental mismatch — it documents the REST API but the official tool is `parallel-cli`
|
|
107
|
+
4. Less code, less maintenance, same outcome
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Web Research Findings
|
|
112
|
+
|
|
113
|
+
### skills.sh Format (2025/2026)
|
|
114
|
+
|
|
115
|
+
**Source**: [GitHub vercel-labs/skills](https://github.com/vercel-labs/skills) | [Mintlify blog](https://www.mintlify.com/blog/skill-md) | [skills.sh FAQ](https://skills.sh/docs/faq)
|
|
116
|
+
|
|
117
|
+
**Required frontmatter** (YAML):
|
|
118
|
+
```yaml
|
|
119
|
+
---
|
|
120
|
+
name: skill-name # lowercase, hyphens, unique
|
|
121
|
+
description: "One sentence — what it does and when to use it"
|
|
122
|
+
---
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Optional frontmatter**:
|
|
126
|
+
```yaml
|
|
127
|
+
---
|
|
128
|
+
name: skill-name
|
|
129
|
+
description: "..."
|
|
130
|
+
metadata:
|
|
131
|
+
internal: true # Hide from public discovery
|
|
132
|
+
---
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Discovery locations** (CLI searches these in order):
|
|
136
|
+
1. `skills/<name>/SKILL.md` — **Primary** (standard)
|
|
137
|
+
2. `.claude/skills/<name>/SKILL.md` — Claude Code–specific (also discovered!)
|
|
138
|
+
3. Root-level `SKILL.md`
|
|
139
|
+
|
|
140
|
+
**Key insight**: `.claude/skills/` IS discovered by skills.sh CLI. We can keep backward compat by moving to `skills/` and adding redirecting or symlinks — or simply by migrating cleanly since Claude Code also discovers `skills/`.
|
|
141
|
+
|
|
142
|
+
**Install commands**:
|
|
143
|
+
```bash
|
|
144
|
+
npx skills add harshanandak/forge --skill parallel-web-search
|
|
145
|
+
npx skills add harshanandak/forge --skill parallel-deep-research
|
|
146
|
+
# etc.
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Multi-skill repos**: One GitHub repo can host multiple skills under `skills/` — each in its own subdirectory. This is ideal for forge: all skills ship in one repo, one `npx skills add harshanandak/forge` can install any/all.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Architecture: Target State
|
|
154
|
+
|
|
155
|
+
### New `skills/` Directory Structure
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
skills/
|
|
159
|
+
parallel-web-search/
|
|
160
|
+
SKILL.md # Search API only
|
|
161
|
+
references/
|
|
162
|
+
api-reference.md # Search + Extract endpoints
|
|
163
|
+
parallel-web-extract/
|
|
164
|
+
SKILL.md # Extract API only
|
|
165
|
+
parallel-deep-research/
|
|
166
|
+
SKILL.md # Task API (pro/ultra) + polling
|
|
167
|
+
references/
|
|
168
|
+
research-workflows.md # Moved from parallel-ai/
|
|
169
|
+
parallel-data-enrichment/
|
|
170
|
+
SKILL.md # Task API (core/base) + schemas
|
|
171
|
+
sonarcloud-analysis/
|
|
172
|
+
SKILL.md # Migrated from .claude/skills/sonarcloud/
|
|
173
|
+
references/
|
|
174
|
+
api-reference.md # Migrated from sonarcloud/reference.md
|
|
175
|
+
citation-standards/
|
|
176
|
+
SKILL.md # NEW: citation quality enforcement
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Skill Responsibility Map
|
|
180
|
+
|
|
181
|
+
| Skill | API | Use Case | Processor |
|
|
182
|
+
|-------|-----|----------|-----------|
|
|
183
|
+
| `parallel-web-search` | Search | Quick lookups, facts, news | N/A |
|
|
184
|
+
| `parallel-web-extract` | Extract | Scrape URLs, get pricing | N/A |
|
|
185
|
+
| `parallel-deep-research` | Task | Market analysis, reports | pro/ultra |
|
|
186
|
+
| `parallel-data-enrichment` | Task | Company data, structured output | core/base |
|
|
187
|
+
| `sonarcloud-analysis` | SonarCloud API | Code quality, security | N/A |
|
|
188
|
+
| `citation-standards` | — | Research citation quality | N/A (rule) |
|
|
189
|
+
|
|
190
|
+
### Plugin Catalog Updates
|
|
191
|
+
|
|
192
|
+
Two entries in `lib/plugin-catalog.js` need updating:
|
|
193
|
+
|
|
194
|
+
```js
|
|
195
|
+
// Before
|
|
196
|
+
'parallel-ai': {
|
|
197
|
+
install: { method: 'skills', cmd: 'bunx skills add parallel-ai' },
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// After — point to the primary/most-used skill
|
|
201
|
+
'parallel-web-search': {
|
|
202
|
+
name: 'Parallel Web Search',
|
|
203
|
+
install: { method: 'skills', cmd: 'bunx skills add harshanandak/forge --skill parallel-web-search' },
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
```js
|
|
208
|
+
// Before
|
|
209
|
+
sonarcloud: {
|
|
210
|
+
install: { method: 'skills', cmd: 'bunx skills add sonarcloud' },
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// After
|
|
214
|
+
'sonarcloud-analysis': {
|
|
215
|
+
name: 'SonarCloud Analysis',
|
|
216
|
+
install: { method: 'skills', cmd: 'bunx skills add harshanandak/forge --skill sonarcloud-analysis' },
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Key Decisions
|
|
223
|
+
|
|
224
|
+
### D1: Move to `skills/` at repo root (not stay in `.claude/skills/`)
|
|
225
|
+
|
|
226
|
+
**Decision**: Migrate to `skills/<name>/SKILL.md` at repo root, remove `.claude/skills/` entries.
|
|
227
|
+
**Reasoning**: `skills/` is the standard discovery location for skills.sh CLI and works across all 20+ agents. `.claude/skills/` only works for Claude Code. Both are discovered by the skills.sh CLI, but `skills/` signals intentional multi-agent publishing.
|
|
228
|
+
**Evidence**: vercel-labs/skills README shows `skills/<name>/SKILL.md` as canonical path. Mintlify blog confirms `skills/` as the primary location.
|
|
229
|
+
**Alternative considered**: Keep `.claude/skills/` and add `skills/` as symlinks → rejected (confusing, maintenance burden).
|
|
230
|
+
|
|
231
|
+
### D2: Split parallel-ai into 4 skills (not 2 or 3)
|
|
232
|
+
|
|
233
|
+
**Decision**: 4 separate skills matching the 4 Parallel AI API use cases.
|
|
234
|
+
**Reasoning**: Each API is genuinely different in speed, cost, use case. Agents should load only the relevant API knowledge. A "parallel-ai-search" + "parallel-ai-research" split (2) would still force irrelevant context on agents.
|
|
235
|
+
**Evidence**: PR6 research D6 specified 4 skills. Current `parallel-ai/SKILL.md` lines 1-94 confirm the 4 distinct APIs.
|
|
236
|
+
**Alternative considered**: Keep monolithic, just move location → rejected (agents over-load context from 4 APIs when they only need 1).
|
|
237
|
+
|
|
238
|
+
### D3: `parallel-data-enrichment` (not `parallel-task`)
|
|
239
|
+
|
|
240
|
+
**Decision**: Name the Task API skill `parallel-data-enrichment`, not `parallel-task`.
|
|
241
|
+
**Reasoning**: "Task" is an internal API concept. Users think in terms of use cases: "I need to enrich company data." The name surfaces the primary use case.
|
|
242
|
+
**Alternative considered**: `parallel-task` → rejected (internal jargon, unclear to agents deciding which skill to load).
|
|
243
|
+
|
|
244
|
+
### D4: `citation-standards` as a rule skill, not an API wrapper
|
|
245
|
+
|
|
246
|
+
**Decision**: New `citation-standards/SKILL.md` is a guidance skill (rules/standards), not an API wrapper.
|
|
247
|
+
**Reasoning**: Research quality suffers without explicit citation standards. This is a behavioral rule ("always cite sources in this format") not a tool wrapper. Skills can encode workflow rules, not just API docs.
|
|
248
|
+
**Evidence**: PR6 research D6 explicitly calls out citation-standards as a needed rule. Mintlify's skill.md blog confirms skills are for "best practices, capabilities, limitations" not just API docs.
|
|
249
|
+
|
|
250
|
+
### D5: Update catalog install commands to use full `harshanandak/forge` path
|
|
251
|
+
|
|
252
|
+
**Decision**: Catalog install commands use `bunx skills add harshanandak/forge --skill <name>` instead of `bunx skills add <name>`.
|
|
253
|
+
**Reasoning**: Skills are hosted in this repo, not published to a global registry. The `harshanandak/forge` qualifier points to the GitHub repo where skills.sh finds them.
|
|
254
|
+
**Evidence**: skills.sh CLI supports `npx skills add owner/repo --skill skill-name` syntax per GitHub README.
|
|
255
|
+
**Alternative considered**: Publish each skill as its own repo → rejected (unnecessary proliferation, all skills live naturally in the forge repo).
|
|
256
|
+
|
|
257
|
+
### D6: Keep `.claude/commands/` skill references consistent
|
|
258
|
+
|
|
259
|
+
**Decision**: Update `.claude/commands/research.md` to reference new skill names.
|
|
260
|
+
**Reasoning**: The research command invokes `parallel-ai` skill. After restructure, it should invoke `parallel-web-search` and `parallel-deep-research` by context.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## TDD Test Scenarios
|
|
265
|
+
|
|
266
|
+
### Test File: `test/skills-catalog.test.js`
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
1. skills/ directory exists at repo root
|
|
270
|
+
2. Each required skill directory exists (6 skills)
|
|
271
|
+
3. Each skill has a SKILL.md file
|
|
272
|
+
4. Each SKILL.md has valid frontmatter (name + description)
|
|
273
|
+
5. Skill names match directory names (kebab-case)
|
|
274
|
+
6. Descriptions are non-empty strings
|
|
275
|
+
7. parallel-web-search references Search API
|
|
276
|
+
8. parallel-web-extract references Extract API
|
|
277
|
+
9. parallel-deep-research references Task API with pro/ultra
|
|
278
|
+
10. parallel-data-enrichment references Task API with core/base
|
|
279
|
+
11. sonarcloud-analysis references SonarCloud API
|
|
280
|
+
12. citation-standards has citation format examples
|
|
281
|
+
13. Old .claude/skills/parallel-ai/ no longer exists (or redirects)
|
|
282
|
+
14. Old .claude/skills/sonarcloud/ no longer exists (or redirects)
|
|
283
|
+
15. Reference files exist where linked from SKILL.md
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Test File: `test/plugin-catalog.test.js` (updates)
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
16. parallel-ai entry replaced by parallel-web-search
|
|
290
|
+
17. sonarcloud entry updated to sonarcloud-analysis
|
|
291
|
+
18. Install commands use harshanandak/forge format
|
|
292
|
+
19. Catalog still has 30 tools (rename, not removal)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Security Analysis (OWASP Top 10)
|
|
298
|
+
|
|
299
|
+
| Category | Risk | Status |
|
|
300
|
+
|----------|------|--------|
|
|
301
|
+
| A01 Broken Access Control | No auth/access changes | N/A |
|
|
302
|
+
| A02 Cryptographic Failures | No secrets in SKILL.md files | ✓ PASS — review each file for accidental key exposure |
|
|
303
|
+
| A03 Injection | No user input in skill files | N/A |
|
|
304
|
+
| A04 Insecure Design | N/A (doc restructure) | N/A |
|
|
305
|
+
| A05 Security Misconfiguration | PARALLEL_API_KEY guidance stays in skill docs | ✓ PASS |
|
|
306
|
+
| A06 Vulnerable Components | No dependency changes | N/A |
|
|
307
|
+
| A07 Auth Failures | N/A | N/A |
|
|
308
|
+
| A08 Integrity Failures | SKILL.md files in npm `files` — reviewed content | ✓ PASS |
|
|
309
|
+
| A09 Logging Failures | N/A | N/A |
|
|
310
|
+
| A10 SSRF | Parallel AI URLs hardcoded in examples — not user-controlled | ✓ PASS |
|
|
311
|
+
|
|
312
|
+
Key security review: Confirm no API keys or credentials leak into any SKILL.md or reference file (check existing files — none found during research).
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Scope Assessment
|
|
317
|
+
|
|
318
|
+
- Type: Tactical (file restructure + docs), no new runtime logic
|
|
319
|
+
- Complexity: Small (1-2 days)
|
|
320
|
+
- Parallelizable: No — sequential content split, single author
|
|
321
|
+
- Test count estimate: ~19 new tests
|
|
322
|
+
- Risk: Low — pure documentation/structure change, no behavior change
|
|
323
|
+
- Blocking: PR7 (needs skills published before extraction)
|
|
324
|
+
|
|
325
|
+
### What's NOT in PR5.5
|
|
326
|
+
|
|
327
|
+
| Feature | Why Deferred | When |
|
|
328
|
+
|---------|-------------|------|
|
|
329
|
+
| `npx skills add harshanandak/forge` validation | Requires actual publishing step (GitHub Actions or manual) | PR7 |
|
|
330
|
+
| Removing skills from npm `files` | Can't remove until skills.sh install path is proven | PR7 |
|
|
331
|
+
| AI-powered skill creation | Requires PR8 | PR8 |
|
|
332
|
+
| New skills beyond the 6 listed | Scope creep | PR8 |
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## Implementation Checklist
|
|
337
|
+
|
|
338
|
+
### Step 1: Create `skills/` directory with 6 new SKILL.md files
|
|
339
|
+
- `skills/parallel-web-search/SKILL.md` — extract Search API content
|
|
340
|
+
- `skills/parallel-web-extract/SKILL.md` — extract Extract API content
|
|
341
|
+
- `skills/parallel-deep-research/SKILL.md` — extract Task (pro/ultra) content + polling
|
|
342
|
+
- `skills/parallel-data-enrichment/SKILL.md` — extract Task (core/base) + schema content
|
|
343
|
+
- `skills/sonarcloud-analysis/SKILL.md` — migrate from `.claude/skills/sonarcloud/SKILL.md`
|
|
344
|
+
- `skills/citation-standards/SKILL.md` — NEW
|
|
345
|
+
|
|
346
|
+
### Step 2: Move reference files
|
|
347
|
+
- `skills/parallel-web-search/references/api-reference.md`
|
|
348
|
+
- `skills/parallel-deep-research/references/research-workflows.md`
|
|
349
|
+
- `skills/sonarcloud-analysis/references/api-reference.md` (from sonarcloud/reference.md)
|
|
350
|
+
|
|
351
|
+
### Step 3: Remove old skill directories
|
|
352
|
+
- Delete `.claude/skills/parallel-ai/`
|
|
353
|
+
- Delete `.claude/skills/sonarcloud/`
|
|
354
|
+
|
|
355
|
+
### Step 4: Update catalog
|
|
356
|
+
- `lib/plugin-catalog.js`: rename `parallel-ai` → `parallel-web-search`, update cmd
|
|
357
|
+
- `lib/plugin-catalog.js`: update `sonarcloud` cmd to `harshanandak/forge --skill sonarcloud-analysis`
|
|
358
|
+
|
|
359
|
+
### Step 5: Update references
|
|
360
|
+
- `.claude/commands/research.md`: update skill name references
|
|
361
|
+
- `CLAUDE.md` or `AGENTS.md` if they reference skills by path
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## Supplementary Research: vercel-labs/agent-skills & skills.sh Mechanism (2026-02-21)
|
|
368
|
+
|
|
369
|
+
### Critical Correction: No `metadata.json` File
|
|
370
|
+
|
|
371
|
+
The previous Explore agent hallucinated a `metadata.json` file. **It does not exist** in either `vercel-labs/agent-skills` or `anthropics/skills`. Confirmed by direct GitHub API inspection of both repos.
|
|
372
|
+
|
|
373
|
+
**All metadata lives in SKILL.md YAML frontmatter only.**
|
|
374
|
+
|
|
375
|
+
### Official SKILL.md Frontmatter Spec
|
|
376
|
+
|
|
377
|
+
From [Vercel docs](https://vercel.com/docs/agent-resources/skills) + [KB guide](https://vercel.com/kb/guide/agent-skills-creating-installing-and-sharing-reusable-agent-context):
|
|
378
|
+
|
|
379
|
+
```yaml
|
|
380
|
+
---
|
|
381
|
+
name: skill-name # REQUIRED: must match directory name, ^[a-z0-9]+(-[a-z0-9]+)*$, 1-64 chars
|
|
382
|
+
description: "..." # REQUIRED: what it does + when to use it, 1-1024 chars
|
|
383
|
+
|
|
384
|
+
# Optional:
|
|
385
|
+
license: "MIT"
|
|
386
|
+
compatibility: "Requires parallel-cli and internet access." # max 500 chars
|
|
387
|
+
metadata: # arbitrary key/value pairs (good for versioning, author)
|
|
388
|
+
author: harshanandak
|
|
389
|
+
version: "1.0.0"
|
|
390
|
+
internal: true # hides from public skills.sh discovery (INSTALL_INTERNAL_SKILLS=1 to see)
|
|
391
|
+
allowed-tools: # experimental, varies by agent
|
|
392
|
+
- Bash(parallel-cli:*)
|
|
393
|
+
---
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
**In practice** (from `anthropics/skills/frontend-design/SKILL.md` and vercel-labs examples): most production skills use only `name`, `description`, and optionally `license`. The `metadata`, `compatibility`, and `allowed-tools` fields are advanced/optional.
|
|
397
|
+
|
|
398
|
+
### Real-World Skill Directory Structure
|
|
399
|
+
|
|
400
|
+
From `anthropics/skills/skill-creator/`:
|
|
401
|
+
```
|
|
402
|
+
skill-creator/
|
|
403
|
+
├── SKILL.md ← required
|
|
404
|
+
├── LICENSE.txt ← optional (real skills include this)
|
|
405
|
+
├── references/ ← optional reference docs
|
|
406
|
+
└── scripts/ ← optional helper scripts
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
No `metadata.json`. No `assets/`. Simple.
|
|
410
|
+
|
|
411
|
+
### anthropics/skills Repo (16 Published Skills)
|
|
412
|
+
|
|
413
|
+
Anthropic publishes their own skills at `github.com/anthropics/skills`:
|
|
414
|
+
`algorithmic-art`, `brand-guidelines`, `canvas-design`, `doc-coauthoring`, `docx`, `frontend-design`, `internal-comms`, `mcp-builder`, `pdf`, `pptx`, `skill-creator`, `slack-gif-creator`, `theme-factory`, `web-artifacts-builder`, `webapp-testing`, `xlsx`
|
|
415
|
+
|
|
416
|
+
**Implication**: Both Vercel and Anthropic use the same `skills/<name>/SKILL.md` structure. This is the de-facto standard.
|
|
417
|
+
|
|
418
|
+
### skills.sh CLI — On-Demand Download Mechanism
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
# Install all skills from a repo
|
|
422
|
+
npx skills add vercel-labs/agent-skills
|
|
423
|
+
|
|
424
|
+
# Install a specific skill from a multi-skill repo
|
|
425
|
+
npx skills add harshanandak/forge --skill sonarcloud-analysis
|
|
426
|
+
|
|
427
|
+
# Find skills by query
|
|
428
|
+
npx skills find "sonarcloud code quality"
|
|
429
|
+
|
|
430
|
+
# Also works with full URLs, GitLab, local paths
|
|
431
|
+
npx skills add https://github.com/anthropics/skills --skill pdf
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Skills are downloaded directly from GitHub on demand. **Not published to any central registry** — GitHub repo IS the source of truth.
|
|
435
|
+
|
|
436
|
+
### Package.json `files` Finding (Current Forge State)
|
|
437
|
+
|
|
438
|
+
```json
|
|
439
|
+
"files": [
|
|
440
|
+
"bin/",
|
|
441
|
+
"lib/",
|
|
442
|
+
".claude/commands/",
|
|
443
|
+
".claude/rules/",
|
|
444
|
+
".claude/scripts/",
|
|
445
|
+
".claude/skills/", ← currently includes OLD skill location
|
|
446
|
+
...
|
|
447
|
+
]
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
`skills/` (repo root) is **NOT** in `files` — it will be excluded from the npm package automatically when we create it. This is the correct behavior: skills are downloaded on demand via `npx skills add`, not shipped with the npm package.
|
|
451
|
+
|
|
452
|
+
**PR5.5 action**: After migrating skills to `skills/`, remove `.claude/skills/` from `package.json` `files` (since we'll be deleting that directory).
|
|
453
|
+
|
|
454
|
+
### Revised Design Decision: CLI + Curl Dual Path in `skills/`
|
|
455
|
+
|
|
456
|
+
**Updated from previous research**: Rather than pointing catalog to official `parallel-web/parallel-agent-skills` only, the forge `skills/` directory hosts **curl-based** versions of the 4 parallel skills as a no-binary fallback.
|
|
457
|
+
|
|
458
|
+
```
|
|
459
|
+
skills/
|
|
460
|
+
parallel-web-search/ ← forge-hosted curl version (PARALLEL_API_KEY, no parallel-cli)
|
|
461
|
+
parallel-web-extract/ ← forge-hosted curl version
|
|
462
|
+
parallel-deep-research/ ← forge-hosted curl version
|
|
463
|
+
parallel-data-enrichment/ ← forge-hosted curl version
|
|
464
|
+
sonarcloud-analysis/ ← forge-specific, curl-based
|
|
465
|
+
citation-standards/ ← forge-specific, rules-based
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
Catalog entry for `parallel-web-search` exposes BOTH:
|
|
469
|
+
- `install.cmd` → official CLI path (`parallel-web/parallel-agent-skills`)
|
|
470
|
+
- `install.cmdCurl` → forge curl path (`harshanandak/forge --skill parallel-web-search`)
|
|
471
|
+
|
|
472
|
+
`forge recommend` shows both options with "CLI (recommended)" + "Curl (no install)" labels.
|
|
473
|
+
|
|
474
|
+
### Updated Catalog Schema Extension
|
|
475
|
+
|
|
476
|
+
Add `cmdCurl` as optional field on `install`:
|
|
477
|
+
```js
|
|
478
|
+
'parallel-web-search': {
|
|
479
|
+
install: {
|
|
480
|
+
method: 'skills',
|
|
481
|
+
cmd: 'bunx skills add parallel-web/parallel-agent-skills --skill parallel-web-search',
|
|
482
|
+
cmdCurl: 'bunx skills add harshanandak/forge --skill parallel-web-search',
|
|
483
|
+
},
|
|
484
|
+
prerequisites: ['parallel-cli'], // only for CLI path
|
|
485
|
+
},
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
Add `parallel-cli` to PREREQUISITES registry:
|
|
489
|
+
```js
|
|
490
|
+
'parallel-cli': {
|
|
491
|
+
check: 'parallel-cli --version',
|
|
492
|
+
installUrl: 'https://parallel.ai/install.sh',
|
|
493
|
+
},
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
## Sources
|
|
499
|
+
|
|
500
|
+
- [GitHub vercel-labs/skills](https://github.com/vercel-labs/skills) — Official skills.sh CLI and format spec
|
|
501
|
+
- [Mintlify blog: skill.md open standard](https://www.mintlify.com/blog/skill-md) — SKILL.md as open standard
|
|
502
|
+
- [skills.sh FAQ](https://skills.sh/docs/faq) — Agent skills directory
|
|
503
|
+
- [npm: skills package](https://www.npmjs.com/package/skills) — CLI installation
|
|
504
|
+
- [add-skill.org](https://add-skill.org/) — Alternative skill installer reference
|
|
505
|
+
- [Vercel Agent Skills docs](https://vercel.com/docs/agent-resources/skills) — Official install guide
|
|
506
|
+
- [Vercel KB: Creating Agent Skills](https://vercel.com/kb/guide/agent-skills-creating-installing-and-sharing-reusable-agent-context) — Complete SKILL.md spec
|
|
507
|
+
- [vercel-labs/agent-skills](https://github.com/vercel-labs/agent-skills) — Vercel's official skills collection
|
|
508
|
+
- [anthropics/skills](https://github.com/anthropics/skills) — Anthropic's 16 official skills (confirmed no metadata.json)
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# SonarCloud Perfection Plan - Final Phase
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Achieve 100% SonarCloud quality gate compliance by fixing all remaining complexity and code quality issues.
|
|
5
|
+
|
|
6
|
+
## Current Status
|
|
7
|
+
- **Completed**: 231-point complexity reduction across 7 major functions
|
|
8
|
+
- **Remaining**: 6 complexity issues + 10 code quality issues
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Phase 7A: Helper Function Refinement (6 points)
|
|
13
|
+
|
|
14
|
+
### 1. promptBeadsSetup (Line 2951) - Complexity 17→15
|
|
15
|
+
**Current**: Single function handles status check, prompts, and 3 installation methods
|
|
16
|
+
**Strategy**: Extract installation method handling
|
|
17
|
+
- Create `installBeadsWithMethod(method, question)` helper
|
|
18
|
+
- Moves the nested try-catch and method switch to separate function
|
|
19
|
+
- **Reduction**: 2 points
|
|
20
|
+
|
|
21
|
+
### 2. promptOpenSpecSetup (Line 3035) - Complexity 17→15
|
|
22
|
+
**Current**: Mirror of promptBeadsSetup with same structure
|
|
23
|
+
**Strategy**: Extract installation method handling
|
|
24
|
+
- Create `installOpenSpecWithMethod(method, question)` helper
|
|
25
|
+
- Same pattern as Beads
|
|
26
|
+
- **Reduction**: 2 points
|
|
27
|
+
|
|
28
|
+
### 3. detectPackageManager (Line 251) - Complexity 17→15
|
|
29
|
+
**Current**: Nested if-else for 4 package managers + lock file checks
|
|
30
|
+
**Strategy**: Simplify detection logic
|
|
31
|
+
- Check lock files first (most authoritative)
|
|
32
|
+
- Fallback to command detection if no lock files
|
|
33
|
+
- Early returns to reduce nesting
|
|
34
|
+
- **Reduction**: 2 points
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Phase 7B: Pre-Existing Complexity (20+ points)
|
|
39
|
+
|
|
40
|
+
### 4. validateUserInput (Line 105) - Complexity 25→15
|
|
41
|
+
**Current**: Type-specific validation with deeply nested conditions
|
|
42
|
+
**Strategy**: Extract type-specific validators
|
|
43
|
+
- Create `validatePathInput(input)` - handles 'path' type
|
|
44
|
+
- Create `validateDirectoryPathInput(input)` - handles 'directory_path' type
|
|
45
|
+
- Create `validateAgentInput(input)` - handles 'agent' type
|
|
46
|
+
- Create `validateHashInput(input)` - handles 'hash' type
|
|
47
|
+
- Main function becomes a simple switch/dispatcher
|
|
48
|
+
- **Reduction**: 10 points
|
|
49
|
+
|
|
50
|
+
### 5. configureExternalServices (Line 1585) - Complexity 16→15
|
|
51
|
+
**Current**: Already heavily refactored, just 1 point over
|
|
52
|
+
**Strategy**: Minor extraction
|
|
53
|
+
- Extract the initial status check logic
|
|
54
|
+
- Or simplify conditional branches
|
|
55
|
+
- **Reduction**: 1 point
|
|
56
|
+
|
|
57
|
+
### 6. Unknown Function (Line 3988) - Complexity 25→15
|
|
58
|
+
**Need to identify**: Read the function to determine refactoring strategy
|
|
59
|
+
- **Reduction**: 10 points (estimated)
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Phase 7C: Code Quality Issues (10 items)
|
|
64
|
+
|
|
65
|
+
### Minor Fixes (Quick Wins)
|
|
66
|
+
1. **Nested Template Literal (Line 314)** - S4624
|
|
67
|
+
- Refactor to avoid nested templates
|
|
68
|
+
|
|
69
|
+
2. **Catch Parameter Naming (Line 2792)** - S7718
|
|
70
|
+
- Rename `npxErr` to `error_`
|
|
71
|
+
|
|
72
|
+
3. **Double Negation x2 (Lines 2856, 2889)** - S6509
|
|
73
|
+
- Simplify `!!(condition)` to `Boolean(condition)`
|
|
74
|
+
|
|
75
|
+
4. **Negated Condition x2 (Lines 2856, 2889)** - S7735
|
|
76
|
+
- Refactor to positive conditions
|
|
77
|
+
|
|
78
|
+
5. **Optional Chaining x2 (Lines 2167, 3596)** - S6582
|
|
79
|
+
- Replace `a && a.b` with `a?.b`
|
|
80
|
+
|
|
81
|
+
6. **Return Type Consistency (Lines 507, 2831, 2864)** - S3800
|
|
82
|
+
- Ensure functions return consistent types
|
|
83
|
+
- Common issue: returning `string | boolean | null`
|
|
84
|
+
- Fix: normalize return types
|
|
85
|
+
|
|
86
|
+
7. **Always Returns Same Value (Line 1834)** - S3516
|
|
87
|
+
- Either remove function or add logic
|
|
88
|
+
- Often dead code that can be refactored
|
|
89
|
+
|
|
90
|
+
8. **Top-level Await (Line 4373)** - S7785
|
|
91
|
+
- Replace promise chain with top-level await
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Implementation Order
|
|
96
|
+
|
|
97
|
+
### Round 1: Quick Wins (15 minutes)
|
|
98
|
+
- Fix all 10 code quality issues (Phase 7C)
|
|
99
|
+
- Low risk, high impact on SonarCloud score
|
|
100
|
+
|
|
101
|
+
### Round 2: Helper Refinement (20 minutes)
|
|
102
|
+
- Fix 3 helper functions (Phase 7A)
|
|
103
|
+
- promptBeadsSetup, promptOpenSpecSetup, detectPackageManager
|
|
104
|
+
- Medium complexity, clear patterns
|
|
105
|
+
|
|
106
|
+
### Round 3: Deep Refactoring (25 minutes)
|
|
107
|
+
- Fix 3 pre-existing complex functions (Phase 7B)
|
|
108
|
+
- validateUserInput, configureExternalServices, unknown function
|
|
109
|
+
- Higher complexity, requires careful testing
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Testing Strategy
|
|
114
|
+
|
|
115
|
+
After each round:
|
|
116
|
+
```bash
|
|
117
|
+
bun test test/integration/enhanced-onboarding.test.js
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
After all changes:
|
|
121
|
+
```bash
|
|
122
|
+
bun test # Full test suite
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Success Criteria
|
|
128
|
+
|
|
129
|
+
- ✅ All functions ≤15 cognitive complexity
|
|
130
|
+
- ✅ Zero SonarLint warnings in bin/forge.js
|
|
131
|
+
- ✅ All 127 core tests passing
|
|
132
|
+
- ✅ SonarCloud quality gate: PASS
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Risk Assessment
|
|
137
|
+
|
|
138
|
+
**Low Risk**:
|
|
139
|
+
- Code quality fixes (Phase 7C) - pure style improvements
|
|
140
|
+
- Helper function refinement (Phase 7A) - already isolated
|
|
141
|
+
|
|
142
|
+
**Medium Risk**:
|
|
143
|
+
- validateUserInput (Phase 7B) - security-critical, needs careful testing
|
|
144
|
+
|
|
145
|
+
**Mitigation**:
|
|
146
|
+
- Incremental commits after each fix
|
|
147
|
+
- Run tests after each round
|
|
148
|
+
- Can revert individual changes if needed
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Estimated Timeline
|
|
153
|
+
|
|
154
|
+
- Round 1 (Quick Wins): 15 minutes
|
|
155
|
+
- Round 2 (Helper Refinement): 20 minutes
|
|
156
|
+
- Round 3 (Deep Refactoring): 25 minutes
|
|
157
|
+
- **Total**: ~60 minutes
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Notes
|
|
162
|
+
|
|
163
|
+
- Line numbers may shift as edits are made
|
|
164
|
+
- Some warnings may be stale (IDE cache)
|
|
165
|
+
- Focus on legitimate issues only
|
|
166
|
+
- Maintain test coverage throughout
|