mindforge-cc 1.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 +462 -0
- package/.agent/forge/help.md +7 -0
- package/.agent/forge/init-project.md +32 -0
- package/.agent/forge/plan-phase.md +30 -0
- package/.agent/mindforge/approve.md +18 -0
- package/.agent/mindforge/audit.md +30 -0
- package/.agent/mindforge/benchmark.md +33 -0
- package/.agent/mindforge/complete-milestone.md +18 -0
- package/.agent/mindforge/debug.md +126 -0
- package/.agent/mindforge/discuss-phase.md +138 -0
- package/.agent/mindforge/execute-phase.md +165 -0
- package/.agent/mindforge/health.md +21 -0
- package/.agent/mindforge/help.md +23 -0
- package/.agent/mindforge/init-org.md +131 -0
- package/.agent/mindforge/init-project.md +155 -0
- package/.agent/mindforge/install-skill.md +15 -0
- package/.agent/mindforge/map-codebase.md +298 -0
- package/.agent/mindforge/metrics.md +22 -0
- package/.agent/mindforge/migrate.md +40 -0
- package/.agent/mindforge/milestone.md +12 -0
- package/.agent/mindforge/next.md +105 -0
- package/.agent/mindforge/plan-phase.md +125 -0
- package/.agent/mindforge/plugins.md +40 -0
- package/.agent/mindforge/pr-review.md +41 -0
- package/.agent/mindforge/profile-team.md +23 -0
- package/.agent/mindforge/publish-skill.md +19 -0
- package/.agent/mindforge/quick.md +135 -0
- package/.agent/mindforge/release.md +10 -0
- package/.agent/mindforge/retrospective.md +26 -0
- package/.agent/mindforge/review.md +157 -0
- package/.agent/mindforge/security-scan.md +233 -0
- package/.agent/mindforge/ship.md +100 -0
- package/.agent/mindforge/skills.md +141 -0
- package/.agent/mindforge/status.md +104 -0
- package/.agent/mindforge/sync-confluence.md +11 -0
- package/.agent/mindforge/sync-jira.md +12 -0
- package/.agent/mindforge/tokens.md +8 -0
- package/.agent/mindforge/update.md +42 -0
- package/.agent/mindforge/verify-phase.md +62 -0
- package/.agent/mindforge/workspace.md +29 -0
- package/.claude/CLAUDE.md +462 -0
- package/.claude/commands/forge/help.md +7 -0
- package/.claude/commands/forge/init-project.md +32 -0
- package/.claude/commands/forge/plan-phase.md +30 -0
- package/.claude/commands/mindforge/approve.md +18 -0
- package/.claude/commands/mindforge/audit.md +30 -0
- package/.claude/commands/mindforge/benchmark.md +33 -0
- package/.claude/commands/mindforge/complete-milestone.md +18 -0
- package/.claude/commands/mindforge/debug.md +126 -0
- package/.claude/commands/mindforge/discuss-phase.md +138 -0
- package/.claude/commands/mindforge/execute-phase.md +165 -0
- package/.claude/commands/mindforge/health.md +21 -0
- package/.claude/commands/mindforge/help.md +23 -0
- package/.claude/commands/mindforge/init-org.md +131 -0
- package/.claude/commands/mindforge/init-project.md +155 -0
- package/.claude/commands/mindforge/install-skill.md +15 -0
- package/.claude/commands/mindforge/map-codebase.md +298 -0
- package/.claude/commands/mindforge/metrics.md +22 -0
- package/.claude/commands/mindforge/migrate.md +40 -0
- package/.claude/commands/mindforge/milestone.md +12 -0
- package/.claude/commands/mindforge/next.md +105 -0
- package/.claude/commands/mindforge/plan-phase.md +125 -0
- package/.claude/commands/mindforge/plugins.md +40 -0
- package/.claude/commands/mindforge/pr-review.md +41 -0
- package/.claude/commands/mindforge/profile-team.md +23 -0
- package/.claude/commands/mindforge/publish-skill.md +19 -0
- package/.claude/commands/mindforge/quick.md +135 -0
- package/.claude/commands/mindforge/release.md +10 -0
- package/.claude/commands/mindforge/retrospective.md +26 -0
- package/.claude/commands/mindforge/review.md +157 -0
- package/.claude/commands/mindforge/security-scan.md +233 -0
- package/.claude/commands/mindforge/ship.md +100 -0
- package/.claude/commands/mindforge/skills.md +141 -0
- package/.claude/commands/mindforge/status.md +104 -0
- package/.claude/commands/mindforge/sync-confluence.md +11 -0
- package/.claude/commands/mindforge/sync-jira.md +12 -0
- package/.claude/commands/mindforge/tokens.md +8 -0
- package/.claude/commands/mindforge/update.md +42 -0
- package/.claude/commands/mindforge/verify-phase.md +62 -0
- package/.claude/commands/mindforge/workspace.md +29 -0
- package/.forge/org/CONVENTIONS.md +0 -0
- package/.forge/org/ORG.md +0 -0
- package/.forge/org/SECURITY.md +0 -0
- package/.forge/org/TOOLS.md +0 -0
- package/.forge/personas/analyst.md +0 -0
- package/.forge/personas/architect.md +0 -0
- package/.forge/personas/debug-specialist.md +0 -0
- package/.forge/personas/developer.md +26 -0
- package/.forge/personas/qa-engineer.md +0 -0
- package/.forge/personas/release-manager.md +0 -0
- package/.forge/personas/security-reviewer.md +33 -0
- package/.forge/personas/tech-writer.md +0 -0
- package/.forge/skills/api-design/SKILL.md +0 -0
- package/.forge/skills/code-quality/SKILL.md +0 -0
- package/.forge/skills/documentation/SKILL.md +0 -0
- package/.forge/skills/security-review/SKILL.md +23 -0
- package/.forge/skills/testing-standards/SKILL.md +27 -0
- package/.github/workflows/mindforge-ci.yml +224 -0
- package/.gitlab-ci-mindforge.yml +18 -0
- package/.mindforge/MINDFORGE-SCHEMA.json +165 -0
- package/.mindforge/audit/AUDIT-SCHEMA.md +451 -0
- package/.mindforge/ci/ci-config-schema.md +21 -0
- package/.mindforge/ci/ci-mode.md +179 -0
- package/.mindforge/ci/github-actions-adapter.md +224 -0
- package/.mindforge/ci/gitlab-ci-adapter.md +31 -0
- package/.mindforge/ci/jenkins-adapter.md +44 -0
- package/.mindforge/distribution/registry-client.md +166 -0
- package/.mindforge/distribution/registry-schema.md +96 -0
- package/.mindforge/distribution/skill-publisher.md +44 -0
- package/.mindforge/distribution/skill-validator.md +74 -0
- package/.mindforge/engine/compaction-protocol.md +182 -0
- package/.mindforge/engine/context-injector.md +128 -0
- package/.mindforge/engine/dependency-parser.md +113 -0
- package/.mindforge/engine/skills/conflict-resolver.md +69 -0
- package/.mindforge/engine/skills/loader.md +184 -0
- package/.mindforge/engine/skills/registry.md +98 -0
- package/.mindforge/engine/skills/versioning.md +75 -0
- package/.mindforge/engine/verification-pipeline.md +111 -0
- package/.mindforge/engine/wave-executor.md +235 -0
- package/.mindforge/governance/GOVERNANCE-CONFIG.md +17 -0
- package/.mindforge/governance/approval-workflow.md +37 -0
- package/.mindforge/governance/change-classifier.md +63 -0
- package/.mindforge/governance/compliance-gates.md +31 -0
- package/.mindforge/integrations/confluence.md +27 -0
- package/.mindforge/integrations/connection-manager.md +163 -0
- package/.mindforge/integrations/github.md +25 -0
- package/.mindforge/integrations/gitlab.md +13 -0
- package/.mindforge/integrations/jira.md +102 -0
- package/.mindforge/integrations/slack.md +41 -0
- package/.mindforge/intelligence/antipattern-detector.md +75 -0
- package/.mindforge/intelligence/difficulty-scorer.md +55 -0
- package/.mindforge/intelligence/health-engine.md +208 -0
- package/.mindforge/intelligence/skill-gap-analyser.md +40 -0
- package/.mindforge/intelligence/smart-compaction.md +71 -0
- package/.mindforge/metrics/METRICS-SCHEMA.md +42 -0
- package/.mindforge/metrics/quality-tracker.md +32 -0
- package/.mindforge/monorepo/cross-package-planner.md +114 -0
- package/.mindforge/monorepo/dependency-graph-builder.md +32 -0
- package/.mindforge/monorepo/workspace-detector.md +129 -0
- package/.mindforge/org/CONVENTIONS.md +62 -0
- package/.mindforge/org/ORG.md +51 -0
- package/.mindforge/org/SECURITY.md +50 -0
- package/.mindforge/org/TOOLS.md +53 -0
- package/.mindforge/org/integrations/INTEGRATIONS-CONFIG.md +58 -0
- package/.mindforge/org/skills/MANIFEST.md +38 -0
- package/.mindforge/personas/analyst.md +52 -0
- package/.mindforge/personas/architect.md +75 -0
- package/.mindforge/personas/debug-specialist.md +52 -0
- package/.mindforge/personas/developer.md +85 -0
- package/.mindforge/personas/overrides/README.md +85 -0
- package/.mindforge/personas/qa-engineer.md +61 -0
- package/.mindforge/personas/release-manager.md +76 -0
- package/.mindforge/personas/security-reviewer.md +91 -0
- package/.mindforge/personas/tech-writer.md +51 -0
- package/.mindforge/plugins/PLUGINS-MANIFEST.md +23 -0
- package/.mindforge/plugins/plugin-loader.md +93 -0
- package/.mindforge/plugins/plugin-registry.md +44 -0
- package/.mindforge/plugins/plugin-schema.md +68 -0
- package/.mindforge/pr-review/ai-reviewer.md +266 -0
- package/.mindforge/pr-review/finding-formatter.md +46 -0
- package/.mindforge/pr-review/review-prompt-templates.md +44 -0
- package/.mindforge/production/compatibility-layer.md +39 -0
- package/.mindforge/production/migration-engine.md +52 -0
- package/.mindforge/production/production-checklist.md +165 -0
- package/.mindforge/production/token-optimiser.md +68 -0
- package/.mindforge/skills/accessibility/SKILL.md +106 -0
- package/.mindforge/skills/api-design/SKILL.md +98 -0
- package/.mindforge/skills/code-quality/SKILL.md +88 -0
- package/.mindforge/skills/data-privacy/SKILL.md +126 -0
- package/.mindforge/skills/database-patterns/SKILL.md +192 -0
- package/.mindforge/skills/documentation/SKILL.md +91 -0
- package/.mindforge/skills/incident-response/SKILL.md +180 -0
- package/.mindforge/skills/performance/SKILL.md +120 -0
- package/.mindforge/skills/security-review/SKILL.md +83 -0
- package/.mindforge/skills/testing-standards/SKILL.md +97 -0
- package/.mindforge/team/TEAM-PROFILE.md +42 -0
- package/.mindforge/team/multi-handoff.md +23 -0
- package/.mindforge/team/profiles/README.md +13 -0
- package/.mindforge/team/session-merger.md +18 -0
- package/.planning/ARCHITECTURE.md +0 -0
- package/.planning/AUDIT.jsonl +0 -0
- package/.planning/HANDOFF.json +28 -0
- package/.planning/PROJECT.md +33 -0
- package/.planning/RELEASE-CHECKLIST.md +68 -0
- package/.planning/REQUIREMENTS.md +0 -0
- package/.planning/ROADMAP.md +0 -0
- package/.planning/STATE.md +31 -0
- package/.planning/approvals/.gitkeep +1 -0
- package/.planning/archive/.gitkeep +1 -0
- package/.planning/audit-archive/.gitkeep +1 -0
- package/.planning/decisions/.gitkeep +0 -0
- package/.planning/decisions/ADR-001-handoff-tracking.md +41 -0
- package/.planning/decisions/ADR-002-markdown-commands.md +46 -0
- package/.planning/decisions/ADR-003-skills-trigger-model.md +37 -0
- package/.planning/decisions/ADR-004-wave-parallelism-model.md +45 -0
- package/.planning/decisions/ADR-005-append-only-audit-log.md +51 -0
- package/.planning/decisions/ADR-006-tiered-skills-system.md +22 -0
- package/.planning/decisions/ADR-007-trigger-keyword-model.md +22 -0
- package/.planning/decisions/ADR-008-just-in-time-skill-loading.md +29 -0
- package/.planning/decisions/ADR-009-enterprise-integration-retry-policy.md +8 -0
- package/.planning/decisions/ADR-010-governance-tier-escalation.md +8 -0
- package/.planning/decisions/ADR-011-multi-developer-handoff-contract.md +8 -0
- package/.planning/decisions/ADR-012-intelligence-feedback-loops.md +19 -0
- package/.planning/decisions/ADR-013-mindforge-md-constitution.md +16 -0
- package/.planning/decisions/ADR-014-metrics-as-signals-not-evaluation.md +15 -0
- package/.planning/decisions/ADR-015-npm-based-skill-registry.md +26 -0
- package/.planning/decisions/ADR-016-ci-exit-code-0-on-timeout.md +27 -0
- package/.planning/decisions/ADR-017-sdk-localhost-only.md +28 -0
- package/.planning/decisions/ADR-018-installer-self-install-detection.md +15 -0
- package/.planning/decisions/ADR-019-self-update-scope-preservation.md +14 -0
- package/.planning/decisions/ADR-020-v1.0.0-stable-interface-contract.md +23 -0
- package/.planning/jira-sync.json +9 -0
- package/.planning/milestones/.gitkeep +1 -0
- package/.planning/phases/day1/REVIEW-DAY1.md +50 -0
- package/.planning/phases/day1/SECURITY-REVIEW-DAY1.md +15 -0
- package/.planning/phases/day2/REVIEW-DAY2.md +521 -0
- package/.planning/phases/day3/REVIEW-DAY3.md +234 -0
- package/.planning/slack-threads.json +6 -0
- package/CHANGELOG.md +175 -0
- package/LICENSE +21 -0
- package/MINDFORGE.md +76 -0
- package/README.md +182 -0
- package/RELEASENOTES.md +41 -0
- package/SECURITY.md +4 -0
- package/bin/install.js +120 -0
- package/bin/installer-core.js +292 -0
- package/bin/migrations/0.1.0-to-0.5.0.js +37 -0
- package/bin/migrations/0.5.0-to-0.6.0.js +17 -0
- package/bin/migrations/0.6.0-to-1.0.0.js +100 -0
- package/bin/migrations/migrate.js +151 -0
- package/bin/migrations/schema-versions.js +64 -0
- package/bin/updater/changelog-fetcher.js +62 -0
- package/bin/updater/self-update.js +169 -0
- package/bin/updater/version-comparator.js +68 -0
- package/bin/validate-config.js +92 -0
- package/bin/wizard/config-generator.js +112 -0
- package/bin/wizard/environment-detector.js +76 -0
- package/bin/wizard/setup-wizard.js +237 -0
- package/docs/Context/Master-Context.md +701 -0
- package/docs/architecture/README.md +35 -0
- package/docs/architecture/decision-records-index.md +26 -0
- package/docs/ci-cd-integration.md +30 -0
- package/docs/ci-quickstart.md +78 -0
- package/docs/commands-reference.md +11 -0
- package/docs/contributing/CONTRIBUTING.md +38 -0
- package/docs/contributing/plugin-authoring.md +50 -0
- package/docs/contributing/skill-authoring.md +41 -0
- package/docs/enterprise-setup.md +25 -0
- package/docs/faq.md +38 -0
- package/docs/getting-started.md +36 -0
- package/docs/governance-guide.md +23 -0
- package/docs/mindforge-md-reference.md +53 -0
- package/docs/monorepo-guide.md +26 -0
- package/docs/persona-customisation.md +56 -0
- package/docs/quick-verify.md +33 -0
- package/docs/reference/audit-events.md +53 -0
- package/docs/reference/commands.md +82 -0
- package/docs/reference/config-reference.md +64 -0
- package/docs/reference/sdk-api.md +48 -0
- package/docs/reference/skills-api.md +57 -0
- package/docs/release-checklist-guide.md +37 -0
- package/docs/requirements.md +29 -0
- package/docs/sdk-reference.md +27 -0
- package/docs/security/SECURITY.md +42 -0
- package/docs/security/penetration-test-results.md +31 -0
- package/docs/security/threat-model.md +142 -0
- package/docs/skills-authoring-guide.md +119 -0
- package/docs/skills-publishing-guide.md +21 -0
- package/docs/team-setup-guide.md +21 -0
- package/docs/troubleshooting.md +119 -0
- package/docs/tutorial.md +195 -0
- package/docs/upgrade.md +44 -0
- package/docs/user-guide.md +131 -0
- package/docs/usp-features.md +214 -0
- package/eslint.config.mjs +31 -0
- package/examples/starter-project/.planning/AUDIT.jsonl +1 -0
- package/examples/starter-project/.planning/HANDOFF.json +23 -0
- package/examples/starter-project/.planning/PROJECT.md +27 -0
- package/examples/starter-project/.planning/STATE.md +10 -0
- package/examples/starter-project/MINDFORGE.md +40 -0
- package/examples/starter-project/README.md +14 -0
- package/implementation-roadmap/day-1-imp/DAY1-HARDEN.md +823 -0
- package/implementation-roadmap/day-1-imp/DAY1-IMPLEMENT.md +2459 -0
- package/implementation-roadmap/day-1-imp/DAY1-REVIEW.md +288 -0
- package/implementation-roadmap/day-2-imp/DAY2-HARDEN.md +954 -0
- package/implementation-roadmap/day-2-imp/DAY2-IMPLEMENT.md +2347 -0
- package/implementation-roadmap/day-2-imp/DAY2-REVIEW.md +422 -0
- package/implementation-roadmap/day-3-imp/DAY3-HARDEN.md +870 -0
- package/implementation-roadmap/day-3-imp/DAY3-IMPLEMENT.md +2798 -0
- package/implementation-roadmap/day-3-imp/DAY3-REVIEW.md +484 -0
- package/implementation-roadmap/day-4-imp/DAY4-HARDEN.md +1087 -0
- package/implementation-roadmap/day-4-imp/DAY4-IMPLEMENT.md +2874 -0
- package/implementation-roadmap/day-4-imp/DAY4-REVIEW.md +386 -0
- package/implementation-roadmap/day-5-imp/DAY5-HARDEN.md +1078 -0
- package/implementation-roadmap/day-5-imp/DAY5-IMPLEMENT.md +3151 -0
- package/implementation-roadmap/day-5-imp/DAY5-REVIEW.md +345 -0
- package/implementation-roadmap/day-6-imp/DAY6-COMPLETE.md +3919 -0
- package/implementation-roadmap/day-7-imp-prod/DAY7-PRODUCTION-FINAL.md +4513 -0
- package/package.json +31 -0
- package/sdk/README.md +69 -0
- package/sdk/eslint.config.mjs +34 -0
- package/sdk/package-lock.json +1507 -0
- package/sdk/package.json +30 -0
- package/sdk/src/client.ts +133 -0
- package/sdk/src/commands.ts +63 -0
- package/sdk/src/events.ts +166 -0
- package/sdk/src/index.ts +22 -0
- package/sdk/src/types.ts +87 -0
- package/sdk/tsconfig.json +13 -0
- package/tests/audit.test.js +206 -0
- package/tests/ci-mode.test.js +162 -0
- package/tests/compaction.test.js +161 -0
- package/tests/distribution.test.js +205 -0
- package/tests/e2e.test.js +618 -0
- package/tests/governance.test.js +130 -0
- package/tests/install.test.js +209 -0
- package/tests/integrations.test.js +128 -0
- package/tests/intelligence.test.js +117 -0
- package/tests/metrics.test.js +96 -0
- package/tests/migration.test.js +309 -0
- package/tests/production.test.js +416 -0
- package/tests/sdk.test.js +200 -0
- package/tests/skills-platform.test.js +403 -0
- package/tests/wave-engine.test.js +338 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# MindForge — GitHub Actions Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define the GitHub Actions workflow that integrates MindForge into CI/CD pipelines.
|
|
5
|
+
|
|
6
|
+
## Workflow file: `.github/workflows/mindforge-ci.yml`
|
|
7
|
+
|
|
8
|
+
```yaml
|
|
9
|
+
name: MindForge CI
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
branches: [ main, 'feat/**' ]
|
|
14
|
+
pull_request:
|
|
15
|
+
branches: [ main ]
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
CI: true
|
|
19
|
+
MINDFORGE_CI: true
|
|
20
|
+
NODE_VERSION: '20'
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
mindforge-health:
|
|
24
|
+
name: MindForge Health Check
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0 # Full history for git-based checks
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-node@v4
|
|
32
|
+
with:
|
|
33
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
34
|
+
cache: 'npm'
|
|
35
|
+
|
|
36
|
+
- name: Install MindForge
|
|
37
|
+
run: npx mindforge-cc@latest --claude --local
|
|
38
|
+
|
|
39
|
+
- name: Validate MINDFORGE.md
|
|
40
|
+
run: node bin/validate-config.js
|
|
41
|
+
|
|
42
|
+
- name: Run MindForge health check
|
|
43
|
+
run: |
|
|
44
|
+
# Health check in CI mode — outputs structured JSON
|
|
45
|
+
echo "::group::MindForge Health Report"
|
|
46
|
+
node -e "
|
|
47
|
+
// CI health check simulation
|
|
48
|
+
// In full implementation: calls mindforge health engine
|
|
49
|
+
const fs = require('fs');
|
|
50
|
+
const files = ['.planning/AUDIT.jsonl', '.planning/STATE.md', '.planning/HANDOFF.json'];
|
|
51
|
+
let allPresent = true;
|
|
52
|
+
files.forEach(f => {
|
|
53
|
+
if (!fs.existsSync(f)) {
|
|
54
|
+
console.log('::warning::Missing state file: ' + f);
|
|
55
|
+
allPresent = false;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
console.log(allPresent ? '::notice::All state files present' : '::warning::Some state files missing');
|
|
59
|
+
"
|
|
60
|
+
echo "::endgroup::"
|
|
61
|
+
|
|
62
|
+
mindforge-security:
|
|
63
|
+
name: Security Scan
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
needs: mindforge-health
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/checkout@v4
|
|
68
|
+
|
|
69
|
+
- uses: actions/setup-node@v4
|
|
70
|
+
with:
|
|
71
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
72
|
+
cache: 'npm'
|
|
73
|
+
|
|
74
|
+
- name: Install dependencies
|
|
75
|
+
run: npm ci
|
|
76
|
+
|
|
77
|
+
- name: MindForge secret detection
|
|
78
|
+
run: |
|
|
79
|
+
echo "::group::Secret Detection"
|
|
80
|
+
# Secret patterns — exits non-zero if found
|
|
81
|
+
if grep -rE "(sk-[a-zA-Z0-9]{20,}|ghp_[a-zA-Z0-9]+|xoxb-[a-zA-Z0-9-]+)" \
|
|
82
|
+
--include="*.ts" --include="*.js" --include="*.json" \
|
|
83
|
+
--exclude-dir=node_modules --exclude-dir=.git \
|
|
84
|
+
. 2>/dev/null; then
|
|
85
|
+
echo "::error::Credentials detected in source files. Remove before merging."
|
|
86
|
+
exit 1
|
|
87
|
+
fi
|
|
88
|
+
echo "::notice::No credentials detected ✅"
|
|
89
|
+
echo "::endgroup::"
|
|
90
|
+
|
|
91
|
+
- name: Dependency audit
|
|
92
|
+
run: |
|
|
93
|
+
echo "::group::Dependency Audit"
|
|
94
|
+
npm audit --audit-level=high 2>&1 || {
|
|
95
|
+
echo "::error::High/critical vulnerabilities found. Run: npm audit fix"
|
|
96
|
+
exit 1
|
|
97
|
+
}
|
|
98
|
+
echo "::endgroup::"
|
|
99
|
+
|
|
100
|
+
mindforge-quality:
|
|
101
|
+
name: Code Quality Gates
|
|
102
|
+
runs-on: ubuntu-latest
|
|
103
|
+
needs: mindforge-health
|
|
104
|
+
env:
|
|
105
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
|
|
109
|
+
- uses: actions/setup-node@v4
|
|
110
|
+
with:
|
|
111
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
112
|
+
cache: 'npm'
|
|
113
|
+
|
|
114
|
+
- name: Install dependencies
|
|
115
|
+
run: npm ci
|
|
116
|
+
|
|
117
|
+
- name: Type check
|
|
118
|
+
run: npx tsc --noEmit 2>&1 | while read line; do
|
|
119
|
+
echo "::error::$line"
|
|
120
|
+
done
|
|
121
|
+
|
|
122
|
+
- name: Lint
|
|
123
|
+
run: npx eslint . --ext .ts,.tsx --max-warnings 0
|
|
124
|
+
|
|
125
|
+
- name: Test suite with coverage
|
|
126
|
+
run: npm test -- --coverage
|
|
127
|
+
env:
|
|
128
|
+
COVERAGE_THRESHOLD: 80
|
|
129
|
+
|
|
130
|
+
- name: Check coverage threshold
|
|
131
|
+
run: |
|
|
132
|
+
COVERAGE=$(cat coverage/coverage-summary.json 2>/dev/null | \
|
|
133
|
+
node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); \
|
|
134
|
+
console.log(Math.floor(d.total.lines.pct))" 2>/dev/null || echo "0")
|
|
135
|
+
MIN=${CI_MIN_COVERAGE_PCT:-80}
|
|
136
|
+
if [ "${COVERAGE}" -lt "${MIN}" ]; then
|
|
137
|
+
echo "::error::Coverage ${COVERAGE}% is below minimum ${MIN}%"
|
|
138
|
+
exit 1
|
|
139
|
+
fi
|
|
140
|
+
echo "::notice::Coverage: ${COVERAGE}% ✅"
|
|
141
|
+
|
|
142
|
+
- name: Check governance tier (Tier 3 blocks CI)
|
|
143
|
+
run: |
|
|
144
|
+
# Check if any pending Tier 3 approvals exist without approval
|
|
145
|
+
PENDING_T3=$(find .planning/approvals/ -name "*.json" 2>/dev/null | \
|
|
146
|
+
xargs grep -l '"tier": 3' 2>/dev/null | \
|
|
147
|
+
xargs grep -l '"status": "pending"' 2>/dev/null | wc -l)
|
|
148
|
+
|
|
149
|
+
if [ "${PENDING_T3}" -gt 0 ]; then
|
|
150
|
+
echo "::error title=Tier 3 Governance Block::${PENDING_T3} Tier 3 change(s) require compliance review."
|
|
151
|
+
echo "::error::Tier 3 changes (auth/payment/PII) cannot be auto-approved in CI."
|
|
152
|
+
echo "::error::To resolve: get human approval with /mindforge:approve [id], then push again."
|
|
153
|
+
cat >> "${GITHUB_STEP_SUMMARY}" << 'SUMMARY_EOF'
|
|
154
|
+
## 🔴 Governance Block: Tier 3 Approval Required
|
|
155
|
+
|
|
156
|
+
This PR contains changes that require compliance review (auth, payment, or PII handling).
|
|
157
|
+
|
|
158
|
+
**Next steps:**
|
|
159
|
+
1. Run `/mindforge:approve` to see pending approval requests
|
|
160
|
+
2. Have your compliance officer approve with `/mindforge:approve [id]`
|
|
161
|
+
3. Push again — CI will pass once the approval is recorded
|
|
162
|
+
|
|
163
|
+
See `.planning/approvals/` for details.
|
|
164
|
+
SUMMARY_EOF
|
|
165
|
+
exit 1
|
|
166
|
+
fi
|
|
167
|
+
|
|
168
|
+
echo "::notice::Governance check passed — no pending Tier 3 blocks ✅"
|
|
169
|
+
|
|
170
|
+
mindforge-ai-review:
|
|
171
|
+
name: AI Code Review
|
|
172
|
+
runs-on: ubuntu-latest
|
|
173
|
+
needs: [mindforge-security, mindforge-quality]
|
|
174
|
+
if: github.event_name == 'pull_request'
|
|
175
|
+
env:
|
|
176
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
177
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
178
|
+
steps:
|
|
179
|
+
- uses: actions/checkout@v4
|
|
180
|
+
with:
|
|
181
|
+
fetch-depth: 0
|
|
182
|
+
|
|
183
|
+
- uses: actions/setup-node@v4
|
|
184
|
+
with:
|
|
185
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
186
|
+
cache: 'npm'
|
|
187
|
+
|
|
188
|
+
- name: Install MindForge
|
|
189
|
+
run: npx mindforge-cc@latest --claude --local
|
|
190
|
+
|
|
191
|
+
- name: Run AI PR Review
|
|
192
|
+
run: |
|
|
193
|
+
if [ -z "${ANTHROPIC_API_KEY}" ]; then
|
|
194
|
+
echo "::notice::ANTHROPIC_API_KEY not set — skipping AI review"
|
|
195
|
+
exit 0
|
|
196
|
+
fi
|
|
197
|
+
|
|
198
|
+
# Get the diff for this PR
|
|
199
|
+
git diff ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} > /tmp/pr.diff
|
|
200
|
+
|
|
201
|
+
# Run MindForge AI review (outputs GitHub annotations)
|
|
202
|
+
node -e "
|
|
203
|
+
// Placeholder for AI review execution
|
|
204
|
+
// In full implementation: calls Claude API via the pr-review engine
|
|
205
|
+
console.log('::notice::AI PR review completed — see review comment on PR');
|
|
206
|
+
"
|
|
207
|
+
|
|
208
|
+
- name: Post review as PR comment
|
|
209
|
+
uses: actions/github-script@v7
|
|
210
|
+
with:
|
|
211
|
+
script: |
|
|
212
|
+
const fs = require('fs');
|
|
213
|
+
const review = fs.existsSync('/tmp/mindforge-review.md') ?
|
|
214
|
+
fs.readFileSync('/tmp/mindforge-review.md', 'utf8') :
|
|
215
|
+
'✅ MindForge AI review: no significant issues found.';
|
|
216
|
+
|
|
217
|
+
await github.rest.pulls.createReview({
|
|
218
|
+
owner: context.repo.owner,
|
|
219
|
+
repo: context.repo.repo,
|
|
220
|
+
pull_number: context.issue.number,
|
|
221
|
+
body: review,
|
|
222
|
+
event: 'COMMENT'
|
|
223
|
+
});
|
|
224
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# MindForge — GitLab CI Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define a GitLab CI template that runs MindForge in CI mode.
|
|
5
|
+
|
|
6
|
+
## Example `.gitlab-ci.yml`
|
|
7
|
+
|
|
8
|
+
```yaml
|
|
9
|
+
stages:
|
|
10
|
+
- mindforge
|
|
11
|
+
|
|
12
|
+
mindforge:
|
|
13
|
+
stage: mindforge
|
|
14
|
+
image: node:20
|
|
15
|
+
variables:
|
|
16
|
+
CI: "true"
|
|
17
|
+
MINDFORGE_CI: "true"
|
|
18
|
+
script:
|
|
19
|
+
- npx mindforge-cc@latest --claude --local
|
|
20
|
+
- node bin/validate-config.js
|
|
21
|
+
- node tests/ci-mode.test.js
|
|
22
|
+
artifacts:
|
|
23
|
+
when: always
|
|
24
|
+
paths:
|
|
25
|
+
- .planning/HANDOFF.json
|
|
26
|
+
- .planning/STATE.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Notes
|
|
30
|
+
- Add secrets (ANTHROPIC_API_KEY, SLACK_BOT_TOKEN, etc.) to GitLab CI variables.
|
|
31
|
+
- If CI times out, MindForge exits 0 and preserves HANDOFF.json for the next run.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# MindForge — Jenkins Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Provide a Jenkins pipeline snippet for MindForge CI mode.
|
|
5
|
+
|
|
6
|
+
## Example Jenkinsfile
|
|
7
|
+
|
|
8
|
+
```groovy
|
|
9
|
+
pipeline {
|
|
10
|
+
agent any
|
|
11
|
+
environment {
|
|
12
|
+
CI = 'true'
|
|
13
|
+
MINDFORGE_CI = 'true'
|
|
14
|
+
ANTHROPIC_API_KEY = credentials('anthropic-api-key')
|
|
15
|
+
}
|
|
16
|
+
stages {
|
|
17
|
+
stage('Install') {
|
|
18
|
+
steps {
|
|
19
|
+
sh 'npm ci'
|
|
20
|
+
sh 'npx mindforge-cc@latest --claude --local'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
stage('Validate') {
|
|
24
|
+
steps {
|
|
25
|
+
sh 'node bin/validate-config.js'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
stage('MindForge CI') {
|
|
29
|
+
steps {
|
|
30
|
+
sh 'node tests/ci-mode.test.js'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
post {
|
|
35
|
+
always {
|
|
36
|
+
archiveArtifacts artifacts: '.planning/HANDOFF.json,.planning/STATE.md', fingerprint: true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
- Jenkins treats any non-zero exit code as failure, so timeouts should exit 0.
|
|
44
|
+
- Use Jenkins credentials store for API keys.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# MindForge Skills Registry — Client Protocol
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define how MindForge discovers, downloads, validates, and installs skills
|
|
5
|
+
from the public or private npm-based registry.
|
|
6
|
+
|
|
7
|
+
## Installation flow
|
|
8
|
+
|
|
9
|
+
### Step 1 — Resolve package name
|
|
10
|
+
```bash
|
|
11
|
+
# From skill name to package name:
|
|
12
|
+
SKILL_NAME="security-owasp"
|
|
13
|
+
PACKAGE_NAME="mindforge-skill-${SKILL_NAME}"
|
|
14
|
+
|
|
15
|
+
# Or if user provides full package name:
|
|
16
|
+
PACKAGE_NAME="mindforge-skill-security-owasp"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Step 2 — Check if already installed
|
|
20
|
+
```bash
|
|
21
|
+
# Check local MANIFEST.md
|
|
22
|
+
grep "| ${SKILL_NAME} |" .mindforge/org/skills/MANIFEST.md && echo "Already installed"
|
|
23
|
+
|
|
24
|
+
# Check if SKILL.md exists
|
|
25
|
+
[ -f ".mindforge/skills/${SKILL_NAME}/SKILL.md" ] && echo "Skill file exists"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Step 3 — Secure temp directory creation
|
|
29
|
+
```bash
|
|
30
|
+
# Create temp directory with user-only permissions (prevents TOCTOU attacks)
|
|
31
|
+
TEMP_DIR=$(mktemp -d)
|
|
32
|
+
chmod 700 "${TEMP_DIR}"
|
|
33
|
+
|
|
34
|
+
# All subsequent operations in this directory are protected
|
|
35
|
+
npm pack "${PACKAGE_NAME}@latest" --pack-destination "${TEMP_DIR}" --quiet
|
|
36
|
+
|
|
37
|
+
# Verify the tarball was downloaded (not empty, not corrupted)
|
|
38
|
+
TARBALL=$(ls "${TEMP_DIR}"/*.tgz 2>/dev/null | head -1)
|
|
39
|
+
if [ -z "${TARBALL}" ]; then
|
|
40
|
+
rm -rf "${TEMP_DIR}"
|
|
41
|
+
echo "Error: Failed to download ${PACKAGE_NAME} — no tarball produced"
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Verify tarball size is reasonable (not 0 bytes, not suspiciously large)
|
|
46
|
+
TARBALL_SIZE=$(wc -c < "${TARBALL}")
|
|
47
|
+
if [ "${TARBALL_SIZE}" -lt 100 ]; then
|
|
48
|
+
rm -rf "${TEMP_DIR}"
|
|
49
|
+
echo "Error: Downloaded tarball is suspiciously small (${TARBALL_SIZE} bytes)"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
tar -xzf "${TARBALL}" --strip-components=1 -C "${TEMP_DIR}"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 4 — Validate the downloaded skill
|
|
57
|
+
Run the full skill validator (see `skill-validator.md`) against the downloaded SKILL.md.
|
|
58
|
+
If validation fails: abort installation. Never install a skill that fails validation.
|
|
59
|
+
|
|
60
|
+
For public registry installs: run Level 3 validation as well. Warn on failures but do not
|
|
61
|
+
block install. For private registry installs: Level 2 is sufficient.
|
|
62
|
+
|
|
63
|
+
### Step 4.5 — Dependency audit (optional but recommended)
|
|
64
|
+
If the skill package includes scripts with dependencies, run an audit:
|
|
65
|
+
```bash
|
|
66
|
+
if [ -f "${TEMP_DIR}/package.json" ]; then
|
|
67
|
+
npm audit --prefix "${TEMP_DIR}" --audit-level=high || {
|
|
68
|
+
echo "Warning: HIGH/CRITICAL vulnerabilities detected in skill dependencies"
|
|
69
|
+
SKILL_DEPENDENCY_VULN=true
|
|
70
|
+
}
|
|
71
|
+
fi
|
|
72
|
+
```
|
|
73
|
+
If vulnerabilities were found, warn but allow install. Record in AUDIT:
|
|
74
|
+
`"skill_dependency_vulnerability": true`.
|
|
75
|
+
|
|
76
|
+
### Step 5 — Injection guard check
|
|
77
|
+
Run the injection guard from Day 3 (`loader.md`) against the skill content.
|
|
78
|
+
If injection patterns detected: abort, write AUDIT entry, alert user.
|
|
79
|
+
|
|
80
|
+
### Step 6 — Install to correct tier location
|
|
81
|
+
```bash
|
|
82
|
+
# Determine target tier from user input or package.json tier-recommendation
|
|
83
|
+
TIER="${USER_SPECIFIED_TIER:-2}"
|
|
84
|
+
|
|
85
|
+
if [ "${TIER}" = "1" ]; then
|
|
86
|
+
TARGET_DIR=".mindforge/skills/${SKILL_NAME}"
|
|
87
|
+
elif [ "${TIER}" = "2" ]; then
|
|
88
|
+
TARGET_DIR=".mindforge/org/skills/${SKILL_NAME}"
|
|
89
|
+
else
|
|
90
|
+
TARGET_DIR=".mindforge/project-skills/${SKILL_NAME}"
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
mkdir -p "${TARGET_DIR}"
|
|
94
|
+
cp "${TEMP_DIR}/SKILL.md" "${TARGET_DIR}/SKILL.md"
|
|
95
|
+
[ -d "${TEMP_DIR}/examples" ] && cp -r "${TEMP_DIR}/examples" "${TARGET_DIR}/"
|
|
96
|
+
[ -d "${TEMP_DIR}/scripts" ] && cp -r "${TEMP_DIR}/scripts" "${TARGET_DIR}/"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Step 7 — Register in MANIFEST.md
|
|
100
|
+
```bash
|
|
101
|
+
# Add entry to the correct tier section of MANIFEST.md
|
|
102
|
+
SKILL_VERSION=$(node -e "console.log(require('${TEMP_DIR}/package.json').version)")
|
|
103
|
+
|
|
104
|
+
# Insert into MANIFEST.md under the appropriate tier section
|
|
105
|
+
# Format: | name | version | stable | min-mf-version | path |
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Step 8 — Clean up and report
|
|
109
|
+
```bash
|
|
110
|
+
rm -rf "${TEMP_DIR}"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Report to user:
|
|
114
|
+
```
|
|
115
|
+
✅ Skill installed: ${SKILL_NAME} v${SKILL_VERSION} (Tier ${TIER})
|
|
116
|
+
Triggers: [list from SKILL.md frontmatter]
|
|
117
|
+
Path: ${TARGET_DIR}/SKILL.md
|
|
118
|
+
|
|
119
|
+
Run /mindforge:skills validate to confirm installation.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Step 9 — Write AUDIT entry
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"event": "skill_installed",
|
|
126
|
+
"skill_name": "security-owasp",
|
|
127
|
+
"skill_version": "1.2.0",
|
|
128
|
+
"package_name": "mindforge-skill-security-owasp",
|
|
129
|
+
"tier": 2,
|
|
130
|
+
"source": "npm-registry | private-registry",
|
|
131
|
+
"validation_passed": true,
|
|
132
|
+
"skill_dependency_vulnerability": false
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Update protocol
|
|
137
|
+
|
|
138
|
+
### Check for updates
|
|
139
|
+
```bash
|
|
140
|
+
# Compare installed version against registry latest
|
|
141
|
+
INSTALLED=$(grep "| ${SKILL_NAME} |" MANIFEST.md | awk -F'|' '{print $3}' | tr -d ' ')
|
|
142
|
+
LATEST=$(npm info "${PACKAGE_NAME}" version --prefer-offline 2>/dev/null)
|
|
143
|
+
|
|
144
|
+
if [ "${INSTALLED}" != "${LATEST}" ]; then
|
|
145
|
+
echo "Update available: ${SKILL_NAME} v${INSTALLED} → v${LATEST}"
|
|
146
|
+
fi
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Update a skill
|
|
150
|
+
```bash
|
|
151
|
+
# Run install flow for latest version
|
|
152
|
+
# If MAJOR version bump: show breaking changes, require confirmation
|
|
153
|
+
# If MINOR/PATCH: update silently
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Uninstall protocol
|
|
157
|
+
```bash
|
|
158
|
+
# Remove skill files
|
|
159
|
+
rm -rf "${TARGET_DIR}"
|
|
160
|
+
|
|
161
|
+
# Remove from MANIFEST.md
|
|
162
|
+
sed -i "/| ${SKILL_NAME} |/d" .mindforge/org/skills/MANIFEST.md
|
|
163
|
+
|
|
164
|
+
# Write AUDIT entry
|
|
165
|
+
# Commit: "chore(skills): uninstall ${SKILL_NAME}"
|
|
166
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# MindForge Skills Registry — Schema & Protocol
|
|
2
|
+
|
|
3
|
+
## Registry concept
|
|
4
|
+
The public MindForge Skills Registry is an npm-based distribution system.
|
|
5
|
+
Skills are published as npm packages with the `mindforge-skill-` prefix.
|
|
6
|
+
The registry leverages the existing npm ecosystem for versioning, discovery,
|
|
7
|
+
and distribution.
|
|
8
|
+
|
|
9
|
+
## Package naming convention
|
|
10
|
+
```
|
|
11
|
+
mindforge-skill-[category]-[name]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
- `mindforge-skill-security-owasp` — OWASP security review skill
|
|
16
|
+
- `mindforge-skill-db-postgres-patterns` — PostgreSQL-specific patterns
|
|
17
|
+
- `mindforge-skill-frontend-react-a11y` — React accessibility patterns
|
|
18
|
+
- `mindforge-skill-testing-playwright` — Playwright E2E testing patterns
|
|
19
|
+
- `mindforge-skill-api-graphql` — GraphQL API design patterns
|
|
20
|
+
|
|
21
|
+
## Package structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
mindforge-skill-[category]-[name]/
|
|
25
|
+
├── SKILL.md ← The skill file (required)
|
|
26
|
+
├── package.json ← npm metadata
|
|
27
|
+
├── README.md ← Human documentation
|
|
28
|
+
├── CHANGELOG.md ← Version history
|
|
29
|
+
├── examples/ ← Optional usage examples
|
|
30
|
+
│ └── example-task.md
|
|
31
|
+
├── scripts/ ← Optional helper scripts
|
|
32
|
+
│ └── helper.sh
|
|
33
|
+
└── tests/
|
|
34
|
+
└── skill.test.js ← Skill validation tests
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## `package.json` for a skill package
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"name": "mindforge-skill-security-owasp",
|
|
42
|
+
"version": "1.2.0",
|
|
43
|
+
"description": "OWASP Top 10 security review skill for MindForge",
|
|
44
|
+
"keywords": [
|
|
45
|
+
"mindforge",
|
|
46
|
+
"mindforge-skill",
|
|
47
|
+
"security",
|
|
48
|
+
"owasp",
|
|
49
|
+
"agentic-framework"
|
|
50
|
+
],
|
|
51
|
+
"mindforge": {
|
|
52
|
+
"type": "skill",
|
|
53
|
+
"skill-name": "security-owasp",
|
|
54
|
+
"category": "security",
|
|
55
|
+
"min-mindforge-version": "0.5.0",
|
|
56
|
+
"triggers": ["OWASP", "security review", "injection", "auth", "XSS"],
|
|
57
|
+
"tier-recommendation": 1
|
|
58
|
+
},
|
|
59
|
+
"files": ["SKILL.md", "README.md", "examples/", "scripts/"],
|
|
60
|
+
"license": "MIT",
|
|
61
|
+
"homepage": "https://mindforge.dev/skills/security-owasp",
|
|
62
|
+
"repository": { "type": "git", "url": "https://github.com/mindforge-dev/skill-security-owasp" }
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Registry discovery
|
|
67
|
+
|
|
68
|
+
The MindForge registry is the standard npm registry with keyword filtering:
|
|
69
|
+
```bash
|
|
70
|
+
# Search for skills
|
|
71
|
+
npm search mindforge-skill [query]
|
|
72
|
+
|
|
73
|
+
# Example searches:
|
|
74
|
+
npm search mindforge-skill security # Find security skills
|
|
75
|
+
npm search mindforge-skill react # Find React-specific skills
|
|
76
|
+
npm search mindforge-skill testing # Find testing skills
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Registry quality standards
|
|
80
|
+
|
|
81
|
+
A skill package published to the MindForge registry must pass:
|
|
82
|
+
1. Schema validation: `npx mindforge-cc validate-skill ./SKILL.md`
|
|
83
|
+
2. Required metadata: package.json `mindforge` field fully populated
|
|
84
|
+
3. No malicious content: npm security audit passes
|
|
85
|
+
4. Version policy: follows semver with documented breaking changes
|
|
86
|
+
5. License: MIT, Apache-2.0, or BSD (GPL derivatives not accepted)
|
|
87
|
+
|
|
88
|
+
## Local registry (private skills)
|
|
89
|
+
|
|
90
|
+
Organisations with private skills can use:
|
|
91
|
+
- Private npm registry (Verdaccio, Artifactory, GitHub Packages)
|
|
92
|
+
- Configure in `.mindforge/org/integrations/INTEGRATIONS-CONFIG.md`:
|
|
93
|
+
```
|
|
94
|
+
MINDFORGE_SKILL_REGISTRY=https://npm.your-org.internal/
|
|
95
|
+
```
|
|
96
|
+
- Skills from private registry install with the same `npx mindforge-skills install` command
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# MindForge Skills Registry — Skill Publisher
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define the publish workflow for MindForge skills to npm (public or private).
|
|
5
|
+
Used by `/mindforge:publish-skill`.
|
|
6
|
+
|
|
7
|
+
## Publish workflow
|
|
8
|
+
|
|
9
|
+
1. Validate SKILL.md (Levels 1, 2, and 3).
|
|
10
|
+
2. Confirm `package.json` includes required `mindforge` metadata.
|
|
11
|
+
3. Verify `CHANGELOG.md` has an entry for the current version.
|
|
12
|
+
4. Check if version already exists on the registry.
|
|
13
|
+
5. Preview files with `npm pack --dry-run`.
|
|
14
|
+
6. Confirm with the user.
|
|
15
|
+
7. Publish.
|
|
16
|
+
8. Verify publish succeeded.
|
|
17
|
+
9. Write AUDIT entry.
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Level 1 + 2 + 3 validation
|
|
23
|
+
npx mindforge-cc validate-skill ./SKILL.md --quality
|
|
24
|
+
|
|
25
|
+
# Version check
|
|
26
|
+
npm info ${PACKAGE_NAME}@${VERSION}
|
|
27
|
+
|
|
28
|
+
# Dry-run preview
|
|
29
|
+
npm pack --dry-run
|
|
30
|
+
|
|
31
|
+
# Publish
|
|
32
|
+
npm publish --access public
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Audit entry
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"event": "skill_published",
|
|
40
|
+
"package": "mindforge-skill-security-owasp",
|
|
41
|
+
"version": "1.2.0",
|
|
42
|
+
"registry": "https://registry.npmjs.org/"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# MindForge Skills Registry — Skill Validator
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Validate a SKILL.md file before installation or publication.
|
|
5
|
+
Run as part of both `install-skill` and `publish-skill` commands.
|
|
6
|
+
|
|
7
|
+
## Validation levels
|
|
8
|
+
|
|
9
|
+
### Level 1 — Schema validation (always runs)
|
|
10
|
+
```bash
|
|
11
|
+
npx mindforge-cc validate-skill ./SKILL.md
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Checks:
|
|
15
|
+
- [ ] File starts with `---` (YAML frontmatter delimiter)
|
|
16
|
+
- [ ] Frontmatter closes with `---`
|
|
17
|
+
- [ ] `name:` field present and matches kebab-case pattern `[a-z][a-z0-9-]+`
|
|
18
|
+
- [ ] `version:` field present and valid semver `\d+\.\d+\.\d+`
|
|
19
|
+
- [ ] `status:` is one of: `stable`, `beta`, `alpha`, `deprecated`
|
|
20
|
+
- [ ] `triggers:` field present and has >= 5 keywords
|
|
21
|
+
- [ ] No trigger keyword is fewer than 3 characters (too generic)
|
|
22
|
+
- [ ] `min_mindforge_version:` present and valid semver
|
|
23
|
+
|
|
24
|
+
### Level 2 — Content validation (runs after schema passes)
|
|
25
|
+
- [ ] File size between 1KB and 200KB (not too small, not too large)
|
|
26
|
+
- [ ] Contains `## Mandatory actions` or `## When this skill is active` section
|
|
27
|
+
- [ ] Contains at least one checklist item (`- [ ]`) for self-verification
|
|
28
|
+
- [ ] Does not contain any injection patterns (from `loader.md` guard)
|
|
29
|
+
- [ ] Code examples have language specifiers in code fences (not bare ```)
|
|
30
|
+
- [ ] No placeholder text: `[placeholder]`, `[your-name]`, `TODO`, `FIXME`, `[fill this in]`
|
|
31
|
+
|
|
32
|
+
### Level 3 — Quality validation (required for publish, recommended for public install)
|
|
33
|
+
- [ ] At least 3 code examples
|
|
34
|
+
- [ ] CHANGELOG in frontmatter has at least current version entry
|
|
35
|
+
- [ ] `breaking_changes:` field present (even if empty list)
|
|
36
|
+
- [ ] Examples directory has at least one example file
|
|
37
|
+
- [ ] README.md exists in the package
|
|
38
|
+
|
|
39
|
+
**Install rule:**
|
|
40
|
+
- Public registry installs: run Level 3 and warn on failures (do not block)
|
|
41
|
+
- Private registry installs: Level 2 is sufficient
|
|
42
|
+
|
|
43
|
+
## Validator output
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
MindForge Skill Validator — SKILL.md
|
|
47
|
+
──────────────────────────────────────────────────────────────
|
|
48
|
+
|
|
49
|
+
Schema validation:
|
|
50
|
+
✅ Frontmatter valid
|
|
51
|
+
✅ name: security-owasp (valid)
|
|
52
|
+
✅ version: 1.2.0 (valid semver)
|
|
53
|
+
✅ status: stable
|
|
54
|
+
✅ triggers: 31 keywords (min: 5)
|
|
55
|
+
✅ min_mindforge_version: 0.5.0
|
|
56
|
+
|
|
57
|
+
Content validation:
|
|
58
|
+
✅ File size: 8.4KB (1KB-200KB range)
|
|
59
|
+
✅ Mandatory actions section present
|
|
60
|
+
✅ Self-check checklist present (7 items)
|
|
61
|
+
✅ No injection patterns detected
|
|
62
|
+
✅ Code examples have language specifiers
|
|
63
|
+
✅ No placeholder text found
|
|
64
|
+
|
|
65
|
+
Quality validation:
|
|
66
|
+
✅ 5 code examples found
|
|
67
|
+
✅ CHANGELOG has version 1.2.0 entry
|
|
68
|
+
✅ Breaking changes documented
|
|
69
|
+
⚠️ Examples directory has 1 file (recommend: 3+)
|
|
70
|
+
|
|
71
|
+
──────────────────────────────────────────────────────────────
|
|
72
|
+
Result: VALID with 1 warning
|
|
73
|
+
Ready for: installation ✅ | publication ✅ (warning noted)
|
|
74
|
+
```
|