bmad-module-skill-forge 0.5.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 (149) hide show
  1. package/README.md +4 -3
  2. package/docs/agents.md +12 -5
  3. package/docs/concepts.md +37 -15
  4. package/docs/examples.md +49 -5
  5. package/docs/getting-started.md +43 -17
  6. package/docs/how-it-works.md +115 -90
  7. package/docs/index.md +2 -2
  8. package/docs/workflows.md +89 -41
  9. package/package.json +2 -2
  10. package/src/agents/forger.agent.yaml +18 -6
  11. package/src/forger/README.md +1 -1
  12. package/src/forger/forge-tier.yaml +18 -1
  13. package/src/forger/preferences.yaml +6 -8
  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 +110 -0
  17. package/src/knowledge/confidence-tiers.md +14 -3
  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 -6
  21. package/src/knowledge/progressive-capability.md +15 -6
  22. package/src/knowledge/qmd-registry.md +18 -1
  23. package/src/knowledge/skf-knowledge-index.csv +3 -1
  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 +4 -1
  29. package/src/workflows/README.md +36 -18
  30. package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
  31. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +1 -0
  32. package/src/workflows/analyze-source/steps-c/step-01-init.md +4 -4
  33. package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
  34. package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
  35. package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
  36. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +8 -4
  37. package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
  38. package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
  39. package/src/workflows/analyze-source/workflow.md +2 -2
  40. package/src/workflows/audit-skill/data/drift-report-template.md +6 -6
  41. package/src/workflows/audit-skill/data/severity-rules.md +1 -1
  42. package/src/workflows/audit-skill/steps-c/step-01-init.md +3 -2
  43. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +23 -1
  44. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +6 -6
  45. package/src/workflows/audit-skill/workflow.md +3 -2
  46. package/src/workflows/brief-skill/data/scope-templates.md +10 -0
  47. package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
  48. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +4 -4
  49. package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +15 -0
  50. package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
  51. package/src/workflows/create-skill/data/extraction-patterns.md +37 -1
  52. package/src/workflows/create-skill/data/skill-sections.md +14 -13
  53. package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
  54. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +18 -12
  55. package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +2 -2
  56. package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +157 -0
  57. package/src/workflows/create-skill/steps-c/step-03-extract.md +25 -20
  58. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +8 -8
  59. package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
  60. package/src/workflows/create-skill/steps-c/step-04-enrich.md +9 -9
  61. package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
  62. package/src/workflows/create-skill/steps-c/step-06-validate.md +3 -3
  63. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +60 -39
  64. package/src/workflows/create-skill/steps-c/step-08-report.md +26 -11
  65. package/src/workflows/create-skill/workflow.md +3 -3
  66. package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
  67. package/src/workflows/create-stack-skill/data/stack-skill-template.md +29 -7
  68. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -8
  69. package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
  70. package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
  71. package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
  72. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +40 -2
  73. package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
  74. package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
  75. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +4 -4
  76. package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
  77. package/src/workflows/create-stack-skill/workflow.md +3 -3
  78. package/src/workflows/export-skill/data/managed-section-format.md +8 -1
  79. package/src/workflows/export-skill/data/snippet-format.md +1 -1
  80. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +1 -1
  81. package/src/workflows/export-skill/steps-c/step-02-package.md +1 -1
  82. package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
  83. package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
  84. package/src/workflows/export-skill/workflow.md +3 -1
  85. package/src/workflows/quick-skill/data/skill-template.md +24 -4
  86. package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +1 -3
  87. package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
  88. package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
  89. package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
  90. package/src/workflows/quick-skill/workflow.md +1 -1
  91. package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
  92. package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
  93. package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
  94. package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
  95. package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
  96. package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
  97. package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
  98. package/src/workflows/refine-architecture/workflow.md +61 -0
  99. package/src/workflows/setup-forge/data/tier-rules.md +16 -6
  100. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +33 -15
  101. package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +148 -0
  102. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +29 -12
  103. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +29 -6
  104. package/src/workflows/setup-forge/steps-c/step-04-report.md +16 -4
  105. package/src/workflows/setup-forge/workflow.md +4 -3
  106. package/src/workflows/test-skill/data/scoring-rules.md +8 -0
  107. package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
  108. package/src/workflows/test-skill/steps-c/step-01-init.md +3 -2
  109. package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
  110. package/src/workflows/test-skill/templates/test-report-template.md +3 -0
  111. package/src/workflows/test-skill/workflow.md +2 -2
  112. package/src/workflows/update-skill/steps-c/step-01-init.md +3 -2
  113. package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +2 -2
  114. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +24 -4
  115. package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
  116. package/src/workflows/update-skill/steps-c/step-06-write.md +7 -4
  117. package/src/workflows/update-skill/workflow.md +1 -1
  118. package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
  119. package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
  120. package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
  121. package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
  122. package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
  123. package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
  124. package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
  125. package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
  126. package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
  127. package/src/workflows/verify-stack/workflow.md +61 -0
  128. package/tools/cli/commands/status.js +2 -1
  129. package/src/workflows/analyze-source/validation-report.md +0 -657
  130. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
  131. package/src/workflows/audit-skill/validation-report.md +0 -545
  132. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
  133. package/src/workflows/brief-skill/validation-report.md +0 -630
  134. package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
  135. package/src/workflows/create-skill/validation-report.md +0 -189
  136. package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -523
  137. package/src/workflows/create-stack-skill/validation-report.md +0 -401
  138. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
  139. package/src/workflows/export-skill/validation-report.md +0 -263
  140. package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
  141. package/src/workflows/quick-skill/validation-report.md +0 -543
  142. package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
  143. package/src/workflows/setup-forge/validation-report.md +0 -504
  144. package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -428
  145. package/src/workflows/test-skill/validation-report.md +0 -390
  146. package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
  147. package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
  148. package/src/workflows/update-skill/validation-report.md +0 -559
  149. package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Principle
4
4
 
