@heytherevibin/skillforge 0.7.0 → 0.10.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/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +30 -19
- package/README.md +248 -198
- package/RELEASING.md +19 -7
- package/SECURITY.md +61 -13
- package/STRATEGY.md +40 -14
- package/bin/cli.js +112 -5
- package/ci/bundle-gate.json +4 -0
- package/lib/host-setup.js +312 -0
- package/lib/templates/claude-code-skillforge-global.md +19 -0
- package/lib/templates/cursor-skillforge-global.md +16 -0
- package/package.json +3 -2
- package/python/app/eval_cli.py +133 -0
- package/python/app/feedback_meta.py +96 -0
- package/python/app/health_cli.py +160 -0
- package/python/app/main.py +502 -26
- package/python/app/materialize.py +72 -4
- package/python/app/mcp_contract.py +13 -1
- package/python/app/mcp_server.py +344 -25
- package/python/app/route_cli.py +32 -13
- package/python/app/route_eval_harness.py +98 -0
- package/python/app/route_policies.py +243 -0
- package/python/app/route_quality.py +99 -0
- package/python/app/routing_signals.py +155 -0
- package/python/app/weights_cli.py +152 -0
- package/python/fixtures/route_eval/smoke.json +18 -0
- package/python/requirements.txt +1 -0
- package/python/tests/test_feedback_weights.py +77 -0
- package/python/tests/test_materialize.py +51 -0
- package/python/tests/test_mcp_contract.py +117 -0
- package/python/tests/test_route_eval_harness.py +45 -0
- package/python/tests/test_route_policies.py +115 -0
- package/python/tests/test_route_quality.py +120 -0
- package/python/tests/test_routing_overlay.py +55 -0
- package/python/tests/test_routing_signals.py +112 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
- **CI:** Minimum bundled **`SKILL.md`** count is configured via **`ci/bundle-gate.json`** (`minSkillMdFiles`); **`.github/workflows/ci.yml`** reads that file. The **`ci/`** directory is included in the published package **`files`** list for transparency. Health + **route-eval** step chains both commands under a single **`cd python`** so the second command does not run from **`python/python`**.
|
|
6
|
+
- **MCP `_meta`:** **`schema_version` 1.7** — optional **`routing_overlay`** (project exclude / boost / notes audit). **1.6** — optional **`feedback_effect`** (learned-weight transparency after each route). **1.5** — optional **`route_quality`** (shortlist, hybrid, policy/session signals). Implemented in **`app/mcp_contract.py`** (see constant **`MCP_RESPONSE_SCHEMA_VERSION`**).
|
|
7
|
+
- **Project routing overlay:** optional **`exclude_skills`**, **`routing_boosts`**, **`project_notes`** (and aliases) in the same JSON document as regex **`rules`** — parsed by **`app/route_policies.py`**, applied in **`Router`** shortlists; **`project_notes`** require **`project_root`** to apply.
|
|
8
|
+
- **Operator CLIs:** **`skillforge health`** (`python/app/health_cli.py`), **`skillforge route-eval`** (`eval_cli` + fixtures under **`python/fixtures/route_eval/`**), **`skillforge weights export|import`** (`weights_cli.py`). CI runs **health --quick** and embedding **route-eval** with **`SKILLFORGE_BUNDLED_SKILLS`** set to the workspace skills tree.
|
|
9
|
+
- **MCP / search & explain:** **`search_skills`** and **`explain_route`** honor the same overlay + notes as **`route_skills`**; **`explain_route`** passes explicit shortlist **`k`** into **`Router.shortlist`**.
|
|
10
|
+
- **Fix:** **`skillforge route`** defines **`db_disp`** before use in host-pick output (**`route_cli.py`**).
|
|
11
|
+
|
|
12
|
+
## 0.9.0
|
|
13
|
+
|
|
14
|
+
- **Host-delegated routing:** set **`SKILLFORGE_ROUTER_MODE=host`** to skip the in-process Haiku pick. First **`route_skills`** call returns a tight numbered shortlist (markdown + **`_meta.host_pick_candidates`**); second call with **`picked_names`** loads context, policies, and session **`uses`** as usual. No **`ANTHROPIC_API_KEY`** required for the pick step. Tunables: **`SKILLFORGE_HOST_PICK_MAX`**, **`SKILLFORGE_HOST_PICK_LINE_CHARS`**.
|
|
15
|
+
- **`picked_names`** on **`route_skills`** (optional): in **`embedding`** / **`full`** modes, supplying **`picked_names`** skips auto-pick and uses the host list (unchanged behavior, now documented).
|
|
16
|
+
- **`skillforge_bootstrap`** returns an error when **`SKILLFORGE_ROUTER_MODE=host`** (use two-step **`route_skills`** + **`materialize_project`**).
|
|
17
|
+
- **CLI:** **`skillforge route --picked-names=a,b`** mirrors MCP finalize. **`--json-meta`** includes **`host_pick_shortlist`** when applicable.
|
|
18
|
+
- **Cursor (global `/skillforge`)** and **Claude Code**: on **`skillforge install`** / first-run setup, Skillforge writes **`~/.cursor/commands/skillforge.md`** and/or **`~/.claude/commands/skillforge.md`** when each environment is detected; **`skillforge hosts init`** updates both without Python setup. Opt out: **`SKILLFORGE_SKIP_CURSOR_SETUP`**, **`SKILLFORGE_SKIP_CLAUDE_CODE_SETUP`**. Force: **`SKILLFORGE_CURSOR_GLOBAL_COMMAND`**, **`SKILLFORGE_CLAUDE_CODE_GLOBAL_COMMAND`**. **`--force-cursor`** replaces managed files. **Claude Desktop** remains detect-only + MCP merge hint.
|
|
19
|
+
- **MCP** server version **0.9.0**; **`materialize_project`** writes per-repo **`.cursor/commands`** and **`.claude/commands`** **`/skillforge`** with **`skill_names`**.
|
|
20
|
+
|
|
21
|
+
## 0.8.0
|
|
22
|
+
|
|
23
|
+
- **Smarter routing:** optional **conversation-aware** shortlist query (`SKILLFORGE_ROUTER_CONV_*`), **hybrid** retrieval (`SKILLFORGE_ROUTER_HYBRID` = `keyword` or `bm25` + `SKILLFORGE_ROUTER_HYBRID_ALPHA`), optional **Haiku rerank** (`SKILLFORGE_HAIKU_RERANK`, `SKILLFORGE_HAIKU_RERANK_MAX`, `SKILLFORGE_HAIKU_RERANK_MODEL`).
|
|
24
|
+
- **Skill cards:** YAML **`triggers`** / **`anti_triggers`** on **`SKILL.md`** are parsed and folded into summary embeddings and router prompts via **`app/routing_signals.py`** (`skill_routing_card`). Chunk RAG still scores on the **current** user message.
|
|
25
|
+
- **Dependency:** **`rank-bm25`** in `python/requirements.txt` (BM25 hybrid; optional at runtime if you use `keyword` only).
|
|
26
|
+
|
|
27
|
+
## 0.7.1
|
|
28
|
+
|
|
29
|
+
- **MCP:** **`search_skills`** (embedding shortlist + snippets), **`explain_route`** (routing diagnostics, no DB writes), **`get_skill`** (fetch one **`SKILL.md`** by name).
|
|
30
|
+
- **Route policies:** optional **`SKILLFORGE_ROUTE_POLICIES`**, **`SKILLFORGE_ROUTE_POLICIES_FILE`**, or **`project_root`/** `.skillforge/policies.json` / **`skillforge-policies.json`** — regex rules append **`include`** skills after the router (capped by **`SKILLFORGE_MAX_ACTIVE`**). Audit stored on route events under **`policy`**.
|
|
31
|
+
|
|
3
32
|
## 0.7.0
|
|
4
33
|
|
|
5
34
|
- **Breaking:** Removed the optional **HTTP API** (`skillforge start`), **`skillforge chat`** harness, and **`skillforge auth`** (bearer tokens were only used by HTTP). MCP (`skillforge mcp`), **`skillforge route`**, **`skillforge events`**, and **`skillforge index`** are unchanged.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,38 +1,49 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Thank you for improving Skillforge.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. **Fork** the repository and create a branch from **`main`**.
|
|
8
|
+
2. Keep changes **focused**; follow patterns in surrounding code.
|
|
9
|
+
3. Run **local checks** before opening a PR from the **package root** (the directory that contains **`package.json`**):
|
|
6
10
|
|
|
7
|
-
1. **Fork** the repository and create a branch from `main`.
|
|
8
|
-
2. Make focused changes; match existing style in the touched files.
|
|
9
|
-
3. Run local checks before pushing:
|
|
10
11
|
```bash
|
|
11
12
|
node --check bin/cli.js && node --check lib/packs.js
|
|
12
13
|
npm test
|
|
13
14
|
```
|
|
14
|
-
4. Open a **pull request** into `main` with a clear description of the change and why.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
For Python (after **`pip install -r python/requirements.txt -r python/requirements-dev.txt`** from the same directory):
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
```bash
|
|
19
|
+
cd python && PYTHONPATH=. pytest tests/ -q
|
|
20
|
+
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
When you add a new **`python/app/*.py`** module, extend the **`py_compile`** list in **`.github/workflows/ci.yml`** (authoritative source) and mirror it in **[RELEASING.md](RELEASING.md)** local checks if you maintain that snippet.
|
|
21
23
|
|
|
22
|
-
-
|
|
23
|
-
- Require status checks to pass before merging (add **CI** / `verify`)
|
|
24
|
-
- Optionally: require reviews, disallow force pushes
|
|
24
|
+
If you **intentionally** shrink or grow the bundled **`skills/`** tree below/above the current CI minimum, update **`ci/bundle-gate.json`** (`minSkillMdFiles`) and note it in the PR—see **[RELEASING.md](RELEASING.md)**.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
4. Open a **pull request** into **`main`** with:
|
|
27
|
+
- What changed and **why**
|
|
28
|
+
- How you **verified** it (tests, manual MCP smoke, etc.)
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
PRs should pass **CI** (see [RELEASING.md](RELEASING.md)).
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
## Branch protection (maintainers)
|
|
33
|
+
|
|
34
|
+
For a protected **`main`**:
|
|
35
|
+
|
|
36
|
+
- Require PRs before merge
|
|
37
|
+
- Require **CI** / `verify` to pass
|
|
38
|
+
- Optionally require reviews and disallow force-push
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
Configured in **GitHub → Settings → Branches**; not stored in-repo.
|
|
41
|
+
|
|
42
|
+
## Releases
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
Maintainers: [RELEASING.md](RELEASING.md) (**semver**, tags, **`NPM_TOKEN`**, npm tokens).
|
|
35
45
|
|
|
36
|
-
##
|
|
46
|
+
## Conduct & security
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
- [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
|
|
49
|
+
- [SECURITY.md](SECURITY.md) for vulnerability reporting
|