bmad-module-skill-forge 2.0.0 → 2.0.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/.claude-plugin/marketplace.json +1 -1
- package/.nvmrc +1 -1
- package/docs/_data/pinned.yaml +1 -1
- package/package.json +2 -2
- package/src/knowledge/skill-lifecycle.md +1 -1
- package/src/module-help.csv +2 -2
- package/src/shared/scripts/skf-comention-pairs.py +350 -0
- package/src/shared/scripts/skf-count-tokens.py +222 -0
- package/src/shared/scripts/skf-detect-docs.py +232 -1
- package/src/shared/scripts/skf-detect-language.py +77 -0
- package/src/shared/scripts/skf-detect-tools.py +105 -2
- package/src/shared/scripts/skf-enumerate-stack-skills.py +111 -2
- package/src/shared/scripts/skf-find-cycles.py +246 -0
- package/src/shared/scripts/skf-hash-content.py +487 -2
- package/src/shared/scripts/skf-manifest-ops.py +67 -1
- package/src/shared/scripts/skf-rebuild-managed-sections.py +180 -0
- package/src/shared/scripts/skf-recommend-scope-type.py +1 -2
- package/src/shared/scripts/skf-render-metadata-stats.py +499 -0
- package/src/shared/scripts/skf-rewrite-skill-name.py +308 -0
- package/src/shared/scripts/skf-shard-body.py +461 -0
- package/src/shared/scripts/skf-skill-inventory.py +139 -3
- package/src/shared/scripts/skf-structural-diff.py +307 -67
- package/src/shared/scripts/skf-validate-brief-schema.py +39 -1
- package/src/shared/scripts/skf-validate-feasibility-report.py +234 -0
- package/src/shared/scripts/skf-validate-frontmatter.py +17 -12
- package/src/shared/scripts/skf-validate-output.py +443 -10
- package/src/shared/scripts/skf-validate-pins.py +1 -1
- package/src/shared/scripts/skf-verify-no-trace.py +214 -0
- package/src/shared/scripts/skf-verify-provenance-completeness.py +439 -0
- package/src/skf-analyze-source/SKILL.md +17 -32
- package/src/skf-analyze-source/customize.toml +2 -0
- package/src/skf-analyze-source/references/auto-docs-only.md +116 -0
- package/src/skf-analyze-source/references/continue.md +8 -13
- package/src/skf-analyze-source/references/generate-briefs.md +28 -12
- package/src/skf-analyze-source/references/headless-contract.md +33 -0
- package/src/skf-analyze-source/references/health-check.md +1 -2
- package/src/skf-analyze-source/references/identify-units.md +25 -36
- package/src/skf-analyze-source/references/init.md +12 -25
- package/src/skf-analyze-source/references/map-and-detect.md +8 -20
- package/src/skf-analyze-source/references/recommend.md +4 -14
- package/src/skf-analyze-source/references/scan-project.md +3 -11
- package/src/skf-analyze-source/references/step-auto-scope.md +42 -180
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +2 -2
- package/src/skf-audit-skill/SKILL.md +9 -6
- package/src/skf-audit-skill/customize.toml +2 -0
- package/src/skf-audit-skill/references/init.md +58 -32
- package/src/skf-audit-skill/references/re-index.md +15 -34
- package/src/skf-audit-skill/references/report.md +11 -58
- package/src/skf-audit-skill/references/semantic-diff.md +4 -22
- package/src/skf-audit-skill/references/severity-classify.md +53 -87
- package/src/skf-audit-skill/references/step-doc-drift.md +49 -19
- package/src/skf-audit-skill/references/structural-diff.md +43 -68
- package/src/skf-brief-skill/SKILL.md +7 -36
- package/src/skf-brief-skill/assets/scope-templates.md +1 -1
- package/src/skf-brief-skill/customize.toml +14 -0
- package/src/skf-brief-skill/references/analyze-target.md +6 -14
- package/src/skf-brief-skill/references/confirm-brief.md +2 -14
- package/src/skf-brief-skill/references/draft-checkpoint.md +8 -8
- package/src/skf-brief-skill/references/gather-intent.md +19 -22
- package/src/skf-brief-skill/references/headless-args.md +1 -1
- package/src/skf-brief-skill/references/health-check.md +1 -22
- package/src/skf-brief-skill/references/invocation-contract.md +37 -0
- package/src/skf-brief-skill/references/scope-definition.md +4 -14
- package/src/skf-brief-skill/references/step-auto-brief.md +1 -5
- package/src/skf-brief-skill/references/step-auto-validate.md +1 -5
- package/src/skf-brief-skill/references/version-resolution.md +1 -1
- package/src/skf-brief-skill/references/write-brief.md +17 -10
- package/src/skf-campaign/SKILL.md +15 -84
- package/src/skf-campaign/customize.toml +2 -0
- package/src/skf-campaign/manifest.yaml +4 -0
- package/src/skf-campaign/references/campaign-contracts.md +67 -0
- package/src/skf-campaign/references/campaign-directive-spec.md +14 -103
- package/src/skf-campaign/references/step-01-setup.md +4 -5
- package/src/skf-campaign/references/step-02-strategy.md +8 -3
- package/src/skf-campaign/references/step-03-pins.md +1 -1
- package/src/skf-campaign/references/step-04-provenance.md +1 -1
- package/src/skf-campaign/references/step-05-skill-loop.md +1 -1
- package/src/skf-campaign/references/step-06-batch.md +7 -6
- package/src/skf-campaign/references/step-11-maintenance.md +2 -2
- package/src/skf-campaign/references/step-resume.md +9 -8
- package/src/skf-campaign/scripts/campaign-deps.py +10 -1
- package/src/skf-campaign/scripts/campaign-render-batch.py +199 -0
- package/src/skf-campaign/scripts/campaign-status.py +162 -0
- package/src/skf-campaign/templates/campaign-brief-template.yaml +1 -1
- package/src/skf-create-skill/SKILL.md +14 -3
- package/src/skf-create-skill/assets/compile-assembly-rules.md +17 -38
- package/src/skf-create-skill/assets/skill-sections.md +9 -100
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +4 -13
- package/src/skf-create-skill/customize.toml +13 -0
- package/src/skf-create-skill/references/authoritative-files-protocol.md +7 -7
- package/src/skf-create-skill/references/compile.md +34 -47
- package/src/skf-create-skill/references/component-extraction.md +8 -35
- package/src/skf-create-skill/references/ecosystem-check.md +9 -25
- package/src/skf-create-skill/references/enrich.md +4 -17
- package/src/skf-create-skill/references/extract.md +14 -29
- package/src/skf-create-skill/references/extraction-patterns-tracing.md +1 -1
- package/src/skf-create-skill/references/extraction-patterns.md +7 -7
- package/src/skf-create-skill/references/generate-artifacts.md +9 -23
- package/src/skf-create-skill/references/health-check.md +1 -1
- package/src/skf-create-skill/references/load-brief.md +16 -18
- package/src/skf-create-skill/references/report.md +12 -15
- package/src/skf-create-skill/references/source-resolution-protocols.md +3 -3
- package/src/skf-create-skill/references/step-auto-shard.md +52 -25
- package/src/skf-create-skill/references/step-doc-rot.md +30 -12
- package/src/skf-create-skill/references/step-doc-sources.md +2 -2
- package/src/skf-create-skill/references/sub/ccc-discover.md +2 -13
- package/src/skf-create-skill/references/sub/fetch-docs.md +8 -50
- package/src/skf-create-skill/references/sub/fetch-temporal.md +5 -20
- package/src/skf-create-skill/references/tier-degradation-rules.md +6 -8
- package/src/skf-create-skill/references/validate.md +59 -28
- package/src/skf-create-skill/scripts/scan-doc-rot.py +245 -0
- package/src/skf-create-stack-skill/SKILL.md +15 -9
- package/src/skf-create-stack-skill/assets/provenance-map-schema.md +1 -1
- package/src/skf-create-stack-skill/customize.toml +10 -0
- package/src/skf-create-stack-skill/references/compile-stack.md +7 -8
- package/src/skf-create-stack-skill/references/compose-mode-rules.md +2 -13
- package/src/skf-create-stack-skill/references/detect-integrations.md +49 -54
- package/src/skf-create-stack-skill/references/detect-manifests.md +37 -30
- package/src/skf-create-stack-skill/references/generate-output.md +24 -75
- package/src/skf-create-stack-skill/references/init.md +9 -81
- package/src/skf-create-stack-skill/references/manifest-patterns.md +5 -35
- package/src/skf-create-stack-skill/references/parallel-extract.md +12 -27
- package/src/skf-create-stack-skill/references/rank-and-confirm.md +6 -6
- package/src/skf-create-stack-skill/references/report.md +27 -62
- package/src/skf-create-stack-skill/references/validate.md +35 -31
- package/src/skf-drop-skill/SKILL.md +20 -23
- package/src/skf-drop-skill/customize.toml +10 -0
- package/src/skf-drop-skill/references/execute.md +51 -31
- package/src/skf-drop-skill/references/headless-contract.md +18 -0
- package/src/skf-drop-skill/references/health-check.md +1 -13
- package/src/skf-drop-skill/references/report.md +42 -10
- package/src/skf-drop-skill/references/select.md +88 -48
- package/src/skf-drop-skill/scripts/dir-sizes.py +116 -0
- package/src/skf-export-skill/SKILL.md +17 -14
- package/src/skf-export-skill/assets/managed-section-format.md +2 -5
- package/src/skf-export-skill/customize.toml +10 -6
- package/src/skf-export-skill/references/generate-snippet.md +21 -35
- package/src/skf-export-skill/references/load-skill.md +44 -42
- package/src/skf-export-skill/references/multi-skill-mode.md +1 -1
- package/src/skf-export-skill/references/orphan-context-detection.md +11 -3
- package/src/skf-export-skill/references/package.md +27 -33
- package/src/skf-export-skill/references/preflight-snippet-root-probe.md +24 -5
- package/src/skf-export-skill/references/result-envelope.md +28 -0
- package/src/skf-export-skill/references/summary.md +11 -5
- package/src/skf-export-skill/references/token-report.md +42 -24
- package/src/skf-export-skill/references/update-context.md +32 -33
- package/src/skf-forger/SKILL.md +27 -39
- package/src/skf-forger/references/pipeline-mode.md +34 -0
- package/src/skf-forger/scripts/parse-pipeline.py +270 -0
- package/src/skf-quick-skill/SKILL.md +10 -60
- package/src/skf-quick-skill/customize.toml +9 -0
- package/src/skf-quick-skill/references/batch-mode.md +6 -4
- package/src/skf-quick-skill/references/compile.md +15 -52
- package/src/skf-quick-skill/references/ecosystem-check.md +5 -20
- package/src/skf-quick-skill/references/finalize.md +12 -6
- package/src/skf-quick-skill/references/halt-contract.md +54 -0
- package/src/skf-quick-skill/references/health-check.md +3 -4
- package/src/skf-quick-skill/references/quick-extract.md +7 -18
- package/src/skf-quick-skill/references/registry-resolution.md +1 -23
- package/src/skf-quick-skill/references/resolve-target.md +27 -34
- package/src/skf-quick-skill/references/write-and-validate.md +10 -25
- package/src/skf-refine-architecture/SKILL.md +14 -7
- package/src/skf-refine-architecture/customize.toml +9 -0
- package/src/skf-refine-architecture/references/compile.md +9 -7
- package/src/skf-refine-architecture/references/gap-analysis.md +21 -50
- package/src/skf-refine-architecture/references/health-check.md +1 -1
- package/src/skf-refine-architecture/references/improvements.md +9 -25
- package/src/skf-refine-architecture/references/init.md +9 -16
- package/src/skf-refine-architecture/references/issue-detection.md +10 -25
- package/src/skf-refine-architecture/references/refinement-rules.md +4 -16
- package/src/skf-refine-architecture/references/report.md +13 -10
- package/src/skf-rename-skill/SKILL.md +11 -21
- package/src/skf-rename-skill/customize.toml +10 -0
- package/src/skf-rename-skill/references/execute.md +107 -78
- package/src/skf-rename-skill/references/exit-codes.md +12 -0
- package/src/skf-rename-skill/references/report.md +16 -8
- package/src/skf-rename-skill/references/select.md +69 -42
- package/src/skf-rename-skill/scripts/skf-validate-rename-name.py +161 -0
- package/src/skf-setup/SKILL.md +20 -12
- package/src/skf-setup/customize.toml +10 -0
- package/src/skf-setup/references/auto-index.md +9 -10
- package/src/skf-setup/references/ccc-index.md +14 -15
- package/src/skf-setup/references/detect-and-tier.md +6 -8
- package/src/skf-setup/references/report.md +22 -31
- package/src/skf-setup/references/tier-rules.md +2 -32
- package/src/skf-setup/references/write-config.md +9 -10
- package/src/skf-test-skill/SKILL.md +10 -8
- package/src/skf-test-skill/customize.toml +2 -0
- package/src/skf-test-skill/references/coherence-check.md +19 -31
- package/src/skf-test-skill/references/coverage-check.md +109 -75
- package/src/skf-test-skill/references/detect-mode.md +10 -41
- package/src/skf-test-skill/references/external-validators.md +11 -19
- package/src/skf-test-skill/references/init.md +38 -20
- package/src/skf-test-skill/references/migration-section-rules.md +4 -4
- package/src/skf-test-skill/references/report.md +60 -40
- package/src/skf-test-skill/references/score.md +32 -64
- package/src/skf-test-skill/references/scoring-rules.md +6 -62
- package/src/skf-test-skill/references/source-access-protocol.md +6 -6
- package/src/skf-test-skill/references/step-hard-gate.md +1 -3
- package/src/skf-test-skill/scripts/aggregate-coherence.py +276 -0
- package/src/skf-test-skill/scripts/check-metadata-coherence.py +359 -0
- package/src/skf-test-skill/scripts/combine-external-scores.py +190 -0
- package/src/skf-test-skill/scripts/compute-score.py +131 -1
- package/src/skf-test-skill/scripts/reconcile-coverage.py +327 -0
- package/src/skf-test-skill/scripts/validate-inventory.py +251 -0
- package/src/skf-test-skill/scripts/verify-declared-numerator.py +192 -0
- package/src/skf-update-skill/SKILL.md +17 -5
- package/src/skf-update-skill/customize.toml +14 -0
- package/src/skf-update-skill/references/detect-changes.md +19 -37
- package/src/skf-update-skill/references/health-check.md +3 -9
- package/src/skf-update-skill/references/init.md +39 -32
- package/src/skf-update-skill/references/manual-section-rules.md +1 -2
- package/src/skf-update-skill/references/merge-conflict-rules.md +1 -52
- package/src/skf-update-skill/references/merge.md +13 -57
- package/src/skf-update-skill/references/re-extract.md +12 -24
- package/src/skf-update-skill/references/report.md +14 -7
- package/src/skf-update-skill/references/validate.md +32 -30
- package/src/skf-update-skill/references/write.md +86 -51
- package/src/skf-update-skill/scripts/skf-new-file-diff.py +167 -0
- package/src/skf-verify-stack/SKILL.md +11 -21
- package/src/skf-verify-stack/customize.toml +12 -3
- package/src/skf-verify-stack/references/coverage-patterns.md +1 -29
- package/src/skf-verify-stack/references/coverage.md +21 -10
- package/src/skf-verify-stack/references/exit-codes.md +14 -0
- package/src/skf-verify-stack/references/health-check.md +1 -1
- package/src/skf-verify-stack/references/init.md +20 -25
- package/src/skf-verify-stack/references/integration-verification-rules.md +10 -19
- package/src/skf-verify-stack/references/integrations.md +44 -49
- package/src/skf-verify-stack/references/report.md +28 -34
- package/src/skf-verify-stack/references/requirements.md +3 -3
- package/src/skf-verify-stack/references/synthesize.md +36 -39
- package/src/skf-verify-stack/scripts/skf-coverage-tally.py +196 -0
- package/src/skf-verify-stack/scripts/skf-report-delta.py +256 -0
- package/src/skf-verify-stack/scripts/skf-verdict-rollup.py +258 -0
- package/src/skf-rename-skill/references/rebuild-context.md +0 -110
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
nextStepFile: 'step-doc-rot.md'
|
|
3
|
+
# Resolve `{shardBodyHelper}` by probing `{shardBodyProbeOrder}` in order
|
|
4
|
+
# (installed SKF module path first, src/ dev-checkout fallback); first existing
|
|
5
|
+
# path wins. HALT if neither resolves — hand line-counting is the least reliable
|
|
6
|
+
# deterministic op and would silently ship an over-budget body or wrongly HALT.
|
|
7
|
+
shardBodyProbeOrder:
|
|
8
|
+
- '{project-root}/_bmad/skf/shared/scripts/skf-shard-body.py'
|
|
9
|
+
- '{project-root}/src/shared/scripts/skf-shard-body.py'
|
|
3
10
|
---
|
|
4
11
|
|
|
5
12
|
<!-- Config: communicate in {communication_language}. -->
|
|
@@ -15,42 +22,66 @@ Proactively reduce oversized SKILL.md bodies to under 400 lines by extracting Ti
|
|
|
15
22
|
- Auto-proceed step — no user interaction required
|
|
16
23
|
- Graceful skip — if body is under threshold, proceed without modification
|
|
17
24
|
- Only extract Tier 2 sections (identified by `## Full` heading prefix)
|
|
18
|
-
- Tier 1 sections
|
|
25
|
+
- Tier 1 sections stay inline — moving one to references/ would break the standalone SKILL.md the two-tier design guarantees
|
|
19
26
|
- Do not modify frontmatter — only body content and references/ directory
|
|
20
27
|
- Do not invoke `npx skill-check split-body` — this step uses direct extraction
|
|
21
28
|
- Do not invoke the Description Guard Protocol — frontmatter is untouched
|
|
22
29
|
|
|
23
30
|
## MANDATORY SEQUENCE
|
|
24
31
|
|
|
32
|
+
### §0. Run the Shard Script (primary path)
|
|
33
|
+
|
|
34
|
+
The counting, boundary detection, size-sort, file writes, and blockquote replacement described in §1–§5 are fully deterministic and run every invocation — so a script owns them, not the model. Do not count body lines or extract sections by hand when the script ran.
|
|
35
|
+
|
|
36
|
+
**Resolve `{shardBodyHelper}`** from `{shardBodyProbeOrder}`; first existing path wins. HALT if no candidate exists.
|
|
37
|
+
|
|
38
|
+
Run:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uv run {shardBodyHelper} <staging-skill-dir>/SKILL.md --budget 400
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The script performs everything §1–§5 document — it counts the body between the frontmatter close and EOF, enumerates the `## Full` Tier 2 sections, extracts the largest first to `references/` until the body fits, writes the extracted files and the trimmed SKILL.md through the atomic-write helper, rewrites each section as a cross-reference blockquote, and checks Tier 1 preservation and cross-reference integrity. Read its JSON and set context directly:
|
|
45
|
+
|
|
46
|
+
- **`action: "skip"`** → the body was already within budget. Log `"auto-shard: skipped (body {body_lines_before} lines)"`, set `auto_shard_triggered: false`, `sections_extracted: []`, `body_lines_before`/`body_lines_after` from the report, then skip to §6.
|
|
47
|
+
- **`action: "shard"`** → set `auto_shard_triggered: true` and copy `sections_extracted`, `body_lines_before`, `body_lines_after` straight from the report.
|
|
48
|
+
- **HALT** if `tier1_preserved` is false: `"Auto-shard removed Tier 1 section(s) {tier1_missing}. Aborting."`
|
|
49
|
+
- **HALT** if `xref_ok` is false: `"Auto-shard cross-references did not resolve. Aborting."`
|
|
50
|
+
- If `under_budget` is false, selective Tier 2 extraction alone could not bring the body under budget (rare — Tier 1 itself exceeds ~300 lines). Apply the §4 editing-judgment trim, then continue.
|
|
51
|
+
|
|
52
|
+
Log: `"auto-shard: {N} sections extracted, body reduced from {body_lines_before} to {body_lines_after} lines"`, then proceed to §6.
|
|
53
|
+
|
|
54
|
+
**Manual fallback (only when `uv`/Python is unavailable):** perform §1–§5 by hand as documented below — they describe exactly what the script does.
|
|
55
|
+
|
|
25
56
|
### §1. Count Body Lines
|
|
26
57
|
|
|
27
|
-
|
|
58
|
+
The script counts all lines in the staging SKILL.md between the frontmatter closing `---` and EOF, excluding trailing blank lines, and reports the total as `body_lines_before`.
|
|
28
59
|
|
|
29
60
|
```
|
|
30
61
|
body_lines_before = body_line_count
|
|
31
62
|
```
|
|
32
63
|
|
|
33
|
-
**IF `body_line_count` <= 400:**
|
|
64
|
+
**IF `body_line_count` <= 400:** the script emits `action: "skip"` and writes nothing —
|
|
34
65
|
- Log: `"auto-shard: skipped (body {body_line_count} lines)"`
|
|
35
66
|
- Set context: `auto_shard_triggered: false`, `sections_extracted: []`, `body_lines_before: {body_line_count}`, `body_lines_after: {body_line_count}`
|
|
36
67
|
- Skip to §6 (Auto-Proceed)
|
|
37
68
|
|
|
38
|
-
**ELSE:**
|
|
69
|
+
**ELSE:** the script proceeds to §2.
|
|
39
70
|
|
|
40
71
|
### §2. Selective Shard — Tier 2 Extraction
|
|
41
72
|
|
|
42
|
-
|
|
73
|
+
The script identifies Tier 2 sections by their `## Full` heading prefix:
|
|
43
74
|
- `## Full API Reference` → `references/full-api-reference.md`
|
|
44
75
|
- `## Full Type Definitions` → `references/full-type-definitions.md`
|
|
45
76
|
- `## Full Integration Patterns` → `references/full-integration-patterns.md`
|
|
46
77
|
|
|
47
|
-
|
|
78
|
+
Sections are sorted by line count descending (largest first).
|
|
48
79
|
|
|
49
80
|
**FOR EACH Tier 2 section (largest first):**
|
|
50
81
|
|
|
51
82
|
1. Extract the full section content (from `## Full` heading to the next `##` heading or EOF)
|
|
52
83
|
2. Derive the reference filename from the heading: kebab-case (as shown above)
|
|
53
|
-
3. Write the extracted content (preserving the `##` heading) to `<staging-skill-dir>/references/{filename}`
|
|
84
|
+
3. Write the extracted content (preserving the `##` heading) to `<staging-skill-dir>/references/{filename}` via the atomic-write helper
|
|
54
85
|
4. Replace the extracted section in SKILL.md with a cross-reference blockquote:
|
|
55
86
|
```markdown
|
|
56
87
|
> See [Full API Reference](references/full-api-reference.md)
|
|
@@ -58,44 +89,40 @@ Sort identified sections by line count descending (extract largest first).
|
|
|
58
89
|
5. Re-count body lines
|
|
59
90
|
6. **IF `body_line_count` <= 400:** stop extracting, proceed to §3
|
|
60
91
|
|
|
61
|
-
|
|
92
|
+
The report's `sections_extracted: [{heading, file, lines}]` records exactly which sections were pulled.
|
|
62
93
|
|
|
63
94
|
### §3. Tier 1 Preservation Check
|
|
64
95
|
|
|
65
|
-
|
|
96
|
+
The script verifies ALL Tier 1 sections that were inline before extraction remain inline in SKILL.md afterward. These headings:
|
|
66
97
|
|
|
67
98
|
- `## Overview`
|
|
68
99
|
- `## Quick Start`
|
|
69
100
|
- `## Common Workflows`
|
|
70
101
|
- `## Key API Summary` (or `## Component Catalog` for component-library scope)
|
|
71
|
-
- `## Migration & Deprecation Warnings` (conditional — only
|
|
102
|
+
- `## Migration & Deprecation Warnings` (conditional — only checked if it was present before extraction)
|
|
72
103
|
- `## Key Types`
|
|
73
104
|
- `## Architecture at a Glance`
|
|
74
|
-
- `## CLI` (conditional — only
|
|
75
|
-
- `## Scripts & Assets` (conditional — only
|
|
76
|
-
- `## Manual Sections` (conditional — only
|
|
105
|
+
- `## CLI` (conditional — only checked if present before extraction)
|
|
106
|
+
- `## Scripts & Assets` (conditional — only checked if present before extraction)
|
|
107
|
+
- `## Manual Sections` (conditional — only checked if present before extraction)
|
|
108
|
+
|
|
109
|
+
The result surfaces as `tier1_preserved` (with any pulled headings in `tier1_missing`).
|
|
77
110
|
|
|
78
|
-
**IF
|
|
111
|
+
**IF `tier1_preserved` is false:**
|
|
79
112
|
HALT: `"Auto-shard removed Tier 1 section {name}. Aborting."`
|
|
80
113
|
|
|
81
114
|
### §4. Post-Shard Validation
|
|
82
115
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
body_lines_after = body_line_count
|
|
87
|
-
```
|
|
116
|
+
The report's `body_lines_after` is the recount after all extraction. `under_budget` is true when the body now fits.
|
|
88
117
|
|
|
89
|
-
**IF `
|
|
118
|
+
**IF `under_budget` is false** (body still > 400 after all Tier 2 sections extracted — this is the one genuine editing-judgment step):
|
|
90
119
|
- Trim oversized Tier 1 sections: reduce `## Key API Summary` and `## Architecture at a Glance` content to fit within the 400-line budget
|
|
91
|
-
- Do
|
|
92
|
-
- Re-count and update `body_lines_after`
|
|
120
|
+
- Do not move any Tier 1 section to references/
|
|
121
|
+
- Re-run `{shardBodyHelper}` (or re-count) and update `body_lines_after`
|
|
93
122
|
|
|
94
123
|
### §5. Cross-Reference Integrity
|
|
95
124
|
|
|
96
|
-
|
|
97
|
-
1. Verify the file exists at `<staging-skill-dir>/references/{filename}`
|
|
98
|
-
2. Verify the cross-reference blockquote in SKILL.md contains a link resolving to the file
|
|
125
|
+
The script verifies, for each extracted reference file, that the file exists at `<staging-skill-dir>/references/{filename}` and that the cross-reference blockquote in SKILL.md links to it — reported as `xref_ok`. HALT if `xref_ok` is false.
|
|
99
126
|
|
|
100
127
|
Log: `"auto-shard: {N} sections extracted, body reduced from {body_lines_before} to {body_lines_after} lines"`
|
|
101
128
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
nextStepFile: 'validate.md'
|
|
3
|
+
scanDocRotHelper: 'scripts/scan-doc-rot.py'
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
<!-- Config: communicate in {communication_language}. -->
|
|
@@ -8,7 +9,7 @@ nextStepFile: 'validate.md'
|
|
|
8
9
|
|
|
9
10
|
## STEP GOAL:
|
|
10
11
|
|
|
11
|
-
Scan feeder artifacts for doc-rot correction indicators and annotate the compiled SKILL.md with `## CORRECTION` blocks. Matching is grep
|
|
12
|
+
Scan feeder artifacts for doc-rot correction indicators and annotate the compiled SKILL.md with `## CORRECTION` blocks. Matching is a deterministic substring grep performed by `{scanDocRotHelper}` (`scripts/scan-doc-rot.py`) — no AI judgment is used for detection. The prompt keeps only the genuine judgment the script cannot make: enriching each match's `affected` symbol (§2) and choosing where each `## CORRECTION` block goes (§3).
|
|
12
13
|
|
|
13
14
|
## Rules
|
|
14
15
|
|
|
@@ -28,7 +29,7 @@ Identify the feeder artifacts in the **staging directory** for the current skill
|
|
|
28
29
|
1. **Evidence report:** `_bmad-output/{skill-name}/evidence-report.md`
|
|
29
30
|
2. **Provenance map:** `_bmad-output/{skill-name}/provenance-map.json` — focus on T2/T3 entries with temporal annotations
|
|
30
31
|
3. **Temporal context:** changelogs, migration guides, and issue/PR data fetched by step 3b and enriched by step 4 (available in workflow context)
|
|
31
|
-
4. **Compiled SKILL.md:** the staged `_bmad-output/{skill-name}/SKILL.md` itself — check for `[QMD:...]` or `[DOC:...]` annotations referencing corrections
|
|
32
|
+
4. **Compiled SKILL.md:** the staged `_bmad-output/{skill-name}/SKILL.md` itself — check for `[QMD:...]` or `[DOC:...]` annotations referencing corrections. **Do not treat its own `## Migration & Deprecation Warnings` section (§4b) as a correction source:** compile (step 5 §4b) already authored that section from the same T2-future annotations, so its bullets are already-surfaced corrections — §2 discards matches that land inside it.
|
|
32
33
|
|
|
33
34
|
For each artifact, attempt to load its content. If an artifact does not exist or is empty, skip it — this is not an error.
|
|
34
35
|
|
|
@@ -36,7 +37,31 @@ Store: `feeder_artifacts_scanned: [{list of artifacts that were loaded}]`
|
|
|
36
37
|
|
|
37
38
|
### §2. Grep for Correction Indicators
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
The scan is deterministic plumbing — a fixed-table substring grep with one correct answer per input — so it runs in `{scanDocRotHelper}`, **not** in-prompt. Do not hand-grep the feeder artifacts: identical feeders must yield identical `correction_matches`, and only the script guarantees that across multi-KB inputs. Pass the `## Migration & Deprecation Warnings`-bearing compiled SKILL.md (feeder #4) as `--skill-md` and every other loaded feeder as a positional argument:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
uv run {scanDocRotHelper} \
|
|
44
|
+
--skill-md _bmad-output/{skill-name}/SKILL.md \
|
|
45
|
+
_bmad-output/{skill-name}/evidence-report.md \
|
|
46
|
+
_bmad-output/{skill-name}/provenance-map.json \
|
|
47
|
+
_bmad-output/{skill-name}-temporal/*.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
(Pass whichever of the §1 feeder paths actually exist — the script skips any that are missing or empty, and reports the loaded set in `scanned`.)
|
|
51
|
+
|
|
52
|
+
The script emits `{scanned: [...], matches: [...], match_count, excluded_count}` on stdout. Each entry in `matches` is a match record with the deterministic fields the script owns:
|
|
53
|
+
|
|
54
|
+
- `source`: the feeder artifact path where the match was found
|
|
55
|
+
- `pattern`: the specific pattern string that matched
|
|
56
|
+
- `category`: the category label
|
|
57
|
+
- `context_line`: the line containing the match
|
|
58
|
+
- `line_number`: the 1-indexed line the match sits on
|
|
59
|
+
|
|
60
|
+
Read `matches` into `correction_matches: [{match records}]`. Then add the one judgment field the script cannot infer:
|
|
61
|
+
|
|
62
|
+
- `affected`: the function name, API, or section the correction relates to — enrich each record from surrounding context (use the `[QMD:...]`/`[DOC:...]` annotations and nearby symbols); if not identifiable, set to `"unknown"`.
|
|
63
|
+
|
|
64
|
+
**What the script does (the contract it implements — keep this table and the script's `PATTERN_TABLE` in lockstep):** it matches every feeder line against the following correction patterns. All matches are **case-insensitive substring matches** — no regex interpretation, no semantic analysis.
|
|
40
65
|
|
|
41
66
|
| Pattern | Category |
|
|
42
67
|
|---------|----------|
|
|
@@ -54,16 +79,9 @@ Scan each loaded feeder artifact for the following correction patterns. All matc
|
|
|
54
79
|
| `migration required` | Migration |
|
|
55
80
|
| `signature changed` | Signature change |
|
|
56
81
|
|
|
57
|
-
|
|
58
|
-
- `source`: the feeder artifact path or citation where the match was found
|
|
59
|
-
- `pattern`: the specific pattern string that matched
|
|
60
|
-
- `category`: the category from the table above
|
|
61
|
-
- `context_line`: the line or excerpt containing the match
|
|
62
|
-
- `affected`: the function name, API, or section the correction relates to (extract from surrounding context if identifiable; otherwise set to `"unknown"`)
|
|
63
|
-
|
|
64
|
-
Store all matches as `correction_matches: [{match records}]`
|
|
82
|
+
**Exclusion — drop already-surfaced §4b corrections (deterministic, no AI judgment, applied inside the script before it emits):** the script discards any match whose `source` is the compiled SKILL.md (feeder #4) **and** whose `context_line` sits inside that file's own `## Migration & Deprecation Warnings` section — i.e. on a line at or after the `## Migration & Deprecation Warnings` heading and before the next `##` heading (`excluded_count` reports how many it dropped). Compile (step 5 §4b) authored that section from the same T2-future annotations, so re-emitting its bullets as `## CORRECTION` blocks in §3 would duplicate already-surfaced content verbatim. This is a positional heading-boundary check on text already loaded, not a semantic assessment. Set `feeder_artifacts_scanned` from the script's `scanned` list.
|
|
65
83
|
|
|
66
|
-
**IF `correction_matches` is empty
|
|
84
|
+
**IF `correction_matches` is empty** (the script returned `match_count: 0`, or the run had no feeder files to pass)**:**
|
|
67
85
|
- Log: `"doc-rot: skipped (no correction indicators found in feeder artifacts)"`
|
|
68
86
|
- Set context: `doc_rot_triggered: false`, `corrections_added: 0`
|
|
69
87
|
- Skip to §5 (Auto-Proceed)
|
|
@@ -94,10 +94,10 @@ Map each detection result to the `doc_sources` schema:
|
|
|
94
94
|
Field mapping from `skf-detect-docs.py` output:
|
|
95
95
|
- `url` ← `url` (direct copy)
|
|
96
96
|
- `detected_via` ← `detected_via` (direct copy; or `"readme_always"` for the mandatory README entry)
|
|
97
|
-
- `content_hash` ← `content_hash` (direct copy, already in `sha256:{hexdigest}` format
|
|
97
|
+
- `content_hash` ← `content_hash` (direct copy, already in `sha256:{hexdigest}` format)
|
|
98
98
|
- `recorded_at` ← generated at step execution time (ISO-8601 with timezone)
|
|
99
99
|
|
|
100
|
-
Note: `content_type` from detect-docs output is
|
|
100
|
+
Note: `content_type` from detect-docs output is not carried into `doc_sources`.
|
|
101
101
|
|
|
102
102
|
### 5. Update metadata.json
|
|
103
103
|
|
|
@@ -82,7 +82,7 @@ Set `{ccc_discovery: []}` in context.
|
|
|
82
82
|
|
|
83
83
|
Display: "CCC discovery unavailable — proceeding with standard extraction."
|
|
84
84
|
|
|
85
|
-
Do
|
|
85
|
+
Do not halt. This is not an error.
|
|
86
86
|
|
|
87
87
|
**If search returns empty results:**
|
|
88
88
|
|
|
@@ -92,16 +92,5 @@ No message needed — empty results are normal for small or highly focused libra
|
|
|
92
92
|
|
|
93
93
|
### 5. Auto-Proceed
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
#### EXECUTION RULES:
|
|
98
|
-
|
|
99
|
-
- This is an auto-proceed step with no user choices
|
|
100
|
-
- Quick/Forge tiers skip directly with no output
|
|
101
|
-
- Forge+/Deep with ccc displays brief discovery summary then auto-proceeds
|
|
102
|
-
- CCC failures do not halt — degrade and proceed
|
|
103
|
-
|
|
104
|
-
## CRITICAL STEP COMPLETION NOTE
|
|
105
|
-
|
|
106
|
-
ONLY WHEN discovery is complete (Forge+/Deep with ccc) or the step is skipped (Quick/Forge or ccc unavailable) will you proceed to load `{nextStepFile}` for AST extraction.
|
|
95
|
+
No user interaction. Load `{nextStepFile}`, read it fully, then execute it. CCC failures degrade and proceed — they never halt.
|
|
107
96
|
|
|
@@ -86,7 +86,7 @@ Subpage discovery is triggered if **either** of the following independent trigge
|
|
|
86
86
|
|
|
87
87
|
The URL matches the path criteria above (ends in `/`, bare domain, or 1 segment) AND the fetched content is under **2000 words**. Short content on root-like URLs almost certainly indicates a navigation hub or landing page, even if it contains introductory code examples that would prevent Trigger 1 from firing. This handles modern doc sites (Mintlify, Docusaurus, GitBook) that include hero sections with code snippets on their root pages.
|
|
88
88
|
|
|
89
|
-
If neither trigger fires, keep the page content as-is and do
|
|
89
|
+
If neither trigger fires, keep the page content as-is and do not trigger subpage discovery.
|
|
90
90
|
|
|
91
91
|
**If a root URL with minimal content is detected:**
|
|
92
92
|
|
|
@@ -136,16 +136,16 @@ Parse the successfully fetched markdown for:
|
|
|
136
136
|
|
|
137
137
|
**No hallucination:** If information cannot be found in the fetched content, exclude it. Do not infer or fabricate API details.
|
|
138
138
|
|
|
139
|
-
**Whole-language references — retain prose, do
|
|
139
|
+
**Whole-language references — retain prose, do not shred (`whole_language_reference: true`):** For a whole-language reference the registry-sourced corpora (the guide/Book, the standard/library docs) ARE the product, not the compiler's internal exports. Reducing that prose to per-export signature items and then discarding it under the §5 "T3 never overrides T1" rule (the compiler's AST already owns names like `Vec`, `Option`, `HashMap`) would gut exactly the content the skill exists to teach. So for these briefs, skip §4a below for the registry corpora.
|
|
140
140
|
|
|
141
141
|
### 4a. Retain the Language Guide (whole-language references only)
|
|
142
142
|
|
|
143
143
|
**Skip this section entirely unless `whole_language_reference: true`.** When it is true, for each `doc_urls` entry whose `source` is `language-registry`:
|
|
144
144
|
|
|
145
|
-
- Do
|
|
145
|
+
- Do not reduce its fetched markdown to per-export items. Instead retain the cleaned prose as a Language-Guide entry `{url, label, prose}`, where `prose` is the substantive body (narrative, idioms, usage examples, conceptual reference) lightly trimmed of navigation/boilerplate, each block cited `[EXT:{url}]`.
|
|
146
146
|
- Collect these into a `language_guide[]` context artifact, in `doc_urls` order.
|
|
147
147
|
|
|
148
|
-
This artifact is a **distinct** carrier — it is
|
|
148
|
+
This artifact is a **distinct** carrier — it is not merged into the extraction inventory and is not subject to the §5 conflict rule, so the canonical prose survives intact into step 5 (compile), which foregrounds it as the skill's Language Guide. Non-registry docs (README-detected, homepage, Pages, docs-folder) still flow through §4's normal per-export extraction and the §5 merge unchanged.
|
|
149
149
|
|
|
150
150
|
**If a registry corpus could not be fetched** (network failure), record it in `language_guide[]` as `{url, label, prose: null}` and warn — step 5 surfaces the gap rather than emitting a thin guide silently.
|
|
151
151
|
|
|
@@ -156,9 +156,9 @@ This artifact is a **distinct** carrier — it is NOT merged into the extraction
|
|
|
156
156
|
- **`source_type: "docs-only"`** — The doc-fetch inventory IS the extraction inventory. It replaces the empty inventory from step 3, since there was no source code to extract from.
|
|
157
157
|
- **`source_type: "source"` (supplemental mode)** — Merge T3 items into the existing extraction inventory from step 3.
|
|
158
158
|
|
|
159
|
-
**Conflict rule:** T3 items
|
|
159
|
+
**Conflict rule:** T3 items never override existing T1, T1-low, or T2 items for the same export. When an export already has a higher-confidence entry, the T3 item is discarded — T3 has the lowest priority.
|
|
160
160
|
|
|
161
|
-
**Language-Guide carve-out:** the `language_guide[]` artifact from §4a (whole-language references) is
|
|
161
|
+
**Language-Guide carve-out:** the `language_guide[]` artifact from §4a (whole-language references) is not part of the export inventory and is therefore not subject to this conflict rule — it carries no export key, so it cannot collide with a T1 compiler export and can never be pruned. It is passed separately into step 5, which renders it as the foregrounded Language Guide section. Only the per-export T3 items participate in the T1/T2/T3 merge.
|
|
162
162
|
|
|
163
163
|
**Edge case — T1-zero supplemental mode:** If T1 extraction produced zero results and `doc_urls` are present in supplemental mode, T3 items should be used as the primary inventory since no T1 data exists to conflict with.
|
|
164
164
|
|
|
@@ -202,48 +202,6 @@ Display:
|
|
|
202
202
|
|
|
203
203
|
Proceeding to enrichment..."
|
|
204
204
|
|
|
205
|
-
### 7.
|
|
205
|
+
### 7. Auto-Proceed
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
After documentation fetch is complete (or skipped for any reason), immediately load, read entire file, then execute `{nextStepFile}`.
|
|
210
|
-
|
|
211
|
-
#### EXECUTION RULES:
|
|
212
|
-
|
|
213
|
-
- This is an auto-proceed step with no user choices
|
|
214
|
-
- No `doc_urls` in brief: skip directly to next step with no output
|
|
215
|
-
- No web fetching available: skip with warning then auto-proceed
|
|
216
|
-
- All URLs failed: skip with warning then auto-proceed
|
|
217
|
-
- Successful fetch: display report then auto-proceed
|
|
218
|
-
- All failures degrade gracefully — skip and auto-proceed
|
|
219
|
-
|
|
220
|
-
## CRITICAL STEP COMPLETION NOTE
|
|
221
|
-
|
|
222
|
-
ONLY WHEN documentation is fetched and T3 items are merged into the extraction inventory (or the step is skipped due to no `doc_urls`, no web tools, or fetch failures) will you proceed to load `{nextStepFile}` for enrichment.
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## SYSTEM SUCCESS/FAILURE METRICS
|
|
227
|
-
|
|
228
|
-
### SUCCESS:
|
|
229
|
-
|
|
230
|
-
- No `doc_urls` in brief: skipped silently, auto-proceeded
|
|
231
|
-
- `doc_urls` present: each URL fetched using whatever web tool is available
|
|
232
|
-
- Root URLs with minimal content: subpage discovery attempted, relevant subpages fetched
|
|
233
|
-
- Individual fetch failures handled gracefully (skip and continue)
|
|
234
|
-
- All extracted content cited as T3 with `[EXT:{url}]` provenance
|
|
235
|
-
- Existing T1/T1-low/T2 items never overridden by T3 data
|
|
236
|
-
- Docs-only mode: doc-fetch inventory correctly replaces empty extraction inventory
|
|
237
|
-
- Supplemental mode: T3 items merged into existing inventory respecting conflict rule
|
|
238
|
-
- Auto-proceeded to step 4
|
|
239
|
-
|
|
240
|
-
### SYSTEM FAILURE:
|
|
241
|
-
|
|
242
|
-
- Halting the workflow because web fetching is unavailable or a URL fails
|
|
243
|
-
- Including fetched content without `[EXT:{url}]` citations
|
|
244
|
-
- Overriding existing higher-confidence extractions (T1, T1-low, T2) with T3 data
|
|
245
|
-
- Hardcoding a specific fetching tool instead of being tool-agnostic
|
|
246
|
-
- Hallucinating API details not found in the fetched content
|
|
247
|
-
- Beginning compilation in this step (that is step 5)
|
|
248
|
-
|
|
249
|
-
**Master Rule:** Documentation fetching is best-effort T3 enrichment. Fetch what you can, cite everything as `[EXT:{url}]`, never override higher-confidence data, and move on. Failures degrade gracefully — they never block the skill compilation pipeline.
|
|
207
|
+
No user interaction. After the fetch completes or is skipped for any reason, load `{nextStepFile}`, read it fully, then execute it.
|
|
@@ -123,7 +123,7 @@ Per-call rationale:
|
|
|
123
123
|
rm -f "$ERR_FILE"
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
Failed individual fetches get a one-line placeholder; the loop continues with remaining tags. If a rate limit (HTTP 429) is hit, stop the release loop, keep the partial `releases.md` file in place (do
|
|
126
|
+
Failed individual fetches get a one-line placeholder; the loop continues with remaining tags. If a rate limit (HTTP 429) is hit, stop the release loop, keep the partial `releases.md` file in place (do not delete it), and log: "Release fetch stopped at tag {N}/{total} due to rate limiting — partial releases.md retained."
|
|
127
127
|
|
|
128
128
|
**Why sequential here when the rest is parallel:** the append-per-release pattern guarantees that a mid-loop abort (rate limit, network drop, user interrupt) leaves a partial but well-formed `releases.md` with every release fetched so far. Parallel writers appending to the same file would need file locking and per-writer ordering — the simpler sequential loop is robust for free, and 10 release fetches contribute only ~5-10s of the total wall-clock.
|
|
129
129
|
|
|
@@ -197,7 +197,7 @@ else
|
|
|
197
197
|
fi
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
**Rollback rule:** if the `qmd collection add` step fails (non-zero exit, network error, parse error)
|
|
200
|
+
**Rollback rule:** if the `qmd collection add` step fails (non-zero exit, network error, parse error) after the prior `remove` succeeded, remove the canonical registry entry in `forge-tier.yaml` to match QMD's actual state. A dangling registry entry that points at a non-existent QMD collection poisons subsequent cache-hit checks in §2. Emit a warning in evidence-report and skip the embed — enrichment degrades to no-QMD for this run.
|
|
201
201
|
|
|
202
202
|
**Scope the embed:** Always pass `--collection {skill-name}-temporal` to `qmd embed`. An unscoped `qmd embed` re-embeds every collection in the QMD store, which can take minutes per run in batch mode and generates wasteful GPU/API cost. If the installed `qmd` CLI does not accept `--collection` (older upstream versions), gate the embed behind a per-skill check: if a previous `{skill-name}-temporal` entry already exists in `qmd_collections` and its `created_at` is within 24 hours, skip the embed entirely and warn "qmd embed skipped — upstream qmd lacks --collection scope; re-embedding all collections would be wasteful in batch mode". Log the skip in the evidence report.
|
|
203
203
|
|
|
@@ -231,7 +231,7 @@ rm -rf {project-root}/_bmad-output/{skill-name}-temporal/
|
|
|
231
231
|
|
|
232
232
|
**Error handling:**
|
|
233
233
|
|
|
234
|
-
- If QMD indexing fails: log the error, note that temporal enrichment will be unavailable. Do
|
|
234
|
+
- If QMD indexing fails: log the error, note that temporal enrichment will be unavailable. Do not fail the workflow.
|
|
235
235
|
- If registry update fails: log the error, continue. The collection may exist in QMD even if the registry entry failed.
|
|
236
236
|
- If cleanup fails: log a warning and continue.
|
|
237
237
|
|
|
@@ -239,22 +239,7 @@ Display brief confirmation:
|
|
|
239
239
|
|
|
240
240
|
"**Temporal context indexed.** Collection `{skill-name}-temporal` created ({file_count} files: {list files}). Proceeding to enrichment..."
|
|
241
241
|
|
|
242
|
-
### 5.
|
|
242
|
+
### 5. Auto-Proceed
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
After temporal context is fetched and indexed (or skipped for any reason), immediately load, read entire file, then execute `{nextStepFile}`.
|
|
247
|
-
|
|
248
|
-
#### EXECUTION RULES:
|
|
249
|
-
|
|
250
|
-
- This is an auto-proceed step with no user choices
|
|
251
|
-
- Quick/Forge/Forge+ tiers skip directly to next step with no output
|
|
252
|
-
- Non-GitHub sources skip directly to next step with no output
|
|
253
|
-
- Cached collections (< 7 days old) skip with brief cache-hit message
|
|
254
|
-
- Deep tier with fresh fetch displays brief confirmation then auto-proceeds
|
|
255
|
-
- All failures degrade gracefully — skip and auto-proceed
|
|
256
|
-
|
|
257
|
-
## CRITICAL STEP COMPLETION NOTE
|
|
258
|
-
|
|
259
|
-
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.
|
|
244
|
+
No user interaction. After temporal context is fetched and indexed (or skipped for any reason — non-Deep tier, non-GitHub source, cache hit, or any failure), load `{nextStepFile}`, read it fully, then execute it.
|
|
260
245
|
|
|
@@ -8,7 +8,7 @@ When `source_repo` is a remote URL (GitHub URL or owner/repo format) and the tie
|
|
|
8
8
|
|
|
9
9
|
**Workspace-first clone strategy (preferred):**
|
|
10
10
|
|
|
11
|
-
1. Check `git` availability (`git --version`). `git` is effectively guaranteed at Deep tier (via `gh` dependency) but
|
|
11
|
+
1. Check `git` availability (`git --version`). `git` is effectively guaranteed at Deep tier (via `gh` dependency) but not guaranteed at Forge tier.
|
|
12
12
|
2. If `git` is available: check for an existing workspace checkout at `{workspace_root}/repos/{host}/{owner}/{repo}/`. If found, `git fetch` to update. If not found, clone into the workspace path with `--depth 1 --single-branch`. See `source-resolution-protocols.md` for the full workspace resolution algorithm.
|
|
13
13
|
3. The workspace uses a full checkout (no sparse-checkout). Brief `include_patterns` and `exclude_patterns` are applied as file-level filters at extraction time, not at the git level. This allows a single workspace checkout to serve multiple briefs with different scope filters.
|
|
14
14
|
4. For update-skill: `changed_files_from_manifest` scoping is applied as file-level filters at extraction time on the full workspace checkout.
|
|
@@ -18,21 +18,19 @@ When `source_repo` is a remote URL (GitHub URL or owner/repo format) and the tie
|
|
|
18
18
|
|
|
19
19
|
**Fallback (clone fails or `git` unavailable):**
|
|
20
20
|
|
|
21
|
-
- The extraction step
|
|
22
|
-
- **create-skill:**
|
|
23
|
-
- **update-skill:**
|
|
21
|
+
- The extraction step warns the user explicitly before degrading — a silent drop from AST (T1) to source reading (T1-low) would leave them trusting a lower-confidence result without knowing it changed
|
|
22
|
+
- **create-skill:** the warning includes actionable guidance — clone locally and update `source_repo` in the brief to the local path
|
|
23
|
+
- **update-skill:** the warning includes actionable guidance — clone locally, re-run [CS] Create Skill with the local path to regenerate provenance data, then re-run the update
|
|
24
24
|
- 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`)
|
|
25
25
|
- All results labeled T1-low with `[SRC:...]` citations
|
|
26
26
|
- The degradation reason is recorded in the evidence report
|
|
27
27
|
|
|
28
|
-
Silent degradation is **forbidden**. The user must always know when AST extraction was skipped and why.
|
|
29
|
-
|
|
30
28
|
## AST Tool Unavailable at Forge/Deep Tier
|
|
31
29
|
|
|
32
30
|
When the tier is Forge or Deep but ast-grep is not functional:
|
|
33
31
|
|
|
34
|
-
- The extraction step
|
|
35
|
-
-
|
|
32
|
+
- The extraction step warns the user explicitly before degrading
|
|
33
|
+
- The warning includes actionable guidance: run [SF] Setup Forge to detect tools
|
|
36
34
|
- Extraction proceeds using Quick tier strategy
|
|
37
35
|
- All results labeled T1-low
|
|
38
36
|
- The degradation reason is recorded in the evidence report
|