Skip to content
Closed
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
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

Pronounced: *REE-tus* `/ˈriː.tus/` - from Latin, meaning a prescribed rite or procedure.

A disciplined workflow for reliable AI-assisted development. Ritus uses skill-based architecture, on-demand loading, chain-based routing, and independent verification to work across Claude Code, GitHub Copilot, and any language or stack.
A disciplined workflow for reliable AI-assisted development. Ritus uses skill-based architecture, on-demand loading, chain-based routing, and independent verification, in any language or stack.

**Platform support:** Ritus is built for **Claude Code** (first-class — Skill-tool invocation, programmatic subagent dispatch, per-tier model routing). **GitHub Copilot** support is **experimental**: skills load and the workflow applies, but model routing is advisory (you pick the model in the client) and subagent dispatch runs as separate manual passes rather than programmatic fan-out. See [Platform compatibility](#platform-compatibility).


---
Expand Down Expand Up @@ -117,6 +119,29 @@ missing project files. Run the setup again to create any new files. Existing use

---

## Platform compatibility

Ritus is authored around Claude Code primitives. The table below maps each Claude-specific
concept to its GitHub Copilot (or generic-agent) equivalent so the workflow degrades
predictably instead of silently.

| Ritus concept | Claude Code | GitHub Copilot / generic agent |
|------------------------------|--------------------------------------|-----------------------------------------------------------------|
| Skill invocation | `Skill` tool | `/command` or reading the matching `SKILL.md` on demand |
| Subagent dispatch | fresh subagent (programmatic) | run the step as a separate pass in a clean context (manual) |
| Model routing | per-tier model set at dispatch | advisory — pick the matching model in the client |
| Web fetch (in `pr-review`) | `WebFetch` tool | any built-in web-fetch/browse tool, or paste content manually |
| Structured question prompts | `AskUserQuestion` tool | numbered plain-text options |
| Plugin root env var | `CLAUDE_PLUGIN_ROOT` | `PLUGIN_ROOT` |

**Model IDs are not hardcoded in skills.** Skills reference **capability tiers**
(`haiku` = fast/cheap, `sonnet` = balanced, `opus` = deepest reasoning). The concrete
model ID for each tier is resolved once, per platform, in `docs/profiles/runtime.yml`
(`model_ids`) — the single place to update when models change. On GitHub Copilot the tier
is a recommendation you apply manually, since Copilot has no programmatic dispatch.

---

## Skills

Skills are self-contained SKILL.md files loaded on-demand. Each has YAML frontmatter (name + description) so the
Expand Down
2 changes: 1 addition & 1 deletion skills/pr-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ can prove correctness with evidence at `file:line`.
When the orchestrating session needs to run pr-review, dispatch a fresh subagent with:
- **Model:** sonnet
- **Effort:** high
- **Tools:** Read, Grep, Glob, Bash, WebFetch
- **Tools:** read, grep, glob, shell/bash, and a web-fetch capability (the `WebFetch` tool in Claude Code; any built-in web-fetch/browse tool on other agents, or paste the content manually)
- **Constraints:** adversarial reviewer in fresh context; never apply fixes or modify source files; never create or
modify environment files (.env, .env.local) — report missing setup to the user; use `git fetch origin` and
`origin/<branch>` refs — never mutate local branches; default to "Request changes" — the burden of proof is on the
Expand Down
82 changes: 59 additions & 23 deletions skills/setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,35 +268,64 @@ If `{{TICKET_FORMAT}}` is set: `feat/PROJ-123-{slug}` or `feat/#123-{slug}`.

### Model routing table → `{{MODEL_ROUTING}}`

Routing uses **capability tiers**, never hardcoded model IDs. A tier names the _class_ of
model to dispatch; the concrete model ID is resolved once, per platform, in the **model
resolution table** below. This keeps model IDs in a single place (`docs/profiles/runtime.yml`
→ `model_ids`) so they can be updated without editing any skill.

**Capability tiers:**

| Tier | Use for |
|----------|--------------------------------------------------|
| `haiku` | Fast, cheap — direct edits, per-task verification |
| `sonnet` | Balanced — cross-module work, PR review |
| `opus` | Deepest reasoning — pure architecture decisions |

**Model resolution table** — the single source of truth for concrete model IDs. Pick the
column for the detected platform (Step 3). Model IDs change over time; treat these as
examples and set them to the current models your platform exposes rather than trusting a
dated default.

| Tier | Claude Code (example) | GitHub Copilot (example) |
|----------|-----------------------|--------------------------|
| `haiku` | `claude-haiku-4-5` | `gpt-5-mini` |
| `sonnet` | `claude-sonnet-4-5` | `gpt-5` |
| `opus` | `claude-opus-4-1` | `gpt-5` (high effort) |

> **GitHub Copilot:** Copilot selects the model in the client and has no programmatic
> subagent dispatch. Treat the tier as a recommendation — pick the matching model manually
> and run the verify/review steps as separate passes in a clean context. Cross-agent parity
> is experimental.

**cost-first:**

| Triage | Model | Effort | Notes |
|-------------------------|-----------------------------|--------|---------------------------------|
| TRIVIAL | `claude-haiku-4-5-20251001` | low | Direct edits, single file |
| SIMPLE | `claude-haiku-4-5-20251001` | medium | 3-section task note |
| STANDARD | `claude-sonnet-4-6` | medium | Cross-module, design decision |
| EPIC | `claude-sonnet-4-6` | high | Multi-session, new architecture |
| Batch validate (pre-PR) | `claude-haiku-4-5-20251001` | low | Diff + task review |
| Triage | Tier | Effort | Notes |
|-------------------------|----------|--------|---------------------------------|
| TRIVIAL | `haiku` | low | Direct edits, single file |
| SIMPLE | `haiku` | medium | 3-section task note |
| STANDARD | `sonnet` | medium | Cross-module, design decision |
| EPIC | `sonnet` | high | Multi-session, new architecture |
| Batch validate (pre-PR) | `haiku` | low | Diff + task review |

**balanced (default):**

| Triage | Model | Effort | Notes |
|-------------------------|--------------------------------------------------------------------|----|-------------------------------|
| TRIVIAL | `claude-haiku-4-5-20251001` | low | Direct edits, single file |
| SIMPLE | `claude-haiku-4-5-20251001` | medium | 3-section task note |
| STANDARD | `claude-sonnet-4-6` | high | Cross-module, design decision |
| EPIC | `claude-sonnet-4-6` · `claude-opus-4-7` (pure arch decisions only) | high | Multi-session |
| Batch validate (pre-PR) | `claude-haiku-4-5-20251001` | medium | Diff + task review |
| Triage | Tier | Effort | Notes |
|-------------------------|---------------------------------------------|--------|-------------------------------|
| TRIVIAL | `haiku` | low | Direct edits, single file |
| SIMPLE | `haiku` | medium | 3-section task note |
| STANDARD | `sonnet` | high | Cross-module, design decision |
| EPIC | `sonnet` · `opus` (pure arch decisions only) | high | Multi-session |
| Batch validate (pre-PR) | `haiku` | medium | Diff + task review |

**quality-first:**

| Triage | Model | Effort | Notes |
|-------------------------|-----------------------------|--------|---------------------------------|
| TRIVIAL | `claude-haiku-4-5-20251001` | medium | Direct edits, single file |
| SIMPLE | `claude-sonnet-4-6` | medium | 3-section task note |
| STANDARD | `claude-sonnet-4-6` | high | Cross-module, design decision |
| EPIC | `claude-opus-4-7` | xhigh | Multi-session, new architecture |
| Batch validate (pre-PR) | `claude-sonnet-4-6` | high | Diff + task review |
| Triage | Tier | Effort | Notes |
|-------------------------|----------|--------|---------------------------------|
| TRIVIAL | `haiku` | medium | Direct edits, single file |
| SIMPLE | `sonnet` | medium | 3-section task note |
| STANDARD | `sonnet` | high | Cross-module, design decision |
| EPIC | `opus` | xhigh | Multi-session, new architecture |
| Batch validate (pre-PR) | `sonnet` | high | Diff + task review |

---

Expand Down Expand Up @@ -340,7 +369,14 @@ Fill these fields:

- `ai_tools` — auto-detect from platform: `Claude Code` if `CLAUDE_PLUGIN_ROOT` is set, `GitHub Copilot` if
`PLUGIN_ROOT` is set, otherwise ask the user
- `model_routing` — paste the correct table from §Model routing table above
- `model_ids` — the **single** place concrete model IDs live. From the §Model resolution table above, paste the
column matching the detected platform (Claude Code or GitHub Copilot) as `haiku` / `sonnet` / `opus` keys.
These are examples — confirm they match models the platform currently exposes.
- `model_routing` — paste the correct tier-based routing table (cost-first / balanced / quality-first) from §Model
routing table above. The table references tiers only; it never repeats concrete model IDs.

> On **GitHub Copilot**, `model_routing` is advisory: Copilot has no programmatic subagent dispatch, so apply the
> tier recommendation by selecting the model in the client and running verify/review as separate clean-context passes.

### Step 4: Render `docs/PROJECT_CONTEXT.md` from all `.yml` files

Expand All @@ -367,7 +403,7 @@ Setup complete — {{PROJECT_NAME}}
WRITTEN:
docs/profiles/project.yml project config (name, language, framework)
docs/profiles/team.yml team config (size, git workflow, branches)
docs/profiles/runtime.yml runtime config (AI tools, model routing)
docs/profiles/runtime.yml runtime config (AI tools, model IDs, model routing)
docs/PROJECT_CONTEXT.md rendered from all profiles
docs/ARCHITECTURE.md header filled

Expand Down
16 changes: 11 additions & 5 deletions skills/start-ritus/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ argument-hint: Provide the user's request so the router can choose the next appl
> **Subagent guard:** If you were dispatched as a subagent to execute a specific task (verify-task, pr-review, or execute-task), skip this skill entirely.
> Run only the skill you were dispatched to execute.
>
> **Mandatory skill check:** Before responding to any task — including clarifying questions — check whether an available skill applies. If a skill covers your task, you **must** invoke it via the Skill tool. Do not skip this check. This is not optional.
> **Mandatory skill check:** Before responding to any task — including clarifying questions — check whether an available skill applies. If a skill covers your task, you **must** invoke it via your agent's skill-invocation mechanism (the `Skill` tool in Claude Code; a `/command` or reading the matching `SKILL.md` in GitHub Copilot / other agents). Do not skip this check. This is not optional.

# Ritus

Expand Down Expand Up @@ -48,10 +48,10 @@ This ensures you never stop mid-chain and never skip steps in long context windo

## Skill invocation

> **Terminology:** "Invoke" = trigger a skill via the Skill tool (user or system action). "Load" = a skill reading another skill's content as a companion standard (skill-to-skill action).
> **Terminology:** "Invoke" = trigger a skill via your agent's skill-invocation mechanism — the `Skill` tool in Claude Code, or a `/command` / reading the target `SKILL.md` in GitHub Copilot and other agents. "Load" = a skill reading another skill's content as a companion standard (skill-to-skill action).

Before starting work, check which skill matches the user's intent by reading the available skill descriptions.
Invoke the matching skill via the Skill tool. Each skill's `## Next` section defines what happens after — follow
Invoke the matching skill. Each skill's `## Next` section defines what happens after — follow
it, do not pre-plan the full chain.

## Subagent configs
Expand All @@ -60,8 +60,14 @@ The **orchestrating session** is whatever agent loaded start-ritus — typically
When a skill says to dispatch, spawn a **fresh subagent** and instruct it to load the target skill.
Never use a skill name as the agent type — skill names are not agent types.

| Subagent | Model | Effort | Key constraints |
|----------|-------|--------|-----------------|
> **Platform note:** The `Model` column below is a **capability tier** (`haiku` = fast/cheap,
> `sonnet` = balanced, `opus` = deepest reasoning), not a model ID. Concrete IDs are resolved once
> in `docs/profiles/runtime.yml` → `model_ids`. On GitHub Copilot there is no programmatic subagent
> dispatch: apply the tier by picking the model in the client and run each dispatched skill as a
> separate pass in a clean context.

| Subagent | Model (tier) | Effort | Key constraints |
|----------|--------------|--------|-----------------|
| `execute-task` | per triage | per triage | Implement STEPS exactly; do not redesign |
| `verify-task` | haiku | medium | Read-only except build/test/lint; never fix; never trust implementer claims |
| `pr-review` | sonnet | high | Adversarial; never apply fixes; use `origin/` refs; default to "Request changes" |
Expand Down
10 changes: 10 additions & 0 deletions templates/docs/PROJECT_CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ Traceability policy: `{{TRACEABILITY_POLICY}}`

`{{AI_TOOLS}}`

## Model resolution

Skills reference capability tiers; concrete model IDs live only here (from `runtime.yml` → `model_ids`).

| Tier | Model ID |
|----------|--------------------|
| `haiku` | `{{MODEL_ID_HAIKU}}` |
| `sonnet` | `{{MODEL_ID_SONNET}}` |
| `opus` | `{{MODEL_ID_OPUS}}` |

## Model routing

{{MODEL_ROUTING}}
Expand Down
12 changes: 11 additions & 1 deletion templates/docs/profiles/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
# Edit this file, then re-run the `setup` skill to regenerate docs/PROJECT_CONTEXT.md.
# Values like off/no/yes must be quoted: key: "off"

schema_version: 2
schema_version: 3

# Filled by setup
ai_tools: ""

# Single source of truth for concrete model IDs (per platform, filled by setup).
# Skills reference capability tiers (haiku/sonnet/opus), not IDs — update models here only.
# Model IDs change over time; set these to the models your platform currently exposes.
model_ids:
haiku: "" # fast/cheap — e.g. Claude Code: claude-haiku-4-5 · GitHub Copilot: gpt-5-mini
sonnet: "" # balanced — e.g. Claude Code: claude-sonnet-4-5 · GitHub Copilot: gpt-5
opus: "" # deep reason — e.g. Claude Code: claude-opus-4-1 · GitHub Copilot: gpt-5 (high effort)

# Tier-based routing table (filled by setup). References tiers only, never concrete IDs.
model_routing: ""