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.
Files changed (115) hide show
  1. package/README.md +73 -159
  2. package/docs/agents.md +2 -2
  3. package/docs/architecture.md +155 -25
  4. package/docs/concepts.md +96 -0
  5. package/docs/examples.md +52 -2
  6. package/docs/getting-started.md +30 -14
  7. package/docs/index.md +16 -41
  8. package/docs/workflows.md +3 -3
  9. package/package.json +6 -4
  10. package/src/forger/forge-tier.yaml +1 -1
  11. package/src/forger/preferences.yaml +8 -1
  12. package/src/knowledge/doc-fetcher.md +55 -0
  13. package/src/knowledge/overview.md +17 -16
  14. package/src/knowledge/progressive-capability.md +9 -1
  15. package/src/knowledge/provenance-tracking.md +31 -23
  16. package/src/knowledge/qmd-registry.md +132 -0
  17. package/src/knowledge/skf-knowledge-index.csv +2 -0
  18. package/src/module.yaml +2 -2
  19. package/src/workflows/analyze-source/data/skill-brief-schema.md +24 -4
  20. package/src/workflows/analyze-source/steps-c/step-01-init.md +19 -9
  21. package/src/workflows/analyze-source/steps-c/step-01b-continue.md +2 -2
  22. package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +10 -2
  23. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +17 -2
  24. package/src/workflows/analyze-source/steps-c/step-05-recommend.md +2 -1
  25. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +3 -3
  26. package/src/workflows/analyze-source/templates/analysis-report-template.md +1 -1
  27. package/src/workflows/analyze-source/validation-report.md +1 -1
  28. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +1 -1
  29. package/src/workflows/analyze-source/workflow.md +1 -1
  30. package/src/workflows/audit-skill/steps-c/step-01-init.md +8 -5
  31. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +12 -2
  32. package/src/workflows/audit-skill/validation-report.md +2 -2
  33. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +1 -1
  34. package/src/workflows/brief-skill/data/scope-templates.md +60 -0
  35. package/src/workflows/brief-skill/data/skill-brief-schema.md +38 -3
  36. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +20 -4
  37. package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +20 -64
  38. package/src/workflows/brief-skill/steps-c/step-04-confirm-brief.md +1 -1
  39. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +60 -5
  40. package/src/workflows/brief-skill/workflow.md +2 -1
  41. package/src/workflows/create-skill/data/compile-assembly-rules.md +110 -0
  42. package/src/workflows/create-skill/data/extraction-patterns.md +216 -3
  43. package/src/workflows/create-skill/data/skill-sections.md +81 -27
  44. package/src/workflows/create-skill/data/source-resolution-protocols.md +138 -0
  45. package/src/workflows/create-skill/data/tier-degradation-rules.md +46 -0
  46. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +7 -4
  47. package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +10 -7
  48. package/src/workflows/create-skill/steps-c/step-03-extract.md +51 -10
  49. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +238 -0
  50. package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +220 -0
  51. package/src/workflows/create-skill/steps-c/step-04-enrich.md +40 -10
  52. package/src/workflows/create-skill/steps-c/step-05-compile.md +49 -82
  53. package/src/workflows/create-skill/steps-c/step-06-validate.md +152 -63
  54. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +53 -3
  55. package/src/workflows/create-skill/steps-c/step-08-report.md +1 -1
  56. package/src/workflows/create-skill/workflow-plan-create-skill.md +42 -10
  57. package/src/workflows/create-skill/workflow.md +3 -2
  58. package/src/workflows/create-stack-skill/data/stack-skill-template.md +20 -7
  59. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +2 -2
  60. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +14 -0
  61. package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +28 -7
  62. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +10 -7
  63. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +66 -68
  64. package/src/workflows/create-stack-skill/validation-report.md +1 -1
  65. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +4 -4
  66. package/src/workflows/export-skill/data/managed-section-format.md +1 -0
  67. package/src/workflows/export-skill/data/snippet-format.md +33 -14
  68. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +16 -2
  69. package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +29 -22
  70. package/src/workflows/export-skill/steps-c/step-04-update-context.md +1 -1
  71. package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
  72. package/src/workflows/export-skill/validation-report.md +1 -1
  73. package/src/workflows/export-skill/workflow-plan-export-skill.md +8 -8
  74. package/src/workflows/export-skill/workflow.md +1 -1
  75. package/src/workflows/quick-skill/data/skill-template.md +27 -7
  76. package/src/workflows/quick-skill/steps-c/step-04-compile.md +44 -13
  77. package/src/workflows/quick-skill/steps-c/step-05-validate.md +79 -16
  78. package/src/workflows/quick-skill/validation-report.md +4 -4
  79. package/src/workflows/quick-skill/workflow-plan-quick-skill.md +4 -4
  80. package/src/workflows/quick-skill/workflow.md +2 -0
  81. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +12 -3
  82. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +10 -2
  83. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +111 -40
  84. package/src/workflows/setup-forge/steps-c/step-04-report.md +13 -0
  85. package/src/workflows/setup-forge/workflow.md +1 -0
  86. package/src/workflows/test-skill/data/scoring-rules.md +14 -6
  87. package/src/workflows/test-skill/data/source-access-protocol.md +45 -0
  88. package/src/workflows/test-skill/steps-c/step-01-init.md +38 -13
  89. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -3
  90. package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +25 -5
  91. package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +22 -47
  92. package/src/workflows/test-skill/steps-c/step-04b-external-validators.md +219 -0
  93. package/src/workflows/test-skill/steps-c/step-05-score.md +25 -27
  94. package/src/workflows/test-skill/steps-c/step-06-report.md +9 -4
  95. package/src/workflows/test-skill/templates/test-report-template.md +2 -1
  96. package/src/workflows/test-skill/validation-report.md +1 -1
  97. package/src/workflows/test-skill/workflow-plan-test-skill.md +7 -3
  98. package/src/workflows/test-skill/workflow.md +1 -1
  99. package/src/workflows/update-skill/data/remote-source-resolution.md +43 -0
  100. package/src/workflows/update-skill/data/tier-degradation-rules.md +46 -0
  101. package/src/workflows/update-skill/steps-c/step-01-init.md +13 -7
  102. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +26 -0
  103. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +38 -9
  104. package/src/workflows/update-skill/steps-c/step-04-merge.md +3 -3
  105. package/src/workflows/update-skill/steps-c/step-05-validate.md +63 -67
  106. package/src/workflows/update-skill/steps-c/step-06-write.md +37 -14
  107. package/src/workflows/update-skill/steps-c/step-07-report.md +1 -1
  108. package/src/workflows/update-skill/validation-report.md +4 -4
  109. package/src/workflows/update-skill/workflow-plan-update-skill.md +4 -4
  110. package/src/workflows/update-skill/workflow.md +1 -1
  111. package/tools/cli/commands/status.js +4 -4
  112. package/tools/cli/commands/uninstall.js +1 -1
  113. package/tools/cli/commands/update.js +2 -2
  114. package/tools/cli/lib/ui.js +60 -16
  115. package/tools/cli/lib/version-check.js +2 -2
