bmad-module-skill-forge 0.6.0 → 0.7.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 (136) hide show
  1. package/README.md +2 -2
  2. package/docs/agents.md +9 -5
  3. package/docs/concepts.md +17 -13
  4. package/docs/examples.md +19 -4
  5. package/docs/getting-started.md +34 -19
  6. package/docs/how-it-works.md +85 -84
  7. package/docs/index.md +1 -1
  8. package/docs/workflows.md +88 -40
  9. package/package.json +1 -1
  10. package/src/agents/forger.agent.yaml +17 -5
  11. package/src/forger/README.md +1 -1
  12. package/src/forger/forge-tier.yaml +2 -1
  13. package/src/forger/preferences.yaml +5 -7
  14. package/src/knowledge/agentskills-spec.md +1 -1
  15. package/src/knowledge/architecture-verification.md +102 -0
  16. package/src/knowledge/ccc-bridge.md +1 -1
  17. package/src/knowledge/confidence-tiers.md +12 -1
  18. package/src/knowledge/doc-fetcher.md +1 -1
  19. package/src/knowledge/manual-section-integrity.md +2 -2
  20. package/src/knowledge/overview.md +10 -7
  21. package/src/knowledge/progressive-capability.md +3 -2
  22. package/src/knowledge/qmd-registry.md +4 -1
  23. package/src/knowledge/skf-knowledge-index.csv +1 -0
  24. package/src/knowledge/skill-lifecycle.md +26 -2
  25. package/src/knowledge/split-body-strategy.md +16 -2
  26. package/src/knowledge/zero-hallucination.md +11 -8
  27. package/src/module-help.csv +9 -6
  28. package/src/module.yaml +3 -0
  29. package/src/workflows/README.md +35 -17
  30. package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
  31. package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
  32. package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
  33. package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
  34. package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
  35. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +1 -1
  36. package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
  37. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
  38. package/src/workflows/analyze-source/workflow.md +2 -2
  39. package/src/workflows/audit-skill/data/severity-rules.md +1 -1
  40. package/src/workflows/audit-skill/steps-c/step-01-init.md +1 -0
  41. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +5 -0
  42. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +1 -1
  43. package/src/workflows/audit-skill/workflow.md +2 -1
  44. package/src/workflows/brief-skill/data/scope-templates.md +10 -0
  45. package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
  46. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
  47. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
  48. package/src/workflows/create-skill/data/skill-sections.md +12 -11
  49. package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
  50. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +13 -9
  51. package/src/workflows/create-skill/steps-c/step-03-extract.md +15 -19
  52. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
  53. package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
  54. package/src/workflows/create-skill/steps-c/step-04-enrich.md +1 -1
  55. package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
  56. package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
  57. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
  58. package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
  59. package/src/workflows/create-skill/workflow.md +2 -2
  60. package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
  61. package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
  62. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +23 -7
  63. package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
  64. package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
  65. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
  66. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +30 -2
  67. package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
  68. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
  69. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
  70. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
  71. package/src/workflows/create-stack-skill/workflow.md +2 -2
  72. package/src/workflows/export-skill/data/managed-section-format.md +8 -1
  73. package/src/workflows/export-skill/data/snippet-format.md +1 -1
  74. package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
  75. package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
  76. package/src/workflows/export-skill/workflow.md +3 -1
  77. package/src/workflows/quick-skill/data/skill-template.md +18 -6
  78. package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
  79. package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
  80. package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
  81. package/src/workflows/quick-skill/workflow.md +1 -1
  82. package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
  83. package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
  84. package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
  85. package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
  86. package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
  87. package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
  88. package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
  89. package/src/workflows/refine-architecture/workflow.md +61 -0
  90. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
  91. package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +1 -1
  92. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
  93. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
  94. package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
  95. package/src/workflows/setup-forge/workflow.md +3 -2
  96. package/src/workflows/test-skill/data/scoring-rules.md +3 -0
  97. package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
  98. package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
  99. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
  100. package/src/workflows/test-skill/workflow.md +2 -2
  101. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +2 -2
  102. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +5 -2
  103. package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
  104. package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
  105. package/src/workflows/update-skill/workflow.md +1 -1
  106. package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
  107. package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
  108. package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
  109. package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
  110. package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
  111. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
  112. package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
  113. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
  114. package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
  115. package/src/workflows/verify-stack/workflow.md +61 -0
  116. package/src/workflows/analyze-source/validation-report.md +0 -657
  117. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
  118. package/src/workflows/audit-skill/validation-report.md +0 -545
  119. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
  120. package/src/workflows/brief-skill/validation-report.md +0 -630
  121. package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
  122. package/src/workflows/create-skill/validation-report.md +0 -189
  123. package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
  124. package/src/workflows/create-stack-skill/validation-report.md +0 -401
  125. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
  126. package/src/workflows/export-skill/validation-report.md +0 -263
  127. package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
  128. package/src/workflows/quick-skill/validation-report.md +0 -543
  129. package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
  130. package/src/workflows/setup-forge/validation-report.md +0 -504
  131. package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
  132. package/src/workflows/test-skill/validation-report.md +0 -390
  133. package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
  134. package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
  135. package/src/workflows/update-skill/validation-report.md +0 -559
  136. package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
@@ -2,26 +2,27 @@
2
2
 
3
3
  ## Required Fields
4
4
 
