bmad-module-skill-forge 0.5.0 → 0.6.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 (84) hide show
  1. package/README.md +2 -1
  2. package/docs/agents.md +3 -0
  3. package/docs/concepts.md +23 -5
  4. package/docs/examples.md +30 -1
  5. package/docs/getting-started.md +11 -0
  6. package/docs/how-it-works.md +49 -25
  7. package/docs/index.md +1 -1
  8. package/docs/workflows.md +6 -6
  9. package/package.json +2 -2
  10. package/src/agents/forger.agent.yaml +1 -1
  11. package/src/forger/forge-tier.yaml +17 -1
  12. package/src/forger/preferences.yaml +1 -1
  13. package/src/knowledge/ccc-bridge.md +110 -0
  14. package/src/knowledge/confidence-tiers.md +3 -3
  15. package/src/knowledge/overview.md +2 -1
  16. package/src/knowledge/progressive-capability.md +12 -4
  17. package/src/knowledge/qmd-registry.md +14 -0
  18. package/src/knowledge/skf-knowledge-index.csv +2 -1
  19. package/src/module-help.csv +1 -1
  20. package/src/module.yaml +1 -1
  21. package/src/workflows/README.md +1 -1
  22. package/src/workflows/analyze-source/data/skill-brief-schema.md +1 -1
  23. package/src/workflows/analyze-source/data/unit-detection-heuristics.md +1 -0
  24. package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
  25. package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +7 -3
  26. package/src/workflows/analyze-source/validation-report.md +2 -2
  27. package/src/workflows/analyze-source/workflow-plan-analyze-source.md +1 -1
  28. package/src/workflows/audit-skill/data/drift-report-template.md +6 -6
  29. package/src/workflows/audit-skill/steps-c/step-01-init.md +2 -2
  30. package/src/workflows/audit-skill/steps-c/step-02-re-index.md +18 -1
  31. package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +5 -5
  32. package/src/workflows/audit-skill/validation-report.md +3 -3
  33. package/src/workflows/audit-skill/workflow-plan-audit-skill.md +2 -2
  34. package/src/workflows/audit-skill/workflow.md +1 -1
  35. package/src/workflows/brief-skill/data/skill-brief-schema.md +3 -3
  36. package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +3 -3
  37. package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +15 -0
  38. package/src/workflows/create-skill/data/extraction-patterns.md +37 -1
  39. package/src/workflows/create-skill/data/skill-sections.md +2 -2
  40. package/src/workflows/create-skill/steps-c/step-01-load-brief.md +5 -3
  41. package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +2 -2
  42. package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +157 -0
  43. package/src/workflows/create-skill/steps-c/step-03-extract.md +10 -1
  44. package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +5 -5
  45. package/src/workflows/create-skill/steps-c/step-04-enrich.md +8 -8
  46. package/src/workflows/create-skill/steps-c/step-06-validate.md +1 -1
  47. package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +32 -0
  48. package/src/workflows/create-skill/steps-c/step-08-report.md +1 -0
  49. package/src/workflows/create-skill/validation-report.md +1 -1
  50. package/src/workflows/create-skill/workflow-plan-create-skill.md +4 -2
  51. package/src/workflows/create-skill/workflow.md +1 -1
  52. package/src/workflows/create-stack-skill/data/stack-skill-template.md +1 -1
  53. package/src/workflows/create-stack-skill/steps-c/step-01-init.md +3 -2
  54. package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +10 -0
  55. package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +1 -1
  56. package/src/workflows/create-stack-skill/validation-report.md +1 -1
  57. package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +2 -2
  58. package/src/workflows/create-stack-skill/workflow.md +1 -1
  59. package/src/workflows/export-skill/steps-c/step-01-load-skill.md +1 -1
  60. package/src/workflows/export-skill/steps-c/step-02-package.md +1 -1
  61. package/src/workflows/export-skill/workflow-plan-export-skill.md +1 -1
  62. package/src/workflows/quick-skill/data/skill-template.md +8 -0
  63. package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +1 -3
  64. package/src/workflows/setup-forge/data/tier-rules.md +16 -6
  65. package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +32 -15
  66. package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +148 -0
  67. package/src/workflows/setup-forge/steps-c/step-02-write-config.md +24 -6
  68. package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +29 -6
  69. package/src/workflows/setup-forge/steps-c/step-04-report.md +14 -2
  70. package/src/workflows/setup-forge/validation-report.md +1 -1
  71. package/src/workflows/setup-forge/workflow-plan-setup-forge.md +11 -9
  72. package/src/workflows/setup-forge/workflow.md +1 -1
  73. package/src/workflows/test-skill/data/scoring-rules.md +5 -0
  74. package/src/workflows/test-skill/steps-c/step-01-init.md +2 -2
  75. package/src/workflows/test-skill/templates/test-report-template.md +3 -0
  76. package/src/workflows/test-skill/validation-report.md +2 -2
  77. package/src/workflows/test-skill/workflow-plan-test-skill.md +2 -2
  78. package/src/workflows/update-skill/steps-c/step-01-init.md +3 -2
  79. package/src/workflows/update-skill/steps-c/step-03-re-extract.md +19 -2
  80. package/src/workflows/update-skill/steps-c/step-05-validate.md +1 -1
  81. package/src/workflows/update-skill/steps-c/step-06-write.md +2 -2
  82. package/src/workflows/update-skill/validation-report.md +1 -1
  83. package/src/workflows/update-skill/workflow-plan-update-skill.md +1 -1
  84. package/tools/cli/commands/status.js +2 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Principle