@@ -175,7 +175,7 @@ No bmb-specific path assumptions found. Workflow correctly uses SKF module varia
175
175
  **Init (step-01):**
176
176
  - ✅ Creates output from template (`{templateFile}`)
177
177
  - ✅ C-only menu (no A/P — appropriate for init)
178
- - ✅ Input discovery: loads SKILL.md, metadata.json, provenance-map.json, forge-tier.yaml
178
+ - ✅ Input discovery: loads SKILL.md, metadata.json, provenance-map.json, forge-tier.yaml, and checks `preferences.yaml` for `tier_override`
179
179
  - ✅ User gate with baseline summary before analysis
180
180
 
181
181
  **Auto-Proceed Steps (02-05):**
@@ -490,7 +490,7 @@ The audit-skill workflow is a well-designed, cohesive 6-step pipeline that achie
490
490
  | ast_bridge | Forge/Deep tier | ✅ Steps 02-03 reference AST extraction | ✅ |
491
491
  | gh_bridge | All tiers | ✅ Steps 01-02 reference file reading | ✅ |
492
492
  | qmd_bridge | Deep tier only | ✅ Step 04 references QMD queries | ✅ |
493
- | skills_ref | Included | ✅ Step 01 references skill format validation | ✅ |
493
+ | skill-check | Included | ✅ Step 01 references skill format validation | ✅ |
494
494
 
495
495
  ### Implementation Gaps
496
496
 