5
- | Field | Type | Description | Validation |
6
- |-------|------|-------------|------------|
7
- | name | string | Kebab-case skill name | Must match `[a-z0-9-]+` |
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
- | source_repo | string | GitHub URL or local path | Must be accessible |
10
- | language | string | Primary programming language | Must be detected or user-specified |
11
- | scope | object | Inclusion/exclusion boundaries | Must have type + at least one pattern |
12
- | description | string | What this skill covers | 1-3 sentences |
13
- | forge_tier | string | Compilation tier | One of: quick, forge, forge+, deep |
14
- | created | string | Creation date | ISO date format |
15
- | created_by | string | User who created the brief | From config user_name |
5
+ | Field | Type | Constraint | Description |
6
+ |-------|------|------------|-------------|
7
+ | name | string | kebab-case `[a-z0-9-]+` | Unique skill identifier |
8
+ | version | string | Semantic `X.Y.Z` | Auto-detect from source (see Version Detection below), fall back to `1.0.0` |
9
+ | source_repo | string | GitHub URL or local path | Repository or project root (optional when `source_type: "docs-only"`) |
10
+ | language | string | Recognized language | Primary programming language |
11
+ | scope | object | See Scope Object below | Boundary definition |
12
+ | description | string | 1-3 sentences | What the skill covers |
13
+ | forge_tier | string | `Quick` / `Forge` / `Forge+` / `Deep` | Inherited from forge-tier.yaml (Title Case) |
14
+ | created | string | ISO date `YYYY-MM-DD` | Generation date |
15
+ | created_by | string | user_name from config | Who generated the brief |
16
16
 
17
17
  ## Optional Fields
18
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
- | `scripts_intent` | string | Describes whether scripts should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip scripts), or a free-text description of expected scripts (e.g., "CLI validation tools in bin/"). |
24
- | `assets_intent` | string | Describes whether assets should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip assets), or a free-text description of expected assets (e.g., "JSON schemas in schemas/"). |
19
+ | Field | Type | Constraint | Description |
20
+ |-------|------|------------|-------------|
21
+ | source_type | string | `source` or `docs-only` | Default `source`. When `docs-only`: `source_repo` optional, `doc_urls` required |
22
+ | doc_urls | array | `{url, label}` objects | Documentation URLs for T3 content. Required when `source_type: "docs-only"` |
23
+ | `scripts_intent` | string | `detect` / `none` / free-text | Describes whether scripts should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip scripts), or a free-text description of expected scripts (e.g., "CLI validation tools in bin/"). |
24
+ | `assets_intent` | string | `detect` / `none` / free-text | Describes whether assets should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip assets), or a free-text description of expected assets (e.g., "JSON schemas in schemas/"). |
25
+ | `source_authority` | string | `official` / `community` / `internal` | Default `community`. Set to `official` only when the skill creator is the library maintainer. Forced to `community` when `source_type: "docs-only"`. |
25
26
 
26
27
  When `source_type: "docs-only"`:
27
28
  - `source_repo` becomes optional (set to doc site URL for reference)
@@ -48,7 +49,7 @@ The create-skill workflow (step-03-extract) also performs version reconciliation
48
49
 
49
50
  ```yaml
50
51
  scope:
51
- type: full-library | specific-modules | public-api
52
+ type: full-library | specific-modules | public-api | docs-only
52
53
  include:
53
54
  - "src/**/*.ts" # Glob patterns for included files/directories
54
55
  exclude:
@@ -67,7 +68,7 @@ source_type: "source" # "source" (default) or "docs-only"
67
68
  source_repo: "{github-url-or-local-path}"
68
69
  language: "{detected-language}"
69
70
  description: "{brief-description}"
70
- forge_tier: "{quick|forge|forge+|deep}"
71
+ forge_tier: "{Quick|Forge|Forge+|Deep}"
71
72
  created: "{date}"
72
73
  created_by: "{user_name}"
73
74
  scope:
@@ -83,12 +84,13 @@ scope:
83
84
  # label: "API Reference"
84
85
  # scripts_intent: detect # Optional: detect | none | description
85
86
  # assets_intent: detect # Optional: detect | none | description
87
+ # source_authority: community # Optional: official | community | internal
86
88
  ---
87
89
  ```
88
90
 
89
91
  ## Human-Readable Presentation Format
90
92
 
91
- When presenting the brief for confirmation (step 04), display as:
93
+ When presenting the brief for confirmation (brief-skill step 04 only — not applicable to analyze-source batch generation), display as:
92
94
 
93
95
  ```
94
96
  Skill Brief: {name}
@@ -114,8 +116,8 @@ Created by: {created_by}
114
116
  1. `name` must be unique within {forge_data_folder}
115
117
  2. `source_repo` must be accessible (gh api for GitHub, path exists for local)
116
118
  3. `language` must be a recognized programming language
117
- 4. `scope.type` must be one of the three defined types
118
- 5. `scope.include` must have at least one pattern
119
- 6. `forge_tier` must be one of: quick, forge, forge+, deep (must match the tier from forge-tier.yaml, or default to quick)
119
+ 4. `scope.type` must be one of the four defined types
120
+ 5. `scope.include` must have at least one pattern (exception: `docs-only` scope, where include patterns are optional since no source code is available)
121
+ 6. `forge_tier` must be one of: Quick, Forge, Forge+, Deep (Title Case, must match the tier from forge-tier.yaml, or default to Quick)
120
122
  7. When `source_type: "docs-only"`: `doc_urls` must have >= 1 entry, `source_repo` becomes optional
121
123
  8. Each `doc_urls` entry must have a valid `url` field
@@ -68,7 +68,7 @@ Attempt to load `{forgeTierFile}`:
68
68
 
69
69
  **If not found:**
70
70
  - Display: "**Note:** No forge tier configuration found. Defaulting to Quick tier. Run **setup-forge** first for full capabilities."
71
- - Default to: `forge_tier: quick`
71
+ - Default to: `forge_tier: Quick`
72
72
 
73
73
  ### 2. Welcome and Explain
74
74
 
@@ -91,6 +91,9 @@ scope:
91
91
  # doc_urls:
92
92
  # - url: "{documentation URL}"
93
93
  # label: "{page label}"
94
+ # scripts_intent: detect # Optional: detect | none | description of expected scripts
95
+ # assets_intent: detect # Optional: detect | none | description of expected assets
96
+ # source_authority: community # Optional: official | community | internal
94
97
  ---
95
98
  ```