4
4
 
5
- Every capability tier — Quick, Forge, and Deep — produces legitimate, useful skills. Tiers describe what tools are available, not a quality hierarchy. A Quick skill is complete at its tier; a Deep skill adds depth, not correctness. Framing is always positive: describe what each tier enables, never what it lacks.
5
+ Every capability tier — Quick, Forge, Forge+, and Deep — produces legitimate, useful skills. Tiers describe what tools are available, not a quality hierarchy. A Quick skill is complete at its tier; a Deep skill adds depth, not correctness. Framing is always positive: describe what each tier enables, never what it lacks.
6
6
 
7
7
  ## Rationale
8
8
 
@@ -24,6 +24,7 @@ With progressive capability:
24
24
  | --- | --- | --- | --- |
25
25
  | Quick | No tools required | Fast, template-driven, package-name resolution | Speed-first skill creation |
26
26
  | Forge | ast-grep available | AST-backed structural analysis, line-level citations | Precision-focused compilation |
27
+ | Forge+ | ast-grep + ccc | Semantic discovery + AST verification, pre-ranked extraction | Intelligent precision compilation |
27
28
  | Deep | ast-grep + gh + qmd | AST + GitHub exploration + QMD synthesis, maximum provenance | Full intelligence pipeline |
28
29
 
29
30
  ## Pattern Examples
@@ -35,12 +36,13 @@ With progressive capability:
35
36
  **Implementation:** Each tool is verified by executing its version command — presence in PATH is insufficient. The tier is the highest level where all required tools pass verification:
36
37
 
37
38
  ```
38
- ast-grep --version → required for Forge
39
+ ast-grep --version → required for Forge and above
40
+ ccc --help + ccc doctor → required for Forge+
39
41
  gh --version → required for Deep
40
42
  qmd status → required for Deep
41
43
  ```
42
44
 
43
- If ast-grep passes but gh fails, the tier is Forge (not a "degraded Deep").
45
+ If ast-grep passes but gh fails, the tier is Forge (not a "degraded Deep"). If ast-grep and ccc pass but gh and qmd fail, the tier is Forge+ (not a "degraded Deep").
44
46
 
45
47
  **Key Points:**
46
48
  - Tools must be functional, not just installed
@@ -59,6 +61,10 @@ Quick: "Fast, template-driven skill creation — package-name resolution and
59
61
  Forge: "AST-backed structural analysis — line-level citations with verified
60
62
  signatures. Precision-focused compilation."
61
63
 
64
+ Forge+: "Semantic-guided precision compilation — cocoindex-code maps the codebase
65
+ semantically before AST extraction runs. Every skill begins with a ranked
66
+ discovery pass, then AST-backed verification."
67
+
62
68
  Deep: "Full intelligence pipeline — AST verification plus GitHub exploration
63
69
  and QMD knowledge synthesis. Maximum provenance depth."