5
- The 10 SKF workflows form an end-to-end pipeline from source discovery through verified export. Each workflow produces artifacts consumed by downstream workflows. Understanding the lifecycle enables Ferris to recommend the right workflow for a user's situation and to maintain artifact continuity across the pipeline.
5
+ The 12 SKF workflows form an end-to-end pipeline from source discovery through verified export, with a pre-code architecture verification path. Each workflow produces artifacts consumed by downstream workflows. Understanding the lifecycle enables Ferris to recommend the right workflow for a user's situation and to maintain artifact continuity across the pipeline.
6
6
 
7
7
  ## Rationale
8
8
 
@@ -26,6 +26,7 @@ With lifecycle awareness:
26
26
  | Discovery | AN (Analyze Source) | Scan project, identify skillable units | Analysis report, skill briefs |
27
27
  | Design | BS (Brief Skill) | Interactive scope definition for one skill | `skill-brief.yaml` |
28
28
  | Compilation | CS, QS, SS (Create/Quick/Stack) | Extract source and compile skill | `SKILL.md`, metadata, provenance, `scripts/`, `assets/` (when source contains them) |
29
+ | Architecture Verification | VS, RA (Verify Stack, Refine Architecture) | Pre-code feasibility check and architecture refinement | Feasibility report, refined architecture doc |
29
30
  | Maintenance | US, AS (Update/Audit) | Detect drift and refresh skills | Updated `SKILL.md`, drift report |
30
31
  | Verification | TS (Test Skill) | Quality gate — completeness scoring | Test report, pass/fail decision |
31
32
  | Distribution | EX (Export Skill) | Package and inject into agent context | agentskills.io bundle, snippets |
@@ -66,6 +67,20 @@ SF → QS → EX
66
67
  2. **QS** resolves a package name or URL to source and compiles directly — no brief needed
67
68
  3. **EX** packages for distribution (optional TS between QS and EX for quality assurance)
68
69
 
70
+ ### Pre-Code Stack Verification
71
+
72
+ ```
73
+ SF → CS×N (per library) → VS → RA → SS (compose) → TS → EX
74
+ ```
75
+
76
+ 1. **SF** ensures environment is configured
77
+ 2. **CS** compiles individual skills for each library in the stack
78
+ 3. **VS** cross-references skills against architecture and PRD — produces a feasibility report with verdicts
79
+ 4. **RA** refines the architecture document using skill API evidence and VS findings
80
+ 5. **SS** (compose-mode) synthesizes the stack skill from individual skills + refined architecture
81
+ 6. **TS** verifies the composed stack skill
82
+ 7. **EX** packages for distribution
83
+
69
84
  ### Maintenance
70
85
 
71
86
  ```
@@ -92,6 +107,7 @@ AS → US → TS → EX
92
107
  | User has a package name, wants fast results | QS |
93
108
  | User wants to skill their entire project | AN → CS (batch) |
94
109
  | User has an existing skill that may be outdated | AS → US |
110
+ | User wants to verify tech stack before building | CS×N → VS → RA → SS (compose) |
95
111
 
96
112
  **Key Points:**
97
113
  - SF is always prerequisite (but only needs to run once per project)
@@ -113,12 +129,19 @@ CS → SKILL.md + metadata.json + provenance-map.json + scripts/ + assets/ (when
113
129
  TS → test-report.md (pass/fail gate)
114
130
  ↓ (passing skill consumed by EX)
115
131
  EX → agentskills.io bundle + context snippets
132
+
133
+ VS → feasibility-report-{project_name}.md (verdict + integration verdicts)
134
+ ↓ (report consumed by RA)
135
+ RA → refined-architecture-{project_name}.md (gaps filled, issues flagged, improvements suggested)
136
+ ↓ (refined doc consumed by SS compose-mode)
137
+ SS (compose) → SKILL.md (stack skill synthesized from individual skills + architecture)
116
138
  ```
117
139
 
118
140
  **Key Points:**
119
141
  - `forge-tier.yaml` is the universal dependency — all workflows read it
120
142
  - Skill briefs are the handoff between discovery/design and compilation
121
143
  - TS acts as a gate — failing skills do not proceed to EX
144
+ - VS/RA form a pre-code verification loop — rerun after architecture changes
122
145
 
123
146
  ### Example 3: Stack Skill vs. Individual Skills
124
147
 
@@ -139,6 +162,7 @@ EX → agentskills.io bundle + context snippets
139
162
  - **Analyze Source** and **Brief Skill** are alternative entry points to compilation
140
163
  - **Test Skill** is optional but recommended — the quality gate before export
141
164
  - **Audit Skill** and **Update Skill** form the maintenance loop
165
+ - **Verify Stack** and **Refine Architecture** form the pre-code verification path
142
166
  - **Export Skill** is the terminal workflow — it produces the distributable artifact
143
167
 
144
168
  ## Related Fragments
@@ -147,4 +171,4 @@ EX → agentskills.io bundle + context snippets
147
171
  - [agentskills-spec.md](agentskills-spec.md) — the output format that export-skill packages
148
172
  - [provenance-tracking.md](provenance-tracking.md) — how provenance flows through the pipeline
149
173
 
150
- _Source: synthesized from all 10 workflow.md files and module-help.csv_
174
+ _Source: synthesized from all 12 workflow.md files (including VS, RA) and module-help.csv_
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Principle
4
4
 
5
- Selective split is the recommended strategy when `split-body` is needed. Extract only the largest Tier 2 section(s) to stay under the `body.max_lines` limit — keep all actionable Tier 1 content inline. Full split-body reduces agent accuracy because on-demand retrieval underperforms inline passive context.
5
+ Selective split is the recommended strategy when `split-body` is needed. Extract only the largest Tier 2 section(s) to stay under the 500-line body guideline — keep all actionable Tier 1 content inline. Full split-body reduces agent accuracy because on-demand retrieval underperforms inline passive context.
6
6
 
7
7
  ## Rationale
8
8
 
@@ -28,9 +28,15 @@ A split-body skill is identified by:
28
28
 
29
29
  When processing a split-body skill, any workflow step that reads SKILL.md content must also traverse `references/*.md` to get the complete picture.
30
30
 
31
+ ## Anti-Patterns
32
+
33
+ - Running `skill-check split-body --write` without first attempting selective split
34
+ - Moving Tier 1 sections (Quick Start, Key API Summary) to references/ — these must stay inline
35
+ - Splitting before checking whether context snippet anchors will break
36
+
31
37
  ## Recommended Approach
