bmad-module-skill-forge 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/docs/agents.md +9 -5
- package/docs/concepts.md +17 -13
- package/docs/examples.md +19 -4
- package/docs/getting-started.md +34 -19
- package/docs/how-it-works.md +87 -84
- package/docs/index.md +1 -1
- package/docs/workflows.md +88 -40
- package/package.json +1 -1
- package/src/agents/forger.agent.yaml +17 -5
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +2 -1
- package/src/forger/preferences.yaml +5 -7
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +3 -2
- package/src/knowledge/confidence-tiers.md +12 -1
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +11 -7
- package/src/knowledge/progressive-capability.md +5 -2
- package/src/knowledge/qmd-registry.md +5 -2
- package/src/knowledge/skf-knowledge-index.csv +2 -0
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/tool-resolution.md +55 -0
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +3 -0
- package/src/workflows/README.md +35 -17
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +3 -3
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
- package/src/workflows/analyze-source/workflow.md +2 -2
- package/src/workflows/audit-skill/data/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +2 -1
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +8 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
- package/src/workflows/audit-skill/workflow.md +2 -1
- package/src/workflows/brief-skill/data/scope-templates.md +10 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +7 -1
- package/src/workflows/create-skill/data/skill-sections.md +12 -11
- package/src/workflows/create-skill/data/source-resolution-protocols.md +2 -2
- package/src/workflows/create-skill/data/tier-degradation-rules.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +14 -10
- package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +4 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +19 -19
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +3 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
- package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
- package/src/workflows/create-skill/workflow.md +2 -2
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/manifest-patterns.md +23 -1
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -7
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +37 -3
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +29 -3
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +50 -7
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +35 -3
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +2 -2
- package/src/workflows/export-skill/data/managed-section-format.md +8 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/workflow.md +3 -1
- package/src/workflows/quick-skill/data/skill-template.md +18 -6
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
- package/src/workflows/quick-skill/workflow.md +1 -1
- package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
- package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
- package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
- package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
- package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
- package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
- package/src/workflows/refine-architecture/workflow.md +61 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +5 -3
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
- package/src/workflows/setup-forge/workflow.md +3 -2
- package/src/workflows/test-skill/data/scoring-rules.md +3 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/workflow.md +2 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +3 -3
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +8 -3
- package/src/workflows/update-skill/steps-c/step-05-validate.md +8 -12
- package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
- package/src/workflows/update-skill/workflow.md +1 -1
- package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
- package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
- package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
- package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
- package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
- package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
- package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
- package/src/workflows/verify-stack/workflow.md +61 -0
- package/src/workflows/analyze-source/validation-report.md +0 -657
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
- package/src/workflows/audit-skill/validation-report.md +0 -545
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
- package/src/workflows/brief-skill/validation-report.md +0 -630
- package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
- package/src/workflows/create-skill/validation-report.md +0 -189
- package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
- package/src/workflows/create-stack-skill/validation-report.md +0 -401
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
- package/src/workflows/export-skill/validation-report.md +0 -263
- package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
- package/src/workflows/quick-skill/validation-report.md +0 -543
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
- package/src/workflows/setup-forge/validation-report.md +0 -504
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
- package/src/workflows/test-skill/validation-report.md +0 -390
- package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
- package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
- package/src/workflows/update-skill/validation-report.md +0 -559
- package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
conversionFrom: 'src/workflows/audit-skill/audit-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-steps', 'step-10-confirmation']
|
|
5
|
-
created: 2026-02-27
|
|
6
|
-
status: VALIDATED
|
|
7
|
-
confirmationDate: 2026-02-27
|
|
8
|
-
confirmationType: conversion
|
|
9
|
-
coverageStatus: complete
|
|
10
|
-
validationStatus: COMPLETE
|
|
11
|
-
validationDate: 2026-02-27
|
|
12
|
-
validationReport: './validation-report.md'
|
|
13
|
-
approvedDate: 2026-02-27
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# Workflow Creation Plan
|
|
17
|
-
|
|
18
|
-
## Conversion Source
|
|
19
|
-
|
|
20
|
-
**Original Path:** src/workflows/audit-skill/audit-skill.spec.md
|
|
21
|
-
**Original Format:** BMAD Workflow Specification (Placeholder)
|
|
22
|
-
**Detected Structure:** 6-step create-only pipeline defined at spec level, no implementation files exist yet
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Original Workflow Analysis
|
|
27
|
-
|
|
28
|
-
### Goal (from source)
|
|
29
|
-
|
|
30
|
-
Drift detection between skill and current source. Compares an existing skill against its source code to detect drift. Forge tier: structural comparison via AST diff. Deep tier: full audit including semantic changes and temporal context via QMD. Produces a drift report with severity levels. ADR-A: core workflow, CI is optional export.
|
|
31
|
-
|
|
32
|
-
### Original Steps (Complete List)
|
|
33
|
-
|
|
34
|
-
**Step 1:** load-skill - Load existing skill and provenance map
|
|
35
|
-
**Step 2:** re-index - Re-scan source with current tools
|
|
36
|
-
**Step 3:** structural-diff - Compare AST extractions (Forge+)
|
|
37
|
-
**Step 4:** semantic-diff - Compare QMD knowledge context (Deep only)
|
|
38
|
-
**Step 5:** severity-classify - Classify drift items by severity
|
|
39
|
-
**Step 6:** report - Generate drift report
|
|
40
|
-
|
|
41
|
-
### Output / Deliverable
|
|
42
|
-
|
|
43
|
-
Drift report with severity levels (added/removed/changed exports, breaking changes). Document-producing workflow.
|
|
44
|
-
|
|
45
|
-
### Input Requirements
|
|
46
|
-
|
|
47
|
-
**Required:**
|
|
48
|
-
- Existing skill path
|
|
49
|
-
- Source code (current version)
|
|
50
|
-
|
|
51
|
-
**Optional:**
|
|
52
|
-
- None specified
|
|
53
|
-
|
|
54
|
-
### Key Instructions to LLM
|
|
55
|
-
|
|
56
|
-
- Primary agent: Ferris (Audit mode)
|
|
57
|
-
- Tiered operation: Forge/Forge+ tier (structural, with optional CCC augmentation) vs Deep tier (full semantic + QMD)
|
|
58
|
-
- The spec references AST diff for structural comparison and QMD for semantic context
|
|
59
|
-
- CI integration is noted as optional export (ADR-A decision)
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Conversion Notes (Memory-Enriched)
|
|
64
|
-
|
|
65
|
-
**What works well in original (preserve):**
|
|
66
|
-
- Clean 6-step pipeline with logical progression: load → scan → diff → classify → report
|
|
67
|
-
- Tiered Forge/Deep separation aligns with established SKF tier architecture
|
|
68
|
-
- Correct lifecycle positioning (Phase 2, after create-skill and test-skill)
|
|
69
|
-
- Clear input/output specification
|
|
70
|
-
- Document-producing output aligns with drift report use case
|
|
71
|
-
|
|
72
|
-
**What needs improvement (fix during build):**
|
|
73
|
-
- **Missing Quick tier path** — All SKF workflows support Quick/Forge/Forge+/Deep with graceful degradation; Quick tier needs text-diff fallback
|
|
74
|
-
- **No provenance map format specification** — Step 01 loads it, but must reference known `provenance-map.json` from create-skill's `forge-data/{name}/` output
|
|
75
|
-
- **No confidence tier labels (T1/T2/T3)** — Every SKF workflow uses these for traceability; drift findings need confidence scoring
|
|
76
|
-
- **Step 04 conditional skip** — semantic-diff is Deep-only but spec has no skip logic or degradation behavior for Forge/Quick tiers
|
|
77
|
-
- No error handling or edge cases documented (missing skill, incompatible versions, no provenance map)
|
|
78
|
-
- No data files, templates, or supporting materials defined
|
|
79
|
-
|
|
80
|
-
**Missing features to add:**
|
|
81
|
-
- **Batch mode** (`--batch`, `--continue` flags) — Consistent with test-skill, create-skill, and all lifecycle workflows
|
|
82
|
-
- **Dual-mode support** — Individual skill vs stack skill auditing (stack skills have integration patterns needing cross-reference drift detection)
|
|
83
|
-
- **Remediation suggestions** — Like test-skill's gap report, drift items should include actionable fix recommendations
|
|
84
|
-
- **Update-skill chaining** — Drift report should optionally trigger update-skill workflow for detected issues
|
|
85
|
-
|
|
86
|
-
**Compliance gaps identified:**
|
|
87
|
-
- No step files exist (placeholder spec only)
|
|
88
|
-
- No workflow.md entry point
|
|
89
|
-
- No frontmatter on any files
|
|
90
|
-
- No data/ folder with supporting reference materials (severity classification rules, drift pattern definitions)
|
|
91
|
-
- No templates/ for drift report output format
|
|
92
|
-
- Mode is marked create-only — confirmed appropriate for audit (re-audit is a fresh run, not an edit)
|
|
93
|
-
|
|
94
|
-
**Cross-workflow integration points (from memory):**
|
|
95
|
-
- **Input from create-skill:** `forge-data/{name}/provenance-map.json`, `evidence-report.md`, `extraction-rules.yaml`
|
|
96
|
-
- **Input from setup-forge:** `forger-sidecar/forge-tier.yaml` for tier detection
|
|
97
|
-
- **Output feeds update-skill:** Drift report triggers remediation workflow
|
|
98
|
-
- **Sibling pattern: test-skill** — Same Ferris Audit mode, zero-hallucination AST citations, tier-aware depth scaling
|
|
99
|
-
- **SKF config:** Loads from `_bmad/skf/config.yaml` (project_name, output_folder, skills_output_folder, forge_data_folder, sidecar_path)
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Classification Decisions
|
|
104
|
-
|
|
105
|
-
**Workflow Name:** audit-skill
|
|
106
|
-
**Target Path:** {project-root}/_bmad/skf/workflows/audit-skill/
|
|
107
|
-
|
|
108
|
-
**4 Key Decisions:**
|
|
109
|
-
1. **Document Output:** true (drift report with severity levels)
|
|
110
|
-
2. **Module Affiliation:** SKF module
|
|
111
|
-
3. **Session Type:** single-session
|
|
112
|
-
4. **Lifecycle Support:** create-only
|
|
113
|
-
|
|
114
|
-
**Structure Implications:**
|
|
115
|
-
- Needs `steps-c/` folder only (no steps-e/ or steps-v/)
|
|
116
|
-
- Standard `step-01-init.md` (no continuation logic)
|
|
117
|
-
- Document template for progressive drift report building with `stepsCompleted` tracking
|
|
118
|
-
- SKF module variables available (forge_data_folder, skills_output_folder, sidecar_path)
|
|
119
|
-
- Config loaded from `_bmad/skf/config.yaml`
|
|
120
|
-
- Ferris Audit mode as primary agent with zero-hallucination AST citations
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Requirements
|
|
125
|
-
|
|
126
|
-
**Flow Structure:**
|
|
127
|
-
- Pattern: Linear with conditional skip (Step 04 skipped at Quick/Forge tier)
|
|
128
|
-
- Phases: Load & Baseline (01-02) → Analysis (03-04) → Assessment & Output (05-06)
|
|
129
|
-
- Estimated steps: 6 (matching spec)
|
|
130
|
-
- Step 01: init (load skill + provenance map + detect tier)
|
|
131
|
-
- Step 02: re-index (re-scan source with current tools)
|
|
132
|
-
- Step 03: structural-diff (AST comparison — Forge+ tiers)
|
|
133
|
-
- Step 04: semantic-diff (QMD comparison — Deep tier only, SKIP for Quick/Forge)
|
|
134
|
-
- Step 05: severity-classify (grade all drift items)
|
|
135
|
-
- Step 06: report (generate final drift report)
|
|
136
|
-
|
|
137
|
-
**User Interaction:**
|
|
138
|
-
- Style: Mostly autonomous with 1 confirmation gate
|
|
139
|
-
- Decision points: Gate 1 after Step 01 — confirm skill loaded, show baseline summary, offer degraded mode if provenance map missing
|
|
140
|
-
- Checkpoint frequency: Minimal — audit is deterministic analysis
|
|
141
|
-
|
|
142
|
-
**Inputs Required:**
|
|
143
|
-
- Required: Existing skill path (skills/{name}/ with SKILL.md, metadata.json)
|
|
144
|
-
- Required: Source code path (or auto-detect from provenance-map.json source_root)
|
|
145
|
-
- Prerequisites: setup-forge completed (forger-sidecar/forge-tier.yaml), skill created by create-skill (provenance-map.json in forge-data/{name}/)
|
|
146
|
-
- Optional: --batch flag for multiple skills, --continue for batch checkpoint resume, severity threshold filter
|
|
147
|
-
|
|
148
|
-
**Output Specifications:**
|
|
149
|
-
- Type: Document-producing drift report
|
|
150
|
-
- Format: Structured (required sections)
|
|
151
|
-
- Sections: Audit Summary, Structural Drift (Forge+), Semantic Drift (Deep only), Severity Classification (CRITICAL/HIGH/MEDIUM/LOW), Remediation Suggestions, Provenance
|
|
152
|
-
- Frequency: Single per skill (batch loops at workflow level)
|
|
153
|
-
- Output file: {forge_data_folder}/{skill_name}/drift-report-{timestamp}.md
|
|
154
|
-
- Pattern: Direct-to-Final (steps progressively build the report)
|
|
155
|
-
|
|
156
|
-
**Success Criteria:**
|
|
157
|
-
- All structural drift items detected with correct severity classification
|
|
158
|
-
- Every finding backed by AST file:line citations (zero hallucination)
|
|
159
|
-
- Confidence tier labels (T1/T2/T3) on all findings
|
|
160
|
-
- Graceful degradation: Quick (text diff) → Forge (AST diff) → Deep (AST + QMD)
|
|
161
|
-
- Actionable remediation suggestions per drift item
|
|
162
|
-
- Overall drift score: CLEAN / MINOR / SIGNIFICANT / CRITICAL
|
|
163
|
-
|
|
164
|
-
**Instruction Style:**
|
|
165
|
-
- Overall: Prescriptive
|
|
166
|
-
- Notes: Deterministic analysis, not creative facilitation. Matches established SKF pattern (test-skill, create-skill). Every step has exact instructions for what to load, compare, and output.
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Tools Configuration
|
|
171
|
-
|
|
172
|
-
**Core BMAD Tools:**
|
|
173
|
-
- **Party Mode:** Excluded (menu option only) — Audit is deterministic analysis, not creative exploration
|
|
174
|
-
- **Advanced Elicitation:** Excluded (menu option only) — No phases benefit from deep elicitation
|
|
175
|
-
- **Brainstorming:** Excluded — Audit produces findings, not ideas
|
|
176
|
-
|
|
177
|
-
**LLM Features:**
|
|
178
|
-
- **File I/O:** Required — All phases read skill artifacts, source code, provenance maps; report step writes drift-report.md
|
|
179
|
-
- **Sub-Processes:** Included — Batch mode parallel auditing of multiple skills (Step 01 batch loop)
|
|
180
|
-
- **Sub-Agents:** Excluded — Single-agent workflow (Ferris Audit mode)
|
|
181
|
-
- **Web-Browsing:** Excluded — All analysis is local
|
|
182
|
-
|
|
183
|
-
**Memory:**
|
|
184
|
-
- Type: Single-session (no complex memory)
|
|
185
|
-
- Tracking: stepsCompleted in drift report frontmatter
|
|
186
|
-
- Sidecar: Reads forger-sidecar/forge-tier.yaml (pre-existing from setup-forge)
|
|
187
|
-
|
|
188
|
-
**External Integrations (SKF-specific, pre-detected by setup-forge):**
|
|
189
|
-
- **ast_bridge** (ast-grep): Required at Forge/Deep tier — Steps 02-03 structural extraction and comparison
|
|
190
|
-
- **gh_bridge** (gh CLI): Required at all tiers — Steps 01-02 source file reading
|
|
191
|
-
- **qmd_bridge** (QMD): Required at Deep tier only — Step 04 semantic knowledge context
|
|
192
|
-
- **skill-check**: Included — Step 01 skill format validation: `npx skill-check check --fix --format json` for validation + auto-fix + quality scoring, security scan for prompt injection detection
|
|
193
|
-
|
|
194
|
-
**Installation Requirements:**
|
|
195
|
-
- None — all tools pre-detected by setup-forge workflow
|
|
196
|
-
- User preference: N/A (no installation needed)
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## Workflow Design
|
|
201
|
-
|
|
202
|
-
### Step Sequence
|
|
203
|
-
|
|
204
|
-
| Step | Name | Type | Menu | Subprocess | Size Est. |
|
|
205
|
-
|------|------|------|------|------------|-----------|
|
|
206
|
-
| 01 | init | Init with Input Discovery | C only (user gate) | — | ~180 lines |
|
|
207
|
-
| 02 | re-index | Middle (Simple) | Auto-proceed | Pattern 2 (per-file AST) | ~150 lines |
|
|
208
|
-
| 03 | structural-diff | Middle (Simple) | Auto-proceed | Pattern 4 (parallel diff) | ~200 lines |
|
|
209
|
-
| 04 | semantic-diff | Middle (Simple) + Conditional Skip | Auto-proceed | Pattern 3 (QMD ops) | ~150 lines |
|
|
210
|
-
| 05 | severity-classify | Middle (Simple) | Auto-proceed | Pattern 3 (rules lookup) | ~180 lines |
|
|
211
|
-
| 06 | report | Final Step | No next step | — | ~200 lines |
|
|
212
|
-
|
|
213
|
-
### Step Details
|
|
214
|
-
|
|
215
|
-
**Step 01: init**
|
|
216
|
-
- Type: Init with Input Discovery
|
|
217
|
-
- Goal: Load existing skill, provenance map, and detect forge tier
|
|
218
|
-
- Input Discovery: skill path → SKILL.md + metadata.json, provenance-map.json from forge-data, forge-tier.yaml from sidecar
|
|
219
|
-
- Creates: drift report from template with frontmatter + Audit Summary skeleton
|
|
220
|
-
- User Gate: Present baseline summary (skill name, export count, provenance age, tier, source path). Offer degraded mode if provenance map missing.
|
|
221
|
-
- Menu: [C] Continue after confirmation
|
|
222
|
-
- Batch: If --batch, loop over skill list; if --continue, check sidecar checkpoint
|
|
223
|
-
|
|
224
|
-
**Step 02: re-index**
|
|
225
|
-
- Type: Middle (Simple), Auto-proceed
|
|
226
|
-
- Goal: Re-scan source code with current tier tools
|
|
227
|
-
- Quick: text pattern extraction via gh_bridge
|
|
228
|
-
- Forge: AST extraction via ast_bridge (T1 confidence)
|
|
229
|
-
- Deep: AST + QMD temporal context (T2 confidence)
|
|
230
|
-
- Subprocess: Pattern 2 — per source file, launch subprocess for extraction, return structured findings
|
|
231
|
-
- Output: Internal state (current extraction snapshot), no report append yet
|
|
232
|
-
|
|
233
|
-
**Step 03: structural-diff**
|
|
234
|
-
- Type: Middle (Simple), Auto-proceed
|
|
235
|
-
- Goal: Compare provenance map extractions against current scan
|
|
236
|
-
- Diff categories: added exports, removed exports, changed signatures
|
|
237
|
-
- Quick: text-based name comparison (T1-low)
|
|
238
|
-
- Forge/Deep: full AST structural comparison with line-level citations (T1)
|
|
239
|
-
- Subprocess: Pattern 4 — parallel comparison of export categories
|
|
240
|
-
- Output: Appends ## Structural Drift section to drift report
|
|
241
|
-
|
|
242
|
-
**Step 04: semantic-diff**
|
|
243
|
-
- Type: Middle (Simple) with Conditional Skip, Auto-proceed
|
|
244
|
-
- Goal: Compare QMD knowledge context (Deep tier only)
|
|
245
|
-
- If Deep → execute semantic comparison via qmd_bridge
|
|
246
|
-
- If Quick/Forge → skip with note in report
|
|
247
|
-
- Subprocess: Pattern 3 — QMD collection query for semantic changes
|
|
248
|
-
- Output: Appends ## Semantic Drift section (or skip notice) to report
|
|
249
|
-
|
|
250
|
-
**Step 05: severity-classify**
|
|
251
|
-
- Type: Middle (Simple), Auto-proceed
|
|
252
|
-
- Goal: Grade every drift finding by severity
|
|
253
|
-
- Loads: data/severity-rules.md for classification criteria
|
|
254
|
-
- CRITICAL: removed/renamed exports, changed signatures (breaking)
|
|
255
|
-
- HIGH: new public API not in skill
|
|
256
|
-
- MEDIUM: implementation changes behind stable API
|
|
257
|
-
- LOW: style/convention changes
|
|
258
|
-
- Subprocess: Pattern 3 — load rules, classify findings, return assignments
|
|
259
|
-
- Output: Appends ## Severity Classification section with categorized findings table
|
|
260
|
-
|
|
261
|
-
**Step 06: report**
|
|
262
|
-
- Type: Final Step (no nextStepFile)
|
|
263
|
-
- Goal: Finalize drift report with summary, remediation, provenance
|
|
264
|
-
- Calculate overall drift score: CLEAN / MINOR / SIGNIFICANT / CRITICAL
|
|
265
|
-
- Generate remediation suggestions per drift item
|
|
266
|
-
- Add update-skill chaining recommendation if CRITICAL/HIGH found
|
|
267
|
-
- Add provenance section (comparison metadata, tools used, timestamp)
|
|
268
|
-
- Update frontmatter: mark complete, set nextWorkflow if applicable
|
|
269
|
-
|
|
270
|
-
### Data Flow
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
Step 01 → Loads skill baseline + creates report skeleton
|
|
274
|
-
Step 02 → Produces current extraction snapshot (internal)
|
|
275
|
-
Step 03 → Appends ## Structural Drift (compares baseline vs current)
|
|
276
|
-
Step 04 → Appends ## Semantic Drift (Deep) or skip notice (Quick/Forge)
|
|
277
|
-
Step 05 → Appends ## Severity Classification (grades all findings)
|
|
278
|
-
Step 06 → Completes ## Audit Summary, ## Remediation, ## Provenance
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### File Structure
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
audit-skill/
|
|
285
|
-
├── workflow.md # Entry point (Ferris Audit mode)
|
|
286
|
-
├── data/
|
|
287
|
-
│ ├── severity-rules.md # CRITICAL/HIGH/MEDIUM/LOW classification rules
|
|
288
|
-
│ └── drift-report-template.md # Structured report template with frontmatter
|
|
289
|
-
└── steps-c/
|
|
290
|
-
├── step-01-init.md # Init with input discovery + user gate
|
|
291
|
-
├── step-02-re-index.md # Re-scan source (auto-proceed)
|
|
292
|
-
├── step-03-structural-diff.md # AST comparison (auto-proceed)
|
|
293
|
-
├── step-04-semantic-diff.md # QMD comparison/skip (auto-proceed)
|
|
294
|
-
├── step-05-severity-classify.md # Grade findings (auto-proceed)
|
|
295
|
-
└── step-06-report.md # Final report generation
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
### Role and Persona
|
|
299
|
-
|
|
300
|
-
- Role: Skill auditor operating in Ferris Audit mode
|
|
301
|
-
- Communication: Structured evidence-based reporting with file:line citations
|
|
302
|
-
- Style: Prescriptive — every step has exact instructions
|
|
303
|
-
- Principle: Zero hallucination — every finding must trace to actual code
|
|
304
|
-
|
|
305
|
-
### Workflow Chaining
|
|
306
|
-
|
|
307
|
-
- Required from setup-forge: {sidecar_path}/forge-tier.yaml
|
|
308
|
-
- Required from create-skill: {forge_data_folder}/{skill_name}/provenance-map.json
|
|
309
|
-
- Output feeds: update-skill (if CRITICAL/HIGH drift found)
|
|
310
|
-
- Frontmatter contract: workflowType: 'audit-skill', nextWorkflow: 'update-skill'
|
|
311
|
-
|
|
312
|
-
### Error Handling
|
|
313
|
-
|
|
314
|
-
- Missing skill: Error with path guidance
|
|
315
|
-
- Missing provenance map: Offer degraded mode (text-diff, T1-low confidence)
|
|
316
|
-
- Missing forge-tier.yaml: Error — run setup-forge first
|
|
317
|
-
- No drift found: Report CLEAN status
|
|
318
|
-
- Step 04 at non-Deep tier: Graceful skip with documented reason
|