From 18f85f2275da56f7f0e1704b351b51d7dc0fd26f Mon Sep 17 00:00:00 2001 From: agent-core-bot Date: Sun, 22 Feb 2026 00:25:37 +0000 Subject: [PATCH] chore: sync core lib and CLAUDE.md from agent-core --- CLAUDE.md | 55 +++++++++++++++++++++++++ lib/discovery/index.js | 25 ----------- lib/package.json | 25 +++++++++++ lib/schemas/plugin-manifest.schema.json | 14 ------- 4 files changed, 80 insertions(+), 39 deletions(-) create mode 100644 CLAUDE.md create mode 100644 lib/package.json diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..ad7be84 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,55 @@ + +# learn + +> Research any topic online and create comprehensive learning guides with RAG-optimized indexes + +## Agents + +- learn-agent + +## Skills + +- learn + +## Commands + +- learn + +## Critical Rules + +1. **Plain text output** - No emojis, no ASCII art. Use `[OK]`, `[ERROR]`, `[WARN]`, `[CRITICAL]` for status markers. +2. **No unnecessary files** - Don't create summary files, plan files, audit files, or temp docs. +3. **Task is not done until tests pass** - Every feature/fix must have quality tests. +4. **Create PRs for non-trivial changes** - No direct pushes to main. +5. **Always run git hooks** - Never bypass pre-commit or pre-push hooks. +6. **Use single dash for em-dashes** - In prose, use ` - ` (single dash with spaces), never ` -- `. +7. **Report script failures before manual fallback** - Never silently bypass broken tooling. +8. **Token efficiency** - Be concise. Save tokens over decorations. + +## Model Selection + +| Model | When to Use | +|-------|-------------| +| **Opus** | Complex reasoning, analysis, planning | +| **Sonnet** | Validation, pattern matching, most agents | +| **Haiku** | Mechanical execution, no judgment needed | + +## Core Priorities + +1. User DX (plugin users first) +2. Worry-free automation +3. Token efficiency +4. Quality output +5. Simplicity + +## Dev Commands + +```bash +npm test # Run tests +npm run validate # All validators +``` + +## References + +- Part of the [agentsys](https://github.com/agent-sh/agentsys) ecosystem +- https://agentskills.io diff --git a/lib/discovery/index.js b/lib/discovery/index.js index 5969f71..4dd98b0 100644 --- a/lib/discovery/index.js +++ b/lib/discovery/index.js @@ -297,30 +297,6 @@ function getPluginPrefixRegex(repoRoot) { return new RegExp(`(${escaped.join('|')})`, 'g'); } -/** - * Discover plugins from marketplace.json instead of scanning the filesystem. - * Used in the post-extraction world where plugins/ no longer exists in agentsys. - * - * @param {string} [repoRoot] - Repository root path - * @returns {Array<{name: string, source: string, version: string, requires: string[], core: string}>} - */ -function discoverPluginsFromMarketplace(repoRoot) { - if (!repoRoot) { - repoRoot = path.resolve(__dirname, '..', '..'); - } - const marketplacePath = path.join(repoRoot, '.claude-plugin', 'marketplace.json'); - if (!fs.existsSync(marketplacePath)) return []; - - const marketplace = JSON.parse(fs.readFileSync(marketplacePath, 'utf8')); - return (marketplace.plugins || []).map(p => ({ - name: p.name, - source: p.source, - version: p.version, - requires: p.requires || [], - core: p.core || '' - })); -} - /** * Get all discovery results in a single call. * @@ -365,7 +341,6 @@ module.exports = { parseFrontmatter, isValidPluginName, discoverPlugins, - discoverPluginsFromMarketplace, discoverCommands, discoverAgents, discoverSkills, diff --git a/lib/package.json b/lib/package.json new file mode 100644 index 0000000..b4065fe --- /dev/null +++ b/lib/package.json @@ -0,0 +1,25 @@ +{ + "name": "@agentsys/lib", + "version": "4.2.0", + "description": "Core library for AgentSys: platform detection, pattern matching, workflow state, and utilities", + "main": "index.js", + "type": "commonjs", + "engines": { + "node": ">=18.0.0" + }, + "license": "MIT", + "author": { + "name": "Avi Fenesh", + "url": "https://github.com/avifenesh" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/agent-sh/agentsys.git", + "directory": "lib" + }, + "files": [ + "**/*.js", + "**/*.json", + "!**/*.test.js" + ] +} diff --git a/lib/schemas/plugin-manifest.schema.json b/lib/schemas/plugin-manifest.schema.json index b5cb8da..976f04b 100644 --- a/lib/schemas/plugin-manifest.schema.json +++ b/lib/schemas/plugin-manifest.schema.json @@ -52,20 +52,6 @@ "type": "array", "maxItems": 20, "uniqueItems": true - }, - "requires": { - "type": "array", - "items": { - "type": "string", - "pattern": "^[a-z][a-z0-9-]*$" - }, - "uniqueItems": true, - "description": "Other plugins this plugin depends on" - }, - "core": { - "type": "string", - "pattern": "^>=\\d+\\.\\d+\\.\\d+$", - "description": "Minimum agent-core version required" } } } \ No newline at end of file