bmad-module-skill-forge 0.3.0 → 0.5.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 +46 -176
- package/docs/agents.md +1 -1
- package/docs/concepts.md +96 -0
- package/docs/examples.md +39 -0
- package/docs/getting-started.md +15 -1
- package/docs/{architecture.md → how-it-works.md} +106 -5
- package/docs/index.md +14 -41
- package/docs/workflows.md +1 -1
- package/package.json +2 -2
- package/src/knowledge/agentskills-spec.md +25 -0
- package/src/knowledge/manual-section-integrity.md +8 -0
- package/src/knowledge/overview.md +2 -1
- package/src/knowledge/provenance-tracking.md +13 -0
- package/src/knowledge/skf-knowledge-index.csv +3 -2
- package/src/knowledge/skill-lifecycle.md +2 -2
- package/src/knowledge/split-body-strategy.md +41 -0
- package/src/module.yaml +2 -2
- package/src/workflows/analyze-source/data/skill-brief-schema.md +2 -0
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +26 -0
- 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 +5 -4
- 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 +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +2 -0
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +14 -0
- package/src/workflows/brief-skill/data/scope-templates.md +4 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +4 -0
- package/src/workflows/brief-skill/steps-c/step-03-scope-definition.md +12 -0
- package/src/workflows/create-skill/data/compile-assembly-rules.md +43 -2
- package/src/workflows/create-skill/data/extraction-patterns-tracing.md +110 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +12 -81
- package/src/workflows/create-skill/data/skill-sections.md +31 -5
- package/src/workflows/create-skill/data/source-resolution-protocols.md +9 -1
- package/src/workflows/create-skill/data/tier-degradation-rules.md +46 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +24 -2
- package/src/workflows/create-skill/steps-c/step-05-compile.md +8 -4
- package/src/workflows/create-skill/steps-c/step-06-validate.md +12 -10
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +14 -1
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +2 -2
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +1 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-02-package.md +7 -3
- package/src/workflows/export-skill/steps-c/step-03-generate-snippet.md +3 -1
- package/src/workflows/export-skill/workflow.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +3 -2
- package/src/workflows/test-skill/data/scoring-rules.md +9 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +8 -0
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +3 -1
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +8 -5
- package/src/workflows/test-skill/steps-c/step-04b-external-validators.md +11 -1
- package/src/workflows/test-skill/steps-c/step-05-score.md +5 -4
- package/src/workflows/test-skill/steps-c/step-06-report.md +27 -0
- package/src/workflows/update-skill/data/tier-degradation-rules.md +46 -0
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +11 -0
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +1 -0
- package/src/workflows/update-skill/steps-c/step-04-merge.md +8 -0
- package/src/workflows/update-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/update-skill/steps-c/step-06-write.md +6 -1
- package/tools/cli/lib/ui.js +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Skill Forge (SKF)
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**Turn code and docs into instructions AI agents can actually follow.**
|
|
8
8
|
|
|
9
9
|
[](https://github.com/armelhbobdad/bmad-module-skill-forge/actions/workflows/quality.yaml)
|
|
10
10
|
[](https://www.npmjs.com/package/bmad-module-skill-forge)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[](https://armelhbobdad.github.io/bmad-module-skill-forge/)
|
|
14
14
|
[](https://github.com/armelhbobdad/bmad-module-skill-forge/stargazers)
|
|
15
15
|
|
|
16
|
-
*
|
|
16
|
+
*Skill Forge analyzes your code repositories, documentation, and developer discourse to build verified instruction files for AI agents. Every instruction links back to where it came from — nothing is made up.*
|
|
17
17
|
|
|
18
18
|
**If SKF helps your agent stop hallucinating, give it a ⭐ — it helps others find this tool.**
|
|
19
19
|
|
|
@@ -21,208 +21,78 @@
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## The Problem
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
You ask an AI agent to use a library. It invents function names that don't exist. It guesses parameter types. You paste documentation into the context — it still gets details wrong. You write instructions by hand — they go stale the moment the code changes.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
- Progressive capability model that meets developers where they are
|
|
30
|
-
- Full lifecycle: discover, brief, compile, test, audit, update, export
|
|
31
|
-
- Version-pinned skills that track source changes and detect drift
|
|
32
|
-
- Zero hallucination tolerance — every instruction traces to code
|
|
28
|
+
This isn't an edge case. It's the default experience.
|
|
33
29
|
|
|
34
|
-
## How
|
|
30
|
+
## How Skill Forge Fixes This
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
1. **Analyzes your sources** — extracts real function signatures, types, and patterns from code repositories, documentation websites, and developer discourse
|
|
33
|
+
2. **Compiles verified instruction files** — every instruction links to the exact file and line it came from
|
|
34
|
+
3. **Follows an open standard** — skills comply with the [agentskills.io](https://agentskills.io) spec and work across Claude, Cursor, Copilot, and other AI agents
|
|
37
35
|
|
|
38
|
-
##
|
|
36
|
+
## Before vs After
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
**Without SKF** — your agent guesses:
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
```python
|
|
41
|
+
import cognee
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### Building Blocks
|
|
47
|
-
|
|
48
|
-
Each workflow directory contains these files, and each has a specific job:
|
|
49
|
-
|
|
50
|
-
| File | What it does | When it loads |
|
|
51
|
-
|---------------------------|---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|
|
|
52
|
-
| `forger.agent.yaml` | Expert persona — identity, principles, critical actions, menu of triggers | First — always in context |
|
|
53
|
-
| `workflow.md` | Human-readable entry point — goals, mode menu (Create/Edit/Validate), routes to first step | Second — presents mode choice |
|
|
54
|
-
| `steps-c/*.md` | **Create** steps — primary execution, 4-9 sequential files | One at a time (just-in-time) |
|
|
55
|
-
| `data/*.md` | Workflow-specific reference data — schemas, heuristics, rules, patterns | Read by steps on demand |
|
|
56
|
-
| `templates/*.md` | Output skeletons with placeholder vars — steps fill these in to produce the final artifact | Read by steps when generating output |
|
|
57
|
-
| `skf-knowledge-index.csv` | Knowledge fragment index — id, name, tags, tier, file path | Read by steps to decide which fragments to load |
|
|
58
|
-
| `knowledge/*.md` | 10 reusable fragments — cross-cutting principles and patterns (e.g., `zero-hallucination.md`, `confidence-tiers.md`) | Selectively read into context when a step directs |
|
|
59
|
-
|
|
60
|
-
```mermaid
|
|
61
|
-
flowchart LR
|
|
62
|
-
U[User] --> A[Agent Persona]
|
|
63
|
-
A --> W[Workflow Entry: workflow.md]
|
|
64
|
-
W --> S[Step Files: steps-c/]
|
|
65
|
-
S --> K[Knowledge Fragments<br/>skf-knowledge-index.csv → knowledge/*.md]
|
|
66
|
-
S --> D[Data & Templates<br/>data/*.md, templates/*.md]
|
|
67
|
-
S --> O[Outputs: skills/reports<br/>when a step writes output]
|
|
43
|
+
# Agent hallucinates: sync call, wrong parameter name, missing await
|
|
44
|
+
results = cognee.search("What does Cognee do?", mode="graph")
|
|
68
45
|
```
|
|
69
46
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
1. **Trigger** — User types `@Ferris CS` (or fuzzy match like `create-skill`). The agent menu in `forger.agent.yaml` maps the trigger to the workflow path.
|
|
73
|
-
2. **Agent loads** — `forger.agent.yaml` injects the persona (identity, principles, critical actions) into the context window. Sidecar files (`forge-tier.yaml`, `preferences.yaml`) are loaded for persistent state.
|
|
74
|
-
3. **Workflow loads** — `workflow.md` presents the mode choice and routes to the first step file.
|
|
75
|
-
4. **Step-by-step execution** — Only the current step file is in context (just-in-time loading). Each step explicitly names the next one. The LLM reads, executes, saves output, then loads the next step. No future steps are ever preloaded.
|
|
76
|
-
5. **Knowledge injection** — Steps consult `skf-knowledge-index.csv` and selectively load fragments from `knowledge/` by tags and relevance. Cross-cutting principles (zero hallucination, confidence tiers, provenance) are loaded only when a step directs — not preloaded.
|
|
77
|
-
6. **Data injection** — Steps read `data/*.md` files as needed (schemas, heuristics, extraction patterns). This is deliberate context engineering: only the data relevant to the current step enters the context window.
|
|
78
|
-
7. **Templates** — When a step produces output (e.g., a skill brief or test report), it reads the template file and fills in placeholders with computed results. The template provides consistent structure; the step provides the content.
|
|
79
|
-
8. **Progress tracking** — Each step appends to an output file with state tracking. Resume mode reads this state and routes to the next incomplete step.
|
|
47
|
+
**With SKF** — your agent reads the verified skill:
|
|
80
48
|
|
|
81
|
-
|
|
49
|
+
```python
|
|
50
|
+
import cognee
|
|
82
51
|
|
|
83
|
-
|
|
52
|
+
# Agent follows the skill instruction:
|
|
53
|
+
# `search(query_text: str, query_type: SearchType = GRAPH_COMPLETION) -> List[SearchResult]`
|
|
54
|
+
# [AST:cognee/api/v1/search/search.py:L26]
|
|
55
|
+
results = await cognee.search(
|
|
56
|
+
query_text="What does Cognee do?",
|
|
57
|
+
query_type=cognee.SearchType.GRAPH_COMPLETION
|
|
58
|
+
)
|
|
59
|
+
```
|
|
84
60
|
|
|
85
|
-
|
|
86
|
-
|---------------|--------------------|-------------------------------------------------------------|
|
|
87
|
-
| **Architect** | SF, AN, BS, CS, QS, SS | Exploratory, assembling — discovers structure and scope |
|
|
88
|
-
| **Surgeon** | US | Precise, preserving — extracts and compiles with provenance |
|
|
89
|
-
| **Audit** | AS, TS | Judgmental, scoring — evaluates quality and detects drift |
|
|
90
|
-
| **Delivery** | EX | Packaging, ecosystem-ready — bundles for distribution |
|
|
61
|
+
The skill told the agent the real function name, the real parameters, and that the call requires `await` — all traced to the exact source line. This is from a [real generated skill](https://github.com/armelhbobdad/oh-my-skills).
|
|
91
62
|
|
|
92
63
|
## Install
|
|
93
64
|
|
|
94
65
|
Requires [Node.js](https://nodejs.org/) >= 22.
|
|
95
66
|
|
|
96
|
-
There are three ways to install SKF, depending on your setup.
|
|
97
|
-
|
|
98
|
-
### Method 1: Standalone (recommended for trying SKF)
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
npx bmad-module-skill-forge install
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Installs SKF on its own. You'll be prompted for project name, output folders, and which IDEs to configure. The installer generates IDE-specific command files (e.g. `.claude/commands/`, `.cursor/commands/`) so workflows appear in your IDE's command palette.
|
|
105
|
-
|
|
106
|
-
### Method 2: As a custom module during BMad Method installation
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npx bmad-method install
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
When prompted **"Add custom modules from your computer?"**, select Yes and provide the path to the SKF `src/` folder (clone this repo first):
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
Path to custom module folder: /path/to/bmad-module-skill-forge/src/
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
This installs BMad core + SKF together with full IDE integration, manifests, and help catalog. Best when you want the complete BMad development workflow.
|
|
119
|
-
|
|
120
|
-
### Method 3: Add SKF to an existing BMad project
|
|
121
|
-
|
|
122
|
-
If you already have BMad installed, you can add SKF afterward by running the standalone installer in the same directory:
|
|
123
|
-
|
|
124
67
|
```bash
|
|
125
68
|
npx bmad-module-skill-forge install
|
|
126
69
|
```
|
|
127
70
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
## Quickstart
|
|
131
|
-
|
|
132
|
-
1. **Setup your forge:** `@Ferris SF` — detects tools, sets your tier (Quick/Forge/Deep)
|
|
133
|
-
2. **Quick skill (fastest):** `@Ferris QS <package-name>` — fast skill from a package name
|
|
134
|
-
3. **Full skill:** `@Ferris BS` then `@Ferris CS` — brief then compile for maximum quality
|
|
135
|
-
4. **Stack skill:** `@Ferris SS` — consolidated project stack skill with integration patterns
|
|
136
|
-
5. **Export:** `@Ferris EX` — package for distribution, update CLAUDE.md
|
|
137
|
-
|
|
138
|
-
## Workflows
|
|
139
|
-
|
|
140
|
-
| Trigger | Command | Purpose |
|
|
141
|
-
| --- | --- | --- |
|
|
142
|
-
| SF | `skf_setup_forge` | Initialize forge environment, detect tools, set tier |
|
|
143
|
-
| AN | `skf_analyze_source` | Discover what to skill in a large repo |
|
|
144
|
-
| BS | `skf_brief_skill` | Design a skill scope through guided discovery |
|
|
145
|
-
| CS | `skf_create_skill` | Compile a skill from brief (supports --batch) |
|
|
146
|
-
| QS | `skf_quick_skill` | Fast skill from package name or GitHub URL |
|
|
147
|
-
| SS | `skf_create_stack_skill` | Consolidated project stack skill with integration patterns |
|
|
148
|
-
| US | `skf_update_skill` | Smart regeneration preserving \[MANUAL\] sections |
|
|
149
|
-
| AS | `skf_audit_skill` | Drift detection between skill and current source |
|
|
150
|
-
| TS | `skf_test_skill` | Cognitive completeness verification — quality gate before export |
|
|
151
|
-
| EX | `skf_export_skill` | Package for distribution, inject into CLAUDE.md/AGENTS.md |
|
|
152
|
-
|
|
153
|
-
## Progressive Capability Model
|
|
154
|
-
|
|
155
|
-
| Tier | Tools | Capability |
|
|
156
|
-
| --- | --- | --- |
|
|
157
|
-
| **Quick** | gh + skill-check + tessl | Source reading + spec validation + content quality review |
|
|
158
|
-
| **Forge** | + ast-grep | Structural truth, T1 confidence |
|
|
159
|
-
| **Deep** | + QMD | Knowledge search, temporal provenance |
|
|
160
|
-
|
|
161
|
-
The `setup-forge` workflow detects available tools and writes the tier to `forge-tier.yaml`. All subsequent workflows adapt their behavior to the detected tier.
|
|
162
|
-
|
|
163
|
-
> **Recommended:** If your IDE supports MCP servers, install the [ast-grep MCP server](https://github.com/ast-grep/ast-grep-mcp) alongside the CLI. SKF's extraction protocol prefers the MCP tool for compact, memory-efficient AST queries and falls back to CLI streaming for large codebases.
|
|
71
|
+
You'll be prompted for project name, output folders, and IDE configuration. See the [docs](https://armelhbobdad.github.io/bmad-module-skill-forge/getting-started/) for other install methods.
|
|
164
72
|
|
|
165
|
-
|
|
73
|
+
## Quick Start
|
|
166
74
|
|
|
167
|
-
|
|
75
|
+
1. **Set up your environment:** `@Ferris SF` — detects your tools and sets your capability tier
|
|
76
|
+
2. **Generate your first skill:** `@Ferris QS <package-name>` — creates a verified skill in under a minute
|
|
77
|
+
3. **Full quality path:** `@Ferris BS` then `@Ferris CS` — brief first, then compile for maximum accuracy
|
|
168
78
|
|
|
169
|
-
|
|
170
|
-
2. Copy your API token from Account Settings
|
|
171
|
-
3. Add to your environment: `export SNYK_TOKEN=your-token`
|
|
172
|
-
4. Re-run `@Ferris SF` to detect the token
|
|
79
|
+
See the [workflows docs](https://armelhbobdad.github.io/bmad-module-skill-forge/workflows/) for all 10 available workflows.
|
|
173
80
|
|
|
174
|
-
|
|
81
|
+
## Who Is This For?
|
|
175
82
|
|
|
176
|
-
|
|
83
|
+
- **You use AI agents to write code** and they keep getting API calls wrong — hallucinating function names, guessing parameter types, inventing methods that don't exist
|
|
84
|
+
- **You maintain a library** and want to ship official, verified instruction files so AI agents use your API correctly
|
|
85
|
+
- **You manage a codebase with many dependencies** and want a consolidated "stack skill" that teaches your agent how all the pieces fit together
|
|
86
|
+
- **You use a SaaS API or closed-source tool** with no public code — SKF can generate skills from documentation alone
|
|
177
87
|
|
|
178
|
-
##
|
|
88
|
+
## Learn More
|
|
179
89
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
## Configuration
|
|
188
|
-
|
|
189
|
-
SKF variables are defined in `src/module.yaml` and prompted during install:
|
|
190
|
-
|
|
191
|
-
| Variable | Purpose | Default |
|
|
192
|
-
|------------------------|------------------------------------------------------------------------------------------------------|-----------------------------|
|
|
193
|
-
| `skills_output_folder` | Where generated skills are saved | `{project-root}/skills` |
|
|
194
|
-
| `forge_data_folder` | Where workspace artifacts are stored | `{project-root}/forge-data` |
|
|
195
|
-
| `tier_override` | Force a specific tier for comparison or testing (in `_bmad/_memory/forger-sidecar/preferences.yaml`) | `~` (auto-detect) |
|
|
196
|
-
|
|
197
|
-
Runtime configuration (tool detection, tier, parallel settings) is managed by the `setup-forge` workflow in `forge-tier.yaml`.
|
|
198
|
-
|
|
199
|
-
## Module Structure
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
src/
|
|
203
|
-
├── module.yaml
|
|
204
|
-
├── module-help.csv
|
|
205
|
-
├── agents/
|
|
206
|
-
│ └── forger.agent.yaml
|
|
207
|
-
├── forger/
|
|
208
|
-
│ ├── forge-tier.yaml
|
|
209
|
-
│ ├── preferences.yaml
|
|
210
|
-
│ └── README.md
|
|
211
|
-
├── knowledge/
|
|
212
|
-
│ ├── skf-knowledge-index.csv
|
|
213
|
-
│ └── *.md (10 fragments)
|
|
214
|
-
└── workflows/
|
|
215
|
-
├── setup-forge/
|
|
216
|
-
├── analyze-source/
|
|
217
|
-
├── brief-skill/
|
|
218
|
-
├── create-skill/
|
|
219
|
-
├── quick-skill/
|
|
220
|
-
├── create-stack-skill/
|
|
221
|
-
├── update-skill/
|
|
222
|
-
├── audit-skill/
|
|
223
|
-
├── test-skill/
|
|
224
|
-
└── export-skill/
|
|
225
|
-
```
|
|
90
|
+
- **[Getting Started](https://armelhbobdad.github.io/bmad-module-skill-forge/getting-started/)** — Installation, prerequisites, and your first skill
|
|
91
|
+
- **[Concepts](https://armelhbobdad.github.io/bmad-module-skill-forge/concepts/)** — Plain-English definitions of all key terms
|
|
92
|
+
- **[How It Works](https://armelhbobdad.github.io/bmad-module-skill-forge/how-it-works/)** — Architecture, capability tiers, output format, and design decisions
|
|
93
|
+
- **[Workflows](https://armelhbobdad.github.io/bmad-module-skill-forge/workflows/)** — All 10 workflows with commands and connection diagrams
|
|
94
|
+
- **[Agents](https://armelhbobdad.github.io/bmad-module-skill-forge/agents/)** — Ferris: the AI agent that runs all SKF workflows
|
|
95
|
+
- **[Examples](https://armelhbobdad.github.io/bmad-module-skill-forge/examples/)** — Real-world scenarios, tips, and troubleshooting
|
|
226
96
|
|
|
227
97
|
## Acknowledgements
|
|
228
98
|
|
|
@@ -242,7 +112,7 @@ SKF builds on these excellent open-source tools:
|
|
|
242
112
|
|
|
243
113
|
## Contributing
|
|
244
114
|
|
|
245
|
-
See [
|
|
115
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
246
116
|
|
|
247
117
|
## License
|
|
248
118
|
|
package/docs/agents.md
CHANGED
|
@@ -5,7 +5,7 @@ description: Ferris agent reference — modes, capabilities, menu, and communica
|
|
|
5
5
|
|
|
6
6
|
# Agents Reference
|
|
7
7
|
|
|
8
|
-
SKF
|
|
8
|
+
Ferris is the AI agent that runs all SKF workflows. You always interact with Ferris — he switches modes based on which workflow you invoke.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
package/docs/concepts.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Concepts
|
|
3
|
+
description: Plain-English definitions of key Skill Forge terms — agent skills, provenance, confidence tiers, drift, and more
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Concepts
|
|
7
|
+
|
|
8
|
+
This page defines the key terms you'll encounter in Skill Forge. Each one is explained in plain English with a concrete example.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Agent Skills
|
|
13
|
+
|
|
14
|
+
An agent skill is an instruction file that tells an AI agent how to use your code. Instead of the agent guessing your API from its training data, it reads the skill and gets real function names, real parameter types, and real usage patterns.
|
|
15
|
+
|
|
16
|
+
Skills follow the [agentskills.io](https://agentskills.io) open standard, so they work across Claude, Cursor, Copilot, and other AI tools.
|
|
17
|
+
|
|
18
|
+
**Example:** A skill for `better-auth` tells your agent: "The function is `authClient.signIn.email()`, it takes `{ email: string, password: string }`, and it returns a `Promise<Session>`. Here's the source: `src/client.ts:L47`."
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Provenance
|
|
23
|
+
|
|
24
|
+
Provenance means every instruction in a skill traces back to where it came from. For code, that's a file and line number. For documentation, it's a URL. For developer discourse, it's an issue or PR reference. If SKF can't point to a source, it doesn't include the instruction.
|
|
25
|
+
|
|
26
|
+
**Examples** (from a [real generated skill](https://github.com/armelhbobdad/oh-my-skills)):
|
|
27
|
+
- `[AST:cognee/api/v1/search/search.py:L26]` — extracted from source code via AST parsing
|
|
28
|
+
- `[SRC:cognee/api/v1/session/__init__.py:L8]` — read from source code without AST verification
|
|
29
|
+
- `[EXT:docs.cognee.ai/getting-started/quickstart]` — sourced from external documentation
|
|
30
|
+
- `[QMD:cognee-temporal:issues.md]` — surfaced from indexed developer discourse
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Confidence Tiers (T1/T2/T3)
|
|
35
|
+
|
|
36
|
+
Each piece of information in a skill carries a confidence level based on where it came from:
|
|
37
|
+
|
|
38
|
+
- **T1 — AST extraction:** Pulled directly from source code via AST parsing. This is structural truth — the function signature actually exists in the code right now.
|
|
39
|
+
- **T2 — Evidence:** Found in issues, PRs, changelogs, or documentation within the repository. Reliable context, but not as definitive as code.
|
|
40
|
+
- **T3 — External:** Pulled from external documentation or websites. Treated with caution and clearly marked.
|
|
41
|
+
|
|
42
|
+
**Example:** A function signature is T1. A deprecation warning from a closed GitHub issue is T2. A usage example from a blog post is T3.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Capability Tiers (Quick/Forge/Deep)
|
|
47
|
+
|
|
48
|
+
Your capability tier depends on which tools you have installed. Each tier builds on the previous one:
|
|
49
|
+
|
|
50
|
+
- **Quick** — GitHub CLI only. SKF reads source files and builds best-effort skills. Works in under a minute.
|
|
51
|
+
- **Forge** — Adds [ast-grep](https://ast-grep.github.io). SKF uses AST parsing for structural truth. Instructions are verified against the actual code structure.
|
|
52
|
+
- **Deep** — Adds [QMD](https://github.com/tobi/qmd). SKF indexes knowledge for semantic search. Skills get enriched with historical context, deprecation warnings, and cross-reference intelligence.
|
|
53
|
+
|
|
54
|
+
You don't need all tools to start. SKF detects what you have and sets your tier automatically. See [How It Works](../how-it-works.md) for the full technical treatment.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Drift
|
|
59
|
+
|
|
60
|
+
Drift happens when the source code changes but the skill instructions haven't been updated to match. A skill might still reference a function that was renamed, removed, or had its signature changed.
|
|
61
|
+
|
|
62
|
+
SKF detects drift by comparing the skill's recorded provenance against the current code. The `audit-skill` workflow (`@Ferris AS`) scans for these mismatches.
|
|
63
|
+
|
|
64
|
+
**Example:** Your skill says `createUser(name: string)` but the function was renamed to `registerUser(name: string, email: string)` in the last release. That's drift.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Version Pinning
|
|
69
|
+
|
|
70
|
+
Every skill records the exact version (or commit) of the source code it was built from. This means you always know which version of the library the instructions apply to.
|
|
71
|
+
|
|
72
|
+
When the source updates, you can re-run `@Ferris US` (update-skill) to regenerate the skill for the new version while preserving any manual additions you've made.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## BMAD Module
|
|
77
|
+
|
|
78
|
+
SKF is a plugin (called a "module") for the [BMad Method](https://github.com/bmad-code-org/BMAD-METHOD), a framework for running structured AI workflows. BMad provides the workflow engine — step-by-step execution, shared knowledge bases, and consistent outputs. SKF plugs into that engine and focuses specifically on skill compilation.
|
|
79
|
+
|
|
80
|
+
You don't need to know BMad to use SKF. The standalone installer sets everything up.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Ferris
|
|
85
|
+
|
|
86
|
+
Ferris is the AI agent persona that runs all SKF workflows. When you type `@Ferris CS`, you're telling Ferris to run the create-skill workflow.
|
|
87
|
+
|
|
88
|
+
Ferris switches between four modes depending on which workflow is active: Architect (exploring and building), Surgeon (precise updates), Audit (quality checks), and Delivery (packaging for distribution).
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Zero Hallucination
|
|
93
|
+
|
|
94
|
+
SKF's core principle: if an instruction can't be traced back to actual source code, it doesn't get included in the skill. This is the opposite of how most AI tools work — they generate plausible-sounding content from training data. SKF only includes what it can verify.
|
|
95
|
+
|
|
96
|
+
This doesn't mean skills are perfect. Quick-tier skills read source files without AST verification, so they rely on best-effort extraction. But even Quick skills cite their sources, and no tier includes invented information.
|
package/docs/examples.md
CHANGED
|
@@ -9,6 +9,45 @@ This section provides practical examples for using SKF: Skill Forge.
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## What the Output Looks Like
|
|
13
|
+
|
|
14
|
+
When SKF generates a skill, you get a `SKILL.md` file with machine-readable frontmatter and provenance-backed instructions. Here's a trimmed example from a real skill generated for [cognee](https://github.com/topoteretes/cognee) (browse the full output at [oh-my-skills](https://github.com/armelhbobdad/oh-my-skills)):
|
|
15
|
+
|
|
16
|
+
**Frontmatter (tells AI agents when to load this skill):**
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
name: cognee
|
|
20
|
+
description: Use when cognee is a Python AI memory engine that transforms
|
|
21
|
+
documents into knowledge graphs with vector and graph storage for semantic
|
|
22
|
+
search and reasoning. Use this skill when writing code that calls cognee's
|
|
23
|
+
Python API (add, cognify, search, memify, config, datasets, prune, session).
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Body (what your AI agent reads):**
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
## Key API Summary
|
|
30
|
+
|
|
31
|
+
| Function | Purpose | Key Params | Source |
|
|
32
|
+
|----------|---------|------------|--------|
|
|
33
|
+
| add() | Ingest text, files, binary data | data, dataset_name | [AST:cognee/api/v1/add/add.py:L22] |
|
|
34
|
+
| cognify() | Build knowledge graph | datasets, graph_model | [AST:cognee/api/v1/cognify/cognify.py:L47] |
|
|
35
|
+
| search() | Query knowledge graph | query_text, query_type | [AST:cognee/api/v1/search/search.py:L26] |
|
|
36
|
+
| memify() | Enrich graph with custom tasks | extraction_tasks, data | [AST:cognee/modules/memify/memify.py:L27] |
|
|
37
|
+
| session.* | Session history and feedback | get_session(), add_feedback() | [SRC:cognee/api/v1/session/__init__.py:L8] |
|
|
38
|
+
| DataPoint | Base class for custom graph nodes | inherit and add fields | [EXT:docs.cognee.ai/guides/custom-data-models] |
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Provenance tags trace each instruction to its source:
|
|
42
|
+
- `[AST:file:line]` — extracted from code via AST parsing (highest confidence)
|
|
43
|
+
- `[SRC:file:line]` — read from source code without AST verification
|
|
44
|
+
- `[EXT:url]` — sourced from external documentation
|
|
45
|
+
- `[QMD:collection:doc]` — surfaced from indexed developer discourse (issues, PRs, changelogs)
|
|
46
|
+
|
|
47
|
+
See [How It Works](../how-it-works.md) for the full output structure.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
12
51
|
## Example Workflows
|
|
13
52
|
|
|
14
53
|
### Quick Skill — 47 Seconds
|
package/docs/getting-started.md
CHANGED
|
@@ -11,7 +11,7 @@ Welcome to Skill Forge! This guide will help you get up and running.
|
|
|
11
11
|
|
|
12
12
|
## What This Module Does
|
|
13
13
|
|
|
14
|
-
Skill Forge
|
|
14
|
+
Skill Forge analyzes code repositories, documentation websites, and developer discourse to build verified instruction files ("skills") for AI agents. Instead of your agent guessing API calls from training data, it follows instructions where every function, type, and pattern traces back to its source — a file and line for code, a URL for documentation, an issue or PR for discourse. Skills comply with the [agentskills.io](https://agentskills.io) open standard and work across Claude, Cursor, Copilot, and other AI tools. See the [Concepts](../concepts.md) page for definitions of key terms.
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
@@ -68,6 +68,20 @@ Don't worry if you don't have all tools — SKF detects what's available and set
|
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
71
|
+
## Configuration
|
|
72
|
+
|
|
73
|
+
SKF has two install-time variables (defined in `src/module.yaml`) and one runtime preference:
|
|
74
|
+
|
|
75
|
+
| Variable | Purpose | Default |
|
|
76
|
+
|------------------------|------------------------------------------------------------------------------------------------------|-----------------------------|
|
|
77
|
+
| `skills_output_folder` | Where generated skills are saved | `{project-root}/skills` |
|
|
78
|
+
| `forge_data_folder` | Where workspace artifacts are stored | `{project-root}/forge-data` |
|
|
79
|
+
| `tier_override` | Force a specific tier for comparison or testing (in `_bmad/_memory/forger-sidecar/preferences.yaml`) | `~` (auto-detect) |
|
|
80
|
+
|
|
81
|
+
Runtime configuration (tool detection, tier, parallel settings) is managed by the `setup-forge` workflow in `forge-tier.yaml`.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
71
85
|
## First Steps
|
|
72
86
|
|
|
73
87
|
### 1. Setup Your Forge
|
|
@@ -1,11 +1,73 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description: How Skill Forge works — output format, confidence model, progressive tiers, tool ecosystem
|
|
2
|
+
title: How It Works
|
|
3
|
+
description: How Skill Forge works — the BMad framework, architecture, output format, confidence model, progressive tiers, and tool ecosystem
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# How It Works
|
|
7
7
|
|
|
8
|
-
This page
|
|
8
|
+
This page is for people who want to understand how SKF works under the hood. It covers the BMad framework, workflow architecture, capability tiers, output format, tool ecosystem, and key design decisions. For plain-English definitions of key terms, see [Concepts](../concepts.md).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## How BMad Works
|
|
13
|
+
|
|
14
|
+
BMad works because it turns big, fuzzy work into **repeatable workflows**. Each workflow is broken into small steps with clear instructions, so the AI follows the same path every time. It also uses a **shared knowledge base** (standards and patterns) so outputs are consistent, not random. In short: **structured steps + shared standards = reliable results**.
|
|
15
|
+
|
|
16
|
+
## How SKF Fits In
|
|
17
|
+
|
|
18
|
+
SKF plugs into BMad the same way a specialist plugs into a team. It uses the same step-by-step workflow engine and shared standards, but focuses exclusively on skill compilation and quality assurance. That means you get **evidence-based agent skills**, **AST-verified instructions**, and **drift detection** that align with the rest of the BMad process.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Architecture & Flow
|
|
23
|
+
|
|
24
|
+
BMad is a small **agent + workflow engine**. There is no external orchestrator — everything runs inside the LLM context window through structured instructions.
|
|
25
|
+
|
|
26
|
+
### Building Blocks
|
|
27
|
+
|
|
28
|
+
Each workflow directory contains these files, and each has a specific job:
|
|
29
|
+
|
|
30
|
+
| File | What it does | When it loads |
|
|
31
|
+
|---------------------------|---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|
|
|
32
|
+
| `forger.agent.yaml` | Expert persona — identity, principles, critical actions, menu of triggers | First — always in context |
|
|
33
|
+
| `workflow.md` | Human-readable entry point — goals, mode menu (Create/Edit/Validate), routes to first step | Second — presents mode choice |
|
|
34
|
+
| `steps-c/*.md` | **Create** steps — primary execution, 4-9 sequential files | One at a time (just-in-time) |
|
|
35
|
+
| `data/*.md` | Workflow-specific reference data — schemas, heuristics, rules, patterns | Read by steps on demand |
|
|
36
|
+
| `templates/*.md` | Output skeletons with placeholder vars — steps fill these in to produce the final artifact | Read by steps when generating output |
|
|
37
|
+
| `skf-knowledge-index.csv` | Knowledge fragment index — id, name, tags, tier, file path | Read by steps to decide which fragments to load |
|
|
38
|
+
| `knowledge/*.md` | 10 reusable fragments — cross-cutting principles and patterns (e.g., `zero-hallucination.md`, `confidence-tiers.md`) | Selectively read into context when a step directs |
|
|
39
|
+
|
|
40
|
+
```mermaid
|
|
41
|
+
flowchart LR
|
|
42
|
+
U[User] --> A[Agent Persona]
|
|
43
|
+
A --> W[Workflow Entry: workflow.md]
|
|
44
|
+
W --> S[Step Files: steps-c/]
|
|
45
|
+
S --> K[Knowledge Fragments<br/>skf-knowledge-index.csv → knowledge/*.md]
|
|
46
|
+
S --> D[Data & Templates<br/>data/*.md, templates/*.md]
|
|
47
|
+
S --> O[Outputs: skills/reports<br/>when a step writes output]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### How It Works at Runtime
|
|
51
|
+
|
|
52
|
+
1. **Trigger** — User types `@Ferris CS` (or fuzzy match like `create-skill`). The agent menu in `forger.agent.yaml` maps the trigger to the workflow path.
|
|
53
|
+
2. **Agent loads** — `forger.agent.yaml` injects the persona (identity, principles, critical actions) into the context window. Sidecar files (`forge-tier.yaml`, `preferences.yaml`) are loaded for persistent state.
|
|
54
|
+
3. **Workflow loads** — `workflow.md` presents the mode choice and routes to the first step file.
|
|
55
|
+
4. **Step-by-step execution** — Only the current step file is in context (just-in-time loading). Each step explicitly names the next one. The LLM reads, executes, saves output, then loads the next step. No future steps are ever preloaded.
|
|
56
|
+
5. **Knowledge injection** — Steps consult `skf-knowledge-index.csv` and selectively load fragments from `knowledge/` by tags and relevance. Cross-cutting principles (zero hallucination, confidence tiers, provenance) are loaded only when a step directs — not preloaded.
|
|
57
|
+
6. **Data injection** — Steps read `data/*.md` files as needed (schemas, heuristics, extraction patterns). This is deliberate context engineering: only the data relevant to the current step enters the context window.
|
|
58
|
+
7. **Templates** — When a step produces output (e.g., a skill brief or test report), it reads the template file and fills in placeholders with computed results. The template provides consistent structure; the step provides the content.
|
|
59
|
+
8. **Progress tracking** — Each step appends to an output file with state tracking. Resume mode reads this state and routes to the next incomplete step.
|
|
60
|
+
|
|
61
|
+
### Ferris Operating Modes
|
|
62
|
+
|
|
63
|
+
Ferris operates in four workflow-driven modes (mode is determined by which workflow is running, not conversation state):
|
|
64
|
+
|
|
65
|
+
| Mode | Workflows | Behavior |
|
|
66
|
+
|---------------|--------------------|-------------------------------------------------------------|
|
|
67
|
+
| **Architect** | SF, AN, BS, CS, QS, SS | Exploratory, assembling — discovers structure and scope |
|
|
68
|
+
| **Surgeon** | US | Precise, preserving — extracts and compiles with provenance |
|
|
69
|
+
| **Audit** | AS, TS | Judgmental, scoring — evaluates quality and detects drift |
|
|
70
|
+
| **Delivery** | EX | Packaging, ecosystem-ready — bundles for distribution |
|
|
9
71
|
|
|
10
72
|
---
|
|
11
73
|
|
|
@@ -22,7 +84,7 @@ AI agents hallucinate APIs. Not sometimes — constantly. The table below shows
|
|
|
22
84
|
| Copilot/Cursor built-in | Convenient | Generic. Doesn't know YOUR integration patterns. |
|
|
23
85
|
| **Skill Forge** | **Structural truth + automation** | **Rigid. (Feature, not bug.)** |
|
|
24
86
|
|
|
25
|
-
SKF solves this by mechanically extracting function signatures, type definitions, and usage patterns from
|
|
87
|
+
SKF solves this by mechanically extracting function signatures, type definitions, and usage patterns from code repositories — and enriching them with documentation and developer discourse — then compiling everything into verifiable, version-pinned skills that comply with the [agentskills.io specification](https://agentskills.io/specification).
|
|
26
88
|
|
|
27
89
|
---
|
|
28
90
|
|
|
@@ -311,6 +373,45 @@ Provenance maps enable verification: an `official` skill's provenance must trace
|
|
|
311
373
|
|
|
312
374
|
---
|
|
313
375
|
|
|
376
|
+
## Knowledge Base
|
|
377
|
+
|
|
378
|
+
SKF relies on a curated skill compilation knowledge base:
|
|
379
|
+
|
|
380
|
+
- Index: `src/knowledge/skf-knowledge-index.csv`
|
|
381
|
+
- Fragments: `src/knowledge/`
|
|
382
|
+
|
|
383
|
+
Workflows load only the fragments required for the current task to stay focused and compliant.
|
|
384
|
+
|
|
385
|
+
## Module Structure
|
|
386
|
+
|
|
387
|
+
```
|
|
388
|
+
src/
|
|
389
|
+
├── module.yaml
|
|
390
|
+
├── module-help.csv
|
|
391
|
+
├── agents/
|
|
392
|
+
│ └── forger.agent.yaml
|
|
393
|
+
├── forger/
|
|
394
|
+
│ ├── forge-tier.yaml
|
|
395
|
+
│ ├── preferences.yaml
|
|
396
|
+
│ └── README.md
|
|
397
|
+
├── knowledge/
|
|
398
|
+
│ ├── skf-knowledge-index.csv
|
|
399
|
+
│ └── *.md (10 fragments)
|
|
400
|
+
└── workflows/
|
|
401
|
+
├── setup-forge/
|
|
402
|
+
├── analyze-source/
|
|
403
|
+
├── brief-skill/
|
|
404
|
+
├── create-skill/
|
|
405
|
+
├── quick-skill/
|
|
406
|
+
├── create-stack-skill/
|
|
407
|
+
├── update-skill/
|
|
408
|
+
├── audit-skill/
|
|
409
|
+
├── test-skill/
|
|
410
|
+
└── export-skill/
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
314
415
|
## Security
|
|
315
416
|
|
|
316
417
|
- All tool wrappers use array-style subprocess execution — no shell interpolation
|