bmad-module-skill-forge 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/docs/agents.md +12 -5
- package/docs/concepts.md +37 -15
- package/docs/examples.md +49 -5
- package/docs/getting-started.md +43 -17
- package/docs/how-it-works.md +115 -90
- package/docs/index.md +2 -2
- package/docs/workflows.md +89 -41
- package/package.json +2 -2
- package/src/agents/forger.agent.yaml +18 -6
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +18 -1
- package/src/forger/preferences.yaml +6 -8
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +110 -0
- package/src/knowledge/confidence-tiers.md +14 -3
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +10 -6
- package/src/knowledge/progressive-capability.md +15 -6
- package/src/knowledge/qmd-registry.md +18 -1
- package/src/knowledge/skf-knowledge-index.csv +3 -1
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +4 -1
- package/src/workflows/README.md +36 -18
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +1 -0
- package/src/workflows/analyze-source/steps-c/step-01-init.md +4 -4
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
- 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 +8 -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 +2 -2
- package/src/workflows/analyze-source/workflow.md +2 -2
- package/src/workflows/audit-skill/data/drift-report-template.md +6 -6
- package/src/workflows/audit-skill/data/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +23 -1
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +6 -6
- package/src/workflows/audit-skill/workflow.md +3 -2
- package/src/workflows/brief-skill/data/scope-templates.md +10 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +4 -4
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +15 -0
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +37 -1
- package/src/workflows/create-skill/data/skill-sections.md +14 -13
- package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +18 -12
- 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 +25 -20
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +8 -8
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +9 -9
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +3 -3
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +60 -39
- package/src/workflows/create-skill/steps-c/step-08-report.md +26 -11
- package/src/workflows/create-skill/workflow.md +3 -3
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +29 -7
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -8
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +40 -2
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +4 -4
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +3 -3
- package/src/workflows/export-skill/data/managed-section-format.md +8 -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 +1 -1
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/workflow.md +3 -1
- package/src/workflows/quick-skill/data/skill-template.md +24 -4
- 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 +26 -6
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
- package/src/workflows/quick-skill/workflow.md +1 -1
- package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
- package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
- package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
- package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
- package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
- package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
- package/src/workflows/refine-architecture/workflow.md +61 -0
- package/src/workflows/setup-forge/data/tier-rules.md +16 -6
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +33 -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 +29 -12
- 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 +16 -4
- package/src/workflows/setup-forge/workflow.md +4 -3
- package/src/workflows/test-skill/data/scoring-rules.md +8 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/templates/test-report-template.md +3 -0
- package/src/workflows/test-skill/workflow.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 +2 -2
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +24 -4
- package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
- package/src/workflows/update-skill/steps-c/step-06-write.md +7 -4
- package/src/workflows/update-skill/workflow.md +1 -1
- package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
- package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
- package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
- package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
- package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
- package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
- package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
- package/src/workflows/verify-stack/workflow.md +61 -0
- package/tools/cli/commands/status.js +2 -1
- package/src/workflows/analyze-source/validation-report.md +0 -657
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
- package/src/workflows/audit-skill/validation-report.md +0 -545
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
- package/src/workflows/brief-skill/validation-report.md +0 -630
- package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
- package/src/workflows/create-skill/validation-report.md +0 -189
- package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -523
- package/src/workflows/create-stack-skill/validation-report.md +0 -401
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
- package/src/workflows/export-skill/validation-report.md +0 -263
- package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
- package/src/workflows/quick-skill/validation-report.md +0 -543
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
- package/src/workflows/setup-forge/validation-report.md +0 -504
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -428
- package/src/workflows/test-skill/validation-report.md +0 -390
- package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
- package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
- package/src/workflows/update-skill/validation-report.md +0 -559
- package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-01b-ccc-index'
|
|
3
|
+
description: 'Ensure ccc project index exists — Forge+ and Deep tiers when ccc is available'
|
|
4
|
+
|
|
5
|
+
nextStepFile: './step-02-write-config.md'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 1b: CCC Index Verification
|
|
9
|
+
|
|
10
|
+
## STEP GOAL:
|
|
11
|
+
|
|
12
|
+
If ccc is available (`{ccc: true}` from step-01), verify that the ccc index exists for the project root. If no index exists, create it. Store index state in context for step-02 to write into forge-tier.yaml.
|
|
13
|
+
|
|
14
|
+
For Quick and Forge tiers, or when ccc is unavailable, skip silently and proceed.
|
|
15
|
+
|
|
16
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
17
|
+
|
|
18
|
+
### Universal Rules:
|
|
19
|
+
|
|
20
|
+
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
21
|
+
- 🔄 CRITICAL: When loading next step, ensure entire file is read
|
|
22
|
+
- 🎯 Execute all operations autonomously — no user interaction
|
|
23
|
+
|
|
24
|
+
### Role Reinforcement:
|
|
25
|
+
|
|
26
|
+
- ✅ You are a system executor verifying the ccc index state
|
|
27
|
+
- ✅ ccc indexing failure is never a workflow error — degrade gracefully
|
|
28
|
+
- ✅ No negative messaging for tiers that skip this step
|
|
29
|
+
|
|
30
|
+
### Step-Specific Rules:
|
|
31
|
+
|
|
32
|
+
- 🎯 Focus only on ccc index verification and creation
|
|
33
|
+
- 🚫 FORBIDDEN to display skip messages for Quick/Forge tiers
|
|
34
|
+
- 🚫 FORBIDDEN to fail the workflow if ccc indexing fails
|
|
35
|
+
- 🚫 FORBIDDEN to re-index if ccc index already exists and is fresh (< staleness threshold)
|
|
36
|
+
|
|
37
|
+
## EXECUTION PROTOCOLS:
|
|
38
|
+
|
|
39
|
+
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
40
|
+
- 💾 Store ccc index state in context for step-02
|
|
41
|
+
- 🚫 FORBIDDEN to write forge-tier.yaml — that is step-02's job
|
|
42
|
+
|
|
43
|
+
## CONTEXT BOUNDARIES:
|
|
44
|
+
|
|
45
|
+
- Available: {ccc} boolean and {ccc_daemon} status from step-01
|
|
46
|
+
- Available: {calculated_tier} from step-01
|
|
47
|
+
- Available: existing forge-tier.yaml may contain prior `ccc_index` state
|
|
48
|
+
- Focus: ccc index state verification and creation only
|
|
49
|
+
- Dependencies: step-01 must have completed with tool detection results
|
|
50
|
+
|
|
51
|
+
## MANDATORY SEQUENCE
|
|
52
|
+
|
|
53
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
54
|
+
|
|
55
|
+
### 1. Check Eligibility
|
|
56
|
+
|
|
57
|
+
Read `{ccc}` from step-01 context.
|
|
58
|
+
|
|
59
|
+
**If `{ccc}` is false:** Set `{ccc_index_result: "none", ccc_indexed_path: null, ccc_last_indexed: null}`. Proceed directly to section 4 (Auto-Proceed) — no output, no messaging.
|
|
60
|
+
|
|
61
|
+
**If `{ccc}` is true:** Continue to section 2.
|
|
62
|
+
|
|
63
|
+
### 2. Check Existing Index State
|
|
64
|
+
|
|
65
|
+
Read existing forge-tier.yaml at `{project-root}/_bmad/_memory/forger-sidecar/forge-tier.yaml` (if it exists from a previous run).
|
|
66
|
+
|
|
67
|
+
Check the `ccc_index` section:
|
|
68
|
+
- If `ccc_index.indexed_path` matches `{project-root}` AND `ccc_index.status` is `"fresh"`:
|
|
69
|
+
- Check freshness: if `ccc_index.last_indexed` is within `staleness_threshold_hours` (default 24h) of now → index is fresh
|
|
70
|
+
- Store `{ccc_index_result: "fresh", ccc_indexed_path: {project-root}, ccc_last_indexed: {existing timestamp}}`
|
|
71
|
+
- Proceed to section 4
|
|
72
|
+
|
|
73
|
+
- If `ccc_index.indexed_path` matches `{project-root}` but timestamp is older than threshold:
|
|
74
|
+
- Note index is stale — proceed to section 3 for re-index (section 3 will overwrite `ccc_index_result` to `"created"` or `"failed"`)
|
|
75
|
+
|
|
76
|
+
- If `ccc_index` is missing, has null values, or path doesn't match:
|
|
77
|
+
- Proceed to section 3 for initial index
|
|
78
|
+
|
|
79
|
+
### 3. Create or Refresh CCC Index
|
|
80
|
+
|
|
81
|
+
**If `{ccc_daemon}` is `"stopped"` or undefined (healthy daemon where no explicit state was recorded):**
|
|
82
|
+
|
|
83
|
+
The `ccc index` command auto-starts the daemon when needed. Proceed with indexing below.
|
|
84
|
+
|
|
85
|
+
**If `{ccc_daemon}` is `"error"`:**
|
|
86
|
+
|
|
87
|
+
Attempt indexing anyway — errors will be caught below.
|
|
88
|
+
|
|
89
|
+
Run:
|
|
90
|
+
```bash
|
|
91
|
+
ccc init {project-root}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**If init fails** (project may already be initialized): continue — this is not an error.
|
|
95
|
+
|
|
96
|
+
Then run:
|
|
97
|
+
```bash
|
|
98
|
+
ccc index
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**If succeeds:**
|
|
102
|
+
- Run `ccc status` to get file count
|
|
103
|
+
- Store `{ccc_index_result: "created", ccc_indexed_path: {project-root}, ccc_last_indexed: {current ISO timestamp}, ccc_file_count: {count from status}}`
|
|
104
|
+
- Display: "**CCC index created.** {file_count} files indexed for semantic discovery."
|
|
105
|
+
|
|
106
|
+
**If fails:**
|
|
107
|
+
- Store `{ccc_index_result: "failed", ccc_indexed_path: null, ccc_last_indexed: null}`
|
|
108
|
+
- Display: "CCC indexing failed: {error}. Extraction will use direct AST scanning — semantic pre-ranking unavailable this session."
|
|
109
|
+
- Continue — this is NOT a workflow error
|
|
110
|
+
|
|
111
|
+
### 4. Auto-Proceed
|
|
112
|
+
|
|
113
|
+
"**Proceeding to write configuration...**"
|
|
114
|
+
|
|
115
|
+
#### Menu Handling Logic:
|
|
116
|
+
|
|
117
|
+
- After ccc index check completes (or is skipped), immediately load, read entire file, then execute {nextStepFile}
|
|
118
|
+
|
|
119
|
+
#### EXECUTION RULES:
|
|
120
|
+
|
|
121
|
+
- This is an auto-proceed step with no user choices
|
|
122
|
+
- Proceed directly to next step after ccc index verification
|
|
123
|
+
|
|
124
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
125
|
+
|
|
126
|
+
ONLY WHEN ccc index verification is complete (or step is skipped for ccc unavailable) will you load and read fully `{nextStepFile}` to execute the configuration write step.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
131
|
+
|
|
132
|
+
### ✅ SUCCESS:
|
|
133
|
+
|
|
134
|
+
- ccc unavailable: skipped silently with no output, context variables set to null/none
|
|
135
|
+
- ccc available with fresh index: verified freshness, skipped re-index, context variables set
|
|
136
|
+
- ccc available with stale/missing index: index created, context variables set with fresh timestamp
|
|
137
|
+
- ccc indexing fails: logged gracefully, workflow continues, context variables set to failed/null
|
|
138
|
+
- Auto-proceeded to step-02
|
|
139
|
+
|
|
140
|
+
### ❌ SYSTEM FAILURE:
|
|
141
|
+
|
|
142
|
+
- Displaying skip messages when ccc is unavailable
|
|
143
|
+
- Halting the workflow on ccc index failure
|
|
144
|
+
- Re-indexing when index is already fresh and path matches
|
|
145
|
+
- Writing forge-tier.yaml (that is step-02's responsibility)
|
|
146
|
+
- Not storing ccc index context variables for step-02
|
|
147
|
+
|
|
148
|
+
**Master Rule:** CCC indexing is always best-effort. Failures degrade gracefully. The workflow never halts over ccc issues.
|
|
@@ -41,10 +41,10 @@ Write the detected tool availability and calculated tier to forge-tier.yaml, cre
|
|
|
41
41
|
|
|
42
42
|
## CONTEXT BOUNDARIES:
|
|
43
43
|
|
|
44
|
-
- Available: {detected_tools}, {calculated_tier}, {previous_tier} from step-01
|
|
44
|
+
- Available: {detected_tools}, {calculated_tier}, {previous_tier} from step-01; {ccc_index_result}, {ccc_indexed_path}, {ccc_last_indexed} from step-01b
|
|
45
45
|
- Focus: file I/O operations only
|
|
46
46
|
- Limits: do not modify preferences.yaml if it exists
|
|
47
|
-
- Dependencies: step-01 must have completed with tool detection results
|
|
47
|
+
- Dependencies: step-01 and step-01b must have completed with tool detection and CCC index results
|
|
48
48
|
|
|
49
49
|
## MANDATORY SEQUENCE
|
|
50
50
|
|
|
@@ -63,18 +63,33 @@ tools:
|
|
|
63
63
|
ast_grep: {true/false from detection}
|
|
64
64
|
gh_cli: {true/false from detection}
|
|
65
65
|
qmd: {true/false from detection}
|
|
66
|
+
ccc: {true/false from detection}
|
|
67
|
+
ccc_daemon: {ccc_daemon from step-01 if available: "healthy"|"stopped"|"error", or ~}
|
|
66
68
|
security_scan: {true/false — true when SNYK_TOKEN is set}
|
|
67
69
|
|
|
68
70
|
# Capability tier (derived from tool availability)
|
|
69
|
-
# Quick = no tools
|
|
71
|
+
# Quick = no tools | Forge = + ast-grep | Forge+ = + ast-grep + ccc | Deep = + ast-grep + gh + QMD
|
|
70
72
|
tier: {calculated_tier}
|
|
71
73
|
tier_detected_at: {current ISO timestamp}
|
|
72
74
|
|
|
75
|
+
# CCC semantic index state (managed by setup-forge step-01b and extraction workflows)
|
|
76
|
+
ccc_index:
|
|
77
|
+
indexed_path: {ccc_indexed_path from step-01b, or ~}
|
|
78
|
+
last_indexed: {ccc_last_indexed from step-01b, or ~}
|
|
79
|
+
status: {ccc_index_result from step-01b: "fresh"|"created"|"none"|"failed"}
|
|
80
|
+
staleness_threshold_hours: 24
|
|
81
|
+
|
|
82
|
+
# CCC index registry (tracks which source paths have been indexed for skill workflows)
|
|
83
|
+
# PRESERVE existing entries on re-runs — see Note below
|
|
84
|
+
ccc_index_registry: {preserved from existing forge-tier.yaml, or [] if first run}
|
|
85
|
+
|
|
73
86
|
# QMD collection registry (populated by create-skill, consumed by audit/update-skill)
|
|
74
|
-
#
|
|
75
|
-
qmd_collections: []
|
|
87
|
+
# PRESERVE existing entries on re-runs — see Note below
|
|
88
|
+
qmd_collections: {preserved from existing forge-tier.yaml, or [] if first run}
|
|
76
89
|
```
|
|
77
90
|
|
|
91
|
+
**Note on re-runs:** The `qmd_collections`, `ccc_index_registry` arrays, and `staleness_threshold_hours` value must be preserved across re-runs. Before overwriting forge-tier.yaml, read these existing values and re-inject them into the new write. These values are populated by create-skill workflows or customized by users and must not be reset.
|
|
92
|
+
|
|
78
93
|
**This file is ALWAYS overwritten** on every run — it reflects current tool state.
|
|
79
94
|
|
|
80
95
|
If the write fails, report the error and halt the workflow.
|
|
@@ -90,29 +105,31 @@ Check if `{project-root}/_bmad/_memory/forger-sidecar/preferences.yaml` exists:
|
|
|
90
105
|
# Created by setup-forge workflow on first run
|
|
91
106
|
# Edit this file to customize Ferris behavior
|
|
92
107
|
|
|
93
|
-
# Override detected tier (set to Quick, Forge, or Deep to force a tier)
|
|
108
|
+
# Override detected tier (set to Quick, Forge, Forge+, or Deep to force a tier)
|
|
94
109
|
tier_override: ~
|
|
95
110
|
|
|
96
111
|
# Passive context injection (set to false to skip snippet generation and CLAUDE.md updates during export)
|
|
97
112
|
passive_context: true
|
|
98
113
|
|
|
99
|
-
#
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
# Reserved for future use — these fields are not yet consumed by any workflow step
|
|
115
|
+
# output_language: ~
|
|
116
|
+
# skill_format_version: ~
|
|
117
|
+
# citation_style: ~
|
|
118
|
+
# confidence_display: ~
|
|
102
119
|
```
|
|
103
120
|
|
|
104
121
|
**If it DOES exist:** Do not modify. Preserve entirely.
|
|
105
122
|
|
|
106
123
|
### 3. Ensure forge-data/ Directory
|
|
107
124
|
|
|
108
|
-
Check if `{
|
|
125
|
+
Check if `{forge_data_folder}` directory exists:
|
|
109
126
|
|
|
110
127
|
- If missing: create it
|
|
111
128
|
- If exists: skip silently
|
|
112
129
|
|
|
113
130
|
### 4. Auto-Proceed
|
|
114
131
|
|
|
115
|
-
"**Proceeding to
|
|
132
|
+
"**Proceeding to QMD collection hygiene...**"
|
|
116
133
|
|
|
117
134
|
#### Menu Handling Logic:
|
|
118
135
|
|
|
@@ -133,7 +150,7 @@ ONLY WHEN forge-tier.yaml has been written successfully and preferences.yaml exi
|
|
|
133
150
|
|
|
134
151
|
### ✅ SUCCESS:
|
|
135
152
|
|
|
136
|
-
- forge-tier.yaml written with accurate tool booleans, tier, timestamp, and
|
|
153
|
+
- forge-tier.yaml written with accurate tool booleans (including ccc), tier, timestamp, ccc_index state, and preserved qmd_collections/ccc_index_registry arrays
|
|
137
154
|
- preferences.yaml exists (created with defaults on first run, preserved on re-run)
|
|
138
155
|
- forge-data/ directory exists (created or pre-existing)
|
|
139
156
|
- Auto-proceeded to step-03
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 'step-03-auto-index'
|
|
3
|
-
description: 'Verify and clean QMD collections against the forge-tier.yaml registry (Deep tier only)'
|
|
3
|
+
description: 'Verify and clean QMD collections against the forge-tier.yaml registry (Deep tier only) and CCC index registry hygiene (Forge+/Deep)'
|
|
4
4
|
|
|
5
5
|
nextStepFile: './step-04-report.md'
|
|
6
6
|
---
|
|
@@ -11,7 +11,7 @@ nextStepFile: './step-04-report.md'
|
|
|
11
11
|
|
|
12
12
|
If the detected tier is Deep, verify the health of existing QMD collections by cross-referencing them against the `qmd_collections` registry in `forge-tier.yaml`. Identify orphaned collections (in QMD but not in registry) and stale registry entries (in registry but collection missing from QMD). Prompt the user before removing orphaned collections.
|
|
13
13
|
|
|
14
|
-
For Quick and Forge tiers, skip silently and proceed.
|
|
14
|
+
For Quick and Forge tiers (without ccc), skip silently and proceed. For Forge+ tier, skip QMD hygiene but the step routes correctly to the next step.
|
|
15
15
|
|
|
16
16
|
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
17
17
|
|
|
@@ -41,7 +41,7 @@ For Quick and Forge tiers, skip silently and proceed.
|
|
|
41
41
|
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
42
42
|
- 💾 QMD hygiene only verifies and cleans — it does NOT index new content
|
|
43
43
|
- 📖 Use {calculated_tier} from step-01 context
|
|
44
|
-
- 🚫 FORBIDDEN to attempt hygiene for Quick or Forge tiers
|
|
44
|
+
- 🚫 FORBIDDEN to attempt QMD hygiene for Quick, Forge, or Forge+ tiers (Forge+ has no qmd)
|
|
45
45
|
|
|
46
46
|
## CONTEXT BOUNDARIES:
|
|
47
47
|
|
|
@@ -59,7 +59,9 @@ For Quick and Forge tiers, skip silently and proceed.
|
|
|
59
59
|
|
|
60
60
|
Read `{calculated_tier}` from context.
|
|
61
61
|
|
|
62
|
-
**If tier is
|
|
62
|
+
**If tier is Quick or Forge:** Set `{ccc_registry_stale_cleaned: 0}`. Proceed directly to section 6 (Auto-Proceed) — no output, no messaging.
|
|
63
|
+
|
|
64
|
+
**If tier is Forge+:** Skip QMD hygiene (qmd is not available at Forge+). Proceed directly to section 5b (CCC Index Registry Hygiene) — no QMD output, no messaging.
|
|
63
65
|
|
|
64
66
|
**If tier IS Deep:** Continue to section 2.
|
|
65
67
|
|
|
@@ -132,6 +134,26 @@ Update forge-tier.yaml with the cleaned registry.
|
|
|
132
134
|
|
|
133
135
|
**If no stale entries:** Skip this section silently.
|
|
134
136
|
|
|
137
|
+
### 5b. CCC Index Registry Hygiene (Forge+ and Deep with ccc)
|
|
138
|
+
|
|
139
|
+
**IF `tools.ccc` is true in forge-tier.yaml (regardless of whether QMD hygiene ran):**
|
|
140
|
+
|
|
141
|
+
Read the `ccc_index_registry` array from forge-tier.yaml.
|
|
142
|
+
|
|
143
|
+
For each entry, verify the indexed path still exists on disk:
|
|
144
|
+
|
|
145
|
+
**Healthy** — path exists: no action needed.
|
|
146
|
+
|
|
147
|
+
**Stale** — path does not exist (source directory removed or moved):
|
|
148
|
+
- Remove the stale entry from `ccc_index_registry`
|
|
149
|
+
- Log: "Removed stale CCC index registry entry: {path} (path no longer exists)"
|
|
150
|
+
|
|
151
|
+
Update forge-tier.yaml with the cleaned registry.
|
|
152
|
+
|
|
153
|
+
Store `{ccc_registry_stale_cleaned: count}` in context for step-04 reporting.
|
|
154
|
+
|
|
155
|
+
**IF `tools.ccc` is false:** Skip this section silently.
|
|
156
|
+
|
|
135
157
|
### 6. Store Hygiene Results and Auto-Proceed
|
|
136
158
|
|
|
137
159
|
Store in context for step-04 reporting:
|
|
@@ -141,6 +163,7 @@ Store in context for step-04 reporting:
|
|
|
141
163
|
{hygiene_orphaned_removed: count}
|
|
142
164
|
{hygiene_orphaned_kept: count}
|
|
143
165
|
{hygiene_stale_cleaned: count}
|
|
166
|
+
{ccc_registry_stale_cleaned: count}
|
|
144
167
|
```
|
|
145
168
|
|
|
146
169
|
"**Proceeding to forge status report...**"
|
|
@@ -170,7 +193,7 @@ ONLY WHEN the hygiene check has been performed (or skipped for non-Deep tiers) w
|
|
|
170
193
|
- Orphaned collections flagged and user prompted before removal
|
|
171
194
|
- Stale registry entries cleaned from forge-tier.yaml
|
|
172
195
|
- Hygiene results stored for step-04 reporting
|
|
173
|
-
- Quick/Forge tier: skipped silently with no negative messaging
|
|
196
|
+
- Quick/Forge/Forge+ tier: skipped silently with no negative messaging
|
|
174
197
|
- Workflow continues regardless of hygiene outcome
|
|
175
198
|
- Auto-proceeded to step-04
|
|
176
199
|
|
|
@@ -178,7 +201,7 @@ ONLY WHEN the hygiene check has been performed (or skipped for non-Deep tiers) w
|
|
|
178
201
|
|
|
179
202
|
- Creating new QMD collections (that's create-skill's responsibility)
|
|
180
203
|
- Silently deleting collections without user prompt
|
|
181
|
-
- Attempting QMD hygiene for Quick or Forge tiers
|
|
204
|
+
- Attempting QMD hygiene for Quick, Forge, or Forge+ tiers
|
|
182
205
|
- Displaying "skipped" or "missing" messages for non-Deep tiers
|
|
183
206
|
- Halting the workflow due to QMD hygiene failure
|
|
184
207
|
- Indexing project directories (old auto-index behavior — removed)
|
|
@@ -43,7 +43,8 @@ Display the forge status report with positive capability framing, report tier ch
|
|
|
43
43
|
|
|
44
44
|
- Available: {detected_tools}, {calculated_tier}, {previous_tier}, {tier_override} from step-01
|
|
45
45
|
- Available: tool version strings from step-01
|
|
46
|
-
- Available: {hygiene_result}, {hygiene_healthy}, {hygiene_orphaned_removed}, {hygiene_orphaned_kept}, {hygiene_stale_cleaned} from step-03
|
|
46
|
+
- Available: {hygiene_result}, {hygiene_healthy}, {hygiene_orphaned_removed}, {hygiene_orphaned_kept}, {hygiene_stale_cleaned}, {ccc_registry_stale_cleaned} from step-03
|
|
47
|
+
- Available: {ccc_index_result} from step-01b (values: "fresh", "created", "failed", "none")
|
|
47
48
|
- Focus: report display only — no file modifications
|
|
48
49
|
- Dependencies: steps 01-03 must have completed
|
|
49
50
|
|
|
@@ -75,13 +76,24 @@ Load and read {tierRulesData} for the tier capability descriptions and re-run me
|
|
|
75
76
|
{hygiene_healthy} collection(s) healthy
|
|
76
77
|
{if hygiene_orphaned_removed > 0: {hygiene_orphaned_removed} orphaned collection(s) removed}
|
|
77
78
|
{if hygiene_orphaned_kept > 0: {hygiene_orphaned_kept} orphaned collection(s) kept}
|
|
78
|
-
{if hygiene_stale_cleaned > 0: {hygiene_stale_cleaned} stale registry entry/entries cleaned}
|
|
79
|
+
{if hygiene_stale_cleaned > 0: {hygiene_stale_cleaned} stale QMD registry entry/entries cleaned}
|
|
80
|
+
{end if}
|
|
81
|
+
|
|
82
|
+
{if ccc_registry_stale_cleaned > 0:}
|
|
83
|
+
CCC Registry: {ccc_registry_stale_cleaned} stale entry/entries cleaned
|
|
79
84
|
{end if}
|
|
80
85
|
|
|
81
86
|
{if hygiene_result is "completed" and hygiene_healthy is 0:}
|
|
82
87
|
QMD Registry: empty — collections are created automatically when you run [CS] Create Skill.
|
|
83
88
|
{end if}
|
|
84
89
|
|
|
90
|
+
{if tools.ccc is true:}
|
|
91
|
+
CCC Index:
|
|
92
|
+
{if ccc_index_result is "fresh": up to date — semantic discovery ready}
|
|
93
|
+
{if ccc_index_result is "created": indexed this run — semantic discovery ready}
|
|
94
|
+
{if ccc_index_result is "failed": indexing failed — semantic discovery unavailable this session}
|
|
95
|
+
{end if}
|
|
96
|
+
|
|
85
97
|
{if tier_override is active:}
|
|
86
98
|
Note: Tier override active (set in preferences.yaml)
|
|
87
99
|
|
|
@@ -103,10 +115,10 @@ Load and read {tierRulesData} for the tier capability descriptions and re-run me
|
|
|
103
115
|
|
|
104
116
|
### 3. Handle --update-spec Flag (Optional)
|
|
105
117
|
|
|
106
|
-
**If `--update-spec`
|
|
118
|
+
**If the user included `--update-spec` in their workflow invocation (e.g., `@Ferris SF --update-spec`):**
|
|
107
119
|
- Attempt to fetch the latest agentskills.io specification schema
|
|
108
120
|
- Use `gh` or `curl` to retrieve the spec
|
|
109
|
-
- Store in `{
|
|
121
|
+
- Store in `{forge_data_folder}/agentskills-spec.json` (or appropriate format)
|
|
110
122
|
- If fetch succeeds: display "agentskills.io spec updated."
|
|
111
123
|
- If fetch fails: display "Could not fetch agentskills.io spec. Existing spec (if any) unchanged."
|
|
112
124
|
- Do NOT fail the workflow over this — it is purely optional
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-forge
|
|
3
|
-
description: Initialize forge environment, detect tools, set tier,
|
|
3
|
+
description: Initialize forge environment, detect tools, set tier, verify QMD collection hygiene
|
|
4
4
|
web_bundle: true
|
|
5
5
|
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/setup-forge'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Setup Forge
|
|
9
9
|
|
|
10
|
-
**Goal:** Initialize the forge environment by detecting available tools, determining the capability tier (Quick/Forge/Deep), writing persistent configuration, and optionally indexing the project for deep search.
|
|
10
|
+
**Goal:** Initialize the forge environment by detecting available tools, determining the capability tier (Quick/Forge/Forge+/Deep), writing persistent configuration, and optionally indexing the project for deep search.
|
|
11
11
|
|
|
12
12
|
**Your Role:** You are a system executor performing environment resolution. This is a fully autonomous workflow — no user interaction is required during execution. Run each step in sequence, write configuration files, and report results at completion.
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/setup-forge'
|
|
|
15
15
|
|
|
16
16
|
### Core Principles
|
|
17
17
|
|
|
18
|
-
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere
|
|
18
|
+
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere to 1 file as directed at a time
|
|
19
19
|
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - never load future step files until told to do so
|
|
20
20
|
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
|
21
21
|
- **Fully Autonomous**: All steps auto-proceed with no user interaction until the final report
|
|
@@ -44,6 +44,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/skillforge/setup-forge'
|
|
|
44
44
|
Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
|
|
45
45
|
|
|
46
46
|
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
|
47
|
+
- `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
47
48
|
|
|
48
49
|
### 2. First Step Execution
|
|
49
50
|
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
## Naive Mode Weight Redistribution
|
|
19
19
|
|
|
20
|
+
The following weights replace the default table for naive mode. The 18% coherence weight from the default table has been proportionally redistributed into these values. Do not apply a second redistribution.
|
|
21
|
+
|
|
20
22
|
When running in naive mode (no coherence category):
|
|
21
23
|
- Export Coverage: 45%
|
|
22
24
|
- Signature Accuracy: 25%
|
|
@@ -38,6 +40,7 @@ tessl evaluates SKILL.md body content only — it does not read `references/*.md
|
|
|
38
40
|
- Signature Accuracy: skipped (no AST)
|
|
39
41
|
- Type Coverage: skipped (no AST)
|
|
40
42
|
- Score based on: structural completeness only
|
|
43
|
+
- Weight redistribution: skipped categories' weights (Signature Accuracy 22% + Type Coverage 14%) redistributed proportionally to remaining active categories
|
|
41
44
|
|
|
42
45
|
### Forge Tier (ast-grep)
|
|
43
46
|
- Export Coverage: AST-backed export comparison
|
|
@@ -45,6 +48,11 @@ tessl evaluates SKILL.md body content only — it does not read `references/*.md
|
|
|
45
48
|
- Type Coverage: AST-verified type completeness
|
|
46
49
|
- Full scoring formula applied
|
|
47
50
|
|
|
51
|
+
### Forge+ Tier (ast-grep + ccc)
|
|
52
|
+
- Same scoring as Forge tier — ccc provides pre-ranking but does not change scoring weights
|
|
53
|
+
- Improved extraction coverage (from ccc pre-discovery) may increase T1 count, but scoring formula is identical to Forge
|
|
54
|
+
- Full scoring formula applied
|
|
55
|
+
|
|
48
56
|
### Deep Tier (ast-grep + gh + QMD)
|
|
49
57
|
- All Forge tier checks plus:
|
|
50
58
|
- Cross-repository reference verification
|
|
@@ -32,7 +32,7 @@ If no provenance-map.json exists (typical for quick-skill output), fall back to
|
|
|
32
32
|
If neither provenance-map nor metadata exports provide a usable baseline, but remote reading tools (zread, deepwiki, gh API, or similar) are available and `source_repo` is set in metadata.json, read the entry point remotely to build the export inventory from scratch. Name-matching only — no AST. Set `analysis_confidence: remote-only`.
|
|
33
33
|
|
|
34
34
|
**State 5 — No source access at all:**
|
|
35
|
-
If none of the above succeed, fall through to docs-only mode (
|
|
35
|
+
If none of the above succeed, fall through to docs-only mode (as defined in step-01-init.md Section 0: pre-analysis source type detection). Set `analysis_confidence: docs-only`. Warn: "**No source access available.** Coverage check evaluates documentation self-consistency only. Re-run with local clone or remote access for source-backed verification."
|
|
36
36
|
|
|
37
37
|
Set `analysis_confidence` in context for use in Section 2 analysis depth, step-05 output, and step-05 scoring.
|
|
38
38
|
|
|
@@ -112,7 +112,7 @@ Log each issue as a pre-check finding. Continue with testing — frontmatter iss
|
|
|
112
112
|
Read `{sidecarFile}` to determine available analysis depth.
|
|
113
113
|
|
|
114
114
|
**If forge-tier.yaml exists:**
|
|
115
|
-
- Read `tier` value (Quick, Forge, or Deep)
|
|
115
|
+
- Read `tier` value (Quick, Forge, Forge+, or Deep)
|
|
116
116
|
- Read tool availability flags (ast_grep, gh_cli, qmd)
|
|
117
117
|
|
|
118
118
|
**If forge-tier.yaml missing:**
|
|
@@ -124,7 +124,7 @@ Default to Quick tier and continue.
|
|
|
124
124
|
|
|
125
125
|
### 4b. Apply Tier Override (if set)
|
|
126
126
|
|
|
127
|
-
Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, or Deep), update `detected_tier` to the override value for use in subsequent steps and output documents.
|
|
127
|
+
Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), update `detected_tier` to the override value for use in subsequent steps and output documents.
|
|
128
128
|
|
|
129
129
|
### 5. Load Skill Metadata
|
|
130
130
|
|
|
@@ -150,6 +150,7 @@ testMode: ''
|
|
|
150
150
|
forgeTier: '{detected_tier}'
|
|
151
151
|
testResult: ''
|
|
152
152
|
score: ''
|
|
153
|
+
threshold: ''
|
|
153
154
|
analysisConfidence: ''
|
|
154
155
|
testDate: '{current_date}'
|
|
155
156
|
stepsCompleted: ['step-01-init']
|
|
@@ -86,6 +86,8 @@ Read the skill metadata (loaded in step 01) and check:
|
|
|
86
86
|
- Default to **naive mode** (conservative — fewer checks, less chance of false negatives from missing context)
|
|
87
87
|
- Note the default in the report
|
|
88
88
|
|
|
89
|
+
**Quick-tier adjustment (applies to both modes):** If `forge_tier` is `Quick`, Signature Accuracy and Type Coverage are skipped during scoring (no AST available). Their weights are redistributed proportionally to remaining active categories. See `scoring-rules.md` Tier-Dependent Scoring section for details.
|
|
90
|
+
|
|
89
91
|
### 3. Update Output Document
|
|
90
92
|
|
|
91
93
|
Update `{outputFile}` frontmatter:
|
|
@@ -6,6 +6,7 @@ testMode: ''
|
|
|
6
6
|
forgeTier: ''
|
|
7
7
|
testResult: ''
|
|
8
8
|
score: ''
|
|
9
|
+
threshold: ''
|
|
9
10
|
analysisConfidence: ''
|
|
10
11
|
testDate: ''
|
|
11
12
|
stepsCompleted: []
|
|
@@ -20,6 +21,8 @@ nextWorkflow: ''
|
|
|
20
21
|
|
|
21
22
|
## Coherence Analysis
|
|
22
23
|
|
|
24
|
+
## External Validation
|
|
25
|
+
|
|
23
26
|
## Completeness Score
|
|
24
27
|
|
|
25
28
|
## Gap Report
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: test-skill
|
|
3
3
|
description: Cognitive completeness verification. Naive and contextual modes.
|
|
4
4
|
web_bundle: true
|
|
5
|
-
installed_path: '{project-root}/_bmad/skf/workflows/test-skill'
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/test-skill'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Test Skill
|
|
@@ -15,7 +15,7 @@ installed_path: '{project-root}/_bmad/skf/workflows/test-skill'
|
|
|
15
15
|
|
|
16
16
|
### Core Principles
|
|
17
17
|
|
|
18
|
-
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere
|
|
18
|
+
- **Micro-file Design**: Each step of the overall goal is a self contained instruction file that you will adhere to 1 file as directed at a time
|
|
19
19
|
- **Just-In-Time Loading**: Only 1 current step file will be loaded, read, and executed to completion - never load future step files until told to do so
|
|
20
20
|
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
|
21
21
|
- **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array
|
|
@@ -89,14 +89,15 @@ Search for the test report at `{forge_data_folder}/{skill_name}/test-report-{ski
|
|
|
89
89
|
### 3. Load Forge Tier Configuration
|
|
90
90
|
|
|
91
91
|
**Load `{sidecar_path}/forge-tier.yaml`:**
|
|
92
|
-
- Extract: `tier` (Quick, Forge, or Deep), available tools
|
|
92
|
+
- Extract: `tier` (Quick, Forge, Forge+, or Deep), available tools
|
|
93
93
|
- If missing: **ABORT** — "No forge-tier.yaml found. Run setup-forge first to detect available tools."
|
|
94
94
|
|
|
95
|
-
**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.
|
|
95
|
+
**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.
|
|
96
96
|
|
|
97
97
|
**Determine analysis capabilities:**
|
|
98
98
|
- **Quick:** text pattern matching only → T1-low confidence
|
|
99
99
|
- **Forge:** AST structural extraction → T1 confidence
|
|
100
|
+
- **Forge+:** AST structural extraction + CCC semantic ranking → T1 confidence (with ccc signals)
|
|
100
101
|
- **Deep:** AST + QMD semantic enrichment → T1 + T2 confidence
|
|
101
102
|
|
|
102
103
|
### 4. Load Provenance Map
|
|
@@ -110,7 +110,7 @@ Launch subprocesses in parallel that compare source state against provenance map
|
|
|
110
110
|
|
|
111
111
|
**Category C — Rename detection:**
|
|
112
112
|
- Cross-reference deleted files/exports with added files/exports
|
|
113
|
-
- If content similarity > 80%: classify as RENAMED instead of deleted+added
|
|
113
|
+
- If content similarity > 80%: classify as RENAMED instead of deleted+added. **Similarity mechanism by tier:** Quick: compare file size ratio (within 20%) and export name overlap (>70% of exports match by name). Forge and above: use ast-grep to compare export signatures between the deleted and added files. Forge+/Deep: use CCC semantic similarity when available
|
|
114
114
|
|
|
115
115
|
**Category D — Script/asset file changes:**
|
|
116
116
|
- Compare `file_entries` from provenance-map.json against current source files
|
|
@@ -177,7 +177,7 @@ The skill `{skill_name}` is current — no update needed.
|
|
|
177
177
|
| Files moved/renamed | {count} |
|
|
178
178
|
| Exports affected | {total_export_changes} |
|
|
179
179
|
|
|
180
|
-
**Proceeding to re-extraction of {affected_file_count}
|
|
180
|
+
**Proceeding to re-extraction of {affected_file_count if normal mode, or gap_count if gap-driven mode} changes...**"
|
|
181
181
|
|
|
182
182
|
### 6. Present MENU OPTIONS
|
|
183
183
|
|
|
@@ -4,8 +4,9 @@ description: 'Tier-aware AST extraction on changed files only, producing fresh e
|
|
|
4
4
|
|
|
5
5
|
nextStepFile: './step-04-merge.md'
|
|
6
6
|
extractionPatternsData: '../../create-skill/data/extraction-patterns.md'
|
|
7
|
-
|
|
7
|
+
extractionPatternsTracingData: '../../create-skill/data/extraction-patterns-tracing.md'
|
|
8
8
|
remoteSourceResolutionData: '../data/remote-source-resolution.md'
|
|
9
|
+
tierDegradationRulesData: '../../create-skill/data/tier-degradation-rules.md'
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Step 3: Re-Extract Changed Exports
|
|
@@ -92,6 +93,8 @@ Perform tier-aware extraction on only the changed files identified in step 02, p
|
|
|
92
93
|
- Extract: parameter types, return types, JSDoc/docstring comments
|
|
93
94
|
- Confidence: T1 (AST-verified structural truth)
|
|
94
95
|
|
|
96
|
+
**Tier degradation handling (Forge/Forge+/Deep):** If ast-grep is unavailable or fails on individual files, follow `{tierDegradationRulesData}` for fallback strategy and user notification requirements. Silent degradation is forbidden — the user must always know when AST extraction was skipped.
|
|
97
|
+
|
|
95
98
|
**Deep tier (AST + QMD semantic enrichment):**
|
|
96
99
|
- Perform all Forge tier extractions (T1)
|
|
97
100
|
- Additionally: launch a subprocess that queries qmd_bridge for temporal context on changed exports, returning T2 evidence per export
|
|
@@ -103,7 +106,7 @@ Perform tier-aware extraction on only the changed files identified in step 02, p
|
|
|
103
106
|
DO NOT BE LAZY — For EACH file in the change manifest with status MODIFIED, ADDED, or RENAMED, launch a subprocess that:
|
|
104
107
|
|
|
105
108
|
1. Loads the source file
|
|
106
|
-
2. Performs tier-appropriate extraction (Quick/Forge/Deep)
|
|
109
|
+
2. Performs tier-appropriate extraction (Quick/Forge/Forge+/Deep)
|
|
107
110
|
3. For each export found:
|
|
108
111
|
- Record: export name, type (function/class/type/constant), signature
|
|
109
112
|
- Record: file path, start line, end line
|
|
@@ -117,7 +120,24 @@ DO NOT BE LAZY — For EACH file in the change manifest with status MODIFIED, AD
|
|
|
117
120
|
|
|
118
121
|
**For MOVED files:** Re-extract at new location to update file:line references.
|
|
119
122
|
|
|
120
|
-
**Re-export tracing (Forge/Deep only):** After extracting changed files, check if any public exports from the package entry point (`__init__.py`, `index.ts`, `lib.rs`) are unresolved — particularly when a changed file is part of a module re-export chain. Follow the **Re-Export Tracing** protocol in `{
|
|
123
|
+
**Re-export tracing (Forge/Deep only):** After extracting changed files, check if any public exports from the package entry point (`__init__.py`, `index.ts`, `lib.rs`) are unresolved — particularly when a changed file is part of a module re-export chain. Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to trace unresolved symbols to their actual definition files.
|
|
124
|
+
|
|
125
|
+
### 2b. CCC Semantic Ranking (Forge+ and Deep with ccc)
|
|
126
|
+
|
|
127
|
+
**IF `tools.ccc` is true in forge-tier.yaml:**
|
|
128
|
+
|
|
129
|
+
Before aggregating extraction results, use CCC to assess semantic significance of changes:
|
|
130
|
+
|
|
131
|
+
1. Run `ccc_bridge.search("{skill_name}", source_root, top_k=15)` to get the skill's most semantically central files
|
|
132
|
+
2. Cross-reference the change manifest files with CCC results
|
|
133
|
+
3. Files appearing in BOTH the change manifest AND CCC's top results are **semantically significant changes** — flag them for priority in the merge step
|
|
134
|
+
4. Store `{ccc_significant_changes: [{file, score}]}` in context
|
|
135
|
+
|
|
136
|
+
This helps the merge step (section 4) prioritize which changes are most likely to affect the skill's core content vs. peripheral modifications.
|
|
137
|
+
|
|
138
|
+
CCC failures: skip ranking silently, all changes treated equally.
|
|
139
|
+
|
|
140
|
+
**IF `tools.ccc` is false:** Skip this section silently.
|
|
121
141
|
|
|
122
142
|
### 3. Deep Tier QMD Enrichment (Conditional)
|
|
123
143
|
|
|
@@ -200,7 +220,7 @@ ONLY WHEN all changed files have been extracted and results compiled will you lo
|
|
|
200
220
|
- Every changed file from manifest extracted with tier-appropriate method
|
|
201
221
|
- All exports labeled with confidence tier (T1/T1-low/T2)
|
|
202
222
|
- AST file:line citations on every extracted export
|
|
203
|
-
- QMD enrichment performed for Deep tier (skipped with notice for Quick/Forge)
|
|
223
|
+
- QMD enrichment performed for Deep tier (skipped with notice for Quick/Forge/Forge+)
|
|
204
224
|
- Extraction results compiled with per-file detail
|
|
205
225
|
- Summary displayed before auto-proceeding
|
|
206
226
|
- No unchanged files extracted
|