96
99
 
@@ -132,6 +132,12 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
132
132
  "qmd": "{version-or-null}",
133
133
  "skf": "{skf_version}"
134
134
  },
135
+ "confidence_distribution": {
136
+ "t1": 0,
137
+ "t1_low": 0,
138
+ "t2": 0,
139
+ "t3": 0
140
+ },
135
141
  "stats": {
136
142
  "exports_documented": 0,
137
143
  "exports_public_api": 0,
@@ -139,18 +145,13 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
139
145
  "exports_total": 0,
140
146
  "public_api_coverage": 0.0,
141
147
  "total_coverage": 0.0,
142
- "confidence_t1": 0,
143
- "confidence_t2": 0,
144
- "confidence_t3": 0,
145
148
  "scripts_count": 0,
146
149
  "assets_count": 0
147
150
  },
148
- "scripts": [
149
- { "file": "scripts/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }
150
- ],
151
- "assets": [
152
- { "file": "assets/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }
153
- ],
151
+ // scripts[] and assets[] — include ONLY when inventories are non-empty; omit entirely otherwise
152
+ // "scripts": [{ "file": "scripts/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }],
153
+ // "assets": [{ "file": "assets/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }],
154
+ "generated_by": "{quick-skill|create-skill}",
154
155
  "dependencies": [],
155
156
  "compatibility": "{semver-range}"
156
157
  }
@@ -197,7 +198,7 @@ Each reference file includes:
197
198
  "source_file": "src/auth/index.ts",
198
199
  "source_line": 42,
199
200
  "confidence": "T1",
200
- "extraction_method": "ast_bridge.scan_definitions",
201
+ "extraction_method": "ast-grep",
201
202
  "ast_node_type": "export_function_declaration"
202
203
  }
203
204
  ],
@@ -235,7 +236,7 @@ Each reference file includes:
235
236
  ## Extraction Summary
236
237
  - Files scanned: {count}
237
238
  - Exports found: {count}
238
- - Confidence: T1={n}, T2={n}, T3={n}
239
+ - Confidence: T1={n}, T1-low={n}, T2={n}, T3={n}
239
240
 
240
241
  ## Validation Results
241
242
  - Schema: {pass/fail}
@@ -112,7 +112,7 @@ If `source_repo` is a remote URL (GitHub URL or owner/repo format) AND tier is F
112
112
 
113
113
  Proceed with Quick tier extraction strategy below. Note the degradation reason in context for the evidence report.
114
114
 
115
- **Ephemeral clone cleanup:** After extraction is complete for all files in scope (whether successful or partially failed), before presenting the Gate 2 summary (Section 6), if `ephemeral_clone_active`, delete the `{temp_path}` directory. Log: "Ephemeral source clone cleaned up." This ensures cleanup runs even if some extractions failed, as long as the step itself is still executing.
115
+ **Ephemeral clone cleanup:** After extraction is complete for all files in scope (whether successful or partially failed), before presenting the Gate 2 summary (Section 6), if `ephemeral_clone_active`, delete the `{temp_path}` directory. Log: "Ephemeral source clone cleaned up." This ensures cleanup runs even if some extractions failed, as long as the step itself is still executing. **If any error halts the extraction step before Gate 2 is reached**, cleanup must still occur: attempt to delete `{temp_path}` before halting. Log the cleanup attempt regardless of success.
116
116
 
117
117
  ---
118
118
 
@@ -2,8 +2,8 @@
2
2
  name: 'step-01-load-brief'
3
3
  description: 'Load skill-brief.yaml, validate structure, resolve source code location, load forge tier'
4
4
  nextStepFile: './step-02-ecosystem-check.md'
5
- forgeTierFile: '{project-root}/_bmad/_memory/forger-sidecar/forge-tier.yaml'
6
- preferencesFile: '{project-root}/_bmad/_memory/forger-sidecar/preferences.yaml'
5
+ forgeTierFile: '{sidecar_path}/forge-tier.yaml'
6
+ preferencesFile: '{sidecar_path}/preferences.yaml'
7
7
  ---
8
8
 
9
9
  # Step 1: Load Brief
@@ -70,14 +70,14 @@ Extract and report:
70
70
  ### 2. Discover Skill Brief
71
71
 
72
72
  **If user provided a specific brief path or skill name:**
73
- - Search `{project-root}/forge-data/{skill-name}/skill-brief.yaml`
73
+ - If the value looks like a file path (starts with `/`, `./`, `~`, or contains path separators): treat it as a direct file path and load it
74
+ - Otherwise, treat it as a skill name and search `{forge_data_folder}/{skill-name}/skill-brief.yaml`
74
75
  - If found, load it completely
75
76
 
76
77
  **If user invoked with --batch flag:**
77
- - Search specified directory for all `skill-brief.yaml` files
78
- - List discovered briefs with skill names
79
- - Store list for batch loop processing
80
- - For this run, load the FIRST brief (batch loops back for remaining)
78
+ - Check `{sidecar_path}/batch-state.yaml` for an active batch checkpoint:
79
+ - If `batch_active: true` and `current_index` is valid: load the brief at `brief_list[current_index]` (resuming a batch loop from step-08)
80
+ - If no checkpoint exists or `batch_active` is false: search specified directory for all `skill-brief.yaml` files, list discovered briefs with skill names, store list for batch loop processing, and load the FIRST brief
81
81
 
