Skip to content

Commit 38920dd

Browse files
Merge pull request #3 from coderdoctor97/feat/professionalization-infrastructure
feat(repo): professionalization infrastructure (priorities 1-2)
2 parents 4cb7a36 + 4839074 commit 38920dd

36 files changed

Lines changed: 1721 additions & 143 deletions

‎.github/CODEOWNERS‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Skill Router Owners
2+
3+
Core routing engine and CLI:
4+
* @coderdoctor97 skill.py
5+
6+
Installer:
7+
* @coderdoctor97 install.py
8+
9+
Tests and benchmarks:
10+
* @coderdoctor97 tests/
11+
* @coderdoctor97 benchmarks/
12+
13+
CI/CD and repository configuration:
14+
* @coderdoctor97 .github/
15+
16+
Documentation:
17+
* @coderdoctor97 README.md
18+
* @coderdoctor97 SKILL.md
19+
* @coderdoctor97 docs/
20+
* @coderdoctor97 CONTRIBUTING.md
21+
* @coderdoctor97 CHANGELOG.md
22+
* @coderdoctor97 SECURITY.md
23+
24+
Packaging and manifest:
25+
* @coderdoctor97 manifest.json
26+
* @coderdoctor97 pyproject.toml (when added)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug report
3+
about: Report a routing or installation issue
4+
title: "[bug] "
5+
labels: bug
6+
---
7+
8+
**Describe the bug**
9+
A clear and concise description of what the bug is.
10+
11+
**Skill Router version**
12+
<!-- Run: python3 skill.py --version -->
13+
14+
**Python version**
15+
<!-- Run: python --version -->
16+
17+
**Operating system**
18+
<!-- e.g. Ubuntu 24.04, Windows 11, macOS 14 -->
19+
20+
**Agent / environment**
21+
<!-- e.g. Claude Code, DeepSeek Harness, generic -->
22+
23+
**Reproduction steps**
24+
1. …
25+
2. …
26+
3. …
27+
28+
**Expected behavior**
29+
What you expected to happen.
30+
31+
**Actual behavior**
32+
What actually happened, including the full CLI output or `--debug` output.
33+
34+
**Minimal example**
35+
If possible, provide the exact `route` command and request string:
36+
```bash
37+
python3 skill.py route "your request here" --root /path/to/repo --debug
38+
```
39+
40+
**Additional context**
41+
Add any other context about the problem here. Do not include secrets or private source code.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Propose a new feature or improvement
4+
title: "[feat] "
5+
labels: enhancement
6+
---
7+
8+
**Problem**
9+
What problem would this feature solve?
10+
11+
**Proposed solution**
12+
How would you like it to work?
13+
14+
**Alternatives considered**
15+
What other approaches did you consider?
16+
17+
**Compatibility impact**
18+
Would this change routing semantics? Would it require changes to skill manifests? Would it break existing installations?
19+
20+
**Additional context**
21+
Add any other context or examples here.

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Pull Request Checklist
2+
3+
- [ ] **What changed?** Describe the change in one or two sentences.
4+
- [ ] **Why?** Explain the motivation (bug fix, routing improvement, infrastructure, docs, etc.).
5+
- [ ] **Tests performed**
6+
- [ ] `python tests/run_tests.py` passes
7+
- [ ] `python skill.py validate --root .` exits 0
8+
- [ ] Routing regression cases added (if routing behavior changed)
9+
- [ ] **Benchmark impact**
10+
- [ ] `python skill.py benchmark` shows no regression (or improvement)
11+
- [ ] Gold-set cases remain correct
12+
- [ ] **Documentation impact**
13+
- [ ] `README.md` updated (if user-facing behavior changed)
14+
- [ ] `SKILL.md` updated (if skill contract changed)
15+
- [ ] `CONTRIBUTING.md` updated (if contributor workflow changed)
16+
- [ ] **Breaking changes**
17+
- [ ] None
18+
- [ ] Listed below with migration instructions
19+
20+
**Additional notes**

