Skip to content
Merged
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,11 @@ jobs:
set -euo pipefail
# Only the ATTEMPT is retried, never the argv: the call clones over
# the network from npm and GitHub, and a transport blip must not read
# as an inventory mismatch.
# as an inventory mismatch. Listing the LOCAL checkout: a bare non-default-
# branch SHA makes the skills CLI silently fall back to the default branch
# tree (verified 2026-08-31), which made this check vacuous on PRs.
attempt=1
until npx -y skills@1.5.23 add "automagik-dev/genie@${SKILLS_REF}" --list \
until npx -y skills@1.5.23 add "$PWD" --list \
>"${RUNNER_TEMP}/skills-list.txt" 2>&1; do
if (( attempt >= 3 )); then
cat "${RUNNER_TEMP}/skills-list.txt"
Expand Down
17 changes: 16 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@
"complexity": {
"noExcessiveCognitiveComplexity": {
"level": "warn",
"options": { "maxAllowedComplexity": 25 }
"options": {
"maxAllowedComplexity": 25
}
},
"noForEach": "warn"
},
Expand Down Expand Up @@ -133,6 +135,19 @@
}
}
}
},
{
"include": ["skills/genie-orca-work/scripts/**"],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off"
},
"style": {
"noNonNullAssertion": "off"
}
}
}
}
]
}
3 changes: 3 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/knip@6.29.0/schema.json",
"entry": ["src/hooks/dispatch-command.ts"],
"project": ["src/**/*.ts"],
"entry": ["skills/genie-orca-work/scripts/*.ts", "src/hooks/dispatch-command.ts"],
"project": ["skills/genie-orca-work/scripts/**/*.ts", "src/**/*.ts"],
"ignoreBinaries": ["ldd", "omni"],
"ignoreExportsUsedInFile": true,
"ignore": ["src/term-commands/hook/trust.ts"]
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"name": "@automagik/genie",

"version": "5.260830.21",
"description": "Collaborative terminal toolkit for human + AI workflows. NOTE: npm distribution discontinued 2026-05-09 — install via `curl -fsSL https://raw.githubusercontent.com/automagik-dev/genie/main/install.sh | bash` (cosign + SLSA verified). See https://automagik.dev/genie/release-process",

