bmad-module-skill-forge 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/docs/agents.md +9 -5
- package/docs/concepts.md +17 -13
- package/docs/examples.md +19 -4
- package/docs/getting-started.md +34 -19
- package/docs/how-it-works.md +85 -84
- package/docs/index.md +1 -1
- package/docs/workflows.md +88 -40
- package/package.json +1 -1
- package/src/agents/forger.agent.yaml +17 -5
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +2 -1
- package/src/forger/preferences.yaml +5 -7
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +1 -1
- package/src/knowledge/confidence-tiers.md +12 -1
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +10 -7
- package/src/knowledge/progressive-capability.md +3 -2
- package/src/knowledge/qmd-registry.md +4 -1
- package/src/knowledge/skf-knowledge-index.csv +1 -0
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +3 -0
- package/src/workflows/README.md +35 -17
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
- package/src/workflows/analyze-source/workflow.md +2 -2
- package/src/workflows/audit-skill/data/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +5 -0
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +1 -1
- package/src/workflows/audit-skill/workflow.md +2 -1
- package/src/workflows/brief-skill/data/scope-templates.md +10 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/skill-sections.md +12 -11
- package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +13 -9
- package/src/workflows/create-skill/steps-c/step-03-extract.md +15 -19
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +1 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
- package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
- package/src/workflows/create-skill/workflow.md +2 -2
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +23 -7
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +30 -2
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +2 -2
- package/src/workflows/export-skill/data/managed-section-format.md +8 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/workflow.md +3 -1
- package/src/workflows/quick-skill/data/skill-template.md +18 -6
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
- package/src/workflows/quick-skill/workflow.md +1 -1
- package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
- package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
- package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
- package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
- package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
- package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
- package/src/workflows/refine-architecture/workflow.md +61 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
- package/src/workflows/setup-forge/workflow.md +3 -2
- package/src/workflows/test-skill/data/scoring-rules.md +3 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/workflow.md +2 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +2 -2
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +5 -2
- package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
- package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
- package/src/workflows/update-skill/workflow.md +1 -1
- package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
- package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
- package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
- package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
- package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
- package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
- package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
- package/src/workflows/verify-stack/workflow.md +61 -0
- package/src/workflows/analyze-source/validation-report.md +0 -657
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
- package/src/workflows/audit-skill/validation-report.md +0 -545
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
- package/src/workflows/brief-skill/validation-report.md +0 -630
- package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
- package/src/workflows/create-skill/validation-report.md +0 -189
- package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
- package/src/workflows/create-stack-skill/validation-report.md +0 -401
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
- package/src/workflows/export-skill/validation-report.md +0 -263
- package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
- package/src/workflows/quick-skill/validation-report.md +0 -543
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
- package/src/workflows/setup-forge/validation-report.md +0 -504
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
- package/src/workflows/test-skill/validation-report.md +0 -390
- package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
- package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
- package/src/workflows/update-skill/validation-report.md +0 -559
- package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
conversionFrom: 'src/workflows/update-skill/update-skill.spec.md'
|
|
3
|
-
originalFormat: 'BMAD Workflow Specification (Placeholder)'
|
|
4
|
-
stepsCompleted: ['step-00-conversion', 'step-02-classification', 'step-03-requirements', 'step-04-tools', 'step-05-plan-review', 'step-06-design', 'step-07-foundation', 'step-08-build-step-01', 'step-09-build-remaining', 'validation']
|
|
5
|
-
created: 2026-02-27
|
|
6
|
-
status: VALIDATED
|
|
7
|
-
validationDate: 2026-02-27
|
|
8
|
-
validationReport: './validation-report.md'
|
|
9
|
-
approvedDate: 2026-02-27
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Workflow Creation Plan
|
|
13
|
-
|
|
14
|
-
## Conversion Source
|
|
15
|
-
|
|
16
|
-
**Original Path:** src/workflows/update-skill/update-skill.spec.md
|
|
17
|
-
**Original Format:** BMAD Workflow Specification (Placeholder)
|
|
18
|
-
**Detected Structure:** Single spec file defining a 7-step create-only workflow for smart skill regeneration with [MANUAL] section preservation. No step files, templates, or data files exist yet — this is a design-phase placeholder.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Original Workflow Analysis
|
|
23
|
-
|
|
24
|
-
### Goal (from source)
|
|
25
|
-
|
|
26
|
-
Smart regeneration preserving [MANUAL] sections. Detects changes in source code since last generation, re-extracts affected exports, diffs against existing provenance map, and regenerates SKILL.md while preserving any [MANUAL] sections the developer has added. Handles both individual and stack skills internally.
|
|
27
|
-
|
|
28
|
-
### Original Steps (Complete List)
|
|
29
|
-
|
|
30
|
-
**Step 1:** load-existing - Load existing skill and provenance map
|
|
31
|
-
**Step 2:** detect-changes - Diff source against provenance map
|
|
32
|
-
**Step 3:** re-extract - AST extraction on changed files only
|
|
33
|
-
**Step 4:** merge - Merge new extractions, preserve [MANUAL] sections
|
|
34
|
-
**Step 5:** validate - Validate updated skill against spec
|
|
35
|
-
**Step 6:** write - Write updated SKILL.md and provenance map
|
|
36
|
-
**Step 7:** report - Display change summary
|
|
37
|
-
|
|
38
|
-
### Output / Deliverable
|
|
39
|
-
|
|
40
|
-
Document-producing workflow that outputs:
|
|
41
|
-
- Updated `{skills_output_folder}/{name}/SKILL.md`
|
|
42
|
-
- Updated `{forge_data_folder}/{name}/provenance-map.json`
|
|
43
|
-
- Updated `{forge_data_folder}/{name}/evidence-report.md`
|
|
44
|
-
|
|
45
|
-
### Input Requirements
|
|
46
|
-
|
|
47
|
-
**Required:**
|
|
48
|
-
- Existing skill path (`{skills_output_folder}/{name}/`)
|
|
49
|
-
- Updated source code
|
|
50
|
-
|
|
51
|
-
**Optional:**
|
|
52
|
-
- None
|
|
53
|
-
|
|
54
|
-
### Key Instructions to LLM
|
|
55
|
-
|
|
56
|
-
- Primary agent: Ferris (Surgeon mode) — precision-focused, surgical changes only
|
|
57
|
-
- Workflow type: Core (part of the SKF module's essential functionality)
|
|
58
|
-
- Create-only mode (steps-c/ only, no tri-modal)
|
|
59
|
-
- Must handle both individual and stack skills internally (no separate workflows)
|
|
60
|
-
- Must preserve [MANUAL] sections — developer-authored content must survive regeneration
|
|
61
|
-
- Uses provenance map for change detection (diff-based, not full re-extraction)
|
|
62
|
-
- Build priority: Phase 2 (Lifecycle)
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Conversion Notes
|
|
67
|
-
|
|
68
|
-
**What works well in original:**
|
|
69
|
-
- Clear 7-step pipeline with well-defined responsibilities per step
|
|
70
|
-
- Provenance-map-driven change detection (efficient, targeted)
|
|
71
|
-
- Explicit [MANUAL] section preservation requirement
|
|
72
|
-
- Unified handling of individual and stack skills
|
|
73
|
-
- Well-defined input/output contract
|
|
74
|
-
|
|
75
|
-
**What needs improvement:**
|
|
76
|
-
- Spec is a placeholder — no implementation details exist for any step
|
|
77
|
-
- No data files, templates, or step files have been created
|
|
78
|
-
- No description of how [MANUAL] sections are identified or preserved
|
|
79
|
-
- No detail on AST extraction approach for re-extraction
|
|
80
|
-
- No error handling or edge case coverage (e.g., deleted exports, renamed files)
|
|
81
|
-
|
|
82
|
-
**Compliance gaps identified:**
|
|
83
|
-
- No step files exist (need full step-file architecture)
|
|
84
|
-
- No frontmatter standards applied yet
|
|
85
|
-
- No menu/continuation patterns defined
|
|
86
|
-
- No state tracking or stepsCompleted patterns
|
|
87
|
-
- No data files or templates referenced
|
|
88
|
-
- Installed path uses `{project-root}/_bmad/skf/workflows/update-skill` but needs proper BMAD structure
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Memory-Informed Conversion Notes
|
|
93
|
-
|
|
94
|
-
### Patterns from Prior Workflow Builds
|
|
95
|
-
|
|
96
|
-
**Tier-awareness (from create-skill, audit-skill, create-stack-skill):**
|
|
97
|
-
- Quick tier: text pattern matching, T1-low confidence
|
|
98
|
-
- Forge tier: AST structural extraction, T1 confidence
|
|
99
|
-
- Deep tier: AST + QMD semantic enrichment, T2 confidence
|
|
100
|
-
- Update-skill must implement tier-aware re-extraction matching these patterns
|
|
101
|
-
|
|
102
|
-
**Workflow chaining (from audit-skill #334):**
|
|
103
|
-
- Requires: setup-forge output (forge-tier.yaml), create-skill output (provenance-map.json + SKILL.md)
|
|
104
|
-
- Triggered by: audit-skill when CRITICAL/HIGH drift detected
|
|
105
|
-
- Produces: updated provenance-map.json feeding back into audit-skill cycle
|
|
106
|
-
|
|
107
|
-
**Ferris Surgeon mode (from agent plan #37):**
|
|
108
|
-
- Defined as "precise edits that preserve manual changes" — exact match for update-skill's purpose
|
|
109
|
-
- Zero-hallucination principle: every regenerated instruction must trace to code with AST file:line citations
|
|
110
|
-
- Confidence tier labeling (T1/T1-low/T2) required on all re-extracted content
|
|
111
|
-
|
|
112
|
-
**Subprocess patterns (from audit-skill #321):**
|
|
113
|
-
- Pattern 2: per-file AST extraction (for re-extract step)
|
|
114
|
-
- Pattern 4: parallel comparison (for detect-changes step)
|
|
115
|
-
- Pattern 3: QMD/rules operations (for Deep tier enrichment)
|
|
116
|
-
|
|
117
|
-
**Stack skill support (from create-stack-skill #297):**
|
|
118
|
-
- Must handle multi-file outputs: SKILL.md, references/*.md, integrations/*.md
|
|
119
|
-
- Stack skills use integration-first architecture with cross-cutting patterns
|
|
120
|
-
- Update must preserve [MANUAL] sections across ALL output files, not just SKILL.md
|
|
121
|
-
|
|
122
|
-
**Batch mode (from create-skill #89):**
|
|
123
|
-
- --batch flag for updating multiple skills
|
|
124
|
-
- --continue flag for checkpoint resume from sidecar
|
|
125
|
-
|
|
126
|
-
### Missing Features to Add During Conversion
|
|
127
|
-
|
|
128
|
-
1. Tier-aware re-extraction (Quick/Forge/Forge+/Deep graceful degradation)
|
|
129
|
-
2. Degraded mode for missing provenance map (fallback to full re-extraction)
|
|
130
|
-
3. Stack skill multi-file update support
|
|
131
|
-
4. Batch mode with checkpoint resume
|
|
132
|
-
5. Change summary with before/after diff visualization
|
|
133
|
-
6. Edge case handling: deleted exports, renamed files, moved functions
|
|
134
|
-
7. [MANUAL] section conflict resolution when regenerated content overlaps
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Classification Decisions
|
|
139
|
-
|
|
140
|
-
**Workflow Name:** update-skill
|
|
141
|
-
**Target Path:** {project-root}/_bmad/skf/workflows/update-skill/
|
|
142
|
-
|
|
143
|
-
**4 Key Decisions:**
|
|
144
|
-
1. **Document Output:** false (modifies existing files, does not produce new documents)
|
|
145
|
-
2. **Module Affiliation:** SKF (Phase 2 Lifecycle workflow, Ferris agent menu [US] Update Skill)
|
|
146
|
-
3. **Session Type:** single-session (targeted re-extraction on changed files only, efficient provenance-driven diffing)
|
|
147
|
-
4. **Lifecycle Support:** create-only (steps-c/ only — update-skill IS the edit operation for skill artifacts)
|
|
148
|
-
|
|
149
|
-
**Structure Implications:**
|
|
150
|
-
- Needs steps-c/ folder only (no steps-e/ or steps-v/)
|
|
151
|
-
- Standard step-01-init.md without continuation logic
|
|
152
|
-
- No stepsCompleted tracking in output (non-document)
|
|
153
|
-
- SKF module variables available: skills_output_folder, forge_data_folder, forge_tier, etc.
|
|
154
|
-
- Stored in SKF module's workflows directory alongside create-skill, audit-skill, etc.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## Requirements
|
|
159
|
-
|
|
160
|
-
**Flow Structure:**
|
|
161
|
-
- Pattern: linear
|
|
162
|
-
- Phases: load → diff → extract → merge → validate → write → report
|
|
163
|
-
- Estimated steps: 7 (matching spec pipeline)
|
|
164
|
-
|
|
165
|
-
**User Interaction:**
|
|
166
|
-
- Style: mostly autonomous with strategic gates
|
|
167
|
-
- Decision points: Gate 1 after load (confirm change scope), Gate 2 after merge (approve [MANUAL] conflict resolution if any)
|
|
168
|
-
- Checkpoint frequency: 2 gates — steps 02-03 and 05-07 auto-proceed
|
|
169
|
-
|
|
170
|
-
**Inputs Required:**
|
|
171
|
-
- Required: existing skill path ({skills_output_folder}/{name}/), sidecar/forge-tier.yaml (tier detection), {forge_data_folder}/{name}/provenance-map.json (export mappings + timestamps), existing SKILL.md + metadata.json
|
|
172
|
-
- Optional: --batch flag for multi-skill update, --continue flag for checkpoint resume, specific file list to restrict re-extraction scope
|
|
173
|
-
- Prerequisites: setup-forge completed (forge-tier.yaml), create-skill completed (provenance-map.json + SKILL.md exist)
|
|
174
|
-
|
|
175
|
-
**Output Specifications:**
|
|
176
|
-
- Type: action (modifies existing files in-place)
|
|
177
|
-
- Format: N/A (non-document)
|
|
178
|
-
- Actions: surgically updates SKILL.md, provenance-map.json, evidence-report.md; for stack skills also updates references/*.md and references/integrations/*.md
|
|
179
|
-
- Frequency: single skill per run (batch mode wraps multiple runs)
|
|
180
|
-
|
|
181
|
-
**Success Criteria:**
|
|
182
|
-
- All changed exports re-extracted with correct confidence tiers (T1/T1-low/T2)
|
|
183
|
-
- All [MANUAL] sections preserved intact with zero content loss
|
|
184
|
-
- Provenance map updated with new timestamps and file mappings
|
|
185
|
-
- No hallucinated content — every instruction traces to AST file:line citation
|
|
186
|
-
- Stack skills: all affected reference files updated consistently
|
|
187
|
-
- Evidence report reflects update operation with before/after provenance
|
|
188
|
-
|
|
189
|
-
**Instruction Style:**
|
|
190
|
-
- Overall: prescriptive
|
|
191
|
-
- Notes: matches established SKF pattern (setup-forge, create-skill, audit-skill all use prescriptive). Zero-hallucination principle requires exact AST citations. No room for creative interpretation when modifying existing skill artifacts.
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Tools Configuration
|
|
196
|
-
|
|
197
|
-
**Core BMAD Tools:**
|
|
198
|
-
- **Party Mode:** excluded — deterministic surgical operation, no creative brainstorming applicable
|
|
199
|
-
- **Advanced Elicitation:** excluded — prescriptive workflow with no ambiguity points
|
|
200
|
-
- **Brainstorming:** excluded — not applicable to code-driven extraction pipeline
|
|
201
|
-
|
|
202
|
-
**LLM Features:**
|
|
203
|
-
- **Web-Browsing:** excluded — all data is local (source code + skill artifacts)
|
|
204
|
-
- **File I/O:** included — core requirement. Reads skill artifacts, provenance maps, source code. Writes updated SKILL.md, provenance-map.json, evidence-report.md, and stack reference files
|
|
205
|
-
- **Sub-Agents:** excluded — single-agent workflow (Ferris Surgeon mode)
|
|
206
|
-
- **Sub-Processes:** included — Pattern 2 (per-file AST extraction in Step 03), Pattern 4 (parallel diff comparison in Step 02)
|
|
207
|
-
|
|
208
|
-
**Memory:**
|
|
209
|
-
- Type: single-session (no continuation logic)
|
|
210
|
-
- Sidecar: reads forge-tier.yaml (pre-existing from setup-forge), reads/writes provenance-map.json
|
|
211
|
-
|
|
212
|
-
**External Integrations:**
|
|
213
|
-
- **ast_bridge:** required for Forge/Deep tier AST extraction (pre-detected by setup-forge)
|
|
214
|
-
- **gh_bridge:** required for all tiers to read source files
|
|
215
|
-
- **qmd_bridge:** required for Deep tier semantic enrichment only
|
|
216
|
-
- **skill-check:** required for validation against agentskills.io spec (Step 05) — `npx skill-check check --fix --format json` for validation + auto-fix + quality scoring, `diff` for before/after comparison, security scan for prompt injection detection, `split-body` for oversized body remediation
|
|
217
|
-
|
|
218
|
-
**Installation Requirements:**
|
|
219
|
-
- None — all tools pre-detected by setup-forge workflow
|
|
220
|
-
- User preference: N/A (no additional installs needed)
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Workflow Design
|
|
225
|
-
|
|
226
|
-
### Step Sequence
|
|
227
|
-
|
|
228
|
-
| Step | Name | Type | Goal | Menu | Size Est |
|
|
229
|
-
|------|------|------|------|------|----------|
|
|
230
|
-
| 01 | init | Init (Input Discovery) | Load existing skill, provenance map, forge tier; detect skill type; present baseline + change scope | [C] Continue | ~200 |
|
|
231
|
-
| 02 | detect-changes | Middle (Simple) | Diff source timestamps/hashes against provenance map; classify changes | Auto-proceed | ~180 |
|
|
232
|
-
| 03 | re-extract | Middle (Simple) | Tier-aware AST extraction on changed files only | Auto-proceed | ~200 |
|
|
233
|
-
| 04 | merge | Middle (Conditional) | Merge new extractions into existing skill; preserve [MANUAL] sections; conflict resolution | Conditional: [C] if conflicts, auto-proceed if clean | ~250 |
|
|
234
|
-
| 05 | validate | Validation Sequence | Validate updated skill against spec; verify [MANUAL] integrity; check confidence tiers | Auto-proceed | ~180 |
|
|
235
|
-
| 06 | write | Middle (Simple) | Write updated SKILL.md, provenance-map.json, evidence-report.md, stack reference files | Auto-proceed | ~180 |
|
|
236
|
-
| 07 | report | Final Step | Display change summary with diff, [MANUAL] preservation count, chaining recommendations | No next step | ~150 |
|
|
237
|
-
|
|
238
|
-
### Interaction Patterns
|
|
239
|
-
|
|
240
|
-
- **Step 01:** Menu Pattern 2 (C only) — user confirms scope after baseline summary
|
|
241
|
-
- **Steps 02-03:** Menu Pattern 3 (Auto-proceed) — deterministic operations
|
|
242
|
-
- **Step 04:** Conditional — [C] if [MANUAL] conflicts, auto-proceed if clean merge
|
|
243
|
-
- **Steps 05-06:** Menu Pattern 3 (Auto-proceed) — validation and write
|
|
244
|
-
- **Step 07:** Final Step — no menu, display summary and chaining recommendations
|
|
245
|
-
- **No A/P anywhere** — prescriptive surgical workflow
|
|
246
|
-
|
|
247
|
-
### Data Flow
|
|
248
|
-
|
|
249
|
-
```
|
|
250
|
-
Step 01 (init)
|
|
251
|
-
IN: skill path (user), forge-tier.yaml (sidecar), SKILL.md, metadata.json, provenance-map.json
|
|
252
|
-
OUT: loaded baseline state → Step 02
|
|
253
|
-
|
|
254
|
-
Step 02 (detect-changes)
|
|
255
|
-
IN: provenance-map.json entries, source file timestamps/hashes
|
|
256
|
-
OUT: change manifest (changed/added/deleted/moved files + export-level changes)
|
|
257
|
-
|
|
258
|
-
Step 03 (re-extract)
|
|
259
|
-
IN: change manifest, source files (changed only)
|
|
260
|
-
OUT: fresh extractions with confidence tiers (T1/T1-low/T2)
|
|
261
|
-
|
|
262
|
-
Step 04 (merge)
|
|
263
|
-
IN: fresh extractions, existing SKILL.md content, [MANUAL] section markers
|
|
264
|
-
OUT: merged SKILL.md content with [MANUAL] sections preserved
|
|
265
|
-
|
|
266
|
-
Step 05 (validate)
|
|
267
|
-
IN: merged content, agentskills.io spec (via `npx skill-check check --fix --format json`)
|
|
268
|
-
OUT: validation results (pass/fail with quality score, diff comparison, security findings)
|
|
269
|
-
|
|
270
|
-
Step 06 (write)
|
|
271
|
-
IN: validated merged content, updated provenance data
|
|
272
|
-
OUT: written files (SKILL.md, provenance-map.json, evidence-report.md, stack refs)
|
|
273
|
-
|
|
274
|
-
Step 07 (report)
|
|
275
|
-
IN: change manifest, merge results, validation results
|
|
276
|
-
OUT: change summary displayed to user + chaining recommendation
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### File Structure
|
|
280
|
-
|
|
281
|
-
```
|
|
282
|
-
update-skill/
|
|
283
|
-
├── workflow.md
|
|
284
|
-
├── data/
|
|
285
|
-
│ ├── manual-section-rules.md
|
|
286
|
-
│ └── merge-conflict-rules.md
|
|
287
|
-
└── steps-c/
|
|
288
|
-
├── step-01-init.md
|
|
289
|
-
├── step-02-detect-changes.md
|
|
290
|
-
├── step-03-re-extract.md
|
|
291
|
-
├── step-04-merge.md
|
|
292
|
-
├── step-05-validate.md
|
|
293
|
-
├── step-06-write.md
|
|
294
|
-
└── step-07-report.md
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### Role and Persona
|
|
298
|
-
|
|
299
|
-
- **Role:** Ferris in Surgeon mode — precision-focused, surgical changes only
|
|
300
|
-
- **Communication:** Terse, technical, confidence-labeled. Every statement backed by AST citations
|
|
301
|
-
- **Tone:** Clinical precision
|
|
302
|
-
- **Style:** Prescriptive throughout — zero ambiguity, zero hallucination
|
|
303
|
-
|
|
304
|
-
### Error Handling
|
|
305
|
-
|
|
306
|
-
- Missing SKILL.md → abort: "Run create-skill first"
|
|
307
|
-
- Missing provenance-map.json → offer degraded mode (full re-extraction, T1-low confidence)
|
|
308
|
-
- Missing forge-tier.yaml → abort: "Run setup-forge first"
|
|
309
|
-
- No changes detected → skip to Step 07: "No drift detected. Skill is current."
|
|
310
|
-
- [MANUAL] conflict → halt, present conflict details, require user resolution
|
|
311
|
-
- Deleted exports with [MANUAL] annotations → flag WARNING, require user decision
|
|
312
|
-
- Validation failure → present issues, recommend fixes, allow proceed or abort
|
|
313
|
-
|
|
314
|
-
### Subprocess Optimization
|
|
315
|
-
|
|
316
|
-
| Step | Pattern | What | Returns |
|
|
317
|
-
|------|---------|------|---------|
|
|
318
|
-
| 02 | Pattern 4 (Parallel) | Parallel timestamp/hash comparison across file categories | Change manifest per category |
|
|
319
|
-
| 03 | Pattern 2 (Per-file) | Per-file AST extraction on each changed file | Structured extraction findings per file |
|
|
320
|
-
| 03 (Deep) | Pattern 3 (Data Ops) | QMD query for semantic enrichment on changed exports | T2 evidence per export |
|
|
321
|
-
| 05 | Pattern 4 (Parallel) | Parallel validation checks (spec, [MANUAL] integrity, confidence tiers) | Structured validation results |
|
|
322
|
-
|
|
323
|
-
Fallback: All operations executable in main thread if subprocesses unavailable.
|
|
324
|
-
|
|
325
|
-
### Workflow Chaining
|
|
326
|
-
|
|
327
|
-
**Input Contract (Required):**
|
|
328
|
-
- setup-forge → sidecar/forge-tier.yaml
|
|
329
|
-
- create-skill or create-stack-skill → {skills_output_folder}/{name}/SKILL.md + {forge_data_folder}/{name}/provenance-map.json
|
|
330
|
-
|
|
331
|
-
**Input Contract (Optional):**
|
|
332
|
-
- audit-skill → drift report (when triggered by CRITICAL/HIGH drift)
|
|
333
|
-
|
|
334
|
-
**Output Contract:**
|
|
335
|
-
- Updated provenance-map.json → feeds back into audit-skill cycle
|
|
336
|
-
- Updated SKILL.md → consumed by export-skill, test-skill
|
|
337
|
-
|
|
338
|
-
**Step 07 Recommendation:**
|
|
339
|
-
- Validation passed: "Skill updated. Run audit-skill to verify, or export-skill to package."
|
|
340
|
-
- Issues remain: "Partial update. Run audit-skill to identify remaining drift."
|
|
341
|
-
|
|
342
|
-
---
|
|
343
|
-
|
|
344
|
-
## Foundation Build Complete
|
|
345
|
-
|
|
346
|
-
**Created:**
|
|
347
|
-
- Folder structure at: _bmad-output/bmb-creations/workflows/update-skill/
|
|
348
|
-
- workflow.md (entry point with SKF module config loading)
|
|
349
|
-
- data/manual-section-rules.md ([MANUAL] section detection, preservation, conflict types)
|
|
350
|
-
- data/merge-conflict-rules.md (5 change categories, merge priority order, stack skill rules)
|
|
351
|
-
|
|
352
|
-
**Configuration:**
|
|
353
|
-
- Workflow name: update-skill
|
|
354
|
-
- Continuable: no (single-session)
|
|
355
|
-
- Document output: no (action-based, modifies existing files)
|
|
356
|
-
- Mode: create-only (steps-c/)
|
|
357
|
-
- No output template needed (non-document workflow)
|
|
358
|
-
|
|
359
|
-
**Next Steps:**
|
|
360
|
-
- Step 8: Build step-01-init.md
|
|
361
|
-
- Step 9: Build remaining steps 02-07 (repeatable)
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
365
|
-
## Step 01 Build Complete
|
|
366
|
-
|
|
367
|
-
**Created:**
|
|
368
|
-
- steps-c/step-01-init.md (~150 lines)
|
|
369
|
-
|
|
370
|
-
**Step Configuration:**
|
|
371
|
-
- Type: non-continuable (no step-01b needed)
|
|
372
|
-
- Input Discovery: yes (discovers skill path, provenance map, forge-tier.yaml, [MANUAL] sections)
|
|
373
|
-
- Menu: Pattern 2 (C only) — user confirms baseline scope
|
|
374
|
-
- Next Step: step-02-detect-changes
|
|
375
|
-
|
|
376
|
-
**Supporting Files:**
|
|
377
|
-
- data/manual-section-rules.md (referenced from step-01 for [MANUAL] inventory)
|
|
378
|
-
- data/merge-conflict-rules.md (pre-created, used in step-04)
|
|
379
|
-
|
|
380
|
-
**Key Features:**
|
|
381
|
-
- Validates all required artifacts before proceeding (SKILL.md, metadata.json, forge-tier.yaml)
|
|
382
|
-
- Degraded mode option when provenance map missing
|
|
383
|
-
- Detects individual vs stack skill type from metadata.json
|
|
384
|
-
- Inventories all [MANUAL] sections across all output files (including stack references)
|
|
385
|
-
- Presents baseline summary table with forge tier, provenance age, export count, [MANUAL] count
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## Steps 02-07 Build Complete
|
|
390
|
-
|
|
391
|
-
### Step 02: detect-changes (~180 lines)
|
|
392
|
-
- Type: Middle (Simple), Auto-proceed
|
|
393
|
-
- Pattern 4 parallel subprocess for timestamp/hash comparison
|
|
394
|
-
- 3-category scan: file-level changes, export-level changes, rename detection
|
|
395
|
-
- Change manifest output with per-file classification (MODIFIED/ADDED/DELETED/MOVED/RENAMED)
|
|
396
|
-
- No-change shortcut: skips directly to step-07-report if source matches provenance
|
|
397
|
-
- Next: step-03-re-extract
|
|
398
|
-
|
|
399
|
-
### Step 03: re-extract (~190 lines)
|
|
400
|
-
- Type: Middle (Simple), Auto-proceed
|
|
401
|
-
- Pattern 2 per-file subprocess for AST extraction on changed files only
|
|
402
|
-
- Tier-aware: Quick (regex, T1-low), Forge (AST, T1), Deep (AST+QMD, T1+T2)
|
|
403
|
-
- "DO NOT BE LAZY" directive ensures per-file subprocess extraction
|
|
404
|
-
- Conditional QMD enrichment (Pattern 3) for Deep tier only
|
|
405
|
-
- Next: step-04-merge
|
|
406
|
-
|
|
407
|
-
### Step 04: merge (~230 lines)
|
|
408
|
-
- Type: Middle (Conditional), [C] if conflicts / auto-proceed if clean
|
|
409
|
-
- Loads manual-section-rules.md and merge-conflict-rules.md
|
|
410
|
-
- 5-priority merge order: delete → move → rename → modify → add
|
|
411
|
-
- [MANUAL] block extraction, mapping, and preservation algorithm
|
|
412
|
-
- Conflict resolution UI: [K]eep / [R]emove / [E]dit per conflict
|
|
413
|
-
- Stack skill conditional merge across reference files
|
|
414
|
-
- Next: step-05-validate
|
|
415
|
-
|
|
416
|
-
### Step 05: validate (~190 lines)
|
|
417
|
-
- Type: Validation Sequence, Auto-proceed (advisory, non-blocking)
|
|
418
|
-
- Pattern 4 parallel validation across 4 checks:
|
|
419
|
-
- Check A: Spec compliance (agentskills.io via skill-check)
|
|
420
|
-
- Check B: [MANUAL] section integrity (byte-level comparison)
|
|
421
|
-
- Check C: Confidence tier consistency (tier vs forge capabilities)
|
|
422
|
-
- Check D: Provenance completeness (export-to-source mapping)
|
|
423
|
-
- Stack skill reference file validation conditional
|
|
424
|
-
- Next: step-06-write
|
|
425
|
-
|
|
426
|
-
### Step 06: write (~200 lines)
|
|
427
|
-
- Type: Middle (Simple), Auto-proceed
|
|
428
|
-
- Atomic file writes: SKILL.md, metadata.json (version increment), provenance-map.json (updated mappings), evidence-report.md (appended operation record)
|
|
429
|
-
- Stack skill reference file writes conditional
|
|
430
|
-
- Read-back verification for all written files
|
|
431
|
-
- Write verification table displayed before proceeding
|
|
432
|
-
- Next: step-07-report
|
|
433
|
-
|
|
434
|
-
### Step 07: report (~200 lines)
|
|
435
|
-
- Type: Final Step, no next step
|
|
436
|
-
- Handles no-change shortcut from step 02
|
|
437
|
-
- Comprehensive summary: operation metrics, change categories, export changes, confidence tier breakdown, [MANUAL] preservation status
|
|
438
|
-
- Validation findings presented if any
|
|
439
|
-
- Files written listed with paths
|
|
440
|
-
- Workflow chaining recommendations based on validation results
|
|
441
|
-
- Workflow ends here
|