64
70
  ```
@@ -75,6 +81,7 @@ Deep: "Full intelligence pipeline — AST verification plus GitHub exploration
75
81
  **Implementation:**
76
82
  - **Quick:** Reads source files, applies pattern matching for exports and signatures, produces T1-low citations. Uses `gh_bridge` for file structure when available as a convenience, not a requirement.
77
83
  - **Forge:** Uses `ast_bridge.scan_definitions()` for structural parsing, produces T1 citations with exact AST node types. Falls back to source reading for files ast-grep cannot parse.
84
+ - **Forge+:** Identical extraction to Forge, plus ccc semantic pre-discovery narrows the file set before ast-grep runs. For large codebases, `ccc_bridge.search()` produces a ranked candidate list. ast-grep operates on that list rather than the full tree. All results remain T1 (AST-verified) — ccc is upstream, not in the extraction chain.
78
85
  - **Deep:** Identical extraction to Forge, plus QMD enrichment in a separate step. T2 annotations layer on top of the T1 base without replacing it.
79
86
 
80
87
  **Key Points:**
@@ -89,6 +96,7 @@ Deep: "Full intelligence pipeline — AST verification plus GitHub exploration
89
96
  **Implementation:**
90
97
  - **Quick (Naive mode):** Export Coverage 45%, Signature Accuracy 25%, Type Coverage 20%, External Validation 10%. No coherence check — AST verification unavailable. When external validation tools (skill-check, tessl) are unavailable, their 10% is redistributed proportionally across the remaining categories.
91
98
  - **Forge (Contextual mode):** Export Coverage 40%, Signature Accuracy 25%, Type Coverage 15%, Coherence 20%. Full AST-backed verification.
99
+ - **Forge+ (Contextual mode):** Same weights as Forge. The improved extraction coverage (from ccc pre-ranking) may increase T1 count and reduce gaps, but the scoring weights themselves do not change.
92
100
  - **Deep (Contextual mode):** Same weights as Forge, plus cross-repo verification and QMD coherence checks feed into the coherence score.
93
101
 
94
102
  **Key Points:**
@@ -104,7 +112,7 @@ When a tool becomes unavailable mid-session (e.g., ast-grep uninstalled between
104
112
  3. New extractions use the current tier's capabilities
105
113
  4. The tier change is logged in the sidecar for audit trail
106
114
 
107
- When source is remote (GitHub URL) and tier is Forge or Deep:
115
+ When source is remote (GitHub URL) and tier is Forge, Forge+, or Deep:
108
116
  1. AST extraction requires local files — ast-grep cannot operate on remote URLs
109
117
  2. The extraction step attempts an **ephemeral shallow clone** to a system temp path (if `git` is available)
110
118
  3. If the clone succeeds: AST extraction proceeds on the local clone, then the temp directory is cleaned up
@@ -95,6 +95,20 @@ Human readability alone is not sufficient justification — the file is already
95
95
 
96
96
  **Rejection reason:** Decision artifact, not a compilation input. The analyze-source report tells users which skills to create, but create-stack-skill works from individual skill artifacts, not the analysis report. The only consumer would be a human reading the file — which they can do directly.
97
97
 
98
+ ## Relationship to CCC Index Registry
99
+
100
+ The `ccc_index_registry` array in forge-tier.yaml is a **parallel but separate** registry from `qmd_collections`. They track different things:
101
+
102
+ | Aspect | QMD Collections | CCC Index Registry |
103
+ |--------|----------------|-------------------|
104
+ | **What is indexed** | Curated workflow artifacts (SKILL.md, briefs, temporal data) | Source code (the actual codebase) |
105
+ | **Index engine** | QMD (BM25 + optional vector search) | cocoindex-code (AST + vector embeddings) |
106
+ | **Lifecycle** | Per-skill: created by create-skill, consumed by audit/update-skill | Per-project: created by setup-forge, verified by create-skill |
107
+ | **Janitor** | setup-forge step-03 (orphan/stale QMD collection cleanup) | setup-forge step-03 section 5b (stale path cleanup) |
108
+ | **Availability** | Deep tier only | Forge+ and Deep tiers |
109
+
110
+ These registries are orthogonal — they never reference each other, and their janitor sections operate independently.
111
+
98
112
  ## Pattern Examples
99
113
 
100
114
  ### Example 1: Producer Registration (create-skill)
@@ -2,7 +2,8 @@ id,name,description,tags,tier,fragment_file
2
2
  overview,Knowledge Overview,"Entry point — knowledge map, JiT loading protocol, relationship to workflow data/ files","knowledge,navigation,jit-loading",core,knowledge/overview.md
3
3
  zero-hallucination,Zero Hallucination Principle,"Foundational principle — uncitable content is excluded not guessed, every claim traces to source","integrity,provenance,extraction",core,knowledge/zero-hallucination.md
4
4
  confidence-tiers,Confidence Tiers,"Trust model — T1/T1-low/T2/T3 labels, citation formats, tier interaction rules","confidence,citations,evidence,tiers",core,knowledge/confidence-tiers.md
5
- progressive-capability,Progressive Capability,"Quick/Forge/Deep philosophy — every tier is legitimate, positive framing, graceful degradation","tiers,quick,forge,deep,capability",core,knowledge/progressive-capability.md
5
+ progressive-capability,Progressive Capability,"Quick/Forge/Forge+/Deep philosophy — every tier is legitimate, positive framing, graceful degradation","tiers,quick,forge,forge+,deep,capability",core,knowledge/progressive-capability.md
6
+ ccc-bridge,CCC Bridge,"cocoindex-code semantic discovery — ccc_bridge interface, indexing lifecycle, Forge+ tier, discovery-before-extraction principle","ccc,cocoindex,semantic,discovery,forge+,bridge",core,knowledge/ccc-bridge.md
6
7
  agentskills-spec,agentskills.io Specification,"Format principles — frontmatter, progressive disclosure, directory structure, compliance rules, MCP tool naming, script quality, development methodology","agentskills,format,compliance,output,mcp,scripts,methodology",core,knowledge/agentskills-spec.md
7
8
  skill-lifecycle,Skill Lifecycle,"End-to-end pipeline — workflow connections, artifact flow, decision rules for workflow selection","lifecycle,pipeline,workflows,artifacts",core,knowledge/skill-lifecycle.md
8
9
  provenance-tracking,Provenance Tracking,"Provenance mechanism — provenance-map.json entries and file_entries, evidence reports, claim traceability","provenance,evidence,traceability,citations,file-entries",core,knowledge/provenance-tracking.md
@@ -1,5 +1,5 @@
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-config.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,
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:
@@ -91,7 +91,7 @@ Steps execute sequentially via just-in-time loading. Only the current step is in
91
91
 
92
92
  **4 steps** | **Data:** tier-rules.md
93
93
 
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.
94
+ 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
95
 
96
96
  ### analyze-source (AN)
97
97
 
@@ -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 |
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
 
@@ -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 |
@@ -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
 
@@ -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
 
@@ -499,7 +499,7 @@ All steps include: "TOOL/SUBPROCESS FALLBACK: If any instruction references a su
499
499
  - **Evidence-based approach** — every recommendation backed by specific file citations
500
500
  - **Well-placed collaborative gate** (step 05) — user has agency without slowing autonomous analysis
501
501
  - **Complete data flow** — no orphaned data, every piece feeds forward
502
- - **Tier-aware analysis depth** — adapts to Quick/Forge/Deep
502
+ - **Tier-aware analysis depth** — adapts to Quick/Forge/Forge+/Deep
503
503
  - **Continuation support** — large repo analysis can resume across sessions
504
504
  - **Stack skill candidate detection** — value beyond individual skills
505
505
  - **Schema validation before writing** — prevents downstream workflow failures
@@ -647,7 +647,7 @@ A developer onboarding a brownfield project would experience:
647
647
  - Complete evidence-based analysis pipeline with zero-hallucination principle
648
648
  - Well-placed collaborative gate at step 05 with Y/N/M + "why?" support
649
649
  - Perfect data flow — every step builds on previous work
650
- - Tier-aware analysis depth (Quick/Forge/Deep)
650
+ - Tier-aware analysis depth (Quick/Forge/Forge+/Deep)
651
651
  - Continuation support for interrupted sessions
652
652
  - Schema validation before file writing
653
653
  - Clear downstream workflow recommendations
@@ -150,7 +150,7 @@ Decomposition engine — discover what to skill, recommend stack skill. Analyzes
150
150
  **Inputs Required:**
151
151
  - Required: Project root or repo path
152
152
  - Required: SKF module config (forge_data_folder, skills_output_folder, forge_tier)
153
- - Required: forge-tier.yaml (determines Quick/Forge/Deep analysis depth)
153
+ - Required: forge-tier.yaml (determines Quick/Forge/Forge+/Deep analysis depth)
154
154
  - Optional: Scope hints (monorepo packages, service directories to focus on)
155
155
  - Optional: Exclusion patterns (vendor dirs, test dirs, generated code to skip)
156
156
  - Prerequisites: setup-forge workflow must have been run
@@ -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
  |----------|-------|
@@ -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
 
@@ -134,9 +134,26 @@ Append temporal metadata to each export in the snapshot.
134
134
  Log: "No QMD extraction collection found for {skill_name}. Temporal enrichment skipped. Re-run [CS] Create Skill to generate the collection."
135
135
  Continue without T2 enrichment — this is not an error.
136
136
 
137
- **IF forge tier is Quick or Forge:**
137
+ **IF forge tier is Quick, Forge, or Forge+:**
138
138
  Skip this section. Temporal context requires Deep tier.
139
139
 
140
+ ### 4b. CCC Rename Detection (Forge+ and Deep with ccc)
141
+
142
+ **IF `tools.ccc` is true in forge-tier.yaml:**
143
+
144
+ For each export in the skill baseline that was NOT found at its recorded file path during re-extraction (potential "deleted" export):
145
+
146
+ 1. Run `ccc_bridge.search("{export_name}", source_root, top_k=5)` to find candidate current locations
147
+ 2. If CCC returns files containing the export name:
148
+ - Run ast-grep verification on each candidate file
149
+ - If verified at a new location: reclassify from "deleted" to "moved" with the new file:line reference
150
+ - This reduces false-positive structural drift findings where exports were relocated, not removed
151
+ 3. If CCC returns no results or verification fails: keep the "deleted" classification
152
+
153
+ CCC failures: skip rename detection silently, proceed with standard structural diff.
154
+
155
+ **IF `tools.ccc` is false:** Skip this section silently.
156
+
140
157
  ### 5. Validate Extraction Completeness
141
158
 
142
159
  "**Extraction complete.**
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: 'step-04-semantic-diff'
3
- description: 'Compare QMD knowledge context for meaning-level changes (Deep tier only, skip at Quick/Forge)'
3
+ description: 'Compare QMD knowledge context for meaning-level changes (Deep tier only, skip at Quick/Forge/Forge+)'
4
4
 
5
5
  nextStepFile: './step-05-severity-classify.md'
6
6
  outputFile: '{forge_data_folder}/{skill_name}/drift-report-{timestamp}.md'
@@ -10,7 +10,7 @@ outputFile: '{forge_data_folder}/{skill_name}/drift-report-{timestamp}.md'
10
10
 
11
11
  ## STEP GOAL:
12
12
 
13
- Compare QMD knowledge context between the original skill creation and current state to detect meaning-level changes that structural diff cannot catch. This step executes ONLY at Deep tier — at Quick and Forge tiers, it appends a skip notice and auto-proceeds.
13
+ Compare QMD knowledge context between the original skill creation and current state to detect meaning-level changes that structural diff cannot catch. This step executes ONLY at Deep tier — at Quick, Forge, and Forge+ tiers, it appends a skip notice and auto-proceeds.
14
14
 
15
15
  ## MANDATORY EXECUTION RULES (READ FIRST):
16
16
 
@@ -35,7 +35,7 @@ Compare QMD knowledge context between the original skill creation and current st
35
35
  - 🚫 FORBIDDEN to repeat structural findings from Step 03
36
36
  - 💬 Use subprocess Pattern 3 (data operations) when available for QMD queries
37
37
  - ⚙️ If subprocess unavailable, query QMD in main thread
38
- - 🔀 CONDITIONAL: Skip entire analysis at Quick/Forge tier — append skip notice only
38
+ - 🔀 CONDITIONAL: Skip entire analysis at Quick/Forge/Forge+ tier — append skip notice only
39
39
 
40
40
  ## EXECUTION PROTOCOLS:
41
41
 
@@ -57,7 +57,7 @@ Compare QMD knowledge context between the original skill creation and current st
57
57
 
58
58
  ### 1. Check Forge Tier
59
59
 
60
- **IF forge tier is Quick or Forge:**
60
+ **IF forge tier is Quick, Forge, or Forge+:**
61
61
 
62
62
  Append to {outputFile}:
63
63
 
@@ -179,7 +179,7 @@ ONLY WHEN the ## Semantic Drift section (or skip notice) has been appended to {o
179
179
 
180
180
  ### ✅ SUCCESS:
181
181
 
182
- - Forge tier checked FIRST — skip gracefully at Quick/Forge
182
+ - Forge tier checked FIRST — skip gracefully at Quick/Forge/Forge+
183
183
  - Deep tier: QMD knowledge context queried and compared
184
184
  - All semantic findings have T2 confidence labels
185
185
  - Findings clearly distinguished from structural drift (T1)
@@ -413,7 +413,7 @@ The audit-skill workflow is a well-designed, cohesive 6-step pipeline that achie
413
413
  ### Strengths
414
414
 
415
415
  1. **Zero-hallucination principle** enforced consistently — every finding traces to actual code
416
- 2. **Graceful degradation** at every level — tier-aware (Quick/Forge/Deep), missing provenance (degraded mode)
416
+ 2. **Graceful degradation** at every level — tier-aware (Quick/Forge/Forge+/Deep), missing provenance (degraded mode)
417
417
  3. **Structured output** with file:line citations and confidence tier labels on all findings
418
418
  4. **Actionable remediation** — specific suggestions per finding (what to change, where, why)
419
419
  5. **Workflow chaining** — update-skill recommendation when CRITICAL/HIGH drift found
@@ -441,7 +441,7 @@ The audit-skill workflow is a well-designed, cohesive 6-step pipeline that achie
441
441
  |-------------|-------------|---------|--------|
442
442
  | Drift detection between skill and source | workflow.md + all 6 steps | High | ✅ |
443
443
  | Ferris Audit mode | workflow.md + all step role reinforcements | High | ✅ |
444
- | Tier-aware depth (Quick/Forge/Deep) | Steps 01-04 adapt per tier | High | ✅ |
444
+ | Tier-aware depth (Quick/Forge/Forge+/Deep) | Steps 01-04 adapt per tier | High | ✅ |
445
445
  | Drift report with severity levels | Steps 03-06 build categorized report | High | ✅ |
446
446
 
447
447
  ### Classification Validation
@@ -534,7 +534,7 @@ None identified. All requirements from the plan are fully implemented.
534
534
  ### Key Strengths
535
535
 
536
536
  - Zero-hallucination principle enforced consistently throughout
537
- - Graceful tier-aware degradation (Quick/Forge/Deep)
537
+ - Graceful tier-aware degradation (Quick/Forge/Forge+/Deep)
538
538
  - Well-chosen subprocess patterns with graceful fallbacks
539
539
  - Clean data flow: provenance → extraction → diff → classification → report
540
540
  - Actionable remediation suggestions with workflow chaining
@@ -54,7 +54,7 @@ Drift report with severity levels (added/removed/changed exports, breaking chang
54
54
  ### Key Instructions to LLM
55
55
 
56
56
  - Primary agent: Ferris (Audit mode)
57
- - Tiered operation: Forge tier (structural only) vs Deep tier (full semantic + QMD)
57
+ - Tiered operation: Forge/Forge+ tier (structural, with optional CCC augmentation) vs Deep tier (full semantic + QMD)
58
58
  - The spec references AST diff for structural comparison and QMD for semantic context
59
59
  - CI integration is noted as optional export (ADR-A decision)
60
60
 
@@ -70,7 +70,7 @@ Drift report with severity levels (added/removed/changed exports, breaking chang
70
70
  - Document-producing output aligns with drift report use case
71
71
 
72
72
  **What needs improvement (fix during build):**
73
- - **Missing Quick tier path** — All SKF workflows support Quick/Forge/Deep with graceful degradation; Quick tier needs text-diff fallback
73
+ - **Missing Quick tier path** — All SKF workflows support Quick/Forge/Forge+/Deep with graceful degradation; Quick tier needs text-diff fallback
74
74
  - **No provenance map format specification** — Step 01 loads it, but must reference known `provenance-map.json` from create-skill's `forge-data/{name}/` output
75
75
  - **No confidence tier labels (T1/T2/T3)** — Every SKF workflow uses these for traceability; drift findings need confidence scoring
76
76
  - **Step 04 conditional skip** — semantic-diff is Deep-only but spec has no skip logic or degradation behavior for Forge/Quick tiers
@@ -24,7 +24,7 @@ This uses **step-file architecture** for disciplined execution:
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 drift report by appending sections as directed to the output file
27
- - **Tier-Aware Execution**: Adapt analysis depth based on detected forge tier (Quick/Forge/Deep) with graceful degradation
27
+ - **Tier-Aware Execution**: Adapt analysis depth based on detected forge tier (Quick/Forge/Forge+/Deep) with graceful degradation
28
28
 
29
29
  ### Step Processing Rules
30
30
 
@@ -10,7 +10,7 @@
10
10
  | language | string | Primary programming language | Must be detected or user-specified |
11
11
  | scope | object | Inclusion/exclusion boundaries | Must have type + at least one pattern |
12
12
  | description | string | What this skill covers | 1-3 sentences |
13
- | forge_tier | string | Compilation tier | One of: quick, forge, deep |
13
+ | forge_tier | string | Compilation tier | One of: quick, forge, forge+, deep |
14
14
  | created | string | Creation date | ISO date format |
15
15
  | created_by | string | User who created the brief | From config user_name |
16
16
 
@@ -67,7 +67,7 @@ source_type: "source" # "source" (default) or "docs-only"
67
67
  source_repo: "{github-url-or-local-path}"
68
68
  language: "{detected-language}"
69
69
  description: "{brief-description}"
70
- forge_tier: "{quick|forge|deep}"
70
+ forge_tier: "{quick|forge|forge+|deep}"
71
71
  created: "{date}"
72
72
  created_by: "{user_name}"
73
73
  scope:
@@ -116,6 +116,6 @@ Created by: {created_by}
116
116
  3. `language` must be a recognized programming language
117
117
  4. `scope.type` must be one of the three defined types
118
118
  5. `scope.include` must have at least one pattern
119
- 6. `forge_tier` must match the tier from forge-tier.yaml (or default to quick)
119
+ 6. `forge_tier` must be one of: quick, forge, forge+, deep (must match the tier from forge-tier.yaml, or default to quick)
120
120
  7. When `source_type: "docs-only"`: `doc_urls` must have >= 1 entry, `source_repo` becomes optional
121
121
  8. Each `doc_urls` entry must have a valid `url` field
@@ -3,7 +3,7 @@ name: 'step-01-gather-intent'
3
3
  description: 'Initialize brief-skill workflow, discover forge tier, and gather user intent for skill creation'
4
4
 
5
5
  nextStepFile: './step-02-analyze-target.md'
6
- forgeTierFile: '{project-root}/_bmad/_memory/forger-sidecar/forge-tier.yaml'
6
+ forgeTierFile: '{sidecar_path}/forge-tier.yaml'
7
7
  ---
8
8
 
9
9
  # Step 1: Gather Intent
@@ -61,10 +61,10 @@ To initialize the brief-skill workflow by discovering the forge tier configurati
61
61
  Attempt to load `{forgeTierFile}`:
62
62
 
63
63
  **If found:**
64
- - Read the tier level (quick, forge, or deep)
64
+ - Read the tier level (quick, forge, forge+, or deep)
65
65
  - Note available tools for scoping guidance later
66
66
 
67
- **Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, or Deep), use it instead of the detected tier.
67
+ **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.
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."
@@ -131,6 +131,21 @@ Based on detected language, identify public API surface:
131
131
  **Detected Exports/Entry Points:**
132
132
  {numbered list of public-facing items found}"
133
133
 
134
+ **Semantic Signals (Forge+ and Deep with ccc only):**
135
+
136
+ If `tools.ccc` is true in forge-tier.yaml, supplement the module listing with a semantic discovery pass:
137
+
138
+ Run `ccc_bridge.search("{repo_name} public API exports modules", source_path, top_k=10)`.
139
+
140
+ If results are returned, display:
141
+
142
+ "**Semantic Signals (ccc):**
143
+ {numbered list of file:snippet pairs from CCC results — top 5 most relevant}"
144
+
145
+ This supplements — never replaces — the explicit module list above. CCC may surface non-obvious entry points (dynamically constructed exports, re-export chains) that static directory analysis misses.
146
+
147
+ If CCC is unavailable or returns no results: skip this subsection silently.
148
+
134
149
  ### 5. Report Analysis Summary
135
150
 
136
151
  Present the complete analysis:
@@ -28,7 +28,7 @@ Source reading via gh_bridge — infer exports from file structure and content.
28
28
 
29
29
  Structural extraction via ast-grep — verified exports with line-level citations.
30
30
 
31
- > **Note:** `ast_bridge.*` and `qmd_bridge.*` references below are **conceptual interfaces**, not callable functions. They describe the operation to perform. Use ast-grep (MCP tool or CLI) for `ast_bridge.*` operations and QMD (MCP tool or CLI) for `qmd_bridge.*` operations. See the AST Extraction Protocol section below and the TOOL/SUBPROCESS FALLBACK rule for dispatch details.
31
+ > **Note:** `ast_bridge.*`, `qmd_bridge.*`, and `ccc_bridge.*` references below are **conceptual interfaces**, not callable functions. They describe the operation to perform. Use ast-grep (MCP tool or CLI) for `ast_bridge.*` operations, QMD (MCP tool or CLI) for `qmd_bridge.*` operations, and ccc CLI or MCP for `ccc_bridge.*` operations. See the AST Extraction Protocol section below and the TOOL/SUBPROCESS FALLBACK rule for dispatch details.
32
32
 
33
33
  ### Strategy
34
34
 
@@ -52,6 +52,42 @@ Structural extraction via ast-grep — verified exports with line-level citation
52
52
 
53
53
  ---
54
54
 
55
+ ## Forge+ Tier (AST + CCC)
56
+
57
+ Identical extraction to Forge tier. CCC adds an upstream semantic discovery step that pre-ranks the file extraction queue.
58
+
59
+ ### When CCC Pre-Discovery Applies
60
+
61
+ CCC pre-discovery runs in step-02b-ccc-discover (before this extraction step) when ALL of the following are true:
62
+ - Tier is Forge+ or Deep
63
+ - `tools.ccc: true` in forge-tier.yaml
64
+ - `ccc_index.status` is `"fresh"`, `"stale"`, `"created"`, or `"none"`/`"failed"` (step-02b attempts lazy indexing for the latter two)
65
+
66
+ The discovery step stores `{ccc_discovery: [{file, score, snippet}]}` in context. This extraction step consumes those results to pre-rank the file list.
67
+
68
+ ### CCC Pre-Ranking Strategy
69
+
70
+ When `{ccc_discovery}` is present and non-empty:
71
+
72
+ 1. Files appearing in `{ccc_discovery}` results move to the front of the extraction queue, sorted by relevance score descending
73
+ 2. Files NOT in CCC results remain in the queue — they are not excluded, only deprioritized
74
+ 3. If the CCC intersection with scoped files produces <10 files: include all scoped files (CCC results too narrow)
75
+ 4. Proceed with the AST Extraction Protocol on the pre-ranked list
76
+
77
+ ### ast-grep Patterns
78
+
79
+ Same patterns as Forge tier — see Forge tier section above. CCC pre-ranking does not change which AST patterns are used, only which files are processed first.
80
+
81
+ ### Confidence
82
+
83
+ All results: T1 (AST-verified) — identical to Forge tier. CCC is upstream discovery only and is invisible in the output artifact.
84
+
85
+ ### Important
86
+
87
+ CCC pre-discovery failures (ccc unavailable, command error, empty results) always result in standard Forge extraction behavior. This is not reported to the user as a problem — it is normal behavior when ccc has no relevant results for the skill's scope.
88
+
89
+ ---
90
+
55
91
  ## Deep Tier (AST + QMD)
56
92
 
57
93
  Same extraction as Forge tier. Deep tier adds enrichment in step-04, not extraction.
@@ -56,7 +56,7 @@ SKILL.md uses a two-tier structure to ensure actionable content survives `split-
56
56
  - Tier 1 sections are kept short enough that `split-body` targets the larger Tier 2 sections (`## Full` headings) into `references/`