"license": "MIT",
"type": "module",
"bin": {
Expand Down Expand Up @@ -51,6 +49,7 @@
"@sigstore/protobuf-specs": "0.5.0",
"@sigstore/verify": "4.1.0",
"commander": "12.1.0",
"uuid": "^14.0.2",
"zod": "3.25.76"
},
"devDependencies": {
Expand Down
36 changes: 36 additions & 0 deletions plugins/genie/skills/genie-orca-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: genie-orca-review
description: "Independent, read-only review of a group, a wish, or a PR on Orca — SHIP / FIX-FIRST / BLOCKED with severity-tagged findings. Council and retro are this skill with a different input."
---

# genie-orca:review

**Runtime syntax:** invoke the plugin copy through the active runtime's owner-qualified skill selector; use a bare selector only when intentionally selecting a user-tier copy (a separately installed personal copy; Genie no longer seeds this tier). Cross-skill prose below uses bare names as portable semantic routes; the orchestrator resolves the selector for the active runtime.

A reviewer is a **read-only worker dispatched by the coordinator**, never the engineer of the same group, preferably a different model family (brain default: Codex reviews Claude-Sonnet work; Fable/Opus for the two gate reviews).

## Contract

- Input: the group spec (`WISH.md` section), ground truth (`SCOUT.md`), `git diff <wish-branch>..HEAD`, the validation command.
- The reviewer **re-runs validation** and quotes the summary line. A review that did not run the gate is not a review.
- Body starts with `VERDICT: SHIP | FIX-FIRST | BLOCKED`, then numbered findings `[critical|major|minor]` with `file:line` and a concrete fix. FIX-FIRST only on critical/major.
- One `worker_done`, `--outcome succeeded` = review delivered (the verdict is in the body). The reviewer's `worker_done` never authorizes coordinator edits; fixes are re-dispatched.
- Name the *environments* in the adversarial question: the dev box with the product installed, the compiled binary from cwd `/` with no env, a DSN/detached service, the vault literally named like the product. On brain, the same precedence bug survived four gates because each ran in one environment.
- Ask the adversarial question explicitly in the brief ("how does this still fail in the compiled binary / under DSN / on a box with brain installed?"). On brain, 3 of 5 groups went FIX-FIRST from exactly that prompt.

## Tiers

| When | Reviewers | Merge rule |
|---|---|---|
| per group | 1 capable model (≠ engineer) | verdict as-is |
| wish-approval, PR | 3 in parallel (claude / codex / third), same read-only worktree | severity-max; any BLOCKED → BLOCKED; SHIP only if all SHIP; one merged Linear comment |
| council | lenses (questioner / architecture / simplifier / perf …) on a decision | synthesis + unresolved tensions, persisted next to the wish |
| retro | the run's `RETRO.md` from `skills/genie-orca-work/scripts/retro-collect.ts` | findings → skill edits, not prose |

## Fix loop

Coordinator re-dispatches a **fast** worker into the same worktree with the findings quoted verbatim and "apply exactly this, nothing else". Cap 2 loops per group; the coordinator may verify a trivial delta itself instead of a second review. After the cap → human gate.

## What the integrated gate catches that group review does not

Run the **full** suite on the integrated branch before declaring SHIP — on brain, G4's artifact fallback passed its group gate and its review, and only the integrated gate (a box with `~/.brain` installed) exposed the cwd hijack. Per-group validation is necessary, not sufficient.
4 changes: 4 additions & 0 deletions plugins/genie/skills/genie-orca-review/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Orca Reviewer"
short_description: "Independent read-only review of Orca groups or wishes"
default_prompt: "Review this Orca group, wish, or PR independently and return SHIP, FIX-FIRST, or BLOCKED."
44 changes: 44 additions & 0 deletions plugins/genie/skills/genie-orca-wish/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: genie-orca-wish
description: "Turn a brainstorm/design into an APPROVED-able wish whose Dispatch plan is the literal input to Orca tasks and Linear issues. High-reasoning pass: pre-decide everything so fast workers can execute without judgment calls."
---

# genie-orca:wish

**Runtime syntax:** invoke the plugin copy through the active runtime's owner-qualified skill selector; use a bare selector only when intentionally selecting a user-tier copy (a separately installed personal copy; Genie no longer seeds this tier). Cross-skill prose below uses bare names as portable semantic routes; the orchestrator resolves the selector for the active runtime.

The wish is the only durable genie artifact and the instruction source for every worker. Write it with the most capable model you have; everything downstream gets cheaper because of it.

## Before writing

1. **Scout first, opine second.** Dispatch a read-only scout for exact `file:line`, mechanisms, existing tests and the concrete fix per defect/feature. Commit it as `SCOUT.md` next to the wish — workers and reviewers read it, and it pins line numbers to a SHA.
2. Read the repo rules (`.claude/rules/*`, CLAUDE.md) and the council/design that produced this wish.
3. Read the delegation preferences from brain (`brain_profile_get` tier slots) — freeze them into the Dispatch plan; workers never consult brain.

## Required shape

Header table: `Status | Slug | Priority | Base (branch @ sha, gate state) | Target (PR → branch) | Ground truth (SCOUT.md) | Orchestration (Orca/Linear ids once created) | Approval`.

Sections (the v5 validator still enforces these names): Summary · Scope (IN/OUT) · Problem (table: # / defect / symptom) · Decisions · Simplicity Case · Dependencies · Non-goals · Success Criteria · Execution Strategy (waves) · Execution Groups · Files to Create/Modify · QA Criteria · Assumptions / Risks · Review Results · **Dispatch plan** · Status log.

Per group (`### Group n: Gn — title`): **Files** (exact paths, the worker touches nothing else) · **Do** (imperative, decided — no "consider") · **Accept** (a command and an observable, never "works").

Dispatch plan table — the literal argument list:

| id | depends_on | agent | model | effort | worktree | validation_cmd |
|---|---|---|---|---|---|---|

plus `Gates: wish-approval, [dogfood], merge` and the worker contract line (own worktree, conventional commits, one `worker_done` with `--outcome`).

## Rules learned on brain (2026-08-22)

- Groups must have **disjoint files**; if two groups touch one file, say "disjoint hunks" explicitly and let the integrator own the merge.
- Always have an **integrator group** that depends on all others: full gate + build + tripwires + docs, run from the main worktree.
- Validation commands must run inside an Orca child worktree: no `bun run build` there if the repo resolves ROOT via `import.meta.url` (Orca's `~` path bug) — say "coordinator builds from a clean path".
- Name test files that exist (a worker lost time on `ask-pipeline.test.ts` that was really `ask-pipeline-env.test.ts`). The scout should list them.
- Every fix ships with a tripwire that exercises the **shipped artifact**, not just `src/`; say which tier (static string / extracted-artifact run / live backend).
- Leave an escape hatch per risky group ("if X is not possible from the SDK surface, do Y honestly") — G3 needed it.

## Gate

`wish-approval` is a human gate: the human opens the reviewed wish and approves. Under `/goal`-style pre-approval, record that in the header (`Approval: … pre-approved <date>`) and proceed.
4 changes: 4 additions & 0 deletions plugins/genie/skills/genie-orca-wish/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Orca Wish Planner"
short_description: "Turn a design into an Orca-dispatchable wish plan"
default_prompt: "Turn this reviewed design into an Orca-dispatchable Genie wish."
15 changes: 15 additions & 0 deletions plugins/genie/skills/genie-orca-work/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# genie-orca — genie v6 "corpo leve" (prototype, 2026-08-22)

genie owns the documents + the coordinator protocol. Orca owns orchestration state. Linear owns status. brain owns preferences/memory.

| Skill / script | Status |
|---|---|
| `wish/SKILL.md` | draft from practice (1 wish run) |
| `work/SKILL.md` | draft from practice — the loop that shipped brain PR #163 |
| `review/SKILL.md` | draft; council + retro are review with a different input |
| `skills/genie-orca-work/scripts/retro-collect.ts` | working; Claude sessions joined by dispatch start time; Codex TODO |
| `skills/genie-orca-work/scripts/migrate-to-linear.ts` | one-shot, dry-run proven on brain; `--apply` is the human's call |
| brainstorm | unchanged from v5 (human-mandatory) — not copied yet |

Decision records: brain repo `.genie/brainstorms/genie-v6-corpo-leve/COUNCIL.md`, `.genie/wishes/compiled-artifact-honesty/{COUNCIL-agent-home,RETRO}.md`.
Open tensions (owner's call): wish "compiler" vs plain dispatch table · 2 vs 3 default human gates · `review` as its own skill · third review model always-on vs opt-in.
Loading
Loading