Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "claude-self-learning",
"version": "1.1.0",
"description": "Autonomously research any technology and generate reusable Claude Code skills"
"version": "2.0.0",
"description": "Zero-cost, local-first Claude plugin for skill management and code intelligence"
}
23 changes: 23 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"es2022": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"no-console": "off"
},
"ignorePatterns": ["dist/", "node_modules/", "coverage/"]
}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules/
dist/
coverage/
*.log
.env
.DS_Store
*.tsbuildinfo
.vscode/
.idea/
.eslintcache
*.swp
*.swo
*~
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2024-02-10

### Added

- **Zero-cost, local-first architecture** - Complete rewrite eliminating all external API dependencies
- **Smart quality scoring system** - Automatic 0-100 scoring with 20+ validation checks
- **Instant fuzzy search** - Fast skill discovery with intelligent matching
- **Auto-indexing system** - Persistent skill index for O(1) lookups
- **Rich template system** - API library, framework, CLI tool, and minimal templates
- **Code intelligence** - Automatic extraction and validation of code blocks
- **Security scanning** - Detection of hardcoded credentials and insecure patterns
- **Multi-location support** - Local, global, and plugin storage locations
- **Analytics dashboard** - Track skill quality and usage statistics
- **Comprehensive test suite** - 38 unit tests with >70% coverage
- **Full TypeScript implementation** - Type-safe with Zod validation
- **Production-ready CLI** - Beautiful terminal UI with Commander, Chalk, and Ora
- **Quality checker module** - Validates content structure, completeness, and security
- **Template engine** - Generate consistent, high-quality skills
- **Skill manager** - Core API for skill operations

### Changed

- **Breaking**: Removed all external API dependencies (Anthropic, OpenAI, Brave, etc.)
- **Breaking**: Changed from AI-powered research to template-based skill creation
- Refactored entire codebase from specification-only to production implementation
- Updated README with new zero-cost approach and feature set
- Improved documentation with architecture diagrams and examples

### Removed

- External API integrations (Anthropic, OpenAI, web search)
- Agent orchestrator (replaced with templates)
- Web researcher module (no longer needed)
- API key configuration requirements

## [1.1.0] - Previous Version

### Fixed

- Correct agent invocation
- Remove duplicate plugin.json

## [1.0.0] - Initial Release

### Added

- Initial plugin specification
- Agent definitions (researcher, skill-generator)
- Command definitions (learn, list-skills, update-skill)
- Basic storage structure
203 changes: 203 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# Contributing to Claude Self-Learning

Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to the project.

## Development Setup

### Prerequisites

- Node.js >= 18.0.0
- npm or bun

### Installation

```bash
# Clone the repository
git clone https://github.com/ychampion/claude-self-learning.git
cd claude-self-learning

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run tests with coverage
npm run test:coverage
```

## Project Structure

```
claude-self-learning/
├── src/
│ ├── __tests__/ # Test files
│ │ ├── utils.test.ts
│ │ ├── quality-checker.test.ts
│ │ └── template-engine.test.ts
│ ├── cli.ts # CLI entry point
│ ├── config.ts # Configuration management
│ ├── index.ts # Library entry point
│ ├── quality-checker.ts # Quality validation
│ ├── skill-manager.ts # Core skill management
│ ├── template-engine.ts # Template system
│ ├── types.ts # TypeScript types
│ └── utils.ts # Utility functions
├── agents/ # Agent specifications
├── commands/ # Command specifications
├── storage/ # Plugin skill storage
│ └── skills/
├── dist/ # Build output
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── vitest.config.ts
```

## Development Workflow

### 1. Create a Feature Branch

```bash
git checkout -b feature/your-feature-name
```

### 2. Make Your Changes

- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed

### 3. Run Tests

```bash
# Run all tests
npm test

# Run tests with coverage
npm run test:coverage

# Run linter
npm run lint

# Format code
npm run format
```

### 4. Build

```bash
npm run build
```

### 5. Submit a Pull Request

- Write a clear description of your changes
- Reference any related issues
- Ensure all tests pass

## Code Style Guidelines

### TypeScript

- Use TypeScript strict mode
- Always define types for function parameters and return values
- Use `const` over `let` when possible
- Prefer async/await over promises
- Use descriptive variable names

### Testing

- Write unit tests for all new functions
- Aim for >70% code coverage
- Use descriptive test names
- Group related tests using `describe` blocks
- Test both success and failure cases

### Commits

- Use conventional commit format: `type(scope): message`
- Types: `feat`, `fix`, `docs`, `test`, `refactor`, `chore`
- Keep commits focused and atomic

## Testing

### Running Tests

```bash
# Watch mode (default)
npm test

# Run once
npm test -- --run

# With coverage
npm run test:coverage

# Specific file
npm test utils.test.ts
```

### Writing Tests

Example test structure:

```typescript
import { describe, it, expect } from 'vitest';
import { yourFunction } from '../your-module.js';

describe('YourModule', () => {
describe('yourFunction', () => {
it('should handle valid input', () => {
const result = yourFunction('input');
expect(result).toBe('expected');
});

it('should handle edge cases', () => {
expect(() => yourFunction(null)).toThrow();
});
});
});
```

## Adding New Features

### Adding a New Template

1. Edit `src/template-engine.ts`
2. Add template to `getTemplates()` method
3. Add tests in `src/__tests__/template-engine.test.ts`
4. Update README documentation

### Adding a New Quality Check

1. Edit `src/quality-checker.ts`
2. Add check method
3. Call from `check()` method
4. Add tests in `src/__tests__/quality-checker.test.ts`

### Adding a New CLI Command

1. Edit `src/cli.ts`
2. Add command using Commander.js
3. Implement command logic
4. Update README documentation

## Release Process

1. Update version in `package.json`
2. Update CHANGELOG.md
3. Run `npm run build`
4. Create git tag: `git tag v2.0.0`
5. Push: `git push && git push --tags`

## Questions?

Open an issue or start a discussion on GitHub.

## License

By contributing, you agree that your contributions will be licensed under the MIT License.
Loading