Skip to content

Commit b5249a8

Browse files
chore(ci): convert hypatia-scan.yml to wrapper of standards reusable (#39)
## Summary Replaces the per-repo `hypatia-scan.yml` (416 lines) with a 29-line wrapper calling `hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@2569c10e831e293f9dd6580d82a494aca039deee` (standards#191 HEAD SHA). Behaviour-preserving: identical triggers (push/pull_request/schedule/workflow_dispatch), same concurrency group, same permissions (contents:read + security-events:write + pull-requests:write), same secrets passthrough. Same pattern as the rust-ci wrapper sweep (standards#174 + 82 wrapper PRs filed 2026-05-26). ## Pin-to-not-yet-merged-SHA Intentional: the SHA points at standards#191's PR HEAD. The wrapper file is staged but the action runner won't load the reusable until standards#191 lands on main. ## Test plan - [ ] `pull_request` triggers run main's old workflow file (target-branch semantics) - [ ] After standards#191 merges, the next push exercises the reusable end-to-end - [ ] SARIF still uploads on non-fork triggers; gitbot-fleet submission still best-effort Refs standards#191. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 6292ae4 commit b5249a8

50 files changed

Lines changed: 4434 additions & 4819 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE.md

Lines changed: 118 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,118 @@
1-
# CLAUDE.md - Claude Integrations
2-
3-
## Project Overview
4-
5-
Monorepo for all Claude AI browser and service integrations, plus AI workflow tools.
6-
7-
## Components
8-
9-
| Directory | Description | Stack |
10-
|-----------|-------------|-------|
11-
| firefox-lsp/ | LSP for Firefox via Marionette protocol | Elixir |
12-
| firefox-mcp/ | MCP server for Firefox browser control | Deno/JS |
13-
| gecko-browser-extension/ | Extension for Gecko browsers | JS/WebExtensions |
14-
| gitlab-bridge/ | Claude ↔ GitLab integration | ReScript/Deno |
15-
| mozilla-extension/ | Claude extension for Mozilla products | JS/WebExtensions |
16-
| **model-router/** | **Auto-select Opus/Sonnet/Haiku by task** | **Rust (planned)** |
17-
18-
## Build
19-
20-
```bash
21-
just --list # See all build recipes
22-
just build-firefox-lsp # Build Firefox LSP
23-
just build-firefox-mcp # Build Firefox MCP
24-
just build-gecko-extension # Build Gecko extension
25-
just build-gitlab-bridge # Build GitLab bridge
26-
just build-mozilla-extension # Build Mozilla extension
27-
```
28-
29-
## Model Router (NEW - Sonnet Task)
30-
31-
### Purpose
32-
33-
Auto-select the right Claude model (Opus/Sonnet/Haiku) based on task complexity, saving money on simple tasks and ensuring quality on complex ones.
34-
35-
### Architecture
36-
37-
```
38-
User prompt + repo context
39-
40-
Haiku classifier (< 1 second, < $0.001)
41-
42-
Classification: trivial | standard | complex
43-
44-
Route to:
45-
├── Haiku: single-file edits, template creation, simple queries
46-
├── Sonnet: multi-file implementation, feature work, testing
47-
└── Opus: architecture decisions, debugging, cross-repo design
48-
```
49-
50-
### Classification Signals
51-
52-
| Signal | Haiku | Sonnet | Opus |
53-
|--------|-------|--------|------|
54-
| Files affected | 1 | 2-5 | 5+ |
55-
| Task type | rename, typo fix | add feature, implement | debug, design, architect |
56-
| Prompt keywords | "fix typo", "rename", "update" | "add", "create", "implement" | "why", "how", "design", "debug" |
57-
| Repo complexity (from CLAUDE.md) | Low | Medium | High |
58-
| Error recovery needed | No | Maybe | Likely |
59-
| Cross-repo awareness | No | No | Yes |
60-
61-
### Implementation Plan (for Sonnet)
62-
63-
1. **Create `model-router/` directory** in this repo
64-
2. **Rust CLI tool** that:
65-
- Reads the prompt from stdin or argument
66-
- Reads `.claude/CLAUDE.md` from current directory for repo context
67-
- Calls Haiku API to classify complexity (one fast API call)
68-
- Outputs recommended model to stdout: `haiku`, `sonnet`, or `opus`
69-
3. **Claude Code hook integration**:
70-
- Pre-prompt hook reads model recommendation
71-
- Switches model via `/model` command or API parameter
72-
4. **Escalation logic**:
73-
- If chosen model fails or stalls (detected by output quality heuristics)
74-
- Automatically escalate: Haiku → Sonnet → Opus
75-
5. **Cost tracking**:
76-
- Log which model was used, tokens consumed, task outcome
77-
- Weekly summary of cost savings vs always-using-Opus
78-
79-
### Cargo.toml Sketch
80-
81-
```toml
82-
[package]
83-
name = "model-router"
84-
version = "0.1.0"
85-
authors = ["Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>"]
86-
license = "PMPL-1.0-or-later"
87-
88-
[dependencies]
89-
clap = { version = "4", features = ["derive"] }
90-
reqwest = { version = "0.12", features = ["json"] }
91-
serde = { version = "1", features = ["derive"] }
92-
serde_json = "1"
93-
tokio = { version = "1", features = ["full"] }
94-
```
95-
96-
### Usage (Target)
97-
98-
```bash
99-
# Classify a task
100-
echo "fix the typo in README.md" | model-router classify
101-
# Output: haiku
102-
103-
echo "implement the sweep subcommand for panic-attack" | model-router classify
104-
# Output: sonnet
105-
106-
echo "why is my system crashing and how should we architect the fix" | model-router classify
107-
# Output: opus
108-
109-
# With repo context
110-
model-router classify --repo /path/to/repo "add authentication"
111-
# Reads .claude/CLAUDE.md, factors in repo complexity
112-
```
113-
114-
## Code Style
115-
116-
- SPDX headers: `PMPL-1.0-or-later`
117-
- Author: Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>
118-
- Browser extensions use `MPL-2.0` fallback (store requirements)
1+
# CLAUDE.md - Claude Integrations
2+
3+
## Project Overview
4+
5+
Monorepo for all Claude AI browser and service integrations, plus AI workflow tools.
6+
7+
## Components
8+
9+
| Directory | Description | Stack |
10+
|-----------|-------------|-------|
11+
| firefox-lsp/ | LSP for Firefox via Marionette protocol | Elixir |
12+
| firefox-mcp/ | MCP server for Firefox browser control | Deno/JS |
13+
| gecko-browser-extension/ | Extension for Gecko browsers | JS/WebExtensions |
14+
| gitlab-bridge/ | Claude ↔ GitLab integration | ReScript/Deno |
15+
| mozilla-extension/ | Claude extension for Mozilla products | JS/WebExtensions |
16+
| **model-router/** | **Auto-select Opus/Sonnet/Haiku by task** | **Rust (planned)** |
17+
18+
## Build
19+
20+
```bash
21+
just --list # See all build recipes
22+
just build-firefox-lsp # Build Firefox LSP
23+
just build-firefox-mcp # Build Firefox MCP
24+
just build-gecko-extension # Build Gecko extension
25+
just build-gitlab-bridge # Build GitLab bridge
26+
just build-mozilla-extension # Build Mozilla extension
27+
```
28+
29+
## Model Router (NEW - Sonnet Task)
30+
31+
### Purpose
32+
33+
Auto-select the right Claude model (Opus/Sonnet/Haiku) based on task complexity, saving money on simple tasks and ensuring quality on complex ones.
34+
35+
### Architecture
36+
37+
```
38+
User prompt + repo context
39+
40+
Haiku classifier (< 1 second, < $0.001)
41+
42+
Classification: trivial | standard | complex
43+
44+
Route to:
45+
├── Haiku: single-file edits, template creation, simple queries
46+
├── Sonnet: multi-file implementation, feature work, testing
47+
└── Opus: architecture decisions, debugging, cross-repo design
48+
```
49+
50+
### Classification Signals
51+
52+
| Signal | Haiku | Sonnet | Opus |
53+
|--------|-------|--------|------|
54+
| Files affected | 1 | 2-5 | 5+ |
55+
| Task type | rename, typo fix | add feature, implement | debug, design, architect |
56+
| Prompt keywords | "fix typo", "rename", "update" | "add", "create", "implement" | "why", "how", "design", "debug" |
57+
| Repo complexity (from CLAUDE.md) | Low | Medium | High |
58+
| Error recovery needed | No | Maybe | Likely |
59+
| Cross-repo awareness | No | No | Yes |
60+
61+
### Implementation Plan (for Sonnet)
62+
63+
1. **Create `model-router/` directory** in this repo
64+
2. **Rust CLI tool** that:
65+
- Reads the prompt from stdin or argument
66+
- Reads `.claude/CLAUDE.md` from current directory for repo context
67+
- Calls Haiku API to classify complexity (one fast API call)
68+
- Outputs recommended model to stdout: `haiku`, `sonnet`, or `opus`
69+
3. **Claude Code hook integration**:
70+
- Pre-prompt hook reads model recommendation
71+
- Switches model via `/model` command or API parameter
72+
4. **Escalation logic**:
73+
- If chosen model fails or stalls (detected by output quality heuristics)
74+
- Automatically escalate: Haiku → Sonnet → Opus
75+
5. **Cost tracking**:
76+
- Log which model was used, tokens consumed, task outcome
77+
- Weekly summary of cost savings vs always-using-Opus
78+
79+
### Cargo.toml Sketch
80+
81+
```toml
82+
[package]
83+
name = "model-router"
84+
version = "0.1.0"
85+
authors = ["Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>"]
86+
license = "PMPL-1.0-or-later"
87+
88+
[dependencies]
89+
clap = { version = "4", features = ["derive"] }
90+
reqwest = { version = "0.12", features = ["json"] }
91+
serde = { version = "1", features = ["derive"] }
92+
serde_json = "1"
93+
tokio = { version = "1", features = ["full"] }
94+
```
95+
96+
### Usage (Target)
97+
98+
```bash
99+
# Classify a task
100+
echo "fix the typo in README.md" | model-router classify
101+
# Output: haiku
102+
103+
echo "implement the sweep subcommand for panic-attack" | model-router classify
104+
# Output: sonnet
105+
106+
echo "why is my system crashing and how should we architect the fix" | model-router classify
107+
# Output: opus
108+
109+
# With repo context
110+
model-router classify --repo /path/to/repo "add authentication"
111+
# Reads .claude/CLAUDE.md, factors in repo complexity
112+
```
113+
114+
## Code Style
115+
116+
- SPDX headers: `PMPL-1.0-or-later`
117+
- Author: Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>
118+
- Browser extensions use `MPL-2.0` fallback (store requirements)

.github/dependabot.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
# Dependabot configuration for claude-integrations
3-
# Covers npm (firefox-lsp, gitlab-bridge) and GitHub Actions
4-
5-
version: 2
6-
updates:
7-
# GitHub Actions - always include
8-
- package-ecosystem: "github-actions"
9-
directory: "/"
10-
schedule:
11-
interval: "weekly"
12-
groups:
13-
actions:
14-
patterns:
15-
- "*"
16-
17-
# npm - firefox-lsp (VS Code extension)
18-
- package-ecosystem: "npm"
19-
directory: "/firefox-lsp"
20-
schedule:
21-
interval: "weekly"
22-
23-
# npm - gitlab-bridge
24-
- package-ecosystem: "npm"
25-
directory: "/gitlab-bridge"
26-
schedule:
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dependabot configuration for claude-integrations
3+
# Covers npm (firefox-lsp, gitlab-bridge) and GitHub Actions
4+
5+
version: 2
6+
updates:
7+
# GitHub Actions - always include
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
groups:
13+
actions:
14+
patterns:
15+
- "*"
16+
17+
# npm - firefox-lsp (VS Code extension)
18+
- package-ecosystem: "npm"
19+
directory: "/firefox-lsp"
20+
schedule:
21+
interval: "weekly"
22+
23+
# npm - gitlab-bridge
24+
- package-ecosystem: "npm"
25+
directory: "/gitlab-bridge"
26+
schedule:
2727
interval: "weekly"

0 commit comments

Comments
 (0)