bmad-module-skill-forge 0.9.0 → 0.10.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +39 -0
- package/.gitattributes +16 -0
- package/README.md +105 -38
- package/docs/404.md +13 -10
- package/docs/RELEASING.md +185 -0
- package/docs/STABILITY.md +123 -0
- package/docs/_data/pinned.yaml +98 -0
- package/docs/agents.md +16 -11
- package/docs/architecture.md +221 -0
- package/docs/bmad-synergy.md +11 -13
- package/docs/concepts.md +18 -108
- package/docs/examples.md +121 -80
- package/docs/getting-started.md +85 -147
- package/docs/how-it-works.md +25 -536
- package/docs/index.md +44 -27
- package/docs/skill-model.md +328 -0
- package/docs/troubleshooting.md +39 -0
- package/docs/verifying-a-skill.md +232 -0
- package/docs/why-skf.md +93 -0
- package/docs/workflows.md +119 -13
- package/package.json +25 -4
- package/src/README.md +23 -25
- package/src/forger/forge-tier.yaml +4 -2
- package/src/forger/preferences.yaml +7 -1
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +1 -1
- package/src/knowledge/ccc-bridge.md +16 -15
- package/src/knowledge/overview.md +11 -11
- package/src/knowledge/progressive-capability.md +3 -3
- package/src/knowledge/provenance-tracking.md +9 -3
- package/src/knowledge/qmd-registry.md +8 -8
- package/src/knowledge/skf-knowledge-index.csv +2 -2
- package/src/knowledge/skill-lifecycle.md +16 -1
- package/src/knowledge/split-body-strategy.md +1 -1
- package/src/knowledge/version-paths.md +17 -12
- package/src/module-help.csv +18 -17
- package/src/module.yaml +4 -0
- package/src/shared/health-check.md +372 -0
- package/src/shared/references/feasibility-report-schema.md +86 -0
- package/src/shared/references/headless-gate-convention.md +62 -0
- package/src/shared/references/output-contract-schema.md +35 -0
- package/src/shared/references/pipeline-contracts.md +102 -0
- package/src/shared/scripts/skf-atomic-write.py +370 -0
- package/src/shared/scripts/skf-manifest-ops.py +236 -0
- package/src/shared/scripts/skf-preflight.py +164 -0
- package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
- package/src/shared/scripts/skf-severity-classify.py +163 -0
- package/src/shared/scripts/skf-skill-inventory.py +210 -0
- package/src/shared/scripts/skf-structural-diff.py +257 -0
- package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
- package/src/shared/scripts/skf-validate-output.py +247 -0
- package/src/skf-analyze-source/SKILL.md +57 -0
- package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -66
- package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
- package/src/skf-audit-skill/SKILL.md +59 -0
- package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
- package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -59
- package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-brief-skill/SKILL.md +53 -0
- package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
- package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -69
- package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
- package/src/skf-create-skill/SKILL.md +63 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
- package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
- package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
- package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
- package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
- package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
- package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
- package/src/skf-create-stack-skill/SKILL.md +64 -0
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
- package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
- package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
- package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
- package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
- package/src/skf-drop-skill/SKILL.md +57 -0
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
- package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-export-skill/SKILL.md +57 -0
- package/src/skf-export-skill/assets/managed-section-format.md +138 -0
- package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
- package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +20 -64
- package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-forger/SKILL.md +110 -0
- package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
- package/src/skf-quick-skill/SKILL.md +56 -0
- package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
- package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
- package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-refine-architecture/SKILL.md +57 -0
- package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +14 -64
- package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
- package/src/skf-rename-skill/SKILL.md +58 -0
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
- package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-setup/SKILL.md +55 -0
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
- package/src/skf-setup/steps-c/step-04-report.md +92 -0
- package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
- package/src/skf-test-skill/SKILL.md +59 -0
- package/src/skf-test-skill/references/migration-section-rules.md +114 -0
- package/src/skf-test-skill/references/scoring-rules.md +207 -0
- package/src/skf-test-skill/references/source-access-protocol.md +109 -0
- package/src/skf-test-skill/scripts/compute-score.py +310 -0
- package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
- package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
- package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
- package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
- package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
- package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
- package/src/skf-test-skill/templates/test-report-template.md +58 -0
- package/src/skf-update-skill/SKILL.md +58 -0
- package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
- package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
- package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
- package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
- package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
- package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -66
- package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
- package/src/skf-verify-stack/SKILL.md +60 -0
- package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
- package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
- package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
- package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
- package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
- package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
- package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
- package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
- package/tools/cli/commands/install.js +1 -1
- package/tools/cli/commands/status.js +21 -23
- package/tools/cli/commands/uninstall.js +11 -19
- package/tools/cli/commands/update.js +2 -2
- package/tools/cli/lib/ide-skills.js +216 -0
- package/tools/cli/lib/installer.js +29 -52
- package/tools/cli/lib/manifest.js +11 -5
- package/tools/cli/lib/platform-codes.yaml +223 -0
- package/tools/cli/lib/ui.js +76 -47
- package/tools/validate-docs-drift.js +193 -0
- package/src/agents/forger.agent.yaml +0 -114
- package/src/workflows/README.md +0 -174
- package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
- package/src/workflows/analyze-source/workflow.md +0 -61
- package/src/workflows/audit-skill/workflow.md +0 -64
- package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
- package/src/workflows/brief-skill/workflow.md +0 -58
- package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
- package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
- package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
- package/src/workflows/create-skill/steps-c/step-08-report.md +0 -176
- package/src/workflows/create-skill/workflow.md +0 -53
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -145
- package/src/workflows/create-stack-skill/workflow.md +0 -59
- package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -135
- package/src/workflows/drop-skill/workflow.md +0 -63
- package/src/workflows/export-skill/data/managed-section-format.md +0 -103
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
- package/src/workflows/export-skill/workflow.md +0 -58
- package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -179
- package/src/workflows/quick-skill/workflow.md +0 -58
- package/src/workflows/refine-architecture/workflow.md +0 -61
- package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -132
- package/src/workflows/rename-skill/workflow.md +0 -64
- package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -156
- package/src/workflows/setup-forge/workflow.md +0 -51
- package/src/workflows/test-skill/data/scoring-rules.md +0 -123
- package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
- package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
- package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
- package/src/workflows/test-skill/steps-c/step-06-report.md +0 -207
- package/src/workflows/test-skill/templates/test-report-template.md +0 -28
- package/src/workflows/test-skill/workflow.md +0 -57
- package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
- package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
- package/src/workflows/update-skill/workflow.md +0 -56
- package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
- package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
- package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
- package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -197
- package/src/workflows/verify-stack/workflow.md +0 -61
- package/tools/cli/lib/compiler.js +0 -306
- package/tools/cli/lib/ide-commands.js +0 -244
- /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
- /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
- /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
- /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skf-export-skill
|
|
3
|
+
description: Package for distribution and inject context into CLAUDE.md/AGENTS.md/.cursorrules. Use when the user requests to "export" or "package a skill."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Export Skill
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Packages a completed skill as an agentskills.io-compliant package, generates context snippets, and updates the managed section in CLAUDE.md/.cursorrules/AGENTS.md for platform-aware context injection. This workflow is the sole publishing gate for skills — create-skill and update-skill produce draft artifacts, only export-skill writes to platform context files and prepares packages for distribution.
|
|
11
|
+
|
|
12
|
+
## Role
|
|
13
|
+
|
|
14
|
+
You are a delivery and packaging specialist collaborating with a skill developer. You bring expertise in skill packaging, ecosystem compliance, and context injection patterns, while the user brings their completed skill and distribution requirements.
|
|
15
|
+
|
|
16
|
+
## Workflow Rules
|
|
17
|
+
|
|
18
|
+
These rules apply to every step in this workflow:
|
|
19
|
+
|
|
20
|
+
- Read each step file completely before taking any action
|
|
21
|
+
- Follow the mandatory sequence in each step exactly — do not skip, reorder, or optimize
|
|
22
|
+
- Only load one step file at a time — never preload future steps
|
|
23
|
+
- Always communicate in `{communication_language}`
|
|
24
|
+
- If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision
|
|
25
|
+
|
|
26
|
+
## Stages
|
|
27
|
+
|
|
28
|
+
| # | Step | File | Auto-proceed |
|
|
29
|
+
|---|------|------|--------------|
|
|
30
|
+
| 1 | Load Skill | steps-c/step-01-load-skill.md | No (confirm) |
|
|
31
|
+
| 2 | Package | steps-c/step-02-package.md | Yes |
|
|
32
|
+
| 3 | Generate Snippet | steps-c/step-03-generate-snippet.md | Yes |
|
|
33
|
+
| 4 | Update Context | steps-c/step-04-update-context.md | No (confirm) |
|
|
34
|
+
| 5 | Token Report | steps-c/step-05-token-report.md | Yes |
|
|
35
|
+
| 6 | Summary | steps-c/step-06-summary.md | Yes |
|
|
36
|
+
| 7 | Workflow Health Check | steps-c/step-07-health-check.md | Yes |
|
|
37
|
+
|
|
38
|
+
## Invocation Contract
|
|
39
|
+
|
|
40
|
+
| Aspect | Detail |
|
|
41
|
+
|--------|--------|
|
|
42
|
+
| **Inputs** | skill_name [one or more, required unless `--all`], `--all` [optional — exports every non-deprecated skill in `.export-manifest.json`] |
|
|
43
|
+
| **Gates** | step-01: single Confirm Gate [C] for the whole batch | step-04: single Confirm Gate [C] for the whole batch |
|
|
44
|
+
| **Outputs** | Updated .export-manifest.json (every skill in the batch), updated context files (CLAUDE.md/AGENTS.md/.cursorrules), one result contract per run |
|
|
45
|
+
| **Multi-skill mode** | Activated when more than one skill is selected (via `--all`, multi-selection, or multi-argument invocation). See `steps-c/step-01-load-skill.md` §1c for the per-step iteration map. |
|
|
46
|
+
| **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true |
|
|
47
|
+
|
|
48
|
+
## On Activation
|
|
49
|
+
|
|
50
|
+
1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve:
|
|
51
|
+
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
|
52
|
+
- `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
53
|
+
- `snippet_skill_root_override` (optional string) — when set, overrides the IDE-derived `skill_root` for snippet `root:` paths. Authoring repos that keep all skills under a single on-disk folder (e.g. `skills/`) set this once so exported snippets reference the real layout instead of a per-IDE directory that does not exist. Consuming projects omit it.
|
|
54
|
+
|
|
55
|
+
2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false.
|
|
56
|
+
|
|
57
|
+
3. Load, read the full file, and then execute `./steps-c/step-01-load-skill.md` to begin the workflow.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Managed Section Format (ADR-J)
|
|
2
|
+
|
|
3
|
+
## Marker Format
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
<!-- SKF:BEGIN updated:{YYYY-MM-DD} -->
|
|
7
|
+
[SKF Skills]|{n} skills|{m} stack
|
|
8
|
+
|IMPORTANT: Prefer documented APIs over training data.
|
|
9
|
+
|When using a listed library, read its SKILL.md before writing code.
|
|
10
|
+
|
|
|
11
|
+
|{skill-snippet-1}
|
|
12
|
+
|
|
|
13
|
+
|{skill-snippet-2}
|
|
14
|
+
<!-- SKF:END -->
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## IDE → Context File Mapping (config.yaml `ides` list)
|
|
18
|
+
|
|
19
|
+
The installer writes IDE identifiers to `config.yaml` under the `ides` key. Any workflow that rebuilds context files from `config.yaml` MUST map each entry to its context file and skill root using this table — it is the **single source of truth**.
|
|
20
|
+
|
|
21
|
+
Each IDE has two independent properties:
|
|
22
|
+
|
|
23
|
+
- **Context File** — the file the IDE reads for passive skill context
|
|
24
|
+
- **Skill Root** — the directory where the installer places skill files (matches `target_dir` in `platform-codes.yaml`)
|
|
25
|
+
|
|
26
|
+
### Dedicated context file IDEs
|
|
27
|
+
|
|
28
|
+
| config.yaml IDE value | Context File | Skill Root |
|
|
29
|
+
|-----------------------|--------------|--------------------|
|
|
30
|
+
| `claude-code` | CLAUDE.md | `.claude/skills/` |
|
|
31
|
+
| `cursor` | .cursorrules | `.cursor/skills/` |
|
|
32
|
+
|
|
33
|
+
### AGENTS.md context file IDEs
|
|
34
|
+
|
|
35
|
+
All other IDEs use AGENTS.md as the context file, each with its own skill directory:
|
|
36
|
+
|
|
37
|
+
| config.yaml IDE value | Context File | Skill Root |
|
|
38
|
+
|-----------------------|--------------|----------------------|
|
|
39
|
+
| `github-copilot` | AGENTS.md | `.github/skills/` |
|
|
40
|
+
| `codex` | AGENTS.md | `.agents/skills/` |
|
|
41
|
+
| `windsurf` | AGENTS.md | `.windsurf/skills/` |
|
|
42
|
+
| `cline` | AGENTS.md | `.cline/skills/` |
|
|
43
|
+
| `roo` | AGENTS.md | `.roo/skills/` |
|
|
44
|
+
| `auggie` | AGENTS.md | `.augment/skills/` |
|
|
45
|
+
| `antigravity` | AGENTS.md | `.agent/skills/` |
|
|
46
|
+
| `codebuddy` | AGENTS.md | `.codebuddy/skills/` |
|
|
47
|
+
| `crush` | AGENTS.md | `.crush/skills/` |
|
|
48
|
+
| `gemini` | AGENTS.md | `.gemini/skills/` |
|
|
49
|
+
| `iflow` | AGENTS.md | `.iflow/skills/` |
|
|
50
|
+
| `junie` | AGENTS.md | `.junie/skills/` |
|
|
51
|
+
| `kilo` | AGENTS.md | `.kilocode/skills/` |
|
|
52
|
+
| `kiro` | AGENTS.md | `.kiro/skills/` |
|
|
53
|
+
| `ona` | AGENTS.md | `.ona/skills/` |
|
|
54
|
+
| `opencode` | AGENTS.md | `.opencode/skills/` |
|
|
55
|
+
| `pi` | AGENTS.md | `.pi/skills/` |
|
|
56
|
+
| `qoder` | AGENTS.md | `.qoder/skills/` |
|
|
57
|
+
| `qwen` | AGENTS.md | `.qwen/skills/` |
|
|
58
|
+
| `rovo-dev` | AGENTS.md | `.rovodev/skills/` |
|
|
59
|
+
| `trae` | AGENTS.md | `.trae/skills/` |
|
|
60
|
+
| `other` | AGENTS.md | `.agents/skills/` |
|
|
61
|
+
| _(any unknown value)_ | AGENTS.md | `.agents/skills/` |
|
|
62
|
+
|
|
63
|
+
### Resolution rules
|
|
64
|
+
|
|
65
|
+
**Deduplication:** When multiple IDE entries map to the same context file, deduplicate so each context file is processed exactly once. Use the **first configured IDE's** skill root for that context file's snippet root paths. Report the deduplication to the user: "Multiple IDEs target AGENTS.md — using {first IDE}'s skill root (`{skill_root}`). Each IDE's skills are installed to its own directory."
|
|
66
|
+
|
|
67
|
+
**Missing `ides` key:** If the `ides` key is absent from `config.yaml`, treat it as an empty list. If the resulting set is empty (no recognized entries), fall back to AGENTS.md with `.agents/skills/` as the skill root.
|
|
68
|
+
|
|
69
|
+
**Unknown IDE values:** Warn: "Unknown IDE '{value}' in config.yaml — defaulting to AGENTS.md with `.agents/skills/`"
|
|
70
|
+
|
|
71
|
+
**`snippet_skill_root_override` (optional):** Authoring repos where all skills live under one shared on-disk directory (e.g. `skills/`) that does not match any per-IDE skill root may set `snippet_skill_root_override: skills/` in `config.yaml`. When set:
|
|
72
|
+
|
|
73
|
+
- `export-skill/step-03` §2.7 uses the override as `{skill_root}` for snippet generation instead of the IDE-mapped value
|
|
74
|
+
- `export-skill/step-04` §4d (and its equivalents in `drop-skill/step-02` and `rename-skill/step-02`) skip the prefix rewrite for any snippet whose current prefix already equals the override — the managed section will reference the on-disk location instead of a per-IDE directory that does not exist
|
|
75
|
+
|
|
76
|
+
Consuming projects (the common case) omit the field and keep the default IDE-mapping behavior. The override is a narrow escape hatch for repos that author skills into `{skills_output_folder}` and never duplicate them into `.claude/skills/`-style directories.
|
|
77
|
+
|
|
78
|
+
### Consumers
|
|
79
|
+
|
|
80
|
+
This mapping is the single source of truth. Workflows that need it: `export-skill/step-01` (resolves `target_context_files` from config.yaml IDE list), `export-skill/step-04` (applies four-case logic and rewrites root paths when writing managed sections), `drop-skill/step-02` and `rename-skill/step-02` (rebuild context files after a management operation).
|
|
81
|
+
|
|
82
|
+
## Four-Case Logic
|
|
83
|
+
|
|
84
|
+
### Case 1: Create (No File Exists)
|
|
85
|
+
|
|
86
|
+
Target file does not exist. Create new file with managed section only.
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
<!-- SKF:BEGIN updated:{date} -->
|
|
90
|
+
{managed section content}
|
|
91
|
+
<!-- SKF:END -->
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Case 2: Append (File Exists, No Section)
|
|
95
|
+
|
|
96
|
+
Target file exists but contains no `<!-- SKF:BEGIN` marker. Append managed section at end of file.
|
|
97
|
+
|
|
98
|
+
1. Read existing file content
|
|
99
|
+
2. Append two blank lines
|
|
100
|
+
3. Append managed section with markers
|
|
101
|
+
4. Write file
|
|
102
|
+
|
|
103
|
+
### Case 3: Regenerate (Existing Section)
|
|
104
|
+
|
|
105
|
+
Target file contains `<!-- SKF:BEGIN` and `<!-- SKF:END -->` markers. Replace content between markers.
|
|
106
|
+
|
|
107
|
+
1. Read existing file content
|
|
108
|
+
2. Find `<!-- SKF:BEGIN` line (preserve everything before it)
|
|
109
|
+
3. Find `<!-- SKF:END -->` line (preserve everything after it)
|
|
110
|
+
4. Replace everything between markers (inclusive) with new managed section
|
|
111
|
+
5. Write file
|
|
112
|
+
|
|
113
|
+
### Case 4: Malformed Markers (Halt)
|
|
114
|
+
|
|
115
|
+
Target file contains `<!-- SKF:BEGIN` but no matching `<!-- SKF:END -->` marker. This indicates a corrupted managed section.
|
|
116
|
+
|
|
117
|
+
1. Halt workflow with error: "Malformed managed section — `<!-- SKF:BEGIN` found but no `<!-- SKF:END -->`. Fix the markers manually before re-running export."
|
|
118
|
+
2. Do not modify the file
|
|
119
|
+
|
|
120
|
+
## Regeneration: Full Index Rebuild
|
|
121
|
+
|
|
122
|
+
When regenerating (Case 3) or creating/appending (Cases 1-2), rebuild the skill index from the **exported skill set** only:
|
|
123
|
+
|
|
124
|
+
1. Read `{skills_output_folder}/.export-manifest.json` (v2 schema — see `knowledge/version-paths.md`) to determine which skills have been explicitly exported and their `active_version` (if no manifest exists, only the current export target qualifies)
|
|
125
|
+
2. For each skill in the exported set, resolve the snippet at `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/context-snippet.md` (i.e., `{skill_package}/context-snippet.md`). Do NOT use glob patterns across version directories — always resolve via manifest `active_version` or `active` symlink
|
|
126
|
+
3. Count total skills and stack skills (from filtered set only)
|
|
127
|
+
4. Assemble filtered snippets into managed section
|
|
128
|
+
5. Sort alphabetically by skill name
|
|
129
|
+
6. Update the header line with correct counts
|
|
130
|
+
|
|
131
|
+
**Rationale:** create-skill and update-skill also write `context-snippet.md` as a build artifact, but only export-skill is the publishing gate (ADR-K). The `.export-manifest.json` file tracks which skills have passed through export-skill, preventing draft skills from leaking into the agent's passive context.
|
|
132
|
+
|
|
133
|
+
## Safety Rules
|
|
134
|
+
|
|
135
|
+
- NEVER modify content outside the `<!-- SKF:BEGIN/END -->` markers
|
|
136
|
+
- ALWAYS preserve existing file content above and below markers
|
|
137
|
+
- ALWAYS verify file was written correctly after write
|
|
138
|
+
- If write fails, report error — do not attempt partial writes
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
# Context Snippet Format (Vercel-Aligned Indexed Format)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Skill Root Path
|
|
4
4
|
|
|
5
|
-
The snippet `root:` path must reflect the
|
|
5
|
+
The snippet `root:` path must reflect the IDE's actual skill directory — its `skill_root` from the IDE → Context File Mapping table in `managed-section-format.md`. Each IDE has its own skill directory (e.g., `.claude/skills/`, `.windsurf/skills/`, `.github/skills/`).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|----------|-----------------|
|
|
9
|
-
| `claude` | `.claude/skills/` |
|
|
10
|
-
| `cursor` | `.cursor/skills/` |
|
|
11
|
-
| `copilot` | `.agents/skills/` |
|
|
7
|
+
The root path in context-snippet.md on disk uses the **`skill_root` of the first entry in `target_context_files`** (resolved in step-01 from config.yaml IDE mapping). When assembling managed sections for other context files, step-04 rewrites root paths to match the target context file's skill root.
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
**Authoring-repo override:** If `snippet_skill_root_override` is set in `config.yaml`, it replaces the IDE-mapped value for snippet generation and freezes matching prefixes against step-04 rewrites. See the "Resolution rules" section in `managed-section-format.md` for the full semantics.
|
|
14
10
|
|
|
15
11
|
## Format Rules
|
|
16
12
|
|
|
17
13
|
- Indexed pipe-delimited format per skill — retrieval instruction + file map + inline gotchas
|
|
18
|
-
- ~80-120 tokens per skill target (up from ~50-80, justified by Vercel research)
|
|
14
|
+
- ~80-120 tokens per skill target (up from ~50-80, justified by Vercel research). Deep tier may exceed 120 tokens when gotchas are load-bearing (substantive breaking-change notices, deprecated-API lists); the hard ceiling is 300 tokens.
|
|
19
15
|
- T1-now content only (AST-current, no annotations)
|
|
20
16
|
- Line 2 (IMPORTANT) is the RETRIEVAL INSTRUCTION — always present, tells agent to read SKILL.md
|
|
21
17
|
- Section anchors (`#quick-start`, `#key-types`) must match actual SKILL.md heading slugs
|
|
@@ -25,7 +21,7 @@ The root path in context-snippet.md on disk uses the **first platform in `target
|
|
|
25
21
|
## Single Skill Snippet Template
|
|
26
22
|
|
|
27
23
|
```markdown
|
|
28
|
-
[{skill-name} v{version}]|root: {
|
|
24
|
+
[{skill-name} v{version}]|root: {skill_root}{skill-name}/
|
|
29
25
|
|IMPORTANT: {skill-name} v{version} — read SKILL.md before writing {skill-name} code. Do NOT rely on training data.
|
|
30
26
|
|quick-start:{SKILL.md#quick-start}
|
|
31
27
|
|api: {top exports with () for functions, comma-separated}
|
|
@@ -43,7 +39,7 @@ The root path in context-snippet.md on disk uses the **first platform in `target
|
|
|
43
39
|
## Stack Skill Snippet Template
|
|
44
40
|
|
|
45
41
|
```markdown
|
|
46
|
-
[{project}-stack v{version}]|root: {
|
|
42
|
+
[{project}-stack v{version}]|root: {skill_root}{project}-stack/
|
|
47
43
|
|IMPORTANT: {project}-stack — read SKILL.md before writing integration code. Do NOT rely on training data.
|
|
48
44
|
|stack: {dep-1}@{v1}, {dep-2}@{v2}, {dep-3}@{v3}
|
|
49
45
|
|integrations: {pattern-1}, {pattern-2}
|
|
@@ -60,4 +56,4 @@ The root path in context-snippet.md on disk uses the **first platform in `target
|
|
|
60
56
|
- If fewer exports than the limit, list all available
|
|
61
57
|
- If no exports data available, omit the api line
|
|
62
58
|
- Section anchors must be verified against actual SKILL.md headings during generation. For split-body skills (where `references/` exists and `## Full` headings are stubs), if a heading is missing from SKILL.md, rewrite the anchor to point to the reference file path (preferred). Omit the anchor line only if the heading cannot be found in either SKILL.md or `references/*.md`
|
|
63
|
-
- Skill path is relative to project root and uses the
|
|
59
|
+
- Skill path is relative to project root and uses the IDE's `skill_root` prefix (see **Skill Root Path** above, and the IDE → Context File Mapping table in `managed-section-format.md`)
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-02-package.md'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Step 1: Load Skill
|
|
6
|
+
|
|
7
|
+
## STEP GOAL:
|
|
8
|
+
|
|
9
|
+
To load the target skill's artifacts, validate they meet agentskills.io spec compliance, parse export flags, and confirm with the user before proceeding to packaging.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
- Focus only on loading, validating, and confirming the skill — this is read-only
|
|
14
|
+
- Do not write any output files yet (packaging starts in Step 02)
|
|
15
|
+
|
|
16
|
+
## MANDATORY SEQUENCE
|
|
17
|
+
|
|
18
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
19
|
+
|
|
20
|
+
### 1. Parse Export Arguments
|
|
21
|
+
|
|
22
|
+
"**Starting skill export...**"
|
|
23
|
+
|
|
24
|
+
Determine the skill(s) to export and any flags:
|
|
25
|
+
|
|
26
|
+
**Skill Path Discovery (version-aware — see `knowledge/version-paths.md`):**
|
|
27
|
+
- If user provided one or more skill names or paths as arguments, use that list directly
|
|
28
|
+
- If `--all` was passed, build the list from every skill in `{skills_output_folder}/.export-manifest.json.exports` whose `active_version` entry is not `status: "deprecated"` (deprecated skills are excluded from all exports — see step-04 §4b)
|
|
29
|
+
- If no explicit skill and no `--all`, discover available skills using the export manifest:
|
|
30
|
+
1. Read `{skills_output_folder}/.export-manifest.json` — list skill names from `exports`
|
|
31
|
+
2. For each skill group directory in `{skills_output_folder}/`, check for `{skill_group}/active/{skill-name}/SKILL.md`
|
|
32
|
+
3. If neither manifest nor `active` symlink yields results, fall back to flat path: `{skills_output_folder}/{skill-name}/SKILL.md`
|
|
33
|
+
- If multiple skills are found, present the list and accept either a single selection or a comma-/space-separated multi-selection (e.g. `1, 2, 3` or `all`)
|
|
34
|
+
- If no skills found, halt: "No skills found in {skills_output_folder}/. Run create-skill first."
|
|
35
|
+
|
|
36
|
+
Store the resolved selection as `skill_batch` — a list of one or more skill names. `len(skill_batch) > 1` activates multi-skill mode (see §1c below).
|
|
37
|
+
|
|
38
|
+
**Flag Parsing:**
|
|
39
|
+
- `--all` flag: Check if provided. When true and no explicit skill list was given, `skill_batch` is the full non-deprecated manifest set (see above).
|
|
40
|
+
- `--context-file` flag: Check if explicitly provided (CLAUDE.md, .cursorrules, or AGENTS.md). Replaces the old `--platform` flag.
|
|
41
|
+
- `--dry-run` flag: Check if provided. Default: `false`
|
|
42
|
+
|
|
43
|
+
**Context File Resolution:**
|
|
44
|
+
|
|
45
|
+
If `--context-file` is explicitly provided, use that single context file as the sole target. Determine the skill root from the first configured IDE that maps to that context file (or `.agents/skills/` for AGENTS.md if no matching IDE is configured). If other IDEs are configured in config.yaml, emit a note: "**Note:** Exporting to {context-file} only. config.yaml also lists: {other-ides}. Run without `--context-file` to export to all configured IDEs."
|
|
46
|
+
|
|
47
|
+
If `--context-file` is NOT provided, read the `ides` list from config.yaml and map each IDE to its context file and skill root using the "IDE → Context File Mapping" table in `skf-export-skill/assets/managed-section-format.md`. Every IDE the installer offers has an explicit mapping — no silent skips.
|
|
48
|
+
|
|
49
|
+
For each IDE in `config.yaml.ides`:
|
|
50
|
+
|
|
51
|
+
1. Look up its `context_file` and `skill_root` from the canonical mapping table
|
|
52
|
+
2. If the IDE is not in the table, default to AGENTS.md / `.agents/skills/` and warn: "Unknown IDE '{value}' in config.yaml — defaulting to AGENTS.md with `.agents/skills/`"
|
|
53
|
+
|
|
54
|
+
**Deduplication:** Group by `context_file`. When multiple IDE entries map to the same context file (e.g. both `codex` and `cline` map to AGENTS.md), deduplicate so each context file appears in `target_context_files` only once. Use the **first configured IDE's** `skill_root` for that context file. Report the deduplication: "Multiple IDEs target AGENTS.md — using {first-ide}'s skill root (`{skill_root}`). Each IDE's skills are installed to its own directory."
|
|
55
|
+
|
|
56
|
+
**Missing-key handling:** If the `ides` key is absent from config.yaml (older installation or manually edited file), treat it as an empty list.
|
|
57
|
+
|
|
58
|
+
- If mapping produces one or more context files (after dedup), store as `target_context_files` list — each entry has `{context_file, skill_root}`
|
|
59
|
+
- If mapping produces zero entries (empty ides list and no recognized entries), fall back to `[{context_file: "AGENTS.md", skill_root: ".agents/skills/"}]` with note: "No IDEs configured in config.yaml — defaulting to AGENTS.md with `.agents/skills/`."
|
|
60
|
+
|
|
61
|
+
"**Skill(s):** {skill-batch-list} ({N} total)
|
|
62
|
+
**Context file(s):** {context-file-list} (skill root: {skill-root-list})
|
|
63
|
+
**Dry Run:** {yes/no}"
|
|
64
|
+
|
|
65
|
+
### 1b. Detect Snippet Root Prefix Mismatch
|
|
66
|
+
|
|
67
|
+
**Skip entirely if `snippet_skill_root_override` is already set in `config.yaml`** — the authoring-repo escape hatch is already configured and any on-disk prefix that matches it is ground truth (see `assets/managed-section-format.md` override rules).
|
|
68
|
+
|
|
69
|
+
Otherwise, probe existing snippets to catch the authoring-repo case (skills live under a single shared directory like `skills/` that does not match any per-IDE `skill_root`) before step-04 silently rewrites their root paths:
|
|
70
|
+
|
|
71
|
+
1. Collect candidate snippet paths:
|
|
72
|
+
- Read `{skills_output_folder}/.export-manifest.json` if it exists. For each skill in `exports` with a resolvable `active_version`, add `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/context-snippet.md`
|
|
73
|
+
- Also include the current skill's snippet if present (resolved via manifest / `active` symlink / flat path per `knowledge/version-paths.md`)
|
|
74
|
+
2. For each snippet that exists on disk, read the first line and parse the `root:` value. Strip the trailing `{skill-name}/` to extract the prefix (e.g. `skills/`, `.claude/skills/`)
|
|
75
|
+
3. Collect unique prefixes into `observed_prefixes`
|
|
76
|
+
4. Compare against `target_context_files[0].skill_root` (the first entry's IDE-mapped skill root — used as reference since step-03 §2.7 picks this same entry for snippet generation when no override is set)
|
|
77
|
+
|
|
78
|
+
**If `observed_prefixes` contains any value that does not match the reference `skill_root`:**
|
|
79
|
+
|
|
80
|
+
Emit a single warning (once, not per snippet) and present resolution options before proceeding:
|
|
81
|
+
|
|
82
|
+
"**Snippet root prefix mismatch detected.**
|
|
83
|
+
Existing snippets use: `{observed_prefixes}`
|
|
84
|
+
IDE-mapped skill_root: `{target_context_files[0].skill_root}`
|
|
85
|
+
|
|
86
|
+
This usually means you are in an authoring repo where skills live under a single shared directory. Options:
|
|
87
|
+
- **(a) Set override** — add `snippet_skill_root_override: {observed_prefix}` to `config.yaml`. Snippets keep their on-disk prefix; the managed section references the real location.
|
|
88
|
+
- **(b) Proceed with IDE mapping** — step-04 will rewrite every snippet's root path to the IDE's skill_root. Use this only if the IDE's skill directory actually contains the skill files.
|
|
89
|
+
- **(c) Cancel** — abort export and investigate.
|
|
90
|
+
|
|
91
|
+
If multiple distinct prefixes were observed, the snippets disagree with each other — investigate before choosing (a)."
|
|
92
|
+
|
|
93
|
+
In `{headless_mode}`, default to (b) and log the observed prefix(es) so the mismatch is visible in run logs. In interactive mode, wait for user choice before continuing to section 2.
|
|
94
|
+
|
|
95
|
+
**If all observed prefixes match the reference `skill_root` (or no existing snippets were found):** Proceed silently.
|
|
96
|
+
|
|
97
|
+
### 1c. Multi-skill Mode (when `len(skill_batch) > 1`)
|
|
98
|
+
|
|
99
|
+
When multiple skills are being exported in a single run (via `--all`, multi-selection at the discovery menu, or an explicit multi-argument invocation), the workflow does NOT loop the full step-01→step-07 sequence once per skill. Instead, it partitions work across steps to avoid repeated gates and redundant batch work:
|
|
100
|
+
|
|
101
|
+
| Step | Behavior in multi-skill mode |
|
|
102
|
+
|------|------------------------------|
|
|
103
|
+
| step-01 §2–5 | **Iterate per skill** — load, validate, read metadata, and check the test report for every skill in `skill_batch`. Collect per-skill results. |
|
|
104
|
+
| step-01 §6 | **Single gate** — present one consolidated summary table (one row per skill) and a single [C] gate for the whole batch. |
|
|
105
|
+
| step-02 | **Iterate per skill** — validate each skill's package structure and collect per-skill readiness. |
|
|
106
|
+
| step-03 | **Iterate per skill** — regenerate each skill's `context-snippet.md` independently (each skill has its own prior-gotchas carry-forward state). |
|
|
107
|
+
| step-04 | **Batch once** — §3b orphan detection, §4 skill-index rebuild, §5 managed-section assembly, and §6–9 diff + write all execute once for the entire batch. The exported skill set in §4b already enumerates every skill in the manifest — it does not need per-skill iteration. §9b adds/updates a manifest entry per skill in `skill_batch` (not just the last one), then writes the manifest once. |
|
|
108
|
+
| step-05 | **Iterate per skill** — compute token counts per skill, then present one aggregate report. |
|
|
109
|
+
| step-06 | **One batch summary + one result contract** — the files-written table lists every skill; the result contract JSON covers the whole run, and `outputs` enumerates every context-snippet + target context file touched. |
|
|
110
|
+
| step-07 | **Runs once** — health check is per-workflow-run, not per-skill. |
|
|
111
|
+
|
|
112
|
+
**Halt semantics in batch mode:** if any single skill fails validation in §2 (required-file or metadata-field failure), halt the entire batch before §5 — do not partially export. Report which skill failed and why.
|
|
113
|
+
|
|
114
|
+
**Single-skill mode (`len(skill_batch) == 1`)** preserves the legacy behavior: every section below operates on the one skill without iteration.
|
|
115
|
+
|
|
116
|
+
### 2. Load and Validate Skill Artifacts
|
|
117
|
+
|
|
118
|
+
Resolve the skill's versioned path before loading artifacts:
|
|
119
|
+
|
|
120
|
+
1. Read `{skills_output_folder}/.export-manifest.json` and look up `{skill-name}` in `exports` to get `active_version`
|
|
121
|
+
2. If found: resolve to `{skill_package}` = `{skills_output_folder}/{skill-name}/{active_version}/{skill-name}/`
|
|
122
|
+
3. If not in manifest: check for `active` symlink at `{skills_output_folder}/{skill-name}/active` — resolve to `{skill_group}/active/{skill-name}/`
|
|
123
|
+
4. If neither: fall back to flat path `{skills_output_folder}/{skill-name}/`. If SKILL.md exists at the flat path, auto-migrate per `knowledge/version-paths.md` migration rules
|
|
124
|
+
5. Store the resolved path as `{resolved_skill_package}` for all subsequent artifact loading
|
|
125
|
+
|
|
126
|
+
Load all files from `{resolved_skill_package}`:
|
|
127
|
+
|
|
128
|
+
**Required Files (hard halt if missing):**
|
|
129
|
+
- `SKILL.md` — The main skill document
|
|
130
|
+
- `metadata.json` — Machine-readable skill metadata
|
|
131
|
+
|
|
132
|
+
**Optional Files (note presence):**
|
|
133
|
+
- `references/` — Progressive disclosure directory
|
|
134
|
+
- `context-snippet.md` — Existing snippet (will be regenerated)
|
|
135
|
+
|
|
136
|
+
**Validation Checks:**
|
|
137
|
+
1. `SKILL.md` exists and is non-empty
|
|
138
|
+
2. `metadata.json` exists and is valid JSON
|
|
139
|
+
3. `metadata.json` contains required fields: `name`, `version`, `skill_type`, `source_authority`, `exports`, `generation_date`, `confidence_tier`
|
|
140
|
+
4. `metadata.json.exports` is a non-empty array (warn if empty — graceful handling)
|
|
141
|
+
|
|
142
|
+
**If any required validation fails:**
|
|
143
|
+
"**Export cannot proceed.** Missing or invalid: {list failures}
|
|
144
|
+
Run create-skill to generate a complete skill first."
|
|
145
|
+
|
|
146
|
+
### 3. Read Skill Metadata
|
|
147
|
+
|
|
148
|
+
Extract from `metadata.json`:
|
|
149
|
+
- `name` — Skill display name
|
|
150
|
+
- `skill_type` — `single` or `stack`
|
|
151
|
+
- `source_authority` — `official`, `internal`, or `community`
|
|
152
|
+
- `exports` — Array of exported functions/types
|
|
153
|
+
- `generation_date` — When the skill was last generated
|
|
154
|
+
- `confidence_tier` — Quick/Forge/Forge+/Deep
|
|
155
|
+
|
|
156
|
+
**For stack skills, also extract:**
|
|
157
|
+
- `components` — Array of dependencies with versions
|
|
158
|
+
- `integrations` — Array of co-import patterns
|
|
159
|
+
|
|
160
|
+
### 4. Check Forge Configuration
|
|
161
|
+
|
|
162
|
+
Load `{sidecar_path}/preferences.yaml` (if exists):
|
|
163
|
+
- Check `passive_context` setting
|
|
164
|
+
- If `passive_context: false` — note that steps 03-04 (snippet + context update) will be skipped
|
|
165
|
+
|
|
166
|
+
### 4b. Check Test Report (Quality Gate)
|
|
167
|
+
|
|
168
|
+
Search for a test report at `{forge_data_folder}/{skill_name}/{active_version}/test-report-{skill_name}.md` (i.e., `{forge_version}/test-report-{skill_name}.md`). If not found at the versioned path, fall back to `{forge_data_folder}/{skill_name}/test-report-{skill_name}.md`:
|
|
169
|
+
|
|
170
|
+
**If test report found:**
|
|
171
|
+
- Read frontmatter `testResult` and `score`
|
|
172
|
+
- If `testResult: fail`: warn: "**Warning:** This skill failed its last test (score: {score}%). Consider running `@Ferris TS` and addressing gaps before export."
|
|
173
|
+
- If `testResult: pass`: note: "Last test: **PASS** ({score}%)"
|
|
174
|
+
|
|
175
|
+
**If no test report found:**
|
|
176
|
+
- Warn: "**Note:** No test report found for this skill. Consider running `@Ferris TS` before export to verify completeness."
|
|
177
|
+
|
|
178
|
+
Continue to step 5 regardless — this is advisory, not blocking.
|
|
179
|
+
|
|
180
|
+
### 5. Present Skill Summary
|
|
181
|
+
|
|
182
|
+
**Single-skill mode:**
|
|
183
|
+
|
|
184
|
+
"**Skill loaded and validated.**
|
|
185
|
+
|
|
186
|
+
| Field | Value |
|
|
187
|
+
|-------|-------|
|
|
188
|
+
| **Name** | {name} |
|
|
189
|
+
| **Type** | {skill_type} |
|
|
190
|
+
| **Authority** | {source_authority} |
|
|
191
|
+
| **Confidence** | {confidence_tier} |
|
|
192
|
+
| **Exports** | {count} functions/types |
|
|
193
|
+
| **Generated** | {generation_date} |
|
|
194
|
+
| **References** | {count files or 'none'} |
|
|
195
|
+
|
|
196
|
+
**Export Configuration:**
|
|
197
|
+
| Setting | Value |
|
|
198
|
+
|---------|-------|
|
|
199
|
+
| **Context File(s)** | {context-file-list} (skill root: {skill-root-list}) |
|
|
200
|
+
| **Explicit --context-file** | {yes (user-specified) / no (from config.yaml)} |
|
|
201
|
+
| **Dry Run** | {yes/no} |
|
|
202
|
+
| **Passive Context** | {enabled/disabled} |
|
|
203
|
+
|
|
204
|
+
**Top Exports:**
|
|
205
|
+
{list top 5 exports from metadata}
|
|
206
|
+
|
|
207
|
+
**Is this the correct skill to export?**"
|
|
208
|
+
|
|
209
|
+
**Multi-skill mode** (`len(skill_batch) > 1`):
|
|
210
|
+
|
|
211
|
+
"**{N} skills loaded and validated.**
|
|
212
|
+
|
|
213
|
+
| # | Name | Type | Authority | Tier | Exports | Test |
|
|
214
|
+
|---|------|------|-----------|------|---------|------|
|
|
215
|
+
| 1 | {name-1} | {type} | {authority} | {tier} | {count} | {pass/fail/none} |
|
|
216
|
+
| 2 | {name-2} | ... | ... | ... | ... | ... |
|
|
217
|
+
| N | {name-N} | ... | ... | ... | ... | ... |
|
|
218
|
+
|
|
219
|
+
**Export Configuration (applies to all):**
|
|
220
|
+
| Setting | Value |
|
|
221
|
+
|---------|-------|
|
|
222
|
+
| **Context File(s)** | {context-file-list} (skill root: {skill-root-list}) |
|
|
223
|
+
| **Explicit --context-file** | {yes / no (from config.yaml)} |
|
|
224
|
+
| **Dry Run** | {yes/no} |
|
|
225
|
+
| **Passive Context** | {enabled/disabled} |
|
|
226
|
+
|
|
227
|
+
**Are these the correct skills to export?**"
|
|
228
|
+
|
|
229
|
+
### 6. Present MENU OPTIONS
|
|
230
|
+
|
|
231
|
+
Display: "**Select:** [C] Continue to packaging" (multi-skill mode: the single [C] gate covers the whole batch)
|
|
232
|
+
|
|
233
|
+
#### Menu Handling Logic:
|
|
234
|
+
|
|
235
|
+
- IF C: Proceed with loaded skill data, then load, read entire file, then execute {nextStepFile}
|
|
236
|
+
- IF Any other: help user respond, then [Redisplay Menu Options](#6-present-menu-options)
|
|
237
|
+
|
|
238
|
+
#### EXECUTION RULES:
|
|
239
|
+
|
|
240
|
+
- ALWAYS halt and wait for user input after presenting menu
|
|
241
|
+
- **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-continue past skill confirmation"
|
|
242
|
+
- ONLY proceed to next step when user selects 'C'
|
|
243
|
+
|
|
244
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
245
|
+
|
|
246
|
+
ONLY WHEN the user confirms the correct skill is loaded by selecting 'C' will you load and read fully `{nextStepFile}` to execute packaging.
|
|
247
|
+
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-02-package'
|
|
3
|
-
description: 'Build agentskills.io-compliant package structure from skill artifacts'
|
|
4
|
-
|
|
5
2
|
nextStepFile: './step-03-generate-snippet.md'
|
|
6
3
|
---
|
|
7
4
|
|
|
@@ -11,40 +8,11 @@ nextStepFile: './step-03-generate-snippet.md'
|
|
|
11
8
|
|
|
12
9
|
To assemble and validate an agentskills.io-compliant package structure from the loaded skill artifacts, ensuring all required components are present and properly formatted for distribution.
|
|
13
10
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
### Universal Rules:
|
|
17
|
-
|
|
18
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
19
|
-
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
20
|
-
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
21
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
22
|
-
|
|
23
|
-
### Role Reinforcement:
|
|
24
|
-
|
|
25
|
-
- ✅ You are a delivery and packaging specialist in Ferris Delivery mode
|
|
26
|
-
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
27
|
-
- ✅ Precise validation — ensure package meets ecosystem standards
|
|
28
|
-
|
|
29
|
-
### Step-Specific Rules:
|
|
30
|
-
|
|
31
|
-
- 🎯 Focus only on package structure assembly and validation
|
|
32
|
-
- 🚫 FORBIDDEN to modify SKILL.md content — package what exists
|
|
33
|
-
- 💬 This is a deterministic packaging step — auto-proceed when complete
|
|
34
|
-
|
|
35
|
-
## EXECUTION PROTOCOLS:
|
|
36
|
-
|
|
37
|
-
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
38
|
-
- 💾 Hold validated package structure in context for subsequent steps
|
|
39
|
-
- 📖 Validate all required agentskills.io fields
|
|
40
|
-
- 🚫 Warn on non-critical issues but do not halt
|
|
11
|
+
## Rules
|
|
41
12
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
- Focus: Package structure validation and assembly
|
|
46
|
-
- Limits: Do not modify source files — validate and assemble only
|
|
47
|
-
- Dependencies: Step-01 must have loaded and validated the skill
|
|
13
|
+
- Focus only on package structure assembly and validation — do not modify SKILL.md content
|
|
14
|
+
- Auto-proceed when complete
|
|
15
|
+
- **Multi-skill mode:** when step-01 loaded more than one skill (`len(skill_batch) > 1`), iterate sections 1–4 below per skill using each skill's `{resolved_skill_package}`. Collect per-skill status; report the aggregate in §4 as one row per skill. Halt the batch if any skill is NOT READY. See step-01 §1c.
|
|
48
16
|
|
|
49
17
|
## MANDATORY SEQUENCE
|
|
50
18
|
|
|
@@ -52,7 +20,7 @@ To assemble and validate an agentskills.io-compliant package structure from the
|
|
|
52
20
|
|
|
53
21
|
### 1. Validate Package Structure
|
|
54
22
|
|
|
55
|
-
Verify the skill package at `{resolved_skill_package}` (resolved in step-01 via manifest or `active` symlink — see
|
|
23
|
+
Verify the skill package at `{resolved_skill_package}` (resolved in step-01 via manifest or `active` symlink — see `knowledge/version-paths.md`) contains the expected agentskills.io package layout:
|
|
56
24
|
|
|
57
25
|
```
|
|
58
26
|
{skill_package} = {skills_output_folder}/{skill-name}/{version}/{skill-name}/
|
|
@@ -134,24 +102,3 @@ Display: "**Proceeding to snippet generation...**"
|
|
|
134
102
|
|
|
135
103
|
ONLY WHEN package validation is complete will you load and read fully `{nextStepFile}` to execute snippet generation.
|
|
136
104
|
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
140
|
-
|
|
141
|
-
### ✅ SUCCESS:
|
|
142
|
-
|
|
143
|
-
- All required package components validated
|
|
144
|
-
- All required metadata.json fields checked
|
|
145
|
-
- Warnings noted for missing recommended fields
|
|
146
|
-
- Package status clearly reported
|
|
147
|
-
- Auto-proceed to step-03
|
|
148
|
-
|
|
149
|
-
### ❌ SYSTEM FAILURE:
|
|
150
|
-
|
|
151
|
-
- Not checking all required files
|
|
152
|
-
- Not validating metadata.json fields
|
|
153
|
-
- Halting on non-critical warnings (should warn and continue)
|
|
154
|
-
- Modifying any source files
|
|
155
|
-
- Not auto-proceeding after validation
|
|
156
|
-
|
|
157
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|