bmad-module-skill-forge 0.6.0 → 0.7.1
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 +2 -2
- package/docs/agents.md +9 -5
- package/docs/concepts.md +17 -13
- package/docs/examples.md +19 -4
- package/docs/getting-started.md +34 -19
- package/docs/how-it-works.md +87 -84
- package/docs/index.md +1 -1
- package/docs/workflows.md +88 -40
- package/package.json +1 -1
- package/src/agents/forger.agent.yaml +17 -5
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +2 -1
- package/src/forger/preferences.yaml +5 -7
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +3 -2
- package/src/knowledge/confidence-tiers.md +12 -1
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +11 -7
- package/src/knowledge/progressive-capability.md +5 -2
- package/src/knowledge/qmd-registry.md +5 -2
- package/src/knowledge/skf-knowledge-index.csv +2 -0
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/tool-resolution.md +55 -0
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +3 -0
- package/src/workflows/README.md +35 -17
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- 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 +3 -3
- 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/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +2 -1
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +8 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
- package/src/workflows/audit-skill/workflow.md +2 -1
- 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 +1 -1
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +7 -1
- package/src/workflows/create-skill/data/skill-sections.md +12 -11
- package/src/workflows/create-skill/data/source-resolution-protocols.md +2 -2
- package/src/workflows/create-skill/data/tier-degradation-rules.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +14 -10
- package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +4 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +19 -19
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
- 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 +3 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
- package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
- package/src/workflows/create-skill/workflow.md +2 -2
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/manifest-patterns.md +23 -1
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -7
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +37 -3
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +29 -3
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +50 -7
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +35 -3
- 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 +3 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +2 -2
- 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-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 +18 -6
- 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/steps-c/step-01-detect-and-tier.md +2 -1
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +5 -3
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
- package/src/workflows/setup-forge/workflow.md +3 -2
- package/src/workflows/test-skill/data/scoring-rules.md +3 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/workflow.md +2 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +3 -3
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +8 -3
- package/src/workflows/update-skill/steps-c/step-05-validate.md +8 -12
- package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
- 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/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 -525
- 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 -430
- 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
|
@@ -33,7 +33,7 @@ Compare the original provenance map extractions from create-skill against the cu
|
|
|
33
33
|
- 🎯 Focus only on structural comparison — added/removed/changed exports
|
|
34
34
|
- 🚫 FORBIDDEN to classify severity — that happens in Step 05
|
|
35
35
|
- 🚫 FORBIDDEN to suggest remediation — that happens in Step 06
|
|
36
|
-
- 💬 Use subprocess Pattern 4 (parallel
|
|
36
|
+
- 💬 Use subprocess Pattern 4 (parallel): In Claude Code, use multiple parallel Agent tool calls or `run_in_background: true`. In Cursor, use parallel requests (IDE-dependent). In CLI, use `xargs -P` or background processes. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
|
|
37
37
|
- ⚙️ If subprocess unavailable, compare categories sequentially in main thread
|
|
38
38
|
|
|
39
39
|
## EXECUTION PROTOCOLS:
|
|
@@ -70,7 +70,7 @@ Normalize both sets for comparison:
|
|
|
70
70
|
|
|
71
71
|
### 2. Detect Added Exports
|
|
72
72
|
|
|
73
|
-
**Launch subprocess (Pattern 4 — parallel execution):**
|
|
73
|
+
**Launch subprocess (Pattern 4 — parallel execution):** In Claude Code, use multiple parallel Agent tool calls. In CLI, use `xargs -P` or equivalent.
|
|
74
74
|
|
|
75
75
|
Find exports that exist in current scan but NOT in provenance map.
|
|
76
76
|
|
|
@@ -33,7 +33,7 @@ Compare QMD knowledge context between the original skill creation and current st
|
|
|
33
33
|
- 🎯 Focus only on semantic/meaning-level changes via QMD context
|
|
34
34
|
- 🚫 FORBIDDEN to classify severity — that happens in Step 05
|
|
35
35
|
- 🚫 FORBIDDEN to repeat structural findings from Step 03
|
|
36
|
-
- 💬 Use subprocess Pattern 3 (data operations) when available for QMD queries
|
|
36
|
+
- 💬 Use subprocess Pattern 3 (data operations — main thread Read + process in Claude Code, script in CLI) when available for QMD queries. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
|
|
37
37
|
- ⚙️ If subprocess unavailable, query QMD in main thread
|
|
38
38
|
- 🔀 CONDITIONAL: Skip entire analysis at Quick/Forge/Forge+ tier — append skip notice only
|
|
39
39
|
|
|
@@ -82,7 +82,7 @@ Continue to section 2.
|
|
|
82
82
|
### 2. Query Original Knowledge Context
|
|
83
83
|
|
|
84
84
|
Launch a subprocess (Pattern 3 — data operations) that:
|
|
85
|
-
1.
|
|
85
|
+
1. Read the `qmd_collections` registry from `{sidecar_path}/forge-tier.yaml`. Find the entry where `skill_name` matches `{skill_name}` AND `type` is `"extraction"`. Use the `name` field from that entry as the collection to query. If no matching entry exists, log: "No QMD extraction collection found for {skill_name}. Semantic diff skipped." → Auto-proceed to {nextStepFile}.
|
|
86
86
|
2. Queries for knowledge context around each export documented in the skill
|
|
87
87
|
3. Retrieves: usage patterns, conventions, architectural context, dependency relationships
|
|
88
88
|
4. Returns structured findings to parent
|
|
@@ -34,7 +34,7 @@ Grade every drift finding from Steps 03 and 04 by severity level (CRITICAL/HIGH/
|
|
|
34
34
|
- 🎯 Focus only on classifying severity of existing findings
|
|
35
35
|
- 🚫 FORBIDDEN to discover new drift items — only classify what Steps 03-04 found
|
|
36
36
|
- 🚫 FORBIDDEN to suggest remediation — that happens in Step 06
|
|
37
|
-
- 💬 Use subprocess Pattern 3 (data operations) to load severity rules and classify
|
|
37
|
+
- 💬 Use subprocess Pattern 3 (data operations — main thread Read + process in Claude Code, script in CLI) to load severity rules and classify. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
|
|
38
38
|
- ⚙️ If subprocess unavailable, load rules and classify in main thread
|
|
39
39
|
|
|
40
40
|
## EXECUTION PROTOCOLS:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: audit-skill
|
|
3
3
|
description: "Drift detection. Forge tier: structural. Deep tier: full."
|
|
4
4
|
web_bundle: true
|
|
5
|
-
installed_path: '{project-root}/_bmad/skf/workflows/audit-skill'
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/audit-skill'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Audit Skill
|
|
@@ -57,6 +57,7 @@ Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
|
|
|
57
57
|
|
|
58
58
|
- `project_name`, `output_folder`, `user_name`, `communication_language`, `document_output_language`
|
|
59
59
|
- `skills_output_folder`, `forge_data_folder`, `sidecar_path`
|
|
60
|
+
- Generate and store `timestamp` as the current date-time in `YYYYMMDD-HHmmss` format. This value is fixed for the entire workflow run and must not be regenerated in subsequent steps.
|
|
60
61
|
|
|
61
62
|
### 2. First Step Execution
|
|
62
63
|
|
|
@@ -59,6 +59,16 @@ Prompt: "Which of these would you like to include? (Enter numbers, or 'all'):"
|
|
|
59
59
|
Exclusions will include all internal implementation files, tests, and utilities.
|
|
60
60
|
Prompt: "Any additional items you'd like to include or exclude?"
|
|
61
61
|
|
|
62
|
+
### Docs-Only Boundaries
|
|
63
|
+
|
|
64
|
+
**No source code access.** Scope is defined by the `doc_urls` collected during intent gathering.
|
|
65
|
+
|
|
66
|
+
- All content derived from external documentation
|
|
67
|
+
- No include/exclude patterns — coverage determined by fetched documentation
|
|
68
|
+
- All extractions labeled T3 (`[EXT:{url}]` citations)
|
|
69
|
+
|
|
70
|
+
Prompt: "Any additional documentation URLs to include? Or URLs to exclude from the ones collected?"
|
|
71
|
+
|
|
62
72
|
## Scripts & Assets Detection (Optional Refinement)
|
|
63
73
|
|
|
64
74
|
When `scripts_intent` or `assets_intent` is `detect` (default), SKF auto-detects from source directories matching: `scripts/`, `bin/`, `tools/`, `cli/` (for scripts) and `assets/`, `templates/`, `schemas/`, `configs/`, `examples/` (for assets). Detection applies to all scope types except `docs-only`.
|
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
## Required Fields
|
|
4
4
|
|
|
5
|
-
| Field | Type |
|
|
6
|
-
|
|
7
|
-
| name | string |
|
|
8
|
-
| version | string | Semantic
|
|
9
|
-
| source_repo | string | GitHub URL or local path |
|
|
10
|
-
| language | string |
|
|
11
|
-
| scope | object |
|
|
12
|
-
| description | string | What
|
|
13
|
-
| forge_tier | string |
|
|
14
|
-
| created | string |
|
|
15
|
-
| created_by | string |
|
|
5
|
+
| Field | Type | Constraint | Description |
|
|
6
|
+
|-------|------|------------|-------------|
|
|
7
|
+
| name | string | kebab-case `[a-z0-9-]+` | Unique skill identifier |
|
|
8
|
+
| version | string | Semantic `X.Y.Z` | Auto-detect from source (see Version Detection below), fall back to `1.0.0` |
|
|
9
|
+
| source_repo | string | GitHub URL or local path | Repository or project root (optional when `source_type: "docs-only"`) |
|
|
10
|
+
| language | string | Recognized language | Primary programming language |
|
|
11
|
+
| scope | object | See Scope Object below | Boundary definition |
|
|
12
|
+
| description | string | 1-3 sentences | What the skill covers |
|
|
13
|
+
| forge_tier | string | `Quick` / `Forge` / `Forge+` / `Deep` | Inherited from forge-tier.yaml (Title Case) |
|
|
14
|
+
| created | string | ISO date `YYYY-MM-DD` | Generation date |
|
|
15
|
+
| created_by | string | user_name from config | Who generated the brief |
|
|
16
16
|
|
|
17
17
|
## Optional Fields
|
|
18
18
|
|
|
19
|
-
| Field | Type |
|
|
20
|
-
|
|
21
|
-
| source_type | string |
|
|
22
|
-
| doc_urls | array | Documentation URLs for T3 content
|
|
23
|
-
| `scripts_intent` | string | Describes whether scripts should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip scripts), or a free-text description of expected scripts (e.g., "CLI validation tools in bin/"). |
|
|
24
|
-
| `assets_intent` | string | Describes whether assets should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip assets), or a free-text description of expected assets (e.g., "JSON schemas in schemas/"). |
|
|
19
|
+
| Field | Type | Constraint | Description |
|
|
20
|
+
|-------|------|------------|-------------|
|
|
21
|
+
| source_type | string | `source` or `docs-only` | Default `source`. When `docs-only`: `source_repo` optional, `doc_urls` required |
|
|
22
|
+
| doc_urls | array | `{url, label}` objects | Documentation URLs for T3 content. Required when `source_type: "docs-only"` |
|
|
23
|
+
| `scripts_intent` | string | `detect` / `none` / free-text | Describes whether scripts should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip scripts), or a free-text description of expected scripts (e.g., "CLI validation tools in bin/"). |
|
|
24
|
+
| `assets_intent` | string | `detect` / `none` / free-text | Describes whether assets should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip assets), or a free-text description of expected assets (e.g., "JSON schemas in schemas/"). |
|
|
25
|
+
| `source_authority` | string | `official` / `community` / `internal` | Default `community`. Set to `official` only when the skill creator is the library maintainer. Forced to `community` when `source_type: "docs-only"`. |
|
|
25
26
|
|
|
26
27
|
When `source_type: "docs-only"`:
|
|
27
28
|
- `source_repo` becomes optional (set to doc site URL for reference)
|
|
@@ -48,7 +49,7 @@ The create-skill workflow (step-03-extract) also performs version reconciliation
|
|
|
48
49
|
|
|
49
50
|
```yaml
|
|
50
51
|
scope:
|
|
51
|
-
type: full-library | specific-modules | public-api
|
|
52
|
+
type: full-library | specific-modules | public-api | docs-only
|
|
52
53
|
include:
|
|
53
54
|
- "src/**/*.ts" # Glob patterns for included files/directories
|
|
54
55
|
exclude:
|
|
@@ -67,7 +68,7 @@ source_type: "source" # "source" (default) or "docs-only"
|
|
|
67
68
|
source_repo: "{github-url-or-local-path}"
|
|
68
69
|
language: "{detected-language}"
|
|
69
70
|
description: "{brief-description}"
|
|
70
|
-
forge_tier: "{
|
|
71
|
+
forge_tier: "{Quick|Forge|Forge+|Deep}"
|
|
71
72
|
created: "{date}"
|
|
72
73
|
created_by: "{user_name}"
|
|
73
74
|
scope:
|
|
@@ -83,12 +84,13 @@ scope:
|
|
|
83
84
|
# label: "API Reference"
|
|
84
85
|
# scripts_intent: detect # Optional: detect | none | description
|
|
85
86
|
# assets_intent: detect # Optional: detect | none | description
|
|
87
|
+
# source_authority: community # Optional: official | community | internal
|
|
86
88
|
---
|
|
87
89
|
```
|
|
88
90
|
|
|
89
91
|
## Human-Readable Presentation Format
|
|
90
92
|
|
|
91
|
-
When presenting the brief for confirmation (step 04), display as:
|
|
93
|
+
When presenting the brief for confirmation (brief-skill step 04 only — not applicable to analyze-source batch generation), display as:
|
|
92
94
|
|
|
93
95
|
```
|
|
94
96
|
Skill Brief: {name}
|
|
@@ -114,8 +116,8 @@ Created by: {created_by}
|
|
|
114
116
|
1. `name` must be unique within {forge_data_folder}
|
|
115
117
|
2. `source_repo` must be accessible (gh api for GitHub, path exists for local)
|
|
116
118
|
3. `language` must be a recognized programming language
|
|
117
|
-
4. `scope.type` must be one of the
|
|
118
|
-
5. `scope.include` must have at least one pattern
|
|
119
|
-
6. `forge_tier` must be one of:
|
|
119
|
+
4. `scope.type` must be one of the four defined types
|
|
120
|
+
5. `scope.include` must have at least one pattern (exception: `docs-only` scope, where include patterns are optional since no source code is available)
|
|
121
|
+
6. `forge_tier` must be one of: Quick, Forge, Forge+, Deep (Title Case, must match the tier from forge-tier.yaml, or default to Quick)
|
|
120
122
|
7. When `source_type: "docs-only"`: `doc_urls` must have >= 1 entry, `source_repo` becomes optional
|
|
121
123
|
8. Each `doc_urls` entry must have a valid `url` field
|
|
@@ -68,7 +68,7 @@ Attempt to load `{forgeTierFile}`:
|
|
|
68
68
|
|
|
69
69
|
**If not found:**
|
|
70
70
|
- Display: "**Note:** No forge tier configuration found. Defaulting to Quick tier. Run **setup-forge** first for full capabilities."
|
|
71
|
-
- Default to: `forge_tier:
|
|
71
|
+
- Default to: `forge_tier: Quick`
|
|
72
72
|
|
|
73
73
|
### 2. Welcome and Explain
|
|
74
74
|
|
|
@@ -135,7 +135,7 @@ Based on detected language, identify public API surface:
|
|
|
135
135
|
|
|
136
136
|
If `tools.ccc` is true in forge-tier.yaml, supplement the module listing with a semantic discovery pass:
|
|
137
137
|
|
|
138
|
-
Run `ccc_bridge.search("{repo_name} public API exports modules", source_path, top_k=10)
|
|
138
|
+
Run `ccc_bridge.search("{repo_name} public API exports modules", source_path, top_k=10)` — **Tool resolution:** `/ccc` skill search (Claude Code), ccc MCP server (Cursor), or `ccc search` CLI. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
|
|
139
139
|
|
|
140
140
|
If results are returned, display:
|
|
141
141
|
|
|
@@ -91,6 +91,9 @@ scope:
|
|
|
91
91
|
# doc_urls:
|
|
92
92
|
# - url: "{documentation URL}"
|
|
93
93
|
# label: "{page label}"
|
|
94
|
+
# scripts_intent: detect # Optional: detect | none | description of expected scripts
|
|
95
|
+
# assets_intent: detect # Optional: detect | none | description of expected assets
|
|
96
|
+
# source_authority: community # Optional: official | community | internal
|
|
94
97
|
---
|
|
95
98
|
```
|
|
96
99
|
|
|
@@ -28,7 +28,13 @@ Source reading via gh_bridge — infer exports from file structure and content.
|
|
|
28
28
|
|
|
29
29
|
Structural extraction via ast-grep — verified exports with line-level citations.
|
|
30
30
|
|
|
31
|
-
> **Note:** `ast_bridge.*`, `qmd_bridge.*`, and `ccc_bridge.*` references below are **conceptual interfaces**, not callable functions.
|
|
31
|
+
> **Note:** `ast_bridge.*`, `qmd_bridge.*`, and `ccc_bridge.*` references below are **conceptual interfaces**, not callable functions. Resolve them as follows:
|
|
32
|
+
> - `ast_bridge.*` → ast-grep MCP tools (`mcp__ast-grep__find_code`, `mcp__ast-grep__find_code_by_rule`) or `ast-grep` CLI
|
|
33
|
+
> - `qmd_bridge.*` → QMD MCP tools (`mcp__plugin_qmd-plugin_qmd__search`, `vector_search`) or `qmd` CLI
|
|
34
|
+
> - `ccc_bridge.*` → `/ccc` skill (Claude Code), ccc MCP server (Cursor), or `ccc` CLI
|
|
35
|
+
> - `gh_bridge.*` → `gh api` commands or direct file I/O for local sources
|
|
36
|
+
>
|
|
37
|
+
> See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md) for the complete resolution table. Also see the AST Extraction Protocol section below and the TOOL/SUBPROCESS FALLBACK rule for dispatch details.
|
|
32
38
|
|
|
33
39
|
### Strategy
|
|
34
40
|
|
|
@@ -132,6 +132,12 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
|
|
|
132
132
|
"qmd": "{version-or-null}",
|
|
133
133
|
"skf": "{skf_version}"
|
|
134
134
|
},
|
|
135
|
+
"confidence_distribution": {
|
|
136
|
+
"t1": 0,
|
|
137
|
+
"t1_low": 0,
|
|
138
|
+
"t2": 0,
|
|
139
|
+
"t3": 0
|
|
140
|
+
},
|
|
135
141
|
"stats": {
|
|
136
142
|
"exports_documented": 0,
|
|
137
143
|
"exports_public_api": 0,
|
|
@@ -139,18 +145,13 @@ Indexed pipe-delimited format for CLAUDE.md managed section (~80-120 tokens per
|
|
|
139
145
|
"exports_total": 0,
|
|
140
146
|
"public_api_coverage": 0.0,
|
|
141
147
|
"total_coverage": 0.0,
|
|
142
|
-
"confidence_t1": 0,
|
|
143
|
-
"confidence_t2": 0,
|
|
144
|
-
"confidence_t3": 0,
|
|
145
148
|
"scripts_count": 0,
|
|
146
149
|
"assets_count": 0
|
|
147
150
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
],
|
|
151
|
-
"
|
|
152
|
-
{ "file": "assets/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }
|
|
153
|
-
],
|
|
151
|
+
// scripts[] and assets[] — include ONLY when inventories are non-empty; omit entirely otherwise
|
|
152
|
+
// "scripts": [{ "file": "scripts/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }],
|
|
153
|
+
// "assets": [{ "file": "assets/{name}", "purpose": "{description}", "source_file": "{source-path}", "confidence": "T1-low" }],
|
|
154
|
+
"generated_by": "{quick-skill|create-skill}",
|
|
154
155
|
"dependencies": [],
|
|
155
156
|
"compatibility": "{semver-range}"
|
|
156
157
|
}
|
|
@@ -197,7 +198,7 @@ Each reference file includes:
|
|
|
197
198
|
"source_file": "src/auth/index.ts",
|
|
198
199
|
"source_line": 42,
|
|
199
200
|
"confidence": "T1",
|
|
200
|
-
"extraction_method": "
|
|
201
|
+
"extraction_method": "ast-grep",
|
|
201
202
|
"ast_node_type": "export_function_declaration"
|
|
202
203
|
}
|
|
203
204
|
],
|
|
@@ -235,7 +236,7 @@ Each reference file includes:
|
|
|
235
236
|
## Extraction Summary
|
|
236
237
|
- Files scanned: {count}
|
|
237
238
|
- Exports found: {count}
|
|
238
|
-
- Confidence: T1={n}, T2={n}, T3={n}
|
|
239
|
+
- Confidence: T1={n}, T1-low={n}, T2={n}, T3={n}
|
|
239
240
|
|
|
240
241
|
## Validation Results
|
|
241
242
|
- Schema: {pass/fail}
|
|
@@ -112,7 +112,7 @@ If `source_repo` is a remote URL (GitHub URL or owner/repo format) AND tier is F
|
|
|
112
112
|
|
|
113
113
|
Proceed with Quick tier extraction strategy below. Note the degradation reason in context for the evidence report.
|
|
114
114
|
|
|
115
|
-
**Ephemeral clone cleanup:** After extraction is complete for all files in scope (whether successful or partially failed), before presenting the Gate 2 summary (Section 6), if `ephemeral_clone_active`, delete the `{temp_path}` directory. Log: "Ephemeral source clone cleaned up." This ensures cleanup runs even if some extractions failed, as long as the step itself is still executing.
|
|
115
|
+
**Ephemeral clone cleanup:** After extraction is complete for all files in scope (whether successful or partially failed), before presenting the Gate 2 summary (Section 6), if `ephemeral_clone_active`, delete the `{temp_path}` directory. Log: "Ephemeral source clone cleaned up." This ensures cleanup runs even if some extractions failed, as long as the step itself is still executing. **If any error halts the extraction step before Gate 2 is reached**, cleanup must still occur: attempt to delete `{temp_path}` before halting. Log the cleanup attempt regardless of success.
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
@@ -135,4 +135,4 @@ Update the working version in context to the source version. Record the mismatch
|
|
|
135
135
|
|
|
136
136
|
**If no version file is found or version cannot be extracted:** keep `brief.version` as-is. No warning needed.
|
|
137
137
|
|
|
138
|
-
**If source is remote and accessed via Quick tier (gh_bridge, no local files):** attempt to read the version file via `gh_bridge.read_file(owner, repo, "{version_file}")` for the primary version file of the detected language. If the read fails, keep `brief.version`.
|
|
138
|
+
**If source is remote and accessed via Quick tier (gh_bridge, no local files):** attempt to read the version file via `gh_bridge.read_file(owner, repo, "{version_file}")` — resolved as `gh api repos/{owner}/{repo}/contents/{version_file}` or direct file read if local (see [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)) — for the primary version file of the detected language. If the read fails, keep `brief.version`.
|
|
@@ -20,7 +20,7 @@ When `source_repo` is a remote URL (GitHub URL or owner/repo format) and the tie
|
|
|
20
20
|
- The extraction step MUST warn the user explicitly before degrading
|
|
21
21
|
- **create-skill:** Warning must include actionable guidance — clone locally and update `source_repo` in the brief to the local path
|
|
22
22
|
- **update-skill:** Warning must include actionable guidance — clone locally, re-run [CS] Create Skill with the local path to regenerate provenance data, then re-run the update
|
|
23
|
-
- Extraction proceeds using Quick tier strategy (source reading via gh_bridge)
|
|
23
|
+
- Extraction proceeds using Quick tier strategy (source reading via gh_bridge — resolved as `gh api` commands or direct file I/O; see [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md))
|
|
24
24
|
- All results labeled T1-low with `[SRC:...]` citations
|
|
25
25
|
- The degradation reason is recorded in the evidence report
|
|
26
26
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: 'step-01-load-brief'
|
|
3
3
|
description: 'Load skill-brief.yaml, validate structure, resolve source code location, load forge tier'
|
|
4
4
|
nextStepFile: './step-02-ecosystem-check.md'
|
|
5
|
-
forgeTierFile: '{
|
|
6
|
-
preferencesFile: '{
|
|
5
|
+
forgeTierFile: '{sidecar_path}/forge-tier.yaml'
|
|
6
|
+
preferencesFile: '{sidecar_path}/preferences.yaml'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Step 1: Load Brief
|
|
@@ -70,14 +70,14 @@ Extract and report:
|
|
|
70
70
|
### 2. Discover Skill Brief
|
|
71
71
|
|
|
72
72
|
**If user provided a specific brief path or skill name:**
|
|
73
|
-
-
|
|
73
|
+
- If the value looks like a file path (starts with `/`, `./`, `~`, or contains path separators): treat it as a direct file path and load it
|
|
74
|
+
- Otherwise, treat it as a skill name and search `{forge_data_folder}/{skill-name}/skill-brief.yaml`
|
|
74
75
|
- If found, load it completely
|
|
75
76
|
|
|
76
77
|
**If user invoked with --batch flag:**
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- For this run, load the FIRST brief (batch loops back for remaining)
|
|
78
|
+
- Check `{sidecar_path}/batch-state.yaml` for an active batch checkpoint:
|
|
79
|
+
- If `batch_active: true` and `current_index` is valid: load the brief at `brief_list[current_index]` (resuming a batch loop from step-08)
|
|
80
|
+
- If no checkpoint exists or `batch_active` is false: search specified directory for all `skill-brief.yaml` files, list discovered briefs with skill names, store list for batch loop processing, and load the FIRST brief
|
|
81
81
|
|
|
82
82
|
**If no brief found:**
|
|
83
83
|
Halt with: "No skill brief found. Run [BS] Brief Skill to create one, or use [QS] Quick Skill for brief-less generation."
|
|
@@ -101,6 +101,8 @@ Check that the loaded skill-brief.yaml contains required fields:
|
|
|
101
101
|
- `include_patterns` — file glob patterns to include
|
|
102
102
|
- `exclude_patterns` — file glob patterns to exclude
|
|
103
103
|
- `description` — human description of the skill
|
|
104
|
+
- `scripts_intent` — `"none"` to skip scripts detection, omit for default auto-detection
|
|
105
|
+
- `assets_intent` — `"none"` to skip assets detection, omit for default auto-detection
|
|
104
106
|
|
|
105
107
|
**Docs-only validation:** When `source_type: "docs-only"`, `source_repo` is not required but `doc_urls` must have at least one entry. `source_authority` is forced to `community`.
|
|
106
108
|
|
|
@@ -109,8 +111,10 @@ Halt with specific error: "Brief validation failed: missing required field `{fie
|
|
|
109
111
|
|
|
110
112
|
### 4. Resolve Source Code Location
|
|
111
113
|
|
|
114
|
+
**If `source_type: "docs-only"`:** Skip source resolution. Set `source_location: null` in context. Proceed directly to section 5 (Report Initialization) — docs-only skills have no source to resolve.
|
|
115
|
+
|
|
112
116
|
**If source_repo is a GitHub URL or owner/repo format:**
|
|
113
|
-
- Verify repository exists via `gh_bridge.list_tree(owner, repo, branch)`
|
|
117
|
+
- Verify repository exists via `gh_bridge.list_tree(owner, repo, branch)` — **Tool resolution:** `gh api repos/{owner}/{repo}/git/trees/{branch}?recursive=1` or direct file listing if local; see [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md)
|
|
114
118
|
- If branch not specified, detect default branch
|
|
115
119
|
- Store resolved: owner, repo, branch, file tree
|
|
116
120
|
|
|
@@ -140,7 +144,7 @@ Where tier_description follows positive capability framing:
|
|
|
140
144
|
- Quick: "Source reading and spec validation"
|
|
141
145
|
- Forge: "AST-backed structural extraction"
|
|
142
146
|
- Forge+: "Semantic-guided precision — ccc pre-ranks files before AST extraction"
|
|
143
|
-
- Deep: "Full intelligence — structural + contextual +
|
|
147
|
+
- Deep: "Full intelligence — structural + contextual + QMD knowledge synthesis"
|
|
144
148
|
|
|
145
149
|
### 6. Menu Handling Logic
|
|
146
150
|
|
|
@@ -166,7 +170,7 @@ ONLY WHEN forge-tier.yaml is loaded, skill-brief.yaml is validated, and source c
|
|
|
166
170
|
|
|
167
171
|
- Forge tier loaded from sidecar with tool availability
|
|
168
172
|
- Skill brief loaded and all required fields validated
|
|
169
|
-
- Source code location resolved and accessible
|
|
173
|
+
- Source code location resolved and accessible (or `source_location: null` confirmed for docs-only skills)
|
|
170
174
|
- Initialization summary displayed with tier and capabilities
|
|
171
175
|
- Auto-proceeded to step-02
|
|
172
176
|
|
|
@@ -75,6 +75,8 @@ Read `ccc_index` from forge-tier.yaml:
|
|
|
75
75
|
- If `ccc_index.status` is `"stale"`: display brief note — "CCC index is stale — discovery results may miss recent changes." Continue to section 3.
|
|
76
76
|
- If `ccc_index.status` is `"none"` or `"failed"`: attempt lazy indexing via `ccc_bridge.ensure_index(source_root)`. If indexing succeeds, continue to section 3. If indexing fails, set `{ccc_discovery: []}` and auto-proceed to section 5.
|
|
77
77
|
|
|
78
|
+
**Tool resolution for ccc_bridge.ensure_index:** Use `/ccc` skill indexing (Claude Code), ccc MCP server (Cursor), or `ccc init` + `ccc index {source_root}` (CLI). See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
|
|
79
|
+
|
|
78
80
|
### 3. Construct Semantic Query
|
|
79
81
|
|
|
80
82
|
Build the discovery query from the brief data:
|
|
@@ -91,6 +93,8 @@ Where:
|
|
|
91
93
|
|
|
92
94
|
Run `ccc_bridge.search(query, source_root, top_k=20)`:
|
|
93
95
|
|
|
96
|
+
**Tool resolution for ccc_bridge.search:** Use `/ccc` skill search (Claude Code), ccc MCP server (Cursor), or `ccc search "{query}" --path {source_root} --top 20` (CLI). See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
|
|
97
|
+
|
|
94
98
|
**If search succeeds:**
|
|
95
99
|
|
|
96
100
|
Store results as `{ccc_discovery: [{file, score, snippet}]}` in context.
|
|
@@ -46,7 +46,7 @@ To extract all public exports, function signatures, type definitions, and co-imp
|
|
|
46
46
|
|
|
47
47
|
## CONTEXT BOUNDARIES:
|
|
48
48
|
|
|
49
|
-
- Available: brief_data, tier, source_location, file_tree from step-01;
|
|
49
|
+
- Available: brief_data, tier, source_location, file_tree from step-01; ecosystem check outcome from step-02 (proceed/halt decision — no named variable stored)
|
|
50
50
|
- Focus: Source code extraction and inventory building
|
|
51
51
|
- Limits: Do NOT compile, assemble, or write any output
|
|
52
52
|
- Dependencies: Source code must be accessible (resolved in step-01)
|
|
@@ -75,7 +75,7 @@ Build the filtered file list from the source tree resolved in step-01. Record th
|
|
|
75
75
|
|
|
76
76
|
"**Docs-only mode:** No source code to extract. Documentation content will be fetched from `doc_urls` in step-03c."
|
|
77
77
|
|
|
78
|
-
Build an empty extraction inventory with zero exports. Set `extraction_mode: "docs-only"` in context. Auto-proceed through Gate 2 (section
|
|
78
|
+
Build an empty extraction inventory with zero exports. Set `extraction_mode: "docs-only"` in context. Auto-proceed through Gate 2 (section 6) — display the empty inventory and note that T3 content will be produced by the doc-fetcher step.
|
|
79
79
|
|
|
80
80
|
**If `source_type: "source"` (default):** Continue with extraction below.
|
|
81
81
|
|
|
@@ -92,6 +92,8 @@ Load `{sourceResolutionData}` completely. Follow the **Remote Source Resolution*
|
|
|
92
92
|
5. Infer types from JSDoc, docstrings, type annotations
|
|
93
93
|
6. Confidence: All results T1-low — `[SRC:{file}:L{line}]`
|
|
94
94
|
|
|
95
|
+
**Tool resolution for gh_bridge:** Use `gh api repos/{owner}/{repo}/git/trees/{branch}?recursive=1` for list_tree, `gh api repos/{owner}/{repo}/contents/{path}` for read_file. If source is local, use direct file listing/reading instead. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
|
|
96
|
+
|
|
95
97
|
**Forge/Forge+/Deep Tier (AST available):**
|
|
96
98
|
|
|
97
99
|
**CCC Discovery Integration (Forge+ and Deep with ccc only):**
|
|
@@ -115,6 +117,8 @@ If `{ccc_discovery}` is empty or not in context: proceed with existing file orde
|
|
|
115
117
|
5. Build extraction rules YAML data for reproducibility
|
|
116
118
|
6. Confidence: All results T1 — `[AST:{file}:L{line}]`
|
|
117
119
|
|
|
120
|
+
**Tool resolution for ast_bridge:** Use ast-grep MCP tools (`mcp__ast-grep__find_code`, `mcp__ast-grep__find_code_by_rule`) as specified in the AST Extraction Protocol above, or `ast-grep` CLI. For `detect_co_imports`, use `find_code_by_rule` with a co-import YAML rule scoped to the libraries list. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
|
|
121
|
+
|
|
118
122
|
**If AST tool is unavailable at Forge/Deep tier** (see `{tierDegradationRulesData}` for full rules):
|
|
119
123
|
|
|
120
124
|
⚠️ **Warn the user explicitly:** "AST tools are unavailable — extraction will use source reading (T1-low). Run [SF] Setup Forge to detect and configure AST tools for T1 confidence."
|
|
@@ -126,24 +130,21 @@ Degrade to Quick tier extraction. Note the degradation reason in context for the
|
|
|
126
130
|
- If a file cannot be read: log warning, skip file, continue with remaining files
|
|
127
131
|
- If AST parsing fails on a file: fall back to source reading for that file, continue
|
|
128
132
|
|
|
129
|
-
**Re-export tracing (Forge/Deep only):**
|
|
130
|
-
|
|
131
|
-
After the initial AST scan, check for public exports from the entry point (`__init__.py`, `index.ts`, `lib.rs`) that were NOT found by AST extraction. These are likely module-level re-exports. Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to resolve them to their actual definition files. This ensures module re-export patterns (common in Python libraries with clean public APIs) do not create gaps in the extraction inventory.
|
|
133
|
+
**Re-export tracing (Forge/Deep only):** After the initial AST scan, check for unresolved public exports from entry points (`__init__.py`, `index.ts`, `lib.rs`). Follow the **Re-Export Tracing** protocol in `{extractionPatternsTracingData}` to resolve them to their definition files.
|
|
132
134
|
|
|
133
135
|
### 4b. Validate Exports Against Package Entry Point
|
|
134
136
|
|
|
135
137
|
After extraction, validate the collected exports against the package's actual public API surface:
|
|
136
138
|
|
|
137
|
-
- **Python:** Read `{source_root}/__init__.py` — extract
|
|
138
|
-
- In AST
|
|
139
|
-
- In
|
|
140
|
-
- **TypeScript/
|
|
141
|
-
- **Rust:** Read `lib.rs` — extract `pub use` items. Same
|
|
142
|
-
- **Go:** Scan package-level files for exported (capitalized) identifiers.
|
|
139
|
+
- **Python:** Read `{source_root}/__init__.py` — extract imports to build the public export list. Compare against AST results:
|
|
140
|
+
- In AST but not entry point → mark as internal (exclude from `metadata.json` exports)
|
|
141
|
+
- In entry point but not AST → flag as extraction gap (trace via re-export protocol)
|
|
142
|
+
- **TypeScript/JS:** Read `index.ts`/`index.js` — same comparison logic.
|
|
143
|
+
- **Rust:** Read `lib.rs` — extract `pub use` items. Same logic. **Go:** Scan for exported (capitalized) identifiers.
|
|
143
144
|
|
|
144
|
-
Use the entry point as the authoritative source for `metadata.json`'s `exports[]` array.
|
|
145
|
+
Use the entry point as the authoritative source for `metadata.json`'s `exports[]` array.
|
|
145
146
|
|
|
146
|
-
**If entry point is missing or unreadable:** Skip validation with a warning.
|
|
147
|
+
**If entry point is missing or unreadable:** Skip validation with a warning.
|
|
147
148
|
|
|
148
149
|
### 4c. Detect and Inventory Scripts/Assets
|
|
149
150
|
|
|
@@ -152,10 +153,8 @@ Use the entry point as the authoritative source for `metadata.json`'s `exports[]
|
|
|
152
153
|
After export extraction, scan the source for scripts and assets using the detection patterns in `{extractionPatternsTracingData}`:
|
|
153
154
|
|
|
154
155
|
1. Scan source tree for directories/files matching detection heuristics (scripts/, bin/, tools/, cli/ for scripts; assets/, templates/, schemas/, configs/, examples/ for assets)
|
|
155
|
-
2. For each candidate: verify
|
|
156
|
-
3.
|
|
157
|
-
4. Extract purpose from file header comments, shebang, README references, or schema `title`/`description` fields. If no purpose found, use filename.
|
|
158
|
-
5. Record: file_path, purpose, source_path, language (for scripts), type (for assets), content_hash, confidence (T1-low)
|
|
156
|
+
2. For each candidate: verify existence, check size (flag >500 lines), exclude binaries, compute SHA-256 hash
|
|
157
|
+
3. Extract purpose from header comments, shebang, README references, or schema fields. Record: file_path, purpose, source_path, language/type, content_hash, confidence (T1-low)
|
|
159
158
|
|
|
160
159
|
Add results to `scripts_inventory[]` and `assets_inventory[]` alongside the existing export inventory.
|
|
161
160
|
|
|
@@ -214,8 +213,9 @@ Display: "**Extraction Summary — Select an Option:** [C] Continue to compilati
|
|
|
214
213
|
|
|
215
214
|
#### EXECUTION RULES:
|
|
216
215
|
|
|
217
|
-
-
|
|
218
|
-
-
|
|
216
|
+
- IF docs-only mode (`extraction_mode: "docs-only"`): Auto-proceed immediately to `{nextStepFile}` — no user interaction required
|
|
217
|
+
- OTHERWISE: ALWAYS halt and wait for user input after presenting the extraction summary
|
|
218
|
+
- This is Gate 2 — user must confirm before compilation proceeds (except docs-only mode)
|
|
219
219
|
- User may ask questions about the extraction results before continuing
|
|
220
220
|
|
|
221
221
|
#### Menu Handling Logic:
|
|
@@ -43,7 +43,7 @@ To fetch temporal context (issues, PRs, changelogs, release notes) from the sour
|
|
|
43
43
|
## CONTEXT BOUNDARIES:
|
|
44
44
|
|
|
45
45
|
- Available: brief_data, tier, source_location from step-01; extraction_inventory from step-03
|
|
46
|
-
- **Used from extraction_inventory:** `top_exports[]` — the list of top-level public API function names (typically 10-20). Used for targeted GitHub searches (section 3b).
|
|
46
|
+
- **Used from extraction_inventory:** `top_exports[]` — the list of top-level public API function names (typically 10-20). Used for targeted GitHub searches (section 3b). If `extraction_mode: "docs-only"` or `top_exports` is absent/empty, skip targeted searches silently.
|
|
47
47
|
- Focus: Creating a QMD temporal collection for the source repository
|
|
48
48
|
- Limits: Do NOT modify extraction data, begin enrichment, or compile content
|
|
49
49
|
- Dependencies: Extraction must be complete from step-03
|
|
@@ -208,7 +208,7 @@ After temporal context is fetched and indexed (or skipped for any reason), immed
|
|
|
208
208
|
|
|
209
209
|
## CRITICAL STEP COMPLETION NOTE
|
|
210
210
|
|
|
211
|
-
ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to eligibility, cache, or failure) will you proceed to load `{nextStepFile}` for
|
|
211
|
+
ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to eligibility, cache, or failure) will you proceed to load `{nextStepFile}` for documentation fetch.
|
|
212
212
|
|
|
213
213
|
---
|
|
214
214
|
|
|
@@ -224,7 +224,7 @@ ONLY WHEN temporal context is indexed into QMD (or the step is skipped due to el
|
|
|
224
224
|
- Collection `{skill-name}-temporal` indexed into QMD
|
|
225
225
|
- Registry entry added/updated in forge-tier.yaml with type `"temporal"`
|
|
226
226
|
- Staging directory cleaned up after indexing
|
|
227
|
-
- Auto-proceeded to step-
|
|
227
|
+
- Auto-proceeded to step-03c
|
|
228
228
|
|
|
229
229
|
### ❌ SYSTEM FAILURE:
|
|
230
230
|
|
|
@@ -85,7 +85,9 @@ Content fetched from external URLs is classified as **T3** (external, untrusted)
|
|
|
85
85
|
|
|
86
86
|
After fetching a URL, apply the following heuristic to detect documentation root pages that contain no useful API content. This is common with modern documentation sites (Mintlify, Docusaurus, ReadTheDocs, GitBook) that render API content on subpages.
|
|
87
87
|
|
|
88
|
-
**Root page detection heuristic —
|
|
88
|
+
**Root page detection heuristic — apply only when the URL path ends in `/`, `/index`, `/index.html`, has no path component (bare domain), or has 1 path segment (e.g., `/docs`). For deeper URL paths (2+ segments like `/api/reference`), skip this heuristic and keep the content as-is.**
|
|
89
|
+
|
|
90
|
+
**A page is classified as a root if BOTH conditions are true:**
|
|
89
91
|
|
|
90
92
|
1. **Zero API content indicators:** The fetched markdown contains none of: fenced code blocks (`` ``` ``), parameter tables (`|---|`), or function signature patterns (`def `, `function `, `fn `, `func `, `export `).
|
|
91
93
|
2. **High link density:** More than 70% of non-empty lines are markdown links (matching `[text](url)` with no other substantive content on the line).
|
|
@@ -70,7 +70,7 @@ Before searching, check which QMD collections are available:
|
|
|
70
70
|
3. **If no enrichment collections exist** (no `"temporal"` or `"docs"` type collections): report this and auto-proceed. Display:
|
|
71
71
|
|
|
72
72
|
"**Enrichment: no enrichment collections available.**
|
|
73
|
-
Only brief-type or extraction-type QMD collections found — no temporal context (issues, PRs, changelogs) or docs collections indexed. Enrichment skipped (expected for first-run skill creation). Enrichment becomes available when temporal or docs context is indexed into QMD collections.
|
|
73
|
+
Only brief-type or extraction-type QMD collections found — no temporal context (issues, PRs, changelogs) or docs collections indexed. {IF extraction_mode is 'docs-only' AND T3 items exist in extraction_inventory: 'T3 documentation content is available in extraction inventory — enrichment via QMD is skipped but T3 content will be compiled.'} {ELSE: 'Enrichment skipped (expected for first-run skill creation). Enrichment becomes available when temporal or docs context is indexed into QMD collections.'}
|
|
74
74
|
|
|
75
75
|
Proceeding to compilation..."
|
|
76
76
|
|
|
@@ -96,6 +96,8 @@ For each function, derive the **module context** from the extraction inventory's
|
|
|
96
96
|
|
|
97
97
|
4. **Semantic migration context:** `qmd_bridge.vector_search("{module_context} {function_name} migration deprecated")` — adds semantic matches (synonyms, paraphrases) that BM25 keyword search may miss. Merge results with search #3, deduplicating by document ID. If `vector_search` fails (VRAM, GPU driver, model loading), discard silently — the BM25 results from search #3 provide baseline coverage.
|
|
98
98
|
|
|
99
|
+
**Tool resolution for qmd_bridge:** Use QMD MCP tools — `mcp__plugin_qmd-plugin_qmd__search` for BM25 search, `mcp__plugin_qmd-plugin_qmd__vector_search` for semantic search (Claude Code). Cursor: qmd MCP server. CLI: `qmd search "{query}"` / `qmd vector_search "{query}"`. See [knowledge/tool-resolution.md](../../../knowledge/tool-resolution.md).
|
|
100
|
+
|
|
99
101
|
**For each QMD result:**
|
|
100
102
|
|
|
101
103
|
- Create a T2 annotation: `[QMD:{collection}:{doc}]`
|
|
@@ -39,7 +39,7 @@ To assemble the complete skill content from the extraction inventory and enrichm
|
|
|
39
39
|
## EXECUTION PROTOCOLS:
|
|
40
40
|
|
|
41
41
|
- 🎯 Follow MANDATORY SEQUENCE exactly
|
|
42
|
-
- 💾 Build all content in context
|
|
42
|
+
- 💾 Build all content in context AND write to the staging directory (`_bmad-output/{name}/`) — staging write is mandatory for step-06 validation
|
|
43
43
|
- 📖 Follow agentskills.io section structure from data file
|
|
44
44
|
- 🚫 Do not promote any output files to final `skills/` or `forge-data/` directories — that's step-07
|
|
45
45
|
|
|
@@ -100,7 +100,8 @@ Following the structure from the skill-sections data file:
|
|
|
100
100
|
- Set `description` from the SKILL.md frontmatter `description` field (already assembled in section 2)
|
|
101
101
|
- Set `language` from source analysis (e.g., `"typescript"`, `"python"`) — use the primary language of the entry point file
|
|
102
102
|
- Set `ast_node_count` from extraction stats if ast-grep was used (Forge/Deep tier), otherwise omit
|
|
103
|
-
- Set `tool_versions` based on tier and available tools. Resolve `{skf_version}` from the
|
|
103
|
+
- Set `tool_versions` based on tier and available tools. Resolve `{skf_version}` from the installed module's `package.json` at `{project-root}/_bmad/skf/package.json`. If unresolvable there, fall back to `node -p "require('./node_modules/bmad-module-skill-forge/package.json').version"`. If still unresolvable, use `"unknown"` and add a warning to the evidence report. Never hardcode the version.
|
|
104
|
+
- Store `commit_short` = first 8 characters of `source_commit` (or `"unknown"` if unavailable) for use in step-08 report.
|
|
104
105
|
- If `scripts_inventory` is non-empty, populate `scripts[]` array and set `stats.scripts_count`. If `assets_inventory` is non-empty, populate `assets[]` array and set `stats.assets_count`. Omit these fields entirely when inventories are empty.
|
|
105
106
|
|
|
106
107
|
### 5. Build references/ Content
|
|
@@ -119,7 +120,7 @@ One entry per extracted export: export_name, export_type, params[] (typed string
|
|
|
119
120
|
|
|
120
121
|
### 7. Build evidence-report.md Content
|
|
121
122
|
|
|
122
|
-
Compilation audit trail: generation date, forge tier, source info, tool versions, extraction summary (files/exports/confidence), validation
|
|
123
|
+
Compilation audit trail: generation date, forge tier, source info, tool versions, extraction summary (files/exports/confidence), warnings. For validation-specific fields (Schema, Body, Security, Content Quality, tessl, Metadata), insert the placeholder text `[PENDING — populated by step-06]`. Step-06 will replace these placeholders with actual results. See `{skillSectionsData}` for full template. Use the same `{skf_version}` value resolved in section 4 when populating the Tool Versions block.
|
|
123
124
|
|
|
124
125
|
### 8. Menu Handling Logic
|
|
125
126
|
|
|
@@ -125,7 +125,7 @@ npx skill-check check <staging-skill-dir> --format json
|
|
|
125
125
|
|
|
126
126
|
(Security scan enabled by default when `--no-security-scan` omitted. The scan uses [Snyk Agent Scan](https://github.com/snyk/agent-scan) to check for prompt injection risks, sensitive data exposure, and unsafe tool permissions.)
|
|
127
127
|
|
|
128
|
-
Record any security warnings in evidence-report. Security findings are advisory — they do not block artifact generation.
|
|
128
|
+
Record any security warnings in evidence-report. Security findings are advisory — they do not block artifact generation. If the full validation re-run produces a different quality score than section 2, update the evidence-report with the newer score.
|
|
129
129
|
|
|
130
130
|
**If security scan fails due to missing SNYK_TOKEN:**
|
|
131
131
|
|
|
@@ -181,7 +181,7 @@ tessl suggestions:
|
|
|
181
181
|
Cross-check metadata.json against extraction inventory:
|
|
182
182
|
- `stats.exports_documented` / `stats.exports_public_api` / `stats.exports_internal` / `stats.exports_total` are accurate
|
|
183
183
|
- `stats.public_api_coverage` and `stats.total_coverage` are correctly computed (null when denominator is 0)
|
|
184
|
-
- `
|
|
184
|
+
- `confidence_distribution.t1`, `confidence_distribution.t1_low`, `confidence_distribution.t2`, `confidence_distribution.t3` match actual counts
|
|
185
185
|
- `spec_version` is "1.3"
|
|
186
186
|
- If `scripts[]` or `assets[]` arrays present: verify `stats.scripts_count`/`stats.assets_count` match array lengths; verify `file_entries` count in provenance-map.json matches
|
|
187
187
|
|