@@ -189,7 +189,7 @@ Drift report with severity levels (added/removed/changed exports, breaking chang
189
189
  - **ast_bridge** (ast-grep): Required at Forge/Deep tier — Steps 02-03 structural extraction and comparison
190
190
  - **gh_bridge** (gh CLI): Required at all tiers — Steps 01-02 source file reading
191
191
  - **qmd_bridge** (QMD): Required at Deep tier only — Step 04 semantic knowledge context
192
- - **skills_ref**: Included — Step 01 skill format validation and ecosystem cross-reference
192
+ - **skill-check**: Included — Step 01 skill format validation: `npx skill-check check --fix --format json` for validation + auto-fix + quality scoring, security scan for prompt injection detection
193
193
 
194
194
  **Installation Requirements:**
195
195
  - None — all tools pre-detected by setup-forge workflow
@@ -0,0 +1,60 @@
1
+ # Scope Templates Reference
2
+
3
+ ## Scope Type Options
4
+
5
+ Present these options to the user for selection:
6
+
7
+ **[F] Full Library** — Include everything. Best for smaller, focused libraries.
8
+ - All public exports, all modules
9
+ - Exclude only tests, build artifacts, and internal utilities
10
+
11
+ **[M] Specific Modules** — Select which modules to include. Best for large libraries where only some parts are relevant.
12
+ - You choose which modules/directories
13
+ - Fine-grained control over what's in and out
14
+
15
+ **[P] Public API Only** — Include only the public-facing API surface. Best for libraries with a clear public/private boundary.
16
+ - Entry points and exported interfaces only
17
+ - Internal implementation excluded
18
+
19
+ ## Boundary Definitions by Scope Type
20
+
21
+ ### Full Library Boundaries
22
+
23
+ Default inclusions:
24
+ - All source files under {main source directory}
25
+ - All public modules: {list from analysis}
26
+
27
+ Default exclusions:
28
+ - Test files (`**/*.test.*`, `**/*.spec.*`, `**/test/`, `**/tests/`)
29
+ - Build artifacts (`**/dist/`, `**/build/`, `**/target/`)
30
+ - Configuration files
31
+ - Documentation source files
32
+
33
+ Prompt: "Any additional exclusions you'd like to add? Or adjustments to these defaults?"
34
+
35
+ ### Specific Modules Boundaries
36
+
37
+ **Phase 1 — Module selection:**
38
+
39
+ Present numbered list of modules from step 02 with brief descriptions.
40
+ Prompt: "Which modules would you like to include? (Enter numbers, comma-separated):"
41
+
42
+ **Phase 2 — Granularity within selected modules:**
43
+
44
+ For selected modules, ask:
45
+ - **A)** Everything in those modules (all files)
46
+ - **B)** Only public exports from those modules
47
+
48
+ Prompt: "Any files or patterns to explicitly exclude within these modules?"
49
+
50
+ ### Public API Only Boundaries
51
+
52
+ **Phase 1 — Export selection:**
53
+
54
+ Present numbered list of exports/entry points from step 02.
55
+ Prompt: "Which of these would you like to include? (Enter numbers, or 'all'):"
56
+
57
+ **Phase 2 — Confirm exclusions:**
58
+
59
+ Exclusions will include all internal implementation files, tests, and utilities.
60
+ Prompt: "Any additional items you'd like to include or exclude?"
@@ -5,7 +5,7 @@
5
5
  | Field | Type | Description | Validation |
6
6
  |-------|------|-------------|------------|
7
7
  | name | string | Kebab-case skill name | Must match `[a-z0-9-]+` |
8
- | version | string | Semantic version | Must match `X.Y.Z` pattern, default "1.0.0" |
8
+ | version | string | Semantic version | Must match `X.Y.Z` pattern. Auto-detect from source (see Version Detection below), fall back to "1.0.0" |
9
9
  | source_repo | string | GitHub URL or local path | Must be accessible |
10
10
  | language | string | Primary programming language | Must be detected or user-specified |
11
11
  | scope | object | Inclusion/exclusion boundaries | Must have type + at least one pattern |
@@ -14,6 +14,34 @@
14
14
  | created | string | Creation date | ISO date format |
15
15
  | created_by | string | User who created the brief | From config user_name |
16
16
 