32
38
 
33
- When `body.max_lines` is exceeded:
39
+ When the 500-line body guideline is exceeded:
34
40
  1. Identify which Tier 2 section(s) are largest (usually `## Full API Reference`)
35
41
  2. Extract only those specific sections to `references/`
36
42
  3. Keep all Tier 1 sections and smaller Tier 2 sections inline
@@ -39,3 +45,11 @@ When `body.max_lines` is exceeded:
39
45
  ## Scripts and Assets Interaction
40
46
 
41
47
  Split-body affects only SKILL.md content movement to `references/`. The `scripts/` and `assets/` directories are unaffected — they remain as top-level siblings of SKILL.md regardless of split-body decisions. They do not count toward the body line limit.
48
+
49
+ ## Related Fragments
50
+
51
+ - [agentskills-spec.md](agentskills-spec.md) — 500-line guideline for SKILL.md body size and the `references/` directory structure
52
+ - [skill-lifecycle.md](skill-lifecycle.md) — where split-body decisions fit in the compilation pipeline
53
+ - `test-skill/data/scoring-rules.md` — tessl/split-body interaction and the pre-split baseline recommendation during test reporting
54
+
55
+ _Source: derived from agentskills.io split-body guidance and Vercel agent accuracy research (inline vs on-demand retrieval)_
@@ -62,14 +62,17 @@ With zero hallucination enforcement:
62
62
 
63
63
  **Implementation:** Extraction relies on source reading and pattern matching. All citations use `[SRC:file:Lnn]` format (T1-low confidence). The skill clearly states its extraction tier so consuming agents understand the confidence level.
64
64
 
