@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,89 +1,89 @@
|
|
|
1
|
-
# Reference — Code-Pattern Gate (orchestrator side)
|
|
2
|
-
|
|
3
|
-
How the full lane resolves, injects, and enforces per-language code-patterns so
|
|
4
|
-
executors MATCH the existing codebase instead of writing generic-template code.
|
|
5
|
-
The engine (playbooks, codifier slice, reconcile rules) is the sibling skill
|
|
6
|
-
`../../orc-pattern/SKILL.md`; this file is the orchestrator's gate + wiring.
|
|
7
|
-
Load at Phase 2 (tagging) and Phase 3 (resolve gate + slice injection).
|
|
8
|
-
|
|
9
|
-
Principle: **conventions defer to the project; security/correctness invariants
|
|
10
|
-
are always enforced.**
|
|
11
|
-
|
|
12
|
-
## Phase 2 — Tag each task while scoring
|
|
13
|
-
|
|
14
|
-
From its `declared_files` extensions + repo deps (see
|
|
15
|
-
`../../orc-pattern/references/INDEX.md`):
|
|
16
|
-
`{domain: FE|BE|null, lang: react|nextjs|vue|fastapi|nestjs|go|…|null}`.
|
|
17
|
-
Tasks with no FE/BE language need no pattern.
|
|
18
|
-
|
|
19
|
-
**Postgres secondary tag:** on a Postgres project (`pg`/`psycopg`/`asyncpg`/
|
|
20
|
-
`pgx`/`lib/pq`/`Npgsql`/Prisma `postgresql`/`postgrex` in deps), add
|
|
21
|
-
`db: postgres` to any task whose `declared_files` touch the data-access layer
|
|
22
|
-
(repositories/dao/models/queries, `*.sql`, ORM entities/migrations). `db`
|
|
23
|
-
co-applies WITH the framework `lang`, never instead of it — it pulls the
|
|
24
|
-
cross-cutting `postgres` playbook into the same resolve gate.
|
|
25
|
-
|
|
26
|
-
## Phase 3 — Resolve gate (once, before the first wave)
|
|
27
|
-
|
|
28
|
-
For each distinct tagged language (including `postgres` when any task is
|
|
29
|
-
`db`-tagged), resolve against the cache `.claude/orc/patterns/<lang>-pattern.md`
|
|
30
|
-
— test existence with the deterministic probe `orc pattern status <lang>`
|
|
31
|
-
(exit 0 = cached; see `../../_shared/detecting-artifacts.md`), never an ad-hoc
|
|
32
|
-
`find`, so a codified pattern is never missed:
|
|
33
|
-
|
|
34
|
-
Every resolved language prints exactly ONE user-visible line (no cost, no ask —
|
|
35
|
-
visibility only, so the user always knows which house style is in force):
|
|
36
|
-
|
|
37
|
-
- **Cache hit, no drift** → no ask, no cost, but print
|
|
38
|
-
`pattern: <lang>-pattern.md applied (cached)`.
|
|
39
|
-
- **Cache miss** → apply config `pattern_findings` (default `ask`):
|
|
40
|
-
- `ask` → ONE P0 prompt batched across ALL missing languages ("Learn
|
|
41
|
-
conventions for {…} via orc-pattern, or proceed language-agnostic?");
|
|
42
|
-
- `on` → codify without asking; print `pattern: <lang> — codifying (cache miss)`;
|
|
43
|
-
- `off` → agnostic; print `pattern: <lang> — running language-agnostic (no cached pattern)`.
|
|
44
|
-
- **On learn/`on`** → dispatch `orc-pattern-codifier-sonnet-5-high` per missing
|
|
45
|
-
language (`orc-pattern-codifier-opus-5-med` when `opus5_only` — see
|
|
46
|
-
`../../_shared/opus5-only.md`; slice per `../../orc-pattern/SKILL.md`
|
|
47
|
-
Phase 1); YOU write the returned pattern to the cache.
|
|
48
|
-
- **Agnostic fallback** (declined / `off` / no playbook for the language): no
|
|
49
|
-
codifier, no scan — the executor enforces the universal invariants and
|
|
50
|
-
imitates the neighbor files it already reads. ~Zero added cost.
|
|
51
|
-
|
|
52
|
-
Hold the resolved pattern per language in run state (survives
|
|
53
|
-
checkpoint/resume) — it is injected at dispatch and reused at Phase 5/6.
|
|
54
|
-
|
|
55
|
-
## Slice injection (anti-skip layer 1)
|
|
56
|
-
|
|
57
|
-
Inject the resolved conventions + blocking invariants + the enforceable
|
|
58
|
-
`validation_gate[]` lines LITERALLY into each FE/BE task's slice as `pattern` —
|
|
59
|
-
never a file pointer. Agnostic tasks get the universal invariants only.
|
|
60
|
-
|
|
61
|
-
**Gotchas ride BESIDE the pattern block, never inside it** (config `gotchas`;
|
|
62
|
-
canonical `../../_shared/gotchas.md`). Same slice, same literal injection, one
|
|
63
|
-
hard difference: the pattern applies to a LANGUAGE, so it goes to every task
|
|
64
|
-
tagged with that language — a gotcha applies to a `scope` GLOB, so it goes only to
|
|
65
|
-
tasks whose `declared_files` match it, capped at 3, highest `hits` first. Zero
|
|
66
|
-
matches = no gotcha block at all. Never inject unfiltered: a pattern is what this
|
|
67
|
-
project always does, a gotcha is what it got wrong ONCE, somewhere specific.
|
|
68
|
-
|
|
69
|
-
For a `db:postgres`-tagged task, ALSO merge the resolved `postgres` pattern's
|
|
70
|
-
Conventions + Invariants + gate lines into the SAME `pattern` block (appended
|
|
71
|
-
to the framework pattern, or standalone if the task has no framework lang) —
|
|
72
|
-
query invariants (bound params only, pooled connections, transactional
|
|
73
|
-
multi-writes) ride the same anti-skip path. Record the postgres
|
|
74
|
-
`pattern_version` in run state/log too.
|
|
75
|
-
|
|
76
|
-
## Return validation (anti-skip layer 2)
|
|
77
|
-
|
|
78
|
-
A task that was given a `pattern` must return `invariants_checked: true` + a
|
|
79
|
-
`pattern_version` matching what you injected — the single attestation covers a
|
|
80
|
-
merged block. Missing/false attestation = malformed return (requeue). Record
|
|
81
|
-
the applied `pattern_version` in the trace.
|
|
82
|
-
|
|
83
|
-
## Review/verify re-check (anti-skip layer 3)
|
|
84
|
-
|
|
85
|
-
- **Phase 5 (review):** pass the resolved pattern as `code_pattern` AND its
|
|
86
|
-
blocking `invariants[]` + `validation_gate[]` lines for the re-check — don't
|
|
87
|
-
re-ask the user. An invariant violation or unmet gate line is P0.
|
|
88
|
-
- **Phase 6 (verify):** pass the `validation_gate[]` lines in the slice — each
|
|
89
|
-
line is an acceptance criterion; an unmet line is P0.
|
|
1
|
+
# Reference — Code-Pattern Gate (orchestrator side)
|
|
2
|
+
|
|
3
|
+
How the full lane resolves, injects, and enforces per-language code-patterns so
|
|
4
|
+
executors MATCH the existing codebase instead of writing generic-template code.
|
|
5
|
+
The engine (playbooks, codifier slice, reconcile rules) is the sibling skill
|
|
6
|
+
`../../orc-pattern/SKILL.md`; this file is the orchestrator's gate + wiring.
|
|
7
|
+
Load at Phase 2 (tagging) and Phase 3 (resolve gate + slice injection).
|
|
8
|
+
|
|
9
|
+
Principle: **conventions defer to the project; security/correctness invariants
|
|
10
|
+
are always enforced.**
|
|
11
|
+
|
|
12
|
+
## Phase 2 — Tag each task while scoring
|
|
13
|
+
|
|
14
|
+
From its `declared_files` extensions + repo deps (see
|
|
15
|
+
`../../orc-pattern/references/INDEX.md`):
|
|
16
|
+
`{domain: FE|BE|null, lang: react|nextjs|vue|fastapi|nestjs|go|…|null}`.
|
|
17
|
+
Tasks with no FE/BE language need no pattern.
|
|
18
|
+
|
|
19
|
+
**Postgres secondary tag:** on a Postgres project (`pg`/`psycopg`/`asyncpg`/
|
|
20
|
+
`pgx`/`lib/pq`/`Npgsql`/Prisma `postgresql`/`postgrex` in deps), add
|
|
21
|
+
`db: postgres` to any task whose `declared_files` touch the data-access layer
|
|
22
|
+
(repositories/dao/models/queries, `*.sql`, ORM entities/migrations). `db`
|
|
23
|
+
co-applies WITH the framework `lang`, never instead of it — it pulls the
|
|
24
|
+
cross-cutting `postgres` playbook into the same resolve gate.
|
|
25
|
+
|
|
26
|
+
## Phase 3 — Resolve gate (once, before the first wave)
|
|
27
|
+
|
|
28
|
+
For each distinct tagged language (including `postgres` when any task is
|
|
29
|
+
`db`-tagged), resolve against the cache `.claude/orc/patterns/<lang>-pattern.md`
|
|
30
|
+
— test existence with the deterministic probe `orc pattern status <lang>`
|
|
31
|
+
(exit 0 = cached; see `../../_shared/detecting-artifacts.md`), never an ad-hoc
|
|
32
|
+
`find`, so a codified pattern is never missed:
|
|
33
|
+
|
|
34
|
+
Every resolved language prints exactly ONE user-visible line (no cost, no ask —
|
|
35
|
+
visibility only, so the user always knows which house style is in force):
|
|
36
|
+
|
|
37
|
+
- **Cache hit, no drift** → no ask, no cost, but print
|
|
38
|
+
`pattern: <lang>-pattern.md applied (cached)`.
|
|
39
|
+
- **Cache miss** → apply config `pattern_findings` (default `ask`):
|
|
40
|
+
- `ask` → ONE P0 prompt (H `orc.phase-3.pattern`) batched across ALL missing languages ("Learn
|
|
41
|
+
conventions for {…} via orc-pattern, or proceed language-agnostic?");
|
|
42
|
+
- `on` → codify without asking; print `pattern: <lang> — codifying (cache miss)`;
|
|
43
|
+
- `off` → agnostic; print `pattern: <lang> — running language-agnostic (no cached pattern)`.
|
|
44
|
+
- **On learn/`on`** → dispatch `orc-pattern-codifier-sonnet-5-high` per missing
|
|
45
|
+
language (`orc-pattern-codifier-opus-5-med` when `opus5_only` — see
|
|
46
|
+
`../../_shared/opus5-only.md`; slice per `../../orc-pattern/SKILL.md`
|
|
47
|
+
Phase 1); YOU write the returned pattern to the cache.
|
|
48
|
+
- **Agnostic fallback** (declined / `off` / no playbook for the language): no
|
|
49
|
+
codifier, no scan — the executor enforces the universal invariants and
|
|
50
|
+
imitates the neighbor files it already reads. ~Zero added cost.
|
|
51
|
+
|
|
52
|
+
Hold the resolved pattern per language in run state (survives
|
|
53
|
+
checkpoint/resume) — it is injected at dispatch and reused at Phase 5/6.
|
|
54
|
+
|
|
55
|
+
## Slice injection (anti-skip layer 1)
|
|
56
|
+
|
|
57
|
+
Inject the resolved conventions + blocking invariants + the enforceable
|
|
58
|
+
`validation_gate[]` lines LITERALLY into each FE/BE task's slice as `pattern` —
|
|
59
|
+
never a file pointer. Agnostic tasks get the universal invariants only.
|
|
60
|
+
|
|
61
|
+
**Gotchas ride BESIDE the pattern block, never inside it** (config `gotchas`;
|
|
62
|
+
canonical `../../_shared/gotchas.md`). Same slice, same literal injection, one
|
|
63
|
+
hard difference: the pattern applies to a LANGUAGE, so it goes to every task
|
|
64
|
+
tagged with that language — a gotcha applies to a `scope` GLOB, so it goes only to
|
|
65
|
+
tasks whose `declared_files` match it, capped at 3, highest `hits` first. Zero
|
|
66
|
+
matches = no gotcha block at all. Never inject unfiltered: a pattern is what this
|
|
67
|
+
project always does, a gotcha is what it got wrong ONCE, somewhere specific.
|
|
68
|
+
|
|
69
|
+
For a `db:postgres`-tagged task, ALSO merge the resolved `postgres` pattern's
|
|
70
|
+
Conventions + Invariants + gate lines into the SAME `pattern` block (appended
|
|
71
|
+
to the framework pattern, or standalone if the task has no framework lang) —
|
|
72
|
+
query invariants (bound params only, pooled connections, transactional
|
|
73
|
+
multi-writes) ride the same anti-skip path. Record the postgres
|
|
74
|
+
`pattern_version` in run state/log too.
|
|
75
|
+
|
|
76
|
+
## Return validation (anti-skip layer 2)
|
|
77
|
+
|
|
78
|
+
A task that was given a `pattern` must return `invariants_checked: true` + a
|
|
79
|
+
`pattern_version` matching what you injected — the single attestation covers a
|
|
80
|
+
merged block. Missing/false attestation = malformed return (requeue). Record
|
|
81
|
+
the applied `pattern_version` in the trace.
|
|
82
|
+
|
|
83
|
+
## Review/verify re-check (anti-skip layer 3)
|
|
84
|
+
|
|
85
|
+
- **Phase 5 (review):** pass the resolved pattern as `code_pattern` AND its
|
|
86
|
+
blocking `invariants[]` + `validation_gate[]` lines for the re-check — don't
|
|
87
|
+
re-ask the user. An invariant violation or unmet gate line is P0.
|
|
88
|
+
- **Phase 6 (verify):** pass the `validation_gate[]` lines in the slice — each
|
|
89
|
+
line is an acceptance criterion; an unmet line is P0.
|
|
@@ -1,47 +1,41 @@
|
|
|
1
|
-
# Phase — Intake (id: `intake`)
|
|
2
|
-
|
|
3
|
-
> **`/orc` phase file
|
|
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
|
-
its constraints become hard rules in every slice — at slice-assembly each
|
|
43
|
-
task's `spec_invariants[]` is appended VERBATIM to that slice's
|
|
44
|
-
`constraints[]`. Offer the opt-in **Test Authoring** (Phase 6.5; default
|
|
45
|
-
`config.generate_tests`) in the sign-off round.
|
|
46
|
-
|
|
47
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Intake (id: `intake`)
|
|
2
|
+
|
|
3
|
+
> **`/orc` phase file** — read when the phase fires. One consumer, so it stays home (`../../../_shared/phases/README.md`). `orc lane phases orc --json` names the file and the layers.
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer full -->
|
|
6
|
+
|
|
7
|
+
## Intake (load ../../../_shared/phases/intake.md)
|
|
8
|
+
|
|
9
|
+
**Plan-input trigger (check FIRST — load `../../../_shared/phases/plan-handoff.md`):** if the
|
|
10
|
+
run input IS a plan (pasted planning-output, a `plan-{name}.md` path, or an
|
|
11
|
+
`orc/planner/{name}/` checkpoint), follow that reference: bootstrap the trace,
|
|
12
|
+
schema-validate, apply the `plan_head` staleness valve, RE-RUN the full Phase 1
|
|
13
|
+
exit gate here (the deterministic catch for phantom-file drift), relay
|
|
14
|
+
`open_questions[]`, then continue at Phase 2. A plan input never skips Phase 2/3
|
|
15
|
+
nor executes task-by-task ad hoc.
|
|
16
|
+
|
|
17
|
+
**Analyst auto-trigger:** on a document (PDF path, pasted doc, audit sheet)
|
|
18
|
+
OR an ambiguous/underspecified requirement, FIRST dispatch the System Analyst
|
|
19
|
+
(doc-optional — with no doc the request itself is the source). Offer
|
|
20
|
+
standard/deep (H `any.analysis.depth`; `config.default_analysis_depth` presets it; mention `orc
|
|
21
|
+
config set default_analysis_depth deep`); deep → you dispatch the scouts. On
|
|
22
|
+
return run the analyst-return gates (analyst-gates.md); on build, continue at
|
|
23
|
+
Phase 1 with the Requirement Planner.
|
|
24
|
+
|
|
25
|
+
Emit `PHASE intake start` FIRST, then create `run/{run-slug}/` (slug from the
|
|
26
|
+
intent). Then: rough-size →
|
|
27
|
+
question tier (2/4/6) → ONE batched question round → draft the intent-spec
|
|
28
|
+
(`../../schemas/intent-spec.md`) → **repo cross-check** (intake Step 3.5:
|
|
29
|
+
Glob/Grep-confirm everything the spec names, or tag `UNVERIFIED`; tags become
|
|
30
|
+
ONE batched sign-off question; >3 tags → recommend `orc-analyze`) → sign-off
|
|
31
|
+
preference (gate/soft; DEFAULT GATE) → show spec → approval or edits. **No
|
|
32
|
+
planning until approved (gate mode) and no unresolved `UNVERIFIED` tags
|
|
33
|
+
either way.** On approval, emit `PHASE intake end`.
|
|
34
|
+
|
|
35
|
+
The intent-spec's definition-of-done becomes Phase 6's acceptance criteria;
|
|
36
|
+
its constraints become hard rules in every slice — at slice-assembly each
|
|
37
|
+
task's `spec_invariants[]` is appended VERBATIM to that slice's
|
|
38
|
+
`constraints[]`. Offer the opt-in **Test Authoring** (H `orc.intake.testgen`; Phase 6.5; default
|
|
39
|
+
`config.generate_tests`) in the sign-off round.
|
|
40
|
+
|
|
41
|
+
<!-- /orc:layer -->
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
# Phase — Integration (worktrees) (id: `integration`)
|
|
2
|
-
|
|
3
|
-
> **`/orc` phase file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Emit `PHASE integration start`. Merge worker branches; conflicts → resolver
|
|
16
|
-
subagent (Opus 4.8 medium) given BOTH tasks' specs/intents, not just the diff.
|
|
17
|
-
Record merge state in checkpoint; emit `PHASE integration end`.
|
|
18
|
-
|
|
19
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Integration (worktrees) (id: `integration`)
|
|
2
|
+
|
|
3
|
+
> **`/orc` phase file** — read when the phase fires. One consumer, so it stays home (`../../../_shared/phases/README.md`). `orc lane phases orc --json` names the file and the layers.
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer full -->
|
|
6
|
+
|
|
7
|
+
## Integration (worktrees only)
|
|
8
|
+
|
|
9
|
+
Emit `PHASE integration start`. Merge worker branches; conflicts → resolver
|
|
10
|
+
subagent (Opus 4.8 medium) given BOTH tasks' specs/intents, not just the diff.
|
|
11
|
+
Record merge state in checkpoint; emit `PHASE integration end`.
|
|
12
|
+
|
|
13
|
+
<!-- /orc:layer -->
|
|
@@ -4,11 +4,10 @@ One compact, user-visible block printed ONCE at Phase 1, after the planning
|
|
|
4
4
|
input is settled (wiki consulted, crosslink probed, waves computed at Phase 2 —
|
|
5
5
|
so print it at the point all inputs exist, typically end of Phase 1 / start of
|
|
6
6
|
Phase 3). This is **presentation only** — no new probes; every value is already
|
|
7
|
-
computed by the wiki consult
|
|
8
|
-
|
|
7
|
+
computed by the wiki consult, the crosslink probe, the pattern resolve gate,
|
|
8
|
+
and wave grouping.
|
|
9
9
|
|
|
10
|
-
The point
|
|
11
|
-
always surfaced: the user always knows whether the run is grounded (wiki),
|
|
10
|
+
The point: the four knowledge gates are ALWAYS surfaced: the user always knows whether the run is grounded (wiki),
|
|
12
11
|
whose house style is in force (pattern), whether peer contracts are in play
|
|
13
12
|
(crosslink), where the trace is, and when the run will pause.
|
|
14
13
|
|
|
@@ -26,7 +25,7 @@ after: src/payments — 2 shipped files rewritten within 30 days of run stor
|
|
|
26
25
|
crosslink: 2 boundaries (payments-api) — advisory
|
|
27
26
|
extra: ON — 4 of 9 tasks foreign · deepseek/deepseek-v4-flash via api [0,30)
|
|
28
27
|
· glm/glm-4.7 via cli [30,70) · 2 held back (risk: auth, money)
|
|
29
|
-
scoring:
|
|
28
|
+
scoring: 5-band default table
|
|
30
29
|
tdd: 3 tasks with tests (T3, T6, T9) · 2 covered-by-existing · 2 no-behavior
|
|
31
30
|
skipped: R4 translation strings (no-behavior) · R7 file split
|
|
32
31
|
(covered-by-existing → test/api/health.test.js:41)
|
|
@@ -49,7 +48,7 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
|
|
|
49
48
|
that the run is not learning from its own repairs, and a user who did not should
|
|
50
49
|
see that it is. Canonical: `../../_shared/gotchas.md`. `.claude/orc/gotchas.md`
|
|
51
50
|
is where the entries live.
|
|
52
|
-
- **wiki, the debt tail
|
|
51
|
+
- **wiki, the debt tail:** append `· <n> docs pending refresh, <tok> /
|
|
53
52
|
<$>` from `orc wiki debt --json` **only when debt exists** (exit 1). Exit 0
|
|
54
53
|
appends nothing — a tail that says "no debt" on every run is a tail people stop
|
|
55
54
|
reading, and this one has to be legible the time it matters.
|
|
@@ -73,7 +72,7 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
|
|
|
73
72
|
- **crosslink:** the crosslink line from `wiki-consult.md` when a probe hit
|
|
74
73
|
(`cached` or `configured-no-cache`); omit the whole line when crosslink is
|
|
75
74
|
not in play (state `none`).
|
|
76
|
-
- **extra:**
|
|
75
|
+
- **extra:** printed on **every** run where `config.extra_enabled` is
|
|
77
76
|
true — including a run where nothing routed foreign (`ON — 0 of 9 tasks
|
|
78
77
|
foreign; no route row covers this plan's scores`). This is the P0 line
|
|
79
78
|
(`a lane that sends work off Claude without saying so`), so unlike every other
|
|
@@ -101,7 +100,7 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
|
|
|
101
100
|
`EXTRA orphan` line from `trace_extras[]` once you have reported it.
|
|
102
101
|
|
|
103
102
|
Canonical: `../../_shared/extra-dispatch.md`.
|
|
104
|
-
- **scoring:** which executor table RESOLVED for this run — `
|
|
103
|
+
- **scoring:** which executor table RESOLVED for this run — `5-band default
|
|
105
104
|
table` · `Opus-5-only ladder (opus5_only)` · `custom
|
|
106
105
|
(rubric_bands_override, <n> rows)`. An un-shown table is as unaccountable as
|
|
107
106
|
an un-shown number, and the Opus-5-only ladder in particular means EVERY
|
|
@@ -110,12 +109,12 @@ waves: 3 planned — will pause after wave 2 (batch_pause_every=2)
|
|
|
110
109
|
append ` · all fixed roles forced to Opus 5.5` and name any selector it
|
|
111
110
|
shadowed (a `rubric_bands_override` present but INERT) — a setting
|
|
112
111
|
the user tuned and the run then ignored has to be said out loud. With Extra in
|
|
113
|
-
play the table is a COMPOSITE and reads as one (`
|
|
112
|
+
play the table is a COMPOSITE and reads as one (`5-band default table + extra
|
|
114
113
|
rows [0,30) [30,70)`) — Extra is an overlay, so naming only one of the two would
|
|
115
114
|
be naming the wrong half for every covered score.
|
|
116
115
|
- **tdd:** ALWAYS printed on a lane whose TDD policy is on — BOTH branches, not
|
|
117
116
|
only the exemption. Counted straight from the plan's `tdd_spec`, broken down
|
|
118
|
-
by `disposition` so the user sees **what got no test and why
|
|
117
|
+
by `disposition` so the user sees **what got no test and why**:
|
|
119
118
|
|
|
120
119
|
```
|
|
121
120
|
tdd: 3 tasks with tests (T3, T6, T9) · 2 covered-by-existing · 2 no-behavior
|
|
@@ -150,10 +149,10 @@ block.
|
|
|
150
149
|
|
|
151
150
|
---
|
|
152
151
|
|
|
153
|
-
# The `forecast:` block
|
|
152
|
+
# The `forecast:` block — printed EARLIER, and separately
|
|
154
153
|
|
|
155
154
|
A second, shorter block. It is NOT part of the preflight block above and does not
|
|
156
|
-
change it. It answers
|
|
155
|
+
change it. It answers one question: **what will this run
|
|
157
156
|
cost me in time, before it starts?**
|
|
158
157
|
|
|
159
158
|
## When
|
|
@@ -17,13 +17,15 @@ Apply at Phase 0, on top of the normal config resolution:
|
|
|
17
17
|
- `pattern_findings` = on · `generate_tests` = on · `security_review` = on.
|
|
18
18
|
- Executor **tier floor**: remap the resolved score→model table so no task
|
|
19
19
|
dispatches below `orc-executor-sonnet-5-high`; bands at/above the opus
|
|
20
|
-
boundary (
|
|
20
|
+
boundary (41) rise to at least `orc-executor-opus-5-low`. The floor only ever
|
|
21
21
|
raises a band, so the top `[90,100]` band keeps `orc-executor-opus-5-med`.
|
|
22
22
|
**Under `opus5_only` the floor raises EFFORT, not model** (every band is
|
|
23
23
|
already Opus 5.5, so there is no model left to raise): the `[0,90)` band rises
|
|
24
24
|
low → medium, which makes both bands medium. It is still a floor — it never
|
|
25
25
|
lowers a band, and it never raises `[90,100]` past medium.
|
|
26
26
|
Show the remapped table with the Phase 2 scoring table.
|
|
27
|
+
- **Habits** (`habits{}` present) never answer a forced key or question here —
|
|
28
|
+
ultra wins; say so on the habits preflight line. Record those `ASK`s `by=config`.
|
|
27
29
|
|
|
28
30
|
> Opus-5-only mode: if `opus5_only`, every role this lane dispatches is already
|
|
29
31
|
> Opus 5.5 (advisor and judge are pinned there by default) and the scouts rise to
|
|
@@ -83,13 +85,13 @@ author's reasoning or self-assessment.
|
|
|
83
85
|
evidence`. An R# with an EMPTY diff column is a deterministically caught
|
|
84
86
|
missing implementation — dispatch the fix wave directly, no judge needed
|
|
85
87
|
for that miss.
|
|
86
|
-
2. **Static analysis**:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
2. **Static analysis**: the shared R1 free check
|
|
89
|
+
(`../../_shared/review-slice.md` §1) — reuse Phase 5's `tool_findings[]`;
|
|
90
|
+
re-run it when a fix wave changed files. Never install tooling.
|
|
91
|
+
Tool findings on changed lines are blocking input the judge triages.
|
|
90
92
|
Slice adds: matrix, changed-file LIST (never an inlined diff — the judge
|
|
91
|
-
reads matrix-guided via its own Read/Grep), verify report,
|
|
92
|
-
|
|
93
|
+
reads matrix-guided via its own Read/Grep), verify report, `tool_findings[]`,
|
|
94
|
+
`gotcha_card` (§2), the resolved pattern's blocking invariants. REVISE → scored
|
|
93
95
|
executor **fix wave** for only the affected tasks (findings verbatim in
|
|
94
96
|
slices) → re-verify → re-judge. All clear → Phase 7.
|
|
95
97
|
|