Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills/memory-forge/resources/skill-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |
author: Memory Forge
version: 1.0.0
date: YYYY-MM-DD
importance: [1-10, where 10=critical knowledge that should never be forgotten, 5=useful but forgettable, 1=ephemeral/temporary]
---

# [Human-Readable Title]
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches: [master]
paths:
- 'tools/embeddings/**'
- '.github/workflows/ci.yml'
pull_request:
branches: [master]
paths:
- 'tools/embeddings/**'
- '.github/workflows/ci.yml'

jobs:
test:
name: Test
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/embeddings

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tools/embeddings/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
run: npm test

build:
name: Build Check
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/embeddings

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tools/embeddings/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Verify MCP server starts
run: |
timeout 5 node dist/mcp-server.js < /dev/null || true
echo "MCP server binary OK"
97 changes: 97 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
test:
name: Test before release
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/embeddings

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tools/embeddings/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
run: npm test

publish:
name: Publish to npm
needs: test
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/embeddings

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache-dependency-path: tools/embeddings/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Update package.json version
run: npm version ${{ steps.version.outputs.VERSION }} --no-git-tag-version

- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

github-release:
name: Create GitHub Release
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.version.outputs.VERSION }}
generate_release_notes: true
draft: false
prerelease: ${{ contains(steps.version.outputs.VERSION, '-') }}
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Memory Forge index
.memory-forge/

# Dependencies
node_modules/

# Build output
dist/

# IDE
.idea/
.vscode/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Test coverage
coverage/

# Logs
*.log
npm-debug.log*
1 change: 1 addition & 0 deletions .opencode/skill/memory-forge/resources/skill-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |
author: Memory Forge
version: 1.0.0
date: YYYY-MM-DD
importance: [1-10, where 10=critical knowledge that should never be forgotten, 5=useful but forgettable, 1=ephemeral/temporary]
---

# [Human-Readable Title]
Expand Down
54 changes: 54 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

Memory Forge is a **knowledge system**, not a tool. It's a skill (set of instructions in SKILL.md) that teaches AI coding agents how to:
- Recognize when valuable knowledge has been discovered during work sessions
- Decide where knowledge belongs (CLAUDE.md, AGENTS.md, or a new skill)
- Route knowledge correctly in monorepos
- Format knowledge for maximum future retrieval

## Repository Structure

```
.claude/skills/memory-forge/
├── SKILL.md # The main skill - core decision framework
└── resources/
└── skill-template.md # Template for creating new skills

.opencode/skill/memory-forge/ # Mirror for OpenCode compatibility

examples/
├── monorepo/ # Example monorepo with distributed CLAUDE.md files
└── single-service/ # Example single-service setup
```

## Key Files

- **`.claude/skills/memory-forge/SKILL.md`**: The core skill containing the decision framework, activation triggers, and knowledge extraction process
- **`.opencode/skill/memory-forge/SKILL.md`**: Identical copy for OpenCode compatibility (keep in sync)

## Development Guidelines

This project is documentation-focused. Contributions should improve:
- Decision heuristics for skills vs docs
- Routing logic for monorepos
- Examples of knowledge extraction
- The skill template clarity

Avoid adding complex tooling or CLI-specific features.

## CLI Compatibility

Memory Forge supports multiple AI coding tools through the Agent Skills standard:

| Tool | Context File | Skills Location |
|------|--------------|-----------------|
| Claude Code | CLAUDE.md | .claude/skills/ |
| OpenCode | AGENTS.md (priority) | .opencode/skill/ |
| Codex | AGENTS.md | .codex/skills/ |
| Cursor, Copilot | AGENTS.md | Agent Skills standard |

When updating the skill, update both `.claude/skills/` and `.opencode/skill/` to maintain sync.
8 changes: 8 additions & 0 deletions tools/embeddings/.mcp.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"memory-forge": {
"command": "npx",
"args": ["-y", "@memory-forge/embeddings"]
}
}
}
Loading