65
- ```yaml
66
- # metadata.json (excerpt)
67
- confidence_distribution:
68
- t1: 0
69
- t1_low: 47
70
- t2: 0
71
- t3: 3
72
- extraction_tier: quick
65
+ ```json
66
+ // metadata.json (excerpt)
67
+ {
68
+ "confidence_tier": "Quick",
69
+ "confidence_distribution": {
70
+ "t1": 0,
71
+ "t1_low": 47,
72
+ "t2": 0,
73
+ "t3": 3
74
+ }
75
+ }
73
76
  ```
74
77
 
75
78
  **Key Points:**
@@ -1,12 +1,15 @@
1
1
  module,phase,name,code,sequence,workflow-file,command,required,agent,options,description,output-location,outputs,
2
- skf,anytime,Setup Forge,SF,,_bmad/skf/workflows/skillforge/setup-forge/workflow.md,skf_setup_forge,false,ferris,Create Mode,"Initialize forge environment — detect tools and set capability tier (Quick/Forge/Deep)",,forge-config.yaml,
2
+ skf,anytime,Setup Forge,SF,,_bmad/skf/workflows/skillforge/setup-forge/workflow.md,skf_setup_forge,false,ferris,Create Mode,"Initialize forge environment — detect tools and set capability tier (Quick/Forge/Forge+/Deep)",,forge-tier.yaml,
3
3
  skf,anytime,Analyze Source,AN,,_bmad/skf/workflows/skillforge/analyze-source/workflow.md,skf_analyze_source,false,ferris,Create Mode,"Discover what to skill in a large repo — produces recommended skill briefs",forge_data_folder,skill-brief.yaml,
4
4
  skf,anytime,Brief Skill,BS,,_bmad/skf/workflows/skillforge/brief-skill/workflow.md,skf_brief_skill,false,ferris,Create Mode,"Design a skill scope through guided discovery",forge_data_folder,skill-brief.yaml,
5
5
  skf,anytime,Create Skill,CS,,_bmad/skf/workflows/skillforge/create-skill/workflow.md,skf_create_skill,false,ferris,Create Mode,"Compile a skill from a brief — supports --batch for multiple briefs",skills_output_folder,SKILL.md,
6
6
  skf,anytime,Quick Skill,QS,,_bmad/skf/workflows/skillforge/quick-skill/workflow.md,skf_quick_skill,false,ferris,Create Mode,"Fast skill from a package name or GitHub URL — no brief needed",skills_output_folder,SKILL.md,
7
- skf,anytime,Stack Skill,SS,,_bmad/skf/workflows/skillforge/create-stack-skill/workflow.md,skf_create_stack_skill,false,ferris,Create Mode,"Consolidated project stack skill with integration patterns",skills_output_folder,SKILL.md,
8
- skf,anytime,Update Skill,US,,_bmad/skf/workflows/skillforge/update-skill/workflow.md,skf_update_skill,false,ferris,Create Mode,"Smart regeneration preserving [MANUAL] sections after source changes",skills_output_folder,SKILL.md,
9
- skf,anytime,Audit Skill,AS,,_bmad/skf/workflows/skillforge/audit-skill/workflow.md,skf_audit_skill,false,ferris,Create Mode,"Drift detection between skill and current source code",,"drift report",
10
- skf,anytime,Test Skill,TS,,_bmad/skf/workflows/skillforge/test-skill/workflow.md,skf_test_skill,false,ferris,Create Mode,"Cognitive completeness verification — quality gate before export",,"completeness score",
11
- skf,anytime,Export Skill,EX,,_bmad/skf/workflows/skillforge/export-skill/workflow.md,skf_export_skill,false,ferris,Create Mode,"Package for distribution and inject context into CLAUDE.md/AGENTS.md",skills_output_folder,"agentskills.io package",
7
+ skf,anytime,Stack Skill,SS,,_bmad/skf/workflows/skillforge/create-stack-skill/workflow.md,skf_create_stack_skill,false,ferris,Create Mode,"Consolidated project stack skill with integration patterns — code-mode (analyzes manifests) or compose-mode (synthesizes from existing skills + architecture doc)",skills_output_folder,SKILL.md,
8
+ skf,anytime,Update Skill,US,,_bmad/skf/workflows/skillforge/update-skill/workflow.md,skf_update_skill,false,ferris,Surgeon Mode,"Smart regeneration preserving [MANUAL] sections after source changes",skills_output_folder,SKILL.md,
9
+ skf,anytime,Audit Skill,AS,,_bmad/skf/workflows/skillforge/audit-skill/workflow.md,skf_audit_skill,false,ferris,Audit Mode,"Drift detection between skill and current source code",,"drift report",
10
+ skf,anytime,Test Skill,TS,,_bmad/skf/workflows/skillforge/test-skill/workflow.md,skf_test_skill,false,ferris,Audit Mode,"Cognitive completeness verification — quality gate before export",,"completeness score",
11
+ skf,anytime,Export Skill,EX,,_bmad/skf/workflows/skillforge/export-skill/workflow.md,skf_export_skill,false,ferris,Delivery Mode,"Package for distribution and inject context into CLAUDE.md/AGENTS.md/.cursorrules",skills_output_folder,"agentskills.io package",
12
+ skf,anytime,Verify Stack,VS,,_bmad/skf/workflows/skillforge/verify-stack/workflow.md,skf_verify_stack,false,ferris,Audit Mode,"Pre-code stack feasibility verification against architecture and PRD documents",forge_data_folder,"feasibility-report-{project_name}.md",
13
+ skf,anytime,Refine Architecture,RA,,_bmad/skf/workflows/skillforge/refine-architecture/workflow.md,skf_refine_architecture,false,ferris,Architect Mode,"Improve architecture doc using verified skill data and VS feasibility findings",output_folder,"refined-architecture-{project_name}.md",
14
+ skf,anytime,Workflow Status,WS,,,skf_workflow_status,false,ferris,Reference,"Show current lifecycle position, active skill briefs, and forge tier status",,lifecycle status,
12
15
  skf,anytime,Knowledge Index,KI,,_bmad/skf/knowledge/skf-knowledge-index.csv,skf_knowledge_index,false,ferris,Reference,"Cross-cutting principles and patterns — JiT loaded by workflows via index lookup",,"knowledge fragments",
package/src/module.yaml CHANGED
@@ -2,7 +2,7 @@ code: skf
2
2
  name: "SKF: Skill Forge — Evidence-Based Agent Skills Compiler"
3
3
  header: "Turn code and docs into instructions AI agents can actually follow"
4
4
  subheader: "Every instruction traces to source. Zero hallucination tolerance."
5
- description: "Skill Forge transforms code repositories, documentation, and developer discourse into agentskills.io-compliant, version-pinned, provenance-backed agent skills. Uses ast-grep for structural truth, QMD for knowledge intelligence, and a progressive capability model (Quick/Forge/Deep). Standalone module — no other modules required. Recommended alongside BMM for full development workflow integration."
5
+ description: "Skill Forge transforms code repositories, documentation, and developer discourse into agentskills.io-compliant, version-pinned, provenance-backed agent skills. Uses ast-grep for structural truth, cocoindex-code for semantic discovery, QMD for knowledge intelligence, and a progressive capability model (Quick/Forge/Forge+/Deep). Standalone module — no other modules required. Recommended alongside BMM for full development workflow integration."
6
6
  default_selected: false
7
7
 
8
8
  skills_output_folder:
@@ -20,3 +20,6 @@ forge_data_folder:
20
20
  ## communication_language
21
21
  ## document_output_language
22
22
  ## output_folder
23
+
24
+ # Variables from Agent Sidecar Config:
25
+ ## sidecar_path (from forger.agent.yaml metadata.sidecar-path)
@@ -1,6 +1,6 @@
1
1
  # SKF Workflows
2
2
 
3
- Ten workflows covering the full skill compilation lifecycle — from source discovery through verified export.
3
+ Twelve workflows covering the full skill lifecycle — from source discovery through verified export, with pre-code architecture verification.
4
4
 
5
5
  All workflows are triggered via Ferris (`@Ferris <code>`) and execute as step-by-step sequences with just-in-time step loading.
6
6
 
@@ -8,15 +8,17 @@ All workflows are triggered via Ferris (`@Ferris <code>`) and execute as step-by
8
8
 
9
9
  | Code | Workflow | Steps | Mode | Purpose |
10
10
  | --- | --- | --- | --- | --- |
11
- | SF | [setup-forge](setup-forge/workflow.md) | 4 | Architect | Initialize environment, detect tools, set capability tier |
11
+ | SF | [setup-forge](setup-forge/workflow.md) | 5 | Architect | Initialize environment, detect tools, set capability tier |
12
12
  | AN | [analyze-source](analyze-source/workflow.md) | 7 | Architect | Discover skillable units in a repo, produce recommended briefs |
13
13
  | BS | [brief-skill](brief-skill/workflow.md) | 5 | Architect | Design a skill scope through guided discovery |
14
- | CS | [create-skill](create-skill/workflow.md) | 8 | Surgeon | Compile a skill from brief with provenance (supports --batch) |
15
- | QS | [quick-skill](quick-skill/workflow.md) | 6 | Surgeon | Fast skill from package name or GitHub URL — no brief needed |
16
- | SS | [create-stack-skill](create-stack-skill/workflow.md) | 9 | Surgeon | Consolidated project stack skill with integration patterns |
14
+ | CS | [create-skill](create-skill/workflow.md) | 8 | Architect | Compile a skill from brief with provenance (supports --batch) |
15
+ | QS | [quick-skill](quick-skill/workflow.md) | 6 | Architect | Fast skill from package name or GitHub URL — no brief needed |
16
+ | SS | [create-stack-skill](create-stack-skill/workflow.md) | 9 | Architect | Consolidated project stack skill with integration patterns (code-mode + compose-mode) |
17
+ | VS | [verify-stack](verify-stack/workflow.md) | 6 | Audit | Validate tech stack feasibility against architecture and PRD |
18
+ | RA | [refine-architecture](refine-architecture/workflow.md) | 6 | Architect | Improve architecture doc using verified skill data |
17
19
  | US | [update-skill](update-skill/workflow.md) | 7 | Surgeon | Regenerate after source changes, preserving \[MANUAL\] sections |
18
20
  | AS | [audit-skill](audit-skill/workflow.md) | 6 | Audit | Drift detection between skill and current source code |
19
- | TS | [test-skill](test-skill/workflow.md) | 6 | Audit | Cognitive completeness verification — quality gate before export |
21
+ | TS | [test-skill](test-skill/workflow.md) | 7 | Audit | Cognitive completeness verification — quality gate before export |
20
22
  | EX | [export-skill](export-skill/workflow.md) | 6 | Delivery | Package for distribution, inject into CLAUDE.md/AGENTS.md |
21
23
 
22
24
  ## Typical Flows
@@ -39,6 +41,12 @@ SF → BS → CS → TS → EX
39
41
  SF → QS → EX
40
42
  ```