17
+ ## Optional Fields
18
+
19
+ | Field | Type | Description | Validation |
20
+ |-------|------|-------------|------------|
21
+ | source_type | string | Source mode: `source` or `docs-only` | Default `source`. When `docs-only`: `source_repo` optional, `doc_urls` required |
22
+ | doc_urls | array | Documentation URLs for T3 content | Each entry: `{url, label}`. Required when `source_type: "docs-only"` |
23
+
24
+ When `source_type: "docs-only"`:
25
+ - `source_repo` becomes optional (set to doc site URL for reference)
26
+ - `doc_urls` must have at least one entry
27
+ - `source_authority` is forced to `community` (T3 external documentation cannot be `official`)
28
+ - All extracted content gets `[EXT:{url}]` citations
29
+
30
+ ## Version Detection
31
+
32
+ During brief creation, attempt to auto-detect the source version before defaulting to `"1.0.0"`. Check the first matching file in the source:
33
+
34
+ - **Python:** `pyproject.toml` `[project] version` (static) → if `dynamic = ["version"]`, check `__init__.py` for `__version__` → `_version.py` if exists → `setup.py` `version=` → `git describe --tags --abbrev=0`
35
+ - **JavaScript/TypeScript:** `package.json` (`"version"`)
36
+ - **Rust:** `Cargo.toml` `[package] version` (static) → if `version = { workspace = true }`, resolve from workspace root `Cargo.toml` → `git describe --tags --abbrev=0`
37
+ - **Go:** version tag from `go.mod` or `git describe --tags --abbrev=0`
38
+
39
+ If the source is a remote GitHub repo, use `gh api repos/{owner}/{repo}/contents/{file}` to read the version file. If the source is local, read the file directly.
40
+
41
+ If detection succeeds, use the detected version. If it fails or returns a non-semver value, fall back to `"1.0.0"`.
42
+
43
+ The create-skill workflow (step-03-extract) also performs version reconciliation at extraction time — if the source version has changed since the brief was created, the extraction step warns and uses the source version.
44
+
17
45
  ## Scope Object Structure
18
46
 
19
47
  ```yaml
@@ -32,7 +60,8 @@ scope:
32
60
  ```yaml
33
61
  ---
34
62
  name: "{skill-name}"
35
- version: "1.0.0"
63
+ version: "{detected-version or 1.0.0}" # Auto-detect from source, fall back to 1.0.0
64
+ source_type: "source" # "source" (default) or "docs-only"
36
65
  source_repo: "{github-url-or-local-path}"
37
66
  language: "{detected-language}"
38
67
  description: "{brief-description}"
@@ -40,12 +69,16 @@ forge_tier: "{quick|forge|deep}"
40
69
  created: "{date}"
41
70
  created_by: "{user_name}"
42
71
  scope:
43
- type: "{full-library|specific-modules|public-api}"
72
+ type: "{full-library|specific-modules|public-api|docs-only}"
44
73
  include:
45
74
  - "{pattern}"
46
75
  exclude:
47
76
  - "{pattern}"
48
77
  notes: "{optional-scope-notes}"
78
+ # Optional: documentation URLs for T3 content (required when source_type: "docs-only")
79
+ # doc_urls:
80
+ # - url: "https://docs.example.com/api"
81
+ # label: "API Reference"
49
82
  ---
50
83
  ```
51
84
 
@@ -80,3 +113,5 @@ Created by: {created_by}
80
113
  4. `scope.type` must be one of the three defined types
81
114
  5. `scope.include` must have at least one pattern
82
115
  6. `forge_tier` must match the tier from forge-tier.yaml (or default to quick)
116
+ 7. When `source_type: "docs-only"`: `doc_urls` must have >= 1 entry, `source_repo` becomes optional
117
+ 8. Each `doc_urls` entry must have a valid `url` field
@@ -64,6 +64,8 @@ Attempt to load `{forgeTierFile}`:
64
64
  - Read the tier level (quick, forge, or deep)
65
65
  - Note available tools for scoping guidance later
66
66
 
67
+ **Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, or Deep), use it instead of the detected tier.
68
+
67
69
  **If not found:**
68
70
  - Display: "**Note:** No forge tier configuration found. Defaulting to Quick tier. Run **setup-forge** first for full capabilities."
69
71
  - Default to: `forge_tier: quick`
@@ -86,15 +88,29 @@ Let's get started."
86
88
 
87
89
  ### 3. Gather Target Repository
88
90
 
89
- "**What repository do you want to create a skill for?**
91
+ "**What repository or documentation do you want to create a skill for?**
90
92
 
91
- Provide either:
93
+ Provide one of:
92
94
  - A **GitHub URL** (e.g., `https://github.com/org/repo`)
93
95
  - A **local path** (e.g., `/path/to/project`)
96
+ - **Documentation URLs** for a docs-only skill (e.g., `https://docs.cognee.ai/`) — use this when no source code is available (SaaS, closed-source)
94
97
 
95
98
  **Target:**"
96
99
 
97
- Wait for user response. Confirm the target.
100
+ Wait for user response.
101
+
102
+ **If user provides documentation URLs (not a repo):**
103
+ - Set `source_type: "docs-only"` in the brief data
104
+ - Collect one or more doc URLs with optional labels
105
+ - Note: `source_authority` will be forced to `community` (T3 external documentation)
106
+ - Note: `source_repo` becomes optional (can be set to the main doc site URL for reference)
107
+
108
+ **If user provides a GitHub URL or local path:**
109
+ - Set `source_type: "source"` (default)
110
+ - Optionally ask: "Are there any documentation URLs you'd like to include for supplemental context? (These will be fetched as T3 external references.)"
111
+ - If yes: collect doc URLs into `doc_urls`
112
+
113
+ Confirm the target.
98
114
 