‎.github/workflows/benchmark.yml‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Benchmark
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
benchmark:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
cache: "pip"
20+
21+
- name: Run benchmark
22+
run: |
23+
python skill.py benchmark --repeat 3 | tee benchmark-output.txt
24+
25+
- name: Check for regressions
26+
run: |
27+
# Parse accuracy from benchmark output — fail if it drops below baseline
28+
ACC=$(python skill.py benchmark --repeat 3 2>&1 | grep "^accuracy:" | awk '{print $2}' | cut -d'=' -f1 | tr -d ' ')
29+
echo "Accuracy: $ACC"
30+
python -c "
31+
import sys
32+
acc = float('$ACC'.split('/')[0]) / float('$ACC'.split('/')[1])
33+
if acc < 1.0:
34+
print(f'REGRESSION: accuracy dropped to {acc}')
35+
sys.exit(1)
36+
print(f'Benchmark passed: accuracy = {acc}')
37+
"
38+
39+
- name: Upload benchmark results
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: benchmark-results
43+
retention-days: 30
44+
continue-on-error: true

‎.github/workflows/lint.yml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Lint and Validate
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.10", "3.12"]
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: "pip"
26+
27+
- name: Syntax check — skill.py
28+
run: python -c "import py_compile; py_compile.compile('skill.py', doraise=True)"
29+
30+
- name: Syntax check — install.py
31+
run: python -c "import py_compile; py_compile.compile('install.py', doraise=True)"
32+
33+
- name: Validate router state
34+
run: python skill.py validate --root .
35+
36+
- name: Check manifest consistency
37+
run: |
38+
python -c "
39+
import json, sys
40+
# Verify this skill's own manifest is valid
41+
m = json.load(open('manifest.json'))
42+
assert m['name'] == 'skill-router', 'manifest name mismatch'
43+
assert len(m['commands']) > 0, 'no commands declared'
44+
print(f'manifest valid: {m[\"name\"]} v{m.get(\"version\", \"?\")}')
45+
"

‎.github/workflows/tests.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.10", "3.11", "3.12", "3.13"]
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: "pip"
26+
27+
- name: Verify Python version
28+
run: python --version
29+
30+
- name: Run test suite
31+
run: python tests/run_tests.py
32+
33+
- name: Upload test results on failure
34+
if: failure()
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: test-results-py${{ matrix.python-version }}
38+
retention-days: 7

‎.gitignore‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
__pycache__/
22
*.pyc
3+
.coverage
4+
htmlcov/
5+
.tox/
36
skill-registry/.route-cache.json
7+
benchmark-results/
8+
.eggs/
9+
*.egg-info/
10+
dist/
11+
build/
12+
wheels/

‎CHANGELOG.md‎

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,61 @@
11
# Changelog
22