41
43
 
44
+ **Pre-code stack verification:**
45
+
46
+ ```
47
+ SF → CS×N (per library) → VS → RA → SS (compose) → TS → EX
48
+ ```
49
+
42
50
  **Maintenance:**
43
51
 
44
52
  ```
@@ -75,10 +83,8 @@ Each workflow follows a consistent structure:
75
83
  │ └── ...
76
84
  ├── data/ # Reference data — schemas, rules, patterns
77
85
  │ └── *.md
78
- ├── templates/ # Output skeletons (only analyze-source, test-skill)
79
- └── *-template.md
80
- ├── workflow-plan-*.md # Design plan (build artifact)
81
- └── validation-report.md # BMAD validation results (build artifact)
86
+ └── templates/ # Output skeletons (only analyze-source, test-skill)
87
+ └── *-template.md
82
88
  ```
83
89
 
84
90
  ### Step Loading
@@ -89,9 +95,9 @@ Steps execute sequentially via just-in-time loading. Only the current step is in
89
95
 
90
96
  ### setup-forge (SF)
91
97
 
92
- **4 steps** | **Data:** tier-rules.md
98
+ **5 steps** | **Data:** tier-rules.md
93
99
 
94
- Detects available tools (ast-grep, gh, QMD), determines the capability tier (Quick/Forge/Deep), writes `forge-tier.yaml` to the sidecar, and optionally indexes the project. Run this first — all other workflows adapt behavior to the detected tier.
100
+ Detects available tools (ast-grep, gh, QMD), determines the capability tier (Quick/Forge/Forge+/Deep), writes `forge-tier.yaml` to the sidecar, and optionally indexes the project. Run this first — all other workflows adapt behavior to the detected tier.
95
101
 
96
102
  ### analyze-source (AN)
97
103
 
@@ -101,13 +107,13 @@ Brownfield onboarding entry point. Scans project structure, identifies skillable
101
107
 
102
108
  ### brief-skill (BS)
103
109
 
104
- **5 steps** | **Data:** skill-brief-schema.md
110
+ **5 steps** | **Data:** skill-brief-schema.md, scope-templates.md
105
111
 
106
112
  Interactive guided discovery. Gathers user intent (target repo, language, what to skill), analyzes the target to understand boundaries, walks through scope definition with the user, confirms the brief, then writes a validated `skill-brief.yaml`.
107
113
 
108
114
  ### create-skill (CS)
109
115
 
110
- **8 steps** | **Data:** extraction-patterns.md, skill-sections.md
116
+ **8 primary steps (11 step files including sub-steps)** | **Data:** extraction-patterns.md, extraction-patterns-tracing.md, skill-sections.md, tier-degradation-rules.md, compile-assembly-rules.md, source-resolution-protocols.md
111
117
 
112
118
  The core compilation engine. Loads a brief, checks ecosystem context, extracts source with AST-backed provenance (T1 confidence when ast-grep available), enriches with usage patterns, compiles into agentskills.io-compliant sections, validates structural integrity, generates the `SKILL.md` artifact, and produces an evidence report. Supports `--batch` for processing multiple briefs.
113
119
 
@@ -119,13 +125,25 @@ Fastest path to a skill. Accepts a GitHub URL or package name, resolves to sourc
119
125
 
120
126
  ### create-stack-skill (SS)
121
127
 
122
- **9 steps** | **Data:** integration-patterns.md, manifest-patterns.md, stack-skill-template.md
128
+ **9 steps** | **Data:** integration-patterns.md, manifest-patterns.md, stack-skill-template.md, compose-mode-rules.md
129
+
130
+ Two modes: **Code-mode** analyzes dependency manifests and co-import patterns from actual source code. **Compose-mode** synthesizes a stack skill from pre-generated individual skills + architecture document (no codebase required). Both produce the same output format — consolidated stack skill with integration patterns.
131
+
132
+ ### verify-stack (VS)
133
+
134
+ **6 steps** | **Data:** integration-verification-rules.md, coverage-patterns.md, feasibility-report-template.md
135
+
136
+ Pre-code verification engine. Cross-references generated skills against architecture and PRD documents. Three passes: coverage verification (does a skill exist for each tech?), integration verification (do the APIs actually connect?), and requirements verification (does the stack cover the PRD?). Produces a feasibility report with evidence-backed verdicts and prescriptive recommendations. Re-runnable — swap libraries, regenerate skills, re-verify.
137
+
138
+ ### refine-architecture (RA)
139
+
140
+ **6 steps** | **Data:** refinement-rules.md
123
141
 
124
- Analyzes dependency manifests (package.json, requirements.txt, Cargo.toml, etc.) to detect libraries, ranks by import frequency, discovers co-import integration patterns between libraries, compiles a consolidated stack skill documenting how libraries connect, validates, and generates output.
142
+ Architecture improvement engine. Takes the original architecture document and refines it using verified skill data and VS feasibility findings. Fills gaps, flags issues, suggests improvements all backed by specific API evidence from the generated skills. Produces a refined architecture document.
125
143
 
126
144
  ### update-skill (US)
127
145
 
128
- **7 steps** | **Data:** manual-section-rules.md, merge-conflict-rules.md
146
+ **7 steps** | **Data:** manual-section-rules.md, merge-conflict-rules.md, remote-source-resolution.md (tier-degradation-rules shared from create-skill)
129
147
 
130
148
  Surgical update engine. Loads the existing skill, detects what changed in source since last compilation, re-extracts only affected exports with fresh provenance, merges new extractions while preserving all `[MANUAL]` developer-authored content, validates the merged result, writes the updated skill, and produces a change report.
131
149
 
