bmad-module-skill-forge 0.9.0 → 0.10.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +39 -0
- package/.gitattributes +16 -0
- package/README.md +105 -38
- package/docs/404.md +13 -10
- package/docs/RELEASING.md +185 -0
- package/docs/STABILITY.md +123 -0
- package/docs/_data/pinned.yaml +98 -0
- package/docs/agents.md +16 -11
- package/docs/architecture.md +221 -0
- package/docs/bmad-synergy.md +11 -13
- package/docs/concepts.md +18 -108
- package/docs/examples.md +121 -80
- package/docs/getting-started.md +85 -147
- package/docs/how-it-works.md +25 -536
- package/docs/index.md +44 -27
- package/docs/skill-model.md +328 -0
- package/docs/troubleshooting.md +39 -0
- package/docs/verifying-a-skill.md +232 -0
- package/docs/why-skf.md +93 -0
- package/docs/workflows.md +119 -13
- package/package.json +25 -4
- package/src/README.md +23 -25
- package/src/forger/forge-tier.yaml +4 -2
- package/src/forger/preferences.yaml +7 -1
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +1 -1
- package/src/knowledge/ccc-bridge.md +16 -15
- package/src/knowledge/overview.md +11 -11
- package/src/knowledge/progressive-capability.md +3 -3
- package/src/knowledge/provenance-tracking.md +9 -3
- package/src/knowledge/qmd-registry.md +8 -8
- package/src/knowledge/skf-knowledge-index.csv +2 -2
- package/src/knowledge/skill-lifecycle.md +16 -1
- package/src/knowledge/split-body-strategy.md +1 -1
- package/src/knowledge/version-paths.md +17 -12
- package/src/module-help.csv +18 -17
- package/src/module.yaml +4 -0
- package/src/shared/health-check.md +372 -0
- package/src/shared/references/feasibility-report-schema.md +86 -0
- package/src/shared/references/headless-gate-convention.md +62 -0
- package/src/shared/references/output-contract-schema.md +35 -0
- package/src/shared/references/pipeline-contracts.md +102 -0
- package/src/shared/scripts/skf-atomic-write.py +370 -0
- package/src/shared/scripts/skf-manifest-ops.py +236 -0
- package/src/shared/scripts/skf-preflight.py +164 -0
- package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
- package/src/shared/scripts/skf-severity-classify.py +163 -0
- package/src/shared/scripts/skf-skill-inventory.py +210 -0
- package/src/shared/scripts/skf-structural-diff.py +257 -0
- package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
- package/src/shared/scripts/skf-validate-output.py +247 -0
- package/src/skf-analyze-source/SKILL.md +57 -0
- package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -66
- package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
- package/src/skf-audit-skill/SKILL.md +59 -0
- package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
- package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -59
- package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-brief-skill/SKILL.md +53 -0
- package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
- package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -69
- package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
- package/src/skf-create-skill/SKILL.md +63 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
- package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
- package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
- package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
- package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
- package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
- package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
- package/src/skf-create-stack-skill/SKILL.md +64 -0
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
- package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
- package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
- package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
- package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
- package/src/skf-drop-skill/SKILL.md +57 -0
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
- package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-export-skill/SKILL.md +57 -0
- package/src/skf-export-skill/assets/managed-section-format.md +138 -0
- package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
- package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +20 -64
- package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-forger/SKILL.md +110 -0
- package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
- package/src/skf-quick-skill/SKILL.md +56 -0
- package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
- package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
- package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-refine-architecture/SKILL.md +57 -0
- package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +14 -64
- package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
- package/src/skf-rename-skill/SKILL.md +58 -0
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
- package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-setup/SKILL.md +55 -0
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
- package/src/skf-setup/steps-c/step-04-report.md +92 -0
- package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
- package/src/skf-test-skill/SKILL.md +59 -0
- package/src/skf-test-skill/references/migration-section-rules.md +114 -0
- package/src/skf-test-skill/references/scoring-rules.md +207 -0
- package/src/skf-test-skill/references/source-access-protocol.md +109 -0
- package/src/skf-test-skill/scripts/compute-score.py +310 -0
- package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
- package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
- package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
- package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
- package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
- package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
- package/src/skf-test-skill/templates/test-report-template.md +58 -0
- package/src/skf-update-skill/SKILL.md +58 -0
- package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
- package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
- package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
- package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
- package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
- package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -66
- package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
- package/src/skf-verify-stack/SKILL.md +60 -0
- package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
- package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
- package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
- package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
- package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
- package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
- package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
- package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
- package/tools/cli/commands/install.js +1 -1
- package/tools/cli/commands/status.js +21 -23
- package/tools/cli/commands/uninstall.js +11 -19
- package/tools/cli/commands/update.js +2 -2
- package/tools/cli/lib/ide-skills.js +216 -0
- package/tools/cli/lib/installer.js +29 -52
- package/tools/cli/lib/manifest.js +11 -5
- package/tools/cli/lib/platform-codes.yaml +223 -0
- package/tools/cli/lib/ui.js +76 -47
- package/tools/validate-docs-drift.js +193 -0
- package/src/agents/forger.agent.yaml +0 -114
- package/src/workflows/README.md +0 -174
- package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
- package/src/workflows/analyze-source/workflow.md +0 -61
- package/src/workflows/audit-skill/workflow.md +0 -64
- package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
- package/src/workflows/brief-skill/workflow.md +0 -58
- package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
- package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
- package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
- package/src/workflows/create-skill/steps-c/step-08-report.md +0 -176
- package/src/workflows/create-skill/workflow.md +0 -53
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -145
- package/src/workflows/create-stack-skill/workflow.md +0 -59
- package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -135
- package/src/workflows/drop-skill/workflow.md +0 -63
- package/src/workflows/export-skill/data/managed-section-format.md +0 -103
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
- package/src/workflows/export-skill/workflow.md +0 -58
- package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -179
- package/src/workflows/quick-skill/workflow.md +0 -58
- package/src/workflows/refine-architecture/workflow.md +0 -61
- package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -132
- package/src/workflows/rename-skill/workflow.md +0 -64
- package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -156
- package/src/workflows/setup-forge/workflow.md +0 -51
- package/src/workflows/test-skill/data/scoring-rules.md +0 -123
- package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
- package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
- package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
- package/src/workflows/test-skill/steps-c/step-06-report.md +0 -207
- package/src/workflows/test-skill/templates/test-report-template.md +0 -28
- package/src/workflows/test-skill/workflow.md +0 -57
- package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
- package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
- package/src/workflows/update-skill/workflow.md +0 -56
- package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
- package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
- package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
- package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -197
- package/src/workflows/verify-stack/workflow.md +0 -61
- package/tools/cli/lib/compiler.js +0 -306
- package/tools/cli/lib/ide-commands.js +0 -244
- /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
- /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
- /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
- /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-01-init'
|
|
3
|
-
description: 'Load existing skill artifacts, provenance map, and forge tier; detect skill type; present baseline and change scope'
|
|
4
|
-
|
|
5
2
|
nextStepFile: './step-02-detect-changes.md'
|
|
6
|
-
manualSectionRulesFile: '
|
|
3
|
+
manualSectionRulesFile: 'references/manual-section-rules.md'
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Step 1: Initialize Update
|
|
@@ -12,44 +9,10 @@ manualSectionRulesFile: '../data/manual-section-rules.md'
|
|
|
12
9
|
|
|
13
10
|
Load the existing skill and all its provenance data, detect whether this is an individual or stack skill, load the forge tier configuration, and present a baseline summary so the user can confirm the update scope before proceeding.
|
|
14
11
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
### Universal Rules:
|
|
18
|
-
|
|
19
|
-
- 🛑 NEVER generate content without user input
|
|
20
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
21
|
-
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
22
|
-
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
23
|
-
- ⚙️ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
24
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
25
|
-
|
|
26
|
-
### Role Reinforcement:
|
|
27
|
-
|
|
28
|
-
- ✅ You are a precision code analyst operating in Surgeon mode
|
|
29
|
-
- ✅ Zero-hallucination principle: every statement must trace to actual artifacts
|
|
30
|
-
- ✅ Clinical, terse communication — confidence-labeled, AST-backed
|
|
31
|
-
- ✅ You bring provenance-driven analysis expertise; the source code provides ground truth
|
|
32
|
-
|
|
33
|
-
### Step-Specific Rules:
|
|
12
|
+
## Rules
|
|
34
13
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
- 🚫 FORBIDDEN to begin change detection — that is step 02
|
|
38
|
-
- 💬 Present findings with confidence tier labels on all loaded data
|
|
39
|
-
|
|
40
|
-
## EXECUTION PROTOCOLS:
|
|
41
|
-
|
|
42
|
-
- 🎯 Follow MANDATORY SEQUENCE exactly
|
|
43
|
-
- 💾 Load all required artifacts into working context
|
|
44
|
-
- 📖 Validate artifact existence before proceeding
|
|
45
|
-
- 🚫 FORBIDDEN to proceed without user confirmation at gate
|
|
46
|
-
|
|
47
|
-
## CONTEXT BOUNDARIES:
|
|
48
|
-
|
|
49
|
-
- Available: SKF module config (skills_output_folder, forge_data_folder), user-provided skill path
|
|
50
|
-
- Focus: artifact loading and baseline establishment
|
|
51
|
-
- Limits: read-only — do not modify any files
|
|
52
|
-
- Dependencies: setup-forge must have been run (forge-tier.yaml), create-skill or create-stack-skill must have been run (SKILL.md + provenance-map.json)
|
|
14
|
+
- Focus only on loading existing artifacts and establishing the baseline — read-only operations
|
|
15
|
+
- Do not begin change detection (Step 02)
|
|
53
16
|
|
|
54
17
|
## MANDATORY SEQUENCE
|
|
55
18
|
|
|
@@ -60,9 +23,10 @@ Load the existing skill and all its provenance data, detect whether this is an i
|
|
|
60
23
|
"**Which skill would you like to update?**
|
|
61
24
|
|
|
62
25
|
Provide either:
|
|
63
|
-
- A skill name (resolves via version-aware path resolution — see
|
|
26
|
+
- A skill name (resolves via version-aware path resolution — see `knowledge/version-paths.md`)
|
|
64
27
|
- A full path to the skill folder
|
|
65
28
|
- A skill name with `--from-test-report` to use the test report's gap findings instead of source drift detection
|
|
29
|
+
- `--allow-workspace-drift` (gap-driven mode only) to intentionally bypass the step-03 §0.a guard that halts when the local workspace HEAD does not match `metadata.source_commit`. Only use this if you know the spot-checks should read the current workspace instead of the pinned tree — step-06 will NOT automatically re-pin
|
|
66
30
|
|
|
67
31
|
**Skill:** {user provides path or name}"
|
|
68
32
|
|
|
@@ -78,6 +42,8 @@ Resolve the path to an absolute skill folder location.
|
|
|
78
42
|
**If `--from-test-report` was provided (or user references a test report):**
|
|
79
43
|
Search for the test report at `{forge_data_folder}/{skill_name}/{active_version}/test-report-{skill_name}.md` (i.e., `{forge_version}/test-report-{skill_name}.md`). If not found at the versioned path, fall back to `{forge_data_folder}/{skill_name}/test-report-{skill_name}.md`. If found, set `test_report_path` in context and `update_mode: gap-driven`. If not found at either path, warn and continue with normal source drift mode.
|
|
80
44
|
|
|
45
|
+
**If `--allow-workspace-drift` was provided:** set `allow_workspace_drift: true` in workflow context. This flag is consumed by step-03 §0.a's pre-flight drift guard (gap-driven mode only) and has no effect in normal source-drift mode.
|
|
46
|
+
|
|
81
47
|
### 2. Validate Required Artifacts
|
|
82
48
|
|
|
83
49
|
**Check SKILL.md exists:**
|
|
@@ -90,14 +56,25 @@ Search for the test report at `{forge_data_folder}/{skill_name}/{active_version}
|
|
|
90
56
|
- If missing: **ABORT** — "No metadata.json found. This skill may have been created manually. Run create-skill to generate provenance data."
|
|
91
57
|
|
|
92
58
|
**Detect skill type from metadata:**
|
|
93
|
-
- If `skill_type == "stack"`: flag as stack skill (multi-file update mode)
|
|
94
59
|
- If `skill_type == "single"` or absent: flag as single skill
|
|
60
|
+
- If `skill_type == "stack"`: flag as stack skill (multi-file update mode)
|
|
61
|
+
|
|
62
|
+
### Stack Skill Guard
|
|
63
|
+
|
|
64
|
+
After loading metadata.json, check `skill_type`:
|
|
65
|
+
- If `skill_type` is `"stack"`: display message:
|
|
66
|
+
"**Stack skills cannot be surgically updated.** Stack skills compose exports from multiple sources — surgical re-extraction requires re-running the full composition pipeline.
|
|
67
|
+
|
|
68
|
+
**To update this stack skill**, run `skf-create-stack-skill` with the same project path. It will re-analyze manifests (code-mode) or re-read constituent skills (compose-mode) and produce an updated stack.
|
|
69
|
+
|
|
70
|
+
If you came here from an audit report, the drift report identifies which constituent libraries changed — use that to decide whether re-composition is needed."
|
|
71
|
+
- Exit the workflow (do not proceed to step-02)
|
|
95
72
|
|
|
96
73
|
### 3. Load Forge Tier Configuration
|
|
97
74
|
|
|
98
75
|
**Load `{sidecar_path}/forge-tier.yaml`:**
|
|
99
76
|
- Extract: `tier` (Quick, Forge, Forge+, or Deep), available tools
|
|
100
|
-
- If missing: **ABORT** — "No forge-tier.yaml found. Run setup
|
|
77
|
+
- If missing: **ABORT** — "No forge-tier.yaml found. Run setup first to detect available tools."
|
|
101
78
|
|
|
102
79
|
**Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
|
|
103
80
|
|
|
@@ -189,34 +166,10 @@ Display: "**Select:** [C] Continue to Change Detection"
|
|
|
189
166
|
#### EXECUTION RULES:
|
|
190
167
|
|
|
191
168
|
- ALWAYS halt and wait for user input after presenting menu
|
|
169
|
+
- **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-continue past update confirmation"
|
|
192
170
|
- ONLY proceed to next step when user selects 'C'
|
|
193
171
|
|
|
194
172
|
## CRITICAL STEP COMPLETION NOTE
|
|
195
173
|
|
|
196
174
|
ONLY WHEN [C] is selected and baseline has been established with all required artifacts loaded, will you then load and read fully `{nextStepFile}` to execute change detection.
|
|
197
175
|
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
201
|
-
|
|
202
|
-
### ✅ SUCCESS:
|
|
203
|
-
|
|
204
|
-
- SKILL.md loaded and validated
|
|
205
|
-
- metadata.json loaded with name, skill_type, version, source_root
|
|
206
|
-
- Forge tier loaded from sidecar/forge-tier.yaml
|
|
207
|
-
- Provenance map loaded (or degraded mode confirmed)
|
|
208
|
-
- [MANUAL] sections inventoried across all output files
|
|
209
|
-
- Source code path validated
|
|
210
|
-
- Baseline summary presented to user
|
|
211
|
-
- User confirms scope via [C] Continue
|
|
212
|
-
|
|
213
|
-
### ❌ SYSTEM FAILURE:
|
|
214
|
-
|
|
215
|
-
- Not validating artifact existence before proceeding
|
|
216
|
-
- Not detecting skill type (individual vs stack)
|
|
217
|
-
- Modifying any files during this read-only step
|
|
218
|
-
- Proceeding without user confirmation
|
|
219
|
-
- Not inventorying [MANUAL] sections before update begins
|
|
220
|
-
- Not loading forge tier configuration
|
|
221
|
-
|
|
222
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
---
|
|
2
|
+
nextStepFile: './step-03-re-extract.md'
|
|
3
|
+
noChangeReportFile: './step-07-report.md'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Step 2: Detect Changes
|
|
7
|
+
|
|
8
|
+
## STEP GOAL:
|
|
9
|
+
|
|
10
|
+
Compare current source code state against the provenance map to produce a complete change manifest identifying every changed, added, deleted, moved, and renamed file and export since last extraction.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
- Focus only on detecting and classifying changes — do not extract or merge
|
|
15
|
+
- Use subprocess Pattern 4 (parallel) when available; if unavailable, compare sequentially
|
|
16
|
+
|
|
17
|
+
## MANDATORY SEQUENCE
|
|
18
|
+
|
|
19
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
|
|
20
|
+
|
|
21
|
+
### 0. Check for Test Report Input (Gap-Driven Mode)
|
|
22
|
+
|
|
23
|
+
**If `update_mode == "gap-driven"` (set in step-01 via `--from-test-report`):**
|
|
24
|
+
|
|
25
|
+
Load the test report at `{test_report_path}` and extract findings:
|
|
26
|
+
|
|
27
|
+
1. Read the **Gap Report** section — each gap entry has severity, category, and description
|
|
28
|
+
2. Read the **Coverage Analysis** section — each per-export row has documented/missing/mismatch status
|
|
29
|
+
3. Translate findings into change manifest format:
|
|
30
|
+
|
|
31
|
+
| Gap Severity | Gap Type | Change Category |
|
|
32
|
+
|-------------|----------|-----------------|
|
|
33
|
+
| Critical | Missing export documentation | NEW_EXPORT (undocumented public API) |
|
|
34
|
+
| High | Signature mismatch | MODIFIED_EXPORT (signature needs update) |
|
|
35
|
+
| Medium | Missing type/interface docs | NEW_EXPORT (undocumented type) |
|
|
36
|
+
| Medium | Stale documentation | MODIFIED_EXPORT (docs reference removed export) |
|
|
37
|
+
| Low | Missing metadata/examples | metadata update |
|
|
38
|
+
|
|
39
|
+
4. Build the change manifest from translated gaps — no file-level timestamp comparison needed since source hasn't changed. For each manifest entry, propagate these fields from the test report finding so step-03 can resolve the export against live source:
|
|
40
|
+
|
|
41
|
+
- **`severity`** — the Gap Report severity (`Critical`, `High`, `Medium`, `Low`, `Info`). Step-03 §0 and step-06 §3 gate the null-citation fallback on severity: Critical/High gaps must produce AST provenance, Medium/Low/Info gaps may degrade to `unknown`.
|
|
42
|
+
- **`source_citation: {file, line}`** — populated only when the finding's `Source:` field is a `file:line` pair (e.g., a Gap Report row that cites `packages/utils/src/builder-utils.ts:33`). Step-03 §0 uses this field to perform a live spot-check against source rather than flagging the export as `unknown`. Omit when the `Source:` field is a region reference (e.g., `@storybook/addon-docs control primitives`) or missing.
|
|
43
|
+
- **`remediation_paths: [path, ...]`** — path-like tokens extracted from the finding's `Remediation:` text: any substring matching a recognized source file extension (`.ts`, `.tsx`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.py`, `.rs`, `.go`, `.java`, `.rb`, `.c`, `.h`, `.cpp`), or a directory/glob fragment under the project's source root. Include every matching path verbatim. Step-03 §0a uses this list as the source set for its Targeted Re-Extraction Branch when `source_citation` is absent and severity is Critical/High. Omit the field when the Remediation text names no paths — the entry then falls through to `unknown` or to §0a's halt, depending on severity.
|
|
44
|
+
5. Set `gap_count` from the total number of translated entries
|
|
45
|
+
6. **Skip to section 5** (Display Change Summary) with the gap-derived manifest
|
|
46
|
+
|
|
47
|
+
"**Gap-driven update mode.** Translating {gap_count} test report findings into change manifest — source drift detection skipped."
|
|
48
|
+
|
|
49
|
+
**If normal mode:** Continue with source drift detection below.
|
|
50
|
+
|
|
51
|
+
### 1. Scan Current Source State
|
|
52
|
+
|
|
53
|
+
Read the source directory at `{source_root}` and build a current file inventory:
|
|
54
|
+
- For each source file: record path, file size, last modified timestamp
|
|
55
|
+
- Focus on file types relevant to the skill (from provenance map file patterns)
|
|
56
|
+
- Exclude non-source files (node_modules, build artifacts, etc.)
|
|
57
|
+
|
|
58
|
+
### 1b. Discovered Authoritative Files Protocol (Mirror)
|
|
59
|
+
|
|
60
|
+
**Purpose:** mirror `skf-create-skill` §2a into update-skill. `skf-create-skill` §2a catches authoritative AI documentation files (`llms.txt`, `AGENTS.md`, `.cursorrules`, etc.) during **creation**. But a project may add these files *after* the skill was created — for example, an upstream project adopts an `llms.txt` convention six months into development. Without this mirror, update-skill would either miss the new file entirely (if it doesn't match the provenance map's file patterns) or classify it as a generic ADDED file in §2 Category A with no authoritative-file treatment. The mirror surfaces the discovery with the same P/S/U prompt create-skill uses, honoring any prior amendments.
|
|
61
|
+
|
|
62
|
+
**Skip this section entirely if:**
|
|
63
|
+
|
|
64
|
+
- `update_mode == "gap-driven"` (source hasn't drifted — we're verifying test report findings, not discovering new files), OR
|
|
65
|
+
- `metadata.json.source_type == "docs-only"` (no source tree to scan)
|
|
66
|
+
|
|
67
|
+
**Procedure (identical heuristics to create-skill §2a):**
|
|
68
|
+
|
|
69
|
+
1. **Walk the source tree.** Match file basenames against the heuristic list case-insensitively:
|
|
70
|
+
- `llms.txt`, `llms-full.txt`
|
|
71
|
+
- `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `COPILOT.md`
|
|
72
|
+
- `.cursorrules`, `.windsurfrules`, `.clinerules`
|
|
73
|
+
|
|
74
|
+
2. **Cross-reference with provenance map.** For each match:
|
|
75
|
+
- **Already in provenance map** (`entries[].source_file` or `file_entries[].source_file` contains this path): the file is already tracked. §2 will detect any drift in the normal flow. No action in §1b.
|
|
76
|
+
- **Not in provenance map:** continue to amendment check.
|
|
77
|
+
|
|
78
|
+
3. **Check brief amendments.** Load `brief.scope.amendments[]` from `{forge_data_folder}/{skill_name}/skill-brief.yaml`. For each candidate not in the provenance map:
|
|
79
|
+
- **`action: "promoted"` for this path exists:** the brief says this file should be in scope, but it's missing from the provenance map. This means the file was promoted by a prior run but its `file_entries[]` row is missing (e.g. provenance-map was regenerated from source without re-reading amendments). Add the path to `promoted_docs_new[]` (see step 6 below) with its content hash so §4 merge writes a new `file_entries[]` row. No user prompt — the decision was already made. Display: `"Honoring prior amendment: promoted {path} scheduled for file_entries write."`
|
|
80
|
+
- **`action: "skipped"` for this path exists:** user previously declined promotion. Honor the skip silently. No prompt, no action.
|
|
81
|
+
- **No amendment for this path:** continue to user prompt.
|
|
82
|
+
|
|
83
|
+
4. **Prompt.** For each unresolved candidate, present the same prompt as create-skill §2a:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
**New authoritative file discovered since skill creation**
|
|
87
|
+
|
|
88
|
+
Path: {relative_path_from_source_root}
|
|
89
|
+
Size: {line_count} lines, {bytes} bytes
|
|
90
|
+
Matched heuristic: {basename}
|
|
91
|
+
Provenance age: {days since skill creation}
|
|
92
|
+
|
|
93
|
+
First 20 lines:
|
|
94
|
+
{inline preview}
|
|
95
|
+
|
|
96
|
+
This file was not present (or not in scope) when the skill was created. How should update-skill handle it?
|
|
97
|
+
|
|
98
|
+
[P] Promote — extract in this update run AND amend brief for future runs
|
|
99
|
+
[S] Skip — leave out of scope AND record skip in amendments (no re-prompt)
|
|
100
|
+
[U] Update — halt this run and return to skf-brief-skill to refine scope
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
5. **Headless mode (`{headless_mode}` is true):** auto-select `[S] Skip` for every candidate — record `action: "skipped"`, `reason: "headless: no user to prompt"`, `workflow: "skf-update-skill"`. A non-interactive update run must never silently add files to scope.
|
|
104
|
+
|
|
105
|
+
6. **Apply decision:**
|
|
106
|
+
|
|
107
|
+
- **[P] Promote:**
|
|
108
|
+
1. Append `candidate.path` to `brief.scope.include` as a literal glob.
|
|
109
|
+
2. Append a `brief.scope.amendments[]` entry: `action: "promoted"`, `path: candidate.path`, `reason: {user-provided or auto: "discovered post-creation — matched heuristic {basename}"}`, `heuristic: {basename}`, `date: {today ISO}`, `workflow: "skf-update-skill"`.
|
|
110
|
+
3. **Write the amended brief back to disk immediately** at `{forge_data_folder}/{skill_name}/skill-brief.yaml`. Preserve all other fields.
|
|
111
|
+
4. **Compute SHA-256 content hash** of `candidate.path` and add an entry to the in-context `promoted_docs_new[]` list: `{path, heuristic, size_bytes, line_count, content_hash}`. This list is consumed by §4 merge Priority 7 to write new `file_entries[]` rows — promoted docs do NOT go through §3 code re-extraction, which would produce ghost entries on non-code files.
|
|
112
|
+
5. Display: `"Promoted {path} — brief amended, scheduled as new file_entries row for file_type doc."`
|
|
113
|
+
|
|
114
|
+
- **[S] Skip:**
|
|
115
|
+
1. Do NOT modify `scope.include`.
|
|
116
|
+
2. Append a `brief.scope.amendments[]` entry: `action: "skipped"`, `path: candidate.path`, `reason: {user-provided or auto: "user declined promotion at update-skill §1b"}`, `heuristic: {basename}`, `date: {today ISO}`, `workflow: "skf-update-skill"`.
|
|
117
|
+
3. **Write the amended brief back to disk** so neither update-skill nor create-skill will re-prompt in future runs.
|
|
118
|
+
4. Display: `"Skipped {path} — decision recorded in amendments."`
|
|
119
|
+
|
|
120
|
+
- **[U] Update:**
|
|
121
|
+
1. Halt the workflow immediately.
|
|
122
|
+
2. Display: `"Halting update-skill. Re-run skf-brief-skill to refine scope for {skill_name}, then re-run skf-update-skill."`
|
|
123
|
+
3. Exit with status `halted-for-brief-refinement`. Change manifest is discarded — no partial writes.
|
|
124
|
+
|
|
125
|
+
7. **Summary.** After all candidates are resolved (or none were found):
|
|
126
|
+
|
|
127
|
+
- `"Authoritative files mirror: {N} candidates, {P} promoted, {S} skipped, {A} pre-decided from amendments, {T} already tracked in provenance."`
|
|
128
|
+
- If N = 0: `"Authoritative files mirror: no candidates."`
|
|
129
|
+
|
|
130
|
+
**Record for evidence report:** the update-skill evidence report appends `authoritative_files_mirror: {candidates: N, promoted: P, skipped: S, pre_decided: A, already_tracked: T, decisions: [{path, action, heuristic, reason}]}`.
|
|
131
|
+
|
|
132
|
+
**Interaction with §2 change detection:** promoted docs live in `promoted_docs_new[]`, NOT in the change manifest. But §2 Category A ("files in source but not in provenance map → ADDED") would still find the promoted doc files on disk and classify them as ADDED if nothing prevents it. The coordination mechanism is an explicit pre-filter exclusion set built in §2.0 (below) that every Category A subprocess worker receives as an input before it starts scanning. See §2.0 for the exact contract. The exclusion set is the only mechanism guaranteeing that parallel subprocesses cannot double-count `promoted_docs_new[]` paths — prose-level "skip any path" instructions cannot cross subprocess boundaries.
|
|
133
|
+
|
|
134
|
+
### 2. Compare Against Provenance Map
|
|
135
|
+
|
|
136
|
+
**If normal mode (provenance map available):**
|
|
137
|
+
|
|
138
|
+
#### 2.0 — Build Pre-filter Exclusion Set
|
|
139
|
+
|
|
140
|
+
Before launching parallel subprocesses, build a `change_detection_excludes` set in context that Category A subprocess workers must honor. Parallel subprocesses cannot see each other's in-memory state, so any coordination between §1b's decisions and §2's scan results must be pre-materialized into an explicit input the subprocesses receive.
|
|
141
|
+
|
|
142
|
+
The exclusion set includes:
|
|
143
|
+
|
|
144
|
+
- Every path in `promoted_docs_new[]` (populated by §1b). These files are tracked as `file_entries[]` via step-04 Priority 7, not through Category A code extraction. Without this exclusion, Category A would classify them as ADDED (because they're in source but not yet in the provenance map) and §3 re-extract would send them to AST extraction, producing ghost entries.
|
|
145
|
+
- Every source path in `file_entries[].source_file` where `file_type == "doc"` in the existing provenance map. These are already-tracked authoritative docs; any drift in them is handled by Category D (script/asset file changes), not Category A.
|
|
146
|
+
|
|
147
|
+
Record the set size: "**Change-detection excludes:** {count} paths ({promoted_docs_new count} new promotions + {existing doc file_entries count} already tracked)."
|
|
148
|
+
|
|
149
|
+
#### 2.1 — Launch Category Subprocesses
|
|
150
|
+
|
|
151
|
+
Launch subprocesses in parallel that compare source state against provenance map across these categories, returning change findings per category. **Every subprocess receives `change_detection_excludes` as an explicit input** and applies it to its file-path iteration loop.
|
|
152
|
+
|
|
153
|
+
**Category A — File-level changes:**
|
|
154
|
+
- Files in provenance map but missing from source → DELETED
|
|
155
|
+
- Files in source but not in provenance map AND not in `change_detection_excludes` → ADDED
|
|
156
|
+
- Files in `change_detection_excludes`: skip entirely (routed to file_entries via §1b → step-04 Priority 7, never through Category A)
|
|
157
|
+
- Files in both but with different timestamps/sizes → MODIFIED
|
|
158
|
+
- Files with same content at different paths → MOVED
|
|
159
|
+
|
|
160
|
+
**Category B — Export-level changes (for MODIFIED files only):**
|
|
161
|
+
- For each modified file, compare export list against provenance map exports
|
|
162
|
+
- Exports in provenance but not in source → DELETED_EXPORT
|
|
163
|
+
- Exports in source but not in provenance → NEW_EXPORT
|
|
164
|
+
- Exports with changed signatures/types → MODIFIED_EXPORT
|
|
165
|
+
- Exports at different line numbers but same content → MOVED_EXPORT
|
|
166
|
+
|
|
167
|
+
**Category C — Rename detection:**
|
|
168
|
+
- Cross-reference deleted files/exports with added files/exports
|
|
169
|
+
- If content similarity > 80%: classify as RENAMED instead of deleted+added. **Similarity mechanism by tier:** Quick: compare file size ratio (within 20%) and export name overlap (>70% of exports match by name). Forge and above: use ast-grep to compare export signatures between the deleted and added files. Forge+/Deep: use CCC semantic similarity when available
|
|
170
|
+
|
|
171
|
+
**Category D — Script/asset file changes:**
|
|
172
|
+
- Compare `file_entries` from provenance-map.json against current source files
|
|
173
|
+
- For each file_entry: compute current SHA-256 content hash, compare against stored hash
|
|
174
|
+
- Files with changed hashes → MODIFIED_FILE
|
|
175
|
+
- Files in provenance but missing from source → DELETED_FILE
|
|
176
|
+
- Files in source matching detection patterns (scripts/, bin/, assets/, templates/) but not in provenance → NEW_FILE
|
|
177
|
+
- Files in `scripts/[MANUAL]/` or `assets/[MANUAL]/` → SKIP (user-authored, preserved)
|
|
178
|
+
|
|
179
|
+
Aggregate all subprocess results into a unified change manifest.
|
|
180
|
+
|
|
181
|
+
**If degraded mode (no provenance map):**
|
|
182
|
+
- All source files are treated as MODIFIED
|
|
183
|
+
- All exports will be fully re-extracted in step 03
|
|
184
|
+
- Skip export-level comparison
|
|
185
|
+
|
|
186
|
+
### 3. Build Change Manifest
|
|
187
|
+
|
|
188
|
+
Compile the change manifest with structured entries:
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
Change Manifest:
|
|
192
|
+
files_changed: [count]
|
|
193
|
+
files_added: [count]
|
|
194
|
+
files_deleted: [count]
|
|
195
|
+
files_moved: [count]
|
|
196
|
+
|
|
197
|
+
exports_modified: [count]
|
|
198
|
+
exports_new: [count]
|
|
199
|
+
exports_deleted: [count]
|
|
200
|
+
exports_renamed: [count]
|
|
201
|
+
exports_moved: [count]
|
|
202
|
+
|
|
203
|
+
scripts_modified, scripts_added, scripts_deleted: {counts}
|
|
204
|
+
assets_modified, assets_added, assets_deleted: {counts}
|
|
205
|
+
|
|
206
|
+
Per-file detail:
|
|
207
|
+
{file_path}:
|
|
208
|
+
status: MODIFIED|ADDED|DELETED|MOVED
|
|
209
|
+
exports_affected: [{export_name, change_type, old_line, new_line}]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### 4. Check for No-Change Shortcut
|
|
213
|
+
|
|
214
|
+
**If zero changes detected across all categories:**
|
|
215
|
+
|
|
216
|
+
"**No changes detected.** Source code matches provenance map exactly.
|
|
217
|
+
|
|
218
|
+
The skill `{skill_name}` is current — no update needed.
|
|
219
|
+
|
|
220
|
+
**Skipping to report step...**"
|
|
221
|
+
|
|
222
|
+
→ Skip steps 03-06, immediately load {noChangeReportFile} with "no changes" status.
|
|
223
|
+
|
|
224
|
+
### 5. Display Change Summary and Auto-Proceed
|
|
225
|
+
|
|
226
|
+
"**Change Detection Complete:**
|
|
227
|
+
|
|
228
|
+
| Category | Count |
|
|
229
|
+
|----------|-------|
|
|
230
|
+
| Files modified | {count} |
|
|
231
|
+
| Files added | {count} |
|
|
232
|
+
| Files deleted | {count} |
|
|
233
|
+
| Files moved/renamed | {count} |
|
|
234
|
+
| Exports affected | {total_export_changes} |
|
|
235
|
+
|
|
236
|
+
**Proceeding to re-extraction of {affected_file_count if normal mode, or gap_count if gap-driven mode} changes...**"
|
|
237
|
+
|
|
238
|
+
### 6. Present MENU OPTIONS
|
|
239
|
+
|
|
240
|
+
Display: "**Proceeding to re-extraction...**"
|
|
241
|
+
|
|
242
|
+
#### Menu Handling Logic:
|
|
243
|
+
|
|
244
|
+
- After change manifest is built, immediately load, read entire file, then execute {nextStepFile}
|
|
245
|
+
- **EXCEPTION:** If no changes detected (section 4), load {noChangeReportFile} instead
|
|
246
|
+
|
|
247
|
+
#### EXECUTION RULES:
|
|
248
|
+
|
|
249
|
+
- This is an auto-proceed step with no user choices
|
|
250
|
+
- Proceed directly to next step after change detection completes
|
|
251
|
+
|
|
252
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
253
|
+
|
|
254
|
+
ONLY WHEN the change manifest is fully built will you load {nextStepFile} to begin re-extraction. If no changes detected, skip to {noChangeReportFile}.
|
|
255
|
+
|