bmad-module-skill-forge 0.4.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.
- package/README.md +3 -2
- package/docs/agents.md +3 -0
- package/docs/concepts.md +24 -6
- package/docs/examples.md +31 -2
- package/docs/getting-started.md +11 -0
- package/docs/{architecture.md → how-it-works.md} +49 -25
- package/docs/index.md +2 -2
- package/docs/workflows.md +6 -6
- package/package.json +2 -2
- package/src/agents/forger.agent.yaml +1 -1
- package/src/forger/forge-tier.yaml +17 -1
- package/src/forger/preferences.yaml +1 -1
- package/src/knowledge/agentskills-spec.md +25 -0
- package/src/knowledge/ccc-bridge.md +110 -0
- package/src/knowledge/confidence-tiers.md +3 -3
- package/src/knowledge/manual-section-integrity.md +8 -0
- package/src/knowledge/overview.md +4 -2
- package/src/knowledge/progressive-capability.md +12 -4
- package/src/knowledge/provenance-tracking.md +13 -0
- package/src/knowledge/qmd-registry.md +14 -0
- package/src/knowledge/skf-knowledge-index.csv +5 -3
- package/src/knowledge/skill-lifecycle.md +2 -2
- package/src/knowledge/split-body-strategy.md +41 -0
- package/src/module-help.csv +1 -1
- package/src/module.yaml +1 -1
- package/src/workflows/README.md +1 -1
- package/src/workflows/analyze-source/data/skill-brief-schema.md +3 -1
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +27 -0
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +9 -4
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +1 -1
- package/src/workflows/analyze-source/validation-report.md +2 -2
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +1 -1
- package/src/workflows/audit-skill/data/drift-report-template.md +6 -6
- package/src/workflows/audit-skill/steps-c/step-01-init.md +4 -2
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +18 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +14 -0
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +5 -5
- package/src/workflows/audit-skill/validation-report.md +3 -3
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +2 -2
- package/src/workflows/audit-skill/workflow.md +1 -1
- package/src/workflows/brief-skill/data/scope-templates.md +4 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +7 -3
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +3 -3
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +15 -0
- package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +12 -0
- package/src/workflows/create-skill/data/compile-assembly-rules.md +43 -2
- package/src/workflows/create-skill/data/extraction-patterns-tracing.md +110 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +41 -39
- package/src/workflows/create-skill/data/skill-sections.md +31 -5
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +5 -3
- package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +2 -2
- package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +157 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +32 -2
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +5 -5
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +8 -8
- package/src/workflows/create-skill/steps-c/step-05-compile.md +6 -2
- package/src/workflows/create-skill/steps-c/step-06-validate.md +8 -9
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +46 -1
- package/src/workflows/create-skill/steps-c/step-08-report.md +1 -0
- package/src/workflows/create-skill/validation-report.md +1 -1
- package/src/workflows/create-skill/workflow-plan-create-skill.md +4 -2
- package/src/workflows/create-skill/workflow.md +1 -1
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +1 -1
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +10 -0
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +2 -2
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +1 -1
- package/src/workflows/create-stack-skill/validation-report.md +1 -1
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +2 -2
- package/src/workflows/create-stack-skill/workflow.md +1 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +1 -1
- package/src/workflows/export-skill/steps-c/step-02-package.md +8 -4
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +3 -1
- package/src/workflows/export-skill/workflow-plan-export-skill.md +1 -1
- package/src/workflows/quick-skill/data/skill-template.md +8 -0
- package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +1 -3
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +3 -2
- package/src/workflows/setup-forge/data/tier-rules.md +16 -6
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +32 -15
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +148 -0
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +24 -6
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +29 -6
- package/src/workflows/setup-forge/steps-c/step-04-report.md +14 -2
- package/src/workflows/setup-forge/validation-report.md +1 -1
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +11 -9
- package/src/workflows/setup-forge/workflow.md +1 -1
- package/src/workflows/test-skill/data/scoring-rules.md +14 -0
- package/src/workflows/test-skill/steps-c/step-01-init.md +2 -2
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +3 -1
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +4 -1
- package/src/workflows/test-skill/steps-c/step-04b-external-validators.md +7 -3
- package/src/workflows/test-skill/steps-c/step-05-score.md +1 -1
- package/src/workflows/test-skill/steps-c/step-06-report.md +27 -0
- package/src/workflows/test-skill/templates/test-report-template.md +3 -0
- package/src/workflows/test-skill/validation-report.md +2 -2
- package/src/workflows/test-skill/workflow-plan-test-skill.md +2 -2
- package/src/workflows/update-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +11 -0
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +19 -2
- package/src/workflows/update-skill/steps-c/step-04-merge.md +8 -0
- package/src/workflows/update-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/update-skill/steps-c/step-06-write.md +7 -2
- package/src/workflows/update-skill/validation-report.md +1 -1
- package/src/workflows/update-skill/workflow-plan-update-skill.md +1 -1
- package/tools/cli/commands/status.js +2 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# CCC Bridge
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
4
|
+
|
|
5
|
+
`ccc_bridge.*` references in workflow steps are **conceptual interfaces**, not callable functions. They describe a semantic code discovery operation to perform. Use the `ccc` MCP server tools (when available) or `ccc` CLI commands to execute these operations. See the TOOL/SUBPROCESS FALLBACK rule — if ccc is unavailable, the calling step falls back to direct ast-grep or source reading without ccc pre-discovery.
|
|
6
|
+
|
|
7
|
+
## Rationale
|
|
8
|
+
|
|
9
|
+
Without ccc pre-discovery, extraction steps scan all source files uniformly — processing them in directory order or entry-point-first order. On large codebases (500+ files), this means AST extraction in CLI streaming mode uses `head -N` cutoffs that may miss relevant exports in files that appear late in the scan. Integration detection in Stack Skill relies on grep-based co-import counting, which misses semantic relationships between libraries that don't appear in the same file.
|
|
10
|
+
|
|
11
|
+
With ccc pre-discovery:
|
|
12
|
+
- Extraction steps receive a relevance-ranked file queue — the most semantically important files are processed first, before any streaming cutoff
|
|
13
|
+
- Integration detection gains semantic augmentation — pairs below the 2-file co-import threshold can be evaluated via natural language queries
|
|
14
|
+
- Audit workflows can detect renamed/moved exports via semantic search before classifying them as deleted
|
|
15
|
+
|
|
16
|
+
The key architectural constraint: ccc discovers, ast-grep verifies. Discovery method is orthogonal to confidence tier. This keeps the 4-tier confidence system (T1/T1-low/T2/T3) clean and avoids tier proliferation.
|
|
17
|
+
|
|
18
|
+
## When ccc Is Used
|
|
19
|
+
|
|
20
|
+
ccc is a **discovery layer only**. It answers "where should I look?" — it does not produce citations or structural claims. Every path or symbol returned by ccc_bridge must be verified by `ast_bridge` (T1) or source reading (T1-low) before it enters the extraction inventory. ccc results never appear in provenance citations.
|
|
21
|
+
|
|
22
|
+
ccc is available at **Forge+** and **Deep** tiers (when `tools.ccc: true` in forge-tier.yaml).
|
|
23
|
+
|
|
24
|
+
## Availability
|
|
25
|
+
|
|
26
|
+
ccc_bridge operations are available when:
|
|
27
|
+
- `tools.ccc: true` in forge-tier.yaml (verified by `ccc --help` + `ccc doctor` in setup-forge)
|
|
28
|
+
- `ccc_index.status` is `"fresh"` or `"stale"` in forge-tier.yaml (an index exists for the project)
|
|
29
|
+
|
|
30
|
+
When either condition is false, calling steps skip ccc discovery silently and proceed with direct ast-grep or source reading. This is standard Forge tier behavior — not a degradation.
|
|
31
|
+
|
|
32
|
+
## Operations
|
|
33
|
+
|
|
34
|
+
### `ccc_bridge.search(query, path?, top_k?)`
|
|
35
|
+
|
|
36
|
+
**Resolves to:** `ccc search "{query}" --path {path} --top {top_k}` (CLI) or the `ccc` MCP search tool (preferred)
|
|
37
|
+
|
|
38
|
+
Returns: list of `{file, score, snippet}` entries ranked by semantic relevance to the query. These are **candidates** for ast-grep extraction — not verified exports.
|
|
39
|
+
|
|
40
|
+
**Usage context:** Called before ast-grep in Forge+ and Deep tier extraction steps to discover semantically relevant source regions. Results pre-rank the file extraction queue so ast-grep processes the most relevant files first.
|
|
41
|
+
|
|
42
|
+
### `ccc_bridge.ensure_index(path)`
|
|
43
|
+
|
|
44
|
+
**Resolves to:** Check `ccc_index.status` in forge-tier.yaml. If `"none"` or the indexed_path does not match, run `ccc init {path}` then `ccc index` and update forge-tier.yaml.
|
|
45
|
+
|
|
46
|
+
**Usage context:** Called by setup-forge step-01b to ensure the project root is indexed. Called lazily by extraction steps when `ccc_index.status` is `"none"` but ccc is available.
|
|
47
|
+
|
|
48
|
+
### `ccc_bridge.status()`
|
|
49
|
+
|
|
50
|
+
**Resolves to:** Two-step verification:
|
|
51
|
+
1. `ccc --help` — confirms binary exists (exit 0)
|
|
52
|
+
2. `ccc doctor` — confirms daemon is running, extracts version string, validates embedding model
|
|
53
|
+
|
|
54
|
+
**Usage context:** Called exclusively by setup-forge step-01 during tool detection. Downstream workflows read the result from forge-tier.yaml — they do not re-verify.
|
|
55
|
+
|
|
56
|
+
## Confidence
|
|
57
|
+
|
|
58
|
+
ccc discovery does not produce a confidence tier. The provenance chain is:
|
|
59
|
+
|
|
60
|
+
1. ccc discovers candidate files (internal hint — not cited)
|
|
61
|
+
2. ast-grep verifies exports in those files → **T1** citation `[AST:file:Lnn]`
|
|
62
|
+
3. Or source reading verifies → **T1-low** citation `[SRC:file:Lnn]`
|
|
63
|
+
|
|
64
|
+
The ccc search is invisible in the output artifact. A Forge+ skill's citations are indistinguishable from a Forge skill's citations — the difference is in extraction coverage, not citation format.
|
|
65
|
+
|
|
66
|
+
## Indexing Lifecycle
|
|
67
|
+
|
|
68
|
+
### When Indexing Happens
|
|
69
|
+
|
|
70
|
+
1. **setup-forge step-01b:** Indexes the project root when setup-forge runs. This is the primary indexing point.
|
|
71
|
+
2. **Workflow discovery steps:** If `ccc_index.status` is `"stale"` or `"none"`, discovery steps trigger a re-index and warn the user. They do not block.
|
|
72
|
+
3. **ccc daemon:** Incremental indexing means re-indexing unchanged files is a near-no-op.
|
|
73
|
+
|
|
74
|
+
### Freshness
|
|
75
|
+
|
|
76
|
+
- Staleness threshold: 24 hours (configurable via `ccc_index.staleness_threshold_hours` in forge-tier.yaml)
|
|
77
|
+
- A stale index still produces useful results — the workflow proceeds with the stale index and notes the staleness
|
|
78
|
+
- setup-forge is the designated refresh authority
|
|
79
|
+
|
|
80
|
+
### Relationship to QMD Registry
|
|
81
|
+
|
|
82
|
+
ccc_index and qmd_collections are **orthogonal**:
|
|
83
|
+
- `ccc_index` in forge-tier.yaml tracks the persistent source code index (one per project)
|
|
84
|
+
- `qmd_collections[]` in forge-tier.yaml tracks per-skill workflow artifact collections
|
|
85
|
+
- ccc indexes source code for semantic search; QMD indexes curated artifacts for temporal/knowledge search
|
|
86
|
+
- The janitor role for QMD (setup-forge step-03) operates independently of ccc_index
|
|
87
|
+
|
|
88
|
+
## Query Volume Bounds
|
|
89
|
+
|
|
90
|
+
To prevent excessive daemon calls, workflow steps cap ccc queries:
|
|
91
|
+
- **create-skill extraction:** max 2 queries per skill (discovery + optional scope refinement)
|
|
92
|
+
- **analyze-source mapping:** max 1 query per qualifying unit
|
|
93
|
+
- **create-stack-skill integration detection:** max 1 query per library pair
|
|
94
|
+
- **audit-skill re-index:** max 1 query per export missing from its recorded location
|
|
95
|
+
|
|
96
|
+
## Anti-Patterns
|
|
97
|
+
|
|
98
|
+
- Using ccc_bridge results as citations without ast-grep verification — ccc output is never a provenance citation
|
|
99
|
+
- Blocking a workflow because ccc is unavailable — ccc is always optional
|
|
100
|
+
- Running ccc_bridge.ensure_index() without checking ccc_index.status first — unnecessary re-indexing
|
|
101
|
+
- Passing ccc results directly to the extraction inventory — they are candidates, not extractions
|
|
102
|
+
- Listing ccc as "unavailable" in reports for Quick/Forge tiers — ccc is a Forge+ capability, not something Quick/Forge tiers are missing
|
|
103
|
+
|
|
104
|
+
## Related Fragments
|
|
105
|
+
|
|
106
|
+
- [progressive-capability.md](progressive-capability.md) — Forge+ tier definition and positive framing
|
|
107
|
+
- [confidence-tiers.md](confidence-tiers.md) — why ccc does not create a new confidence tier
|
|
108
|
+
- [qmd-registry.md](qmd-registry.md) — the parallel but separate registry for QMD collections
|
|
109
|
+
|
|
110
|
+
_Source: designed as part of the Forge+ tier integration for cocoindex-code semantic code search_
|
|
@@ -22,8 +22,8 @@ With confidence tiers:
|
|
|
22
22
|
|
|
23
23
|
| Tier | Label | Source | Extraction Method | Available At |
|
|
24
24
|
| --- | --- | --- | --- | --- |
|
|
25
|
-
| T1 | AST-verified | Source code | ast-grep structural parsing | Forge, Deep |
|
|
26
|
-
| T1-low | Source-read | Source code | Pattern matching, file reading | Quick, Forge, Deep |
|
|
25
|
+
| T1 | AST-verified | Source code | ast-grep structural parsing | Forge, Forge+, Deep |
|
|
26
|
+
| T1-low | Source-read | Source code | Pattern matching, file reading | Quick, Forge, Forge+, Deep |
|
|
27
27
|
| T2 | QMD-enriched | Knowledge base | QMD semantic search + synthesis | Deep |
|
|
28
28
|
| T3 | External reference | Docs, URLs | External documentation lookup | All tiers |
|
|
29
29
|
|
|
@@ -131,7 +131,7 @@ Every generated skill includes a confidence distribution in `metadata.json`:
|
|
|
131
131
|
"t2": 12,
|
|
132
132
|
"t3": 3
|
|
133
133
|
},
|
|
134
|
-
"extraction_tier": "deep"
|
|
134
|
+
"extraction_tier": "deep" // valid values: "quick", "forge", "forge+", "deep"
|
|
135
135
|
}
|
|
136
136
|
```
|
|
137
137
|
|
|
@@ -38,6 +38,14 @@ by the forge during updates or regeneration.
|
|
|
38
38
|
- Nested \[MANUAL\] blocks are forbidden — trigger an ERROR if detected
|
|
39
39
|
- Markers apply to any output file: `SKILL.md`, `references/*.md`, integration files
|
|
40
40
|
|
|
41
|
+
### [MANUAL] Subdirectories
|
|
42
|
+
|
|
43
|
+
User-authored scripts and assets are placed in `scripts/[MANUAL]/` and `assets/[MANUAL]/` subdirectories within the skill package. These follow the same preservation principle as markdown `<!-- [MANUAL] -->` markers:
|
|
44
|
+
|
|
45
|
+
- Files in `[MANUAL]/` subdirectories are preserved unconditionally during `update-skill`
|
|
46
|
+
- Source-derived scripts/assets (outside `[MANUAL]/`) are refreshed from source during updates
|
|
47
|
+
- Conflicts (user file has same name as source file outside `[MANUAL]/`) are flagged as HIGH severity
|
|
48
|
+
|
|
41
49
|
## Pattern Examples
|
|
42
50
|
|
|
43
51
|
### Example 1: Adding Manual Context to a Generated Skill
|
|
@@ -24,12 +24,14 @@ With knowledge files:
|
|
|
24
24
|
|------------------------------------------------------------|-------------------------------------------------------------------|------------------------------------|
|
|
25
25
|
| [zero-hallucination.md](zero-hallucination.md) | Every claim traces to source; uncitable content excluded | AN, BS, CS, QS, SS, US, AS, TS |
|
|
26
26
|
| [confidence-tiers.md](confidence-tiers.md) | T1/T1-low/T2/T3 trust model and citation formats | AN, BS, CS, QS, SS, US, AS, TS, EX |
|
|
27
|
-
| [progressive-capability.md](progressive-capability.md) | Quick/Forge/Deep tier philosophy and behavior adaptation | All 10 |
|
|
27
|
+
| [progressive-capability.md](progressive-capability.md) | Quick/Forge/Forge+/Deep tier philosophy and behavior adaptation | All 10 |
|
|
28
28
|
| [agentskills-spec.md](agentskills-spec.md) | agentskills.io output format principles and compliance | CS, QS, SS, US, TS, EX |
|
|
29
29
|
| [skill-lifecycle.md](skill-lifecycle.md) | End-to-end pipeline, artifact flow, workflow selection | All 10 |
|
|
30
|
-
| [provenance-tracking.md](provenance-tracking.md) | Provenance-map.json, evidence reports, claim traceability
|
|
30
|
+
| [provenance-tracking.md](provenance-tracking.md) | Provenance-map.json entries and file_entries, evidence reports, claim traceability | CS, QS, SS, US, AS, TS |
|
|
31
31
|
| [manual-section-integrity.md](manual-section-integrity.md) | \[MANUAL\] marker preservation and merge algorithm | CS, US, AS, TS, EX |
|
|
32
32
|
| [qmd-registry.md](qmd-registry.md) | Progressive QMD collection registry and collection gate principle | SF, BS, CS, US, AS |
|
|
33
|
+
| [ccc-bridge.md](ccc-bridge.md) | ccc_bridge interface, indexing lifecycle, Forge+ discovery-before-extraction | SF, CS, SS, AS, US, BS |
|
|
34
|
+
| [split-body-strategy.md](split-body-strategy.md) | Selective vs full split-body, detection pattern, agent accuracy | CS, QS, US, TS, EX |
|
|
33
35
|
|
|
34
36
|
## JiT Loading Protocol
|
|
35
37
|
|
|
@@ -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
|
|
@@ -147,6 +147,19 @@ With provenance tracking:
|
|
|
147
147
|
- Provenance timestamps show when each entry was last verified
|
|
148
148
|
- The merge preserves \[MANUAL\] section provenance (author: "manual", no source location)
|
|
149
149
|
|
|
150
|
+
### File-Level Provenance (file_entries)
|
|
151
|
+
|
|
152
|
+
Scripts and assets use a separate `file_entries` array in `provenance-map.json`, distinct from the export-level `entries` array:
|
|
153
|
+
|
|
154
|
+
| Field | Description |
|
|
155
|
+
|-------|-------------|
|
|
156
|
+
| `file_name` | Path relative to skill root (e.g., `scripts/validate.sh`) |
|
|
157
|
+
| `file_type` | `script` or `asset` |
|
|
158
|
+
| `source_file` | Path relative to source root |
|
|
159
|
+
| `confidence` | Always `T1-low` (file-copy, not AST-verified) |
|
|
160
|
+
| `extraction_method` | Always `file-copy` |
|
|
161
|
+
| `content_hash` | SHA-256 of file content (for drift detection) |
|
|
162
|
+
|
|
150
163
|
## Inline Citation Rules
|
|
151
164
|
|
|
152
165
|
Citations appear directly in SKILL.md content:
|
|
@@ -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,10 +2,12 @@ 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
|
|
6
|
-
|
|
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
|
|
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
|
-
provenance-tracking,Provenance Tracking,"Provenance mechanism — provenance-map.json, evidence reports, claim traceability","provenance,evidence,traceability,citations",core,knowledge/provenance-tracking.md
|
|
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
|
|
9
10
|
manual-section-integrity,Manual Section Integrity,"[MANUAL] preservation — marker format, merge algorithm, orphan detection","manual,preservation,merge,markers",core,knowledge/manual-section-integrity.md
|
|
10
11
|
qmd-registry,QMD Collection Registry,"Progressive registry architecture — producer/consumer/janitor roles, collection gate principle, forge-tier.yaml registry schema","qmd,registry,collections,deep,indexing",core,knowledge/qmd-registry.md
|
|
11
12
|
doc-fetcher,Doc Fetcher,"T3 external documentation — tool-agnostic URL fetching, quarantine rules, conflict resolution","doc-fetcher,t3,external,documentation,quarantine",extended,knowledge/doc-fetcher.md
|
|
13
|
+
split-body-strategy,Split-Body Strategy,"Selective split guidance — detection pattern, recommended approach, impact on tessl scores and snippet anchors","split-body,selective-split,references,body-size",core,knowledge/split-body-strategy.md
|
|
@@ -25,7 +25,7 @@ With lifecycle awareness:
|
|
|
25
25
|
| Setup | SF (Setup Forge) | Detect environment and set capability tier | `forge-tier.yaml` |
|
|
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
|
-
| Compilation | CS, QS, SS (Create/Quick/Stack) | Extract source and compile skill | `SKILL.md`, metadata, provenance |
|
|
28
|
+
| Compilation | CS, QS, SS (Create/Quick/Stack) | Extract source and compile skill | `SKILL.md`, metadata, provenance, `scripts/`, `assets/` (when source contains them) |
|
|
29
29
|
| Maintenance | US, AS (Update/Audit) | Detect drift and refresh skills | Updated `SKILL.md`, drift report |
|
|
30
30
|
| Verification | TS (Test Skill) | Quality gate — completeness scoring | Test report, pass/fail decision |
|
|
31
31
|
| Distribution | EX (Export Skill) | Package and inject into agent context | agentskills.io bundle, snippets |
|
|
@@ -108,7 +108,7 @@ SF → forge-tier.yaml
|
|
|
108
108
|
↓ (read by all subsequent workflows)
|
|
109
109
|
AN → analysis-report.md + skill-brief.yaml[]
|
|
110
110
|
↓ (briefs consumed by CS)
|
|
111
|
-
CS → SKILL.md + metadata.json + provenance-map.json + evidence-report.md
|
|
111
|
+
CS → SKILL.md + metadata.json + provenance-map.json + scripts/ + assets/ (when present) + evidence-report.md
|
|
112
112
|
↓ (skill consumed by TS)
|
|
113
113
|
TS → test-report.md (pass/fail gate)
|
|
114
114
|
↓ (passing skill consumed by EX)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Split-Body Strategy
|
|
2
|
+
|
|
3
|
+
## Principle
|
|
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.
|
|
6
|
+
|
|
7
|
+
## Rationale
|
|
8
|
+
|
|
9
|
+
Vercel research shows inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval. Full split-body moves all Tier 2 content to `references/`, forcing agents to retrieve it on demand. Selective split preserves the most-used content inline while still satisfying the body size constraint.
|
|
10
|
+
|
|
11
|
+
Without selective split awareness:
|
|
12
|
+
- `skill-check split-body --write` extracts everything, reducing agent effectiveness
|
|
13
|
+
- tessl content scores drop dramatically (65% → 38%) because only SKILL.md body is evaluated
|
|
14
|
+
- Context snippet anchors (`#quick-start`, `#key-types`) may break if those sections move to references
|
|
15
|
+
|
|
16
|
+
With selective split awareness:
|
|
17
|
+
- Only the largest Tier 2 section(s) are extracted (usually Full API Reference or Full Type Definitions)
|
|
18
|
+
- Quick Start, Key API Summary, Key Types, Migration Warnings stay inline
|
|
19
|
+
- Agent accuracy remains high for common tasks
|
|
20
|
+
- tessl scores reflect actual inline content quality
|
|
21
|
+
|
|
22
|
+
## Split-Body Detection Pattern
|
|
23
|
+
|
|
24
|
+
A split-body skill is identified by:
|
|
25
|
+
1. A `references/` directory exists alongside SKILL.md
|
|
26
|
+
2. SKILL.md Tier 2 sections (headings starting with `## Full`) contain only stubs or are absent — their content lives in `references/*.md`
|
|
27
|
+
3. The skill's full documented content spans SKILL.md + `references/*.md`
|
|
28
|
+
|
|
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
|
+
|
|
31
|
+
## Recommended Approach
|
|
32
|
+
|
|
33
|
+
When `body.max_lines` is exceeded:
|
|
34
|
+
1. Identify which Tier 2 section(s) are largest (usually `## Full API Reference`)
|
|
35
|
+
2. Extract only those specific sections to `references/`
|
|
36
|
+
3. Keep all Tier 1 sections and smaller Tier 2 sections inline
|
|
37
|
+
4. Verify context snippet anchors still resolve after extraction
|
|
38
|
+
|
|
39
|
+
## Scripts and Assets Interaction
|
|
40
|
+
|
|
41
|
+
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.
|
package/src/module-help.csv
CHANGED
|
@@ -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:
|
package/src/workflows/README.md
CHANGED
|
@@ -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
|
|
|
@@ -24,6 +24,8 @@ Defines the output contract for skill-brief.yaml files generated by analyze-sour
|
|
|
24
24
|
|-------|------|------------|-------------|
|
|
25
25
|
| source_type | string | `source` or `docs-only` | Default `source`. When `docs-only`: `source_repo` optional, `doc_urls` required |
|
|
26
26
|
| doc_urls | array | `{url, label}` objects | Documentation URLs for T3 content. Required when `source_type: "docs-only"` |
|
|
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
|
+
| `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/"). |
|
|
27
29
|
|
|
28
30
|
## Version Detection
|
|
29
31
|
|
|
@@ -70,6 +70,32 @@ Do NOT recommend as a skillable unit if:
|
|
|
70
70
|
5. **Vendor/dependency**: Third-party code copied into project
|
|
71
71
|
6. **Already skilled**: Existing skill found in forge_data_folder (recommend update-skill instead)
|
|
72
72
|
|
|
73
|
+
## Script/Asset Detection Signals
|
|
74
|
+
|
|
75
|
+
During per-unit analysis, check for scripts and assets alongside code exports.
|
|
76
|
+
|
|
77
|
+
**Script signals:**
|
|
78
|
+
|
|
79
|
+
| Strength | Signal | Example |
|
|
80
|
+
|----------|--------|---------|
|
|
81
|
+
| Strong | Entry point in `package.json` `bin`, Cargo.toml `[[bin]]`, pyproject.toml `[project.scripts]` | `"bin": { "migrate": "scripts/migrate.js" }` |
|
|
82
|
+
| Strong | Shebang + executable file | `#!/usr/bin/env python` in `scripts/setup.py` |
|
|
83
|
+
| Moderate | File in `scripts/`, `bin/`, `tools/`, `cli/` directory | `scripts/validate.sh` |
|
|
84
|
+
| Moderate | CI/CD reference to script | `.github/workflows/test.yml` runs `scripts/test.sh` |
|
|
85
|
+
|
|
86
|
+
**Asset signals:**
|
|
87
|
+
|
|
88
|
+
| Strength | Signal | Example |
|
|
89
|
+
|----------|--------|---------|
|
|
90
|
+
| Strong | JSON Schema file with `$schema` key | `schemas/config.schema.json` |
|
|
91
|
+
| Strong | Config template with `.example` or `.template` extension | `config.yaml.example` |
|
|
92
|
+
| Moderate | File in `assets/`, `templates/`, `schemas/`, `configs/`, `examples/` directory | `templates/report.hbs` |
|
|
93
|
+
| Moderate | OpenAPI/GraphQL definition | `openapi.json`, `schema.graphql` |
|
|
94
|
+
|
|
95
|
+
**Per-unit output:** Record `has_scripts: boolean`, `has_assets: boolean`, `script_files: string[]`, `asset_files: string[]`.
|
|
96
|
+
|
|
97
|
+
**Disqualify:** Generated files (dist/, build/), vendored dependencies, IDE configs (.vscode/, .idea/), binary files (.so, .dll, .jar).
|
|
98
|
+
|
|
73
99
|
## Stack Skill Candidate Detection
|
|
74
100
|
|
|
75
101
|
Flag units as stack skill candidates when:
|
|
@@ -85,4 +111,5 @@ Flag units as stack skill candidates when:
|
|
|
85
111
|
|------------|-------------------|
|
|
86
112
|
| Quick | File structure analysis: directory trees, manifest files, entry points, naming conventions |
|
|
87
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 |
|
|
88
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
|
|
|
@@ -167,7 +167,7 @@ Replace the placeholder `[Appended by step-02-scan-project]` with the full scan
|
|
|
167
167
|
|
|
168
168
|
Update {outputFile} frontmatter:
|
|
169
169
|
```yaml
|
|
170
|
-
stepsCompleted: [
|
|
170
|
+
stepsCompleted: [append 'step-02-scan-project' to existing array]
|
|
171
171
|
lastStep: 'step-02-scan-project'
|
|
172
172
|
```
|
|
173
173
|
|
|
@@ -150,7 +150,7 @@ Replace the placeholder `[Appended by step-03-identify-units]` with:
|
|
|
150
150
|
|
|
151
151
|
Update {outputFile} frontmatter:
|
|
152
152
|
```yaml
|
|
153
|
-
stepsCompleted: [
|
|
153
|
+
stepsCompleted: [append 'step-03-identify-units' to existing array]
|
|
154
154
|
lastStep: 'step-03-identify-units'
|
|
155
155
|
```
|
|
156
156
|
|
|
@@ -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`
|
|
@@ -91,13 +95,14 @@ DO NOT BE LAZY — For EACH qualifying unit, launch a subprocess (or analyze in
|
|
|
91
95
|
- Primary export patterns (barrel exports, direct exports, re-exports)
|
|
92
96
|
- Public API surface size estimate
|
|
93
97
|
- Key entry points
|
|
98
|
+
- Script/asset presence: check for `scripts/`, `bin/`, `assets/`, `templates/` directories and files matching detection signals in `{heuristicsFile}`. Record counts in per-unit findings.
|
|
94
99
|
- Analysis strategy used and coverage confidence
|
|
95
100
|
|
|
96
101
|
**Per-unit export summary:**
|
|
97
102
|
|
|
98
|
-
| Unit | Files | Exports | Export Pattern | API Surface |
|
|
99
|
-
|
|
100
|
-
| {name} | {count} | {count} | {pattern} | {small/medium/large} |
|
|
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 --} |
|
|
101
106
|
|
|
102
107
|
### 3. Map Import Graph
|
|
103
108
|
|
|
@@ -187,7 +192,7 @@ Replace `[Appended by step-04-map-and-detect]` under Integration Points with:
|
|
|
187
192
|
|
|
188
193
|
Update {outputFile} frontmatter:
|
|
189
194
|
```yaml
|
|
190
|
-
stepsCompleted: [
|
|
195
|
+
stepsCompleted: [append 'step-04-map-and-detect' to existing array]
|
|
191
196
|
lastStep: 'step-04-map-and-detect'
|
|
192
197
|
stack_skill_candidates: [{list flagged candidate groupings}]
|
|
193
198
|
```
|
|
@@ -181,7 +181,7 @@ Replace `[Appended by step-05-recommend]` with:
|
|
|
181
181
|
|
|
182
182
|
Update {outputFile} frontmatter:
|
|
183
183
|
```yaml
|
|
184
|
-
stepsCompleted: [
|
|
184
|
+
stepsCompleted: [append 'step-05-recommend' to existing array]
|
|
185
185
|
lastStep: 'step-05-recommend'
|
|
186
186
|
confirmed_units: [{list of confirmed unit names}]
|
|
187
187
|
stack_skill_candidates: [{updated list with user decisions}]
|
|
@@ -179,7 +179,7 @@ Replace `[Appended by step-06-generate-briefs]` with:
|
|
|
179
179
|
|
|
180
180
|
Update {outputFile} frontmatter:
|
|
181
181
|
```yaml
|
|
182
|
-
stepsCompleted: [
|
|
182
|
+
stepsCompleted: [append 'step-06-generate-briefs' to existing array]
|
|
183
183
|
lastStep: 'step-06-generate-briefs'
|
|
184
184
|
nextWorkflow: '{primary recommendation}'
|
|
185
185
|
```
|
|
@@ -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: {
|
|
16
|
+
# Drift Report: {skill_name}
|
|
17
17
|
|
|
18
18
|
## Audit Summary
|
|
19
19
|
|
|
20
|
-
**Skill:** {
|
|
21
|
-
**Source:** {
|
|
22
|
-
**Tier:** {
|
|
23
|
-
**Date:** {
|
|
24
|
-
**Overall 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
|
|
|
@@ -99,6 +99,8 @@ Load the following from the skill directory:
|
|
|
99
99
|
- `name`, `version`, `generation_date`, `confidence_tier` used during creation
|
|
100
100
|
- `source_root` — Resolved source code path used during extraction
|
|
101
101
|
|
|
102
|
+
**Detect split-body state:** If a `references/` directory exists and SKILL.md's `## Full` headings are absent or stubs, this is a split-body skill. Flag `split_body: true` in the baseline so downstream steps (especially semantic diff in step-04) know to also read `references/*.md` for complete content comparison.
|
|
103
|
+
|
|
102
104
|
### 4. Load Provenance Map
|
|
103
105
|
|
|
104
106
|
Search for provenance map at `{forge_data_folder}/{skill_name}/provenance-map.json`
|