@@ -137,7 +155,7 @@ Drift detection engine. Loads the skill under audit, re-indexes current source t
137
155
 
138
156
  ### test-skill (TS)
139
157
 
140
- **6 steps** | **Data:** output-section-formats.md, scoring-rules.md | **Templates:** test-report-template.md
158
+ **7 steps** | **Data:** output-section-formats.md, scoring-rules.md, source-access-protocol.md | **Templates:** test-report-template.md
141
159
 
142
160
  Quality gate before export. Loads the skill, detects test mode (naive for Quick tier, contextual for Forge/Deep), runs coverage checks against source, runs coherence checks for internal consistency, scores using weighted rubric, and produces a completeness report with pass/fail gate decision.
143
161
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Defines the output contract for skill-brief.yaml files generated by analyze-source. Each generated brief must conform to this schema to be consumable by brief-skill and create-skill downstream workflows.
6
6
 
7
- ## Required Fields (9)
7
+ ## Required Fields
8
8
 
9
9
  | Field | Type | Constraint | Description |
10
10
  |-------|------|------------|-------------|
@@ -14,7 +14,7 @@ Defines the output contract for skill-brief.yaml files generated by analyze-sour
14
14
  | language | string | Recognized language | Primary programming language |
15
15
  | scope | object | See Scope Object below | Boundary definition |
16
16
  | description | string | 1-3 sentences | What the skill covers |
17
- | forge_tier | string | `quick` / `forge` / `deep` | Inherited from forge-tier.yaml |
17
+ | forge_tier | string | `Quick` / `Forge` / `Forge+` / `Deep` | Inherited from forge-tier.yaml (Title Case) |
18
18
  | created | string | ISO date `YYYY-MM-DD` | Generation date |
19
19
  | created_by | string | user_name from config | Who generated the brief |
20
20
 
@@ -26,6 +26,13 @@ Defines the output contract for skill-brief.yaml files generated by analyze-sour
26
26
  | doc_urls | array | `{url, label}` objects | Documentation URLs for T3 content. Required when `source_type: "docs-only"` |
27
27
  | `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/"). |
28
28
  | `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/"). |
29
+ | `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"`. |
30
+
31
+ When `source_type: "docs-only"`:
32
+ - `source_repo` becomes optional (set to doc site URL for reference)
33
+ - `doc_urls` must have at least one entry
34
+ - `source_authority` is forced to `community` (T3 external documentation cannot be `official`)
35
+ - All extracted content gets `[EXT:{url}]` citations
29
36
 
30
37
  ## Version Detection
31
38
 
@@ -36,8 +43,12 @@ During brief generation, attempt to auto-detect the source version before defaul
36
43
  - **Rust:** `Cargo.toml` `[package] version` (static) → if `version = { workspace = true }`, resolve from workspace root `Cargo.toml` → `git describe --tags --abbrev=0`
37
44
  - **Go:** version tag from `go.mod` or `git describe --tags --abbrev=0`
38
45
 
46
+ 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.
47
+
39
48
  If detection succeeds, use the detected version. If it fails or returns a non-semver value, fall back to `"1.0.0"`.
40
49
 
50
+ 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.
51
+
41
52
  ## Scope Object
42
53
 
43
54
  ```yaml
@@ -57,6 +68,7 @@ scope:
57
68
  | full-library | Entire codebase of a unit |
58
69
  | specific-modules | Selected components or packages |
59
70
  | public-api | Only exported interfaces |
71
+ | docs-only | When source_type is docs-only — no source code available, all content from doc_urls |
60
72
 
61
73
  ## YAML Template
62
74
 
@@ -74,7 +86,7 @@ scope:
74
86
  - '{exclude_pattern}'
75
87
  notes: '{scope_rationale}'
76
88
  description: '{1-3 sentence description}'
77
- forge_tier: '{forge_tier}'
89
+ forge_tier: '{Quick|Forge|Forge+|Deep}'
78
90
  created: '{current_date}'
79
91
  created_by: '{user_name}'
80
92
  ```
@@ -84,10 +96,11 @@ created_by: '{user_name}'
84
96
  1. **Name uniqueness**: No duplicate names within forge_data_folder
85
97
  2. **Source accessibility**: source_repo path must exist or be reachable
86
98
  3. **Language recognized**: Must be a known programming language
87
- 4. **Scope type valid**: Must match one of the three defined types
88
- 5. **Include patterns**: At least one include glob pattern required
99
+ 4. **Scope type valid**: Must match one of the four defined types (full-library, specific-modules, public-api, docs-only)
100
+ 5. **Include patterns**: At least one include glob pattern required (exception: `docs-only` scope, where include patterns are optional since no source code is available)
89
101
  6. **Forge tier match**: Must match value in forge-tier.yaml
90
102
  7. **Docs-only mode**: When `source_type: "docs-only"`, `doc_urls` required (>= 1), `source_repo` optional
103
+ 8. Each `doc_urls` entry must have a valid `url` field
91
104
 
92
105
  ## Output Location
93
106
 
@@ -111,4 +111,5 @@ Flag units as stack skill candidates when:
111
111
  |------------|-------------------|
112
112
  | Quick | File structure analysis: directory trees, manifest files, entry points, naming conventions |
113
113
  | Forge | AST analysis: export surfaces, import graphs, dependency trees, type hierarchies |
114
+ | Forge+ | AST + CCC: semantic file pre-ranking before structural analysis, CCC signals for relevance scoring |
114
115
  | Deep | AST + QMD: temporal evolution, refactoring patterns, semantic relationships, architectural drift |
@@ -4,7 +4,7 @@ description: 'Initialize analysis workflow — load config, detect continuation,
4
4
 
5
5
  nextStepFile: './step-02-scan-project.md'
6
6
  continueFile: './step-01b-continue.md'
7
- outputFile: '{output_folder}/analyze-source-report-{project_name}.md'
7
+ outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
8
8
  templateFile: '../templates/analysis-report-template.md'
9
9
  ---
10
10
 
@@ -73,10 +73,10 @@ Look for {outputFile}.
73
73
 
74
74
  **Check forge-tier.yaml:**