57
57
  - After split-body, SKILL.md retains all Tier 1 content — actionable without loading references
58
58
  - An agent loading only SKILL.md (no references) must get enough to act
59
- - **Section 4b (Migration & Deprecation Warnings)** is conditional: only emitted for Deep tier when T2-future annotations exist. Quick/Forge tiers and Deep tiers without T2-future annotations omit it entirely (no empty section). Parsers and validators must treat this section as optional.
59
+ - **Section 4b (Migration & Deprecation Warnings)** is conditional: only emitted for Deep tier when T2-future annotations exist. Quick/Forge/Forge+ tiers and Deep tiers without T2-future annotations omit it entirely (no empty section). Parsers and validators must treat this section as optional.
60
60
  - **Section 7b (Scripts & Assets)** is conditional: only emitted when `scripts_inventory` or `assets_inventory` is non-empty. Omitted entirely when no scripts or assets are detected. Parsers and validators must treat this section as optional.
61
61
 
62
62
  ### Provenance Citation Format
@@ -120,7 +120,7 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
120
120
  "source_repo": "{github-url}",
121
121
  "source_root": "{resolved-source-path}",
122
122
  "source_commit": "{commit-hash}",
123
- "confidence_tier": "{Quick|Forge|Deep}",
123
+ "confidence_tier": "{Quick|Forge|Forge+|Deep}",
124
124
  "spec_version": "1.3",