99
115
  ### 4. Gather User Intent
100
116
 
@@ -166,7 +182,7 @@ ONLY WHEN C is selected and target repository is confirmed will you load and rea
166
182
 
167
183
  ### ✅ SUCCESS:
168
184
 
169
- - Forge tier discovered (or defaulted to Quick with warning)
185
+ - Forge tier discovered (or defaulted to Quick with warning), override applied if set in preferences.yaml
170
186
  - Target repository confirmed (GitHub URL or local path)
171
187
  - User intent captured with enough context for scoping
172
188
  - Skill name derived and confirmed
@@ -3,6 +3,7 @@ name: 'step-03-scope-definition'
3
3
  description: 'Collaboratively define skill scope boundaries using analysis findings and scope templates'
4
4
 
5
5
  nextStepFile: './step-04-confirm-brief.md'
6
+ scopeTemplatesFile: '../data/scope-templates.md'
6
7
  advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
7
8
  partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
8
9
  ---
@@ -70,83 +71,38 @@ Based on the analysis, here's what we're working with:
70
71
  {If scope hints from step 01:}
71
72
  - **Your initial scope hints:** {hints}"
72
73
 
73
- ### 2. Offer Scope Templates
74
+ ### 2. Handle Docs-Only Mode (if applicable)
74
75
 
75
- "**How broadly should this skill cover the library?**
76
+ **If `source_type: "docs-only"`:**
76
77
 
77
- **[F] Full Library** Include everything. Best for smaller, focused libraries.
78
- - All public exports, all modules
79
- - Exclude only tests, build artifacts, and internal utilities
78
+ "**Docs-only modescope is defined by documentation pages.**
80
79
 
81
- **[M] Specific Modules** Select which modules to include. Best for large libraries where only some parts are relevant.
82
- - You choose which modules/directories
83
- - Fine-grained control over what's in and out
80
+ You've provided these documentation URLs:
81
+ {numbered list of doc_urls with labels}
84
82
 
85
- **[P] Public API Only** Include only the public-facing API surface. Best for libraries with a clear public/private boundary.
86
- - Entry points and exported interfaces only
87
- - Internal implementation excluded
83
+ Which pages should be included in the skill? (Enter numbers, or 'all')
84
+ Any additional documentation URLs to add?"
88
85
 
89
- Which scope type fits your needs?"
86
+ Wait for confirmation. Then skip to section 5 (Summarize Scope Decisions) with:
87
+ - `scope.type: "docs-only"`
88
+ - `scope.include`: confirmed doc URLs
89
+ - `scope.notes: "Generated from external documentation. All content is T3 confidence."`
90
90
 
91
- Wait for user selection.
92
-
93
- ### 3. Define Boundaries Based on Selection
94
-
95
- **If [F] Full Library:**
96
-
97
- "**Full Library scope selected.**
98
-
99
- Default inclusions:
100
- - All source files under {main source directory}
101
- - All public modules: {list from analysis}
102
-
103
- Default exclusions:
104
- - Test files (`**/*.test.*`, `**/*.spec.*`, `**/test/`, `**/tests/`)
105
- - Build artifacts (`**/dist/`, `**/build/`, `**/target/`)
106
- - Configuration files
107
- - Documentation source files
108
-
109
- Any additional exclusions you'd like to add? Or adjustments to these defaults?"
110
-
111
- **If [M] Specific Modules:**
112
-
113
- "**Specific Modules scope selected.**
114
-
115
- Here are the modules found in the analysis:
91
+ **If `source_type: "source"` (default):** Continue to scope templates below.
116
92
 
117
- {numbered list of modules from step 02 with brief descriptions}
93
+ ### 2b. Offer Scope Templates
118
94
 
119
- Which modules would you like to include? (Enter numbers, comma-separated):"
95
+ Load `{scopeTemplatesFile}` for the scope type options ([F], [M], [P]) and their descriptions.
120
96
 
121
- Wait for selection. Then:
97
+ Present: "**How broadly should this skill cover the library?**" followed by the three scope type options from the loaded reference.
122
98
 
123
- "**Selected modules:**
124
- - {list selected modules}
99
+ Ask: "Which scope type fits your needs?"
125
100
 