75
75
  - Look for `{sidecar_path}/forge-tier.yaml`
76
- - **IF missing:** HARD HALT — "**Cannot proceed.** forge-tier.yaml not found at `{sidecar_path}/forge-tier.yaml`. Please run the setup-forge workflow first to configure your forge tier (Quick/Forge/Deep)."
76
+ - **IF missing:** HARD HALT — "**Cannot proceed.** forge-tier.yaml not found at `{sidecar_path}/forge-tier.yaml`. Please run the setup-forge workflow first to configure your forge tier (Quick/Forge/Forge+/Deep)."
77
77
  - **IF found:** Read and note the forge tier value
78
78
 
79
- **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.
79
+ **Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
80
80
 
81
81
  "**Forge tier detected:** {tier} — analysis depth will be calibrated accordingly."
82
82
 
@@ -118,7 +118,7 @@ Wait for user input. Document any hints provided.
118
118
 
119
119
  ### 5. Check for Existing Skills
120
120
 
121
- Scan `{forge_data_folder}/` for existing `skill-brief.yaml` files.
121
+ Scan `{forge_data_folder}/*/skill-brief.yaml` (one level deep — each skill has its own subdirectory) for existing skill briefs.
122
122
 
123
123
  **IF existing skills found:**
124
124
  "**Existing skills detected:**
@@ -2,7 +2,7 @@
2
2
  name: 'step-01b-continue'
3
3
  description: 'Handle workflow continuation from previous session'
4
4
 
5
- outputFile: '{output_folder}/analyze-source-report-{project_name}.md'
5
+ outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
6
6
  nextStepOptions:
7
7
  step-02: './step-02-scan-project.md'
8
8
  step-03: './step-03-identify-units.md'
@@ -3,7 +3,7 @@ name: 'step-02-scan-project'
3
3
  description: 'Map project structure, detect service boundaries, and identify package manifests'
4
4
 
5
5
  nextStepFile: './step-03-identify-units.md'
6
- outputFile: '{output_folder}/analyze-source-report-{project_name}.md'
6
+ outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
7
7
  heuristicsFile: '../data/unit-detection-heuristics.md'
8
8
  ---
9
9
 
@@ -3,7 +3,7 @@ name: 'step-03-identify-units'
3
3
  description: 'Classify discrete skillable units from scan results using detection heuristics and assign scope types'
4
4
 
5
5
  nextStepFile: './step-04-map-and-detect.md'
6
- outputFile: '{output_folder}/analyze-source-report-{project_name}.md'
6
+ outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
7
7
  heuristicsFile: '../data/unit-detection-heuristics.md'
8
8
  ---
9
9
 
@@ -3,7 +3,7 @@ name: 'step-04-map-and-detect'
3
3
  description: 'Map exports per unit and detect cross-unit integration points, flag stack skill candidates'
4
4
 
5
5
  nextStepFile: './step-05-recommend.md'
6
- outputFile: '{output_folder}/analyze-source-report-{project_name}.md'
6
+ outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
7
7
  heuristicsFile: '../data/unit-detection-heuristics.md'
8
8
  ---
9
9
 