82
82
  **If no brief found:**
83
83
  Halt with: "No skill brief found. Run [BS] Brief Skill to create one, or use [QS] Quick Skill for brief-less generation."
@@ -101,6 +101,8 @@ Check that the loaded skill-brief.yaml contains required fields:
101
101
  - `include_patterns` — file glob patterns to include
102
102
  - `exclude_patterns` — file glob patterns to exclude
103
103
  - `description` — human description of the skill
104
+ - `scripts_intent` — `"none"` to skip scripts detection, omit for default auto-detection
105
+ - `assets_intent` — `"none"` to skip assets detection, omit for default auto-detection
104
106
 
105
107
  **Docs-only validation:** When `source_type: "docs-only"`, `source_repo` is not required but `doc_urls` must have at least one entry. `source_authority` is forced to `community`.
106
108
 
@@ -109,6 +111,8 @@ Halt with specific error: "Brief validation failed: missing required field `{fie
109
111
 
110
112
  ### 4. Resolve Source Code Location
111
113
 
114
+ **If `source_type: "docs-only"`:** Skip source resolution. Set `source_location: null` in context. Proceed directly to section 5 (Report Initialization) — docs-only skills have no source to resolve.
115
+
112
116
  **If source_repo is a GitHub URL or owner/repo format:**
113
117
  - Verify repository exists via `gh_bridge.list_tree(owner, repo, branch)`
114
118
  - If branch not specified, detect default branch
@@ -140,7 +144,7 @@ Where tier_description follows positive capability framing:
140
144
  - Quick: "Source reading and spec validation"
141
145
  - Forge: "AST-backed structural extraction"
142
146
  - Forge+: "Semantic-guided precision — ccc pre-ranks files before AST extraction"
143
- - Deep: "Full intelligence — structural + contextual + temporal"
147
+ - Deep: "Full intelligence — structural + contextual + QMD knowledge synthesis"
144
148
 
145
149
  ### 6. Menu Handling Logic
146
150
 
@@ -166,7 +170,7 @@ ONLY WHEN forge-tier.yaml is loaded, skill-brief.yaml is validated, and source c
166
170
 
167
171
  - Forge tier loaded from sidecar with tool availability
168
172
  - Skill brief loaded and all required fields validated
169
- - Source code location resolved and accessible
173
+ - Source code location resolved and accessible (or `source_location: null` confirmed for docs-only skills)
170
174
  - Initialization summary displayed with tier and capabilities
171
175
  - Auto-proceeded to step-02
172
176
 
@@ -46,7 +46,7 @@ To extract all public exports, function signatures, type definitions, and co-imp
46
46
 
47
47
  ## CONTEXT BOUNDARIES:
48
48
 
49
- - Available: brief_data, tier, source_location, file_tree from step-01; ecosystem_status from step-02
49
+ - Available: brief_data, tier, source_location, file_tree from step-01; ecosystem check outcome from step-02 (proceed/halt decision — no named variable stored)
50
50
  - Focus: Source code extraction and inventory building
51
51
  - Limits: Do NOT compile, assemble, or write any output
52
52
  - Dependencies: Source code must be accessible (resolved in step-01)
@@ -75,7 +75,7 @@ Build the filtered file list from the source tree resolved in step-01. Record th
75
75
 
76
76
  "**Docs-only mode:** No source code to extract. Documentation content will be fetched from `doc_urls` in step-03c."
77
77
 
78
- Build an empty extraction inventory with zero exports. Set `extraction_mode: "docs-only"` in context. Auto-proceed through Gate 2 (section 5) — display the empty inventory and note that T3 content will be produced by the doc-fetcher step.
78
+ Build an empty extraction inventory with zero exports. Set `extraction_mode: "docs-only"` in context. Auto-proceed through Gate 2 (section 6) — display the empty inventory and note that T3 content will be produced by the doc-fetcher step.
79
79
 
80
80
  **If `source_type: "source"` (default):** Continue with extraction below.
81
81
 
@@ -126,24 +126,21 @@ Degrade to Quick tier extraction. Note the degradation reason in context for the
126
126
  - If a file cannot be read: log warning, skip file, continue with remaining files
127
127
  - If AST parsing fails on a file: fall back to source reading for that file, continue
128
128
 
129
- **Re-export tracing (Forge/Deep only):**
130
-
131
- After the initial AST scan, check for public exports from the entry point (`__init__.py`, `index.ts`, `lib.rs`) that were NOT found by AST extraction. These are likely module-level re-exports. Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to resolve them to their actual definition files. This ensures module re-export patterns (common in Python libraries with clean public APIs) do not create gaps in the extraction inventory.
129
+ **Re-export tracing (Forge/Deep only):** After the initial AST scan, check for unresolved public exports from entry points (`__init__.py`, `index.ts`, `lib.rs`). Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to resolve them to their definition files.
132
130
 
133
131
  ### 4b. Validate Exports Against Package Entry Point
134
132
 
135
133
  After extraction, validate the collected exports against the package's actual public API surface:
136
134
 
