mindforge-cc 2.0.0-alpha.9 → 2.0.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/.agent/CLAUDE.md +26 -0
- package/.agent/mindforge/execute-phase.md +23 -0
- package/.agent/mindforge/install-skill.md +20 -11
- package/.agent/mindforge/learn.md +142 -0
- package/.agent/mindforge/marketplace.md +120 -0
- package/.agent/mindforge/new-runtime.md +19 -0
- package/.agent/mindforge/remember.md +16 -4
- package/.claude/CLAUDE.md +26 -0
- package/.claude/commands/mindforge/execute-phase.md +23 -0
- package/.claude/commands/mindforge/learn.md +142 -0
- package/.claude/commands/mindforge/marketplace.md +120 -0
- package/.claude/commands/mindforge/new-runtime.md +19 -0
- package/.mindforge/distribution/marketplace.md +53 -0
- package/.mindforge/org/skills/MANIFEST.md +1 -0
- package/.mindforge/production/production-checklist.md +34 -123
- package/.mindforge/skills-builder/auto-capture-protocol.md +88 -0
- package/.mindforge/skills-builder/learn-protocol.md +161 -0
- package/.mindforge/skills-builder/quality-scoring.md +120 -0
- package/.planning/AUDIT.jsonl +1 -0
- package/.planning/decisions/ADR-036-learn-command-docs-as-skill-source.md +26 -0
- package/.planning/decisions/ADR-037-auto-capture-frequency-threshold.md +26 -0
- package/.planning/decisions/ADR-038-skill-quality-minimum-60.md +27 -0
- package/CHANGELOG.md +52 -0
- package/MINDFORGE.md +9 -0
- package/README.md +42 -5
- package/bin/autonomous/auto-runner.js +12 -0
- package/bin/install.js +8 -2
- package/bin/installer-core.js +130 -26
- package/bin/migrations/1.0.0-to-2.0.0.js +115 -0
- package/bin/migrations/schema-versions.js +12 -0
- package/bin/mindforge-cli.js +35 -0
- package/bin/review/cross-review-engine.js +11 -0
- package/bin/skill-registry.js +167 -0
- package/bin/skill-validator.js +144 -0
- package/bin/skills-builder/learn-cli.js +57 -0
- package/bin/skills-builder/marketplace-cli.js +54 -0
- package/bin/skills-builder/marketplace-client.js +198 -0
- package/bin/skills-builder/pattern-detector.js +144 -0
- package/bin/skills-builder/skill-generator.js +258 -0
- package/bin/skills-builder/skill-registrar.js +107 -0
- package/bin/skills-builder/skill-scorer.js +263 -0
- package/bin/skills-builder/source-loader.js +268 -0
- package/docs/architecture/README.md +6 -1
- package/docs/architecture/adr-039-multi-runtime-support.md +20 -0
- package/docs/architecture/adr-040-additive-schema-migration.md +21 -0
- package/docs/architecture/adr-041-stable-runtime-interface-contract.md +20 -0
- package/docs/architecture/decision-records-index.md +3 -0
- package/docs/commands-reference.md +3 -0
- package/docs/mindforge-md-reference.md +4 -0
- package/docs/skills-authoring-guide.md +29 -0
- package/docs/skills-publishing-guide.md +3 -2
- package/docs/testing-current-version.md +3 -3
- package/docs/upgrade.md +16 -2
- package/docs/user-guide.md +57 -8
- package/docs/usp-features.md +21 -6
- package/package.json +1 -1
- package/.mindforge/memory/decision-library.jsonl +0 -0
- package/.mindforge/memory/knowledge-base.jsonl +0 -7
- package/.mindforge/memory/pattern-library.jsonl +0 -1
- package/.mindforge/memory/team-preferences.jsonl +0 -4
- package/.planning/browser-daemon.log +0 -32
package/.agent/CLAUDE.md
CHANGED
|
@@ -543,3 +543,29 @@ preferences while keeping governance and quality gates intact.
|
|
|
543
543
|
- `/mindforge:metrics`
|
|
544
544
|
|
|
545
545
|
---
|
|
546
|
+
|
|
547
|
+
## SELF-BUILDING SKILLS PLATFORM (v2.0.0 — Day 13)
|
|
548
|
+
|
|
549
|
+
### When to suggest /mindforge:learn
|
|
550
|
+
- After a productive phase that introduced a new technology
|
|
551
|
+
- When the user mentions struggling with a specific library
|
|
552
|
+
- After `/mindforge:research` produces findings worth capturing as skills
|
|
553
|
+
- When debug sessions uncover patterns worth remembering
|
|
554
|
+
|
|
555
|
+
### Auto-capture hook
|
|
556
|
+
When AUTO_CAPTURE_SKILLS=true in MINDFORGE.md:
|
|
557
|
+
After every phase that passes all gates:
|
|
558
|
+
Run `bin/skills-builder/pattern-detector.js` on the phase SUMMARY files.
|
|
559
|
+
If patterns found (frequency ≥ 2): present for user approval.
|
|
560
|
+
If approved: run the full learn pipeline to create a skill.
|
|
561
|
+
|
|
562
|
+
### AUDIT events for skill learning
|
|
563
|
+
- skill_learned: source_type, source, skill_name, quality_score, tier, cost_usd
|
|
564
|
+
- auto_capture_skipped: phase, patterns_found (0 = no patterns, N = user declined)
|
|
565
|
+
- marketplace_action: action, query/skill_name, quality_score
|
|
566
|
+
|
|
567
|
+
### New commands (Day 13)
|
|
568
|
+
- /mindforge:learn — convert any documentation into a reusable skill
|
|
569
|
+
- /mindforge:marketplace — discover and install community skills
|
|
570
|
+
|
|
571
|
+
---
|
|
@@ -164,4 +164,27 @@ Write final AUDIT entry:
|
|
|
164
164
|
|
|
165
165
|
Next step: Run /mindforge:verify-phase [N] for UAT sign-off.
|
|
166
166
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
167
|
+
|
|
168
|
+
## Step 7 — Auto-capture check (when AUTO_CAPTURE_SKILLS=true)
|
|
169
|
+
|
|
170
|
+
After all gates pass and the phase is verified:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Check if auto-capture is enabled
|
|
174
|
+
CAPTURE=$(grep -m1 "^AUTO_CAPTURE_SKILLS=" MINDFORGE.md 2>/dev/null | cut -d= -f2 | tr -d ' ')
|
|
175
|
+
if [ "$CAPTURE" = "true" ]; then
|
|
176
|
+
node -e "
|
|
177
|
+
const { detectPatterns, formatForPresentation } = require('./bin/skills-builder/pattern-detector');
|
|
178
|
+
detectPatterns(${PHASE_NUM}).then(result => {
|
|
179
|
+
const display = formatForPresentation(result);
|
|
180
|
+
console.log(display);
|
|
181
|
+
}).catch(err => console.error('[auto-capture] Error:', err.message));
|
|
182
|
+
"
|
|
183
|
+
fi
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If patterns are found: display the prompt and await user input.
|
|
187
|
+
If user selects yes: run `/mindforge:learn --session` targeting this phase's SUMMARY files.
|
|
188
|
+
If user selects no: write AUDIT entry `auto_capture_skipped` and continue.
|
|
189
|
+
If no patterns found: exit silently (no noise in the output).
|
|
167
190
|
```
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
# MindForge — Install Skill Command
|
|
2
|
-
# Usage: /mindforge:install-skill [skill-name|package-name] [--tier 1|2|3] [--registry URL]
|
|
3
|
-
|
|
4
1
|
Follow the full installation protocol from `.mindforge/distribution/registry-client.md`.
|
|
5
2
|
|
|
6
3
|
Steps:
|
|
7
|
-
1. Resolve package name from skill name
|
|
8
|
-
2. Check if already installed (skip if same version, offer upgrade if newer)
|
|
9
|
-
3. Fetch from registry (npm or private if --registry specified)
|
|
10
|
-
4. Validate the skill
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
1. Resolve package name from skill name.
|
|
5
|
+
2. Check if already installed (skip if same version, offer upgrade if newer).
|
|
6
|
+
3. Fetch from registry (npm or private if --registry specified).
|
|
7
|
+
4. Validate the skill:
|
|
8
|
+
```bash
|
|
9
|
+
node bin/mindforge-cli.js validate-skill ./SKILL.md
|
|
10
|
+
```
|
|
11
|
+
5. Run injection guard check (handled by validator).
|
|
12
|
+
6. Install to tier directory:
|
|
13
|
+
```bash
|
|
14
|
+
node bin/mindforge-cli.js install-skill [skill-name] --tier [1|2|3]
|
|
15
|
+
```
|
|
16
|
+
7. Register in MANIFEST.md:
|
|
17
|
+
```bash
|
|
18
|
+
node bin/mindforge-cli.js register-skill [skill-name] [version] [tier]
|
|
19
|
+
```
|
|
20
|
+
8. Write AUDIT entry:
|
|
21
|
+
```bash
|
|
22
|
+
node bin/mindforge-cli.js audit-skill [skill-name] [version] [tier]
|
|
23
|
+
```
|
|
15
24
|
9. Confirm: "Run /mindforge:skills validate to verify installation"
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# MindForge v2 — Learn Command
|
|
2
|
+
# Usage: /mindforge:learn [url|path|--session|npm:package] [--name skill-name] [--tier project|org|core]
|
|
3
|
+
# Version: v2.0.0-alpha.6
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Convert any knowledge source into a reusable, validated, committed MindForge SKILL.md.
|
|
7
|
+
Feed Claude your documentation and it writes down what it learned — for every future session.
|
|
8
|
+
|
|
9
|
+
## The insight
|
|
10
|
+
Every developer on your team already knows how Prisma works, how your internal API
|
|
11
|
+
conventions are structured, how your CI pipeline behaves. That knowledge lives in their
|
|
12
|
+
heads and in documentation. `/mindforge:learn` captures it permanently as skills that
|
|
13
|
+
load automatically whenever relevant work begins.
|
|
14
|
+
|
|
15
|
+
## Usage examples
|
|
16
|
+
|
|
17
|
+
### Learn from external documentation
|
|
18
|
+
```
|
|
19
|
+
/mindforge:learn https://docs.prisma.io/concepts/components/prisma-schema
|
|
20
|
+
/mindforge:learn https://stripe.com/docs/webhooks
|
|
21
|
+
/mindforge:learn https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html
|
|
22
|
+
```
|
|
23
|
+
→ Fetches the page (with SSRF protection)
|
|
24
|
+
→ Uses Gemini 2.5 Pro (1M context) for large docs, claude-sonnet-4-6 for smaller ones
|
|
25
|
+
→ Extracts 10 patterns + 15-25 trigger keywords
|
|
26
|
+
→ Writes SKILL.md + scores it + presents for approval
|
|
27
|
+
|
|
28
|
+
### Learn from local documentation
|
|
29
|
+
```
|
|
30
|
+
/mindforge:learn ./docs/api-conventions.md
|
|
31
|
+
/mindforge:learn ./docs/internal/
|
|
32
|
+
/mindforge:learn ./CONTRIBUTING.md
|
|
33
|
+
```
|
|
34
|
+
→ Reads local files directly (no model call for reading, only for analysis)
|
|
35
|
+
→ Perfect for: internal API docs, team conventions, onboarding guides
|
|
36
|
+
|
|
37
|
+
### Learn from npm package docs
|
|
38
|
+
```
|
|
39
|
+
/mindforge:learn npm:zod
|
|
40
|
+
/mindforge:learn npm:drizzle-orm
|
|
41
|
+
/mindforge:learn npm:@tanstack/react-query
|
|
42
|
+
```
|
|
43
|
+
→ Fetches README from npm registry
|
|
44
|
+
→ Extracts patterns from the package documentation
|
|
45
|
+
|
|
46
|
+
### Learn from current session
|
|
47
|
+
```
|
|
48
|
+
/mindforge:learn --session
|
|
49
|
+
```
|
|
50
|
+
→ Analyses SUMMARY files from the most recent phase
|
|
51
|
+
→ Finds patterns that appeared across 2+ tasks
|
|
52
|
+
→ Generates up to 3 skills from what was learned (focused: quality over quantity)
|
|
53
|
+
→ Does NOT repeat patterns already in the knowledge base
|
|
54
|
+
|
|
55
|
+
## Flags
|
|
56
|
+
|
|
57
|
+
### --name [skill-name]
|
|
58
|
+
Override the auto-generated skill name (kebab-case).
|
|
59
|
+
Default: inferred from the URL domain/path or file name.
|
|
60
|
+
Example: `/mindforge:learn ./docs/prisma-patterns.md --name prisma-advanced`
|
|
61
|
+
|
|
62
|
+
### --tier [project|org|core]
|
|
63
|
+
Where to install the skill (default: project).
|
|
64
|
+
- project: only loads in this project (T3)
|
|
65
|
+
- org: loads in all projects using this org config (T2)
|
|
66
|
+
- core: loads everywhere (T1 — use sparingly)
|
|
67
|
+
|
|
68
|
+
### --model [model-id]
|
|
69
|
+
Override the model used for analysis.
|
|
70
|
+
Default: RESEARCH_MODEL for large content (>50K chars), EXECUTOR_MODEL for small.
|
|
71
|
+
|
|
72
|
+
## Output format
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
📚 Learning from: https://docs.prisma.io/...
|
|
76
|
+
|
|
77
|
+
🔍 Fetching content... done (148K chars)
|
|
78
|
+
🧠 Extracting patterns (gemini-2.5-pro)...
|
|
79
|
+
Step 1/3 — Extracting patterns... done (10 patterns)
|
|
80
|
+
Step 2/3 — Generating triggers... done (22 triggers)
|
|
81
|
+
Step 3/3 — Writing SKILL.md... done
|
|
82
|
+
|
|
83
|
+
📊 Skill Quality Score: 84/100 (Good — can register + publish)
|
|
84
|
+
trigger_coverage : 26/30 ✅
|
|
85
|
+
mandatory_actions : 21/25 ✅
|
|
86
|
+
code_examples : 17/20 ✅
|
|
87
|
+
self_check : 12/15 ✅
|
|
88
|
+
injection_safe : 10/10 ✅
|
|
89
|
+
no_placeholders : 9/10 ✅
|
|
90
|
+
version_history : 8/10 ⚠️
|
|
91
|
+
|
|
92
|
+
Preview (top 3 patterns):
|
|
93
|
+
1. [CRITICAL] Always define explicit cascade behaviour
|
|
94
|
+
"Set onDelete on every @relation — never rely on database defaults"
|
|
95
|
+
2. [HIGH] Use compound indexes for cursor pagination
|
|
96
|
+
"Always index (createdAt, id) together for reliable cursor pagination"
|
|
97
|
+
3. [HIGH] Never use String for UUID fields in Prisma schema
|
|
98
|
+
"Use @id @default(uuid()) with the String type — Prisma handles this"
|
|
99
|
+
|
|
100
|
+
Triggers (22): prisma schema, schema.prisma, @relation, prisma migrate,
|
|
101
|
+
@id @default, prisma.findMany, prisma generate, model definition...
|
|
102
|
+
|
|
103
|
+
Skill file: .mindforge/skills/prisma-schema/SKILL.md
|
|
104
|
+
|
|
105
|
+
[ y ] Register in project tier and commit
|
|
106
|
+
[ n ] Discard
|
|
107
|
+
[ e ] Edit SKILL.md before registering
|
|
108
|
+
[ p ] Register AND publish to community marketplace (score ≥ 80 ✅)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## After registration
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
✅ Skill registered: prisma-schema (T3 Project)
|
|
115
|
+
|
|
116
|
+
Will auto-load when tasks contain:
|
|
117
|
+
"prisma schema", "schema.prisma", "@relation", "prisma migrate"...
|
|
118
|
+
|
|
119
|
+
Committed: feat(skills): learn prisma-schema from docs.prisma.io
|
|
120
|
+
|
|
121
|
+
Next: /mindforge:skills info prisma-schema
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Integration with auto-capture
|
|
125
|
+
When `AUTO_CAPTURE_SKILLS=true` in MINDFORGE.md:
|
|
126
|
+
`/mindforge:learn --session` is called automatically after each phase completion.
|
|
127
|
+
The prompt is shown; if no patterns found, it exits silently (no noise).
|
|
128
|
+
|
|
129
|
+
## AUDIT entry
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"event": "skill_learned",
|
|
133
|
+
"source_type": "url|local|session|npm",
|
|
134
|
+
"source": "[url or path]",
|
|
135
|
+
"skill_name": "prisma-schema",
|
|
136
|
+
"quality_score": 84,
|
|
137
|
+
"pattern_count": 10,
|
|
138
|
+
"trigger_count": 22,
|
|
139
|
+
"tier": "project",
|
|
140
|
+
"cost_usd": 0.31
|
|
141
|
+
}
|
|
142
|
+
```
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# MindForge v2 — Marketplace Command
|
|
2
|
+
# Usage: /mindforge:marketplace [search|featured|trending|install|publish]
|
|
3
|
+
# Version: v2.0.0-alpha.6
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Discover, evaluate, and install community-published MindForge skills from the
|
|
7
|
+
marketplace — a curated layer on top of the npm registry.
|
|
8
|
+
|
|
9
|
+
The marketplace is the shortcut: instead of learning from documentation yourself,
|
|
10
|
+
install skills that the community has already created, validated, and battle-tested.
|
|
11
|
+
|
|
12
|
+
## Sub-commands
|
|
13
|
+
|
|
14
|
+
### search [query]
|
|
15
|
+
Find skills relevant to your tech stack or domain.
|
|
16
|
+
```
|
|
17
|
+
/mindforge:marketplace search "prisma"
|
|
18
|
+
/mindforge:marketplace search "stripe payment processing"
|
|
19
|
+
/mindforge:marketplace search "HIPAA compliance"
|
|
20
|
+
/mindforge:marketplace search "graphql api"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Output:
|
|
24
|
+
```
|
|
25
|
+
🔍 Marketplace search: "prisma" (6 results)
|
|
26
|
+
|
|
27
|
+
1. prisma-advanced (v1.2.3)
|
|
28
|
+
Advanced Prisma patterns: relations, migrations, performance, cursor pagination
|
|
29
|
+
847 installs this week
|
|
30
|
+
|
|
31
|
+
2. prisma-schema (v1.0.1)
|
|
32
|
+
Prisma schema design: models, relations, enums, cascade rules
|
|
33
|
+
234 installs this week
|
|
34
|
+
|
|
35
|
+
3. prisma-testing (v1.0.0)
|
|
36
|
+
Testing Prisma with Jest: database seeding, teardown, transaction rollback
|
|
37
|
+
156 installs this week
|
|
38
|
+
|
|
39
|
+
Install: /mindforge:marketplace install prisma-advanced
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### featured
|
|
43
|
+
Show curated featured skills by category.
|
|
44
|
+
```
|
|
45
|
+
/mindforge:marketplace featured
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Output:
|
|
49
|
+
```
|
|
50
|
+
🏪 MindForge Community Skills — Featured
|
|
51
|
+
|
|
52
|
+
Database:
|
|
53
|
+
db-postgres-advanced v2.1.0 — Advanced PostgreSQL patterns, indexes, partitioning
|
|
54
|
+
db-prisma-advanced v1.2.0 — Prisma relations, migrations, query optimisation
|
|
55
|
+
db-drizzle v1.0.0 — Drizzle ORM type-safe patterns
|
|
56
|
+
|
|
57
|
+
API:
|
|
58
|
+
api-graphql v1.4.0 — GraphQL schema, resolvers, N+1 prevention
|
|
59
|
+
api-rest v2.0.0 — REST API design, versioning, error schemas
|
|
60
|
+
|
|
61
|
+
Compliance:
|
|
62
|
+
fintech-pci-compliance v1.1.0 — PCI DSS Level 1 safeguards
|
|
63
|
+
healthtech-hipaa v1.0.1 — HIPAA Security Rule for PHI
|
|
64
|
+
[more...]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### trending
|
|
68
|
+
Show most-installed skills this month.
|
|
69
|
+
```
|
|
70
|
+
/mindforge:marketplace trending
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### install [name] [--tier project|org]
|
|
74
|
+
Install a marketplace skill.
|
|
75
|
+
```
|
|
76
|
+
/mindforge:marketplace install prisma-advanced
|
|
77
|
+
/mindforge:marketplace install mindforge-skill-api-graphql --tier org
|
|
78
|
+
/mindforge:marketplace install fintech-pci-compliance --tier project
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Short names work (without `mindforge-skill-` prefix).
|
|
82
|
+
Delegates to `/mindforge:install-skill` for actual installation.
|
|
83
|
+
Shows quality score and session_quality_lift before installing.
|
|
84
|
+
|
|
85
|
+
### publish [skill-dir]
|
|
86
|
+
Publish a skill to the community marketplace.
|
|
87
|
+
```
|
|
88
|
+
/mindforge:marketplace publish .mindforge/skills/my-skill/
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Requirements:
|
|
92
|
+
- Quality score ≥ 80/100
|
|
93
|
+
- No injection patterns
|
|
94
|
+
- Has complete version history
|
|
95
|
+
- Has author contact (GitHub issues URL)
|
|
96
|
+
|
|
97
|
+
## Skill quality display format
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
📊 Skill: prisma-advanced v1.2.3
|
|
101
|
+
Quality score: 94/100 (Excellent)
|
|
102
|
+
★★★★★ Session quality lift: +8.2 points (over 1,247 sessions)
|
|
103
|
+
847 installs/week | Published by: @prisma-community
|
|
104
|
+
|
|
105
|
+
Top trigger keywords: "prisma schema", "@relation", "prisma migrate",
|
|
106
|
+
"prisma generate", "onDelete", "cursor pagination"
|
|
107
|
+
|
|
108
|
+
[Install] [Preview SKILL.md] [View on npm]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## AUDIT entry
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"event": "marketplace_action",
|
|
115
|
+
"action": "search|install|publish",
|
|
116
|
+
"query": "[search query if search]",
|
|
117
|
+
"skill_name": "[name if install/publish]",
|
|
118
|
+
"quality_score": 94
|
|
119
|
+
}
|
|
120
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# /mindforge:new-runtime
|
|
2
|
+
|
|
3
|
+
Scaffold support for a new AI coding runtime.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
/mindforge:new-runtime [name]
|
|
8
|
+
|
|
9
|
+
## Action
|
|
10
|
+
|
|
11
|
+
1. Identify target runtime's entry file format (e.g. .myrules, instructions.md)
|
|
12
|
+
2. Scaffold the required directories in both global and local scopes
|
|
13
|
+
3. Add a new entry to the RUNTIMES configuration in `bin/installer-core.js`
|
|
14
|
+
4. Generate first-run instructions for the new runtime
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
/mindforge:new-runtime void-editor
|
|
19
|
+
/mindforge:new-runtime zed-ai
|
|
@@ -4,10 +4,22 @@ Manage the MindForge long-term memory (knowledge graph).
|
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
7
|
+
- Add an entry:
|
|
8
|
+
```bash
|
|
9
|
+
node bin/mindforge-cli.js remember --add "Your knowledge" --topic "Title"
|
|
10
|
+
```
|
|
11
|
+
- Search memories:
|
|
12
|
+
```bash
|
|
13
|
+
node bin/mindforge-cli.js remember --search "query" --global
|
|
14
|
+
```
|
|
15
|
+
- View statistics:
|
|
16
|
+
```bash
|
|
17
|
+
node bin/mindforge-cli.js remember --stats
|
|
18
|
+
```
|
|
19
|
+
- Promote to global:
|
|
20
|
+
```bash
|
|
21
|
+
node bin/mindforge-cli.js remember --promote "id"
|
|
22
|
+
```
|
|
11
23
|
|
|
12
24
|
## Description
|
|
13
25
|
|
package/.claude/CLAUDE.md
CHANGED
|
@@ -543,3 +543,29 @@ preferences while keeping governance and quality gates intact.
|
|
|
543
543
|
- `/mindforge:metrics`
|
|
544
544
|
|
|
545
545
|
---
|
|
546
|
+
|
|
547
|
+
## SELF-BUILDING SKILLS PLATFORM (v2.0.0 — Day 13)
|
|
548
|
+
|
|
549
|
+
### When to suggest /mindforge:learn
|
|
550
|
+
- After a productive phase that introduced a new technology
|
|
551
|
+
- When the user mentions struggling with a specific library
|
|
552
|
+
- After `/mindforge:research` produces findings worth capturing as skills
|
|
553
|
+
- When debug sessions uncover patterns worth remembering
|
|
554
|
+
|
|
555
|
+
### Auto-capture hook
|
|
556
|
+
When AUTO_CAPTURE_SKILLS=true in MINDFORGE.md:
|
|
557
|
+
After every phase that passes all gates:
|
|
558
|
+
Run `bin/skills-builder/pattern-detector.js` on the phase SUMMARY files.
|
|
559
|
+
If patterns found (frequency ≥ 2): present for user approval.
|
|
560
|
+
If approved: run the full learn pipeline to create a skill.
|
|
561
|
+
|
|
562
|
+
### AUDIT events for skill learning
|
|
563
|
+
- skill_learned: source_type, source, skill_name, quality_score, tier, cost_usd
|
|
564
|
+
- auto_capture_skipped: phase, patterns_found (0 = no patterns, N = user declined)
|
|
565
|
+
- marketplace_action: action, query/skill_name, quality_score
|
|
566
|
+
|
|
567
|
+
### New commands (Day 13)
|
|
568
|
+
- /mindforge:learn — convert any documentation into a reusable skill
|
|
569
|
+
- /mindforge:marketplace — discover and install community skills
|
|
570
|
+
|
|
571
|
+
---
|
|
@@ -164,4 +164,27 @@ Write final AUDIT entry:
|
|
|
164
164
|
|
|
165
165
|
Next step: Run /mindforge:verify-phase [N] for UAT sign-off.
|
|
166
166
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
167
|
+
|
|
168
|
+
## Step 7 — Auto-capture check (when AUTO_CAPTURE_SKILLS=true)
|
|
169
|
+
|
|
170
|
+
After all gates pass and the phase is verified:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Check if auto-capture is enabled
|
|
174
|
+
CAPTURE=$(grep -m1 "^AUTO_CAPTURE_SKILLS=" MINDFORGE.md 2>/dev/null | cut -d= -f2 | tr -d ' ')
|
|
175
|
+
if [ "$CAPTURE" = "true" ]; then
|
|
176
|
+
node -e "
|
|
177
|
+
const { detectPatterns, formatForPresentation } = require('./bin/skills-builder/pattern-detector');
|
|
178
|
+
detectPatterns(${PHASE_NUM}).then(result => {
|
|
179
|
+
const display = formatForPresentation(result);
|
|
180
|
+
console.log(display);
|
|
181
|
+
}).catch(err => console.error('[auto-capture] Error:', err.message));
|
|
182
|
+
"
|
|
183
|
+
fi
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If patterns are found: display the prompt and await user input.
|
|
187
|
+
If user selects yes: run `/mindforge:learn --session` targeting this phase's SUMMARY files.
|
|
188
|
+
If user selects no: write AUDIT entry `auto_capture_skipped` and continue.
|
|
189
|
+
If no patterns found: exit silently (no noise in the output).
|
|
167
190
|
```
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# MindForge v2 — Learn Command
|
|
2
|
+
# Usage: /mindforge:learn [url|path|--session|npm:package] [--name skill-name] [--tier project|org|core]
|
|
3
|
+
# Version: v2.0.0-alpha.6
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Convert any knowledge source into a reusable, validated, committed MindForge SKILL.md.
|
|
7
|
+
Feed Claude your documentation and it writes down what it learned — for every future session.
|
|
8
|
+
|
|
9
|
+
## The insight
|
|
10
|
+
Every developer on your team already knows how Prisma works, how your internal API
|
|
11
|
+
conventions are structured, how your CI pipeline behaves. That knowledge lives in their
|
|
12
|
+
heads and in documentation. `/mindforge:learn` captures it permanently as skills that
|
|
13
|
+
load automatically whenever relevant work begins.
|
|
14
|
+
|
|
15
|
+
## Usage examples
|
|
16
|
+
|
|
17
|
+
### Learn from external documentation
|
|
18
|
+
```
|
|
19
|
+
/mindforge:learn https://docs.prisma.io/concepts/components/prisma-schema
|
|
20
|
+
/mindforge:learn https://stripe.com/docs/webhooks
|
|
21
|
+
/mindforge:learn https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html
|
|
22
|
+
```
|
|
23
|
+
→ Fetches the page (with SSRF protection)
|
|
24
|
+
→ Uses Gemini 2.5 Pro (1M context) for large docs, claude-sonnet-4-6 for smaller ones
|
|
25
|
+
→ Extracts 10 patterns + 15-25 trigger keywords
|
|
26
|
+
→ Writes SKILL.md + scores it + presents for approval
|
|
27
|
+
|
|
28
|
+
### Learn from local documentation
|
|
29
|
+
```
|
|
30
|
+
/mindforge:learn ./docs/api-conventions.md
|
|
31
|
+
/mindforge:learn ./docs/internal/
|
|
32
|
+
/mindforge:learn ./CONTRIBUTING.md
|
|
33
|
+
```
|
|
34
|
+
→ Reads local files directly (no model call for reading, only for analysis)
|
|
35
|
+
→ Perfect for: internal API docs, team conventions, onboarding guides
|
|
36
|
+
|
|
37
|
+
### Learn from npm package docs
|
|
38
|
+
```
|
|
39
|
+
/mindforge:learn npm:zod
|
|
40
|
+
/mindforge:learn npm:drizzle-orm
|
|
41
|
+
/mindforge:learn npm:@tanstack/react-query
|
|
42
|
+
```
|
|
43
|
+
→ Fetches README from npm registry
|
|
44
|
+
→ Extracts patterns from the package documentation
|
|
45
|
+
|
|
46
|
+
### Learn from current session
|
|
47
|
+
```
|
|
48
|
+
/mindforge:learn --session
|
|
49
|
+
```
|
|
50
|
+
→ Analyses SUMMARY files from the most recent phase
|
|
51
|
+
→ Finds patterns that appeared across 2+ tasks
|
|
52
|
+
→ Generates up to 3 skills from what was learned (focused: quality over quantity)
|
|
53
|
+
→ Does NOT repeat patterns already in the knowledge base
|
|
54
|
+
|
|
55
|
+
## Flags
|
|
56
|
+
|
|
57
|
+
### --name [skill-name]
|
|
58
|
+
Override the auto-generated skill name (kebab-case).
|
|
59
|
+
Default: inferred from the URL domain/path or file name.
|
|
60
|
+
Example: `/mindforge:learn ./docs/prisma-patterns.md --name prisma-advanced`
|
|
61
|
+
|
|
62
|
+
### --tier [project|org|core]
|
|
63
|
+
Where to install the skill (default: project).
|
|
64
|
+
- project: only loads in this project (T3)
|
|
65
|
+
- org: loads in all projects using this org config (T2)
|
|
66
|
+
- core: loads everywhere (T1 — use sparingly)
|
|
67
|
+
|
|
68
|
+
### --model [model-id]
|
|
69
|
+
Override the model used for analysis.
|
|
70
|
+
Default: RESEARCH_MODEL for large content (>50K chars), EXECUTOR_MODEL for small.
|
|
71
|
+
|
|
72
|
+
## Output format
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
📚 Learning from: https://docs.prisma.io/...
|
|
76
|
+
|
|
77
|
+
🔍 Fetching content... done (148K chars)
|
|
78
|
+
🧠 Extracting patterns (gemini-2.5-pro)...
|
|
79
|
+
Step 1/3 — Extracting patterns... done (10 patterns)
|
|
80
|
+
Step 2/3 — Generating triggers... done (22 triggers)
|
|
81
|
+
Step 3/3 — Writing SKILL.md... done
|
|
82
|
+
|
|
83
|
+
📊 Skill Quality Score: 84/100 (Good — can register + publish)
|
|
84
|
+
trigger_coverage : 26/30 ✅
|
|
85
|
+
mandatory_actions : 21/25 ✅
|
|
86
|
+
code_examples : 17/20 ✅
|
|
87
|
+
self_check : 12/15 ✅
|
|
88
|
+
injection_safe : 10/10 ✅
|
|
89
|
+
no_placeholders : 9/10 ✅
|
|
90
|
+
version_history : 8/10 ⚠️
|
|
91
|
+
|
|
92
|
+
Preview (top 3 patterns):
|
|
93
|
+
1. [CRITICAL] Always define explicit cascade behaviour
|
|
94
|
+
"Set onDelete on every @relation — never rely on database defaults"
|
|
95
|
+
2. [HIGH] Use compound indexes for cursor pagination
|
|
96
|
+
"Always index (createdAt, id) together for reliable cursor pagination"
|
|
97
|
+
3. [HIGH] Never use String for UUID fields in Prisma schema
|
|
98
|
+
"Use @id @default(uuid()) with the String type — Prisma handles this"
|
|
99
|
+
|
|
100
|
+
Triggers (22): prisma schema, schema.prisma, @relation, prisma migrate,
|
|
101
|
+
@id @default, prisma.findMany, prisma generate, model definition...
|
|
102
|
+
|
|
103
|
+
Skill file: .mindforge/skills/prisma-schema/SKILL.md
|
|
104
|
+
|
|
105
|
+
[ y ] Register in project tier and commit
|
|
106
|
+
[ n ] Discard
|
|
107
|
+
[ e ] Edit SKILL.md before registering
|
|
108
|
+
[ p ] Register AND publish to community marketplace (score ≥ 80 ✅)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## After registration
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
✅ Skill registered: prisma-schema (T3 Project)
|
|
115
|
+
|
|
116
|
+
Will auto-load when tasks contain:
|
|
117
|
+
"prisma schema", "schema.prisma", "@relation", "prisma migrate"...
|
|
118
|
+
|
|
119
|
+
Committed: feat(skills): learn prisma-schema from docs.prisma.io
|
|
120
|
+
|
|
121
|
+
Next: /mindforge:skills info prisma-schema
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Integration with auto-capture
|
|
125
|
+
When `AUTO_CAPTURE_SKILLS=true` in MINDFORGE.md:
|
|
126
|
+
`/mindforge:learn --session` is called automatically after each phase completion.
|
|
127
|
+
The prompt is shown; if no patterns found, it exits silently (no noise).
|
|
128
|
+
|
|
129
|
+
## AUDIT entry
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"event": "skill_learned",
|
|
133
|
+
"source_type": "url|local|session|npm",
|
|
134
|
+
"source": "[url or path]",
|
|
135
|
+
"skill_name": "prisma-schema",
|
|
136
|
+
"quality_score": 84,
|
|
137
|
+
"pattern_count": 10,
|
|
138
|
+
"trigger_count": 22,
|
|
139
|
+
"tier": "project",
|
|
140
|
+
"cost_usd": 0.31
|
|
141
|
+
}
|
|
142
|
+
```
|