bmad-module-skill-forge 0.2.0 → 0.4.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/README.md +73 -159
- package/docs/agents.md +2 -2
- package/docs/architecture.md +155 -25
- package/docs/concepts.md +96 -0
- package/docs/examples.md +52 -2
- package/docs/getting-started.md +30 -14
- package/docs/index.md +16 -41
- package/docs/workflows.md +3 -3
- package/package.json +6 -4
- package/src/forger/forge-tier.yaml +1 -1
- package/src/forger/preferences.yaml +8 -1
- package/src/knowledge/doc-fetcher.md +55 -0
- package/src/knowledge/overview.md +17 -16
- package/src/knowledge/progressive-capability.md +9 -1
- package/src/knowledge/provenance-tracking.md +31 -23
- package/src/knowledge/qmd-registry.md +132 -0
- package/src/knowledge/skf-knowledge-index.csv +2 -0
- package/src/module.yaml +2 -2
- package/src/workflows/analyze-source/data/skill-brief-schema.md +24 -4
- package/src/workflows/analyze-source/steps-c/step-01-init.md +19 -9
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +10 -2
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +17 -2
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +2 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +3 -3
- package/src/workflows/analyze-source/templates/analysis-report-template.md +1 -1
- package/src/workflows/analyze-source/validation-report.md +1 -1
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +1 -1
- package/src/workflows/analyze-source/workflow.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +8 -5
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +12 -2
- package/src/workflows/audit-skill/validation-report.md +2 -2
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +1 -1
- package/src/workflows/brief-skill/data/scope-templates.md +60 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +38 -3
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +20 -4
- package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +20 -64
- package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +60 -5
- package/src/workflows/brief-skill/workflow.md +2 -1
- package/src/workflows/create-skill/data/compile-assembly-rules.md +110 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +216 -3
- package/src/workflows/create-skill/data/skill-sections.md +81 -27
- package/src/workflows/create-skill/data/source-resolution-protocols.md +138 -0
- package/src/workflows/create-skill/data/tier-degradation-rules.md +46 -0
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +7 -4
- package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +10 -7
- package/src/workflows/create-skill/steps-c/step-03-extract.md +51 -10
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +238 -0
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +220 -0
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +40 -10
- package/src/workflows/create-skill/steps-c/step-05-compile.md +49 -82
- package/src/workflows/create-skill/steps-c/step-06-validate.md +152 -63
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +53 -3
- package/src/workflows/create-skill/steps-c/step-08-report.md +1 -1
- package/src/workflows/create-skill/workflow-plan-create-skill.md +42 -10
- package/src/workflows/create-skill/workflow.md +3 -2
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +20 -7
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +2 -2
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +14 -0
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +28 -7
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +10 -7
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +66 -68
- package/src/workflows/create-stack-skill/validation-report.md +1 -1
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +4 -4
- package/src/workflows/export-skill/data/managed-section-format.md +1 -0
- package/src/workflows/export-skill/data/snippet-format.md +33 -14
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +16 -2
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +29 -22
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +1 -1
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/validation-report.md +1 -1
- package/src/workflows/export-skill/workflow-plan-export-skill.md +8 -8
- package/src/workflows/export-skill/workflow.md +1 -1
- package/src/workflows/quick-skill/data/skill-template.md +27 -7
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +44 -13
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +79 -16
- package/src/workflows/quick-skill/validation-report.md +4 -4
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +4 -4
- package/src/workflows/quick-skill/workflow.md +2 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +12 -3
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +10 -2
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +111 -40
- package/src/workflows/setup-forge/steps-c/step-04-report.md +13 -0
- package/src/workflows/setup-forge/workflow.md +1 -0
- package/src/workflows/test-skill/data/scoring-rules.md +14 -6
- package/src/workflows/test-skill/data/source-access-protocol.md +45 -0
- package/src/workflows/test-skill/steps-c/step-01-init.md +38 -13
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -3
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +25 -5
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +22 -47
- package/src/workflows/test-skill/steps-c/step-04b-external-validators.md +219 -0
- package/src/workflows/test-skill/steps-c/step-05-score.md +25 -27
- package/src/workflows/test-skill/steps-c/step-06-report.md +9 -4
- package/src/workflows/test-skill/templates/test-report-template.md +2 -1
- package/src/workflows/test-skill/validation-report.md +1 -1
- package/src/workflows/test-skill/workflow-plan-test-skill.md +7 -3
- package/src/workflows/test-skill/workflow.md +1 -1
- package/src/workflows/update-skill/data/remote-source-resolution.md +43 -0
- package/src/workflows/update-skill/data/tier-degradation-rules.md +46 -0
- package/src/workflows/update-skill/steps-c/step-01-init.md +13 -7
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +26 -0
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +38 -9
- package/src/workflows/update-skill/steps-c/step-04-merge.md +3 -3
- package/src/workflows/update-skill/steps-c/step-05-validate.md +63 -67
- package/src/workflows/update-skill/steps-c/step-06-write.md +37 -14
- package/src/workflows/update-skill/steps-c/step-07-report.md +1 -1
- package/src/workflows/update-skill/validation-report.md +4 -4
- package/src/workflows/update-skill/workflow-plan-update-skill.md +4 -4
- package/src/workflows/update-skill/workflow.md +1 -1
- package/tools/cli/commands/status.js +4 -4
- package/tools/cli/commands/uninstall.js +1 -1
- package/tools/cli/commands/update.js +2 -2
- package/tools/cli/lib/ui.js +60 -16
- package/tools/cli/lib/version-check.js +2 -2
|
@@ -342,7 +342,7 @@ The workflow progresses logically from initialization through discovery, confirm
|
|
|
342
342
|
| Instruction Style | Prescriptive | All steps prescriptive with MANDATORY SEQUENCE | High | ✅ |
|
|
343
343
|
| Subprocess Optimization | 3 steps (03, 04, 05) | All 3 implemented with fallbacks | High | ✅ |
|
|
344
344
|
| Error Handling | 7-scenario matrix | All 7 scenarios handled across steps | High | ✅ |
|
|
345
|
-
| Workflow Chaining | setup-forge prerequisite | step-01 validates forge-tier.yaml | High | ✅ |
|
|
345
|
+
| Workflow Chaining | setup-forge prerequisite | step-01 validates forge-tier.yaml and checks `preferences.yaml` for `tier_override` | High | ✅ |
|
|
346
346
|
| Data Files | 3 files (manifest, integration, template) | All 3 created in data/ folder | High | ✅ |
|
|
347
347
|
|
|
348
348
|
### Implementation Gaps
|
|
@@ -179,7 +179,7 @@ Multi-file document-producing workflow:
|
|
|
179
179
|
- Type: action (multi-file generation)
|
|
180
180
|
- Deliverable files in `{skills_output_folder}/{project}-stack/`:
|
|
181
181
|
- SKILL.md — Integration patterns + conventions (main skill)
|
|
182
|
-
- context-snippet.md — Compressed stack index (~
|
|
182
|
+
- context-snippet.md — Compressed stack index (~50-80 tokens per lib, ADR-L v2)
|
|
183
183
|
- metadata.json — skill_type: "stack", library list, integration pair count
|
|
184
184
|
- references/{library}.md — Per-library API surface and key patterns
|
|
185
185
|
- references/integrations/{pair}.md — Cross-library integration patterns
|
|
@@ -224,7 +224,7 @@ Multi-file document-producing workflow:
|
|
|
224
224
|
- `gh_bridge` (all tiers) — GitHub API for repository access and source reading
|
|
225
225
|
- `ast_bridge` (Forge/Deep tiers) — ast-grep for structural import/export analysis and co-import detection
|
|
226
226
|
- `qmd_bridge` (Deep tier only) — QMD for temporal integration evolution patterns
|
|
227
|
-
- `
|
|
227
|
+
- `skill-check` — agentskills.io spec validation (Step 08): `npx skill-check check --fix --format json` for validation + auto-fix + quality scoring, `split-body` for oversized body remediation, security scan for prompt injection detection
|
|
228
228
|
|
|
229
229
|
**Installation Requirements:**
|
|
230
230
|
- None new — all tools pre-detected by setup-forge prerequisite workflow
|
|
@@ -335,7 +335,7 @@ create-stack-skill/
|
|
|
335
335
|
**Step 07 (generate-output):**
|
|
336
336
|
- Write all deliverable files to `{skills_output_folder}/{project}-stack/`:
|
|
337
337
|
- SKILL.md (from compilation)
|
|
338
|
-
- context-snippet.md (~
|
|
338
|
+
- context-snippet.md (~50-80 tokens per library, ADR-L v2 format)
|
|
339
339
|
- metadata.json (skill_type: "stack", library list, integration pair count, version)
|
|
340
340
|
- references/{library}.md for each confirmed library
|
|
341
341
|
- references/integrations/{pair}.md for each detected integration pair
|
|
@@ -345,7 +345,7 @@ create-stack-skill/
|
|
|
345
345
|
- Auto-proceed to step 08
|
|
346
346
|
|
|
347
347
|
**Step 08 (validate):**
|
|
348
|
-
- Validate output against agentskills.io spec via
|
|
348
|
+
- Validate output against agentskills.io spec via skill-check
|
|
349
349
|
- Check: SKILL.md structure, metadata.json required fields, reference file completeness
|
|
350
350
|
- Verify all confidence tier labels present
|
|
351
351
|
- Report validation results (pass/fail with specific findings)
|
|
@@ -1,32 +1,51 @@
|
|
|
1
|
-
# Context Snippet Format (
|
|
1
|
+
# Context Snippet Format (Vercel-Aligned Indexed Format)
|
|
2
2
|
|
|
3
3
|
## Format Rules
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
- ~30 tokens per skill target
|
|
5
|
+
- Indexed pipe-delimited format per skill — retrieval instruction + file map + inline gotchas
|
|
6
|
+
- ~80-120 tokens per skill target (up from ~50-80, justified by Vercel research)
|
|
8
7
|
- T1-now content only (AST-current, no annotations)
|
|
8
|
+
- Line 2 (IMPORTANT) is the RETRIEVAL INSTRUCTION — always present, tells agent to read SKILL.md
|
|
9
|
+
- Section anchors (`#quick-start`, `#key-types`) must match actual SKILL.md heading slugs
|
|
10
|
+
- gotchas line prevents common mistakes without requiring a file read
|
|
11
|
+
- Version comes from source detection, not brief default
|
|
9
12
|
|
|
10
13
|
## Single Skill Snippet Template
|
|
11
14
|
|
|
12
15
|
```markdown
|
|
13
|
-
{skill-name}
|
|
14
|
-
|
|
16
|
+
[{skill-name} v{version}]|root: skills/{skill-name}/
|
|
17
|
+
|IMPORTANT: {skill-name} v{version} — read SKILL.md before writing {skill-name} code. Do NOT rely on training data.
|
|
18
|
+
|quick-start:{SKILL.md#quick-start}
|
|
19
|
+
|api: {top exports with () for functions, comma-separated}
|
|
20
|
+
|key-types:{SKILL.md#key-types} — {inline summary of most important type values}
|
|
21
|
+
|gotchas: {2-3 most critical pitfalls or breaking changes, inline}
|
|
15
22
|
```
|
|
16
23
|
|
|
24
|
+
- **Line 1:** Skill name + version + root path — version signals training data staleness
|
|
25
|
+
- **Line 2 (IMPORTANT):** Retrieval instruction — always present
|
|
26
|
+
- **Line 3 (quick-start):** Anchor pointer to Quick Start section
|
|
27
|
+
- **Line 4 (api):** Top exports from metadata.json `exports` array (up to 10, with `()` for functions)
|
|
28
|
+
- **Line 5 (key-types):** Anchor pointer + inline summary of most important type/enum values
|
|
29
|
+
- **Line 6 (gotchas):** 2-3 most critical pitfalls — derived from T2-future annotations, async requirements, breaking changes
|
|
30
|
+
|
|
17
31
|
## Stack Skill Snippet Template
|
|
18
32
|
|
|
19
33
|
```markdown
|
|
20
|
-
{project}-stack
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
[{project}-stack v{version}]|root: skills/{project}-stack/
|
|
35
|
+
|IMPORTANT: {project}-stack — read SKILL.md before writing integration code. Do NOT rely on training data.
|
|
36
|
+
|stack: {dep-1}@{v1}, {dep-2}@{v2}, {dep-3}@{v3}
|
|
37
|
+
|integrations: {pattern-1}, {pattern-2}
|
|
38
|
+
|gotchas: {2-3 most critical integration pitfalls, inline}
|
|
23
39
|
```
|
|
24
40
|
|
|
25
41
|
## Rules
|
|
26
42
|
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
-
|
|
31
|
-
-
|
|
43
|
+
- **api line**: Top exports from metadata.json `exports` array. Append `()` to function names. Comma-separated.
|
|
44
|
+
- **key-types line**: Anchor to `#key-types` section + inline summary (~10 words) of the most important type values
|
|
45
|
+
- **gotchas line**: Derived from: T2-future annotations (breaking changes), async requirements, version-specific behavior. If no gotchas available, omit the line.
|
|
46
|
+
- **stack line**: Component versions from metadata.json `components` for stack skills
|
|
47
|
+
- **integrations line**: Co-import patterns from metadata.json `integrations` for stack skills
|
|
48
|
+
- If fewer exports than the limit, list all available
|
|
49
|
+
- If no exports data available, omit the api line
|
|
50
|
+
- Section anchors must be verified against actual SKILL.md headings during generation
|
|
32
51
|
- Skill path is relative to project root
|
|
@@ -111,10 +111,24 @@ Extract from `metadata.json`:
|
|
|
111
111
|
|
|
112
112
|
### 4. Check Forge Configuration
|
|
113
113
|
|
|
114
|
-
Load `{
|
|
114
|
+
Load `{sidecar_path}/preferences.yaml` (if exists):
|
|
115
115
|
- Check `passive_context` setting
|
|
116
116
|
- If `passive_context: false` — note that steps 03-04 (snippet + context update) will be skipped
|
|
117
117
|
|
|
118
|
+
### 4b. Check Test Report (Quality Gate)
|
|
119
|
+
|
|
120
|
+
Search for a test report at `{forge_data_folder}/{skill_name}/test-report-{skill_name}.md`:
|
|
121
|
+
|
|
122
|
+
**If test report found:**
|
|
123
|
+
- Read frontmatter `testResult` and `score`
|
|
124
|
+
- If `testResult: fail`: warn: "**Warning:** This skill failed its last test (score: {score}%). Consider running `@Ferris TS` and addressing gaps before export."
|
|
125
|
+
- If `testResult: pass`: note: "Last test: **PASS** ({score}%)"
|
|
126
|
+
|
|
127
|
+
**If no test report found:**
|
|
128
|
+
- Warn: "**Note:** No test report found for this skill. Consider running `@Ferris TS` before export to verify completeness."
|
|
129
|
+
|
|
130
|
+
Continue to step 5 regardless — this is advisory, not blocking.
|
|
131
|
+
|
|
118
132
|
### 5. Present Skill Summary
|
|
119
133
|
|
|
120
134
|
"**Skill loaded and validated.**
|
|
@@ -177,7 +191,7 @@ ONLY WHEN the user confirms the correct skill is loaded by selecting 'C' will yo
|
|
|
177
191
|
|
|
178
192
|
- Proceeding without finding SKILL.md or metadata.json
|
|
179
193
|
- Not validating metadata.json fields
|
|
180
|
-
- Not checking
|
|
194
|
+
- Not checking preferences.yaml for passive_context opt-out
|
|
181
195
|
- Proceeding without user confirmation
|
|
182
196
|
- Modifying any skill files (read-only step)
|
|
183
197
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-03-generate-snippet'
|
|
3
|
-
description: 'Generate context-snippet.md in
|
|
3
|
+
description: 'Generate context-snippet.md in Vercel-aligned indexed format'
|
|
4
4
|
|
|
5
5
|
nextStepFile: './step-04-update-context.md'
|
|
6
6
|
snippetFormatData: '../data/snippet-format.md'
|
|
@@ -10,7 +10,7 @@ snippetFormatData: '../data/snippet-format.md'
|
|
|
10
10
|
|
|
11
11
|
## STEP GOAL:
|
|
12
12
|
|
|
13
|
-
To generate or update context-snippet.md for the skill in the
|
|
13
|
+
To generate or update context-snippet.md for the skill in the Vercel-aligned indexed format, targeting ~80-120 tokens per skill with T1-now content only.
|
|
14
14
|
|
|
15
15
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
16
|
|
|
@@ -39,13 +39,13 @@ To generate or update context-snippet.md for the skill in the compressed two-lin
|
|
|
39
39
|
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
40
40
|
- 💾 Write context-snippet.md to skill directory (or hold in context if dry-run)
|
|
41
41
|
- 📖 Load {snippetFormatData} for format template
|
|
42
|
-
- 🚫 Strict adherence to
|
|
42
|
+
- 🚫 Strict adherence to Vercel-aligned format — no deviations
|
|
43
43
|
|
|
44
44
|
## CONTEXT BOUNDARIES:
|
|
45
45
|
|
|
46
46
|
- Available: Skill metadata (name, exports, skill_type, components, integrations) from step-01
|
|
47
|
-
- Focus: Snippet generation in exact
|
|
48
|
-
- Limits: T1-now content only, ~
|
|
47
|
+
- Focus: Snippet generation in exact Vercel-aligned format
|
|
48
|
+
- Limits: T1-now content only, ~80-120 tokens target
|
|
49
49
|
- Dependencies: Step-01 metadata, step-02 package validation
|
|
50
50
|
|
|
51
51
|
## MANDATORY SEQUENCE
|
|
@@ -56,7 +56,7 @@ To generate or update context-snippet.md for the skill in the compressed two-lin
|
|
|
56
56
|
|
|
57
57
|
**If `passive_context: false` was detected in step-01:**
|
|
58
58
|
|
|
59
|
-
"**Passive context disabled in
|
|
59
|
+
"**Passive context disabled in preferences.yaml. Skipping snippet generation.**"
|
|
60
60
|
|
|
61
61
|
Auto-proceed immediately to {nextStepFile}.
|
|
62
62
|
|
|
@@ -70,36 +70,43 @@ Load {snippetFormatData} and read the format template for the skill type.
|
|
|
70
70
|
|
|
71
71
|
**For single skills (`skill_type: "single"`):**
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
1. Read metadata.json for `version`, `exports` array
|
|
74
|
+
2. Select top exports (up to 10 for Deep tier, 5 otherwise). Append `()` to function names.
|
|
75
|
+
3. Read SKILL.md to extract: heading slugs for `#quick-start` and `#key-types`, inline summary of key types (~10 words)
|
|
76
|
+
4. Derive gotchas from: T2-future annotations in evidence report (breaking changes), async requirements, version-specific behavior. If no gotchas, omit the gotchas line.
|
|
74
77
|
|
|
75
78
|
Generate:
|
|
76
79
|
```
|
|
77
|
-
{skill-name}
|
|
78
|
-
|
|
80
|
+
[{skill-name} v{version}]|root: skills/{skill-name}/
|
|
81
|
+
|IMPORTANT: {skill-name} v{version} — read SKILL.md before writing {skill-name} code. Do NOT rely on training data.
|
|
82
|
+
|quick-start:{SKILL.md#quick-start}
|
|
83
|
+
|api: {export-1}(), {export-2}(), {export-3}, {export-4}(), {export-5}
|
|
84
|
+
|key-types:{SKILL.md#key-types} — {inline summary ~10 words}
|
|
85
|
+
|gotchas: {pitfall-1}, {pitfall-2}
|
|
79
86
|
```
|
|
80
87
|
|
|
81
|
-
**If fewer than
|
|
82
|
-
**If no exports:** Omit the
|
|
83
|
-
|
|
84
|
-
{skill-name} → skills/{skill-name}/
|
|
85
|
-
```
|
|
88
|
+
**If fewer exports than limit:** List all available.
|
|
89
|
+
**If no exports:** Omit the api line.
|
|
90
|
+
**If no gotchas derivable:** Omit the gotchas line.
|
|
86
91
|
|
|
87
92
|
**For stack skills (`skill_type: "stack"`):**
|
|
88
93
|
|
|
89
94
|
Generate:
|
|
90
95
|
```
|
|
91
|
-
{project}-stack
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
[{project}-stack v{version}]|root: skills/{project}-stack/
|
|
97
|
+
|IMPORTANT: {project}-stack — read SKILL.md before writing integration code. Do NOT rely on training data.
|
|
98
|
+
|stack: {dep-1}@{v1}, {dep-2}@{v2}, {dep-3}@{v3}
|
|
99
|
+
|integrations: {pattern-1}, {pattern-2}
|
|
100
|
+
|gotchas: {pitfall-1}, {pitfall-2}
|
|
94
101
|
```
|
|
95
102
|
|
|
96
103
|
### 4. Verify Token Count
|
|
97
104
|
|
|
98
105
|
Estimate token count of generated snippet (approximate: words * 1.3).
|
|
99
106
|
|
|
100
|
-
- Target: ~
|
|
101
|
-
- Warning threshold: >
|
|
102
|
-
- If exceeding warning threshold, trim exports list or
|
|
107
|
+
- Target: ~80-120 tokens per skill
|
|
108
|
+
- Warning threshold: >150 tokens
|
|
109
|
+
- If exceeding warning threshold, trim description, exports list, or refs to fit
|
|
103
110
|
|
|
104
111
|
### 5. Write or Preview Snippet
|
|
105
112
|
|
|
@@ -149,7 +156,7 @@ ONLY WHEN snippet generation is complete (or skipped due to passive_context opt-
|
|
|
149
156
|
### ✅ SUCCESS:
|
|
150
157
|
|
|
151
158
|
- Snippet format loaded from {snippetFormatData}
|
|
152
|
-
- Content generated matching exact
|
|
159
|
+
- Content generated matching exact Vercel-aligned format
|
|
153
160
|
- Token count estimated and within target
|
|
154
161
|
- File written (or previewed in dry-run)
|
|
155
162
|
- Passive context opt-out correctly handled (skip when disabled)
|
|
@@ -157,7 +164,7 @@ ONLY WHEN snippet generation is complete (or skipped due to passive_context opt-
|
|
|
157
164
|
|
|
158
165
|
### ❌ SYSTEM FAILURE:
|
|
159
166
|
|
|
160
|
-
- Deviating from
|
|
167
|
+
- Deviating from Vercel-aligned indexed format
|
|
161
168
|
- Including T2 annotations or temporal context
|
|
162
169
|
- Not checking passive_context setting
|
|
163
170
|
- Not estimating token count
|
|
@@ -59,7 +59,7 @@ To update the managed `<!-- SKF:BEGIN/END -->` section in the platform-appropria
|
|
|
59
59
|
|
|
60
60
|
**If `passive_context: false` was detected in step-01:**
|
|
61
61
|
|
|
62
|
-
"**Passive context disabled in
|
|
62
|
+
"**Passive context disabled in preferences.yaml. Skipping context update.**"
|
|
63
63
|
|
|
64
64
|
Auto-proceed immediately to {nextStepFile}.
|
|
65
65
|
|
|
@@ -83,7 +83,7 @@ For each artifact, estimate tokens using the heuristic: **words * 1.3** (approxi
|
|
|
83
83
|
- **On-trigger cost:** ~{skill-tokens} tokens (when SKILL.md is loaded)
|
|
84
84
|
- **Full disclosure cost:** ~{total-tokens} tokens (if references/ also loaded)
|
|
85
85
|
|
|
86
|
-
**Benchmark:** Target is ~
|
|
86
|
+
**Benchmark:** Target is ~80-120 tokens per skill in managed section. Current: ~{snippet-tokens} tokens."
|
|
87
87
|
|
|
88
88
|
### 3. Proceed to Summary
|
|
89
89
|
|
|
@@ -182,7 +182,7 @@ All remaining frontmatter variables verified as used:
|
|
|
182
182
|
|
|
183
183
|
**Status: ✅ N/A**
|
|
184
184
|
|
|
185
|
-
No subprocesses needed — lightweight linear pipeline with small files (~
|
|
185
|
+
No subprocesses needed — lightweight linear pipeline with small files (~50-80 tokens per snippet). All operations are sequential with data dependencies between steps.
|
|
186
186
|
|
|
187
187
|
### Issues Found: 0
|
|
188
188
|
|
|
@@ -63,7 +63,7 @@ Package a skill for distribution + platform-aware context injection. Final deliv
|
|
|
63
63
|
|
|
64
64
|
- **ADR-J:** Managed section with `<!-- SKF:BEGIN/END -->` markers. Auto-inject between markers. Developer controls placement. Ferris controls content.
|
|
65
65
|
- **ADR-K:** Snippet updates only at export. Create/update are draft operations. Export publishes to skills/ and CLAUDE.md. Prevents half-baked snippets.
|
|
66
|
-
- **ADR-L:** One snippet format always —
|
|
66
|
+
- **ADR-L:** One snippet format always — ADR-L v2 multi-line per skill (~50-80 tokens each). No adaptive format switching. Consistent for agent parsing.
|
|
67
67
|
|
|
68
68
|
### Dual-Output Delivery Strategy (from module brief)
|
|
69
69
|
|
|
@@ -174,7 +174,7 @@ Three CLAUDE.md cases:
|
|
|
174
174
|
**Output Specifications:**
|
|
175
175
|
- Type: Action-based (file writes + console output)
|
|
176
176
|
- Files written:
|
|
177
|
-
1. `{skills_output_folder}/{name}/context-snippet.md` —
|
|
177
|
+
1. `{skills_output_folder}/{name}/context-snippet.md` — ADR-L v2 format (~50-80 tokens/skill)
|
|
178
178
|
2. CLAUDE.md or AGENTS.md — managed `<!-- SKF:BEGIN/END -->` section per ADR-J (3 cases: create/append/regenerate)
|
|
179
179
|
3. agentskills.io package structure — ready for `npx skills publish`
|
|
180
180
|
- Console output: Token count report + export summary with distribution instructions
|
|
@@ -182,7 +182,7 @@ Three CLAUDE.md cases:
|
|
|
182
182
|
|
|
183
183
|
**Success Criteria:**
|
|
184
184
|
- Skill loaded and validated against agentskills.io spec
|
|
185
|
-
- context-snippet.md generated with correct
|
|
185
|
+
- context-snippet.md generated with correct ADR-L v2 format
|
|
186
186
|
- CLAUDE.md managed section correctly handles all three cases without corrupting existing content
|
|
187
187
|
- Token counts calculated and reported for all generated artifacts
|
|
188
188
|
- Package structure ready for `npx skills publish`
|
|
@@ -233,9 +233,9 @@ Three CLAUDE.md cases:
|
|
|
233
233
|
- Auto-proceed
|
|
234
234
|
|
|
235
235
|
**Phase 3: Generate Snippet (step-03-generate-snippet)**
|
|
236
|
-
- Generate context-snippet.md in
|
|
236
|
+
- Generate context-snippet.md in ADR-L v2 format
|
|
237
237
|
- T1-now content only — top-5 exports, pointer to skill path
|
|
238
|
-
- ~
|
|
238
|
+
- ~50-80 tokens per skill target
|
|
239
239
|
- Auto-proceed
|
|
240
240
|
|
|
241
241
|
**Phase 4: Update Context (step-04-update-context)**
|
|
@@ -264,7 +264,7 @@ Three CLAUDE.md cases:
|
|
|
264
264
|
|------|------|------|-------------|------|
|
|
265
265
|
| 01 | load-skill | Init (Input Discovery) | P2: C only | Load skill artifacts, validate spec compliance, confirm with user |
|
|
266
266
|
| 02 | package | Middle (Simple) | P3: Auto-proceed | Build agentskills.io package structure |
|
|
267
|
-
| 03 | generate-snippet | Middle (Simple) | P3: Auto-proceed | Generate context-snippet.md in
|
|
267
|
+
| 03 | generate-snippet | Middle (Simple) | P3: Auto-proceed | Generate context-snippet.md in ADR-L v2 format |
|
|
268
268
|
| 04 | update-context | Middle (Standard) | P2: C only | Update managed section in CLAUDE.md/AGENTS.md (3-case logic) |
|
|
269
269
|
| 05 | token-report | Middle (Simple) | P3: Auto-proceed | Calculate and report token counts |
|
|
270
270
|
| 06 | summary | Final | No next step | Display export summary with distribution instructions |
|
|
@@ -292,7 +292,7 @@ Three CLAUDE.md cases:
|
|
|
292
292
|
**Step 03 — generate-snippet (Middle Simple, auto-proceed):**
|
|
293
293
|
- Load data/snippet-format.md template (ADR-L)
|
|
294
294
|
- Generate context-snippet.md from metadata: skill name, path, top-5 exports
|
|
295
|
-
-
|
|
295
|
+
- ADR-L v2 format, ~50-80 tokens target, T1-now content only
|
|
296
296
|
- Write to `{skills_output_folder}/{name}/context-snippet.md` (or preview if dry-run)
|
|
297
297
|
- Auto-proceed to step-04
|
|
298
298
|
|
|
@@ -357,7 +357,7 @@ export-skill/
|
|
|
357
357
|
|
|
358
358
|
### Subprocess Optimization
|
|
359
359
|
|
|
360
|
-
None needed — lightweight linear pipeline, small files (~
|
|
360
|
+
None needed — lightweight linear pipeline, small files (~50-80 tokens per snippet).
|
|
361
361
|
|
|
362
362
|
### Workflow Chaining
|
|
363
363
|
|
|
@@ -49,7 +49,7 @@ description: Package for distribution + platform-aware context injection
|
|
|
49
49
|
Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
|
|
50
50
|
|
|
51
51
|
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
|
52
|
-
- `skills_output_folder`, `forge_data_folder`
|
|
52
|
+
- `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
53
53
|
|
|
54
54
|
### 2. First Step Execution
|
|
55
55
|
|
|
@@ -7,6 +7,14 @@ The following sections should be populated in the generated SKILL.md. Best-effor
|
|
|
7
7
|
### Required Sections
|
|
8
8
|
|
|
9
9
|
```markdown
|
|
10
|
+
---
|
|
11
|
+
name: {skill_name}
|
|
12
|
+
description: >
|
|
13
|
+
{README-derived description, trigger-optimized for agent discovery.
|
|
14
|
+
Include what the package does and when to use it.
|
|
15
|
+
Mention what NOT to use it for if applicable.}
|
|
16
|
+
---
|
|
17
|
+
|
|
10
18
|
# {skill_name}
|
|
11
19
|
|
|
12
20
|
## Overview
|
|
@@ -39,13 +47,16 @@ The following sections should be populated in the generated SKILL.md. Best-effor
|
|
|
39
47
|
{Any caveats, limitations, or observations about the extraction}
|
|
40
48
|
```
|
|
41
49
|
|
|
42
|
-
## context-snippet.md Format (
|
|
50
|
+
## context-snippet.md Format (Vercel-Aligned)
|
|
43
51
|
|
|
44
|
-
|
|
52
|
+
Indexed format targeting ~80-120 tokens per skill:
|
|
45
53
|
|
|
46
54
|
```markdown
|
|
47
|
-
{skill_name}: {
|
|
48
|
-
|
|
55
|
+
[{skill_name} v{version}]|root: skills/{skill_name}/
|
|
56
|
+
|IMPORTANT: {skill_name} v{version} — read SKILL.md before writing {skill_name} code. Do NOT rely on training data.
|
|
57
|
+
|quick-start:{SKILL.md#quick-start}
|
|
58
|
+
|api: {top-5 exports with () for functions}
|
|
59
|
+
|gotchas: {1-2 most critical pitfalls if known}
|
|
49
60
|
```
|
|
50
61
|
|
|
51
62
|
## metadata.json Format
|
|
@@ -54,13 +65,22 @@ Two-line format targeting ~30 tokens per skill:
|
|
|
54
65
|
{
|
|
55
66
|
"name": "{skill_name}",
|
|
56
67
|
"version": "0.1.0",
|
|
68
|
+
"skill_type": "single",
|
|
57
69
|
"source_authority": "community",
|
|
58
70
|
"source_repo": "{repo_url}",
|
|
59
71
|
"source_package": "{package_name}",
|
|
60
72
|
"language": "{language}",
|
|
61
73
|
"generated_by": "quick-skill",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
74
|
+
"generation_date": "{date}",
|
|
75
|
+
"confidence_tier": "Quick",
|
|
76
|
+
"exports": ["{export_1}", "{export_2}"],
|
|
77
|
+
"stats": {
|
|
78
|
+
"exports_documented": "{number}",
|
|
79
|
+
"exports_public_api": "{number}",
|
|
80
|
+
"exports_internal": 0,
|
|
81
|
+
"exports_total": "{number}",
|
|
82
|
+
"public_api_coverage": 1.0,
|
|
83
|
+
"total_coverage": 1.0
|
|
84
|
+
}
|
|
65
85
|
}
|
|
66
86
|
```
|
|
@@ -10,7 +10,7 @@ skillTemplateData: '../data/skill-template.md'
|
|
|
10
10
|
|
|
11
11
|
## STEP GOAL:
|
|
12
12
|
|
|
13
|
-
To assemble the best-effort SKILL.md document, context-snippet.md in
|
|
13
|
+
To assemble the best-effort SKILL.md document, context-snippet.md in Vercel-aligned indexed format, and metadata.json with `source_authority: community` from the extraction inventory. Present compiled output for review before validation.
|
|
14
14
|
|
|
15
15
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
16
|
|
|
@@ -58,14 +58,32 @@ To assemble the best-effort SKILL.md document, context-snippet.md in ADR-L two-l
|
|
|
58
58
|
|
|
59
59
|
Load {skillTemplateData} to understand:
|
|
60
60
|
- SKILL.md required and optional sections
|
|
61
|
-
- context-snippet.md
|
|
61
|
+
- context-snippet.md Vercel-aligned indexed format
|
|
62
62
|
- metadata.json field requirements
|
|
63
63
|
|
|
64
64
|
### 2. Assemble SKILL.md
|
|
65
65
|
|
|
66
66
|
Using the template structure, populate each section from extraction_inventory:
|
|
67
67
|
|
|
68
|
-
**
|
|
68
|
+
**Frontmatter (REQUIRED — agentskills.io compliance):**
|
|
69
|
+
|
|
70
|
+
The SKILL.md MUST begin with YAML frontmatter:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
---
|
|
74
|
+
name: {skill_name}
|
|
75
|
+
description: >
|
|
76
|
+
{Trigger-optimized description from extraction_inventory.description.
|
|
77
|
+
1-1024 chars. Include what it does, when to use it, and what NOT to use it for.}
|
|
78
|
+
---
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Frontmatter rules:**
|
|
82
|
+
- `name`: lowercase alphanumeric + hyphens only, must match the skill output directory name
|
|
83
|
+
- `description`: non-empty, max 1024 chars, optimized for agent discovery
|
|
84
|
+
- No other frontmatter fields — only `name` and `description` for community skills
|
|
85
|
+
|
|
86
|
+
**Required sections (after frontmatter):**
|
|
69
87
|
- **Overview:** Package name, repository, language, source authority, generation date
|
|
70
88
|
- **Description:** From extraction_inventory.description (README-derived)
|
|
71
89
|
- **Key Exports:** From extraction_inventory.exports — list each with name, type, brief description
|
|
@@ -81,15 +99,19 @@ Using the template structure, populate each section from extraction_inventory:
|
|
|
81
99
|
|
|
82
100
|
### 3. Generate Context Snippet
|
|
83
101
|
|
|
84
|
-
Create context-snippet.md in
|
|
102
|
+
Create context-snippet.md in Vercel-aligned indexed format (~80-120 tokens):
|
|
85
103
|
|
|
86
104
|
```
|
|
87
|
-
{skill_name}: {
|
|
88
|
-
|
|
105
|
+
[{skill_name} v{version}]|root: skills/{skill_name}/
|
|
106
|
+
|IMPORTANT: {skill_name} v{version} — read SKILL.md before writing {skill_name} code. Do NOT rely on training data.
|
|
107
|
+
|quick-start:{SKILL.md#quick-start}
|
|
108
|
+
|api: {top-5 exports with () for functions}
|
|
109
|
+
|gotchas: {1-2 most critical pitfalls if known}
|
|
89
110
|
```
|
|
90
111
|
|
|
91
112
|
**If fewer than 5 exports:** Use all available exports.
|
|
92
|
-
**If no exports:**
|
|
113
|
+
**If no exports:** Omit the api line.
|
|
114
|
+
**If no gotchas known:** Omit the gotchas line.
|
|
93
115
|
|
|
94
116
|
### 4. Generate Metadata JSON
|
|
95
117
|
|
|
@@ -98,15 +120,24 @@ Create metadata.json:
|
|
|
98
120
|
```json
|
|
99
121
|
{
|
|
100
122
|
"name": "{repo_name}",
|
|
101
|
-
"version": "0.1.0",
|
|
123
|
+
"version": "{extraction_inventory.version or 0.1.0}",
|
|
124
|
+
"skill_type": "single",
|
|
102
125
|
"source_authority": "community",
|
|
103
126
|
"source_repo": "{resolved_url}",
|
|
104
127
|
"source_package": "{package_name from manifest}",
|
|
105
128
|
"language": "{language}",
|
|
106
129
|
"generated_by": "quick-skill",
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
130
|
+
"generation_date": "{current ISO date}",
|
|
131
|
+
"confidence_tier": "Quick",
|
|
132
|
+
"exports": ["{export_1}", "{export_2}"],
|
|
133
|
+
"stats": {
|
|
134
|
+
"exports_documented": "{number of exports found}",
|
|
135
|
+
"exports_public_api": "{number of exports found}",
|
|
136
|
+
"exports_internal": 0,
|
|
137
|
+
"exports_total": "{number of exports found}",
|
|
138
|
+
"public_api_coverage": 1.0,
|
|
139
|
+
"total_coverage": 1.0
|
|
140
|
+
}
|
|
110
141
|
}
|
|
111
142
|
```
|
|
112
143
|
|
|
@@ -124,7 +155,7 @@ Create metadata.json:
|
|
|
124
155
|
|
|
125
156
|
**context-snippet.md:**
|
|
126
157
|
|
|
127
|
-
{Display the
|
|
158
|
+
{Display the snippet}
|
|
128
159
|
|
|
129
160
|
---
|
|
130
161
|
|
|
@@ -165,7 +196,7 @@ ONLY WHEN the user reviews the compiled output and selects 'C' will you load and
|
|
|
165
196
|
### ✅ SUCCESS:
|
|
166
197
|
|
|
167
198
|
- SKILL.md assembled with all available sections populated
|
|
168
|
-
- context-snippet.md generated in correct
|
|
199
|
+
- context-snippet.md generated in correct Vercel-aligned indexed format
|
|
169
200
|
- metadata.json generated with source_authority: community
|
|
170
201
|
- Compiled output presented for user review
|
|
171
202
|
- User confirms readiness before proceeding to validation
|