126
- For these modules, should I include:
127
- - **A)** Everything in those modules (all files)
128
- - **B)** Only public exports from those modules
129
-
130
- Any files or patterns to explicitly exclude within these modules?"
131
-
132
- **If [P] Public API Only:**
133
-
134
- "**Public API scope selected.**
135
-
136
- From the analysis, these appear to be the public entry points:
137
-
138
- {numbered list of exports/entry points from step 02}
139
-
140
- Which of these would you like to include? (Enter numbers, or 'all'):"
141
-
142
- Wait for selection. Then:
143
-
144
- "**Selected exports:**
145
- - {list selected exports}
101
+ Wait for user selection.
146
102
 
147
- Exclusions will include all internal implementation files, tests, and utilities.
103
+ ### 3. Define Boundaries Based on Selection
148
104
 
149
- Any additional items you'd like to include or exclude?"
105
+ Using the boundary definitions from `{scopeTemplatesFile}`, present the appropriate flow for the user's selected scope type ([F], [M], or [P]). Follow each type's prompts and wait for user input at each phase before proceeding.
150
106
 
151
107
  ### 4. Handle Language Override
152
108
 
@@ -67,7 +67,7 @@ Load `{briefSchemaFile}` to reference required fields and the human-readable pre
67
67
  Compile all gathered data from steps 01-03 into the complete brief:
68
68
 
69
69
  - **name:** {skill name from step 01}
70
- - **version:** "1.0.0" (default)
70
+ - **version:** {auto-detected from source, or "1.0.0" if not found — see schema for detection rules}
71
71
  - **source_repo:** {target repo from step 01}
72
72
  - **language:** {detected/confirmed language from steps 02-03}
73
73
  - **description:** {derived from user intent in step 01}
@@ -72,8 +72,9 @@ Generate the YAML file using the approved field values and the schema template:
72
72
  ```yaml
73
73
  ---
74
74
  name: "{approved skill name}"
75
- version: "1.0.0"
76
- source_repo: "{approved source repo}"
75
+ version: "{detected source version or 1.0.0}"
76
+ source_type: "{source or docs-only}"
77
+ source_repo: "{approved source repo or doc site URL}"
77
78
  language: "{approved language}"
78
79
  description: "{approved description}"
79
80
  forge_tier: "{approved forge tier}"
@@ -86,16 +87,67 @@ scope:
86
87
  exclude:
87
88
  - "{approved exclude patterns}"
88
89
  notes: "{approved scope notes or empty string}"
90
+ # Include doc_urls when source_type is "docs-only" or when supplemental doc URLs were provided
91
+ # doc_urls:
92
+ # - url: "{documentation URL}"
93
+ # label: "{page label}"
89
94
  ---
90
95
  ```
91
96
 
97
+ **If `source_type: "docs-only"`:** Include `doc_urls` array (required). `source_repo` may be set to the doc site URL for reference or omitted. `source_authority` must be `community`.
98
+
99
+ **If `doc_urls` were collected during scope definition (supplemental mode):** Include the `doc_urls` array even when `source_type: "source"`.
100
+
92
101
  ### 4. Write the File
93
102
 
94
103
  Write the generated YAML to `{forge_data_folder}/{skill-name}/skill-brief.yaml`.
95
104
 
96
105
  If write fails: **HALT** — "**Error:** Failed to write skill-brief.yaml. Please check that the directory is writable and try again."
97
106
 
98
- ### 5. Display Success Summary
107
+ ### 5. QMD Collection Registration (Deep Tier Only)
108
+
109
+ **IF forge tier is Deep AND QMD tool is available:**
110
+
111
+ Index the skill brief into a QMD collection so that portfolio-level searches can find existing briefs and avoid duplicate skill creation across large monorepos.
112
+
113
+ **Collection creation:**
114
+
115
+ Create a QMD collection targeting only the brief file:
116
+ ```bash
117
+ qmd collection add {forge_data_folder}/{skill-name} --name {skill-name}-brief --mask "skill-brief.yaml"
118
+ qmd embed
119
+ ```
120
+
121
+ If collection already exists (re-briefing): remove and recreate for atomic replace:
122
+ ```bash
123
+ qmd collection remove {skill-name}-brief
124
+ qmd collection add {forge_data_folder}/{skill-name} --name {skill-name}-brief --mask "skill-brief.yaml"
125
+ qmd embed
126
+ ```
127
+
128
+ **Registry update:**
129
+
130
+ Read `{sidecar_path}/forge-tier.yaml` and update the `qmd_collections` array.
131
+
132
+ If an entry with `name: "{skill-name}-brief"` already exists, replace it. Otherwise, append:
133
+
134
+ ```yaml
135
+ - name: "{skill-name}-brief"
136
+ type: "brief"
137
+ source_workflow: "brief-skill"
138
+ skill_name: "{skill-name}"
139
+ created_at: "{current ISO date}"
140
+ ```
141
+
142
+ Write the updated forge-tier.yaml.
143
+
144
+ **Error handling:**
145
+ - If QMD collection creation fails: log the error. Do NOT fail the workflow — the brief file was already written successfully.
146
+ - If forge-tier.yaml update fails: log the error, continue.
147
+
148
+ **IF forge tier is NOT Deep:** Skip this section silently. No messaging.
149
+
150
+ ### 6. Display Success Summary
99
151
 