137
- - **Python:** Read `{source_root}/__init__.py` — extract all import statements to build the actual public export list. Compare against AST-extracted exports:
138
- - In AST results but not in `__init__.py` → mark as internal (exclude from `metadata.json` exports, keep in provenance-map with a note)
139
- - In `__init__.py` but not in AST results → flag as extraction gap (add to inventory, trace via re-export protocol)
140
- - **TypeScript/JavaScript:** Read `index.ts`/`index.js` — extract named exports. Same comparison logic.
141
- - **Rust:** Read `lib.rs` — extract `pub use` items. Same comparison logic.
142
- - **Go:** Scan package-level files for exported (capitalized) identifiers.
135
+ - **Python:** Read `{source_root}/__init__.py` — extract imports to build the public export list. Compare against AST results:
136
+ - In AST but not entry point → mark as internal (exclude from `metadata.json` exports)
137
+ - In entry point but not AST → flag as extraction gap (trace via re-export protocol)
138
+ - **TypeScript/JS:** Read `index.ts`/`index.js` — same comparison logic.
139
+ - **Rust:** Read `lib.rs` — extract `pub use` items. Same logic. **Go:** Scan for exported (capitalized) identifiers.
143
140
 
144
- Use the entry point as the authoritative source for `metadata.json`'s `exports[]` array. This prevents internal symbols from inflating the exports list and ensures all public API items are captured.
141
+ Use the entry point as the authoritative source for `metadata.json`'s `exports[]` array.
145
142
 
146
- **If entry point is missing or unreadable:** Skip validation with a warning. Use the AST-extracted list as-is.
143
+ **If entry point is missing or unreadable:** Skip validation with a warning.
147
144
 
148
145
  ### 4c. Detect and Inventory Scripts/Assets
149
146
 
@@ -152,10 +149,8 @@ Use the entry point as the authoritative source for `metadata.json`'s `exports[]
152
149
  After export extraction, scan the source for scripts and assets using the detection patterns in `{extractionPatternsTracingData}`:
153
150
 
154
151
  1. Scan source tree for directories/files matching detection heuristics (scripts/, bin/, tools/, cli/ for scripts; assets/, templates/, schemas/, configs/, examples/ for assets)
155
- 2. For each candidate: verify file exists, check size (flag if >500 lines for user confirmation), exclude binary files
156
- 3. Compute SHA-256 content hash for each included file
157
- 4. Extract purpose from file header comments, shebang, README references, or schema `title`/`description` fields. If no purpose found, use filename.
158
- 5. Record: file_path, purpose, source_path, language (for scripts), type (for assets), content_hash, confidence (T1-low)
152
+ 2. For each candidate: verify existence, check size (flag >500 lines), exclude binaries, compute SHA-256 hash
153
+ 3. Extract purpose from header comments, shebang, README references, or schema fields. Record: file_path, purpose, source_path, language/type, content_hash, confidence (T1-low)
159
154
 
160
155
  Add results to `scripts_inventory[]` and `assets_inventory[]` alongside the existing export inventory.
161
156
 
@@ -214,8 +209,9 @@ Display: "**Extraction Summary — Select an Option:** [C] Continue to compilati
214
209
 
215
210
  #### EXECUTION RULES:
216
211
 
217
- - ALWAYS halt and wait for user input after presenting the extraction summary
218
- - This is Gate 2 user must confirm before compilation proceeds
212
+ - IF docs-only mode (`extraction_mode: "docs-only"`): Auto-proceed immediately to `{nextStepFile}` no user interaction required
213
+ - OTHERWISE: ALWAYS halt and wait for user input after presenting the extraction summary
214
+ - This is Gate 2 — user must confirm before compilation proceeds (except docs-only mode)
219
215
  - User may ask questions about the extraction results before continuing
220
216
 
221
217
  #### Menu Handling Logic:
@@ -43,7 +43,7 @@ To fetch temporal context (issues, PRs, changelogs, release notes) from the sour
43
43
  ## CONTEXT BOUNDARIES:
44
44
 
45
45
  - Available: brief_data, tier, source_location from step-01; extraction_inventory from step-03
46
- - **Used from extraction_inventory:** `top_exports[]` — the list of top-level public API function names (typically 10-20). Used for targeted GitHub searches (section 3b).
46
+ - **Used from extraction_inventory:** `top_exports[]` — the list of top-level public API function names (typically 10-20). Used for targeted GitHub searches (section 3b). If `extraction_mode: "docs-only"` or `top_exports` is absent/empty, skip targeted searches silently.
47
47
  - Focus: Creating a QMD temporal collection for the source repository
48
48
  - Limits: Do NOT modify extraction data, begin enrichment, or compile content
49
49
  - Dependencies: Extraction must be complete from step-03
@@ -208,7 +208,7 @@ After temporal context is fetched and indexed (or skipped for any reason), immed
208
208
 
209
209
  ## CRITICAL STEP COMPLETION NOTE
210
210
 
211
- ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to eligibility, cache, or failure) will you proceed to load `{nextStepFile}` for QMD enrichment.
211
+ ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to eligibility, cache, or failure) will you proceed to load `{nextStepFile}` for documentation fetch.
212
212
 
213
213
  ---
214
214
 
@@ -224,7 +224,7 @@ ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to el
224
224
  - Collection `{skill-name}-temporal` indexed into QMD
225
225
  - Registry entry added/updated in forge-tier.yaml with type `"temporal"`
226
226
  - Staging directory cleaned up after indexing
227
- - Auto-proceeded to step-04
227
+ - Auto-proceeded to step-03c
228
228
 
229
229
  ### ❌ SYSTEM FAILURE:
230
230
 
@@ -85,7 +85,9 @@ Content fetched from external URLs is classified as **T3** (external, untrusted)
85
85
 
86
86
  After fetching a URL, apply the following heuristic to detect documentation root pages that contain no useful API content. This is common with modern documentation sites (Mintlify, Docusaurus, ReadTheDocs, GitBook) that render API content on subpages.
87
87
 
