bmad-module-skill-forge 0.2.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.
- package/.nvmrc +1 -0
- package/LICENSE +26 -0
- package/README.md +213 -0
- package/docs/404.md +20 -0
- package/docs/agents.md +73 -0
- package/docs/architecture.md +301 -0
- package/docs/examples.md +144 -0
- package/docs/getting-started.md +198 -0
- package/docs/index.md +75 -0
- package/docs/workflows.md +190 -0
- package/package.json +109 -0
- package/src/agents/forger.agent.yaml +93 -0
- package/src/forger/README.md +17 -0
- package/src/forger/forge-tier.yaml +13 -0
- package/src/forger/preferences.yaml +10 -0
- package/src/knowledge/agentskills-spec.md +158 -0
- package/src/knowledge/confidence-tiers.md +153 -0
- package/src/knowledge/manual-section-integrity.md +156 -0
- package/src/knowledge/overview.md +56 -0
- package/src/knowledge/progressive-capability.md +120 -0
- package/src/knowledge/provenance-tracking.md +163 -0
- package/src/knowledge/skf-knowledge-index.csv +9 -0
- package/src/knowledge/skill-lifecycle.md +150 -0
- package/src/knowledge/zero-hallucination.md +101 -0
- package/src/module-help.csv +12 -0
- package/src/module.yaml +22 -0
- package/src/workflows/README.md +148 -0
- package/src/workflows/analyze-source/data/skill-brief-schema.md +75 -0
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +88 -0
- package/src/workflows/analyze-source/steps-c/step-01-init.md +191 -0
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +144 -0
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +208 -0
- package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +199 -0
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +222 -0
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +236 -0
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +239 -0
- package/src/workflows/analyze-source/templates/analysis-report-template.md +41 -0
- package/src/workflows/analyze-source/validation-report.md +657 -0
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +385 -0
- package/src/workflows/analyze-source/workflow.md +61 -0
- package/src/workflows/audit-skill/data/drift-report-template.md +62 -0
- package/src/workflows/audit-skill/data/severity-rules.md +52 -0
- package/src/workflows/audit-skill/steps-c/step-01-init.md +195 -0
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +191 -0
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +194 -0
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +199 -0
- package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +210 -0
- package/src/workflows/audit-skill/steps-c/step-06-report.md +217 -0
- package/src/workflows/audit-skill/validation-report.md +545 -0
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +318 -0
- package/src/workflows/audit-skill/workflow.md +63 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +82 -0
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +184 -0
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +203 -0
- package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +225 -0
- package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +185 -0
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +156 -0
- package/src/workflows/brief-skill/validation-report.md +630 -0
- package/src/workflows/brief-skill/workflow-plan-brief-skill.md +360 -0
- package/src/workflows/brief-skill/workflow.md +57 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +63 -0
- package/src/workflows/create-skill/data/skill-sections.md +166 -0
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +176 -0
- package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +143 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +184 -0
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +152 -0
- package/src/workflows/create-skill/steps-c/step-05-compile.md +198 -0
- package/src/workflows/create-skill/steps-c/step-06-validate.md +162 -0
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +165 -0
- package/src/workflows/create-skill/steps-c/step-08-report.md +160 -0
- package/src/workflows/create-skill/validation-report.md +189 -0
- package/src/workflows/create-skill/workflow-plan-create-skill.md +491 -0
- package/src/workflows/create-skill/workflow.md +52 -0
- package/src/workflows/create-stack-skill/data/integration-patterns.md +61 -0
- package/src/workflows/create-stack-skill/data/manifest-patterns.md +35 -0
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +110 -0
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +142 -0
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +145 -0
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +161 -0
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +155 -0
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +154 -0
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +160 -0
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +202 -0
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +193 -0
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +137 -0
- package/src/workflows/create-stack-skill/validation-report.md +401 -0
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +481 -0
- package/src/workflows/create-stack-skill/workflow.md +59 -0
- package/src/workflows/export-skill/data/managed-section-format.md +70 -0
- package/src/workflows/export-skill/data/snippet-format.md +32 -0
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +184 -0
- package/src/workflows/export-skill/steps-c/step-02-package.md +153 -0
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +166 -0
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +222 -0
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +126 -0
- package/src/workflows/export-skill/steps-c/step-06-summary.md +167 -0
- package/src/workflows/export-skill/validation-report.md +263 -0
- package/src/workflows/export-skill/workflow-plan-export-skill.md +369 -0
- package/src/workflows/export-skill/workflow.md +56 -0
- package/src/workflows/quick-skill/data/registry-resolution.md +91 -0
- package/src/workflows/quick-skill/data/skill-template.md +66 -0
- package/src/workflows/quick-skill/steps-c/step-01-resolve-target.md +165 -0
- package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +143 -0
- package/src/workflows/quick-skill/steps-c/step-03-quick-extract.md +177 -0
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +180 -0
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +150 -0
- package/src/workflows/quick-skill/steps-c/step-06-write.md +160 -0
- package/src/workflows/quick-skill/validation-report.md +543 -0
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +405 -0
- package/src/workflows/quick-skill/workflow.md +56 -0
- package/src/workflows/setup-forge/data/tier-rules.md +50 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +140 -0
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +141 -0
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +116 -0
- package/src/workflows/setup-forge/steps-c/step-04-report.md +131 -0
- package/src/workflows/setup-forge/validation-report.md +504 -0
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +428 -0
- package/src/workflows/setup-forge/workflow.md +49 -0
- package/src/workflows/test-skill/data/output-section-formats.md +96 -0
- package/src/workflows/test-skill/data/scoring-rules.md +74 -0
- package/src/workflows/test-skill/steps-c/step-01-init.md +185 -0
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +162 -0
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +222 -0
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +249 -0
- package/src/workflows/test-skill/steps-c/step-05-score.md +222 -0
- package/src/workflows/test-skill/steps-c/step-06-report.md +175 -0
- package/src/workflows/test-skill/templates/test-report-template.md +24 -0
- package/src/workflows/test-skill/validation-report.md +390 -0
- package/src/workflows/test-skill/workflow-plan-test-skill.md +288 -0
- package/src/workflows/test-skill/workflow.md +57 -0
- package/src/workflows/update-skill/data/manual-section-rules.md +44 -0
- package/src/workflows/update-skill/data/merge-conflict-rules.md +62 -0
- package/src/workflows/update-skill/steps-c/step-01-init.md +208 -0
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +184 -0
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +187 -0
- package/src/workflows/update-skill/steps-c/step-04-merge.md +230 -0
- package/src/workflows/update-skill/steps-c/step-05-validate.md +187 -0
- package/src/workflows/update-skill/steps-c/step-06-write.md +204 -0
- package/src/workflows/update-skill/steps-c/step-07-report.md +201 -0
- package/src/workflows/update-skill/validation-report.md +559 -0
- package/src/workflows/update-skill/workflow-plan-update-skill.md +441 -0
- package/src/workflows/update-skill/workflow.md +56 -0
- package/tools/cli/commands/install.js +33 -0
- package/tools/cli/commands/status.js +195 -0
- package/tools/cli/commands/uninstall.js +226 -0
- package/tools/cli/commands/update.js +63 -0
- package/tools/cli/lib/compiler.js +306 -0
- package/tools/cli/lib/ide-commands.js +244 -0
- package/tools/cli/lib/installer.js +307 -0
- package/tools/cli/lib/manifest.js +109 -0
- package/tools/cli/lib/ui.js +277 -0
- package/tools/cli/lib/version-check.js +86 -0
- package/tools/cli/skf-cli.js +45 -0
- package/tools/skf-npx-wrapper.js +36 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Registry Resolution Patterns
|
|
2
|
+
|
|
3
|
+
## Package-to-Repo Resolution
|
|
4
|
+
|
|
5
|
+
When the user provides a package name instead of a GitHub URL, use this fallback chain to resolve the source repository.
|
|
6
|
+
|
|
7
|
+
### Detection: URL vs Package Name
|
|
8
|
+
|
|
9
|
+
- **GitHub URL:** Starts with `https://github.com/` or `github.com/` — extract org/repo directly
|
|
10
|
+
- **Package name:** Everything else — enter resolution chain below
|
|
11
|
+
|
|
12
|
+
### Resolution Fallback Chain
|
|
13
|
+
|
|
14
|
+
Try each registry in order. Stop at first success.
|
|
15
|
+
|
|
16
|
+
#### 1. npm Registry (JavaScript/TypeScript)
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
URL: https://registry.npmjs.org/{package_name}
|
|
20
|
+
Field: repository.url
|
|
21
|
+
Fallback field: homepage
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Extract `repository.url`, strip `git+` prefix and `.git` suffix if present.
|
|
25
|
+
|
|
26
|
+
#### 2. PyPI Registry (Python)
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
URL: https://pypi.org/pypi/{package_name}/json
|
|
30
|
+
Field: info.project_urls.Source OR info.project_urls.Repository OR info.home_page
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Check `project_urls` keys in order: Source, Repository, Homepage. Filter for GitHub URLs.
|
|
34
|
+
|
|
35
|
+
#### 3. crates.io Registry (Rust)
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
URL: https://crates.io/api/v1/crates/{package_name}
|
|
39
|
+
Field: crate.repository
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Direct `repository` field usually points to GitHub.
|
|
43
|
+
|
|
44
|
+
#### 4. Web Search Fallback
|
|
45
|
+
|
|
46
|
+
If all registry lookups fail:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Search: "{package_name} github repository"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Look for GitHub URL in top results. Verify it matches the package name.
|
|
53
|
+
|
|
54
|
+
#### 5. Resolution Failure
|
|
55
|
+
|
|
56
|
+
If all methods fail:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
"Could not resolve '{package_name}' to a GitHub repository.
|
|
60
|
+
|
|
61
|
+
Please provide the GitHub URL directly, or check:
|
|
62
|
+
- Is the package name spelled correctly?
|
|
63
|
+
- Is it a private package?
|
|
64
|
+
- Is the source hosted on a non-GitHub platform?"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Hard halt** — cannot proceed without a resolved source.
|
|
68
|
+
|
|
69
|
+
## Language Detection
|
|
70
|
+
|
|
71
|
+
After resolving to a GitHub repo, detect primary language from:
|
|
72
|
+
|
|
73
|
+
1. Manifest file presence:
|
|
74
|
+
- `package.json` → JavaScript/TypeScript
|
|
75
|
+
- `pyproject.toml` or `setup.py` → Python
|
|
76
|
+
- `Cargo.toml` → Rust
|
|
77
|
+
- `go.mod` → Go
|
|
78
|
+
- `pom.xml` or `build.gradle` → Java
|
|
79
|
+
2. User-provided language hint (overrides detection)
|
|
80
|
+
3. GitHub API language field (if accessible)
|
|
81
|
+
|
|
82
|
+
## Manifest File Priority
|
|
83
|
+
|
|
84
|
+
For each language, the primary manifest to read:
|
|
85
|
+
|
|
86
|
+
| Language | Manifest | Key Fields |
|
|
87
|
+
|----------|----------|------------|
|
|
88
|
+
| JS/TS | package.json | name, version, description, main, exports, dependencies |
|
|
89
|
+
| Python | pyproject.toml | project.name, project.version, project.description, project.dependencies |
|
|
90
|
+
| Rust | Cargo.toml | package.name, package.version, package.description, dependencies |
|
|
91
|
+
| Go | go.mod | module path, require list |
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Skill Template — Quick Skill Output
|
|
2
|
+
|
|
3
|
+
## SKILL.md Section Structure
|
|
4
|
+
|
|
5
|
+
The following sections should be populated in the generated SKILL.md. Best-effort — not all sections will have data for every skill.
|
|
6
|
+
|
|
7
|
+
### Required Sections
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# {skill_name}
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
- **Package:** {package_name}
|
|
14
|
+
- **Repository:** {repo_url}
|
|
15
|
+
- **Language:** {language}
|
|
16
|
+
- **Source Authority:** community
|
|
17
|
+
- **Generated:** {date}
|
|
18
|
+
|
|
19
|
+
## Description
|
|
20
|
+
{README-derived description of what the package does}
|
|
21
|
+
|
|
22
|
+
## Key Exports
|
|
23
|
+
{List of public exports with brief descriptions}
|
|
24
|
+
|
|
25
|
+
## Usage Patterns
|
|
26
|
+
{Common usage patterns extracted from README examples}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Optional Sections (include when data available)
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
## Configuration
|
|
33
|
+
{Configuration options if found in source}
|
|
34
|
+
|
|
35
|
+
## Dependencies
|
|
36
|
+
{Key dependencies from manifest file}
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
{Any caveats, limitations, or observations about the extraction}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## context-snippet.md Format (ADR-L)
|
|
43
|
+
|
|
44
|
+
Two-line format targeting ~30 tokens per skill:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
{skill_name}: {top-5 exports as comma-separated list}
|
|
48
|
+
→ {skills_output_folder}/{skill_name}/SKILL.md
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## metadata.json Format
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"name": "{skill_name}",
|
|
56
|
+
"version": "0.1.0",
|
|
57
|
+
"source_authority": "community",
|
|
58
|
+
"source_repo": "{repo_url}",
|
|
59
|
+
"source_package": "{package_name}",
|
|
60
|
+
"language": "{language}",
|
|
61
|
+
"generated_by": "quick-skill",
|
|
62
|
+
"generated_date": "{date}",
|
|
63
|
+
"exports_count": {number},
|
|
64
|
+
"confidence": "best-effort"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-01-resolve-target'
|
|
3
|
+
description: 'Accept GitHub URL or package name and resolve to source repository'
|
|
4
|
+
|
|
5
|
+
nextStepFile: './step-02-ecosystem-check.md'
|
|
6
|
+
registryResolutionData: '../data/registry-resolution.md'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Step 1: Resolve Target
|
|
10
|
+
|
|
11
|
+
## STEP GOAL:
|
|
12
|
+
|
|
13
|
+
To accept a GitHub URL or package name from the user, resolve it to a GitHub repository, detect the primary language, and prepare state for source extraction.
|
|
14
|
+
|
|
15
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
|
+
|
|
17
|
+
### Universal Rules:
|
|
18
|
+
|
|
19
|
+
- 🛑 NEVER generate content without user input
|
|
20
|
+
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
21
|
+
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
22
|
+
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
23
|
+
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
24
|
+
|
|
25
|
+
### Role Reinforcement:
|
|
26
|
+
|
|
27
|
+
- ✅ You are a rapid skill compiler resolving a target package to its source
|
|
28
|
+
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
29
|
+
- ✅ Speed is the priority — resolve quickly, fail fast if unresolvable
|
|
30
|
+
- ✅ You bring package ecosystem knowledge, user brings their target
|
|
31
|
+
|
|
32
|
+
### Step-Specific Rules:
|
|
33
|
+
|
|
34
|
+
- 🎯 Focus only on resolving the target to a GitHub repository
|
|
35
|
+
- 🚫 FORBIDDEN to begin source extraction or compilation
|
|
36
|
+
- 💬 Approach: Accept input, resolve, confirm, proceed
|
|
37
|
+
- 📋 If resolution fails, hard halt with actionable guidance
|
|
38
|
+
|
|
39
|
+
## EXECUTION PROTOCOLS:
|
|
40
|
+
|
|
41
|
+
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
42
|
+
- 💾 Set state: resolved_url, repo_name, language, scope_hint
|
|
43
|
+
- 📖 Load {registryResolutionData} for resolution patterns
|
|
44
|
+
- 🚫 Do not proceed without a confirmed resolved repository
|
|
45
|
+
|
|
46
|
+
## CONTEXT BOUNDARIES:
|
|
47
|
+
|
|
48
|
+
- This is the first step — no prior context exists
|
|
49
|
+
- User provides a GitHub URL or package name (npm/PyPI/crates.io)
|
|
50
|
+
- Optional: language hint, scope hint
|
|
51
|
+
- Web browsing required for registry API lookups
|
|
52
|
+
- Focus: resolution only, not extraction
|
|
53
|
+
|
|
54
|
+
## MANDATORY SEQUENCE
|
|
55
|
+
|
|
56
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
57
|
+
|
|
58
|
+
### 1. Accept User Input
|
|
59
|
+
|
|
60
|
+
"**Quick Skill — fastest path to a skill.**
|
|
61
|
+
|
|
62
|
+
Provide a **GitHub URL** or **package name** and I'll resolve it to source and compile a best-effort SKILL.md.
|
|
63
|
+
|
|
64
|
+
**Target:** (GitHub URL or package name)
|
|
65
|
+
|
|
66
|
+
**Optional:**
|
|
67
|
+
- **Language hint:** (if the repo is multi-language)
|
|
68
|
+
- **Scope hint:** (specific directories to focus on)"
|
|
69
|
+
|
|
70
|
+
Wait for user input.
|
|
71
|
+
|
|
72
|
+
### 2. Classify Input Type
|
|
73
|
+
|
|
74
|
+
**If input starts with `https://github.com/` or `github.com/`:**
|
|
75
|
+
- Extract org/repo from URL
|
|
76
|
+
- Set `resolved_url` to the GitHub URL
|
|
77
|
+
- Set `repo_name` to the repo name (last path segment)
|
|
78
|
+
- Skip to step 4 (Detect Language)
|
|
79
|
+
|
|
80
|
+
**If input is a package name:**
|
|
81
|
+
- Proceed to step 3 (Registry Resolution)
|
|
82
|
+
|
|
83
|
+
### 3. Registry Resolution
|
|
84
|
+
|
|
85
|
+
Load {registryResolutionData} for resolution patterns.
|
|
86
|
+
|
|
87
|
+
**Execute the fallback chain in order — stop at first success:**
|
|
88
|
+
|
|
89
|
+
1. **npm registry:** Fetch `https://registry.npmjs.org/{package_name}` — extract `repository.url`
|
|
90
|
+
2. **PyPI registry:** Fetch `https://pypi.org/pypi/{package_name}/json` — extract `info.project_urls.Source` or `info.home_page`
|
|
91
|
+
3. **crates.io registry:** Fetch `https://crates.io/api/v1/crates/{package_name}` — extract `crate.repository`
|
|
92
|
+
4. **Web search fallback:** Search `"{package_name} github repository"` — look for GitHub URL
|
|
93
|
+
|
|
94
|
+
**If all methods fail — HARD HALT:**
|
|
95
|
+
|
|
96
|
+
"**Resolution failed.** Could not resolve `{package_name}` to a GitHub repository.
|
|
97
|
+
|
|
98
|
+
Please check:
|
|
99
|
+
- Is the package name spelled correctly?
|
|
100
|
+
- Is it a private package?
|
|
101
|
+
- Is the source hosted on a non-GitHub platform?
|
|
102
|
+
|
|
103
|
+
**Provide the GitHub URL directly to continue.**"
|
|
104
|
+
|
|
105
|
+
Wait for corrected input. Loop back to step 2.
|
|
106
|
+
|
|
107
|
+
### 4. Detect Language
|
|
108
|
+
|
|
109
|
+
Determine primary language from:
|
|
110
|
+
|
|
111
|
+
1. **User-provided language hint** (overrides detection)
|
|
112
|
+
2. **Manifest file presence** (check via GitHub API or web browsing):
|
|
113
|
+
- `package.json` → JavaScript/TypeScript
|
|
114
|
+
- `pyproject.toml` or `setup.py` → Python
|
|
115
|
+
- `Cargo.toml` → Rust
|
|
116
|
+
- `go.mod` → Go
|
|
117
|
+
|
|
118
|
+
Set `language` to detected language.
|
|
119
|
+
|
|
120
|
+
### 5. Confirm Resolution
|
|
121
|
+
|
|
122
|
+
"**Target resolved:**
|
|
123
|
+
|
|
124
|
+
- **Repository:** {resolved_url}
|
|
125
|
+
- **Name:** {repo_name}
|
|
126
|
+
- **Language:** {language}
|
|
127
|
+
- **Scope:** {scope_hint or 'entire repo'}
|
|
128
|
+
|
|
129
|
+
**Proceeding to ecosystem check...**"
|
|
130
|
+
|
|
131
|
+
### 6. Proceed to Next Step
|
|
132
|
+
|
|
133
|
+
#### Menu Handling Logic:
|
|
134
|
+
|
|
135
|
+
- After successful resolution confirmation, immediately load, read entire file, then execute {nextStepFile}
|
|
136
|
+
|
|
137
|
+
#### EXECUTION RULES:
|
|
138
|
+
|
|
139
|
+
- This is an init step with auto-proceed after successful resolution
|
|
140
|
+
- Proceed directly to next step after confirmation
|
|
141
|
+
|
|
142
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
143
|
+
|
|
144
|
+
ONLY WHEN the target has been successfully resolved to a GitHub repository with confirmed URL, name, and detected language will you load and read fully `{nextStepFile}` to execute the ecosystem check.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
149
|
+
|
|
150
|
+
### ✅ SUCCESS:
|
|
151
|
+
|
|
152
|
+
- User input accepted (URL or package name)
|
|
153
|
+
- Target resolved to a valid GitHub repository URL
|
|
154
|
+
- Language detected or provided
|
|
155
|
+
- State set: resolved_url, repo_name, language, scope_hint
|
|
156
|
+
- Auto-proceeding to ecosystem check
|
|
157
|
+
|
|
158
|
+
### ❌ SYSTEM FAILURE:
|
|
159
|
+
|
|
160
|
+
- Proceeding without a resolved repository
|
|
161
|
+
- Skipping registry resolution fallback chain
|
|
162
|
+
- Not providing actionable guidance on resolution failure
|
|
163
|
+
- Beginning extraction or compilation in this step
|
|
164
|
+
|
|
165
|
+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-02-ecosystem-check'
|
|
3
|
+
description: 'Search agentskills.io ecosystem for existing official skill before compilation'
|
|
4
|
+
|
|
5
|
+
nextStepFile: './step-03-quick-extract.md'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 2: Ecosystem Check
|
|
9
|
+
|
|
10
|
+
## STEP GOAL:
|
|
11
|
+
|
|
12
|
+
To query the agentskills.io ecosystem for an existing official skill matching the resolved target, preventing unnecessary duplication. This is an advisory gate — it never blocks the workflow on failure.
|
|
13
|
+
|
|
14
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
15
|
+
|
|
16
|
+
### Universal Rules:
|
|
17
|
+
|
|
18
|
+
- 🛑 NEVER generate content without user input
|
|
19
|
+
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
20
|
+
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
21
|
+
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
22
|
+
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
23
|
+
|
|
24
|
+
### Role Reinforcement:
|
|
25
|
+
|
|
26
|
+
- ✅ You are a rapid skill compiler checking for existing skills
|
|
27
|
+
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
28
|
+
- ✅ This check is advisory — never block the workflow on failure
|
|
29
|
+
- ✅ Speed is priority — 5-second timeout, fail silently
|
|
30
|
+
|
|
31
|
+
### Step-Specific Rules:
|
|
32
|
+
|
|
33
|
+
- 🎯 Focus only on checking if an official skill already exists
|
|
34
|
+
- 🚫 FORBIDDEN to begin extraction or compilation
|
|
35
|
+
- 💬 Approach: Check quickly, report result, proceed or offer choice
|
|
36
|
+
- 📋 Tool unavailability and timeouts are NOT errors — silent skip
|
|
37
|
+
|
|
38
|
+
## EXECUTION PROTOCOLS:
|
|
39
|
+
|
|
40
|
+
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
41
|
+
- 💾 Set state: ecosystem_status (match/no-match/skip)
|
|
42
|
+
- 📖 Apply 5-second timeout on ecosystem queries
|
|
43
|
+
- 🚫 Never halt workflow due to ecosystem check failure
|
|
44
|
+
|
|
45
|
+
## CONTEXT BOUNDARIES:
|
|
46
|
+
|
|
47
|
+
- Previous step provided: resolved_url, repo_name, language
|
|
48
|
+
- This step only queries — does not modify files or begin extraction
|
|
49
|
+
- Focus: ecosystem deduplication check only
|
|
50
|
+
- Dependencies: resolved repository from step-01
|
|
51
|
+
|
|
52
|
+
## MANDATORY SEQUENCE
|
|
53
|
+
|
|
54
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
55
|
+
|
|
56
|
+
### 1. Query Ecosystem
|
|
57
|
+
|
|
58
|
+
Search for an existing official skill matching `{repo_name}` in the agentskills.io ecosystem.
|
|
59
|
+
|
|
60
|
+
**Query methods (try in order):**
|
|
61
|
+
1. Search agentskills.io registry for `{repo_name}`
|
|
62
|
+
2. Web search: `"agentskills.io" "{repo_name}" skill`
|
|
63
|
+
|
|
64
|
+
**Apply 5-second timeout.** If query takes longer, treat as no-match.
|
|
65
|
+
|
|
66
|
+
### 2. Evaluate Result
|
|
67
|
+
|
|
68
|
+
**If tool unavailable or timeout:**
|
|
69
|
+
- Set `ecosystem_status: skip`
|
|
70
|
+
- Proceed silently to step 3 (auto-proceed, no message to user)
|
|
71
|
+
|
|
72
|
+
**If no match found:**
|
|
73
|
+
- Set `ecosystem_status: no-match`
|
|
74
|
+
- Auto-proceed to step 3:
|
|
75
|
+
|
|
76
|
+
"**No existing official skill found for {repo_name}. Proceeding to extraction...**"
|
|
77
|
+
|
|
78
|
+
**If match found:**
|
|
79
|
+
- Set `ecosystem_status: match`
|
|
80
|
+
- Display match details and present conditional menu:
|
|
81
|
+
|
|
82
|
+
"**Existing official skill found for {repo_name}.**
|
|
83
|
+
|
|
84
|
+
**Skill:** {matched_skill_name}
|
|
85
|
+
**Source:** agentskills.io
|
|
86
|
+
**Authority:** official
|
|
87
|
+
|
|
88
|
+
An official skill already exists. You can:
|
|
89
|
+
|
|
90
|
+
**[P] Proceed** — Compile a custom community skill anyway (different scope or customization)
|
|
91
|
+
**[I] Install** — Install the existing official skill instead (exits this workflow)
|
|
92
|
+
**[A] Abort** — Cancel compilation"
|
|
93
|
+
|
|
94
|
+
### 3. Handle Match Menu (ONLY if match found)
|
|
95
|
+
|
|
96
|
+
#### Menu Handling Logic:
|
|
97
|
+
|
|
98
|
+
- IF P: Set `ecosystem_status: match-proceed`, then load, read entire file, then execute {nextStepFile}
|
|
99
|
+
- IF I: Display install instructions for the official skill, then end workflow
|
|
100
|
+
- IF A: Display "Compilation cancelled." and end workflow
|
|
101
|
+
- IF Any other: help user, then redisplay the match menu
|
|
102
|
+
|
|
103
|
+
#### EXECUTION RULES:
|
|
104
|
+
|
|
105
|
+
- ONLY display this menu when ecosystem_status is match
|
|
106
|
+
- ALWAYS halt and wait for user input when match is found
|
|
107
|
+
- For no-match and skip cases, auto-proceed without menu
|
|
108
|
+
|
|
109
|
+
### 4. Auto-Proceed (No Match or Skip)
|
|
110
|
+
|
|
111
|
+
#### Menu Handling Logic:
|
|
112
|
+
|
|
113
|
+
- After no-match or skip determination, immediately load, read entire file, then execute {nextStepFile}
|
|
114
|
+
|
|
115
|
+
#### EXECUTION RULES:
|
|
116
|
+
|
|
117
|
+
- This is an auto-proceed path — no user interaction needed
|
|
118
|
+
- Proceed directly to extraction step
|
|
119
|
+
|
|
120
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
121
|
+
|
|
122
|
+
ONLY WHEN ecosystem check completes (match with user choice, no-match, or skip) will you load and read fully `{nextStepFile}` to execute source extraction.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
127
|
+
|
|
128
|
+
### ✅ SUCCESS:
|
|
129
|
+
|
|
130
|
+
- Ecosystem queried with 5-second timeout
|
|
131
|
+
- Tool unavailability handled silently (not an error)
|
|
132
|
+
- No-match case auto-proceeds without interrupting user
|
|
133
|
+
- Match case presents P/I/A menu and waits for user choice
|
|
134
|
+
- ecosystem_status set correctly
|
|
135
|
+
|
|
136
|
+
### ❌ SYSTEM FAILURE:
|
|
137
|
+
|
|
138
|
+
- Blocking workflow on ecosystem check failure
|
|
139
|
+
- Treating timeout or tool unavailability as errors
|
|
140
|
+
- Showing menu when no match was found
|
|
141
|
+
- Beginning extraction or compilation in this step
|
|
142
|
+
|
|
143
|
+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-03-quick-extract'
|
|
3
|
+
description: 'Read source repository and extract public API surface via surface-level source reading'
|
|
4
|
+
|
|
5
|
+
nextStepFile: './step-04-compile.md'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 3: Quick Extract
|
|
9
|
+
|
|
10
|
+
## STEP GOAL:
|
|
11
|
+
|
|
12
|
+
To read the resolved GitHub repository source and extract the public API surface using surface-level source reading (no AST). Produces an extraction inventory of exports, descriptions, and manifest data for compilation.
|
|
13
|
+
|
|
14
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
15
|
+
|
|
16
|
+
### Universal Rules:
|
|
17
|
+
|
|
18
|
+
- 🛑 NEVER generate content without user input
|
|
19
|
+
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
20
|
+
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
21
|
+
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
22
|
+
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
23
|
+
|
|
24
|
+
### Role Reinforcement:
|
|
25
|
+
|
|
26
|
+
- ✅ You are a rapid skill compiler extracting public API surface
|
|
27
|
+
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
28
|
+
- ✅ Best-effort extraction — completeness is not required
|
|
29
|
+
- ✅ Surface-level reading only — no AST, no deep analysis
|
|
30
|
+
|
|
31
|
+
### Step-Specific Rules:
|
|
32
|
+
|
|
33
|
+
- 🎯 Focus only on reading source and extracting exports
|
|
34
|
+
- 🚫 FORBIDDEN to begin compilation or write output files
|
|
35
|
+
- 💬 Approach: Read key files, extract what's visible, move on
|
|
36
|
+
- 📋 No AST required — use grep/pattern-based extraction
|
|
37
|
+
- 📋 If no exports found, extract what's available from README
|
|
38
|
+
|
|
39
|
+
## EXECUTION PROTOCOLS:
|
|
40
|
+
|
|
41
|
+
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
42
|
+
- 💾 Set state: extraction_inventory (exports list, description, manifest data)
|
|
43
|
+
- 📖 Web browsing required to read GitHub source files
|
|
44
|
+
- 🚫 Do not spend excessive time on extraction — best-effort
|
|
45
|
+
|
|
46
|
+
## CONTEXT BOUNDARIES:
|
|
47
|
+
|
|
48
|
+
- Previous steps provided: resolved_url, repo_name, language, scope_hint
|
|
49
|
+
- Web browsing available for reading GitHub source files
|
|
50
|
+
- Focus: extraction only, not compilation
|
|
51
|
+
- This is best-effort — incomplete extraction is acceptable
|
|
52
|
+
|
|
53
|
+
## MANDATORY SEQUENCE
|
|
54
|
+
|
|
55
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
56
|
+
|
|
57
|
+
### 1. Read README
|
|
58
|
+
|
|
59
|
+
Read `README.md` from the repository root via web browsing.
|
|
60
|
+
|
|
61
|
+
Extract:
|
|
62
|
+
- **Description:** What the package does (first paragraph or tagline)
|
|
63
|
+
- **Features:** Key features or capabilities listed
|
|
64
|
+
- **Usage patterns:** Code examples showing common usage
|
|
65
|
+
- **Installation:** Package manager install command (confirms package name)
|
|
66
|
+
|
|
67
|
+
If README is unavailable, note and continue.
|
|
68
|
+
|
|
69
|
+
### 2. Read Manifest File
|
|
70
|
+
|
|
71
|
+
Based on detected language, read the primary manifest file:
|
|
72
|
+
|
|
73
|
+
- **JavaScript/TypeScript:** `package.json` — extract name, version, description, main, exports, dependencies
|
|
74
|
+
- **Python:** `pyproject.toml` or `setup.py` — extract project name, version, description, dependencies
|
|
75
|
+
- **Rust:** `Cargo.toml` — extract package name, version, description, dependencies
|
|
76
|
+
- **Go:** `go.mod` — extract module path, require list
|
|
77
|
+
|
|
78
|
+
Extract:
|
|
79
|
+
- **Package metadata:** name, version, description
|
|
80
|
+
- **Entry points:** main, exports, module fields
|
|
81
|
+
- **Key dependencies:** direct dependencies list
|
|
82
|
+
|
|
83
|
+
### 3. Scan Top-Level Exports
|
|
84
|
+
|
|
85
|
+
Based on language and entry points from manifest, read the primary export files:
|
|
86
|
+
|
|
87
|
+
**JavaScript/TypeScript:**
|
|
88
|
+
- Read `index.js`, `index.ts`, `src/index.ts`, or `main` field from package.json
|
|
89
|
+
- Extract: `export` statements, `module.exports` assignments
|
|
90
|
+
- Pattern: lines matching `export (const|function|class|default|type|interface)`
|
|
91
|
+
|
|
92
|
+
**Python:**
|
|
93
|
+
- Read `__init__.py` or `src/{package}/__init__.py`
|
|
94
|
+
- Extract: `__all__` list, top-level function/class definitions
|
|
95
|
+
- Pattern: lines matching `def |class |__all__`
|
|
96
|
+
|
|
97
|
+
**Rust:**
|
|
98
|
+
- Read `src/lib.rs`
|
|
99
|
+
- Extract: `pub fn`, `pub struct`, `pub enum`, `pub trait` declarations
|
|
100
|
+
- Pattern: lines matching `pub (fn|struct|enum|trait|mod)`
|
|
101
|
+
|
|
102
|
+
**Go:**
|
|
103
|
+
- Read exported functions from top-level `.go` files
|
|
104
|
+
- Extract: capitalized function names (Go export convention)
|
|
105
|
+
- Pattern: lines matching `func [A-Z]`
|
|
106
|
+
|
|
107
|
+
**If scope_hint provided:** Focus reading on the specified directories instead of root.
|
|
108
|
+
|
|
109
|
+
### 4. Build Extraction Inventory
|
|
110
|
+
|
|
111
|
+
Assemble the extraction inventory from collected data:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
extraction_inventory:
|
|
115
|
+
description: {from README or manifest}
|
|
116
|
+
package_name: {from manifest}
|
|
117
|
+
version: {from manifest}
|
|
118
|
+
language: {detected}
|
|
119
|
+
exports: [{name, type, brief_description}]
|
|
120
|
+
usage_patterns: [{pattern from README examples}]
|
|
121
|
+
dependencies: [{key deps from manifest}]
|
|
122
|
+
confidence: {high/medium/low based on data quality}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**If no exports found:**
|
|
126
|
+
- Set confidence to `low`
|
|
127
|
+
- Use README description and features as fallback content
|
|
128
|
+
- Note: "No exports detected — SKILL.md will be based on README content only"
|
|
129
|
+
|
|
130
|
+
### 5. Report Extraction Summary
|
|
131
|
+
|
|
132
|
+
"**Extraction complete:**
|
|
133
|
+
|
|
134
|
+
- **Package:** {package_name} v{version}
|
|
135
|
+
- **Language:** {language}
|
|
136
|
+
- **Exports found:** {count}
|
|
137
|
+
- **Confidence:** {confidence}
|
|
138
|
+
- **Source files read:** {count}
|
|
139
|
+
|
|
140
|
+
**Proceeding to compilation...**"
|
|
141
|
+
|
|
142
|
+
### 6. Auto-Proceed to Compilation
|
|
143
|
+
|
|
144
|
+
#### Menu Handling Logic:
|
|
145
|
+
|
|
146
|
+
- After extraction summary, immediately load, read entire file, then execute {nextStepFile}
|
|
147
|
+
|
|
148
|
+
#### EXECUTION RULES:
|
|
149
|
+
|
|
150
|
+
- This is an auto-proceed step — extraction results flow directly to compilation
|
|
151
|
+
- Proceed directly to next step after summary
|
|
152
|
+
|
|
153
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
154
|
+
|
|
155
|
+
ONLY WHEN extraction is complete and extraction_inventory is assembled (even if minimal/low-confidence) will you load and read fully `{nextStepFile}` to execute compilation.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
160
|
+
|
|
161
|
+
### ✅ SUCCESS:
|
|
162
|
+
|
|
163
|
+
- README read and description extracted
|
|
164
|
+
- Manifest file read and metadata extracted
|
|
165
|
+
- Top-level exports scanned (best-effort)
|
|
166
|
+
- extraction_inventory assembled with available data
|
|
167
|
+
- Confidence level set appropriately
|
|
168
|
+
- Auto-proceeding to compilation
|
|
169
|
+
|
|
170
|
+
### ❌ SYSTEM FAILURE:
|
|
171
|
+
|
|
172
|
+
- Spending excessive time trying to achieve complete extraction
|
|
173
|
+
- Using AST tools (this is surface-level reading only)
|
|
174
|
+
- Beginning compilation or writing output files
|
|
175
|
+
- Halting on missing exports instead of using README fallback
|
|
176
|
+
|
|
177
|
+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|