@azure-id/orc 1.8.1 → 1.9.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 +386 -0
- package/README-id.md +110 -73
- package/README.md +96 -33
- package/bin/cli.js +45520 -44867
- package/bin/graph-extract.js +2409 -120
- package/bin/graph-gain.js +404 -0
- package/bin/graph-map.js +232 -0
- package/bin/graph-notes.js +49 -8
- package/bin/graph-query.js +1770 -808
- package/bin/graph-resolve.js +93 -16
- package/bin/graph-shard.js +325 -0
- package/bin/graph.js +658 -605
- package/bin/verify-contracts.js +297 -56
- package/bin/verify-package.js +29 -1
- package/bin/webui/api.js +6 -0
- package/bin/webui/fixtures/index.js +6 -1
- package/bin/webui/fixtures/knowledge.js +41 -1
- package/bin/webui/fixtures/stats.js +107 -104
- package/bin/webui/i18n/en/knowledge.json +16 -1
- package/bin/webui/i18n/id/knowledge.json +16 -1
- package/bin/webui/js/panels/knowledge.js +68 -3
- package/mock-run/orc-quick.md +141 -113
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +15 -5
- package/templates/agents/orc-executor-haiku-4-5.md +25 -13
- package/templates/agents/orc-executor-opus-4-7-high.md +25 -13
- package/templates/agents/orc-executor-opus-4-7-med.md +25 -13
- package/templates/agents/orc-executor-opus-4-8-high.md +25 -13
- package/templates/agents/orc-executor-opus-5-high.md +25 -13
- package/templates/agents/orc-executor-opus-5-low.md +25 -13
- package/templates/agents/orc-executor-opus-5-med.md +25 -13
- package/templates/agents/orc-executor-sonnet-4-6-high.md +25 -13
- package/templates/agents/orc-executor-sonnet-4-6-med.md +25 -13
- package/templates/agents/orc-executor-sonnet-5-high.md +25 -13
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +15 -12
- package/templates/agents/orc-planner-mini-opus-5-med.md +75 -69
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +73 -67
- package/templates/agents/orc-recon-opus-5-low.md +99 -0
- package/templates/agents/orc-recon-sonnet-4-6-med.md +99 -0
- package/templates/commands/orc-mini.md +10 -12
- package/templates/commands/orc-quick.md +20 -33
- package/templates/hooks/README.md +13 -3
- package/templates/hooks/orc-graph-hook.js +148 -13
- package/templates/hooks/orc-trace.js +476 -471
- package/templates/skills/_shared/code-graph.md +148 -20
- package/templates/skills/_shared/phases/execution.md +13 -11
- package/templates/skills/_shared/phases/planning.md +8 -1
- package/templates/skills/_shared/phases/rules.md +172 -159
- package/templates/skills/_shared/phases/ship.md +5 -1
- package/templates/skills/_shared/phases/trace.md +4 -1
- package/templates/skills/_shared/phases/wiki-consult.md +10 -6
- package/templates/skills/_shared/read-ladder.md +10 -2
- package/templates/skills/_shared/return-validation.md +22 -0
- package/templates/skills/context-combiner/SKILL.md +13 -13
- package/templates/skills/orc/SKILL.md +1 -1
- package/templates/skills/orc/subskills/orc-execution/core.md +171 -159
- package/templates/skills/orc-analyze/SKILL.md +13 -13
- package/templates/skills/orc-diy/references/flow-schema.md +1 -1
- package/templates/skills/orc-mini/SKILL.md +148 -136
- package/templates/skills/orc-mini/examples/mini-run-mock.md +64 -50
- package/templates/skills/orc-mini/references/complexity.md +105 -0
- package/templates/skills/orc-quick/README.md +495 -423
- package/templates/skills/orc-quick/SKILL.md +157 -211
- package/templates/skills/orc-quick/references/context-doc.md +145 -114
- package/templates/skills/orc-quick/references/defect.md +101 -0
- package/templates/skills/orc-quick/references/dispatch-gate.md +55 -24
- package/templates/skills/orc-quick/references/gh-mode.md +148 -127
- package/templates/skills/orc-quick/references/look.md +107 -0
- package/templates/skills/orc-wiki/references/staleness.md +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# The complexity read — one line, with the numbers behind it
|
|
2
|
+
|
|
3
|
+
This replaces the full lane's scoring table. It asks one question: **is this
|
|
4
|
+
still a mini-sized change?** It answers with counts, not with a feeling, and
|
|
5
|
+
the answer is an OFFER — the user always chooses.
|
|
6
|
+
|
|
7
|
+
It runs after the planner returns and passes the exit gate, before dispatch.
|
|
8
|
+
|
|
9
|
+
## 1. The three calls
|
|
10
|
+
|
|
11
|
+
| Call | What you take from it | Exit codes |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `orc graph impact <declared_files> --if-enabled --json` | confident callers OUTSIDE `declared_files`, the distinct files they sit in, the tests that reach | 0 found · 1 no graph · 3 off · 4 not found |
|
|
14
|
+
| `orc graph cochange <each declared file> --if-enabled --json` | partners with `count >= 3` that are not in `declared_files` | 0 rows · 1 no history · 3 off · 4 none |
|
|
15
|
+
| the planner's own `facets.risk[]` | the cited risk classes | — |
|
|
16
|
+
|
|
17
|
+
One `impact` call for ALL the declared files. `cochange` is one call per file.
|
|
18
|
+
|
|
19
|
+
**Exit 3 anywhere means the graph is off.** Print the `graph off` form of the
|
|
20
|
+
line (§3) and decide from `facets.risk[]` alone. Never invent a number.
|
|
21
|
+
|
|
22
|
+
## 1b. `graph_facts` — the same numbers, in the planner slice
|
|
23
|
+
|
|
24
|
+
The planner is dispatched BEFORE the complexity read, and it gets the same
|
|
25
|
+
facts, so it can ground its own plan on them instead of guessing:
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
graph_facts:
|
|
29
|
+
map: <the `map --focus` text, 800 tokens at most, or null>
|
|
30
|
+
impact: [{file, confident_callers, caller_files, tests_reaching}]
|
|
31
|
+
cochange: [{file, partners: [{path, count}]}]
|
|
32
|
+
generation: <n>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The graph off, or every call exit 3 → `graph_facts: null`, and the planner plans
|
|
36
|
+
as it did before. A `cochange` partner that is not in the plan becomes an
|
|
37
|
+
`open_questions[]` entry — never a file the planner adds in silence.
|
|
38
|
+
|
|
39
|
+
## 2. How to count
|
|
40
|
+
|
|
41
|
+
**Confident callers** are the edges the graph is sure about: `LOCAL`, `IMPORT`,
|
|
42
|
+
`UNIQUE` and `ROUTE`. A `ROUTE` edge is a test or a client that reaches the code
|
|
43
|
+
through a URL — it counts, because it breaks like any other caller.
|
|
44
|
+
|
|
45
|
+
**`AMBIGUOUS` callers are counted separately** and printed as `maybe <n>`. They
|
|
46
|
+
never trip a threshold on their own. The catalogue says why: an `AMBIGUOUS`
|
|
47
|
+
caller is counted, never followed.
|
|
48
|
+
|
|
49
|
+
**Outside, not inside.** A caller that lives in a file the plan already declares
|
|
50
|
+
is not blast radius — it is part of the change. Only callers outside
|
|
51
|
+
`declared_files` count.
|
|
52
|
+
|
|
53
|
+
## 3. The line
|
|
54
|
+
|
|
55
|
+
Print exactly one line. Three shapes:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
complexity: mini-ok — 3 files · confident callers 4 in 2 files · tests reach 2 · risk none · cochange none
|
|
59
|
+
complexity: recommend /orc — 6 files · callers 27 in 9 files · risk auth (src/routes/orders.js:12) · cochange src/auth.js x5 not in plan
|
|
60
|
+
complexity: mini-ok (graph off) — 3 files · risk none
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Trace it: `GATE complexity :: <the line>`.
|
|
64
|
+
|
|
65
|
+
## 4. The four thresholds, and why each number
|
|
66
|
+
|
|
67
|
+
**Recommend the full lane when ANY of these holds.** One is enough; they do not
|
|
68
|
+
add up.
|
|
69
|
+
|
|
70
|
+
| Threshold | Why this number |
|
|
71
|
+
|---|---|
|
|
72
|
+
| confident callers in **4 or more files** outside `declared_files` | mini's whole premise is ONE coherent area. Four outside files is a change that is felt across areas, and areas are what a planner and a reviewer exist for. |
|
|
73
|
+
| **8 or more confident callers** outside `declared_files` | one executor and one smoke gate verify a small blast radius well. Eight callers is the point where a reviewer starts to earn its cost. |
|
|
74
|
+
| **any `facets.risk[]` entry** | the six classes — auth, money, migration, security, concurrency, data-integrity — are exactly what the full lane's review and verify phases exist for. The planner already floors them to 70. |
|
|
75
|
+
| a **`cochange` partner with 3 or more co-commits** not in `declared_files` | the repository's own history says people always touch that file too. A plan without it is probably missing a file, and mini has no second pass to notice. |
|
|
76
|
+
|
|
77
|
+
## 5. The offer
|
|
78
|
+
|
|
79
|
+
The recommendation never switches the lane by itself:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
complexity: recommend /orc — 6 files · callers 27 in 9 files · risk auth (src/routes/orders.js:12)
|
|
83
|
+
|
|
84
|
+
1. switch to /orc (recommended — a cited auth risk, and 27 callers in 9 files)
|
|
85
|
+
2. continue in mini
|
|
86
|
+
|
|
87
|
+
Your choice.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**If the user continues in mini, write the NUMBERS into the decision log**, not
|
|
91
|
+
just the choice:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
complexity: recommended /orc (callers 27 in 9 files · risk auth) — user continued in mini
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Months later that line answers "did anyone know this was big?" without anyone
|
|
98
|
+
having to guess.
|
|
99
|
+
|
|
100
|
+
## 6. Why the thresholds are printed, not hidden
|
|
101
|
+
|
|
102
|
+
The numbers sit in the `GATE complexity` trace line on purpose. `/orc-retro`
|
|
103
|
+
reads the traces, so a threshold that is wrong for a project can be MEASURED and
|
|
104
|
+
moved, instead of argued about. A verdict with no numbers behind it cannot be
|
|
105
|
+
calibrated by anyone.
|