@azure-id/orc 1.9.2 → 2.1.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 +722 -0
- package/README-id.md +56 -42
- package/README.md +58 -41
- package/bin/build-agents.js +125 -29
- package/bin/clear-logs.js +620 -0
- package/bin/cli.js +1873 -180
- package/bin/fix.js +459 -0
- package/bin/gotcha-import.js +1081 -0
- package/bin/gotcha.js +1566 -0
- package/bin/graph-query.js +1 -1
- package/bin/graph.js +717 -717
- package/bin/habit.js +1538 -0
- package/bin/mockrun-catalog.js +284 -276
- package/bin/onboarding-content.js +2 -1
- package/bin/pricing.json +28 -21
- package/bin/run-undo.js +398 -0
- package/bin/trace-write.js +869 -0
- package/bin/verify-contracts.js +627 -100
- package/bin/verify-package.js +68 -10
- package/bin/webui/api.js +151 -6
- package/bin/webui/app.html +239 -232
- package/bin/webui/css/00-tokens.css +110 -92
- package/bin/webui/css/04-motion.css +87 -0
- package/bin/webui/css/06-responsive.css +203 -178
- package/bin/webui/css/panels/behaviour.css +205 -0
- package/bin/webui/css/panels/hookui.css +79 -0
- package/bin/webui/fixtures/behaviour.js +562 -0
- package/bin/webui/fixtures/extra.js +9 -9
- package/bin/webui/fixtures/flow.js +81 -81
- package/bin/webui/fixtures/hookui.js +506 -431
- package/bin/webui/fixtures/index.js +66 -3
- package/bin/webui/fixtures/knowledge.js +9 -3
- package/bin/webui/fixtures/maintenance.js +123 -42
- package/bin/webui/fixtures/rules.js +1007 -1002
- package/bin/webui/fixtures/settings.js +6 -7
- package/bin/webui/fixtures/stats.js +25 -6
- package/bin/webui/fixtures/wait.js +98 -97
- package/bin/webui/i18n/en/behaviour.json +156 -0
- package/bin/webui/i18n/en/hookui.json +290 -194
- package/bin/webui/i18n/en/maintenance.json +71 -52
- package/bin/webui/i18n/en/nav.json +25 -24
- package/bin/webui/i18n/en/settings.json +60 -60
- package/bin/webui/i18n/en/tour.json +37 -35
- package/bin/webui/i18n/id/behaviour.json +156 -0
- package/bin/webui/i18n/id/hookui.json +290 -194
- package/bin/webui/i18n/id/maintenance.json +71 -52
- package/bin/webui/i18n/id/nav.json +25 -24
- package/bin/webui/i18n/id/settings.json +60 -60
- package/bin/webui/i18n/id/tour.json +37 -35
- package/bin/webui/js/01-i18n.js +155 -154
- package/bin/webui/js/05-banners.js +181 -172
- package/bin/webui/js/06-edit.js +193 -183
- package/bin/webui/js/90-tour.js +498 -494
- package/bin/webui/js/91-shortcuts.js +126 -126
- package/bin/webui/js/99-boot.js +121 -118
- package/bin/webui/js/panels/behaviour.js +1087 -0
- package/bin/webui/js/panels/hookui.js +2196 -1691
- package/bin/webui/js/panels/maintenance.js +336 -235
- package/bin/webui/js/panels/settings.js +726 -719
- package/mock-run/INDEX.md +110 -107
- package/mock-run/extra-slots.md +1 -1
- package/mock-run/gotcha-import.md +118 -0
- package/mock-run/habits.md +129 -0
- package/mock-run/orc-aftermath.md +392 -392
- package/mock-run/orc-budget.md +29 -33
- package/mock-run/orc-cli.md +200 -200
- package/mock-run/orc-explain.md +86 -86
- package/mock-run/orc-extra.md +389 -392
- package/mock-run/orc-fix.md +87 -0
- package/mock-run/orc-pattern.md +112 -112
- package/mock-run/orc-quick.md +6 -1
- package/mock-run/orc.md +157 -157
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +37 -34
- package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
- package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -5
- package/templates/agents/{orc-claude-writer-opus-4-8-high.md → orc-claude-writer-opus-5-low.md} +48 -53
- package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
- package/templates/agents/orc-executor-haiku-4-5.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
- package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-low.md +14 -6
- package/templates/agents/orc-executor-opus-5-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-5-high.md +15 -7
- package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
- package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
- package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
- package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
- package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
- package/templates/agents/orc-planner-opus-5-med.md +1 -4
- package/templates/agents/orc-recon-opus-5-low.md +1 -8
- package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
- package/templates/agents/orc-retro-opus-5-med.md +6 -8
- package/templates/agents/orc-retro-sonnet-5-high.md +7 -8
- package/templates/agents/orc-reviewer-opus-5-low.md +96 -0
- package/templates/agents/orc-scout-opus-5-low.md +1 -6
- package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
- package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
- package/templates/agents/orc-test-author-opus-5-med.md +4 -5
- package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
- package/templates/agents/orc-verifier-opus-5-med.md +16 -8
- package/templates/agents/{orc-wiki-scanner-opus-4-8-high.md → orc-wiki-scanner-opus-5-low.md} +74 -79
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
- package/templates/commands/orc-analyze.md +13 -21
- package/templates/commands/orc-fast.md +10 -15
- package/templates/commands/orc-fix.md +18 -0
- package/templates/commands/orc-poly.md +12 -21
- package/templates/commands/orc-pr-driver.md +11 -30
- package/templates/commands/orc-pr-setup.md +10 -31
- package/templates/commands/orc-route.md +11 -41
- package/templates/commands/orc-test.md +5 -60
- package/templates/commands/orc-wiki.md +64 -64
- package/templates/hooks/README.md +109 -7
- package/templates/hooks/orc-session-hook.js +339 -0
- package/templates/hooks/orc-statusline-render.js +317 -23
- package/templates/hooks/orc-statusline.js +165 -50
- package/templates/hooks/orc-subagent-line.js +23 -5
- package/templates/hooks/orc-weather-fetch.js +123 -0
- package/templates/skills/_shared/README.md +9 -0
- package/templates/skills/_shared/code-graph.md +47 -55
- package/templates/skills/_shared/config-precedence.md +3 -1
- package/templates/skills/_shared/extra-dispatch.md +78 -93
- package/templates/skills/_shared/gotchas.md +248 -177
- package/templates/skills/_shared/habits.md +101 -0
- package/templates/skills/_shared/lane-contract.md +84 -0
- package/templates/skills/_shared/opus5-only.md +14 -14
- package/templates/skills/_shared/phases/README.md +142 -83
- package/templates/skills/_shared/phases/analyst-gates.md +10 -21
- package/templates/skills/_shared/phases/execution.md +8 -14
- package/templates/skills/_shared/phases/house-rules.md +27 -32
- package/templates/skills/_shared/phases/intake.md +127 -133
- package/templates/skills/_shared/phases/mock-example.md +46 -56
- package/templates/skills/_shared/phases/plan-handoff.md +91 -97
- package/templates/skills/_shared/phases/planning.md +7 -17
- package/templates/skills/_shared/phases/preflight.md +19 -42
- package/templates/skills/_shared/phases/review.md +24 -28
- package/templates/skills/_shared/phases/rules.md +18 -42
- package/templates/skills/_shared/phases/scoring.md +55 -65
- package/templates/skills/_shared/phases/security-checklist.md +46 -50
- package/templates/skills/_shared/phases/security.md +45 -55
- package/templates/skills/_shared/phases/ship.md +6 -15
- package/templates/skills/_shared/phases/stop-resume.md +2 -5
- package/templates/skills/_shared/phases/summary.md +73 -48
- package/templates/skills/_shared/phases/testgen.md +41 -51
- package/templates/skills/_shared/phases/trace-verbs.md +447 -0
- package/templates/skills/_shared/phases/trace.md +66 -297
- package/templates/skills/_shared/phases/verify.md +62 -70
- package/templates/skills/_shared/phases/wave-grouping.md +128 -133
- package/templates/skills/_shared/phases/wiki-consult.md +10 -6
- package/templates/skills/_shared/read-ladder.md +2 -55
- package/templates/skills/_shared/return-validation.md +17 -70
- package/templates/skills/_shared/review-slice.md +106 -0
- package/templates/skills/_shared/smoke-gate.md +46 -28
- package/templates/skills/_shared/wait.md +1 -0
- package/templates/skills/context-combiner/SKILL.md +15 -44
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +35 -63
- package/templates/skills/orc/config.md +25 -27
- package/templates/skills/orc/examples/full-run-mock.md +2 -1
- package/templates/skills/orc/references/effort-and-mode.md +17 -17
- package/templates/skills/orc/references/pattern-gate.md +89 -89
- package/templates/skills/orc/references/phases/intake.md +41 -47
- package/templates/skills/orc/references/phases/integration.md +13 -19
- package/templates/skills/orc/references/preflight-report.md +11 -12
- package/templates/skills/orc/references/ultra-mode.md +9 -7
- package/templates/skills/orc/schemas/checkpoint.md +122 -122
- package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
- package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
- package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +12 -53
- package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
- package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
- package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
- package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
- package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
- package/templates/skills/orc-advisor/SKILL.md +56 -60
- package/templates/skills/orc-analyze/SKILL.md +33 -67
- package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
- package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
- package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
- package/templates/skills/orc-diy/README.md +31 -0
- package/templates/skills/orc-diy/SKILL.md +27 -78
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
- package/templates/skills/orc-fast/SKILL.md +49 -75
- package/templates/skills/orc-fix/SKILL.md +110 -0
- package/templates/skills/orc-judge/SKILL.md +77 -82
- package/templates/skills/orc-mini/SKILL.md +64 -112
- package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
- package/templates/skills/orc-pattern/SKILL.md +27 -48
- package/templates/skills/orc-poly/SKILL.md +32 -61
- package/templates/skills/orc-pr-driver/SKILL.md +25 -51
- package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
- package/templates/skills/orc-pr-setup/SKILL.md +20 -45
- package/templates/skills/orc-quick/README.md +44 -3
- package/templates/skills/orc-quick/SKILL.md +77 -108
- package/templates/skills/orc-quick/references/dispatch-gate.md +18 -6
- package/templates/skills/orc-quick/references/gh-mode.md +50 -1
- package/templates/skills/orc-quick/references/look.md +3 -1
- package/templates/skills/orc-retro/SKILL.md +20 -19
- package/templates/skills/orc-retro/examples/retro-mock.md +17 -17
- package/templates/skills/orc-route/SKILL.md +25 -45
- package/templates/skills/orc-test/SKILL.md +16 -37
- package/templates/skills/orc-verify/SKILL.md +14 -32
- package/templates/skills/orc-wait/SKILL.md +156 -163
- package/templates/skills/orc-wiki/README.md +325 -325
- package/templates/skills/orc-wiki/SKILL.md +195 -195
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
- package/templates/skills/orc-wiki/references/extra.md +2 -2
- package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
- package/templates/skills/orc-wiki/references/phases/phase-0.md +2 -7
- package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-2.md +4 -9
- package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +4 -8
- package/templates/agents/orc-claude-writer-opus-5-med.md +0 -55
- package/templates/agents/orc-reviewer-opus-5-med.md +0 -60
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +0 -81
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orc-fast
|
|
3
3
|
description: >
|
|
4
|
-
Fastest ORC lane — knowledge-gated single-executor implementation
|
|
5
|
-
"use orc-fast to implement X" or "/orc-fast".
|
|
6
|
-
a fresh project wiki (orc-wiki) AND a cached
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Orchestrator runs fine at Sonnet medium. The orchestrator never implements —
|
|
11
|
-
it spawns.
|
|
4
|
+
Fastest ORC lane — knowledge-gated single-executor implementation, with no
|
|
5
|
+
analyst and no planner. Use for "use orc-fast to implement X" or "/orc-fast".
|
|
6
|
+
Requires TWO prerequisites: a fresh project wiki (orc-wiki) AND a cached
|
|
7
|
+
code-pattern for the request's language. If either is missing, it falls back
|
|
8
|
+
to orc-mini. One Sonnet 4.6 high executor, a build+test smoke gate, one repair
|
|
9
|
+
round, ship.
|
|
12
10
|
---
|
|
13
11
|
|
|
14
12
|
# ORC-FAST
|
|
@@ -32,24 +30,26 @@ fit gate hands it to orc-mini.
|
|
|
32
30
|
|
|
33
31
|
## Phases
|
|
34
32
|
|
|
35
|
-
`orc lane phases orc-fast --json` is this lane's pipeline
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
manifest, because a `read: section` pointer names a HEADING and a renamed heading
|
|
39
|
-
is a pointer into nothing.
|
|
33
|
+
`orc lane phases orc-fast --json` is this lane's pipeline. **The CLI owns the order**:
|
|
34
|
+
never derive it from the headings below, and never rename or renumber one
|
|
35
|
+
without the manifest (`../_shared/lane-contract.md` §Phases).
|
|
40
36
|
|
|
41
37
|
## Phase F0 — Preflight (the two prerequisite gates; no spawn)
|
|
42
38
|
|
|
43
|
-
Emit a `GATE` trace line per check
|
|
39
|
+
Emit a `GATE` trace line per check.
|
|
40
|
+
|
|
41
|
+
**0. Config, FIRST.** `orc lane config orc-fast --json`: obey `effective`, print
|
|
42
|
+
`announce[]` VERBATIM, honour `stops[]`; never merge `.claude/orc.config.yaml`
|
|
43
|
+
(`../_shared/config-precedence.md`). **`habits{}` in it → print `habits.line`,
|
|
44
|
+
read `../_shared/habits.md` NOW.**
|
|
44
45
|
|
|
45
46
|
**a. Wiki gate.** Decide existence with `orc wiki status` — the deterministic
|
|
46
47
|
probe in `../_shared/detecting-artifacts.md`, never an ad-hoc `find` (`.claude`
|
|
47
|
-
is hidden). `none` = gate FAILED → fallback; else
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
absent but docs present = STALE; wiki absent/empty = gate FAILED → fallback).
|
|
48
|
+
is hidden). `none` = gate FAILED → fallback; else read the tier from
|
|
49
|
+
`orc wiki status --json` → `.tier` (FRESH / AGING / STALE; the CLI computes
|
|
50
|
+
it — never recompute it by hand).
|
|
51
51
|
- **FRESH** → proceed silently. **AGING** → one-line notice, proceed.
|
|
52
|
-
- **STALE** → the user judges. Ask with exactly these options:
|
|
52
|
+
- **STALE** → the user judges. Ask (H `fast.f0.stale-wiki`) with exactly these options:
|
|
53
53
|
1. **Refresh wiki, then continue fast** *(recommended)* — run orc-wiki's
|
|
54
54
|
incremental refresh (diff since `scan_commit`, re-scan only affected
|
|
55
55
|
docs), then re-enter this preflight.
|
|
@@ -81,9 +81,8 @@ then one `orc graph notes pending` batch — the next run starts from this cache
|
|
|
81
81
|
|
|
82
82
|
**d. Extra — a PROBE, not a gate (P0).** Run `orc extra resolve --slot fast-executor --json` (0 = extra, 1 = Claude) — **a gate that is never probed is a gate that is always off**, and without this step the lane silently runs on Claude however `extra_enabled` and `orc extra role` were set. `extra` → print the `extra:` line HERE and carry the answer into F2; `claude` → print nothing, never fall back, never stop.
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
themselves are this lane's own and stay here.
|
|
84
|
+
Their shape and four rules: `../_shared/phases/preflight.md` (`core`). The
|
|
85
|
+
probes are this lane's own.
|
|
87
86
|
|
|
88
87
|
## Phase F1 — Fit gate + micro-intake (one pass, ONE user round-trip)
|
|
89
88
|
|
|
@@ -134,35 +133,35 @@ pinned in the agent file). **Under `opus5_only` it is `orc-executor-opus-5-low`*
|
|
|
134
133
|
- **terse-return rule:** standard contract fields, NO narrative prose — files
|
|
135
134
|
changed, one-line diff summary, smoke-relevant notes only.
|
|
136
135
|
|
|
137
|
-
Validate the return per `../_shared/return-validation.md`
|
|
136
|
+
Validate the return per `../_shared/return-validation.md` §1–§3 + the § of
|
|
137
|
+
each field you injected — `unmet[]`
|
|
138
138
|
honesty, `pattern_version` + `invariants_checked` attestation, `actual_model`
|
|
139
139
|
/ `actual_effort` downgrade check (emit the `VERIFY` trace line), and §6's worktree delta (`git status --short` before/after; a path changed outside `declared_files` is a violation whatever the return said). Malformed
|
|
140
140
|
return = failure (one re-dispatch, then fallback offer).
|
|
141
141
|
|
|
142
|
-
**Before any re-dispatch, run `orc run inflight
|
|
142
|
+
**Before any re-dispatch, run `orc run inflight`**. A Task error does not kill the agent behind it, and exit 2 REFUSES by default — `a lane that re-dispatches over a live attempt` has broken the contract. Canonical: `../_shared/return-validation.md`.
|
|
143
143
|
|
|
144
144
|
## Phase F3 — Smoke gate (build + test; blocks ship on red)
|
|
145
145
|
|
|
146
146
|
Run the gate per `../_shared/smoke-gate.md`, sourcing commands **from
|
|
147
147
|
`wiki-meta.json`'s `commands` block** (recorded at wiki scan — don't
|
|
148
148
|
rediscover tooling; manifest lacks them → detect once and say so). **GREEN**
|
|
149
|
-
→ code-graph step e.(3) (never a gate) → ship. **RED** → one repair round; second red → STOP and offer: escalate to
|
|
149
|
+
→ code-graph step e.(3) (never a gate) → ship. **RED** → the flaky check, then one repair round; second red → STOP and offer: escalate to
|
|
150
150
|
orc-mini (reason `smoke-red-escalation`) / switch to full `/orc` / stop.
|
|
151
151
|
Docs-only → gate N/A, say so.
|
|
152
152
|
|
|
153
153
|
## Phase F3.5 — Mock example (config `mock_example`, default ask)
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
committed/staged**. Drift answer → `DRIFT-FROM` recovery (cap 2 loops, honest
|
|
159
|
-
report on cap). Trace: `PHASE mock-example`, `DRIFT loop=<n>`.
|
|
155
|
+
After a GREEN F3, before ship (H `fast.f3-5.mock`): follow `../_shared/drift-recovery.md` (load on
|
|
156
|
+
fire) — the `mock-examples/<change-slug>/` deliverable, the `DRIFT-FROM` loop and
|
|
157
|
+
its cap. Trace: `PHASE mock-example`, `DRIFT loop=<n>`.
|
|
160
158
|
|
|
161
159
|
## Phase F4 — Ship
|
|
162
160
|
|
|
163
|
-
Offer commit (push if asked; never stage `mock-examples/`). Append the final markers to the checkpoint, emit
|
|
161
|
+
Offer commit (H `fast.f4.ship` · `any.ship.review-before-push`; push if asked; never stage `mock-examples/`). Append the final markers to the checkpoint, emit
|
|
164
162
|
`OUTCOME task=… band=fast model=… retries=… unmet=…` + `FINISH`, show the
|
|
165
|
-
dispatch line (model/effort actually used) + the `/usage` reminder.
|
|
163
|
+
dispatch line (model/effort actually used) + the `/usage` reminder. Every end — ship
|
|
164
|
+
or a red STOP — prints the card (`../_shared/phases/summary.md` §End-of-run card). Fast never
|
|
166
165
|
triggers the post-ship wiki refresh ask (preflight polices freshness on the
|
|
167
166
|
way in) — the passive stale-flag note still applies to touched covered files.
|
|
168
167
|
|
|
@@ -176,46 +175,23 @@ already in the shared format — no migration.
|
|
|
176
175
|
|
|
177
176
|
## Behavior trace (always on)
|
|
178
177
|
|
|
179
|
-
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases`
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Nothing else about the protocol is restated here; a phase that ends with
|
|
186
|
-
`zero new trace lines is a protocol violation`.
|
|
187
|
-
|
|
188
|
-
## Config
|
|
189
|
-
|
|
190
|
-
**ONE resolver, and it is not you:** `orc lane config orc-fast --json`. Obey
|
|
191
|
-
`effective`, print every line in `announce[]` VERBATIM at preflight, and honour
|
|
192
|
-
`stops[]` before wave 1. Never re-derive a value, a precedence or an inertness
|
|
193
|
-
from `.claude/orc.config.yaml` — a key this lane does not read is not in the
|
|
194
|
-
answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
|
|
195
|
-
the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
|
|
196
|
-
documented defaults, out loud. Priorities and families:
|
|
197
|
-
`../_shared/config-precedence.md`.
|
|
198
|
-
|
|
199
|
-
Fast has no config key of its own — command-entry only; wave/scoring/review
|
|
200
|
-
keys never apply, and the tier edges the F0 gate reads arrive resolved.
|
|
178
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases orc-fast --json` →
|
|
179
|
+
`trace_grammar` gives the verbs). Lane token `fast`, tier
|
|
180
|
+
**Build lanes** — batched to **2 packets** (preflight+dispatch ·
|
|
181
|
+
gate+ship) → `orc trace write --packet -`. At run start write `log_dir/.current` =
|
|
182
|
+
`run-fast-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
183
|
+
in the SAME step. A phase that ends with `zero new trace lines is a protocol violation`.
|
|
201
184
|
|
|
202
|
-
##
|
|
185
|
+
## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
|
|
203
186
|
|
|
204
|
-
`orc
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
## Calls
|
|
187
|
+
- **Calls:** `orc lane calls orc-fast --json` names every call and its exit codes.
|
|
188
|
+
**An exit code is an ANSWER where it says so, not a failure.** Make no other call.
|
|
189
|
+
- **Config:** F0 step 0.
|
|
190
|
+
- **Rules:** `orc rules slice --lane orc-fast --json` is the ONLY assembler
|
|
191
|
+
(`../_shared/phases/rules.md`). Its `line` prints VERBATIM at preflight.
|
|
210
192
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
it, and what an EMPTY answer means. Never invent a spelling, never re-word an
|
|
214
|
-
exit code, and never re-derive a state word — the CLI's state words are the only
|
|
215
|
-
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
216
|
-
a failure**. A call the answer does not name is a call this lane does not make.
|
|
217
|
-
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
218
|
-
command you are about to run, out loud, before running it.
|
|
193
|
+
Fast has no config key of its own — command-entry only; wave/scoring/review
|
|
194
|
+
keys never apply, and the tier edges the F0 gate reads arrive resolved.
|
|
219
195
|
|
|
220
196
|
## Checkpoint (minimal, append-only)
|
|
221
197
|
|
|
@@ -223,14 +199,12 @@ One `fast-checkpoint.md` in the run folder: GATE results (+ any
|
|
|
223
199
|
`wiki_stale_override`), the dispatch, smoke verdicts, OUTCOME — enough for
|
|
224
200
|
/orc-retro mining and fresh-session resume, nothing more.
|
|
225
201
|
|
|
226
|
-
## What fast still enforces
|
|
202
|
+
## What fast still enforces
|
|
227
203
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
(malformed = failure) · never offer commit on a red build · report the
|
|
231
|
-
dispatch + remind the user to run `/usage` (never invoke it programmatically).
|
|
204
|
+
All artifacts in the run subfolder, never project root · never offer commit on
|
|
205
|
+
a red build · never invoke `/usage` programmatically.
|
|
232
206
|
|
|
233
207
|
## Waiting mid-run (`/orc-wait`)
|
|
234
208
|
|
|
235
209
|
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
236
|
-
Checkpoint **full** · safe point **after the executor returns**.
|
|
210
|
+
Checkpoint **full** · safe point **after the executor returns**.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orc-fix
|
|
3
|
+
description: >
|
|
4
|
+
Say "this is a fix, and here is what it fixes". Use for "/orc-fix", "this
|
|
5
|
+
fixes Sonar typescript:S3776", "ORC caused this defect", "this bug came from
|
|
6
|
+
AI-generated code", "record this fix". It classifies the fix from evidence,
|
|
7
|
+
asks once, and records it so the next review sees it. A rider: it opens no
|
|
8
|
+
run and returns to exactly where the run was. With no run open it can also
|
|
9
|
+
make the fix, like /orc-quick.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ORC — the fix record
|
|
13
|
+
|
|
14
|
+
A RIDER lane, like `/orc-wait` and `/orc-explain`. It opens no run of its own,
|
|
15
|
+
writes no `run-<lane>-<slug>` pointer and never writes `.current`. The user can
|
|
16
|
+
call it at any time — also while another lane waits at a question.
|
|
17
|
+
|
|
18
|
+
## What this lane never does
|
|
19
|
+
|
|
20
|
+
- It never begins between a dispatch and its validated return.
|
|
21
|
+
- It never changes the host run: no re-plan, no re-score, no new task. A
|
|
22
|
+
suspend does not widen anyone's authority.
|
|
23
|
+
- With a run open, it never writes code. The host lane makes the fix — two
|
|
24
|
+
writers on one tree is the conflict `/orc-wait` forbids (DE-12).
|
|
25
|
+
- It never sets `miss` itself, and never records `author: orc`. The CLI does
|
|
26
|
+
the first, and refuses the second.
|
|
27
|
+
|
|
28
|
+
## F0 — look (silent)
|
|
29
|
+
|
|
30
|
+
Run `orc fix classify --text "<the user's words>" --json`. The CLI reads the
|
|
31
|
+
git state, `git blame` on the named lines, the traces and the host run, and
|
|
32
|
+
proposes ONE class on two axes:
|
|
33
|
+
|
|
34
|
+
- `source` (what found it): `sonar` · `ci` · `defect` · `pr` · `review` · `other`
|
|
35
|
+
- `introduced_by` (who wrote the bad lines): `orc` · `ai` · `human` · `unknown`
|
|
36
|
+
|
|
37
|
+
| exit | meaning | what you do |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| 0 | classified | go to F1 |
|
|
40
|
+
| 1 | a dispatch is in flight | say so, wait for its return, then run F0 again |
|
|
41
|
+
| 2 | no text | ask what the fix fixes |
|
|
42
|
+
|
|
43
|
+
Never classify in your head. The user's three cases: "a SonarQube fix" →
|
|
44
|
+
`source: sonar`; "a defect caused by ORC" → `source: defect, introduced_by:
|
|
45
|
+
orc`; "a bug caused by AI-generated code" → `introduced_by: ai`.
|
|
46
|
+
|
|
47
|
+
## F1 — ask once (H `fix.f1.class`)
|
|
48
|
+
|
|
49
|
+
Show the proposed class, every `evidence` line and the file, then:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
This fix: source sonar · introduced by ORC (run-mini-total-290926)
|
|
53
|
+
- a Sonar rule key (typescript:S3776)
|
|
54
|
+
- git blame → 4c1e2a9: the commit falls inside the run's trace window ...
|
|
55
|
+
1. confirm 2. change the class 3. cancel
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The user's word wins over the evidence. A changed class goes into the record
|
|
59
|
+
as `class_by: "user"`; a confirmed one as `class_by: "evidence"`. Cancel →
|
|
60
|
+
nothing is written; return to the run.
|
|
61
|
+
|
|
62
|
+
## F2 — record
|
|
63
|
+
|
|
64
|
+
Pipe the classify answer's `record` object (with the user's class and
|
|
65
|
+
`class_by`) to `orc fix record - --json`. The CLI:
|
|
66
|
+
|
|
67
|
+
1. writes ONE observation through the gotcha store — with a Sonar issue key it
|
|
68
|
+
uses the importer's own id, so a later `gotcha sync` completes the same row;
|
|
69
|
+
2. computes `miss` from the stored review scopes;
|
|
70
|
+
3. writes ONE `FIX` line into the HOST run's trace, when one is open;
|
|
71
|
+
4. prints ONE line. Show it VERBATIM, then stop.
|
|
72
|
+
|
|
73
|
+
Exit 1 → a dispatch started meanwhile; nothing was written. Wait, then F2 again.
|
|
74
|
+
|
|
75
|
+
## No run open — offer the fix (DE-12)
|
|
76
|
+
|
|
77
|
+
`mode: may-fix` from F0 → offer to make the fix before F2, like `/orc-quick`:
|
|
78
|
+
|
|
79
|
+
1. The user picks the executor at the `/orc-quick` dispatch gate (that lane's
|
|
80
|
+
`dispatch-gate.md` reference, "Writing code") — nothing spawns without a yes.
|
|
81
|
+
2. The slice carries `orc rules slice --lane orc-fix --json` (below).
|
|
82
|
+
3. The smoke gate (`../_shared/smoke-gate.md`): red blocks the record.
|
|
83
|
+
4. F2 with `outcome: "addressed"` and `via: "orc-fix"`.
|
|
84
|
+
|
|
85
|
+
The user can also say "record only" — then F2 at once.
|
|
86
|
+
|
|
87
|
+
## Config
|
|
88
|
+
|
|
89
|
+
`orc lane config orc-fix --json`, obey `effective`. Never merge
|
|
90
|
+
`.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`).
|
|
91
|
+
|
|
92
|
+
## Rules — the anti-slop card (`../_shared/phases/rules.md`)
|
|
93
|
+
|
|
94
|
+
`orc rules slice --lane orc-fix --json` is the ONLY assembler. It rides only in
|
|
95
|
+
an executor slice of the no-run fix.
|
|
96
|
+
|
|
97
|
+
## Habits and trace
|
|
98
|
+
|
|
99
|
+
**Habits:** the host run had `habits{}` in its config answer → read
|
|
100
|
+
`../_shared/habits.md`; its next packet takes the `ASK` for `fix.f1.class`
|
|
101
|
+
(class `never`: a fact is never a habit). No `habits{}` → ignore `(H …)`.
|
|
102
|
+
|
|
103
|
+
**Trace:** the CLI writes the `FIX` line itself. You do not narrate it and you
|
|
104
|
+
do not repeat it. With no run open, nothing is traced — the record is the
|
|
105
|
+
observation.
|
|
106
|
+
|
|
107
|
+
## Waiting mid-run (`/orc-wait`)
|
|
108
|
+
|
|
109
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
110
|
+
Checkpoint **none** · safe point **after the record is written**. Nothing here to checkpoint, so all three modes behave identically — say so rather than asking.
|
|
@@ -1,82 +1,77 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orc-judge
|
|
3
|
-
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- **
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
| implementation | Phase 6/6.5 + traceability matrix + static analysis | fidelity to the user's ask + ultra-strict quality (security, smells, simplification, placement, pattern invariants) | scored executor fix wave → re-verify → re-judge |
|
|
79
|
-
|
|
80
|
-
Return fields include `actual_model` + `actual_effort` (standard
|
|
81
|
-
claimed-vs-actual check) and `rubric_items_checked[]` +
|
|
82
|
-
`unconfirmed_assumptions_touched[]` — validate them like any worker return.
|
|
1
|
+
---
|
|
2
|
+
name: orc-judge
|
|
3
|
+
description: >
|
|
4
|
+
Internal to /orc-ultra: the three judgment gates — analysis, plan,
|
|
5
|
+
implementation. Returns APPROVE | REVISE | ESCALATE with anchored findings;
|
|
6
|
+
REVISE has a hard 2-loop cap. No slash command of its own.
|
|
7
|
+
disable-model-invocation: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# ORC-JUDGE (ultra-lane judgment gates)
|
|
11
|
+
|
|
12
|
+
A model-based quality gate on top of ORC's deterministic gates. The judge
|
|
13
|
+
handles what determinism cannot: scope-interpretation correctness, plan
|
|
14
|
+
soundness, implementation fidelity, and — at the final gate — ultra-strict
|
|
15
|
+
code quality. Deterministic gates ALWAYS run first; the judge never re-checks
|
|
16
|
+
what a string-compare catches.
|
|
17
|
+
|
|
18
|
+
Ultra lane ONLY. No `/orc-judge` command; the orchestrator dispatches
|
|
19
|
+
`orc-judge-opus-5-xhigh` at the three ultra gates.
|
|
20
|
+
|
|
21
|
+
## Hard rules
|
|
22
|
+
|
|
23
|
+
1. **The orchestrator never judges — it spawns.** One agent, three contexts
|
|
24
|
+
(`gate=analysis|plan|implementation`).
|
|
25
|
+
2. **Deterministic first.** A judge dispatch is only legal AFTER the gate's
|
|
26
|
+
deterministic checks passed (evidence spot-check + derivation lint /
|
|
27
|
+
coverage + graph checks / verify + traceability matrix + static analysis).
|
|
28
|
+
3. **The judge is read-only** and blind to the author's internal reasoning or
|
|
29
|
+
self-assessment (anti-anchoring): it sees the artifact, its evidence, the
|
|
30
|
+
advisor brief + rubric, and the original request.
|
|
31
|
+
4. **Judge gates ADD to user sign-offs, never replace them.** Gate approvals
|
|
32
|
+
never skip the analyst challenge round or the plan sign-off.
|
|
33
|
+
5. **Gate scope is one-directional.** gate=plan takes the approved spec as
|
|
34
|
+
fixed ground truth; gate=implementation takes the approved plan as fixed —
|
|
35
|
+
no gate re-litigates an earlier approved gate.
|
|
36
|
+
6. **The judge never fixes.** Authors fix: analyst (gate=analysis), planner
|
|
37
|
+
(gate=plan), a scored executor fix wave (gate=implementation).
|
|
38
|
+
|
|
39
|
+
## Verdict handling (orchestrator side)
|
|
40
|
+
|
|
41
|
+
Validate the return against the agent's verdict contract, then:
|
|
42
|
+
|
|
43
|
+
- **Downgrade enforcement:** any blocking finding missing its verbatim
|
|
44
|
+
anchor or its class-appropriate justification (failure_consequence for
|
|
45
|
+
correctness/security; named category + concrete alternative for
|
|
46
|
+
smell/simplification/placement) → downgrade to advisory and tell the user.
|
|
47
|
+
EXCEPTION: a security finding with a concrete consequence is always
|
|
48
|
+
blocking — never downgraded.
|
|
49
|
+
- **APPROVE** → record the verdict artifact, continue the pipeline.
|
|
50
|
+
- **REVISE** → re-dispatch the author with the original slice + the blocking
|
|
51
|
+
findings verbatim. The author's return must echo `finding_id → resolution`
|
|
52
|
+
per finding; a missing echo is a malformed return (requeue). Then RE-JUDGE
|
|
53
|
+
under the convergence rule: block only on unresolved prior findings by id
|
|
54
|
+
or on lines the revision changed; new findings on untouched material are
|
|
55
|
+
advisory-only. **Hard cap: 2 revision loops per gate**, counted in the
|
|
56
|
+
checkpoint.
|
|
57
|
+
- **ESCALATE** (or a third failure) → present the ESCALATE menu:
|
|
58
|
+
accept-and-proceed (unresolved findings recorded in the Phase 7 summary) /
|
|
59
|
+
user fixes manually then re-judge (does not consume a loop) / grant one
|
|
60
|
+
extra loop / stop-and-checkpoint.
|
|
61
|
+
- Advisory findings NEVER loop — they ride forward attached to the next
|
|
62
|
+
phase's slices as notes.
|
|
63
|
+
- Persist every verdict as `run/{run-slug}/ultra/verdict-<gate>-<round>.md`
|
|
64
|
+
(mined by /orc-retro; survives resume). When logging, emit
|
|
65
|
+
`JUDGE <gate> <verdict>` and the judgment GATE line (pass|bounce|escalate).
|
|
66
|
+
|
|
67
|
+
## The three gates
|
|
68
|
+
|
|
69
|
+
| Gate | After | Judges | REVISE target |
|
|
70
|
+
|------|-------|--------|---------------|
|
|
71
|
+
| analysis | analyst-return deterministic gates | scope interpretation, requirement coherence, rubric misses, stale-doc risk | analyst |
|
|
72
|
+
| plan | Phase 1 exit gate + blast-radius map | decomposition, declared-file plausibility, deps, right-sizing, blast-radius coverage | planner |
|
|
73
|
+
| implementation | Phase 6/6.5 + traceability matrix + static analysis | fidelity to the user's ask + ultra-strict quality (security, smells, simplification, placement, pattern invariants) | scored executor fix wave → re-verify → re-judge |
|
|
74
|
+
|
|
75
|
+
Return fields include `actual_model` + `actual_effort` (standard
|
|
76
|
+
claimed-vs-actual check) and `rubric_items_checked[]` +
|
|
77
|
+
`unconfirmed_assumptions_touched[]` — validate them like any worker return.
|