125
125
  "generation_date": "{ISO-8601}",
126
126
  "description": "{SKILL.md frontmatter description}",
@@ -61,10 +61,11 @@ Halt with: "Forge halted: No forge configuration found. Run [SF] Setup Forge fir
61
61
 
62
62
  **If file exists:**
63
63
  Extract and report:
64
- - `tier`: Quick, Forge, or Deep
65
- - `tools`: which tools are available (gh, ast-grep, qmd)
64
+ - `tier`: Quick, Forge, Forge+, or Deep
65
+ - `tools`: which tools are available (gh, ast-grep, ccc, qmd)
66
+ - `ccc_index`: ccc index state (status, indexed_path, last_indexed) — needed by step-02b
66
67
 
67
- **Apply tier override:** Read `{preferencesFile}`. If `tier_override` is set and is a valid tier value (Quick, Forge, or Deep), use it instead of the detected tier.
68
+ **Apply tier override:** Read `{preferencesFile}`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
68
69
 
69
70
  ### 2. Discover Skill Brief
70
71
 
@@ -138,6 +139,7 @@ Proceeding to ecosystem check..."
138
139
  Where tier_description follows positive capability framing:
139
140
  - Quick: "Source reading and spec validation"
140
141
  - Forge: "AST-backed structural extraction"
142
+ - Forge+: "Semantic-guided precision — ccc pre-ranks files before AST extraction"
141
143
  - Deep: "Full intelligence — structural + contextual + temporal"
142
144
 
143
145
  ### 6. Menu Handling Logic
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: 'step-02-ecosystem-check'
3
3
  description: 'Check agentskills.io ecosystem for existing official skill before compilation'
4
- nextStepFile: './step-03-extract.md'
4
+ nextStepFile: './step-02b-ccc-discover.md'
5
5
  ---
6
6
 
7
7
  # Step 2: Ecosystem Check
@@ -131,7 +131,7 @@ If no match is found, this step auto-proceeds with no user interaction.
131
131
  - Match presented factually with clear options if found
132
132
  - No-match case auto-proceeds silently
133
133
  - User decision respected (Proceed/Install/Abort)
134
- - Auto-proceeded to step-03 (when no match or user chose Proceed)
134
+ - Auto-proceeded to step-02b (when no match or user chose Proceed)
135
135
 
136
136
  ### ❌ SYSTEM FAILURE:
137
137