88
- **Root page detection heuristic — a page is a root if BOTH conditions are true:**
88
+ **Root page detection heuristic — apply only when the URL path ends in `/`, `/index`, `/index.html`, has no path component (bare domain), or has 1 path segment (e.g., `/docs`). For deeper URL paths (2+ segments like `/api/reference`), skip this heuristic and keep the content as-is.**
89
+
90
+ **A page is classified as a root if BOTH conditions are true:**
89
91
 
90
92
  1. **Zero API content indicators:** The fetched markdown contains none of: fenced code blocks (`` ``` ``), parameter tables (`|---|`), or function signature patterns (`def `, `function `, `fn `, `func `, `export `).
91
93
  2. **High link density:** More than 70% of non-empty lines are markdown links (matching `[text](url)` with no other substantive content on the line).
@@ -70,7 +70,7 @@ Before searching, check which QMD collections are available:
70
70
  3. **If no enrichment collections exist** (no `"temporal"` or `"docs"` type collections): report this and auto-proceed. Display:
71
71
 
72
72
  "**Enrichment: no enrichment collections available.**
73
- Only brief-type or extraction-type QMD collections found — no temporal context (issues, PRs, changelogs) or docs collections indexed. Enrichment skipped (expected for first-run skill creation). Enrichment becomes available when temporal or docs context is indexed into QMD collections.
73
+ Only brief-type or extraction-type QMD collections found — no temporal context (issues, PRs, changelogs) or docs collections indexed. {IF extraction_mode is 'docs-only' AND T3 items exist in extraction_inventory: 'T3 documentation content is available in extraction inventory — enrichment via QMD is skipped but T3 content will be compiled.'} {ELSE: 'Enrichment skipped (expected for first-run skill creation). Enrichment becomes available when temporal or docs context is indexed into QMD collections.'}
74
74
 
75
75
  Proceeding to compilation..."
76
76
 
@@ -39,7 +39,7 @@ To assemble the complete skill content from the extraction inventory and enrichm
39
39
  ## EXECUTION PROTOCOLS:
40
40
 
41
41
  - 🎯 Follow MANDATORY SEQUENCE exactly
42
- - 💾 Build all content in context or write to a staging directory (`_bmad-output/{name}/`)
42
+ - 💾 Build all content in context AND write to the staging directory (`_bmad-output/{name}/`) — staging write is mandatory for step-06 validation
43
43
  - 📖 Follow agentskills.io section structure from data file
44
44
  - 🚫 Do not promote any output files to final `skills/` or `forge-data/` directories — that's step-07
45
45
 
@@ -100,7 +100,8 @@ Following the structure from the skill-sections data file:
100
100
  - Set `description` from the SKILL.md frontmatter `description` field (already assembled in section 2)
101
101
  - Set `language` from source analysis (e.g., `"typescript"`, `"python"`) — use the primary language of the entry point file
102
102
  - Set `ast_node_count` from extraction stats if ast-grep was used (Forge/Deep tier), otherwise omit
103
- - Set `tool_versions` based on tier and available tools. Resolve `{skf_version}` from the SKF module's `package.json` `version` field (run `node -p "require('./node_modules/bmad-module-skill-forge/package.json').version"` or read the installed module's `package.json`). If unresolvable, fall back to `git describe --tags --abbrev=0` in the SKF module root. Never hardcode the version.
103
+ - Set `tool_versions` based on tier and available tools. Resolve `{skf_version}` from the installed module's `package.json` at `{project-root}/_bmad/skf/package.json`. If unresolvable there, fall back to `node -p "require('./node_modules/bmad-module-skill-forge/package.json').version"`. If still unresolvable, use `"unknown"` and add a warning to the evidence report. Never hardcode the version.
104
+ - Store `commit_short` = first 8 characters of `source_commit` (or `"unknown"` if unavailable) for use in step-08 report.
104
105
  - If `scripts_inventory` is non-empty, populate `scripts[]` array and set `stats.scripts_count`. If `assets_inventory` is non-empty, populate `assets[]` array and set `stats.assets_count`. Omit these fields entirely when inventories are empty.
105
106
 
106
107
  ### 5. Build references/ Content
@@ -119,7 +120,7 @@ One entry per extracted export: export_name, export_type, params[] (typed string
119
120
 
120
121
  ### 7. Build evidence-report.md Content
121
122
 
122
- Compilation audit trail: generation date, forge tier, source info, tool versions, extraction summary (files/exports/confidence), validation results (populated in step-06), warnings. See `{skillSectionsData}` for full template. Use the same `{skf_version}` value resolved in section 4 when populating the Tool Versions block.
123
+ Compilation audit trail: generation date, forge tier, source info, tool versions, extraction summary (files/exports/confidence), warnings. For validation-specific fields (Schema, Body, Security, Content Quality, tessl, Metadata), insert the placeholder text `[PENDING — populated by step-06]`. Step-06 will replace these placeholders with actual results. See `{skillSectionsData}` for full template. Use the same `{skf_version}` value resolved in section 4 when populating the Tool Versions block.
123
124
 
124
125
  ### 8. Menu Handling Logic
125
126
 
@@ -125,7 +125,7 @@ npx skill-check check <staging-skill-dir> --format json
125
125
 
126
126
  (Security scan enabled by default when `--no-security-scan` omitted. The scan uses [Snyk Agent Scan](https://github.com/snyk/agent-scan) to check for prompt injection risks, sensitive data exposure, and unsafe tool permissions.)
127
127
 
128
- Record any security warnings in evidence-report. Security findings are advisory — they do not block artifact generation.
128
+ Record any security warnings in evidence-report. Security findings are advisory — they do not block artifact generation. If the full validation re-run produces a different quality score than section 2, update the evidence-report with the newer score.
129
129
 
130
130
  **If security scan fails due to missing SNYK_TOKEN:**
131
131
 
@@ -181,7 +181,7 @@ tessl suggestions:
181
181
  Cross-check metadata.json against extraction inventory:
182
182
  - `stats.exports_documented` / `stats.exports_public_api` / `stats.exports_internal` / `stats.exports_total` are accurate
183
183
  - `stats.public_api_coverage` and `stats.total_coverage` are correctly computed (null when denominator is 0)
184
- - `confidence_t1`, `confidence_t2`, `confidence_t3` match actual counts
184
+ - `confidence_distribution.t1`, `confidence_distribution.t1_low`, `confidence_distribution.t2`, `confidence_distribution.t3` match actual counts
185
185
  - `spec_version` is "1.3"
186
186
  - If `scripts[]` or `assets[]` arrays present: verify `stats.scripts_count`/`stats.assets_count` match array lengths; verify `file_entries` count in provenance-map.json matches
187
187
 
@@ -9,7 +9,7 @@ forgeTierConfig: '{sidecar_path}/forge-tier.yaml'
9
9
 
10
10
  ## STEP GOAL:
11
11
 
12
- To write all compiled content to disk — 4 deliverable files to `skills/{name}/` and 3 workspace artifacts to `forge-data/{name}/`, creating directories as needed.
12
+ To write all compiled content to disk — 4 deliverable files to `{skills_output_folder}/{name}/` and 3 workspace artifacts to `{forge_data_folder}/{name}/`, creating directories as needed.
13
13
 
14
14
  ## MANDATORY EXECUTION RULES (READ FIRST):
15
15
 
@@ -30,7 +30,7 @@ To write all compiled content to disk — 4 deliverable files to `skills/{name}/
30
30
 
31
31
  - 🎯 Focus ONLY on writing files from the compiled content in context
32
32
  - 🚫 FORBIDDEN to modify content during writing — write exactly what was compiled
33
- - 🚫 FORBIDDEN to skip any artifact — all 7 files must be written
33
+ - 🚫 FORBIDDEN to skip any artifact — all base artifact types must be written (4 deliverables + 3 workspace files + N reference files)
34
34
  - 💬 Report each file written with its path
35
35
  - 📁 Create directories before writing files
36
36
 
@@ -54,65 +54,66 @@ To write all compiled content to disk — 4 deliverable files to `skills/{name}/
54
54
 
55
55
  ### 1. Create Directory Structure
56
56
 
57
- Create the following directories at `{project-root}/`:
57
+ Create the following directories:
58
58
 
59
59
  ```
60
- skills/{name}/
61
- skills/{name}/references/
62
- forge-data/{name}/
60
+ {skills_output_folder}/{name}/
61
+ {skills_output_folder}/{name}/references/
62
+ {forge_data_folder}/{name}/
63
63
  ```
64
64
 
65
- If `scripts_inventory` is non-empty, also create: `skills/{name}/scripts/`
66
- If `assets_inventory` is non-empty, also create: `skills/{name}/assets/`
65
+ If `scripts_inventory` is non-empty, also create: `{skills_output_folder}/{name}/scripts/`
66
+ If `assets_inventory` is non-empty, also create: `{skills_output_folder}/{name}/assets/`
67
67
 
68
68
  Where `{name}` is the skill name from the brief (kebab-case).
69
69
 
70
70
  If directories already exist, do not error — proceed with file writing (overwrites existing files).
71
71
 
72
- ### 2. Write Deliverables to skills/{name}/
72
+ ### 2. Write Deliverables to {skills_output_folder}/{name}/
73
73
 
74
74
  Write these 4 files from the compiled content:
75
75
 
76
- **File 1:** `skills/{name}/SKILL.md`
76
+ **File 1:** `{skills_output_folder}/{name}/SKILL.md`
77
77
  - The complete compiled skill document
78
78
  - agentskills.io-compliant format with all sections
79
79
  - [MANUAL] markers seeded
80
80
 
81
- **File 2:** `skills/{name}/context-snippet.md`
81
+ **File 2:** `{skills_output_folder}/{name}/context-snippet.md`
82
82
  - Compressed 2-line format for CLAUDE.md integration
83
83
 
84
- **File 3:** `skills/{name}/metadata.json`
84
+ **File 3:** `{skills_output_folder}/{name}/metadata.json`
85
85
  - Machine-readable birth certificate with stats and provenance
86
86
 
87
- **File 4:** `skills/{name}/references/*.md`
87
+ **File 4:** `{skills_output_folder}/{name}/references/*.md`
88
88
  - One file per function group or type
89
89
  - Progressive disclosure detail files
90
90
 
91
- **Files 4b (conditional):** `skills/{name}/scripts/*`
91
+ **Files 4b (conditional):** `{skills_output_folder}/{name}/scripts/*`
92
92
  - One file per detected script, copied from source with content preserved
93
93
  - Only created when `scripts_inventory` is non-empty
94
94
 
95
- **Files 4c (conditional):** `skills/{name}/assets/*`
95
+ **Files 4c (conditional):** `{skills_output_folder}/{name}/assets/*`
96
96
  - One file per detected asset, copied from source with content preserved
97
97
  - Only created when `assets_inventory` is non-empty
98
98
 
99
- ### 3. Write Workspace Artifacts to forge-data/{name}/
99
+ ### 3. Write Workspace Artifacts to {forge_data_folder}/{name}/
100
100
 
101
101
  Write these 3 files from the compiled content:
102
102
 
103
- **File 5:** `forge-data/{name}/provenance-map.json`
103
+ **File 5:** `{forge_data_folder}/{name}/provenance-map.json`
104
104
  - Per-claim source map with AST bindings and confidence tiers
105
105
 
106
- **File 6:** `forge-data/{name}/evidence-report.md`
106
+ **File 6:** `{forge_data_folder}/{name}/evidence-report.md`
107
107
  - Build artifact with extraction summary, validation results, warnings
108
108
 
109
- **File 7:** `forge-data/{name}/extraction-rules.yaml`
109
+ **File 7:** `{forge_data_folder}/{name}/extraction-rules.yaml`
110
110
  - Language and ast-grep schema used for this extraction (for reproducibility)
111
111
 
112
112
  ### 4. Verify Write Completion
113
113
 
114
114
  After all files are written, verify:
115
- - All 7 base files exist at their expected paths, plus scripts/ and assets/ files when inventories are non-empty
115
+ - All 4 deliverable artifact types exist (SKILL.md, context-snippet.md, metadata.json, at least one file in references/), all 3 workspace artifacts exist (provenance-map.json, evidence-report.md, extraction-rules.yaml), plus scripts/ and assets/ files when inventories are non-empty
116
+ - Store `ref_count` = count of files written to `references/` for use in step-08 report
116
117
  - List each file with its path and size
117
118
 
118
119
  **If any write failed:**
@@ -123,7 +124,7 @@ Display brief confirmation:
123
124
 
124
125
  "**Artifacts generated.**
125
126
 
126
- **Deliverables (skills/{name}/):**
127
+ **Deliverables ({skills_output_folder}/{name}/):**
127
128
  - SKILL.md
128
129
  - context-snippet.md
129
130
  - metadata.json
@@ -131,7 +132,7 @@ Display brief confirmation:
131
132
  {if assets: - assets/ ({assets_count} files)}
132
133
  - references/ ({reference_count} files)
133
134
 
134
- **Workspace (forge-data/{name}/):**
135
+ **Workspace ({forge_data_folder}/{name}/):**
135
136
  - provenance-map.json
136
137
  - evidence-report.md
137
138
  - extraction-rules.yaml
@@ -144,23 +145,13 @@ Proceeding to compilation report..."
144
145
 
145
146
  Index the generated skill artifacts into a QMD collection so that audit-skill and update-skill can perform high-signal searches against curated extraction data instead of raw source files.
146
147
 
147
- **Collection creation:**
148
-
149
- Create a QMD collection from both artifact directories:
150
- ```bash
151
- qmd collection add {project-root}/skills/{name} --name {name}-extraction --mask "**/*"
152
- qmd embed
153
- ```
154
-
155
- If collection already exists (re-run): remove and recreate for atomic replace:
148
+ **Collection creation:** Create (or replace) a QMD collection from the skill artifacts:
156
149
  ```bash
157
- qmd collection remove {name}-extraction
158
- qmd collection add {project-root}/skills/{name} --name {name}-extraction --mask "**/*"
159
- qmd embed
150
+ qmd collection remove {name}-extraction 2>/dev/null # no-op if new
151
+ qmd collection add {skills_output_folder}/{name} --name {name}-extraction --mask "**/*"
152
+ qmd embed # generates vector embeddings for vector_search/deep_search
160
153
  ```
161
154
 
162
- **Note:** `qmd embed` generates vector embeddings required for `vector_search` and `deep_search`. Without it, only BM25 keyword `search` works.
163
-
164
155
  **Registry update:**
165
156
 
166
157
  Read `{forgeTierConfig}` and update the `qmd_collections` array.
@@ -197,7 +188,7 @@ Dispatch to ccc CLI (`ccc index {source_root}`) or ccc MCP tool — `ccc_bridge.
197
188
 
198
189
  Read `{forgeTierConfig}` and update the `ccc_index_registry` array.
199
190
 
200
- Deduplicate by `source_repo` (the canonical upstream URL from brief_data) combined with `skill_name` NOT by local `path`, which may be an ephemeral clone path that changes on every run for remote repos. If an entry with matching `source_repo` + `skill_name` already exists, replace it. Otherwise, append:
191
+ Deduplicate by `source_repo` + `skill_name` (NOT local `path`, which may be ephemeral). Replace existing match or append:
201
192
 
202
193
  ```yaml
203
194
  - source_repo: "{brief.source_repo}"
@@ -209,11 +200,9 @@ Deduplicate by `source_repo` (the canonical upstream URL from brief_data) combin
209
200
 
210
201
  Write the updated forge-tier.yaml.
211
202
 
212
- **Error handling:**
213
- - If ccc indexing fails: log the error, continue. Do NOT fail the workflow.
214
- - If forge-tier.yaml update fails: log the error, continue.
203
+ **Error handling:** If ccc indexing or registry update fails, log and continue — do NOT fail the workflow.
215
204
 
216
- **IF `tools.ccc` is false:** Skip this section silently. No messaging.
205
+ **IF `tools.ccc` is false:** Skip this section silently.
217
206
 
218
207
  ### 6. Menu Handling Logic
219
208
 
@@ -239,9 +228,9 @@ ONLY WHEN all 7 artifact files are written and verified will you proceed to load
239
228
 
240
229
  ### ✅ SUCCESS:
241
230
 
242
- - Directory structure created (skills/{name}/, forge-data/{name}/)
243
- - All 4 deliverable files written to skills/{name}/
244
- - All 3 workspace artifact files written to forge-data/{name}/
231
+ - Directory structure created ({skills_output_folder}/{name}/, {forge_data_folder}/{name}/)
232
+ - All 4 deliverable files written to {skills_output_folder}/{name}/
233
+ - All 3 workspace artifact files written to {forge_data_folder}/{name}/
245
234
  - Write completion verified — all 7 files exist
246
235
  - Deep tier: QMD collection `{name}-extraction` created/updated and registered in forge-tier.yaml
247
236
  - Non-Deep tier: QMD indexing skipped silently