3+
All notable changes to Skill Router are documented here. The format is based on
4+
[Keep a Changelog](https://keepachangelog.com/), and this project uses
5+
[semantic versioning](https://semver.org/).
6+
37
## Unreleased
48

5-
- Added a conservative global/project installer with explicit scope selection.
6-
- Added `--version` and `doctor` diagnostics to the router CLI.
7-
- Documented generic, Claude Code, and DeepSeek Harness `SKILL.md` layouts.
8-
- Organized the supplied Skill Router artwork under `assets/icon/`.
9-
- Reworked the GitHub README with installation, routing, configuration, and troubleshooting guidance.
9+
### Added
10+
- `.github/workflows/tests.yml` — CI test matrix (Python 3.10–3.13)
11+
- `.github/workflows/lint.yml` — CI validation and syntax checks
12+
- `.github/workflows/benchmark.yml` — Benchmark CI on main branch pushes
13+
- `.github/CODEOWNERS` — Code ownership definitions
14+
- `.github/ISSUE_TEMPLATE/bug_report.md` — Bug report template
15+
- `.github/ISSUE_TEMPLATE/feature_request.md` — Feature request template
16+
- `.github/PULL_REQUEST_TEMPLATE.md` — PR checklist
17+
- `SECURITY.md` — Security policy and vulnerability reporting process
18+
- `CODE_OF_CONDUCT.md` — Contributor Covenant Code of Conduct
19+
- `docs/` — Documentation structure (architecture, routing, configuration, agents, benchmarking, troubleshooting, development)
20+
- `benchmark-baseline.json` — Saved baseline for regression detection
21+
- `--save-baseline`, `--baseline`, `--gate` flags to benchmark runner
22+
- `--scaling` mode with preset corpus sizes (16/100/500/1000/5000)
23+
- `ambiguity_recall`, `latency_p95_ms`, `metadata_reduction_pct` metrics
24+
- `pyproject.toml` — Standard Python packaging
25+
- `src/skill_router/__init__.py` — Packaging shim for pip install
26+
- `models.py` — Extracted model layer (Skill, load_manifest)
27+
28+
### Changed
29+
- Branding unified to "Skill Router" throughout public-facing files
30+
- `manifest.json` aliases cleaned up (removed "Skill_by_Satya" alias)
31+
- `CONTRACT_MARKER` updated to `<!-- Skill Router:routing-contract -->`
32+
- `CONTRIBUTING.md` expanded with routing behavior change guidelines
33+
- `.gitignore` expanded with `.coverage`, `htmlcov/`, `.tox/`, `benchmark-results/`, `*.egg-info/`, `dist/`, `build/`, `wheels/`
34+
- Windows path test failure fixed in `test_install.py`
35+
- Benchmark accuracy language scoped to reflect gold-set limitations
36+
- Troubleshooting table entry for benchmark accuracy clarified
37+
- `skill.py` built-in benchmark includes per-case latency and p95 reporting
38+
- Scaling results documented with honest interpretation
39+
40+
### Fixed
41+
- Test failure on Windows due to path separator in `test_install.py`
42+
43+
## [2.0.0] — 2025-01-15
44+
45+
### Added
46+
- Two-stage deterministic routing (cheap filtering + structured ranking)
47+
- Three-way decisions: `route`, `ambiguous`, `no_route`
48+
- Multi-skill plans with disjoint-dimension detection
49+
- Positive and negative routing boundaries (`use_when`, `not_when`)
50+
- Explicit call bonus with anchor requirement (adversarial protection)
51+
- Three-pass penalty system (not_when, object mismatch, conflicts)
52+
- Result caching with fingerprint-based invalidation
53+
- Drift detection between corpus and routing manifest
54+
- Conservative bootstrap for existing or empty repositories
55+
- Validation with exit codes
56+
- Gold-set benchmark (36 cases, 16-skill corpus)
57+
- Global/project installer with agent-specific layouts
58+
- `--version`, `--debug`, `--no-cache` CLI flags
59+
- Host-AI sanity check in maintenance contract
60+
61+
[2.0.0]: https://github.com/coderdoctor97/skill-router/releases/tag/v2.0.0

‎CODE_OF_CONDUCT.md‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as contributors and maintainers pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, disability, ethnicity, sex characteristics, gender identity and
8+
expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment:
15+
16+
- Using welcoming and inclusive language
17+
- Being respectful of differing viewpoints and experiences
18+
- Gracefully accepting constructive criticism
19+
- Focusing on what is best for the community
20+
- Showing empathy toward other community members
21+
22+
Examples of unacceptable behavior:
23+
24+
- Trolling, insulting or derogatory comments, and personal or political attacks
25+
- Public or private harassment
26+
- Publishing others' private information without explicit permission
27+
- Other conduct which could reasonably be considered inappropriate in a professional setting
28+
29+
## Enforcement
30+
31+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
32+
reported by contacting the project maintainer at the email listed in
33+
`SECURITY.md`.
34+
35+
All complaints will be reviewed and investigated promptly and fairly. The
36+
project team is obligated to maintain confidentiality with regard to the
37+
reporter of an incident.
38+
39+
## Attribution
40+
41+
This Code of Conduct is adapted from the
42+
[Contributor Covenant](https://www.contributor-covenant.org), version 2.1.

0 commit comments

Comments
 (0)