@@ -81,6 +81,10 @@ DO NOT BE LAZY — For EACH qualifying unit, launch a subprocess (or analyze in
81
81
  2. Counts and categorizes exports based on forge tier:
82
82
  - **Quick tier:** Count files by type, identify index/barrel files, list directory structure
83
83
  - **Forge tier:** Parse export statements, identify public API surface, count exported functions/classes/types
84
+ - **Forge+ tier:** All Forge analysis plus:
85
+ - If `tools.ccc` is true: run `ccc_bridge.search("{unit_name} exports public API", top_k=15)` to discover semantically relevant files beyond directory scan
86
+ - Merge CCC-discovered files with scoped file list — files from CCC that are within the unit's directory are added to the analysis queue
87
+ - Record CCC signals in per-unit findings: top 3 CCC-ranked file names (or "—" if no ccc results)
84
88
  - **Deep tier:** All Forge analysis plus:
85
89
  - ast-grep structural export extraction: `ast-grep -p 'export $$$' --lang typescript` or equivalent per language to build a verified export inventory
86
90
  - ast-grep type/interface mapping: `ast-grep -p 'interface $NAME' --lang typescript` or `ast-grep -p 'class $NAME($$$)' --lang python`
@@ -96,9 +100,9 @@ DO NOT BE LAZY — For EACH qualifying unit, launch a subprocess (or analyze in
96
100
 
97
101
  **Per-unit export summary:**
98
102
 
99
- | Unit | Files | Exports | Export Pattern | API Surface | Scripts/Assets |
100
- |------|-------|---------|----------------|-------------|----------------|
101
- | {name} | {count} | {count} | {pattern} | {small/medium/large} | {N scripts, M assets or --} |
103
+ | Unit | Files | Exports | Export Pattern | API Surface | Scripts/Assets | CCC Signals |
104
+ |------|-------|---------|----------------|-------------|----------------|-------------|
105
+ | {name} | {count} | {count} | {pattern} | {small/medium/large} | {N scripts, M assets or --} | {CCC signals or --} |
102
106
 
103
107
  ### 3. Map Import Graph
104
108
 
@@ -3,7 +3,7 @@ name: 'step-05-recommend'
3
3
  description: 'Present unit recommendations with rationale for user confirmation or rejection'
4
4
 
5
5
  nextStepFile: './step-06-generate-briefs.md'
6
- outputFile: '{output_folder}/analyze-source-report-{project_name}.md'
6
+ outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
7
7
  schemaFile: '../data/skill-brief-schema.md'
8
8
  advancedElicitationTask: '{project-root}/_bmad/core/workflows/advanced-elicitation/workflow.xml'
9
9
  partyModeWorkflow: '{project-root}/_bmad/core/workflows/party-mode/workflow.md'
@@ -2,7 +2,7 @@
2
2
  name: 'step-06-generate-briefs'
3
3
  description: 'Generate skill-brief.yaml per confirmed unit, write analysis summary, recommend next workflow'
4
4
 
5
- outputFile: '{output_folder}/analyze-source-report-{project_name}.md'
5
+ outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
6
6
  schemaFile: '../data/skill-brief-schema.md'
7
7
  ---
8
8
 
@@ -218,7 +218,7 @@ nextWorkflow: '{primary recommendation}'
218
218
  ### ✅ SUCCESS:
219
219
 
220
220
  - Every confirmed unit has a skill-brief.yaml generated and validated
221
- - All 9 required schema fields present and valid in each brief
221
+ - All required schema fields present and all 8 validation rules passed in each brief
222
222
  - Files written to correct paths in forge_data_folder
223
223
  - User confirmed before files were written
224
224
  - Next workflow recommended per unit
@@ -2,7 +2,7 @@
2
2
  name: analyze-source
3
3
  description: Decomposition engine — discover what to skill, recommend stack skill
4
4
  web_bundle: true
5
- installed_path: '{project-root}/_bmad/skf/workflows/analyze-source'
5
+ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/analyze-source'
6
6
  ---
7
7
 
8
8
  # Analyze Source
@@ -24,7 +24,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/analyze-source'
24
24
  - **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
25
25
  - **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array
26
26
  - **Append-Only Building**: Build the analysis report by appending content as directed to the output file
27
- - **Tier-Aware Analysis**: Scanning depth adapts to forge tier — Quick (file structure), Forge (AST), Deep (AST+QMD)
27
+ - **Tier-Aware Analysis**: Scanning depth adapts to forge tier — Quick (file structure), Forge (AST), Forge+ (AST + CCC semantic pre-ranking), Deep (AST+QMD)
28
28
 
29
29
  ### Step Processing Rules
30
30
 
@@ -13,15 +13,15 @@ nextWorkflow: ''
13
13
  previousWorkflow: 'create-skill'
14
14
  ---
15
15
 
16
- # Drift Report: {{skill_name}}
16
+ # Drift Report: {skill_name}
17
17
 
18
18
  ## Audit Summary
19
19
 
20
- **Skill:** {{skill_name}}
21
- **Source:** {{source_path}}
22
- **Tier:** {{forge_tier}}
23
- **Date:** {{date}}
24
- **Overall Drift Score:** {{drift_score}}
20
+ **Skill:** {skill_name}
21
+ **Source:** {source_path}
22
+ **Tier:** {forge_tier}
23
+ **Date:** {date}
24
+ **Overall Drift Score:** {drift_score}
25
25
 
26
26
  | Category | Count |
27
27
  |----------|-------|
@@ -48,5 +48,5 @@
48
48
  |-------|--------|-------------|
49
49
  | T1 | AST extraction (ast-grep) | High — structural truth |
50
50
  | T1-low | Text pattern matching (no AST) | Moderate — pattern-based |
51
- | T2 | QMD temporal context | High — evidence-backed |
51
+ | T2 | QMD semantic context | High — evidence-backed temporal context |
52
52
  | T3 | External documentation reference | Variable — secondary source |
@@ -82,10 +82,10 @@ Load `{sidecar_path}/forge-tier.yaml` to detect available tools.
82
82
  - HALT workflow
83
83
 
84
84
  **If found:**
85
- - Extract tier level: Quick / Forge / Deep
85
+ - Extract tier level: Quick / Forge / Forge+ / Deep
86
86
  - Extract available tools: gh_bridge, ast_bridge, qmd_bridge
87
87
 
88
- **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.
88
+ **Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
89
89
 
90
90
  ### 3. Load Skill Artifacts
91
91
 
@@ -152,6 +152,7 @@ Create `{outputFile}` from `{templateFile}`:
152
152
  **Analysis plan based on tier:**
153
153
  - {Quick: text-diff comparison (T1-low confidence)}
154
154
  - {Forge: AST structural comparison (T1 confidence)}
155
+ - {Forge+: AST structural comparison + CCC-assisted rename detection (T1 confidence)}
155
156
  - {Deep: AST structural + QMD semantic comparison (T1 + T2 confidence)}
156
157
 
157
158
  **Ready to begin drift analysis?**"
@@ -68,6 +68,11 @@ Based on forge tier detected in Step 01:
68
68
  - Extract: export name, type (function/class/type/const), full signature, file path, line number
69
69
  - Confidence label: T1
70
70
 
71
+ **Forge+ tier (ast-grep + ccc available):**
72
+ - Identical extraction to Forge tier: use ast_bridge for AST extraction per source file
73
+ - Confidence label: T1
74
+ - CCC rename detection available (see section 4b)
75
+
71
76
  **Deep tier (ast-grep + QMD available):**
72
77
  - Forge extraction (above) PLUS
73
78
  - Query qmd_bridge for temporal context: when exports were added, modification history, usage frequency
@@ -134,9 +139,26 @@ Append temporal metadata to each export in the snapshot.
134
139
  Log: "No QMD extraction collection found for {skill_name}. Temporal enrichment skipped. Re-run [CS] Create Skill to generate the collection."
135
140
  Continue without T2 enrichment — this is not an error.
136
141
 
137
- **IF forge tier is Quick or Forge:**
142
+ **IF forge tier is Quick, Forge, or Forge+:**
138
143
  Skip this section. Temporal context requires Deep tier.
139
144
 
145
+ ### 4b. CCC Rename Detection (Forge+ and Deep with ccc)
146
+
147
+ **IF `tools.ccc` is true in forge-tier.yaml:**
148
+
149
+ For each export in the skill baseline that was NOT found at its recorded file path during re-extraction (potential "deleted" export):
150
+
151
+ 1. Run `ccc_bridge.search("{export_name}", source_root, top_k=5)` to find candidate current locations
152
+ 2. If CCC returns files containing the export name:
153
+ - Run ast-grep verification on each candidate file
154
+ - If verified at a new location: reclassify from "deleted" to "moved" with the new file:line reference
155
+ - This reduces false-positive structural drift findings where exports were relocated, not removed
156
+ 3. If CCC returns no results or verification fails: keep the "deleted" classification
157
+
158
+ CCC failures: skip rename detection silently, proceed with standard structural diff.
159
+
160
+ **IF `tools.ccc` is false:** Skip this section silently.
161
+
140
162
  ### 5. Validate Extraction Completeness
141
163
 
142
164
  "**Extraction complete.**