100
152
  "**Skill brief written successfully.**
101
153
 
@@ -123,7 +175,7 @@ After compilation, you can:
123
175
 
124
176
  **Brief-skill workflow complete.**"
125
177
 
126
- ### 6. End Workflow
178
+ ### 7. End Workflow
127
179
 
128
180
  This is the final step. No next step file to load. The workflow is complete.
129
181
 
@@ -141,6 +193,8 @@ This is the FINAL step of the brief-skill workflow. After writing the file and d
141
193
  - Output directory created (or fallback used with notification)
142
194
  - skill-brief.yaml generated with all required fields matching approved values
143
195
  - File written successfully to correct location
196
+ - Deep tier: QMD collection `{skill-name}-brief` created/updated and registered in forge-tier.yaml
197
+ - Non-Deep tier: QMD indexing skipped silently
144
198
  - Success summary displayed with next steps recommendation
145
199
  - Workflow marked as complete
146
200
 
@@ -152,5 +206,6 @@ This is the FINAL step of the brief-skill workflow. After writing the file and d
152
206
  - Not creating output directory before writing
153
207
  - Not displaying next steps recommendation
154
208
  - Not handling write failure gracefully
209
+ - Failing the workflow due to QMD indexing errors (should degrade gracefully)
155
210
 
156
- **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
211
+ **Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE. QMD indexing failures never block the workflow.
@@ -2,6 +2,7 @@
2
2
  name: brief-skill
3
3
  description: Scope and design a skill through guided discovery
4
4
  web_bundle: true
5
+ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/brief-skill'
5
6
  ---
6
7
 
7
8
  # Brief Skill
@@ -50,7 +51,7 @@ web_bundle: true
50
51
 
51
52
  Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
52
53
 
53
- - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `forge_data_folder`
54
+ - `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`, `forge_data_folder`, `sidecar_path`
54
55
 
55
56
  ### 2. First Step Execution
56
57
 
@@ -0,0 +1,110 @@
1
+ # SKILL.md Compilation Assembly Rules
2
+
3
+ ## Frontmatter (REQUIRED — agentskills.io compliance)
4
+
5
+ ```yaml
6
+ ---
7
+ name: {brief.name}
8
+ description: >
9
+ {Trigger-optimized description from brief and extraction data.
10
+ Include what it does, when to use it, and what NOT to use it for.
11
+ 1-1024 chars, optimized for agent discovery.}
12
+ ---
13
+ ```
14
+
15
+ **Frontmatter rules:**
16
+
17
+ - `name`: lowercase alphanumeric + hyphens only, must match the skill output directory name
18
+ - `description`: non-empty, max 1024 chars, optimized for agent discovery
19
+ - Only `name` and `description` in frontmatter — `version` and `author` go in metadata.json
20
+ - No other frontmatter fields for standard skills (only `name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools` are permitted by spec)
21
+
22
+ ## Two-Tier Assembly
23
+
24
+ **CRITICAL: Two-tier assembly.** SKILL.md must retain actionable inline content that survives `split-body` extraction. Assemble Tier 1 sections first (always inline), then Tier 2 sections (reference-eligible, may be extracted by split-body).
25
+
26
+ ### Tier 1 — Always Inline (must survive split-body)
27
+
28
+ These sections form the essential standalone body. Target: **under 300 lines total** for Tier 1. An agent loading only SKILL.md (without references) must get enough to act.
29
+
30
+ **Section 1 — Overview (~10 lines):**
31
+ - 1-line summary of what the library does
32
+ - Source repo, version, branch
33
+ - Forge tier used for compilation
34
+ - Export count and confidence summary
35
+
36
+ **Section 2 — Quick Start (~30 lines):**
37
+ - Select the 3-5 most commonly used functions (by import frequency or documentation prominence)
38
+ - One runnable code example showing a typical end-to-end flow (e.g., `add → process → search`)
39
+ - Minimal usage examples — ONLY from source tests or official docs
40
+ - If no examples exist in source, show signature-only quick start
41
+ - Provenance citation for each function
42
+
43
+ **Section 3 — Common Workflows (~30 lines):**
44
+ - 4-5 patterns showing typical function call sequences
45
+ - Each pattern: 1-line bold description + function call chain with key params
46
+ - Focus on the most common developer tasks, not exhaustive coverage
47
+ - Format example:
48
+ ```
49
+ **Add and process data:**
50
+ `await cognee.add(data) → await cognee.cognify() → await cognee.search(query)`
51
+ ```
52
+
53
+ **Section 4 — Key API Summary (~20 lines):**
54
+ - Table of top 10-15 functions: name, purpose, key parameters
55
+ - One row per function — no full signatures, just enough for discovery
56
+ - Provenance citation per function
57
+
58
+ **Section 4b — Migration & Deprecation Warnings (~10 lines, Deep tier only):**
59
+ - Only populated when step-04 enrichment produced **T2-future** annotations (deprecation warnings, breaking changes, planned renames)
60
+ - List each warning as a single-line bullet: function name, what changed or will change, source citation
61
+ - Max 10 lines — just the actionable warnings, not full context
62
+ - Link to Tier 2 Full API Reference for details: "See Full API Reference for migration details."
63
+ - **Skip entirely** for Quick/Forge tiers or when no T2-future annotations exist — do not emit an empty section
64
+ - This section survives split-body, ensuring agents always see critical migration context
65
+
66
+ **Section 5 — Key Types (~20 lines):**
67
+ - Most important enum/type definitions inline (e.g., SearchType values, config options)
68
+ - Only types that appear in Quick Start or Common Workflows
69
+ - Full type details go in Tier 2
70
+
71
+ **Section 6 — Architecture at a Glance (~10 lines):**
72
+ - Bullet list of major subsystem categories (e.g., "Graph DBs: Neo4j, Kuzu, Neptune")
73
+ - Adapter/driver overview — what's available, not how it works
74
+ - Skip for Quick tier or small libraries with < 5 modules
75
+
76
+ **Section 7 — CLI (~10 lines, if applicable):**
77
+ - Basic CLI commands if the library has a CLI interface
78
+ - Skip if no CLI exists
79
+
80
+ **Section 8 — Manual Sections:**
81
+ - Seed empty `<!-- [MANUAL] -->` markers:
82
+ ```markdown
83
+ <!-- [MANUAL:additional-notes] -->
84
+ <!-- Add custom notes here. This section is preserved during skill updates. -->
85
+ <!-- [/MANUAL:additional-notes] -->
86
+ ```
87
+ - Place after Quick Start and after Key API Summary sections
88
+
89
+ ### Tier 2 — Reference-Eligible (can be extracted by split-body)
90
+
91
+ Assemble Sections 9-11 (Full API Reference, Full Type Definitions, Full Integration Patterns) as defined in the skill-sections data file. These contain full detail and are split into `references/` when the body exceeds 500 lines. Include T2 annotations from enrichment in the Full API Reference (Deep tier only).
92
+
93
+ **CRITICAL — Tier 2 differentiation from Tier 1:** Tier 2 Full API Reference must contain content that is NOT present in Tier 1's Key API Summary. Specifically:
94
+
95
+ - **Full parameter tables** with types, defaults, and required/optional flags (Tier 1 only lists key params)
96
+ - **Return value details** including structure, types, and error conditions
97
+ - **T2 temporal annotations** — migration notes, deprecation details, breaking change context (Deep tier)
98
+ - **Usage examples** from source tests or documentation (Tier 1 has signature-only references)
99
+ - **Edge cases and constraints** — parameter validation rules, size limits, behavioral notes
100
+
101
+ Do NOT repeat Tier 1's name/purpose/key-params table format in Tier 2. Tier 2 is a deep reference, not a reformatted summary. This distinction prevents conciseness scorers from flagging the two-tier design as redundancy.
102
+
103
+ ### Assembly Rules
104
+
105
+ 1. Assemble all Tier 1 sections first — these form the essential standalone body
106
+ 2. Assemble all Tier 2 sections after — these are progressive disclosure detail
107
+ 3. Tier 1 content MUST be under 300 lines (excluding frontmatter)
108
+ 4. If Tier 1 alone exceeds 300 lines, reduce Key API Summary and Architecture at a Glance
109
+ 5. Tier 1 sections are kept short enough that `split-body` targets the larger Tier 2 sections (`## Full ...` headings) instead
110
+ 6. After split-body, SKILL.md must still contain all Tier 1 sections with actionable content